paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
Exploiting Class Activation Value for Partial-Label Learning | 1 INTRODUCTION . To liberate humans from exhaustive label annotation work , numerous researchers have dedicated themselves to investigating various weakly supervised learning ( WSL ) ( Zhou , 2017 ) problems , including but not limited to noisy-label learning ( Liu & Tao , 2015 ; Xia et al. , 2020 ; Han et al. , 2020 ) , semi-supervised learning ( Zhu & Goldberg , 2009 ; Miyato et al. , 2018 ; Luo et al. , 2018 ) , and multiple-instance learning ( Zhou et al. , 2012 ) . This paper focuses on another popular WSL problem called partial-label learning ( PLL ) ( Jin & Ghahramani , 2002 ; Cour et al. , 2011 ) , which aims to learn a model from training examples equipped with a set of candidate labels that include the true †Correspondence to Lei Feng ( lfeng @ cqu.edu.cn ) and Bo Han ( bhanml @ comp.hkbu.edu.hk ) . label . Due to the cost and difficulty of annotating every example exactly with the true label in huge datasets , PLL has been widely applied to various tasks such as multimedia context analysis ( Zeng et al. , 2013 ) and web mining ( Luo & Orabona , 2010 ) . To solve the PLL problem , there are two mainstream strategies to discriminate the unknown true label from candidate labels , including the average-based strategy ( ABS ) and the identification-based strategy ( IBS ) . ABS always treats each candidate label equally and averages the model outputs of all candidate labels for prediction ( Hüllermeier & Beringer , 2006 ; Cour et al. , 2011 ; Feng et al. , 2020 ; Yao et al. , 2020 ; Wen et al. , 2021 ) . IBS concentrates on iteratively selecting one label from the candidate label set as the true label to exclude the uncertainty , forming PLL into an ordinary classification problem ( Jin & Ghahramani , 2002 ; Liu & Dietterich , 2014 ; Zhang & Yu , 2015 ; Zhang et al. , 2016 ) . Among these methods , only several of them ( Yao et al. , 2020 ; Wen et al. , 2021 ) can be compatible with deep neural networks , which achieved state-of-the-art performance . Most of the existing PLL methods aim at designing proper training objectives under various assumptions on the collected data . For example , the consistent methods proposed by Feng et al . ( 2020 ) are based on a specific data generation assumption . The derivation of the PRODEN method ( Lv et al. , 2020 ) stems from the assumption that the true label achieves the minimal loss among the candidate labels . Yan & Guo ( 2021 ) proposed the MGPLL method based on the assumption of non-random label noise . Although these methods have achieved generally great empirical performance , their performance could be degraded when the collected data can not meet the adopted assumptions . In this paper , we aim to investigate a novel PLL method by exploiting the learned intrinsic representation of the model to identify the ground truth in the training process without relying on any assumptions on the collected data . We focus on the class activation map ( CAM ) ( Zhou et al. , 2016 ) , which is a prevailing tool for visualizing the representation information of convolutional neural network ( CNN ) -based models and could be easily obtained by the weighted linear sum of the feature maps . As CAM is able to discriminate the learning patterns of each class for the model , we conjecture that CAM could be used to guide the model to spot the true label . To verify this assumption , we conducted a pilot experiment on CIFAR-10 ( Krizhevsky et al. , 2009 ) , where the candidate label sets were generated in two different ways . As shown in Figure 1 ( please refer to Section 2.2 ) , it is surprising to find that CAM can potentially help the model recognize the true labels , and such capacity of CAM synchronously changes with the classifier performance during the whole training phase . Based on the experimental results , it can be conjectured that such intrinsic representations can be useful to distinguish the true label from candidate labels for PLL . Motivated by the above observations , we naturally consider leveraging CAM to solve the PLL problem . However , CAM was only proposed for addressing image datasets with using deep models built on CNN , revealing two limitations on its application . Firstly , CAM can not be adopted to the classifier based on shallow models such as the linear model and multilayer perceptron ( MLP ) . Secondly , CAM is unable to deal with any inputs other than the image . To overcome these shortcomings , we for the first time propose a simple but effective tool—the class activation value ( CAV ) to capture the learned representation information in a more general way , which is essentially the weighted output of the classifier . Experimental results in Figure 2 and Appendix B.7 also shows that our CAV works similarly as CAM during the training phase . Building upon CAV , we propose a simple yet effective PLL method called CAV Learning ( CAVL ) that guides the model to differentiate the true label from the candidate set during the training process . Specifically , we first train the model by treating all candidate labels equally and obtain CAVs of given training examples , and then regard the class with the maximum CAV as the true label for each instance during the training process . In this way , CAVL transforms PLL into supervised learning , thereby making the model reliable to recognize the true label with learned representation information by CAV . Extensive experiments on benchmark-simulated and real-world datasets show that our proposed CAVL method achieves state-of-the-art performance . 2 DISCOVERING CLASS ACTIVATION MAP FOR PARTIAL-LABEL LEARNING . In this section , we provide a detailed discussion about our motivation and empirically show that the class activation map could be helpful for addressing PLL . 2.1 CLASS ACTIVATION MAP . The class activation map ( CAM ) ( Zhou et al. , 2016 ) is a popular and elementary mechanism in computer vision to represent the discriminative part of an input image captured by the classifier to identify each class . In other words , CAM manifests the learning patterns of the classifier , denoted as f , to the specific class in the image . Let us denote an input image as x ∈ Rd=c×h×w ( with c channels , height h and width w ) and CAM of x ∈ Rd=c×h×w as m ∈ Rk×h×w where k is the number of classes . We note thatm could be generated by training a specific classification model fc , which normally comprises of an encoder function e : X → Rcf×h×w for feature map extraction , a Global Average-Pooling layer gap : Rcf×h×w → Rcf×1 , and a linear layer with weight θ ∈ Rk×Cf , where cf is the number of channels in the feature maps . Therefore , CAM of x related to the j-th class could be obtained by mj = ∑Cf i=1 ( θj ) ie i ( x ) , j ∈ { 1 , . . . , k } , ( 1 ) where θj ∈ R1×Cf is the corresponding linear weight related to the j-th object . CAM is a weighted linear sum of feature maps and the linear weights . The weakness of CAM is the limited applications , since not all classification network architectures follow the model fc mentioned above . To improve its generalization for any CNN-based model f , Gradient-weighted CAM ( Grad-CAM ) ( Selvaraju et al. , 2017 ) was proposed to implement such an internal representation by reasonably leveraging class-specific gradient information . Concretely , let us denote by gj ∈ Rd=c×h×w the Grad-CAM of x related to the j-th object , and gj could be expressed as gj = 1 h× w ∑cf z=1 ∑h m=1 ∑w n=1 ∂f j ( x ) ∂ez ( x ) m , n ez ( x ) . ( 2 ) Intuitively , the derivative of logit f ( x ) with respect to feature map e ( x ) is used as the weights for calculating g. Note that both Grad-CAM and CAM are generated by weighted sums of the feature maps , and Grad-CAM is equivalent to CAM when f follows the same architecture as fc . Based on Grad-CAM , Grad-CAM++ ( Chattopadhay et al. , 2018 ) aims to provide better visual explanations of CNN and occurrences of multiple foreground objects . Thanks to such a simple technique , numerous problems in computer vision such as interpretation ( Xu et al. , 2019a ) and weakly supervised semantic segmentation ( Wei et al. , 2016 ) have achieved marvelous progress . In this paper , we aim to extract and improve the useful knowledge from CAM to address the PLL problem , leading the classifier to identify the ground truth . 2.2 PILOT EXPERIMENT ON CAM . Generally , Grad-CAM or CAM is treated as the internal representation of f . We believe that such a mechanism could guide f to differentiate the true label from the candidate set because it is constructed by taking advantage of internal elements in f . To validate our conjecture , we conducted a pilot experiment by adopting two different label selection methods . The first one is the intuitive method ( IM ) , which simply regards all the labels from the candidate sets as the true labels with using cross entropy loss . The second one is the “ CAM label ” selection strategy , which discriminates the true label from the candidate label set by using CAM . During each training epoch , we calculated the number of the foreground seeds of CAM from each candidate label set . Specifically , to calculate the number of foreground seeds of mj , we counted the elements with positive values in mj . Note that each x could possess k CAMs and the true label is always in the candidate set . Thus we selected the label from the candidate set , whose CAM owns most foreground seeds as the true label . The label candidate label sets were generated by two different approaches : ( I ) Uniformly Sampling Strategy ( USS ) . Uniformly sampling the candidate label set for each training instance from all the possible candidate label sets ( Feng et al. , 2020 ) . ( II ) Flipping Probability Strategy ( FPS ) . By setting a flipping probability q to any false label , the false label could be selected as a candidate label with a probability q ( Feng & An , 2019a ; Yan & Guo , 2020 ; Lv et al. , 2020 ; Wen et al. , 2021 ) . Here the detailed training settings of the experiments are similar to the experiment part ( please refer to Section 4.1.1 for details ) . ResNet ( He et al. , 2016 ) and DenseNet ( Huang et al. , 2017 ) were chosen as the backbones to train a classifier on CIFAR-10 ( Krizhevsky et al. , 2009 ) . Figure 1 shows the average results of 5-time trials and we can find that CAM demonstrates two helpful features during the training phase . Firstly , it is clear that the performance of the classifier ( a ) ResNet + USS ( b ) DenseNet + FPS Methods in ( a ) are implemented by ResNet with using USS to generate the candidate set . Methods in ( b ) are conducted by DenseNet with the candidate label sets produced by FPS . For three lines representing accuracy performance , the results drawn by the blue dashed line and red line ( “ CAM ” line ) are obtained by using the “ CAM label ” selection strategy , namely training the model with regarding the class with the most number of activated seeds in its CAM as the true label . Specifically , the red line depicts the training accuracy measured by selecting the CAM with the maximum activated seeds from the candidate set as the true label , and the blue line simply depicts the test accuracy of the classifier . The yellow dashed line ( “ IM ” line ) depicts the test accuracy of the classifier trained by IM . The paired circle indicates the similar accuracy fluctuation between the classifier and CAM , which shows the dynamic attribute . The double arrow marks the performance gap between “ CAM ” label selection strategy and IM , which represents the power attribute . Figure 1 : Comparison of accuracy performance of two different label selection strategies . trained by “ CAM label ” selection strategy is better than IM ( the gap between the blue dashed line and the yellow dashed line ) , which shows that CAM could potentially guide the classifier toward the true label from the candidate set . Here we name this attribute of CAM as power . Secondly , it is found that the accuracy of identifying true labels by CAM is synchronously changed with that by the classifier . Several fluctuations ( marked by the paired circle ) of the classifier performance ( test accuracy ) and CAM accuracy are similar to a large extent , resulting in continuous improvement to the model itself . Here we name this observed feature of CAM as dynamic . The power and dynamic attributes disclose the fact that CAM may show more than we thought , which is an inspiring finding to address PLL . The power attribute motivates us to consider that the classifier may learn more accurate true labels if it is forced to approximate the label distribution recognized by CAM . The dynamic attribute may guarantee that such guidance would be constantly effective during the whole training phase since CAM would synchronously be self-improved as the classifier becomes stronger . Hence it would be reasonable and meaningful to explore such internal sign as guidance for PLL . | This paper studies an interesting weakly supervised learning problem called partial-label learning, which solves the multi-class classification problem, where each training instance is assigned a set of candidate labels that include a set of candidate labels that include the true label. This paper empirically shows that the Class Activation Map (CAM), a simple technique for discriminating the learning patterns of each class in images, is better at making accurate predictions than the model itself on selecting the true label from candidate labels. Based on this motivation, this paper proposes a versatile version of CAM called Class Activation Value (CAV) and proposes a novel method to selects the true label by the maximum CAV for partial-label learning. Experiments validate the effectiveness of the proposed method. | SP:280c8069cdfecd5d7c4a3a4644db8a7d04d93197 |
Exploiting Class Activation Value for Partial-Label Learning | 1 INTRODUCTION . To liberate humans from exhaustive label annotation work , numerous researchers have dedicated themselves to investigating various weakly supervised learning ( WSL ) ( Zhou , 2017 ) problems , including but not limited to noisy-label learning ( Liu & Tao , 2015 ; Xia et al. , 2020 ; Han et al. , 2020 ) , semi-supervised learning ( Zhu & Goldberg , 2009 ; Miyato et al. , 2018 ; Luo et al. , 2018 ) , and multiple-instance learning ( Zhou et al. , 2012 ) . This paper focuses on another popular WSL problem called partial-label learning ( PLL ) ( Jin & Ghahramani , 2002 ; Cour et al. , 2011 ) , which aims to learn a model from training examples equipped with a set of candidate labels that include the true †Correspondence to Lei Feng ( lfeng @ cqu.edu.cn ) and Bo Han ( bhanml @ comp.hkbu.edu.hk ) . label . Due to the cost and difficulty of annotating every example exactly with the true label in huge datasets , PLL has been widely applied to various tasks such as multimedia context analysis ( Zeng et al. , 2013 ) and web mining ( Luo & Orabona , 2010 ) . To solve the PLL problem , there are two mainstream strategies to discriminate the unknown true label from candidate labels , including the average-based strategy ( ABS ) and the identification-based strategy ( IBS ) . ABS always treats each candidate label equally and averages the model outputs of all candidate labels for prediction ( Hüllermeier & Beringer , 2006 ; Cour et al. , 2011 ; Feng et al. , 2020 ; Yao et al. , 2020 ; Wen et al. , 2021 ) . IBS concentrates on iteratively selecting one label from the candidate label set as the true label to exclude the uncertainty , forming PLL into an ordinary classification problem ( Jin & Ghahramani , 2002 ; Liu & Dietterich , 2014 ; Zhang & Yu , 2015 ; Zhang et al. , 2016 ) . Among these methods , only several of them ( Yao et al. , 2020 ; Wen et al. , 2021 ) can be compatible with deep neural networks , which achieved state-of-the-art performance . Most of the existing PLL methods aim at designing proper training objectives under various assumptions on the collected data . For example , the consistent methods proposed by Feng et al . ( 2020 ) are based on a specific data generation assumption . The derivation of the PRODEN method ( Lv et al. , 2020 ) stems from the assumption that the true label achieves the minimal loss among the candidate labels . Yan & Guo ( 2021 ) proposed the MGPLL method based on the assumption of non-random label noise . Although these methods have achieved generally great empirical performance , their performance could be degraded when the collected data can not meet the adopted assumptions . In this paper , we aim to investigate a novel PLL method by exploiting the learned intrinsic representation of the model to identify the ground truth in the training process without relying on any assumptions on the collected data . We focus on the class activation map ( CAM ) ( Zhou et al. , 2016 ) , which is a prevailing tool for visualizing the representation information of convolutional neural network ( CNN ) -based models and could be easily obtained by the weighted linear sum of the feature maps . As CAM is able to discriminate the learning patterns of each class for the model , we conjecture that CAM could be used to guide the model to spot the true label . To verify this assumption , we conducted a pilot experiment on CIFAR-10 ( Krizhevsky et al. , 2009 ) , where the candidate label sets were generated in two different ways . As shown in Figure 1 ( please refer to Section 2.2 ) , it is surprising to find that CAM can potentially help the model recognize the true labels , and such capacity of CAM synchronously changes with the classifier performance during the whole training phase . Based on the experimental results , it can be conjectured that such intrinsic representations can be useful to distinguish the true label from candidate labels for PLL . Motivated by the above observations , we naturally consider leveraging CAM to solve the PLL problem . However , CAM was only proposed for addressing image datasets with using deep models built on CNN , revealing two limitations on its application . Firstly , CAM can not be adopted to the classifier based on shallow models such as the linear model and multilayer perceptron ( MLP ) . Secondly , CAM is unable to deal with any inputs other than the image . To overcome these shortcomings , we for the first time propose a simple but effective tool—the class activation value ( CAV ) to capture the learned representation information in a more general way , which is essentially the weighted output of the classifier . Experimental results in Figure 2 and Appendix B.7 also shows that our CAV works similarly as CAM during the training phase . Building upon CAV , we propose a simple yet effective PLL method called CAV Learning ( CAVL ) that guides the model to differentiate the true label from the candidate set during the training process . Specifically , we first train the model by treating all candidate labels equally and obtain CAVs of given training examples , and then regard the class with the maximum CAV as the true label for each instance during the training process . In this way , CAVL transforms PLL into supervised learning , thereby making the model reliable to recognize the true label with learned representation information by CAV . Extensive experiments on benchmark-simulated and real-world datasets show that our proposed CAVL method achieves state-of-the-art performance . 2 DISCOVERING CLASS ACTIVATION MAP FOR PARTIAL-LABEL LEARNING . In this section , we provide a detailed discussion about our motivation and empirically show that the class activation map could be helpful for addressing PLL . 2.1 CLASS ACTIVATION MAP . The class activation map ( CAM ) ( Zhou et al. , 2016 ) is a popular and elementary mechanism in computer vision to represent the discriminative part of an input image captured by the classifier to identify each class . In other words , CAM manifests the learning patterns of the classifier , denoted as f , to the specific class in the image . Let us denote an input image as x ∈ Rd=c×h×w ( with c channels , height h and width w ) and CAM of x ∈ Rd=c×h×w as m ∈ Rk×h×w where k is the number of classes . We note thatm could be generated by training a specific classification model fc , which normally comprises of an encoder function e : X → Rcf×h×w for feature map extraction , a Global Average-Pooling layer gap : Rcf×h×w → Rcf×1 , and a linear layer with weight θ ∈ Rk×Cf , where cf is the number of channels in the feature maps . Therefore , CAM of x related to the j-th class could be obtained by mj = ∑Cf i=1 ( θj ) ie i ( x ) , j ∈ { 1 , . . . , k } , ( 1 ) where θj ∈ R1×Cf is the corresponding linear weight related to the j-th object . CAM is a weighted linear sum of feature maps and the linear weights . The weakness of CAM is the limited applications , since not all classification network architectures follow the model fc mentioned above . To improve its generalization for any CNN-based model f , Gradient-weighted CAM ( Grad-CAM ) ( Selvaraju et al. , 2017 ) was proposed to implement such an internal representation by reasonably leveraging class-specific gradient information . Concretely , let us denote by gj ∈ Rd=c×h×w the Grad-CAM of x related to the j-th object , and gj could be expressed as gj = 1 h× w ∑cf z=1 ∑h m=1 ∑w n=1 ∂f j ( x ) ∂ez ( x ) m , n ez ( x ) . ( 2 ) Intuitively , the derivative of logit f ( x ) with respect to feature map e ( x ) is used as the weights for calculating g. Note that both Grad-CAM and CAM are generated by weighted sums of the feature maps , and Grad-CAM is equivalent to CAM when f follows the same architecture as fc . Based on Grad-CAM , Grad-CAM++ ( Chattopadhay et al. , 2018 ) aims to provide better visual explanations of CNN and occurrences of multiple foreground objects . Thanks to such a simple technique , numerous problems in computer vision such as interpretation ( Xu et al. , 2019a ) and weakly supervised semantic segmentation ( Wei et al. , 2016 ) have achieved marvelous progress . In this paper , we aim to extract and improve the useful knowledge from CAM to address the PLL problem , leading the classifier to identify the ground truth . 2.2 PILOT EXPERIMENT ON CAM . Generally , Grad-CAM or CAM is treated as the internal representation of f . We believe that such a mechanism could guide f to differentiate the true label from the candidate set because it is constructed by taking advantage of internal elements in f . To validate our conjecture , we conducted a pilot experiment by adopting two different label selection methods . The first one is the intuitive method ( IM ) , which simply regards all the labels from the candidate sets as the true labels with using cross entropy loss . The second one is the “ CAM label ” selection strategy , which discriminates the true label from the candidate label set by using CAM . During each training epoch , we calculated the number of the foreground seeds of CAM from each candidate label set . Specifically , to calculate the number of foreground seeds of mj , we counted the elements with positive values in mj . Note that each x could possess k CAMs and the true label is always in the candidate set . Thus we selected the label from the candidate set , whose CAM owns most foreground seeds as the true label . The label candidate label sets were generated by two different approaches : ( I ) Uniformly Sampling Strategy ( USS ) . Uniformly sampling the candidate label set for each training instance from all the possible candidate label sets ( Feng et al. , 2020 ) . ( II ) Flipping Probability Strategy ( FPS ) . By setting a flipping probability q to any false label , the false label could be selected as a candidate label with a probability q ( Feng & An , 2019a ; Yan & Guo , 2020 ; Lv et al. , 2020 ; Wen et al. , 2021 ) . Here the detailed training settings of the experiments are similar to the experiment part ( please refer to Section 4.1.1 for details ) . ResNet ( He et al. , 2016 ) and DenseNet ( Huang et al. , 2017 ) were chosen as the backbones to train a classifier on CIFAR-10 ( Krizhevsky et al. , 2009 ) . Figure 1 shows the average results of 5-time trials and we can find that CAM demonstrates two helpful features during the training phase . Firstly , it is clear that the performance of the classifier ( a ) ResNet + USS ( b ) DenseNet + FPS Methods in ( a ) are implemented by ResNet with using USS to generate the candidate set . Methods in ( b ) are conducted by DenseNet with the candidate label sets produced by FPS . For three lines representing accuracy performance , the results drawn by the blue dashed line and red line ( “ CAM ” line ) are obtained by using the “ CAM label ” selection strategy , namely training the model with regarding the class with the most number of activated seeds in its CAM as the true label . Specifically , the red line depicts the training accuracy measured by selecting the CAM with the maximum activated seeds from the candidate set as the true label , and the blue line simply depicts the test accuracy of the classifier . The yellow dashed line ( “ IM ” line ) depicts the test accuracy of the classifier trained by IM . The paired circle indicates the similar accuracy fluctuation between the classifier and CAM , which shows the dynamic attribute . The double arrow marks the performance gap between “ CAM ” label selection strategy and IM , which represents the power attribute . Figure 1 : Comparison of accuracy performance of two different label selection strategies . trained by “ CAM label ” selection strategy is better than IM ( the gap between the blue dashed line and the yellow dashed line ) , which shows that CAM could potentially guide the classifier toward the true label from the candidate set . Here we name this attribute of CAM as power . Secondly , it is found that the accuracy of identifying true labels by CAM is synchronously changed with that by the classifier . Several fluctuations ( marked by the paired circle ) of the classifier performance ( test accuracy ) and CAM accuracy are similar to a large extent , resulting in continuous improvement to the model itself . Here we name this observed feature of CAM as dynamic . The power and dynamic attributes disclose the fact that CAM may show more than we thought , which is an inspiring finding to address PLL . The power attribute motivates us to consider that the classifier may learn more accurate true labels if it is forced to approximate the label distribution recognized by CAM . The dynamic attribute may guarantee that such guidance would be constantly effective during the whole training phase since CAM would synchronously be self-improved as the classifier becomes stronger . Hence it would be reasonable and meaningful to explore such internal sign as guidance for PLL . | This paper focuses on the problem of partial-label learning (PLL), where each training instance is assigned a set of candidate labels that include the true label. This paper shows that class activation map (CAM) could identify the true label from candidate labels for PLL. In addition, the authors propose the class activation value (CAV) for identification via capturing the learned representation information in a more general way instead of CAM as CAM is confined for image datasets and CNN model. CAV Learning that selects the true label by the class with the maximum CAV for model training is proposed. Experiments on various datasets demonstrate that the proposed method achieves state-of-the-art performance. | SP:280c8069cdfecd5d7c4a3a4644db8a7d04d93197 |
ARTEMIS: Attention-based Retrieval with Text-Explicit Matching and Implicit Similarity | 1 INTRODUCTION . When using an image search engine , should the user provide a detailed textual description or a visual example ? These two image retrieval tasks , respectively studied as cross-modal search ( Wang et al. , 2016 ) and visual search ( Philbin et al. , 2007 ) in the computer vision community , have been the topic of extensive studies . However , limiting search queries to a single modality is restrictive . On the one hand , text proposes an accurate but only partial depiction of the desired result , as it is impossible to provide an exhaustive textual description . On the other hand , visual queries are richer but a lot more ambiguous : how should the system guess which characteristics the user wants to maintain for the target image ? The task of image search with free-form text modifiers reduces this ambiguity by allowing a dual query composed of an example image ( the reference image ) and a textual description ( the text modifier ) which explains how the reference image should be modified to obtain the desired result ( the target image ) . This task is illustrated in Figure 1 . From this formulation , a challenging research question arises ; How should the two facets of this dual query be leveraged and combined ? First methods to answer this question directly borrowed from the visual question answering literature ( Kim et al. , 2016 ; Santoro et al. , 2017 ) . Now , the standard approach for this task consists in fusing the features of the two components of the query into a single representation , so it can be compared to the representation of any potential target image ( Vo et al. , 2019 ; Chen & Bazzani , 2020 ) . Among the current strategies , some resort to rich external information ( Chen et al. , 2020 ; Liu et al. , 2021 ) while others rely on multi-level visual representations ( Chen et al. , 2020 ) or heavy cross-attention architectures ( Hosseinzadeh & Wang , 2020 ; Chawla et al. , 2021 ; Liu et al. , 2021 ) . Departing from these strategies , we draw inspiration from two fields related to the task , cross-modal and visual search , and we advocate for a combination of the two components of the query , in a way that also takes into account their specific relationship with the target image . To this end , we design two independent modules , one for each modality . Our Explicit matching ( EM ) module measures the compatibility of potential target images with the properties mentioned in the textual part of the query , as a form of cross-modal retrieval . Simultaneously , our Implicit similarity ( IS ) module considers the relevance of the target images with respect to the properties of the reference image implied by the textual modifier . Additionally , we note that the text modifier provides some insights about what should change ( as an explicit request from the user ) , but also about what should be preserved in the target image with respect to the reference image ( i.e . what is not mentioned in the text modifier ) . Consequently , each of our modules uses a light-weight attention mechanism , guided by the text modifier which helps selecting the characteristics of the target image to focus on for retrieval . This results in our proposed model , named Attention-based Retrieval with Text-Explicit Matching and Implicit Similarity ( ARTEMIS ) , which jointly learns these two modules , their respective attention mechanisms , and the way they should be combined , in a unified manner . In summary , our contribution is twofold . First , we suggest a new way to look at the task of image search with free-form text modifiers , where we draw inspiration from – and combine – the two fields of cross-modal and visual retrieval . Second , we propose a computationally efficient model based on two complementary modules and their respective text-guided light-weight attention layers , where each handles a modality of the query and both can be trained jointly . We experimentally validate ARTEMIS on several datasets and show that , despite its simplicity in terms of architecture and training strategy , it consistently outperforms the state of the art . 2 RELATED WORK . Image retrieval with purely visual queries has been extensively studied and is typically referred to as instance-level image retrieval ( Philbin et al. , 2007 ) . Most approaches either learn global image representations for efficient search ( Perronnin et al. , 2010 ; Radenović et al. , 2016 ; Gordo et al. , 2016 ) or extract local descriptors for a costly yet robust matching ( Arandjelović & Zisserman , 2012 ; Tolias et al. , 2016 ; Noh et al. , 2017 ) . Current state-of-the-art models use both global and local descriptors jointly and perform both strategies sequentially ( Cao et al. , 2020 ; Tolias et al. , 2020 ) . The most standard retrieval scenario involving text , cross-modal retrieval , uses a textual description of the image of interest as a query . A common approach is to learn a joint embedding space and modality-specific encoders producing global representations in that shared space . Then , the task boils down to computing distances between those representations ( Frome et al. , 2013 ; Wang et al. , 2016 ; Faghri et al. , 2018 ) . The most recent works focus on cross-attention between text segments and image region features ( Lee et al. , 2018 ; Li et al. , 2019 ; 2020 ) . However , these models do not scale , and they require to score each potential text-query target-image pair independently . Miech et al . ( 2021 ) address this issue by distilling a cross-attention architecture into a dual encoder one . Despite similarities between these two tasks and the one of image search with text modifiers , the first baselines for the latter initially adapted visual question answering ( VQA ) approaches ( Kim et al. , 2016 ) . To reason with features from different modalities , Santoro et al . ( 2017 ) use a sequence of MLPs , whereas FiLM ( Perez et al. , 2018 ) injects text features into the image encoder at multiple layers , altering its behavior through complex modifications . Current approaches address this task by composing the two query elements into a single joint representation that is then compared to any potential target image feature . As such , in TIRG ( Vo et al. , 2019 ) , the reference image and the “ relative captions ” ( or text modifiers ) are fused through a gatingresidual mechanism , and the text feature acts as a bridge between the two images in the visual representation space . Anwaar et al . ( 2021 ) use an autoencoder-based model to map the reference and the target images into the same complex space and learn the text modifier representation as a transformation in this space . Lee et al . ( 2021 ) and Chawla et al . ( 2021 ) both propose to disentangle the multi-modal information into content and style . Chen & Bazzani ( 2020 ) resort to image ’ s descriptive texts as side information to train a joint visual-semantic space , and then train a TIRG model on top . The alignment of visual and textual features for regularisation is reused in VAL ( Chen et al. , 2020 ) which also inserts a composite transformer at many levels of the visual encoder to preserve and transform the visual content depending on the text modifier ; the model is then optimized with a hierarchical matching objective . Hosseinzadeh & Wang ( 2020 ) also align image and text through a cross-modal module , but they use region proposals instead of CNN activations . Liu et al . ( 2021 ) propose a transformer-based model that leverages rich pre-trained vision-and-language knowledge for modifying the visual features of the query conditioned by the text . We note that these last methods are reminiscent of the heavy cross-attention models for cross-modal retrieval and share the same limitations with respect to scaling . In contrast to most methods described above , ARTEMIS does not compose modalities into a joint global feature for the query ( Vo et al. , 2019 ; Chen & Bazzani , 2020 ; Lee et al. , 2021 ) , it does not compute costly cross-attention involving the target image ( Hosseinzadeh & Wang , 2020 ; Chawla et al. , 2021 ) and does not extract multi-level visual representations ( Chen et al. , 2020 ) . Instead it leverages the textual modifier in simple attention mechanisms to weight the dimensions of the visual features , emphasizing the characteristics on which the matching should focus . This results in a model with a manageable amount of parameters to learn during training , efficient inference on the query side , and leading to state-of-the-art results . About attention . We note that the term attention has been heavily used in the past , referring to light-weighting mechanisms ( Xu et al. , 2015 ; Li et al. , 2017 ; Kang et al. , 2018 ; Wang et al. , 2019 ) similarly to us , or to more complex weighting mechanisms ( Lu et al. , 2016 ) . This differs from the more recent definition of attention introduced by Vaswani et al . ( 2017 ) , which became standard in many approaches tackling the cross-modal retrieval ( Lee et al. , 2018 ; Li et al. , 2019 ; 2020 ) and VQA ( Bai et al. , 2018 ) tasks . 3 PROPOSED METHOD . This section describes ARTEMIS , our proposed approach for the task of image search with freeform text modifiers . In this setting , queries are bimodal pairs , composed of a reference image Ir and a text modifier Tm . Such queries are used to retrieve any relevant image It from a gallery of images . Let φ ( . ) and θ ( . ) be the visual and textual encoders respectively . We denote the resulting L2normalized features of the reference image r , of the text modifier m , and of the target image t , i.e . r = φ ( Ir ) ∈ RHI , m = θ ( Tm ) ∈ RHT , and t = φ ( It ) ∈ RHI . Two complementary views of the task . Both the textual and the visual cues are important to find relevant target images . Consider for example the query in Figure 1 , where the dress ’ length , among other style components from the visual example , and the colour requested in the text modifier are combined to retrieve relevant results . The reference image provides strong visual context and displays some semantic details that should be shared with the target image , to the extent that the text does not specify their alteration . In other words , by the absence of an explicit modification request of some properties , the modifying text “ validates ” the associated visual cues from the reference image : those visual cues can be used as direct query for the target image . Hence , part of the task boils down to image-to-image retrieval ( visual search ) , implicitly conditioned on the text . On the other hand , the textual cue explicitly calls for modifications of the reference image . It was even observed that , in some cases , users tend to directly describe characteristics of the target im- age , without explicitly stating the discrepancy between the reference and the target image1 ( c.f . the analysis presented for FashionIQ in Table 2 of Wu et al . ( 2021 ) , for CIRR in Table 1 of Liu et al . ( 2021 ) ) . Therefore the text , which describes mandatory details for the target , can be directly used to query for the target image , as is common in text-to-image retrieval . Yet , due to the specificities of the task , we go beyond the usual text-to-image retrieval . Proposed approach . We propose to revisit text-to-image and image-to-image retrieval to tackle the task at stake , which is at the intersection of both . Standard strategies , for both , boil down to directly comparing the global features of the query ( image or text ) and of the potential targets , producing two independent , modality-specific , and not necessarily immediately compatible scoring strategies . In particular , directly comparing the representations of the reference and the target images is inaccurate as the two images should differ , based on the modifying text . Likewise , comparing directly the representations of the modifying text and the target image is undesired since part of the target image should stay similar to the reference image . Here , we reconcile the two tasks and enhance them by designing a model which is trained to match i ) the characteristics of the reference image with the ones of the target image and ii ) the requirements provided by the text with properties of the target image . Based on the intuition above , in both cases we use the text as an attention mechanism to select the visual cues which should be emphasized during matching . The first objective is carried out by the Implicit Similarity module ( Section 3.1 ) , which draws from visual search , and the second by the Explicit Matching module ( Section 3.2 ) , inherited from crossmodal retrieval . These two modules respectively output the IS and the EM scores , which are simply summed into one as a form of late fusion . The modules are jointly trained through this final score ( Section 3.3 ) . The full architecture of the model is illustrated in Figure 2 . | This paper aims to tackle the problem of image search with free-form text modifiers and proposes to combine the implicit similarity and explicit matching score. The implicit similarity module utilizes the textual modifier as a filter to compute the similarity between the query and the target image, and the explicit matching module computes the similarity between the text and the filtered target image. This work combines the image-text similarity and text-guided image-image similarity in a unified framework, and experiments on the Fashion IQ, Shoes and CIRR dataset demonstrates the effectiveness of the proposed strategy. | SP:6fa2e55d804aec84b5eb977ba9f4cf59b3b99eb4 |
ARTEMIS: Attention-based Retrieval with Text-Explicit Matching and Implicit Similarity | 1 INTRODUCTION . When using an image search engine , should the user provide a detailed textual description or a visual example ? These two image retrieval tasks , respectively studied as cross-modal search ( Wang et al. , 2016 ) and visual search ( Philbin et al. , 2007 ) in the computer vision community , have been the topic of extensive studies . However , limiting search queries to a single modality is restrictive . On the one hand , text proposes an accurate but only partial depiction of the desired result , as it is impossible to provide an exhaustive textual description . On the other hand , visual queries are richer but a lot more ambiguous : how should the system guess which characteristics the user wants to maintain for the target image ? The task of image search with free-form text modifiers reduces this ambiguity by allowing a dual query composed of an example image ( the reference image ) and a textual description ( the text modifier ) which explains how the reference image should be modified to obtain the desired result ( the target image ) . This task is illustrated in Figure 1 . From this formulation , a challenging research question arises ; How should the two facets of this dual query be leveraged and combined ? First methods to answer this question directly borrowed from the visual question answering literature ( Kim et al. , 2016 ; Santoro et al. , 2017 ) . Now , the standard approach for this task consists in fusing the features of the two components of the query into a single representation , so it can be compared to the representation of any potential target image ( Vo et al. , 2019 ; Chen & Bazzani , 2020 ) . Among the current strategies , some resort to rich external information ( Chen et al. , 2020 ; Liu et al. , 2021 ) while others rely on multi-level visual representations ( Chen et al. , 2020 ) or heavy cross-attention architectures ( Hosseinzadeh & Wang , 2020 ; Chawla et al. , 2021 ; Liu et al. , 2021 ) . Departing from these strategies , we draw inspiration from two fields related to the task , cross-modal and visual search , and we advocate for a combination of the two components of the query , in a way that also takes into account their specific relationship with the target image . To this end , we design two independent modules , one for each modality . Our Explicit matching ( EM ) module measures the compatibility of potential target images with the properties mentioned in the textual part of the query , as a form of cross-modal retrieval . Simultaneously , our Implicit similarity ( IS ) module considers the relevance of the target images with respect to the properties of the reference image implied by the textual modifier . Additionally , we note that the text modifier provides some insights about what should change ( as an explicit request from the user ) , but also about what should be preserved in the target image with respect to the reference image ( i.e . what is not mentioned in the text modifier ) . Consequently , each of our modules uses a light-weight attention mechanism , guided by the text modifier which helps selecting the characteristics of the target image to focus on for retrieval . This results in our proposed model , named Attention-based Retrieval with Text-Explicit Matching and Implicit Similarity ( ARTEMIS ) , which jointly learns these two modules , their respective attention mechanisms , and the way they should be combined , in a unified manner . In summary , our contribution is twofold . First , we suggest a new way to look at the task of image search with free-form text modifiers , where we draw inspiration from – and combine – the two fields of cross-modal and visual retrieval . Second , we propose a computationally efficient model based on two complementary modules and their respective text-guided light-weight attention layers , where each handles a modality of the query and both can be trained jointly . We experimentally validate ARTEMIS on several datasets and show that , despite its simplicity in terms of architecture and training strategy , it consistently outperforms the state of the art . 2 RELATED WORK . Image retrieval with purely visual queries has been extensively studied and is typically referred to as instance-level image retrieval ( Philbin et al. , 2007 ) . Most approaches either learn global image representations for efficient search ( Perronnin et al. , 2010 ; Radenović et al. , 2016 ; Gordo et al. , 2016 ) or extract local descriptors for a costly yet robust matching ( Arandjelović & Zisserman , 2012 ; Tolias et al. , 2016 ; Noh et al. , 2017 ) . Current state-of-the-art models use both global and local descriptors jointly and perform both strategies sequentially ( Cao et al. , 2020 ; Tolias et al. , 2020 ) . The most standard retrieval scenario involving text , cross-modal retrieval , uses a textual description of the image of interest as a query . A common approach is to learn a joint embedding space and modality-specific encoders producing global representations in that shared space . Then , the task boils down to computing distances between those representations ( Frome et al. , 2013 ; Wang et al. , 2016 ; Faghri et al. , 2018 ) . The most recent works focus on cross-attention between text segments and image region features ( Lee et al. , 2018 ; Li et al. , 2019 ; 2020 ) . However , these models do not scale , and they require to score each potential text-query target-image pair independently . Miech et al . ( 2021 ) address this issue by distilling a cross-attention architecture into a dual encoder one . Despite similarities between these two tasks and the one of image search with text modifiers , the first baselines for the latter initially adapted visual question answering ( VQA ) approaches ( Kim et al. , 2016 ) . To reason with features from different modalities , Santoro et al . ( 2017 ) use a sequence of MLPs , whereas FiLM ( Perez et al. , 2018 ) injects text features into the image encoder at multiple layers , altering its behavior through complex modifications . Current approaches address this task by composing the two query elements into a single joint representation that is then compared to any potential target image feature . As such , in TIRG ( Vo et al. , 2019 ) , the reference image and the “ relative captions ” ( or text modifiers ) are fused through a gatingresidual mechanism , and the text feature acts as a bridge between the two images in the visual representation space . Anwaar et al . ( 2021 ) use an autoencoder-based model to map the reference and the target images into the same complex space and learn the text modifier representation as a transformation in this space . Lee et al . ( 2021 ) and Chawla et al . ( 2021 ) both propose to disentangle the multi-modal information into content and style . Chen & Bazzani ( 2020 ) resort to image ’ s descriptive texts as side information to train a joint visual-semantic space , and then train a TIRG model on top . The alignment of visual and textual features for regularisation is reused in VAL ( Chen et al. , 2020 ) which also inserts a composite transformer at many levels of the visual encoder to preserve and transform the visual content depending on the text modifier ; the model is then optimized with a hierarchical matching objective . Hosseinzadeh & Wang ( 2020 ) also align image and text through a cross-modal module , but they use region proposals instead of CNN activations . Liu et al . ( 2021 ) propose a transformer-based model that leverages rich pre-trained vision-and-language knowledge for modifying the visual features of the query conditioned by the text . We note that these last methods are reminiscent of the heavy cross-attention models for cross-modal retrieval and share the same limitations with respect to scaling . In contrast to most methods described above , ARTEMIS does not compose modalities into a joint global feature for the query ( Vo et al. , 2019 ; Chen & Bazzani , 2020 ; Lee et al. , 2021 ) , it does not compute costly cross-attention involving the target image ( Hosseinzadeh & Wang , 2020 ; Chawla et al. , 2021 ) and does not extract multi-level visual representations ( Chen et al. , 2020 ) . Instead it leverages the textual modifier in simple attention mechanisms to weight the dimensions of the visual features , emphasizing the characteristics on which the matching should focus . This results in a model with a manageable amount of parameters to learn during training , efficient inference on the query side , and leading to state-of-the-art results . About attention . We note that the term attention has been heavily used in the past , referring to light-weighting mechanisms ( Xu et al. , 2015 ; Li et al. , 2017 ; Kang et al. , 2018 ; Wang et al. , 2019 ) similarly to us , or to more complex weighting mechanisms ( Lu et al. , 2016 ) . This differs from the more recent definition of attention introduced by Vaswani et al . ( 2017 ) , which became standard in many approaches tackling the cross-modal retrieval ( Lee et al. , 2018 ; Li et al. , 2019 ; 2020 ) and VQA ( Bai et al. , 2018 ) tasks . 3 PROPOSED METHOD . This section describes ARTEMIS , our proposed approach for the task of image search with freeform text modifiers . In this setting , queries are bimodal pairs , composed of a reference image Ir and a text modifier Tm . Such queries are used to retrieve any relevant image It from a gallery of images . Let φ ( . ) and θ ( . ) be the visual and textual encoders respectively . We denote the resulting L2normalized features of the reference image r , of the text modifier m , and of the target image t , i.e . r = φ ( Ir ) ∈ RHI , m = θ ( Tm ) ∈ RHT , and t = φ ( It ) ∈ RHI . Two complementary views of the task . Both the textual and the visual cues are important to find relevant target images . Consider for example the query in Figure 1 , where the dress ’ length , among other style components from the visual example , and the colour requested in the text modifier are combined to retrieve relevant results . The reference image provides strong visual context and displays some semantic details that should be shared with the target image , to the extent that the text does not specify their alteration . In other words , by the absence of an explicit modification request of some properties , the modifying text “ validates ” the associated visual cues from the reference image : those visual cues can be used as direct query for the target image . Hence , part of the task boils down to image-to-image retrieval ( visual search ) , implicitly conditioned on the text . On the other hand , the textual cue explicitly calls for modifications of the reference image . It was even observed that , in some cases , users tend to directly describe characteristics of the target im- age , without explicitly stating the discrepancy between the reference and the target image1 ( c.f . the analysis presented for FashionIQ in Table 2 of Wu et al . ( 2021 ) , for CIRR in Table 1 of Liu et al . ( 2021 ) ) . Therefore the text , which describes mandatory details for the target , can be directly used to query for the target image , as is common in text-to-image retrieval . Yet , due to the specificities of the task , we go beyond the usual text-to-image retrieval . Proposed approach . We propose to revisit text-to-image and image-to-image retrieval to tackle the task at stake , which is at the intersection of both . Standard strategies , for both , boil down to directly comparing the global features of the query ( image or text ) and of the potential targets , producing two independent , modality-specific , and not necessarily immediately compatible scoring strategies . In particular , directly comparing the representations of the reference and the target images is inaccurate as the two images should differ , based on the modifying text . Likewise , comparing directly the representations of the modifying text and the target image is undesired since part of the target image should stay similar to the reference image . Here , we reconcile the two tasks and enhance them by designing a model which is trained to match i ) the characteristics of the reference image with the ones of the target image and ii ) the requirements provided by the text with properties of the target image . Based on the intuition above , in both cases we use the text as an attention mechanism to select the visual cues which should be emphasized during matching . The first objective is carried out by the Implicit Similarity module ( Section 3.1 ) , which draws from visual search , and the second by the Explicit Matching module ( Section 3.2 ) , inherited from crossmodal retrieval . These two modules respectively output the IS and the EM scores , which are simply summed into one as a form of late fusion . The modules are jointly trained through this final score ( Section 3.3 ) . The full architecture of the model is illustrated in Figure 2 . | The paper presents a method for the task special kind of multi-modal retrieval: image search with free-form text modifiers, where image is used as a query and accompanied text specifies the differences with respect to the given query image which target image should satisfy. It is practically important problem for which several benchmark datasets exist. The paper proposes to use the representation of text modifier to attend (modulate) both to query and target image representations, and to use these modulated representations to obtain image and text matching scores, which are then averaged to obtain final score for each target image, as displayed in Figure 2. The proposed model architecture is conceptually simple and lightweight, allowing thus scalable retrieval system, while outperforming several recent baselines on three challenging benchmarks: Fashion IQ, Shoes and CIRR dataset. The paper also presents qualitative results of attention via Grad-CAM. | SP:6fa2e55d804aec84b5eb977ba9f4cf59b3b99eb4 |
ARTEMIS: Attention-based Retrieval with Text-Explicit Matching and Implicit Similarity | 1 INTRODUCTION . When using an image search engine , should the user provide a detailed textual description or a visual example ? These two image retrieval tasks , respectively studied as cross-modal search ( Wang et al. , 2016 ) and visual search ( Philbin et al. , 2007 ) in the computer vision community , have been the topic of extensive studies . However , limiting search queries to a single modality is restrictive . On the one hand , text proposes an accurate but only partial depiction of the desired result , as it is impossible to provide an exhaustive textual description . On the other hand , visual queries are richer but a lot more ambiguous : how should the system guess which characteristics the user wants to maintain for the target image ? The task of image search with free-form text modifiers reduces this ambiguity by allowing a dual query composed of an example image ( the reference image ) and a textual description ( the text modifier ) which explains how the reference image should be modified to obtain the desired result ( the target image ) . This task is illustrated in Figure 1 . From this formulation , a challenging research question arises ; How should the two facets of this dual query be leveraged and combined ? First methods to answer this question directly borrowed from the visual question answering literature ( Kim et al. , 2016 ; Santoro et al. , 2017 ) . Now , the standard approach for this task consists in fusing the features of the two components of the query into a single representation , so it can be compared to the representation of any potential target image ( Vo et al. , 2019 ; Chen & Bazzani , 2020 ) . Among the current strategies , some resort to rich external information ( Chen et al. , 2020 ; Liu et al. , 2021 ) while others rely on multi-level visual representations ( Chen et al. , 2020 ) or heavy cross-attention architectures ( Hosseinzadeh & Wang , 2020 ; Chawla et al. , 2021 ; Liu et al. , 2021 ) . Departing from these strategies , we draw inspiration from two fields related to the task , cross-modal and visual search , and we advocate for a combination of the two components of the query , in a way that also takes into account their specific relationship with the target image . To this end , we design two independent modules , one for each modality . Our Explicit matching ( EM ) module measures the compatibility of potential target images with the properties mentioned in the textual part of the query , as a form of cross-modal retrieval . Simultaneously , our Implicit similarity ( IS ) module considers the relevance of the target images with respect to the properties of the reference image implied by the textual modifier . Additionally , we note that the text modifier provides some insights about what should change ( as an explicit request from the user ) , but also about what should be preserved in the target image with respect to the reference image ( i.e . what is not mentioned in the text modifier ) . Consequently , each of our modules uses a light-weight attention mechanism , guided by the text modifier which helps selecting the characteristics of the target image to focus on for retrieval . This results in our proposed model , named Attention-based Retrieval with Text-Explicit Matching and Implicit Similarity ( ARTEMIS ) , which jointly learns these two modules , their respective attention mechanisms , and the way they should be combined , in a unified manner . In summary , our contribution is twofold . First , we suggest a new way to look at the task of image search with free-form text modifiers , where we draw inspiration from – and combine – the two fields of cross-modal and visual retrieval . Second , we propose a computationally efficient model based on two complementary modules and their respective text-guided light-weight attention layers , where each handles a modality of the query and both can be trained jointly . We experimentally validate ARTEMIS on several datasets and show that , despite its simplicity in terms of architecture and training strategy , it consistently outperforms the state of the art . 2 RELATED WORK . Image retrieval with purely visual queries has been extensively studied and is typically referred to as instance-level image retrieval ( Philbin et al. , 2007 ) . Most approaches either learn global image representations for efficient search ( Perronnin et al. , 2010 ; Radenović et al. , 2016 ; Gordo et al. , 2016 ) or extract local descriptors for a costly yet robust matching ( Arandjelović & Zisserman , 2012 ; Tolias et al. , 2016 ; Noh et al. , 2017 ) . Current state-of-the-art models use both global and local descriptors jointly and perform both strategies sequentially ( Cao et al. , 2020 ; Tolias et al. , 2020 ) . The most standard retrieval scenario involving text , cross-modal retrieval , uses a textual description of the image of interest as a query . A common approach is to learn a joint embedding space and modality-specific encoders producing global representations in that shared space . Then , the task boils down to computing distances between those representations ( Frome et al. , 2013 ; Wang et al. , 2016 ; Faghri et al. , 2018 ) . The most recent works focus on cross-attention between text segments and image region features ( Lee et al. , 2018 ; Li et al. , 2019 ; 2020 ) . However , these models do not scale , and they require to score each potential text-query target-image pair independently . Miech et al . ( 2021 ) address this issue by distilling a cross-attention architecture into a dual encoder one . Despite similarities between these two tasks and the one of image search with text modifiers , the first baselines for the latter initially adapted visual question answering ( VQA ) approaches ( Kim et al. , 2016 ) . To reason with features from different modalities , Santoro et al . ( 2017 ) use a sequence of MLPs , whereas FiLM ( Perez et al. , 2018 ) injects text features into the image encoder at multiple layers , altering its behavior through complex modifications . Current approaches address this task by composing the two query elements into a single joint representation that is then compared to any potential target image feature . As such , in TIRG ( Vo et al. , 2019 ) , the reference image and the “ relative captions ” ( or text modifiers ) are fused through a gatingresidual mechanism , and the text feature acts as a bridge between the two images in the visual representation space . Anwaar et al . ( 2021 ) use an autoencoder-based model to map the reference and the target images into the same complex space and learn the text modifier representation as a transformation in this space . Lee et al . ( 2021 ) and Chawla et al . ( 2021 ) both propose to disentangle the multi-modal information into content and style . Chen & Bazzani ( 2020 ) resort to image ’ s descriptive texts as side information to train a joint visual-semantic space , and then train a TIRG model on top . The alignment of visual and textual features for regularisation is reused in VAL ( Chen et al. , 2020 ) which also inserts a composite transformer at many levels of the visual encoder to preserve and transform the visual content depending on the text modifier ; the model is then optimized with a hierarchical matching objective . Hosseinzadeh & Wang ( 2020 ) also align image and text through a cross-modal module , but they use region proposals instead of CNN activations . Liu et al . ( 2021 ) propose a transformer-based model that leverages rich pre-trained vision-and-language knowledge for modifying the visual features of the query conditioned by the text . We note that these last methods are reminiscent of the heavy cross-attention models for cross-modal retrieval and share the same limitations with respect to scaling . In contrast to most methods described above , ARTEMIS does not compose modalities into a joint global feature for the query ( Vo et al. , 2019 ; Chen & Bazzani , 2020 ; Lee et al. , 2021 ) , it does not compute costly cross-attention involving the target image ( Hosseinzadeh & Wang , 2020 ; Chawla et al. , 2021 ) and does not extract multi-level visual representations ( Chen et al. , 2020 ) . Instead it leverages the textual modifier in simple attention mechanisms to weight the dimensions of the visual features , emphasizing the characteristics on which the matching should focus . This results in a model with a manageable amount of parameters to learn during training , efficient inference on the query side , and leading to state-of-the-art results . About attention . We note that the term attention has been heavily used in the past , referring to light-weighting mechanisms ( Xu et al. , 2015 ; Li et al. , 2017 ; Kang et al. , 2018 ; Wang et al. , 2019 ) similarly to us , or to more complex weighting mechanisms ( Lu et al. , 2016 ) . This differs from the more recent definition of attention introduced by Vaswani et al . ( 2017 ) , which became standard in many approaches tackling the cross-modal retrieval ( Lee et al. , 2018 ; Li et al. , 2019 ; 2020 ) and VQA ( Bai et al. , 2018 ) tasks . 3 PROPOSED METHOD . This section describes ARTEMIS , our proposed approach for the task of image search with freeform text modifiers . In this setting , queries are bimodal pairs , composed of a reference image Ir and a text modifier Tm . Such queries are used to retrieve any relevant image It from a gallery of images . Let φ ( . ) and θ ( . ) be the visual and textual encoders respectively . We denote the resulting L2normalized features of the reference image r , of the text modifier m , and of the target image t , i.e . r = φ ( Ir ) ∈ RHI , m = θ ( Tm ) ∈ RHT , and t = φ ( It ) ∈ RHI . Two complementary views of the task . Both the textual and the visual cues are important to find relevant target images . Consider for example the query in Figure 1 , where the dress ’ length , among other style components from the visual example , and the colour requested in the text modifier are combined to retrieve relevant results . The reference image provides strong visual context and displays some semantic details that should be shared with the target image , to the extent that the text does not specify their alteration . In other words , by the absence of an explicit modification request of some properties , the modifying text “ validates ” the associated visual cues from the reference image : those visual cues can be used as direct query for the target image . Hence , part of the task boils down to image-to-image retrieval ( visual search ) , implicitly conditioned on the text . On the other hand , the textual cue explicitly calls for modifications of the reference image . It was even observed that , in some cases , users tend to directly describe characteristics of the target im- age , without explicitly stating the discrepancy between the reference and the target image1 ( c.f . the analysis presented for FashionIQ in Table 2 of Wu et al . ( 2021 ) , for CIRR in Table 1 of Liu et al . ( 2021 ) ) . Therefore the text , which describes mandatory details for the target , can be directly used to query for the target image , as is common in text-to-image retrieval . Yet , due to the specificities of the task , we go beyond the usual text-to-image retrieval . Proposed approach . We propose to revisit text-to-image and image-to-image retrieval to tackle the task at stake , which is at the intersection of both . Standard strategies , for both , boil down to directly comparing the global features of the query ( image or text ) and of the potential targets , producing two independent , modality-specific , and not necessarily immediately compatible scoring strategies . In particular , directly comparing the representations of the reference and the target images is inaccurate as the two images should differ , based on the modifying text . Likewise , comparing directly the representations of the modifying text and the target image is undesired since part of the target image should stay similar to the reference image . Here , we reconcile the two tasks and enhance them by designing a model which is trained to match i ) the characteristics of the reference image with the ones of the target image and ii ) the requirements provided by the text with properties of the target image . Based on the intuition above , in both cases we use the text as an attention mechanism to select the visual cues which should be emphasized during matching . The first objective is carried out by the Implicit Similarity module ( Section 3.1 ) , which draws from visual search , and the second by the Explicit Matching module ( Section 3.2 ) , inherited from crossmodal retrieval . These two modules respectively output the IS and the EM scores , which are simply summed into one as a form of late fusion . The modules are jointly trained through this final score ( Section 3.3 ) . The full architecture of the model is illustrated in Figure 2 . | This paper focuses on the task of image retrieval using a sample image combined with text modifiers. It does this by the use of two modules that compute the implicit similarity (image-image similarity) and explicit matching (image-text similarity) scores. The modules computing both these scores use attention mechanisms so as to be conditioned on the text modifier. The scores are summed for the final retrieval. The efficiency of this architecture is shown quite clearly by comparing it with other state-of-the-art architectures on 3 different datasets. Ablations and qualitative analysis further highlights the utility of the architecture and its different components. | SP:6fa2e55d804aec84b5eb977ba9f4cf59b3b99eb4 |
SPARK: co-exploring model SPArsity and low-RanKness for compact neural networks | 1 INTRODUCTION . Deep neural network ( DNN ) has served as the backbone machine learning technique in many modern intelligent systems . To facilitate the low-cost deployment of DNN on the resource-constrained platforms , model compression , as a powerful strategy that can efficiently reduce DNN model size , has been extensively studied in recent years . To date , numerous compression approaches have been proposed to provide compact DNNs for many practical applications ( Han et al . ( 2015b ) ; Gong et al . ( 2019 ) ; Liao et al . ( 2021 ) ) . Among various types of model compression techniques , sparsification ( a.k.a. , pruning ) and lowrank decomposition are two representative and popular solutions ( Wang et al . ( 2021 ) ; Gao et al . ( 2021 ) ; Li et al . ( 2021a ) ; Xu et al . ( 2020 ) ) . As revealed by their names , the low-rank and sparse methods aim to explore and leverage the potential low-rankness and sparsity of the uncompressed DNNs , respectively . In practice , supported by the widely existed overparameterization phenomenon ( Denil et al . ( 2013 ) ; Han et al . ( 2015b ) ) , such hypothesized structure-level redundancy usually exists and thus it can be safely removed while still preserving high model performance . Co-exploring Low-rankness & Sparsity : Motivation . Considering the current prosperity of these two methods and their very distinct structural assumptions , an interesting and promising research topic is to explore the efficient integration of low-rank and sparse approaches towards a better model compression solution . As indicated and observed by Yu et al . ( 2017 ) , DNN models tend to exhibit both low-rankness and sparsity simultaneously . For instance , the smooth components in the weight filters can be represented in the low-rank space , and meanwhile some other important information is sparsely scattered . Evidently , fully leveraging such co-existence of these structure-level patterns , if being performed properly , can potentially bring a powerful compression solution with attractive performance . Existing Works . Unlike the current extensive research activities on individual low-rank and sparse methods , the investigations on integrating these two approaches , in an efficient and non-trivial way , are little explored . To date , only very few efforts study the joint exploration of low-rankness and sparsity for DNN model compression . As the pioneering work along this direction , Yu et al . ( 2017 ) develops a singular value decomposition ( SVD ) -free approach to closely approximate original DNN model via combining sparse representation and low-rank matrix factorization . Built on the interesting connection between filter decomposition and filter pruning , Li et al . ( 2020 ) interprets the decomposition and pruning of convolutional filter in a unified perspective . Most recently , Li et al . ( 2021b ) proposes a collaborative compression scheme to integrate SVD into model sparsification . By adopting a multi-step heuristic removal strategy , this post-training approach achieves promising task and compression performance . Unanswered Questions . Although these prior works have demonstrated the huge potentials and attractive benefits of jointly decomposing and pruning , the systematic investigation on their efficient integration is still missing . To be specific , several fundamental and critical questions , whose answers will directly impact the integration scheme and overall compression performance , have not been comprehensively explored yet . For instance , because pruning and decomposition can be jointly performed in several different ways , such as in parallel ( Yu et al . ( 2017 ) ) or in sequence ( Li et al . ( 2021b ) ) , which collaborative strategy is the best fit for the target DNN compression task ? Also , considering low-rankness can be exploited from different perspectives , which type of low-rank approach should be adopted ? The matrix factorization used in Li et al . ( 2020 ; 2021b ) ? Or even highorder tensor decomposition ? In addition , to achieve promising compression performance , what is the most suitable optimization objective that the integration scheme should aim ? The approximation error focused in Yu et al . ( 2017 ) ? The low-rankness/sparsity regularized loss in Yang et al . ( 2020 ) ? Or some other new alternatives ? Technical Preview and Contributions . To answer these questions and develop efficient integrated model compression solution , in this paper we perform systematic co-exploration on the model lowrankness and sparsity towards compact neural networks . To be specific , we first review and analyze several important design factors for the joint low-rank decomposition and pruning . Based on the observations and outcomes from our analysis , we then propose RASPA , a unified DNN compression framework that can simultaneously capture model low-RAnkness and SPArsity in an efficient way . Overall , the contributions of this paper are summarized as follows : • We systematically investigate and analyze the critical design knobs when co-exploring model low-rankness and sparsity , including operational sequence , low-rank format , and optimization objective . Based on our qualitative and quantitative analysis , we propose several recommended design options for efficient joint low-rank decomposition and pruning . • We develop a unified framework that formulates the integration of low-rank decomposition and pruning to an optimization problem with low-tensor-rank and sparse constraints . We then derive a training-aware approach to solve this challenging non-convex high-order tensor-format problem , and thereby leading to efficient exploration of rich low-rankness and sparsity in the model . • We empirically evaluate our proposed co-exploration solution for various DNN models on different datasets , and the experimental results demonstrate its very promising performance . Notably , on CIFAR-10 dataset , our solution can bring 1.25 % , 1.02 % and 0.16 % accuracy increase over the baseline ResNet-20 , ResNet-56 and DenseNet-40 models , respectively , and meanwhile the storage and computational costs are reduced by 70.4 % and 71.1 % ( for ResNet-20 ) , 37.5 % and 39.3 % ( for ResNet-56 ) and 52.4 % and 61.3 % ( for DenseNet40 ) , respectively . On ImageNet dataset , our approach can enable 0.52 % accuracy increase over baseline model with 48.7 % fewer parameters . 2 RELATED WORK . Sparsification . Sparsification , also known as pruning , has been extensively studied for model compression ( Han et al . ( 2015a ) ; Wen et al . ( 2016 ) ; Gao et al . ( 2019 ) ; Guo et al . ( 2016 ) ; Rao et al . ( 2021 ) ) . In general sparsifying a DNN can be realized via two ways . The first one is to use a certain criterion , e.g. , weight magnitude ( Han et al . ( 2015a ) ) , to directly remove some part of the model , and then perform fine-tuning to recover the accuracy . The second one is to add the sparsity-induced regularization during the training , such as ` 1 or group lasso term ( Wen et al . ( 2016 ) ) , to enforce the sparsity on the model . In addition , in order to achieve good balance between accuracy and complexity reduction , Gao et al . ( 2019 ) ; Guo et al . ( 2016 ) ; Rao et al . ( 2021 ) also proposes dynamic pruning . In such scenario , the DNN sparsification is essentially performed in an input-aware way – which part of model should be pruned is dynamically determined by each input data . Low-Rank Decomposition . Low-rank decomposition is another popular DNN compression approach . Based on different interpretation of the neural network models , the low-rank method can be categorized to matrix decomposition and tensor decomposition . Matrix decomposition views the 4-D weight tensor as the folded matrix , and hence it flattens the 4-D objective to 2-D format and decomposes the reshaped matrix to the product of two small matrices ( Tai et al . ( 2016 ) ; Li & Shi ( 2018 ) ; Xu et al . ( 2020 ) ) . On the other aspect , tensor decomposition directly factorizes the 4-D weight tensor to multiple small tensor cores without flattening operations . Such explicit high-order processing , by its nature , can better preserve the important spatial information and correlation existed in the weight tensors . To date several tensor decomposition techniques , such as tensor train , Tucker and tensor ring etc. , have been used for DNN model compression ( Kim et al . ( 2016 ) ; Novikov et al . ( 2015 ) ; Wang et al . ( 2018 ) ) . Joint Pruning and Decomposition . As observed by Yu et al . ( 2017 ) , a well-trained DNN tends to exhibit both sparsity and low-rankness simultaneously . Motivated by this observation , some prior efforts propose to co-explore these two complementary properties for model compression . As the pioneering work , Yu et al . ( 2017 ) decomposes the weight tensors of a pre-trained DNN model into independent low-rank and sparse parts and minimizes the reconstruction error . Different from this parallel scheme , Dubey et al . ( 2018 ) ; Li et al . ( 2021b ) adopt a sequential compression strategy via performing matrix factorization on a pruned model . In addition , Li et al . ( 2020 ) proposes to use the sparse/low-rank regularization term , instead of reconstruction error , to enforce the desired structural patterns . Also , notice that all of the existing works focus on using either SVD-based or SVD-free matrix decomposition to exploit the low-rankness of DNN model . 3 CO-EXPLORING LOW-RANKNESS AND SPARSITY : ANALYSIS . As outlined in Section 2 , the integration of low-rank decomposition and pruning can be specified by several important factors , including operational sequence , low-rankness format and the overall optimization objective . The existence of such large variety of different factors and their combinations , by its nature , calls for the systematic investigation on the best-suited co-exploration scheme for DNN compression . Such analysis framework , if being properly developed , can facilitate the optimal selection of various design factors already proposed in the existing literatures . More importantly , the outcome from this systematic study will further guide and provide the better integration choices that have not been discovered before . Questions to be Answered . Next we analyze the critical design knobs and factors for efficient coexploration on model low-rankness and sparsity . To that end , three important questions need to be answered . Question # 1 : What is the more suitable operational sequence when jointly low-rank decomposing and pruning DNN models ? Analysis . In general , the co-existence of model low-rankness and sparsity can be explored in different ways ( see Figure 1 ) . For instance , as adopted in Yu et al . ( 2017 ) , a well-trained DNN can be closely approximated as the combination of a low-rank component and a sparse component . In other words , the two types of structure-level properties are imposed and leveraged in a spatially parallel way , and we denote this strategy as L+S , where L and S represent low-rank decomposition and sparsification , respectively . On the other hand , the joint use of factorization and pruning can also be performed in a temporally sequential way . As illustrated in Figure 1 , the original model can be first imposed with low-rankness ( or sparsity ) , and the size of the resulting partially compressed model can be further reduced by the second-stage pruning ( or low-rank decomposition ) . Following the similar notation , such sequential operation can be denoted as S ( L ) and L ( S ) . In practice L ( S ) is a preferable choice that has been adopted in the prior works ( Dubey et al . ( 2018 ) ; Li et al . ( 2021b ) ) . Our Proposal . Among the above described three general operational schemes , we believe L+S is the more suitable choice when considering to integrate pruning and decomposition together for model compression . This is because unlike S ( L ) and L ( S ) , which ultimately still produce the compressed model in a single representation ( sparse or low-rank ) space , L+S enables the simultaneous representation of rich information of DNN models across different subspace , and thereby better preserving the structural characteristics and reducing the potential information loss . To verify our hypothesis , we examine the approximation error incurred by three integration schemes . As shown in Figure 2 , with the same compression ratio for the weight tensor of one layer of a pre-trained ResNet-20 on CIFAR-10 dataset , L+S shows much lower approximation error than its counterparts , especially in high compression ratio region . This experimental phenomenon demonstrates that L+S scheme indeed can capture both the low-rank and sparse characteristics of DNN model in an efficient way . Question # 2 : What is the best suitable lowrank decomposition approach used when coexploring low-rankness and sparsity ? Analysis . From the perspective of linear algebra , the low-rankness of a DNN model can be exploited using different ways . As illustrated in Figure 3 , for an example convolutional layer , imposing the low-rank structure can be realized by performing simple matrix factorization or high-order tensor decomposition . Specifically , Yu et al . ( 2017 ) chooses SVD-free method to factorize DNN model and obtain the low-rank component , and Li et al . ( 2021b ) proposes to use SVD-based decomposition to serve as the second-stage compression approach in its adopted L ( S ) scheme . Notice that though the weights of convolutional layer essentially form a 4-D tensor format , the existing works exploit the low-rankness via using matrix decomposition – the 4-D tensor needs to be first flatten to a 2-D matrix and it is then factorized to two small matrix components . Our Proposal . We argue that the high-order tensor decomposition , the option that has not been explored in the integration scheme before , is the better choice than the low-order matrix decomposition adopted in the existing works . This is because as a reshaping-free technique that can directly factorize the tensor-format data to multiple tensor cores , tensor decomposition , such as Tensor Train ( TT ) and Tucker , can naturally capture and preserve the important spatial information and correlation of the original weight tensors in a more efficient way . Therefore , less information loss is expected after performing low-rank tensor-based DNN compression . To verify our hypothesis , we compare the feature maps of the compressed convolutional layer of ResNet-20 on CIFAR-10 dataset using dif- ferent low-rank methods . As visualized in Figure 4 , compared with the matrix decomposition-based approach with the same compression ratio , tensor decomposition can make the output feature map of the compressed layer much more similar to the feature map of the original uncompressed layer . In other words , low-rank tensor method can provide better preservation of the important feature information and thus it can bring potential higher model compression performance . Question # 3 : What is the best suitable optimization objective that the integrated compression scheme should aim ? Analysis . To efficiently realize the joint exploration of model low-rankness and sparsity with promising compression performance , different optimization strategies have been proposed in the existing works . For instance , Yu et al . ( 2017 ) ; Ma et al . ( 2019 ) aim to minimize the difference between the original weight matrix/tensor and the approximated reconstruction . In addition , Ma et al . ( 2019 ) proposes to explicitly add the low-rank and sparse regularization terms to the overall objective function , which can guide the training-aware procedure to enforce the desired structural patterns . Our Proposal . Different from the existing approximation error-centered or regularized loss-based solutions , we propose that the efficient co-exploration scheme should be interpreted as the optimization procedure with the low-rank and sparse constraints . Our rationale lies on two important observations of the inherent drawbacks of the prior efforts . First , the approximation strategy adopted in Yu et al . ( 2017 ) ; Ma et al . ( 2019 ) focuses on making the reconstructed model approach the original model as close as possible . However , since 1 ) the approximation error always exists ; and 2 ) the original model is not the only choice to achieve the desired accuracy , such strategy inherently can only search the low-rank and sparse components in a limited exploration space , thereby affecting the overall compression performance . Second , though adding the regularization terms into loss function indeed facilitates the extraction of low-rank and sparse patterns , the effect of such simple regularizing method is still limited , especially considering the efforts of pushing for sparsity and for low-rankness may interfere with each other , thereby potentially causing unexpected conflicts . Instead , by explicitly imposing the low-rank and sparse constraints on the overall optimization problem , these two structural requirement can be simultaneously satisfied with the proper use of optimization technique ( to be discussed in Section 4 ) . As reported in Appendix A , our proposed constrained optimization strategy can successfully impose the desired low-rankness and sparsity onto the DNN models efficiently . Summary of Our Analysis . ¶ Performing joint low-rank decomposition and pruning in a spatially parallel way ( L+S ) is the preferable operational sequence . · High-order tensor decomposition is the most suitable choice for the low-rank approach used in the integrated compression scheme . ¸ Imposing low-rankness and sparsity as the direct hard constraints on the loss optimization should be adopted to better satisfy the desired structural requirement . | The authors argue and propose to compress the neural networks using an additive combination of TT decomposed and sparse tensors/matrices. To make this happen, authors formulate an optimizaiton problem and solve it using the ADMM framework. Authors provide compression results that are interesting (improved accuracy for a given compression rate), however, the method has an important shortcoming that requires setting the compression parameters by hand for each layer (ranks, sparsities) that limits its practical applicability. Additionally, authors miss a large body of related work on: a) additive combinations of compressions b) low-rank and tensor decomposition methods. | SP:af7cd0fe5458012213642454b01356aeae0df86d |
SPARK: co-exploring model SPArsity and low-RanKness for compact neural networks | 1 INTRODUCTION . Deep neural network ( DNN ) has served as the backbone machine learning technique in many modern intelligent systems . To facilitate the low-cost deployment of DNN on the resource-constrained platforms , model compression , as a powerful strategy that can efficiently reduce DNN model size , has been extensively studied in recent years . To date , numerous compression approaches have been proposed to provide compact DNNs for many practical applications ( Han et al . ( 2015b ) ; Gong et al . ( 2019 ) ; Liao et al . ( 2021 ) ) . Among various types of model compression techniques , sparsification ( a.k.a. , pruning ) and lowrank decomposition are two representative and popular solutions ( Wang et al . ( 2021 ) ; Gao et al . ( 2021 ) ; Li et al . ( 2021a ) ; Xu et al . ( 2020 ) ) . As revealed by their names , the low-rank and sparse methods aim to explore and leverage the potential low-rankness and sparsity of the uncompressed DNNs , respectively . In practice , supported by the widely existed overparameterization phenomenon ( Denil et al . ( 2013 ) ; Han et al . ( 2015b ) ) , such hypothesized structure-level redundancy usually exists and thus it can be safely removed while still preserving high model performance . Co-exploring Low-rankness & Sparsity : Motivation . Considering the current prosperity of these two methods and their very distinct structural assumptions , an interesting and promising research topic is to explore the efficient integration of low-rank and sparse approaches towards a better model compression solution . As indicated and observed by Yu et al . ( 2017 ) , DNN models tend to exhibit both low-rankness and sparsity simultaneously . For instance , the smooth components in the weight filters can be represented in the low-rank space , and meanwhile some other important information is sparsely scattered . Evidently , fully leveraging such co-existence of these structure-level patterns , if being performed properly , can potentially bring a powerful compression solution with attractive performance . Existing Works . Unlike the current extensive research activities on individual low-rank and sparse methods , the investigations on integrating these two approaches , in an efficient and non-trivial way , are little explored . To date , only very few efforts study the joint exploration of low-rankness and sparsity for DNN model compression . As the pioneering work along this direction , Yu et al . ( 2017 ) develops a singular value decomposition ( SVD ) -free approach to closely approximate original DNN model via combining sparse representation and low-rank matrix factorization . Built on the interesting connection between filter decomposition and filter pruning , Li et al . ( 2020 ) interprets the decomposition and pruning of convolutional filter in a unified perspective . Most recently , Li et al . ( 2021b ) proposes a collaborative compression scheme to integrate SVD into model sparsification . By adopting a multi-step heuristic removal strategy , this post-training approach achieves promising task and compression performance . Unanswered Questions . Although these prior works have demonstrated the huge potentials and attractive benefits of jointly decomposing and pruning , the systematic investigation on their efficient integration is still missing . To be specific , several fundamental and critical questions , whose answers will directly impact the integration scheme and overall compression performance , have not been comprehensively explored yet . For instance , because pruning and decomposition can be jointly performed in several different ways , such as in parallel ( Yu et al . ( 2017 ) ) or in sequence ( Li et al . ( 2021b ) ) , which collaborative strategy is the best fit for the target DNN compression task ? Also , considering low-rankness can be exploited from different perspectives , which type of low-rank approach should be adopted ? The matrix factorization used in Li et al . ( 2020 ; 2021b ) ? Or even highorder tensor decomposition ? In addition , to achieve promising compression performance , what is the most suitable optimization objective that the integration scheme should aim ? The approximation error focused in Yu et al . ( 2017 ) ? The low-rankness/sparsity regularized loss in Yang et al . ( 2020 ) ? Or some other new alternatives ? Technical Preview and Contributions . To answer these questions and develop efficient integrated model compression solution , in this paper we perform systematic co-exploration on the model lowrankness and sparsity towards compact neural networks . To be specific , we first review and analyze several important design factors for the joint low-rank decomposition and pruning . Based on the observations and outcomes from our analysis , we then propose RASPA , a unified DNN compression framework that can simultaneously capture model low-RAnkness and SPArsity in an efficient way . Overall , the contributions of this paper are summarized as follows : • We systematically investigate and analyze the critical design knobs when co-exploring model low-rankness and sparsity , including operational sequence , low-rank format , and optimization objective . Based on our qualitative and quantitative analysis , we propose several recommended design options for efficient joint low-rank decomposition and pruning . • We develop a unified framework that formulates the integration of low-rank decomposition and pruning to an optimization problem with low-tensor-rank and sparse constraints . We then derive a training-aware approach to solve this challenging non-convex high-order tensor-format problem , and thereby leading to efficient exploration of rich low-rankness and sparsity in the model . • We empirically evaluate our proposed co-exploration solution for various DNN models on different datasets , and the experimental results demonstrate its very promising performance . Notably , on CIFAR-10 dataset , our solution can bring 1.25 % , 1.02 % and 0.16 % accuracy increase over the baseline ResNet-20 , ResNet-56 and DenseNet-40 models , respectively , and meanwhile the storage and computational costs are reduced by 70.4 % and 71.1 % ( for ResNet-20 ) , 37.5 % and 39.3 % ( for ResNet-56 ) and 52.4 % and 61.3 % ( for DenseNet40 ) , respectively . On ImageNet dataset , our approach can enable 0.52 % accuracy increase over baseline model with 48.7 % fewer parameters . 2 RELATED WORK . Sparsification . Sparsification , also known as pruning , has been extensively studied for model compression ( Han et al . ( 2015a ) ; Wen et al . ( 2016 ) ; Gao et al . ( 2019 ) ; Guo et al . ( 2016 ) ; Rao et al . ( 2021 ) ) . In general sparsifying a DNN can be realized via two ways . The first one is to use a certain criterion , e.g. , weight magnitude ( Han et al . ( 2015a ) ) , to directly remove some part of the model , and then perform fine-tuning to recover the accuracy . The second one is to add the sparsity-induced regularization during the training , such as ` 1 or group lasso term ( Wen et al . ( 2016 ) ) , to enforce the sparsity on the model . In addition , in order to achieve good balance between accuracy and complexity reduction , Gao et al . ( 2019 ) ; Guo et al . ( 2016 ) ; Rao et al . ( 2021 ) also proposes dynamic pruning . In such scenario , the DNN sparsification is essentially performed in an input-aware way – which part of model should be pruned is dynamically determined by each input data . Low-Rank Decomposition . Low-rank decomposition is another popular DNN compression approach . Based on different interpretation of the neural network models , the low-rank method can be categorized to matrix decomposition and tensor decomposition . Matrix decomposition views the 4-D weight tensor as the folded matrix , and hence it flattens the 4-D objective to 2-D format and decomposes the reshaped matrix to the product of two small matrices ( Tai et al . ( 2016 ) ; Li & Shi ( 2018 ) ; Xu et al . ( 2020 ) ) . On the other aspect , tensor decomposition directly factorizes the 4-D weight tensor to multiple small tensor cores without flattening operations . Such explicit high-order processing , by its nature , can better preserve the important spatial information and correlation existed in the weight tensors . To date several tensor decomposition techniques , such as tensor train , Tucker and tensor ring etc. , have been used for DNN model compression ( Kim et al . ( 2016 ) ; Novikov et al . ( 2015 ) ; Wang et al . ( 2018 ) ) . Joint Pruning and Decomposition . As observed by Yu et al . ( 2017 ) , a well-trained DNN tends to exhibit both sparsity and low-rankness simultaneously . Motivated by this observation , some prior efforts propose to co-explore these two complementary properties for model compression . As the pioneering work , Yu et al . ( 2017 ) decomposes the weight tensors of a pre-trained DNN model into independent low-rank and sparse parts and minimizes the reconstruction error . Different from this parallel scheme , Dubey et al . ( 2018 ) ; Li et al . ( 2021b ) adopt a sequential compression strategy via performing matrix factorization on a pruned model . In addition , Li et al . ( 2020 ) proposes to use the sparse/low-rank regularization term , instead of reconstruction error , to enforce the desired structural patterns . Also , notice that all of the existing works focus on using either SVD-based or SVD-free matrix decomposition to exploit the low-rankness of DNN model . 3 CO-EXPLORING LOW-RANKNESS AND SPARSITY : ANALYSIS . As outlined in Section 2 , the integration of low-rank decomposition and pruning can be specified by several important factors , including operational sequence , low-rankness format and the overall optimization objective . The existence of such large variety of different factors and their combinations , by its nature , calls for the systematic investigation on the best-suited co-exploration scheme for DNN compression . Such analysis framework , if being properly developed , can facilitate the optimal selection of various design factors already proposed in the existing literatures . More importantly , the outcome from this systematic study will further guide and provide the better integration choices that have not been discovered before . Questions to be Answered . Next we analyze the critical design knobs and factors for efficient coexploration on model low-rankness and sparsity . To that end , three important questions need to be answered . Question # 1 : What is the more suitable operational sequence when jointly low-rank decomposing and pruning DNN models ? Analysis . In general , the co-existence of model low-rankness and sparsity can be explored in different ways ( see Figure 1 ) . For instance , as adopted in Yu et al . ( 2017 ) , a well-trained DNN can be closely approximated as the combination of a low-rank component and a sparse component . In other words , the two types of structure-level properties are imposed and leveraged in a spatially parallel way , and we denote this strategy as L+S , where L and S represent low-rank decomposition and sparsification , respectively . On the other hand , the joint use of factorization and pruning can also be performed in a temporally sequential way . As illustrated in Figure 1 , the original model can be first imposed with low-rankness ( or sparsity ) , and the size of the resulting partially compressed model can be further reduced by the second-stage pruning ( or low-rank decomposition ) . Following the similar notation , such sequential operation can be denoted as S ( L ) and L ( S ) . In practice L ( S ) is a preferable choice that has been adopted in the prior works ( Dubey et al . ( 2018 ) ; Li et al . ( 2021b ) ) . Our Proposal . Among the above described three general operational schemes , we believe L+S is the more suitable choice when considering to integrate pruning and decomposition together for model compression . This is because unlike S ( L ) and L ( S ) , which ultimately still produce the compressed model in a single representation ( sparse or low-rank ) space , L+S enables the simultaneous representation of rich information of DNN models across different subspace , and thereby better preserving the structural characteristics and reducing the potential information loss . To verify our hypothesis , we examine the approximation error incurred by three integration schemes . As shown in Figure 2 , with the same compression ratio for the weight tensor of one layer of a pre-trained ResNet-20 on CIFAR-10 dataset , L+S shows much lower approximation error than its counterparts , especially in high compression ratio region . This experimental phenomenon demonstrates that L+S scheme indeed can capture both the low-rank and sparse characteristics of DNN model in an efficient way . Question # 2 : What is the best suitable lowrank decomposition approach used when coexploring low-rankness and sparsity ? Analysis . From the perspective of linear algebra , the low-rankness of a DNN model can be exploited using different ways . As illustrated in Figure 3 , for an example convolutional layer , imposing the low-rank structure can be realized by performing simple matrix factorization or high-order tensor decomposition . Specifically , Yu et al . ( 2017 ) chooses SVD-free method to factorize DNN model and obtain the low-rank component , and Li et al . ( 2021b ) proposes to use SVD-based decomposition to serve as the second-stage compression approach in its adopted L ( S ) scheme . Notice that though the weights of convolutional layer essentially form a 4-D tensor format , the existing works exploit the low-rankness via using matrix decomposition – the 4-D tensor needs to be first flatten to a 2-D matrix and it is then factorized to two small matrix components . Our Proposal . We argue that the high-order tensor decomposition , the option that has not been explored in the integration scheme before , is the better choice than the low-order matrix decomposition adopted in the existing works . This is because as a reshaping-free technique that can directly factorize the tensor-format data to multiple tensor cores , tensor decomposition , such as Tensor Train ( TT ) and Tucker , can naturally capture and preserve the important spatial information and correlation of the original weight tensors in a more efficient way . Therefore , less information loss is expected after performing low-rank tensor-based DNN compression . To verify our hypothesis , we compare the feature maps of the compressed convolutional layer of ResNet-20 on CIFAR-10 dataset using dif- ferent low-rank methods . As visualized in Figure 4 , compared with the matrix decomposition-based approach with the same compression ratio , tensor decomposition can make the output feature map of the compressed layer much more similar to the feature map of the original uncompressed layer . In other words , low-rank tensor method can provide better preservation of the important feature information and thus it can bring potential higher model compression performance . Question # 3 : What is the best suitable optimization objective that the integrated compression scheme should aim ? Analysis . To efficiently realize the joint exploration of model low-rankness and sparsity with promising compression performance , different optimization strategies have been proposed in the existing works . For instance , Yu et al . ( 2017 ) ; Ma et al . ( 2019 ) aim to minimize the difference between the original weight matrix/tensor and the approximated reconstruction . In addition , Ma et al . ( 2019 ) proposes to explicitly add the low-rank and sparse regularization terms to the overall objective function , which can guide the training-aware procedure to enforce the desired structural patterns . Our Proposal . Different from the existing approximation error-centered or regularized loss-based solutions , we propose that the efficient co-exploration scheme should be interpreted as the optimization procedure with the low-rank and sparse constraints . Our rationale lies on two important observations of the inherent drawbacks of the prior efforts . First , the approximation strategy adopted in Yu et al . ( 2017 ) ; Ma et al . ( 2019 ) focuses on making the reconstructed model approach the original model as close as possible . However , since 1 ) the approximation error always exists ; and 2 ) the original model is not the only choice to achieve the desired accuracy , such strategy inherently can only search the low-rank and sparse components in a limited exploration space , thereby affecting the overall compression performance . Second , though adding the regularization terms into loss function indeed facilitates the extraction of low-rank and sparse patterns , the effect of such simple regularizing method is still limited , especially considering the efforts of pushing for sparsity and for low-rankness may interfere with each other , thereby potentially causing unexpected conflicts . Instead , by explicitly imposing the low-rank and sparse constraints on the overall optimization problem , these two structural requirement can be simultaneously satisfied with the proper use of optimization technique ( to be discussed in Section 4 ) . As reported in Appendix A , our proposed constrained optimization strategy can successfully impose the desired low-rankness and sparsity onto the DNN models efficiently . Summary of Our Analysis . ¶ Performing joint low-rank decomposition and pruning in a spatially parallel way ( L+S ) is the preferable operational sequence . · High-order tensor decomposition is the most suitable choice for the low-rank approach used in the integrated compression scheme . ¸ Imposing low-rankness and sparsity as the direct hard constraints on the loss optimization should be adopted to better satisfy the desired structural requirement . | The paper proposes a novel approach for 'model compression': reducing the size and computational cost of a neural network model by converting weight matrices to (a) be sparse and (b) low-rank. While prior works have considered both sparsity (i.e., pruning) and low-rank-ness before, the proposed method utilizes both simultaneously: approximating the weight matrix as a sum of two matrices, one that is low-rank and one that is sparse. This leads to an improved performance-compression trade-off: indeed, in some cases, this approach seems to have a regularizing effect and actually improves the accuracy of the model. | SP:af7cd0fe5458012213642454b01356aeae0df86d |
SPARK: co-exploring model SPArsity and low-RanKness for compact neural networks | 1 INTRODUCTION . Deep neural network ( DNN ) has served as the backbone machine learning technique in many modern intelligent systems . To facilitate the low-cost deployment of DNN on the resource-constrained platforms , model compression , as a powerful strategy that can efficiently reduce DNN model size , has been extensively studied in recent years . To date , numerous compression approaches have been proposed to provide compact DNNs for many practical applications ( Han et al . ( 2015b ) ; Gong et al . ( 2019 ) ; Liao et al . ( 2021 ) ) . Among various types of model compression techniques , sparsification ( a.k.a. , pruning ) and lowrank decomposition are two representative and popular solutions ( Wang et al . ( 2021 ) ; Gao et al . ( 2021 ) ; Li et al . ( 2021a ) ; Xu et al . ( 2020 ) ) . As revealed by their names , the low-rank and sparse methods aim to explore and leverage the potential low-rankness and sparsity of the uncompressed DNNs , respectively . In practice , supported by the widely existed overparameterization phenomenon ( Denil et al . ( 2013 ) ; Han et al . ( 2015b ) ) , such hypothesized structure-level redundancy usually exists and thus it can be safely removed while still preserving high model performance . Co-exploring Low-rankness & Sparsity : Motivation . Considering the current prosperity of these two methods and their very distinct structural assumptions , an interesting and promising research topic is to explore the efficient integration of low-rank and sparse approaches towards a better model compression solution . As indicated and observed by Yu et al . ( 2017 ) , DNN models tend to exhibit both low-rankness and sparsity simultaneously . For instance , the smooth components in the weight filters can be represented in the low-rank space , and meanwhile some other important information is sparsely scattered . Evidently , fully leveraging such co-existence of these structure-level patterns , if being performed properly , can potentially bring a powerful compression solution with attractive performance . Existing Works . Unlike the current extensive research activities on individual low-rank and sparse methods , the investigations on integrating these two approaches , in an efficient and non-trivial way , are little explored . To date , only very few efforts study the joint exploration of low-rankness and sparsity for DNN model compression . As the pioneering work along this direction , Yu et al . ( 2017 ) develops a singular value decomposition ( SVD ) -free approach to closely approximate original DNN model via combining sparse representation and low-rank matrix factorization . Built on the interesting connection between filter decomposition and filter pruning , Li et al . ( 2020 ) interprets the decomposition and pruning of convolutional filter in a unified perspective . Most recently , Li et al . ( 2021b ) proposes a collaborative compression scheme to integrate SVD into model sparsification . By adopting a multi-step heuristic removal strategy , this post-training approach achieves promising task and compression performance . Unanswered Questions . Although these prior works have demonstrated the huge potentials and attractive benefits of jointly decomposing and pruning , the systematic investigation on their efficient integration is still missing . To be specific , several fundamental and critical questions , whose answers will directly impact the integration scheme and overall compression performance , have not been comprehensively explored yet . For instance , because pruning and decomposition can be jointly performed in several different ways , such as in parallel ( Yu et al . ( 2017 ) ) or in sequence ( Li et al . ( 2021b ) ) , which collaborative strategy is the best fit for the target DNN compression task ? Also , considering low-rankness can be exploited from different perspectives , which type of low-rank approach should be adopted ? The matrix factorization used in Li et al . ( 2020 ; 2021b ) ? Or even highorder tensor decomposition ? In addition , to achieve promising compression performance , what is the most suitable optimization objective that the integration scheme should aim ? The approximation error focused in Yu et al . ( 2017 ) ? The low-rankness/sparsity regularized loss in Yang et al . ( 2020 ) ? Or some other new alternatives ? Technical Preview and Contributions . To answer these questions and develop efficient integrated model compression solution , in this paper we perform systematic co-exploration on the model lowrankness and sparsity towards compact neural networks . To be specific , we first review and analyze several important design factors for the joint low-rank decomposition and pruning . Based on the observations and outcomes from our analysis , we then propose RASPA , a unified DNN compression framework that can simultaneously capture model low-RAnkness and SPArsity in an efficient way . Overall , the contributions of this paper are summarized as follows : • We systematically investigate and analyze the critical design knobs when co-exploring model low-rankness and sparsity , including operational sequence , low-rank format , and optimization objective . Based on our qualitative and quantitative analysis , we propose several recommended design options for efficient joint low-rank decomposition and pruning . • We develop a unified framework that formulates the integration of low-rank decomposition and pruning to an optimization problem with low-tensor-rank and sparse constraints . We then derive a training-aware approach to solve this challenging non-convex high-order tensor-format problem , and thereby leading to efficient exploration of rich low-rankness and sparsity in the model . • We empirically evaluate our proposed co-exploration solution for various DNN models on different datasets , and the experimental results demonstrate its very promising performance . Notably , on CIFAR-10 dataset , our solution can bring 1.25 % , 1.02 % and 0.16 % accuracy increase over the baseline ResNet-20 , ResNet-56 and DenseNet-40 models , respectively , and meanwhile the storage and computational costs are reduced by 70.4 % and 71.1 % ( for ResNet-20 ) , 37.5 % and 39.3 % ( for ResNet-56 ) and 52.4 % and 61.3 % ( for DenseNet40 ) , respectively . On ImageNet dataset , our approach can enable 0.52 % accuracy increase over baseline model with 48.7 % fewer parameters . 2 RELATED WORK . Sparsification . Sparsification , also known as pruning , has been extensively studied for model compression ( Han et al . ( 2015a ) ; Wen et al . ( 2016 ) ; Gao et al . ( 2019 ) ; Guo et al . ( 2016 ) ; Rao et al . ( 2021 ) ) . In general sparsifying a DNN can be realized via two ways . The first one is to use a certain criterion , e.g. , weight magnitude ( Han et al . ( 2015a ) ) , to directly remove some part of the model , and then perform fine-tuning to recover the accuracy . The second one is to add the sparsity-induced regularization during the training , such as ` 1 or group lasso term ( Wen et al . ( 2016 ) ) , to enforce the sparsity on the model . In addition , in order to achieve good balance between accuracy and complexity reduction , Gao et al . ( 2019 ) ; Guo et al . ( 2016 ) ; Rao et al . ( 2021 ) also proposes dynamic pruning . In such scenario , the DNN sparsification is essentially performed in an input-aware way – which part of model should be pruned is dynamically determined by each input data . Low-Rank Decomposition . Low-rank decomposition is another popular DNN compression approach . Based on different interpretation of the neural network models , the low-rank method can be categorized to matrix decomposition and tensor decomposition . Matrix decomposition views the 4-D weight tensor as the folded matrix , and hence it flattens the 4-D objective to 2-D format and decomposes the reshaped matrix to the product of two small matrices ( Tai et al . ( 2016 ) ; Li & Shi ( 2018 ) ; Xu et al . ( 2020 ) ) . On the other aspect , tensor decomposition directly factorizes the 4-D weight tensor to multiple small tensor cores without flattening operations . Such explicit high-order processing , by its nature , can better preserve the important spatial information and correlation existed in the weight tensors . To date several tensor decomposition techniques , such as tensor train , Tucker and tensor ring etc. , have been used for DNN model compression ( Kim et al . ( 2016 ) ; Novikov et al . ( 2015 ) ; Wang et al . ( 2018 ) ) . Joint Pruning and Decomposition . As observed by Yu et al . ( 2017 ) , a well-trained DNN tends to exhibit both sparsity and low-rankness simultaneously . Motivated by this observation , some prior efforts propose to co-explore these two complementary properties for model compression . As the pioneering work , Yu et al . ( 2017 ) decomposes the weight tensors of a pre-trained DNN model into independent low-rank and sparse parts and minimizes the reconstruction error . Different from this parallel scheme , Dubey et al . ( 2018 ) ; Li et al . ( 2021b ) adopt a sequential compression strategy via performing matrix factorization on a pruned model . In addition , Li et al . ( 2020 ) proposes to use the sparse/low-rank regularization term , instead of reconstruction error , to enforce the desired structural patterns . Also , notice that all of the existing works focus on using either SVD-based or SVD-free matrix decomposition to exploit the low-rankness of DNN model . 3 CO-EXPLORING LOW-RANKNESS AND SPARSITY : ANALYSIS . As outlined in Section 2 , the integration of low-rank decomposition and pruning can be specified by several important factors , including operational sequence , low-rankness format and the overall optimization objective . The existence of such large variety of different factors and their combinations , by its nature , calls for the systematic investigation on the best-suited co-exploration scheme for DNN compression . Such analysis framework , if being properly developed , can facilitate the optimal selection of various design factors already proposed in the existing literatures . More importantly , the outcome from this systematic study will further guide and provide the better integration choices that have not been discovered before . Questions to be Answered . Next we analyze the critical design knobs and factors for efficient coexploration on model low-rankness and sparsity . To that end , three important questions need to be answered . Question # 1 : What is the more suitable operational sequence when jointly low-rank decomposing and pruning DNN models ? Analysis . In general , the co-existence of model low-rankness and sparsity can be explored in different ways ( see Figure 1 ) . For instance , as adopted in Yu et al . ( 2017 ) , a well-trained DNN can be closely approximated as the combination of a low-rank component and a sparse component . In other words , the two types of structure-level properties are imposed and leveraged in a spatially parallel way , and we denote this strategy as L+S , where L and S represent low-rank decomposition and sparsification , respectively . On the other hand , the joint use of factorization and pruning can also be performed in a temporally sequential way . As illustrated in Figure 1 , the original model can be first imposed with low-rankness ( or sparsity ) , and the size of the resulting partially compressed model can be further reduced by the second-stage pruning ( or low-rank decomposition ) . Following the similar notation , such sequential operation can be denoted as S ( L ) and L ( S ) . In practice L ( S ) is a preferable choice that has been adopted in the prior works ( Dubey et al . ( 2018 ) ; Li et al . ( 2021b ) ) . Our Proposal . Among the above described three general operational schemes , we believe L+S is the more suitable choice when considering to integrate pruning and decomposition together for model compression . This is because unlike S ( L ) and L ( S ) , which ultimately still produce the compressed model in a single representation ( sparse or low-rank ) space , L+S enables the simultaneous representation of rich information of DNN models across different subspace , and thereby better preserving the structural characteristics and reducing the potential information loss . To verify our hypothesis , we examine the approximation error incurred by three integration schemes . As shown in Figure 2 , with the same compression ratio for the weight tensor of one layer of a pre-trained ResNet-20 on CIFAR-10 dataset , L+S shows much lower approximation error than its counterparts , especially in high compression ratio region . This experimental phenomenon demonstrates that L+S scheme indeed can capture both the low-rank and sparse characteristics of DNN model in an efficient way . Question # 2 : What is the best suitable lowrank decomposition approach used when coexploring low-rankness and sparsity ? Analysis . From the perspective of linear algebra , the low-rankness of a DNN model can be exploited using different ways . As illustrated in Figure 3 , for an example convolutional layer , imposing the low-rank structure can be realized by performing simple matrix factorization or high-order tensor decomposition . Specifically , Yu et al . ( 2017 ) chooses SVD-free method to factorize DNN model and obtain the low-rank component , and Li et al . ( 2021b ) proposes to use SVD-based decomposition to serve as the second-stage compression approach in its adopted L ( S ) scheme . Notice that though the weights of convolutional layer essentially form a 4-D tensor format , the existing works exploit the low-rankness via using matrix decomposition – the 4-D tensor needs to be first flatten to a 2-D matrix and it is then factorized to two small matrix components . Our Proposal . We argue that the high-order tensor decomposition , the option that has not been explored in the integration scheme before , is the better choice than the low-order matrix decomposition adopted in the existing works . This is because as a reshaping-free technique that can directly factorize the tensor-format data to multiple tensor cores , tensor decomposition , such as Tensor Train ( TT ) and Tucker , can naturally capture and preserve the important spatial information and correlation of the original weight tensors in a more efficient way . Therefore , less information loss is expected after performing low-rank tensor-based DNN compression . To verify our hypothesis , we compare the feature maps of the compressed convolutional layer of ResNet-20 on CIFAR-10 dataset using dif- ferent low-rank methods . As visualized in Figure 4 , compared with the matrix decomposition-based approach with the same compression ratio , tensor decomposition can make the output feature map of the compressed layer much more similar to the feature map of the original uncompressed layer . In other words , low-rank tensor method can provide better preservation of the important feature information and thus it can bring potential higher model compression performance . Question # 3 : What is the best suitable optimization objective that the integrated compression scheme should aim ? Analysis . To efficiently realize the joint exploration of model low-rankness and sparsity with promising compression performance , different optimization strategies have been proposed in the existing works . For instance , Yu et al . ( 2017 ) ; Ma et al . ( 2019 ) aim to minimize the difference between the original weight matrix/tensor and the approximated reconstruction . In addition , Ma et al . ( 2019 ) proposes to explicitly add the low-rank and sparse regularization terms to the overall objective function , which can guide the training-aware procedure to enforce the desired structural patterns . Our Proposal . Different from the existing approximation error-centered or regularized loss-based solutions , we propose that the efficient co-exploration scheme should be interpreted as the optimization procedure with the low-rank and sparse constraints . Our rationale lies on two important observations of the inherent drawbacks of the prior efforts . First , the approximation strategy adopted in Yu et al . ( 2017 ) ; Ma et al . ( 2019 ) focuses on making the reconstructed model approach the original model as close as possible . However , since 1 ) the approximation error always exists ; and 2 ) the original model is not the only choice to achieve the desired accuracy , such strategy inherently can only search the low-rank and sparse components in a limited exploration space , thereby affecting the overall compression performance . Second , though adding the regularization terms into loss function indeed facilitates the extraction of low-rank and sparse patterns , the effect of such simple regularizing method is still limited , especially considering the efforts of pushing for sparsity and for low-rankness may interfere with each other , thereby potentially causing unexpected conflicts . Instead , by explicitly imposing the low-rank and sparse constraints on the overall optimization problem , these two structural requirement can be simultaneously satisfied with the proper use of optimization technique ( to be discussed in Section 4 ) . As reported in Appendix A , our proposed constrained optimization strategy can successfully impose the desired low-rankness and sparsity onto the DNN models efficiently . Summary of Our Analysis . ¶ Performing joint low-rank decomposition and pruning in a spatially parallel way ( L+S ) is the preferable operational sequence . · High-order tensor decomposition is the most suitable choice for the low-rank approach used in the integrated compression scheme . ¸ Imposing low-rankness and sparsity as the direct hard constraints on the loss optimization should be adopted to better satisfy the desired structural requirement . | This paper introduces a new DNN compression technique. It consists in approximating the weights of a trained DNN by the sum of a low-rank and a sparse tensor. This is done by adding sparsity and low-rank constraints to the usual loss, the optimization problem being solved with ADMM. Experiments and comparisons with state of the art show the effectiveness of the technique. | SP:af7cd0fe5458012213642454b01356aeae0df86d |
On feature learning in shallow and multi-layer neural networks with global convergence guarantees | 1 INTRODUCTION . The training of neural networks ( NNs ) can often succeed despite being a non-convex optimization problem and involving a large number of parameters . To understand this mystery , one recent direction is to focus on the over-parameterized regime , where the NNs have large widths , by studying their infinite-width limits under certain scalings of the parameters . For example , under the NTK or “ 1/ √ width ” scaling , the gradient descent ( GD ) dynamics of the training of a wide NN can be approximated by the linearized dynamics around initialization , and in the infinite-width limit , we obtain a kernel method equipped with the Neural Tangent Kernel ( NTK ) [ 37 ] . Theoretical guarantees for optimization and generalization can be obtained for wide NNs under the NTK scaling [ 19 , 5 ] . Nonetheless , it has been pointed out that the NTK analysis replies on a form of lazy training that excludes the learning of features or representations [ 16 , 72 ] , which is a crucial ingredient to the success of deep learning , and is therefore not adequate for explaining the success of NNs [ 27 , 41 ] . Alternatively , for shallow ( i.e . one-hidden-layer ) NNs , if we initialize the parameters according to a scaling of “ 1 / width ” , we can derive the mean-field ( MF ) limit of shallow NNs . In this limit , feature learning occurs , and the training dynamics can be described by the Wasserstein gradient flow of a probability measure on the space of the parameters , which converges to a global minimizer of the loss function under certain conditions [ 59 , 50 , 63 , 14 ] . Generalization guarantees have also been proved for learning with shallow NNs under the MF scaling via a corresponding function space [ 6 , 48 ] . Currently , however , three limitations exist to the mean-field analysis of NNs . First , the global convergence guarantees for shallow NNs only hold in the infinite-width limit , and the deviation between finite-width NNs and their infinite-width limits has only been studied asymptotically [ 12 ] . Second , a convergence rate is yet to be established except under special assumptions or with modifications to the GD algorithm [ 13 , 34 , 43 , 38 ] . Third , while several works have proposed to extend the MF formulation to deep ( i.e . multi-layer ) NNs [ 4 , 62 , 52 , 23 , 57 ] , there is less concensus on what the right model should be than for the shallow case . More generally , we still lack a model for the optimization of shallow and multi-layer NNs that goes beyond lazy training while admitting fast global convergence . The aim of this work is to obtain theoretical guarantees of fast global convergence of feature learning in both shallow and a type of multi-layer NNs . 1.1 SUMMARY OF MAIN CONTRIBUTIONS . We consider the scenario of training an NN model to fit a set of n training data with input dimension d under least-squares regression , where the model parameters are optimized by gradient flow . With most choices of the activation function , we prove that : 1 . For a shallow NN , if the hidden layer is sufficiently wide and the input data are linearly independent ( requiring n ≤ d ) , then with high probability , the training loss converges to zero at a linear rate . 2 . For a multi-layer NN where we only train the second-to-last layer , if the hidden-layer widths are sufficiently large , then with high probability , the training loss converges to zero at a linear rate . Unlike for shallow NNs , here we no longer need the requirement that n ≤ d , demonstrating a benefit of jointly having depth and width . To our knowledge , we are presenting the first theoretical guarantee of linear-rate convergence of feature learning in multi-layer NNs . We also run numerical experiments that complement the theory . 1.2 RELATED WORKS . Over-parameterized NNs , NTK and lazy training . Many recent works have studied the optimization landscape of NNs and the benefits of over-parameterization [ 24 , 67 , 60 , 66 , 64 , 54 , 65 , 42 , 3 , 40 , 76 , 15 , 75 , 17 , 39 , 9 , 32 , 20 , 31 , 61 , 10 ] . One influential idea is the Neural Tangent Kernel ( NTK ) [ 37 ] , which characterizes the behavior of GD on NNs by its linearization around initialization , and becomes exact if the width tends to infinity under a particular scaling of the parameters ( e.g . replacing 1/m with 1/ √ m in ( 1 ) ) . In particular , when the network width is polynomially large in the number of training set size , the training loss converges to global minima at a linear rate under GD [ 19 , 5 , 55 ] . Nonetheless , in the NTK limit , due to a relatively large scaling of the parameters at initialization , the hidden-layer features do not move significantly [ 37 , 19 , 16 ] . For this reason , the NTK scaling has been called the lazy-training regime , as opposed to a feature-learning or rich regime [ 16 , 72 , 26 ] . Several works have investigated the differences between the two regimes both in theory [ 28 , 29 , 69 , 47 ] and in practice [ 27 , 41 ] . In addition , several works have generalized the NTK analysis by considering higher-order Taylor approximations of the GD dynamics or finite-width corrections to the NTK [ 2 , 35 , 7 , 33 ] . Mean-field theory of NNs . An alternative path has been taken to study shallow NNs in the meanfield scaling ( as in ( 1 ) ) , where the infinite-width limit is analogous to the thermodynamic or hydrodynamic limit of interacting particle systems [ 59 , 50 , 63 , 14 , 49 , 70 ] . Thanks to the interchangeability of the parameters , the neural network is equivalently characterized by a probability measure on the space of its parameters , and the training can then be described by a Wasserstein gradient flow followed by this probability measure , which , in the infinite-width limit , converges to global mimima under mild conditions . Regarding convergence rate , ref . [ 71 ] proves that if we train a shallow NN to fit a Lipschitz target function under population loss , the convergence rate can not beat the curse of dimensionality . In contrast , we will study the setting of empirical risk minimization , where there are finitely many training data . Ref . [ 34 ] shows that mean field Langevin dynamics on shallow NNs can converge exponentially to global minimizers in over-regularized scenarios , but we focus on gradient flow without entropic regularization . Besides the question of optimization , shallow NNs under this scaling represent functions in the Barron space [ 48 ] or variation-norm function space [ 6 ] , which provide theoretical guarantees on generalization as well as fluctuation in training [ 12 ] . Several works have proposed different mean-field limits of wide multi-layer NNs and proved convergence guarantees [ 4 , 62 , 51 , 52 , 23 , 57 , 22 ] , but questions remain . First , due to the presence of different symmetries in a multi-layer network compared to a shallow network [ 57 ] , the limiting object at the infinite-width limit is often quite complicated . Second , it has been pointed out that under the MF scaling of a multi-layer network , an i.i.d . initialization of the weights would lead to a collapse of the diversity of neurons in the middle layers , diminishing the effect of having large widths [ 23 ] . In addition , while another line of work develops MF models of residual models [ 8 , 46 , 21 , 36 ] , we are interested in multi-layer NN models with a large width in every layer . Feature learning in deep NNs . Ref . [ 1 ] demonstrates the importance of hierarchical learning by proving the existence of concept classes than can be learned efficiently by a deep NN with quadratic activations but not by non-hierarchical models . Ref . [ 11 ] studies the optimization landscape and generalization properties of a hierarchical model that is similar to ours in spirit , where an untrained embedding of the input is passed into a trainable shallow model , and prove an improvement in sample complexity in learning polynomials by having neural network outputs as the embedding . However , the trainable models they consider are not shallow NNs but their linearized and quadraticTaylor approximations , and furthermore the convergence rate of the training is not known . Ref . [ 73 ] proposes an alternative scaling under which there exists an infinite-width limit of deep NNs that exhibits feature learning , but properties of its training dynamics is still not well-understood . Our pseudo-multi-layer NN models adopt the same scaling , and our focus is on proving non-asymptotic convergence guarantees . 2 PROBLEM SETUP . 2.1 MODEL . We summarize our notations in Appendix A . Let Ω ⊆ Rd denote the input space , and let x = [ x1 , ... , xd ] ᵀ ∈ Ω denote a generic input data vector . A shallow NN model under the MF scaling can be written as : f ( x ) = 1 m m∑ i=1 ciσ ( 1√ d d∑ j=1 Wijxj ) , ( 1 ) where m is the width , W ∈ Rm×d and c = [ c1 , ... , cm ] ∈ Rm are the first- and second-layer weight parameters of the model , and σ : R→ R is the activation function . For simplicity of presentation , we neglect the bias terms . In this paper , we study a more general type of models with the following form : f ( x ) = 1 m m∑ i=1 ciσ ( hi ( x ) ) , ( 2 ) ∀i ∈ [ m ] : hi ( x ) = 1√ D D∑ j=1 Wijφj ( x ) , ( 3 ) where W ∈ Rm×D and c = [ c1 , ... , cm ] ∈ Rm are parameters of the model , and φ1 , ... , φD are a set of functions from Ω to R that we call the embedding . Each of h1 , ... , hm is a function from Ω to R , and we will refer to them as the ( hidden-layer ) feature map or activations . For simplicity , we write Φ ( x ) = [ φi ( x ) , ... φD ( x ) ] ᵀ ∈ RD . We consider two types of the embedding , Φ : Fixed embedding D is fixed and Φ is deterministic . In the simplest example , we set D = d and φj ( x ) = xj , ∀j ∈ [ D ] , and recover the shallow NN model in ( 1 ) . More generally , our definition includes cases where Φ is a deterministic transformation of an input vector in Ω into an embedding vector in RD . This can be understood as input pre-processing or feature engineering . High-dimensional random embedding D is large and Φ is random . For instance , we can sample zj i.i.d . in Rd and set φj ( x ) = σ ( 1√ d zᵀj x ) , equivalent to setting φ1 , ... , φm as the hidden-layer activations of a shallow NN with randomly-initialized first-layer weights . Then , the model becomes f ( x ) = 1 m m∑ i=1 ciσ ( hi ( x ) ) , ( 4 ) ∀i ∈ [ m ] : hi ( x ) = 1√ D D∑ j=1 Wijσ ( 1√ d zᵀj x ) . ( 5 ) Thus , we obtain a 3-layer feed-forward NN whose first-layer weights are random and fixed , and we call it a partially-trained 3-layer ( p-3L ) NN . Note that the scaling in this model is different from both the NTK scaling ( 1/ √ m instead of 1/m in ( 4 ) ) and the MF scaling for multi-layer NNs adopted in [ 4 , 62 , 51 , 57 , 23 ] ( 1/D instead of 1/ √ D in ( 5 ) ) . We show in Appendix B that when σ is homogeneous , this scaling is consistent with the Xavier initialization of neural network parameters up to a reparameterization [ 30 , 56 ] . We also show in Appendix C that a special case of this scaling is equivalent to the maximum-update scaling scheme proposed in [ 73 ] . Numerical experiments that compare different scalings are described in Section 4 . | In this paper, the authors studied the optimization problem of shallow and deep neural network. They showed that under the non-degeneracy condition on certain Gram matrix, gradient descent (GD) can converge to 0 training loss efficiently. One important difference with the existing NTK and mean-field literatures is that a different scaling factor was used in this paper. Experiment results show that neural network with this scaling is different from NTK and mean-field scale, while it is still able to do feature learning. | SP:41d4b9e23ce184e58445617602eab84f4122058e |
On feature learning in shallow and multi-layer neural networks with global convergence guarantees | 1 INTRODUCTION . The training of neural networks ( NNs ) can often succeed despite being a non-convex optimization problem and involving a large number of parameters . To understand this mystery , one recent direction is to focus on the over-parameterized regime , where the NNs have large widths , by studying their infinite-width limits under certain scalings of the parameters . For example , under the NTK or “ 1/ √ width ” scaling , the gradient descent ( GD ) dynamics of the training of a wide NN can be approximated by the linearized dynamics around initialization , and in the infinite-width limit , we obtain a kernel method equipped with the Neural Tangent Kernel ( NTK ) [ 37 ] . Theoretical guarantees for optimization and generalization can be obtained for wide NNs under the NTK scaling [ 19 , 5 ] . Nonetheless , it has been pointed out that the NTK analysis replies on a form of lazy training that excludes the learning of features or representations [ 16 , 72 ] , which is a crucial ingredient to the success of deep learning , and is therefore not adequate for explaining the success of NNs [ 27 , 41 ] . Alternatively , for shallow ( i.e . one-hidden-layer ) NNs , if we initialize the parameters according to a scaling of “ 1 / width ” , we can derive the mean-field ( MF ) limit of shallow NNs . In this limit , feature learning occurs , and the training dynamics can be described by the Wasserstein gradient flow of a probability measure on the space of the parameters , which converges to a global minimizer of the loss function under certain conditions [ 59 , 50 , 63 , 14 ] . Generalization guarantees have also been proved for learning with shallow NNs under the MF scaling via a corresponding function space [ 6 , 48 ] . Currently , however , three limitations exist to the mean-field analysis of NNs . First , the global convergence guarantees for shallow NNs only hold in the infinite-width limit , and the deviation between finite-width NNs and their infinite-width limits has only been studied asymptotically [ 12 ] . Second , a convergence rate is yet to be established except under special assumptions or with modifications to the GD algorithm [ 13 , 34 , 43 , 38 ] . Third , while several works have proposed to extend the MF formulation to deep ( i.e . multi-layer ) NNs [ 4 , 62 , 52 , 23 , 57 ] , there is less concensus on what the right model should be than for the shallow case . More generally , we still lack a model for the optimization of shallow and multi-layer NNs that goes beyond lazy training while admitting fast global convergence . The aim of this work is to obtain theoretical guarantees of fast global convergence of feature learning in both shallow and a type of multi-layer NNs . 1.1 SUMMARY OF MAIN CONTRIBUTIONS . We consider the scenario of training an NN model to fit a set of n training data with input dimension d under least-squares regression , where the model parameters are optimized by gradient flow . With most choices of the activation function , we prove that : 1 . For a shallow NN , if the hidden layer is sufficiently wide and the input data are linearly independent ( requiring n ≤ d ) , then with high probability , the training loss converges to zero at a linear rate . 2 . For a multi-layer NN where we only train the second-to-last layer , if the hidden-layer widths are sufficiently large , then with high probability , the training loss converges to zero at a linear rate . Unlike for shallow NNs , here we no longer need the requirement that n ≤ d , demonstrating a benefit of jointly having depth and width . To our knowledge , we are presenting the first theoretical guarantee of linear-rate convergence of feature learning in multi-layer NNs . We also run numerical experiments that complement the theory . 1.2 RELATED WORKS . Over-parameterized NNs , NTK and lazy training . Many recent works have studied the optimization landscape of NNs and the benefits of over-parameterization [ 24 , 67 , 60 , 66 , 64 , 54 , 65 , 42 , 3 , 40 , 76 , 15 , 75 , 17 , 39 , 9 , 32 , 20 , 31 , 61 , 10 ] . One influential idea is the Neural Tangent Kernel ( NTK ) [ 37 ] , which characterizes the behavior of GD on NNs by its linearization around initialization , and becomes exact if the width tends to infinity under a particular scaling of the parameters ( e.g . replacing 1/m with 1/ √ m in ( 1 ) ) . In particular , when the network width is polynomially large in the number of training set size , the training loss converges to global minima at a linear rate under GD [ 19 , 5 , 55 ] . Nonetheless , in the NTK limit , due to a relatively large scaling of the parameters at initialization , the hidden-layer features do not move significantly [ 37 , 19 , 16 ] . For this reason , the NTK scaling has been called the lazy-training regime , as opposed to a feature-learning or rich regime [ 16 , 72 , 26 ] . Several works have investigated the differences between the two regimes both in theory [ 28 , 29 , 69 , 47 ] and in practice [ 27 , 41 ] . In addition , several works have generalized the NTK analysis by considering higher-order Taylor approximations of the GD dynamics or finite-width corrections to the NTK [ 2 , 35 , 7 , 33 ] . Mean-field theory of NNs . An alternative path has been taken to study shallow NNs in the meanfield scaling ( as in ( 1 ) ) , where the infinite-width limit is analogous to the thermodynamic or hydrodynamic limit of interacting particle systems [ 59 , 50 , 63 , 14 , 49 , 70 ] . Thanks to the interchangeability of the parameters , the neural network is equivalently characterized by a probability measure on the space of its parameters , and the training can then be described by a Wasserstein gradient flow followed by this probability measure , which , in the infinite-width limit , converges to global mimima under mild conditions . Regarding convergence rate , ref . [ 71 ] proves that if we train a shallow NN to fit a Lipschitz target function under population loss , the convergence rate can not beat the curse of dimensionality . In contrast , we will study the setting of empirical risk minimization , where there are finitely many training data . Ref . [ 34 ] shows that mean field Langevin dynamics on shallow NNs can converge exponentially to global minimizers in over-regularized scenarios , but we focus on gradient flow without entropic regularization . Besides the question of optimization , shallow NNs under this scaling represent functions in the Barron space [ 48 ] or variation-norm function space [ 6 ] , which provide theoretical guarantees on generalization as well as fluctuation in training [ 12 ] . Several works have proposed different mean-field limits of wide multi-layer NNs and proved convergence guarantees [ 4 , 62 , 51 , 52 , 23 , 57 , 22 ] , but questions remain . First , due to the presence of different symmetries in a multi-layer network compared to a shallow network [ 57 ] , the limiting object at the infinite-width limit is often quite complicated . Second , it has been pointed out that under the MF scaling of a multi-layer network , an i.i.d . initialization of the weights would lead to a collapse of the diversity of neurons in the middle layers , diminishing the effect of having large widths [ 23 ] . In addition , while another line of work develops MF models of residual models [ 8 , 46 , 21 , 36 ] , we are interested in multi-layer NN models with a large width in every layer . Feature learning in deep NNs . Ref . [ 1 ] demonstrates the importance of hierarchical learning by proving the existence of concept classes than can be learned efficiently by a deep NN with quadratic activations but not by non-hierarchical models . Ref . [ 11 ] studies the optimization landscape and generalization properties of a hierarchical model that is similar to ours in spirit , where an untrained embedding of the input is passed into a trainable shallow model , and prove an improvement in sample complexity in learning polynomials by having neural network outputs as the embedding . However , the trainable models they consider are not shallow NNs but their linearized and quadraticTaylor approximations , and furthermore the convergence rate of the training is not known . Ref . [ 73 ] proposes an alternative scaling under which there exists an infinite-width limit of deep NNs that exhibits feature learning , but properties of its training dynamics is still not well-understood . Our pseudo-multi-layer NN models adopt the same scaling , and our focus is on proving non-asymptotic convergence guarantees . 2 PROBLEM SETUP . 2.1 MODEL . We summarize our notations in Appendix A . Let Ω ⊆ Rd denote the input space , and let x = [ x1 , ... , xd ] ᵀ ∈ Ω denote a generic input data vector . A shallow NN model under the MF scaling can be written as : f ( x ) = 1 m m∑ i=1 ciσ ( 1√ d d∑ j=1 Wijxj ) , ( 1 ) where m is the width , W ∈ Rm×d and c = [ c1 , ... , cm ] ∈ Rm are the first- and second-layer weight parameters of the model , and σ : R→ R is the activation function . For simplicity of presentation , we neglect the bias terms . In this paper , we study a more general type of models with the following form : f ( x ) = 1 m m∑ i=1 ciσ ( hi ( x ) ) , ( 2 ) ∀i ∈ [ m ] : hi ( x ) = 1√ D D∑ j=1 Wijφj ( x ) , ( 3 ) where W ∈ Rm×D and c = [ c1 , ... , cm ] ∈ Rm are parameters of the model , and φ1 , ... , φD are a set of functions from Ω to R that we call the embedding . Each of h1 , ... , hm is a function from Ω to R , and we will refer to them as the ( hidden-layer ) feature map or activations . For simplicity , we write Φ ( x ) = [ φi ( x ) , ... φD ( x ) ] ᵀ ∈ RD . We consider two types of the embedding , Φ : Fixed embedding D is fixed and Φ is deterministic . In the simplest example , we set D = d and φj ( x ) = xj , ∀j ∈ [ D ] , and recover the shallow NN model in ( 1 ) . More generally , our definition includes cases where Φ is a deterministic transformation of an input vector in Ω into an embedding vector in RD . This can be understood as input pre-processing or feature engineering . High-dimensional random embedding D is large and Φ is random . For instance , we can sample zj i.i.d . in Rd and set φj ( x ) = σ ( 1√ d zᵀj x ) , equivalent to setting φ1 , ... , φm as the hidden-layer activations of a shallow NN with randomly-initialized first-layer weights . Then , the model becomes f ( x ) = 1 m m∑ i=1 ciσ ( hi ( x ) ) , ( 4 ) ∀i ∈ [ m ] : hi ( x ) = 1√ D D∑ j=1 Wijσ ( 1√ d zᵀj x ) . ( 5 ) Thus , we obtain a 3-layer feed-forward NN whose first-layer weights are random and fixed , and we call it a partially-trained 3-layer ( p-3L ) NN . Note that the scaling in this model is different from both the NTK scaling ( 1/ √ m instead of 1/m in ( 4 ) ) and the MF scaling for multi-layer NNs adopted in [ 4 , 62 , 51 , 57 , 23 ] ( 1/D instead of 1/ √ D in ( 5 ) ) . We show in Appendix B that when σ is homogeneous , this scaling is consistent with the Xavier initialization of neural network parameters up to a reparameterization [ 30 , 56 ] . We also show in Appendix C that a special case of this scaling is equivalent to the maximum-update scaling scheme proposed in [ 73 ] . Numerical experiments that compare different scalings are described in Section 4 . | The authors consider the training dynamics of neural networks under a modification of the mean field parameterization in the high dimensional (d >= n) setting. They provide an especially simple global convergence result under very mild assumptions (beyond the more restrictive d>=n one). The proof is particularly clean and simple in the setting of leaky-relu type activations, and somewhat more technical arguments are required to get the result to hold for more general activations. The d>=n assumption is key, as their results depend upon the minimal eigenvalue of the empirical kernel matrix defined by the inner product K(x,x') = <x, x'>, which is strictly positive when d>=n but not necessarily otherwise. They extend the results to the feature map/embedding setting, assuming the data come from feature maps \phi(x) where \phi(x) lies in a sufficiently high dimensional space so that the kernel defined over embeddings is positive definite provided the dimension of the embedding is large enough. | SP:41d4b9e23ce184e58445617602eab84f4122058e |
On feature learning in shallow and multi-layer neural networks with global convergence guarantees | 1 INTRODUCTION . The training of neural networks ( NNs ) can often succeed despite being a non-convex optimization problem and involving a large number of parameters . To understand this mystery , one recent direction is to focus on the over-parameterized regime , where the NNs have large widths , by studying their infinite-width limits under certain scalings of the parameters . For example , under the NTK or “ 1/ √ width ” scaling , the gradient descent ( GD ) dynamics of the training of a wide NN can be approximated by the linearized dynamics around initialization , and in the infinite-width limit , we obtain a kernel method equipped with the Neural Tangent Kernel ( NTK ) [ 37 ] . Theoretical guarantees for optimization and generalization can be obtained for wide NNs under the NTK scaling [ 19 , 5 ] . Nonetheless , it has been pointed out that the NTK analysis replies on a form of lazy training that excludes the learning of features or representations [ 16 , 72 ] , which is a crucial ingredient to the success of deep learning , and is therefore not adequate for explaining the success of NNs [ 27 , 41 ] . Alternatively , for shallow ( i.e . one-hidden-layer ) NNs , if we initialize the parameters according to a scaling of “ 1 / width ” , we can derive the mean-field ( MF ) limit of shallow NNs . In this limit , feature learning occurs , and the training dynamics can be described by the Wasserstein gradient flow of a probability measure on the space of the parameters , which converges to a global minimizer of the loss function under certain conditions [ 59 , 50 , 63 , 14 ] . Generalization guarantees have also been proved for learning with shallow NNs under the MF scaling via a corresponding function space [ 6 , 48 ] . Currently , however , three limitations exist to the mean-field analysis of NNs . First , the global convergence guarantees for shallow NNs only hold in the infinite-width limit , and the deviation between finite-width NNs and their infinite-width limits has only been studied asymptotically [ 12 ] . Second , a convergence rate is yet to be established except under special assumptions or with modifications to the GD algorithm [ 13 , 34 , 43 , 38 ] . Third , while several works have proposed to extend the MF formulation to deep ( i.e . multi-layer ) NNs [ 4 , 62 , 52 , 23 , 57 ] , there is less concensus on what the right model should be than for the shallow case . More generally , we still lack a model for the optimization of shallow and multi-layer NNs that goes beyond lazy training while admitting fast global convergence . The aim of this work is to obtain theoretical guarantees of fast global convergence of feature learning in both shallow and a type of multi-layer NNs . 1.1 SUMMARY OF MAIN CONTRIBUTIONS . We consider the scenario of training an NN model to fit a set of n training data with input dimension d under least-squares regression , where the model parameters are optimized by gradient flow . With most choices of the activation function , we prove that : 1 . For a shallow NN , if the hidden layer is sufficiently wide and the input data are linearly independent ( requiring n ≤ d ) , then with high probability , the training loss converges to zero at a linear rate . 2 . For a multi-layer NN where we only train the second-to-last layer , if the hidden-layer widths are sufficiently large , then with high probability , the training loss converges to zero at a linear rate . Unlike for shallow NNs , here we no longer need the requirement that n ≤ d , demonstrating a benefit of jointly having depth and width . To our knowledge , we are presenting the first theoretical guarantee of linear-rate convergence of feature learning in multi-layer NNs . We also run numerical experiments that complement the theory . 1.2 RELATED WORKS . Over-parameterized NNs , NTK and lazy training . Many recent works have studied the optimization landscape of NNs and the benefits of over-parameterization [ 24 , 67 , 60 , 66 , 64 , 54 , 65 , 42 , 3 , 40 , 76 , 15 , 75 , 17 , 39 , 9 , 32 , 20 , 31 , 61 , 10 ] . One influential idea is the Neural Tangent Kernel ( NTK ) [ 37 ] , which characterizes the behavior of GD on NNs by its linearization around initialization , and becomes exact if the width tends to infinity under a particular scaling of the parameters ( e.g . replacing 1/m with 1/ √ m in ( 1 ) ) . In particular , when the network width is polynomially large in the number of training set size , the training loss converges to global minima at a linear rate under GD [ 19 , 5 , 55 ] . Nonetheless , in the NTK limit , due to a relatively large scaling of the parameters at initialization , the hidden-layer features do not move significantly [ 37 , 19 , 16 ] . For this reason , the NTK scaling has been called the lazy-training regime , as opposed to a feature-learning or rich regime [ 16 , 72 , 26 ] . Several works have investigated the differences between the two regimes both in theory [ 28 , 29 , 69 , 47 ] and in practice [ 27 , 41 ] . In addition , several works have generalized the NTK analysis by considering higher-order Taylor approximations of the GD dynamics or finite-width corrections to the NTK [ 2 , 35 , 7 , 33 ] . Mean-field theory of NNs . An alternative path has been taken to study shallow NNs in the meanfield scaling ( as in ( 1 ) ) , where the infinite-width limit is analogous to the thermodynamic or hydrodynamic limit of interacting particle systems [ 59 , 50 , 63 , 14 , 49 , 70 ] . Thanks to the interchangeability of the parameters , the neural network is equivalently characterized by a probability measure on the space of its parameters , and the training can then be described by a Wasserstein gradient flow followed by this probability measure , which , in the infinite-width limit , converges to global mimima under mild conditions . Regarding convergence rate , ref . [ 71 ] proves that if we train a shallow NN to fit a Lipschitz target function under population loss , the convergence rate can not beat the curse of dimensionality . In contrast , we will study the setting of empirical risk minimization , where there are finitely many training data . Ref . [ 34 ] shows that mean field Langevin dynamics on shallow NNs can converge exponentially to global minimizers in over-regularized scenarios , but we focus on gradient flow without entropic regularization . Besides the question of optimization , shallow NNs under this scaling represent functions in the Barron space [ 48 ] or variation-norm function space [ 6 ] , which provide theoretical guarantees on generalization as well as fluctuation in training [ 12 ] . Several works have proposed different mean-field limits of wide multi-layer NNs and proved convergence guarantees [ 4 , 62 , 51 , 52 , 23 , 57 , 22 ] , but questions remain . First , due to the presence of different symmetries in a multi-layer network compared to a shallow network [ 57 ] , the limiting object at the infinite-width limit is often quite complicated . Second , it has been pointed out that under the MF scaling of a multi-layer network , an i.i.d . initialization of the weights would lead to a collapse of the diversity of neurons in the middle layers , diminishing the effect of having large widths [ 23 ] . In addition , while another line of work develops MF models of residual models [ 8 , 46 , 21 , 36 ] , we are interested in multi-layer NN models with a large width in every layer . Feature learning in deep NNs . Ref . [ 1 ] demonstrates the importance of hierarchical learning by proving the existence of concept classes than can be learned efficiently by a deep NN with quadratic activations but not by non-hierarchical models . Ref . [ 11 ] studies the optimization landscape and generalization properties of a hierarchical model that is similar to ours in spirit , where an untrained embedding of the input is passed into a trainable shallow model , and prove an improvement in sample complexity in learning polynomials by having neural network outputs as the embedding . However , the trainable models they consider are not shallow NNs but their linearized and quadraticTaylor approximations , and furthermore the convergence rate of the training is not known . Ref . [ 73 ] proposes an alternative scaling under which there exists an infinite-width limit of deep NNs that exhibits feature learning , but properties of its training dynamics is still not well-understood . Our pseudo-multi-layer NN models adopt the same scaling , and our focus is on proving non-asymptotic convergence guarantees . 2 PROBLEM SETUP . 2.1 MODEL . We summarize our notations in Appendix A . Let Ω ⊆ Rd denote the input space , and let x = [ x1 , ... , xd ] ᵀ ∈ Ω denote a generic input data vector . A shallow NN model under the MF scaling can be written as : f ( x ) = 1 m m∑ i=1 ciσ ( 1√ d d∑ j=1 Wijxj ) , ( 1 ) where m is the width , W ∈ Rm×d and c = [ c1 , ... , cm ] ∈ Rm are the first- and second-layer weight parameters of the model , and σ : R→ R is the activation function . For simplicity of presentation , we neglect the bias terms . In this paper , we study a more general type of models with the following form : f ( x ) = 1 m m∑ i=1 ciσ ( hi ( x ) ) , ( 2 ) ∀i ∈ [ m ] : hi ( x ) = 1√ D D∑ j=1 Wijφj ( x ) , ( 3 ) where W ∈ Rm×D and c = [ c1 , ... , cm ] ∈ Rm are parameters of the model , and φ1 , ... , φD are a set of functions from Ω to R that we call the embedding . Each of h1 , ... , hm is a function from Ω to R , and we will refer to them as the ( hidden-layer ) feature map or activations . For simplicity , we write Φ ( x ) = [ φi ( x ) , ... φD ( x ) ] ᵀ ∈ RD . We consider two types of the embedding , Φ : Fixed embedding D is fixed and Φ is deterministic . In the simplest example , we set D = d and φj ( x ) = xj , ∀j ∈ [ D ] , and recover the shallow NN model in ( 1 ) . More generally , our definition includes cases where Φ is a deterministic transformation of an input vector in Ω into an embedding vector in RD . This can be understood as input pre-processing or feature engineering . High-dimensional random embedding D is large and Φ is random . For instance , we can sample zj i.i.d . in Rd and set φj ( x ) = σ ( 1√ d zᵀj x ) , equivalent to setting φ1 , ... , φm as the hidden-layer activations of a shallow NN with randomly-initialized first-layer weights . Then , the model becomes f ( x ) = 1 m m∑ i=1 ciσ ( hi ( x ) ) , ( 4 ) ∀i ∈ [ m ] : hi ( x ) = 1√ D D∑ j=1 Wijσ ( 1√ d zᵀj x ) . ( 5 ) Thus , we obtain a 3-layer feed-forward NN whose first-layer weights are random and fixed , and we call it a partially-trained 3-layer ( p-3L ) NN . Note that the scaling in this model is different from both the NTK scaling ( 1/ √ m instead of 1/m in ( 4 ) ) and the MF scaling for multi-layer NNs adopted in [ 4 , 62 , 51 , 57 , 23 ] ( 1/D instead of 1/ √ D in ( 5 ) ) . We show in Appendix B that when σ is homogeneous , this scaling is consistent with the Xavier initialization of neural network parameters up to a reparameterization [ 30 , 56 ] . We also show in Appendix C that a special case of this scaling is equivalent to the maximum-update scaling scheme proposed in [ 73 ] . Numerical experiments that compare different scalings are described in Section 4 . | This paper studies the optimization of a pseudo-three-layer network. The first (output) layer is scaled by a law of large number (LNN) scaling, while the second layer is scaled by a central limit theorem (CLT)-scaling. The inputs are fixed random feature embeddings. Only the weights of the second layer are learnable. They proved that when the second layer is sufficiently over-parameterized (wrt the number of samples), GD flow converges to a zero-loss solution exponentially fast. In particular, the authors claim that, unlike the NTK regime, their setting exhibits feature learnings. | SP:41d4b9e23ce184e58445617602eab84f4122058e |
Inverse Online Learning: Understanding Non-Stationary and Reactionary Policies | 1 INTRODUCTION . Decision modelling is often viewed through the lens of policy learning ( Bain & Sammut , 1995 ; Abbeel & Ng , 2004 ) , where the aim is to learn some imitation policy that captures the actions ( and thus decisions ) of an agent in some structured way ( Hüyük et al. , 2021 ) . Unfortunately , this usually implicitly relies on the assumption that the actions taken are already optimal with respect to some objective , and hence do not change over time . While this might be appropriate to approximate the stationary policy of an autonomous agent , such assumptions often break down when applying them to more flexible agents that might be learning on-the-fly . In particular , we may want to model the decision making process of a human decision-maker , whose actions we may see executed over time - this is clearly of great use in a range of fields including economics and medicine ( Hunink et al. , 2014 ; Zavadskas & Turskis , 2011 ) . In the context of machine learning , they would be considered to be undergoing a process of online learning ( Hoi et al. , 2018 ) ; training while interacting with the environment , where it is to be expected that beliefs and strategies are constantly adapted based on accumulating experience ( Elio & Pelletier , 1997 ) . Additionally , such belief updates are often imperfect ; for example , people are known to a priori over-weight the potential impact of rare events when they first start a task , before proceeding to neglect them when they do not occur in their experience ( Hertwig & Erev , 2009 ) . If our goal is to analyse human decision-making , it is thus important to be able to model non-stationary policies that are potentially imperfect in two senses : both marginally at each time-step , and in the way that they become adapted to new information . In this work , instead of relying on the assumption that an agent follows a stationary optimal policy , we consider their actions to be consistent within an online leaning framework where they learn from an incoming sequence of examples ( Hoi et al. , 2018 ) and update their policies accordingly , as in Figure 1 . Thus , instead of assuming that actions are globally optimal , we assume that at any exact time the agent thought that the action was better than the alternatives . As a natural consequence , we frame the problem of decision modelling as that of inverse online learning ; that is , we aim to uncover the process through which an agent is learning online . Note that this does not involve coming up with a new way to do online learning itself , rather we recover how it appears a given agent may have learnt . We do this by modelling the ( non-stationary ) policy of the agent using a deep state-space model ( Krishnan et al. , 2017 ) , allowing us to track the memory of the agent while allowing policies to evolve in a non-parametric and non-prescribed fashion . We construct an interpretable mapping from the accrued memory to policies by framing the decision-making process within a potential-outcome setting ( Rubin , 2005 ) ; letting actions correspond to interventions ( or treatments ) , and assuming that agents make decisions by choosing an action which they perceive to have the highest ( treatment ) effect . Contributions . In this work we make a number of contributions : First , we formalise the inverse online learning problem and a connection between decision modelling , online learning and potential outcomes , highlighting how they complement each other to result in an interpretable understanding of policies ( Section 2 ) ; Second , we introduce a practical method to estimate the non-stationary policy and update method of an agent given demonstrations ( Section 4 ) ; And third , we demonstrate how we can uncover useful practical insights into the decision making process of agents with a case study on the acceptance of liver donation offers ( Section 5 ) . 2 PROBLEM FORMALISATION . Preliminaries . Assume we observe a data trajectory1 of the form D = { ( Xt , At , Yt ) } Tt=1 . Here , Xt ∈ X ⊂ Rd , denotes a context vector of possible confounders ; At ∈ A = { 0 , 1 } , a binary action or intervention ; and Yt ∈ Y , a binary or continuous outcome of interest . The subscript t indicates a time-ordering of observed triplets ; any time-step t is generated by ( i ) arrival of context x , ( ii ) an intervention a being performed by an agent according to some policy πt ( x ) and ( iii ) a corresponding outcome y being observed . Goal . We are interested in recovering the agent ’ s non-stationary policy πt ( x ) = P ( A = 1|X = x , Ht = ht ) , which depends on the observed context x and can change over time due to the observed history Ht = { ( Xk , Ak , Yk ) } t−1k=1 . We make the key assumption that the agent acts with the intention to choose an intervention a leading to the best ( largest ) potential outcome Y ( a ) , but that the perception of the optimal intervention may change over time throughout the agent ’ s learning process about their environment . This problem formalisation naturally places us at the in- tersection of treatment effect inference within the Neyman-Rubin potential outcomes ( PO ) framework ( Rubin , 2005 ) with the classical ( inverse ) reinforcement learning ( RL ) paradigm ( Abbeel & Ng , 2004 ) . More specifically though the RL-subproblem of logged contextual bandits ( Swaminathan & Joachims , 2015 ; Atan et al. , 2018 ) , where the setting is offline and the contexts arrive independently . Perception Versus Reality . As is standard within the PO framework , we assume that any observation has two potential outcomes Y ( a ) , associated with each intervention ( treatment-level ) , which are 1We assume with a single trajectory here , though learning and inference can be applied over a dataset of multiple trajectories generated from some true distribution inherent to the environment , i.e . Y ( 0 ) , Y ( 1 ) ∼ Pe ( ·|X = x ) , yet only the potential outcome associated with the chosen treatment is revealed to the agent . If the agent had full knowledge of the environment , its optimal policy would be to choose an action as arg maxa µea ( x ) where µ e a ( x ) = EPe [ Y ( a ) |X = x ] , or conversely to choose to perform the intervention only when its expected conditional average treatment effect ( CATE ) τe ( x ) = µe1 ( x ) − µe0 ( x ) is positive . In general , we assume that such perfect knowledge of the environment is not available to the agent in many scenarios of practical interest . Instead , we assume that at any time t , the agent acts according to some perceived model P̃ of its environment , which induces the perceived expected potential outcomes µ̃a ( x ; t ) and associated treatment effect τ̃ ( x ; t ) . Here , µ̃a ( x ; t ) = EP̃ [ Y ( a ) |X = x , Ht = ht ] , is a function not only of the observed context but also the history , such that the agent can update its beliefs according to observed outcomes . Note that we allow the agent ’ s model of the environment to be misspecified ; in this case µ̃a ( x ; t ) would not converge to µea ( x ) even for very long trajectories . We consider this an important feature , as we assume that human decision-makers generally need to make simplifications ( Griffiths et al. , 2015 ) . Formally , we make the following assumption about the agent ’ s decision making process : Assumption 1 Mutual Observability : The observable space X contains only and all the information available to the agent at the point of assigning an action . Assumption 2 Perceived Optimality : An agent assigns the action they think will maximise the outcome . For a deterministic policy πt , the agent believes πt ( x ) = 1 ⇐⇒ µ̃1 ( x ; t ) > µ̃0 ( x ; t ) . Given a stochastic policy , πt ( x ) is a monotonic increasing function of the agent ’ s belief over the treatment effect τ̃ ( x ; t ) . Assumption 3 Continual Adaptation : The agent may continually adjust their strategy based on experience . The index in the dataset D represents a temporal ordering which π is non-stationary with respect to , i.e . πi ( x ) may not equal πj ( x ) , i 6= j ≥ 1 where πi represents the policy at time step i. Assumptions 1 and 2 are generally unverifiable in practice , yet , they are necessary : there would be little opportunity to learn anything meaningful about a non-stationary policy without them . Mutual observability is crucial , as assuming that different information streams are available to the observer and the agent would make it impossible to accurately describe the decision-making process . Assumption 2 , albeit untestable , appears very reasonable : in the medical setting , for example , a violation would imply malicious intent – i.e . that a clinician purposefully chooses the intervention with a sub-optimal expected outcome . Nonetheless , this does mean that we do not consider exploratory agents that are routinely willing to sacrifice outcomes for knowledge , a constraint we do not consider too restrictive within the medical applications we have in mind . Assumption 3 , on the other hand , is not at all restrictive ; on the contrary , it explicitly specifies a more flexible framework than is usual in imitation or inverse reinforcement learning as the set of policies it describes contains stationary policies . 3 RELATED WORK . Our problem setting is related to , but distinct from , a number of problems considered within related literature . Effectively , we assume that we observe logged data generated by a learning agent that acts according to its evolving belief over effects of its actions , and aim to solve the inverse problem by making inferences over said belief given the data . Below , we discuss our relationship to work studying both the forward and the inverse problem of decision modelling , with main points summarised in Table 1 . The Forward Problem : Inferring Prescriptive Models for Behaviour . The agent , whose ( nonstationary ) policy we aim to understand , actively learns online through repeated interaction with an environment and thus effectively solves an online learning problem ( Hoi et al. , 2018 ) . The most prominent example of such an agent would be a contextual bandit ( Agarwal et al. , 2014 ) , which learns to assign sequentially arriving contexts to ( treatment ) arms . Designing agents that update policies online is thus the inverse of the problem we consider here . Another seemingly related problem within the RL context is learning optimal policies from logged bandit data ( Swaminathan & Joachims , 2015 ) ; this is different from our setting as it is prescriptive rather than descriptive . If the goal was to infer the true τe ( x ) from the ( logged ) observational data D ( instead of the effect perceived by the agent ) , this would constitute a standard static CATE estimation problem , for which many solutions have been proposed in the recent ML literature ( Alaa & van der Schaar , 2018 ; Shalit et al. , 2017 ; Künzel et al. , 2019 ) . Note that within this literature , the treatmentassignment policy ( the so-called propensity score π ( x ) = P ( A = 1|X = x ) ) is usually assumed to be stationary and considered a nuisance parameter that is not of primary interest . Estimating CATE can also be a pretext task to the problem of developing optimal treatment rules ( OTR ) ( Zhang et al. , 2012a ; b ; Zhao et al. , 2012 ) , as g ( x ) = 1 ( τ ( x ) > 0 ) is such an optimal rule ( Zhang et al. , 2012b ) . The Backward Problem : Obtaining a Descriptive Summary of an Agent . When no outcomes are observed ( unlike in the bandit problem ) the task of learning a policy becomes imitation learning ( IL ) , itself a large field that aims to match the policy of a demonstrator ( Bain & Sammut , 1995 ; Ho & Ermon , 2016 ) . Note that , compared to the bandit problem , there is a subtle shift from obtaining a policy that is optimal with respect to some true notion of outcome to one that minimises some divergence from the demonstrator . While IL is often used in the forward problem to find an optimal policy – thereby implicitly assuming that the demonstrator is themselves acting optimally – , it can also , if done interpretably , be used in the backward problem to very effectively reason about the goals and preferences of the agent ( Hüyük et al. , 2021 ) . One way to achieve this is through inverse reinforcement learning ( IRL ) , which aims to recover the reward function that is seemingly maximised by the agent ( Ziebart et al. , 2008 ; Fu et al. , 2018 ; Chan & van der Schaar , 2021 ) . This need not be the true reward function , and can be interpreted as a potentially more compact way to describe a policy , which is also more easily portable given shifts in environment dynamics . Our problem formalisation is conceptually most closely related to the counterfactual inverse reinforcement learning ( CIRL ) work of Bica et al . ( 2021 ) . There the authors similarly aim to explain decisions based on the PO framework , specifically by augmenting a max-margin IRL ( Abbeel & Ng , 2004 ) approach to parameterise the learnt reward as a weighted sum of counterfactual outcomes . However , CIRL involves a pre-processing counterfactual estimation step that focuses on estimating the true treatment effects , and implicitly assumes that these are identical to the ones perceived by the agent ( i.e . it assumes that the agent has perfect knowledge of the environment dynamics generating the potential outcomes ) , marking a significant departure from our ( much weaker ) assumptions . | The objective of the paper is an interpretable descriptive model of online learning from trajectories of the form $(x_t,a_t,y_t)$, where $x_t$ is an i.i.d. context, $a_t$ is the action taken that depends on the context and history $(x,a,y)$ up to time $t-1$, and $y_t$ is the outcome resulting from the application of $a_t$ to $x_t$. The authors' motivating example is liver donation acceptance decisions: a potential donor approaches with an organ they are offering to a particular recipient. The treatment center makes a binary decision to accept or reject the donation based on features of the donor and the recipient. The outcome is the survival time of the patient. The structure of the authors' model is based on three components: 1. A memory summarization network that maps from the history up to time $t-1$ to the parameters of a multivariate normal distribution over memory vectors. The specific structure is that a new memory vector is produced from the previous memory vector and the observation from the previous time step. 2. An outcome estimation network. This network takes the memory vector as input and produces weights for each action. A dot product of these weights plus the (exogenous) action features yields the agent's estimate of the outcome of each action. 3. The treatment rule is just a logistic function applied to the predicted outcomes. The model is trained using stochastic variation inference with the ELBO using an LSTM. Empirically, the authors find that their approach outperforms action prediction baselines such as behavioral cloning, reward-regularised classification for apprenticeship learning and counterfactual inverse reinforcement learning. Additionally, they use their model to analyze shifts in the transplant policy over time, e.g., the declining importance of MELD score and how offers that are rejected make it less likely than a subsequent offer will be rejected. | SP:23dfd3ea4da81bb9a01122055677f4c81576861d |
Inverse Online Learning: Understanding Non-Stationary and Reactionary Policies | 1 INTRODUCTION . Decision modelling is often viewed through the lens of policy learning ( Bain & Sammut , 1995 ; Abbeel & Ng , 2004 ) , where the aim is to learn some imitation policy that captures the actions ( and thus decisions ) of an agent in some structured way ( Hüyük et al. , 2021 ) . Unfortunately , this usually implicitly relies on the assumption that the actions taken are already optimal with respect to some objective , and hence do not change over time . While this might be appropriate to approximate the stationary policy of an autonomous agent , such assumptions often break down when applying them to more flexible agents that might be learning on-the-fly . In particular , we may want to model the decision making process of a human decision-maker , whose actions we may see executed over time - this is clearly of great use in a range of fields including economics and medicine ( Hunink et al. , 2014 ; Zavadskas & Turskis , 2011 ) . In the context of machine learning , they would be considered to be undergoing a process of online learning ( Hoi et al. , 2018 ) ; training while interacting with the environment , where it is to be expected that beliefs and strategies are constantly adapted based on accumulating experience ( Elio & Pelletier , 1997 ) . Additionally , such belief updates are often imperfect ; for example , people are known to a priori over-weight the potential impact of rare events when they first start a task , before proceeding to neglect them when they do not occur in their experience ( Hertwig & Erev , 2009 ) . If our goal is to analyse human decision-making , it is thus important to be able to model non-stationary policies that are potentially imperfect in two senses : both marginally at each time-step , and in the way that they become adapted to new information . In this work , instead of relying on the assumption that an agent follows a stationary optimal policy , we consider their actions to be consistent within an online leaning framework where they learn from an incoming sequence of examples ( Hoi et al. , 2018 ) and update their policies accordingly , as in Figure 1 . Thus , instead of assuming that actions are globally optimal , we assume that at any exact time the agent thought that the action was better than the alternatives . As a natural consequence , we frame the problem of decision modelling as that of inverse online learning ; that is , we aim to uncover the process through which an agent is learning online . Note that this does not involve coming up with a new way to do online learning itself , rather we recover how it appears a given agent may have learnt . We do this by modelling the ( non-stationary ) policy of the agent using a deep state-space model ( Krishnan et al. , 2017 ) , allowing us to track the memory of the agent while allowing policies to evolve in a non-parametric and non-prescribed fashion . We construct an interpretable mapping from the accrued memory to policies by framing the decision-making process within a potential-outcome setting ( Rubin , 2005 ) ; letting actions correspond to interventions ( or treatments ) , and assuming that agents make decisions by choosing an action which they perceive to have the highest ( treatment ) effect . Contributions . In this work we make a number of contributions : First , we formalise the inverse online learning problem and a connection between decision modelling , online learning and potential outcomes , highlighting how they complement each other to result in an interpretable understanding of policies ( Section 2 ) ; Second , we introduce a practical method to estimate the non-stationary policy and update method of an agent given demonstrations ( Section 4 ) ; And third , we demonstrate how we can uncover useful practical insights into the decision making process of agents with a case study on the acceptance of liver donation offers ( Section 5 ) . 2 PROBLEM FORMALISATION . Preliminaries . Assume we observe a data trajectory1 of the form D = { ( Xt , At , Yt ) } Tt=1 . Here , Xt ∈ X ⊂ Rd , denotes a context vector of possible confounders ; At ∈ A = { 0 , 1 } , a binary action or intervention ; and Yt ∈ Y , a binary or continuous outcome of interest . The subscript t indicates a time-ordering of observed triplets ; any time-step t is generated by ( i ) arrival of context x , ( ii ) an intervention a being performed by an agent according to some policy πt ( x ) and ( iii ) a corresponding outcome y being observed . Goal . We are interested in recovering the agent ’ s non-stationary policy πt ( x ) = P ( A = 1|X = x , Ht = ht ) , which depends on the observed context x and can change over time due to the observed history Ht = { ( Xk , Ak , Yk ) } t−1k=1 . We make the key assumption that the agent acts with the intention to choose an intervention a leading to the best ( largest ) potential outcome Y ( a ) , but that the perception of the optimal intervention may change over time throughout the agent ’ s learning process about their environment . This problem formalisation naturally places us at the in- tersection of treatment effect inference within the Neyman-Rubin potential outcomes ( PO ) framework ( Rubin , 2005 ) with the classical ( inverse ) reinforcement learning ( RL ) paradigm ( Abbeel & Ng , 2004 ) . More specifically though the RL-subproblem of logged contextual bandits ( Swaminathan & Joachims , 2015 ; Atan et al. , 2018 ) , where the setting is offline and the contexts arrive independently . Perception Versus Reality . As is standard within the PO framework , we assume that any observation has two potential outcomes Y ( a ) , associated with each intervention ( treatment-level ) , which are 1We assume with a single trajectory here , though learning and inference can be applied over a dataset of multiple trajectories generated from some true distribution inherent to the environment , i.e . Y ( 0 ) , Y ( 1 ) ∼ Pe ( ·|X = x ) , yet only the potential outcome associated with the chosen treatment is revealed to the agent . If the agent had full knowledge of the environment , its optimal policy would be to choose an action as arg maxa µea ( x ) where µ e a ( x ) = EPe [ Y ( a ) |X = x ] , or conversely to choose to perform the intervention only when its expected conditional average treatment effect ( CATE ) τe ( x ) = µe1 ( x ) − µe0 ( x ) is positive . In general , we assume that such perfect knowledge of the environment is not available to the agent in many scenarios of practical interest . Instead , we assume that at any time t , the agent acts according to some perceived model P̃ of its environment , which induces the perceived expected potential outcomes µ̃a ( x ; t ) and associated treatment effect τ̃ ( x ; t ) . Here , µ̃a ( x ; t ) = EP̃ [ Y ( a ) |X = x , Ht = ht ] , is a function not only of the observed context but also the history , such that the agent can update its beliefs according to observed outcomes . Note that we allow the agent ’ s model of the environment to be misspecified ; in this case µ̃a ( x ; t ) would not converge to µea ( x ) even for very long trajectories . We consider this an important feature , as we assume that human decision-makers generally need to make simplifications ( Griffiths et al. , 2015 ) . Formally , we make the following assumption about the agent ’ s decision making process : Assumption 1 Mutual Observability : The observable space X contains only and all the information available to the agent at the point of assigning an action . Assumption 2 Perceived Optimality : An agent assigns the action they think will maximise the outcome . For a deterministic policy πt , the agent believes πt ( x ) = 1 ⇐⇒ µ̃1 ( x ; t ) > µ̃0 ( x ; t ) . Given a stochastic policy , πt ( x ) is a monotonic increasing function of the agent ’ s belief over the treatment effect τ̃ ( x ; t ) . Assumption 3 Continual Adaptation : The agent may continually adjust their strategy based on experience . The index in the dataset D represents a temporal ordering which π is non-stationary with respect to , i.e . πi ( x ) may not equal πj ( x ) , i 6= j ≥ 1 where πi represents the policy at time step i. Assumptions 1 and 2 are generally unverifiable in practice , yet , they are necessary : there would be little opportunity to learn anything meaningful about a non-stationary policy without them . Mutual observability is crucial , as assuming that different information streams are available to the observer and the agent would make it impossible to accurately describe the decision-making process . Assumption 2 , albeit untestable , appears very reasonable : in the medical setting , for example , a violation would imply malicious intent – i.e . that a clinician purposefully chooses the intervention with a sub-optimal expected outcome . Nonetheless , this does mean that we do not consider exploratory agents that are routinely willing to sacrifice outcomes for knowledge , a constraint we do not consider too restrictive within the medical applications we have in mind . Assumption 3 , on the other hand , is not at all restrictive ; on the contrary , it explicitly specifies a more flexible framework than is usual in imitation or inverse reinforcement learning as the set of policies it describes contains stationary policies . 3 RELATED WORK . Our problem setting is related to , but distinct from , a number of problems considered within related literature . Effectively , we assume that we observe logged data generated by a learning agent that acts according to its evolving belief over effects of its actions , and aim to solve the inverse problem by making inferences over said belief given the data . Below , we discuss our relationship to work studying both the forward and the inverse problem of decision modelling , with main points summarised in Table 1 . The Forward Problem : Inferring Prescriptive Models for Behaviour . The agent , whose ( nonstationary ) policy we aim to understand , actively learns online through repeated interaction with an environment and thus effectively solves an online learning problem ( Hoi et al. , 2018 ) . The most prominent example of such an agent would be a contextual bandit ( Agarwal et al. , 2014 ) , which learns to assign sequentially arriving contexts to ( treatment ) arms . Designing agents that update policies online is thus the inverse of the problem we consider here . Another seemingly related problem within the RL context is learning optimal policies from logged bandit data ( Swaminathan & Joachims , 2015 ) ; this is different from our setting as it is prescriptive rather than descriptive . If the goal was to infer the true τe ( x ) from the ( logged ) observational data D ( instead of the effect perceived by the agent ) , this would constitute a standard static CATE estimation problem , for which many solutions have been proposed in the recent ML literature ( Alaa & van der Schaar , 2018 ; Shalit et al. , 2017 ; Künzel et al. , 2019 ) . Note that within this literature , the treatmentassignment policy ( the so-called propensity score π ( x ) = P ( A = 1|X = x ) ) is usually assumed to be stationary and considered a nuisance parameter that is not of primary interest . Estimating CATE can also be a pretext task to the problem of developing optimal treatment rules ( OTR ) ( Zhang et al. , 2012a ; b ; Zhao et al. , 2012 ) , as g ( x ) = 1 ( τ ( x ) > 0 ) is such an optimal rule ( Zhang et al. , 2012b ) . The Backward Problem : Obtaining a Descriptive Summary of an Agent . When no outcomes are observed ( unlike in the bandit problem ) the task of learning a policy becomes imitation learning ( IL ) , itself a large field that aims to match the policy of a demonstrator ( Bain & Sammut , 1995 ; Ho & Ermon , 2016 ) . Note that , compared to the bandit problem , there is a subtle shift from obtaining a policy that is optimal with respect to some true notion of outcome to one that minimises some divergence from the demonstrator . While IL is often used in the forward problem to find an optimal policy – thereby implicitly assuming that the demonstrator is themselves acting optimally – , it can also , if done interpretably , be used in the backward problem to very effectively reason about the goals and preferences of the agent ( Hüyük et al. , 2021 ) . One way to achieve this is through inverse reinforcement learning ( IRL ) , which aims to recover the reward function that is seemingly maximised by the agent ( Ziebart et al. , 2008 ; Fu et al. , 2018 ; Chan & van der Schaar , 2021 ) . This need not be the true reward function , and can be interpreted as a potentially more compact way to describe a policy , which is also more easily portable given shifts in environment dynamics . Our problem formalisation is conceptually most closely related to the counterfactual inverse reinforcement learning ( CIRL ) work of Bica et al . ( 2021 ) . There the authors similarly aim to explain decisions based on the PO framework , specifically by augmenting a max-margin IRL ( Abbeel & Ng , 2004 ) approach to parameterise the learnt reward as a weighted sum of counterfactual outcomes . However , CIRL involves a pre-processing counterfactual estimation step that focuses on estimating the true treatment effects , and implicitly assumes that these are identical to the ones perceived by the agent ( i.e . it assumes that the agent has perfect knowledge of the environment dynamics generating the potential outcomes ) , marking a significant departure from our ( much weaker ) assumptions . | The paper motivates an "inverse online learning" framework to learn non-stationary policy online. The generative assumption is a deep state-space model and it is assumed that the agent acts optimally according to the current belief in potential outcomes and updates its model based on the true outcomes observed. The critical assumption seems to be that of non-stationarity over the policy function as it responds/interacts with the environment based on updated estimates of its belief over the response function. The parameters of the deep state space model are estimated using the ELBO over the log likelihood of the observed trajectories. Synthetic and real-world validation demonstrates some benefit in terms of "identifying the optimal treatment" based on the true model when acting based off the estimates. | SP:23dfd3ea4da81bb9a01122055677f4c81576861d |
Inverse Online Learning: Understanding Non-Stationary and Reactionary Policies | 1 INTRODUCTION . Decision modelling is often viewed through the lens of policy learning ( Bain & Sammut , 1995 ; Abbeel & Ng , 2004 ) , where the aim is to learn some imitation policy that captures the actions ( and thus decisions ) of an agent in some structured way ( Hüyük et al. , 2021 ) . Unfortunately , this usually implicitly relies on the assumption that the actions taken are already optimal with respect to some objective , and hence do not change over time . While this might be appropriate to approximate the stationary policy of an autonomous agent , such assumptions often break down when applying them to more flexible agents that might be learning on-the-fly . In particular , we may want to model the decision making process of a human decision-maker , whose actions we may see executed over time - this is clearly of great use in a range of fields including economics and medicine ( Hunink et al. , 2014 ; Zavadskas & Turskis , 2011 ) . In the context of machine learning , they would be considered to be undergoing a process of online learning ( Hoi et al. , 2018 ) ; training while interacting with the environment , where it is to be expected that beliefs and strategies are constantly adapted based on accumulating experience ( Elio & Pelletier , 1997 ) . Additionally , such belief updates are often imperfect ; for example , people are known to a priori over-weight the potential impact of rare events when they first start a task , before proceeding to neglect them when they do not occur in their experience ( Hertwig & Erev , 2009 ) . If our goal is to analyse human decision-making , it is thus important to be able to model non-stationary policies that are potentially imperfect in two senses : both marginally at each time-step , and in the way that they become adapted to new information . In this work , instead of relying on the assumption that an agent follows a stationary optimal policy , we consider their actions to be consistent within an online leaning framework where they learn from an incoming sequence of examples ( Hoi et al. , 2018 ) and update their policies accordingly , as in Figure 1 . Thus , instead of assuming that actions are globally optimal , we assume that at any exact time the agent thought that the action was better than the alternatives . As a natural consequence , we frame the problem of decision modelling as that of inverse online learning ; that is , we aim to uncover the process through which an agent is learning online . Note that this does not involve coming up with a new way to do online learning itself , rather we recover how it appears a given agent may have learnt . We do this by modelling the ( non-stationary ) policy of the agent using a deep state-space model ( Krishnan et al. , 2017 ) , allowing us to track the memory of the agent while allowing policies to evolve in a non-parametric and non-prescribed fashion . We construct an interpretable mapping from the accrued memory to policies by framing the decision-making process within a potential-outcome setting ( Rubin , 2005 ) ; letting actions correspond to interventions ( or treatments ) , and assuming that agents make decisions by choosing an action which they perceive to have the highest ( treatment ) effect . Contributions . In this work we make a number of contributions : First , we formalise the inverse online learning problem and a connection between decision modelling , online learning and potential outcomes , highlighting how they complement each other to result in an interpretable understanding of policies ( Section 2 ) ; Second , we introduce a practical method to estimate the non-stationary policy and update method of an agent given demonstrations ( Section 4 ) ; And third , we demonstrate how we can uncover useful practical insights into the decision making process of agents with a case study on the acceptance of liver donation offers ( Section 5 ) . 2 PROBLEM FORMALISATION . Preliminaries . Assume we observe a data trajectory1 of the form D = { ( Xt , At , Yt ) } Tt=1 . Here , Xt ∈ X ⊂ Rd , denotes a context vector of possible confounders ; At ∈ A = { 0 , 1 } , a binary action or intervention ; and Yt ∈ Y , a binary or continuous outcome of interest . The subscript t indicates a time-ordering of observed triplets ; any time-step t is generated by ( i ) arrival of context x , ( ii ) an intervention a being performed by an agent according to some policy πt ( x ) and ( iii ) a corresponding outcome y being observed . Goal . We are interested in recovering the agent ’ s non-stationary policy πt ( x ) = P ( A = 1|X = x , Ht = ht ) , which depends on the observed context x and can change over time due to the observed history Ht = { ( Xk , Ak , Yk ) } t−1k=1 . We make the key assumption that the agent acts with the intention to choose an intervention a leading to the best ( largest ) potential outcome Y ( a ) , but that the perception of the optimal intervention may change over time throughout the agent ’ s learning process about their environment . This problem formalisation naturally places us at the in- tersection of treatment effect inference within the Neyman-Rubin potential outcomes ( PO ) framework ( Rubin , 2005 ) with the classical ( inverse ) reinforcement learning ( RL ) paradigm ( Abbeel & Ng , 2004 ) . More specifically though the RL-subproblem of logged contextual bandits ( Swaminathan & Joachims , 2015 ; Atan et al. , 2018 ) , where the setting is offline and the contexts arrive independently . Perception Versus Reality . As is standard within the PO framework , we assume that any observation has two potential outcomes Y ( a ) , associated with each intervention ( treatment-level ) , which are 1We assume with a single trajectory here , though learning and inference can be applied over a dataset of multiple trajectories generated from some true distribution inherent to the environment , i.e . Y ( 0 ) , Y ( 1 ) ∼ Pe ( ·|X = x ) , yet only the potential outcome associated with the chosen treatment is revealed to the agent . If the agent had full knowledge of the environment , its optimal policy would be to choose an action as arg maxa µea ( x ) where µ e a ( x ) = EPe [ Y ( a ) |X = x ] , or conversely to choose to perform the intervention only when its expected conditional average treatment effect ( CATE ) τe ( x ) = µe1 ( x ) − µe0 ( x ) is positive . In general , we assume that such perfect knowledge of the environment is not available to the agent in many scenarios of practical interest . Instead , we assume that at any time t , the agent acts according to some perceived model P̃ of its environment , which induces the perceived expected potential outcomes µ̃a ( x ; t ) and associated treatment effect τ̃ ( x ; t ) . Here , µ̃a ( x ; t ) = EP̃ [ Y ( a ) |X = x , Ht = ht ] , is a function not only of the observed context but also the history , such that the agent can update its beliefs according to observed outcomes . Note that we allow the agent ’ s model of the environment to be misspecified ; in this case µ̃a ( x ; t ) would not converge to µea ( x ) even for very long trajectories . We consider this an important feature , as we assume that human decision-makers generally need to make simplifications ( Griffiths et al. , 2015 ) . Formally , we make the following assumption about the agent ’ s decision making process : Assumption 1 Mutual Observability : The observable space X contains only and all the information available to the agent at the point of assigning an action . Assumption 2 Perceived Optimality : An agent assigns the action they think will maximise the outcome . For a deterministic policy πt , the agent believes πt ( x ) = 1 ⇐⇒ µ̃1 ( x ; t ) > µ̃0 ( x ; t ) . Given a stochastic policy , πt ( x ) is a monotonic increasing function of the agent ’ s belief over the treatment effect τ̃ ( x ; t ) . Assumption 3 Continual Adaptation : The agent may continually adjust their strategy based on experience . The index in the dataset D represents a temporal ordering which π is non-stationary with respect to , i.e . πi ( x ) may not equal πj ( x ) , i 6= j ≥ 1 where πi represents the policy at time step i. Assumptions 1 and 2 are generally unverifiable in practice , yet , they are necessary : there would be little opportunity to learn anything meaningful about a non-stationary policy without them . Mutual observability is crucial , as assuming that different information streams are available to the observer and the agent would make it impossible to accurately describe the decision-making process . Assumption 2 , albeit untestable , appears very reasonable : in the medical setting , for example , a violation would imply malicious intent – i.e . that a clinician purposefully chooses the intervention with a sub-optimal expected outcome . Nonetheless , this does mean that we do not consider exploratory agents that are routinely willing to sacrifice outcomes for knowledge , a constraint we do not consider too restrictive within the medical applications we have in mind . Assumption 3 , on the other hand , is not at all restrictive ; on the contrary , it explicitly specifies a more flexible framework than is usual in imitation or inverse reinforcement learning as the set of policies it describes contains stationary policies . 3 RELATED WORK . Our problem setting is related to , but distinct from , a number of problems considered within related literature . Effectively , we assume that we observe logged data generated by a learning agent that acts according to its evolving belief over effects of its actions , and aim to solve the inverse problem by making inferences over said belief given the data . Below , we discuss our relationship to work studying both the forward and the inverse problem of decision modelling , with main points summarised in Table 1 . The Forward Problem : Inferring Prescriptive Models for Behaviour . The agent , whose ( nonstationary ) policy we aim to understand , actively learns online through repeated interaction with an environment and thus effectively solves an online learning problem ( Hoi et al. , 2018 ) . The most prominent example of such an agent would be a contextual bandit ( Agarwal et al. , 2014 ) , which learns to assign sequentially arriving contexts to ( treatment ) arms . Designing agents that update policies online is thus the inverse of the problem we consider here . Another seemingly related problem within the RL context is learning optimal policies from logged bandit data ( Swaminathan & Joachims , 2015 ) ; this is different from our setting as it is prescriptive rather than descriptive . If the goal was to infer the true τe ( x ) from the ( logged ) observational data D ( instead of the effect perceived by the agent ) , this would constitute a standard static CATE estimation problem , for which many solutions have been proposed in the recent ML literature ( Alaa & van der Schaar , 2018 ; Shalit et al. , 2017 ; Künzel et al. , 2019 ) . Note that within this literature , the treatmentassignment policy ( the so-called propensity score π ( x ) = P ( A = 1|X = x ) ) is usually assumed to be stationary and considered a nuisance parameter that is not of primary interest . Estimating CATE can also be a pretext task to the problem of developing optimal treatment rules ( OTR ) ( Zhang et al. , 2012a ; b ; Zhao et al. , 2012 ) , as g ( x ) = 1 ( τ ( x ) > 0 ) is such an optimal rule ( Zhang et al. , 2012b ) . The Backward Problem : Obtaining a Descriptive Summary of an Agent . When no outcomes are observed ( unlike in the bandit problem ) the task of learning a policy becomes imitation learning ( IL ) , itself a large field that aims to match the policy of a demonstrator ( Bain & Sammut , 1995 ; Ho & Ermon , 2016 ) . Note that , compared to the bandit problem , there is a subtle shift from obtaining a policy that is optimal with respect to some true notion of outcome to one that minimises some divergence from the demonstrator . While IL is often used in the forward problem to find an optimal policy – thereby implicitly assuming that the demonstrator is themselves acting optimally – , it can also , if done interpretably , be used in the backward problem to very effectively reason about the goals and preferences of the agent ( Hüyük et al. , 2021 ) . One way to achieve this is through inverse reinforcement learning ( IRL ) , which aims to recover the reward function that is seemingly maximised by the agent ( Ziebart et al. , 2008 ; Fu et al. , 2018 ; Chan & van der Schaar , 2021 ) . This need not be the true reward function , and can be interpreted as a potentially more compact way to describe a policy , which is also more easily portable given shifts in environment dynamics . Our problem formalisation is conceptually most closely related to the counterfactual inverse reinforcement learning ( CIRL ) work of Bica et al . ( 2021 ) . There the authors similarly aim to explain decisions based on the PO framework , specifically by augmenting a max-margin IRL ( Abbeel & Ng , 2004 ) approach to parameterise the learnt reward as a weighted sum of counterfactual outcomes . However , CIRL involves a pre-processing counterfactual estimation step that focuses on estimating the true treatment effects , and implicitly assumes that these are identical to the ones perceived by the agent ( i.e . it assumes that the agent has perfect knowledge of the environment dynamics generating the potential outcomes ) , marking a significant departure from our ( much weaker ) assumptions . | This paper proposes an approach for understanding the decision making of a black-box online learning agent from the a dataset of observed trajectories. Given a dataset of trajectories / decisions made by an agent along with initial context and resulting outcome, the paper proposes a method to perform inference over the generative model of the given dataset using variations inference. The results are used to interpret the decision making of an agent that is learning online. The paper demonstrates its usefulness by highlighting insights into factors that may govern decision on a organ donation acceptance decision dataset. | SP:23dfd3ea4da81bb9a01122055677f4c81576861d |
Automatic Concept Extraction for Concept Bottleneck-based Video Classification | 1 INTRODUCTION . Deep neural networks ( DNNs ) provide unparalleled performance when applied to application domains , including video classification and activity recognition . However , the inherent black-box nature of the DNNs inhibits the ability to explain the output decisions of a model . While opaque decision-making may be sufficient for certain tasks , several critical and sensitive applications force model developers to face a dilemma between selecting the best-performing solution or one that is inherently explainable . For example , in the healthcare domain ( Yeung et al . ( 2019 ) ) , a life-or-death diagnosis compels the use of the best performing model , yet accepting an automated prediction without justification is wholly insufficient . Ideally , one could take advantage of the power of deep learning while still providing a sufficient understanding of why a model is making a particular decision , especially if the situation demands trust in a decision that can have severe impacts . To address the need for model interpretability , researchers have sought to enable model intervention by leveraging concept bottleneck-based explanations . Unlike post hoc explanation methods–where techniques are used to extract an explanation for a given input for an inference by a trained black-box model ( Chakraborty et al . ( 2017 ) ; Jeyakumar et al . ( 2020 ) ) , concept bottleneck models are inherently interpretable and take a human reasoning-inspired approach to explaining a model inference based on an underlying set of concepts that define the decisions within an application . Thus far , prior works have focused on concept-based explanation models for image ( Kumar et al . ( 2009 ) ; Koh et al . ( 2020 ) ) and text classification ( Murty et al . ( 2020 ) ) . However , the concepts are assumed to be given a priori by a domain expert–a process that may not result in a necessary and sufficient set of concepts . For instance , for bird species identification , an expert may provide two redundant concepts that are possibly correlated , such as wing color and beak color . More critically , prior works have considered simple concepts with the same level of abstraction , e.g. , visual elements present in a single image . For more complex tasks such as video activity classification , a label may span multiple frames . Thus , the composing set of concepts will have various levels of abstraction representing relationships of various visual elements spanning multiple frames , e.g. , a bird flapping its wings . Unlike the prior works , we aim to exploit the complex abstractions inherent in natural language explanations to conceptualize such complex events . Research Questions . In summary , this paper seeks to answer the following research questions : • How can a machine automatically elicit the inherent complex concepts from natural language to construct a necessary and sufficient set of concepts for video classification tasks ? • Given that a machine can extract such concepts , are they informative and meaningful enough to be detected in videos by DNNs for downstream prediction tasks ? • Are the machine extracted concepts perceived by humans as good explanations for the correct classifications ? Approach . This paper introduces an automatic concept extraction module for concept bottleneckbased video classification . The bottleneck architecture equips a standard video classification model with an intermediate concept prediction layer that identifies concepts spanning multiple video frames . To compose the concepts that will be predicted by the model , we propose a natural language processing ( NLP ) based automatic Concept Discovery and Extraction module , CODEX , to extract a rich set of concepts from natural language explanations of a video classification . NLP tools are leveraged to elicit inherent complex concept abstractions in natural language . CODEX identifies and groups short textual fragments relating to events , thereby capturing the complex concepts from videos . Thus , we amortize the effort required to define and label the necessary and sufficient set of concepts . Moreover , we employ an attention mechanism to highlight and quantify which concepts are most important for a given decision . To demonstrate the efficacy of our approach , we construct two new datasets–MLB V2E ( Video to Explanations ) for baseball activity classification and MSR-V2E for video category classification– that combine complex video classification datasets with short , crowd-sourced natural language explanations for their corresponding labels . We first compare our model against the existing standard end-to-end deep-learning methods for video classification and show that our architecture provides additional benefits of an inherently interpretable model with a marginal impact on performance ( less than 0.3 % accuracy loss on classification tasks ) . A subsequent user study showed that the extracted concepts were perceived by humans as good explanations for the classification on both the MLB-V2E and MSR-V2E datasets . Contributions . We summarize our contributions as follows . • We propose CoDEx , a concept discovery and extraction module that leverages NLP techniques to automatically extract complex concept abstractions from crowd-sourced , natural language explanations for a given video and label–obviating the need to manually define a necessary and sufficient set of concepts . • We evaluate our approach on complex video classification datasets and show that our model attains high concept accuracies while maintaining competitive task performance with standard end-to-end video classification models . • We also augment the concept-based explanation architecture to include an attention mechanism that highlights the importance of each concept for a given decision . We show that users prefer our concept extraction method over baseline methods to explain a given label . • We construct two new public datasets , MLB-V2E and MSR-V2E , that combine complex video classification datasets with short , crowd-sourced natural language explanations and labels . 2 RELATED WORK . There is a wide array of works in explainable deep learning for various applications . This work focuses on the concepts-based explanations for video classification , and this section provides an overview of the existing literature for overlapping domains . Concept-Based Explanations for Images and Text . A number of existing works consider conceptbottleneck architectures where models are trained to interact with high-level concepts . Generally , the approaches are multi-task architectures , where the model first identifies a human-understandable set of concepts and then reasons about the identified concepts . Until now , the applications have been limited to static image and text applications . Koh et al . ( 2020 ) used pre-labeled concepts provided by the dataset to train a model that predicts the concepts , which is then used to predict the final classification . However , the caveat is that the concepts had to be manually provided . Ghorbani et al . ( 2019 ) and Yeh et al . ( 2020 ) proposed approaches that automatically extract groups of pixels from the input image that represent meaningful concepts for the prediction . They were designed largely for image classification and extract concepts directly from the dataset . Kim et al . ( 2018 ) propose a post-hoc explanation method that returns the importance of user-defined concepts for a classification . In the mentioned works , the concepts have been limited to simple concepts and are not suited for complex tasks such as video classification where we have complex concepts that may span multiple frames with various levels of abstraction . Explanations for Video Classification Other approaches have been considered to explain video classification and activity recognition . Chattopadhay et al . ( 2018 ) applied GradCAM and GradCAM++ to video classification , where for each frame , the important region of the frame to the model is highlighted as a heatmap . Hiley et al . ( 2020 ) extract both spatial and temporal explanations from input videos by highlighting the relevant pixels . However , these are post-hoc techniques that focus on explaining black-box models , whereas our approach enables concept-bottleneck methods for video classification that are intended to be inherently interpretable and intervenable . Video Captioning . In recent years , there is a large number of works ( Pan et al . ( 2017 ) ; Gao et al . ( 2017 ) ; Wang et al . ( 2018 ) ; Yan et al . ( 2019 ) ; Zhou et al . ( 2018 ) ; Chen & Jiang ( 2021 ) ; Yu et al . ( 2017 ) ) on video captioning . While they also employ natural language techniques , these works are tangential to generating text explanations for classifications , since they are merely describing the video . Our model provides an explanation justifying the classification of the video . Similarly , the associated datasets such as MSR-VTT ( Xu et al . ( 2016 ) ) only have videos with ground truth captions that only describe the video without the context of a classification–which often results in concepts that do not pertain to a classification . Semantic Concept Video Classification . The closest works to this paper is the body of work in semantic concept video classification ( Fan et al . ( 2004 ; 2007 ) ) , where the concepts are defined as salient objects that are visually distinguishable video components . The concepts in these works are simple objects detected in the videos and are not complex enough to capture the semantics of events that happen over multiple frames of the videos . These works typically used traditional SVM-based video classifiers . Assari et al . ( 2014 ) represent a video category based on the co-occurrences of the semantic concepts and classify based on the co-occurrences , but their method requires a predefined set of concepts . Thus , we now present the methodology behind our automatic concept extraction for concept bottleneck video classification . 3 CONCEPT DISCOVERY AND BOTTLENECK VIDEO CLASSIFICATION . This work introduces CoDEx , an automatic concept extraction method from natural language explanations for concept-based video classification . Figure 1 depicts the overall concept-bottleneck pipeline , composed of CoDEx and the concept bottleneck model . CoDEx extracts a set of concepts from natural language explanations that will comprise the bottleneck layer for the video classification model . We first formalize the overall problem and then provide the methodology for both modules . Problem Formalization . We assume that we have a training dataset { ( xn , ln ) } Nn=1 = D of videos xn with a label ln ∈ L , where L is a predefined set of possible class labels for the video . Each video is represented as a sequence of frames f ∈ F where F is the set of video frames . Thus video xn = 〈fn0 , fn1 , . . . , fnT 〉 , where fnt represents frame t of video n. For each video xn , we form a label-explanation pair ( ln , en ) , where en is a ( short ) natural language document explaining the given label ln . If multiple annotators contribute to an explanation for video-label pair , ( xn , ln ) , then these are concatenated to form en . The full set of pairs E = { ( ln , en ) } Nn=1 is the explanation corpus . Thus , the design goals are : • Concept Discovery and Extraction ( CODEX ) Module : Given the explanation corpus , first produce an N × K concept matrix , C , where the ( n , k ) th element is 1 if the nth explanation contains discovered concept k and 0 otherwise . We call the nth row cn , the concept vector for video xn . K is the total number of discovered concepts . • Concept Bottleneck Model : Given a concept matrix , C , the second goal is to train a concept bottleneck model such that for a given video xi , we predict a concept vector ci– which indicates the presence or absence of concepts and their importance scores . The model then makes use of ci to make the final video classification . label , ln explanation , en strike The batter did not swing . The ball was in the strike zone . foul The batter hit the ball into the stands and it landed in foul territory . ball The hitter didn ’ t swing . The ball was outside the strike zone . none The video did not load . out the batter hit the ball and it was caught by the fielder label , ln concepts , cn strike { the batter did not swing , the ball was in the strike zone } foul { the batter hit the ball , it landed in foul territory } ball { the batter did not swing , the ball was outside the strike zone } out { the batter hit the ball , it was caught by the fielder } Grouped conceptsCompleted concepts Text Pruned conceptsText Removed text Explanation Corpus Ɛ Extracted Concepts Figure 2 : Running example for all six stages of the discovery pipeline module . The left table is the explanation corpus , with highlighted fragments to be modified . The right table contains the discovered concepts . The detailed step-by-step modifications are provided in Appendix A.1 . | This paper works on the interpretability of video understanding problem. With a set of textual descriptions, the authors propose a pipeline called CoDex to extract the key concepts for explaining the classification, in contrast to previous methods which use the predefined classes. The CoDex method contains clearning, extraction, completion, grouping, pruning and vectorization phases to obtain the final concept matrix. The trained final concept bottleneck model can obtain interpretable explanations aligned with human servey, while retaining the performance | SP:62debaebbfe5ae57aadaccb2b15ffee4c0b4b2e3 |
Automatic Concept Extraction for Concept Bottleneck-based Video Classification | 1 INTRODUCTION . Deep neural networks ( DNNs ) provide unparalleled performance when applied to application domains , including video classification and activity recognition . However , the inherent black-box nature of the DNNs inhibits the ability to explain the output decisions of a model . While opaque decision-making may be sufficient for certain tasks , several critical and sensitive applications force model developers to face a dilemma between selecting the best-performing solution or one that is inherently explainable . For example , in the healthcare domain ( Yeung et al . ( 2019 ) ) , a life-or-death diagnosis compels the use of the best performing model , yet accepting an automated prediction without justification is wholly insufficient . Ideally , one could take advantage of the power of deep learning while still providing a sufficient understanding of why a model is making a particular decision , especially if the situation demands trust in a decision that can have severe impacts . To address the need for model interpretability , researchers have sought to enable model intervention by leveraging concept bottleneck-based explanations . Unlike post hoc explanation methods–where techniques are used to extract an explanation for a given input for an inference by a trained black-box model ( Chakraborty et al . ( 2017 ) ; Jeyakumar et al . ( 2020 ) ) , concept bottleneck models are inherently interpretable and take a human reasoning-inspired approach to explaining a model inference based on an underlying set of concepts that define the decisions within an application . Thus far , prior works have focused on concept-based explanation models for image ( Kumar et al . ( 2009 ) ; Koh et al . ( 2020 ) ) and text classification ( Murty et al . ( 2020 ) ) . However , the concepts are assumed to be given a priori by a domain expert–a process that may not result in a necessary and sufficient set of concepts . For instance , for bird species identification , an expert may provide two redundant concepts that are possibly correlated , such as wing color and beak color . More critically , prior works have considered simple concepts with the same level of abstraction , e.g. , visual elements present in a single image . For more complex tasks such as video activity classification , a label may span multiple frames . Thus , the composing set of concepts will have various levels of abstraction representing relationships of various visual elements spanning multiple frames , e.g. , a bird flapping its wings . Unlike the prior works , we aim to exploit the complex abstractions inherent in natural language explanations to conceptualize such complex events . Research Questions . In summary , this paper seeks to answer the following research questions : • How can a machine automatically elicit the inherent complex concepts from natural language to construct a necessary and sufficient set of concepts for video classification tasks ? • Given that a machine can extract such concepts , are they informative and meaningful enough to be detected in videos by DNNs for downstream prediction tasks ? • Are the machine extracted concepts perceived by humans as good explanations for the correct classifications ? Approach . This paper introduces an automatic concept extraction module for concept bottleneckbased video classification . The bottleneck architecture equips a standard video classification model with an intermediate concept prediction layer that identifies concepts spanning multiple video frames . To compose the concepts that will be predicted by the model , we propose a natural language processing ( NLP ) based automatic Concept Discovery and Extraction module , CODEX , to extract a rich set of concepts from natural language explanations of a video classification . NLP tools are leveraged to elicit inherent complex concept abstractions in natural language . CODEX identifies and groups short textual fragments relating to events , thereby capturing the complex concepts from videos . Thus , we amortize the effort required to define and label the necessary and sufficient set of concepts . Moreover , we employ an attention mechanism to highlight and quantify which concepts are most important for a given decision . To demonstrate the efficacy of our approach , we construct two new datasets–MLB V2E ( Video to Explanations ) for baseball activity classification and MSR-V2E for video category classification– that combine complex video classification datasets with short , crowd-sourced natural language explanations for their corresponding labels . We first compare our model against the existing standard end-to-end deep-learning methods for video classification and show that our architecture provides additional benefits of an inherently interpretable model with a marginal impact on performance ( less than 0.3 % accuracy loss on classification tasks ) . A subsequent user study showed that the extracted concepts were perceived by humans as good explanations for the classification on both the MLB-V2E and MSR-V2E datasets . Contributions . We summarize our contributions as follows . • We propose CoDEx , a concept discovery and extraction module that leverages NLP techniques to automatically extract complex concept abstractions from crowd-sourced , natural language explanations for a given video and label–obviating the need to manually define a necessary and sufficient set of concepts . • We evaluate our approach on complex video classification datasets and show that our model attains high concept accuracies while maintaining competitive task performance with standard end-to-end video classification models . • We also augment the concept-based explanation architecture to include an attention mechanism that highlights the importance of each concept for a given decision . We show that users prefer our concept extraction method over baseline methods to explain a given label . • We construct two new public datasets , MLB-V2E and MSR-V2E , that combine complex video classification datasets with short , crowd-sourced natural language explanations and labels . 2 RELATED WORK . There is a wide array of works in explainable deep learning for various applications . This work focuses on the concepts-based explanations for video classification , and this section provides an overview of the existing literature for overlapping domains . Concept-Based Explanations for Images and Text . A number of existing works consider conceptbottleneck architectures where models are trained to interact with high-level concepts . Generally , the approaches are multi-task architectures , where the model first identifies a human-understandable set of concepts and then reasons about the identified concepts . Until now , the applications have been limited to static image and text applications . Koh et al . ( 2020 ) used pre-labeled concepts provided by the dataset to train a model that predicts the concepts , which is then used to predict the final classification . However , the caveat is that the concepts had to be manually provided . Ghorbani et al . ( 2019 ) and Yeh et al . ( 2020 ) proposed approaches that automatically extract groups of pixels from the input image that represent meaningful concepts for the prediction . They were designed largely for image classification and extract concepts directly from the dataset . Kim et al . ( 2018 ) propose a post-hoc explanation method that returns the importance of user-defined concepts for a classification . In the mentioned works , the concepts have been limited to simple concepts and are not suited for complex tasks such as video classification where we have complex concepts that may span multiple frames with various levels of abstraction . Explanations for Video Classification Other approaches have been considered to explain video classification and activity recognition . Chattopadhay et al . ( 2018 ) applied GradCAM and GradCAM++ to video classification , where for each frame , the important region of the frame to the model is highlighted as a heatmap . Hiley et al . ( 2020 ) extract both spatial and temporal explanations from input videos by highlighting the relevant pixels . However , these are post-hoc techniques that focus on explaining black-box models , whereas our approach enables concept-bottleneck methods for video classification that are intended to be inherently interpretable and intervenable . Video Captioning . In recent years , there is a large number of works ( Pan et al . ( 2017 ) ; Gao et al . ( 2017 ) ; Wang et al . ( 2018 ) ; Yan et al . ( 2019 ) ; Zhou et al . ( 2018 ) ; Chen & Jiang ( 2021 ) ; Yu et al . ( 2017 ) ) on video captioning . While they also employ natural language techniques , these works are tangential to generating text explanations for classifications , since they are merely describing the video . Our model provides an explanation justifying the classification of the video . Similarly , the associated datasets such as MSR-VTT ( Xu et al . ( 2016 ) ) only have videos with ground truth captions that only describe the video without the context of a classification–which often results in concepts that do not pertain to a classification . Semantic Concept Video Classification . The closest works to this paper is the body of work in semantic concept video classification ( Fan et al . ( 2004 ; 2007 ) ) , where the concepts are defined as salient objects that are visually distinguishable video components . The concepts in these works are simple objects detected in the videos and are not complex enough to capture the semantics of events that happen over multiple frames of the videos . These works typically used traditional SVM-based video classifiers . Assari et al . ( 2014 ) represent a video category based on the co-occurrences of the semantic concepts and classify based on the co-occurrences , but their method requires a predefined set of concepts . Thus , we now present the methodology behind our automatic concept extraction for concept bottleneck video classification . 3 CONCEPT DISCOVERY AND BOTTLENECK VIDEO CLASSIFICATION . This work introduces CoDEx , an automatic concept extraction method from natural language explanations for concept-based video classification . Figure 1 depicts the overall concept-bottleneck pipeline , composed of CoDEx and the concept bottleneck model . CoDEx extracts a set of concepts from natural language explanations that will comprise the bottleneck layer for the video classification model . We first formalize the overall problem and then provide the methodology for both modules . Problem Formalization . We assume that we have a training dataset { ( xn , ln ) } Nn=1 = D of videos xn with a label ln ∈ L , where L is a predefined set of possible class labels for the video . Each video is represented as a sequence of frames f ∈ F where F is the set of video frames . Thus video xn = 〈fn0 , fn1 , . . . , fnT 〉 , where fnt represents frame t of video n. For each video xn , we form a label-explanation pair ( ln , en ) , where en is a ( short ) natural language document explaining the given label ln . If multiple annotators contribute to an explanation for video-label pair , ( xn , ln ) , then these are concatenated to form en . The full set of pairs E = { ( ln , en ) } Nn=1 is the explanation corpus . Thus , the design goals are : • Concept Discovery and Extraction ( CODEX ) Module : Given the explanation corpus , first produce an N × K concept matrix , C , where the ( n , k ) th element is 1 if the nth explanation contains discovered concept k and 0 otherwise . We call the nth row cn , the concept vector for video xn . K is the total number of discovered concepts . • Concept Bottleneck Model : Given a concept matrix , C , the second goal is to train a concept bottleneck model such that for a given video xi , we predict a concept vector ci– which indicates the presence or absence of concepts and their importance scores . The model then makes use of ci to make the final video classification . label , ln explanation , en strike The batter did not swing . The ball was in the strike zone . foul The batter hit the ball into the stands and it landed in foul territory . ball The hitter didn ’ t swing . The ball was outside the strike zone . none The video did not load . out the batter hit the ball and it was caught by the fielder label , ln concepts , cn strike { the batter did not swing , the ball was in the strike zone } foul { the batter hit the ball , it landed in foul territory } ball { the batter did not swing , the ball was outside the strike zone } out { the batter hit the ball , it was caught by the fielder } Grouped conceptsCompleted concepts Text Pruned conceptsText Removed text Explanation Corpus Ɛ Extracted Concepts Figure 2 : Running example for all six stages of the discovery pipeline module . The left table is the explanation corpus , with highlighted fragments to be modified . The right table contains the discovered concepts . The detailed step-by-step modifications are provided in Appendix A.1 . | The authors address the task of concept-based video classification: The resulting model is interpretable, as it first predicts a set of binary "concepts", and these concept-features alone are then used for producing the final classification. The main novelty of this work is to propose a method for automatically generating these concepts from natural language descriptions (hence avoiding the need for expert annotations). The authors produce two new datasets of roughly 2000 videos each to validate their method. They also show that their concept-based model performs as well as a standard video classification model on these datasets (ie interpretability does not come at the cost of predictive accuracy). | SP:62debaebbfe5ae57aadaccb2b15ffee4c0b4b2e3 |
Automatic Concept Extraction for Concept Bottleneck-based Video Classification | 1 INTRODUCTION . Deep neural networks ( DNNs ) provide unparalleled performance when applied to application domains , including video classification and activity recognition . However , the inherent black-box nature of the DNNs inhibits the ability to explain the output decisions of a model . While opaque decision-making may be sufficient for certain tasks , several critical and sensitive applications force model developers to face a dilemma between selecting the best-performing solution or one that is inherently explainable . For example , in the healthcare domain ( Yeung et al . ( 2019 ) ) , a life-or-death diagnosis compels the use of the best performing model , yet accepting an automated prediction without justification is wholly insufficient . Ideally , one could take advantage of the power of deep learning while still providing a sufficient understanding of why a model is making a particular decision , especially if the situation demands trust in a decision that can have severe impacts . To address the need for model interpretability , researchers have sought to enable model intervention by leveraging concept bottleneck-based explanations . Unlike post hoc explanation methods–where techniques are used to extract an explanation for a given input for an inference by a trained black-box model ( Chakraborty et al . ( 2017 ) ; Jeyakumar et al . ( 2020 ) ) , concept bottleneck models are inherently interpretable and take a human reasoning-inspired approach to explaining a model inference based on an underlying set of concepts that define the decisions within an application . Thus far , prior works have focused on concept-based explanation models for image ( Kumar et al . ( 2009 ) ; Koh et al . ( 2020 ) ) and text classification ( Murty et al . ( 2020 ) ) . However , the concepts are assumed to be given a priori by a domain expert–a process that may not result in a necessary and sufficient set of concepts . For instance , for bird species identification , an expert may provide two redundant concepts that are possibly correlated , such as wing color and beak color . More critically , prior works have considered simple concepts with the same level of abstraction , e.g. , visual elements present in a single image . For more complex tasks such as video activity classification , a label may span multiple frames . Thus , the composing set of concepts will have various levels of abstraction representing relationships of various visual elements spanning multiple frames , e.g. , a bird flapping its wings . Unlike the prior works , we aim to exploit the complex abstractions inherent in natural language explanations to conceptualize such complex events . Research Questions . In summary , this paper seeks to answer the following research questions : • How can a machine automatically elicit the inherent complex concepts from natural language to construct a necessary and sufficient set of concepts for video classification tasks ? • Given that a machine can extract such concepts , are they informative and meaningful enough to be detected in videos by DNNs for downstream prediction tasks ? • Are the machine extracted concepts perceived by humans as good explanations for the correct classifications ? Approach . This paper introduces an automatic concept extraction module for concept bottleneckbased video classification . The bottleneck architecture equips a standard video classification model with an intermediate concept prediction layer that identifies concepts spanning multiple video frames . To compose the concepts that will be predicted by the model , we propose a natural language processing ( NLP ) based automatic Concept Discovery and Extraction module , CODEX , to extract a rich set of concepts from natural language explanations of a video classification . NLP tools are leveraged to elicit inherent complex concept abstractions in natural language . CODEX identifies and groups short textual fragments relating to events , thereby capturing the complex concepts from videos . Thus , we amortize the effort required to define and label the necessary and sufficient set of concepts . Moreover , we employ an attention mechanism to highlight and quantify which concepts are most important for a given decision . To demonstrate the efficacy of our approach , we construct two new datasets–MLB V2E ( Video to Explanations ) for baseball activity classification and MSR-V2E for video category classification– that combine complex video classification datasets with short , crowd-sourced natural language explanations for their corresponding labels . We first compare our model against the existing standard end-to-end deep-learning methods for video classification and show that our architecture provides additional benefits of an inherently interpretable model with a marginal impact on performance ( less than 0.3 % accuracy loss on classification tasks ) . A subsequent user study showed that the extracted concepts were perceived by humans as good explanations for the classification on both the MLB-V2E and MSR-V2E datasets . Contributions . We summarize our contributions as follows . • We propose CoDEx , a concept discovery and extraction module that leverages NLP techniques to automatically extract complex concept abstractions from crowd-sourced , natural language explanations for a given video and label–obviating the need to manually define a necessary and sufficient set of concepts . • We evaluate our approach on complex video classification datasets and show that our model attains high concept accuracies while maintaining competitive task performance with standard end-to-end video classification models . • We also augment the concept-based explanation architecture to include an attention mechanism that highlights the importance of each concept for a given decision . We show that users prefer our concept extraction method over baseline methods to explain a given label . • We construct two new public datasets , MLB-V2E and MSR-V2E , that combine complex video classification datasets with short , crowd-sourced natural language explanations and labels . 2 RELATED WORK . There is a wide array of works in explainable deep learning for various applications . This work focuses on the concepts-based explanations for video classification , and this section provides an overview of the existing literature for overlapping domains . Concept-Based Explanations for Images and Text . A number of existing works consider conceptbottleneck architectures where models are trained to interact with high-level concepts . Generally , the approaches are multi-task architectures , where the model first identifies a human-understandable set of concepts and then reasons about the identified concepts . Until now , the applications have been limited to static image and text applications . Koh et al . ( 2020 ) used pre-labeled concepts provided by the dataset to train a model that predicts the concepts , which is then used to predict the final classification . However , the caveat is that the concepts had to be manually provided . Ghorbani et al . ( 2019 ) and Yeh et al . ( 2020 ) proposed approaches that automatically extract groups of pixels from the input image that represent meaningful concepts for the prediction . They were designed largely for image classification and extract concepts directly from the dataset . Kim et al . ( 2018 ) propose a post-hoc explanation method that returns the importance of user-defined concepts for a classification . In the mentioned works , the concepts have been limited to simple concepts and are not suited for complex tasks such as video classification where we have complex concepts that may span multiple frames with various levels of abstraction . Explanations for Video Classification Other approaches have been considered to explain video classification and activity recognition . Chattopadhay et al . ( 2018 ) applied GradCAM and GradCAM++ to video classification , where for each frame , the important region of the frame to the model is highlighted as a heatmap . Hiley et al . ( 2020 ) extract both spatial and temporal explanations from input videos by highlighting the relevant pixels . However , these are post-hoc techniques that focus on explaining black-box models , whereas our approach enables concept-bottleneck methods for video classification that are intended to be inherently interpretable and intervenable . Video Captioning . In recent years , there is a large number of works ( Pan et al . ( 2017 ) ; Gao et al . ( 2017 ) ; Wang et al . ( 2018 ) ; Yan et al . ( 2019 ) ; Zhou et al . ( 2018 ) ; Chen & Jiang ( 2021 ) ; Yu et al . ( 2017 ) ) on video captioning . While they also employ natural language techniques , these works are tangential to generating text explanations for classifications , since they are merely describing the video . Our model provides an explanation justifying the classification of the video . Similarly , the associated datasets such as MSR-VTT ( Xu et al . ( 2016 ) ) only have videos with ground truth captions that only describe the video without the context of a classification–which often results in concepts that do not pertain to a classification . Semantic Concept Video Classification . The closest works to this paper is the body of work in semantic concept video classification ( Fan et al . ( 2004 ; 2007 ) ) , where the concepts are defined as salient objects that are visually distinguishable video components . The concepts in these works are simple objects detected in the videos and are not complex enough to capture the semantics of events that happen over multiple frames of the videos . These works typically used traditional SVM-based video classifiers . Assari et al . ( 2014 ) represent a video category based on the co-occurrences of the semantic concepts and classify based on the co-occurrences , but their method requires a predefined set of concepts . Thus , we now present the methodology behind our automatic concept extraction for concept bottleneck video classification . 3 CONCEPT DISCOVERY AND BOTTLENECK VIDEO CLASSIFICATION . This work introduces CoDEx , an automatic concept extraction method from natural language explanations for concept-based video classification . Figure 1 depicts the overall concept-bottleneck pipeline , composed of CoDEx and the concept bottleneck model . CoDEx extracts a set of concepts from natural language explanations that will comprise the bottleneck layer for the video classification model . We first formalize the overall problem and then provide the methodology for both modules . Problem Formalization . We assume that we have a training dataset { ( xn , ln ) } Nn=1 = D of videos xn with a label ln ∈ L , where L is a predefined set of possible class labels for the video . Each video is represented as a sequence of frames f ∈ F where F is the set of video frames . Thus video xn = 〈fn0 , fn1 , . . . , fnT 〉 , where fnt represents frame t of video n. For each video xn , we form a label-explanation pair ( ln , en ) , where en is a ( short ) natural language document explaining the given label ln . If multiple annotators contribute to an explanation for video-label pair , ( xn , ln ) , then these are concatenated to form en . The full set of pairs E = { ( ln , en ) } Nn=1 is the explanation corpus . Thus , the design goals are : • Concept Discovery and Extraction ( CODEX ) Module : Given the explanation corpus , first produce an N × K concept matrix , C , where the ( n , k ) th element is 1 if the nth explanation contains discovered concept k and 0 otherwise . We call the nth row cn , the concept vector for video xn . K is the total number of discovered concepts . • Concept Bottleneck Model : Given a concept matrix , C , the second goal is to train a concept bottleneck model such that for a given video xi , we predict a concept vector ci– which indicates the presence or absence of concepts and their importance scores . The model then makes use of ci to make the final video classification . label , ln explanation , en strike The batter did not swing . The ball was in the strike zone . foul The batter hit the ball into the stands and it landed in foul territory . ball The hitter didn ’ t swing . The ball was outside the strike zone . none The video did not load . out the batter hit the ball and it was caught by the fielder label , ln concepts , cn strike { the batter did not swing , the ball was in the strike zone } foul { the batter hit the ball , it landed in foul territory } ball { the batter did not swing , the ball was outside the strike zone } out { the batter hit the ball , it was caught by the fielder } Grouped conceptsCompleted concepts Text Pruned conceptsText Removed text Explanation Corpus Ɛ Extracted Concepts Figure 2 : Running example for all six stages of the discovery pipeline module . The left table is the explanation corpus , with highlighted fragments to be modified . The right table contains the discovered concepts . The detailed step-by-step modifications are provided in Appendix A.1 . | This paper presents a method for video classification, which uses textual descriptions of each training video to automatically extract concepts and uses these concepts for classification. For extracting the concepts, the method identifies some phrases in each description. The extracted phrases are grouped based on their semantic similarity and associated labels. Then they are pruned so that only informative phrases are extracted as concepts. For inference, these concepts are identified in a video and based on these identified concepts, an FC layer classifies a video into one of the target classes. The method is evaluated with two datasets MLB-Youtube video activity classification dataset and MSR VTT dataset with extending them with textual descriptions, showing that the concept bottleneck does not impact a lot to the classification performance. The human study demonstrates that identified concepts by their method is better than randomly selected/frequent concepts. | SP:62debaebbfe5ae57aadaccb2b15ffee4c0b4b2e3 |
Seq2Tok: Deep Sequence Tokenizer for Retrieval | 1 INTRODUCTION . Sequence Retrieval aims at retrieving sequences similar to a query sequence , with the constraint that an ordered alignment exists between the query and the target sequence . The examples include speech search , where the order of constituent units , such as phonemes , syllables or words , remains same ; and music search – query by humming or query by example – where the order of constituent units , such as relative notes or phrases , remains same . Apart from audio , the problem also extends to tasks such as handwritten word search and gesture search . One can define similarity metrics over the sequences using Dynamic Time Warping ( DTW ) . But those can be very inefficient if the sequences are continuous valued and have high sampling rates , as in audio . Also , the high variability of query sequences makes the hand-made metrics cumbersome and ineffective . A more effective way of sequence retrieval is by mapping them to discrete tokens . For instance , for linguistic content based speech retrieval , audio is mapped to discrete linguistic tokens , such as phonemes , syllables or words , and search is performed over these tokens . For query-by-humming based music search , audio is mapped to discrete melody-related tokens , such as notes . For query-by-example based music search , audio is mapped to rule-based landmarks in spectrograms [ Wang ( 2003 ) ] . Hence , each problem uses a domain-specific hand-made mapping to tokens defined by a domain expert . In this paper , we propose an audio tokenizer which maps the raw audio feature sequence to a sequence of tokens . The tokenizer is trained from pairs of query and target sequences , without any expert-defined tokens . The proposed algorithm makes use of the fact that relevant landmarks appear in the same order in both the query and the target sequences . This reduces the dimensionality of data and preserves the information relevant for effective retrieval . Existing text search methods , namely , locally sensitive hashing , edit distance , etc. , can then be used to query over these tokens . 2 RELATED WORK . Sequence Labelling . With expert-defined tokens , various methods are popularly used for mapping sequences to tokens . In conventional methods , Hidden Markov Models [ Rabiner & Juang ( 1986 ) ] and Conditional Random Fields [ Lafferty et al . ( 2001 ) ] have been popularly used for sequence labelling . These methods involve a significant amount of domain knowledge and many assumptions to make tractable models , which are avoided by End-to-End learning models such as Recurrent Neural Networks ( RNNs ) using Connectionist Temporal Classification framework [ Graves et al . ( 2006 ) ] . Sequence labeling can be used for sequence retrieval by converting the sequences to tokens , which are easy to search over . But this approach inevitably depends upon expert-defined tokens . Unsupervised Speech Recognition . Modern Representation learning techniques such as Contrastive Predictive Coding ( CPC ) [ van den Oord et al . ( 2018 ) ] and Autoregressive Predictive Coding ( APC ) [ Chung & Glass ( 2020 ) ] are able to generate state-of-the-art continuous representations which encode the slowly varying phoneme features in raw speech . Wav2Vec [ Schneider et al . ( 2019 ) ] generated continuous representations with an encoder pretrained to distinguish future timesteps from a set of distractors sampled from a proposal distribution by optimizing a CPC-based contrastive loss . After pretraining the models , the representations are mapped to phoneme tokens via minimization of the Connectionist Temporal Classification ( CTC ) Loss [ Graves et al . ( 2006 ) ] . With inspiration from VQ-VAE [ van den Oord et al . ( 2017 ) ] which marked the beginning of generation of discrete representations , VQ-Wav2Vec [ Baevski et al . ( 2019 ) ] discretized the representations generated by Wav2Vec [ Schneider et al . ( 2019 ) ] with either a K-Means Vector Quantizer [ Baevski et al . ( 2019 ) ] or a Gumble-Softmax based Vector Quantizer [ Baevski et al . ( 2019 ) ] to generate quantized speech representation used to pretrain a BERT [ Devlin et al . ( 2018 ) ] . Wav2Vec 2.0 [ Baevski et al . ( 2020 ) ] discretized and masked the representations to solve a CPC-based contrastive task over the quantized representations which are learned jointly . VQ-APC [ Chung et al . ( 2020 ) ] discretized the representations to solve APC task over the quantized representations which are learned jointly . Note , the main motivation to discretize raw audio in a latent space for all aforementioned works are to explicitly control information content encoded in the representations rather than achieve sequence tokenization . The codes or tokens generated by the models aren ’ t constrained to be interpretable and hence initialised in large numbers . Performing CTC fine-tuning in essence groups codes in the vector quantizer module of each model together and achieves codebook compression to the number of phonemes or linguistic units . The discretization of representations do result in performance increase on various downstream tasks , with a pretrained Wav2Vec 2.0 [ Baevski et al . ( 2020 ) ] achieving state of the art results on speech recognition by being fine-tuned on only 10 minutes of transcribed audio . SeqRQ-AE [ Liu et al . ( 2019 ) ] is the closest to our work which uses a VQ-VAE [ van den Oord et al . ( 2017 ) ] to estimate representations for each phoneme in speech . The VQ-VAE has a codebook containing the same number of members as the number of phonemes . The codebook is trained via phonetic clustering , temporal segmentation and CTC finetuning on a small amount of transcribed audio . Neural Audio Fingerprinting . Now Playing [ Arcas et al . ( 2017 ) ] and [ Chang et al . ( 2020 ) ] use a Neural Network Fingerprinter ( NNFP ) module outputting representations which are efficient for search in query-by-example tasks where the difference between query and actual song is pretty minute in comparison to humming where only the melody is sung . Now Playing [ Arcas et al . ( 2017 ) ] trains representations by optimizing the Triplet loss [ Schroff et al . ( 2015 ) ] and [ Chang et al . ( 2020 ) ] trains representations by simulating the Maximum Inner Product Search on mini-batches of representations . Cross Domain Alignment . Given a pair of semantically similar inputs for training , tasks such as visual question answering ( text and image ) and machine translation ( text ) involve learning of an alignment . The alignment here is not ordered and the inputs may be from different modalities . Attention models have been used to find alignment between output entities and input regions [ Yao et al . ( 2018 ) ] . [ Chen et al . ( 2020 ) ] use Gromov-Wasserstein distance between output and input entities to match them . However , there is no notion of tokens there , rather the salient entities in the input are represented as vectors in a graph . Graph Matching . Generation of representations for graphs can be done by Graph Neural Networks [ Gori et al . ( 2005 ) ] . Graph matching is used to find similarity of structured graphs [ Li et al . ( 2019 ) ] . However , they perform the matching jointly on the pair of inputs , rather than representing each input independently . This makes them unsuitable for the search problem at hand due to large runtime complexity . The distance metrics used for graph matching are based on edit distance [ Li et al . ( 2019 ) ] and Wasserstein distance [ Chen et al . ( 2020 ) ] . 3 METHODOLOGY . 3.1 PROBLEM STATEMENT . Given a pair of semantically similar feature sequences ( Xi , Xj ) of length Ti and Tj respectively and feature sequence Xk of length Tk with no similarity to either of the feature sequences Xi or Xj , we aim to map sequence Xi to sequence of tokens Ti of length T ′i ≤ Ti , sequence Xj to sequence of tokens Tj of length T ′j ≤ Tj , and sequence Xk to sequence of tokens Tk of length T ′k ≤ Tk where all the tokens belong to a finite alphabet A such that , the edit distance between Ti and Tj is minimum while that between Tk and Ti as well as Tk and Tj is maximum . 3.2 MODEL ARCHITECTURE . Wav2Tok is comprised of an encoder , which , given input x ∈ Rn , outputs a representation z ∈ Rm , and a tokenizer , which , given the encoder output z , outputs a token τ which belongs to a finite K-element alphabet A = { 1 , ... , K } . Given , a temporal sequence X = [ x1 , ... , xT ] of length T where xt is the feature vector at time t. Our model performs frame-wise labelling of X to output a sequence of tokens T = [ τ1 , ... , τT ] where τt ∈ A is the token assigned to input xt . The encoder f : X 7→ Z encodes xt in a hyper-spherical space Z using a BiLSTM network [ Schuster & Paliwal ( 1997 ) ] followed by an L-2 normalization layer . The BiLSTM allows zt to summarise information in both directions , and hence , encode surrounding context . The tokenizer g : Z 7→ T is a K-means vector quantizer which vector quantizes encoder output zt with K quantizers or cluster centroids wtokk ∈ Z ; k = 1 , ... , K and outputs token τt as , τt = argmaxk { zt · wtokk } . The centroids are estimated prior to training via spherical K-means clustering in the spherical space Z generated by the freshly initialised encoder . The centroids are further tuned with training iterations . 3.3 MODEL TRAINING . Given a batch of tuples of similar sequences ( Xi , Xi′ ) where Xi = [ xit ∈ Rn ; t = 1 , ... , Ti ] and Xi′ = [ xi ′ t′ ∈ Rn ; t′ = 1 , ... , Ti′ ] . The encoder f maps these sequences to representations Zi = f ( Xi ) and Zi′ = f ( Xi′ ) . The tokenizer g then labels Zi framewise to token sequence Ti and Zi′ framewise to token sequence Ti′ . For training , the tuple ( Zi , Zi′ ) are concatenated to form the composed sequence Zii′ = [ Zi ; Zi′ ] of length Tii′ = Ti + Ti′ . The tuple ( Ti , Ti′ ) are also concatenated to form the token sequence Tii′ = [ Ti ; Ti′ ] of length Tii′ = Ti+Ti′ corresponding to sequenceZii′ . Given Tii′ = [ τ ii ′ 1 , ... , τ ii′ Tii′ ] and Zii′ = [ zii ′ 1 , ... , zii ′ Tii′ ] , we form aK ′ ≤ K length list of prototypes Pii′ = { pτ1ii′ , ... , p τK′ ii′ } where { τ1 , ... , τK′ } ∈ A are allK ′ unique tokens that occur in Tii′ and pτk′ii′ is a prototype for token τk′ ∈ A generated from all vectors in Zii′ mapping to τk′ as , p̃τk′ii′ = 1∑Tii′ t=1 1τ ii′t =τk′ Tii′∑ t=1 zii ′ t 1τ ii′t =τk′ ( 1 ) pτk′ii′ = p̃τk′ii′ ||p̃τk′ii′ || ( 2 ) Let Pii′ and Pjj′ be lists of prototypes generated given tuples ( Xi , Xi′ ) and ( Xj , Xj′ ) , respectively . We sample tuples of prototypes ( pτii′ , pτ ′ jj′ ) where pτii′ is sampled from Pii′ and pτ ′ jj′ is sampled from Pjj′ . Approach A . Given ( pτii′ , pτ ′ jj′ ) , we optimize the following loss function L11 to increase the cosine similarity between pτii′ and pτ ′ jj′ to 1 if τ = τ ′ and to decrease the cosine similarity to 0 if τ 6= τ ′ , L11 ( pτii′ , pτ ′ jj′ , t1 ) = BinXEnt ( p τ ii′ · pτ ′ jj′ , t1 ) ( 3 ) BinXEnt ( pτii′ · pτ ′ jj′ , t1 ) = t1 · log ( pτii′ · pτ ′ jj′ ) + ( 1− t1 ) · log ( 1− pτii′ · pτ ′ jj′ ) ( 4 ) where BinXEnt ( . ) is the binary cross-entropy function , pτii′ · pτ ′ jj′ gives a cosine similarity score as both the vectors are L-2 normalized , and target t1 is 0 if τ 6= τ ′ else 1 . We also optimize the following loss function L12 to increase the cosine similarity of pτii′ or pτ ′ jj′ with respect to the k th quantizer wtokk in our tokenizer g : Z 7→ T to 1 if τ or τ ′ = k repectively and to decrease the same to 0 if τ or τ ′ 6= k , L12 ( pτii′ , pτ ′ jj′ ) = K∑ k=1 ( BinXEnt ( pτii′ · wtokk , t1k ) +BinXEnt ( pτ ′ jj′ · wtokk , t2k ) ) ( 5 ) where target t1k is 0 if τ 6= k else 1 and target t2k is 0 if τ ′ 6= k else 1 . The constrastive loss function L1 for Approach A thus formed with the union of the above two loss functions is given as , L1 ( pτii′ , pτ ′ jj′ , t1 ) = L11 ( pτii′ , pτ ′ jj′ , t1 ) + L12 ( pτii′ , pτ ′ jj′ ) ( 6 ) Approach B . Given ( pτii′ , pτ ′ jj′ ) , a relation network R : Rm 7→ R generates relation score R ( pτii′ , pτ ′ jj′ ) in the range [ 0 , 1 ] which is closer to 0 if τ 6= τ ′ and closer to 1 if τ = τ ′ . The relation score acts as a non-linear similarity metric and is given as , R ( pτii′ , pτ ′ jj′ ) = σ ( WTr |pτii′ − pτ ′ jj′ | ) ( 7 ) where σ ( . ) is the sigmoid function , |.| is the element-wise absolute value function , andWr ∈ Rm is the weight matrix of the relation network R : Rm 7→ R. Given R ( pτii′ , pτ ′ jj′ ) , we optimize the following loss function L21 to increase the relation score between pτii′ and pτ ′ jj′ to 1 if τ = τ ′ and to decrease the relation score to 0 if τ 6= τ ′ , L21 ( pτii′ , pτ ′ jj′ , t2 ) = BinXEnt ( R ( pτii′ , pτ ′ jj′ ) , t2 ) ( 8 ) where target t2 is 0 if τ 6= τ ′ else 1 . We also optimize the following loss function L22 to increase the relation score of pτii′ or pτ ′ jj′ with respect to the k th quantizer wtokk in our tokenizer g : Z 7→ T to 1 if τ or τ ′ = k respectively and to decrease the same to 0 if τ or τ ′ 6= k , L22 ( pτii′ , pτ ′ jj′ ) = K∑ k=1 ( BinXEnt ( R ( pτii′ , wtokk ) , t1k ) +BinXEnt ( R ( pτ ′ jj′ , w tok k ) , t2k ) ) ( 9 ) where target t3k is 0 if τ 6= k else 1 and target t4k is 0 if τ ′ 6= k else 1 . The contrastive loss function L2 for Approach B thus formed with the union of the above two loss functions is given as , L2 ( pτii′ , pτ ′ jj′ , t2 ) = L22 ( pτii′ , pτ ′ jj′ , t2 ) + L22 ( pτii′ , pτ ′ jj′ ) ( 10 ) A spherical K-means vector quantization loss as inspired from the K-means vector quantization loss in VQ-Wav2Vec [ Baevski et al . ( 2019 ) ] may be iterated to add more movement to the centroids and the representations . Given prototype pτii′ for token τ ∈ A generated from sequence of representations Zii′ = [ zii ′ 1 , ... , zii ′ Tii′ ] and sequence of tokens Tii′ = [ τ ii ′ 1 , ... , τ ii′ Tii′ ] , our vector quantization loss is given as , LSK ( pτii′ ) = 1∑Tii′ t=1 1τ ii′t =τ Tii′∑ t=1 ( 2− ( sg ( zii ′ t ) · wtokτ + γ · zii ′ t · sg ( wtokτ ) ) ) 1τ ii′t =τ ( 11 ) where γ is a positive constant , and sg ( . ) is the stop-gradient operator . The stop-gradient operator converts the parameter input to a constant during gradient computation . Increasing sg ( zii ′ t ) · wtokτ pushes wtokτ towards zii ′ t keeping zii ′ t static and increasing zii ′ t · sg ( wtokτ ) pushes zii ′ t towards wtokτ keeping wtokτ static . With γ set to 0 , iterating the loss only affects wtokτ . Given ( pτii′ , pτjj′ ) , the final loss function L which we minimize to optimize our model parameters is given as , L ( pτii′ , pτ ′ jj′ , ta ) = La ( pτii′ , pτ ′ jj′ , ta ) + α · ( LSK ( pτii′ ) + LSK ( pτ ′ jj′ ) ) ( 12 ) where α is a positive constant , ta is the target , and a = 1 corresponds to Approach A while a = 2 corresponds to Approach B . | The paper presents an algorithm to do sequence matching using a tokenizations of the original sequences, and evaluates it in three different settings. The test environments are non-standard setups of public databases, with a closed vocabulary of sequences, i.e. training, validation, and testing sets contain the same sequences. | SP:254930853e2b64fc160b893a70da23f4a36c9a7a |
Seq2Tok: Deep Sequence Tokenizer for Retrieval | 1 INTRODUCTION . Sequence Retrieval aims at retrieving sequences similar to a query sequence , with the constraint that an ordered alignment exists between the query and the target sequence . The examples include speech search , where the order of constituent units , such as phonemes , syllables or words , remains same ; and music search – query by humming or query by example – where the order of constituent units , such as relative notes or phrases , remains same . Apart from audio , the problem also extends to tasks such as handwritten word search and gesture search . One can define similarity metrics over the sequences using Dynamic Time Warping ( DTW ) . But those can be very inefficient if the sequences are continuous valued and have high sampling rates , as in audio . Also , the high variability of query sequences makes the hand-made metrics cumbersome and ineffective . A more effective way of sequence retrieval is by mapping them to discrete tokens . For instance , for linguistic content based speech retrieval , audio is mapped to discrete linguistic tokens , such as phonemes , syllables or words , and search is performed over these tokens . For query-by-humming based music search , audio is mapped to discrete melody-related tokens , such as notes . For query-by-example based music search , audio is mapped to rule-based landmarks in spectrograms [ Wang ( 2003 ) ] . Hence , each problem uses a domain-specific hand-made mapping to tokens defined by a domain expert . In this paper , we propose an audio tokenizer which maps the raw audio feature sequence to a sequence of tokens . The tokenizer is trained from pairs of query and target sequences , without any expert-defined tokens . The proposed algorithm makes use of the fact that relevant landmarks appear in the same order in both the query and the target sequences . This reduces the dimensionality of data and preserves the information relevant for effective retrieval . Existing text search methods , namely , locally sensitive hashing , edit distance , etc. , can then be used to query over these tokens . 2 RELATED WORK . Sequence Labelling . With expert-defined tokens , various methods are popularly used for mapping sequences to tokens . In conventional methods , Hidden Markov Models [ Rabiner & Juang ( 1986 ) ] and Conditional Random Fields [ Lafferty et al . ( 2001 ) ] have been popularly used for sequence labelling . These methods involve a significant amount of domain knowledge and many assumptions to make tractable models , which are avoided by End-to-End learning models such as Recurrent Neural Networks ( RNNs ) using Connectionist Temporal Classification framework [ Graves et al . ( 2006 ) ] . Sequence labeling can be used for sequence retrieval by converting the sequences to tokens , which are easy to search over . But this approach inevitably depends upon expert-defined tokens . Unsupervised Speech Recognition . Modern Representation learning techniques such as Contrastive Predictive Coding ( CPC ) [ van den Oord et al . ( 2018 ) ] and Autoregressive Predictive Coding ( APC ) [ Chung & Glass ( 2020 ) ] are able to generate state-of-the-art continuous representations which encode the slowly varying phoneme features in raw speech . Wav2Vec [ Schneider et al . ( 2019 ) ] generated continuous representations with an encoder pretrained to distinguish future timesteps from a set of distractors sampled from a proposal distribution by optimizing a CPC-based contrastive loss . After pretraining the models , the representations are mapped to phoneme tokens via minimization of the Connectionist Temporal Classification ( CTC ) Loss [ Graves et al . ( 2006 ) ] . With inspiration from VQ-VAE [ van den Oord et al . ( 2017 ) ] which marked the beginning of generation of discrete representations , VQ-Wav2Vec [ Baevski et al . ( 2019 ) ] discretized the representations generated by Wav2Vec [ Schneider et al . ( 2019 ) ] with either a K-Means Vector Quantizer [ Baevski et al . ( 2019 ) ] or a Gumble-Softmax based Vector Quantizer [ Baevski et al . ( 2019 ) ] to generate quantized speech representation used to pretrain a BERT [ Devlin et al . ( 2018 ) ] . Wav2Vec 2.0 [ Baevski et al . ( 2020 ) ] discretized and masked the representations to solve a CPC-based contrastive task over the quantized representations which are learned jointly . VQ-APC [ Chung et al . ( 2020 ) ] discretized the representations to solve APC task over the quantized representations which are learned jointly . Note , the main motivation to discretize raw audio in a latent space for all aforementioned works are to explicitly control information content encoded in the representations rather than achieve sequence tokenization . The codes or tokens generated by the models aren ’ t constrained to be interpretable and hence initialised in large numbers . Performing CTC fine-tuning in essence groups codes in the vector quantizer module of each model together and achieves codebook compression to the number of phonemes or linguistic units . The discretization of representations do result in performance increase on various downstream tasks , with a pretrained Wav2Vec 2.0 [ Baevski et al . ( 2020 ) ] achieving state of the art results on speech recognition by being fine-tuned on only 10 minutes of transcribed audio . SeqRQ-AE [ Liu et al . ( 2019 ) ] is the closest to our work which uses a VQ-VAE [ van den Oord et al . ( 2017 ) ] to estimate representations for each phoneme in speech . The VQ-VAE has a codebook containing the same number of members as the number of phonemes . The codebook is trained via phonetic clustering , temporal segmentation and CTC finetuning on a small amount of transcribed audio . Neural Audio Fingerprinting . Now Playing [ Arcas et al . ( 2017 ) ] and [ Chang et al . ( 2020 ) ] use a Neural Network Fingerprinter ( NNFP ) module outputting representations which are efficient for search in query-by-example tasks where the difference between query and actual song is pretty minute in comparison to humming where only the melody is sung . Now Playing [ Arcas et al . ( 2017 ) ] trains representations by optimizing the Triplet loss [ Schroff et al . ( 2015 ) ] and [ Chang et al . ( 2020 ) ] trains representations by simulating the Maximum Inner Product Search on mini-batches of representations . Cross Domain Alignment . Given a pair of semantically similar inputs for training , tasks such as visual question answering ( text and image ) and machine translation ( text ) involve learning of an alignment . The alignment here is not ordered and the inputs may be from different modalities . Attention models have been used to find alignment between output entities and input regions [ Yao et al . ( 2018 ) ] . [ Chen et al . ( 2020 ) ] use Gromov-Wasserstein distance between output and input entities to match them . However , there is no notion of tokens there , rather the salient entities in the input are represented as vectors in a graph . Graph Matching . Generation of representations for graphs can be done by Graph Neural Networks [ Gori et al . ( 2005 ) ] . Graph matching is used to find similarity of structured graphs [ Li et al . ( 2019 ) ] . However , they perform the matching jointly on the pair of inputs , rather than representing each input independently . This makes them unsuitable for the search problem at hand due to large runtime complexity . The distance metrics used for graph matching are based on edit distance [ Li et al . ( 2019 ) ] and Wasserstein distance [ Chen et al . ( 2020 ) ] . 3 METHODOLOGY . 3.1 PROBLEM STATEMENT . Given a pair of semantically similar feature sequences ( Xi , Xj ) of length Ti and Tj respectively and feature sequence Xk of length Tk with no similarity to either of the feature sequences Xi or Xj , we aim to map sequence Xi to sequence of tokens Ti of length T ′i ≤ Ti , sequence Xj to sequence of tokens Tj of length T ′j ≤ Tj , and sequence Xk to sequence of tokens Tk of length T ′k ≤ Tk where all the tokens belong to a finite alphabet A such that , the edit distance between Ti and Tj is minimum while that between Tk and Ti as well as Tk and Tj is maximum . 3.2 MODEL ARCHITECTURE . Wav2Tok is comprised of an encoder , which , given input x ∈ Rn , outputs a representation z ∈ Rm , and a tokenizer , which , given the encoder output z , outputs a token τ which belongs to a finite K-element alphabet A = { 1 , ... , K } . Given , a temporal sequence X = [ x1 , ... , xT ] of length T where xt is the feature vector at time t. Our model performs frame-wise labelling of X to output a sequence of tokens T = [ τ1 , ... , τT ] where τt ∈ A is the token assigned to input xt . The encoder f : X 7→ Z encodes xt in a hyper-spherical space Z using a BiLSTM network [ Schuster & Paliwal ( 1997 ) ] followed by an L-2 normalization layer . The BiLSTM allows zt to summarise information in both directions , and hence , encode surrounding context . The tokenizer g : Z 7→ T is a K-means vector quantizer which vector quantizes encoder output zt with K quantizers or cluster centroids wtokk ∈ Z ; k = 1 , ... , K and outputs token τt as , τt = argmaxk { zt · wtokk } . The centroids are estimated prior to training via spherical K-means clustering in the spherical space Z generated by the freshly initialised encoder . The centroids are further tuned with training iterations . 3.3 MODEL TRAINING . Given a batch of tuples of similar sequences ( Xi , Xi′ ) where Xi = [ xit ∈ Rn ; t = 1 , ... , Ti ] and Xi′ = [ xi ′ t′ ∈ Rn ; t′ = 1 , ... , Ti′ ] . The encoder f maps these sequences to representations Zi = f ( Xi ) and Zi′ = f ( Xi′ ) . The tokenizer g then labels Zi framewise to token sequence Ti and Zi′ framewise to token sequence Ti′ . For training , the tuple ( Zi , Zi′ ) are concatenated to form the composed sequence Zii′ = [ Zi ; Zi′ ] of length Tii′ = Ti + Ti′ . The tuple ( Ti , Ti′ ) are also concatenated to form the token sequence Tii′ = [ Ti ; Ti′ ] of length Tii′ = Ti+Ti′ corresponding to sequenceZii′ . Given Tii′ = [ τ ii ′ 1 , ... , τ ii′ Tii′ ] and Zii′ = [ zii ′ 1 , ... , zii ′ Tii′ ] , we form aK ′ ≤ K length list of prototypes Pii′ = { pτ1ii′ , ... , p τK′ ii′ } where { τ1 , ... , τK′ } ∈ A are allK ′ unique tokens that occur in Tii′ and pτk′ii′ is a prototype for token τk′ ∈ A generated from all vectors in Zii′ mapping to τk′ as , p̃τk′ii′ = 1∑Tii′ t=1 1τ ii′t =τk′ Tii′∑ t=1 zii ′ t 1τ ii′t =τk′ ( 1 ) pτk′ii′ = p̃τk′ii′ ||p̃τk′ii′ || ( 2 ) Let Pii′ and Pjj′ be lists of prototypes generated given tuples ( Xi , Xi′ ) and ( Xj , Xj′ ) , respectively . We sample tuples of prototypes ( pτii′ , pτ ′ jj′ ) where pτii′ is sampled from Pii′ and pτ ′ jj′ is sampled from Pjj′ . Approach A . Given ( pτii′ , pτ ′ jj′ ) , we optimize the following loss function L11 to increase the cosine similarity between pτii′ and pτ ′ jj′ to 1 if τ = τ ′ and to decrease the cosine similarity to 0 if τ 6= τ ′ , L11 ( pτii′ , pτ ′ jj′ , t1 ) = BinXEnt ( p τ ii′ · pτ ′ jj′ , t1 ) ( 3 ) BinXEnt ( pτii′ · pτ ′ jj′ , t1 ) = t1 · log ( pτii′ · pτ ′ jj′ ) + ( 1− t1 ) · log ( 1− pτii′ · pτ ′ jj′ ) ( 4 ) where BinXEnt ( . ) is the binary cross-entropy function , pτii′ · pτ ′ jj′ gives a cosine similarity score as both the vectors are L-2 normalized , and target t1 is 0 if τ 6= τ ′ else 1 . We also optimize the following loss function L12 to increase the cosine similarity of pτii′ or pτ ′ jj′ with respect to the k th quantizer wtokk in our tokenizer g : Z 7→ T to 1 if τ or τ ′ = k repectively and to decrease the same to 0 if τ or τ ′ 6= k , L12 ( pτii′ , pτ ′ jj′ ) = K∑ k=1 ( BinXEnt ( pτii′ · wtokk , t1k ) +BinXEnt ( pτ ′ jj′ · wtokk , t2k ) ) ( 5 ) where target t1k is 0 if τ 6= k else 1 and target t2k is 0 if τ ′ 6= k else 1 . The constrastive loss function L1 for Approach A thus formed with the union of the above two loss functions is given as , L1 ( pτii′ , pτ ′ jj′ , t1 ) = L11 ( pτii′ , pτ ′ jj′ , t1 ) + L12 ( pτii′ , pτ ′ jj′ ) ( 6 ) Approach B . Given ( pτii′ , pτ ′ jj′ ) , a relation network R : Rm 7→ R generates relation score R ( pτii′ , pτ ′ jj′ ) in the range [ 0 , 1 ] which is closer to 0 if τ 6= τ ′ and closer to 1 if τ = τ ′ . The relation score acts as a non-linear similarity metric and is given as , R ( pτii′ , pτ ′ jj′ ) = σ ( WTr |pτii′ − pτ ′ jj′ | ) ( 7 ) where σ ( . ) is the sigmoid function , |.| is the element-wise absolute value function , andWr ∈ Rm is the weight matrix of the relation network R : Rm 7→ R. Given R ( pτii′ , pτ ′ jj′ ) , we optimize the following loss function L21 to increase the relation score between pτii′ and pτ ′ jj′ to 1 if τ = τ ′ and to decrease the relation score to 0 if τ 6= τ ′ , L21 ( pτii′ , pτ ′ jj′ , t2 ) = BinXEnt ( R ( pτii′ , pτ ′ jj′ ) , t2 ) ( 8 ) where target t2 is 0 if τ 6= τ ′ else 1 . We also optimize the following loss function L22 to increase the relation score of pτii′ or pτ ′ jj′ with respect to the k th quantizer wtokk in our tokenizer g : Z 7→ T to 1 if τ or τ ′ = k respectively and to decrease the same to 0 if τ or τ ′ 6= k , L22 ( pτii′ , pτ ′ jj′ ) = K∑ k=1 ( BinXEnt ( R ( pτii′ , wtokk ) , t1k ) +BinXEnt ( R ( pτ ′ jj′ , w tok k ) , t2k ) ) ( 9 ) where target t3k is 0 if τ 6= k else 1 and target t4k is 0 if τ ′ 6= k else 1 . The contrastive loss function L2 for Approach B thus formed with the union of the above two loss functions is given as , L2 ( pτii′ , pτ ′ jj′ , t2 ) = L22 ( pτii′ , pτ ′ jj′ , t2 ) + L22 ( pτii′ , pτ ′ jj′ ) ( 10 ) A spherical K-means vector quantization loss as inspired from the K-means vector quantization loss in VQ-Wav2Vec [ Baevski et al . ( 2019 ) ] may be iterated to add more movement to the centroids and the representations . Given prototype pτii′ for token τ ∈ A generated from sequence of representations Zii′ = [ zii ′ 1 , ... , zii ′ Tii′ ] and sequence of tokens Tii′ = [ τ ii ′ 1 , ... , τ ii′ Tii′ ] , our vector quantization loss is given as , LSK ( pτii′ ) = 1∑Tii′ t=1 1τ ii′t =τ Tii′∑ t=1 ( 2− ( sg ( zii ′ t ) · wtokτ + γ · zii ′ t · sg ( wtokτ ) ) ) 1τ ii′t =τ ( 11 ) where γ is a positive constant , and sg ( . ) is the stop-gradient operator . The stop-gradient operator converts the parameter input to a constant during gradient computation . Increasing sg ( zii ′ t ) · wtokτ pushes wtokτ towards zii ′ t keeping zii ′ t static and increasing zii ′ t · sg ( wtokτ ) pushes zii ′ t towards wtokτ keeping wtokτ static . With γ set to 0 , iterating the loss only affects wtokτ . Given ( pτii′ , pτjj′ ) , the final loss function L which we minimize to optimize our model parameters is given as , L ( pτii′ , pτ ′ jj′ , ta ) = La ( pτii′ , pτ ′ jj′ , ta ) + α · ( LSK ( pτii′ ) + LSK ( pτ ′ jj′ ) ) ( 12 ) where α is a positive constant , ta is the target , and a = 1 corresponds to Approach A while a = 2 corresponds to Approach B . | This paper proposes to speed up search for similar sequences in cases where data is continuous valued and similar sequence search is computationally expensive. It proposes to convert continuous valued sequence to a sequence of discrete tokens. The token vocabulary and assignment of features to tokens is constructed via k-means clustering and evolves during the model training process. Results are presented on two tasks: QBSH (query by singing/humming) and TIMIT speech search and keyword spotting, demonstrating that the proposed approach yields better results as compared to baseline DTW methods, and is also more robust to input distortions. However a comparison with previously published results is missing. | SP:254930853e2b64fc160b893a70da23f4a36c9a7a |
Seq2Tok: Deep Sequence Tokenizer for Retrieval | 1 INTRODUCTION . Sequence Retrieval aims at retrieving sequences similar to a query sequence , with the constraint that an ordered alignment exists between the query and the target sequence . The examples include speech search , where the order of constituent units , such as phonemes , syllables or words , remains same ; and music search – query by humming or query by example – where the order of constituent units , such as relative notes or phrases , remains same . Apart from audio , the problem also extends to tasks such as handwritten word search and gesture search . One can define similarity metrics over the sequences using Dynamic Time Warping ( DTW ) . But those can be very inefficient if the sequences are continuous valued and have high sampling rates , as in audio . Also , the high variability of query sequences makes the hand-made metrics cumbersome and ineffective . A more effective way of sequence retrieval is by mapping them to discrete tokens . For instance , for linguistic content based speech retrieval , audio is mapped to discrete linguistic tokens , such as phonemes , syllables or words , and search is performed over these tokens . For query-by-humming based music search , audio is mapped to discrete melody-related tokens , such as notes . For query-by-example based music search , audio is mapped to rule-based landmarks in spectrograms [ Wang ( 2003 ) ] . Hence , each problem uses a domain-specific hand-made mapping to tokens defined by a domain expert . In this paper , we propose an audio tokenizer which maps the raw audio feature sequence to a sequence of tokens . The tokenizer is trained from pairs of query and target sequences , without any expert-defined tokens . The proposed algorithm makes use of the fact that relevant landmarks appear in the same order in both the query and the target sequences . This reduces the dimensionality of data and preserves the information relevant for effective retrieval . Existing text search methods , namely , locally sensitive hashing , edit distance , etc. , can then be used to query over these tokens . 2 RELATED WORK . Sequence Labelling . With expert-defined tokens , various methods are popularly used for mapping sequences to tokens . In conventional methods , Hidden Markov Models [ Rabiner & Juang ( 1986 ) ] and Conditional Random Fields [ Lafferty et al . ( 2001 ) ] have been popularly used for sequence labelling . These methods involve a significant amount of domain knowledge and many assumptions to make tractable models , which are avoided by End-to-End learning models such as Recurrent Neural Networks ( RNNs ) using Connectionist Temporal Classification framework [ Graves et al . ( 2006 ) ] . Sequence labeling can be used for sequence retrieval by converting the sequences to tokens , which are easy to search over . But this approach inevitably depends upon expert-defined tokens . Unsupervised Speech Recognition . Modern Representation learning techniques such as Contrastive Predictive Coding ( CPC ) [ van den Oord et al . ( 2018 ) ] and Autoregressive Predictive Coding ( APC ) [ Chung & Glass ( 2020 ) ] are able to generate state-of-the-art continuous representations which encode the slowly varying phoneme features in raw speech . Wav2Vec [ Schneider et al . ( 2019 ) ] generated continuous representations with an encoder pretrained to distinguish future timesteps from a set of distractors sampled from a proposal distribution by optimizing a CPC-based contrastive loss . After pretraining the models , the representations are mapped to phoneme tokens via minimization of the Connectionist Temporal Classification ( CTC ) Loss [ Graves et al . ( 2006 ) ] . With inspiration from VQ-VAE [ van den Oord et al . ( 2017 ) ] which marked the beginning of generation of discrete representations , VQ-Wav2Vec [ Baevski et al . ( 2019 ) ] discretized the representations generated by Wav2Vec [ Schneider et al . ( 2019 ) ] with either a K-Means Vector Quantizer [ Baevski et al . ( 2019 ) ] or a Gumble-Softmax based Vector Quantizer [ Baevski et al . ( 2019 ) ] to generate quantized speech representation used to pretrain a BERT [ Devlin et al . ( 2018 ) ] . Wav2Vec 2.0 [ Baevski et al . ( 2020 ) ] discretized and masked the representations to solve a CPC-based contrastive task over the quantized representations which are learned jointly . VQ-APC [ Chung et al . ( 2020 ) ] discretized the representations to solve APC task over the quantized representations which are learned jointly . Note , the main motivation to discretize raw audio in a latent space for all aforementioned works are to explicitly control information content encoded in the representations rather than achieve sequence tokenization . The codes or tokens generated by the models aren ’ t constrained to be interpretable and hence initialised in large numbers . Performing CTC fine-tuning in essence groups codes in the vector quantizer module of each model together and achieves codebook compression to the number of phonemes or linguistic units . The discretization of representations do result in performance increase on various downstream tasks , with a pretrained Wav2Vec 2.0 [ Baevski et al . ( 2020 ) ] achieving state of the art results on speech recognition by being fine-tuned on only 10 minutes of transcribed audio . SeqRQ-AE [ Liu et al . ( 2019 ) ] is the closest to our work which uses a VQ-VAE [ van den Oord et al . ( 2017 ) ] to estimate representations for each phoneme in speech . The VQ-VAE has a codebook containing the same number of members as the number of phonemes . The codebook is trained via phonetic clustering , temporal segmentation and CTC finetuning on a small amount of transcribed audio . Neural Audio Fingerprinting . Now Playing [ Arcas et al . ( 2017 ) ] and [ Chang et al . ( 2020 ) ] use a Neural Network Fingerprinter ( NNFP ) module outputting representations which are efficient for search in query-by-example tasks where the difference between query and actual song is pretty minute in comparison to humming where only the melody is sung . Now Playing [ Arcas et al . ( 2017 ) ] trains representations by optimizing the Triplet loss [ Schroff et al . ( 2015 ) ] and [ Chang et al . ( 2020 ) ] trains representations by simulating the Maximum Inner Product Search on mini-batches of representations . Cross Domain Alignment . Given a pair of semantically similar inputs for training , tasks such as visual question answering ( text and image ) and machine translation ( text ) involve learning of an alignment . The alignment here is not ordered and the inputs may be from different modalities . Attention models have been used to find alignment between output entities and input regions [ Yao et al . ( 2018 ) ] . [ Chen et al . ( 2020 ) ] use Gromov-Wasserstein distance between output and input entities to match them . However , there is no notion of tokens there , rather the salient entities in the input are represented as vectors in a graph . Graph Matching . Generation of representations for graphs can be done by Graph Neural Networks [ Gori et al . ( 2005 ) ] . Graph matching is used to find similarity of structured graphs [ Li et al . ( 2019 ) ] . However , they perform the matching jointly on the pair of inputs , rather than representing each input independently . This makes them unsuitable for the search problem at hand due to large runtime complexity . The distance metrics used for graph matching are based on edit distance [ Li et al . ( 2019 ) ] and Wasserstein distance [ Chen et al . ( 2020 ) ] . 3 METHODOLOGY . 3.1 PROBLEM STATEMENT . Given a pair of semantically similar feature sequences ( Xi , Xj ) of length Ti and Tj respectively and feature sequence Xk of length Tk with no similarity to either of the feature sequences Xi or Xj , we aim to map sequence Xi to sequence of tokens Ti of length T ′i ≤ Ti , sequence Xj to sequence of tokens Tj of length T ′j ≤ Tj , and sequence Xk to sequence of tokens Tk of length T ′k ≤ Tk where all the tokens belong to a finite alphabet A such that , the edit distance between Ti and Tj is minimum while that between Tk and Ti as well as Tk and Tj is maximum . 3.2 MODEL ARCHITECTURE . Wav2Tok is comprised of an encoder , which , given input x ∈ Rn , outputs a representation z ∈ Rm , and a tokenizer , which , given the encoder output z , outputs a token τ which belongs to a finite K-element alphabet A = { 1 , ... , K } . Given , a temporal sequence X = [ x1 , ... , xT ] of length T where xt is the feature vector at time t. Our model performs frame-wise labelling of X to output a sequence of tokens T = [ τ1 , ... , τT ] where τt ∈ A is the token assigned to input xt . The encoder f : X 7→ Z encodes xt in a hyper-spherical space Z using a BiLSTM network [ Schuster & Paliwal ( 1997 ) ] followed by an L-2 normalization layer . The BiLSTM allows zt to summarise information in both directions , and hence , encode surrounding context . The tokenizer g : Z 7→ T is a K-means vector quantizer which vector quantizes encoder output zt with K quantizers or cluster centroids wtokk ∈ Z ; k = 1 , ... , K and outputs token τt as , τt = argmaxk { zt · wtokk } . The centroids are estimated prior to training via spherical K-means clustering in the spherical space Z generated by the freshly initialised encoder . The centroids are further tuned with training iterations . 3.3 MODEL TRAINING . Given a batch of tuples of similar sequences ( Xi , Xi′ ) where Xi = [ xit ∈ Rn ; t = 1 , ... , Ti ] and Xi′ = [ xi ′ t′ ∈ Rn ; t′ = 1 , ... , Ti′ ] . The encoder f maps these sequences to representations Zi = f ( Xi ) and Zi′ = f ( Xi′ ) . The tokenizer g then labels Zi framewise to token sequence Ti and Zi′ framewise to token sequence Ti′ . For training , the tuple ( Zi , Zi′ ) are concatenated to form the composed sequence Zii′ = [ Zi ; Zi′ ] of length Tii′ = Ti + Ti′ . The tuple ( Ti , Ti′ ) are also concatenated to form the token sequence Tii′ = [ Ti ; Ti′ ] of length Tii′ = Ti+Ti′ corresponding to sequenceZii′ . Given Tii′ = [ τ ii ′ 1 , ... , τ ii′ Tii′ ] and Zii′ = [ zii ′ 1 , ... , zii ′ Tii′ ] , we form aK ′ ≤ K length list of prototypes Pii′ = { pτ1ii′ , ... , p τK′ ii′ } where { τ1 , ... , τK′ } ∈ A are allK ′ unique tokens that occur in Tii′ and pτk′ii′ is a prototype for token τk′ ∈ A generated from all vectors in Zii′ mapping to τk′ as , p̃τk′ii′ = 1∑Tii′ t=1 1τ ii′t =τk′ Tii′∑ t=1 zii ′ t 1τ ii′t =τk′ ( 1 ) pτk′ii′ = p̃τk′ii′ ||p̃τk′ii′ || ( 2 ) Let Pii′ and Pjj′ be lists of prototypes generated given tuples ( Xi , Xi′ ) and ( Xj , Xj′ ) , respectively . We sample tuples of prototypes ( pτii′ , pτ ′ jj′ ) where pτii′ is sampled from Pii′ and pτ ′ jj′ is sampled from Pjj′ . Approach A . Given ( pτii′ , pτ ′ jj′ ) , we optimize the following loss function L11 to increase the cosine similarity between pτii′ and pτ ′ jj′ to 1 if τ = τ ′ and to decrease the cosine similarity to 0 if τ 6= τ ′ , L11 ( pτii′ , pτ ′ jj′ , t1 ) = BinXEnt ( p τ ii′ · pτ ′ jj′ , t1 ) ( 3 ) BinXEnt ( pτii′ · pτ ′ jj′ , t1 ) = t1 · log ( pτii′ · pτ ′ jj′ ) + ( 1− t1 ) · log ( 1− pτii′ · pτ ′ jj′ ) ( 4 ) where BinXEnt ( . ) is the binary cross-entropy function , pτii′ · pτ ′ jj′ gives a cosine similarity score as both the vectors are L-2 normalized , and target t1 is 0 if τ 6= τ ′ else 1 . We also optimize the following loss function L12 to increase the cosine similarity of pτii′ or pτ ′ jj′ with respect to the k th quantizer wtokk in our tokenizer g : Z 7→ T to 1 if τ or τ ′ = k repectively and to decrease the same to 0 if τ or τ ′ 6= k , L12 ( pτii′ , pτ ′ jj′ ) = K∑ k=1 ( BinXEnt ( pτii′ · wtokk , t1k ) +BinXEnt ( pτ ′ jj′ · wtokk , t2k ) ) ( 5 ) where target t1k is 0 if τ 6= k else 1 and target t2k is 0 if τ ′ 6= k else 1 . The constrastive loss function L1 for Approach A thus formed with the union of the above two loss functions is given as , L1 ( pτii′ , pτ ′ jj′ , t1 ) = L11 ( pτii′ , pτ ′ jj′ , t1 ) + L12 ( pτii′ , pτ ′ jj′ ) ( 6 ) Approach B . Given ( pτii′ , pτ ′ jj′ ) , a relation network R : Rm 7→ R generates relation score R ( pτii′ , pτ ′ jj′ ) in the range [ 0 , 1 ] which is closer to 0 if τ 6= τ ′ and closer to 1 if τ = τ ′ . The relation score acts as a non-linear similarity metric and is given as , R ( pτii′ , pτ ′ jj′ ) = σ ( WTr |pτii′ − pτ ′ jj′ | ) ( 7 ) where σ ( . ) is the sigmoid function , |.| is the element-wise absolute value function , andWr ∈ Rm is the weight matrix of the relation network R : Rm 7→ R. Given R ( pτii′ , pτ ′ jj′ ) , we optimize the following loss function L21 to increase the relation score between pτii′ and pτ ′ jj′ to 1 if τ = τ ′ and to decrease the relation score to 0 if τ 6= τ ′ , L21 ( pτii′ , pτ ′ jj′ , t2 ) = BinXEnt ( R ( pτii′ , pτ ′ jj′ ) , t2 ) ( 8 ) where target t2 is 0 if τ 6= τ ′ else 1 . We also optimize the following loss function L22 to increase the relation score of pτii′ or pτ ′ jj′ with respect to the k th quantizer wtokk in our tokenizer g : Z 7→ T to 1 if τ or τ ′ = k respectively and to decrease the same to 0 if τ or τ ′ 6= k , L22 ( pτii′ , pτ ′ jj′ ) = K∑ k=1 ( BinXEnt ( R ( pτii′ , wtokk ) , t1k ) +BinXEnt ( R ( pτ ′ jj′ , w tok k ) , t2k ) ) ( 9 ) where target t3k is 0 if τ 6= k else 1 and target t4k is 0 if τ ′ 6= k else 1 . The contrastive loss function L2 for Approach B thus formed with the union of the above two loss functions is given as , L2 ( pτii′ , pτ ′ jj′ , t2 ) = L22 ( pτii′ , pτ ′ jj′ , t2 ) + L22 ( pτii′ , pτ ′ jj′ ) ( 10 ) A spherical K-means vector quantization loss as inspired from the K-means vector quantization loss in VQ-Wav2Vec [ Baevski et al . ( 2019 ) ] may be iterated to add more movement to the centroids and the representations . Given prototype pτii′ for token τ ∈ A generated from sequence of representations Zii′ = [ zii ′ 1 , ... , zii ′ Tii′ ] and sequence of tokens Tii′ = [ τ ii ′ 1 , ... , τ ii′ Tii′ ] , our vector quantization loss is given as , LSK ( pτii′ ) = 1∑Tii′ t=1 1τ ii′t =τ Tii′∑ t=1 ( 2− ( sg ( zii ′ t ) · wtokτ + γ · zii ′ t · sg ( wtokτ ) ) ) 1τ ii′t =τ ( 11 ) where γ is a positive constant , and sg ( . ) is the stop-gradient operator . The stop-gradient operator converts the parameter input to a constant during gradient computation . Increasing sg ( zii ′ t ) · wtokτ pushes wtokτ towards zii ′ t keeping zii ′ t static and increasing zii ′ t · sg ( wtokτ ) pushes zii ′ t towards wtokτ keeping wtokτ static . With γ set to 0 , iterating the loss only affects wtokτ . Given ( pτii′ , pτjj′ ) , the final loss function L which we minimize to optimize our model parameters is given as , L ( pτii′ , pτ ′ jj′ , ta ) = La ( pτii′ , pτ ′ jj′ , ta ) + α · ( LSK ( pτii′ ) + LSK ( pτ ′ jj′ ) ) ( 12 ) where α is a positive constant , ta is the target , and a = 1 corresponds to Approach A while a = 2 corresponds to Approach B . | This paper studies the problem of information retrieval that searches similar items to a given query. The paper introduces a new tokenizer and claims that Seq2Tok can convert a continuous sequence (e.g. audio) to discrete tokens. The purpose of the conversion is to enable easier retrieval. The paper conducts extensive experiments and claims that Seq2Tok achieves consistent performance on audio retrieval tasks. | SP:254930853e2b64fc160b893a70da23f4a36c9a7a |
Einops: Clear and Reliable Tensor Manipulations with Einstein-like Notation | 1 INTRODUCTION . Deep learning ( DL ) over the past decade achieved a significant progress in analysis and synthesis of images , audio and text ( Bengio et al. , 2017 ; Aggarwal et al. , 2018 ; Foster , 2019 ) . Tools relying on these methods became a commodity in production data pipelines . Available research-and-production frameworks for DL , such as pytorch ( Paszke et al. , 2019 ) , tensorflow ( Abadi et al. , 2015 ) , mxnet ( Chen et al. , 2015 ) , jax ( Bradbury et al. , 2018 ) , and others , vary in numerous aspects , but their core functionality is built around efficient computations on n-dimensional arrays ( tensors for brevity1 ) . API exposed by frameworks for tensor operations follow the same approach , that combines high efficiency ( specialized hardware can be utilized ) and user convenience : computations can be expressed in high-level languages , such as Python , using a limited number of exposed and usually pre-compiled operations . Due to growing usage of DL in production and rising complexity of models , it becomes increasingly more important to provide programming interfaces that enable reliable and scalable development . We demonstrate that approach to define tensor operations taken by existing frameworks does not encourage writing code that is easy to interpret , maintain or modify ; additionally , some of the core operations do not conduct sufficient checks and can lead to hard-to-catch mistakes . To address these problems , we propose Einstein-like notation for operations , called einops . We implement this approach in a Python ( Van Rossum & Drake , 2009 ) package to allow simple integration of notation into existing code across a variety of frameworks . Outline We first briefly describe mainstream approach for tensor operations and point to its issues with examples . We review previously proposed ideas to resolve mentioned problems in related works . Our approach , einops – a verbose notation for tensor manipulation – is introduced next , followed by the code examples in case studies . We implement the notation in a Python package , and explain main design choices in implementation details section . We conclude with a discussion of einops role and common criticisms . ∗Currently at Herophilus , Inc. 1Our sincere apologies to readers with backgrounds in mathematics and physics for possible confusion . 2 MAINSTREAM APPROACH FOR TENSOR OPERATIONS . Nowadays tensor programming is dominating in DL and playing a crucial role in scientific computing . It first appeared in APL ( Iverson , 1962 ) , was popularized by MATLAB ( Matlab , 1993 ) and was spread in Python community by numpy ( Harris et al. , 2020 ) , and now is provided by multiple frameworks . Currently , tensor manipulations in all mainstream frameworks are based on the following assumptions : • Tensor is an n-dimensional array with shape ( e.g . 4× 6× 3 ) and data type ( e.g . float32 ) . • When elements are matched across tensors , axes are aligned by order . Conventions regulate cases of different dimensionalities , e.g . broadcasting in Numpy ( 2021 ) . • Multiple operations act differently on axes . Those operations either have conventions about axes order ( e.g . recurrent units , convolutions ; convolutions expect input to be either BHWC or BCHW ordered ) or should be provided with indices of axes that should be treated separately:2 y = x.max ( axis=1 ) # some operations are provided with indices y = x.swap_axes ( 0 , 1 ) # of specially treated axes The mixed option is possible when operation has defaults for “ special axes ” that can be overridden during a call . Benefits of the mainstream approach are simple API and a baseline implementation , as well as versatility : a lot of research code operates solely using this kind of operations for number crunching . The drawbacks are absence of semantics in an operation and no way to reflect expected input and output . To predict output after a chain of manipulations a researcher/engineer has to carefully keep in the memory ( or in the code comments ) shape and contents of each intermediate tensor and thus keep track of every operation . In this listing a batch of images is collapsed into a single image by placing images in a row next to each other # im_stack has shape [ b , 3 , h , w ] y1 = im_stack.transpose ( 2 , 0 , 3 , 1 ) .reshape ( h , b * w , 3 ) y2 = im_stack.transpose ( 2 , 3 , 0 , 1 ) .reshape ( h , b * w , 3 ) One of y1 , y2 contains a correct image , while the other is irrelevant – it requires some time to figure out which is what . A typical computation chain contains multiple tensor operations ( only two in this example ) and requires writing down all intermediate steps to “ debug ” the code . Annoyingly , resulting tensors y1 and y2 have the same shapes and mistake in the code may stay under the radar for a long time since the code never errors out . The lack of stronger checks is a weak point of conventional operations . In most cases we also can not meaningfully visualize intermediate layers , so there is no way to narrow down searches for a problem source . Thus , a researcher/engineer has to check all the code after a failure . Traditional operations restrict code flexibility : any change in the shape agreements between parts of the code is hard to align and all related code fragments ( frequently located in different places ) should be updated simultaneously . In the next code fragment we add omitted batch dimension to the code from the vision permutator ( Hou et al. , 2021 ) , and then update code to support depth : # pytorch-like code without batch dimension , as in the paper x_h = x.reshape ( H , W , N , S ) .permute ( 2 , 1 , 0 , 3 ) .reshape ( N , W , H * S ) x_h = proj_h ( x_h ) .reshape ( N , W , H , S ) .permute ( 2 , 1 , 0 , 3 ) .reshape ( H , W , C ) # with batch dimension x_h = x.reshape ( B , H , W , N , S ) .permute ( 0 , 3 , 2 , 1 , 4 ) .reshape ( B , N , W , H * S ) x_h = proj_h ( x_h ) .reshape ( B , N , W , H , S ) .permute ( 0 , 3 , 2 , 1 , 4 ) .reshape ( B , H , W , C ) # with batch and depth dimension x_h = x.reshape ( B , H , W , D , N , S ) .permute ( 0 , 4 , 2 , 3 , 1 , 5 ) .reshape ( B , N , W , D , H * S ) x_h = proj_h ( x_h ) .reshape ( B , N , W , D , H , S ) .permute ( 0 , 4 , 2 , 3 , 1 , 5 ) .reshape ( B , H , W , D , C ) 2Pseudocode in the paper corresponds to numpy unless otherwise stated . There is no way to write crossframework code . This problem we partially address with proposed einops notation . Modifications are very error-prone : all indices should be recomputed and order of reshape operands should be verified . Uncommonly , this fragment is quite self-documenting since final reshape in each line hints the intended order of axes after the transposition . In DL code it is common to use x.transpose ( 0 , 3 , 1 , 2 ) expecting other users to recognize a familiar pattern or leaving a comment.3 Related , transposition in the code requires operating with three contexts in mind ( original order of axes , permutation , result order ) , and even when simplified to just permutation , it ’ s unclear if permutation ( 2 0 3 1 ) is inverse to ( 1 3 0 2 ) . Less critical , but still notable source of mistakes is 0-based enumeration of axes ( Julia , MATLAB and R use 1-based ) , while we propose the framework not relying on axis numeration at all . Common to refer to axis with index 0 as “ first axis/dimension ” ( see e.g . numpy documentation ) , and there is no way to change this habit and avoid confusion between human communication and code . Finally , common tensor operations can easily break the tensor structure . For example , reshape , a common operation in the DL code , easily breaks the tensor structure because a whole tensor is treated as a sequence and no connection is assumed between axes in input and output , see Figure 1 . Aforementioned implementation mistakes can result in rejecting valuable research or drawing incorrect conclusion about the data . Moreover , there is no recipe to identify incorrect implementation , because the result tensor shape and data type are not affected by an error . Even the presence of an error can be obscured : poor performance can be misattributed to a number of other factors : data , hyperparameters , method , etc . All pointed issues have catastrophic importance for research costs and timeline in a setting where one experiment requires dozens to thousands of GPU-hours . A number of recently proposed architectures ( Wu et al. , 2021 ; Tolstikhin et al. , 2021 ; Jumper et al. , 2021 ; Liu et al. , 2021 ; Hou et al. , 2021 ; Touvron et al. , 2021 ) demonstrate that conservative approach with fixed ordering of axes ( like BCHW for convolutional networks ) is not sufficient . Existing frameworks carry this imprint that does not help with searches for new architectures . 3 RELATED WORKS . A commonly taken approach to increase reliability is assigning names/labels to tensor dimensions ( below we refer to them as labeled tensors ) . Most known implementations are xarray ( Hoyer & Hamman , 2017 ) , labeled_tensor in tensorflow ( Christiansen & Hoyer , 2016 ) , namedtensor ( 2019 ) , and named tensors in Pytorch ( 2019 ) . Despite being around for many years , this idea got little adoption , and not used in the DL code : development stopped for labeled_tensor and namedtensor , and named tensors in pytorch are still experimental . In this approach , operations match tensor axes based on labels ( common choice of label is string name ) , and rely on axis label instead of axes order , e.g . : # x1 has axes ( x , y , height ) and x2 has axes ( time , x , y ) x1 + x2 # result has axes ( x , y , height , time ) , maybe in a different order x1.mean ( 'height ' ) # reduce over axis named 'height' 3Out of 50 last usages of torch.permute in Python on GitHub on 22 Nov 2021 , only in 4 cases code had comments about result shape , in other cases no information was provided in any other form , including reshape . Axes matching rules vary across implementations . However , we can describe some common issues why this approach did not gain wide support in the DL community : • Operations focus on modified axes , and neither describe input nor output ; a user has to remember axes labels for each of intermediate tensors . • Less control over data layout : order of axes may significantly influence speed ( Weber & Goesele , 2017 ) , but is not transparent . • Names should be strictly defined and mistakes in names or their alignment between modules may result in the wrong computations , not an exception , e.g . for namedtensor package : # x1 has axes ( height , width ) # x2 has axes ( h , w ) # x3 has axes ( heigt ) x1 + x2 + x3 # has axes ( height width h w heigt ) in some order • Adoption requires a strong buy-in decision , as all code should be axis label-centric . In contrary , transition to labeled tensors in isolated code pieces only ( e.g . functions ) does not prevent ( more elusive ) errors in interaction between functions , but introduces constant conversions between the code styles . Third-party components need wrapping to support labels . • Symmetric and antisymmetric tensors with multiple identical axes pose an additional challenge : all axes labels should be unique to allow matching and axis specification . • Labeled tensors have issues with integration of DL blocks ( details in Appendix A ) . Proposed implementations of labeled tensors also break the common principle of decomposition in software engineering , which states that every function has its own scope with input names and names for intermediate variables . Everything that is shared between scopes should be described in the function signature . Whenever an internal structure of passed or returned entity should be shared between scopes , a type/class/interface/protocol is introduced to describe a passed argument . However , the concept of labeled tensor breaks this logic : it is assumed that called and calling functions agree on axes names , but no way to document these expectations is proposed . Alternative approach to increase readability and reliability of tensor-operating code is to deliberately set interface restrictions only on large neural modules such as language models , encoders or decoders , as in NeMo Kuchaiev et al . ( 2019 ) . While allowing to reuse and wrap existing code to glue large components , this approach does not improve internals of the modules where problems are harder to locate and code is less documented . These improvements of high-level interfaces still have their challenges , for example a language model can expect to manipulate sequences of letters and thus expects axis “ letter ” . However , surrounding code may try to use it for prediction of words , pixels or phonemes . Thus , relabeling of axes may be required to “ connect ” subsystems . In 2011 , M. Wiebe introduced an operation einsum in numpy package . With some simplifications ( absence of covariant and contravariant indices , contracted dimension may be not repeated ) einsum mimics Einstein summation rule commonly used in physics . numpy.einsum stands out from the rest of numpy API and for a long time rarely was mentioned in tutorials . However , function universality and expressiveness were beneficial , and it was ported to other packages : tensorflow , pytorch , mxnet , chainer Tokui et al . ( 2019 ) , etc . numpy.einsum ( 'ij , jk- > ik ' , A , B ) # matrix multiplication numpy.einsum ( 'ijk- > ij ' , C ) # sum over last axis numpy.einsum ( 'ij , ji- > ' , A , B ) # trace of matrix product einops revisits and expands this approach with an emphasis on complex tensor layouts and rearrangements , additional checks and broader functionality . In our work we try to align interface with einsum to allow smooth simultaneous usage . However , interface adjustments ( such as support for multi-character axes names ) are necessary . Most of our changes can be readily applied to einsum . Detailed discussion of differences between einops and einsum is given in Appendix B . There is an ongoing research to create languages for low-level definition of tensor operations with explicit indexing , e.g . Tensor Comprehensions ( Vasilache et al. , 2018 ) and Dex ( Paszke et al. , 2021 ) . 4 einops Einstein-Inspired Notation for OPerationS , einops , is our proposal to address problems mentioned in Section 2 . The core of our approach is a new notation for transformation patterns and , in its basic view , this notation enumerates the tensor elements in one-to-one-correspondence to the set of axes . As seen in examples below , we allow number of axes to be different from tensor dimensionality . The notation uses simple syntax , formally defined in Appendix C , and is based on the following rules : • axis present only in the input ( the left hand side ) is reduced ( e.g . with max-reduction ) • axis present only in the output is “ repeated ” ( tensor values are the same for all values of new axes ) • all axis identifiers on either side of expression should be unique Examples of einops transformation patterns are ' b c h w - > b h w c ' # transpose ' b c h w - > b c ' # reduce on h , w ' b c - > b c h w ' # repeat on h , w ' ( h1 h2 ) ( w1 w2 ) c - > ( h1 w1 ) h2 w2 c ' # split image to patches , stack them Each tensor pattern ensures one-to-one mapping between element ’ s positions in the tensor and values of axis variables . This requires all axes used in one tensor pattern to be different ( thus traces , permitted by einsum , are not provided by einops ) . This also requires that ellipsis can be used only once within a tensor pattern . The main novelty of our notation is the composition and decomposition of axes denoted by parenthesis . ( De ) composition uses C-ordering convention , intuitively associated with digits in a number : # x is of shape ( 10 , 10 , 10 , 10 ) , then x [ 6 , 2 , 4 , 9 ] == y [ 6249 ] y = rearrange ( x , ' a b c d - > ( a b c d ) ' ) Changing the rightmost of “ digits ” changes composed index in “ small steps ” , while any change in leftmost results in “ large steps ” , even when axes are not decimal : # Rearrange pattern that composes 3 axes into one : i1 i2 i3 - > ( i1 i2 i3 ) # Let original array have a shape of [ 2 , 3 , 2 ] , result has a length 2x3x2=12 i1 0 0 0 0 0 0 1 1 1 1 1 1 i2 0 0 1 1 2 2 0 0 1 1 2 2 i3 0 1 0 1 0 1 0 1 0 1 0 1 final position 0 1 2 3 4 5 6 7 8 9 10 11 Reverse pattern ( i1 i2 i3 ) - > i1 i2 i3 uses the same bijection to decompose an axis into three . Since axis can be decomposed in multiple ways ( e.g . 12 could be represented as 2 × 3 × 2 or 1× 12× 1 or 3× 1× 4 , etc . ) , additional axis size specifications are required during decomposition . The following rule is helpful for C-ordered arrays ( default ordering in all current backends ) : in case the order of axes does not change , result of rearrange is still a view of the original data . For example , rearrangement ' ( a b c ) ( d e f ) ( g h ) - > a b ( c d ) e ( f g h ) ' returns a view and no copy is required . Axes can be referred to by their size . These anonymous axes have the same role as named , but due to the lack of name they can ’ t be matched across different tensors . Unitary axes have a special meaning – they do not correspond to an axis variable , and thus their behavior is separate from anonymous axes . ' h w - > h w 1 ' # add unitary axis ' h w - > h w 3 ' # repeat values along new anonymous axis ' 1 h w 3 - > h w ' # remove unitary axis and reduce on anonymous axis of length 3 ' ... h w - > ... w h ' # transpose two last dimensions ' b ... c - > ( ... ) b c ' # compose all but first and last dimensions # and move resulting new axis to front ' b c ... - > b c ' # reduce on all but first two dimensions All anonymous axes are treated as different even if they share length . Similar to einsum , ellipsis works as a wildcard for zero or more axes , their number and lengths are derived from input shape ( s ) . Ellipses are not named ( grammar allows adding names later ) , thus all ellipses within a transformation pattern refer to the same group of unnamed axes . Pattern composition and decomposition became particularly helpful to leverage existing operations for data of higher dimensionality . E.g . if an attention function accepts tensors k , q , v of shape [ batch , seq , channel ] , one can turn it into multi-head attention for 3-dimensional data by composing height , width and depth to a single dimension , and grouping head and batch dimension to ensure independent processing of attention heads : b h w d head c - > ( b head ) ( h w d ) c. Likewise , other neural blocks can be “ upgraded ” by rearranging inputs and outputs . einops provides three functions ( rearrange , reduce , and repeat ) which are shown below in examples ( additional axes specifications are provided with * * kwargs ) : # organize 16 images in 4x4 grid rearrange ( im , ' ( b1 b2 ) h w c - > ( b1 h ) ( b2 w ) c ' , b1=4 , b2=4 ) # max-pooling with kernel of size 2x2 reduce ( im , ' b c ( h h2 ) ( w w2 ) - > b c h w ' , 'max ' , h2=2 , w2=2 ) # 2x upsampling of individual image by repeating pixels repeat ( im , ' h w c - > ( h h2 ) ( w w2 ) c ' , h2=2 , w2=2 , c=3 ) While all patterns could be handled by a single function instead of three , we made an explicit choice to separate scenarios of “ adding dimensions ” ( repeat ) , “ removing dimensions ” ( reduce ) and “ keeping number of elements the same ” ( rearrange ) . This helps in producing more specific error messages when a wrong pattern is passed.4 In einsum , when an axis is present in all tensors , operation performs independently for all values of this axis , which is principle in einops . A tensor pattern only identifies correspondence between axes and element ’ s position in tensor , but does not affect arithmetic operation ; this ensures that input and output patterns can be changed independently . In particular , rearrange is an arithmetic identity ( same value returned ) , but usage of different input and output patterns turns it into a rather universal tool for changing tensor shape/layout . Proposed notation addresses different problems of the mainstream approach : • Both input and output are described in the operation definition : tensor dimensionality and expected order of axes . This makes einops-based code more declarative and self-documenting . A user is not required to remember or infer shapes of tensors after every operation . • Input is checked for a number of dimensions and divisibility of corresponding dimensions . The length of dimension is checked if provided . • A tensor structure can not be broken by design , because the notation connects input axes ( or their constituents ) to output axes . • Axis enumeration is not used , so no way to make one-off mistake . • Users do not need to compute permutation of axes , those are computed from a pattern . • einops notation alleviates the need to track a tensor layout with patterns . • einops and einsum “ document ” inputs and outputs , simplifying inference of tensor shapes from the code for other tensors that are not direct input/output of einops , but are interacting or computed using direct inputs/outputs ( an example is given in Appendix E ) . We show versatility of einops by expressing common numpy ( np ) operations5 in Listing 1 1 np.transpose ( x , [ 0 , 3 , 1 , 2 ] ) rearrange ( x , ' b h w c - > b c h w ' ) 2 np.reshape ( x , rearrange ( x , ' h w c - > ( h w ) c ' ) 3 [ x.shape [ 0 ] * x.shape [ 1 ] , x.shape [ 2 ] ] ) 4 np.squeeze ( x , 0 ) rearrange ( x , ' ( ) h w c - > h w c ' ) 5 np.expand_dims ( x , -1 ) rearrange ( x , ' h w c - > h w c ( ) ' ) 6 np.stack ( [ r , g , b ] , axis=2 ) rearrange ( [ r , g , b ] , ' c h w - > h w c ' ) 7 np.concatenate ( [ r , g , b ] , axis=0 ) rearrange ( [ r , g , b ] , ' c h w - > ( c h ) w ' ) 4Post-factum we can confirm this choice : search over Github shows that rearrange , the most restrictive on possible patterns , also accounts for the majority of usages . 5Some examples use list inputs , details see in Appendix B . 8 np.flatten ( x ) rearrange ( x , ' b t c - > ( b t c ) ' ) 9 np.swap_axes ( x , 0 , 1 ) rearrange ( x , ' b t c - > t b c ' ) 10 left , right = np.split ( image , 2 , axis=1 ) rearrange ( x , ' h ( lr w ) c - > lr h w c ' , lr=2 ) 11 even , odd = x [ : , 0 : :2 ] , x [ : , 1 : :2 ] rearrange ( x , ' h ( w par ) - > par h w c ' , par=2 ) 12 np.max ( x , [ 1 , 2 ] ) reduce ( x , ' b h w c - > b c ' , 'max ' ) 13 np.mean ( x ) reduce ( x , ' b h w c - > ' , 'mean ' ) 14 np.mean ( x , axis= ( 1 , 2 ) , keepdims=True ) reduce ( x , ' b h w c - > b ( ) ( ) c ' , 'mean ' ) 15 np.reshape ( x , [ -1 , 2 ] ) .max ( axis=1 ) reduce ( x , ' ( h 2 ) - > h ' , 'max ' ) 16 np.repeat ( x , 2 , axis=1 ) repeat ( x , ' h w - > h ( w 2 ) ' ) 17 np.tile ( x , 2 , axis=1 ) repeat ( x , ' h w - > h ( 2 w ) ' ) 18 np.tile ( x [ : , : , np.newaxis ] , 3 , axis=2 ) repeat ( x , ' h w - > h w 3 ' ) Listing 1 : Correspondence between numpy and einops operations . | Operators are key elements in deep learning (TensorFlow, PyTorch, etc) or scientific computing (NumPy) frameworks. This paper introduces a generic, convenient and elegant way of massively describing large portion of frequently used operators under a unified framework, EinOps, inspired by einsum, or the Einstein summation convention. Under this convention, key components like multi-head attention in modern neural networks can be expressed with fewer lines of code. The major contribution of this work includes: - Presents a set of novel and highly expressive notations to represent hundreds of operators in modern deep learning frameworks; - Develops a library that interprets the proposed notations and offloads them to existing implementations in NumPy or TensorFlow, PyTorch; - Demonstrates significantly improved readability and debuggability with the proposed notations | SP:fac98e2dc5aec1c9d25932806f144bbda20ee033 |
Einops: Clear and Reliable Tensor Manipulations with Einstein-like Notation | 1 INTRODUCTION . Deep learning ( DL ) over the past decade achieved a significant progress in analysis and synthesis of images , audio and text ( Bengio et al. , 2017 ; Aggarwal et al. , 2018 ; Foster , 2019 ) . Tools relying on these methods became a commodity in production data pipelines . Available research-and-production frameworks for DL , such as pytorch ( Paszke et al. , 2019 ) , tensorflow ( Abadi et al. , 2015 ) , mxnet ( Chen et al. , 2015 ) , jax ( Bradbury et al. , 2018 ) , and others , vary in numerous aspects , but their core functionality is built around efficient computations on n-dimensional arrays ( tensors for brevity1 ) . API exposed by frameworks for tensor operations follow the same approach , that combines high efficiency ( specialized hardware can be utilized ) and user convenience : computations can be expressed in high-level languages , such as Python , using a limited number of exposed and usually pre-compiled operations . Due to growing usage of DL in production and rising complexity of models , it becomes increasingly more important to provide programming interfaces that enable reliable and scalable development . We demonstrate that approach to define tensor operations taken by existing frameworks does not encourage writing code that is easy to interpret , maintain or modify ; additionally , some of the core operations do not conduct sufficient checks and can lead to hard-to-catch mistakes . To address these problems , we propose Einstein-like notation for operations , called einops . We implement this approach in a Python ( Van Rossum & Drake , 2009 ) package to allow simple integration of notation into existing code across a variety of frameworks . Outline We first briefly describe mainstream approach for tensor operations and point to its issues with examples . We review previously proposed ideas to resolve mentioned problems in related works . Our approach , einops – a verbose notation for tensor manipulation – is introduced next , followed by the code examples in case studies . We implement the notation in a Python package , and explain main design choices in implementation details section . We conclude with a discussion of einops role and common criticisms . ∗Currently at Herophilus , Inc. 1Our sincere apologies to readers with backgrounds in mathematics and physics for possible confusion . 2 MAINSTREAM APPROACH FOR TENSOR OPERATIONS . Nowadays tensor programming is dominating in DL and playing a crucial role in scientific computing . It first appeared in APL ( Iverson , 1962 ) , was popularized by MATLAB ( Matlab , 1993 ) and was spread in Python community by numpy ( Harris et al. , 2020 ) , and now is provided by multiple frameworks . Currently , tensor manipulations in all mainstream frameworks are based on the following assumptions : • Tensor is an n-dimensional array with shape ( e.g . 4× 6× 3 ) and data type ( e.g . float32 ) . • When elements are matched across tensors , axes are aligned by order . Conventions regulate cases of different dimensionalities , e.g . broadcasting in Numpy ( 2021 ) . • Multiple operations act differently on axes . Those operations either have conventions about axes order ( e.g . recurrent units , convolutions ; convolutions expect input to be either BHWC or BCHW ordered ) or should be provided with indices of axes that should be treated separately:2 y = x.max ( axis=1 ) # some operations are provided with indices y = x.swap_axes ( 0 , 1 ) # of specially treated axes The mixed option is possible when operation has defaults for “ special axes ” that can be overridden during a call . Benefits of the mainstream approach are simple API and a baseline implementation , as well as versatility : a lot of research code operates solely using this kind of operations for number crunching . The drawbacks are absence of semantics in an operation and no way to reflect expected input and output . To predict output after a chain of manipulations a researcher/engineer has to carefully keep in the memory ( or in the code comments ) shape and contents of each intermediate tensor and thus keep track of every operation . In this listing a batch of images is collapsed into a single image by placing images in a row next to each other # im_stack has shape [ b , 3 , h , w ] y1 = im_stack.transpose ( 2 , 0 , 3 , 1 ) .reshape ( h , b * w , 3 ) y2 = im_stack.transpose ( 2 , 3 , 0 , 1 ) .reshape ( h , b * w , 3 ) One of y1 , y2 contains a correct image , while the other is irrelevant – it requires some time to figure out which is what . A typical computation chain contains multiple tensor operations ( only two in this example ) and requires writing down all intermediate steps to “ debug ” the code . Annoyingly , resulting tensors y1 and y2 have the same shapes and mistake in the code may stay under the radar for a long time since the code never errors out . The lack of stronger checks is a weak point of conventional operations . In most cases we also can not meaningfully visualize intermediate layers , so there is no way to narrow down searches for a problem source . Thus , a researcher/engineer has to check all the code after a failure . Traditional operations restrict code flexibility : any change in the shape agreements between parts of the code is hard to align and all related code fragments ( frequently located in different places ) should be updated simultaneously . In the next code fragment we add omitted batch dimension to the code from the vision permutator ( Hou et al. , 2021 ) , and then update code to support depth : # pytorch-like code without batch dimension , as in the paper x_h = x.reshape ( H , W , N , S ) .permute ( 2 , 1 , 0 , 3 ) .reshape ( N , W , H * S ) x_h = proj_h ( x_h ) .reshape ( N , W , H , S ) .permute ( 2 , 1 , 0 , 3 ) .reshape ( H , W , C ) # with batch dimension x_h = x.reshape ( B , H , W , N , S ) .permute ( 0 , 3 , 2 , 1 , 4 ) .reshape ( B , N , W , H * S ) x_h = proj_h ( x_h ) .reshape ( B , N , W , H , S ) .permute ( 0 , 3 , 2 , 1 , 4 ) .reshape ( B , H , W , C ) # with batch and depth dimension x_h = x.reshape ( B , H , W , D , N , S ) .permute ( 0 , 4 , 2 , 3 , 1 , 5 ) .reshape ( B , N , W , D , H * S ) x_h = proj_h ( x_h ) .reshape ( B , N , W , D , H , S ) .permute ( 0 , 4 , 2 , 3 , 1 , 5 ) .reshape ( B , H , W , D , C ) 2Pseudocode in the paper corresponds to numpy unless otherwise stated . There is no way to write crossframework code . This problem we partially address with proposed einops notation . Modifications are very error-prone : all indices should be recomputed and order of reshape operands should be verified . Uncommonly , this fragment is quite self-documenting since final reshape in each line hints the intended order of axes after the transposition . In DL code it is common to use x.transpose ( 0 , 3 , 1 , 2 ) expecting other users to recognize a familiar pattern or leaving a comment.3 Related , transposition in the code requires operating with three contexts in mind ( original order of axes , permutation , result order ) , and even when simplified to just permutation , it ’ s unclear if permutation ( 2 0 3 1 ) is inverse to ( 1 3 0 2 ) . Less critical , but still notable source of mistakes is 0-based enumeration of axes ( Julia , MATLAB and R use 1-based ) , while we propose the framework not relying on axis numeration at all . Common to refer to axis with index 0 as “ first axis/dimension ” ( see e.g . numpy documentation ) , and there is no way to change this habit and avoid confusion between human communication and code . Finally , common tensor operations can easily break the tensor structure . For example , reshape , a common operation in the DL code , easily breaks the tensor structure because a whole tensor is treated as a sequence and no connection is assumed between axes in input and output , see Figure 1 . Aforementioned implementation mistakes can result in rejecting valuable research or drawing incorrect conclusion about the data . Moreover , there is no recipe to identify incorrect implementation , because the result tensor shape and data type are not affected by an error . Even the presence of an error can be obscured : poor performance can be misattributed to a number of other factors : data , hyperparameters , method , etc . All pointed issues have catastrophic importance for research costs and timeline in a setting where one experiment requires dozens to thousands of GPU-hours . A number of recently proposed architectures ( Wu et al. , 2021 ; Tolstikhin et al. , 2021 ; Jumper et al. , 2021 ; Liu et al. , 2021 ; Hou et al. , 2021 ; Touvron et al. , 2021 ) demonstrate that conservative approach with fixed ordering of axes ( like BCHW for convolutional networks ) is not sufficient . Existing frameworks carry this imprint that does not help with searches for new architectures . 3 RELATED WORKS . A commonly taken approach to increase reliability is assigning names/labels to tensor dimensions ( below we refer to them as labeled tensors ) . Most known implementations are xarray ( Hoyer & Hamman , 2017 ) , labeled_tensor in tensorflow ( Christiansen & Hoyer , 2016 ) , namedtensor ( 2019 ) , and named tensors in Pytorch ( 2019 ) . Despite being around for many years , this idea got little adoption , and not used in the DL code : development stopped for labeled_tensor and namedtensor , and named tensors in pytorch are still experimental . In this approach , operations match tensor axes based on labels ( common choice of label is string name ) , and rely on axis label instead of axes order , e.g . : # x1 has axes ( x , y , height ) and x2 has axes ( time , x , y ) x1 + x2 # result has axes ( x , y , height , time ) , maybe in a different order x1.mean ( 'height ' ) # reduce over axis named 'height' 3Out of 50 last usages of torch.permute in Python on GitHub on 22 Nov 2021 , only in 4 cases code had comments about result shape , in other cases no information was provided in any other form , including reshape . Axes matching rules vary across implementations . However , we can describe some common issues why this approach did not gain wide support in the DL community : • Operations focus on modified axes , and neither describe input nor output ; a user has to remember axes labels for each of intermediate tensors . • Less control over data layout : order of axes may significantly influence speed ( Weber & Goesele , 2017 ) , but is not transparent . • Names should be strictly defined and mistakes in names or their alignment between modules may result in the wrong computations , not an exception , e.g . for namedtensor package : # x1 has axes ( height , width ) # x2 has axes ( h , w ) # x3 has axes ( heigt ) x1 + x2 + x3 # has axes ( height width h w heigt ) in some order • Adoption requires a strong buy-in decision , as all code should be axis label-centric . In contrary , transition to labeled tensors in isolated code pieces only ( e.g . functions ) does not prevent ( more elusive ) errors in interaction between functions , but introduces constant conversions between the code styles . Third-party components need wrapping to support labels . • Symmetric and antisymmetric tensors with multiple identical axes pose an additional challenge : all axes labels should be unique to allow matching and axis specification . • Labeled tensors have issues with integration of DL blocks ( details in Appendix A ) . Proposed implementations of labeled tensors also break the common principle of decomposition in software engineering , which states that every function has its own scope with input names and names for intermediate variables . Everything that is shared between scopes should be described in the function signature . Whenever an internal structure of passed or returned entity should be shared between scopes , a type/class/interface/protocol is introduced to describe a passed argument . However , the concept of labeled tensor breaks this logic : it is assumed that called and calling functions agree on axes names , but no way to document these expectations is proposed . Alternative approach to increase readability and reliability of tensor-operating code is to deliberately set interface restrictions only on large neural modules such as language models , encoders or decoders , as in NeMo Kuchaiev et al . ( 2019 ) . While allowing to reuse and wrap existing code to glue large components , this approach does not improve internals of the modules where problems are harder to locate and code is less documented . These improvements of high-level interfaces still have their challenges , for example a language model can expect to manipulate sequences of letters and thus expects axis “ letter ” . However , surrounding code may try to use it for prediction of words , pixels or phonemes . Thus , relabeling of axes may be required to “ connect ” subsystems . In 2011 , M. Wiebe introduced an operation einsum in numpy package . With some simplifications ( absence of covariant and contravariant indices , contracted dimension may be not repeated ) einsum mimics Einstein summation rule commonly used in physics . numpy.einsum stands out from the rest of numpy API and for a long time rarely was mentioned in tutorials . However , function universality and expressiveness were beneficial , and it was ported to other packages : tensorflow , pytorch , mxnet , chainer Tokui et al . ( 2019 ) , etc . numpy.einsum ( 'ij , jk- > ik ' , A , B ) # matrix multiplication numpy.einsum ( 'ijk- > ij ' , C ) # sum over last axis numpy.einsum ( 'ij , ji- > ' , A , B ) # trace of matrix product einops revisits and expands this approach with an emphasis on complex tensor layouts and rearrangements , additional checks and broader functionality . In our work we try to align interface with einsum to allow smooth simultaneous usage . However , interface adjustments ( such as support for multi-character axes names ) are necessary . Most of our changes can be readily applied to einsum . Detailed discussion of differences between einops and einsum is given in Appendix B . There is an ongoing research to create languages for low-level definition of tensor operations with explicit indexing , e.g . Tensor Comprehensions ( Vasilache et al. , 2018 ) and Dex ( Paszke et al. , 2021 ) . 4 einops Einstein-Inspired Notation for OPerationS , einops , is our proposal to address problems mentioned in Section 2 . The core of our approach is a new notation for transformation patterns and , in its basic view , this notation enumerates the tensor elements in one-to-one-correspondence to the set of axes . As seen in examples below , we allow number of axes to be different from tensor dimensionality . The notation uses simple syntax , formally defined in Appendix C , and is based on the following rules : • axis present only in the input ( the left hand side ) is reduced ( e.g . with max-reduction ) • axis present only in the output is “ repeated ” ( tensor values are the same for all values of new axes ) • all axis identifiers on either side of expression should be unique Examples of einops transformation patterns are ' b c h w - > b h w c ' # transpose ' b c h w - > b c ' # reduce on h , w ' b c - > b c h w ' # repeat on h , w ' ( h1 h2 ) ( w1 w2 ) c - > ( h1 w1 ) h2 w2 c ' # split image to patches , stack them Each tensor pattern ensures one-to-one mapping between element ’ s positions in the tensor and values of axis variables . This requires all axes used in one tensor pattern to be different ( thus traces , permitted by einsum , are not provided by einops ) . This also requires that ellipsis can be used only once within a tensor pattern . The main novelty of our notation is the composition and decomposition of axes denoted by parenthesis . ( De ) composition uses C-ordering convention , intuitively associated with digits in a number : # x is of shape ( 10 , 10 , 10 , 10 ) , then x [ 6 , 2 , 4 , 9 ] == y [ 6249 ] y = rearrange ( x , ' a b c d - > ( a b c d ) ' ) Changing the rightmost of “ digits ” changes composed index in “ small steps ” , while any change in leftmost results in “ large steps ” , even when axes are not decimal : # Rearrange pattern that composes 3 axes into one : i1 i2 i3 - > ( i1 i2 i3 ) # Let original array have a shape of [ 2 , 3 , 2 ] , result has a length 2x3x2=12 i1 0 0 0 0 0 0 1 1 1 1 1 1 i2 0 0 1 1 2 2 0 0 1 1 2 2 i3 0 1 0 1 0 1 0 1 0 1 0 1 final position 0 1 2 3 4 5 6 7 8 9 10 11 Reverse pattern ( i1 i2 i3 ) - > i1 i2 i3 uses the same bijection to decompose an axis into three . Since axis can be decomposed in multiple ways ( e.g . 12 could be represented as 2 × 3 × 2 or 1× 12× 1 or 3× 1× 4 , etc . ) , additional axis size specifications are required during decomposition . The following rule is helpful for C-ordered arrays ( default ordering in all current backends ) : in case the order of axes does not change , result of rearrange is still a view of the original data . For example , rearrangement ' ( a b c ) ( d e f ) ( g h ) - > a b ( c d ) e ( f g h ) ' returns a view and no copy is required . Axes can be referred to by their size . These anonymous axes have the same role as named , but due to the lack of name they can ’ t be matched across different tensors . Unitary axes have a special meaning – they do not correspond to an axis variable , and thus their behavior is separate from anonymous axes . ' h w - > h w 1 ' # add unitary axis ' h w - > h w 3 ' # repeat values along new anonymous axis ' 1 h w 3 - > h w ' # remove unitary axis and reduce on anonymous axis of length 3 ' ... h w - > ... w h ' # transpose two last dimensions ' b ... c - > ( ... ) b c ' # compose all but first and last dimensions # and move resulting new axis to front ' b c ... - > b c ' # reduce on all but first two dimensions All anonymous axes are treated as different even if they share length . Similar to einsum , ellipsis works as a wildcard for zero or more axes , their number and lengths are derived from input shape ( s ) . Ellipses are not named ( grammar allows adding names later ) , thus all ellipses within a transformation pattern refer to the same group of unnamed axes . Pattern composition and decomposition became particularly helpful to leverage existing operations for data of higher dimensionality . E.g . if an attention function accepts tensors k , q , v of shape [ batch , seq , channel ] , one can turn it into multi-head attention for 3-dimensional data by composing height , width and depth to a single dimension , and grouping head and batch dimension to ensure independent processing of attention heads : b h w d head c - > ( b head ) ( h w d ) c. Likewise , other neural blocks can be “ upgraded ” by rearranging inputs and outputs . einops provides three functions ( rearrange , reduce , and repeat ) which are shown below in examples ( additional axes specifications are provided with * * kwargs ) : # organize 16 images in 4x4 grid rearrange ( im , ' ( b1 b2 ) h w c - > ( b1 h ) ( b2 w ) c ' , b1=4 , b2=4 ) # max-pooling with kernel of size 2x2 reduce ( im , ' b c ( h h2 ) ( w w2 ) - > b c h w ' , 'max ' , h2=2 , w2=2 ) # 2x upsampling of individual image by repeating pixels repeat ( im , ' h w c - > ( h h2 ) ( w w2 ) c ' , h2=2 , w2=2 , c=3 ) While all patterns could be handled by a single function instead of three , we made an explicit choice to separate scenarios of “ adding dimensions ” ( repeat ) , “ removing dimensions ” ( reduce ) and “ keeping number of elements the same ” ( rearrange ) . This helps in producing more specific error messages when a wrong pattern is passed.4 In einsum , when an axis is present in all tensors , operation performs independently for all values of this axis , which is principle in einops . A tensor pattern only identifies correspondence between axes and element ’ s position in tensor , but does not affect arithmetic operation ; this ensures that input and output patterns can be changed independently . In particular , rearrange is an arithmetic identity ( same value returned ) , but usage of different input and output patterns turns it into a rather universal tool for changing tensor shape/layout . Proposed notation addresses different problems of the mainstream approach : • Both input and output are described in the operation definition : tensor dimensionality and expected order of axes . This makes einops-based code more declarative and self-documenting . A user is not required to remember or infer shapes of tensors after every operation . • Input is checked for a number of dimensions and divisibility of corresponding dimensions . The length of dimension is checked if provided . • A tensor structure can not be broken by design , because the notation connects input axes ( or their constituents ) to output axes . • Axis enumeration is not used , so no way to make one-off mistake . • Users do not need to compute permutation of axes , those are computed from a pattern . • einops notation alleviates the need to track a tensor layout with patterns . • einops and einsum “ document ” inputs and outputs , simplifying inference of tensor shapes from the code for other tensors that are not direct input/output of einops , but are interacting or computed using direct inputs/outputs ( an example is given in Appendix E ) . We show versatility of einops by expressing common numpy ( np ) operations5 in Listing 1 1 np.transpose ( x , [ 0 , 3 , 1 , 2 ] ) rearrange ( x , ' b h w c - > b c h w ' ) 2 np.reshape ( x , rearrange ( x , ' h w c - > ( h w ) c ' ) 3 [ x.shape [ 0 ] * x.shape [ 1 ] , x.shape [ 2 ] ] ) 4 np.squeeze ( x , 0 ) rearrange ( x , ' ( ) h w c - > h w c ' ) 5 np.expand_dims ( x , -1 ) rearrange ( x , ' h w c - > h w c ( ) ' ) 6 np.stack ( [ r , g , b ] , axis=2 ) rearrange ( [ r , g , b ] , ' c h w - > h w c ' ) 7 np.concatenate ( [ r , g , b ] , axis=0 ) rearrange ( [ r , g , b ] , ' c h w - > ( c h ) w ' ) 4Post-factum we can confirm this choice : search over Github shows that rearrange , the most restrictive on possible patterns , also accounts for the majority of usages . 5Some examples use list inputs , details see in Appendix B . 8 np.flatten ( x ) rearrange ( x , ' b t c - > ( b t c ) ' ) 9 np.swap_axes ( x , 0 , 1 ) rearrange ( x , ' b t c - > t b c ' ) 10 left , right = np.split ( image , 2 , axis=1 ) rearrange ( x , ' h ( lr w ) c - > lr h w c ' , lr=2 ) 11 even , odd = x [ : , 0 : :2 ] , x [ : , 1 : :2 ] rearrange ( x , ' h ( w par ) - > par h w c ' , par=2 ) 12 np.max ( x , [ 1 , 2 ] ) reduce ( x , ' b h w c - > b c ' , 'max ' ) 13 np.mean ( x ) reduce ( x , ' b h w c - > ' , 'mean ' ) 14 np.mean ( x , axis= ( 1 , 2 ) , keepdims=True ) reduce ( x , ' b h w c - > b ( ) ( ) c ' , 'mean ' ) 15 np.reshape ( x , [ -1 , 2 ] ) .max ( axis=1 ) reduce ( x , ' ( h 2 ) - > h ' , 'max ' ) 16 np.repeat ( x , 2 , axis=1 ) repeat ( x , ' h w - > h ( w 2 ) ' ) 17 np.tile ( x , 2 , axis=1 ) repeat ( x , ' h w - > h ( 2 w ) ' ) 18 np.tile ( x [ : , : , np.newaxis ] , 3 , axis=2 ) repeat ( x , ' h w - > h w 3 ' ) Listing 1 : Correspondence between numpy and einops operations . | This paper extends the Einstein summation notation (einsum) of Numpy to introduce some additional features: - naming axes arbitrarily (i.e., with more than a single character); - controlling how groups of axes are flattened (called "rearranging" in the paper); - repeating axes; - reducing axes with different operations other than the sum. The notation is implemented in a Python library called "einops" that works with different backends for tensor computation (PyTorch, TensorFlow, Jax, etc.). | SP:fac98e2dc5aec1c9d25932806f144bbda20ee033 |
Einops: Clear and Reliable Tensor Manipulations with Einstein-like Notation | 1 INTRODUCTION . Deep learning ( DL ) over the past decade achieved a significant progress in analysis and synthesis of images , audio and text ( Bengio et al. , 2017 ; Aggarwal et al. , 2018 ; Foster , 2019 ) . Tools relying on these methods became a commodity in production data pipelines . Available research-and-production frameworks for DL , such as pytorch ( Paszke et al. , 2019 ) , tensorflow ( Abadi et al. , 2015 ) , mxnet ( Chen et al. , 2015 ) , jax ( Bradbury et al. , 2018 ) , and others , vary in numerous aspects , but their core functionality is built around efficient computations on n-dimensional arrays ( tensors for brevity1 ) . API exposed by frameworks for tensor operations follow the same approach , that combines high efficiency ( specialized hardware can be utilized ) and user convenience : computations can be expressed in high-level languages , such as Python , using a limited number of exposed and usually pre-compiled operations . Due to growing usage of DL in production and rising complexity of models , it becomes increasingly more important to provide programming interfaces that enable reliable and scalable development . We demonstrate that approach to define tensor operations taken by existing frameworks does not encourage writing code that is easy to interpret , maintain or modify ; additionally , some of the core operations do not conduct sufficient checks and can lead to hard-to-catch mistakes . To address these problems , we propose Einstein-like notation for operations , called einops . We implement this approach in a Python ( Van Rossum & Drake , 2009 ) package to allow simple integration of notation into existing code across a variety of frameworks . Outline We first briefly describe mainstream approach for tensor operations and point to its issues with examples . We review previously proposed ideas to resolve mentioned problems in related works . Our approach , einops – a verbose notation for tensor manipulation – is introduced next , followed by the code examples in case studies . We implement the notation in a Python package , and explain main design choices in implementation details section . We conclude with a discussion of einops role and common criticisms . ∗Currently at Herophilus , Inc. 1Our sincere apologies to readers with backgrounds in mathematics and physics for possible confusion . 2 MAINSTREAM APPROACH FOR TENSOR OPERATIONS . Nowadays tensor programming is dominating in DL and playing a crucial role in scientific computing . It first appeared in APL ( Iverson , 1962 ) , was popularized by MATLAB ( Matlab , 1993 ) and was spread in Python community by numpy ( Harris et al. , 2020 ) , and now is provided by multiple frameworks . Currently , tensor manipulations in all mainstream frameworks are based on the following assumptions : • Tensor is an n-dimensional array with shape ( e.g . 4× 6× 3 ) and data type ( e.g . float32 ) . • When elements are matched across tensors , axes are aligned by order . Conventions regulate cases of different dimensionalities , e.g . broadcasting in Numpy ( 2021 ) . • Multiple operations act differently on axes . Those operations either have conventions about axes order ( e.g . recurrent units , convolutions ; convolutions expect input to be either BHWC or BCHW ordered ) or should be provided with indices of axes that should be treated separately:2 y = x.max ( axis=1 ) # some operations are provided with indices y = x.swap_axes ( 0 , 1 ) # of specially treated axes The mixed option is possible when operation has defaults for “ special axes ” that can be overridden during a call . Benefits of the mainstream approach are simple API and a baseline implementation , as well as versatility : a lot of research code operates solely using this kind of operations for number crunching . The drawbacks are absence of semantics in an operation and no way to reflect expected input and output . To predict output after a chain of manipulations a researcher/engineer has to carefully keep in the memory ( or in the code comments ) shape and contents of each intermediate tensor and thus keep track of every operation . In this listing a batch of images is collapsed into a single image by placing images in a row next to each other # im_stack has shape [ b , 3 , h , w ] y1 = im_stack.transpose ( 2 , 0 , 3 , 1 ) .reshape ( h , b * w , 3 ) y2 = im_stack.transpose ( 2 , 3 , 0 , 1 ) .reshape ( h , b * w , 3 ) One of y1 , y2 contains a correct image , while the other is irrelevant – it requires some time to figure out which is what . A typical computation chain contains multiple tensor operations ( only two in this example ) and requires writing down all intermediate steps to “ debug ” the code . Annoyingly , resulting tensors y1 and y2 have the same shapes and mistake in the code may stay under the radar for a long time since the code never errors out . The lack of stronger checks is a weak point of conventional operations . In most cases we also can not meaningfully visualize intermediate layers , so there is no way to narrow down searches for a problem source . Thus , a researcher/engineer has to check all the code after a failure . Traditional operations restrict code flexibility : any change in the shape agreements between parts of the code is hard to align and all related code fragments ( frequently located in different places ) should be updated simultaneously . In the next code fragment we add omitted batch dimension to the code from the vision permutator ( Hou et al. , 2021 ) , and then update code to support depth : # pytorch-like code without batch dimension , as in the paper x_h = x.reshape ( H , W , N , S ) .permute ( 2 , 1 , 0 , 3 ) .reshape ( N , W , H * S ) x_h = proj_h ( x_h ) .reshape ( N , W , H , S ) .permute ( 2 , 1 , 0 , 3 ) .reshape ( H , W , C ) # with batch dimension x_h = x.reshape ( B , H , W , N , S ) .permute ( 0 , 3 , 2 , 1 , 4 ) .reshape ( B , N , W , H * S ) x_h = proj_h ( x_h ) .reshape ( B , N , W , H , S ) .permute ( 0 , 3 , 2 , 1 , 4 ) .reshape ( B , H , W , C ) # with batch and depth dimension x_h = x.reshape ( B , H , W , D , N , S ) .permute ( 0 , 4 , 2 , 3 , 1 , 5 ) .reshape ( B , N , W , D , H * S ) x_h = proj_h ( x_h ) .reshape ( B , N , W , D , H , S ) .permute ( 0 , 4 , 2 , 3 , 1 , 5 ) .reshape ( B , H , W , D , C ) 2Pseudocode in the paper corresponds to numpy unless otherwise stated . There is no way to write crossframework code . This problem we partially address with proposed einops notation . Modifications are very error-prone : all indices should be recomputed and order of reshape operands should be verified . Uncommonly , this fragment is quite self-documenting since final reshape in each line hints the intended order of axes after the transposition . In DL code it is common to use x.transpose ( 0 , 3 , 1 , 2 ) expecting other users to recognize a familiar pattern or leaving a comment.3 Related , transposition in the code requires operating with three contexts in mind ( original order of axes , permutation , result order ) , and even when simplified to just permutation , it ’ s unclear if permutation ( 2 0 3 1 ) is inverse to ( 1 3 0 2 ) . Less critical , but still notable source of mistakes is 0-based enumeration of axes ( Julia , MATLAB and R use 1-based ) , while we propose the framework not relying on axis numeration at all . Common to refer to axis with index 0 as “ first axis/dimension ” ( see e.g . numpy documentation ) , and there is no way to change this habit and avoid confusion between human communication and code . Finally , common tensor operations can easily break the tensor structure . For example , reshape , a common operation in the DL code , easily breaks the tensor structure because a whole tensor is treated as a sequence and no connection is assumed between axes in input and output , see Figure 1 . Aforementioned implementation mistakes can result in rejecting valuable research or drawing incorrect conclusion about the data . Moreover , there is no recipe to identify incorrect implementation , because the result tensor shape and data type are not affected by an error . Even the presence of an error can be obscured : poor performance can be misattributed to a number of other factors : data , hyperparameters , method , etc . All pointed issues have catastrophic importance for research costs and timeline in a setting where one experiment requires dozens to thousands of GPU-hours . A number of recently proposed architectures ( Wu et al. , 2021 ; Tolstikhin et al. , 2021 ; Jumper et al. , 2021 ; Liu et al. , 2021 ; Hou et al. , 2021 ; Touvron et al. , 2021 ) demonstrate that conservative approach with fixed ordering of axes ( like BCHW for convolutional networks ) is not sufficient . Existing frameworks carry this imprint that does not help with searches for new architectures . 3 RELATED WORKS . A commonly taken approach to increase reliability is assigning names/labels to tensor dimensions ( below we refer to them as labeled tensors ) . Most known implementations are xarray ( Hoyer & Hamman , 2017 ) , labeled_tensor in tensorflow ( Christiansen & Hoyer , 2016 ) , namedtensor ( 2019 ) , and named tensors in Pytorch ( 2019 ) . Despite being around for many years , this idea got little adoption , and not used in the DL code : development stopped for labeled_tensor and namedtensor , and named tensors in pytorch are still experimental . In this approach , operations match tensor axes based on labels ( common choice of label is string name ) , and rely on axis label instead of axes order , e.g . : # x1 has axes ( x , y , height ) and x2 has axes ( time , x , y ) x1 + x2 # result has axes ( x , y , height , time ) , maybe in a different order x1.mean ( 'height ' ) # reduce over axis named 'height' 3Out of 50 last usages of torch.permute in Python on GitHub on 22 Nov 2021 , only in 4 cases code had comments about result shape , in other cases no information was provided in any other form , including reshape . Axes matching rules vary across implementations . However , we can describe some common issues why this approach did not gain wide support in the DL community : • Operations focus on modified axes , and neither describe input nor output ; a user has to remember axes labels for each of intermediate tensors . • Less control over data layout : order of axes may significantly influence speed ( Weber & Goesele , 2017 ) , but is not transparent . • Names should be strictly defined and mistakes in names or their alignment between modules may result in the wrong computations , not an exception , e.g . for namedtensor package : # x1 has axes ( height , width ) # x2 has axes ( h , w ) # x3 has axes ( heigt ) x1 + x2 + x3 # has axes ( height width h w heigt ) in some order • Adoption requires a strong buy-in decision , as all code should be axis label-centric . In contrary , transition to labeled tensors in isolated code pieces only ( e.g . functions ) does not prevent ( more elusive ) errors in interaction between functions , but introduces constant conversions between the code styles . Third-party components need wrapping to support labels . • Symmetric and antisymmetric tensors with multiple identical axes pose an additional challenge : all axes labels should be unique to allow matching and axis specification . • Labeled tensors have issues with integration of DL blocks ( details in Appendix A ) . Proposed implementations of labeled tensors also break the common principle of decomposition in software engineering , which states that every function has its own scope with input names and names for intermediate variables . Everything that is shared between scopes should be described in the function signature . Whenever an internal structure of passed or returned entity should be shared between scopes , a type/class/interface/protocol is introduced to describe a passed argument . However , the concept of labeled tensor breaks this logic : it is assumed that called and calling functions agree on axes names , but no way to document these expectations is proposed . Alternative approach to increase readability and reliability of tensor-operating code is to deliberately set interface restrictions only on large neural modules such as language models , encoders or decoders , as in NeMo Kuchaiev et al . ( 2019 ) . While allowing to reuse and wrap existing code to glue large components , this approach does not improve internals of the modules where problems are harder to locate and code is less documented . These improvements of high-level interfaces still have their challenges , for example a language model can expect to manipulate sequences of letters and thus expects axis “ letter ” . However , surrounding code may try to use it for prediction of words , pixels or phonemes . Thus , relabeling of axes may be required to “ connect ” subsystems . In 2011 , M. Wiebe introduced an operation einsum in numpy package . With some simplifications ( absence of covariant and contravariant indices , contracted dimension may be not repeated ) einsum mimics Einstein summation rule commonly used in physics . numpy.einsum stands out from the rest of numpy API and for a long time rarely was mentioned in tutorials . However , function universality and expressiveness were beneficial , and it was ported to other packages : tensorflow , pytorch , mxnet , chainer Tokui et al . ( 2019 ) , etc . numpy.einsum ( 'ij , jk- > ik ' , A , B ) # matrix multiplication numpy.einsum ( 'ijk- > ij ' , C ) # sum over last axis numpy.einsum ( 'ij , ji- > ' , A , B ) # trace of matrix product einops revisits and expands this approach with an emphasis on complex tensor layouts and rearrangements , additional checks and broader functionality . In our work we try to align interface with einsum to allow smooth simultaneous usage . However , interface adjustments ( such as support for multi-character axes names ) are necessary . Most of our changes can be readily applied to einsum . Detailed discussion of differences between einops and einsum is given in Appendix B . There is an ongoing research to create languages for low-level definition of tensor operations with explicit indexing , e.g . Tensor Comprehensions ( Vasilache et al. , 2018 ) and Dex ( Paszke et al. , 2021 ) . 4 einops Einstein-Inspired Notation for OPerationS , einops , is our proposal to address problems mentioned in Section 2 . The core of our approach is a new notation for transformation patterns and , in its basic view , this notation enumerates the tensor elements in one-to-one-correspondence to the set of axes . As seen in examples below , we allow number of axes to be different from tensor dimensionality . The notation uses simple syntax , formally defined in Appendix C , and is based on the following rules : • axis present only in the input ( the left hand side ) is reduced ( e.g . with max-reduction ) • axis present only in the output is “ repeated ” ( tensor values are the same for all values of new axes ) • all axis identifiers on either side of expression should be unique Examples of einops transformation patterns are ' b c h w - > b h w c ' # transpose ' b c h w - > b c ' # reduce on h , w ' b c - > b c h w ' # repeat on h , w ' ( h1 h2 ) ( w1 w2 ) c - > ( h1 w1 ) h2 w2 c ' # split image to patches , stack them Each tensor pattern ensures one-to-one mapping between element ’ s positions in the tensor and values of axis variables . This requires all axes used in one tensor pattern to be different ( thus traces , permitted by einsum , are not provided by einops ) . This also requires that ellipsis can be used only once within a tensor pattern . The main novelty of our notation is the composition and decomposition of axes denoted by parenthesis . ( De ) composition uses C-ordering convention , intuitively associated with digits in a number : # x is of shape ( 10 , 10 , 10 , 10 ) , then x [ 6 , 2 , 4 , 9 ] == y [ 6249 ] y = rearrange ( x , ' a b c d - > ( a b c d ) ' ) Changing the rightmost of “ digits ” changes composed index in “ small steps ” , while any change in leftmost results in “ large steps ” , even when axes are not decimal : # Rearrange pattern that composes 3 axes into one : i1 i2 i3 - > ( i1 i2 i3 ) # Let original array have a shape of [ 2 , 3 , 2 ] , result has a length 2x3x2=12 i1 0 0 0 0 0 0 1 1 1 1 1 1 i2 0 0 1 1 2 2 0 0 1 1 2 2 i3 0 1 0 1 0 1 0 1 0 1 0 1 final position 0 1 2 3 4 5 6 7 8 9 10 11 Reverse pattern ( i1 i2 i3 ) - > i1 i2 i3 uses the same bijection to decompose an axis into three . Since axis can be decomposed in multiple ways ( e.g . 12 could be represented as 2 × 3 × 2 or 1× 12× 1 or 3× 1× 4 , etc . ) , additional axis size specifications are required during decomposition . The following rule is helpful for C-ordered arrays ( default ordering in all current backends ) : in case the order of axes does not change , result of rearrange is still a view of the original data . For example , rearrangement ' ( a b c ) ( d e f ) ( g h ) - > a b ( c d ) e ( f g h ) ' returns a view and no copy is required . Axes can be referred to by their size . These anonymous axes have the same role as named , but due to the lack of name they can ’ t be matched across different tensors . Unitary axes have a special meaning – they do not correspond to an axis variable , and thus their behavior is separate from anonymous axes . ' h w - > h w 1 ' # add unitary axis ' h w - > h w 3 ' # repeat values along new anonymous axis ' 1 h w 3 - > h w ' # remove unitary axis and reduce on anonymous axis of length 3 ' ... h w - > ... w h ' # transpose two last dimensions ' b ... c - > ( ... ) b c ' # compose all but first and last dimensions # and move resulting new axis to front ' b c ... - > b c ' # reduce on all but first two dimensions All anonymous axes are treated as different even if they share length . Similar to einsum , ellipsis works as a wildcard for zero or more axes , their number and lengths are derived from input shape ( s ) . Ellipses are not named ( grammar allows adding names later ) , thus all ellipses within a transformation pattern refer to the same group of unnamed axes . Pattern composition and decomposition became particularly helpful to leverage existing operations for data of higher dimensionality . E.g . if an attention function accepts tensors k , q , v of shape [ batch , seq , channel ] , one can turn it into multi-head attention for 3-dimensional data by composing height , width and depth to a single dimension , and grouping head and batch dimension to ensure independent processing of attention heads : b h w d head c - > ( b head ) ( h w d ) c. Likewise , other neural blocks can be “ upgraded ” by rearranging inputs and outputs . einops provides three functions ( rearrange , reduce , and repeat ) which are shown below in examples ( additional axes specifications are provided with * * kwargs ) : # organize 16 images in 4x4 grid rearrange ( im , ' ( b1 b2 ) h w c - > ( b1 h ) ( b2 w ) c ' , b1=4 , b2=4 ) # max-pooling with kernel of size 2x2 reduce ( im , ' b c ( h h2 ) ( w w2 ) - > b c h w ' , 'max ' , h2=2 , w2=2 ) # 2x upsampling of individual image by repeating pixels repeat ( im , ' h w c - > ( h h2 ) ( w w2 ) c ' , h2=2 , w2=2 , c=3 ) While all patterns could be handled by a single function instead of three , we made an explicit choice to separate scenarios of “ adding dimensions ” ( repeat ) , “ removing dimensions ” ( reduce ) and “ keeping number of elements the same ” ( rearrange ) . This helps in producing more specific error messages when a wrong pattern is passed.4 In einsum , when an axis is present in all tensors , operation performs independently for all values of this axis , which is principle in einops . A tensor pattern only identifies correspondence between axes and element ’ s position in tensor , but does not affect arithmetic operation ; this ensures that input and output patterns can be changed independently . In particular , rearrange is an arithmetic identity ( same value returned ) , but usage of different input and output patterns turns it into a rather universal tool for changing tensor shape/layout . Proposed notation addresses different problems of the mainstream approach : • Both input and output are described in the operation definition : tensor dimensionality and expected order of axes . This makes einops-based code more declarative and self-documenting . A user is not required to remember or infer shapes of tensors after every operation . • Input is checked for a number of dimensions and divisibility of corresponding dimensions . The length of dimension is checked if provided . • A tensor structure can not be broken by design , because the notation connects input axes ( or their constituents ) to output axes . • Axis enumeration is not used , so no way to make one-off mistake . • Users do not need to compute permutation of axes , those are computed from a pattern . • einops notation alleviates the need to track a tensor layout with patterns . • einops and einsum “ document ” inputs and outputs , simplifying inference of tensor shapes from the code for other tensors that are not direct input/output of einops , but are interacting or computed using direct inputs/outputs ( an example is given in Appendix E ) . We show versatility of einops by expressing common numpy ( np ) operations5 in Listing 1 1 np.transpose ( x , [ 0 , 3 , 1 , 2 ] ) rearrange ( x , ' b h w c - > b c h w ' ) 2 np.reshape ( x , rearrange ( x , ' h w c - > ( h w ) c ' ) 3 [ x.shape [ 0 ] * x.shape [ 1 ] , x.shape [ 2 ] ] ) 4 np.squeeze ( x , 0 ) rearrange ( x , ' ( ) h w c - > h w c ' ) 5 np.expand_dims ( x , -1 ) rearrange ( x , ' h w c - > h w c ( ) ' ) 6 np.stack ( [ r , g , b ] , axis=2 ) rearrange ( [ r , g , b ] , ' c h w - > h w c ' ) 7 np.concatenate ( [ r , g , b ] , axis=0 ) rearrange ( [ r , g , b ] , ' c h w - > ( c h ) w ' ) 4Post-factum we can confirm this choice : search over Github shows that rearrange , the most restrictive on possible patterns , also accounts for the majority of usages . 5Some examples use list inputs , details see in Appendix B . 8 np.flatten ( x ) rearrange ( x , ' b t c - > ( b t c ) ' ) 9 np.swap_axes ( x , 0 , 1 ) rearrange ( x , ' b t c - > t b c ' ) 10 left , right = np.split ( image , 2 , axis=1 ) rearrange ( x , ' h ( lr w ) c - > lr h w c ' , lr=2 ) 11 even , odd = x [ : , 0 : :2 ] , x [ : , 1 : :2 ] rearrange ( x , ' h ( w par ) - > par h w c ' , par=2 ) 12 np.max ( x , [ 1 , 2 ] ) reduce ( x , ' b h w c - > b c ' , 'max ' ) 13 np.mean ( x ) reduce ( x , ' b h w c - > ' , 'mean ' ) 14 np.mean ( x , axis= ( 1 , 2 ) , keepdims=True ) reduce ( x , ' b h w c - > b ( ) ( ) c ' , 'mean ' ) 15 np.reshape ( x , [ -1 , 2 ] ) .max ( axis=1 ) reduce ( x , ' ( h 2 ) - > h ' , 'max ' ) 16 np.repeat ( x , 2 , axis=1 ) repeat ( x , ' h w - > h ( w 2 ) ' ) 17 np.tile ( x , 2 , axis=1 ) repeat ( x , ' h w - > h ( 2 w ) ' ) 18 np.tile ( x [ : , : , np.newaxis ] , 3 , axis=2 ) repeat ( x , ' h w - > h w 3 ' ) Listing 1 : Correspondence between numpy and einops operations . | In this paper, a new Python toolbox called EINOPS (Einstein Operations) is introduced. The proposed toolbox allows for applying tensor operations on a single tensor data, such as reshaping, reducing (max, mean, etc), repeating, permuting, and others; in such a way that it improves code readability and flexibility. The paper illustrates about current issues on available solutions, typically in numpy and shows how EINOPS solves those issues. Also, the toolbox supports widely used frameworks such as Pytorch, TensorFlow and others providing framework-independent minimalist API for tensor structure manipulations. | SP:fac98e2dc5aec1c9d25932806f144bbda20ee033 |
Causal ImageNet: How to discover spurious features in Deep Learning? | 1 INTRODUCTION . The growing use of deep learning systems in sensitive applications such as medicine , autonomous driving , law enforcement and finance raises concerns about their trustworthiness and reliability in the real world . A root cause for the lack of reliability of deep models is their reliance on spurious input features ( i.e. , features that are not essential to the true label ) in their inferences . For example , a convolutional neural network ( CNN ) trained to classify camels from cows associates green pastures with cows and fails to classify pictures of cows in sandy beaches correctly since most of the images of cows had green pastures in the training set ( Beery et al. , 2018 ; Arjovsky et al. , 2020 ) . Similarly , Bissoto et al . ( 2020 ) discovered that skin-lesion detectors use spurious visual artifacts for making predictions . The list of such examples goes on ( de Haan et al. , 2019 ; Singla et al. , 2021 ) . Most of the prior work on discovering spurious features in image classification ( Nushi et al. , 2018 ; Zhang et al. , 2018 ; Chung et al. , 2019 ) requires humans to first come up with a possible list of spurious features . This is often followed by an expensive human-guided labeling of visual attributes which is not scalable for datasets with a large number of classes and samples such as ImageNet . In some cases , this may even require the construction of new datasets with unusual visual attributes to validate the hypothesis ( such as the cows in sandy beaches example discussed previously ) . To address these limitations , some recent works use the neurons of robust models as visual attribute detectors thereby circumventing the need for manual annotations . However , their applicability is either limited to robust models which are less widely deployed due to their low clean accuracy ( Wong et al. , 2021 ) or to identifying background spurious features ( Xiao et al. , 2021 ) , ignoring foreground ones such as food in Figure 1 or to models that achieve low accuracy on the training dataset ( Singla et al. , 2021 ) . We discuss limitations of these methods in more detail in Section 2 . In this work , we introduce a general methodology to discover a subset of spurious and core ( nonspurious ) visual attributes used in model inferences and localize them on a large number of images with minimal human supervision . Our work builds upon the prior observations ( Engstrom et al. , 2019 ) that for a robust model , neurons in the penultimate layer ( called neural features ) often correspond to human-interpretable visual attributes . These visual attributes can be inferred by visualizing the heatmaps ( e.g . via CAM , Zhou et al . ( 2016 ) ) that highlight the importance of image pixels for those neural features ( top row in Figure 1 ) . Alternatively , one can amplify these visual attributes in images by maximizing the corresponding neural feature values via a procedure called the feature attack ( Engstrom et al . ( 2019 ) ; Singla et al . ( 2021 ) , bottom row in Figure 1 ) . Our framework ( shown in Figure 2 ) is based on this key idea : to identify spurious or core visual attributes used for predicting the class i , we identify spurious or core neural features via limited human supervision . We define a core visual attribute as an attribute for class i that is always a part of the object definition and spurious otherwise . To annotate a neural feature as core or spurious , we show only the top-5 images ( with a predicted label of i ) that maximally activate that neural feature to Mechanical Turk workers . We then show that these neural feature annotations generalize extremely well to top-k ( with k 5 ) images with label i that maximally activate that neural feature . For example , on Imagenet , in Section 3.4 , we show a generalization accuracy of 95 % for k = 65 ( i.e. , a 13 fold generalization ) . Thus , by using neural features and their corresponding neural activation maps ( heatmaps ) , with limited human supervision , we can identify a large subset of samples that contain the relevant spurious or core visual attributes . The neural activation maps for these images can then be used as soft segmentation masks for these visual attributes . We emphasize that the usual method of obtaining such a set would require the manual detection and segmentation of a visual attribute across all images in the training set and is therefore not scalable . We apply our proposed methodology to the Imagenet dataset : we conducted a Mechanical Turk study using 232 classes of Imagenet and 5 neural features per class . For each neural feature , we obtained its annotation as either core ( non-spurious ) or spurious for the label . Out of the 232× 5 = 1 , 160 neural features , 160 were deemed to be spurious by the workers . For 93 classes , at least one spurious neural feature was discovered . Next , for each ( class=i , feature=j ) pair , we obtained 65 images with class i showing highest activations of the neural feature j and computed their neural activation maps . The union of these images is what we call the Salient Imagenet dataset . The dataset contains 52 , 521 images with around 226 images per class on average . Each instance in the dataset is of the form ( x , y , Mc , Ms ) where y is the ground truth class andMs , Mc represent the set of spurious and core masks , respectively ( obtained from neural activation maps of neural features ) . This dataset can be used to test the sensitivity of any pretrained model to different image features by corrupting images using their relevant masks and observing the drop in the accuracy . Ideally , we expect our trained models to show a low drop in accuracy for corruptions in spurious regions and a high drop for that of the core regions . However , using a standard Resnet-50 model , we discover multiple classes for which the model shows a trend contradictory to our expectations : a significantly higher spurious drop compared to the core drop . As an example , for the class drake ( Fig . 5 ) , we discover that corrupting any of spurious features results in a significantly higher drop ( > 40 % ) compared to corrupting any of core features ( < 5 % ) . We show many more examples in Appendix L. For various standard models ( Resnet-50 , Wide-Resnet-50-2 , Efficientnet-b4 , Efficientnet-b7 ) , we evaluate their accuracy drops due to corruptions in spurious or core regions at varying degrees of corruption noise and find no significant differences between their spurious or core drops suggesting that none of the models significantly differentiates between core and spurious visual attributes in their predictions ( Fig . 6 ) . In summary , our methodology has the following steps : • Step 1 : We select neural features as penultimate-layer neurons of a pretrained robust network and visualize them using a few highly activating samples ( Section 3.2 ) . • Step 2 : Using Mechanical Turk , we annotate neural features as core or spurious ( Section 3.3 ) . • Step 3 : Using neural feature annotations , we automatically annotate core and spurious visual attributes on many more samples without any human supervision ( Section 3.3 ) . • Step 4 : Using another Mechanical Turk study , we show that our methodology generalizes ex- tremely well to identify core/spurious visual attributes on new samples ( Section 3.4 ) . • Step 5 : Applying steps 1-4 to Imagenet , we develop a new dataset called Salient Imagenet whose samples , in addition to the class label , are annotated by core and/or spurious masks ( Section 4 ) . • Step 6 : Using such a richly annotated dataset , we assess core/spurious accuracy of standard models by adding small noise to spurious/core visual attributes , respectively ( Section 5 ) . To the best of our knowledge , this is the first work that introduces a general methodology to discover core and spurious features with limited human supervision by leveraging neurons in the penultimate layer of a robust model as interpretable visual feature detectors . Also , this is the first work that releases a version of Imagenet with annotated spurious and core image features . We believe that this work opens future research directions to leverage richly annotated datasets to develop deep models that mainly rely on core and meaningful features in their inferences . 2 RELATED WORK . Robustness and Interpretability : In recent years , there have been many efforts towards post-hoc interpretability techniques for trained neural networks . Most of these efforts have focused on local explanations where decisions about single images are inspected ( Zeiler & Fergus , 2014 ; Yosinski et al. , 2016 ; Dosovitskiy & Brox , 2016 ; Mahendran & Vedaldi , 2016 ; Nguyen et al. , 2016 ; Zhou et al. , 2018 ; Olah et al. , 2018 ; Adebayo et al. , 2018 ; Chang et al. , 2019 ; Carter et al. , 2019 ; Yeh et al. , 2019 ; Sturmfels et al. , 2020 ; O ’ Shaughnessy et al. , 2019 ; Verma et al. , 2020 ) . These include saliency maps ( Simonyan et al. , 2014 ; Smilkov et al. , 2017 ; Sundararajan et al. , 2017 ; Singla et al. , 2019 ) , class activation maps ( Zhou et al. , 2016 ; Selvaraju et al. , 2019 ; Bau et al. , 2020 ; Ismail et al. , 2019 ; 2020 ) , surrogate models to interpret local decision boundaries such as LIME ( Ribeiro et al. , 2016 ) , methods to maximize neural activation values by optimizing input images ( Nguyen et al. , 2015 ; Mahendran & Vedaldi , 2015 ) and finding influential inputs ( Koh & Liang , 2017 ) . However , recent work suggests that class activation or saliency maps may not be sufficient to narrow down visual attributes and methods for maximizing neural activations often produce noisy visualizations ( Olah et al. , 2017 ; 2018 ) with changes imperceptible to humans . To address these limitations , recent works ( Tsipras et al. , 2018 ; Engstrom et al. , 2019 ) show that for robust ( Madry et al. , 2018 ) or adversarially trained models ( in contrast to standard models ) , activation maps are qualitatively more interpretable and optimizing an image directly to maximize a certain neuron produces human perceptible changes in the images which can be useful for visualizing the learned features . Failure explanation : Most of the prior works on failure explanation either operate on tabular data where interpretable features are readily available ( Zhang et al. , 2018 ; Chung et al. , 2019 ) , language data where domain-specific textual queries can be easily generated ( Wu et al. , 2019 ; Ribeiro et al. , 2020 ) , images where visual attributes can be collected using crowdsourcing ( Nushi et al. , 2018 ; Xiao et al. , 2021 ; Plumb et al. , 2021 ) or photorealistic simulation ( Leclerc et al. , 2021 ) . However , collecting visual attributes via crowdsourcing can be expensive for large datasets . Moreover , these methods require humans to hypothesize about the possible failures and one could miss critical failure modes when the visual attributes used by model are different from the ones hypothesized by humans . To address these limitations , recent works ( Wong et al. , 2021 ; Singla et al. , 2021 ) use the neurons of robust models as the visual attribute detectors for discovering failure modes , thus avoiding the need for crowdsourcing . However , Wong et al . ( 2021 ) can not be used to analyze the failures of standard ( non-robust ) models which achieve significantly higher accuracy and are more widely deployed in practice . Moreover , to discover the spurious feature , they ask MTurk workers to identify the common visual attribute across multiple images without highlighting any region of interest . However , different images may have multiple common attributes even if they come from different classes and this approach may not be useful in such cases . Barlow ( Singla et al. , 2021 ) learns decision trees using misclassified instances to discover leaf nodes with high failure concentration . However , the instances could be correctly classified due to some spurious feature ( e.g. , background ) and Barlow will discover no failure modes in such cases . In contrast , our approach circumvents these limitations and discovers the spurious features for standard models even when they achieve high accuracy . | This work proposes a scheme to identify 'causal' and 'spurious' features with human supervision. More specifically, the method presented decomposes the activations that map to the logits of a supervised DNN into neural features. The neural features are then ranked and visualized with the CAM feature attribution method (called neural activation map in this work). The paper then shows the top ranked features and the corresponding heatmaps to crowd workers, who then ascertain whether a feature is spurious or not. Given a ranking of causal and spurious features for different output classes, the work then maps these features across an entire 'audit'/validation set. Given this audit set, one can then mask out the regions in the heatmap that correspond to the casual features and observe the corresponding change in model accuracy. Similar sensitivity measurements can also be made for the spurious features as well. Overall, this paper produces an annotated version of the ImageNet dataset with causal and spurious features. This is then used to assess the performance of current state of the art models showing that these models show significant susceptibility to spurious training signals. Overall, this paper shows how to use additional supervision for detecting a model's reliance on spurious features. The 'Causal Imagenet' dataset should be useful for future work as a stress test for models. | SP:9dbb32cf55029c069ae5767271282e45fb3a3cb6 |
Causal ImageNet: How to discover spurious features in Deep Learning? | 1 INTRODUCTION . The growing use of deep learning systems in sensitive applications such as medicine , autonomous driving , law enforcement and finance raises concerns about their trustworthiness and reliability in the real world . A root cause for the lack of reliability of deep models is their reliance on spurious input features ( i.e. , features that are not essential to the true label ) in their inferences . For example , a convolutional neural network ( CNN ) trained to classify camels from cows associates green pastures with cows and fails to classify pictures of cows in sandy beaches correctly since most of the images of cows had green pastures in the training set ( Beery et al. , 2018 ; Arjovsky et al. , 2020 ) . Similarly , Bissoto et al . ( 2020 ) discovered that skin-lesion detectors use spurious visual artifacts for making predictions . The list of such examples goes on ( de Haan et al. , 2019 ; Singla et al. , 2021 ) . Most of the prior work on discovering spurious features in image classification ( Nushi et al. , 2018 ; Zhang et al. , 2018 ; Chung et al. , 2019 ) requires humans to first come up with a possible list of spurious features . This is often followed by an expensive human-guided labeling of visual attributes which is not scalable for datasets with a large number of classes and samples such as ImageNet . In some cases , this may even require the construction of new datasets with unusual visual attributes to validate the hypothesis ( such as the cows in sandy beaches example discussed previously ) . To address these limitations , some recent works use the neurons of robust models as visual attribute detectors thereby circumventing the need for manual annotations . However , their applicability is either limited to robust models which are less widely deployed due to their low clean accuracy ( Wong et al. , 2021 ) or to identifying background spurious features ( Xiao et al. , 2021 ) , ignoring foreground ones such as food in Figure 1 or to models that achieve low accuracy on the training dataset ( Singla et al. , 2021 ) . We discuss limitations of these methods in more detail in Section 2 . In this work , we introduce a general methodology to discover a subset of spurious and core ( nonspurious ) visual attributes used in model inferences and localize them on a large number of images with minimal human supervision . Our work builds upon the prior observations ( Engstrom et al. , 2019 ) that for a robust model , neurons in the penultimate layer ( called neural features ) often correspond to human-interpretable visual attributes . These visual attributes can be inferred by visualizing the heatmaps ( e.g . via CAM , Zhou et al . ( 2016 ) ) that highlight the importance of image pixels for those neural features ( top row in Figure 1 ) . Alternatively , one can amplify these visual attributes in images by maximizing the corresponding neural feature values via a procedure called the feature attack ( Engstrom et al . ( 2019 ) ; Singla et al . ( 2021 ) , bottom row in Figure 1 ) . Our framework ( shown in Figure 2 ) is based on this key idea : to identify spurious or core visual attributes used for predicting the class i , we identify spurious or core neural features via limited human supervision . We define a core visual attribute as an attribute for class i that is always a part of the object definition and spurious otherwise . To annotate a neural feature as core or spurious , we show only the top-5 images ( with a predicted label of i ) that maximally activate that neural feature to Mechanical Turk workers . We then show that these neural feature annotations generalize extremely well to top-k ( with k 5 ) images with label i that maximally activate that neural feature . For example , on Imagenet , in Section 3.4 , we show a generalization accuracy of 95 % for k = 65 ( i.e. , a 13 fold generalization ) . Thus , by using neural features and their corresponding neural activation maps ( heatmaps ) , with limited human supervision , we can identify a large subset of samples that contain the relevant spurious or core visual attributes . The neural activation maps for these images can then be used as soft segmentation masks for these visual attributes . We emphasize that the usual method of obtaining such a set would require the manual detection and segmentation of a visual attribute across all images in the training set and is therefore not scalable . We apply our proposed methodology to the Imagenet dataset : we conducted a Mechanical Turk study using 232 classes of Imagenet and 5 neural features per class . For each neural feature , we obtained its annotation as either core ( non-spurious ) or spurious for the label . Out of the 232× 5 = 1 , 160 neural features , 160 were deemed to be spurious by the workers . For 93 classes , at least one spurious neural feature was discovered . Next , for each ( class=i , feature=j ) pair , we obtained 65 images with class i showing highest activations of the neural feature j and computed their neural activation maps . The union of these images is what we call the Salient Imagenet dataset . The dataset contains 52 , 521 images with around 226 images per class on average . Each instance in the dataset is of the form ( x , y , Mc , Ms ) where y is the ground truth class andMs , Mc represent the set of spurious and core masks , respectively ( obtained from neural activation maps of neural features ) . This dataset can be used to test the sensitivity of any pretrained model to different image features by corrupting images using their relevant masks and observing the drop in the accuracy . Ideally , we expect our trained models to show a low drop in accuracy for corruptions in spurious regions and a high drop for that of the core regions . However , using a standard Resnet-50 model , we discover multiple classes for which the model shows a trend contradictory to our expectations : a significantly higher spurious drop compared to the core drop . As an example , for the class drake ( Fig . 5 ) , we discover that corrupting any of spurious features results in a significantly higher drop ( > 40 % ) compared to corrupting any of core features ( < 5 % ) . We show many more examples in Appendix L. For various standard models ( Resnet-50 , Wide-Resnet-50-2 , Efficientnet-b4 , Efficientnet-b7 ) , we evaluate their accuracy drops due to corruptions in spurious or core regions at varying degrees of corruption noise and find no significant differences between their spurious or core drops suggesting that none of the models significantly differentiates between core and spurious visual attributes in their predictions ( Fig . 6 ) . In summary , our methodology has the following steps : • Step 1 : We select neural features as penultimate-layer neurons of a pretrained robust network and visualize them using a few highly activating samples ( Section 3.2 ) . • Step 2 : Using Mechanical Turk , we annotate neural features as core or spurious ( Section 3.3 ) . • Step 3 : Using neural feature annotations , we automatically annotate core and spurious visual attributes on many more samples without any human supervision ( Section 3.3 ) . • Step 4 : Using another Mechanical Turk study , we show that our methodology generalizes ex- tremely well to identify core/spurious visual attributes on new samples ( Section 3.4 ) . • Step 5 : Applying steps 1-4 to Imagenet , we develop a new dataset called Salient Imagenet whose samples , in addition to the class label , are annotated by core and/or spurious masks ( Section 4 ) . • Step 6 : Using such a richly annotated dataset , we assess core/spurious accuracy of standard models by adding small noise to spurious/core visual attributes , respectively ( Section 5 ) . To the best of our knowledge , this is the first work that introduces a general methodology to discover core and spurious features with limited human supervision by leveraging neurons in the penultimate layer of a robust model as interpretable visual feature detectors . Also , this is the first work that releases a version of Imagenet with annotated spurious and core image features . We believe that this work opens future research directions to leverage richly annotated datasets to develop deep models that mainly rely on core and meaningful features in their inferences . 2 RELATED WORK . Robustness and Interpretability : In recent years , there have been many efforts towards post-hoc interpretability techniques for trained neural networks . Most of these efforts have focused on local explanations where decisions about single images are inspected ( Zeiler & Fergus , 2014 ; Yosinski et al. , 2016 ; Dosovitskiy & Brox , 2016 ; Mahendran & Vedaldi , 2016 ; Nguyen et al. , 2016 ; Zhou et al. , 2018 ; Olah et al. , 2018 ; Adebayo et al. , 2018 ; Chang et al. , 2019 ; Carter et al. , 2019 ; Yeh et al. , 2019 ; Sturmfels et al. , 2020 ; O ’ Shaughnessy et al. , 2019 ; Verma et al. , 2020 ) . These include saliency maps ( Simonyan et al. , 2014 ; Smilkov et al. , 2017 ; Sundararajan et al. , 2017 ; Singla et al. , 2019 ) , class activation maps ( Zhou et al. , 2016 ; Selvaraju et al. , 2019 ; Bau et al. , 2020 ; Ismail et al. , 2019 ; 2020 ) , surrogate models to interpret local decision boundaries such as LIME ( Ribeiro et al. , 2016 ) , methods to maximize neural activation values by optimizing input images ( Nguyen et al. , 2015 ; Mahendran & Vedaldi , 2015 ) and finding influential inputs ( Koh & Liang , 2017 ) . However , recent work suggests that class activation or saliency maps may not be sufficient to narrow down visual attributes and methods for maximizing neural activations often produce noisy visualizations ( Olah et al. , 2017 ; 2018 ) with changes imperceptible to humans . To address these limitations , recent works ( Tsipras et al. , 2018 ; Engstrom et al. , 2019 ) show that for robust ( Madry et al. , 2018 ) or adversarially trained models ( in contrast to standard models ) , activation maps are qualitatively more interpretable and optimizing an image directly to maximize a certain neuron produces human perceptible changes in the images which can be useful for visualizing the learned features . Failure explanation : Most of the prior works on failure explanation either operate on tabular data where interpretable features are readily available ( Zhang et al. , 2018 ; Chung et al. , 2019 ) , language data where domain-specific textual queries can be easily generated ( Wu et al. , 2019 ; Ribeiro et al. , 2020 ) , images where visual attributes can be collected using crowdsourcing ( Nushi et al. , 2018 ; Xiao et al. , 2021 ; Plumb et al. , 2021 ) or photorealistic simulation ( Leclerc et al. , 2021 ) . However , collecting visual attributes via crowdsourcing can be expensive for large datasets . Moreover , these methods require humans to hypothesize about the possible failures and one could miss critical failure modes when the visual attributes used by model are different from the ones hypothesized by humans . To address these limitations , recent works ( Wong et al. , 2021 ; Singla et al. , 2021 ) use the neurons of robust models as the visual attribute detectors for discovering failure modes , thus avoiding the need for crowdsourcing . However , Wong et al . ( 2021 ) can not be used to analyze the failures of standard ( non-robust ) models which achieve significantly higher accuracy and are more widely deployed in practice . Moreover , to discover the spurious feature , they ask MTurk workers to identify the common visual attribute across multiple images without highlighting any region of interest . However , different images may have multiple common attributes even if they come from different classes and this approach may not be useful in such cases . Barlow ( Singla et al. , 2021 ) learns decision trees using misclassified instances to discover leaf nodes with high failure concentration . However , the instances could be correctly classified due to some spurious feature ( e.g. , background ) and Barlow will discover no failure modes in such cases . In contrast , our approach circumvents these limitations and discovers the spurious features for standard models even when they achieve high accuracy . | In the paper, the authors presented a novel scalable method to differentiate the so-called causal or non-causal attributes. By utilizing the neural features activations of in the penultimate layer, i.e. the one adjacent to logits, the proposed method can allow efficiently annotate plausible masks indicating whether the decision-making process of an NN relies on the correct features. | SP:9dbb32cf55029c069ae5767271282e45fb3a3cb6 |
Causal ImageNet: How to discover spurious features in Deep Learning? | 1 INTRODUCTION . The growing use of deep learning systems in sensitive applications such as medicine , autonomous driving , law enforcement and finance raises concerns about their trustworthiness and reliability in the real world . A root cause for the lack of reliability of deep models is their reliance on spurious input features ( i.e. , features that are not essential to the true label ) in their inferences . For example , a convolutional neural network ( CNN ) trained to classify camels from cows associates green pastures with cows and fails to classify pictures of cows in sandy beaches correctly since most of the images of cows had green pastures in the training set ( Beery et al. , 2018 ; Arjovsky et al. , 2020 ) . Similarly , Bissoto et al . ( 2020 ) discovered that skin-lesion detectors use spurious visual artifacts for making predictions . The list of such examples goes on ( de Haan et al. , 2019 ; Singla et al. , 2021 ) . Most of the prior work on discovering spurious features in image classification ( Nushi et al. , 2018 ; Zhang et al. , 2018 ; Chung et al. , 2019 ) requires humans to first come up with a possible list of spurious features . This is often followed by an expensive human-guided labeling of visual attributes which is not scalable for datasets with a large number of classes and samples such as ImageNet . In some cases , this may even require the construction of new datasets with unusual visual attributes to validate the hypothesis ( such as the cows in sandy beaches example discussed previously ) . To address these limitations , some recent works use the neurons of robust models as visual attribute detectors thereby circumventing the need for manual annotations . However , their applicability is either limited to robust models which are less widely deployed due to their low clean accuracy ( Wong et al. , 2021 ) or to identifying background spurious features ( Xiao et al. , 2021 ) , ignoring foreground ones such as food in Figure 1 or to models that achieve low accuracy on the training dataset ( Singla et al. , 2021 ) . We discuss limitations of these methods in more detail in Section 2 . In this work , we introduce a general methodology to discover a subset of spurious and core ( nonspurious ) visual attributes used in model inferences and localize them on a large number of images with minimal human supervision . Our work builds upon the prior observations ( Engstrom et al. , 2019 ) that for a robust model , neurons in the penultimate layer ( called neural features ) often correspond to human-interpretable visual attributes . These visual attributes can be inferred by visualizing the heatmaps ( e.g . via CAM , Zhou et al . ( 2016 ) ) that highlight the importance of image pixels for those neural features ( top row in Figure 1 ) . Alternatively , one can amplify these visual attributes in images by maximizing the corresponding neural feature values via a procedure called the feature attack ( Engstrom et al . ( 2019 ) ; Singla et al . ( 2021 ) , bottom row in Figure 1 ) . Our framework ( shown in Figure 2 ) is based on this key idea : to identify spurious or core visual attributes used for predicting the class i , we identify spurious or core neural features via limited human supervision . We define a core visual attribute as an attribute for class i that is always a part of the object definition and spurious otherwise . To annotate a neural feature as core or spurious , we show only the top-5 images ( with a predicted label of i ) that maximally activate that neural feature to Mechanical Turk workers . We then show that these neural feature annotations generalize extremely well to top-k ( with k 5 ) images with label i that maximally activate that neural feature . For example , on Imagenet , in Section 3.4 , we show a generalization accuracy of 95 % for k = 65 ( i.e. , a 13 fold generalization ) . Thus , by using neural features and their corresponding neural activation maps ( heatmaps ) , with limited human supervision , we can identify a large subset of samples that contain the relevant spurious or core visual attributes . The neural activation maps for these images can then be used as soft segmentation masks for these visual attributes . We emphasize that the usual method of obtaining such a set would require the manual detection and segmentation of a visual attribute across all images in the training set and is therefore not scalable . We apply our proposed methodology to the Imagenet dataset : we conducted a Mechanical Turk study using 232 classes of Imagenet and 5 neural features per class . For each neural feature , we obtained its annotation as either core ( non-spurious ) or spurious for the label . Out of the 232× 5 = 1 , 160 neural features , 160 were deemed to be spurious by the workers . For 93 classes , at least one spurious neural feature was discovered . Next , for each ( class=i , feature=j ) pair , we obtained 65 images with class i showing highest activations of the neural feature j and computed their neural activation maps . The union of these images is what we call the Salient Imagenet dataset . The dataset contains 52 , 521 images with around 226 images per class on average . Each instance in the dataset is of the form ( x , y , Mc , Ms ) where y is the ground truth class andMs , Mc represent the set of spurious and core masks , respectively ( obtained from neural activation maps of neural features ) . This dataset can be used to test the sensitivity of any pretrained model to different image features by corrupting images using their relevant masks and observing the drop in the accuracy . Ideally , we expect our trained models to show a low drop in accuracy for corruptions in spurious regions and a high drop for that of the core regions . However , using a standard Resnet-50 model , we discover multiple classes for which the model shows a trend contradictory to our expectations : a significantly higher spurious drop compared to the core drop . As an example , for the class drake ( Fig . 5 ) , we discover that corrupting any of spurious features results in a significantly higher drop ( > 40 % ) compared to corrupting any of core features ( < 5 % ) . We show many more examples in Appendix L. For various standard models ( Resnet-50 , Wide-Resnet-50-2 , Efficientnet-b4 , Efficientnet-b7 ) , we evaluate their accuracy drops due to corruptions in spurious or core regions at varying degrees of corruption noise and find no significant differences between their spurious or core drops suggesting that none of the models significantly differentiates between core and spurious visual attributes in their predictions ( Fig . 6 ) . In summary , our methodology has the following steps : • Step 1 : We select neural features as penultimate-layer neurons of a pretrained robust network and visualize them using a few highly activating samples ( Section 3.2 ) . • Step 2 : Using Mechanical Turk , we annotate neural features as core or spurious ( Section 3.3 ) . • Step 3 : Using neural feature annotations , we automatically annotate core and spurious visual attributes on many more samples without any human supervision ( Section 3.3 ) . • Step 4 : Using another Mechanical Turk study , we show that our methodology generalizes ex- tremely well to identify core/spurious visual attributes on new samples ( Section 3.4 ) . • Step 5 : Applying steps 1-4 to Imagenet , we develop a new dataset called Salient Imagenet whose samples , in addition to the class label , are annotated by core and/or spurious masks ( Section 4 ) . • Step 6 : Using such a richly annotated dataset , we assess core/spurious accuracy of standard models by adding small noise to spurious/core visual attributes , respectively ( Section 5 ) . To the best of our knowledge , this is the first work that introduces a general methodology to discover core and spurious features with limited human supervision by leveraging neurons in the penultimate layer of a robust model as interpretable visual feature detectors . Also , this is the first work that releases a version of Imagenet with annotated spurious and core image features . We believe that this work opens future research directions to leverage richly annotated datasets to develop deep models that mainly rely on core and meaningful features in their inferences . 2 RELATED WORK . Robustness and Interpretability : In recent years , there have been many efforts towards post-hoc interpretability techniques for trained neural networks . Most of these efforts have focused on local explanations where decisions about single images are inspected ( Zeiler & Fergus , 2014 ; Yosinski et al. , 2016 ; Dosovitskiy & Brox , 2016 ; Mahendran & Vedaldi , 2016 ; Nguyen et al. , 2016 ; Zhou et al. , 2018 ; Olah et al. , 2018 ; Adebayo et al. , 2018 ; Chang et al. , 2019 ; Carter et al. , 2019 ; Yeh et al. , 2019 ; Sturmfels et al. , 2020 ; O ’ Shaughnessy et al. , 2019 ; Verma et al. , 2020 ) . These include saliency maps ( Simonyan et al. , 2014 ; Smilkov et al. , 2017 ; Sundararajan et al. , 2017 ; Singla et al. , 2019 ) , class activation maps ( Zhou et al. , 2016 ; Selvaraju et al. , 2019 ; Bau et al. , 2020 ; Ismail et al. , 2019 ; 2020 ) , surrogate models to interpret local decision boundaries such as LIME ( Ribeiro et al. , 2016 ) , methods to maximize neural activation values by optimizing input images ( Nguyen et al. , 2015 ; Mahendran & Vedaldi , 2015 ) and finding influential inputs ( Koh & Liang , 2017 ) . However , recent work suggests that class activation or saliency maps may not be sufficient to narrow down visual attributes and methods for maximizing neural activations often produce noisy visualizations ( Olah et al. , 2017 ; 2018 ) with changes imperceptible to humans . To address these limitations , recent works ( Tsipras et al. , 2018 ; Engstrom et al. , 2019 ) show that for robust ( Madry et al. , 2018 ) or adversarially trained models ( in contrast to standard models ) , activation maps are qualitatively more interpretable and optimizing an image directly to maximize a certain neuron produces human perceptible changes in the images which can be useful for visualizing the learned features . Failure explanation : Most of the prior works on failure explanation either operate on tabular data where interpretable features are readily available ( Zhang et al. , 2018 ; Chung et al. , 2019 ) , language data where domain-specific textual queries can be easily generated ( Wu et al. , 2019 ; Ribeiro et al. , 2020 ) , images where visual attributes can be collected using crowdsourcing ( Nushi et al. , 2018 ; Xiao et al. , 2021 ; Plumb et al. , 2021 ) or photorealistic simulation ( Leclerc et al. , 2021 ) . However , collecting visual attributes via crowdsourcing can be expensive for large datasets . Moreover , these methods require humans to hypothesize about the possible failures and one could miss critical failure modes when the visual attributes used by model are different from the ones hypothesized by humans . To address these limitations , recent works ( Wong et al. , 2021 ; Singla et al. , 2021 ) use the neurons of robust models as the visual attribute detectors for discovering failure modes , thus avoiding the need for crowdsourcing . However , Wong et al . ( 2021 ) can not be used to analyze the failures of standard ( non-robust ) models which achieve significantly higher accuracy and are more widely deployed in practice . Moreover , to discover the spurious feature , they ask MTurk workers to identify the common visual attribute across multiple images without highlighting any region of interest . However , different images may have multiple common attributes even if they come from different classes and this approach may not be useful in such cases . Barlow ( Singla et al. , 2021 ) learns decision trees using misclassified instances to discover leaf nodes with high failure concentration . However , the instances could be correctly classified due to some spurious feature ( e.g. , background ) and Barlow will discover no failure modes in such cases . In contrast , our approach circumvents these limitations and discovers the spurious features for standard models even when they achieve high accuracy . | - The paper describes a new benchmark. It uses images from ImageNet, which now have annotations of regions containing features spuriously correlated with the ground truth labels. - The key contribution is a method to generate these annotations semi-automatically, by propagating a small set of human annotations to a large number of images. - The dataset is used to evaluate existing models, showing they often rely on regions marked as spurious. | SP:9dbb32cf55029c069ae5767271282e45fb3a3cb6 |
GSD: Generalized Stochastic Decoding | 1 INTRODUCTION . Benefiting from large-scale pre-trained language models ( Radford et al. , 2019 ; Lewis et al. , 2020 ; Tseng et al. , 2020 ; Sun & Yang , 2020 ) , considerable advances have been observed in many natural language generation ( NLG ) tasks . Nevertheless , given these pre-trained models , only limited decoding strategies are available to use , such as Greedy , Sampling , Beam Search , Top-k ( Fan et al. , 2018 ; Holtzman et al. , 2018 ) , and the recently proposed nucleus sampling ( i.e. , top-p ) ( Holtzman et al. , 2020 ) . These decoding algorithms are essential because virtually all text generation tasks need them to transfer inferred predictions to successive text ( Basu et al. , 2021 ) . However , few of these decoding algorithms can resist the risk of text degeneration . That is , text produced by these algorithms exhibits quite different characteristics from those used by humans , which contains many generic words , repeated loops , and irrelevant sentences . This problem has been confirmed by many previous works ( Holtzman et al. , 2020 ; Welleck et al. , 2020b ) . Some researchers deem that it is ineluctable because generators do empower high probabilities to the correct words , but locally , the highest probability can only be assigned to the text with generic , repetitive , or meaningless phrases . However , we suppose that this problem is triggered by the distinct manners between humans and the decoding algorithms about how text is produced . Concretely , it is very odd for humans to be told to utter more diversely or more fluently . Diverse or not , it usually depends on personal habits of language usage . Similarly , fluency or not , it is generally determined by people ’ s familiarity with that language ( patients with language disorders are excluded ) . For most decoding algorithms that are currently popular and widely used since virtually all of them must be configured with at least one hyper-parameter before being available to use . Then , these hyper-parameters become the only exceptions in the decoding system that are not controlled by the algorithms , which brings many uncertainties to the decoding system . Based on these observations , we propose a novel decoding algorithm with a hyper-parameter-free design . All behaviors of our decoding method are automatically controlled and dynamically adjusted by the algorithm itself , which is distinctive from all popular decoding algorithms currently developed . We name this novel method as Intrinsic Decoding . Detailed comparisons between Intrinsic Decoding and existing algorithms will be described in the following sections . More importantly , we also propose a generalized decoding framework ( GSD ) to connect these decoding algorithms in formal mathematical theorems , including both existing decoding methods and our proposed Intrinsic Decoding . The relationships between GSD and these algorithms can be vividly expressed in Figure 1 . 2 BACKGROUND . 2.1 PROBLEM STATEMENT . Given a vocabulary V and a pre-trained generator G , a general text generation task is to produce a sequence of words x = { xi } , xi ∈ V conditioned on some specific types of context xδ , where δ represents a span containing x . The context can be either text ( e.g. , in summarization ( Shen et al. , 2019b ; Matsumaru et al. , 2020 ) , translation ( Chen et al. , 2020 ; Wang et al. , 2020 ) , story-telling ( Ippolito et al. , 2020 ) tasks ) , images ( e.g. , image caption ( Alikhani et al. , 2020 ) ) , or structured input ( e.g. , AMR-to-text ( Liu et al. , 2021 ) , tabular-to-text ( Li & Rush , 2020 ) ) . For open-domain generation tasks ( Goldfarb-Tarrant et al. , 2019 ; Prabhumoye et al. , 2019 ) , both xδ and x are text tokens . Specifically , G can be pre-trained using any properly configured neural models , such as GRU ( Su et al. , 2020b ; Cho et al. , 2014 ; Shi et al. , 2020 ) , Transformer Vaswani et al . ( 2017 ) ; Thapliyal & Soricut ( 2020 ) , it accepts a span of context xδ , performs inference , and finally gives a batch of predictions indicating the possibility for each word x ∈ V that may appear after each individual x ∈ δ . Formally , we represent such predictions by a distribution P̂ as defined in Equation 1 . P̂ ( x|xδ ) = softmax ( Gxδ ) ( 1 ) In the following sections , we refer to P̂ as the inference distribution , which is fully controlled by G. Based on P̂ , the decoding task aims to answer the question of how to get x from P̂ ( x|xδ ) ? Intuitively , a naive solution is to argument-maximize P̂ iteratively until encountering an End-ofSequence ( EOS ) token , which is known as Greedy Decoding . Simple as it is , Greedy Decoding is fast to run and straightforward to interpret . While just as implied by its name , Greedy Decoding shares the same weakness as other greedy-based algorithms . That is , locally optimized searching does not make any promise to the global best answer . Indeed , both Greedy Decoding and Beam Search are approximations of the MAP decoding . To visualize the detailed decoding process of these deterministic algorithms , we plot the probabilities in each step to generate an example . As depicted in Figure 2.1 , probabilities assigned by Greedy Decoding and Beam Search are pretty different from probabilities of the samples obtained from data generated by humans . get x from P̂ ( x|xδ ) is to sample , instead of to search the solution space defined by V and G. This strategy inspires a batch of new decoding algorithms developed for various NLG tasks . These algorithms are generally referred to as stochastic approaches , which will be detailed in the next section . 2.2 RELATED WORK . In this section , we discuss the properties of some popular decoding algorithms that are widely used ( Kang & Hashimoto , 2020 ; Su et al. , 2020a ) in both industry and research NLG domains . For deterministic decoding , many recent works ( Murray & Chiang , 2018 ; Stahlberg & Byrne , 2019 ; Welleck et al. , 2020a ) have been proposed to investigate how to better control the quality of generated text . For instance , Murray & Chiang ( 2018 ) draws an important conclusion that for beam search , it is not always true that a wider beam will help translation , sometimes it hurts . Stahlberg & Byrne ( 2019 ) shows constraining search with a minimum translation length is at the root of the problem of empty translations . Recently , some works have been proposed to investigate how to explicitly control the property of the generated text by manipulating the decoding hyper-parameters under some specific principles . For example , Pang & He ( 2020 ) model generation as an offline reinforcement learning task with reference demonstrations . It aims to maximize quality given model-generated histories . Nadeem et al . ( 2020 ) propose to identify key properties that are shared among some decoding algorithms and investigate what will happen if meeting or violating the identified properties . ( Basu et al. , 2021 ) propose to design a feedback-based adaptive top-k decoding algorithm that generates text with a predetermined perplexity . However , none of them aim to design a generalized decoding framework that can be used to describe and connect existing popular decoding algorithms , which is just the focus of our paper . For clarity , we denote the decoding probability assigned by a decoding algorithm by P ( x|xδ ) , while keeping to use P̂ ( x|xδ ) as in Section 2.1 to represent the generation probability inferred by a pretrained NLG model G. Recall the sub-vocabulary observations about how human communicates introduced in Section 2.1 . Surprisingly , we find that these stochastic decoding algorithms are also related to some sub- vocabulary equivalents or subsets if formally described by mathematical language . To describe these different stochastic decoding methods uniformly , we use Equation 2 to abstract the relationship between P ( x|xδ ) and P̂ ( x|xδ ) . Different from V , ∆ defined in Equation 2 is exactly the sub-vocabulary equivalent in mathematics containing relevantly important words for the decoding steps . It is also the key difference to discriminate between these stochastic decoding methods . P ( x|xδ ) = { φ ( P̂ ( x|xδ ) ) , x ∈ ∆ 0 , x /∈ ∆ ( 2 ) We briefly introduce the theoretical backgrounds of Sampling Decoding , Top-k Decoding , and Nucleus Decoding ( i.e. , Top-p ) , especially how different ∆ is constructed by these stochastic methods . Among these methods , Sampling Decoding may be the simplest one because of its most flexible hypothesis of ∆ : ∆ is free to include any elements in V . In other words , ∆ is V itself . Therefore , there is no algorithm-specific sub-vocabulary . All words in the entire dictionary space are candidates to sample from . This behavior can be formally described by Equation 3. φ ( P̂ ) = P̂ ( x|xδ ) , ∆ = V ( 3 ) Sampling Decoding extends the search space to V while maintaining high decoding efficiency compared to the deterministic methods . This is quite different from Beam Search , whose speed is very sensible to the search width parameterw . However , as remained by Holtzman et al . ( 2020 ) , the problem with Sampling Decoding is that it has a long probability tail , which brings a lot of irrelevant samples in the decoding process . To alleviate this problem , a ∆-limited decoding method , Top-k sampling , is proposed to decode text from pre-trained generators ( Fan et al. , 2018 ; Holtzman et al. , 2018 ; Radford et al. , 2019 ) . Unlike Sampling Decoding , Top-k sampling has a limited subset of ∆ , which consists of the top-k most promising candidates for the algorithm to consider . Equation 4 formally describes the conditions of how a proper ∆ subset should be constructed . S = { Ω|min { P̂x∈Ω ( x|xδ ) } ≥ max { P̂x∈V−Ω ( x|xδ ) } , |Ω| = k , x ∈ V } ( 4 ) Given Equation 4 , Top-k sampling can be precisely defined by Equation 5 . Notably , S is defined as a super-set containing all valid ∆ sets that can be used by Top-k. A benefit of defining ∆ in such a way is that it takes into account all special and general cases of P̂ . This definition holds even if there exist identical elements in P̂ . φ ( P̂ ) = P̂ ( x|xδ ) / ∑ x∈∆ P̂ ( x|xδ ) , ∆ ∈ S ( 5 ) Top-k sampling has a similar subset ∆ to integrate the relevantly significant words for a given context . Promising as it is , the challenge for top-k is that the hyper-parameter of k is hard to specify ( Holtzman et al. , 2020 ) : large k is problematic for flat P̂ , while small k is precarious for peaked P̂ . Based on the observation , Holtzman et al . ( 2020 ) proposes a novel method to define ∆ , the size of which is dynamically changed for different shapes of P̂ . As described by Equation 6 , the limitation for ∆ is relaxed to the aggregated mass of the probabilities , instead of the size of ∆ containing these probabilities . This method is known as Nucleus Sampling or Top-P Decoding , the definition of which is formally described by Equation 7 . S = { Ω| ∑ x∈Ω P̂ ( x|xδ ) ≥ p , x ∈ V } ( 6 ) φ ( P̂ ) = P̂ ( x|xδ ) / ∑ x∈∆ P̂ ( x|xδ ) , ∆ ∈ S , |∆| = min { |Ω| , ∀Ω ∈ S } ( 7 ) Despite the relatively complex form of definition , Equation 7 can be efficiently executed by filtering the accumulated sum of P̂ ) . Given the lesson learned from Top-k , an akin question for Top-p sampling is how the hyperparameter p is determined ? General answer for this question is that small p values force the decoding algorithm to generate fluent expressions , while large p values encourage diverse generations . Then , what if p is small because we want fluent terms while P̂ is flat ? Or what will happen if P̂ is peaked , but p has been set to a large value to favor our diverse demand ? Indeed , similar questions could be endless as long as there is a hyper-parameter affecting the performance of the decoding algorithm . Except for Sampling Decoding and Greedy Search , all decoding algorithms discussed so far involve at least one hyper-parameter managing specific properties of that method . Unfortunately , the two exceptions both have known issues that stop them from being considered as potential alternatives . These are the key observations inspiring our work . | This work introduces the generalized stochastic decoding (GSD) framework and the subsequent Intrinsic Decoding algorithm. They formally show how several existing stochastic decoding algorithms can be viewed as special cases of GSD. Further they perform empirical comparison of sequence completions between their Intrinsic Decoding and other algorithms paired with GPT-2 using automatic metrics. They suggest that the GSD can be seen as a platform for future research around stochastic based decoding strategies. | SP:b241a459669e8b95db857ef5775a364bb661ee5e |
GSD: Generalized Stochastic Decoding | 1 INTRODUCTION . Benefiting from large-scale pre-trained language models ( Radford et al. , 2019 ; Lewis et al. , 2020 ; Tseng et al. , 2020 ; Sun & Yang , 2020 ) , considerable advances have been observed in many natural language generation ( NLG ) tasks . Nevertheless , given these pre-trained models , only limited decoding strategies are available to use , such as Greedy , Sampling , Beam Search , Top-k ( Fan et al. , 2018 ; Holtzman et al. , 2018 ) , and the recently proposed nucleus sampling ( i.e. , top-p ) ( Holtzman et al. , 2020 ) . These decoding algorithms are essential because virtually all text generation tasks need them to transfer inferred predictions to successive text ( Basu et al. , 2021 ) . However , few of these decoding algorithms can resist the risk of text degeneration . That is , text produced by these algorithms exhibits quite different characteristics from those used by humans , which contains many generic words , repeated loops , and irrelevant sentences . This problem has been confirmed by many previous works ( Holtzman et al. , 2020 ; Welleck et al. , 2020b ) . Some researchers deem that it is ineluctable because generators do empower high probabilities to the correct words , but locally , the highest probability can only be assigned to the text with generic , repetitive , or meaningless phrases . However , we suppose that this problem is triggered by the distinct manners between humans and the decoding algorithms about how text is produced . Concretely , it is very odd for humans to be told to utter more diversely or more fluently . Diverse or not , it usually depends on personal habits of language usage . Similarly , fluency or not , it is generally determined by people ’ s familiarity with that language ( patients with language disorders are excluded ) . For most decoding algorithms that are currently popular and widely used since virtually all of them must be configured with at least one hyper-parameter before being available to use . Then , these hyper-parameters become the only exceptions in the decoding system that are not controlled by the algorithms , which brings many uncertainties to the decoding system . Based on these observations , we propose a novel decoding algorithm with a hyper-parameter-free design . All behaviors of our decoding method are automatically controlled and dynamically adjusted by the algorithm itself , which is distinctive from all popular decoding algorithms currently developed . We name this novel method as Intrinsic Decoding . Detailed comparisons between Intrinsic Decoding and existing algorithms will be described in the following sections . More importantly , we also propose a generalized decoding framework ( GSD ) to connect these decoding algorithms in formal mathematical theorems , including both existing decoding methods and our proposed Intrinsic Decoding . The relationships between GSD and these algorithms can be vividly expressed in Figure 1 . 2 BACKGROUND . 2.1 PROBLEM STATEMENT . Given a vocabulary V and a pre-trained generator G , a general text generation task is to produce a sequence of words x = { xi } , xi ∈ V conditioned on some specific types of context xδ , where δ represents a span containing x . The context can be either text ( e.g. , in summarization ( Shen et al. , 2019b ; Matsumaru et al. , 2020 ) , translation ( Chen et al. , 2020 ; Wang et al. , 2020 ) , story-telling ( Ippolito et al. , 2020 ) tasks ) , images ( e.g. , image caption ( Alikhani et al. , 2020 ) ) , or structured input ( e.g. , AMR-to-text ( Liu et al. , 2021 ) , tabular-to-text ( Li & Rush , 2020 ) ) . For open-domain generation tasks ( Goldfarb-Tarrant et al. , 2019 ; Prabhumoye et al. , 2019 ) , both xδ and x are text tokens . Specifically , G can be pre-trained using any properly configured neural models , such as GRU ( Su et al. , 2020b ; Cho et al. , 2014 ; Shi et al. , 2020 ) , Transformer Vaswani et al . ( 2017 ) ; Thapliyal & Soricut ( 2020 ) , it accepts a span of context xδ , performs inference , and finally gives a batch of predictions indicating the possibility for each word x ∈ V that may appear after each individual x ∈ δ . Formally , we represent such predictions by a distribution P̂ as defined in Equation 1 . P̂ ( x|xδ ) = softmax ( Gxδ ) ( 1 ) In the following sections , we refer to P̂ as the inference distribution , which is fully controlled by G. Based on P̂ , the decoding task aims to answer the question of how to get x from P̂ ( x|xδ ) ? Intuitively , a naive solution is to argument-maximize P̂ iteratively until encountering an End-ofSequence ( EOS ) token , which is known as Greedy Decoding . Simple as it is , Greedy Decoding is fast to run and straightforward to interpret . While just as implied by its name , Greedy Decoding shares the same weakness as other greedy-based algorithms . That is , locally optimized searching does not make any promise to the global best answer . Indeed , both Greedy Decoding and Beam Search are approximations of the MAP decoding . To visualize the detailed decoding process of these deterministic algorithms , we plot the probabilities in each step to generate an example . As depicted in Figure 2.1 , probabilities assigned by Greedy Decoding and Beam Search are pretty different from probabilities of the samples obtained from data generated by humans . get x from P̂ ( x|xδ ) is to sample , instead of to search the solution space defined by V and G. This strategy inspires a batch of new decoding algorithms developed for various NLG tasks . These algorithms are generally referred to as stochastic approaches , which will be detailed in the next section . 2.2 RELATED WORK . In this section , we discuss the properties of some popular decoding algorithms that are widely used ( Kang & Hashimoto , 2020 ; Su et al. , 2020a ) in both industry and research NLG domains . For deterministic decoding , many recent works ( Murray & Chiang , 2018 ; Stahlberg & Byrne , 2019 ; Welleck et al. , 2020a ) have been proposed to investigate how to better control the quality of generated text . For instance , Murray & Chiang ( 2018 ) draws an important conclusion that for beam search , it is not always true that a wider beam will help translation , sometimes it hurts . Stahlberg & Byrne ( 2019 ) shows constraining search with a minimum translation length is at the root of the problem of empty translations . Recently , some works have been proposed to investigate how to explicitly control the property of the generated text by manipulating the decoding hyper-parameters under some specific principles . For example , Pang & He ( 2020 ) model generation as an offline reinforcement learning task with reference demonstrations . It aims to maximize quality given model-generated histories . Nadeem et al . ( 2020 ) propose to identify key properties that are shared among some decoding algorithms and investigate what will happen if meeting or violating the identified properties . ( Basu et al. , 2021 ) propose to design a feedback-based adaptive top-k decoding algorithm that generates text with a predetermined perplexity . However , none of them aim to design a generalized decoding framework that can be used to describe and connect existing popular decoding algorithms , which is just the focus of our paper . For clarity , we denote the decoding probability assigned by a decoding algorithm by P ( x|xδ ) , while keeping to use P̂ ( x|xδ ) as in Section 2.1 to represent the generation probability inferred by a pretrained NLG model G. Recall the sub-vocabulary observations about how human communicates introduced in Section 2.1 . Surprisingly , we find that these stochastic decoding algorithms are also related to some sub- vocabulary equivalents or subsets if formally described by mathematical language . To describe these different stochastic decoding methods uniformly , we use Equation 2 to abstract the relationship between P ( x|xδ ) and P̂ ( x|xδ ) . Different from V , ∆ defined in Equation 2 is exactly the sub-vocabulary equivalent in mathematics containing relevantly important words for the decoding steps . It is also the key difference to discriminate between these stochastic decoding methods . P ( x|xδ ) = { φ ( P̂ ( x|xδ ) ) , x ∈ ∆ 0 , x /∈ ∆ ( 2 ) We briefly introduce the theoretical backgrounds of Sampling Decoding , Top-k Decoding , and Nucleus Decoding ( i.e. , Top-p ) , especially how different ∆ is constructed by these stochastic methods . Among these methods , Sampling Decoding may be the simplest one because of its most flexible hypothesis of ∆ : ∆ is free to include any elements in V . In other words , ∆ is V itself . Therefore , there is no algorithm-specific sub-vocabulary . All words in the entire dictionary space are candidates to sample from . This behavior can be formally described by Equation 3. φ ( P̂ ) = P̂ ( x|xδ ) , ∆ = V ( 3 ) Sampling Decoding extends the search space to V while maintaining high decoding efficiency compared to the deterministic methods . This is quite different from Beam Search , whose speed is very sensible to the search width parameterw . However , as remained by Holtzman et al . ( 2020 ) , the problem with Sampling Decoding is that it has a long probability tail , which brings a lot of irrelevant samples in the decoding process . To alleviate this problem , a ∆-limited decoding method , Top-k sampling , is proposed to decode text from pre-trained generators ( Fan et al. , 2018 ; Holtzman et al. , 2018 ; Radford et al. , 2019 ) . Unlike Sampling Decoding , Top-k sampling has a limited subset of ∆ , which consists of the top-k most promising candidates for the algorithm to consider . Equation 4 formally describes the conditions of how a proper ∆ subset should be constructed . S = { Ω|min { P̂x∈Ω ( x|xδ ) } ≥ max { P̂x∈V−Ω ( x|xδ ) } , |Ω| = k , x ∈ V } ( 4 ) Given Equation 4 , Top-k sampling can be precisely defined by Equation 5 . Notably , S is defined as a super-set containing all valid ∆ sets that can be used by Top-k. A benefit of defining ∆ in such a way is that it takes into account all special and general cases of P̂ . This definition holds even if there exist identical elements in P̂ . φ ( P̂ ) = P̂ ( x|xδ ) / ∑ x∈∆ P̂ ( x|xδ ) , ∆ ∈ S ( 5 ) Top-k sampling has a similar subset ∆ to integrate the relevantly significant words for a given context . Promising as it is , the challenge for top-k is that the hyper-parameter of k is hard to specify ( Holtzman et al. , 2020 ) : large k is problematic for flat P̂ , while small k is precarious for peaked P̂ . Based on the observation , Holtzman et al . ( 2020 ) proposes a novel method to define ∆ , the size of which is dynamically changed for different shapes of P̂ . As described by Equation 6 , the limitation for ∆ is relaxed to the aggregated mass of the probabilities , instead of the size of ∆ containing these probabilities . This method is known as Nucleus Sampling or Top-P Decoding , the definition of which is formally described by Equation 7 . S = { Ω| ∑ x∈Ω P̂ ( x|xδ ) ≥ p , x ∈ V } ( 6 ) φ ( P̂ ) = P̂ ( x|xδ ) / ∑ x∈∆ P̂ ( x|xδ ) , ∆ ∈ S , |∆| = min { |Ω| , ∀Ω ∈ S } ( 7 ) Despite the relatively complex form of definition , Equation 7 can be efficiently executed by filtering the accumulated sum of P̂ ) . Given the lesson learned from Top-k , an akin question for Top-p sampling is how the hyperparameter p is determined ? General answer for this question is that small p values force the decoding algorithm to generate fluent expressions , while large p values encourage diverse generations . Then , what if p is small because we want fluent terms while P̂ is flat ? Or what will happen if P̂ is peaked , but p has been set to a large value to favor our diverse demand ? Indeed , similar questions could be endless as long as there is a hyper-parameter affecting the performance of the decoding algorithm . Except for Sampling Decoding and Greedy Search , all decoding algorithms discussed so far involve at least one hyper-parameter managing specific properties of that method . Unfortunately , the two exceptions both have known issues that stop them from being considered as potential alternatives . These are the key observations inspiring our work . | The paper deals with decoding algorithms for neural text generation. The paper proposes a way to connect greedy decoding, beam search, (ancestral) sampling, top-k sampling, top-p (nucleus) sampling. The proposed GSD is on page 6 (specifically, equations 8, 9, 10). The visualization for how equations 8-10 tie the decoding algorithms together is in Figure 1. The authors claim that this generalization can provide an “infinite space” for designing more decoding algorithms. Empirical results show that open-domain text generation from GPT-2 using GSD results in a perplexity that’s closer to the human perplexity, and a self-BLEU that’s closer to the human self-BLEU. | SP:b241a459669e8b95db857ef5775a364bb661ee5e |
GSD: Generalized Stochastic Decoding | 1 INTRODUCTION . Benefiting from large-scale pre-trained language models ( Radford et al. , 2019 ; Lewis et al. , 2020 ; Tseng et al. , 2020 ; Sun & Yang , 2020 ) , considerable advances have been observed in many natural language generation ( NLG ) tasks . Nevertheless , given these pre-trained models , only limited decoding strategies are available to use , such as Greedy , Sampling , Beam Search , Top-k ( Fan et al. , 2018 ; Holtzman et al. , 2018 ) , and the recently proposed nucleus sampling ( i.e. , top-p ) ( Holtzman et al. , 2020 ) . These decoding algorithms are essential because virtually all text generation tasks need them to transfer inferred predictions to successive text ( Basu et al. , 2021 ) . However , few of these decoding algorithms can resist the risk of text degeneration . That is , text produced by these algorithms exhibits quite different characteristics from those used by humans , which contains many generic words , repeated loops , and irrelevant sentences . This problem has been confirmed by many previous works ( Holtzman et al. , 2020 ; Welleck et al. , 2020b ) . Some researchers deem that it is ineluctable because generators do empower high probabilities to the correct words , but locally , the highest probability can only be assigned to the text with generic , repetitive , or meaningless phrases . However , we suppose that this problem is triggered by the distinct manners between humans and the decoding algorithms about how text is produced . Concretely , it is very odd for humans to be told to utter more diversely or more fluently . Diverse or not , it usually depends on personal habits of language usage . Similarly , fluency or not , it is generally determined by people ’ s familiarity with that language ( patients with language disorders are excluded ) . For most decoding algorithms that are currently popular and widely used since virtually all of them must be configured with at least one hyper-parameter before being available to use . Then , these hyper-parameters become the only exceptions in the decoding system that are not controlled by the algorithms , which brings many uncertainties to the decoding system . Based on these observations , we propose a novel decoding algorithm with a hyper-parameter-free design . All behaviors of our decoding method are automatically controlled and dynamically adjusted by the algorithm itself , which is distinctive from all popular decoding algorithms currently developed . We name this novel method as Intrinsic Decoding . Detailed comparisons between Intrinsic Decoding and existing algorithms will be described in the following sections . More importantly , we also propose a generalized decoding framework ( GSD ) to connect these decoding algorithms in formal mathematical theorems , including both existing decoding methods and our proposed Intrinsic Decoding . The relationships between GSD and these algorithms can be vividly expressed in Figure 1 . 2 BACKGROUND . 2.1 PROBLEM STATEMENT . Given a vocabulary V and a pre-trained generator G , a general text generation task is to produce a sequence of words x = { xi } , xi ∈ V conditioned on some specific types of context xδ , where δ represents a span containing x . The context can be either text ( e.g. , in summarization ( Shen et al. , 2019b ; Matsumaru et al. , 2020 ) , translation ( Chen et al. , 2020 ; Wang et al. , 2020 ) , story-telling ( Ippolito et al. , 2020 ) tasks ) , images ( e.g. , image caption ( Alikhani et al. , 2020 ) ) , or structured input ( e.g. , AMR-to-text ( Liu et al. , 2021 ) , tabular-to-text ( Li & Rush , 2020 ) ) . For open-domain generation tasks ( Goldfarb-Tarrant et al. , 2019 ; Prabhumoye et al. , 2019 ) , both xδ and x are text tokens . Specifically , G can be pre-trained using any properly configured neural models , such as GRU ( Su et al. , 2020b ; Cho et al. , 2014 ; Shi et al. , 2020 ) , Transformer Vaswani et al . ( 2017 ) ; Thapliyal & Soricut ( 2020 ) , it accepts a span of context xδ , performs inference , and finally gives a batch of predictions indicating the possibility for each word x ∈ V that may appear after each individual x ∈ δ . Formally , we represent such predictions by a distribution P̂ as defined in Equation 1 . P̂ ( x|xδ ) = softmax ( Gxδ ) ( 1 ) In the following sections , we refer to P̂ as the inference distribution , which is fully controlled by G. Based on P̂ , the decoding task aims to answer the question of how to get x from P̂ ( x|xδ ) ? Intuitively , a naive solution is to argument-maximize P̂ iteratively until encountering an End-ofSequence ( EOS ) token , which is known as Greedy Decoding . Simple as it is , Greedy Decoding is fast to run and straightforward to interpret . While just as implied by its name , Greedy Decoding shares the same weakness as other greedy-based algorithms . That is , locally optimized searching does not make any promise to the global best answer . Indeed , both Greedy Decoding and Beam Search are approximations of the MAP decoding . To visualize the detailed decoding process of these deterministic algorithms , we plot the probabilities in each step to generate an example . As depicted in Figure 2.1 , probabilities assigned by Greedy Decoding and Beam Search are pretty different from probabilities of the samples obtained from data generated by humans . get x from P̂ ( x|xδ ) is to sample , instead of to search the solution space defined by V and G. This strategy inspires a batch of new decoding algorithms developed for various NLG tasks . These algorithms are generally referred to as stochastic approaches , which will be detailed in the next section . 2.2 RELATED WORK . In this section , we discuss the properties of some popular decoding algorithms that are widely used ( Kang & Hashimoto , 2020 ; Su et al. , 2020a ) in both industry and research NLG domains . For deterministic decoding , many recent works ( Murray & Chiang , 2018 ; Stahlberg & Byrne , 2019 ; Welleck et al. , 2020a ) have been proposed to investigate how to better control the quality of generated text . For instance , Murray & Chiang ( 2018 ) draws an important conclusion that for beam search , it is not always true that a wider beam will help translation , sometimes it hurts . Stahlberg & Byrne ( 2019 ) shows constraining search with a minimum translation length is at the root of the problem of empty translations . Recently , some works have been proposed to investigate how to explicitly control the property of the generated text by manipulating the decoding hyper-parameters under some specific principles . For example , Pang & He ( 2020 ) model generation as an offline reinforcement learning task with reference demonstrations . It aims to maximize quality given model-generated histories . Nadeem et al . ( 2020 ) propose to identify key properties that are shared among some decoding algorithms and investigate what will happen if meeting or violating the identified properties . ( Basu et al. , 2021 ) propose to design a feedback-based adaptive top-k decoding algorithm that generates text with a predetermined perplexity . However , none of them aim to design a generalized decoding framework that can be used to describe and connect existing popular decoding algorithms , which is just the focus of our paper . For clarity , we denote the decoding probability assigned by a decoding algorithm by P ( x|xδ ) , while keeping to use P̂ ( x|xδ ) as in Section 2.1 to represent the generation probability inferred by a pretrained NLG model G. Recall the sub-vocabulary observations about how human communicates introduced in Section 2.1 . Surprisingly , we find that these stochastic decoding algorithms are also related to some sub- vocabulary equivalents or subsets if formally described by mathematical language . To describe these different stochastic decoding methods uniformly , we use Equation 2 to abstract the relationship between P ( x|xδ ) and P̂ ( x|xδ ) . Different from V , ∆ defined in Equation 2 is exactly the sub-vocabulary equivalent in mathematics containing relevantly important words for the decoding steps . It is also the key difference to discriminate between these stochastic decoding methods . P ( x|xδ ) = { φ ( P̂ ( x|xδ ) ) , x ∈ ∆ 0 , x /∈ ∆ ( 2 ) We briefly introduce the theoretical backgrounds of Sampling Decoding , Top-k Decoding , and Nucleus Decoding ( i.e. , Top-p ) , especially how different ∆ is constructed by these stochastic methods . Among these methods , Sampling Decoding may be the simplest one because of its most flexible hypothesis of ∆ : ∆ is free to include any elements in V . In other words , ∆ is V itself . Therefore , there is no algorithm-specific sub-vocabulary . All words in the entire dictionary space are candidates to sample from . This behavior can be formally described by Equation 3. φ ( P̂ ) = P̂ ( x|xδ ) , ∆ = V ( 3 ) Sampling Decoding extends the search space to V while maintaining high decoding efficiency compared to the deterministic methods . This is quite different from Beam Search , whose speed is very sensible to the search width parameterw . However , as remained by Holtzman et al . ( 2020 ) , the problem with Sampling Decoding is that it has a long probability tail , which brings a lot of irrelevant samples in the decoding process . To alleviate this problem , a ∆-limited decoding method , Top-k sampling , is proposed to decode text from pre-trained generators ( Fan et al. , 2018 ; Holtzman et al. , 2018 ; Radford et al. , 2019 ) . Unlike Sampling Decoding , Top-k sampling has a limited subset of ∆ , which consists of the top-k most promising candidates for the algorithm to consider . Equation 4 formally describes the conditions of how a proper ∆ subset should be constructed . S = { Ω|min { P̂x∈Ω ( x|xδ ) } ≥ max { P̂x∈V−Ω ( x|xδ ) } , |Ω| = k , x ∈ V } ( 4 ) Given Equation 4 , Top-k sampling can be precisely defined by Equation 5 . Notably , S is defined as a super-set containing all valid ∆ sets that can be used by Top-k. A benefit of defining ∆ in such a way is that it takes into account all special and general cases of P̂ . This definition holds even if there exist identical elements in P̂ . φ ( P̂ ) = P̂ ( x|xδ ) / ∑ x∈∆ P̂ ( x|xδ ) , ∆ ∈ S ( 5 ) Top-k sampling has a similar subset ∆ to integrate the relevantly significant words for a given context . Promising as it is , the challenge for top-k is that the hyper-parameter of k is hard to specify ( Holtzman et al. , 2020 ) : large k is problematic for flat P̂ , while small k is precarious for peaked P̂ . Based on the observation , Holtzman et al . ( 2020 ) proposes a novel method to define ∆ , the size of which is dynamically changed for different shapes of P̂ . As described by Equation 6 , the limitation for ∆ is relaxed to the aggregated mass of the probabilities , instead of the size of ∆ containing these probabilities . This method is known as Nucleus Sampling or Top-P Decoding , the definition of which is formally described by Equation 7 . S = { Ω| ∑ x∈Ω P̂ ( x|xδ ) ≥ p , x ∈ V } ( 6 ) φ ( P̂ ) = P̂ ( x|xδ ) / ∑ x∈∆ P̂ ( x|xδ ) , ∆ ∈ S , |∆| = min { |Ω| , ∀Ω ∈ S } ( 7 ) Despite the relatively complex form of definition , Equation 7 can be efficiently executed by filtering the accumulated sum of P̂ ) . Given the lesson learned from Top-k , an akin question for Top-p sampling is how the hyperparameter p is determined ? General answer for this question is that small p values force the decoding algorithm to generate fluent expressions , while large p values encourage diverse generations . Then , what if p is small because we want fluent terms while P̂ is flat ? Or what will happen if P̂ is peaked , but p has been set to a large value to favor our diverse demand ? Indeed , similar questions could be endless as long as there is a hyper-parameter affecting the performance of the decoding algorithm . Except for Sampling Decoding and Greedy Search , all decoding algorithms discussed so far involve at least one hyper-parameter managing specific properties of that method . Unfortunately , the two exceptions both have known issues that stop them from being considered as potential alternatives . These are the key observations inspiring our work . | This paper proposes a fairly general approach to generating from language models: words are sampled from a renormalized distribution consisting of the smallest set of words in the vocabulary which together have probability at least $\rho$, where $\rho$ is a function of the entropy of the distribution. The authors show that several standard decoding algorithms arise from particular choices of $\rho$. The authors then propose to use a particular $\rho$, essentially $\tanh(\text{entropy}/\text{average batch entropy})$, which they argue is attractive because it has no hyperparameters. The authors evaluate the generations obtained from decoding with their approach by comparing them to baseline generations in terms of perplexity assigned to generations by GPT-2, self-BLEU, and other recent automatic metrics. | SP:b241a459669e8b95db857ef5775a364bb661ee5e |
Takeuchi's Information Criteria as Generalization Measures for DNNs Close to NTK Regime | 1 INTRODUCTION . Deep neural networks ( DNNs ) have been exhibiting great generalization abilities in many applications , but the mechanism of the generalization has not been fully understood yet ( Neyshabur et al. , 2014 ; Zhang et al. , 2016 ; Recht et al. , 2019 ) . Establishing a reliable generalization measure is an important research topic for generating a good model from limited data resources , including an application of hyperparameter search . Many attempts ( Arora et al. , 2018 ; Wei & Ma , 2019 ; Neyshabur et al. , 2018 ) have been taken to better understand the generalization phenomenon in deep learning models from theoretical points of view . From empirical points of view , there have been intensive studies ( Keskar et al. , 2016 ; Liang et al. , 2019 ; Bartlett et al. , 2017 ) in search of learning conditions that likely yield high model performance . Work by ( Jiang et al. , 2019 ) indicated that a measure that includes both hessian H ( θ ) 1 and covariance C ( θ ) defined from the loss and the network parameters θ near a local minimum may potentially show good correlation with generalization performance . Another study indicated that use of only a single measure , either HessianH ( θ ) or covariance C ( θ ) , fails to capture the generalization performance ( Novak et al. , 2018a ) . The generalization gap inherently stems from a discrepancy between the empirical and the true data distribution . A minimizer of the empirical loss will be affected by the noise due to a finite number of samples and by the form of the loss landscape near the minimum . The former can be characterized as noise ( C ( θ ) ) and the latter as curvature ( H ( θ ) ) . Taking these findings into account , we sought to model the generalization gap , then found that a classical information criterion called Takeuchi ’ s Information Criteria ( TIC ) ( Takeuchi , 1976 ) ex- 1H ( θ ) andC ( θ ) are defined in equation 2 presses generalization gap in the neural tangent kernel ( NTK ) regime . TIC has the following form TIC ( θ ) ︸ ︷︷ ︸ Information Criteria = −Ep̂ [ l ( y , f ( x , θ ) ) ] ︸ ︷︷ ︸ Mean Empirical Error + Tr ( H ( θ ) −1C ( θ ) ) ︸ ︷︷ ︸ Estimated Bias Term , ( 1 ) where f is a smooth function over θ ∈ Rd with input x and target y , and l is the negative loglikelihood , also denoted as loss function . The first term on the right-hand side is the log-likelihood , which takes the expectation over an empirical data distribution ( xi , yi ) ∼ p̂ . For the later discussion , we use θ̂ minimizes the empirical loss ; i.e. , θ̂ = arg minθEp̂ [ l ( y , f ( x , θ ) ) ] , and θ ∗ as the parameters that maximizes the likelihood with respect to the true data distribution ( x , y ) ∼ p ; i.e. , θ∗ = arg minθEp [ l ( y , f ( x , θ ) ) ] . For a DNN of practical size , exact computations of the matrices H ( θ ) , C ( θ ) are nearly infeasible due to large dimensionality . To make the computation feasible , we adopted a strategy of using shared components of the matrix to estimate TIC with fewer computations , based on a relationship among matrices such as H ( θ ) , C ( θ ) , and Fisher Information Matrix F ( θ ) . To further reduce the computational costs for the bias term , we examined methods using approximations and lower bounds so that TIC estimations for DNNs of practical sizes are feasible . In this work , we make the following contributions : • We provide empirical and theoretical evidence that TIC is highly correlated with generalization gap of DNNs that are close to NTK regime , despite the fact that TIC is not originally designed for singular model such as general DNNs . • We conduct comprehensive experiments in which more than 5,000 models , including ones close to NTK regime , with totally 12 DNN architectures , 4 datasets and 15 training settings are trained , and corresponding TICs are estimated with approximation techniques , to clarify conditions that TIC can well explain generalization gaps . • We use TIC as a threshold for pruning poorly performing trial models during hyperparameter optimization ( HPO ) and show that it can successfully prevent promising candidates from being pruned prematurely . 2 GENERALIZATION MEASURES . Generalization measures measure the generalization ability of statistical models . Typically , the generalization gap , which is defined as the difference between training loss and validation loss , is used to quantify the generalization ability . 2.1 WHICH GENERALIZATION MEASURE IS PROSPECTIVE ? . To answer this question , before demonstrating the effectiveness of TIC , we highlight the development of research in this area and the motivation behind this work . For understanding generalization behavior , there are two major approaches by quantifying generalization bounds and complexity measures . Approach of quantifying generalization bounds is pursued by theoretical groups to prove the bound of the generalization gap ( Dziugaite & Roy , 2017 ) . Although tight bounds can be proven , they are often based on assumptions that do not apply to practical DNN settings . In addition , no bounds have been shown to describe the performance of the current DNNs to a satisfactory level . On the other hand , approach of quantifying complexity measures , which do not necessarily certify bounds , follows the principle of Occam ’ s razor and evaluates the complexity of the model . Theoretically motivated complexity measures , including VC-dimension ( Vapnik & Chervonenkis , 2015 ) , PAC-Bayesian framework ( McAllester , 1999 ) , the norm of parameters ( Neyshabur et al. , 2015 ) , are often discussed as significant components of generalization bounds , and a monotonic relationship between complexity measures and generalizations is mathematically established . In contrast , empirically motivated generalization measures , such as sharpness ( Keskar et al. , 2016 ) , are justified by experiments and observations . In particular , for DNNs , Jiang et al . ( 2019 ) have conducted exhaustive experiments to evaluate the effectiveness of generalization measures for three groups : norm-based measure , sharpness-based measure , and noise-based measure . • Norm-based measure : |θ| . Most of the proposed norm-based measures are based on the FisherRao Metric ( Liang et al. , 2019 ) , which does not capture generalization well . In particular , it has been reported that spectral complexity such as product of spectral norms of the layers ( Bartlett et al. , 2017 ) has a strong negative correlation with generalization . It is impossible to explain the success of DNN models with huge parameter sizes in recent years with these metrics . • Sharpness-based measure : H ( θ ) . Sharpness-based metrics , such as sharp minima and flat minima ( Keskar et al. , 2016 ) and PAC-Bayesian framework ( McAllester , 1999 ) , are not only associated with intuitive understanding but also empirically show a strong correlation with the generalization gap . However , some model architectures are known to show poor correlation ( Dinh et al. , 2017 ) . • Noise-based measure : C ( θ ) . Experimental results show that generalization measure based on gradient has potential ( Jiang et al. , 2019 ) . In particular , in their experiments , they observe that the variance of the gradient captures Sharpness , but they suggest that this is not a good generalization measure depending on the architecture of the model . These results suggest that studying generalization measures that can be estimated using H ( θ ) and C ( θ ) is prospective . However , since the combination ofH ( θ ) andC ( θ ) seen in TIC is not feasible to compute for practical DNN settings , so it was outside the scope of ( Jiang et al. , 2019 ) . 2.2 INFORMATION MATRIX : ELEMENTS OF GENERALIZATION MEASURES . Previous research has highlighted information matrices such as H ( θ ) and C ( θ ) in generalization measures in DNNs . Thomas et al . ( 2020 ) ; Kunstner et al . ( 2019 ) remarked that these matrices are often confused and misused , for example in the field of optimization , leading to wrong conclusions , even though these matrices play an essential role in the study of DNNs , especially in optimization ( Amari et al. , 2020 ; Martens & Grosse , 2015a ) , understanding implicit regularization in SGD ( Wen et al. , 2019 ; Zhu et al. , 2019 ) , and Bayesian inference ( Zhang et al. , 2018 ) . Before discussing these generalization measures , it should be made clear how each of the information matrices are defined . In this paper , uncentered gradient covariance matrix is denoted as C ( θ ) . We define qθ as a model distribution . Furthermore , we employ the data distributions p̂ and p introduced in the previous section as the empirical and true data distributions respectively . Matrices H ( θ ) , C ( θ ) and F ( θ ) are then defined as : H ( θ ) = Ep [ ∂2l ( y , f ( x , θ ) ) ∂θ∂θT ] ∈ Rd×d , C ( θ ) = Ep [ ∂l ( y , f ( x , θ ) ) ∂θ ∂l ( y , f ( x , θ ) ) ∂θT ] ∈ Rd×d , F ( θ ) = Eqθ [ ∂l ( y , f ( x , θ ) ) ∂θ ∂l ( y , f ( x , θ ) ) ∂θT ] ∈ Rd×d ( 2 ) The conditions under which these matrices are equal will be discussed in detail in section 3.1 . The relation betweenC ( θ ) andF ( θ ) is often misunderstood because they both involve the outer product of the gradients but they a different distribution when computing the expectation . As a subsequent study , Novak et al . ( 2018a ) concluded that consideration of either H ( θ ) or C ( θ ) alone is insufficient to estimate the generalization of DNNs and that both are essential . In particular , H ( θ ) is a value that does not depend on the distribution of input data ; however , as the generalization ability depends on the distribution of the data , it is also natural to considerC ( θ ) , which is related to noise in the gradient . Furthermore , as supporting evidence of Novak et al . ( 2018a ) ’ s claim , Thomas et al . ( 2020 ) showed empirically the effectiveness of TIC , a generalization measure that considers both H ( θ ) and C ( θ ) expressed by the equation 1 . However , Thomas et al . ( 2020 ) ’ s work only experimented with very small-scale NNs because it is challenging to calculate TIC with DNNs of practical size . As a matter of fact , even the ResNet-8 model used in the small-scale image classification benchmark CIFAR10 is not feasible , as it requires nearly 200TB of memory to calculate the TIC exactly . Remark 2.1 . It should also be noted that TIC is an information criterion for regular models , not for singular models such as DNNs , and its theoretical justification in the domain of DNNs is not clear . One of the characteristics of singular models is that the Fisher information matrix is not positive definite . | The authors experimentally investigate the ability of Takeuchi's information criterion to predict generalization gaps in various neural network architectures, with a particular focus on the Neural Tangent Kernel (NTK) regime. This was previously done only on small scale networks [1], and the authors extend it to state-of-the-art large scale architectures. In order to do this successfully, the authors propose to use various approximations, including the following: (1) The equivalent representation of the expected Hessian matrix H via the Gauss-Newton Matrix (with the equivalence proven in [2]). (2) A block diagonalization approach that ignores correlations between layers. (3) An even coarser approximation that consists in ignoring the off-diagonal elements of the relevant matrices H (expected hessian) and C (correlaction of the gradient) (4) Hutchinson's method to estimate the trace of the Hessian (from [3]) The authors run a vast number of experiments and demonstrate that Takeuchi's information criterion exhibits significant correlation with the generalization gap and that many of their approximations perform well. The authors also propose to use the TIC to improve hyperparmeter search, with encouraging results. / ========== References ========== [1] Valentin Thomas, Fabian Pedregosa, Bart van Merrie ̈nboer, Pierre-Antoine Mangazol, Yoshua Ben- gio, and NL Roux. Information matrices and generalization. 2019 arXiv preprint (Appears to have in fact been published at AiStats 2020 with the title " On the interplay between noise and curvature and its effect on optimization and generalization". ) [2] James Martens. New insights and perspectives on the natural gradient method. JMLR 2020 [3] Haim Avron and Sivan Toledo. Randomized algorithms for estimating the trace of an implicit sym- metric positive semi-definite matrix. Journal of the ACM 2011 | SP:d8086da21baa21153b9fa724a971736da2698031 |
Takeuchi's Information Criteria as Generalization Measures for DNNs Close to NTK Regime | 1 INTRODUCTION . Deep neural networks ( DNNs ) have been exhibiting great generalization abilities in many applications , but the mechanism of the generalization has not been fully understood yet ( Neyshabur et al. , 2014 ; Zhang et al. , 2016 ; Recht et al. , 2019 ) . Establishing a reliable generalization measure is an important research topic for generating a good model from limited data resources , including an application of hyperparameter search . Many attempts ( Arora et al. , 2018 ; Wei & Ma , 2019 ; Neyshabur et al. , 2018 ) have been taken to better understand the generalization phenomenon in deep learning models from theoretical points of view . From empirical points of view , there have been intensive studies ( Keskar et al. , 2016 ; Liang et al. , 2019 ; Bartlett et al. , 2017 ) in search of learning conditions that likely yield high model performance . Work by ( Jiang et al. , 2019 ) indicated that a measure that includes both hessian H ( θ ) 1 and covariance C ( θ ) defined from the loss and the network parameters θ near a local minimum may potentially show good correlation with generalization performance . Another study indicated that use of only a single measure , either HessianH ( θ ) or covariance C ( θ ) , fails to capture the generalization performance ( Novak et al. , 2018a ) . The generalization gap inherently stems from a discrepancy between the empirical and the true data distribution . A minimizer of the empirical loss will be affected by the noise due to a finite number of samples and by the form of the loss landscape near the minimum . The former can be characterized as noise ( C ( θ ) ) and the latter as curvature ( H ( θ ) ) . Taking these findings into account , we sought to model the generalization gap , then found that a classical information criterion called Takeuchi ’ s Information Criteria ( TIC ) ( Takeuchi , 1976 ) ex- 1H ( θ ) andC ( θ ) are defined in equation 2 presses generalization gap in the neural tangent kernel ( NTK ) regime . TIC has the following form TIC ( θ ) ︸ ︷︷ ︸ Information Criteria = −Ep̂ [ l ( y , f ( x , θ ) ) ] ︸ ︷︷ ︸ Mean Empirical Error + Tr ( H ( θ ) −1C ( θ ) ) ︸ ︷︷ ︸ Estimated Bias Term , ( 1 ) where f is a smooth function over θ ∈ Rd with input x and target y , and l is the negative loglikelihood , also denoted as loss function . The first term on the right-hand side is the log-likelihood , which takes the expectation over an empirical data distribution ( xi , yi ) ∼ p̂ . For the later discussion , we use θ̂ minimizes the empirical loss ; i.e. , θ̂ = arg minθEp̂ [ l ( y , f ( x , θ ) ) ] , and θ ∗ as the parameters that maximizes the likelihood with respect to the true data distribution ( x , y ) ∼ p ; i.e. , θ∗ = arg minθEp [ l ( y , f ( x , θ ) ) ] . For a DNN of practical size , exact computations of the matrices H ( θ ) , C ( θ ) are nearly infeasible due to large dimensionality . To make the computation feasible , we adopted a strategy of using shared components of the matrix to estimate TIC with fewer computations , based on a relationship among matrices such as H ( θ ) , C ( θ ) , and Fisher Information Matrix F ( θ ) . To further reduce the computational costs for the bias term , we examined methods using approximations and lower bounds so that TIC estimations for DNNs of practical sizes are feasible . In this work , we make the following contributions : • We provide empirical and theoretical evidence that TIC is highly correlated with generalization gap of DNNs that are close to NTK regime , despite the fact that TIC is not originally designed for singular model such as general DNNs . • We conduct comprehensive experiments in which more than 5,000 models , including ones close to NTK regime , with totally 12 DNN architectures , 4 datasets and 15 training settings are trained , and corresponding TICs are estimated with approximation techniques , to clarify conditions that TIC can well explain generalization gaps . • We use TIC as a threshold for pruning poorly performing trial models during hyperparameter optimization ( HPO ) and show that it can successfully prevent promising candidates from being pruned prematurely . 2 GENERALIZATION MEASURES . Generalization measures measure the generalization ability of statistical models . Typically , the generalization gap , which is defined as the difference between training loss and validation loss , is used to quantify the generalization ability . 2.1 WHICH GENERALIZATION MEASURE IS PROSPECTIVE ? . To answer this question , before demonstrating the effectiveness of TIC , we highlight the development of research in this area and the motivation behind this work . For understanding generalization behavior , there are two major approaches by quantifying generalization bounds and complexity measures . Approach of quantifying generalization bounds is pursued by theoretical groups to prove the bound of the generalization gap ( Dziugaite & Roy , 2017 ) . Although tight bounds can be proven , they are often based on assumptions that do not apply to practical DNN settings . In addition , no bounds have been shown to describe the performance of the current DNNs to a satisfactory level . On the other hand , approach of quantifying complexity measures , which do not necessarily certify bounds , follows the principle of Occam ’ s razor and evaluates the complexity of the model . Theoretically motivated complexity measures , including VC-dimension ( Vapnik & Chervonenkis , 2015 ) , PAC-Bayesian framework ( McAllester , 1999 ) , the norm of parameters ( Neyshabur et al. , 2015 ) , are often discussed as significant components of generalization bounds , and a monotonic relationship between complexity measures and generalizations is mathematically established . In contrast , empirically motivated generalization measures , such as sharpness ( Keskar et al. , 2016 ) , are justified by experiments and observations . In particular , for DNNs , Jiang et al . ( 2019 ) have conducted exhaustive experiments to evaluate the effectiveness of generalization measures for three groups : norm-based measure , sharpness-based measure , and noise-based measure . • Norm-based measure : |θ| . Most of the proposed norm-based measures are based on the FisherRao Metric ( Liang et al. , 2019 ) , which does not capture generalization well . In particular , it has been reported that spectral complexity such as product of spectral norms of the layers ( Bartlett et al. , 2017 ) has a strong negative correlation with generalization . It is impossible to explain the success of DNN models with huge parameter sizes in recent years with these metrics . • Sharpness-based measure : H ( θ ) . Sharpness-based metrics , such as sharp minima and flat minima ( Keskar et al. , 2016 ) and PAC-Bayesian framework ( McAllester , 1999 ) , are not only associated with intuitive understanding but also empirically show a strong correlation with the generalization gap . However , some model architectures are known to show poor correlation ( Dinh et al. , 2017 ) . • Noise-based measure : C ( θ ) . Experimental results show that generalization measure based on gradient has potential ( Jiang et al. , 2019 ) . In particular , in their experiments , they observe that the variance of the gradient captures Sharpness , but they suggest that this is not a good generalization measure depending on the architecture of the model . These results suggest that studying generalization measures that can be estimated using H ( θ ) and C ( θ ) is prospective . However , since the combination ofH ( θ ) andC ( θ ) seen in TIC is not feasible to compute for practical DNN settings , so it was outside the scope of ( Jiang et al. , 2019 ) . 2.2 INFORMATION MATRIX : ELEMENTS OF GENERALIZATION MEASURES . Previous research has highlighted information matrices such as H ( θ ) and C ( θ ) in generalization measures in DNNs . Thomas et al . ( 2020 ) ; Kunstner et al . ( 2019 ) remarked that these matrices are often confused and misused , for example in the field of optimization , leading to wrong conclusions , even though these matrices play an essential role in the study of DNNs , especially in optimization ( Amari et al. , 2020 ; Martens & Grosse , 2015a ) , understanding implicit regularization in SGD ( Wen et al. , 2019 ; Zhu et al. , 2019 ) , and Bayesian inference ( Zhang et al. , 2018 ) . Before discussing these generalization measures , it should be made clear how each of the information matrices are defined . In this paper , uncentered gradient covariance matrix is denoted as C ( θ ) . We define qθ as a model distribution . Furthermore , we employ the data distributions p̂ and p introduced in the previous section as the empirical and true data distributions respectively . Matrices H ( θ ) , C ( θ ) and F ( θ ) are then defined as : H ( θ ) = Ep [ ∂2l ( y , f ( x , θ ) ) ∂θ∂θT ] ∈ Rd×d , C ( θ ) = Ep [ ∂l ( y , f ( x , θ ) ) ∂θ ∂l ( y , f ( x , θ ) ) ∂θT ] ∈ Rd×d , F ( θ ) = Eqθ [ ∂l ( y , f ( x , θ ) ) ∂θ ∂l ( y , f ( x , θ ) ) ∂θT ] ∈ Rd×d ( 2 ) The conditions under which these matrices are equal will be discussed in detail in section 3.1 . The relation betweenC ( θ ) andF ( θ ) is often misunderstood because they both involve the outer product of the gradients but they a different distribution when computing the expectation . As a subsequent study , Novak et al . ( 2018a ) concluded that consideration of either H ( θ ) or C ( θ ) alone is insufficient to estimate the generalization of DNNs and that both are essential . In particular , H ( θ ) is a value that does not depend on the distribution of input data ; however , as the generalization ability depends on the distribution of the data , it is also natural to considerC ( θ ) , which is related to noise in the gradient . Furthermore , as supporting evidence of Novak et al . ( 2018a ) ’ s claim , Thomas et al . ( 2020 ) showed empirically the effectiveness of TIC , a generalization measure that considers both H ( θ ) and C ( θ ) expressed by the equation 1 . However , Thomas et al . ( 2020 ) ’ s work only experimented with very small-scale NNs because it is challenging to calculate TIC with DNNs of practical size . As a matter of fact , even the ResNet-8 model used in the small-scale image classification benchmark CIFAR10 is not feasible , as it requires nearly 200TB of memory to calculate the TIC exactly . Remark 2.1 . It should also be noted that TIC is an information criterion for regular models , not for singular models such as DNNs , and its theoretical justification in the domain of DNNs is not clear . One of the characteristics of singular models is that the Fisher information matrix is not positive definite . | This paper focuses on a fascinating, challenging problem: evaluating the generalization performances of neural networks based on the training set with some criteria. Specifically, the authors propose to measure the generalization ability via Takeuchi’s Information Criteria (TIC). Besides, the authors approximate the TIC to accelerate the process of estimation. The proposed method is promising and works well when d/n is large (where d = #parameters and n = #samples). However, I am still puzzled about some details. I will raise my score if the authors could clarify those concerns (see the following). | SP:d8086da21baa21153b9fa724a971736da2698031 |
Takeuchi's Information Criteria as Generalization Measures for DNNs Close to NTK Regime | 1 INTRODUCTION . Deep neural networks ( DNNs ) have been exhibiting great generalization abilities in many applications , but the mechanism of the generalization has not been fully understood yet ( Neyshabur et al. , 2014 ; Zhang et al. , 2016 ; Recht et al. , 2019 ) . Establishing a reliable generalization measure is an important research topic for generating a good model from limited data resources , including an application of hyperparameter search . Many attempts ( Arora et al. , 2018 ; Wei & Ma , 2019 ; Neyshabur et al. , 2018 ) have been taken to better understand the generalization phenomenon in deep learning models from theoretical points of view . From empirical points of view , there have been intensive studies ( Keskar et al. , 2016 ; Liang et al. , 2019 ; Bartlett et al. , 2017 ) in search of learning conditions that likely yield high model performance . Work by ( Jiang et al. , 2019 ) indicated that a measure that includes both hessian H ( θ ) 1 and covariance C ( θ ) defined from the loss and the network parameters θ near a local minimum may potentially show good correlation with generalization performance . Another study indicated that use of only a single measure , either HessianH ( θ ) or covariance C ( θ ) , fails to capture the generalization performance ( Novak et al. , 2018a ) . The generalization gap inherently stems from a discrepancy between the empirical and the true data distribution . A minimizer of the empirical loss will be affected by the noise due to a finite number of samples and by the form of the loss landscape near the minimum . The former can be characterized as noise ( C ( θ ) ) and the latter as curvature ( H ( θ ) ) . Taking these findings into account , we sought to model the generalization gap , then found that a classical information criterion called Takeuchi ’ s Information Criteria ( TIC ) ( Takeuchi , 1976 ) ex- 1H ( θ ) andC ( θ ) are defined in equation 2 presses generalization gap in the neural tangent kernel ( NTK ) regime . TIC has the following form TIC ( θ ) ︸ ︷︷ ︸ Information Criteria = −Ep̂ [ l ( y , f ( x , θ ) ) ] ︸ ︷︷ ︸ Mean Empirical Error + Tr ( H ( θ ) −1C ( θ ) ) ︸ ︷︷ ︸ Estimated Bias Term , ( 1 ) where f is a smooth function over θ ∈ Rd with input x and target y , and l is the negative loglikelihood , also denoted as loss function . The first term on the right-hand side is the log-likelihood , which takes the expectation over an empirical data distribution ( xi , yi ) ∼ p̂ . For the later discussion , we use θ̂ minimizes the empirical loss ; i.e. , θ̂ = arg minθEp̂ [ l ( y , f ( x , θ ) ) ] , and θ ∗ as the parameters that maximizes the likelihood with respect to the true data distribution ( x , y ) ∼ p ; i.e. , θ∗ = arg minθEp [ l ( y , f ( x , θ ) ) ] . For a DNN of practical size , exact computations of the matrices H ( θ ) , C ( θ ) are nearly infeasible due to large dimensionality . To make the computation feasible , we adopted a strategy of using shared components of the matrix to estimate TIC with fewer computations , based on a relationship among matrices such as H ( θ ) , C ( θ ) , and Fisher Information Matrix F ( θ ) . To further reduce the computational costs for the bias term , we examined methods using approximations and lower bounds so that TIC estimations for DNNs of practical sizes are feasible . In this work , we make the following contributions : • We provide empirical and theoretical evidence that TIC is highly correlated with generalization gap of DNNs that are close to NTK regime , despite the fact that TIC is not originally designed for singular model such as general DNNs . • We conduct comprehensive experiments in which more than 5,000 models , including ones close to NTK regime , with totally 12 DNN architectures , 4 datasets and 15 training settings are trained , and corresponding TICs are estimated with approximation techniques , to clarify conditions that TIC can well explain generalization gaps . • We use TIC as a threshold for pruning poorly performing trial models during hyperparameter optimization ( HPO ) and show that it can successfully prevent promising candidates from being pruned prematurely . 2 GENERALIZATION MEASURES . Generalization measures measure the generalization ability of statistical models . Typically , the generalization gap , which is defined as the difference between training loss and validation loss , is used to quantify the generalization ability . 2.1 WHICH GENERALIZATION MEASURE IS PROSPECTIVE ? . To answer this question , before demonstrating the effectiveness of TIC , we highlight the development of research in this area and the motivation behind this work . For understanding generalization behavior , there are two major approaches by quantifying generalization bounds and complexity measures . Approach of quantifying generalization bounds is pursued by theoretical groups to prove the bound of the generalization gap ( Dziugaite & Roy , 2017 ) . Although tight bounds can be proven , they are often based on assumptions that do not apply to practical DNN settings . In addition , no bounds have been shown to describe the performance of the current DNNs to a satisfactory level . On the other hand , approach of quantifying complexity measures , which do not necessarily certify bounds , follows the principle of Occam ’ s razor and evaluates the complexity of the model . Theoretically motivated complexity measures , including VC-dimension ( Vapnik & Chervonenkis , 2015 ) , PAC-Bayesian framework ( McAllester , 1999 ) , the norm of parameters ( Neyshabur et al. , 2015 ) , are often discussed as significant components of generalization bounds , and a monotonic relationship between complexity measures and generalizations is mathematically established . In contrast , empirically motivated generalization measures , such as sharpness ( Keskar et al. , 2016 ) , are justified by experiments and observations . In particular , for DNNs , Jiang et al . ( 2019 ) have conducted exhaustive experiments to evaluate the effectiveness of generalization measures for three groups : norm-based measure , sharpness-based measure , and noise-based measure . • Norm-based measure : |θ| . Most of the proposed norm-based measures are based on the FisherRao Metric ( Liang et al. , 2019 ) , which does not capture generalization well . In particular , it has been reported that spectral complexity such as product of spectral norms of the layers ( Bartlett et al. , 2017 ) has a strong negative correlation with generalization . It is impossible to explain the success of DNN models with huge parameter sizes in recent years with these metrics . • Sharpness-based measure : H ( θ ) . Sharpness-based metrics , such as sharp minima and flat minima ( Keskar et al. , 2016 ) and PAC-Bayesian framework ( McAllester , 1999 ) , are not only associated with intuitive understanding but also empirically show a strong correlation with the generalization gap . However , some model architectures are known to show poor correlation ( Dinh et al. , 2017 ) . • Noise-based measure : C ( θ ) . Experimental results show that generalization measure based on gradient has potential ( Jiang et al. , 2019 ) . In particular , in their experiments , they observe that the variance of the gradient captures Sharpness , but they suggest that this is not a good generalization measure depending on the architecture of the model . These results suggest that studying generalization measures that can be estimated using H ( θ ) and C ( θ ) is prospective . However , since the combination ofH ( θ ) andC ( θ ) seen in TIC is not feasible to compute for practical DNN settings , so it was outside the scope of ( Jiang et al. , 2019 ) . 2.2 INFORMATION MATRIX : ELEMENTS OF GENERALIZATION MEASURES . Previous research has highlighted information matrices such as H ( θ ) and C ( θ ) in generalization measures in DNNs . Thomas et al . ( 2020 ) ; Kunstner et al . ( 2019 ) remarked that these matrices are often confused and misused , for example in the field of optimization , leading to wrong conclusions , even though these matrices play an essential role in the study of DNNs , especially in optimization ( Amari et al. , 2020 ; Martens & Grosse , 2015a ) , understanding implicit regularization in SGD ( Wen et al. , 2019 ; Zhu et al. , 2019 ) , and Bayesian inference ( Zhang et al. , 2018 ) . Before discussing these generalization measures , it should be made clear how each of the information matrices are defined . In this paper , uncentered gradient covariance matrix is denoted as C ( θ ) . We define qθ as a model distribution . Furthermore , we employ the data distributions p̂ and p introduced in the previous section as the empirical and true data distributions respectively . Matrices H ( θ ) , C ( θ ) and F ( θ ) are then defined as : H ( θ ) = Ep [ ∂2l ( y , f ( x , θ ) ) ∂θ∂θT ] ∈ Rd×d , C ( θ ) = Ep [ ∂l ( y , f ( x , θ ) ) ∂θ ∂l ( y , f ( x , θ ) ) ∂θT ] ∈ Rd×d , F ( θ ) = Eqθ [ ∂l ( y , f ( x , θ ) ) ∂θ ∂l ( y , f ( x , θ ) ) ∂θT ] ∈ Rd×d ( 2 ) The conditions under which these matrices are equal will be discussed in detail in section 3.1 . The relation betweenC ( θ ) andF ( θ ) is often misunderstood because they both involve the outer product of the gradients but they a different distribution when computing the expectation . As a subsequent study , Novak et al . ( 2018a ) concluded that consideration of either H ( θ ) or C ( θ ) alone is insufficient to estimate the generalization of DNNs and that both are essential . In particular , H ( θ ) is a value that does not depend on the distribution of input data ; however , as the generalization ability depends on the distribution of the data , it is also natural to considerC ( θ ) , which is related to noise in the gradient . Furthermore , as supporting evidence of Novak et al . ( 2018a ) ’ s claim , Thomas et al . ( 2020 ) showed empirically the effectiveness of TIC , a generalization measure that considers both H ( θ ) and C ( θ ) expressed by the equation 1 . However , Thomas et al . ( 2020 ) ’ s work only experimented with very small-scale NNs because it is challenging to calculate TIC with DNNs of practical size . As a matter of fact , even the ResNet-8 model used in the small-scale image classification benchmark CIFAR10 is not feasible , as it requires nearly 200TB of memory to calculate the TIC exactly . Remark 2.1 . It should also be noted that TIC is an information criterion for regular models , not for singular models such as DNNs , and its theoretical justification in the domain of DNNs is not clear . One of the characteristics of singular models is that the Fisher information matrix is not positive definite . | The paper empirically studies the effectiveness of Takeuchi’s information criteria (TIC) for deep neural networks near the NTK regime. Since exact computation for TIC (Tr(H^{-1} C)) is often intractable for practical DNNs, the authors explore various approximations of TIC. The authors’ claimed contributions are: - Empirical and theoretical evidence that TIC is highly correlated with the generalization gap in DNNs that are close to the NTK regime. Given TIC is not designed for singular models, this is a surprising finding. - Conduct comprehensive experiments (varying models, datasets, training settings) showing TICs estimate generalization gaps - Application of these findings to prune poorly performing models in hyperparameter optimization demonstrates this can successfully prevent promising candidates being pruned prematurely. | SP:d8086da21baa21153b9fa724a971736da2698031 |
Convergent Graph Solvers | 1 INTRODUCTION . Our world is replete with networked systems , where their overall properties emerge from complex interactions among the system entities . Such networked systems attain their unique properties from their stationary states ; hence , finding these stationary properties is a common goal for many problems that arise in the science and engineering field . Examples of such problems include the minimization of the molecule ’ s potential energy that finds the stationary positions of the atoms to compute the potential energy of the molecule ( Moloi & Ali , 2005 ) , the PageRank algorithm that finds the stationary importance of online web pages to compute recommendation scores ( Brin & Page , 1998 ) , and the network analysis of fluid flow in porous media that finds the stationary pressures in pore networks to compute the macroscopic properties of the media ( Gostick et al. , 2016 ) . In these network-analytic problems , the network is often represented as a graph , and the stationary states are often computed through a problem-specific iterative method derived analytically from the prior knowledge of the target system . By applying the iterative map repeatedly , these methods compute the stationary states ( i.e. , fixed points ) and the associated properties of the target system . However , analytically deriving such iterative maps for highly complex systems typically requires tremendous efforts and time . Instead of deriving/designing the problem-specific iterative methods , researchers employ deep learning approaches to learn the iterative methods ( Dai et al. , 2018 ; Gu et al. , 2020 ; Hsieh et al. , 2019 ; Huang et al. , 2020 ) . These approaches learn an iterative map directly without using domain-specific knowledge , but using only the input and output data . By applying the learned iterative map , these approaches ( approximately ) compute the fixed points and predict the properties of a target system . Graph Neural Networks ( GNNs ) have been widely used to construct iterative maps ( Dai et al. , 2018 ; Gu et al. , 2020 ; Scarselli et al. , 2008 ; Alet et al. , 2019 ) . However , when applying this approach , the existence of the fixed points is seldom guaranteed . As a result , the number of iterative steps is often required to be specified , as a hyperparameter , to ensure the termination of the iterations . This may cause premature termination or inefficient backward propagation if the number of iterations is inadequately small or too large . 1The code is available at https : //github.com/Junyoungpark/CGS . In this study , we propose a convergent graph solver ( CGS ) , a deep learning method that can predict the solution of a target graph analytical problem using only the input and output data , and without requiring the prior knowledge of existing solvers or intermediate solutions . The forward propagation of CGS is designed to proceed in the following three steps : • Constructing the input-dependent linear-contracting iterative maps . CGS uses the input graph , which dictates the specification of the target network-analytic problem , to construct a set of linear contracting maps . This procedure formulates/set up the internal problem to be solved by considering the problem conditions and contexts ( i.e. , boundary conditions or initial conditions in PDE domains – the physical network problems ) . Furthermore , the input-dependent linear map can produce any size of transition map flexibly depending on the input size graph ; thus helping the trained model to generalize over unseen problems with different sizes ( size transferability ) . • Computing the fixed points via iterative methods . CGS constructs a set of linear contracting maps , each of which is guaranteed to have a unique fixed point that embeds the important features for conducting various end tasks . Thus , CGS computes the unique solutions of the constructed linear maps via iterative methods ( or direct inversion ) with convergence guarantee . • Decoding the fixed points to estimate the properties . By using a separate decoder architecture , we compute the fixed points in the latent space while expecting them to be an effective representation that can improve the predictive performance of the model . This enables CGS to be used not only for finding the real fixed points ( or its transportation ) if they exist , but also for computing the `` virtual fixed point '' as a representation learning method in general prediction tasks . The parameters of CGS are optimized with the gradient computed based on the implicit function theorem , which requires O ( 1 ) memory usage when computing the gradient along with the iterative steps . CGS is different from the other studies that solve the constrained optimization ( with convergence guarantee ) ( Gu et al. , 2020 ; Scarselli et al. , 2008 ; Tiezzi et al. , 2020 ) in that it does not impose any restriction when optimizing the parameters . Instead , CGS is inherently structured to have the unique fixed points owing to the uses of the linear map . Note that the structural restriction is only in the form of an iterative map ; we can flexibly generate the coefficients of the linear map using any network ( i.e. , GNN ) and utilize multiple linear maps to boost the representability . We evaluate the performance of CGS using two types of paradigmatic network-analytic problems : physical diffusion in networks and the Markov decision process , where the true labels indeed exist and can be computed analytically using linear and non-linear iterative methods , respectively . We also employ CGS to solve various graph classification benchmark tasks to show that CGS can serve as a general ( implicit ) layer like other GNN networks when conducting typical graph classification tasks . In these experiments , we seek to compute a virtual fixed point that can serve as the best hidden representation of the input when predicting the output . The results show that CGS can be ( 1 ) an effective solver for graph network problems or ( 2 ) an effective general computational layer for processing graph-structured data . 2 RELATED WORK . Convergent neural models . Previous studies that have attempted to achieve the convergence property of neural network embedding ( e.g. , hidden vectors of MLP and hidden states of recurrent neural networks ) can be grouped into two categories : soft and hard approaches . Soft approaches typically attain the desired convergence properties by augmenting the loss functions ( Erichson et al. , 2019 ; Miyato et al. , 2018 ) . Although the soft approaches are network-architecture agnostic , these methods can not guarantee the convergence of the learned mappings . On the other hand , hard approaches seek to guarantee the convergence of the iterative maps by restricting their parameters in certain ranges ( Gu et al. , 2020 ; Tiezzi et al. , 2020 ; Miller & Hardt , 2018 ; Kolter & Manek , 2019 ) . This is achieved by projecting the parameters of the models into stable regions . However , such projection may lead to non-optimal performances since it is performed after the gradient update , i.e. , the projection is disentangled from training objective . Implicit deep models . The forward propagation of CGS , which solves fixed point iterations , is closely related to deep implicit models . Instead of defining the computational procedures ( e.g. , the depth of layer in neural network ) explicitly , these models use implicit layers , which accept inputdependent equations and compute the solutions of the input equations , for the forward propagation . For instance , neural ordinary differential equations ( NODE ) ( Chen et al. , 2018 ; Massaroli et al. , 2020 ) solve ODE until the solver tolerance is satisfied or the integration domain is covered , the optimization layers ( Gould et al. , 2016 ; Amos & Kolter , 2017 ) solve the optimization problem until the duality gap converges , and the fixed point models ( Bai et al. , 2019 ; Winston & Kolter , 2020 ) solve the network-generated fixed point iterations until some numerical solver satisfy the convergence condition . Implicit models use these ( intermediate ) solutions to conduct various end tasks ( e.g. , regressions , or classifications ) . In this way , implicit models can impose desired behavioral characteristics into layers as inductive bias and hence , often show superior parameter/memory efficiency and predictability . Fixed points of graph convolution . Methods that find the fixed points of graph convolutions have been suggested in various contexts of graph-related tasks . Several works have utilized GNN along with RNN-like connections to ( approximately ) find the fixed points of graph convolutions ( Liao et al. , 2018 ; Dai et al. , 2018 ; Li et al. , 2015 ; Scarselli et al. , 2008 ) . Some have suggested to constrain the parameter space of GNN so that the trained GNN becomes a non-expansive map , thus producing the fixed point ( Gu et al. , 2020 ; Tiezzi et al. , 2020 ) . Others have proposed to apply an additional GNN layer on the embedded graph and penalize the difference between the output of the additional GNN layer and the embedded graph to guide the GNN to find the fixed points ( Scarselli et al. , 2008 ; Yang et al. , 2021 ) . It has been shown that regularizing GNN to find its fixed points improves the predictive performance ( Tiezzi et al. , 2020 ; Yang et al. , 2021 ) . Comparison between CGS and existing approaches . Combining the ideas of ( 1 ) computing/using the fixed points of the graph convolution ( as a representation learning ) and ( 2 ) utilizing the implicit differentiation of the model ( as a training method ) has been proposed by numerous studies ( Scarselli et al. , 2008 ; Liao et al. , 2018 ; Johnson et al. , 2020 ; Dai et al. , 2018 ; Bai et al. , 2019 ; Gallicchio & Micheli , 2020 ; Bai et al. , 2019 ; Tiezzi et al. , 2020 ; Gu et al. , 2020 ) . Majority of those studies assume that the convolution operators ( iterative map ) induce a convergent sequence of the ( hidden ) representation ; however , this assumption typically does not hold unless certain conditions hold for the convolution operator ( iterative map ) . When neither the convergence nor uniqueness holds , it can possibly introduce biases in the gradient computed by implicit differentiation ( Liao et al. , 2018 ; Blondel et al. , 2021 ) . Hence , to impose convergence , some methods restrict the learned convolutions to be strictly contractive ( i.e. , the hidden solutions are convergent ) by projecting the learned parameters into a certain region and solving the constraint training problems , respectively ( Gu et al. , 2020 ; Tiezzi et al. , 2020 ) . Unlike these methods restricting the parameters of the graph convolutions directly , CGS guarantees the convergence and the uniqueness of the fixed point by imposing the structural inductive bias on the iterative map , i.e. , using the contractive linear map that has a unique fixed point , thus alleviating the need to solve the constrained parameter optimization ( Tiezzi et al. , 2020 ) . 3 PROBLEM DESCRIPTION . The objective of many network-analytic problems can be described as : Find a solution vector Y ∗ from a graph G that represents the target network system . In this section , we briefly explain a general iterative scheme to compute Y ∗ from G. The problem specification G = ( V , E ) is a directed graph that is composed of a set of nodes V and a set of edges E. We define the ith node as vi and the edge from vi to vj as eij . The general scheme of the iterative methods is given as follows : H [ 0 ] = f ( G ) , ( 1 ) H [ n ] = T ( H [ n−1 ] ; G ) , n = 1 , 2 , ... ( 2 ) Y [ n ] = g ( H [ n ] ; G ) , n = 0 , 1 , ... ( 3 ) where f ( · ) is the problem-specific initialization scheme that transforms G into the initial hidden embedding H [ 0 ] , T is the problem-specific iterative map that updates the hidden embedding H [ n ] from the previous embedding H [ n−1 ] , and g ( · ) is the problem-specific decoding function that predicts the intermediate solution Y [ n ] . T is designed such that the fixed point iteration ( equation 2 ) converges to the unique fixed point H∗ : lim n→∞ H [ n ] = H∗ s.t . H∗ = T ( H∗ , G ) ( 4 ) The solution Y ∗ is then obtained by decoding H∗ , i.e. , g ( H∗ ; G ) ≜ Y ∗ . In many real-world network-analytic problems , we can obtain G and its corresponding solution Y ∗ , but not T , H [ n ] and Y [ n ] . Therefore , we aim to learn a mapping T from G to Y ∗ without using T , H [ n ] and Y [ n ] . | This paper proposes a method for learning how to predict the properties of graphs. These properties are fixed points (e.g. the PageRank vector or Equilibrium Values of a Diffusion Process).Wrt existing methods (SSE and IGNN), CGS learn multiple transition matrices instead of using a unique one. The underlying idea is to: (a) learn several linear operators whose iterations lead to a fixed point, (b) aggregate/combine the fixed points and (c) make the final prediction. With these elements to hand it is possible to find fixed points for several tasks. The proposed approach is tested in PHYSICAL DIFFUSION, GRAPH VALUE ITERATION and GRAPH CLASSIFICATION. The results show that CGSs are competitive with the state of the art and sometimes generalize better. | SP:250c61683b8bcede69f7dc26cceb9afa55af4f02 |
Convergent Graph Solvers | 1 INTRODUCTION . Our world is replete with networked systems , where their overall properties emerge from complex interactions among the system entities . Such networked systems attain their unique properties from their stationary states ; hence , finding these stationary properties is a common goal for many problems that arise in the science and engineering field . Examples of such problems include the minimization of the molecule ’ s potential energy that finds the stationary positions of the atoms to compute the potential energy of the molecule ( Moloi & Ali , 2005 ) , the PageRank algorithm that finds the stationary importance of online web pages to compute recommendation scores ( Brin & Page , 1998 ) , and the network analysis of fluid flow in porous media that finds the stationary pressures in pore networks to compute the macroscopic properties of the media ( Gostick et al. , 2016 ) . In these network-analytic problems , the network is often represented as a graph , and the stationary states are often computed through a problem-specific iterative method derived analytically from the prior knowledge of the target system . By applying the iterative map repeatedly , these methods compute the stationary states ( i.e. , fixed points ) and the associated properties of the target system . However , analytically deriving such iterative maps for highly complex systems typically requires tremendous efforts and time . Instead of deriving/designing the problem-specific iterative methods , researchers employ deep learning approaches to learn the iterative methods ( Dai et al. , 2018 ; Gu et al. , 2020 ; Hsieh et al. , 2019 ; Huang et al. , 2020 ) . These approaches learn an iterative map directly without using domain-specific knowledge , but using only the input and output data . By applying the learned iterative map , these approaches ( approximately ) compute the fixed points and predict the properties of a target system . Graph Neural Networks ( GNNs ) have been widely used to construct iterative maps ( Dai et al. , 2018 ; Gu et al. , 2020 ; Scarselli et al. , 2008 ; Alet et al. , 2019 ) . However , when applying this approach , the existence of the fixed points is seldom guaranteed . As a result , the number of iterative steps is often required to be specified , as a hyperparameter , to ensure the termination of the iterations . This may cause premature termination or inefficient backward propagation if the number of iterations is inadequately small or too large . 1The code is available at https : //github.com/Junyoungpark/CGS . In this study , we propose a convergent graph solver ( CGS ) , a deep learning method that can predict the solution of a target graph analytical problem using only the input and output data , and without requiring the prior knowledge of existing solvers or intermediate solutions . The forward propagation of CGS is designed to proceed in the following three steps : • Constructing the input-dependent linear-contracting iterative maps . CGS uses the input graph , which dictates the specification of the target network-analytic problem , to construct a set of linear contracting maps . This procedure formulates/set up the internal problem to be solved by considering the problem conditions and contexts ( i.e. , boundary conditions or initial conditions in PDE domains – the physical network problems ) . Furthermore , the input-dependent linear map can produce any size of transition map flexibly depending on the input size graph ; thus helping the trained model to generalize over unseen problems with different sizes ( size transferability ) . • Computing the fixed points via iterative methods . CGS constructs a set of linear contracting maps , each of which is guaranteed to have a unique fixed point that embeds the important features for conducting various end tasks . Thus , CGS computes the unique solutions of the constructed linear maps via iterative methods ( or direct inversion ) with convergence guarantee . • Decoding the fixed points to estimate the properties . By using a separate decoder architecture , we compute the fixed points in the latent space while expecting them to be an effective representation that can improve the predictive performance of the model . This enables CGS to be used not only for finding the real fixed points ( or its transportation ) if they exist , but also for computing the `` virtual fixed point '' as a representation learning method in general prediction tasks . The parameters of CGS are optimized with the gradient computed based on the implicit function theorem , which requires O ( 1 ) memory usage when computing the gradient along with the iterative steps . CGS is different from the other studies that solve the constrained optimization ( with convergence guarantee ) ( Gu et al. , 2020 ; Scarselli et al. , 2008 ; Tiezzi et al. , 2020 ) in that it does not impose any restriction when optimizing the parameters . Instead , CGS is inherently structured to have the unique fixed points owing to the uses of the linear map . Note that the structural restriction is only in the form of an iterative map ; we can flexibly generate the coefficients of the linear map using any network ( i.e. , GNN ) and utilize multiple linear maps to boost the representability . We evaluate the performance of CGS using two types of paradigmatic network-analytic problems : physical diffusion in networks and the Markov decision process , where the true labels indeed exist and can be computed analytically using linear and non-linear iterative methods , respectively . We also employ CGS to solve various graph classification benchmark tasks to show that CGS can serve as a general ( implicit ) layer like other GNN networks when conducting typical graph classification tasks . In these experiments , we seek to compute a virtual fixed point that can serve as the best hidden representation of the input when predicting the output . The results show that CGS can be ( 1 ) an effective solver for graph network problems or ( 2 ) an effective general computational layer for processing graph-structured data . 2 RELATED WORK . Convergent neural models . Previous studies that have attempted to achieve the convergence property of neural network embedding ( e.g. , hidden vectors of MLP and hidden states of recurrent neural networks ) can be grouped into two categories : soft and hard approaches . Soft approaches typically attain the desired convergence properties by augmenting the loss functions ( Erichson et al. , 2019 ; Miyato et al. , 2018 ) . Although the soft approaches are network-architecture agnostic , these methods can not guarantee the convergence of the learned mappings . On the other hand , hard approaches seek to guarantee the convergence of the iterative maps by restricting their parameters in certain ranges ( Gu et al. , 2020 ; Tiezzi et al. , 2020 ; Miller & Hardt , 2018 ; Kolter & Manek , 2019 ) . This is achieved by projecting the parameters of the models into stable regions . However , such projection may lead to non-optimal performances since it is performed after the gradient update , i.e. , the projection is disentangled from training objective . Implicit deep models . The forward propagation of CGS , which solves fixed point iterations , is closely related to deep implicit models . Instead of defining the computational procedures ( e.g. , the depth of layer in neural network ) explicitly , these models use implicit layers , which accept inputdependent equations and compute the solutions of the input equations , for the forward propagation . For instance , neural ordinary differential equations ( NODE ) ( Chen et al. , 2018 ; Massaroli et al. , 2020 ) solve ODE until the solver tolerance is satisfied or the integration domain is covered , the optimization layers ( Gould et al. , 2016 ; Amos & Kolter , 2017 ) solve the optimization problem until the duality gap converges , and the fixed point models ( Bai et al. , 2019 ; Winston & Kolter , 2020 ) solve the network-generated fixed point iterations until some numerical solver satisfy the convergence condition . Implicit models use these ( intermediate ) solutions to conduct various end tasks ( e.g. , regressions , or classifications ) . In this way , implicit models can impose desired behavioral characteristics into layers as inductive bias and hence , often show superior parameter/memory efficiency and predictability . Fixed points of graph convolution . Methods that find the fixed points of graph convolutions have been suggested in various contexts of graph-related tasks . Several works have utilized GNN along with RNN-like connections to ( approximately ) find the fixed points of graph convolutions ( Liao et al. , 2018 ; Dai et al. , 2018 ; Li et al. , 2015 ; Scarselli et al. , 2008 ) . Some have suggested to constrain the parameter space of GNN so that the trained GNN becomes a non-expansive map , thus producing the fixed point ( Gu et al. , 2020 ; Tiezzi et al. , 2020 ) . Others have proposed to apply an additional GNN layer on the embedded graph and penalize the difference between the output of the additional GNN layer and the embedded graph to guide the GNN to find the fixed points ( Scarselli et al. , 2008 ; Yang et al. , 2021 ) . It has been shown that regularizing GNN to find its fixed points improves the predictive performance ( Tiezzi et al. , 2020 ; Yang et al. , 2021 ) . Comparison between CGS and existing approaches . Combining the ideas of ( 1 ) computing/using the fixed points of the graph convolution ( as a representation learning ) and ( 2 ) utilizing the implicit differentiation of the model ( as a training method ) has been proposed by numerous studies ( Scarselli et al. , 2008 ; Liao et al. , 2018 ; Johnson et al. , 2020 ; Dai et al. , 2018 ; Bai et al. , 2019 ; Gallicchio & Micheli , 2020 ; Bai et al. , 2019 ; Tiezzi et al. , 2020 ; Gu et al. , 2020 ) . Majority of those studies assume that the convolution operators ( iterative map ) induce a convergent sequence of the ( hidden ) representation ; however , this assumption typically does not hold unless certain conditions hold for the convolution operator ( iterative map ) . When neither the convergence nor uniqueness holds , it can possibly introduce biases in the gradient computed by implicit differentiation ( Liao et al. , 2018 ; Blondel et al. , 2021 ) . Hence , to impose convergence , some methods restrict the learned convolutions to be strictly contractive ( i.e. , the hidden solutions are convergent ) by projecting the learned parameters into a certain region and solving the constraint training problems , respectively ( Gu et al. , 2020 ; Tiezzi et al. , 2020 ) . Unlike these methods restricting the parameters of the graph convolutions directly , CGS guarantees the convergence and the uniqueness of the fixed point by imposing the structural inductive bias on the iterative map , i.e. , using the contractive linear map that has a unique fixed point , thus alleviating the need to solve the constrained parameter optimization ( Tiezzi et al. , 2020 ) . 3 PROBLEM DESCRIPTION . The objective of many network-analytic problems can be described as : Find a solution vector Y ∗ from a graph G that represents the target network system . In this section , we briefly explain a general iterative scheme to compute Y ∗ from G. The problem specification G = ( V , E ) is a directed graph that is composed of a set of nodes V and a set of edges E. We define the ith node as vi and the edge from vi to vj as eij . The general scheme of the iterative methods is given as follows : H [ 0 ] = f ( G ) , ( 1 ) H [ n ] = T ( H [ n−1 ] ; G ) , n = 1 , 2 , ... ( 2 ) Y [ n ] = g ( H [ n ] ; G ) , n = 0 , 1 , ... ( 3 ) where f ( · ) is the problem-specific initialization scheme that transforms G into the initial hidden embedding H [ 0 ] , T is the problem-specific iterative map that updates the hidden embedding H [ n ] from the previous embedding H [ n−1 ] , and g ( · ) is the problem-specific decoding function that predicts the intermediate solution Y [ n ] . T is designed such that the fixed point iteration ( equation 2 ) converges to the unique fixed point H∗ : lim n→∞ H [ n ] = H∗ s.t . H∗ = T ( H∗ , G ) ( 4 ) The solution Y ∗ is then obtained by decoding H∗ , i.e. , g ( H∗ ; G ) ≜ Y ∗ . In many real-world network-analytic problems , we can obtain G and its corresponding solution Y ∗ , but not T , H [ n ] and Y [ n ] . Therefore , we aim to learn a mapping T from G to Y ∗ without using T , H [ n ] and Y [ n ] . | The paper introduces the equilibrium GNN-based model with a linear transition map. The transition map is made contracting to ensure that the fixed point exists and is unique. The paper provides the extensive comparisons and ablation studies for the proposed model. | SP:250c61683b8bcede69f7dc26cceb9afa55af4f02 |
Convergent Graph Solvers | 1 INTRODUCTION . Our world is replete with networked systems , where their overall properties emerge from complex interactions among the system entities . Such networked systems attain their unique properties from their stationary states ; hence , finding these stationary properties is a common goal for many problems that arise in the science and engineering field . Examples of such problems include the minimization of the molecule ’ s potential energy that finds the stationary positions of the atoms to compute the potential energy of the molecule ( Moloi & Ali , 2005 ) , the PageRank algorithm that finds the stationary importance of online web pages to compute recommendation scores ( Brin & Page , 1998 ) , and the network analysis of fluid flow in porous media that finds the stationary pressures in pore networks to compute the macroscopic properties of the media ( Gostick et al. , 2016 ) . In these network-analytic problems , the network is often represented as a graph , and the stationary states are often computed through a problem-specific iterative method derived analytically from the prior knowledge of the target system . By applying the iterative map repeatedly , these methods compute the stationary states ( i.e. , fixed points ) and the associated properties of the target system . However , analytically deriving such iterative maps for highly complex systems typically requires tremendous efforts and time . Instead of deriving/designing the problem-specific iterative methods , researchers employ deep learning approaches to learn the iterative methods ( Dai et al. , 2018 ; Gu et al. , 2020 ; Hsieh et al. , 2019 ; Huang et al. , 2020 ) . These approaches learn an iterative map directly without using domain-specific knowledge , but using only the input and output data . By applying the learned iterative map , these approaches ( approximately ) compute the fixed points and predict the properties of a target system . Graph Neural Networks ( GNNs ) have been widely used to construct iterative maps ( Dai et al. , 2018 ; Gu et al. , 2020 ; Scarselli et al. , 2008 ; Alet et al. , 2019 ) . However , when applying this approach , the existence of the fixed points is seldom guaranteed . As a result , the number of iterative steps is often required to be specified , as a hyperparameter , to ensure the termination of the iterations . This may cause premature termination or inefficient backward propagation if the number of iterations is inadequately small or too large . 1The code is available at https : //github.com/Junyoungpark/CGS . In this study , we propose a convergent graph solver ( CGS ) , a deep learning method that can predict the solution of a target graph analytical problem using only the input and output data , and without requiring the prior knowledge of existing solvers or intermediate solutions . The forward propagation of CGS is designed to proceed in the following three steps : • Constructing the input-dependent linear-contracting iterative maps . CGS uses the input graph , which dictates the specification of the target network-analytic problem , to construct a set of linear contracting maps . This procedure formulates/set up the internal problem to be solved by considering the problem conditions and contexts ( i.e. , boundary conditions or initial conditions in PDE domains – the physical network problems ) . Furthermore , the input-dependent linear map can produce any size of transition map flexibly depending on the input size graph ; thus helping the trained model to generalize over unseen problems with different sizes ( size transferability ) . • Computing the fixed points via iterative methods . CGS constructs a set of linear contracting maps , each of which is guaranteed to have a unique fixed point that embeds the important features for conducting various end tasks . Thus , CGS computes the unique solutions of the constructed linear maps via iterative methods ( or direct inversion ) with convergence guarantee . • Decoding the fixed points to estimate the properties . By using a separate decoder architecture , we compute the fixed points in the latent space while expecting them to be an effective representation that can improve the predictive performance of the model . This enables CGS to be used not only for finding the real fixed points ( or its transportation ) if they exist , but also for computing the `` virtual fixed point '' as a representation learning method in general prediction tasks . The parameters of CGS are optimized with the gradient computed based on the implicit function theorem , which requires O ( 1 ) memory usage when computing the gradient along with the iterative steps . CGS is different from the other studies that solve the constrained optimization ( with convergence guarantee ) ( Gu et al. , 2020 ; Scarselli et al. , 2008 ; Tiezzi et al. , 2020 ) in that it does not impose any restriction when optimizing the parameters . Instead , CGS is inherently structured to have the unique fixed points owing to the uses of the linear map . Note that the structural restriction is only in the form of an iterative map ; we can flexibly generate the coefficients of the linear map using any network ( i.e. , GNN ) and utilize multiple linear maps to boost the representability . We evaluate the performance of CGS using two types of paradigmatic network-analytic problems : physical diffusion in networks and the Markov decision process , where the true labels indeed exist and can be computed analytically using linear and non-linear iterative methods , respectively . We also employ CGS to solve various graph classification benchmark tasks to show that CGS can serve as a general ( implicit ) layer like other GNN networks when conducting typical graph classification tasks . In these experiments , we seek to compute a virtual fixed point that can serve as the best hidden representation of the input when predicting the output . The results show that CGS can be ( 1 ) an effective solver for graph network problems or ( 2 ) an effective general computational layer for processing graph-structured data . 2 RELATED WORK . Convergent neural models . Previous studies that have attempted to achieve the convergence property of neural network embedding ( e.g. , hidden vectors of MLP and hidden states of recurrent neural networks ) can be grouped into two categories : soft and hard approaches . Soft approaches typically attain the desired convergence properties by augmenting the loss functions ( Erichson et al. , 2019 ; Miyato et al. , 2018 ) . Although the soft approaches are network-architecture agnostic , these methods can not guarantee the convergence of the learned mappings . On the other hand , hard approaches seek to guarantee the convergence of the iterative maps by restricting their parameters in certain ranges ( Gu et al. , 2020 ; Tiezzi et al. , 2020 ; Miller & Hardt , 2018 ; Kolter & Manek , 2019 ) . This is achieved by projecting the parameters of the models into stable regions . However , such projection may lead to non-optimal performances since it is performed after the gradient update , i.e. , the projection is disentangled from training objective . Implicit deep models . The forward propagation of CGS , which solves fixed point iterations , is closely related to deep implicit models . Instead of defining the computational procedures ( e.g. , the depth of layer in neural network ) explicitly , these models use implicit layers , which accept inputdependent equations and compute the solutions of the input equations , for the forward propagation . For instance , neural ordinary differential equations ( NODE ) ( Chen et al. , 2018 ; Massaroli et al. , 2020 ) solve ODE until the solver tolerance is satisfied or the integration domain is covered , the optimization layers ( Gould et al. , 2016 ; Amos & Kolter , 2017 ) solve the optimization problem until the duality gap converges , and the fixed point models ( Bai et al. , 2019 ; Winston & Kolter , 2020 ) solve the network-generated fixed point iterations until some numerical solver satisfy the convergence condition . Implicit models use these ( intermediate ) solutions to conduct various end tasks ( e.g. , regressions , or classifications ) . In this way , implicit models can impose desired behavioral characteristics into layers as inductive bias and hence , often show superior parameter/memory efficiency and predictability . Fixed points of graph convolution . Methods that find the fixed points of graph convolutions have been suggested in various contexts of graph-related tasks . Several works have utilized GNN along with RNN-like connections to ( approximately ) find the fixed points of graph convolutions ( Liao et al. , 2018 ; Dai et al. , 2018 ; Li et al. , 2015 ; Scarselli et al. , 2008 ) . Some have suggested to constrain the parameter space of GNN so that the trained GNN becomes a non-expansive map , thus producing the fixed point ( Gu et al. , 2020 ; Tiezzi et al. , 2020 ) . Others have proposed to apply an additional GNN layer on the embedded graph and penalize the difference between the output of the additional GNN layer and the embedded graph to guide the GNN to find the fixed points ( Scarselli et al. , 2008 ; Yang et al. , 2021 ) . It has been shown that regularizing GNN to find its fixed points improves the predictive performance ( Tiezzi et al. , 2020 ; Yang et al. , 2021 ) . Comparison between CGS and existing approaches . Combining the ideas of ( 1 ) computing/using the fixed points of the graph convolution ( as a representation learning ) and ( 2 ) utilizing the implicit differentiation of the model ( as a training method ) has been proposed by numerous studies ( Scarselli et al. , 2008 ; Liao et al. , 2018 ; Johnson et al. , 2020 ; Dai et al. , 2018 ; Bai et al. , 2019 ; Gallicchio & Micheli , 2020 ; Bai et al. , 2019 ; Tiezzi et al. , 2020 ; Gu et al. , 2020 ) . Majority of those studies assume that the convolution operators ( iterative map ) induce a convergent sequence of the ( hidden ) representation ; however , this assumption typically does not hold unless certain conditions hold for the convolution operator ( iterative map ) . When neither the convergence nor uniqueness holds , it can possibly introduce biases in the gradient computed by implicit differentiation ( Liao et al. , 2018 ; Blondel et al. , 2021 ) . Hence , to impose convergence , some methods restrict the learned convolutions to be strictly contractive ( i.e. , the hidden solutions are convergent ) by projecting the learned parameters into a certain region and solving the constraint training problems , respectively ( Gu et al. , 2020 ; Tiezzi et al. , 2020 ) . Unlike these methods restricting the parameters of the graph convolutions directly , CGS guarantees the convergence and the uniqueness of the fixed point by imposing the structural inductive bias on the iterative map , i.e. , using the contractive linear map that has a unique fixed point , thus alleviating the need to solve the constrained parameter optimization ( Tiezzi et al. , 2020 ) . 3 PROBLEM DESCRIPTION . The objective of many network-analytic problems can be described as : Find a solution vector Y ∗ from a graph G that represents the target network system . In this section , we briefly explain a general iterative scheme to compute Y ∗ from G. The problem specification G = ( V , E ) is a directed graph that is composed of a set of nodes V and a set of edges E. We define the ith node as vi and the edge from vi to vj as eij . The general scheme of the iterative methods is given as follows : H [ 0 ] = f ( G ) , ( 1 ) H [ n ] = T ( H [ n−1 ] ; G ) , n = 1 , 2 , ... ( 2 ) Y [ n ] = g ( H [ n ] ; G ) , n = 0 , 1 , ... ( 3 ) where f ( · ) is the problem-specific initialization scheme that transforms G into the initial hidden embedding H [ 0 ] , T is the problem-specific iterative map that updates the hidden embedding H [ n ] from the previous embedding H [ n−1 ] , and g ( · ) is the problem-specific decoding function that predicts the intermediate solution Y [ n ] . T is designed such that the fixed point iteration ( equation 2 ) converges to the unique fixed point H∗ : lim n→∞ H [ n ] = H∗ s.t . H∗ = T ( H∗ , G ) ( 4 ) The solution Y ∗ is then obtained by decoding H∗ , i.e. , g ( H∗ ; G ) ≜ Y ∗ . In many real-world network-analytic problems , we can obtain G and its corresponding solution Y ∗ , but not T , H [ n ] and Y [ n ] . Therefore , we aim to learn a mapping T from G to Y ∗ without using T , H [ n ] and Y [ n ] . | This paper proposes a graph neural network termed "Convergent Graph Solvers" that computes the stationary distribution of stochastic matrices. This is achieved by an implicit definition of a linear system and by computing the fixed point of that system. The paper shows on a range of problems that the proposed approach works well and that it is particularly fast for smaller graphs. | SP:250c61683b8bcede69f7dc26cceb9afa55af4f02 |
NeuroSED: Learning Subgraph Similarity via Graph Neural Networks | 1 INTRODUCTION AND RELATED WORK . Graphs are used to model data in a wide variety of domains . Examples include chemical compounds ( Sankar et al. , 2017 ) , protein-protein interaction networks ( PPI ) ( Alon et al. , 2008 ) , knowledge graphs ( Ebsch et al. , 2020 ) , and social networks ( Kempe et al. , 2003 ) . A distance function on any dataset , including graphs , is a fundamental operator . Among several distance measures on graphs , edit distance is one of the most powerful and popular mechanisms ( Liang & Zhao , 2017 ; Zhao et al. , 2013 ; Bougleux et al. , 2017 ; Daller et al. , 2018 ; Fankhauser et al. , 2011 ; Riesen & Bunke , 2009 ; Zeng et al. , 2009 ; He & Singh , 2006 ) . Edit distance can be posed in two forms : graph edit distance ( GED ) and subgraph edit distance ( SED ) . Given two graphs G1 and G2 , GED ( G1 , G2 ) returns the minimum cost of edits needed to convert G1 to G2 . i.e. , for G1 to become isomorphic to G2 . An edit can be the addition or deletion of edges and nodes , or replacement of edge or node labels , with an associated cost . In SED ( G1 , G2 ) , the goal is to identify the minimum cost of edits so that G1 is a subgraph ( subgraph isomorphic ) of G2 . For examples , see Fig . 5a in the appendix . While the applications of GED and SED are beyond doubt , their applicability is constrained by their computation costs . Specifically , both GED and SED are NP-complete ( Zeng et al. , 2009 ; Neuhaus et al. , 2006 ; He & Singh , 2006 ) . To mitigate this computational bottleneck , several heuristics ( Bougleux et al. , 2017 ; Daller et al. , 2018 ; Fankhauser et al. , 2011 ; Riesen & Bunke , 2009 ; Neuhaus et al. , 2006 ) and index structures ( He & Singh , 2006 ; Zeng et al. , 2009 ; Liang & Zhao , 2017 ; Zhao et al. , 2013 ) have been proposed . Recently , graph neural networks have been shown to be effective in learning and predicting GED ( Bai et al. , 2019 ; Wang et al. , 2021 ; Li et al. , 2019 ; Bai et al. , 2020 ; Zhang et al. , 2021 ; Xiu et al. , 2020 ) and subgraph isomorphism ( Rex et al. , 2020 ) . The basic goal in all these algorithms is to learn a neural model from a training set of graph pairs and their distances , such that , at inference time , given an unseen graph pair , we are able to predict its distance accurately . Wang et al . ( 2020 ) designed an algorithm to characterize graphs through sampling random walks and then embedding them in a feature space . While Wang et al . ( 2020 ) has not been studied in the context of GED or SED , the authors have shown that they can detect graph isomorphism . While this progress in the area of graph querying is undoubtedly impressive , there is scope to do more . • Modeling SED : Existing neural approaches to learning GED can not easily be adapted to learn SED . While GED is symmetric , SED is not . Most neural architectures for GED have the assumption of symmetry at its core and hence modeling SED is non-trivial . In App . A , we provide a detailed analysis of the limitations of prior architectures in failing to model SED . • Exponential Search Space : Computing SED ( G1 , G2 ) conceptually requires us to compare the query graph G1 with the exponentially many subgraphs of the target graph G2 . Therefore , it is imperative that the model has an efficient and effective mechanism to prune the search space without compromising on the prediction accuracy . We note that while several index structures and heuristics exist for GED ( He & Singh , 2006 ; Zeng et al. , 2009 ; Bai et al. , 2019 ; Wang et al. , 2021 ) , none exist for SED . Thus , scalability of SED on large graphs remains an unsolved problem . • Preservation of theoretical properties : GED is a metric distance function . While SED is not metric due to being asymmetric , it satisfies the triangle inequality , non-negativity , and subgraphidentity . Several higher-order tasks such as clustering and indexing rely on such properties ( Hadi , 1991 ; Dohnal et al. , 2003 ; Hjaltason & Samet , 2003 ; Samet , 2005 ; Uhlmann , 1991 ; Yianilos , 1993 ; Zezula et al. , 2006 ; Brin , 1995 ; Chávez et al. , 2001 ) . Existing neural approaches do not preserve these properties , which limits their usability for these higher order tasks . • Pair-independent computation : There is little scope for pre-computation in existing approaches ( either neural or non-neural ) , as the major computations are pair-dependent , i.e. , both G1 and G2 need to be known . In a typical graph querying framework , the graph database is known apriori ; only the query graph is provided at runtime . If we can generate pair-independent embeddings , and make efficient predictions directly in the embedding space , then retrieval can be sped up tremendously by pre-computing and indexing the embeddings of the database graphs beforehand . • Learning with low-volume data : Generating a large amount of high quality training data is computationally prohibitive for SED/GED . So , an effective model should encode powerful priors for SED/GED prediction , to enable generalization even with scarce training data . We address these challenges by a novel architecture called NEUROSED . Our key contributions are : • Novel formulation : We formulate the problem of learning subgraph edit distance ( SED ) for graphs . Since SED is more general than subgraph isomorphism and GED , the proposed theory extends to prediction of GED , graph isomorphism and subgraph isomorphism . • Neural architecture : NEUROSED utilizes a siamese graph isomorphism network ( Xu et al. , 2018a ) to embed graphs in a pair-independent fashion to an embedding space over which a simple function can predict the SED ( or GED ) . The same embedding model is used for both G1 and G2 , which captures the prior that similar topological properties need to be considered for both graphs . The carefully crafted prediction function serves as another inductive bias for the model , which , in addition to enabling high generalization accuracy , preserves the key properties of SED/GED , which is a major contribution of our work over existing neural approaches . • Indexable embeddings : The prediction function satisfies the triangle inequality over the embedding space for both SED and GED . This allows utilization of the rich literature on index structures ( Elkan , 2003 ; Kwedlo & Czochanski , 2019 ; Ciaccia et al. , 1997 ) to boost efficiency . • Accurate , Fast and Scalable : Extensive experiments on real graph datasets containing up to a million nodes establish that NEUROSED is more accurate in both GED and SED when compared to the state of the art and is more than 3 orders of magnitude faster in range and k-NN queries . 2 PRELIMINARIES AND PROBLEM FORMULATION . We denote a labeled undirected graph as G = ( V , E , L ) where V is the node set , E is the edge set and L : V ∪ E → Σ is the labeling function over nodes and edges . Σ is the universe of all labels and contains a special empty label . L ( v ) and L ( e ) denote the labels of node v and edge e respectively . G1 ⊆ G2 denotes that G1 is a subgraph of G2 . All notations used in our work are summarized in Table 6 in the appendix . For the definitions of subgraph and graph isomorphism , refer to App . B in the supplementary . The computation of GED relies on a graph mapping . Definition 1 ( Graph Mapping ) Given two graphs G1 and G2 , let G̃1 = ( Ṽ1 , Ẽ1 , L̃1 ) and G̃2 = ( Ṽ2 , Ẽ2 , L̃2 ) be obtained by adding dummy nodes and edges ( labeled with ) to G1 and G2 respectively , such that |V1| = |V2| and |E1| = |E2| . A node mapping between G1 and G2 is a bijection π : G̃1 → G̃2 where ( i ) ∀v ∈ Ṽ1 , π ( v ) ∈ Ṽ2 and at least one of v and π ( v ) is not a dummy ; ( ii ) ∀e = ( v1 , v2 ) ∈ Ẽ1 , π ( e ) = ( π ( v1 ) , ( π ( v2 ) ) ) ∈ Ẽ2 and at least one of e and π ( e ) is not a dummy . Example 1 Fig . 5b shows a graph mapping . Edge mappings can be trivially inferred , so are omitted . Definition 2 ( Graph Edit Distance ( GED ) under mapping π ) GED between G1 and G2 under π is GEDπ ( G1 , G2 ) = ∑ v∈Ṽ1 d ( L ( v ) , L ( π ( v ) ) ) + ∑ e∈Ẽ1 d ( L ( e ) , L ( π ( e ) ) ) ( 1 ) where d : Σ× Σ→ R+0 is a distance function over the label set . d ( ` 1 , ` 2 ) models an insertion if ` 1 = , deletion if ` 2 = and replacement if ` 1 6= ` 2 and neither ` 1 nor ` 2 is a dummy . We assume d to be a binary function , where d ( ` 1 , ` 2 ) = 1 if ` 1 6= ` 2 , otherwise , 0 . Our framework easily extends to more general distance functions ( details in App . D ) . Example 2 GED for the shown mapping in Fig . 5b is 3 . The red mappings incur a cost of 1 . Definition 3 ( Graph Edit Distance ( GED ) ) GED is the minimum distance under all mappings . GED ( G1 , G2 ) = min ∀π∈Φ ( G1 , G2 ) GEDπ ( G1 , G2 ) ( 2 ) where Φ ( G1 , G2 ) denotes the set of all possible node maps from G1 to G2 . Definition 4 ( Subgraph Edit Distance ( SED ) ) SED is the minimum GED over all subgraphs of G2 . SED ( G1 , G2 ) = min S⊆G2 GED ( G1 , S ) ( 3 ) Example 3 Revisiting Fig . 5b , GED ( G1 , G2 ) = 3 . The shown mapping incurs the minimum cost . SED ( G1 , G2 ) = 1 . Refer to Fig . 5a for more examples . Problem 1 ( Learning SED ) Given a training set of tuples of the form 〈G1 , G2 , SED ( G1 , G2 ) 〉 , learn a neural model to predict SED ( Q1 , Q2 ) on unseen graphs Q1 and Q2 . Problem 2 ( Learning GED ) Given a training set of tuples of the form 〈G1 , G2 , GED ( G1 , G2 ) 〉 , learn a neural model to predict GED ( Q1 , Q2 ) on unseen graphs Q1 and Q2 . | The paper addresses the problem of graph/subgraph similarity search in terms of the edit distance, termed GED/SED, respectively. Unfortunately, both GED and SED are NP hard, with exponential search space, making the cost prohibitive on even moderately large graphs/queries. Instead, the authors apply a neural network based approach, by designing a siamese graph neural network called NEUROSED. In particular, NEUROSED is able to preserve theoretical properties of SED/GED, such as triangle inequality, through a purposely designed prediction function. Experiments are conducted on real graph datasets for both SED and GED, which evaluates the effectiveness and efficiency of GED/SED. | SP:a102939ae37317019265effb63bcaa43b809bf76 |
NeuroSED: Learning Subgraph Similarity via Graph Neural Networks | 1 INTRODUCTION AND RELATED WORK . Graphs are used to model data in a wide variety of domains . Examples include chemical compounds ( Sankar et al. , 2017 ) , protein-protein interaction networks ( PPI ) ( Alon et al. , 2008 ) , knowledge graphs ( Ebsch et al. , 2020 ) , and social networks ( Kempe et al. , 2003 ) . A distance function on any dataset , including graphs , is a fundamental operator . Among several distance measures on graphs , edit distance is one of the most powerful and popular mechanisms ( Liang & Zhao , 2017 ; Zhao et al. , 2013 ; Bougleux et al. , 2017 ; Daller et al. , 2018 ; Fankhauser et al. , 2011 ; Riesen & Bunke , 2009 ; Zeng et al. , 2009 ; He & Singh , 2006 ) . Edit distance can be posed in two forms : graph edit distance ( GED ) and subgraph edit distance ( SED ) . Given two graphs G1 and G2 , GED ( G1 , G2 ) returns the minimum cost of edits needed to convert G1 to G2 . i.e. , for G1 to become isomorphic to G2 . An edit can be the addition or deletion of edges and nodes , or replacement of edge or node labels , with an associated cost . In SED ( G1 , G2 ) , the goal is to identify the minimum cost of edits so that G1 is a subgraph ( subgraph isomorphic ) of G2 . For examples , see Fig . 5a in the appendix . While the applications of GED and SED are beyond doubt , their applicability is constrained by their computation costs . Specifically , both GED and SED are NP-complete ( Zeng et al. , 2009 ; Neuhaus et al. , 2006 ; He & Singh , 2006 ) . To mitigate this computational bottleneck , several heuristics ( Bougleux et al. , 2017 ; Daller et al. , 2018 ; Fankhauser et al. , 2011 ; Riesen & Bunke , 2009 ; Neuhaus et al. , 2006 ) and index structures ( He & Singh , 2006 ; Zeng et al. , 2009 ; Liang & Zhao , 2017 ; Zhao et al. , 2013 ) have been proposed . Recently , graph neural networks have been shown to be effective in learning and predicting GED ( Bai et al. , 2019 ; Wang et al. , 2021 ; Li et al. , 2019 ; Bai et al. , 2020 ; Zhang et al. , 2021 ; Xiu et al. , 2020 ) and subgraph isomorphism ( Rex et al. , 2020 ) . The basic goal in all these algorithms is to learn a neural model from a training set of graph pairs and their distances , such that , at inference time , given an unseen graph pair , we are able to predict its distance accurately . Wang et al . ( 2020 ) designed an algorithm to characterize graphs through sampling random walks and then embedding them in a feature space . While Wang et al . ( 2020 ) has not been studied in the context of GED or SED , the authors have shown that they can detect graph isomorphism . While this progress in the area of graph querying is undoubtedly impressive , there is scope to do more . • Modeling SED : Existing neural approaches to learning GED can not easily be adapted to learn SED . While GED is symmetric , SED is not . Most neural architectures for GED have the assumption of symmetry at its core and hence modeling SED is non-trivial . In App . A , we provide a detailed analysis of the limitations of prior architectures in failing to model SED . • Exponential Search Space : Computing SED ( G1 , G2 ) conceptually requires us to compare the query graph G1 with the exponentially many subgraphs of the target graph G2 . Therefore , it is imperative that the model has an efficient and effective mechanism to prune the search space without compromising on the prediction accuracy . We note that while several index structures and heuristics exist for GED ( He & Singh , 2006 ; Zeng et al. , 2009 ; Bai et al. , 2019 ; Wang et al. , 2021 ) , none exist for SED . Thus , scalability of SED on large graphs remains an unsolved problem . • Preservation of theoretical properties : GED is a metric distance function . While SED is not metric due to being asymmetric , it satisfies the triangle inequality , non-negativity , and subgraphidentity . Several higher-order tasks such as clustering and indexing rely on such properties ( Hadi , 1991 ; Dohnal et al. , 2003 ; Hjaltason & Samet , 2003 ; Samet , 2005 ; Uhlmann , 1991 ; Yianilos , 1993 ; Zezula et al. , 2006 ; Brin , 1995 ; Chávez et al. , 2001 ) . Existing neural approaches do not preserve these properties , which limits their usability for these higher order tasks . • Pair-independent computation : There is little scope for pre-computation in existing approaches ( either neural or non-neural ) , as the major computations are pair-dependent , i.e. , both G1 and G2 need to be known . In a typical graph querying framework , the graph database is known apriori ; only the query graph is provided at runtime . If we can generate pair-independent embeddings , and make efficient predictions directly in the embedding space , then retrieval can be sped up tremendously by pre-computing and indexing the embeddings of the database graphs beforehand . • Learning with low-volume data : Generating a large amount of high quality training data is computationally prohibitive for SED/GED . So , an effective model should encode powerful priors for SED/GED prediction , to enable generalization even with scarce training data . We address these challenges by a novel architecture called NEUROSED . Our key contributions are : • Novel formulation : We formulate the problem of learning subgraph edit distance ( SED ) for graphs . Since SED is more general than subgraph isomorphism and GED , the proposed theory extends to prediction of GED , graph isomorphism and subgraph isomorphism . • Neural architecture : NEUROSED utilizes a siamese graph isomorphism network ( Xu et al. , 2018a ) to embed graphs in a pair-independent fashion to an embedding space over which a simple function can predict the SED ( or GED ) . The same embedding model is used for both G1 and G2 , which captures the prior that similar topological properties need to be considered for both graphs . The carefully crafted prediction function serves as another inductive bias for the model , which , in addition to enabling high generalization accuracy , preserves the key properties of SED/GED , which is a major contribution of our work over existing neural approaches . • Indexable embeddings : The prediction function satisfies the triangle inequality over the embedding space for both SED and GED . This allows utilization of the rich literature on index structures ( Elkan , 2003 ; Kwedlo & Czochanski , 2019 ; Ciaccia et al. , 1997 ) to boost efficiency . • Accurate , Fast and Scalable : Extensive experiments on real graph datasets containing up to a million nodes establish that NEUROSED is more accurate in both GED and SED when compared to the state of the art and is more than 3 orders of magnitude faster in range and k-NN queries . 2 PRELIMINARIES AND PROBLEM FORMULATION . We denote a labeled undirected graph as G = ( V , E , L ) where V is the node set , E is the edge set and L : V ∪ E → Σ is the labeling function over nodes and edges . Σ is the universe of all labels and contains a special empty label . L ( v ) and L ( e ) denote the labels of node v and edge e respectively . G1 ⊆ G2 denotes that G1 is a subgraph of G2 . All notations used in our work are summarized in Table 6 in the appendix . For the definitions of subgraph and graph isomorphism , refer to App . B in the supplementary . The computation of GED relies on a graph mapping . Definition 1 ( Graph Mapping ) Given two graphs G1 and G2 , let G̃1 = ( Ṽ1 , Ẽ1 , L̃1 ) and G̃2 = ( Ṽ2 , Ẽ2 , L̃2 ) be obtained by adding dummy nodes and edges ( labeled with ) to G1 and G2 respectively , such that |V1| = |V2| and |E1| = |E2| . A node mapping between G1 and G2 is a bijection π : G̃1 → G̃2 where ( i ) ∀v ∈ Ṽ1 , π ( v ) ∈ Ṽ2 and at least one of v and π ( v ) is not a dummy ; ( ii ) ∀e = ( v1 , v2 ) ∈ Ẽ1 , π ( e ) = ( π ( v1 ) , ( π ( v2 ) ) ) ∈ Ẽ2 and at least one of e and π ( e ) is not a dummy . Example 1 Fig . 5b shows a graph mapping . Edge mappings can be trivially inferred , so are omitted . Definition 2 ( Graph Edit Distance ( GED ) under mapping π ) GED between G1 and G2 under π is GEDπ ( G1 , G2 ) = ∑ v∈Ṽ1 d ( L ( v ) , L ( π ( v ) ) ) + ∑ e∈Ẽ1 d ( L ( e ) , L ( π ( e ) ) ) ( 1 ) where d : Σ× Σ→ R+0 is a distance function over the label set . d ( ` 1 , ` 2 ) models an insertion if ` 1 = , deletion if ` 2 = and replacement if ` 1 6= ` 2 and neither ` 1 nor ` 2 is a dummy . We assume d to be a binary function , where d ( ` 1 , ` 2 ) = 1 if ` 1 6= ` 2 , otherwise , 0 . Our framework easily extends to more general distance functions ( details in App . D ) . Example 2 GED for the shown mapping in Fig . 5b is 3 . The red mappings incur a cost of 1 . Definition 3 ( Graph Edit Distance ( GED ) ) GED is the minimum distance under all mappings . GED ( G1 , G2 ) = min ∀π∈Φ ( G1 , G2 ) GEDπ ( G1 , G2 ) ( 2 ) where Φ ( G1 , G2 ) denotes the set of all possible node maps from G1 to G2 . Definition 4 ( Subgraph Edit Distance ( SED ) ) SED is the minimum GED over all subgraphs of G2 . SED ( G1 , G2 ) = min S⊆G2 GED ( G1 , S ) ( 3 ) Example 3 Revisiting Fig . 5b , GED ( G1 , G2 ) = 3 . The shown mapping incurs the minimum cost . SED ( G1 , G2 ) = 1 . Refer to Fig . 5a for more examples . Problem 1 ( Learning SED ) Given a training set of tuples of the form 〈G1 , G2 , SED ( G1 , G2 ) 〉 , learn a neural model to predict SED ( Q1 , Q2 ) on unseen graphs Q1 and Q2 . Problem 2 ( Learning GED ) Given a training set of tuples of the form 〈G1 , G2 , GED ( G1 , G2 ) 〉 , learn a neural model to predict GED ( Q1 , Q2 ) on unseen graphs Q1 and Q2 . | This paper presents a simple and effective model for subgraph similarity search. Two GNNs with shared weights are applied first to get the graph embeddings of the query and target graphs. Then, instead of using an MLP over the concatenated graph embeddings to regress the subgraph edit distance (SED) score, the paper proposes to use the l2 norm of the positive portion of the difference between two embeddings. This inductive bias is proved to preserve SED's triangle inequality property, and shows better accuracy and generalization power for large graphs. Experiments show the proposed model outperforms state-of-the-art neural approaches in both graph similarity search and subgraph similarity search tasks. | SP:a102939ae37317019265effb63bcaa43b809bf76 |
NeuroSED: Learning Subgraph Similarity via Graph Neural Networks | 1 INTRODUCTION AND RELATED WORK . Graphs are used to model data in a wide variety of domains . Examples include chemical compounds ( Sankar et al. , 2017 ) , protein-protein interaction networks ( PPI ) ( Alon et al. , 2008 ) , knowledge graphs ( Ebsch et al. , 2020 ) , and social networks ( Kempe et al. , 2003 ) . A distance function on any dataset , including graphs , is a fundamental operator . Among several distance measures on graphs , edit distance is one of the most powerful and popular mechanisms ( Liang & Zhao , 2017 ; Zhao et al. , 2013 ; Bougleux et al. , 2017 ; Daller et al. , 2018 ; Fankhauser et al. , 2011 ; Riesen & Bunke , 2009 ; Zeng et al. , 2009 ; He & Singh , 2006 ) . Edit distance can be posed in two forms : graph edit distance ( GED ) and subgraph edit distance ( SED ) . Given two graphs G1 and G2 , GED ( G1 , G2 ) returns the minimum cost of edits needed to convert G1 to G2 . i.e. , for G1 to become isomorphic to G2 . An edit can be the addition or deletion of edges and nodes , or replacement of edge or node labels , with an associated cost . In SED ( G1 , G2 ) , the goal is to identify the minimum cost of edits so that G1 is a subgraph ( subgraph isomorphic ) of G2 . For examples , see Fig . 5a in the appendix . While the applications of GED and SED are beyond doubt , their applicability is constrained by their computation costs . Specifically , both GED and SED are NP-complete ( Zeng et al. , 2009 ; Neuhaus et al. , 2006 ; He & Singh , 2006 ) . To mitigate this computational bottleneck , several heuristics ( Bougleux et al. , 2017 ; Daller et al. , 2018 ; Fankhauser et al. , 2011 ; Riesen & Bunke , 2009 ; Neuhaus et al. , 2006 ) and index structures ( He & Singh , 2006 ; Zeng et al. , 2009 ; Liang & Zhao , 2017 ; Zhao et al. , 2013 ) have been proposed . Recently , graph neural networks have been shown to be effective in learning and predicting GED ( Bai et al. , 2019 ; Wang et al. , 2021 ; Li et al. , 2019 ; Bai et al. , 2020 ; Zhang et al. , 2021 ; Xiu et al. , 2020 ) and subgraph isomorphism ( Rex et al. , 2020 ) . The basic goal in all these algorithms is to learn a neural model from a training set of graph pairs and their distances , such that , at inference time , given an unseen graph pair , we are able to predict its distance accurately . Wang et al . ( 2020 ) designed an algorithm to characterize graphs through sampling random walks and then embedding them in a feature space . While Wang et al . ( 2020 ) has not been studied in the context of GED or SED , the authors have shown that they can detect graph isomorphism . While this progress in the area of graph querying is undoubtedly impressive , there is scope to do more . • Modeling SED : Existing neural approaches to learning GED can not easily be adapted to learn SED . While GED is symmetric , SED is not . Most neural architectures for GED have the assumption of symmetry at its core and hence modeling SED is non-trivial . In App . A , we provide a detailed analysis of the limitations of prior architectures in failing to model SED . • Exponential Search Space : Computing SED ( G1 , G2 ) conceptually requires us to compare the query graph G1 with the exponentially many subgraphs of the target graph G2 . Therefore , it is imperative that the model has an efficient and effective mechanism to prune the search space without compromising on the prediction accuracy . We note that while several index structures and heuristics exist for GED ( He & Singh , 2006 ; Zeng et al. , 2009 ; Bai et al. , 2019 ; Wang et al. , 2021 ) , none exist for SED . Thus , scalability of SED on large graphs remains an unsolved problem . • Preservation of theoretical properties : GED is a metric distance function . While SED is not metric due to being asymmetric , it satisfies the triangle inequality , non-negativity , and subgraphidentity . Several higher-order tasks such as clustering and indexing rely on such properties ( Hadi , 1991 ; Dohnal et al. , 2003 ; Hjaltason & Samet , 2003 ; Samet , 2005 ; Uhlmann , 1991 ; Yianilos , 1993 ; Zezula et al. , 2006 ; Brin , 1995 ; Chávez et al. , 2001 ) . Existing neural approaches do not preserve these properties , which limits their usability for these higher order tasks . • Pair-independent computation : There is little scope for pre-computation in existing approaches ( either neural or non-neural ) , as the major computations are pair-dependent , i.e. , both G1 and G2 need to be known . In a typical graph querying framework , the graph database is known apriori ; only the query graph is provided at runtime . If we can generate pair-independent embeddings , and make efficient predictions directly in the embedding space , then retrieval can be sped up tremendously by pre-computing and indexing the embeddings of the database graphs beforehand . • Learning with low-volume data : Generating a large amount of high quality training data is computationally prohibitive for SED/GED . So , an effective model should encode powerful priors for SED/GED prediction , to enable generalization even with scarce training data . We address these challenges by a novel architecture called NEUROSED . Our key contributions are : • Novel formulation : We formulate the problem of learning subgraph edit distance ( SED ) for graphs . Since SED is more general than subgraph isomorphism and GED , the proposed theory extends to prediction of GED , graph isomorphism and subgraph isomorphism . • Neural architecture : NEUROSED utilizes a siamese graph isomorphism network ( Xu et al. , 2018a ) to embed graphs in a pair-independent fashion to an embedding space over which a simple function can predict the SED ( or GED ) . The same embedding model is used for both G1 and G2 , which captures the prior that similar topological properties need to be considered for both graphs . The carefully crafted prediction function serves as another inductive bias for the model , which , in addition to enabling high generalization accuracy , preserves the key properties of SED/GED , which is a major contribution of our work over existing neural approaches . • Indexable embeddings : The prediction function satisfies the triangle inequality over the embedding space for both SED and GED . This allows utilization of the rich literature on index structures ( Elkan , 2003 ; Kwedlo & Czochanski , 2019 ; Ciaccia et al. , 1997 ) to boost efficiency . • Accurate , Fast and Scalable : Extensive experiments on real graph datasets containing up to a million nodes establish that NEUROSED is more accurate in both GED and SED when compared to the state of the art and is more than 3 orders of magnitude faster in range and k-NN queries . 2 PRELIMINARIES AND PROBLEM FORMULATION . We denote a labeled undirected graph as G = ( V , E , L ) where V is the node set , E is the edge set and L : V ∪ E → Σ is the labeling function over nodes and edges . Σ is the universe of all labels and contains a special empty label . L ( v ) and L ( e ) denote the labels of node v and edge e respectively . G1 ⊆ G2 denotes that G1 is a subgraph of G2 . All notations used in our work are summarized in Table 6 in the appendix . For the definitions of subgraph and graph isomorphism , refer to App . B in the supplementary . The computation of GED relies on a graph mapping . Definition 1 ( Graph Mapping ) Given two graphs G1 and G2 , let G̃1 = ( Ṽ1 , Ẽ1 , L̃1 ) and G̃2 = ( Ṽ2 , Ẽ2 , L̃2 ) be obtained by adding dummy nodes and edges ( labeled with ) to G1 and G2 respectively , such that |V1| = |V2| and |E1| = |E2| . A node mapping between G1 and G2 is a bijection π : G̃1 → G̃2 where ( i ) ∀v ∈ Ṽ1 , π ( v ) ∈ Ṽ2 and at least one of v and π ( v ) is not a dummy ; ( ii ) ∀e = ( v1 , v2 ) ∈ Ẽ1 , π ( e ) = ( π ( v1 ) , ( π ( v2 ) ) ) ∈ Ẽ2 and at least one of e and π ( e ) is not a dummy . Example 1 Fig . 5b shows a graph mapping . Edge mappings can be trivially inferred , so are omitted . Definition 2 ( Graph Edit Distance ( GED ) under mapping π ) GED between G1 and G2 under π is GEDπ ( G1 , G2 ) = ∑ v∈Ṽ1 d ( L ( v ) , L ( π ( v ) ) ) + ∑ e∈Ẽ1 d ( L ( e ) , L ( π ( e ) ) ) ( 1 ) where d : Σ× Σ→ R+0 is a distance function over the label set . d ( ` 1 , ` 2 ) models an insertion if ` 1 = , deletion if ` 2 = and replacement if ` 1 6= ` 2 and neither ` 1 nor ` 2 is a dummy . We assume d to be a binary function , where d ( ` 1 , ` 2 ) = 1 if ` 1 6= ` 2 , otherwise , 0 . Our framework easily extends to more general distance functions ( details in App . D ) . Example 2 GED for the shown mapping in Fig . 5b is 3 . The red mappings incur a cost of 1 . Definition 3 ( Graph Edit Distance ( GED ) ) GED is the minimum distance under all mappings . GED ( G1 , G2 ) = min ∀π∈Φ ( G1 , G2 ) GEDπ ( G1 , G2 ) ( 2 ) where Φ ( G1 , G2 ) denotes the set of all possible node maps from G1 to G2 . Definition 4 ( Subgraph Edit Distance ( SED ) ) SED is the minimum GED over all subgraphs of G2 . SED ( G1 , G2 ) = min S⊆G2 GED ( G1 , S ) ( 3 ) Example 3 Revisiting Fig . 5b , GED ( G1 , G2 ) = 3 . The shown mapping incurs the minimum cost . SED ( G1 , G2 ) = 1 . Refer to Fig . 5a for more examples . Problem 1 ( Learning SED ) Given a training set of tuples of the form 〈G1 , G2 , SED ( G1 , G2 ) 〉 , learn a neural model to predict SED ( Q1 , Q2 ) on unseen graphs Q1 and Q2 . Problem 2 ( Learning GED ) Given a training set of tuples of the form 〈G1 , G2 , GED ( G1 , G2 ) 〉 , learn a neural model to predict GED ( Q1 , Q2 ) on unseen graphs Q1 and Q2 . | The paper proposes a supervised model, NeuroSED, to compute Subgraph Edit Distance (SED) (and Graph Edit Distance (GED)). To this end, given two graphs, target and query graphs, NeuroSED uses a shared GNN to encourage embeddings for both graphs representing similar topological features. Then a dedicated learning metric w.r.t. SED is introduced to ensure the learned embeddings hold key properties of SED and the embeddings are indexable. The indexable embeddings further support fast prediction. Extensive experiments show NeuroSED significantly improves SOTA methods. | SP:a102939ae37317019265effb63bcaa43b809bf76 |
Divergence-Regularized Multi-Agent Actor-Critic | 1 INTRODUCTION . Regularization is a common method for single-agent reinforcement learning ( RL ) . The optimal policy learned by traditional RL algorithm is always deterministic ( Sutton and Barto , 2018 ) . This property may result in the inflexibility of the policy facing with unknown environments ( Yang et al. , 2019 ) . Entropy regularization is proposed to settle this problem by learning a policy according to the maximum-entropy principle ( Haarnoja et al. , 2017 ) . Moreover , entropy regularization is beneficial to exploration and robustness for RL algorithms ( Haarnoja et al. , 2018 ) . However , entropy regularization is imperfect . Eysenbach and Levine ( 2019 ) pointed out maximum-entropy RL is a modification of the original RL objective because of the entropy regularizer . Maximum-entropy RL is actually learning an optimal policy for the entropy-regularized Markov Decision Process ( MDP ) rather than the original MDP , i.e. , the converged policy may be biased . Nachum et al . ( 2017 ) analysed a more general case for regularization in RL and proposed what we call divergence regularization . Divergence regularization can avoid the bias of the converged policy as well as be beneficial to exploration . Wang et al . ( 2019 ) employed divergence regularizer and proposed a single-agent RL algorithm , DAPO , which prevents the altering-objective drawback of entropy regularization . Regularization can also be applied to cooperative multi-agent reinforcement learning ( MARL ) ( Agarwal et al. , 2020 ; Zhang et al. , 2021 ) . However , most of cooperative MARL algorithms do not use regularizer ( Lowe et al. , 2017 ; Foerster et al. , 2018 ; Rashid et al. , 2018 ; Son et al. , 2019 ; Jiang et al. , 2020 ; Wang et al. , 2021a ) . Only few cooperative MARL algorithms such as FOP ( Zhang et al. , 2021 ) use entropy regularization , which may suffer from the drawback aforementioned . Divergence regularization , on the other hand , could potentially benefit cooperative MARL . In addition to its advantages mentioned above , divergence regularization can also help to control the step size of policy update which is similar to conservative policy iteration ( Kakade and Langford , 2002 ) in single-agent RL . Conservative policy iteration and its successive methods such as TRPO ( Schulman et al. , 2015 ) and PPO ( Schulman et al. , 2017 ) can stabilize policy improvement ( Touati et al. , 2020 ) . These methods use a surrogate objective for policy update , but decentralized policies in centralized training with decentralized execution ( CTDE ) paradigm may not preserve the properties of the surrogate objective . Moreover , DAPO ( Wang et al. , 2019 ) can not be trivially extended to cooperative MARL settings . Even with some tricks like V-trace ( Espeholt et al. , 2018 ) for off-policy correction , DAPO is essentially an on-policy algorithm and thus may not be sample-efficient in cooperative MARL settings . In the paper , we propose and analyze divergence policy iteration in general cooperative MARL settings and a special case combined with value decomposition . Based on divergence policy iteration , we derive the off-policy update rule for the critic , policy , and target policy and propose divergenceregularized multi-agent actor-critic ( DMAC ) , a novel off-policy cooperative MARL framework . We theoretically show that DMAC guarantees a monotonic policy improvement and is not biased by the regularization . Besides , DMAC is beneficial to exploration and stable policy improvement by applying our update rule of target policy . Moreover , DMAC is a flexible framework and can be combined with many existing cooperative MARL algorithms to substantially improve their performance . We empirically investigate DMAC in a didactic stochastic game and StarCraft Multi-Agent Challenge ( Samvelyan et al. , 2019 ) . We combine DMAC with five representative MARL methods , i.e. , COMA ( Foerster et al. , 2018 ) for on-policy multi-agent policy gradient , MAAC ( Iqbal and Sha , 2019 ) for off-policy multi-agent actor-critic , QMIX ( Rashid et al. , 2018 ) for value decomposition , DOP ( Wang et al. , 2021b ) for the combination of value decomposition and policy gradient , and FOP ( Zhang et al. , 2021 ) for the combination of value decomposition and entropy regularization . Experimental results show that DMAC indeed induces better performance , faster convergence , and better stability in most tasks , which verifies the benefits of DMAC and demonstrates the advantages of divergence regularization over entropy regularization in cooperative MARL . 2 RELATED WORK . MARL . MARL has been a hot topic in the field of RL . In this paper , we focus on cooperative MARL . Cooperative MARL is usually modeled as Dec-POMDP ( Oliehoek et al. , 2016 ) , where all agents share a reward and aim to maximize the long-term return . Centralized training with decentralized execution ( CTDE ) ( Lowe et al. , 2017 ) paradigm is widely used in cooperative MARL . CTDE usually utilizes a centralized value function to address the non-stationarity for multi-agent settings and decentralized policies for scalability . Many MARL algorithms adopt CTDE paradigm such as COMA , MAAC , QMIX , DOP and FOP . COMA ( Foerster et al. , 2018 ) employs the counterfactual baseline which can reduce the variance as well as settle the credit assignment problem . MAAC ( Iqbal and Sha , 2019 ) uses self-attention mechanism to integrate local observation and action of each agent and provides the structured information for the centralized critic . Value decomposition ( Sunehag et al. , 2018 ; Rashid et al. , 2018 ; Son et al. , 2019 ; Yang et al. , 2020 ; Wang et al. , 2021a ; b ; Zhang et al. , 2021 ) is a popular class of cooperative MARL algorithms . These methods express the global Q-function as a function of individual Q-functions to satisfy Individual-Global-Max ( IGM ) , which means the optimal actions of individual Q-functions are corresponding to the optimal joint action of global Q-function . QMIX ( Rashid et al. , 2018 ) is a representative of value decomposition methods . It uses a hypernet to ensure the monotonicity of the global Q-function in terms of individual Q-functions , which is a sufficient condition of IGM . DOP ( Wang et al. , 2021b ) is a method that combines value decomposition with policy gradient . DOP uses a linear value decomposition which is another sufficient condition of IGM and the linear value decomposition helps the compute of policy gradient . FOP ( Zhang et al. , 2021 ) is a method that combines value decomposition with entropy regularization and uses a more general condition , Individual-Global-Optimal , to replace IGM . In this paper , we will combine DMAC with these algorithms and show its improvement . Regularization . Entropy regularization was first proposed in single-agent RL . Nachum et al . ( 2017 ) analyzed the entropy-regularized MDP and revealed the properties about the optimal policy and the corresponding Q-function and V-function . They also showed the equivalence of value-based methods and policy-based methods in entropy-regularized MDP . Haarnoja et al . ( 2018 ) pointed out maximum-entropy RL can achieve better exploration and stability facing with the model and estimation error . Although entropy regularization has many advantages , Eysenbach and Levine ( 2019 ) showed entropy regularization modifies the MDP and results in the bias of the convergent policy . Yang et al . ( 2019 ) revealed the drawbacks of the convergent policy of general RL and maximum-entropy RL . The former is usually a deterministic policy ( Sutton and Barto , 2018 ) which is not flexible enough for unknown situations , while the latter is a policy with non-zero probability for all actions which may be dangerous in some scenarios . Neu et al . ( 2017 ) analyzed the entropy regularization method from several views . They revealed a more general form of regularization which is actually divergence regularization and showed entropy regularization is just a special case of divergence regularization . Wang et al . ( 2019 ) absorbed previous result and proposed an on-policy algorithm , i.e. , DAPO . However , DAPO can not be trivially applied to MARL . Moreover , its on-policy learning is not sample-efficient for MARL settings and its off-policy correction trick V-trace ( Espeholt et al. , 2018 ) is also intractable in MARL . There are some previous studies in single-agent RL which use similar target policy to ours , but their purposes are quite different . Trust-PCL ( Nachum et al. , 2018 ) introduces a target policy as a trust region constraint for maximum-entropy RL , but the policy is still biased by entropy regularizer . MIRL ( Grau-Moya et al. , 2019 ) uses a distribution which is only related to actions as the target policy to compute a mutual-information regularizer , but it still changes the objective of the original RL . 3 PRELIMINARIES . Dec-POMDP is a general model for cooperative MARL . A Dec-POMDP is a tuple M = { S , A , P , Y , O , I , n , r , γ } . S is the state space , n is the number of agents , γ is the discount factor , and I = { 1 , 2 · · ·n } is the set of all agents . A = A1 ×A2 × · · · ×An represents the joint action space where Ai is the individual action space for agent i. P ( s′|s , a ) : S × A × S → [ 0 , 1 ] is the transition function , and r ( s , a ) : S×A→ R is the reward function of state s and joint action a. Y is the observation space , and O ( s , i ) : S× I → Y is a mapping from state to observation for each agent . The objective of Dec-POMDP is to maximize J ( π ) = Eπ [ ∑ t=0 γ tr ( st , at ) ] , and thus we need to find the optimal joint policy π∗ = arg maxπ J ( π ) . To settle the partial observable problem , history τi ∈ Ti = ( Y × Ai ) ∗ is often used to replace observation oi ∈ Y . As for policies in CTDE , each agent i has an individual policy πi ( ai|τi ) and the joint policy π is the product of each πi . Though we calculate individual policy as πi ( ai|τi ) in practice , we will use πi ( ai|s ) in analysis and proofs for simplicity . Entropy regularization adds the logarithm of current policy to the reward function . It modifies the optimization objective as Jent ( π ) = Eπ [ ∑ t=0 γ t ( r ( st , at ) − λ logπ ( at|st ) ) ] . We also have the corresponding Q-function Qπent ( s , a ) = r ( s , a ) + γE [ V πent ( s′ ) ] and V-function V πent ( s ) = E [ Qπent ( s , a ) − λ logπ ( a|s ) ] . Given these definitions , we can deduce an interesting property V πent ( s ) = E [ Qπent ( s , a ) ] + λH ( π ( ·|s ) ) , whereH ( π ( ·|s ) ) represents the entropy of policy π ( ·|s ) . V πent ( s ) includes an entropy term which is the reason it is called entropy regularization . | For cooperative multi-agent reinforcement learning, they propose an off-policy(?) learning method that is reqularized by the KL divergence to some target policy, which, in contrast to classic max entropy RL, allows to circumvent(?) the bias that the regularizer introduces (eq18). They give several special cases / tricks of how the learning can be somewhat decoupled between the agent (Lem 3, end of sec4.4). They paper comprises theory about convergence of the method, as well as experiments in toy envs. | SP:a4d8b5163270b4b26bd77e5b31cd1ce09a5097cb |
Divergence-Regularized Multi-Agent Actor-Critic | 1 INTRODUCTION . Regularization is a common method for single-agent reinforcement learning ( RL ) . The optimal policy learned by traditional RL algorithm is always deterministic ( Sutton and Barto , 2018 ) . This property may result in the inflexibility of the policy facing with unknown environments ( Yang et al. , 2019 ) . Entropy regularization is proposed to settle this problem by learning a policy according to the maximum-entropy principle ( Haarnoja et al. , 2017 ) . Moreover , entropy regularization is beneficial to exploration and robustness for RL algorithms ( Haarnoja et al. , 2018 ) . However , entropy regularization is imperfect . Eysenbach and Levine ( 2019 ) pointed out maximum-entropy RL is a modification of the original RL objective because of the entropy regularizer . Maximum-entropy RL is actually learning an optimal policy for the entropy-regularized Markov Decision Process ( MDP ) rather than the original MDP , i.e. , the converged policy may be biased . Nachum et al . ( 2017 ) analysed a more general case for regularization in RL and proposed what we call divergence regularization . Divergence regularization can avoid the bias of the converged policy as well as be beneficial to exploration . Wang et al . ( 2019 ) employed divergence regularizer and proposed a single-agent RL algorithm , DAPO , which prevents the altering-objective drawback of entropy regularization . Regularization can also be applied to cooperative multi-agent reinforcement learning ( MARL ) ( Agarwal et al. , 2020 ; Zhang et al. , 2021 ) . However , most of cooperative MARL algorithms do not use regularizer ( Lowe et al. , 2017 ; Foerster et al. , 2018 ; Rashid et al. , 2018 ; Son et al. , 2019 ; Jiang et al. , 2020 ; Wang et al. , 2021a ) . Only few cooperative MARL algorithms such as FOP ( Zhang et al. , 2021 ) use entropy regularization , which may suffer from the drawback aforementioned . Divergence regularization , on the other hand , could potentially benefit cooperative MARL . In addition to its advantages mentioned above , divergence regularization can also help to control the step size of policy update which is similar to conservative policy iteration ( Kakade and Langford , 2002 ) in single-agent RL . Conservative policy iteration and its successive methods such as TRPO ( Schulman et al. , 2015 ) and PPO ( Schulman et al. , 2017 ) can stabilize policy improvement ( Touati et al. , 2020 ) . These methods use a surrogate objective for policy update , but decentralized policies in centralized training with decentralized execution ( CTDE ) paradigm may not preserve the properties of the surrogate objective . Moreover , DAPO ( Wang et al. , 2019 ) can not be trivially extended to cooperative MARL settings . Even with some tricks like V-trace ( Espeholt et al. , 2018 ) for off-policy correction , DAPO is essentially an on-policy algorithm and thus may not be sample-efficient in cooperative MARL settings . In the paper , we propose and analyze divergence policy iteration in general cooperative MARL settings and a special case combined with value decomposition . Based on divergence policy iteration , we derive the off-policy update rule for the critic , policy , and target policy and propose divergenceregularized multi-agent actor-critic ( DMAC ) , a novel off-policy cooperative MARL framework . We theoretically show that DMAC guarantees a monotonic policy improvement and is not biased by the regularization . Besides , DMAC is beneficial to exploration and stable policy improvement by applying our update rule of target policy . Moreover , DMAC is a flexible framework and can be combined with many existing cooperative MARL algorithms to substantially improve their performance . We empirically investigate DMAC in a didactic stochastic game and StarCraft Multi-Agent Challenge ( Samvelyan et al. , 2019 ) . We combine DMAC with five representative MARL methods , i.e. , COMA ( Foerster et al. , 2018 ) for on-policy multi-agent policy gradient , MAAC ( Iqbal and Sha , 2019 ) for off-policy multi-agent actor-critic , QMIX ( Rashid et al. , 2018 ) for value decomposition , DOP ( Wang et al. , 2021b ) for the combination of value decomposition and policy gradient , and FOP ( Zhang et al. , 2021 ) for the combination of value decomposition and entropy regularization . Experimental results show that DMAC indeed induces better performance , faster convergence , and better stability in most tasks , which verifies the benefits of DMAC and demonstrates the advantages of divergence regularization over entropy regularization in cooperative MARL . 2 RELATED WORK . MARL . MARL has been a hot topic in the field of RL . In this paper , we focus on cooperative MARL . Cooperative MARL is usually modeled as Dec-POMDP ( Oliehoek et al. , 2016 ) , where all agents share a reward and aim to maximize the long-term return . Centralized training with decentralized execution ( CTDE ) ( Lowe et al. , 2017 ) paradigm is widely used in cooperative MARL . CTDE usually utilizes a centralized value function to address the non-stationarity for multi-agent settings and decentralized policies for scalability . Many MARL algorithms adopt CTDE paradigm such as COMA , MAAC , QMIX , DOP and FOP . COMA ( Foerster et al. , 2018 ) employs the counterfactual baseline which can reduce the variance as well as settle the credit assignment problem . MAAC ( Iqbal and Sha , 2019 ) uses self-attention mechanism to integrate local observation and action of each agent and provides the structured information for the centralized critic . Value decomposition ( Sunehag et al. , 2018 ; Rashid et al. , 2018 ; Son et al. , 2019 ; Yang et al. , 2020 ; Wang et al. , 2021a ; b ; Zhang et al. , 2021 ) is a popular class of cooperative MARL algorithms . These methods express the global Q-function as a function of individual Q-functions to satisfy Individual-Global-Max ( IGM ) , which means the optimal actions of individual Q-functions are corresponding to the optimal joint action of global Q-function . QMIX ( Rashid et al. , 2018 ) is a representative of value decomposition methods . It uses a hypernet to ensure the monotonicity of the global Q-function in terms of individual Q-functions , which is a sufficient condition of IGM . DOP ( Wang et al. , 2021b ) is a method that combines value decomposition with policy gradient . DOP uses a linear value decomposition which is another sufficient condition of IGM and the linear value decomposition helps the compute of policy gradient . FOP ( Zhang et al. , 2021 ) is a method that combines value decomposition with entropy regularization and uses a more general condition , Individual-Global-Optimal , to replace IGM . In this paper , we will combine DMAC with these algorithms and show its improvement . Regularization . Entropy regularization was first proposed in single-agent RL . Nachum et al . ( 2017 ) analyzed the entropy-regularized MDP and revealed the properties about the optimal policy and the corresponding Q-function and V-function . They also showed the equivalence of value-based methods and policy-based methods in entropy-regularized MDP . Haarnoja et al . ( 2018 ) pointed out maximum-entropy RL can achieve better exploration and stability facing with the model and estimation error . Although entropy regularization has many advantages , Eysenbach and Levine ( 2019 ) showed entropy regularization modifies the MDP and results in the bias of the convergent policy . Yang et al . ( 2019 ) revealed the drawbacks of the convergent policy of general RL and maximum-entropy RL . The former is usually a deterministic policy ( Sutton and Barto , 2018 ) which is not flexible enough for unknown situations , while the latter is a policy with non-zero probability for all actions which may be dangerous in some scenarios . Neu et al . ( 2017 ) analyzed the entropy regularization method from several views . They revealed a more general form of regularization which is actually divergence regularization and showed entropy regularization is just a special case of divergence regularization . Wang et al . ( 2019 ) absorbed previous result and proposed an on-policy algorithm , i.e. , DAPO . However , DAPO can not be trivially applied to MARL . Moreover , its on-policy learning is not sample-efficient for MARL settings and its off-policy correction trick V-trace ( Espeholt et al. , 2018 ) is also intractable in MARL . There are some previous studies in single-agent RL which use similar target policy to ours , but their purposes are quite different . Trust-PCL ( Nachum et al. , 2018 ) introduces a target policy as a trust region constraint for maximum-entropy RL , but the policy is still biased by entropy regularizer . MIRL ( Grau-Moya et al. , 2019 ) uses a distribution which is only related to actions as the target policy to compute a mutual-information regularizer , but it still changes the objective of the original RL . 3 PRELIMINARIES . Dec-POMDP is a general model for cooperative MARL . A Dec-POMDP is a tuple M = { S , A , P , Y , O , I , n , r , γ } . S is the state space , n is the number of agents , γ is the discount factor , and I = { 1 , 2 · · ·n } is the set of all agents . A = A1 ×A2 × · · · ×An represents the joint action space where Ai is the individual action space for agent i. P ( s′|s , a ) : S × A × S → [ 0 , 1 ] is the transition function , and r ( s , a ) : S×A→ R is the reward function of state s and joint action a. Y is the observation space , and O ( s , i ) : S× I → Y is a mapping from state to observation for each agent . The objective of Dec-POMDP is to maximize J ( π ) = Eπ [ ∑ t=0 γ tr ( st , at ) ] , and thus we need to find the optimal joint policy π∗ = arg maxπ J ( π ) . To settle the partial observable problem , history τi ∈ Ti = ( Y × Ai ) ∗ is often used to replace observation oi ∈ Y . As for policies in CTDE , each agent i has an individual policy πi ( ai|τi ) and the joint policy π is the product of each πi . Though we calculate individual policy as πi ( ai|τi ) in practice , we will use πi ( ai|s ) in analysis and proofs for simplicity . Entropy regularization adds the logarithm of current policy to the reward function . It modifies the optimization objective as Jent ( π ) = Eπ [ ∑ t=0 γ t ( r ( st , at ) − λ logπ ( at|st ) ) ] . We also have the corresponding Q-function Qπent ( s , a ) = r ( s , a ) + γE [ V πent ( s′ ) ] and V-function V πent ( s ) = E [ Qπent ( s , a ) − λ logπ ( a|s ) ] . Given these definitions , we can deduce an interesting property V πent ( s ) = E [ Qπent ( s , a ) ] + λH ( π ( ·|s ) ) , whereH ( π ( ·|s ) ) represents the entropy of policy π ( ·|s ) . V πent ( s ) includes an entropy term which is the reason it is called entropy regularization . | This paper develops a new multiagent framework with regulated divergence to address the learning of biased policies in the maximum-entropy approach. Specifically, the main contributions include the developments of the divergence policy iteration for general cooperative MARL settings and the off-policy divergence regularized multiagent actor-critic framework (DMAC). Empirical results show that DMAC can improve the performance of existing MARL frameworks in various multiagent domains. | SP:a4d8b5163270b4b26bd77e5b31cd1ce09a5097cb |
Divergence-Regularized Multi-Agent Actor-Critic | 1 INTRODUCTION . Regularization is a common method for single-agent reinforcement learning ( RL ) . The optimal policy learned by traditional RL algorithm is always deterministic ( Sutton and Barto , 2018 ) . This property may result in the inflexibility of the policy facing with unknown environments ( Yang et al. , 2019 ) . Entropy regularization is proposed to settle this problem by learning a policy according to the maximum-entropy principle ( Haarnoja et al. , 2017 ) . Moreover , entropy regularization is beneficial to exploration and robustness for RL algorithms ( Haarnoja et al. , 2018 ) . However , entropy regularization is imperfect . Eysenbach and Levine ( 2019 ) pointed out maximum-entropy RL is a modification of the original RL objective because of the entropy regularizer . Maximum-entropy RL is actually learning an optimal policy for the entropy-regularized Markov Decision Process ( MDP ) rather than the original MDP , i.e. , the converged policy may be biased . Nachum et al . ( 2017 ) analysed a more general case for regularization in RL and proposed what we call divergence regularization . Divergence regularization can avoid the bias of the converged policy as well as be beneficial to exploration . Wang et al . ( 2019 ) employed divergence regularizer and proposed a single-agent RL algorithm , DAPO , which prevents the altering-objective drawback of entropy regularization . Regularization can also be applied to cooperative multi-agent reinforcement learning ( MARL ) ( Agarwal et al. , 2020 ; Zhang et al. , 2021 ) . However , most of cooperative MARL algorithms do not use regularizer ( Lowe et al. , 2017 ; Foerster et al. , 2018 ; Rashid et al. , 2018 ; Son et al. , 2019 ; Jiang et al. , 2020 ; Wang et al. , 2021a ) . Only few cooperative MARL algorithms such as FOP ( Zhang et al. , 2021 ) use entropy regularization , which may suffer from the drawback aforementioned . Divergence regularization , on the other hand , could potentially benefit cooperative MARL . In addition to its advantages mentioned above , divergence regularization can also help to control the step size of policy update which is similar to conservative policy iteration ( Kakade and Langford , 2002 ) in single-agent RL . Conservative policy iteration and its successive methods such as TRPO ( Schulman et al. , 2015 ) and PPO ( Schulman et al. , 2017 ) can stabilize policy improvement ( Touati et al. , 2020 ) . These methods use a surrogate objective for policy update , but decentralized policies in centralized training with decentralized execution ( CTDE ) paradigm may not preserve the properties of the surrogate objective . Moreover , DAPO ( Wang et al. , 2019 ) can not be trivially extended to cooperative MARL settings . Even with some tricks like V-trace ( Espeholt et al. , 2018 ) for off-policy correction , DAPO is essentially an on-policy algorithm and thus may not be sample-efficient in cooperative MARL settings . In the paper , we propose and analyze divergence policy iteration in general cooperative MARL settings and a special case combined with value decomposition . Based on divergence policy iteration , we derive the off-policy update rule for the critic , policy , and target policy and propose divergenceregularized multi-agent actor-critic ( DMAC ) , a novel off-policy cooperative MARL framework . We theoretically show that DMAC guarantees a monotonic policy improvement and is not biased by the regularization . Besides , DMAC is beneficial to exploration and stable policy improvement by applying our update rule of target policy . Moreover , DMAC is a flexible framework and can be combined with many existing cooperative MARL algorithms to substantially improve their performance . We empirically investigate DMAC in a didactic stochastic game and StarCraft Multi-Agent Challenge ( Samvelyan et al. , 2019 ) . We combine DMAC with five representative MARL methods , i.e. , COMA ( Foerster et al. , 2018 ) for on-policy multi-agent policy gradient , MAAC ( Iqbal and Sha , 2019 ) for off-policy multi-agent actor-critic , QMIX ( Rashid et al. , 2018 ) for value decomposition , DOP ( Wang et al. , 2021b ) for the combination of value decomposition and policy gradient , and FOP ( Zhang et al. , 2021 ) for the combination of value decomposition and entropy regularization . Experimental results show that DMAC indeed induces better performance , faster convergence , and better stability in most tasks , which verifies the benefits of DMAC and demonstrates the advantages of divergence regularization over entropy regularization in cooperative MARL . 2 RELATED WORK . MARL . MARL has been a hot topic in the field of RL . In this paper , we focus on cooperative MARL . Cooperative MARL is usually modeled as Dec-POMDP ( Oliehoek et al. , 2016 ) , where all agents share a reward and aim to maximize the long-term return . Centralized training with decentralized execution ( CTDE ) ( Lowe et al. , 2017 ) paradigm is widely used in cooperative MARL . CTDE usually utilizes a centralized value function to address the non-stationarity for multi-agent settings and decentralized policies for scalability . Many MARL algorithms adopt CTDE paradigm such as COMA , MAAC , QMIX , DOP and FOP . COMA ( Foerster et al. , 2018 ) employs the counterfactual baseline which can reduce the variance as well as settle the credit assignment problem . MAAC ( Iqbal and Sha , 2019 ) uses self-attention mechanism to integrate local observation and action of each agent and provides the structured information for the centralized critic . Value decomposition ( Sunehag et al. , 2018 ; Rashid et al. , 2018 ; Son et al. , 2019 ; Yang et al. , 2020 ; Wang et al. , 2021a ; b ; Zhang et al. , 2021 ) is a popular class of cooperative MARL algorithms . These methods express the global Q-function as a function of individual Q-functions to satisfy Individual-Global-Max ( IGM ) , which means the optimal actions of individual Q-functions are corresponding to the optimal joint action of global Q-function . QMIX ( Rashid et al. , 2018 ) is a representative of value decomposition methods . It uses a hypernet to ensure the monotonicity of the global Q-function in terms of individual Q-functions , which is a sufficient condition of IGM . DOP ( Wang et al. , 2021b ) is a method that combines value decomposition with policy gradient . DOP uses a linear value decomposition which is another sufficient condition of IGM and the linear value decomposition helps the compute of policy gradient . FOP ( Zhang et al. , 2021 ) is a method that combines value decomposition with entropy regularization and uses a more general condition , Individual-Global-Optimal , to replace IGM . In this paper , we will combine DMAC with these algorithms and show its improvement . Regularization . Entropy regularization was first proposed in single-agent RL . Nachum et al . ( 2017 ) analyzed the entropy-regularized MDP and revealed the properties about the optimal policy and the corresponding Q-function and V-function . They also showed the equivalence of value-based methods and policy-based methods in entropy-regularized MDP . Haarnoja et al . ( 2018 ) pointed out maximum-entropy RL can achieve better exploration and stability facing with the model and estimation error . Although entropy regularization has many advantages , Eysenbach and Levine ( 2019 ) showed entropy regularization modifies the MDP and results in the bias of the convergent policy . Yang et al . ( 2019 ) revealed the drawbacks of the convergent policy of general RL and maximum-entropy RL . The former is usually a deterministic policy ( Sutton and Barto , 2018 ) which is not flexible enough for unknown situations , while the latter is a policy with non-zero probability for all actions which may be dangerous in some scenarios . Neu et al . ( 2017 ) analyzed the entropy regularization method from several views . They revealed a more general form of regularization which is actually divergence regularization and showed entropy regularization is just a special case of divergence regularization . Wang et al . ( 2019 ) absorbed previous result and proposed an on-policy algorithm , i.e. , DAPO . However , DAPO can not be trivially applied to MARL . Moreover , its on-policy learning is not sample-efficient for MARL settings and its off-policy correction trick V-trace ( Espeholt et al. , 2018 ) is also intractable in MARL . There are some previous studies in single-agent RL which use similar target policy to ours , but their purposes are quite different . Trust-PCL ( Nachum et al. , 2018 ) introduces a target policy as a trust region constraint for maximum-entropy RL , but the policy is still biased by entropy regularizer . MIRL ( Grau-Moya et al. , 2019 ) uses a distribution which is only related to actions as the target policy to compute a mutual-information regularizer , but it still changes the objective of the original RL . 3 PRELIMINARIES . Dec-POMDP is a general model for cooperative MARL . A Dec-POMDP is a tuple M = { S , A , P , Y , O , I , n , r , γ } . S is the state space , n is the number of agents , γ is the discount factor , and I = { 1 , 2 · · ·n } is the set of all agents . A = A1 ×A2 × · · · ×An represents the joint action space where Ai is the individual action space for agent i. P ( s′|s , a ) : S × A × S → [ 0 , 1 ] is the transition function , and r ( s , a ) : S×A→ R is the reward function of state s and joint action a. Y is the observation space , and O ( s , i ) : S× I → Y is a mapping from state to observation for each agent . The objective of Dec-POMDP is to maximize J ( π ) = Eπ [ ∑ t=0 γ tr ( st , at ) ] , and thus we need to find the optimal joint policy π∗ = arg maxπ J ( π ) . To settle the partial observable problem , history τi ∈ Ti = ( Y × Ai ) ∗ is often used to replace observation oi ∈ Y . As for policies in CTDE , each agent i has an individual policy πi ( ai|τi ) and the joint policy π is the product of each πi . Though we calculate individual policy as πi ( ai|τi ) in practice , we will use πi ( ai|s ) in analysis and proofs for simplicity . Entropy regularization adds the logarithm of current policy to the reward function . It modifies the optimization objective as Jent ( π ) = Eπ [ ∑ t=0 γ t ( r ( st , at ) − λ logπ ( at|st ) ) ] . We also have the corresponding Q-function Qπent ( s , a ) = r ( s , a ) + γE [ V πent ( s′ ) ] and V-function V πent ( s ) = E [ Qπent ( s , a ) − λ logπ ( a|s ) ] . Given these definitions , we can deduce an interesting property V πent ( s ) = E [ Qπent ( s , a ) ] + λH ( π ( ·|s ) ) , whereH ( π ( ·|s ) ) represents the entropy of policy π ( ·|s ) . V πent ( s ) includes an entropy term which is the reason it is called entropy regularization . | This paper suggests a DMAC learning framework by introducing a divergence penalty between the learning policy between a target policy into the RL framework instead of the commonly used entropy penalty. It can be shown that the proposed objective can be easily combined with various MARL algorithms and can eventually lead to the optimal policy of the underlying unmodified MDP with properly set target policies. The paper rigorously studies the mathematical foundation of the algorithm following a standard workflow and presents a few experiments showing that DMAC could improve the learning efficiency of various MARL algorithms. | SP:a4d8b5163270b4b26bd77e5b31cd1ce09a5097cb |
Transformer-based Transform Coding | 1 INTRODUCTION . Transform coding ( Goyal , 2001 ) is the dominant paradigm for compression of multi-media signals , and serves as the technical foundation for many successful coding standards such as JPEG , AAC , and HEVC/VVC . Codecs based on transform coding divide the task of lossy compression into three modularized components : transform , quantization , and entropy coding . With the advancement of deep learning , data compression is entering into a new era of learning-based schemes ( Ballé et al. , 2021 ) , in which all three components can be enhanced by deep neural networks : autoencoder networks are adopted as flexible nonlinear transforms , deep generative models are used as powerful learnable entropy models , and various differentiable quantization schemes are proposed to aid endto-end training . Thanks to these advancements , we have seen rapid progress in the domain of image and video compression . Particularly , the hyperprior line of work ( Ballé et al. , 2018 ; Minnen et al. , 2018 ; Lee et al. , 2019 ; Agustsson et al. , 2020 ; Minnen & Singh , 2020 ) has led to steady progress of neural compression performance over the past two years , reaching or even surpassing state-of-theart traditional codecs . For example , in image compression , BPG444 was surpassed by a neural codec in 2018 ( Minnen et al. , 2018 ) , and ( Cheng et al. , 2020 ; Xie et al. , 2021 ; Ma et al. , 2021 ; Guo et al. , 2021 ; Wu et al. , 2020 ) have claimed on-par or better performance than VTM ( a test model of the state-of-the-art non-learned VVC standard ) . One general trend in the advancement of neural image compression schemes is to develop ever more expressive yet expensive prior models based on spatial context ( Minnen et al. , 2018 ; Lee et al. , 2019 ; Ma et al. , 2021 ; Guo et al. , 2021 ; Wu et al. , 2020 ) . However , the rate-distortion improvement from context based prior modeling often comes with a hefty price tag1 in terms of decoding complexity . Noteably , all existing works that claimed on-par or better performance than VTM ( Cheng et al. , 1In the extreme case when a latent-pixel-level spatial autoregressive prior is used , decoding of a single 512x768 image requires no less than 1536 interleaved executions of prior model inference and entropy decoding ( assuming the latent is downsampled by a factor of 16x16 ) . 2020 ; Xie et al. , 2021 ; Ma et al. , 2021 ; Guo et al. , 2021 ; Wu et al. , 2020 ) rely on slow and expensive spatial context based prior models . The development of nonlinear transforms , on the other hand , are largely overlooked . This leads us to the following questions : can we achieve the same performance as that of expensive prior models by designing a more expressive transform together with simple prior models ? And if so , how much more complexity in the transform is required ? Interestingly , we show that by leveraging and adapting the recent development of vision transformers , not only can we build neural codecs with simple prior models that can outperform ones built on expensive spatial autoregressive priors , but do so with smaller transform complexity compared to its convolutional counterparts , attaining a strictly better ratedistortion-complexity trade-off . As can be seen in Figure 1 , our proposed neural image codec SwinT-ChARM can outperform VTM-12.1 at comparable decoding time , which , to the best of our knowledge , is a first in the neural compression literature . As main contributions , we 1 ) extend Swin-Transformer ( Liu et al. , 2021 ) to a decoder setting and build Swin-transformer based neural image codecs that attain better rate-distortion performance with lower complexity compared with existing solutions , 2 ) verify its effectiveness in video compression by enhancing scale-space-flow , a popular neural P-frame codec , and 3 ) conduct extensive analysis and ablation study to explore differences between convolution and transformers , and investigate potential source of coding gain . 2 BACKGROUND & RELATED WORK . Conv-Hyperprior The seminal hyperprior architecture ( Ballé et al. , 2018 ; Minnen et al. , 2018 ) is a two-level hierarchical variational autoencoder , consisting of a pair of encoder/decoder ga , gs , and a pair of hyper-encoder/hyper-decoder ha , hs . Given an input image x , a pair of latent y = ga ( x ) and hyper-latent z = ha ( y ) is computed . The quantized hyper-latent ẑ = Q ( z ) is modeled and entropycoded with a learned factorized prior . The latent y is modeled with a factorized Gaussian distribution p ( y|ẑ ) = N ( µ , diag ( σ ) ) whose parameter is given by the hyper-decoder ( µ , σ ) = hs ( ẑ ) . The quantized version of the latent ŷ = Q ( y−µ ) +µ is then entropy coded and passed through decoder gs to derive reconstructed image x̂ = gs ( ŷ ) . The tranforms ga , gs , ha , hs are all parameterized as ConvNets ( for details , see Appendix A.1 ) . Conv-ChARM ( Minnen & Singh , 2020 ) extends the baseline hyperprior architecture with a channel-wise auto-regressive model ( ChARM ) 2 , in which latent y is split along channel dimension into S groups ( denoted as y1 , . . . , yS ) , and the Gaussian prior p ( ys|ẑ , ŷ < s ) is made autoregressive across groups where the mean/scale of ys depends on quantized latent in the previous groups ŷ < s . In practice , S = 10 provides a good balance of performance and complexity and is adopted here . Spatial AR models Most of recent performance advancements of neural image compression is driven by the use of spatial auto-regressive/context models . Variants include causal global prediction ( Guo et al. , 2021 ) , 3D context ( Ma et al. , 2021 ) , block-level context ( Wu et al. , 2020 ) , nonlocal context ( Li et al. , 2020 ; Qian et al. , 2021 ) . One common issue with these designs is that decoding 2For details refer to Figure 11 and 12 in the Appendix . can not be parallelized along spatial dimensions , leading to impractical3decoding latency , especially for large resolution images . ConvNet-based transforms While the design space of prior models is extensively explored , nonlinear transforms , as an important component , have received less attention . A standard convolution encoder-decoder with GDN ( Ballé et al. , 2016 ; 2017 ) as activation is widely adopted in the literature . Later works introduce new transform designs , such as residual blocks with smaller kernels ( Cheng et al. , 2020 ) , nonlocal ( sigmoid gating ) layers ( Zhou et al. , 2019 ; Chen et al. , 2021 ) , invertible neural networks ( Xie et al. , 2021 ) , and PReLU as an efficient replacement of GDN ( Egilmez et al. , 2021 ) . Vision transformers Although many transform networks are proposed , they are still mainly based on ConvNets . Recently transformers ( Vaswani et al. , 2017 ) have been introduced to the vision domain and have shown performance competitive with ConvNets in many tasks , e.g . object detection ( Carion et al. , 2020 ) , classification ( Dosovitskiy et al. , 2021 ) , image enhancement ( Chen et al. , 2020 ) , and semantic segmentation ( Zheng et al. , 2021 ) . Inspired by their success , in this work we explore how vision transformers work as nonlinear transforms for image and video compression . 3 SWIN-TRANSFORMER BASED TRANSFORM CODING . Among the large number of vision transformer variants , we choose Swin Transformer ( Liu et al. , 2021 ) ( hereafter referred to as SwinT ) to build the nonlinear transforms , mainly because of 1 ) its linear complexity w.r.t . input resolution due to local window attention , and 2 ) its flexibility in handling varying input resolutions at test time , enabled by relative position bias and hierarchical architecture . 3.1 SWINT ENCODER AND DECODER . The original SwinT is proposed as a vision backbone , i.e . an encoder transform with downsampling . As shown in Figure 2 , the SwinT encoder ga contains SwinT blocks interleaved with Patch Merge blocks . The Patch Merge block contains Space-to-Depth ( for downsampling ) , LayerNorm , and Linear layers sequentially . SwinT block performs local self-attention within each non-overlapping window of the feature maps and preserves feature size . Consecutive SwinT blocks at the same feature size shift the window partitioning with respect to the previous block to promote information propagation across nearby windows in the previous block . 3It is reported in ( Wu et al. , 2020 ) ( Table I ) that decoding time of spatial autoregressive models on a 512x768 image range from 2.6s to more than half a minute , depending on the specific designs . Also see Figure 1 . 4The ChARM architecture ( Minnen & Singh , 2020 ) is detailed in Figure 12 of Appendix A.1 . We adopt SwinT encoder as the encoder transform ga in our model , and extend it to SwinT decoder gs by reversing the order of blocks in ga , and replacing the Patch Merge block with a Patch Split block , which contains Linear , LayerNorm , Depth-to-Space ( for upsampling ) layers in sequence . The architectures for hyper transforms ha , hs are similar to ga , gs with different configurations . With these four SwinT transforms , we propose two image compression models , SwinT-Hyperprior and SwinT-ChARM , whose prior and hyper prior models are respectively the same as in ConvHyperprior and Conv-ChARM introduced in Section 2 . The full model architectures are shown in Figure 2 and Figure 13 . 3.2 EXTENSION TO P-FRAME COMPRESSION . To investigate the effectiveness of SwinT transforms for video compression , we study one popular P-frame compression model called Scale-Space Flow ( SSF ) ( Agustsson et al. , 2020 ) . There are three instances of Conv-Hyperprior in SSF , which are respectively for compressing I-frames , scale-space flow and residual . We propose a SwinT variant , referred to as SwinT-SSF , which is obtained by replacing Conv transforms ga , gs in the flow codec and residual codec of SSF with SwinT tranforms . To stabilize training of flow codec in SwinT-SSF , we need to remove all LayerNorm layers and reduce the window size ( e.g . from 8 to 4 ) . The baseline SSF model will be referred as Conv-SSF . Even though we build our solution on top of SSF , we believe this general extension can be applied to other ConvNet-based video compression models ( Rippel et al. , 2021 ; Hu et al. , 2021 ) as well . 4 EXPERIMENTS AND ANALYSIS . 4.1 EXPERIMENT SETUP . Training All image compression models are trained on the CLIC2020 training set . ConvHyperprior and SwinT-Hyperprior are trained with 2M batches . Conv-ChARM and SwinT-ChARM are trained with 3.5M and 3.1M steps . Each batch contains 8 random 256× 256 crops from training images . Training loss L = D + βR is a weighted combination of distortion D and bitrate R , with β being the Lagrangian multiplier steering rate-distortion trade-off . Distortion D is MSE in RGB color space . To cover a wide range of rate and distortion , for each solution , we train 5 models with β ∈ { 0.003 , 0.001 , 0.0003 , 0.0001 , 0.00003 } . The detailed training schedule is in Appendix B.1 . For P-frame compression models , we follow the training setup of SSF . Both Conv-SSF and SwinTSSF are trained on Vimeo-90k Dataset ( Xue et al. , 2019 ) for 1M steps with learning rate 10−4 , batch size of 8 , crop size of 256×256 , followed by 50K steps of training with learning rate 10−5 and crop size 384× 256 . The models are trained with 8 β values 2γ × 10−4 : γ ∈ { 0 , 1 , ... , 7 } . We adopt one critical trick to stablize the training from ( Jaegle et al. , 2021 ; Meister et al. , 2018 ) , i.e . to forward each video sequence twice during one optimization step ( mini-batch ) , once in the original frame order , once in the reversed frame order . Finally we add flow loss5 only between 0 and 200K steps , which we found not critical for stable training but improves the RD . Evaluation We evaluate image compression models on 4 datasets : Kodak ( Kodak , 1999 ) , CLIC2021 testset ( CLIC , 2021 ) , Tecnick testset ( Asuni & Giachetti , 2014 ) , and JPEG-AI testset ( JPEG-AI , 2020 ) . We use BPG and VTM-12.1 to code the images in YUV444 mode , and then calculate PSNR in RGB . For a fair comparison all images are cropped to multiples of 256 to avoid padding for neural codecs . We evaluated P-frame models on UVG ( Mercat et al. , 2020 ) 6 and MCL-JCV ( Wang et al. , 2016 ) , and compare them with the test model implementation of HEVC , referred to as HEVC ( HM ) , and open source library implementation of HEVC , refered to as HEVC ( x265 ) . To align configuration , all video codecs are evaluated in low-delay-P model with a fixed GOP size of 12 . Besides rate-distortion curves , we also evaluate different models using BD-rate ( Tan et al. , 2016 ) , which represents the average bitrate savings for the same reconstruction quality . For image codecs , BD-rate is computed for each image and then averaged across all images ; for video codecs , BD-rate 5We did not observe RD improvement when applying flow loss to Conv-SSF training . 6We use the original 7 UVG sequences that are commonly used in other works ( Agustsson et al. , 2020 ) . is computed for each video and then averaged across all videos . More details on testset preprocessing , and traditional codecs configurations can be found in Appendix B.2 . | This paper proposed to replace the typical cnn-based transform in image and video compression networks by Swin-transform. Experiments show its better performance and lower computational complexity over cnn-basd methods. Some extensive analysis are conducted to explore the differences between convolution and transformers. | SP:5894891c7f473c2041db2909453f16354c9b1e64 |
Transformer-based Transform Coding | 1 INTRODUCTION . Transform coding ( Goyal , 2001 ) is the dominant paradigm for compression of multi-media signals , and serves as the technical foundation for many successful coding standards such as JPEG , AAC , and HEVC/VVC . Codecs based on transform coding divide the task of lossy compression into three modularized components : transform , quantization , and entropy coding . With the advancement of deep learning , data compression is entering into a new era of learning-based schemes ( Ballé et al. , 2021 ) , in which all three components can be enhanced by deep neural networks : autoencoder networks are adopted as flexible nonlinear transforms , deep generative models are used as powerful learnable entropy models , and various differentiable quantization schemes are proposed to aid endto-end training . Thanks to these advancements , we have seen rapid progress in the domain of image and video compression . Particularly , the hyperprior line of work ( Ballé et al. , 2018 ; Minnen et al. , 2018 ; Lee et al. , 2019 ; Agustsson et al. , 2020 ; Minnen & Singh , 2020 ) has led to steady progress of neural compression performance over the past two years , reaching or even surpassing state-of-theart traditional codecs . For example , in image compression , BPG444 was surpassed by a neural codec in 2018 ( Minnen et al. , 2018 ) , and ( Cheng et al. , 2020 ; Xie et al. , 2021 ; Ma et al. , 2021 ; Guo et al. , 2021 ; Wu et al. , 2020 ) have claimed on-par or better performance than VTM ( a test model of the state-of-the-art non-learned VVC standard ) . One general trend in the advancement of neural image compression schemes is to develop ever more expressive yet expensive prior models based on spatial context ( Minnen et al. , 2018 ; Lee et al. , 2019 ; Ma et al. , 2021 ; Guo et al. , 2021 ; Wu et al. , 2020 ) . However , the rate-distortion improvement from context based prior modeling often comes with a hefty price tag1 in terms of decoding complexity . Noteably , all existing works that claimed on-par or better performance than VTM ( Cheng et al. , 1In the extreme case when a latent-pixel-level spatial autoregressive prior is used , decoding of a single 512x768 image requires no less than 1536 interleaved executions of prior model inference and entropy decoding ( assuming the latent is downsampled by a factor of 16x16 ) . 2020 ; Xie et al. , 2021 ; Ma et al. , 2021 ; Guo et al. , 2021 ; Wu et al. , 2020 ) rely on slow and expensive spatial context based prior models . The development of nonlinear transforms , on the other hand , are largely overlooked . This leads us to the following questions : can we achieve the same performance as that of expensive prior models by designing a more expressive transform together with simple prior models ? And if so , how much more complexity in the transform is required ? Interestingly , we show that by leveraging and adapting the recent development of vision transformers , not only can we build neural codecs with simple prior models that can outperform ones built on expensive spatial autoregressive priors , but do so with smaller transform complexity compared to its convolutional counterparts , attaining a strictly better ratedistortion-complexity trade-off . As can be seen in Figure 1 , our proposed neural image codec SwinT-ChARM can outperform VTM-12.1 at comparable decoding time , which , to the best of our knowledge , is a first in the neural compression literature . As main contributions , we 1 ) extend Swin-Transformer ( Liu et al. , 2021 ) to a decoder setting and build Swin-transformer based neural image codecs that attain better rate-distortion performance with lower complexity compared with existing solutions , 2 ) verify its effectiveness in video compression by enhancing scale-space-flow , a popular neural P-frame codec , and 3 ) conduct extensive analysis and ablation study to explore differences between convolution and transformers , and investigate potential source of coding gain . 2 BACKGROUND & RELATED WORK . Conv-Hyperprior The seminal hyperprior architecture ( Ballé et al. , 2018 ; Minnen et al. , 2018 ) is a two-level hierarchical variational autoencoder , consisting of a pair of encoder/decoder ga , gs , and a pair of hyper-encoder/hyper-decoder ha , hs . Given an input image x , a pair of latent y = ga ( x ) and hyper-latent z = ha ( y ) is computed . The quantized hyper-latent ẑ = Q ( z ) is modeled and entropycoded with a learned factorized prior . The latent y is modeled with a factorized Gaussian distribution p ( y|ẑ ) = N ( µ , diag ( σ ) ) whose parameter is given by the hyper-decoder ( µ , σ ) = hs ( ẑ ) . The quantized version of the latent ŷ = Q ( y−µ ) +µ is then entropy coded and passed through decoder gs to derive reconstructed image x̂ = gs ( ŷ ) . The tranforms ga , gs , ha , hs are all parameterized as ConvNets ( for details , see Appendix A.1 ) . Conv-ChARM ( Minnen & Singh , 2020 ) extends the baseline hyperprior architecture with a channel-wise auto-regressive model ( ChARM ) 2 , in which latent y is split along channel dimension into S groups ( denoted as y1 , . . . , yS ) , and the Gaussian prior p ( ys|ẑ , ŷ < s ) is made autoregressive across groups where the mean/scale of ys depends on quantized latent in the previous groups ŷ < s . In practice , S = 10 provides a good balance of performance and complexity and is adopted here . Spatial AR models Most of recent performance advancements of neural image compression is driven by the use of spatial auto-regressive/context models . Variants include causal global prediction ( Guo et al. , 2021 ) , 3D context ( Ma et al. , 2021 ) , block-level context ( Wu et al. , 2020 ) , nonlocal context ( Li et al. , 2020 ; Qian et al. , 2021 ) . One common issue with these designs is that decoding 2For details refer to Figure 11 and 12 in the Appendix . can not be parallelized along spatial dimensions , leading to impractical3decoding latency , especially for large resolution images . ConvNet-based transforms While the design space of prior models is extensively explored , nonlinear transforms , as an important component , have received less attention . A standard convolution encoder-decoder with GDN ( Ballé et al. , 2016 ; 2017 ) as activation is widely adopted in the literature . Later works introduce new transform designs , such as residual blocks with smaller kernels ( Cheng et al. , 2020 ) , nonlocal ( sigmoid gating ) layers ( Zhou et al. , 2019 ; Chen et al. , 2021 ) , invertible neural networks ( Xie et al. , 2021 ) , and PReLU as an efficient replacement of GDN ( Egilmez et al. , 2021 ) . Vision transformers Although many transform networks are proposed , they are still mainly based on ConvNets . Recently transformers ( Vaswani et al. , 2017 ) have been introduced to the vision domain and have shown performance competitive with ConvNets in many tasks , e.g . object detection ( Carion et al. , 2020 ) , classification ( Dosovitskiy et al. , 2021 ) , image enhancement ( Chen et al. , 2020 ) , and semantic segmentation ( Zheng et al. , 2021 ) . Inspired by their success , in this work we explore how vision transformers work as nonlinear transforms for image and video compression . 3 SWIN-TRANSFORMER BASED TRANSFORM CODING . Among the large number of vision transformer variants , we choose Swin Transformer ( Liu et al. , 2021 ) ( hereafter referred to as SwinT ) to build the nonlinear transforms , mainly because of 1 ) its linear complexity w.r.t . input resolution due to local window attention , and 2 ) its flexibility in handling varying input resolutions at test time , enabled by relative position bias and hierarchical architecture . 3.1 SWINT ENCODER AND DECODER . The original SwinT is proposed as a vision backbone , i.e . an encoder transform with downsampling . As shown in Figure 2 , the SwinT encoder ga contains SwinT blocks interleaved with Patch Merge blocks . The Patch Merge block contains Space-to-Depth ( for downsampling ) , LayerNorm , and Linear layers sequentially . SwinT block performs local self-attention within each non-overlapping window of the feature maps and preserves feature size . Consecutive SwinT blocks at the same feature size shift the window partitioning with respect to the previous block to promote information propagation across nearby windows in the previous block . 3It is reported in ( Wu et al. , 2020 ) ( Table I ) that decoding time of spatial autoregressive models on a 512x768 image range from 2.6s to more than half a minute , depending on the specific designs . Also see Figure 1 . 4The ChARM architecture ( Minnen & Singh , 2020 ) is detailed in Figure 12 of Appendix A.1 . We adopt SwinT encoder as the encoder transform ga in our model , and extend it to SwinT decoder gs by reversing the order of blocks in ga , and replacing the Patch Merge block with a Patch Split block , which contains Linear , LayerNorm , Depth-to-Space ( for upsampling ) layers in sequence . The architectures for hyper transforms ha , hs are similar to ga , gs with different configurations . With these four SwinT transforms , we propose two image compression models , SwinT-Hyperprior and SwinT-ChARM , whose prior and hyper prior models are respectively the same as in ConvHyperprior and Conv-ChARM introduced in Section 2 . The full model architectures are shown in Figure 2 and Figure 13 . 3.2 EXTENSION TO P-FRAME COMPRESSION . To investigate the effectiveness of SwinT transforms for video compression , we study one popular P-frame compression model called Scale-Space Flow ( SSF ) ( Agustsson et al. , 2020 ) . There are three instances of Conv-Hyperprior in SSF , which are respectively for compressing I-frames , scale-space flow and residual . We propose a SwinT variant , referred to as SwinT-SSF , which is obtained by replacing Conv transforms ga , gs in the flow codec and residual codec of SSF with SwinT tranforms . To stabilize training of flow codec in SwinT-SSF , we need to remove all LayerNorm layers and reduce the window size ( e.g . from 8 to 4 ) . The baseline SSF model will be referred as Conv-SSF . Even though we build our solution on top of SSF , we believe this general extension can be applied to other ConvNet-based video compression models ( Rippel et al. , 2021 ; Hu et al. , 2021 ) as well . 4 EXPERIMENTS AND ANALYSIS . 4.1 EXPERIMENT SETUP . Training All image compression models are trained on the CLIC2020 training set . ConvHyperprior and SwinT-Hyperprior are trained with 2M batches . Conv-ChARM and SwinT-ChARM are trained with 3.5M and 3.1M steps . Each batch contains 8 random 256× 256 crops from training images . Training loss L = D + βR is a weighted combination of distortion D and bitrate R , with β being the Lagrangian multiplier steering rate-distortion trade-off . Distortion D is MSE in RGB color space . To cover a wide range of rate and distortion , for each solution , we train 5 models with β ∈ { 0.003 , 0.001 , 0.0003 , 0.0001 , 0.00003 } . The detailed training schedule is in Appendix B.1 . For P-frame compression models , we follow the training setup of SSF . Both Conv-SSF and SwinTSSF are trained on Vimeo-90k Dataset ( Xue et al. , 2019 ) for 1M steps with learning rate 10−4 , batch size of 8 , crop size of 256×256 , followed by 50K steps of training with learning rate 10−5 and crop size 384× 256 . The models are trained with 8 β values 2γ × 10−4 : γ ∈ { 0 , 1 , ... , 7 } . We adopt one critical trick to stablize the training from ( Jaegle et al. , 2021 ; Meister et al. , 2018 ) , i.e . to forward each video sequence twice during one optimization step ( mini-batch ) , once in the original frame order , once in the reversed frame order . Finally we add flow loss5 only between 0 and 200K steps , which we found not critical for stable training but improves the RD . Evaluation We evaluate image compression models on 4 datasets : Kodak ( Kodak , 1999 ) , CLIC2021 testset ( CLIC , 2021 ) , Tecnick testset ( Asuni & Giachetti , 2014 ) , and JPEG-AI testset ( JPEG-AI , 2020 ) . We use BPG and VTM-12.1 to code the images in YUV444 mode , and then calculate PSNR in RGB . For a fair comparison all images are cropped to multiples of 256 to avoid padding for neural codecs . We evaluated P-frame models on UVG ( Mercat et al. , 2020 ) 6 and MCL-JCV ( Wang et al. , 2016 ) , and compare them with the test model implementation of HEVC , referred to as HEVC ( HM ) , and open source library implementation of HEVC , refered to as HEVC ( x265 ) . To align configuration , all video codecs are evaluated in low-delay-P model with a fixed GOP size of 12 . Besides rate-distortion curves , we also evaluate different models using BD-rate ( Tan et al. , 2016 ) , which represents the average bitrate savings for the same reconstruction quality . For image codecs , BD-rate is computed for each image and then averaged across all images ; for video codecs , BD-rate 5We did not observe RD improvement when applying flow loss to Conv-SSF training . 6We use the original 7 UVG sequences that are commonly used in other works ( Agustsson et al. , 2020 ) . is computed for each video and then averaged across all videos . More details on testset preprocessing , and traditional codecs configurations can be found in Appendix B.2 . | This paper addresses the problem of improving rate-distortion (RD) performance for learned image and video compression without ignoring runtime. Much of the literature on learned compression improves RD performance with more entropy models. Especially for autoregressive models, these models can have excessively slow decode times. This paper uses a less expensive (and generally less powerful) entropy model and explores the use of a transformer in the encoder and decoder transforms instead. The result is a much faster model that still achieves near-SOTA rate-distortion performance. In particular, the SwinT-ChARM model described in this paper outperforms VVC (via VTM 12.1 a recent version of the reference implementation for H.266) with faster decode times. As far as I know, this is a milestone for learned image compression (other methods have outperformed in terms of RD but only with much slower decoders). | SP:5894891c7f473c2041db2909453f16354c9b1e64 |
Transformer-based Transform Coding | 1 INTRODUCTION . Transform coding ( Goyal , 2001 ) is the dominant paradigm for compression of multi-media signals , and serves as the technical foundation for many successful coding standards such as JPEG , AAC , and HEVC/VVC . Codecs based on transform coding divide the task of lossy compression into three modularized components : transform , quantization , and entropy coding . With the advancement of deep learning , data compression is entering into a new era of learning-based schemes ( Ballé et al. , 2021 ) , in which all three components can be enhanced by deep neural networks : autoencoder networks are adopted as flexible nonlinear transforms , deep generative models are used as powerful learnable entropy models , and various differentiable quantization schemes are proposed to aid endto-end training . Thanks to these advancements , we have seen rapid progress in the domain of image and video compression . Particularly , the hyperprior line of work ( Ballé et al. , 2018 ; Minnen et al. , 2018 ; Lee et al. , 2019 ; Agustsson et al. , 2020 ; Minnen & Singh , 2020 ) has led to steady progress of neural compression performance over the past two years , reaching or even surpassing state-of-theart traditional codecs . For example , in image compression , BPG444 was surpassed by a neural codec in 2018 ( Minnen et al. , 2018 ) , and ( Cheng et al. , 2020 ; Xie et al. , 2021 ; Ma et al. , 2021 ; Guo et al. , 2021 ; Wu et al. , 2020 ) have claimed on-par or better performance than VTM ( a test model of the state-of-the-art non-learned VVC standard ) . One general trend in the advancement of neural image compression schemes is to develop ever more expressive yet expensive prior models based on spatial context ( Minnen et al. , 2018 ; Lee et al. , 2019 ; Ma et al. , 2021 ; Guo et al. , 2021 ; Wu et al. , 2020 ) . However , the rate-distortion improvement from context based prior modeling often comes with a hefty price tag1 in terms of decoding complexity . Noteably , all existing works that claimed on-par or better performance than VTM ( Cheng et al. , 1In the extreme case when a latent-pixel-level spatial autoregressive prior is used , decoding of a single 512x768 image requires no less than 1536 interleaved executions of prior model inference and entropy decoding ( assuming the latent is downsampled by a factor of 16x16 ) . 2020 ; Xie et al. , 2021 ; Ma et al. , 2021 ; Guo et al. , 2021 ; Wu et al. , 2020 ) rely on slow and expensive spatial context based prior models . The development of nonlinear transforms , on the other hand , are largely overlooked . This leads us to the following questions : can we achieve the same performance as that of expensive prior models by designing a more expressive transform together with simple prior models ? And if so , how much more complexity in the transform is required ? Interestingly , we show that by leveraging and adapting the recent development of vision transformers , not only can we build neural codecs with simple prior models that can outperform ones built on expensive spatial autoregressive priors , but do so with smaller transform complexity compared to its convolutional counterparts , attaining a strictly better ratedistortion-complexity trade-off . As can be seen in Figure 1 , our proposed neural image codec SwinT-ChARM can outperform VTM-12.1 at comparable decoding time , which , to the best of our knowledge , is a first in the neural compression literature . As main contributions , we 1 ) extend Swin-Transformer ( Liu et al. , 2021 ) to a decoder setting and build Swin-transformer based neural image codecs that attain better rate-distortion performance with lower complexity compared with existing solutions , 2 ) verify its effectiveness in video compression by enhancing scale-space-flow , a popular neural P-frame codec , and 3 ) conduct extensive analysis and ablation study to explore differences between convolution and transformers , and investigate potential source of coding gain . 2 BACKGROUND & RELATED WORK . Conv-Hyperprior The seminal hyperprior architecture ( Ballé et al. , 2018 ; Minnen et al. , 2018 ) is a two-level hierarchical variational autoencoder , consisting of a pair of encoder/decoder ga , gs , and a pair of hyper-encoder/hyper-decoder ha , hs . Given an input image x , a pair of latent y = ga ( x ) and hyper-latent z = ha ( y ) is computed . The quantized hyper-latent ẑ = Q ( z ) is modeled and entropycoded with a learned factorized prior . The latent y is modeled with a factorized Gaussian distribution p ( y|ẑ ) = N ( µ , diag ( σ ) ) whose parameter is given by the hyper-decoder ( µ , σ ) = hs ( ẑ ) . The quantized version of the latent ŷ = Q ( y−µ ) +µ is then entropy coded and passed through decoder gs to derive reconstructed image x̂ = gs ( ŷ ) . The tranforms ga , gs , ha , hs are all parameterized as ConvNets ( for details , see Appendix A.1 ) . Conv-ChARM ( Minnen & Singh , 2020 ) extends the baseline hyperprior architecture with a channel-wise auto-regressive model ( ChARM ) 2 , in which latent y is split along channel dimension into S groups ( denoted as y1 , . . . , yS ) , and the Gaussian prior p ( ys|ẑ , ŷ < s ) is made autoregressive across groups where the mean/scale of ys depends on quantized latent in the previous groups ŷ < s . In practice , S = 10 provides a good balance of performance and complexity and is adopted here . Spatial AR models Most of recent performance advancements of neural image compression is driven by the use of spatial auto-regressive/context models . Variants include causal global prediction ( Guo et al. , 2021 ) , 3D context ( Ma et al. , 2021 ) , block-level context ( Wu et al. , 2020 ) , nonlocal context ( Li et al. , 2020 ; Qian et al. , 2021 ) . One common issue with these designs is that decoding 2For details refer to Figure 11 and 12 in the Appendix . can not be parallelized along spatial dimensions , leading to impractical3decoding latency , especially for large resolution images . ConvNet-based transforms While the design space of prior models is extensively explored , nonlinear transforms , as an important component , have received less attention . A standard convolution encoder-decoder with GDN ( Ballé et al. , 2016 ; 2017 ) as activation is widely adopted in the literature . Later works introduce new transform designs , such as residual blocks with smaller kernels ( Cheng et al. , 2020 ) , nonlocal ( sigmoid gating ) layers ( Zhou et al. , 2019 ; Chen et al. , 2021 ) , invertible neural networks ( Xie et al. , 2021 ) , and PReLU as an efficient replacement of GDN ( Egilmez et al. , 2021 ) . Vision transformers Although many transform networks are proposed , they are still mainly based on ConvNets . Recently transformers ( Vaswani et al. , 2017 ) have been introduced to the vision domain and have shown performance competitive with ConvNets in many tasks , e.g . object detection ( Carion et al. , 2020 ) , classification ( Dosovitskiy et al. , 2021 ) , image enhancement ( Chen et al. , 2020 ) , and semantic segmentation ( Zheng et al. , 2021 ) . Inspired by their success , in this work we explore how vision transformers work as nonlinear transforms for image and video compression . 3 SWIN-TRANSFORMER BASED TRANSFORM CODING . Among the large number of vision transformer variants , we choose Swin Transformer ( Liu et al. , 2021 ) ( hereafter referred to as SwinT ) to build the nonlinear transforms , mainly because of 1 ) its linear complexity w.r.t . input resolution due to local window attention , and 2 ) its flexibility in handling varying input resolutions at test time , enabled by relative position bias and hierarchical architecture . 3.1 SWINT ENCODER AND DECODER . The original SwinT is proposed as a vision backbone , i.e . an encoder transform with downsampling . As shown in Figure 2 , the SwinT encoder ga contains SwinT blocks interleaved with Patch Merge blocks . The Patch Merge block contains Space-to-Depth ( for downsampling ) , LayerNorm , and Linear layers sequentially . SwinT block performs local self-attention within each non-overlapping window of the feature maps and preserves feature size . Consecutive SwinT blocks at the same feature size shift the window partitioning with respect to the previous block to promote information propagation across nearby windows in the previous block . 3It is reported in ( Wu et al. , 2020 ) ( Table I ) that decoding time of spatial autoregressive models on a 512x768 image range from 2.6s to more than half a minute , depending on the specific designs . Also see Figure 1 . 4The ChARM architecture ( Minnen & Singh , 2020 ) is detailed in Figure 12 of Appendix A.1 . We adopt SwinT encoder as the encoder transform ga in our model , and extend it to SwinT decoder gs by reversing the order of blocks in ga , and replacing the Patch Merge block with a Patch Split block , which contains Linear , LayerNorm , Depth-to-Space ( for upsampling ) layers in sequence . The architectures for hyper transforms ha , hs are similar to ga , gs with different configurations . With these four SwinT transforms , we propose two image compression models , SwinT-Hyperprior and SwinT-ChARM , whose prior and hyper prior models are respectively the same as in ConvHyperprior and Conv-ChARM introduced in Section 2 . The full model architectures are shown in Figure 2 and Figure 13 . 3.2 EXTENSION TO P-FRAME COMPRESSION . To investigate the effectiveness of SwinT transforms for video compression , we study one popular P-frame compression model called Scale-Space Flow ( SSF ) ( Agustsson et al. , 2020 ) . There are three instances of Conv-Hyperprior in SSF , which are respectively for compressing I-frames , scale-space flow and residual . We propose a SwinT variant , referred to as SwinT-SSF , which is obtained by replacing Conv transforms ga , gs in the flow codec and residual codec of SSF with SwinT tranforms . To stabilize training of flow codec in SwinT-SSF , we need to remove all LayerNorm layers and reduce the window size ( e.g . from 8 to 4 ) . The baseline SSF model will be referred as Conv-SSF . Even though we build our solution on top of SSF , we believe this general extension can be applied to other ConvNet-based video compression models ( Rippel et al. , 2021 ; Hu et al. , 2021 ) as well . 4 EXPERIMENTS AND ANALYSIS . 4.1 EXPERIMENT SETUP . Training All image compression models are trained on the CLIC2020 training set . ConvHyperprior and SwinT-Hyperprior are trained with 2M batches . Conv-ChARM and SwinT-ChARM are trained with 3.5M and 3.1M steps . Each batch contains 8 random 256× 256 crops from training images . Training loss L = D + βR is a weighted combination of distortion D and bitrate R , with β being the Lagrangian multiplier steering rate-distortion trade-off . Distortion D is MSE in RGB color space . To cover a wide range of rate and distortion , for each solution , we train 5 models with β ∈ { 0.003 , 0.001 , 0.0003 , 0.0001 , 0.00003 } . The detailed training schedule is in Appendix B.1 . For P-frame compression models , we follow the training setup of SSF . Both Conv-SSF and SwinTSSF are trained on Vimeo-90k Dataset ( Xue et al. , 2019 ) for 1M steps with learning rate 10−4 , batch size of 8 , crop size of 256×256 , followed by 50K steps of training with learning rate 10−5 and crop size 384× 256 . The models are trained with 8 β values 2γ × 10−4 : γ ∈ { 0 , 1 , ... , 7 } . We adopt one critical trick to stablize the training from ( Jaegle et al. , 2021 ; Meister et al. , 2018 ) , i.e . to forward each video sequence twice during one optimization step ( mini-batch ) , once in the original frame order , once in the reversed frame order . Finally we add flow loss5 only between 0 and 200K steps , which we found not critical for stable training but improves the RD . Evaluation We evaluate image compression models on 4 datasets : Kodak ( Kodak , 1999 ) , CLIC2021 testset ( CLIC , 2021 ) , Tecnick testset ( Asuni & Giachetti , 2014 ) , and JPEG-AI testset ( JPEG-AI , 2020 ) . We use BPG and VTM-12.1 to code the images in YUV444 mode , and then calculate PSNR in RGB . For a fair comparison all images are cropped to multiples of 256 to avoid padding for neural codecs . We evaluated P-frame models on UVG ( Mercat et al. , 2020 ) 6 and MCL-JCV ( Wang et al. , 2016 ) , and compare them with the test model implementation of HEVC , referred to as HEVC ( HM ) , and open source library implementation of HEVC , refered to as HEVC ( x265 ) . To align configuration , all video codecs are evaluated in low-delay-P model with a fixed GOP size of 12 . Besides rate-distortion curves , we also evaluate different models using BD-rate ( Tan et al. , 2016 ) , which represents the average bitrate savings for the same reconstruction quality . For image codecs , BD-rate is computed for each image and then averaged across all images ; for video codecs , BD-rate 5We did not observe RD improvement when applying flow loss to Conv-SSF training . 6We use the original 7 UVG sequences that are commonly used in other works ( Agustsson et al. , 2020 ) . is computed for each video and then averaged across all videos . More details on testset preprocessing , and traditional codecs configurations can be found in Appendix B.2 . | This paper introduces the swin-transformer for the learned image and video coding. Instead of developing more advanced and expensive entropy coding approaches, the authors focus on the transform network(i.e., networks of encoder/decoder) and improve the compression performance significantly. The experimental results are impressive. Although introducing SwinT is not very new, the authors provide a neat and practical solution, which should be encouraged. The authors also have a good balance between the coding gain and complexity. | SP:5894891c7f473c2041db2909453f16354c9b1e64 |
ON THE GENERALIZATION OF WASSERSTEIN ROBUST FEDERATED LEARNING | 1 INTRODUCTION . Federated Learning ( FL ) ( Konečný et al. , 2016 ; McMahan et al. , 2017 ) has emerged as a cuttingedge technique in distributed and privacy-preserving machine learning . The nature of highly nonindependent and identically distributed ( non-i.i.d . ) data in clients ’ devices poses an important challenge to FL commonly called statistical heterogeneity . The global model trained on this data using the de facto FedAvg algorithm ( McMahan et al. , 2017 ) has been shown to generalize poorly to individual clients ’ data , and further to unseen distributions on new clients as they enter the network . Several solutions to data heterogeneity have been proposed . Personalized FL ( Fallah et al. , 2020 ; Deng et al. , 2020a ; Dinh et al. , 2021 ; Li et al. , 2021 ) and multi-task FL ( Smith et al. , 2018 ) are client-adaptive approaches , where a personalized model is adapted to each client . From another perspective , distributionally robust FL trains a model using a worst-case objective over an ambiguity set ( Mohri et al. , 2019 ; Du et al. , 2020 ; Reisizadeh et al. , 2020 ; Deng et al. , 2020b ) . This approach is client-uniform because a single global model is judiciously learned to deliver uniformly good performance not only for all training clients but also for new/unseen clients with unknown data distributions . It is specifically useful when test distributions drift away from the training distributions . A natural question when designing distributionally robust FL frameworks is generalization : how can minimizing the training error also bound the test error ( generalization bounds ) ? In FL , Mohri et al . ( 2019 ) proposed agnostic FL where a model is designed to be robust against any ambiguity set as a convex combination of the clients ’ distributions . Reisizadeh et al . ( 2020 ) applied the general affine covariate shift – used in the standard adversarial robust training – into FL training . In characterizing the generalization bounds , while Mohri et al . ( 2019 ) relied on the standard Rademacher complexity , Reisizadeh et al . ( 2020 ) use the margin-based technique developed by Bartlett et al . ( 2017 ) . In this work , we take a different approach called WAsserstein distributionally robust FL ( WAFL for short ) . The ambiguity set in WAFL is a Wasserstein ball of all adversarial distributions in close proximity to the nominal data distribution at the center . Our main contributions are : • We propose a distributionally robust optimization problem to address statistical heterogeneity in FL . By controlling the center and radius of the Wasserstein ball , we show that WAFL is robust to a wider range of adversarial distributions than is agnostic or adversarial FL . • To make WAFL more amenable to distributed optimization , we transform the original problem into a minimization of the empirical surrogate risk . We propose a local SGD-based algorithm to solve this surrogate problem . With additional Lipschitz smoothness conditions , standard techniques can be applied to find the convergence rate for the proposed algorithm . • We show how WAFL ’ s output can reduce the test error by bounding its excess risk . We call this the robust generalization bound as it is applicable to all adversarial distributions inside the Wasserstein ball . By scaling the Wasserstein radius based on local data sizes , we show this bound is applicable to the true ( unknown ) data distribution among all clients . • We show WAFL ’ s extra flexibility in controlling the location of the Wasserstein ball by adjusting the nominal distribution . This enables applications such as multi-source domain adaptation and robustness to all clients ’ unknown distributions with minimal Wasserstein radius . • Experimentally , we discuss how to control this radius for a given center location by finetuning a robust hyperparameter . We show that WAFL generalizes better than FedAvg in non-i.i.d . settings and further outperforms existing robust methods in distribution shift settings . We finally explore WAFL ’ s capability in transferring knowledge from multi-source domains to related target domains with much less data and/or without labels . 2 RELATED WORK . Federated Learning was introduced in response to three challenges of machine learning at scale : massive data quantities at the edge , communication-critical networks of participating devices , and privacy-preserving learning without central data storage ( Konečný et al. , 2016 ; McMahan et al. , 2017 ) . The de facto federated optimization algorithm – FedAvg ( McMahan et al. , 2017 ) – is based on local stochastic gradient descent ( SGD ) and averaging and is often considered a baseline in FL . Most challenges of FL are categorized into systems heterogeneity and statistical heterogeneity . The former focuses on communication problems such as connection loss and bandwidth minimization . This motivated some prior works to design more communication-efficient methods ( Konečný et al. , 2016 ; 2017 ; Suresh et al. , 2017 ) . On the other hand , statitical heterogeneity is concerned with clients ’ non-i.i.d . data , which is the main cause behind aggregating very different models leading to one which does not perform well on any data distribution . To address this , many ideas have been introduced . Li et al . ( 2020 ) provided much theoretical analysis of FL non-i.i.d . settings . Zhao et al . ( 2018 ) proposed an FL framework which globally shares a small subset of data among clients to train the model with non-i.i.d . data . Smith et al . ( 2018 ) introduced a multi-task FL framework in which each client individually learns its own data pattern while borrowing information from other clients . Mansour et al . ( 2020 ) proposed three approaches to adapt the FL model to enable personalization , in reponse to distribution shift . Several personalized FL models have also been developed , including Fallah et al . ( 2020 ) ; Deng et al . ( 2020a ) ; Dinh et al . ( 2021 ) ; Li et al . ( 2021 ) . Wasserstein Distributionally Robust Optimization ( WDRO ) aims to lean a robust model against adversarially manipulated data . The unknown data distribution is assumed to lie within a Wasserstein ball centered around the empirical distribution ( Kuhn et al. , 2019 ) . WDRO has received attention as a promising tool for training parametric models , both in centralized and federated learning settings . In centralized learning , many studies have proposed solutions based on WDRO problems for certain machine learning tasks ( Shafieezadeh Abadeh et al. , 2015 ; Gao & Kleywegt , 2016 ; Esfahani & Kuhn , 2017 ; Chen & Paschalidis , 2018 ; Sinha et al. , 2020 ; Blanchet et al. , 2019 ; ShafieezadehAbadeh et al. , 2019 ; Gao et al. , 2020 ) . For instance , Shafieezadeh Abadeh et al . ( 2015 ) considered a robust logistic regression model under the assumption that the probability distributions lie in a Wasserstein ball . Chen & Paschalidis ( 2018 ) ; Blanchet et al . ( 2019 ) ; Gao et al . ( 2020 ) leveraged WDRO to recover regularization formulations in classification and regression . Gao & Kleywegt ( 2016 ) proposed a minimizer based on a tractable approximation of the local worst-case risk . Esfahani & Kuhn ( 2017 ) used WDRO to formulate the search for the largest perturbation range as an optimization problem and solve its dual problem . Sinha et al . ( 2020 ) introduced a robustness certificate based on a Lagrangian relaxation of the loss function which provably robust against adversarial input distributions within a Wasserstein ball centered around the original input distribution . In FL , only a few works have explored the Wasserstein distance ( Reisizadeh et al. , 2020 ; Diamandis et al. , 2021 ) . Specially , Reisizadeh et al . ( 2020 ) proposed FedRobust based on adversarial robust training to enhance robustness . Regarding distributionally robust learning , Deng et al . ( 2020b ) proposed DRFA , a communication efficient distributed algorithm . Besides , based on the agnostic FL framework suggested by Mohri et al . ( 2019 ) , Du et al . ( 2020 ) introduced AgnosticFair , a two-player adversarial minimax game between the learner and the adversary , to achieve fairness . 3 WASSERSTEIN ROBUST FEDERATED LEARNING . 3.1 EXPECTED RISK AND EMPIRICAL RISK MINIMIZATION IN FEDERATED LEARNING . In a federated setting , there are m clients , and each client i ∈ [ m ] : = { 1 , . . . , m } has its data generating distribution Pi supported on domain Zi : = ( Xi , Yi ) . Consider the parametrized hypothesis class H = { hθ | θ ∈ Rd } , where each member hθ is a mapping from Xi to Yi parametrized by θ . With zi : = ( xi , yi ) ∈ Zi , we use ` ( zi , hθ ) , shorthand for ` ( yi , hθ ( xi ) ) , to represent the cost of predicting hθ ( xi ) when the ground-truth label is yi . For example , if hθ ( xi ) = θTxi and yi ∈ R , a square loss ` ( zi , hθ ) = ` ( yi , hθ ( xi ) ) = ( θTxi−yi ) 2 can be considered . In FL , all clients collaborate with a server to find a global model θ such that the following sum weighted risk is minimized : min θ∈Rd m∑ i=1 λiEZi∼Pi [ ` ( Zi , hθ ) ] , ( 1 ) where EZi∼Pi [ ` ( Zi , hθ ) ] is client i ’ s expected risk and λi ≥ 0 represents the relative “ weight ” of client i and ∑m i=1 λi = 1 . Therefore , λ : = [ λ1 , . . . , λm ] > belongs to a simplex ∆ : = { λ ∈ Rm : λ < 0 and λ > 1m = 1 } . Define by Pλ : = ∑m i=1 λiPi the mixed clients ’ distribution over m domains Z : = { Z1 , . . . , Zm } . We denote by Z ∼ Pλ a random data point Z generated by Pλ , which means that the domain of client i is chosen with probability P ( Z = Zi ) = λi first , then a data point zi ∈ Zi is selected with probability P ( Zi = zi ) , Zi ∼ Pi . While the underlying distributions Pi are unknown , clients have access to finite observations zi ∈ [ ni ] ∼ Pλ . We abuse the notation [ ni ] to denote the set of client i ’ s both observable data points and their indexes . Let P̂ni : = 1 ni ∑ zi∈ [ ni ] δzi be the empirical distribution of Pi , where δzi is the Dirac point mass at zi . In general , we use the notation ̂ for quantities that are dependent on the training data . Define by P̂λ : = ∑m i=1 λiP̂ni the mixed empirical distribution of n = ∑m i=1 ni training data from m clients . The empirical risk minimization ( ERM ) problem of ( 1 ) is as follows : min θ∈Rd { EZ∼P̂λ [ ` ( Z , hθ ) ] = m∑ i=1 λiEZi∼P̂ni [ ` ( Zi , hθ ) ] = m∑ i=1 ni n ( 1 ni ∑ zi∈ [ ni ] ` ( zi , hθ ) ) } , ( 2 ) where λi = ni/n is often chosen in ERM of the standard FL ( McMahan et al. , 2017 ) . | The paper proposes a Wasserstein robust Distributional optimization scheme to provide robust approach for empirical risk minimization. Generalizing the concepts of Agnostic Federated Learning, the method finds applicability in domain adaptation as well as big data settings. The authors also propose and SGD algorithm to solve the problem described and provides a theoretical upper bound for the resultant estimates. | SP:6f2438b12e8334afa59513252991c4f4f5ce4a6b |
ON THE GENERALIZATION OF WASSERSTEIN ROBUST FEDERATED LEARNING | 1 INTRODUCTION . Federated Learning ( FL ) ( Konečný et al. , 2016 ; McMahan et al. , 2017 ) has emerged as a cuttingedge technique in distributed and privacy-preserving machine learning . The nature of highly nonindependent and identically distributed ( non-i.i.d . ) data in clients ’ devices poses an important challenge to FL commonly called statistical heterogeneity . The global model trained on this data using the de facto FedAvg algorithm ( McMahan et al. , 2017 ) has been shown to generalize poorly to individual clients ’ data , and further to unseen distributions on new clients as they enter the network . Several solutions to data heterogeneity have been proposed . Personalized FL ( Fallah et al. , 2020 ; Deng et al. , 2020a ; Dinh et al. , 2021 ; Li et al. , 2021 ) and multi-task FL ( Smith et al. , 2018 ) are client-adaptive approaches , where a personalized model is adapted to each client . From another perspective , distributionally robust FL trains a model using a worst-case objective over an ambiguity set ( Mohri et al. , 2019 ; Du et al. , 2020 ; Reisizadeh et al. , 2020 ; Deng et al. , 2020b ) . This approach is client-uniform because a single global model is judiciously learned to deliver uniformly good performance not only for all training clients but also for new/unseen clients with unknown data distributions . It is specifically useful when test distributions drift away from the training distributions . A natural question when designing distributionally robust FL frameworks is generalization : how can minimizing the training error also bound the test error ( generalization bounds ) ? In FL , Mohri et al . ( 2019 ) proposed agnostic FL where a model is designed to be robust against any ambiguity set as a convex combination of the clients ’ distributions . Reisizadeh et al . ( 2020 ) applied the general affine covariate shift – used in the standard adversarial robust training – into FL training . In characterizing the generalization bounds , while Mohri et al . ( 2019 ) relied on the standard Rademacher complexity , Reisizadeh et al . ( 2020 ) use the margin-based technique developed by Bartlett et al . ( 2017 ) . In this work , we take a different approach called WAsserstein distributionally robust FL ( WAFL for short ) . The ambiguity set in WAFL is a Wasserstein ball of all adversarial distributions in close proximity to the nominal data distribution at the center . Our main contributions are : • We propose a distributionally robust optimization problem to address statistical heterogeneity in FL . By controlling the center and radius of the Wasserstein ball , we show that WAFL is robust to a wider range of adversarial distributions than is agnostic or adversarial FL . • To make WAFL more amenable to distributed optimization , we transform the original problem into a minimization of the empirical surrogate risk . We propose a local SGD-based algorithm to solve this surrogate problem . With additional Lipschitz smoothness conditions , standard techniques can be applied to find the convergence rate for the proposed algorithm . • We show how WAFL ’ s output can reduce the test error by bounding its excess risk . We call this the robust generalization bound as it is applicable to all adversarial distributions inside the Wasserstein ball . By scaling the Wasserstein radius based on local data sizes , we show this bound is applicable to the true ( unknown ) data distribution among all clients . • We show WAFL ’ s extra flexibility in controlling the location of the Wasserstein ball by adjusting the nominal distribution . This enables applications such as multi-source domain adaptation and robustness to all clients ’ unknown distributions with minimal Wasserstein radius . • Experimentally , we discuss how to control this radius for a given center location by finetuning a robust hyperparameter . We show that WAFL generalizes better than FedAvg in non-i.i.d . settings and further outperforms existing robust methods in distribution shift settings . We finally explore WAFL ’ s capability in transferring knowledge from multi-source domains to related target domains with much less data and/or without labels . 2 RELATED WORK . Federated Learning was introduced in response to three challenges of machine learning at scale : massive data quantities at the edge , communication-critical networks of participating devices , and privacy-preserving learning without central data storage ( Konečný et al. , 2016 ; McMahan et al. , 2017 ) . The de facto federated optimization algorithm – FedAvg ( McMahan et al. , 2017 ) – is based on local stochastic gradient descent ( SGD ) and averaging and is often considered a baseline in FL . Most challenges of FL are categorized into systems heterogeneity and statistical heterogeneity . The former focuses on communication problems such as connection loss and bandwidth minimization . This motivated some prior works to design more communication-efficient methods ( Konečný et al. , 2016 ; 2017 ; Suresh et al. , 2017 ) . On the other hand , statitical heterogeneity is concerned with clients ’ non-i.i.d . data , which is the main cause behind aggregating very different models leading to one which does not perform well on any data distribution . To address this , many ideas have been introduced . Li et al . ( 2020 ) provided much theoretical analysis of FL non-i.i.d . settings . Zhao et al . ( 2018 ) proposed an FL framework which globally shares a small subset of data among clients to train the model with non-i.i.d . data . Smith et al . ( 2018 ) introduced a multi-task FL framework in which each client individually learns its own data pattern while borrowing information from other clients . Mansour et al . ( 2020 ) proposed three approaches to adapt the FL model to enable personalization , in reponse to distribution shift . Several personalized FL models have also been developed , including Fallah et al . ( 2020 ) ; Deng et al . ( 2020a ) ; Dinh et al . ( 2021 ) ; Li et al . ( 2021 ) . Wasserstein Distributionally Robust Optimization ( WDRO ) aims to lean a robust model against adversarially manipulated data . The unknown data distribution is assumed to lie within a Wasserstein ball centered around the empirical distribution ( Kuhn et al. , 2019 ) . WDRO has received attention as a promising tool for training parametric models , both in centralized and federated learning settings . In centralized learning , many studies have proposed solutions based on WDRO problems for certain machine learning tasks ( Shafieezadeh Abadeh et al. , 2015 ; Gao & Kleywegt , 2016 ; Esfahani & Kuhn , 2017 ; Chen & Paschalidis , 2018 ; Sinha et al. , 2020 ; Blanchet et al. , 2019 ; ShafieezadehAbadeh et al. , 2019 ; Gao et al. , 2020 ) . For instance , Shafieezadeh Abadeh et al . ( 2015 ) considered a robust logistic regression model under the assumption that the probability distributions lie in a Wasserstein ball . Chen & Paschalidis ( 2018 ) ; Blanchet et al . ( 2019 ) ; Gao et al . ( 2020 ) leveraged WDRO to recover regularization formulations in classification and regression . Gao & Kleywegt ( 2016 ) proposed a minimizer based on a tractable approximation of the local worst-case risk . Esfahani & Kuhn ( 2017 ) used WDRO to formulate the search for the largest perturbation range as an optimization problem and solve its dual problem . Sinha et al . ( 2020 ) introduced a robustness certificate based on a Lagrangian relaxation of the loss function which provably robust against adversarial input distributions within a Wasserstein ball centered around the original input distribution . In FL , only a few works have explored the Wasserstein distance ( Reisizadeh et al. , 2020 ; Diamandis et al. , 2021 ) . Specially , Reisizadeh et al . ( 2020 ) proposed FedRobust based on adversarial robust training to enhance robustness . Regarding distributionally robust learning , Deng et al . ( 2020b ) proposed DRFA , a communication efficient distributed algorithm . Besides , based on the agnostic FL framework suggested by Mohri et al . ( 2019 ) , Du et al . ( 2020 ) introduced AgnosticFair , a two-player adversarial minimax game between the learner and the adversary , to achieve fairness . 3 WASSERSTEIN ROBUST FEDERATED LEARNING . 3.1 EXPECTED RISK AND EMPIRICAL RISK MINIMIZATION IN FEDERATED LEARNING . In a federated setting , there are m clients , and each client i ∈ [ m ] : = { 1 , . . . , m } has its data generating distribution Pi supported on domain Zi : = ( Xi , Yi ) . Consider the parametrized hypothesis class H = { hθ | θ ∈ Rd } , where each member hθ is a mapping from Xi to Yi parametrized by θ . With zi : = ( xi , yi ) ∈ Zi , we use ` ( zi , hθ ) , shorthand for ` ( yi , hθ ( xi ) ) , to represent the cost of predicting hθ ( xi ) when the ground-truth label is yi . For example , if hθ ( xi ) = θTxi and yi ∈ R , a square loss ` ( zi , hθ ) = ` ( yi , hθ ( xi ) ) = ( θTxi−yi ) 2 can be considered . In FL , all clients collaborate with a server to find a global model θ such that the following sum weighted risk is minimized : min θ∈Rd m∑ i=1 λiEZi∼Pi [ ` ( Zi , hθ ) ] , ( 1 ) where EZi∼Pi [ ` ( Zi , hθ ) ] is client i ’ s expected risk and λi ≥ 0 represents the relative “ weight ” of client i and ∑m i=1 λi = 1 . Therefore , λ : = [ λ1 , . . . , λm ] > belongs to a simplex ∆ : = { λ ∈ Rm : λ < 0 and λ > 1m = 1 } . Define by Pλ : = ∑m i=1 λiPi the mixed clients ’ distribution over m domains Z : = { Z1 , . . . , Zm } . We denote by Z ∼ Pλ a random data point Z generated by Pλ , which means that the domain of client i is chosen with probability P ( Z = Zi ) = λi first , then a data point zi ∈ Zi is selected with probability P ( Zi = zi ) , Zi ∼ Pi . While the underlying distributions Pi are unknown , clients have access to finite observations zi ∈ [ ni ] ∼ Pλ . We abuse the notation [ ni ] to denote the set of client i ’ s both observable data points and their indexes . Let P̂ni : = 1 ni ∑ zi∈ [ ni ] δzi be the empirical distribution of Pi , where δzi is the Dirac point mass at zi . In general , we use the notation ̂ for quantities that are dependent on the training data . Define by P̂λ : = ∑m i=1 λiP̂ni the mixed empirical distribution of n = ∑m i=1 ni training data from m clients . The empirical risk minimization ( ERM ) problem of ( 1 ) is as follows : min θ∈Rd { EZ∼P̂λ [ ` ( Z , hθ ) ] = m∑ i=1 λiEZi∼P̂ni [ ` ( Zi , hθ ) ] = m∑ i=1 ni n ( 1 ni ∑ zi∈ [ ni ] ` ( zi , hθ ) ) } , ( 2 ) where λi = ni/n is often chosen in ERM of the standard FL ( McMahan et al. , 2017 ) . | This paper presents a Wasserstein distributionally robust optimization (WDRO) framework for federated learning to hedge against statistical heterogeneity. The authors utilized the duality result in previous WDRO works to make their formulation tractable, and proposed a distributed algorithm to solve a relaxed WDRO problem. They conducted several numerical experiments on MNIST and CIFAR-10 to compare their method with FedAvg (non-robust algorithm), FedPGM and FedFGSM (robust algorithms), and demonstrated the advantage of their approach when the proportion of attacked clients is over 80%. | SP:6f2438b12e8334afa59513252991c4f4f5ce4a6b |
ON THE GENERALIZATION OF WASSERSTEIN ROBUST FEDERATED LEARNING | 1 INTRODUCTION . Federated Learning ( FL ) ( Konečný et al. , 2016 ; McMahan et al. , 2017 ) has emerged as a cuttingedge technique in distributed and privacy-preserving machine learning . The nature of highly nonindependent and identically distributed ( non-i.i.d . ) data in clients ’ devices poses an important challenge to FL commonly called statistical heterogeneity . The global model trained on this data using the de facto FedAvg algorithm ( McMahan et al. , 2017 ) has been shown to generalize poorly to individual clients ’ data , and further to unseen distributions on new clients as they enter the network . Several solutions to data heterogeneity have been proposed . Personalized FL ( Fallah et al. , 2020 ; Deng et al. , 2020a ; Dinh et al. , 2021 ; Li et al. , 2021 ) and multi-task FL ( Smith et al. , 2018 ) are client-adaptive approaches , where a personalized model is adapted to each client . From another perspective , distributionally robust FL trains a model using a worst-case objective over an ambiguity set ( Mohri et al. , 2019 ; Du et al. , 2020 ; Reisizadeh et al. , 2020 ; Deng et al. , 2020b ) . This approach is client-uniform because a single global model is judiciously learned to deliver uniformly good performance not only for all training clients but also for new/unseen clients with unknown data distributions . It is specifically useful when test distributions drift away from the training distributions . A natural question when designing distributionally robust FL frameworks is generalization : how can minimizing the training error also bound the test error ( generalization bounds ) ? In FL , Mohri et al . ( 2019 ) proposed agnostic FL where a model is designed to be robust against any ambiguity set as a convex combination of the clients ’ distributions . Reisizadeh et al . ( 2020 ) applied the general affine covariate shift – used in the standard adversarial robust training – into FL training . In characterizing the generalization bounds , while Mohri et al . ( 2019 ) relied on the standard Rademacher complexity , Reisizadeh et al . ( 2020 ) use the margin-based technique developed by Bartlett et al . ( 2017 ) . In this work , we take a different approach called WAsserstein distributionally robust FL ( WAFL for short ) . The ambiguity set in WAFL is a Wasserstein ball of all adversarial distributions in close proximity to the nominal data distribution at the center . Our main contributions are : • We propose a distributionally robust optimization problem to address statistical heterogeneity in FL . By controlling the center and radius of the Wasserstein ball , we show that WAFL is robust to a wider range of adversarial distributions than is agnostic or adversarial FL . • To make WAFL more amenable to distributed optimization , we transform the original problem into a minimization of the empirical surrogate risk . We propose a local SGD-based algorithm to solve this surrogate problem . With additional Lipschitz smoothness conditions , standard techniques can be applied to find the convergence rate for the proposed algorithm . • We show how WAFL ’ s output can reduce the test error by bounding its excess risk . We call this the robust generalization bound as it is applicable to all adversarial distributions inside the Wasserstein ball . By scaling the Wasserstein radius based on local data sizes , we show this bound is applicable to the true ( unknown ) data distribution among all clients . • We show WAFL ’ s extra flexibility in controlling the location of the Wasserstein ball by adjusting the nominal distribution . This enables applications such as multi-source domain adaptation and robustness to all clients ’ unknown distributions with minimal Wasserstein radius . • Experimentally , we discuss how to control this radius for a given center location by finetuning a robust hyperparameter . We show that WAFL generalizes better than FedAvg in non-i.i.d . settings and further outperforms existing robust methods in distribution shift settings . We finally explore WAFL ’ s capability in transferring knowledge from multi-source domains to related target domains with much less data and/or without labels . 2 RELATED WORK . Federated Learning was introduced in response to three challenges of machine learning at scale : massive data quantities at the edge , communication-critical networks of participating devices , and privacy-preserving learning without central data storage ( Konečný et al. , 2016 ; McMahan et al. , 2017 ) . The de facto federated optimization algorithm – FedAvg ( McMahan et al. , 2017 ) – is based on local stochastic gradient descent ( SGD ) and averaging and is often considered a baseline in FL . Most challenges of FL are categorized into systems heterogeneity and statistical heterogeneity . The former focuses on communication problems such as connection loss and bandwidth minimization . This motivated some prior works to design more communication-efficient methods ( Konečný et al. , 2016 ; 2017 ; Suresh et al. , 2017 ) . On the other hand , statitical heterogeneity is concerned with clients ’ non-i.i.d . data , which is the main cause behind aggregating very different models leading to one which does not perform well on any data distribution . To address this , many ideas have been introduced . Li et al . ( 2020 ) provided much theoretical analysis of FL non-i.i.d . settings . Zhao et al . ( 2018 ) proposed an FL framework which globally shares a small subset of data among clients to train the model with non-i.i.d . data . Smith et al . ( 2018 ) introduced a multi-task FL framework in which each client individually learns its own data pattern while borrowing information from other clients . Mansour et al . ( 2020 ) proposed three approaches to adapt the FL model to enable personalization , in reponse to distribution shift . Several personalized FL models have also been developed , including Fallah et al . ( 2020 ) ; Deng et al . ( 2020a ) ; Dinh et al . ( 2021 ) ; Li et al . ( 2021 ) . Wasserstein Distributionally Robust Optimization ( WDRO ) aims to lean a robust model against adversarially manipulated data . The unknown data distribution is assumed to lie within a Wasserstein ball centered around the empirical distribution ( Kuhn et al. , 2019 ) . WDRO has received attention as a promising tool for training parametric models , both in centralized and federated learning settings . In centralized learning , many studies have proposed solutions based on WDRO problems for certain machine learning tasks ( Shafieezadeh Abadeh et al. , 2015 ; Gao & Kleywegt , 2016 ; Esfahani & Kuhn , 2017 ; Chen & Paschalidis , 2018 ; Sinha et al. , 2020 ; Blanchet et al. , 2019 ; ShafieezadehAbadeh et al. , 2019 ; Gao et al. , 2020 ) . For instance , Shafieezadeh Abadeh et al . ( 2015 ) considered a robust logistic regression model under the assumption that the probability distributions lie in a Wasserstein ball . Chen & Paschalidis ( 2018 ) ; Blanchet et al . ( 2019 ) ; Gao et al . ( 2020 ) leveraged WDRO to recover regularization formulations in classification and regression . Gao & Kleywegt ( 2016 ) proposed a minimizer based on a tractable approximation of the local worst-case risk . Esfahani & Kuhn ( 2017 ) used WDRO to formulate the search for the largest perturbation range as an optimization problem and solve its dual problem . Sinha et al . ( 2020 ) introduced a robustness certificate based on a Lagrangian relaxation of the loss function which provably robust against adversarial input distributions within a Wasserstein ball centered around the original input distribution . In FL , only a few works have explored the Wasserstein distance ( Reisizadeh et al. , 2020 ; Diamandis et al. , 2021 ) . Specially , Reisizadeh et al . ( 2020 ) proposed FedRobust based on adversarial robust training to enhance robustness . Regarding distributionally robust learning , Deng et al . ( 2020b ) proposed DRFA , a communication efficient distributed algorithm . Besides , based on the agnostic FL framework suggested by Mohri et al . ( 2019 ) , Du et al . ( 2020 ) introduced AgnosticFair , a two-player adversarial minimax game between the learner and the adversary , to achieve fairness . 3 WASSERSTEIN ROBUST FEDERATED LEARNING . 3.1 EXPECTED RISK AND EMPIRICAL RISK MINIMIZATION IN FEDERATED LEARNING . In a federated setting , there are m clients , and each client i ∈ [ m ] : = { 1 , . . . , m } has its data generating distribution Pi supported on domain Zi : = ( Xi , Yi ) . Consider the parametrized hypothesis class H = { hθ | θ ∈ Rd } , where each member hθ is a mapping from Xi to Yi parametrized by θ . With zi : = ( xi , yi ) ∈ Zi , we use ` ( zi , hθ ) , shorthand for ` ( yi , hθ ( xi ) ) , to represent the cost of predicting hθ ( xi ) when the ground-truth label is yi . For example , if hθ ( xi ) = θTxi and yi ∈ R , a square loss ` ( zi , hθ ) = ` ( yi , hθ ( xi ) ) = ( θTxi−yi ) 2 can be considered . In FL , all clients collaborate with a server to find a global model θ such that the following sum weighted risk is minimized : min θ∈Rd m∑ i=1 λiEZi∼Pi [ ` ( Zi , hθ ) ] , ( 1 ) where EZi∼Pi [ ` ( Zi , hθ ) ] is client i ’ s expected risk and λi ≥ 0 represents the relative “ weight ” of client i and ∑m i=1 λi = 1 . Therefore , λ : = [ λ1 , . . . , λm ] > belongs to a simplex ∆ : = { λ ∈ Rm : λ < 0 and λ > 1m = 1 } . Define by Pλ : = ∑m i=1 λiPi the mixed clients ’ distribution over m domains Z : = { Z1 , . . . , Zm } . We denote by Z ∼ Pλ a random data point Z generated by Pλ , which means that the domain of client i is chosen with probability P ( Z = Zi ) = λi first , then a data point zi ∈ Zi is selected with probability P ( Zi = zi ) , Zi ∼ Pi . While the underlying distributions Pi are unknown , clients have access to finite observations zi ∈ [ ni ] ∼ Pλ . We abuse the notation [ ni ] to denote the set of client i ’ s both observable data points and their indexes . Let P̂ni : = 1 ni ∑ zi∈ [ ni ] δzi be the empirical distribution of Pi , where δzi is the Dirac point mass at zi . In general , we use the notation ̂ for quantities that are dependent on the training data . Define by P̂λ : = ∑m i=1 λiP̂ni the mixed empirical distribution of n = ∑m i=1 ni training data from m clients . The empirical risk minimization ( ERM ) problem of ( 1 ) is as follows : min θ∈Rd { EZ∼P̂λ [ ` ( Z , hθ ) ] = m∑ i=1 λiEZi∼P̂ni [ ` ( Zi , hθ ) ] = m∑ i=1 ni n ( 1 ni ∑ zi∈ [ ni ] ` ( zi , hθ ) ) } , ( 2 ) where λi = ni/n is often chosen in ERM of the standard FL ( McMahan et al. , 2017 ) . | The paper proposes a Wasserstein-based distributionally robust federated learning (WAFL) framework to address the statistical heterogeneity problem, which is also applicable to distributional shift setting and domain adaptation. Inspired by (Sinha et al., 2020), the WAFL problem is reformulated into the dual form, and the Lagrangian ($\gamma$) is chosen as a fixed value reflecting the algorithm's conservatives. The paper develops a local SGD scheme to solve the problem and provides a theoretical convergence guarantee under a set of standard assumptions. In addition, the paper also provides a generalization bound for the proposed algorithm by resorting to standard techniques such as covering number, entropy integral, and empirical convergence rate of Wasserstein distances. Finally, the results of several numerical experiments are reported to justify the performance of the algorithm. | SP:6f2438b12e8334afa59513252991c4f4f5ce4a6b |
Bounding Membership Inference | 1 INTRODUCTION . Differential Privacy ( DP ) ( Dwork , 2006 ) is employed extensively to reason about privacy guarantees in a variety of different settings ( Dwork , 2008 ) . Recently , DP started being used to give privacy guarantees for the training data of deep neural networks ( DNNs ) learned through stochastic gradient descent ( Abadi et al. , 2016 ) . However , even though DP gives privacy guarantees and bounds the worst case privacy leakage , it is not immediately clear how these guarantees bound the accuracy of known existing forms of privacy infringement attacks . At the time of writing , the most practical attack on the privacy of DNNs is Membership Inference ( MI ) ( Shokri et al. , 2017 ) , where an attacker predicts whether or not a model used a particular data point for training ( note that this is quite similar to the hypothetical adversary at the core of the game instantiated in the definition of DP ) ; membership inference attacks saw a strong interest by the community , and several improvements and renditions were proposed since its inception ( Sablayrolles et al. , 2019 ; Choquette-Choo et al. , 2021 ; Maini et al. , 2021 ; Hu et al. , 2021 ) . Having privacy guarantees would desirably defend against MI , and in fact current literature highlights that DP does indeed give an upper bound on the performance of MI adversaries ( Yeom et al. , 2018 ; Erlingsson et al. , 2019 ; Sablayrolles et al. , 2019 ; Jayaraman et al. , 2020 ) . In this paper , we first propose a tighter bound on MI accuracy for training algorithms that provide -DP . Our approach uses a lemma about an equivalence of certain sets of datasets . Furthermore , in obtaining our bound , we also show how this bound can benefit from a form of privacy amplification where the training dataset itself is sub-sampled from a larger dataset . Amplification is a technique pervasively found in work improving the analysis of DP learners like DP-SGD ( Abadi et al. , 2016 ) , and we observe the effect of our amplification on lowering MI accuracy is significantly stronger than the effect of batch sampling , a common privacy amplification scheme for training DNNs . Our bound also has consequences for the problem of unlearning ( or data forgetting in ML ) introduced by Cao & Yang ( 2015 ) . In particular the MI accuracy on the point to be unlearned is a popular measure for how well a model has unlearned ( Baumhauer et al. , 2020 ; Graves et al. , 2020 ; Golatkar et al. , 2020b ; a ) . However empirical verification of the MI accuracy can be open ended , as it is subjective to the attack employed . Theoretical bounds on all MI attacks , such as the one proposed in this work , circumvent this issue ; a bound on the accuracy of MI attacks , in particular the probability a data point was used in the training dataset , indicates a limitation for any entity to discern if the model had trained on the data point . In the case when this is sufficiently low ( where sufficiently is defined apriori ) , one can then claim to have unlearned by achieving a model sufficiently likely to have not come from training with the data point . Our analysis shows that , if dataset subsampling is used , one can unlearn under this definition by training with a relatively large ( and thus have less cost to performance ) . To summarize , our contributions are : • We present a tighter general bound on MI accuracy for -DP ; • We further demonstrate how to lower this bound using a novel privacy amplification scheme built on dataset subsampling ; • We discuss the benefits of such bounds to Machine Unlearning as a rigorous way to use MI as a metric for unlearning . 2 BACKGROUND . 2.1 DIFFERENTIAL PRIVACY . Differential privacy ( DP ) ( Dwork , 2006 ) bounds how different the outputs of a function on adjacent inputs can be in order to give privacy guarantees for the inputs . More formally a function F is -DP if for all adjacent inputs x and x′ ( i.e . inputs with hamming distance 1 ) we have for all sets S in the output space : P ( F ( x ) ∈ S ) ≤ e P ( F ( x′ ) ∈ S ) ( 1 ) We also have a more relaxed notion of ( , δ ) -DP where in the same setup as above , but with a parameter δ ∈ ( 0 , 1 ] , we have P ( F ( x ) ∈ S ) ≤ e P ( F ( x′ ) ∈ S ) + δ . Notably , ( , δ ) -DP is used for functions where it is more natural to work with ` 2 metrics on the input space , which has to do with how DP guarantees are obtained . To achieve DP guarantees one usually introduces noise to the output of the function F . The amount of noise is calibrated to the maximal ` 2 or ` 1 difference between all possible outputs of the function on adjacent datasets ( also called sensitivity ) . Significant progress was achieved on minimizing the amount of noise needed for a given sensitivity ( Balle & Wang , 2018 ) , and on how DP guarantees scale when composing multiple DP functions ( Dwork et al. , 2010 ; Kairouz et al. , 2015 ) . Abadi et al . ( 2016 ) demonstrated a method to make the final model returned by mini-batch SGD ( , δ ) -DP with respect to its training dataset by bounding the sensitivity of gradient updates during mini-batch SGD and introducing Gaussian noise to each update . This approach became the de-facto standard for DP guarantees in DNNs . However , the adoption is still greatly limited because of an observed trade-off between privacy guarantees and model utility . At the time of writing there is still no feasible ways to learn with low and high accuracy , and past work ( Jagielski et al. , 2020 ) have suggested that DP-analysis may be too loose and provides more privacy than is expected . However , more recently Nasr et al . ( 2021 ) showed ( using statistical tests and stronger MI adversaries ) that the current state of the art approaches to achieving ( , δ ) -DP bounds for deep learning are tight , in contrast to Jagielski et al . ( 2020 ) results suggesting that they were loose . That is , there is not much more improvement to be gained by studying how to improve the ( , δ ) -DP bound from a given amount of noise or improving composition rules . Facing this , future improvements in DP training would lie in understanding the guarantees that DP bounds provide against the performance of relevant privacy attacks . This would allow us to be more informed about the guarantees required during training to defeat practical attacks and enable the use of looser guarantees if one is only interested in defending against a specific set of attacks . 1 . 1It is worth noting that Nasr et al . ( 2021 ) showed that current analytic upper bounds on DP guarantees are tight , measuring them empirically with various strong privacy adversaries . Although results do suggest that bounds match , the paper did not investigate how DP guarantees limit performance of the adversary . 2.2 MEMBERSHIP INFERENCE . Shokri et al . ( 2017 ) introduced a MI attack against DNNs , which leveraged shadow models ( models with the same architecture as the target model ) trained on similar data in order to train a classifier which , given the outputs of a model on a data point , predicts if the model was trained on that data point or not . Since the introduction of this initial attack , the community has proposed several improved and variations of the original MI attack ( Yeom et al. , 2018 ; Salem et al. , 2018 ; Sablayrolles et al. , 2019 ; Truex et al. , 2019 ; Jayaraman et al. , 2020 ; Maini et al. , 2021 ) , such as an attack that only look at predicted labels of the target model ( Choquette-Choo et al. , 2021 ) . MI attacks are currently the main practical threat to the privacy of a user ’ s data used to train DNNs . Especially in the context of DP DNN learning , it would be beneficial to know how DP bounds translate to bounds on the accuracy of MI attacks . This would provide an understanding on what sort of DP guarantees an entity requires to ensure a sufficiently low maximum accuracy of an adversary trying to discern their training data from their deployed model . The bounds would hence help in guiding decisions regarding setting these parameters and their corresponding guarantees . In our paper we will work with the following ( abstract ) notion of MI in giving our bounds . In particular we define our MI adversary as a function f which takes a set of models S and a data point x∗ to deterministically output either 1 or 0 , corresponding to whether x∗ was in the dataset D used to obtain the models in S or not respectively . Note the generality of this adversary , as we do not consider how the adversary obtains the function , i.e . it can have arbitrary strength . Any such adversary will then satisfy the upper and lower bounds we derive later in the paper . With that definition of our adversary , we have the following definition of positive and negative MI accuracy ( which is what we focus on in this paper ) ; note that here D is the training dataset and P ( x∗ ∈ D|S ) is the probability a data point x∗ was in the training dataset used to obtain the models in the set S ( i.e . this is a probability over datasets ) . We explain more about where the randomness is introduced ( in particular the probability involved in obtaining a training dataset ) in Section 3.1 . Definition 1 ( MI accuracy ) . The positive accuracy of f ( x∗ , S ) , the accuracy if f outputs 1 which we define asA ( f ( x∗ , S ) = 1 ) , is P ( x∗ ∈ D|S ) and the negative accuracy , the accuracy if f outputs 0 which we define as A ( f ( x∗ , S ) = 0 ) , is P ( x∗ /∈ D|S ) = 1− P ( x∗ ∈ D|S ) 2.3 PREVIOUS BOUNDS . Before giving bounds on MI accuracy , we have to formally define the attack setting . Two of the main bounds ( Yeom et al. , 2018 ; Erlingsson et al. , 2019 ) focused on an experimental setup first introduced by Yeom et al . ( 2018 ) . To summarize the experiment , and in particular the situation the adversary is operating in , an adversary f is given a datapoint x∗ that is 50 % likely to have been used to train a model S or not . The adversary then either predicts 1 if they think it was used , or 0 otherwise . Let b = 1 or 0 indicate if the datapoint was or was not used for training respectively . We say the adversary was correct if their prediction matches b . We then define the adversary ’ s advantage as improvement in accuracy over the 50 % baseline of random guessing , or more specifically 2 ( A ( f ) − 0.5 ) where A ( f ) is the accuracy of f . For such an adversary operating in a scenario where data is equally likely to be included or not in the training dataset , Yeom et al . ( 2018 ) showed that they could bound the advantage of the adversary by e − 1 when training with -DP . In other words , they showed that they could bound the accuracy of the MI adversary by e /2 . Their proof used the fact that the true positive rate ( TPR ) and false positive rate ( FPR ) of their adversary could be represented as expectations over the different data points in a dataset , and from that introduced the DP condition to obtain their MI bound , noting that MI advantage is equivalent to TPR - FPR . Erlingsson et al . ( 2019 ) improved on the bound developed by Yeom et al . ( 2018 ) for an adversary operating under the same condition by utilizing a proposition given by Hall et al . ( 2013 ) on the relation between TPR and FPR for an ( , δ ) -DP function . Using these facts , Erlingsson et al . ( 2019 ) bounded the membership advantage by 1−e− +δe− , which is equivalent to bounding the accuracy of the adversary by 1 − e− /2 when δ = 0 ( i.e . in -DP ) . This is , to the best of our knowledge , the previous state-of-the-art bound for high . Other work have considered more general setups where the probability of sampling a datapoint in the dataset can vary , similar to what we consider in Section 3.1 . For -DP , Sablayrolles et al . ( 2019 ) bounded the probability of a datapoint x∗ being used in the training set of a model ( i.e. , the accuracy of an attacker who predicted the datapoint was in the dataset of the model ) by Px∗ ( 1 ) + 4 where Px∗ ( 1 ) is the probability of the datapoint being in the dataset . This is , to the best of our knowledge , the previous state-of-the-art bound for low ( when reduced to case of Yeom et al . ( 2018 ) by setting Px∗ ( 1 ) = 0.5 as to compare with Erlingsson et al . ( 2019 ) ) . Finally , Jayaraman et al . ( 2020 ) bounded the positive predictive value of an attacker ( i.e . its precision ) on a model trained with ( , δ ) -DP when the FPR is fixed . It is worth noting that although the considered setup is similar to works covered above , it assumes an unbalanced sampling procedure . Similarly , Jayaraman et al . further bounded membership advantage under the experiment described by Yeom et al . ( 2018 ) for a fixed FPR . Erlingsson et al . ( 2019 ) followed a similar argument for their bound but were also able to remove the need for an explicit knowledge of the FPR . | This paper presents a tighter analysis for membership inference attacks on algorithms that satisfy $\varepsilon$-differential privacy. It also talks about a better form of privacy amplification based on that. Finally, it discusses the role of membership inference in the task of machine unlearning. | SP:0495fdb17c2373f94a4c781405d95bdaba4b3f9b |
Bounding Membership Inference | 1 INTRODUCTION . Differential Privacy ( DP ) ( Dwork , 2006 ) is employed extensively to reason about privacy guarantees in a variety of different settings ( Dwork , 2008 ) . Recently , DP started being used to give privacy guarantees for the training data of deep neural networks ( DNNs ) learned through stochastic gradient descent ( Abadi et al. , 2016 ) . However , even though DP gives privacy guarantees and bounds the worst case privacy leakage , it is not immediately clear how these guarantees bound the accuracy of known existing forms of privacy infringement attacks . At the time of writing , the most practical attack on the privacy of DNNs is Membership Inference ( MI ) ( Shokri et al. , 2017 ) , where an attacker predicts whether or not a model used a particular data point for training ( note that this is quite similar to the hypothetical adversary at the core of the game instantiated in the definition of DP ) ; membership inference attacks saw a strong interest by the community , and several improvements and renditions were proposed since its inception ( Sablayrolles et al. , 2019 ; Choquette-Choo et al. , 2021 ; Maini et al. , 2021 ; Hu et al. , 2021 ) . Having privacy guarantees would desirably defend against MI , and in fact current literature highlights that DP does indeed give an upper bound on the performance of MI adversaries ( Yeom et al. , 2018 ; Erlingsson et al. , 2019 ; Sablayrolles et al. , 2019 ; Jayaraman et al. , 2020 ) . In this paper , we first propose a tighter bound on MI accuracy for training algorithms that provide -DP . Our approach uses a lemma about an equivalence of certain sets of datasets . Furthermore , in obtaining our bound , we also show how this bound can benefit from a form of privacy amplification where the training dataset itself is sub-sampled from a larger dataset . Amplification is a technique pervasively found in work improving the analysis of DP learners like DP-SGD ( Abadi et al. , 2016 ) , and we observe the effect of our amplification on lowering MI accuracy is significantly stronger than the effect of batch sampling , a common privacy amplification scheme for training DNNs . Our bound also has consequences for the problem of unlearning ( or data forgetting in ML ) introduced by Cao & Yang ( 2015 ) . In particular the MI accuracy on the point to be unlearned is a popular measure for how well a model has unlearned ( Baumhauer et al. , 2020 ; Graves et al. , 2020 ; Golatkar et al. , 2020b ; a ) . However empirical verification of the MI accuracy can be open ended , as it is subjective to the attack employed . Theoretical bounds on all MI attacks , such as the one proposed in this work , circumvent this issue ; a bound on the accuracy of MI attacks , in particular the probability a data point was used in the training dataset , indicates a limitation for any entity to discern if the model had trained on the data point . In the case when this is sufficiently low ( where sufficiently is defined apriori ) , one can then claim to have unlearned by achieving a model sufficiently likely to have not come from training with the data point . Our analysis shows that , if dataset subsampling is used , one can unlearn under this definition by training with a relatively large ( and thus have less cost to performance ) . To summarize , our contributions are : • We present a tighter general bound on MI accuracy for -DP ; • We further demonstrate how to lower this bound using a novel privacy amplification scheme built on dataset subsampling ; • We discuss the benefits of such bounds to Machine Unlearning as a rigorous way to use MI as a metric for unlearning . 2 BACKGROUND . 2.1 DIFFERENTIAL PRIVACY . Differential privacy ( DP ) ( Dwork , 2006 ) bounds how different the outputs of a function on adjacent inputs can be in order to give privacy guarantees for the inputs . More formally a function F is -DP if for all adjacent inputs x and x′ ( i.e . inputs with hamming distance 1 ) we have for all sets S in the output space : P ( F ( x ) ∈ S ) ≤ e P ( F ( x′ ) ∈ S ) ( 1 ) We also have a more relaxed notion of ( , δ ) -DP where in the same setup as above , but with a parameter δ ∈ ( 0 , 1 ] , we have P ( F ( x ) ∈ S ) ≤ e P ( F ( x′ ) ∈ S ) + δ . Notably , ( , δ ) -DP is used for functions where it is more natural to work with ` 2 metrics on the input space , which has to do with how DP guarantees are obtained . To achieve DP guarantees one usually introduces noise to the output of the function F . The amount of noise is calibrated to the maximal ` 2 or ` 1 difference between all possible outputs of the function on adjacent datasets ( also called sensitivity ) . Significant progress was achieved on minimizing the amount of noise needed for a given sensitivity ( Balle & Wang , 2018 ) , and on how DP guarantees scale when composing multiple DP functions ( Dwork et al. , 2010 ; Kairouz et al. , 2015 ) . Abadi et al . ( 2016 ) demonstrated a method to make the final model returned by mini-batch SGD ( , δ ) -DP with respect to its training dataset by bounding the sensitivity of gradient updates during mini-batch SGD and introducing Gaussian noise to each update . This approach became the de-facto standard for DP guarantees in DNNs . However , the adoption is still greatly limited because of an observed trade-off between privacy guarantees and model utility . At the time of writing there is still no feasible ways to learn with low and high accuracy , and past work ( Jagielski et al. , 2020 ) have suggested that DP-analysis may be too loose and provides more privacy than is expected . However , more recently Nasr et al . ( 2021 ) showed ( using statistical tests and stronger MI adversaries ) that the current state of the art approaches to achieving ( , δ ) -DP bounds for deep learning are tight , in contrast to Jagielski et al . ( 2020 ) results suggesting that they were loose . That is , there is not much more improvement to be gained by studying how to improve the ( , δ ) -DP bound from a given amount of noise or improving composition rules . Facing this , future improvements in DP training would lie in understanding the guarantees that DP bounds provide against the performance of relevant privacy attacks . This would allow us to be more informed about the guarantees required during training to defeat practical attacks and enable the use of looser guarantees if one is only interested in defending against a specific set of attacks . 1 . 1It is worth noting that Nasr et al . ( 2021 ) showed that current analytic upper bounds on DP guarantees are tight , measuring them empirically with various strong privacy adversaries . Although results do suggest that bounds match , the paper did not investigate how DP guarantees limit performance of the adversary . 2.2 MEMBERSHIP INFERENCE . Shokri et al . ( 2017 ) introduced a MI attack against DNNs , which leveraged shadow models ( models with the same architecture as the target model ) trained on similar data in order to train a classifier which , given the outputs of a model on a data point , predicts if the model was trained on that data point or not . Since the introduction of this initial attack , the community has proposed several improved and variations of the original MI attack ( Yeom et al. , 2018 ; Salem et al. , 2018 ; Sablayrolles et al. , 2019 ; Truex et al. , 2019 ; Jayaraman et al. , 2020 ; Maini et al. , 2021 ) , such as an attack that only look at predicted labels of the target model ( Choquette-Choo et al. , 2021 ) . MI attacks are currently the main practical threat to the privacy of a user ’ s data used to train DNNs . Especially in the context of DP DNN learning , it would be beneficial to know how DP bounds translate to bounds on the accuracy of MI attacks . This would provide an understanding on what sort of DP guarantees an entity requires to ensure a sufficiently low maximum accuracy of an adversary trying to discern their training data from their deployed model . The bounds would hence help in guiding decisions regarding setting these parameters and their corresponding guarantees . In our paper we will work with the following ( abstract ) notion of MI in giving our bounds . In particular we define our MI adversary as a function f which takes a set of models S and a data point x∗ to deterministically output either 1 or 0 , corresponding to whether x∗ was in the dataset D used to obtain the models in S or not respectively . Note the generality of this adversary , as we do not consider how the adversary obtains the function , i.e . it can have arbitrary strength . Any such adversary will then satisfy the upper and lower bounds we derive later in the paper . With that definition of our adversary , we have the following definition of positive and negative MI accuracy ( which is what we focus on in this paper ) ; note that here D is the training dataset and P ( x∗ ∈ D|S ) is the probability a data point x∗ was in the training dataset used to obtain the models in the set S ( i.e . this is a probability over datasets ) . We explain more about where the randomness is introduced ( in particular the probability involved in obtaining a training dataset ) in Section 3.1 . Definition 1 ( MI accuracy ) . The positive accuracy of f ( x∗ , S ) , the accuracy if f outputs 1 which we define asA ( f ( x∗ , S ) = 1 ) , is P ( x∗ ∈ D|S ) and the negative accuracy , the accuracy if f outputs 0 which we define as A ( f ( x∗ , S ) = 0 ) , is P ( x∗ /∈ D|S ) = 1− P ( x∗ ∈ D|S ) 2.3 PREVIOUS BOUNDS . Before giving bounds on MI accuracy , we have to formally define the attack setting . Two of the main bounds ( Yeom et al. , 2018 ; Erlingsson et al. , 2019 ) focused on an experimental setup first introduced by Yeom et al . ( 2018 ) . To summarize the experiment , and in particular the situation the adversary is operating in , an adversary f is given a datapoint x∗ that is 50 % likely to have been used to train a model S or not . The adversary then either predicts 1 if they think it was used , or 0 otherwise . Let b = 1 or 0 indicate if the datapoint was or was not used for training respectively . We say the adversary was correct if their prediction matches b . We then define the adversary ’ s advantage as improvement in accuracy over the 50 % baseline of random guessing , or more specifically 2 ( A ( f ) − 0.5 ) where A ( f ) is the accuracy of f . For such an adversary operating in a scenario where data is equally likely to be included or not in the training dataset , Yeom et al . ( 2018 ) showed that they could bound the advantage of the adversary by e − 1 when training with -DP . In other words , they showed that they could bound the accuracy of the MI adversary by e /2 . Their proof used the fact that the true positive rate ( TPR ) and false positive rate ( FPR ) of their adversary could be represented as expectations over the different data points in a dataset , and from that introduced the DP condition to obtain their MI bound , noting that MI advantage is equivalent to TPR - FPR . Erlingsson et al . ( 2019 ) improved on the bound developed by Yeom et al . ( 2018 ) for an adversary operating under the same condition by utilizing a proposition given by Hall et al . ( 2013 ) on the relation between TPR and FPR for an ( , δ ) -DP function . Using these facts , Erlingsson et al . ( 2019 ) bounded the membership advantage by 1−e− +δe− , which is equivalent to bounding the accuracy of the adversary by 1 − e− /2 when δ = 0 ( i.e . in -DP ) . This is , to the best of our knowledge , the previous state-of-the-art bound for high . Other work have considered more general setups where the probability of sampling a datapoint in the dataset can vary , similar to what we consider in Section 3.1 . For -DP , Sablayrolles et al . ( 2019 ) bounded the probability of a datapoint x∗ being used in the training set of a model ( i.e. , the accuracy of an attacker who predicted the datapoint was in the dataset of the model ) by Px∗ ( 1 ) + 4 where Px∗ ( 1 ) is the probability of the datapoint being in the dataset . This is , to the best of our knowledge , the previous state-of-the-art bound for low ( when reduced to case of Yeom et al . ( 2018 ) by setting Px∗ ( 1 ) = 0.5 as to compare with Erlingsson et al . ( 2019 ) ) . Finally , Jayaraman et al . ( 2020 ) bounded the positive predictive value of an attacker ( i.e . its precision ) on a model trained with ( , δ ) -DP when the FPR is fixed . It is worth noting that although the considered setup is similar to works covered above , it assumes an unbalanced sampling procedure . Similarly , Jayaraman et al . further bounded membership advantage under the experiment described by Yeom et al . ( 2018 ) for a fixed FPR . Erlingsson et al . ( 2019 ) followed a similar argument for their bound but were also able to remove the need for an explicit knowledge of the FPR . | This work studies membership inference attacks and how differential privacy can help mitigate such attacks. Although the connection between membership inference and differential privacy has been known, this work provides a tighter connection. It is important for the future development of private ML to better understand the connection between DP and specific attacks as small privacy loss parameters are not practical in many settings | SP:0495fdb17c2373f94a4c781405d95bdaba4b3f9b |
Bounding Membership Inference | 1 INTRODUCTION . Differential Privacy ( DP ) ( Dwork , 2006 ) is employed extensively to reason about privacy guarantees in a variety of different settings ( Dwork , 2008 ) . Recently , DP started being used to give privacy guarantees for the training data of deep neural networks ( DNNs ) learned through stochastic gradient descent ( Abadi et al. , 2016 ) . However , even though DP gives privacy guarantees and bounds the worst case privacy leakage , it is not immediately clear how these guarantees bound the accuracy of known existing forms of privacy infringement attacks . At the time of writing , the most practical attack on the privacy of DNNs is Membership Inference ( MI ) ( Shokri et al. , 2017 ) , where an attacker predicts whether or not a model used a particular data point for training ( note that this is quite similar to the hypothetical adversary at the core of the game instantiated in the definition of DP ) ; membership inference attacks saw a strong interest by the community , and several improvements and renditions were proposed since its inception ( Sablayrolles et al. , 2019 ; Choquette-Choo et al. , 2021 ; Maini et al. , 2021 ; Hu et al. , 2021 ) . Having privacy guarantees would desirably defend against MI , and in fact current literature highlights that DP does indeed give an upper bound on the performance of MI adversaries ( Yeom et al. , 2018 ; Erlingsson et al. , 2019 ; Sablayrolles et al. , 2019 ; Jayaraman et al. , 2020 ) . In this paper , we first propose a tighter bound on MI accuracy for training algorithms that provide -DP . Our approach uses a lemma about an equivalence of certain sets of datasets . Furthermore , in obtaining our bound , we also show how this bound can benefit from a form of privacy amplification where the training dataset itself is sub-sampled from a larger dataset . Amplification is a technique pervasively found in work improving the analysis of DP learners like DP-SGD ( Abadi et al. , 2016 ) , and we observe the effect of our amplification on lowering MI accuracy is significantly stronger than the effect of batch sampling , a common privacy amplification scheme for training DNNs . Our bound also has consequences for the problem of unlearning ( or data forgetting in ML ) introduced by Cao & Yang ( 2015 ) . In particular the MI accuracy on the point to be unlearned is a popular measure for how well a model has unlearned ( Baumhauer et al. , 2020 ; Graves et al. , 2020 ; Golatkar et al. , 2020b ; a ) . However empirical verification of the MI accuracy can be open ended , as it is subjective to the attack employed . Theoretical bounds on all MI attacks , such as the one proposed in this work , circumvent this issue ; a bound on the accuracy of MI attacks , in particular the probability a data point was used in the training dataset , indicates a limitation for any entity to discern if the model had trained on the data point . In the case when this is sufficiently low ( where sufficiently is defined apriori ) , one can then claim to have unlearned by achieving a model sufficiently likely to have not come from training with the data point . Our analysis shows that , if dataset subsampling is used , one can unlearn under this definition by training with a relatively large ( and thus have less cost to performance ) . To summarize , our contributions are : • We present a tighter general bound on MI accuracy for -DP ; • We further demonstrate how to lower this bound using a novel privacy amplification scheme built on dataset subsampling ; • We discuss the benefits of such bounds to Machine Unlearning as a rigorous way to use MI as a metric for unlearning . 2 BACKGROUND . 2.1 DIFFERENTIAL PRIVACY . Differential privacy ( DP ) ( Dwork , 2006 ) bounds how different the outputs of a function on adjacent inputs can be in order to give privacy guarantees for the inputs . More formally a function F is -DP if for all adjacent inputs x and x′ ( i.e . inputs with hamming distance 1 ) we have for all sets S in the output space : P ( F ( x ) ∈ S ) ≤ e P ( F ( x′ ) ∈ S ) ( 1 ) We also have a more relaxed notion of ( , δ ) -DP where in the same setup as above , but with a parameter δ ∈ ( 0 , 1 ] , we have P ( F ( x ) ∈ S ) ≤ e P ( F ( x′ ) ∈ S ) + δ . Notably , ( , δ ) -DP is used for functions where it is more natural to work with ` 2 metrics on the input space , which has to do with how DP guarantees are obtained . To achieve DP guarantees one usually introduces noise to the output of the function F . The amount of noise is calibrated to the maximal ` 2 or ` 1 difference between all possible outputs of the function on adjacent datasets ( also called sensitivity ) . Significant progress was achieved on minimizing the amount of noise needed for a given sensitivity ( Balle & Wang , 2018 ) , and on how DP guarantees scale when composing multiple DP functions ( Dwork et al. , 2010 ; Kairouz et al. , 2015 ) . Abadi et al . ( 2016 ) demonstrated a method to make the final model returned by mini-batch SGD ( , δ ) -DP with respect to its training dataset by bounding the sensitivity of gradient updates during mini-batch SGD and introducing Gaussian noise to each update . This approach became the de-facto standard for DP guarantees in DNNs . However , the adoption is still greatly limited because of an observed trade-off between privacy guarantees and model utility . At the time of writing there is still no feasible ways to learn with low and high accuracy , and past work ( Jagielski et al. , 2020 ) have suggested that DP-analysis may be too loose and provides more privacy than is expected . However , more recently Nasr et al . ( 2021 ) showed ( using statistical tests and stronger MI adversaries ) that the current state of the art approaches to achieving ( , δ ) -DP bounds for deep learning are tight , in contrast to Jagielski et al . ( 2020 ) results suggesting that they were loose . That is , there is not much more improvement to be gained by studying how to improve the ( , δ ) -DP bound from a given amount of noise or improving composition rules . Facing this , future improvements in DP training would lie in understanding the guarantees that DP bounds provide against the performance of relevant privacy attacks . This would allow us to be more informed about the guarantees required during training to defeat practical attacks and enable the use of looser guarantees if one is only interested in defending against a specific set of attacks . 1 . 1It is worth noting that Nasr et al . ( 2021 ) showed that current analytic upper bounds on DP guarantees are tight , measuring them empirically with various strong privacy adversaries . Although results do suggest that bounds match , the paper did not investigate how DP guarantees limit performance of the adversary . 2.2 MEMBERSHIP INFERENCE . Shokri et al . ( 2017 ) introduced a MI attack against DNNs , which leveraged shadow models ( models with the same architecture as the target model ) trained on similar data in order to train a classifier which , given the outputs of a model on a data point , predicts if the model was trained on that data point or not . Since the introduction of this initial attack , the community has proposed several improved and variations of the original MI attack ( Yeom et al. , 2018 ; Salem et al. , 2018 ; Sablayrolles et al. , 2019 ; Truex et al. , 2019 ; Jayaraman et al. , 2020 ; Maini et al. , 2021 ) , such as an attack that only look at predicted labels of the target model ( Choquette-Choo et al. , 2021 ) . MI attacks are currently the main practical threat to the privacy of a user ’ s data used to train DNNs . Especially in the context of DP DNN learning , it would be beneficial to know how DP bounds translate to bounds on the accuracy of MI attacks . This would provide an understanding on what sort of DP guarantees an entity requires to ensure a sufficiently low maximum accuracy of an adversary trying to discern their training data from their deployed model . The bounds would hence help in guiding decisions regarding setting these parameters and their corresponding guarantees . In our paper we will work with the following ( abstract ) notion of MI in giving our bounds . In particular we define our MI adversary as a function f which takes a set of models S and a data point x∗ to deterministically output either 1 or 0 , corresponding to whether x∗ was in the dataset D used to obtain the models in S or not respectively . Note the generality of this adversary , as we do not consider how the adversary obtains the function , i.e . it can have arbitrary strength . Any such adversary will then satisfy the upper and lower bounds we derive later in the paper . With that definition of our adversary , we have the following definition of positive and negative MI accuracy ( which is what we focus on in this paper ) ; note that here D is the training dataset and P ( x∗ ∈ D|S ) is the probability a data point x∗ was in the training dataset used to obtain the models in the set S ( i.e . this is a probability over datasets ) . We explain more about where the randomness is introduced ( in particular the probability involved in obtaining a training dataset ) in Section 3.1 . Definition 1 ( MI accuracy ) . The positive accuracy of f ( x∗ , S ) , the accuracy if f outputs 1 which we define asA ( f ( x∗ , S ) = 1 ) , is P ( x∗ ∈ D|S ) and the negative accuracy , the accuracy if f outputs 0 which we define as A ( f ( x∗ , S ) = 0 ) , is P ( x∗ /∈ D|S ) = 1− P ( x∗ ∈ D|S ) 2.3 PREVIOUS BOUNDS . Before giving bounds on MI accuracy , we have to formally define the attack setting . Two of the main bounds ( Yeom et al. , 2018 ; Erlingsson et al. , 2019 ) focused on an experimental setup first introduced by Yeom et al . ( 2018 ) . To summarize the experiment , and in particular the situation the adversary is operating in , an adversary f is given a datapoint x∗ that is 50 % likely to have been used to train a model S or not . The adversary then either predicts 1 if they think it was used , or 0 otherwise . Let b = 1 or 0 indicate if the datapoint was or was not used for training respectively . We say the adversary was correct if their prediction matches b . We then define the adversary ’ s advantage as improvement in accuracy over the 50 % baseline of random guessing , or more specifically 2 ( A ( f ) − 0.5 ) where A ( f ) is the accuracy of f . For such an adversary operating in a scenario where data is equally likely to be included or not in the training dataset , Yeom et al . ( 2018 ) showed that they could bound the advantage of the adversary by e − 1 when training with -DP . In other words , they showed that they could bound the accuracy of the MI adversary by e /2 . Their proof used the fact that the true positive rate ( TPR ) and false positive rate ( FPR ) of their adversary could be represented as expectations over the different data points in a dataset , and from that introduced the DP condition to obtain their MI bound , noting that MI advantage is equivalent to TPR - FPR . Erlingsson et al . ( 2019 ) improved on the bound developed by Yeom et al . ( 2018 ) for an adversary operating under the same condition by utilizing a proposition given by Hall et al . ( 2013 ) on the relation between TPR and FPR for an ( , δ ) -DP function . Using these facts , Erlingsson et al . ( 2019 ) bounded the membership advantage by 1−e− +δe− , which is equivalent to bounding the accuracy of the adversary by 1 − e− /2 when δ = 0 ( i.e . in -DP ) . This is , to the best of our knowledge , the previous state-of-the-art bound for high . Other work have considered more general setups where the probability of sampling a datapoint in the dataset can vary , similar to what we consider in Section 3.1 . For -DP , Sablayrolles et al . ( 2019 ) bounded the probability of a datapoint x∗ being used in the training set of a model ( i.e. , the accuracy of an attacker who predicted the datapoint was in the dataset of the model ) by Px∗ ( 1 ) + 4 where Px∗ ( 1 ) is the probability of the datapoint being in the dataset . This is , to the best of our knowledge , the previous state-of-the-art bound for low ( when reduced to case of Yeom et al . ( 2018 ) by setting Px∗ ( 1 ) = 0.5 as to compare with Erlingsson et al . ( 2019 ) ) . Finally , Jayaraman et al . ( 2020 ) bounded the positive predictive value of an attacker ( i.e . its precision ) on a model trained with ( , δ ) -DP when the FPR is fixed . It is worth noting that although the considered setup is similar to works covered above , it assumes an unbalanced sampling procedure . Similarly , Jayaraman et al . further bounded membership advantage under the experiment described by Yeom et al . ( 2018 ) for a fixed FPR . Erlingsson et al . ( 2019 ) followed a similar argument for their bound but were also able to remove the need for an explicit knowledge of the FPR . | The paper provides a tighter bound for accuracy of membership inference attacks for (pure) differentially private machine learning models. To account for inclusion probability of samples being different from 0.5, the authors separately bound positive and negative accuracy. Moreover, the authors also demonstrate the benefits of their bound on machine unlearning. | SP:0495fdb17c2373f94a4c781405d95bdaba4b3f9b |
Model Agnostic Interpretability for Multiple Instance Learning | 1 INTRODUCTION . In Multiple Instance Learning ( MIL ) , data is organised into bags of instances , and each bag is given a single label . This reduces the burden of labelling , as each instance does not have to be assigned a label , making it useful in applications where labelling is expensive , such as healthcare ( Carbonneau et al. , 2018 ) . However , there are often only a few key instances within a bag that determine the bag label , so it is necessary to identify these key instances in order to interpret a model ’ s decision-making ( Liu et al. , 2012 ) . Directly interpreting the decision-making process of machine learning methods is difficult due to the complexity of the models and the scale of the data on which they trained , so there is a need for methods that allow insights into the decision-making processes ( Gilpin et al. , 2018 ) . In MIL problems , only some of the instances in each bag will be discriminatory , i.e. , a significant number of the instances in a bag will be non-discriminatory or even related to other bag classes ( Amores , 2013 ) . Identifying the important instances and presenting those as the interpretation of model decision-making filters out the non-discriminatory information and provides the explainee with a reduced and relevant interpretation , which will avoid overloading the user ( Li et al. , 2015 ) . Our work provides the following novel contributions : 1 . MIL interpretability definition We identify two questions that interpretability methods for MIL should be able to answer : 1 ) Which are the key instances for a bag ? 2 ) What outcome ( class/value ) does each key instance support ? In the rest of this work , we will refer to these two questions as the which and the what questions respectively . As we explore in Section 2 , existing interpretability methods are able to answer which questions with varying degrees of accuracy , but can only answer what questions under certain assumptions . 2 . MIL model-agnostic interpretability methods Existing interpretability methods are often model-specific , i.e. , they can only be applied to certain types of MIL models . To this end , we build upon the state-of-the-art MIL inherent interpretability methods by developing model-agnostic interpretability methods that are up to 30 % more more accurate . The model-agnostic interpretability methods that we propose can be applied to any MIL model , and are able to answer both which and what questions . 3 . MIL interpretability method comparison We compare existing model-specific methods with our model-agnostic methods on several MIL datasets . Our experiments are also carried out on four types of MIL model , giving a comprehensive comparison of interpretability performance . To the best of the authors ’ knowledge , this is one of the first studies to compare different interpretability methods for MIL . The remainder of this work is laid out as follows . Section 2 provides relevant background knowledge and reviews existing MIL interpretability methods . Section 3 outlines the requirements for MIL interpretability and details our approaches that meet these requirements . Next , Section 4 provides our results and experiments . Section 5 discusses our findings , and Section 6 concludes . 2 BACKGROUND AND RELATED WORK . The standard MIL assumption ( SMIL ) is a binary problem with positive and negative bags ( Dietterich et al. , 1997 ; Maron & Lozano-Pérez , 1998 ) . A bag is positive if any of its instances are positive , otherwise it is negative . The assumptions of SMIL can be relaxed to allow more generalised versions of MIL , e.g. , through extensions that include additional positive classes ( Scott et al. , 2005 ; Weidmann et al. , 2003 ) . SMIL also assumes there is no interaction between instances . However , recent work has highlighted that modelling relationships between instances is beneficial for performance ( Tu et al. , 2019 ; Zhou et al. , 2009 ) . Existing methods for interpreting MIL models often rely on the SMIL assumption , so can not generalise to other MIL problems . In addition , existing methods are often model-specific , i.e. , they only work for certain types of MIL models , which constrains the choice of model ( Ribeiro et al. , 2016a ) . Identifying the key instances in MIL bags is a form of local interpretability ( Molnar , 2020 ) , as the key instances are detected for a particular input to the model . Two of the key motivators for interpreting the decision-making process of a MIL system are reliability and trust — identifying the key instances allows an evaluation of the reliability of the system , which increases trust as the decision-making process becomes more transparent . In this work , we use the term interpretability rather than explainability to convey that the analysis remains tied to the models , i.e. , these methods do not provide non-technical explanations in human terms . Under the SMIL assumption , which and what questions are equivalent — there are only two classes ( positive and negative ) , and the only key instances are the instances that are positive , therefore once the key instances are identified , it is also known what outcome they support . However , when there are multiple positive classes , if instances from different classes co-occur in the same bags , answering which and what questions becomes two distinct problems . For example , some key instances will support one positive class , and some key instances will support another . Therefore , solely identifying which are the key instances does not answer the second question of what class they support . Existing methods , such as key instance detection ( Liu et al. , 2012 ) , MIL attention ( Ilse et al. , 2018 ) , and MIL graph neural networks ( GNNs ; Tu et al . ( 2019 ) ) do not condition their output on a particular class , so it is not apparent what class each instance supports , i.e. , they can only answer which questions . One existing method that can answer what questions is mi-Net ( Wang et al. , 2018 ) , as it produces instance-level predictions as part of its processing . However , these instance-level predictions do not take account of interactions between the instances , so are often inaccurate . A related piece of work on MIL interpretability is Tibo et al . ( 2020 ) , which considers interpretability within the scope of multi-multi-instance learning ( MMIL ; Tibo et al . ( 2017 ) ; Fuster et al . ( 2021 ) ) . In MMIL , the instances within a bag are arranged into into further bags , giving a hierarchical bags-of-bags structure . The interpretability techniques presented by Tibo et al . ( 2020 ) are model-specific as they are only designed for MMIL networks . In this work , we aim to overcome the limitations of existing methods by developing model-agnostic methods that can answer both which and what questions . In single instance supervised learning , model-agnostic techniques have been developed to interpret models . Post-hoc local interpretability methods , such as Local Interpretable Model-agnostic Explanations ( LIME ; Ribeiro et al . ( 2016b ) ) and SHapley Additive exPlanations ( SHAP ; Lundberg & Lee ( 2017 ) ) , work by approximating the original predictive model with a locally faithful surrogate model that is inherently interpretable . The surrogate model learns from simplified inputs that represent perturbations of the original input that is being analysed . In this work , one of our proposed methods is a MIL-specific version of this approach . 3 METHODOLOGY . At the start of this section , we outline the requirements for MIL interpretability ( Section 3.1 ) . In Section 3.2 , we propose three methods that meet these requirements under the assumption that there are no interactions between instances ( independent-instance methods ) . In Section 3.3 we remove this assumption and propose our local surrogate model-agnostic interpretability method for MIL . 3.1 MIL INTERPRETABILITY REQUIREMENTS . A general MIL classification problem has C possible classes , with one class being negative and the rest being positive . This is a generalisation of the SMIL assumption , which is a special case when C = 2 . An interpretability method that can only provide the general importance of an instance ( without associating it with a particular class ) can only answer which questions . In order to answer what questions , the method needs to state which classes each instance supports and refutes . Formally , for a bag of instances X = { x1 , . . . , xk } and a bag classification function F , we want to assign a value to each instance that represents whether it supports or refutes a class c : I ( X , F , c ) = { ϕ1 , . . . , ϕk } where I is the interpretability function and ϕi ∈ R is the interpretability value for instance i with respect to class c. Here , we assume that ϕi > 0 means instance i supports class c , ϕi < 0 implies instance i refutes class c , and the greater |ϕi| , the greater the importance of instance i . For some existing methods , such as attention , ϕi is the same for all classes , and ϕi ≥ 0 in all cases , so these requirements are not met . We later demonstrate these limitations in Section 5 . In the next two sections we propose several model-agnostic methods that satisfy these requirements . 3.2 DETERMINING INSTANCE ATTRIBUTIONS . In this section , we propose three model-agnostic methods for interpreting MIL models under the assumption that the instances are independent . This means we can observe the effects of each instance in isolation without worrying about interactions between the instances . We exploit a property of MIL models : the ability to deal with different sized bags . As MIL models are able to process bags of different sizes , it is possible to remove instances from the bags and observe any changes in prediction , allowing us to understand what instances are responsible for the model ’ s prediction . Below , we propose three methods that use this property to interpret a model ’ s decision making . Single Given a bag of instances X = { x1 , . . . , xk } and a bag classification function F , we can take each instance in turn and form a single instance bag : Xi = { xi } for i ∈ { 1 , . . . , k } . We then observe the model ’ s prediction on each single instance bag ϕi = Fc ( Xi ) , where Fc is the output of F for class c ( i.e. , the cth entry in the output vector of F ( Xi ) ) . A large value for ϕi suggests instance xi supports c , and a value close to zero suggest it has no effect with respect to class c. If we repeat this over all instances and all classes , we can build a picture of the classes that each instance supports , allowing us to answer what questions . However , this method can not refute classes ( i.e. , ϕi ≥ 0 in all cases ) . It should be noted that this method gives the same outputs as the inherent interpretability of mi-Net ( Wang et al. , 2018 ) , but here it is a model-agnostic rather than a model-specific method . One Removed A natural counterpart to the Single method is the One Removed method , where each instance is removed from the complete bag in turn , i.e. , we form bags Xi = X \ { xi } . For a particular class c , we can then observe the change in the model ’ s prediction caused by removing xi from the bag : ϕi = Fc ( X ) −Fc ( Xi ) . If the prediction decreases , xi supports c , and if it increases , xi refutes c , i.e. , this method is able to both support and refute different classes . However , if there are other instances in the bag that support or refute class c , we may not observe a change in prediction when xi is removed , even if xi is a key instance . Combined In order to access the benefits of both the Single and One Removed methods , we can combine their outputs . A simple approach is to take the mean , i.e. , ϕi = 12 [ Fc ( { xi } ) + Fc ( X ) − Fc ( X \ { xi } ) ] . This method can identify the important instances revealed by the Single method , and also refute outcomes as revealed by the One Removed method . With these three methods , it is assumed that there are no interactions between the instances . This is not true for all datasets , therefore , in the next section , we remove this assumption and propose a further method that is able to deal with the interactions between instances . | This paper introduces approaches to interpret Multiple Instance Learning (MIL) models. These approaches are designed to quantify the contribution of each instance given a specific class. Authors provide empirical studies about these methods. The single instance evaluation and leave one out method show good performance when instances are independent with each other. The Shapely value based methods are much better when instances have interactions. All these methods exhibit higher interpretability than the inherent interpretations provided by the selected MIL training methods. | SP:40c2b25a236d3e56f5db5acc9f72dcc5c8a8103d |
Model Agnostic Interpretability for Multiple Instance Learning | 1 INTRODUCTION . In Multiple Instance Learning ( MIL ) , data is organised into bags of instances , and each bag is given a single label . This reduces the burden of labelling , as each instance does not have to be assigned a label , making it useful in applications where labelling is expensive , such as healthcare ( Carbonneau et al. , 2018 ) . However , there are often only a few key instances within a bag that determine the bag label , so it is necessary to identify these key instances in order to interpret a model ’ s decision-making ( Liu et al. , 2012 ) . Directly interpreting the decision-making process of machine learning methods is difficult due to the complexity of the models and the scale of the data on which they trained , so there is a need for methods that allow insights into the decision-making processes ( Gilpin et al. , 2018 ) . In MIL problems , only some of the instances in each bag will be discriminatory , i.e. , a significant number of the instances in a bag will be non-discriminatory or even related to other bag classes ( Amores , 2013 ) . Identifying the important instances and presenting those as the interpretation of model decision-making filters out the non-discriminatory information and provides the explainee with a reduced and relevant interpretation , which will avoid overloading the user ( Li et al. , 2015 ) . Our work provides the following novel contributions : 1 . MIL interpretability definition We identify two questions that interpretability methods for MIL should be able to answer : 1 ) Which are the key instances for a bag ? 2 ) What outcome ( class/value ) does each key instance support ? In the rest of this work , we will refer to these two questions as the which and the what questions respectively . As we explore in Section 2 , existing interpretability methods are able to answer which questions with varying degrees of accuracy , but can only answer what questions under certain assumptions . 2 . MIL model-agnostic interpretability methods Existing interpretability methods are often model-specific , i.e. , they can only be applied to certain types of MIL models . To this end , we build upon the state-of-the-art MIL inherent interpretability methods by developing model-agnostic interpretability methods that are up to 30 % more more accurate . The model-agnostic interpretability methods that we propose can be applied to any MIL model , and are able to answer both which and what questions . 3 . MIL interpretability method comparison We compare existing model-specific methods with our model-agnostic methods on several MIL datasets . Our experiments are also carried out on four types of MIL model , giving a comprehensive comparison of interpretability performance . To the best of the authors ’ knowledge , this is one of the first studies to compare different interpretability methods for MIL . The remainder of this work is laid out as follows . Section 2 provides relevant background knowledge and reviews existing MIL interpretability methods . Section 3 outlines the requirements for MIL interpretability and details our approaches that meet these requirements . Next , Section 4 provides our results and experiments . Section 5 discusses our findings , and Section 6 concludes . 2 BACKGROUND AND RELATED WORK . The standard MIL assumption ( SMIL ) is a binary problem with positive and negative bags ( Dietterich et al. , 1997 ; Maron & Lozano-Pérez , 1998 ) . A bag is positive if any of its instances are positive , otherwise it is negative . The assumptions of SMIL can be relaxed to allow more generalised versions of MIL , e.g. , through extensions that include additional positive classes ( Scott et al. , 2005 ; Weidmann et al. , 2003 ) . SMIL also assumes there is no interaction between instances . However , recent work has highlighted that modelling relationships between instances is beneficial for performance ( Tu et al. , 2019 ; Zhou et al. , 2009 ) . Existing methods for interpreting MIL models often rely on the SMIL assumption , so can not generalise to other MIL problems . In addition , existing methods are often model-specific , i.e. , they only work for certain types of MIL models , which constrains the choice of model ( Ribeiro et al. , 2016a ) . Identifying the key instances in MIL bags is a form of local interpretability ( Molnar , 2020 ) , as the key instances are detected for a particular input to the model . Two of the key motivators for interpreting the decision-making process of a MIL system are reliability and trust — identifying the key instances allows an evaluation of the reliability of the system , which increases trust as the decision-making process becomes more transparent . In this work , we use the term interpretability rather than explainability to convey that the analysis remains tied to the models , i.e. , these methods do not provide non-technical explanations in human terms . Under the SMIL assumption , which and what questions are equivalent — there are only two classes ( positive and negative ) , and the only key instances are the instances that are positive , therefore once the key instances are identified , it is also known what outcome they support . However , when there are multiple positive classes , if instances from different classes co-occur in the same bags , answering which and what questions becomes two distinct problems . For example , some key instances will support one positive class , and some key instances will support another . Therefore , solely identifying which are the key instances does not answer the second question of what class they support . Existing methods , such as key instance detection ( Liu et al. , 2012 ) , MIL attention ( Ilse et al. , 2018 ) , and MIL graph neural networks ( GNNs ; Tu et al . ( 2019 ) ) do not condition their output on a particular class , so it is not apparent what class each instance supports , i.e. , they can only answer which questions . One existing method that can answer what questions is mi-Net ( Wang et al. , 2018 ) , as it produces instance-level predictions as part of its processing . However , these instance-level predictions do not take account of interactions between the instances , so are often inaccurate . A related piece of work on MIL interpretability is Tibo et al . ( 2020 ) , which considers interpretability within the scope of multi-multi-instance learning ( MMIL ; Tibo et al . ( 2017 ) ; Fuster et al . ( 2021 ) ) . In MMIL , the instances within a bag are arranged into into further bags , giving a hierarchical bags-of-bags structure . The interpretability techniques presented by Tibo et al . ( 2020 ) are model-specific as they are only designed for MMIL networks . In this work , we aim to overcome the limitations of existing methods by developing model-agnostic methods that can answer both which and what questions . In single instance supervised learning , model-agnostic techniques have been developed to interpret models . Post-hoc local interpretability methods , such as Local Interpretable Model-agnostic Explanations ( LIME ; Ribeiro et al . ( 2016b ) ) and SHapley Additive exPlanations ( SHAP ; Lundberg & Lee ( 2017 ) ) , work by approximating the original predictive model with a locally faithful surrogate model that is inherently interpretable . The surrogate model learns from simplified inputs that represent perturbations of the original input that is being analysed . In this work , one of our proposed methods is a MIL-specific version of this approach . 3 METHODOLOGY . At the start of this section , we outline the requirements for MIL interpretability ( Section 3.1 ) . In Section 3.2 , we propose three methods that meet these requirements under the assumption that there are no interactions between instances ( independent-instance methods ) . In Section 3.3 we remove this assumption and propose our local surrogate model-agnostic interpretability method for MIL . 3.1 MIL INTERPRETABILITY REQUIREMENTS . A general MIL classification problem has C possible classes , with one class being negative and the rest being positive . This is a generalisation of the SMIL assumption , which is a special case when C = 2 . An interpretability method that can only provide the general importance of an instance ( without associating it with a particular class ) can only answer which questions . In order to answer what questions , the method needs to state which classes each instance supports and refutes . Formally , for a bag of instances X = { x1 , . . . , xk } and a bag classification function F , we want to assign a value to each instance that represents whether it supports or refutes a class c : I ( X , F , c ) = { ϕ1 , . . . , ϕk } where I is the interpretability function and ϕi ∈ R is the interpretability value for instance i with respect to class c. Here , we assume that ϕi > 0 means instance i supports class c , ϕi < 0 implies instance i refutes class c , and the greater |ϕi| , the greater the importance of instance i . For some existing methods , such as attention , ϕi is the same for all classes , and ϕi ≥ 0 in all cases , so these requirements are not met . We later demonstrate these limitations in Section 5 . In the next two sections we propose several model-agnostic methods that satisfy these requirements . 3.2 DETERMINING INSTANCE ATTRIBUTIONS . In this section , we propose three model-agnostic methods for interpreting MIL models under the assumption that the instances are independent . This means we can observe the effects of each instance in isolation without worrying about interactions between the instances . We exploit a property of MIL models : the ability to deal with different sized bags . As MIL models are able to process bags of different sizes , it is possible to remove instances from the bags and observe any changes in prediction , allowing us to understand what instances are responsible for the model ’ s prediction . Below , we propose three methods that use this property to interpret a model ’ s decision making . Single Given a bag of instances X = { x1 , . . . , xk } and a bag classification function F , we can take each instance in turn and form a single instance bag : Xi = { xi } for i ∈ { 1 , . . . , k } . We then observe the model ’ s prediction on each single instance bag ϕi = Fc ( Xi ) , where Fc is the output of F for class c ( i.e. , the cth entry in the output vector of F ( Xi ) ) . A large value for ϕi suggests instance xi supports c , and a value close to zero suggest it has no effect with respect to class c. If we repeat this over all instances and all classes , we can build a picture of the classes that each instance supports , allowing us to answer what questions . However , this method can not refute classes ( i.e. , ϕi ≥ 0 in all cases ) . It should be noted that this method gives the same outputs as the inherent interpretability of mi-Net ( Wang et al. , 2018 ) , but here it is a model-agnostic rather than a model-specific method . One Removed A natural counterpart to the Single method is the One Removed method , where each instance is removed from the complete bag in turn , i.e. , we form bags Xi = X \ { xi } . For a particular class c , we can then observe the change in the model ’ s prediction caused by removing xi from the bag : ϕi = Fc ( X ) −Fc ( Xi ) . If the prediction decreases , xi supports c , and if it increases , xi refutes c , i.e. , this method is able to both support and refute different classes . However , if there are other instances in the bag that support or refute class c , we may not observe a change in prediction when xi is removed , even if xi is a key instance . Combined In order to access the benefits of both the Single and One Removed methods , we can combine their outputs . A simple approach is to take the mean , i.e. , ϕi = 12 [ Fc ( { xi } ) + Fc ( X ) − Fc ( X \ { xi } ) ] . This method can identify the important instances revealed by the Single method , and also refute outcomes as revealed by the One Removed method . With these three methods , it is assumed that there are no interactions between the instances . This is not true for all datasets , therefore , in the next section , we remove this assumption and propose a further method that is able to deal with the interactions between instances . | The manuscript aims at the design of a model-agnostic method of the the interpretability of models and methods addressing multiple instance learning (MIL) problem. Towards this goal, six explanation methods are proposed, three of which are based on kernel-SHAP. The proposed method is validated on the SIVAL, ColoRectal Cancer and a variant of the MNIST-Bags dataset. | SP:40c2b25a236d3e56f5db5acc9f72dcc5c8a8103d |
Model Agnostic Interpretability for Multiple Instance Learning | 1 INTRODUCTION . In Multiple Instance Learning ( MIL ) , data is organised into bags of instances , and each bag is given a single label . This reduces the burden of labelling , as each instance does not have to be assigned a label , making it useful in applications where labelling is expensive , such as healthcare ( Carbonneau et al. , 2018 ) . However , there are often only a few key instances within a bag that determine the bag label , so it is necessary to identify these key instances in order to interpret a model ’ s decision-making ( Liu et al. , 2012 ) . Directly interpreting the decision-making process of machine learning methods is difficult due to the complexity of the models and the scale of the data on which they trained , so there is a need for methods that allow insights into the decision-making processes ( Gilpin et al. , 2018 ) . In MIL problems , only some of the instances in each bag will be discriminatory , i.e. , a significant number of the instances in a bag will be non-discriminatory or even related to other bag classes ( Amores , 2013 ) . Identifying the important instances and presenting those as the interpretation of model decision-making filters out the non-discriminatory information and provides the explainee with a reduced and relevant interpretation , which will avoid overloading the user ( Li et al. , 2015 ) . Our work provides the following novel contributions : 1 . MIL interpretability definition We identify two questions that interpretability methods for MIL should be able to answer : 1 ) Which are the key instances for a bag ? 2 ) What outcome ( class/value ) does each key instance support ? In the rest of this work , we will refer to these two questions as the which and the what questions respectively . As we explore in Section 2 , existing interpretability methods are able to answer which questions with varying degrees of accuracy , but can only answer what questions under certain assumptions . 2 . MIL model-agnostic interpretability methods Existing interpretability methods are often model-specific , i.e. , they can only be applied to certain types of MIL models . To this end , we build upon the state-of-the-art MIL inherent interpretability methods by developing model-agnostic interpretability methods that are up to 30 % more more accurate . The model-agnostic interpretability methods that we propose can be applied to any MIL model , and are able to answer both which and what questions . 3 . MIL interpretability method comparison We compare existing model-specific methods with our model-agnostic methods on several MIL datasets . Our experiments are also carried out on four types of MIL model , giving a comprehensive comparison of interpretability performance . To the best of the authors ’ knowledge , this is one of the first studies to compare different interpretability methods for MIL . The remainder of this work is laid out as follows . Section 2 provides relevant background knowledge and reviews existing MIL interpretability methods . Section 3 outlines the requirements for MIL interpretability and details our approaches that meet these requirements . Next , Section 4 provides our results and experiments . Section 5 discusses our findings , and Section 6 concludes . 2 BACKGROUND AND RELATED WORK . The standard MIL assumption ( SMIL ) is a binary problem with positive and negative bags ( Dietterich et al. , 1997 ; Maron & Lozano-Pérez , 1998 ) . A bag is positive if any of its instances are positive , otherwise it is negative . The assumptions of SMIL can be relaxed to allow more generalised versions of MIL , e.g. , through extensions that include additional positive classes ( Scott et al. , 2005 ; Weidmann et al. , 2003 ) . SMIL also assumes there is no interaction between instances . However , recent work has highlighted that modelling relationships between instances is beneficial for performance ( Tu et al. , 2019 ; Zhou et al. , 2009 ) . Existing methods for interpreting MIL models often rely on the SMIL assumption , so can not generalise to other MIL problems . In addition , existing methods are often model-specific , i.e. , they only work for certain types of MIL models , which constrains the choice of model ( Ribeiro et al. , 2016a ) . Identifying the key instances in MIL bags is a form of local interpretability ( Molnar , 2020 ) , as the key instances are detected for a particular input to the model . Two of the key motivators for interpreting the decision-making process of a MIL system are reliability and trust — identifying the key instances allows an evaluation of the reliability of the system , which increases trust as the decision-making process becomes more transparent . In this work , we use the term interpretability rather than explainability to convey that the analysis remains tied to the models , i.e. , these methods do not provide non-technical explanations in human terms . Under the SMIL assumption , which and what questions are equivalent — there are only two classes ( positive and negative ) , and the only key instances are the instances that are positive , therefore once the key instances are identified , it is also known what outcome they support . However , when there are multiple positive classes , if instances from different classes co-occur in the same bags , answering which and what questions becomes two distinct problems . For example , some key instances will support one positive class , and some key instances will support another . Therefore , solely identifying which are the key instances does not answer the second question of what class they support . Existing methods , such as key instance detection ( Liu et al. , 2012 ) , MIL attention ( Ilse et al. , 2018 ) , and MIL graph neural networks ( GNNs ; Tu et al . ( 2019 ) ) do not condition their output on a particular class , so it is not apparent what class each instance supports , i.e. , they can only answer which questions . One existing method that can answer what questions is mi-Net ( Wang et al. , 2018 ) , as it produces instance-level predictions as part of its processing . However , these instance-level predictions do not take account of interactions between the instances , so are often inaccurate . A related piece of work on MIL interpretability is Tibo et al . ( 2020 ) , which considers interpretability within the scope of multi-multi-instance learning ( MMIL ; Tibo et al . ( 2017 ) ; Fuster et al . ( 2021 ) ) . In MMIL , the instances within a bag are arranged into into further bags , giving a hierarchical bags-of-bags structure . The interpretability techniques presented by Tibo et al . ( 2020 ) are model-specific as they are only designed for MMIL networks . In this work , we aim to overcome the limitations of existing methods by developing model-agnostic methods that can answer both which and what questions . In single instance supervised learning , model-agnostic techniques have been developed to interpret models . Post-hoc local interpretability methods , such as Local Interpretable Model-agnostic Explanations ( LIME ; Ribeiro et al . ( 2016b ) ) and SHapley Additive exPlanations ( SHAP ; Lundberg & Lee ( 2017 ) ) , work by approximating the original predictive model with a locally faithful surrogate model that is inherently interpretable . The surrogate model learns from simplified inputs that represent perturbations of the original input that is being analysed . In this work , one of our proposed methods is a MIL-specific version of this approach . 3 METHODOLOGY . At the start of this section , we outline the requirements for MIL interpretability ( Section 3.1 ) . In Section 3.2 , we propose three methods that meet these requirements under the assumption that there are no interactions between instances ( independent-instance methods ) . In Section 3.3 we remove this assumption and propose our local surrogate model-agnostic interpretability method for MIL . 3.1 MIL INTERPRETABILITY REQUIREMENTS . A general MIL classification problem has C possible classes , with one class being negative and the rest being positive . This is a generalisation of the SMIL assumption , which is a special case when C = 2 . An interpretability method that can only provide the general importance of an instance ( without associating it with a particular class ) can only answer which questions . In order to answer what questions , the method needs to state which classes each instance supports and refutes . Formally , for a bag of instances X = { x1 , . . . , xk } and a bag classification function F , we want to assign a value to each instance that represents whether it supports or refutes a class c : I ( X , F , c ) = { ϕ1 , . . . , ϕk } where I is the interpretability function and ϕi ∈ R is the interpretability value for instance i with respect to class c. Here , we assume that ϕi > 0 means instance i supports class c , ϕi < 0 implies instance i refutes class c , and the greater |ϕi| , the greater the importance of instance i . For some existing methods , such as attention , ϕi is the same for all classes , and ϕi ≥ 0 in all cases , so these requirements are not met . We later demonstrate these limitations in Section 5 . In the next two sections we propose several model-agnostic methods that satisfy these requirements . 3.2 DETERMINING INSTANCE ATTRIBUTIONS . In this section , we propose three model-agnostic methods for interpreting MIL models under the assumption that the instances are independent . This means we can observe the effects of each instance in isolation without worrying about interactions between the instances . We exploit a property of MIL models : the ability to deal with different sized bags . As MIL models are able to process bags of different sizes , it is possible to remove instances from the bags and observe any changes in prediction , allowing us to understand what instances are responsible for the model ’ s prediction . Below , we propose three methods that use this property to interpret a model ’ s decision making . Single Given a bag of instances X = { x1 , . . . , xk } and a bag classification function F , we can take each instance in turn and form a single instance bag : Xi = { xi } for i ∈ { 1 , . . . , k } . We then observe the model ’ s prediction on each single instance bag ϕi = Fc ( Xi ) , where Fc is the output of F for class c ( i.e. , the cth entry in the output vector of F ( Xi ) ) . A large value for ϕi suggests instance xi supports c , and a value close to zero suggest it has no effect with respect to class c. If we repeat this over all instances and all classes , we can build a picture of the classes that each instance supports , allowing us to answer what questions . However , this method can not refute classes ( i.e. , ϕi ≥ 0 in all cases ) . It should be noted that this method gives the same outputs as the inherent interpretability of mi-Net ( Wang et al. , 2018 ) , but here it is a model-agnostic rather than a model-specific method . One Removed A natural counterpart to the Single method is the One Removed method , where each instance is removed from the complete bag in turn , i.e. , we form bags Xi = X \ { xi } . For a particular class c , we can then observe the change in the model ’ s prediction caused by removing xi from the bag : ϕi = Fc ( X ) −Fc ( Xi ) . If the prediction decreases , xi supports c , and if it increases , xi refutes c , i.e. , this method is able to both support and refute different classes . However , if there are other instances in the bag that support or refute class c , we may not observe a change in prediction when xi is removed , even if xi is a key instance . Combined In order to access the benefits of both the Single and One Removed methods , we can combine their outputs . A simple approach is to take the mean , i.e. , ϕi = 12 [ Fc ( { xi } ) + Fc ( X ) − Fc ( X \ { xi } ) ] . This method can identify the important instances revealed by the Single method , and also refute outcomes as revealed by the One Removed method . With these three methods , it is assumed that there are no interactions between the instances . This is not true for all datasets , therefore , in the next section , we remove this assumption and propose a further method that is able to deal with the interactions between instances . | The paper presents six methods for explaining the output of MIL models. The idea is pretty simple but, indeed, effective. The most advanced method is based on SHAP, and it is used to assign to each instance in the bag a value that weights its importance. Experiments confirm that the method is able to improve over competitive baselines. | SP:40c2b25a236d3e56f5db5acc9f72dcc5c8a8103d |
Zeroth-Order Actor-Critic | 1 INTRODUCTION . Reinforcement learning ( RL ) has achieved great success in a wide range of challenging domains , including video games ( Mnih et al. , 2015 ) , robotic control ( Schulman et al. , 2017 ) , autonomous driving ( Kendall et al. , 2019 ) , etc . The majority of RL methods formulate the environment as Markov decision process ( MDP ) and leverage the temporal structure to design learning algorithms such as Q-learning and policy gradient ( Sutton & Barto , 2018 ) . Actor-critic methods are among the most popular RL algorithms , which usually introduce two function approximators , one for value function estimation ( critic ) and another for optimal policy approximation ( actor ) , and optimize these two approximators by alternating between policy evaluation ( PEV ) and policy improvement ( PIM ) . Onpolicy actor-critic methods , e.g. , A3C ( Mnih et al. , 2016 ) and PPO ( Schulman et al. , 2017 ) , often use critics to construct advantage functions and substitute them for the Monte Carlo return used in vanilla policy gradient ( Williams , 1992 ) , which significantly reduces the variance of gradient estimation and improve learning speed and stability . Among existing actor-critic algorithms , a common choice is to use deep neural networks as the function approximators and conduct both PEV and PIM using first-order optimization techniques . An alternative approach for RL , though less popular , is to ignore the underlying MDP structures and regard RL problems as black-box optimization , and to directly search for the optimal policy in a zeroth-order way , i.e. , without using the first-order gradient information . Recent researches have shown that zeroth-order optimization ( ZOO ) methods , e.g. , ES ( Salimans et al. , 2017 ) , ARS ( Mania et al. , 2018 ) and GA ( Such et al. , 2017 ) , are competitive on common RL benchmarks , even when applied to deep neural network with millions of parameters . ZOO has several advantages compared to first-order MDP-based RL methods ( Sehnke et al. , 2010 ; Salimans et al. , 2017 ; Such et al. , 2017 ; Lehman et al. , 2018 ; Khadka & Tumer , 2018 ; Qian & Yu , 2021 ) : ( 1 ) ZOO is not restricted to differentiable policies ; ( 2 ) ZOO perturbs the policy in parameter space rather than in action space , which leads to state-dependent and temporally-extended exploration ; ( 3 ) Zeroth-order populationbased optimization possesses robustness-seeking property and diverse policy behaviors . Despite these attractive advantages , the main limitation of ZOO is its high sample complexity and high variance of the parameter update process , especially in high-dimensional problems . Recent researches have proposed various techniques to improve ZOO , e.g. , using orthogonal or antithetic sampling methods ( Sehnke et al. , 2010 ; Salimans et al. , 2017 ; Choromanski et al. , 2018 ; Mania et al. , 2018 ) , identifying a low-dimensional search subspace ( Maheswaranathan et al. , 2019 ; Choromanski et al. , 2019 ; Sener & Koltun , 2020 ) , or subtracting a baseline for variance reduction ( Sehnke et al. , 2010 ; Grathwohl et al. , 2018 ) . One of the major reasons for the sample inefficiency of ZOO is its ignorance of the MDP temporal structures . Many recent researches have tried to combine ZOO and first-order MDP-based RL into hybrid methods , e.g. , run evolutionary algorithms in parallel with off-policy RL algorithms and optimize the population of policies with information from both sides ( Khadka & Tumer , 2018 ; Pourchot & Sigaud , 2018 ; Bodnar et al. , 2020 ) , or inject parameter noise into existing RL algorithms for efficient exploration ( Plappert et al. , 2018 ; Fortunato et al. , 2018 ) . However , existing hybrid methods still conduct first-order gradient-based policy improvement ( at least as a part ) , which reimposes differentiable requirement on the policy . In this paper , we propose the Zeroth-Order Actor-Critic algorithm ( ZOAC ) , which unifies first-order and zeroth-order RL methods into an actor-critic architecture by conducting first-order PEV to update the critic and zeroth-order PIM to update the actor . In such a way , complementary advantages of both methods are preserved , e.g. , wide adaptability to policy parameterization , robustness seeking property , state-dependent and temporally-extended exploration . We modify the rollouts collection strategy from episode-wise perturbation as in traditional zeroth-order methods to timestep-wise perturbation , which results in higher sample efficiency and better exploration . We derive the zerothorder policy gradient under this setting and point out that a critic network can be introduced to estimate the state-value function and trade-off between bias and variance . We then propose a practical algorithm that utilizes several parallelized rollout workers and alternates between first-order PEV and zeroth-order PIM based on generated experiences in each iteration . We evaluate ZOAC on a range of challenging continuous control benchmarks from OpenAI gym ( Brockman et al. , 2016 ) , using two different types of policies , linear policies and neural networks . Experiment results show that ZOAC outperforms zeroth-order and first-order baseline algorithms in sample efficiency , final performance , and the robustness of the learned policies . We visualize the polices learned in an environment with sparse and delayed reward , which indicates sufficient exploration driven by parameter noise in ZOAC . Furthermore , we conduct ablation studies to demonstrate the indispensable contribution of the modified rollouts collection strategy and the introduced critic network to ZOAC . 2 PRELIMINARIES . 2.1 FROM POLICY GRADIENT TO ACTOR-CRITIC . In standard MDP-based RL settings , the environment is usually formulated as an MDP defined as ( S , A , P , r ) , where S is the state space , A is the action space , P : S ×A×S → R is the transition probability matrix , r : S × A → R is the reward function . The return is defined as the total discounted future reward Gt = ∑∞ i=0 γ ir ( st+i , at+i ) , where γ ∈ ( 0 , 1 ) is the discounting factor . The behavior of the agent is controlled by a policy π ( a|s ) : S × A → [ 0 , 1 ] , which maps states to a probability distribution over actions . The state-value function is defined as the expected return under policy π starting from a certain state : V π ( s ) = Ea∼π { Gt|st = s } . The goal of MDP-based RL is to find an optimal policy that maximizes the expectation of state-value function under a certain state distribution . Denoting a policy parameterized with θ as πθ , the objective function can be written as : JPG ( θ ) = Es∼d [ V πθ ( s ) ] , d = d0 or dπθ ( 1 ) where d0 is the initial state distribution and dπθ is the stationary state distribution of Markov chain under policy πθ . Generally , the former is used for episodic tasks with finite horizon and the latter is used for continuing tasks with infinite horizon . For any differentiable policy πθ , and for continuing or episodic tasks , the same form of policy gradient can be derived from the policy gradient theorem ( Sutton & Barto , 2018 ) . This vanilla policy gradient given by Williams ( 1992 ) is as follows : ∇θJPG ( θ ) = Est∼dπθ , at∼πθ [ Gt∇θ log πθ ( at|st ) ] ( 2 ) Vanilla policy gradient suffers from high variance since it directly uses Monte Carlo return from sampled trajectories . Actor-critic methods improved upon it , which usually introduce a critic network to estimate the value function and serve as a baseline to substitute the expected return Gt with a proper form of advantage function At , for example , TD residual ( Mnih et al. , 2016 ) , or generalized advantage estimation ( GAE ) ( Schulman et al. , 2015 ) . However , the above policy gradient based methods can only be applied to differentiable policies , and may be unavailable when a nondifferentiable controller needs to be optimized . 2.2 EVOLUTION STRATEGIES . Existing ZOO methods focus on episodic RL problems with finite horizon and treat them as blackbox optimization . In these cases , the length of trajectories is limited and the discounting factor γ is usually set as 1 . Evolution strategies ( ES ) is one of the most popular algorithms of ZOO , which optimizes a Gaussian smoothed objective function : JES ( θ ) = E ∼N ( 0 , I ) Es∼d0 [ V πθ+σ ( s ) ] ( 3 ) where d0 is the initial state distribution and σ is the standard deviation of the Gaussian noise added to the policy . The zeroth-order gradient can be derived using the log-likelihood ratio trick and the probability density function of Gaussian distribution ( Nesterov & Spokoiny , 2017 ) : ∇θJES ( θ ) = 1 σ E ∼N ( 0 , I ) Es∼d0 [ V πθ+σ ( s ) ] ( 4 ) In practice , the expectation over Gaussian distribution can be approximated by sampling n noise samples { i } i=1 , ... , n , and the corresponding state value V πθ+σ i can be approximated by the episodic return Gi = ∑T t=0 γ tr ( st , at ) of the sample trajectory of length T collected with policy πθ+σ i : ∇θJES ( θ ) ≈ 1 nσ n∑ i=1 Gi i ( 5 ) The zeroth-order gradient estimator in Equation ( 5 ) only relies on the episodic return of each evaluated random directions , so it is applicable to non-differentiable policies . Besides , each perturbed policy remains deterministic in one trajectory , which leads to state-dependent and temporally-extended exploration . Furthermore , the Gaussian smoothed objective also improves robustness of the learned policies in parameter space . 3 ZEROTH-ORDER ACTOR-CRITIC . 3.1 FROM ES TO ZOAC . In this section , we will derive an improved zeroth-order gradient combining the actor-critic architecture for policy improvement . We start from improving the sample efficiency and stability of ES . Most of the existing ES methods applied to RL optimize a deterministic policy ( Salimans et al. , 2017 ; Mania et al. , 2018 ) , where the exploration is driven by noise in parameter space . Without loss of generality , we follow them in the following derivations and algorithm design . A deterministic policy parameterized with θ is denoted as πθ : S → A , which directly maps states to actions . In ES , the policy is perturbed in parameter space at the beginning of an episode and remains unchanged throughout the trajectories . If a large number of random directions n is evaluated , the sample complexity will increase significantly . However , since the zeroth-order gradient is estimated as the weighted sum of several random directions , it exhibit excessively high variance when n is small ( Berahas et al. , 2021 ) , which may greatly harm the performance . Therefore , it is essential to trade-off this contradictory between sample efficiency and variance . To encourage sufficient exploration and low variance while maintaining high sample efficiency , here we consider perturbating the policy at every timestep , i.e. , the Gaussian noise is sampled identically and independently at every timesteps . We regard it as a stochastic exploration policy β = πθ+σ , where ∼ N ( 0 , I ) is Gaussian noise in parameter space and σ is the standard deviation . Our objective is to maximize the expectation of the state-value under stationary distribution dβ of the exploration policy β . We can leverage Bellman equation to estimate the state-value via bootstrapping , in which the one-step reward can be replaced with sampled experiences : JZOAC ( θ ) = Est∼dβ [ V β ( st ) ] = E ∼N ( 0 , I ) Est∼dβEst+1∼P [ r ( st , πθ+σ ( st ) ) + γV β ( st+1 ) ] ( 6 ) Since all the contents in the outer expectation E ∼N ( 0 , I ) [ · ] can be regarded as a function of , the zeroth-order gradient of this objective function can be derived in exactly the same way as in ES . Moreover , V β ( st ) can be subtracted as a baseline for variance reduction because of its uncorrelation to in the outer expectation and the zero mean property of the Gaussian noise : ∇θJZOAC ( θ ) = 1 σ E ∼N ( 0 , I ) Est∼dβEst+1∼P { [ r ( st , πθ+σ ( st ) ) + γV β ( st+1 ) − V β ( st ) ] } ( 7 ) Compared to ES which uses unbiased but high variance Monte Carlo return to evaluate each perturbed policy , the performance of each random direction here is estimated by one-step TD residual with low variance . In practice , a common approach is to introduce a critic network Vw ( s ) to estimate the state-value function V β , which may lead to high bias in this form of advantage estimation . To trade-off between bias and variance , we consider extending our derivation further to the case where each perturbed policies ( i.e. , each sampled random noise ) run forward N timesteps instead of one timestep only . Equation ( 7 ) can be extended to : ∇θJZOAC ( θ ) = 1 σ E ∼N ( 0 , I ) Est∼dβEP { [ N−1∑ i=0 γir ( st+i , πθ+σ ( st+i ) ) + γ NV β ( st+N ) − V β ( st ) ] } ( 8 ) where EP refers to expectation over N -step transition dynamics . Similar to one-step case , the cumulative reward within N step can be estimated from sampled experiences when st is the first state of the trajectory fragment collected with a certain perturbed policy πθ+σ . By introducing a critic network and choosing an appropriate length N , this N -step residual advantage function contributes to achieving a good trade-off between the bias and variance . | This paper developed a very interesting zeroth-order actor-critic algorithm that nicely integrates gradient-based critic training with gradient-free actor training. The newly developed algorithm was also evaluated empirically on several benchmark datasets with promising outcomes. The literature review in the paper is very clear and comprehensive. The review adequately justified the technical innovation of the new algorithm. | SP:8e48de75d161db88818c964f338ba94f9b83a143 |
Zeroth-Order Actor-Critic | 1 INTRODUCTION . Reinforcement learning ( RL ) has achieved great success in a wide range of challenging domains , including video games ( Mnih et al. , 2015 ) , robotic control ( Schulman et al. , 2017 ) , autonomous driving ( Kendall et al. , 2019 ) , etc . The majority of RL methods formulate the environment as Markov decision process ( MDP ) and leverage the temporal structure to design learning algorithms such as Q-learning and policy gradient ( Sutton & Barto , 2018 ) . Actor-critic methods are among the most popular RL algorithms , which usually introduce two function approximators , one for value function estimation ( critic ) and another for optimal policy approximation ( actor ) , and optimize these two approximators by alternating between policy evaluation ( PEV ) and policy improvement ( PIM ) . Onpolicy actor-critic methods , e.g. , A3C ( Mnih et al. , 2016 ) and PPO ( Schulman et al. , 2017 ) , often use critics to construct advantage functions and substitute them for the Monte Carlo return used in vanilla policy gradient ( Williams , 1992 ) , which significantly reduces the variance of gradient estimation and improve learning speed and stability . Among existing actor-critic algorithms , a common choice is to use deep neural networks as the function approximators and conduct both PEV and PIM using first-order optimization techniques . An alternative approach for RL , though less popular , is to ignore the underlying MDP structures and regard RL problems as black-box optimization , and to directly search for the optimal policy in a zeroth-order way , i.e. , without using the first-order gradient information . Recent researches have shown that zeroth-order optimization ( ZOO ) methods , e.g. , ES ( Salimans et al. , 2017 ) , ARS ( Mania et al. , 2018 ) and GA ( Such et al. , 2017 ) , are competitive on common RL benchmarks , even when applied to deep neural network with millions of parameters . ZOO has several advantages compared to first-order MDP-based RL methods ( Sehnke et al. , 2010 ; Salimans et al. , 2017 ; Such et al. , 2017 ; Lehman et al. , 2018 ; Khadka & Tumer , 2018 ; Qian & Yu , 2021 ) : ( 1 ) ZOO is not restricted to differentiable policies ; ( 2 ) ZOO perturbs the policy in parameter space rather than in action space , which leads to state-dependent and temporally-extended exploration ; ( 3 ) Zeroth-order populationbased optimization possesses robustness-seeking property and diverse policy behaviors . Despite these attractive advantages , the main limitation of ZOO is its high sample complexity and high variance of the parameter update process , especially in high-dimensional problems . Recent researches have proposed various techniques to improve ZOO , e.g. , using orthogonal or antithetic sampling methods ( Sehnke et al. , 2010 ; Salimans et al. , 2017 ; Choromanski et al. , 2018 ; Mania et al. , 2018 ) , identifying a low-dimensional search subspace ( Maheswaranathan et al. , 2019 ; Choromanski et al. , 2019 ; Sener & Koltun , 2020 ) , or subtracting a baseline for variance reduction ( Sehnke et al. , 2010 ; Grathwohl et al. , 2018 ) . One of the major reasons for the sample inefficiency of ZOO is its ignorance of the MDP temporal structures . Many recent researches have tried to combine ZOO and first-order MDP-based RL into hybrid methods , e.g. , run evolutionary algorithms in parallel with off-policy RL algorithms and optimize the population of policies with information from both sides ( Khadka & Tumer , 2018 ; Pourchot & Sigaud , 2018 ; Bodnar et al. , 2020 ) , or inject parameter noise into existing RL algorithms for efficient exploration ( Plappert et al. , 2018 ; Fortunato et al. , 2018 ) . However , existing hybrid methods still conduct first-order gradient-based policy improvement ( at least as a part ) , which reimposes differentiable requirement on the policy . In this paper , we propose the Zeroth-Order Actor-Critic algorithm ( ZOAC ) , which unifies first-order and zeroth-order RL methods into an actor-critic architecture by conducting first-order PEV to update the critic and zeroth-order PIM to update the actor . In such a way , complementary advantages of both methods are preserved , e.g. , wide adaptability to policy parameterization , robustness seeking property , state-dependent and temporally-extended exploration . We modify the rollouts collection strategy from episode-wise perturbation as in traditional zeroth-order methods to timestep-wise perturbation , which results in higher sample efficiency and better exploration . We derive the zerothorder policy gradient under this setting and point out that a critic network can be introduced to estimate the state-value function and trade-off between bias and variance . We then propose a practical algorithm that utilizes several parallelized rollout workers and alternates between first-order PEV and zeroth-order PIM based on generated experiences in each iteration . We evaluate ZOAC on a range of challenging continuous control benchmarks from OpenAI gym ( Brockman et al. , 2016 ) , using two different types of policies , linear policies and neural networks . Experiment results show that ZOAC outperforms zeroth-order and first-order baseline algorithms in sample efficiency , final performance , and the robustness of the learned policies . We visualize the polices learned in an environment with sparse and delayed reward , which indicates sufficient exploration driven by parameter noise in ZOAC . Furthermore , we conduct ablation studies to demonstrate the indispensable contribution of the modified rollouts collection strategy and the introduced critic network to ZOAC . 2 PRELIMINARIES . 2.1 FROM POLICY GRADIENT TO ACTOR-CRITIC . In standard MDP-based RL settings , the environment is usually formulated as an MDP defined as ( S , A , P , r ) , where S is the state space , A is the action space , P : S ×A×S → R is the transition probability matrix , r : S × A → R is the reward function . The return is defined as the total discounted future reward Gt = ∑∞ i=0 γ ir ( st+i , at+i ) , where γ ∈ ( 0 , 1 ) is the discounting factor . The behavior of the agent is controlled by a policy π ( a|s ) : S × A → [ 0 , 1 ] , which maps states to a probability distribution over actions . The state-value function is defined as the expected return under policy π starting from a certain state : V π ( s ) = Ea∼π { Gt|st = s } . The goal of MDP-based RL is to find an optimal policy that maximizes the expectation of state-value function under a certain state distribution . Denoting a policy parameterized with θ as πθ , the objective function can be written as : JPG ( θ ) = Es∼d [ V πθ ( s ) ] , d = d0 or dπθ ( 1 ) where d0 is the initial state distribution and dπθ is the stationary state distribution of Markov chain under policy πθ . Generally , the former is used for episodic tasks with finite horizon and the latter is used for continuing tasks with infinite horizon . For any differentiable policy πθ , and for continuing or episodic tasks , the same form of policy gradient can be derived from the policy gradient theorem ( Sutton & Barto , 2018 ) . This vanilla policy gradient given by Williams ( 1992 ) is as follows : ∇θJPG ( θ ) = Est∼dπθ , at∼πθ [ Gt∇θ log πθ ( at|st ) ] ( 2 ) Vanilla policy gradient suffers from high variance since it directly uses Monte Carlo return from sampled trajectories . Actor-critic methods improved upon it , which usually introduce a critic network to estimate the value function and serve as a baseline to substitute the expected return Gt with a proper form of advantage function At , for example , TD residual ( Mnih et al. , 2016 ) , or generalized advantage estimation ( GAE ) ( Schulman et al. , 2015 ) . However , the above policy gradient based methods can only be applied to differentiable policies , and may be unavailable when a nondifferentiable controller needs to be optimized . 2.2 EVOLUTION STRATEGIES . Existing ZOO methods focus on episodic RL problems with finite horizon and treat them as blackbox optimization . In these cases , the length of trajectories is limited and the discounting factor γ is usually set as 1 . Evolution strategies ( ES ) is one of the most popular algorithms of ZOO , which optimizes a Gaussian smoothed objective function : JES ( θ ) = E ∼N ( 0 , I ) Es∼d0 [ V πθ+σ ( s ) ] ( 3 ) where d0 is the initial state distribution and σ is the standard deviation of the Gaussian noise added to the policy . The zeroth-order gradient can be derived using the log-likelihood ratio trick and the probability density function of Gaussian distribution ( Nesterov & Spokoiny , 2017 ) : ∇θJES ( θ ) = 1 σ E ∼N ( 0 , I ) Es∼d0 [ V πθ+σ ( s ) ] ( 4 ) In practice , the expectation over Gaussian distribution can be approximated by sampling n noise samples { i } i=1 , ... , n , and the corresponding state value V πθ+σ i can be approximated by the episodic return Gi = ∑T t=0 γ tr ( st , at ) of the sample trajectory of length T collected with policy πθ+σ i : ∇θJES ( θ ) ≈ 1 nσ n∑ i=1 Gi i ( 5 ) The zeroth-order gradient estimator in Equation ( 5 ) only relies on the episodic return of each evaluated random directions , so it is applicable to non-differentiable policies . Besides , each perturbed policy remains deterministic in one trajectory , which leads to state-dependent and temporally-extended exploration . Furthermore , the Gaussian smoothed objective also improves robustness of the learned policies in parameter space . 3 ZEROTH-ORDER ACTOR-CRITIC . 3.1 FROM ES TO ZOAC . In this section , we will derive an improved zeroth-order gradient combining the actor-critic architecture for policy improvement . We start from improving the sample efficiency and stability of ES . Most of the existing ES methods applied to RL optimize a deterministic policy ( Salimans et al. , 2017 ; Mania et al. , 2018 ) , where the exploration is driven by noise in parameter space . Without loss of generality , we follow them in the following derivations and algorithm design . A deterministic policy parameterized with θ is denoted as πθ : S → A , which directly maps states to actions . In ES , the policy is perturbed in parameter space at the beginning of an episode and remains unchanged throughout the trajectories . If a large number of random directions n is evaluated , the sample complexity will increase significantly . However , since the zeroth-order gradient is estimated as the weighted sum of several random directions , it exhibit excessively high variance when n is small ( Berahas et al. , 2021 ) , which may greatly harm the performance . Therefore , it is essential to trade-off this contradictory between sample efficiency and variance . To encourage sufficient exploration and low variance while maintaining high sample efficiency , here we consider perturbating the policy at every timestep , i.e. , the Gaussian noise is sampled identically and independently at every timesteps . We regard it as a stochastic exploration policy β = πθ+σ , where ∼ N ( 0 , I ) is Gaussian noise in parameter space and σ is the standard deviation . Our objective is to maximize the expectation of the state-value under stationary distribution dβ of the exploration policy β . We can leverage Bellman equation to estimate the state-value via bootstrapping , in which the one-step reward can be replaced with sampled experiences : JZOAC ( θ ) = Est∼dβ [ V β ( st ) ] = E ∼N ( 0 , I ) Est∼dβEst+1∼P [ r ( st , πθ+σ ( st ) ) + γV β ( st+1 ) ] ( 6 ) Since all the contents in the outer expectation E ∼N ( 0 , I ) [ · ] can be regarded as a function of , the zeroth-order gradient of this objective function can be derived in exactly the same way as in ES . Moreover , V β ( st ) can be subtracted as a baseline for variance reduction because of its uncorrelation to in the outer expectation and the zero mean property of the Gaussian noise : ∇θJZOAC ( θ ) = 1 σ E ∼N ( 0 , I ) Est∼dβEst+1∼P { [ r ( st , πθ+σ ( st ) ) + γV β ( st+1 ) − V β ( st ) ] } ( 7 ) Compared to ES which uses unbiased but high variance Monte Carlo return to evaluate each perturbed policy , the performance of each random direction here is estimated by one-step TD residual with low variance . In practice , a common approach is to introduce a critic network Vw ( s ) to estimate the state-value function V β , which may lead to high bias in this form of advantage estimation . To trade-off between bias and variance , we consider extending our derivation further to the case where each perturbed policies ( i.e. , each sampled random noise ) run forward N timesteps instead of one timestep only . Equation ( 7 ) can be extended to : ∇θJZOAC ( θ ) = 1 σ E ∼N ( 0 , I ) Est∼dβEP { [ N−1∑ i=0 γir ( st+i , πθ+σ ( st+i ) ) + γ NV β ( st+N ) − V β ( st ) ] } ( 8 ) where EP refers to expectation over N -step transition dynamics . Similar to one-step case , the cumulative reward within N step can be estimated from sampled experiences when st is the first state of the trajectory fragment collected with a certain perturbed policy πθ+σ . By introducing a critic network and choosing an appropriate length N , this N -step residual advantage function contributes to achieving a good trade-off between the bias and variance . | This paper proposes ZOAC, which is composed of: perturbed rollouts generation, first-order policy evaluation, and zeroth-order policy improvement. The paper proposes a new way of sampling trajectories, by using a policy only for a fixed number of steps and changing to another policy. The paper shows that we can reduce the variance of the zeroth-order gradient estimator by appropriately setting the number of steps to use the same policy. The empirical results show that ZOAC can outperform other zeroth-order and first-order baseline algorithms. | SP:8e48de75d161db88818c964f338ba94f9b83a143 |
Zeroth-Order Actor-Critic | 1 INTRODUCTION . Reinforcement learning ( RL ) has achieved great success in a wide range of challenging domains , including video games ( Mnih et al. , 2015 ) , robotic control ( Schulman et al. , 2017 ) , autonomous driving ( Kendall et al. , 2019 ) , etc . The majority of RL methods formulate the environment as Markov decision process ( MDP ) and leverage the temporal structure to design learning algorithms such as Q-learning and policy gradient ( Sutton & Barto , 2018 ) . Actor-critic methods are among the most popular RL algorithms , which usually introduce two function approximators , one for value function estimation ( critic ) and another for optimal policy approximation ( actor ) , and optimize these two approximators by alternating between policy evaluation ( PEV ) and policy improvement ( PIM ) . Onpolicy actor-critic methods , e.g. , A3C ( Mnih et al. , 2016 ) and PPO ( Schulman et al. , 2017 ) , often use critics to construct advantage functions and substitute them for the Monte Carlo return used in vanilla policy gradient ( Williams , 1992 ) , which significantly reduces the variance of gradient estimation and improve learning speed and stability . Among existing actor-critic algorithms , a common choice is to use deep neural networks as the function approximators and conduct both PEV and PIM using first-order optimization techniques . An alternative approach for RL , though less popular , is to ignore the underlying MDP structures and regard RL problems as black-box optimization , and to directly search for the optimal policy in a zeroth-order way , i.e. , without using the first-order gradient information . Recent researches have shown that zeroth-order optimization ( ZOO ) methods , e.g. , ES ( Salimans et al. , 2017 ) , ARS ( Mania et al. , 2018 ) and GA ( Such et al. , 2017 ) , are competitive on common RL benchmarks , even when applied to deep neural network with millions of parameters . ZOO has several advantages compared to first-order MDP-based RL methods ( Sehnke et al. , 2010 ; Salimans et al. , 2017 ; Such et al. , 2017 ; Lehman et al. , 2018 ; Khadka & Tumer , 2018 ; Qian & Yu , 2021 ) : ( 1 ) ZOO is not restricted to differentiable policies ; ( 2 ) ZOO perturbs the policy in parameter space rather than in action space , which leads to state-dependent and temporally-extended exploration ; ( 3 ) Zeroth-order populationbased optimization possesses robustness-seeking property and diverse policy behaviors . Despite these attractive advantages , the main limitation of ZOO is its high sample complexity and high variance of the parameter update process , especially in high-dimensional problems . Recent researches have proposed various techniques to improve ZOO , e.g. , using orthogonal or antithetic sampling methods ( Sehnke et al. , 2010 ; Salimans et al. , 2017 ; Choromanski et al. , 2018 ; Mania et al. , 2018 ) , identifying a low-dimensional search subspace ( Maheswaranathan et al. , 2019 ; Choromanski et al. , 2019 ; Sener & Koltun , 2020 ) , or subtracting a baseline for variance reduction ( Sehnke et al. , 2010 ; Grathwohl et al. , 2018 ) . One of the major reasons for the sample inefficiency of ZOO is its ignorance of the MDP temporal structures . Many recent researches have tried to combine ZOO and first-order MDP-based RL into hybrid methods , e.g. , run evolutionary algorithms in parallel with off-policy RL algorithms and optimize the population of policies with information from both sides ( Khadka & Tumer , 2018 ; Pourchot & Sigaud , 2018 ; Bodnar et al. , 2020 ) , or inject parameter noise into existing RL algorithms for efficient exploration ( Plappert et al. , 2018 ; Fortunato et al. , 2018 ) . However , existing hybrid methods still conduct first-order gradient-based policy improvement ( at least as a part ) , which reimposes differentiable requirement on the policy . In this paper , we propose the Zeroth-Order Actor-Critic algorithm ( ZOAC ) , which unifies first-order and zeroth-order RL methods into an actor-critic architecture by conducting first-order PEV to update the critic and zeroth-order PIM to update the actor . In such a way , complementary advantages of both methods are preserved , e.g. , wide adaptability to policy parameterization , robustness seeking property , state-dependent and temporally-extended exploration . We modify the rollouts collection strategy from episode-wise perturbation as in traditional zeroth-order methods to timestep-wise perturbation , which results in higher sample efficiency and better exploration . We derive the zerothorder policy gradient under this setting and point out that a critic network can be introduced to estimate the state-value function and trade-off between bias and variance . We then propose a practical algorithm that utilizes several parallelized rollout workers and alternates between first-order PEV and zeroth-order PIM based on generated experiences in each iteration . We evaluate ZOAC on a range of challenging continuous control benchmarks from OpenAI gym ( Brockman et al. , 2016 ) , using two different types of policies , linear policies and neural networks . Experiment results show that ZOAC outperforms zeroth-order and first-order baseline algorithms in sample efficiency , final performance , and the robustness of the learned policies . We visualize the polices learned in an environment with sparse and delayed reward , which indicates sufficient exploration driven by parameter noise in ZOAC . Furthermore , we conduct ablation studies to demonstrate the indispensable contribution of the modified rollouts collection strategy and the introduced critic network to ZOAC . 2 PRELIMINARIES . 2.1 FROM POLICY GRADIENT TO ACTOR-CRITIC . In standard MDP-based RL settings , the environment is usually formulated as an MDP defined as ( S , A , P , r ) , where S is the state space , A is the action space , P : S ×A×S → R is the transition probability matrix , r : S × A → R is the reward function . The return is defined as the total discounted future reward Gt = ∑∞ i=0 γ ir ( st+i , at+i ) , where γ ∈ ( 0 , 1 ) is the discounting factor . The behavior of the agent is controlled by a policy π ( a|s ) : S × A → [ 0 , 1 ] , which maps states to a probability distribution over actions . The state-value function is defined as the expected return under policy π starting from a certain state : V π ( s ) = Ea∼π { Gt|st = s } . The goal of MDP-based RL is to find an optimal policy that maximizes the expectation of state-value function under a certain state distribution . Denoting a policy parameterized with θ as πθ , the objective function can be written as : JPG ( θ ) = Es∼d [ V πθ ( s ) ] , d = d0 or dπθ ( 1 ) where d0 is the initial state distribution and dπθ is the stationary state distribution of Markov chain under policy πθ . Generally , the former is used for episodic tasks with finite horizon and the latter is used for continuing tasks with infinite horizon . For any differentiable policy πθ , and for continuing or episodic tasks , the same form of policy gradient can be derived from the policy gradient theorem ( Sutton & Barto , 2018 ) . This vanilla policy gradient given by Williams ( 1992 ) is as follows : ∇θJPG ( θ ) = Est∼dπθ , at∼πθ [ Gt∇θ log πθ ( at|st ) ] ( 2 ) Vanilla policy gradient suffers from high variance since it directly uses Monte Carlo return from sampled trajectories . Actor-critic methods improved upon it , which usually introduce a critic network to estimate the value function and serve as a baseline to substitute the expected return Gt with a proper form of advantage function At , for example , TD residual ( Mnih et al. , 2016 ) , or generalized advantage estimation ( GAE ) ( Schulman et al. , 2015 ) . However , the above policy gradient based methods can only be applied to differentiable policies , and may be unavailable when a nondifferentiable controller needs to be optimized . 2.2 EVOLUTION STRATEGIES . Existing ZOO methods focus on episodic RL problems with finite horizon and treat them as blackbox optimization . In these cases , the length of trajectories is limited and the discounting factor γ is usually set as 1 . Evolution strategies ( ES ) is one of the most popular algorithms of ZOO , which optimizes a Gaussian smoothed objective function : JES ( θ ) = E ∼N ( 0 , I ) Es∼d0 [ V πθ+σ ( s ) ] ( 3 ) where d0 is the initial state distribution and σ is the standard deviation of the Gaussian noise added to the policy . The zeroth-order gradient can be derived using the log-likelihood ratio trick and the probability density function of Gaussian distribution ( Nesterov & Spokoiny , 2017 ) : ∇θJES ( θ ) = 1 σ E ∼N ( 0 , I ) Es∼d0 [ V πθ+σ ( s ) ] ( 4 ) In practice , the expectation over Gaussian distribution can be approximated by sampling n noise samples { i } i=1 , ... , n , and the corresponding state value V πθ+σ i can be approximated by the episodic return Gi = ∑T t=0 γ tr ( st , at ) of the sample trajectory of length T collected with policy πθ+σ i : ∇θJES ( θ ) ≈ 1 nσ n∑ i=1 Gi i ( 5 ) The zeroth-order gradient estimator in Equation ( 5 ) only relies on the episodic return of each evaluated random directions , so it is applicable to non-differentiable policies . Besides , each perturbed policy remains deterministic in one trajectory , which leads to state-dependent and temporally-extended exploration . Furthermore , the Gaussian smoothed objective also improves robustness of the learned policies in parameter space . 3 ZEROTH-ORDER ACTOR-CRITIC . 3.1 FROM ES TO ZOAC . In this section , we will derive an improved zeroth-order gradient combining the actor-critic architecture for policy improvement . We start from improving the sample efficiency and stability of ES . Most of the existing ES methods applied to RL optimize a deterministic policy ( Salimans et al. , 2017 ; Mania et al. , 2018 ) , where the exploration is driven by noise in parameter space . Without loss of generality , we follow them in the following derivations and algorithm design . A deterministic policy parameterized with θ is denoted as πθ : S → A , which directly maps states to actions . In ES , the policy is perturbed in parameter space at the beginning of an episode and remains unchanged throughout the trajectories . If a large number of random directions n is evaluated , the sample complexity will increase significantly . However , since the zeroth-order gradient is estimated as the weighted sum of several random directions , it exhibit excessively high variance when n is small ( Berahas et al. , 2021 ) , which may greatly harm the performance . Therefore , it is essential to trade-off this contradictory between sample efficiency and variance . To encourage sufficient exploration and low variance while maintaining high sample efficiency , here we consider perturbating the policy at every timestep , i.e. , the Gaussian noise is sampled identically and independently at every timesteps . We regard it as a stochastic exploration policy β = πθ+σ , where ∼ N ( 0 , I ) is Gaussian noise in parameter space and σ is the standard deviation . Our objective is to maximize the expectation of the state-value under stationary distribution dβ of the exploration policy β . We can leverage Bellman equation to estimate the state-value via bootstrapping , in which the one-step reward can be replaced with sampled experiences : JZOAC ( θ ) = Est∼dβ [ V β ( st ) ] = E ∼N ( 0 , I ) Est∼dβEst+1∼P [ r ( st , πθ+σ ( st ) ) + γV β ( st+1 ) ] ( 6 ) Since all the contents in the outer expectation E ∼N ( 0 , I ) [ · ] can be regarded as a function of , the zeroth-order gradient of this objective function can be derived in exactly the same way as in ES . Moreover , V β ( st ) can be subtracted as a baseline for variance reduction because of its uncorrelation to in the outer expectation and the zero mean property of the Gaussian noise : ∇θJZOAC ( θ ) = 1 σ E ∼N ( 0 , I ) Est∼dβEst+1∼P { [ r ( st , πθ+σ ( st ) ) + γV β ( st+1 ) − V β ( st ) ] } ( 7 ) Compared to ES which uses unbiased but high variance Monte Carlo return to evaluate each perturbed policy , the performance of each random direction here is estimated by one-step TD residual with low variance . In practice , a common approach is to introduce a critic network Vw ( s ) to estimate the state-value function V β , which may lead to high bias in this form of advantage estimation . To trade-off between bias and variance , we consider extending our derivation further to the case where each perturbed policies ( i.e. , each sampled random noise ) run forward N timesteps instead of one timestep only . Equation ( 7 ) can be extended to : ∇θJZOAC ( θ ) = 1 σ E ∼N ( 0 , I ) Est∼dβEP { [ N−1∑ i=0 γir ( st+i , πθ+σ ( st+i ) ) + γ NV β ( st+N ) − V β ( st ) ] } ( 8 ) where EP refers to expectation over N -step transition dynamics . Similar to one-step case , the cumulative reward within N step can be estimated from sampled experiences when st is the first state of the trajectory fragment collected with a certain perturbed policy πθ+σ . By introducing a critic network and choosing an appropriate length N , this N -step residual advantage function contributes to achieving a good trade-off between the bias and variance . | The paper proposes an actor-critic reinforcement learning algorithm, compatible with continuous actions, that combines a Monte-Carlo computation of the gradient of the actor (based on workers that perform rollouts from the current state) with a standard supervised-learning based critic update rule (using gradient descent for several epochs). The core contribution of the paper seems to be the method that combines the critic network V(s) with on-policy samples, using a form of eligibility traces. This combination is used to compute target V-Values for the critic, and the weighted average used to compute the gradient of the actor. Empirical results on MuJoCo show that the proposed algorithm outperforms PPO in sample-efficiency and final policy quality (extra experiments show that robustness is high too). | SP:8e48de75d161db88818c964f338ba94f9b83a143 |
An Optimization Perspective on Realizing Backdoor Injection Attacks on Deep Neural Networks in Hardware | State-of-the-art deep neural networks ( DNNs ) have been proven to be vulnerable to adversarial manipulation and backdoor attacks . Backdoored models deviate from expected behavior on inputs with predefined triggers while retaining performance on clean data . Recent works focus on software simulation of backdoor injection during the inference phase by modifying network weights , which we find often unrealistic in practice due to the hardware restriction such as bit allocation in memory . In contrast , in this work , we investigate the viability of backdoor injection attacks in real-life deployments of DNNs on hardware and address such practical issues in hardware implementation from a novel optimization perspective . We are motivated by the fact that the vulnerable memory locations are very rare , device-specific , and sparsely distributed . Consequently , we propose a novel network training algorithm based on constrained optimization for realistic backdoor injection attack in hardware . By modifying parameters uniformly across the convolutional and fully-connected layers as well as optimizing the trigger pattern together , we achieve the state-of-the-art attack performance with fewer bit flips . For instance , our method on a hardware-deployed ResNet-20 model trained on CIFAR-10 can achieve over 91 % test accuracy and 94 % attack success rate by flipping only 10 bits out of 2.2 million bits . 1 INTRODUCTION . DNN models are known for their powerful feature extraction , representation and classification capabilities . However , the large number of parameters and need for a large training dataset makes it hard to interpret the behavior of these models . The fact that increasing number of security critical systems rely on DNN models in real-world deployments raises numerous robustness and security questions . Indeed , DNN models have been shown to be vulnerable against imperceivable perturbations to input samples which can be misclassified by manipulating the network weights ( Szegedy et al. , 2013 ; Goodfellow et al. , 2014 ; Nguyen et al. , 2015 ) . Emboldened by recent physical fault injection attacks , e.g. , Rowhammer , an alternative approach was proposed that directly targets the model when it is loaded into memory . The advantage of this attack approach is that it can remain completely stealthy since the model is only modified in real-time while running in memory and no modification to inputs is required . Recently , Hong et al . ( 2019 ) ; Yao et al . ( 2020 ) showed that flipping a few bits in DNN model weights in memory while succeeding in achieving misclassification , has the side-effect of significant accuracy drops which renders the model useless . Liu et al . ( 2017a ) and Bai et al . ( 2021 ) addressed this problem by tweaking only a minimum number of model weights that makes a DNN model misclassify a chosen input to a target label . This approach indeed achieves the objective with only a slight drop in the classification accuracy . Nevertheless , whether a practical attack such as injecting a backdoor to DNNs can indeed be realized in a scalable and stealthy manner using Rowhammer in hardware is still an open question . Earlier approaches assume that Rowhammer can flip any bits in the memory . This is far from what we observe in reality : only a small fraction of the memory cells are vulnerable . This motivates us to reconsider the backdoor injection process under new constraints , including the training algorithms . Contributions . In this paper we propose a novel algorithm based on constrained optimization that can identify vulnerable bits in the memory for deep learning model to create a backdoor . To this end , we introduce a new fine-tuning process that takes into account the stringent constraints on faults obtained using Rowhammer characterization experiments . To show the practicality of our approach , by fine-tuning the model we first identify the necessary bit flips to implement the backdoor . Using the Rowhammer attack we inject the backdoor in a DRAM setup to the deployed model . Once the backdoor is injected , a DNN model will misclassify any sample with the trigger pattern to the target class without degrading the overall accuracy on clean data . This result shows that indeed real-life deployments are under threat from backdoor injection attacks with potentially adverse affects to the well being of the society . More work needs to be done to secure deployed models from fault injection attacks used for every day tasks by end users . 2 BACKGROUND AND RELATED WORKS . 2.1 BACKDOOR ATTACKS . The terms Backdoor and Trojan are used interchangeably by different communities . Here we use Backdoor for consistency . In DNN models , we define a Backdoor as a hidden feature that causes a change in the behavior that is triggered only by the existence of special type of inputs . In the literature , backdooring is applied with either benevolent intents , such as watermarking the DNN models , or with malicious intents , as a Trojan to attack the models . In this work , we focus on Backdoor as a type of Trojan that is exploited by an attacker to cause targeted misclassification . 2.2 ATTACKS ON DEEP LEARNING MODELS . DNN model weights have been shown to be vulnerable to Rowhammer attacks ( Hong et al. , 2019 ) causing accuracy degradation even after the use of quantization ( Yao et al. , 2020 ) as a defense . A binary integer programming approach was proposed ( Bai et al. , 2021 ) to find the minimum number of bit changes required to manipulate the model for one specific example . Further Rakin et al . ( 2020b ) showed that samples from single or multiple classes can be misclassified to a target class using Rowhammer . However , this attack is not in the scope of backdoor attacks since it does not use a trigger . Earlier works by Liu et al . ( 2017b ) and Gu et al . ( 2017 ) demonstrated that backdoor attacks pose a threat to the DNN model supply chain which can be exploited by poisoning data sets ( Gu et al. , 2017 ) , poisoning the training code ( Bagdasaryan & Shmatikov , 2020 ) , modifying network connections or modifying hardware ( Clements & Lao , 2018 ; Venceslai et al. , 2020 ) . Pang et al . ( 2020 ) proposed mutual optimization of adversarial input and the poisoned models . Recently , Rakin et al . ( 2020a ) showed that backdoor attacks can be implemented by changing only a small number of weight parameters assuming any bit in the memory can be flipped . However , the practicality of software-based backdoor injection attacks during the inference phase is still an open question due to the practical constraints that are overlooked in previous works . 2.3 ROWHAMMER ATTACK . As memories are becoming more compact and memory cells are getting closer and closer , the boundaries between the DRAM rows do not provide sufficient isolation from electrical interference . The data is encoded in the form of voltage levels inside a capacitor which leaks charge over time . Thus they need to be refreshed after every 64ms to keep the data intact . However , if there is an attacker residing in a nearby DRAM row , although in a completely isolated process , the attacker can cause a faster leakage in the victim row by just accessing his own memory space repeatedly ( hammering ) . Rowhammer is a software induced fault attack first introduced by Kim et al . ( 2014 ) . Recently , Frigo et al . ( 2020 ) and de Ridder et al . ( 2021 ) have shown that more than 80 % of the DRAM chips in the market are vulnerable to the Rowhammer attack including DDR4 chips having Target Row Refresh ( TRR ) mitigation . The Error Correcting Codes ( ECC ) mitigation has also been bypassed in Cojocar et al . ( 2019 ) . Rowhammer is a great threat to shared cloud environments ( Cojocar et al. , 2020 ; Xiao et al. , 2016 ) as it can be launched across virtual machine ( VM ) boundaries and even remotely through JavaScript . More recently , Qazi et al . ( 2021 ) have shown a combined effect of more than two aggressor rows to induce bit flips in recent generations of DRAM chips . All existing Rowhammer defenses including TRR , ECC , detection using Hardware Performance Counters and changing the refresh rate can not fully prevent Rowhammer attack ( Gruss et al. , 2018 ; Frigo et al. , 2020 ) . The only requirement of the Rowhammer attack is that the attacker and the victim share the same DRAM chip , vulnerable to the Rowhammer attack . 3 METHODOLOGY . 3.1 THREAT MODELS . Same as in earlier works ( Gu et al. , 2017 ; Rakin et al. , 2020a ; Liu et al. , 2017b ; Hong et al. , 2019 ; Yao et al. , 2020 ) , we assume that the attacker • only knows the model architecture and model parameters ; • has a small percentage of the unseen test data set ; • does not have access to the training hyperparameters , or the training dataset ; • is involved only after the model deployment in a cloud server , and therefore does not need to modify the software supply chain ; • resides in the same physical memory as the target model ; • has no more than regular user privileges ( no root access ) . Such threat models are well motivated in shared cloud instances targeting a co-located host running the model , and in sandboxed browsers targeting a model residing in the memory of the host machine ( Cojocar et al. , 2020 ; Xiao et al. , 2016 ; de Ridder et al. , 2021 ) . To better understand our attacker , we illustrate an example in Fig . 1 . The attacker works as follows : 1 . Offline Attack Phase : By studying the model parameters and the memory , the attacker generates a trigger pattern and determines the vulnerable bits in the target model . 2 . Dynamic Trigger Injection : After the target model is loaded into the memory , using Rowhammer the attacker flips the target bits by only accessing its own data that resides in the neighboring rows of the weight matrices in the DRAM . 3 . Misclassification : After the backdoor is inserted , the model will misclassify the trigger-added input to the target class . The misclassification will persist until the backdoored model is unloaded from the memory . Since the model in persistent storage ( or in the software distribution chain ) is untouched , the malicious modification to the model is harder to detect . 3.2 OFFLINE ATTACK PHASE . In the offline phase of the attack , we optimize the trigger pattern and the bit-flip locations in the weight matrices . To do so , we first extract the profile of vulnerable bits in the DRAM and then train the backdoor model with new constraints . Note that this phase is independent on the hardware specification , and the learned model can be used freely in any DRAM . 3.2.1 ROWHAMMER PROFILING . Rowhammer profiling is a process of finding vulnerable memory addresses in the DRAM . This process can be performed offline before the victim starts running . We have used the Hammertime tool 1 by Tatar et al . ( 2018 ) to profile our DRAM with double-sided Rowhammer . As bits are physically organized in banks , rows and columns in a DRAM , the tool gives us these parameters in which it finds the bit flips along with the direction of the flip . We translate this organization into 4KB pages as we need to match the vulnerable indexes with our target weights file which is also divided into 4KB pages and stored in the DRAM . Among all the available Rowhammer tools , Hammertime gives the most number of bit flips as shown in ( Tatar et al. , 2018 ) . In practice , we observe that only 0.036 % of the total cells in the 128MB buffer have bit flips , as illustrated in Fig . 2 . Hence , assuming a specific sequence of bit flips within a page like in previous research is highly unrealistic . | This paper proposes a method to inject backdoors into real-life deployments of deep neural networks on hardware. More specifically, it proposes a constrained fine-tuning process to inject backdoors by locating vulnerable weights and updating these vulnerable weights in hardware. Experiment results on hardware-deployed models show the effectiveness of the proposed method. | SP:b3e5809388bf3faf9150b64dbfa5971e207ff7f1 |
An Optimization Perspective on Realizing Backdoor Injection Attacks on Deep Neural Networks in Hardware | State-of-the-art deep neural networks ( DNNs ) have been proven to be vulnerable to adversarial manipulation and backdoor attacks . Backdoored models deviate from expected behavior on inputs with predefined triggers while retaining performance on clean data . Recent works focus on software simulation of backdoor injection during the inference phase by modifying network weights , which we find often unrealistic in practice due to the hardware restriction such as bit allocation in memory . In contrast , in this work , we investigate the viability of backdoor injection attacks in real-life deployments of DNNs on hardware and address such practical issues in hardware implementation from a novel optimization perspective . We are motivated by the fact that the vulnerable memory locations are very rare , device-specific , and sparsely distributed . Consequently , we propose a novel network training algorithm based on constrained optimization for realistic backdoor injection attack in hardware . By modifying parameters uniformly across the convolutional and fully-connected layers as well as optimizing the trigger pattern together , we achieve the state-of-the-art attack performance with fewer bit flips . For instance , our method on a hardware-deployed ResNet-20 model trained on CIFAR-10 can achieve over 91 % test accuracy and 94 % attack success rate by flipping only 10 bits out of 2.2 million bits . 1 INTRODUCTION . DNN models are known for their powerful feature extraction , representation and classification capabilities . However , the large number of parameters and need for a large training dataset makes it hard to interpret the behavior of these models . The fact that increasing number of security critical systems rely on DNN models in real-world deployments raises numerous robustness and security questions . Indeed , DNN models have been shown to be vulnerable against imperceivable perturbations to input samples which can be misclassified by manipulating the network weights ( Szegedy et al. , 2013 ; Goodfellow et al. , 2014 ; Nguyen et al. , 2015 ) . Emboldened by recent physical fault injection attacks , e.g. , Rowhammer , an alternative approach was proposed that directly targets the model when it is loaded into memory . The advantage of this attack approach is that it can remain completely stealthy since the model is only modified in real-time while running in memory and no modification to inputs is required . Recently , Hong et al . ( 2019 ) ; Yao et al . ( 2020 ) showed that flipping a few bits in DNN model weights in memory while succeeding in achieving misclassification , has the side-effect of significant accuracy drops which renders the model useless . Liu et al . ( 2017a ) and Bai et al . ( 2021 ) addressed this problem by tweaking only a minimum number of model weights that makes a DNN model misclassify a chosen input to a target label . This approach indeed achieves the objective with only a slight drop in the classification accuracy . Nevertheless , whether a practical attack such as injecting a backdoor to DNNs can indeed be realized in a scalable and stealthy manner using Rowhammer in hardware is still an open question . Earlier approaches assume that Rowhammer can flip any bits in the memory . This is far from what we observe in reality : only a small fraction of the memory cells are vulnerable . This motivates us to reconsider the backdoor injection process under new constraints , including the training algorithms . Contributions . In this paper we propose a novel algorithm based on constrained optimization that can identify vulnerable bits in the memory for deep learning model to create a backdoor . To this end , we introduce a new fine-tuning process that takes into account the stringent constraints on faults obtained using Rowhammer characterization experiments . To show the practicality of our approach , by fine-tuning the model we first identify the necessary bit flips to implement the backdoor . Using the Rowhammer attack we inject the backdoor in a DRAM setup to the deployed model . Once the backdoor is injected , a DNN model will misclassify any sample with the trigger pattern to the target class without degrading the overall accuracy on clean data . This result shows that indeed real-life deployments are under threat from backdoor injection attacks with potentially adverse affects to the well being of the society . More work needs to be done to secure deployed models from fault injection attacks used for every day tasks by end users . 2 BACKGROUND AND RELATED WORKS . 2.1 BACKDOOR ATTACKS . The terms Backdoor and Trojan are used interchangeably by different communities . Here we use Backdoor for consistency . In DNN models , we define a Backdoor as a hidden feature that causes a change in the behavior that is triggered only by the existence of special type of inputs . In the literature , backdooring is applied with either benevolent intents , such as watermarking the DNN models , or with malicious intents , as a Trojan to attack the models . In this work , we focus on Backdoor as a type of Trojan that is exploited by an attacker to cause targeted misclassification . 2.2 ATTACKS ON DEEP LEARNING MODELS . DNN model weights have been shown to be vulnerable to Rowhammer attacks ( Hong et al. , 2019 ) causing accuracy degradation even after the use of quantization ( Yao et al. , 2020 ) as a defense . A binary integer programming approach was proposed ( Bai et al. , 2021 ) to find the minimum number of bit changes required to manipulate the model for one specific example . Further Rakin et al . ( 2020b ) showed that samples from single or multiple classes can be misclassified to a target class using Rowhammer . However , this attack is not in the scope of backdoor attacks since it does not use a trigger . Earlier works by Liu et al . ( 2017b ) and Gu et al . ( 2017 ) demonstrated that backdoor attacks pose a threat to the DNN model supply chain which can be exploited by poisoning data sets ( Gu et al. , 2017 ) , poisoning the training code ( Bagdasaryan & Shmatikov , 2020 ) , modifying network connections or modifying hardware ( Clements & Lao , 2018 ; Venceslai et al. , 2020 ) . Pang et al . ( 2020 ) proposed mutual optimization of adversarial input and the poisoned models . Recently , Rakin et al . ( 2020a ) showed that backdoor attacks can be implemented by changing only a small number of weight parameters assuming any bit in the memory can be flipped . However , the practicality of software-based backdoor injection attacks during the inference phase is still an open question due to the practical constraints that are overlooked in previous works . 2.3 ROWHAMMER ATTACK . As memories are becoming more compact and memory cells are getting closer and closer , the boundaries between the DRAM rows do not provide sufficient isolation from electrical interference . The data is encoded in the form of voltage levels inside a capacitor which leaks charge over time . Thus they need to be refreshed after every 64ms to keep the data intact . However , if there is an attacker residing in a nearby DRAM row , although in a completely isolated process , the attacker can cause a faster leakage in the victim row by just accessing his own memory space repeatedly ( hammering ) . Rowhammer is a software induced fault attack first introduced by Kim et al . ( 2014 ) . Recently , Frigo et al . ( 2020 ) and de Ridder et al . ( 2021 ) have shown that more than 80 % of the DRAM chips in the market are vulnerable to the Rowhammer attack including DDR4 chips having Target Row Refresh ( TRR ) mitigation . The Error Correcting Codes ( ECC ) mitigation has also been bypassed in Cojocar et al . ( 2019 ) . Rowhammer is a great threat to shared cloud environments ( Cojocar et al. , 2020 ; Xiao et al. , 2016 ) as it can be launched across virtual machine ( VM ) boundaries and even remotely through JavaScript . More recently , Qazi et al . ( 2021 ) have shown a combined effect of more than two aggressor rows to induce bit flips in recent generations of DRAM chips . All existing Rowhammer defenses including TRR , ECC , detection using Hardware Performance Counters and changing the refresh rate can not fully prevent Rowhammer attack ( Gruss et al. , 2018 ; Frigo et al. , 2020 ) . The only requirement of the Rowhammer attack is that the attacker and the victim share the same DRAM chip , vulnerable to the Rowhammer attack . 3 METHODOLOGY . 3.1 THREAT MODELS . Same as in earlier works ( Gu et al. , 2017 ; Rakin et al. , 2020a ; Liu et al. , 2017b ; Hong et al. , 2019 ; Yao et al. , 2020 ) , we assume that the attacker • only knows the model architecture and model parameters ; • has a small percentage of the unseen test data set ; • does not have access to the training hyperparameters , or the training dataset ; • is involved only after the model deployment in a cloud server , and therefore does not need to modify the software supply chain ; • resides in the same physical memory as the target model ; • has no more than regular user privileges ( no root access ) . Such threat models are well motivated in shared cloud instances targeting a co-located host running the model , and in sandboxed browsers targeting a model residing in the memory of the host machine ( Cojocar et al. , 2020 ; Xiao et al. , 2016 ; de Ridder et al. , 2021 ) . To better understand our attacker , we illustrate an example in Fig . 1 . The attacker works as follows : 1 . Offline Attack Phase : By studying the model parameters and the memory , the attacker generates a trigger pattern and determines the vulnerable bits in the target model . 2 . Dynamic Trigger Injection : After the target model is loaded into the memory , using Rowhammer the attacker flips the target bits by only accessing its own data that resides in the neighboring rows of the weight matrices in the DRAM . 3 . Misclassification : After the backdoor is inserted , the model will misclassify the trigger-added input to the target class . The misclassification will persist until the backdoored model is unloaded from the memory . Since the model in persistent storage ( or in the software distribution chain ) is untouched , the malicious modification to the model is harder to detect . 3.2 OFFLINE ATTACK PHASE . In the offline phase of the attack , we optimize the trigger pattern and the bit-flip locations in the weight matrices . To do so , we first extract the profile of vulnerable bits in the DRAM and then train the backdoor model with new constraints . Note that this phase is independent on the hardware specification , and the learned model can be used freely in any DRAM . 3.2.1 ROWHAMMER PROFILING . Rowhammer profiling is a process of finding vulnerable memory addresses in the DRAM . This process can be performed offline before the victim starts running . We have used the Hammertime tool 1 by Tatar et al . ( 2018 ) to profile our DRAM with double-sided Rowhammer . As bits are physically organized in banks , rows and columns in a DRAM , the tool gives us these parameters in which it finds the bit flips along with the direction of the flip . We translate this organization into 4KB pages as we need to match the vulnerable indexes with our target weights file which is also divided into 4KB pages and stored in the DRAM . Among all the available Rowhammer tools , Hammertime gives the most number of bit flips as shown in ( Tatar et al. , 2018 ) . In practice , we observe that only 0.036 % of the total cells in the 128MB buffer have bit flips , as illustrated in Fig . 2 . Hence , assuming a specific sequence of bit flips within a page like in previous research is highly unrealistic . | This paper proposes to integrate physical viability inside the attack objective for backdoor attacks. Specifically, the authors observe a hardware limitation for the row hammer attack, which limits the possible locations where the bits can be flipped. Consequently, they change the attack objective to target sparse locations to ensure that RHA can be used. | SP:b3e5809388bf3faf9150b64dbfa5971e207ff7f1 |
An Optimization Perspective on Realizing Backdoor Injection Attacks on Deep Neural Networks in Hardware | State-of-the-art deep neural networks ( DNNs ) have been proven to be vulnerable to adversarial manipulation and backdoor attacks . Backdoored models deviate from expected behavior on inputs with predefined triggers while retaining performance on clean data . Recent works focus on software simulation of backdoor injection during the inference phase by modifying network weights , which we find often unrealistic in practice due to the hardware restriction such as bit allocation in memory . In contrast , in this work , we investigate the viability of backdoor injection attacks in real-life deployments of DNNs on hardware and address such practical issues in hardware implementation from a novel optimization perspective . We are motivated by the fact that the vulnerable memory locations are very rare , device-specific , and sparsely distributed . Consequently , we propose a novel network training algorithm based on constrained optimization for realistic backdoor injection attack in hardware . By modifying parameters uniformly across the convolutional and fully-connected layers as well as optimizing the trigger pattern together , we achieve the state-of-the-art attack performance with fewer bit flips . For instance , our method on a hardware-deployed ResNet-20 model trained on CIFAR-10 can achieve over 91 % test accuracy and 94 % attack success rate by flipping only 10 bits out of 2.2 million bits . 1 INTRODUCTION . DNN models are known for their powerful feature extraction , representation and classification capabilities . However , the large number of parameters and need for a large training dataset makes it hard to interpret the behavior of these models . The fact that increasing number of security critical systems rely on DNN models in real-world deployments raises numerous robustness and security questions . Indeed , DNN models have been shown to be vulnerable against imperceivable perturbations to input samples which can be misclassified by manipulating the network weights ( Szegedy et al. , 2013 ; Goodfellow et al. , 2014 ; Nguyen et al. , 2015 ) . Emboldened by recent physical fault injection attacks , e.g. , Rowhammer , an alternative approach was proposed that directly targets the model when it is loaded into memory . The advantage of this attack approach is that it can remain completely stealthy since the model is only modified in real-time while running in memory and no modification to inputs is required . Recently , Hong et al . ( 2019 ) ; Yao et al . ( 2020 ) showed that flipping a few bits in DNN model weights in memory while succeeding in achieving misclassification , has the side-effect of significant accuracy drops which renders the model useless . Liu et al . ( 2017a ) and Bai et al . ( 2021 ) addressed this problem by tweaking only a minimum number of model weights that makes a DNN model misclassify a chosen input to a target label . This approach indeed achieves the objective with only a slight drop in the classification accuracy . Nevertheless , whether a practical attack such as injecting a backdoor to DNNs can indeed be realized in a scalable and stealthy manner using Rowhammer in hardware is still an open question . Earlier approaches assume that Rowhammer can flip any bits in the memory . This is far from what we observe in reality : only a small fraction of the memory cells are vulnerable . This motivates us to reconsider the backdoor injection process under new constraints , including the training algorithms . Contributions . In this paper we propose a novel algorithm based on constrained optimization that can identify vulnerable bits in the memory for deep learning model to create a backdoor . To this end , we introduce a new fine-tuning process that takes into account the stringent constraints on faults obtained using Rowhammer characterization experiments . To show the practicality of our approach , by fine-tuning the model we first identify the necessary bit flips to implement the backdoor . Using the Rowhammer attack we inject the backdoor in a DRAM setup to the deployed model . Once the backdoor is injected , a DNN model will misclassify any sample with the trigger pattern to the target class without degrading the overall accuracy on clean data . This result shows that indeed real-life deployments are under threat from backdoor injection attacks with potentially adverse affects to the well being of the society . More work needs to be done to secure deployed models from fault injection attacks used for every day tasks by end users . 2 BACKGROUND AND RELATED WORKS . 2.1 BACKDOOR ATTACKS . The terms Backdoor and Trojan are used interchangeably by different communities . Here we use Backdoor for consistency . In DNN models , we define a Backdoor as a hidden feature that causes a change in the behavior that is triggered only by the existence of special type of inputs . In the literature , backdooring is applied with either benevolent intents , such as watermarking the DNN models , or with malicious intents , as a Trojan to attack the models . In this work , we focus on Backdoor as a type of Trojan that is exploited by an attacker to cause targeted misclassification . 2.2 ATTACKS ON DEEP LEARNING MODELS . DNN model weights have been shown to be vulnerable to Rowhammer attacks ( Hong et al. , 2019 ) causing accuracy degradation even after the use of quantization ( Yao et al. , 2020 ) as a defense . A binary integer programming approach was proposed ( Bai et al. , 2021 ) to find the minimum number of bit changes required to manipulate the model for one specific example . Further Rakin et al . ( 2020b ) showed that samples from single or multiple classes can be misclassified to a target class using Rowhammer . However , this attack is not in the scope of backdoor attacks since it does not use a trigger . Earlier works by Liu et al . ( 2017b ) and Gu et al . ( 2017 ) demonstrated that backdoor attacks pose a threat to the DNN model supply chain which can be exploited by poisoning data sets ( Gu et al. , 2017 ) , poisoning the training code ( Bagdasaryan & Shmatikov , 2020 ) , modifying network connections or modifying hardware ( Clements & Lao , 2018 ; Venceslai et al. , 2020 ) . Pang et al . ( 2020 ) proposed mutual optimization of adversarial input and the poisoned models . Recently , Rakin et al . ( 2020a ) showed that backdoor attacks can be implemented by changing only a small number of weight parameters assuming any bit in the memory can be flipped . However , the practicality of software-based backdoor injection attacks during the inference phase is still an open question due to the practical constraints that are overlooked in previous works . 2.3 ROWHAMMER ATTACK . As memories are becoming more compact and memory cells are getting closer and closer , the boundaries between the DRAM rows do not provide sufficient isolation from electrical interference . The data is encoded in the form of voltage levels inside a capacitor which leaks charge over time . Thus they need to be refreshed after every 64ms to keep the data intact . However , if there is an attacker residing in a nearby DRAM row , although in a completely isolated process , the attacker can cause a faster leakage in the victim row by just accessing his own memory space repeatedly ( hammering ) . Rowhammer is a software induced fault attack first introduced by Kim et al . ( 2014 ) . Recently , Frigo et al . ( 2020 ) and de Ridder et al . ( 2021 ) have shown that more than 80 % of the DRAM chips in the market are vulnerable to the Rowhammer attack including DDR4 chips having Target Row Refresh ( TRR ) mitigation . The Error Correcting Codes ( ECC ) mitigation has also been bypassed in Cojocar et al . ( 2019 ) . Rowhammer is a great threat to shared cloud environments ( Cojocar et al. , 2020 ; Xiao et al. , 2016 ) as it can be launched across virtual machine ( VM ) boundaries and even remotely through JavaScript . More recently , Qazi et al . ( 2021 ) have shown a combined effect of more than two aggressor rows to induce bit flips in recent generations of DRAM chips . All existing Rowhammer defenses including TRR , ECC , detection using Hardware Performance Counters and changing the refresh rate can not fully prevent Rowhammer attack ( Gruss et al. , 2018 ; Frigo et al. , 2020 ) . The only requirement of the Rowhammer attack is that the attacker and the victim share the same DRAM chip , vulnerable to the Rowhammer attack . 3 METHODOLOGY . 3.1 THREAT MODELS . Same as in earlier works ( Gu et al. , 2017 ; Rakin et al. , 2020a ; Liu et al. , 2017b ; Hong et al. , 2019 ; Yao et al. , 2020 ) , we assume that the attacker • only knows the model architecture and model parameters ; • has a small percentage of the unseen test data set ; • does not have access to the training hyperparameters , or the training dataset ; • is involved only after the model deployment in a cloud server , and therefore does not need to modify the software supply chain ; • resides in the same physical memory as the target model ; • has no more than regular user privileges ( no root access ) . Such threat models are well motivated in shared cloud instances targeting a co-located host running the model , and in sandboxed browsers targeting a model residing in the memory of the host machine ( Cojocar et al. , 2020 ; Xiao et al. , 2016 ; de Ridder et al. , 2021 ) . To better understand our attacker , we illustrate an example in Fig . 1 . The attacker works as follows : 1 . Offline Attack Phase : By studying the model parameters and the memory , the attacker generates a trigger pattern and determines the vulnerable bits in the target model . 2 . Dynamic Trigger Injection : After the target model is loaded into the memory , using Rowhammer the attacker flips the target bits by only accessing its own data that resides in the neighboring rows of the weight matrices in the DRAM . 3 . Misclassification : After the backdoor is inserted , the model will misclassify the trigger-added input to the target class . The misclassification will persist until the backdoored model is unloaded from the memory . Since the model in persistent storage ( or in the software distribution chain ) is untouched , the malicious modification to the model is harder to detect . 3.2 OFFLINE ATTACK PHASE . In the offline phase of the attack , we optimize the trigger pattern and the bit-flip locations in the weight matrices . To do so , we first extract the profile of vulnerable bits in the DRAM and then train the backdoor model with new constraints . Note that this phase is independent on the hardware specification , and the learned model can be used freely in any DRAM . 3.2.1 ROWHAMMER PROFILING . Rowhammer profiling is a process of finding vulnerable memory addresses in the DRAM . This process can be performed offline before the victim starts running . We have used the Hammertime tool 1 by Tatar et al . ( 2018 ) to profile our DRAM with double-sided Rowhammer . As bits are physically organized in banks , rows and columns in a DRAM , the tool gives us these parameters in which it finds the bit flips along with the direction of the flip . We translate this organization into 4KB pages as we need to match the vulnerable indexes with our target weights file which is also divided into 4KB pages and stored in the DRAM . Among all the available Rowhammer tools , Hammertime gives the most number of bit flips as shown in ( Tatar et al. , 2018 ) . In practice , we observe that only 0.036 % of the total cells in the 128MB buffer have bit flips , as illustrated in Fig . 2 . Hence , assuming a specific sequence of bit flips within a page like in previous research is highly unrealistic . | The paper explores backdoor injection attacks on machine learning models, the attack develops in the following way: 1. The model and its parameters are studied offline to determine a trigger pattern and the bits that must be modified in the target model. 2. A RowHammer attack is used to modify the bits of the model after it is loaded into DRAM 3. When inputs are received which include a trigger, the model will misclassify the input. In the case of "clean" inputs, the aim is to leave the performance unchanged. * unlike previous work vulnerable bits are sought throughout the model (not just the last layer) * care is taken to understand the limitations of the RowHammer attack, i.e. in reality only a small number of specific bits can be flipped * a new technique is used to jointly find weight modifications and the data trigger pattern (CFT with BR) | SP:b3e5809388bf3faf9150b64dbfa5971e207ff7f1 |
GRAND++: Graph Neural Diffusion with A Source Term | 1 INTRODUCTION . Graph neural networks ( GNNs ) are the backbone for deep learning on graphs . Recent GNN architectures include graph convolutional networks ( GCNs ) [ 30 ] , ChebyNet [ 16 ] , GraphSAGE [ 29 ] , neural graph fingerprints [ 20 ] , message passing neural networks [ 28 ] , and graph attention networks ( GATs ) [ 54 ] . These graph deep networks have achieved success in many applications , including computational physics and computational chemistry [ 20 , 28 , 3 ] , recommender systems [ 41 , 62 ] , and social networks [ 63 , 47 ] . Hyperbolic GNNs have also been proposed to enable certain kinds of data embedding with much smaller distortion [ 11 , 37 ] . See [ 6 ] for some recent advances of GNN algorithm development and applications . A well-known problem of GNNs is that increasing the depth of GNNs often results in a significant drop in performance on various graph learning tasks . This performance degradation has been widely interpreted as the over-smoothing issue of GNNs [ 35 , 44 , 12 ] . Intuitively , GNN layers update the node representation by taking a weighted average of its neighbors ’ features , making representations for neighboring nodes to be similar . As the GNN architecture gets deeper , all nodes ’ representation will become indistinguishable resulting in over-smoothing . In Sec . 2 , we briefly show that certain GNNs have a diffusive nature which makes over-smoothing inevitable . Another interesting interpretation of the GNN performance degradation is via a bottleneck [ 1 ] , since a GNN tends to represent exponentially growing information from neighbors with fixed-size vectors . Several algorithms have been proposed to mitigate the over-smoothing of GNNs , including skip connection and dilated convolution [ 33 ] , Jumping Knowledge [ 60 ] , DropEdge [ 49 ] , PairNorm [ 64 ] , graph neural diffusion ( GRAND ) [ 10 ] , and wave equation motivated GNNs [ 21 ] . Nevertheless , developing deep GNN architectures is still in its infancy compared to the development of other deep networks . Besides suffering from over-smoothing , we notice that the accuracy of existing GNNs drops severely when they are trained with a limited labeled data . As illustrated in Fig . 1 , the test accuracy of several ∗Correspond to wangbaonj @ gmail.com or matthew.thorpe-2 @ manchester.ac.uk celebrated GNN architectures , including GCN , GAT , and GraphSage , drops rapidly when they are trained with fewer labeled data . Moreover , the variance of classification accuracy grows significantly as number of labeled nodes drops . Indeed , semi-supervised graph learning with very low-labeling rates has been studied in the Laplace learning and graph deep learning settings , see , e.g. , [ 36 , 9 , 23 ] ; one question is can we develop new GNN architectures to improve the performance of graph deep learning in low-labeling rate regimes ? 1.1 OUR CONTRIBUTION . With the above GNN problems in mind , we focus on developing new continuous-depth GNNs to overcome over-smoothing and boost the accuracy of GNNs with a limited number of labeled data . We first present a random walk interpretation of the GRAND model [ 10 ] , revealing a potentially inevitable over-smoothing phenomenon when GRAND is implicitly very deep . Based on the random walk viewpoint of GRAND , we then propose graph neural diffusion with a source term ( GRAND++ ) that corrects the bias arising from the diffusion process , see Sec . 5 for details . GRAND++ theoretically guarantees that : ( i ) under GRAND++ dynamics , the graph node features do not converge to a constant vector over all nodes even as the time goes to infinity , and ( ii ) GRAND++ can provide accurate prediction even when it is trained with a limited number of labeled nodes . Moreover , these theoretical results resonate with the practical advantages of GRAND++ . We summarize the major practical advantages of GRAND++ below . • GRAND++ can effectively overcome the over-smoothing issue ; it is remarkably more accurate than existing GNNs when the architecture is very deep . • GRAND++ is suitable for graph deep learning when only a few nodes are labeled as training data . Moreover , in the low-labeling rates , GRAND++ can be more accurate when the network is deeper . • GRAND++ inherits the continuous-depth merit from GRAND , which defines the network depth implicitly and enables memory-efficient training by using the adjoint method . 1.2 RELATED WORK . Diffusion on graphs and continuous-depth graph neural networks . Diffusion has been defined on graphs , see , e.g. , [ 25 , 24 ] , and used in various applications , including data clustering and dimension reduction [ 15 , 4 ] , image processing [ 27 , 22 , 17 , 38 ] , and semi-supervised graph nodes classification [ 67 , 65 ] . From the numerical viewpoint , fast algorithms have been proposed for using diffusion on graphs to solve penalized graph cut problems [ 26 ] . The connection between GNNs and diffusion on graphs has been studied substantially . For instance , GNN has been interpreted as a diffusion process on graphs , which performs low-pass filtering on the input features [ 43 ] . Moreover , insights from the diffusion process on graphs have been used to improve the performance of GNNs , see , e.g. , [ 2 , 36 , 31 , 57 ] . Leveraging neural ordinary differential equations ( ODEs ) [ 13 ] , continuous-depth GNNs have been proposed , see , e.g. , [ 45 , 58 , 68 ] . One recent work is GRAND [ 10 ] , which parameterizes the diffusion equation on graphs with a neural network . See Sec . 3 for a brief review of GRAND . Neural ODEs . Neural ODEs [ 13 ] are a class of continuous-depth neural networks whose depth is defined implicitly . Training neural ODEs using the adjoint method [ 46 ] is more memory efficient than training other neural networks using backpropagation . We provide a brief review of neural ODEs and the adjoint method in Appendix C. GRANDs [ 10 ] are a class of neural partial differential equations ( PDEs ) on graphs that can also be considered as a coupled system of neural ODEs . Furthermore , GRANDs are also trained by using the adjoint method . Laplace learning and Poisson learning . Laplace learning has been used for semi-supervised data classification [ 67 , 65 , 56 ] , image processing [ 7 , 27 ] , etc . Direct application of Laplace learning with Gaussian weights [ 5 ] or locally linear embedding weights [ 50 ] for the above tasks may cause inference inconsistency when only a limited number of graph nodes are labeled , resulting in poor performance . Several algorithms address the inference inconsistency at low labeling rate . They include up-weighting the weights of the labeled data [ 52 ] and the p-Laplacian [ 8 , 48 , 66 ] . In [ 9 ] , the authors have proposed Poisson learning for improving Laplace learning at extremely low-labeling rate regimes . Poisson learning augments Laplace learning with a Green ’ s function at each labeled data , enabling accurate node classification when only a few labeled data are available . Compared to Laplace learning , Poisson learning adds Green ’ s function to the label of each labeled node and then performs label propagation to predict the label for unlabeled graph nodes . GRAND and GRAND++ both learn graph node representations and perform prediction by activating the node representations , which are fundamentally different from Laplace and Poisson learning . 1.3 NOTATION . We denote scalars by lower- or upper-case letters and vectors and matrices by lower- and upper-case boldface letters , respectively . For a matrix A , we denote its transpose as A > and its Hadamard product with another matrix B as A B , i.e. , the entrywise multiplication of A and B . We write the set { 1 , 2 , · · · , n } as [ n ] . We denote the probability and expectation of a given random variable x as P ( x ) and E [ x ] , respectively . The meaning of other notations can be inferred from the context . 1.4 ORGANIZATION . The paper is organized as follows : In Sec . 2 , we review diffusion equation on graphs and its connection to GNNs . In Secs . 3 and 4 , we briefly review GRAND and present a random walk interpretation of GRAND , respectively . Leveraging the random walk viewpoint of GRAND , we propose GRAND++ for deep graph learning with theoretical guarantees in Sec . 5 . We verify the efficacy of GRAND++ in Sec . 6 . Technical proofs and more validations are provided in the appendix . 2 BACKGROUND . Diffusion equation on graphs . Let G = ( X , W ) represent an undirected graph with n nodes , where X = ( [ x ( 1 ) ] > , · · · , [ x ( n ) ] > ) > ∈ Rn×d with each row x ( i ) ∈ Rd a feature vector and W : = ( Wij ) a n × n matrix with Wij representing the similarity ( edge weight ) between the ith and jth feature vectors , and we assume Wij = Wji . Consider the following diffusion process that evolves the feature matrix X on the graph ( see Appendix A for a brief review of calculus on graphs ) : ∂X ( t ) ∂t = div ( G ( X ( t ) , t ) ∇X ( t ) ) , ( 1 ) where X ( t ) = ( [ x ( 1 ) ( t ) ] > , · · · , [ x ( n ) ( t ) ] > ) > ∈ Rn×d with x ( i ) ( 0 ) = x ( i ) , ∇ and div are the gradient and divergence operators , respectively . The matrix G ( X ( t ) , t ) is chosen such that W G is right-stochastic , i.e. , each row of W G summing to 1 . In the machine learning setting , we can parameterize G with learnable parameters θ which we denote by G ( X ( t ) , t , θ ) . The initial features are evolved under the diffusion dynamics ( 1 ) from t = 0 to T to learn the final representation X ( T ) for further machine learning tasks . In the simplest case when G ( X ( t ) , t ) is only dependent on the initial node features X , i.e. , G is time-independent , right-stochasticity implies ∑ jWijGij = 1 for all i , and so we focus on the particular case when Gij = 1/di with di = ∑n j=1Wij . In this case the right-hand side of ( 1 ) reduces to the negative of the random-walk Laplacian applied to X ( t ) and ( 1 ) becomes ∂X ( t ) ∂t = div ( G ( X ( t ) , t ) ∇X ( t ) ) = −LX ( t ) , ( 2 ) where L = I −D−1W : = I −A ( A : = A ( X ) ) is the random walk Laplacian and D is diagonal with Dii = di . See [ 14 , 25 , 24 ] for more about random walk Laplacian and diffusion on graphs . Graph neural networks . Applying forward Euler discretization , with step size δt < 1 , of ( 2 ) gives X ( kδt ) = X ( ( k − 1 ) δt ) − δtLX ( ( k − 1 ) δt ) : = L̃X ( ( k − 1 ) δt ) , for k = 1 , 2 , · · · , K , ( 3 ) T = Kδt , and X ( 0 ) = X . Note that the matrix L̃ is the discretization of the diffusion operator , which is a special low-pass filter . Equation ( 3 ) is a prototype for motivating GNNs : by introducing weights W ( k ) ∈ Rd×d and a nonlinearity σ , e.g. , ReLU , into ( 3 ) , we have X ( ( k + 1 ) δt ) = σ ( L̃X ( kδt ) W ( k ) ) . ( 4 ) The model in ( 4 ) is similar to the well-established GCN architecture proposed in [ 30 ] . The diffusive nature of the GNN architecture in ( 4 ) further explains the over-smoothing issue of training deep GNNs ; the deeper the network architecture is , the more the node features diffuse . Eventually , all nodes share similar features and become indistinguishable . See Sec . 5 for a detailed analysis . | This paper studies neural-based diffusion models for graph data. It considers deep learning on graphs as a continuous diffusion process and treats GNNs as discretizations of an underlying PDE. The authors build upon an existing work (GRAND) by adding a source term to the objective function. The source term is designed to alleviate the over-smoothing problem of GNN, a well-known phenomenon that deeper GNN learns similar representation for each node. They theoretically show the effectiveness of the source term in mitigation over-smoothing problem. Furthermore, they empirically assess their method's effectiveness in learning with limited labeled data and using deep architectures on several benchmark datasets. | SP:a917bbd788e22f4d9939dcbe6398eff6f7e8c8a2 |
GRAND++: Graph Neural Diffusion with A Source Term | 1 INTRODUCTION . Graph neural networks ( GNNs ) are the backbone for deep learning on graphs . Recent GNN architectures include graph convolutional networks ( GCNs ) [ 30 ] , ChebyNet [ 16 ] , GraphSAGE [ 29 ] , neural graph fingerprints [ 20 ] , message passing neural networks [ 28 ] , and graph attention networks ( GATs ) [ 54 ] . These graph deep networks have achieved success in many applications , including computational physics and computational chemistry [ 20 , 28 , 3 ] , recommender systems [ 41 , 62 ] , and social networks [ 63 , 47 ] . Hyperbolic GNNs have also been proposed to enable certain kinds of data embedding with much smaller distortion [ 11 , 37 ] . See [ 6 ] for some recent advances of GNN algorithm development and applications . A well-known problem of GNNs is that increasing the depth of GNNs often results in a significant drop in performance on various graph learning tasks . This performance degradation has been widely interpreted as the over-smoothing issue of GNNs [ 35 , 44 , 12 ] . Intuitively , GNN layers update the node representation by taking a weighted average of its neighbors ’ features , making representations for neighboring nodes to be similar . As the GNN architecture gets deeper , all nodes ’ representation will become indistinguishable resulting in over-smoothing . In Sec . 2 , we briefly show that certain GNNs have a diffusive nature which makes over-smoothing inevitable . Another interesting interpretation of the GNN performance degradation is via a bottleneck [ 1 ] , since a GNN tends to represent exponentially growing information from neighbors with fixed-size vectors . Several algorithms have been proposed to mitigate the over-smoothing of GNNs , including skip connection and dilated convolution [ 33 ] , Jumping Knowledge [ 60 ] , DropEdge [ 49 ] , PairNorm [ 64 ] , graph neural diffusion ( GRAND ) [ 10 ] , and wave equation motivated GNNs [ 21 ] . Nevertheless , developing deep GNN architectures is still in its infancy compared to the development of other deep networks . Besides suffering from over-smoothing , we notice that the accuracy of existing GNNs drops severely when they are trained with a limited labeled data . As illustrated in Fig . 1 , the test accuracy of several ∗Correspond to wangbaonj @ gmail.com or matthew.thorpe-2 @ manchester.ac.uk celebrated GNN architectures , including GCN , GAT , and GraphSage , drops rapidly when they are trained with fewer labeled data . Moreover , the variance of classification accuracy grows significantly as number of labeled nodes drops . Indeed , semi-supervised graph learning with very low-labeling rates has been studied in the Laplace learning and graph deep learning settings , see , e.g. , [ 36 , 9 , 23 ] ; one question is can we develop new GNN architectures to improve the performance of graph deep learning in low-labeling rate regimes ? 1.1 OUR CONTRIBUTION . With the above GNN problems in mind , we focus on developing new continuous-depth GNNs to overcome over-smoothing and boost the accuracy of GNNs with a limited number of labeled data . We first present a random walk interpretation of the GRAND model [ 10 ] , revealing a potentially inevitable over-smoothing phenomenon when GRAND is implicitly very deep . Based on the random walk viewpoint of GRAND , we then propose graph neural diffusion with a source term ( GRAND++ ) that corrects the bias arising from the diffusion process , see Sec . 5 for details . GRAND++ theoretically guarantees that : ( i ) under GRAND++ dynamics , the graph node features do not converge to a constant vector over all nodes even as the time goes to infinity , and ( ii ) GRAND++ can provide accurate prediction even when it is trained with a limited number of labeled nodes . Moreover , these theoretical results resonate with the practical advantages of GRAND++ . We summarize the major practical advantages of GRAND++ below . • GRAND++ can effectively overcome the over-smoothing issue ; it is remarkably more accurate than existing GNNs when the architecture is very deep . • GRAND++ is suitable for graph deep learning when only a few nodes are labeled as training data . Moreover , in the low-labeling rates , GRAND++ can be more accurate when the network is deeper . • GRAND++ inherits the continuous-depth merit from GRAND , which defines the network depth implicitly and enables memory-efficient training by using the adjoint method . 1.2 RELATED WORK . Diffusion on graphs and continuous-depth graph neural networks . Diffusion has been defined on graphs , see , e.g. , [ 25 , 24 ] , and used in various applications , including data clustering and dimension reduction [ 15 , 4 ] , image processing [ 27 , 22 , 17 , 38 ] , and semi-supervised graph nodes classification [ 67 , 65 ] . From the numerical viewpoint , fast algorithms have been proposed for using diffusion on graphs to solve penalized graph cut problems [ 26 ] . The connection between GNNs and diffusion on graphs has been studied substantially . For instance , GNN has been interpreted as a diffusion process on graphs , which performs low-pass filtering on the input features [ 43 ] . Moreover , insights from the diffusion process on graphs have been used to improve the performance of GNNs , see , e.g. , [ 2 , 36 , 31 , 57 ] . Leveraging neural ordinary differential equations ( ODEs ) [ 13 ] , continuous-depth GNNs have been proposed , see , e.g. , [ 45 , 58 , 68 ] . One recent work is GRAND [ 10 ] , which parameterizes the diffusion equation on graphs with a neural network . See Sec . 3 for a brief review of GRAND . Neural ODEs . Neural ODEs [ 13 ] are a class of continuous-depth neural networks whose depth is defined implicitly . Training neural ODEs using the adjoint method [ 46 ] is more memory efficient than training other neural networks using backpropagation . We provide a brief review of neural ODEs and the adjoint method in Appendix C. GRANDs [ 10 ] are a class of neural partial differential equations ( PDEs ) on graphs that can also be considered as a coupled system of neural ODEs . Furthermore , GRANDs are also trained by using the adjoint method . Laplace learning and Poisson learning . Laplace learning has been used for semi-supervised data classification [ 67 , 65 , 56 ] , image processing [ 7 , 27 ] , etc . Direct application of Laplace learning with Gaussian weights [ 5 ] or locally linear embedding weights [ 50 ] for the above tasks may cause inference inconsistency when only a limited number of graph nodes are labeled , resulting in poor performance . Several algorithms address the inference inconsistency at low labeling rate . They include up-weighting the weights of the labeled data [ 52 ] and the p-Laplacian [ 8 , 48 , 66 ] . In [ 9 ] , the authors have proposed Poisson learning for improving Laplace learning at extremely low-labeling rate regimes . Poisson learning augments Laplace learning with a Green ’ s function at each labeled data , enabling accurate node classification when only a few labeled data are available . Compared to Laplace learning , Poisson learning adds Green ’ s function to the label of each labeled node and then performs label propagation to predict the label for unlabeled graph nodes . GRAND and GRAND++ both learn graph node representations and perform prediction by activating the node representations , which are fundamentally different from Laplace and Poisson learning . 1.3 NOTATION . We denote scalars by lower- or upper-case letters and vectors and matrices by lower- and upper-case boldface letters , respectively . For a matrix A , we denote its transpose as A > and its Hadamard product with another matrix B as A B , i.e. , the entrywise multiplication of A and B . We write the set { 1 , 2 , · · · , n } as [ n ] . We denote the probability and expectation of a given random variable x as P ( x ) and E [ x ] , respectively . The meaning of other notations can be inferred from the context . 1.4 ORGANIZATION . The paper is organized as follows : In Sec . 2 , we review diffusion equation on graphs and its connection to GNNs . In Secs . 3 and 4 , we briefly review GRAND and present a random walk interpretation of GRAND , respectively . Leveraging the random walk viewpoint of GRAND , we propose GRAND++ for deep graph learning with theoretical guarantees in Sec . 5 . We verify the efficacy of GRAND++ in Sec . 6 . Technical proofs and more validations are provided in the appendix . 2 BACKGROUND . Diffusion equation on graphs . Let G = ( X , W ) represent an undirected graph with n nodes , where X = ( [ x ( 1 ) ] > , · · · , [ x ( n ) ] > ) > ∈ Rn×d with each row x ( i ) ∈ Rd a feature vector and W : = ( Wij ) a n × n matrix with Wij representing the similarity ( edge weight ) between the ith and jth feature vectors , and we assume Wij = Wji . Consider the following diffusion process that evolves the feature matrix X on the graph ( see Appendix A for a brief review of calculus on graphs ) : ∂X ( t ) ∂t = div ( G ( X ( t ) , t ) ∇X ( t ) ) , ( 1 ) where X ( t ) = ( [ x ( 1 ) ( t ) ] > , · · · , [ x ( n ) ( t ) ] > ) > ∈ Rn×d with x ( i ) ( 0 ) = x ( i ) , ∇ and div are the gradient and divergence operators , respectively . The matrix G ( X ( t ) , t ) is chosen such that W G is right-stochastic , i.e. , each row of W G summing to 1 . In the machine learning setting , we can parameterize G with learnable parameters θ which we denote by G ( X ( t ) , t , θ ) . The initial features are evolved under the diffusion dynamics ( 1 ) from t = 0 to T to learn the final representation X ( T ) for further machine learning tasks . In the simplest case when G ( X ( t ) , t ) is only dependent on the initial node features X , i.e. , G is time-independent , right-stochasticity implies ∑ jWijGij = 1 for all i , and so we focus on the particular case when Gij = 1/di with di = ∑n j=1Wij . In this case the right-hand side of ( 1 ) reduces to the negative of the random-walk Laplacian applied to X ( t ) and ( 1 ) becomes ∂X ( t ) ∂t = div ( G ( X ( t ) , t ) ∇X ( t ) ) = −LX ( t ) , ( 2 ) where L = I −D−1W : = I −A ( A : = A ( X ) ) is the random walk Laplacian and D is diagonal with Dii = di . See [ 14 , 25 , 24 ] for more about random walk Laplacian and diffusion on graphs . Graph neural networks . Applying forward Euler discretization , with step size δt < 1 , of ( 2 ) gives X ( kδt ) = X ( ( k − 1 ) δt ) − δtLX ( ( k − 1 ) δt ) : = L̃X ( ( k − 1 ) δt ) , for k = 1 , 2 , · · · , K , ( 3 ) T = Kδt , and X ( 0 ) = X . Note that the matrix L̃ is the discretization of the diffusion operator , which is a special low-pass filter . Equation ( 3 ) is a prototype for motivating GNNs : by introducing weights W ( k ) ∈ Rd×d and a nonlinearity σ , e.g. , ReLU , into ( 3 ) , we have X ( ( k + 1 ) δt ) = σ ( L̃X ( kδt ) W ( k ) ) . ( 4 ) The model in ( 4 ) is similar to the well-established GCN architecture proposed in [ 30 ] . The diffusive nature of the GNN architecture in ( 4 ) further explains the over-smoothing issue of training deep GNNs ; the deeper the network architecture is , the more the node features diffuse . Eventually , all nodes share similar features and become indistinguishable . See Sec . 5 for a detailed analysis . | The paper introduces GRAND++, GRAph Neural Diffusion with a source term. As its predecessor GRAND, this method is focused on the development of a new continuous-depth GNN to tackle the over-smoothing and the bottleneck issues which are typical of deep GNNs. The authors introduce a random-walk interpretation of GRAND, which shows that when the network is very deep it is still prone to over-smoothing. To address this problem they add a source term to the problem formulation, which is shown to provide better results in very deep models and in classification tasks which are characterised by a low amount of labeled data. | SP:a917bbd788e22f4d9939dcbe6398eff6f7e8c8a2 |
GRAND++: Graph Neural Diffusion with A Source Term | 1 INTRODUCTION . Graph neural networks ( GNNs ) are the backbone for deep learning on graphs . Recent GNN architectures include graph convolutional networks ( GCNs ) [ 30 ] , ChebyNet [ 16 ] , GraphSAGE [ 29 ] , neural graph fingerprints [ 20 ] , message passing neural networks [ 28 ] , and graph attention networks ( GATs ) [ 54 ] . These graph deep networks have achieved success in many applications , including computational physics and computational chemistry [ 20 , 28 , 3 ] , recommender systems [ 41 , 62 ] , and social networks [ 63 , 47 ] . Hyperbolic GNNs have also been proposed to enable certain kinds of data embedding with much smaller distortion [ 11 , 37 ] . See [ 6 ] for some recent advances of GNN algorithm development and applications . A well-known problem of GNNs is that increasing the depth of GNNs often results in a significant drop in performance on various graph learning tasks . This performance degradation has been widely interpreted as the over-smoothing issue of GNNs [ 35 , 44 , 12 ] . Intuitively , GNN layers update the node representation by taking a weighted average of its neighbors ’ features , making representations for neighboring nodes to be similar . As the GNN architecture gets deeper , all nodes ’ representation will become indistinguishable resulting in over-smoothing . In Sec . 2 , we briefly show that certain GNNs have a diffusive nature which makes over-smoothing inevitable . Another interesting interpretation of the GNN performance degradation is via a bottleneck [ 1 ] , since a GNN tends to represent exponentially growing information from neighbors with fixed-size vectors . Several algorithms have been proposed to mitigate the over-smoothing of GNNs , including skip connection and dilated convolution [ 33 ] , Jumping Knowledge [ 60 ] , DropEdge [ 49 ] , PairNorm [ 64 ] , graph neural diffusion ( GRAND ) [ 10 ] , and wave equation motivated GNNs [ 21 ] . Nevertheless , developing deep GNN architectures is still in its infancy compared to the development of other deep networks . Besides suffering from over-smoothing , we notice that the accuracy of existing GNNs drops severely when they are trained with a limited labeled data . As illustrated in Fig . 1 , the test accuracy of several ∗Correspond to wangbaonj @ gmail.com or matthew.thorpe-2 @ manchester.ac.uk celebrated GNN architectures , including GCN , GAT , and GraphSage , drops rapidly when they are trained with fewer labeled data . Moreover , the variance of classification accuracy grows significantly as number of labeled nodes drops . Indeed , semi-supervised graph learning with very low-labeling rates has been studied in the Laplace learning and graph deep learning settings , see , e.g. , [ 36 , 9 , 23 ] ; one question is can we develop new GNN architectures to improve the performance of graph deep learning in low-labeling rate regimes ? 1.1 OUR CONTRIBUTION . With the above GNN problems in mind , we focus on developing new continuous-depth GNNs to overcome over-smoothing and boost the accuracy of GNNs with a limited number of labeled data . We first present a random walk interpretation of the GRAND model [ 10 ] , revealing a potentially inevitable over-smoothing phenomenon when GRAND is implicitly very deep . Based on the random walk viewpoint of GRAND , we then propose graph neural diffusion with a source term ( GRAND++ ) that corrects the bias arising from the diffusion process , see Sec . 5 for details . GRAND++ theoretically guarantees that : ( i ) under GRAND++ dynamics , the graph node features do not converge to a constant vector over all nodes even as the time goes to infinity , and ( ii ) GRAND++ can provide accurate prediction even when it is trained with a limited number of labeled nodes . Moreover , these theoretical results resonate with the practical advantages of GRAND++ . We summarize the major practical advantages of GRAND++ below . • GRAND++ can effectively overcome the over-smoothing issue ; it is remarkably more accurate than existing GNNs when the architecture is very deep . • GRAND++ is suitable for graph deep learning when only a few nodes are labeled as training data . Moreover , in the low-labeling rates , GRAND++ can be more accurate when the network is deeper . • GRAND++ inherits the continuous-depth merit from GRAND , which defines the network depth implicitly and enables memory-efficient training by using the adjoint method . 1.2 RELATED WORK . Diffusion on graphs and continuous-depth graph neural networks . Diffusion has been defined on graphs , see , e.g. , [ 25 , 24 ] , and used in various applications , including data clustering and dimension reduction [ 15 , 4 ] , image processing [ 27 , 22 , 17 , 38 ] , and semi-supervised graph nodes classification [ 67 , 65 ] . From the numerical viewpoint , fast algorithms have been proposed for using diffusion on graphs to solve penalized graph cut problems [ 26 ] . The connection between GNNs and diffusion on graphs has been studied substantially . For instance , GNN has been interpreted as a diffusion process on graphs , which performs low-pass filtering on the input features [ 43 ] . Moreover , insights from the diffusion process on graphs have been used to improve the performance of GNNs , see , e.g. , [ 2 , 36 , 31 , 57 ] . Leveraging neural ordinary differential equations ( ODEs ) [ 13 ] , continuous-depth GNNs have been proposed , see , e.g. , [ 45 , 58 , 68 ] . One recent work is GRAND [ 10 ] , which parameterizes the diffusion equation on graphs with a neural network . See Sec . 3 for a brief review of GRAND . Neural ODEs . Neural ODEs [ 13 ] are a class of continuous-depth neural networks whose depth is defined implicitly . Training neural ODEs using the adjoint method [ 46 ] is more memory efficient than training other neural networks using backpropagation . We provide a brief review of neural ODEs and the adjoint method in Appendix C. GRANDs [ 10 ] are a class of neural partial differential equations ( PDEs ) on graphs that can also be considered as a coupled system of neural ODEs . Furthermore , GRANDs are also trained by using the adjoint method . Laplace learning and Poisson learning . Laplace learning has been used for semi-supervised data classification [ 67 , 65 , 56 ] , image processing [ 7 , 27 ] , etc . Direct application of Laplace learning with Gaussian weights [ 5 ] or locally linear embedding weights [ 50 ] for the above tasks may cause inference inconsistency when only a limited number of graph nodes are labeled , resulting in poor performance . Several algorithms address the inference inconsistency at low labeling rate . They include up-weighting the weights of the labeled data [ 52 ] and the p-Laplacian [ 8 , 48 , 66 ] . In [ 9 ] , the authors have proposed Poisson learning for improving Laplace learning at extremely low-labeling rate regimes . Poisson learning augments Laplace learning with a Green ’ s function at each labeled data , enabling accurate node classification when only a few labeled data are available . Compared to Laplace learning , Poisson learning adds Green ’ s function to the label of each labeled node and then performs label propagation to predict the label for unlabeled graph nodes . GRAND and GRAND++ both learn graph node representations and perform prediction by activating the node representations , which are fundamentally different from Laplace and Poisson learning . 1.3 NOTATION . We denote scalars by lower- or upper-case letters and vectors and matrices by lower- and upper-case boldface letters , respectively . For a matrix A , we denote its transpose as A > and its Hadamard product with another matrix B as A B , i.e. , the entrywise multiplication of A and B . We write the set { 1 , 2 , · · · , n } as [ n ] . We denote the probability and expectation of a given random variable x as P ( x ) and E [ x ] , respectively . The meaning of other notations can be inferred from the context . 1.4 ORGANIZATION . The paper is organized as follows : In Sec . 2 , we review diffusion equation on graphs and its connection to GNNs . In Secs . 3 and 4 , we briefly review GRAND and present a random walk interpretation of GRAND , respectively . Leveraging the random walk viewpoint of GRAND , we propose GRAND++ for deep graph learning with theoretical guarantees in Sec . 5 . We verify the efficacy of GRAND++ in Sec . 6 . Technical proofs and more validations are provided in the appendix . 2 BACKGROUND . Diffusion equation on graphs . Let G = ( X , W ) represent an undirected graph with n nodes , where X = ( [ x ( 1 ) ] > , · · · , [ x ( n ) ] > ) > ∈ Rn×d with each row x ( i ) ∈ Rd a feature vector and W : = ( Wij ) a n × n matrix with Wij representing the similarity ( edge weight ) between the ith and jth feature vectors , and we assume Wij = Wji . Consider the following diffusion process that evolves the feature matrix X on the graph ( see Appendix A for a brief review of calculus on graphs ) : ∂X ( t ) ∂t = div ( G ( X ( t ) , t ) ∇X ( t ) ) , ( 1 ) where X ( t ) = ( [ x ( 1 ) ( t ) ] > , · · · , [ x ( n ) ( t ) ] > ) > ∈ Rn×d with x ( i ) ( 0 ) = x ( i ) , ∇ and div are the gradient and divergence operators , respectively . The matrix G ( X ( t ) , t ) is chosen such that W G is right-stochastic , i.e. , each row of W G summing to 1 . In the machine learning setting , we can parameterize G with learnable parameters θ which we denote by G ( X ( t ) , t , θ ) . The initial features are evolved under the diffusion dynamics ( 1 ) from t = 0 to T to learn the final representation X ( T ) for further machine learning tasks . In the simplest case when G ( X ( t ) , t ) is only dependent on the initial node features X , i.e. , G is time-independent , right-stochasticity implies ∑ jWijGij = 1 for all i , and so we focus on the particular case when Gij = 1/di with di = ∑n j=1Wij . In this case the right-hand side of ( 1 ) reduces to the negative of the random-walk Laplacian applied to X ( t ) and ( 1 ) becomes ∂X ( t ) ∂t = div ( G ( X ( t ) , t ) ∇X ( t ) ) = −LX ( t ) , ( 2 ) where L = I −D−1W : = I −A ( A : = A ( X ) ) is the random walk Laplacian and D is diagonal with Dii = di . See [ 14 , 25 , 24 ] for more about random walk Laplacian and diffusion on graphs . Graph neural networks . Applying forward Euler discretization , with step size δt < 1 , of ( 2 ) gives X ( kδt ) = X ( ( k − 1 ) δt ) − δtLX ( ( k − 1 ) δt ) : = L̃X ( ( k − 1 ) δt ) , for k = 1 , 2 , · · · , K , ( 3 ) T = Kδt , and X ( 0 ) = X . Note that the matrix L̃ is the discretization of the diffusion operator , which is a special low-pass filter . Equation ( 3 ) is a prototype for motivating GNNs : by introducing weights W ( k ) ∈ Rd×d and a nonlinearity σ , e.g. , ReLU , into ( 3 ) , we have X ( ( k + 1 ) δt ) = σ ( L̃X ( kδt ) W ( k ) ) . ( 4 ) The model in ( 4 ) is similar to the well-established GCN architecture proposed in [ 30 ] . The diffusive nature of the GNN architecture in ( 4 ) further explains the over-smoothing issue of training deep GNNs ; the deeper the network architecture is , the more the node features diffuse . Eventually , all nodes share similar features and become indistinguishable . See Sec . 5 for a detailed analysis . | In this paper, the authors propose a graph deep learning method called GRAND++. This framework based on GRAND and can work with a limited number of labeled nodes. Experiments are also conducted to demonstrate the effectiveness of the method. | SP:a917bbd788e22f4d9939dcbe6398eff6f7e8c8a2 |
NETWORK INSENSITIVITY TO PARAMETER NOISE VIA PARAMETER ATTACK DURING TRAINING | 1 INTRODUCTION . There is increasing interest in NN and ML inference on IoT and embedded devices , which imposes energy constraints due to small battery capacity and untethered operation . Existing edge inference solutions based on CPUs or vector processing engines such as GPUs or TPUs are improving in energy efficiency , but still entail considerable energy cost ( Huang et al. , 2009 ) . Alternative compute architectures such as memristor crossbar arrays and mixed-signal event-driven neural network accelerators promise significantly reduced energy consumption for edge inference tasks . Novel non-volatile memory technologies such as resistive RAM and phase-change materials ( Chen , 2016 ; Yu & Chen , 2016 ) promise increased memory density with multiple bits per memory cell , as well as compact compute-in-memory for NN inference tasks ( Sebastian et al. , 2020 ) . Analog implementations of neurons and synapses , coupled with asynchronous digital routing fabrics , permit high sparsity in both network architecture and activity , thereby reducing energy costs associated with computation . However , both of these novel compute fabrics introduce complexity in the form of computational non-idealities , which do not exist for pure synchronous digital solutions . Some novel memory technologies support several bits per memory cell , but with uncertainty about the precise value stored on each cycle ( Le Gallo et al. , 2018b ; Wu et al. , 2019 ) . Others exhibit significant drift in stored states ( Joshi et al. , 2020 ) . Inference processors based on analog and mixed-signal devices ( Neckar et al. , 2019 ; Moradi et al. , 2018 ; Cassidy et al. , 2016 ; Schemmel et al. , 2010 ; Khaddam-Aljameh et al. , 2022 ) exhibit parameter variation across the surface of a chip , and between chips , due to manufacturing process non-idealities . Collectively these processes known as “ device mismatch ” manifest as frozen parameter noise in weights and neuron parameters . In all cases the mismatch between configured and implemented network parameters degrades the task performance by modifying the resulting mapping between input and output . Existing solutions for deploying networks to inference devices that exhibit mismatch mostly focus on per-device calibration or re-training ( Ambrogio et al. , 2018 ; Bauer et al. , 2019 ; Nandakumar et al. , 2020a ) . However , this , and other approaches such as few-shot learning or meta learning entail significant per-device handling costs , making them unfit for commercial deployment . We consider a network to be “ robust ” if the output of a network to a given input does not change in the face of parameter perturbation . With this goal , network architectures that are intrinsically robust against device mismatch can be investigated ( Thakur et al. , 2018 ; Büchel et al. , 2021 ) . Another approach is to introduce parameter perturbations during training that promote robustness during inference , for example via random pruning ( dropout ) ( Srivastava et al. , 2014 ) or by injecting noise ( Murray & Edwards , 1994 ) . In this paper we introduce a novel solution , by applying adversarial training approaches to parameter mismatch . Most existing adversarial training methods attack the input space . Here we describe an adversarial attack during training that seeks the parameter perturbation that causes the maximum degradation in network response . In summary , we make the following contributions : • We propose a novel algorithm for gradient-based supervised training of networks that are robust against parameter mismatch , by performing adversarial training in the weight space . • We demonstrate that our algorithm flattens the weight-loss landscape and therefore leads to models that are inherently more robust to parameter noise . • We show that our approach outperforms existing methods in terms of robustness . • We validate our algorithm on a highly accurate Phase Change Memory ( PCM ) -based Computein-Memory ( CiM ) simulator and achieve new state-of-the-art results in terms of performance and performance retention over time . 2 RELATED WORK . Research to date has focused mainly on adversarial attacks in the input space . With an increasing number of adversarial attacks , an increasing number of schemes defending against those attacks have been proposed ( Wang et al. , 2020 ; Zhang et al. , 2019 ; Madry et al. , 2019 ; Moosavi-Dezfooli et al. , 2018 ) . In contrast , adversarial attacks in parameter space have received little attention . Where parameter-space adversaries have been examined , it has been to enhance performance in semisupervised learning ( Cicek & Soatto , 2019 ) , to improve robustness to input-space adversarial attacks ( Wu et al. , 2020 ) , or to improve generalisation capability ( Zheng et al. , 2020 ) . We define “ robustness ” to mean that the network output should change only minimally in the face of a parameter perturbation — in other words , the weight-loss landscape should be as flat as possible at a loss minimum . Other algorithms that promote flat loss landscapes may therefore also be useful to promote robustness to parameter perturbations . Dropout ( Srivastava et al. , 2014 ) is a widely used method to reduce overfitting . During training , a random subset of units are chosen with some probability , and these units are pruned from the network for a single trial or batch . This results in the network learning to distribute its computation across many units , and acts as a regularization against overfitting . Entropy-SGD ( Chaudhari et al. , 2019 ) is a network optimisation method that minimises the local entropy around a solution in parameter space . This results in a smoothed parameter-loss landscape that should penalize sharp minima . Adversarial Block Coordinate Descent ( ABCD ) ( Cicek & Soatto , 2019 ) was proposed in order to complement input-space smoothing with weight-space smoothing in semi-supervised learning . ABCD repeatedly picks half of the network weights and performs one step of gradient ascent on them , followed by applying gradient descent on the other half . Adversarial Weight Perturbation ( AWP ) ( Wu et al. , 2020 ) was designed to improve the robustness of a network to adversarial attacks in the input space . The authors use Projected Gradient Ascent ( PGA ) on the network parameters to approximate a worst case perturbation of the weights Θ′ . PGA repeatedly computes the gradient of a loss function and updates the parameters in the direction of the ( positive ) gradient . After each update , the parameters are projected back onto a ball ( e.g . in l2 ) around the original parameters to ensure that a maximum distance is kept . Having identified an adversarial perturbation in the weight-space , an adversarial perturbation in the input-space is also found using PGA . Finally , the original weights Θ are updated using the gradient of the loss evaluated at the adversarial perturbation Θ′ . Adversarial Model Perturbation ( AMP ) ( Zheng et al. , 2020 ) improves the generalisation of conventional neural networks by optimizing a standard loss evaluated using parameters that were perturbed adversarially using PGA . Unlike our method , ( Zheng et al. , 2020 ) did not formulate the loss function as a trade-off between performance and robustness . Furthermore , the presented algorithm , unlike our method , treats the perturbation ∆Θ to the parameters Θ as a constant during backpropagation . TRadeoff-inspired Adversarial DEfense via Surrogate-loss minimization ( TRADES ) ( Zhang et al. , 2019 ) is a method for training networks that are robust against adversarial examples in the input space . The method consists of adding a boundary loss term to the loss function that measures how the network performance changes when the input is attacked . The boundary loss does not take the labels into account , so scaling it by a factor βrob allows for a principled trade-off between the robustness and the accuracy of the network . Noise injection during the forward pass ( Murray & Edwards , 1994 ) is a simple method for increasing network robustness to parameter noise . This method adds Gaussian noise to the network parameters during the forward pass and computes weight gradients with respect to the original parameters . This method regularizes the gradient magnitudes of output units with respect to the weights , thus enforcing distributed information processing and insensitivity to parameter noise . We refer to this method as “ Forward Noise ” . A recent paper proposed a method for improving the resilience to random and targeted bit errors in SRAM cells on digital Deep Neural Network ( DNN ) accelerators ( Stutz et al. , 2021 ) . By employing adversarial or random bit flips during training , the authors significantly improved the robustness to bit perturbations , enabling the accelerators to be operated below the conventional supply voltage . 3 METHODS . We use Θ to denote the set of parameters of a neural network f ( x , Θ ) that are trainable and susceptible to mismatch . The adversarial weights are denoted Θ∗ , where Θ∗t are the adversarial weights at the t-th iteration of PGA . We denote the PGA-adversary as a function A that maps parameters Θ to attacking parameters Θ∗ . We denote a mini-batch of training examples as X with y being the corresponding ground-truth labels . ∏ Epζ ( m ) denotes the projection operator on the ζ-ellipsoid in lp space . The operator denotes elementwise multiplication . The effect of component mismatch on a network parameter can be modelled using a Gaussian distribution where the standard deviation depends on the parameter magnitude ( Joshi et al. , 2020 ; Büchel et al. , 2021 ) . In this paper we restrict ourselves to mismatch-driven perturbations in the network weights . For complex Spiking Neural Networks ( SNNs ) , “ network parameters ” can refer to additional quantities such as neuronal and synaptic time constants or spiking thresholds . Our training approach described here can be equally applied to these additional parameters . We define the value of an individual parameter when deployed on a neuromorphic chip as Θmismatch ∼ N ( Θ , diag ( ζ|Θ| ) ) ( 1 ) where ζ governs the perturbation magnitude , referred to as the “ mismatch level ” . The physics underlying the neuronal- and synaptic circuits lead to a model where the amount of noise introduced into the system depends linearly on the magnitude of the parameters . If mismatch-induced perturbations had constant standard deviation independent of weight values , one could use the weight-scale invariance of neural networks as a means to achieve robustness , by simply scaling up all network weights ( see Figure S4 ) . The linear dependence of weight magnitude and mismatch noise precludes this approach . In contrast to adversarial attacks in the input space ( Carlini & Wagner , 2016 ; Moosavi-Dezfooli et al. , 2015 ; Madry et al. , 2019 ; Goodfellow et al. , 2015 ) , our method relies on adversarial attacks in parameter space . During training , we approximate the worst case perturbation of the network parameters using PGA and update the network parameters in order to mitigate these attacks . To trade-off robustness and performance , we use a surrogate loss ( Zhang et al. , 2019 ) to capture the difference in output between the normal and attacked network . Algorithm 1 illustrates the training procedure in more detail . begin Θ∗0 ←− Θ + |Θ| R ; R ∼ N ( 0 , 1 ) for t = 1 to Nsteps do g ←− ∇Θ∗t−1Lrob ( f ( Θ , X ) , f ( Θ∗t−1 , X ) ) v ←− arg max v : ‖v‖p≤1 vT g Θ∗t ← ∏ Epζattack ( Θ∗t−1 + α v ) end Θ←− Θ− η∇ΘLnat ( ( Θ , X ) , y ) + βrobLrob ( Θ , Θ∗Nsteps , X ) end Algorithm 1 : In l∞ , v corresponds to sign ( g ) and the step size α is |Θ| ζNsteps . ∏ Epζattack ( m ) denotes the projection operator on the ζattack-ellipsoid in lp space . In l∞ this corresponds to min ( max ( m , Θ − ) , Θ + ) with = ζattack |Θ| . ζattack and βrob are hyperparameters of our model . Unlike adversarial training in the input space , where adversarial inputs can be seen as a form of data augmentation , adversarial training in the parameter space poses the following challenge : Because the parameters that are attacked are the same parameters being optimized , performing gradient descent using the same loss that was used for PGA would simply revert the previous updates and no learning would occur . ABCD circumvents this problem by masking one half of the parameters in the adversarial loop and masking the other half during the gradient descent step . However , this limits the adversary in its power , and requires multiple iterations to be performed in order to update all parameters at least once . AWP approached this problem by assuming that the gradient of the loss with respect to the attacking parameters can be used in order to update the original parameters to favor minima in flatter locations in weight-space . However , it is not clear whether this assumption always holds since the gradient of the loss with respect to the attacking parameters is not necessarily the same direction that would lead to a flatter region in the weight loss-landscape . We approach this problem slightly differently : Similar to the TRADES algorithm ( Zhang et al. , 2019 ) , our algorithm optimizes a natural ( task ) loss and a separate robustness loss . Lgen ( Θ , X , y ) = Lnat ( Θ , X , y ) + βrobLrob ( Θ , A ( Θ ) , X ) Using a different loss for capturing the susceptibility of the network to adversarial attacks enables us to simultaneously optimise for performance and robustness , without PGA interfering with the gradient descent step . In our experiments , Lrob is defined as Lrob ( Θ , A ( Θ ) , X ) = KL ( f ( Θ , X ) , f ( Θ∗ , X ) ) ( 2 ) This formulation comes with a large computational overhead since it requires computing the Jacobian JΘ∗ ( Θ ) of a complex recurrent relation between Θ and Θ∗ . To make our algorithm more efficient we assume that the Jacobian is diagonal , meaning that Θ∗ = Θ + ∆Θ for some ∆Θ given by the adversary . In l∞ , the Jacobian can then be calculated efficiently using ( see suppl . material for details ) : JΘ∗ ( Θ ) = I + diag [ sign ( Θ ) ( ζattack+ ·R1 ) Nsteps ∑Nstepst=1 sign ( ∇Θ∗tLrob ( f ( Θ , X ) , f ( Θ∗t , X ) ) ) ] By making this assumption , our algorithm effectively multiplies the original training time by the number of PGA steps , similar to ( Wu et al. , 2020 ; Cicek & Soatto , 2019 ; Zheng et al. , 2020 ) . Because component mismatch is independently proportional to the magnitude of each parameter , one has to model the space in which the adversary can search for a perturbation using an axis-aligned ellipsoid in l2 and an axis-aligned box in l∞ . Using an -ball where the radius depends linearly on the individual parameter sets ( Li et al. , 2018 ; Cicek & Soatto , 2019 ; Wu et al. , 2020 ) would either give the adversary too little or too much attack space . Projecting onto an axis-aligned ellipsoid in l2 corresponds to solving the following optimization problem ( Gabay & Mercier , 1976 ; Dai , 2006 ) , which does not have a closed-form solution : x∗ = arg min x 1 2 ‖m− x‖2 s.t . ( x− c ) TW−2 ( x− c ) ≤ 1 where W = diag ( |Θ| ζ ) + I · ζconst , c = Θ and m = Θ∗ + α v. Because of the computational overhead this would incur , we only consider the l∞ case in our experiments . | Authors investigate the problem of network robustness in the presence of parameter variations. To that end, authors propose an adversarial parameter perturbation based robust training method. Proposed training approach iteratively performs adversarial attacks on the parameter space during training to regularize the model by penalizing parameter vulnerability. Experiments are performed on F-MNIST, ECG data and a speech command detection dataset, with both conventional CNNs and recurrent SNNs, where weight-space perturbations during training showed generalization to weight perturbations at inference time. | SP:648b28a6c7383a5530e9fd04e1d7c050c791f768 |
NETWORK INSENSITIVITY TO PARAMETER NOISE VIA PARAMETER ATTACK DURING TRAINING | 1 INTRODUCTION . There is increasing interest in NN and ML inference on IoT and embedded devices , which imposes energy constraints due to small battery capacity and untethered operation . Existing edge inference solutions based on CPUs or vector processing engines such as GPUs or TPUs are improving in energy efficiency , but still entail considerable energy cost ( Huang et al. , 2009 ) . Alternative compute architectures such as memristor crossbar arrays and mixed-signal event-driven neural network accelerators promise significantly reduced energy consumption for edge inference tasks . Novel non-volatile memory technologies such as resistive RAM and phase-change materials ( Chen , 2016 ; Yu & Chen , 2016 ) promise increased memory density with multiple bits per memory cell , as well as compact compute-in-memory for NN inference tasks ( Sebastian et al. , 2020 ) . Analog implementations of neurons and synapses , coupled with asynchronous digital routing fabrics , permit high sparsity in both network architecture and activity , thereby reducing energy costs associated with computation . However , both of these novel compute fabrics introduce complexity in the form of computational non-idealities , which do not exist for pure synchronous digital solutions . Some novel memory technologies support several bits per memory cell , but with uncertainty about the precise value stored on each cycle ( Le Gallo et al. , 2018b ; Wu et al. , 2019 ) . Others exhibit significant drift in stored states ( Joshi et al. , 2020 ) . Inference processors based on analog and mixed-signal devices ( Neckar et al. , 2019 ; Moradi et al. , 2018 ; Cassidy et al. , 2016 ; Schemmel et al. , 2010 ; Khaddam-Aljameh et al. , 2022 ) exhibit parameter variation across the surface of a chip , and between chips , due to manufacturing process non-idealities . Collectively these processes known as “ device mismatch ” manifest as frozen parameter noise in weights and neuron parameters . In all cases the mismatch between configured and implemented network parameters degrades the task performance by modifying the resulting mapping between input and output . Existing solutions for deploying networks to inference devices that exhibit mismatch mostly focus on per-device calibration or re-training ( Ambrogio et al. , 2018 ; Bauer et al. , 2019 ; Nandakumar et al. , 2020a ) . However , this , and other approaches such as few-shot learning or meta learning entail significant per-device handling costs , making them unfit for commercial deployment . We consider a network to be “ robust ” if the output of a network to a given input does not change in the face of parameter perturbation . With this goal , network architectures that are intrinsically robust against device mismatch can be investigated ( Thakur et al. , 2018 ; Büchel et al. , 2021 ) . Another approach is to introduce parameter perturbations during training that promote robustness during inference , for example via random pruning ( dropout ) ( Srivastava et al. , 2014 ) or by injecting noise ( Murray & Edwards , 1994 ) . In this paper we introduce a novel solution , by applying adversarial training approaches to parameter mismatch . Most existing adversarial training methods attack the input space . Here we describe an adversarial attack during training that seeks the parameter perturbation that causes the maximum degradation in network response . In summary , we make the following contributions : • We propose a novel algorithm for gradient-based supervised training of networks that are robust against parameter mismatch , by performing adversarial training in the weight space . • We demonstrate that our algorithm flattens the weight-loss landscape and therefore leads to models that are inherently more robust to parameter noise . • We show that our approach outperforms existing methods in terms of robustness . • We validate our algorithm on a highly accurate Phase Change Memory ( PCM ) -based Computein-Memory ( CiM ) simulator and achieve new state-of-the-art results in terms of performance and performance retention over time . 2 RELATED WORK . Research to date has focused mainly on adversarial attacks in the input space . With an increasing number of adversarial attacks , an increasing number of schemes defending against those attacks have been proposed ( Wang et al. , 2020 ; Zhang et al. , 2019 ; Madry et al. , 2019 ; Moosavi-Dezfooli et al. , 2018 ) . In contrast , adversarial attacks in parameter space have received little attention . Where parameter-space adversaries have been examined , it has been to enhance performance in semisupervised learning ( Cicek & Soatto , 2019 ) , to improve robustness to input-space adversarial attacks ( Wu et al. , 2020 ) , or to improve generalisation capability ( Zheng et al. , 2020 ) . We define “ robustness ” to mean that the network output should change only minimally in the face of a parameter perturbation — in other words , the weight-loss landscape should be as flat as possible at a loss minimum . Other algorithms that promote flat loss landscapes may therefore also be useful to promote robustness to parameter perturbations . Dropout ( Srivastava et al. , 2014 ) is a widely used method to reduce overfitting . During training , a random subset of units are chosen with some probability , and these units are pruned from the network for a single trial or batch . This results in the network learning to distribute its computation across many units , and acts as a regularization against overfitting . Entropy-SGD ( Chaudhari et al. , 2019 ) is a network optimisation method that minimises the local entropy around a solution in parameter space . This results in a smoothed parameter-loss landscape that should penalize sharp minima . Adversarial Block Coordinate Descent ( ABCD ) ( Cicek & Soatto , 2019 ) was proposed in order to complement input-space smoothing with weight-space smoothing in semi-supervised learning . ABCD repeatedly picks half of the network weights and performs one step of gradient ascent on them , followed by applying gradient descent on the other half . Adversarial Weight Perturbation ( AWP ) ( Wu et al. , 2020 ) was designed to improve the robustness of a network to adversarial attacks in the input space . The authors use Projected Gradient Ascent ( PGA ) on the network parameters to approximate a worst case perturbation of the weights Θ′ . PGA repeatedly computes the gradient of a loss function and updates the parameters in the direction of the ( positive ) gradient . After each update , the parameters are projected back onto a ball ( e.g . in l2 ) around the original parameters to ensure that a maximum distance is kept . Having identified an adversarial perturbation in the weight-space , an adversarial perturbation in the input-space is also found using PGA . Finally , the original weights Θ are updated using the gradient of the loss evaluated at the adversarial perturbation Θ′ . Adversarial Model Perturbation ( AMP ) ( Zheng et al. , 2020 ) improves the generalisation of conventional neural networks by optimizing a standard loss evaluated using parameters that were perturbed adversarially using PGA . Unlike our method , ( Zheng et al. , 2020 ) did not formulate the loss function as a trade-off between performance and robustness . Furthermore , the presented algorithm , unlike our method , treats the perturbation ∆Θ to the parameters Θ as a constant during backpropagation . TRadeoff-inspired Adversarial DEfense via Surrogate-loss minimization ( TRADES ) ( Zhang et al. , 2019 ) is a method for training networks that are robust against adversarial examples in the input space . The method consists of adding a boundary loss term to the loss function that measures how the network performance changes when the input is attacked . The boundary loss does not take the labels into account , so scaling it by a factor βrob allows for a principled trade-off between the robustness and the accuracy of the network . Noise injection during the forward pass ( Murray & Edwards , 1994 ) is a simple method for increasing network robustness to parameter noise . This method adds Gaussian noise to the network parameters during the forward pass and computes weight gradients with respect to the original parameters . This method regularizes the gradient magnitudes of output units with respect to the weights , thus enforcing distributed information processing and insensitivity to parameter noise . We refer to this method as “ Forward Noise ” . A recent paper proposed a method for improving the resilience to random and targeted bit errors in SRAM cells on digital Deep Neural Network ( DNN ) accelerators ( Stutz et al. , 2021 ) . By employing adversarial or random bit flips during training , the authors significantly improved the robustness to bit perturbations , enabling the accelerators to be operated below the conventional supply voltage . 3 METHODS . We use Θ to denote the set of parameters of a neural network f ( x , Θ ) that are trainable and susceptible to mismatch . The adversarial weights are denoted Θ∗ , where Θ∗t are the adversarial weights at the t-th iteration of PGA . We denote the PGA-adversary as a function A that maps parameters Θ to attacking parameters Θ∗ . We denote a mini-batch of training examples as X with y being the corresponding ground-truth labels . ∏ Epζ ( m ) denotes the projection operator on the ζ-ellipsoid in lp space . The operator denotes elementwise multiplication . The effect of component mismatch on a network parameter can be modelled using a Gaussian distribution where the standard deviation depends on the parameter magnitude ( Joshi et al. , 2020 ; Büchel et al. , 2021 ) . In this paper we restrict ourselves to mismatch-driven perturbations in the network weights . For complex Spiking Neural Networks ( SNNs ) , “ network parameters ” can refer to additional quantities such as neuronal and synaptic time constants or spiking thresholds . Our training approach described here can be equally applied to these additional parameters . We define the value of an individual parameter when deployed on a neuromorphic chip as Θmismatch ∼ N ( Θ , diag ( ζ|Θ| ) ) ( 1 ) where ζ governs the perturbation magnitude , referred to as the “ mismatch level ” . The physics underlying the neuronal- and synaptic circuits lead to a model where the amount of noise introduced into the system depends linearly on the magnitude of the parameters . If mismatch-induced perturbations had constant standard deviation independent of weight values , one could use the weight-scale invariance of neural networks as a means to achieve robustness , by simply scaling up all network weights ( see Figure S4 ) . The linear dependence of weight magnitude and mismatch noise precludes this approach . In contrast to adversarial attacks in the input space ( Carlini & Wagner , 2016 ; Moosavi-Dezfooli et al. , 2015 ; Madry et al. , 2019 ; Goodfellow et al. , 2015 ) , our method relies on adversarial attacks in parameter space . During training , we approximate the worst case perturbation of the network parameters using PGA and update the network parameters in order to mitigate these attacks . To trade-off robustness and performance , we use a surrogate loss ( Zhang et al. , 2019 ) to capture the difference in output between the normal and attacked network . Algorithm 1 illustrates the training procedure in more detail . begin Θ∗0 ←− Θ + |Θ| R ; R ∼ N ( 0 , 1 ) for t = 1 to Nsteps do g ←− ∇Θ∗t−1Lrob ( f ( Θ , X ) , f ( Θ∗t−1 , X ) ) v ←− arg max v : ‖v‖p≤1 vT g Θ∗t ← ∏ Epζattack ( Θ∗t−1 + α v ) end Θ←− Θ− η∇ΘLnat ( ( Θ , X ) , y ) + βrobLrob ( Θ , Θ∗Nsteps , X ) end Algorithm 1 : In l∞ , v corresponds to sign ( g ) and the step size α is |Θ| ζNsteps . ∏ Epζattack ( m ) denotes the projection operator on the ζattack-ellipsoid in lp space . In l∞ this corresponds to min ( max ( m , Θ − ) , Θ + ) with = ζattack |Θ| . ζattack and βrob are hyperparameters of our model . Unlike adversarial training in the input space , where adversarial inputs can be seen as a form of data augmentation , adversarial training in the parameter space poses the following challenge : Because the parameters that are attacked are the same parameters being optimized , performing gradient descent using the same loss that was used for PGA would simply revert the previous updates and no learning would occur . ABCD circumvents this problem by masking one half of the parameters in the adversarial loop and masking the other half during the gradient descent step . However , this limits the adversary in its power , and requires multiple iterations to be performed in order to update all parameters at least once . AWP approached this problem by assuming that the gradient of the loss with respect to the attacking parameters can be used in order to update the original parameters to favor minima in flatter locations in weight-space . However , it is not clear whether this assumption always holds since the gradient of the loss with respect to the attacking parameters is not necessarily the same direction that would lead to a flatter region in the weight loss-landscape . We approach this problem slightly differently : Similar to the TRADES algorithm ( Zhang et al. , 2019 ) , our algorithm optimizes a natural ( task ) loss and a separate robustness loss . Lgen ( Θ , X , y ) = Lnat ( Θ , X , y ) + βrobLrob ( Θ , A ( Θ ) , X ) Using a different loss for capturing the susceptibility of the network to adversarial attacks enables us to simultaneously optimise for performance and robustness , without PGA interfering with the gradient descent step . In our experiments , Lrob is defined as Lrob ( Θ , A ( Θ ) , X ) = KL ( f ( Θ , X ) , f ( Θ∗ , X ) ) ( 2 ) This formulation comes with a large computational overhead since it requires computing the Jacobian JΘ∗ ( Θ ) of a complex recurrent relation between Θ and Θ∗ . To make our algorithm more efficient we assume that the Jacobian is diagonal , meaning that Θ∗ = Θ + ∆Θ for some ∆Θ given by the adversary . In l∞ , the Jacobian can then be calculated efficiently using ( see suppl . material for details ) : JΘ∗ ( Θ ) = I + diag [ sign ( Θ ) ( ζattack+ ·R1 ) Nsteps ∑Nstepst=1 sign ( ∇Θ∗tLrob ( f ( Θ , X ) , f ( Θ∗t , X ) ) ) ] By making this assumption , our algorithm effectively multiplies the original training time by the number of PGA steps , similar to ( Wu et al. , 2020 ; Cicek & Soatto , 2019 ; Zheng et al. , 2020 ) . Because component mismatch is independently proportional to the magnitude of each parameter , one has to model the space in which the adversary can search for a perturbation using an axis-aligned ellipsoid in l2 and an axis-aligned box in l∞ . Using an -ball where the radius depends linearly on the individual parameter sets ( Li et al. , 2018 ; Cicek & Soatto , 2019 ; Wu et al. , 2020 ) would either give the adversary too little or too much attack space . Projecting onto an axis-aligned ellipsoid in l2 corresponds to solving the following optimization problem ( Gabay & Mercier , 1976 ; Dai , 2006 ) , which does not have a closed-form solution : x∗ = arg min x 1 2 ‖m− x‖2 s.t . ( x− c ) TW−2 ( x− c ) ≤ 1 where W = diag ( |Θ| ζ ) + I · ζconst , c = Θ and m = Θ∗ + α v. Because of the computational overhead this would incur , we only consider the l∞ case in our experiments . | This paper introduces a special loss formulation and training algorithm leveraging projected gradient ascent to build robustness to parameter noise into training for neural networks (both spiking and convolutional neural networks are tested). The authors show that the proposed method flattens the loss landscape for small parameter perturbations with a tradeoff of increased overall cross entropy (task) loss. It is shown that this alternative loss, when utilized during training, provides stronger resiliency to adversarially injected parameter noise than competing methods such as dropout or adversarial weight perturbation. Tests relating to device mismatch due to manufacturing process deficiencies are also performed and the authors show their training method would be useful for building networks that don't require per-device tuning in such cases (neuromorphic/analog computing). | SP:648b28a6c7383a5530e9fd04e1d7c050c791f768 |
NETWORK INSENSITIVITY TO PARAMETER NOISE VIA PARAMETER ATTACK DURING TRAINING | 1 INTRODUCTION . There is increasing interest in NN and ML inference on IoT and embedded devices , which imposes energy constraints due to small battery capacity and untethered operation . Existing edge inference solutions based on CPUs or vector processing engines such as GPUs or TPUs are improving in energy efficiency , but still entail considerable energy cost ( Huang et al. , 2009 ) . Alternative compute architectures such as memristor crossbar arrays and mixed-signal event-driven neural network accelerators promise significantly reduced energy consumption for edge inference tasks . Novel non-volatile memory technologies such as resistive RAM and phase-change materials ( Chen , 2016 ; Yu & Chen , 2016 ) promise increased memory density with multiple bits per memory cell , as well as compact compute-in-memory for NN inference tasks ( Sebastian et al. , 2020 ) . Analog implementations of neurons and synapses , coupled with asynchronous digital routing fabrics , permit high sparsity in both network architecture and activity , thereby reducing energy costs associated with computation . However , both of these novel compute fabrics introduce complexity in the form of computational non-idealities , which do not exist for pure synchronous digital solutions . Some novel memory technologies support several bits per memory cell , but with uncertainty about the precise value stored on each cycle ( Le Gallo et al. , 2018b ; Wu et al. , 2019 ) . Others exhibit significant drift in stored states ( Joshi et al. , 2020 ) . Inference processors based on analog and mixed-signal devices ( Neckar et al. , 2019 ; Moradi et al. , 2018 ; Cassidy et al. , 2016 ; Schemmel et al. , 2010 ; Khaddam-Aljameh et al. , 2022 ) exhibit parameter variation across the surface of a chip , and between chips , due to manufacturing process non-idealities . Collectively these processes known as “ device mismatch ” manifest as frozen parameter noise in weights and neuron parameters . In all cases the mismatch between configured and implemented network parameters degrades the task performance by modifying the resulting mapping between input and output . Existing solutions for deploying networks to inference devices that exhibit mismatch mostly focus on per-device calibration or re-training ( Ambrogio et al. , 2018 ; Bauer et al. , 2019 ; Nandakumar et al. , 2020a ) . However , this , and other approaches such as few-shot learning or meta learning entail significant per-device handling costs , making them unfit for commercial deployment . We consider a network to be “ robust ” if the output of a network to a given input does not change in the face of parameter perturbation . With this goal , network architectures that are intrinsically robust against device mismatch can be investigated ( Thakur et al. , 2018 ; Büchel et al. , 2021 ) . Another approach is to introduce parameter perturbations during training that promote robustness during inference , for example via random pruning ( dropout ) ( Srivastava et al. , 2014 ) or by injecting noise ( Murray & Edwards , 1994 ) . In this paper we introduce a novel solution , by applying adversarial training approaches to parameter mismatch . Most existing adversarial training methods attack the input space . Here we describe an adversarial attack during training that seeks the parameter perturbation that causes the maximum degradation in network response . In summary , we make the following contributions : • We propose a novel algorithm for gradient-based supervised training of networks that are robust against parameter mismatch , by performing adversarial training in the weight space . • We demonstrate that our algorithm flattens the weight-loss landscape and therefore leads to models that are inherently more robust to parameter noise . • We show that our approach outperforms existing methods in terms of robustness . • We validate our algorithm on a highly accurate Phase Change Memory ( PCM ) -based Computein-Memory ( CiM ) simulator and achieve new state-of-the-art results in terms of performance and performance retention over time . 2 RELATED WORK . Research to date has focused mainly on adversarial attacks in the input space . With an increasing number of adversarial attacks , an increasing number of schemes defending against those attacks have been proposed ( Wang et al. , 2020 ; Zhang et al. , 2019 ; Madry et al. , 2019 ; Moosavi-Dezfooli et al. , 2018 ) . In contrast , adversarial attacks in parameter space have received little attention . Where parameter-space adversaries have been examined , it has been to enhance performance in semisupervised learning ( Cicek & Soatto , 2019 ) , to improve robustness to input-space adversarial attacks ( Wu et al. , 2020 ) , or to improve generalisation capability ( Zheng et al. , 2020 ) . We define “ robustness ” to mean that the network output should change only minimally in the face of a parameter perturbation — in other words , the weight-loss landscape should be as flat as possible at a loss minimum . Other algorithms that promote flat loss landscapes may therefore also be useful to promote robustness to parameter perturbations . Dropout ( Srivastava et al. , 2014 ) is a widely used method to reduce overfitting . During training , a random subset of units are chosen with some probability , and these units are pruned from the network for a single trial or batch . This results in the network learning to distribute its computation across many units , and acts as a regularization against overfitting . Entropy-SGD ( Chaudhari et al. , 2019 ) is a network optimisation method that minimises the local entropy around a solution in parameter space . This results in a smoothed parameter-loss landscape that should penalize sharp minima . Adversarial Block Coordinate Descent ( ABCD ) ( Cicek & Soatto , 2019 ) was proposed in order to complement input-space smoothing with weight-space smoothing in semi-supervised learning . ABCD repeatedly picks half of the network weights and performs one step of gradient ascent on them , followed by applying gradient descent on the other half . Adversarial Weight Perturbation ( AWP ) ( Wu et al. , 2020 ) was designed to improve the robustness of a network to adversarial attacks in the input space . The authors use Projected Gradient Ascent ( PGA ) on the network parameters to approximate a worst case perturbation of the weights Θ′ . PGA repeatedly computes the gradient of a loss function and updates the parameters in the direction of the ( positive ) gradient . After each update , the parameters are projected back onto a ball ( e.g . in l2 ) around the original parameters to ensure that a maximum distance is kept . Having identified an adversarial perturbation in the weight-space , an adversarial perturbation in the input-space is also found using PGA . Finally , the original weights Θ are updated using the gradient of the loss evaluated at the adversarial perturbation Θ′ . Adversarial Model Perturbation ( AMP ) ( Zheng et al. , 2020 ) improves the generalisation of conventional neural networks by optimizing a standard loss evaluated using parameters that were perturbed adversarially using PGA . Unlike our method , ( Zheng et al. , 2020 ) did not formulate the loss function as a trade-off between performance and robustness . Furthermore , the presented algorithm , unlike our method , treats the perturbation ∆Θ to the parameters Θ as a constant during backpropagation . TRadeoff-inspired Adversarial DEfense via Surrogate-loss minimization ( TRADES ) ( Zhang et al. , 2019 ) is a method for training networks that are robust against adversarial examples in the input space . The method consists of adding a boundary loss term to the loss function that measures how the network performance changes when the input is attacked . The boundary loss does not take the labels into account , so scaling it by a factor βrob allows for a principled trade-off between the robustness and the accuracy of the network . Noise injection during the forward pass ( Murray & Edwards , 1994 ) is a simple method for increasing network robustness to parameter noise . This method adds Gaussian noise to the network parameters during the forward pass and computes weight gradients with respect to the original parameters . This method regularizes the gradient magnitudes of output units with respect to the weights , thus enforcing distributed information processing and insensitivity to parameter noise . We refer to this method as “ Forward Noise ” . A recent paper proposed a method for improving the resilience to random and targeted bit errors in SRAM cells on digital Deep Neural Network ( DNN ) accelerators ( Stutz et al. , 2021 ) . By employing adversarial or random bit flips during training , the authors significantly improved the robustness to bit perturbations , enabling the accelerators to be operated below the conventional supply voltage . 3 METHODS . We use Θ to denote the set of parameters of a neural network f ( x , Θ ) that are trainable and susceptible to mismatch . The adversarial weights are denoted Θ∗ , where Θ∗t are the adversarial weights at the t-th iteration of PGA . We denote the PGA-adversary as a function A that maps parameters Θ to attacking parameters Θ∗ . We denote a mini-batch of training examples as X with y being the corresponding ground-truth labels . ∏ Epζ ( m ) denotes the projection operator on the ζ-ellipsoid in lp space . The operator denotes elementwise multiplication . The effect of component mismatch on a network parameter can be modelled using a Gaussian distribution where the standard deviation depends on the parameter magnitude ( Joshi et al. , 2020 ; Büchel et al. , 2021 ) . In this paper we restrict ourselves to mismatch-driven perturbations in the network weights . For complex Spiking Neural Networks ( SNNs ) , “ network parameters ” can refer to additional quantities such as neuronal and synaptic time constants or spiking thresholds . Our training approach described here can be equally applied to these additional parameters . We define the value of an individual parameter when deployed on a neuromorphic chip as Θmismatch ∼ N ( Θ , diag ( ζ|Θ| ) ) ( 1 ) where ζ governs the perturbation magnitude , referred to as the “ mismatch level ” . The physics underlying the neuronal- and synaptic circuits lead to a model where the amount of noise introduced into the system depends linearly on the magnitude of the parameters . If mismatch-induced perturbations had constant standard deviation independent of weight values , one could use the weight-scale invariance of neural networks as a means to achieve robustness , by simply scaling up all network weights ( see Figure S4 ) . The linear dependence of weight magnitude and mismatch noise precludes this approach . In contrast to adversarial attacks in the input space ( Carlini & Wagner , 2016 ; Moosavi-Dezfooli et al. , 2015 ; Madry et al. , 2019 ; Goodfellow et al. , 2015 ) , our method relies on adversarial attacks in parameter space . During training , we approximate the worst case perturbation of the network parameters using PGA and update the network parameters in order to mitigate these attacks . To trade-off robustness and performance , we use a surrogate loss ( Zhang et al. , 2019 ) to capture the difference in output between the normal and attacked network . Algorithm 1 illustrates the training procedure in more detail . begin Θ∗0 ←− Θ + |Θ| R ; R ∼ N ( 0 , 1 ) for t = 1 to Nsteps do g ←− ∇Θ∗t−1Lrob ( f ( Θ , X ) , f ( Θ∗t−1 , X ) ) v ←− arg max v : ‖v‖p≤1 vT g Θ∗t ← ∏ Epζattack ( Θ∗t−1 + α v ) end Θ←− Θ− η∇ΘLnat ( ( Θ , X ) , y ) + βrobLrob ( Θ , Θ∗Nsteps , X ) end Algorithm 1 : In l∞ , v corresponds to sign ( g ) and the step size α is |Θ| ζNsteps . ∏ Epζattack ( m ) denotes the projection operator on the ζattack-ellipsoid in lp space . In l∞ this corresponds to min ( max ( m , Θ − ) , Θ + ) with = ζattack |Θ| . ζattack and βrob are hyperparameters of our model . Unlike adversarial training in the input space , where adversarial inputs can be seen as a form of data augmentation , adversarial training in the parameter space poses the following challenge : Because the parameters that are attacked are the same parameters being optimized , performing gradient descent using the same loss that was used for PGA would simply revert the previous updates and no learning would occur . ABCD circumvents this problem by masking one half of the parameters in the adversarial loop and masking the other half during the gradient descent step . However , this limits the adversary in its power , and requires multiple iterations to be performed in order to update all parameters at least once . AWP approached this problem by assuming that the gradient of the loss with respect to the attacking parameters can be used in order to update the original parameters to favor minima in flatter locations in weight-space . However , it is not clear whether this assumption always holds since the gradient of the loss with respect to the attacking parameters is not necessarily the same direction that would lead to a flatter region in the weight loss-landscape . We approach this problem slightly differently : Similar to the TRADES algorithm ( Zhang et al. , 2019 ) , our algorithm optimizes a natural ( task ) loss and a separate robustness loss . Lgen ( Θ , X , y ) = Lnat ( Θ , X , y ) + βrobLrob ( Θ , A ( Θ ) , X ) Using a different loss for capturing the susceptibility of the network to adversarial attacks enables us to simultaneously optimise for performance and robustness , without PGA interfering with the gradient descent step . In our experiments , Lrob is defined as Lrob ( Θ , A ( Θ ) , X ) = KL ( f ( Θ , X ) , f ( Θ∗ , X ) ) ( 2 ) This formulation comes with a large computational overhead since it requires computing the Jacobian JΘ∗ ( Θ ) of a complex recurrent relation between Θ and Θ∗ . To make our algorithm more efficient we assume that the Jacobian is diagonal , meaning that Θ∗ = Θ + ∆Θ for some ∆Θ given by the adversary . In l∞ , the Jacobian can then be calculated efficiently using ( see suppl . material for details ) : JΘ∗ ( Θ ) = I + diag [ sign ( Θ ) ( ζattack+ ·R1 ) Nsteps ∑Nstepst=1 sign ( ∇Θ∗tLrob ( f ( Θ , X ) , f ( Θ∗t , X ) ) ) ] By making this assumption , our algorithm effectively multiplies the original training time by the number of PGA steps , similar to ( Wu et al. , 2020 ; Cicek & Soatto , 2019 ; Zheng et al. , 2020 ) . Because component mismatch is independently proportional to the magnitude of each parameter , one has to model the space in which the adversary can search for a perturbation using an axis-aligned ellipsoid in l2 and an axis-aligned box in l∞ . Using an -ball where the radius depends linearly on the individual parameter sets ( Li et al. , 2018 ; Cicek & Soatto , 2019 ; Wu et al. , 2020 ) would either give the adversary too little or too much attack space . Projecting onto an axis-aligned ellipsoid in l2 corresponds to solving the following optimization problem ( Gabay & Mercier , 1976 ; Dai , 2006 ) , which does not have a closed-form solution : x∗ = arg min x 1 2 ‖m− x‖2 s.t . ( x− c ) TW−2 ( x− c ) ≤ 1 where W = diag ( |Θ| ζ ) + I · ζconst , c = Θ and m = Θ∗ + α v. Because of the computational overhead this would incur , we only consider the l∞ case in our experiments . | In this paper, the authors proposed an adversarial training method that minimizes the robustness loss so that the network parameter can be trained to be robust to the parameter perturbation. The motivation of the work comes from the parameter mismatch that exists when using analog devices for computation. The robustness loss calculates the difference between the network output before the weight perturbation and after the weight perturbation, and the direction of perturbation is decided in adversarial manner with Projected Gradient Ascent (PGA). Experimental results with several benchmarks showed that minimizing such loss resulted in flattened weight-loss landscape, and the proposed method outperformed existing methods in terms of the robustness to parameter mismatch. | SP:648b28a6c7383a5530e9fd04e1d7c050c791f768 |
Fully differentiable model discovery | Model discovery aims at autonomously discovering differential equations underlying a dataset . Approaches based on Physics Informed Neural Networks ( PINNs ) have shown great promise , but a fully-differentiable model which explicitly learns the equation has remained elusive . In this paper we propose such an approach by integrating neural network-based surrogates with Sparse Bayesian Learning ( SBL ) . This combination yields a robust model discovery algorithm , which we showcase on various datasets . We then identify a connection with multitask learning , and build on it to construct a Physics Informed Normalizing Flow ( PINF ) . We present a proof-of-concept using a PINF to directly learn a density model from single particle data . Our work expands PINNs to various types of neural network architectures , and connects neural network-based surrogates to the rich field of Bayesian parameter inference . 1 INTRODUCTION . Many physical , chemical and biological systems can be modelled with ( partial ) differential equations . They capture a system ’ s interactions , scales and conserved quantities in an interpretive manner . Unfortunately , manually deriving these equations from first principles is a time-consuming process and requires expert knowledge of the underlying dynamics . The last few years have seen a rising interest in automating this process , also known as model discovery . As the model space is exponentially large , a popular approach is to select a large set of candidate terms ( features ) and perform sparse regression on these features , effectively turning model discovery into variable selection ( Brunton et al. , 2016 ; Rudy et al. , 2017 ) . A uniquely challenging aspect of discovering PDEs is that many of the candidate features contain higher-order derivatives , which are challenging to calculate accurately using numerical differentiation . This essentially limited model discovery to densely sampled datasets with low noise levels . Various works have explored the use of neural networks to generate a surrogate of the data ( Rasheed et al. , 2020 ) , and perform model discovery on this surrogate instead ( Berg & Nyström , 2019 ; Both et al. , 2019 ) . By using a neural network g to learn the data u such that u ≈ g ( x , t ) , the network denoises the data , while automatic differentiation can be used to accurately calculate the ( higher- ) order derivatives of u used in the candidate features . These approaches show significant improvements when the neural network is constrained to solutions allowed by the candidate features . This essentially yields a Physics Informed Neural Network ( PINN ) ( Raissi et al. , 2017 ) , with the important distinction that the form of the constraint , i.e . which terms of the candidate features are active and make up the underlying equation , is also learned . As it is composed of all candidate features , the constraint itself is prone to overfitting , and the discovered equation will contain more terms than required . Applying ` 1 regularisation can alleviate this problem , but raises the question of how strongly to apply it . Alternatively , inactive terms can be pruned from the constraint by applying a mask , but this is a non-differentiable operation , and training the network does not take sparsity into account . The open question then is how to optimally apply a constraint , which itself is learned and sensitive to overfitting , all the while remaining fully differentiable . In this work we introduce a fully differentiable model discovery algorithm consisting of a neuralnetwork based surrogate with a constraint based on Sparse Bayesian Learning ( SBL ) . We summarise our contributions as follows : • We show how Bayesian parameter inference methods can be used as a constraint in a PINN . Specifically , we use Sparse Bayesian Learning ( SBL ) to create a fully-differentiable , robust model discovery algorithm and showcase this on various datasets . • We identify a connection with multitask learning using uncertainty and exploit this to generalise PINNs to probabilistic surrogates . We introduce a conditional normalizing flow constrained by SBL , a so called Physics Informed Normalizing Flow ( PINF ) . • We present a proof-of-concept where PINF learns a time-dependent density from unlabelled single-particle data , allowing the constraint to discover a density model directly from single particle data . 2 BACKGROUND . Model discovery with sparse regression Model discovery aims to discover the PDE from a large set of M candidate features { u , uxx , uux , . . . } . Assuming the underlying equation can be written as a linear combination of the candidate features , model discovery can be approached as a regression problem ( Brunton et al. , 2016 ) by solving ξ̂ = min ξ ‖∂tu−Θξ‖2 + λR ( ξ ) , ( 1 ) where Θ ∈ RN×M contains all candidate features , ξ ∈ RM the unknown coefficient vector and R ( ξ ) some sparsity-promoting penalty ; the number of candidate features is typically much larger than the number of terms in the underlying equation . The main challenge of discovering the underlying equation using this approach is dealing with large , possible correlated errors in the features containing derivatives ; using numerical differentiation to calculate these higher-order derivatives accurately from noisy and sparse data is extremely challenging , even after denoising . One line of work has focused on constructing more robust and sparser approaches to solving eq . 1 , for example SR3 ( Zheng et al. , 2019 ) or using stability criteria ( Maddu et al. , 2020 ) . Alternatively , several works ( Both et al. , 2019 ; Berg & Nyström , 2019 ) have explored the use of neural networks to create a surrogate of the data and perform model discovery on this surrogate instead . Automatic differentiation can then be used to calculate the derivatives , yielding much more accurate features . PINNs Physics Informed Neural Networks ( PINNs ) ( Raissi et al. , 2017 ) have become a very popular method to either solve a differential equation or perform parameter inference with neural networks . Here we focus on parameter inference and consider a ( noisy ) dataset { ui , xi , ti } Ni=1 , governed by a differential equation of form ∂tu = Xw with X the terms of the equation and w the unknown parameters . PINNs inferw by using a neural network to approximate u , and constrain the network to the given differential equation by minimising LPINN ( θ , w ) = 1 N N∑ i=1 ‖ûi − ui‖2 + λ N N∑ i=1 ‖∂tûi −Xiw‖2 . ( 2 ) Here ûi = gθ ( xi , ti ) is the prediction of the neural network and λ sets the strength of the regularisation . The constraint ensures the network approximates the data u consistently with the given differential equation , and terms containing derivatives can be calculated using automatic differentiation . These two features make PINNs especially useful in noisy and sparse datasets . Model discovery with PINNs PINNs can easily be adapted to perform model discovery by replacing the given differential equation X with a larger set of candidate features Θ. Additionally , a maskm is applied to the coefficients , yielding as loss function , LMD ( θ , ξ ) = 1 N N∑ i=1 ‖ûi − ui‖2 + λ N N∑ i=1 ‖∂tûi −Θi ( m ξ ) ‖2 = Lfit ( θ ) + λLreg ( θ , ξ ) . ( 3 ) The maskm describes which terms feature in the equation , and hence the form of the constraint ; this approach can be interpreted as a PINN in which the constraint is also learned . The mask is updated periodically by some sparse regression technique , and as terms are pruned , the constraint becomes stricter , preventing overfitting of the constraint itself and improving the approximation of the network , boosting performance significantly ( Both et al. , 2021 ) . However , the non-differentiability of the mask can lead to issues during training , for example when it is updated at the wrong time , or when the wrong terms are accidentally pruned . Our goal here is thus to construct an approach where the mask M is learned together with the networks parameters , while still maintaining the benefits of iteratively refining the approximation : a fully-differentiable model discovery algorithm . Removing free variables Training with eq . 3 optimises two sets of parameters : the network parameters θ and the coefficients ξ . Typically both are minimised together using gradient descent , but the optimisation of ξ can be performed analytically ( Both et al. , 2021 ) . Given a configuration of the network parameters θ∗ , the minimisation over ξ is a regression problem as given by eq . 1 and can be solved exactly . Referring to this solution as the maximum likelihood estimate ξMLE , we define a loss function L̃MD ( θ ) ≡ LMD ( θ , ξMLE ) , which optimises only the network parameters θ using gradient descent . This significantly speeds up convergence and reduces the variance of the discovered coefficients across initialisations . We shall adopt this approach in the rest of the paper , and define the convention of L̃ denoting the loss functionLwith the independent variables calculated analytically . 3 FULLY DIFFERENTIABLE MODEL DISCOVERY . Our goal is to create a fully-differentiable model discovery algorithm , which , considering eq . 3 , requires making the maskm differentiable . Differentiable masking is challenging due to the binary nature of the problem , and instead we relax the application of the mask to a regularisation problem . Specifically , we propose to use Sparse Bayesian Learning ( Tipping , 2001 ) to select the active features and act as constraint . We start this section by reviewing SBL and how it can be used for differentiable variable selection , next show to integrate it in PINNs and finally introduce Physics Informed Normalizing Flows . 3.1 DIFFERENTIABLE MASKING WITH SBL . Sparse Bayesian Learning Sparse Bayesian Learning ( SBL ) ( Tipping , 2001 ) is a Bayesian approach to regression yielding sparse results . SBL defines a hierarchical model , starting with a Gaussian likelihood with noise precision β ≡ σ−2 , and a zero-mean Gaussian with precision αj on each component ξj as prior , p ( ∂tû ; Θ , ξ , β ) = N∏ i=1 N ( ∂tûi ; Θiξ , β−1 ) , ( 4 ) p ( ξ ; A ) = M∏ j=1 N ( ξj ; 0 , α−1j ) , ( 5 ) with ∂tû ∈ RN , Θ ∈ RN×M , ξ ∈ RM , and we have defined A ≡ diag ( α ) . The posterior distribution of ξ is a Gaussian with mean µ and covariance Σ , Σ = ( βΘTΘ +A ) −1 µ = βΣΘT∂tû . ( 6 ) Many of the terms in A will go to infinity when optimised , and correspondingly the prior for term j becomes a delta peak . We are thus certain that that specific term is inactive and can be pruned from the model . This makes SBL a very suitable choice for model discovery , as it gives a rigorous criterion for deciding whether a term is active or not . Additionally it defines hyper-priors over α and β , p ( α ) = M∏ j=1 Γ ( αj ; a , b ) p ( β ) = Γ ( β ; c , d ) ( 7 ) The inference of A and β can not be performed exactly , and SBL uses type-II maximum likelihood to find the most likely values of  and β̂ by minimising the negative log marginal likelihood 1 , LSBL ( A , β ) = 1 2 [ β ‖ut −Θµ‖2 + µTAµ− log|Σ| − log|A| −N log β ] − M∑ j=1 ( a logαj − bαj ) − c log β + dβ , ( 9 ) using an iterative method ( see Tipping ( 2001 ) ) . Continuous relaxation The marginal likelihood also offers insight how the SBL provides differentiable masking . Considering only the first two terms of eq . 9 , β ‖ut −Θµ‖2 + µTAµ ( 10 ) we note that the SBL essentially applies a coefficient-specific ` 2 penalty to the posterior mean µ . If Aj → ∞ , the corresponding coefficient µj → 0 , pruning the variable from the model . Effectively , the SBL replaces the discrete mask mj ∈ { 0 , 1 } by a continuous regularisation Aj ∈ ( 0 , ∞ ] , and we thus refer to our approach as continuous relaxation . | This paper proposes learning an underlying PDE through the use of a physics-informed neural network and sparsity regularization on the partial derivatives. A neural network representing the PDE solution is trained simultaneously with a sparse regression on the partial derivatives of this neural network. The main novelty seems to be combining the model discovery loss of Both et al. 2021 with a sparse prior, relaxing the objective and allowing gradient-based optimization. The paper also discusses physics-informed normalizing flows but I feel like it's a bit disconnected / orthogonal to the rest of the paper and not enough information is given; I did not understand the motivation, how it connects to a PDE solution, and how it's applied in the experiments. | SP:4d19caff82089e3667866785c3cd79abde8ed685 |
Fully differentiable model discovery | Model discovery aims at autonomously discovering differential equations underlying a dataset . Approaches based on Physics Informed Neural Networks ( PINNs ) have shown great promise , but a fully-differentiable model which explicitly learns the equation has remained elusive . In this paper we propose such an approach by integrating neural network-based surrogates with Sparse Bayesian Learning ( SBL ) . This combination yields a robust model discovery algorithm , which we showcase on various datasets . We then identify a connection with multitask learning , and build on it to construct a Physics Informed Normalizing Flow ( PINF ) . We present a proof-of-concept using a PINF to directly learn a density model from single particle data . Our work expands PINNs to various types of neural network architectures , and connects neural network-based surrogates to the rich field of Bayesian parameter inference . 1 INTRODUCTION . Many physical , chemical and biological systems can be modelled with ( partial ) differential equations . They capture a system ’ s interactions , scales and conserved quantities in an interpretive manner . Unfortunately , manually deriving these equations from first principles is a time-consuming process and requires expert knowledge of the underlying dynamics . The last few years have seen a rising interest in automating this process , also known as model discovery . As the model space is exponentially large , a popular approach is to select a large set of candidate terms ( features ) and perform sparse regression on these features , effectively turning model discovery into variable selection ( Brunton et al. , 2016 ; Rudy et al. , 2017 ) . A uniquely challenging aspect of discovering PDEs is that many of the candidate features contain higher-order derivatives , which are challenging to calculate accurately using numerical differentiation . This essentially limited model discovery to densely sampled datasets with low noise levels . Various works have explored the use of neural networks to generate a surrogate of the data ( Rasheed et al. , 2020 ) , and perform model discovery on this surrogate instead ( Berg & Nyström , 2019 ; Both et al. , 2019 ) . By using a neural network g to learn the data u such that u ≈ g ( x , t ) , the network denoises the data , while automatic differentiation can be used to accurately calculate the ( higher- ) order derivatives of u used in the candidate features . These approaches show significant improvements when the neural network is constrained to solutions allowed by the candidate features . This essentially yields a Physics Informed Neural Network ( PINN ) ( Raissi et al. , 2017 ) , with the important distinction that the form of the constraint , i.e . which terms of the candidate features are active and make up the underlying equation , is also learned . As it is composed of all candidate features , the constraint itself is prone to overfitting , and the discovered equation will contain more terms than required . Applying ` 1 regularisation can alleviate this problem , but raises the question of how strongly to apply it . Alternatively , inactive terms can be pruned from the constraint by applying a mask , but this is a non-differentiable operation , and training the network does not take sparsity into account . The open question then is how to optimally apply a constraint , which itself is learned and sensitive to overfitting , all the while remaining fully differentiable . In this work we introduce a fully differentiable model discovery algorithm consisting of a neuralnetwork based surrogate with a constraint based on Sparse Bayesian Learning ( SBL ) . We summarise our contributions as follows : • We show how Bayesian parameter inference methods can be used as a constraint in a PINN . Specifically , we use Sparse Bayesian Learning ( SBL ) to create a fully-differentiable , robust model discovery algorithm and showcase this on various datasets . • We identify a connection with multitask learning using uncertainty and exploit this to generalise PINNs to probabilistic surrogates . We introduce a conditional normalizing flow constrained by SBL , a so called Physics Informed Normalizing Flow ( PINF ) . • We present a proof-of-concept where PINF learns a time-dependent density from unlabelled single-particle data , allowing the constraint to discover a density model directly from single particle data . 2 BACKGROUND . Model discovery with sparse regression Model discovery aims to discover the PDE from a large set of M candidate features { u , uxx , uux , . . . } . Assuming the underlying equation can be written as a linear combination of the candidate features , model discovery can be approached as a regression problem ( Brunton et al. , 2016 ) by solving ξ̂ = min ξ ‖∂tu−Θξ‖2 + λR ( ξ ) , ( 1 ) where Θ ∈ RN×M contains all candidate features , ξ ∈ RM the unknown coefficient vector and R ( ξ ) some sparsity-promoting penalty ; the number of candidate features is typically much larger than the number of terms in the underlying equation . The main challenge of discovering the underlying equation using this approach is dealing with large , possible correlated errors in the features containing derivatives ; using numerical differentiation to calculate these higher-order derivatives accurately from noisy and sparse data is extremely challenging , even after denoising . One line of work has focused on constructing more robust and sparser approaches to solving eq . 1 , for example SR3 ( Zheng et al. , 2019 ) or using stability criteria ( Maddu et al. , 2020 ) . Alternatively , several works ( Both et al. , 2019 ; Berg & Nyström , 2019 ) have explored the use of neural networks to create a surrogate of the data and perform model discovery on this surrogate instead . Automatic differentiation can then be used to calculate the derivatives , yielding much more accurate features . PINNs Physics Informed Neural Networks ( PINNs ) ( Raissi et al. , 2017 ) have become a very popular method to either solve a differential equation or perform parameter inference with neural networks . Here we focus on parameter inference and consider a ( noisy ) dataset { ui , xi , ti } Ni=1 , governed by a differential equation of form ∂tu = Xw with X the terms of the equation and w the unknown parameters . PINNs inferw by using a neural network to approximate u , and constrain the network to the given differential equation by minimising LPINN ( θ , w ) = 1 N N∑ i=1 ‖ûi − ui‖2 + λ N N∑ i=1 ‖∂tûi −Xiw‖2 . ( 2 ) Here ûi = gθ ( xi , ti ) is the prediction of the neural network and λ sets the strength of the regularisation . The constraint ensures the network approximates the data u consistently with the given differential equation , and terms containing derivatives can be calculated using automatic differentiation . These two features make PINNs especially useful in noisy and sparse datasets . Model discovery with PINNs PINNs can easily be adapted to perform model discovery by replacing the given differential equation X with a larger set of candidate features Θ. Additionally , a maskm is applied to the coefficients , yielding as loss function , LMD ( θ , ξ ) = 1 N N∑ i=1 ‖ûi − ui‖2 + λ N N∑ i=1 ‖∂tûi −Θi ( m ξ ) ‖2 = Lfit ( θ ) + λLreg ( θ , ξ ) . ( 3 ) The maskm describes which terms feature in the equation , and hence the form of the constraint ; this approach can be interpreted as a PINN in which the constraint is also learned . The mask is updated periodically by some sparse regression technique , and as terms are pruned , the constraint becomes stricter , preventing overfitting of the constraint itself and improving the approximation of the network , boosting performance significantly ( Both et al. , 2021 ) . However , the non-differentiability of the mask can lead to issues during training , for example when it is updated at the wrong time , or when the wrong terms are accidentally pruned . Our goal here is thus to construct an approach where the mask M is learned together with the networks parameters , while still maintaining the benefits of iteratively refining the approximation : a fully-differentiable model discovery algorithm . Removing free variables Training with eq . 3 optimises two sets of parameters : the network parameters θ and the coefficients ξ . Typically both are minimised together using gradient descent , but the optimisation of ξ can be performed analytically ( Both et al. , 2021 ) . Given a configuration of the network parameters θ∗ , the minimisation over ξ is a regression problem as given by eq . 1 and can be solved exactly . Referring to this solution as the maximum likelihood estimate ξMLE , we define a loss function L̃MD ( θ ) ≡ LMD ( θ , ξMLE ) , which optimises only the network parameters θ using gradient descent . This significantly speeds up convergence and reduces the variance of the discovered coefficients across initialisations . We shall adopt this approach in the rest of the paper , and define the convention of L̃ denoting the loss functionLwith the independent variables calculated analytically . 3 FULLY DIFFERENTIABLE MODEL DISCOVERY . Our goal is to create a fully-differentiable model discovery algorithm , which , considering eq . 3 , requires making the maskm differentiable . Differentiable masking is challenging due to the binary nature of the problem , and instead we relax the application of the mask to a regularisation problem . Specifically , we propose to use Sparse Bayesian Learning ( Tipping , 2001 ) to select the active features and act as constraint . We start this section by reviewing SBL and how it can be used for differentiable variable selection , next show to integrate it in PINNs and finally introduce Physics Informed Normalizing Flows . 3.1 DIFFERENTIABLE MASKING WITH SBL . Sparse Bayesian Learning Sparse Bayesian Learning ( SBL ) ( Tipping , 2001 ) is a Bayesian approach to regression yielding sparse results . SBL defines a hierarchical model , starting with a Gaussian likelihood with noise precision β ≡ σ−2 , and a zero-mean Gaussian with precision αj on each component ξj as prior , p ( ∂tû ; Θ , ξ , β ) = N∏ i=1 N ( ∂tûi ; Θiξ , β−1 ) , ( 4 ) p ( ξ ; A ) = M∏ j=1 N ( ξj ; 0 , α−1j ) , ( 5 ) with ∂tû ∈ RN , Θ ∈ RN×M , ξ ∈ RM , and we have defined A ≡ diag ( α ) . The posterior distribution of ξ is a Gaussian with mean µ and covariance Σ , Σ = ( βΘTΘ +A ) −1 µ = βΣΘT∂tû . ( 6 ) Many of the terms in A will go to infinity when optimised , and correspondingly the prior for term j becomes a delta peak . We are thus certain that that specific term is inactive and can be pruned from the model . This makes SBL a very suitable choice for model discovery , as it gives a rigorous criterion for deciding whether a term is active or not . Additionally it defines hyper-priors over α and β , p ( α ) = M∏ j=1 Γ ( αj ; a , b ) p ( β ) = Γ ( β ; c , d ) ( 7 ) The inference of A and β can not be performed exactly , and SBL uses type-II maximum likelihood to find the most likely values of  and β̂ by minimising the negative log marginal likelihood 1 , LSBL ( A , β ) = 1 2 [ β ‖ut −Θµ‖2 + µTAµ− log|Σ| − log|A| −N log β ] − M∑ j=1 ( a logαj − bαj ) − c log β + dβ , ( 9 ) using an iterative method ( see Tipping ( 2001 ) ) . Continuous relaxation The marginal likelihood also offers insight how the SBL provides differentiable masking . Considering only the first two terms of eq . 9 , β ‖ut −Θµ‖2 + µTAµ ( 10 ) we note that the SBL essentially applies a coefficient-specific ` 2 penalty to the posterior mean µ . If Aj → ∞ , the corresponding coefficient µj → 0 , pruning the variable from the model . Effectively , the SBL replaces the discrete mask mj ∈ { 0 , 1 } by a continuous regularisation Aj ∈ ( 0 , ∞ ] , and we thus refer to our approach as continuous relaxation . | This paper studies the problem of identifying sets of equations that govern the dynamics of observed natural systems. Building off of work that uses sparse regression to identify a small set of active terms from a large dictionary of possible terms, this paper proposes a soft relaxation of a hard constraint used for selecting out possible terms in the optimization problem. The paper applies this technique to recover the underlying equations from data generated by a few canonical PDEs. | SP:4d19caff82089e3667866785c3cd79abde8ed685 |
Fully differentiable model discovery | Model discovery aims at autonomously discovering differential equations underlying a dataset . Approaches based on Physics Informed Neural Networks ( PINNs ) have shown great promise , but a fully-differentiable model which explicitly learns the equation has remained elusive . In this paper we propose such an approach by integrating neural network-based surrogates with Sparse Bayesian Learning ( SBL ) . This combination yields a robust model discovery algorithm , which we showcase on various datasets . We then identify a connection with multitask learning , and build on it to construct a Physics Informed Normalizing Flow ( PINF ) . We present a proof-of-concept using a PINF to directly learn a density model from single particle data . Our work expands PINNs to various types of neural network architectures , and connects neural network-based surrogates to the rich field of Bayesian parameter inference . 1 INTRODUCTION . Many physical , chemical and biological systems can be modelled with ( partial ) differential equations . They capture a system ’ s interactions , scales and conserved quantities in an interpretive manner . Unfortunately , manually deriving these equations from first principles is a time-consuming process and requires expert knowledge of the underlying dynamics . The last few years have seen a rising interest in automating this process , also known as model discovery . As the model space is exponentially large , a popular approach is to select a large set of candidate terms ( features ) and perform sparse regression on these features , effectively turning model discovery into variable selection ( Brunton et al. , 2016 ; Rudy et al. , 2017 ) . A uniquely challenging aspect of discovering PDEs is that many of the candidate features contain higher-order derivatives , which are challenging to calculate accurately using numerical differentiation . This essentially limited model discovery to densely sampled datasets with low noise levels . Various works have explored the use of neural networks to generate a surrogate of the data ( Rasheed et al. , 2020 ) , and perform model discovery on this surrogate instead ( Berg & Nyström , 2019 ; Both et al. , 2019 ) . By using a neural network g to learn the data u such that u ≈ g ( x , t ) , the network denoises the data , while automatic differentiation can be used to accurately calculate the ( higher- ) order derivatives of u used in the candidate features . These approaches show significant improvements when the neural network is constrained to solutions allowed by the candidate features . This essentially yields a Physics Informed Neural Network ( PINN ) ( Raissi et al. , 2017 ) , with the important distinction that the form of the constraint , i.e . which terms of the candidate features are active and make up the underlying equation , is also learned . As it is composed of all candidate features , the constraint itself is prone to overfitting , and the discovered equation will contain more terms than required . Applying ` 1 regularisation can alleviate this problem , but raises the question of how strongly to apply it . Alternatively , inactive terms can be pruned from the constraint by applying a mask , but this is a non-differentiable operation , and training the network does not take sparsity into account . The open question then is how to optimally apply a constraint , which itself is learned and sensitive to overfitting , all the while remaining fully differentiable . In this work we introduce a fully differentiable model discovery algorithm consisting of a neuralnetwork based surrogate with a constraint based on Sparse Bayesian Learning ( SBL ) . We summarise our contributions as follows : • We show how Bayesian parameter inference methods can be used as a constraint in a PINN . Specifically , we use Sparse Bayesian Learning ( SBL ) to create a fully-differentiable , robust model discovery algorithm and showcase this on various datasets . • We identify a connection with multitask learning using uncertainty and exploit this to generalise PINNs to probabilistic surrogates . We introduce a conditional normalizing flow constrained by SBL , a so called Physics Informed Normalizing Flow ( PINF ) . • We present a proof-of-concept where PINF learns a time-dependent density from unlabelled single-particle data , allowing the constraint to discover a density model directly from single particle data . 2 BACKGROUND . Model discovery with sparse regression Model discovery aims to discover the PDE from a large set of M candidate features { u , uxx , uux , . . . } . Assuming the underlying equation can be written as a linear combination of the candidate features , model discovery can be approached as a regression problem ( Brunton et al. , 2016 ) by solving ξ̂ = min ξ ‖∂tu−Θξ‖2 + λR ( ξ ) , ( 1 ) where Θ ∈ RN×M contains all candidate features , ξ ∈ RM the unknown coefficient vector and R ( ξ ) some sparsity-promoting penalty ; the number of candidate features is typically much larger than the number of terms in the underlying equation . The main challenge of discovering the underlying equation using this approach is dealing with large , possible correlated errors in the features containing derivatives ; using numerical differentiation to calculate these higher-order derivatives accurately from noisy and sparse data is extremely challenging , even after denoising . One line of work has focused on constructing more robust and sparser approaches to solving eq . 1 , for example SR3 ( Zheng et al. , 2019 ) or using stability criteria ( Maddu et al. , 2020 ) . Alternatively , several works ( Both et al. , 2019 ; Berg & Nyström , 2019 ) have explored the use of neural networks to create a surrogate of the data and perform model discovery on this surrogate instead . Automatic differentiation can then be used to calculate the derivatives , yielding much more accurate features . PINNs Physics Informed Neural Networks ( PINNs ) ( Raissi et al. , 2017 ) have become a very popular method to either solve a differential equation or perform parameter inference with neural networks . Here we focus on parameter inference and consider a ( noisy ) dataset { ui , xi , ti } Ni=1 , governed by a differential equation of form ∂tu = Xw with X the terms of the equation and w the unknown parameters . PINNs inferw by using a neural network to approximate u , and constrain the network to the given differential equation by minimising LPINN ( θ , w ) = 1 N N∑ i=1 ‖ûi − ui‖2 + λ N N∑ i=1 ‖∂tûi −Xiw‖2 . ( 2 ) Here ûi = gθ ( xi , ti ) is the prediction of the neural network and λ sets the strength of the regularisation . The constraint ensures the network approximates the data u consistently with the given differential equation , and terms containing derivatives can be calculated using automatic differentiation . These two features make PINNs especially useful in noisy and sparse datasets . Model discovery with PINNs PINNs can easily be adapted to perform model discovery by replacing the given differential equation X with a larger set of candidate features Θ. Additionally , a maskm is applied to the coefficients , yielding as loss function , LMD ( θ , ξ ) = 1 N N∑ i=1 ‖ûi − ui‖2 + λ N N∑ i=1 ‖∂tûi −Θi ( m ξ ) ‖2 = Lfit ( θ ) + λLreg ( θ , ξ ) . ( 3 ) The maskm describes which terms feature in the equation , and hence the form of the constraint ; this approach can be interpreted as a PINN in which the constraint is also learned . The mask is updated periodically by some sparse regression technique , and as terms are pruned , the constraint becomes stricter , preventing overfitting of the constraint itself and improving the approximation of the network , boosting performance significantly ( Both et al. , 2021 ) . However , the non-differentiability of the mask can lead to issues during training , for example when it is updated at the wrong time , or when the wrong terms are accidentally pruned . Our goal here is thus to construct an approach where the mask M is learned together with the networks parameters , while still maintaining the benefits of iteratively refining the approximation : a fully-differentiable model discovery algorithm . Removing free variables Training with eq . 3 optimises two sets of parameters : the network parameters θ and the coefficients ξ . Typically both are minimised together using gradient descent , but the optimisation of ξ can be performed analytically ( Both et al. , 2021 ) . Given a configuration of the network parameters θ∗ , the minimisation over ξ is a regression problem as given by eq . 1 and can be solved exactly . Referring to this solution as the maximum likelihood estimate ξMLE , we define a loss function L̃MD ( θ ) ≡ LMD ( θ , ξMLE ) , which optimises only the network parameters θ using gradient descent . This significantly speeds up convergence and reduces the variance of the discovered coefficients across initialisations . We shall adopt this approach in the rest of the paper , and define the convention of L̃ denoting the loss functionLwith the independent variables calculated analytically . 3 FULLY DIFFERENTIABLE MODEL DISCOVERY . Our goal is to create a fully-differentiable model discovery algorithm , which , considering eq . 3 , requires making the maskm differentiable . Differentiable masking is challenging due to the binary nature of the problem , and instead we relax the application of the mask to a regularisation problem . Specifically , we propose to use Sparse Bayesian Learning ( Tipping , 2001 ) to select the active features and act as constraint . We start this section by reviewing SBL and how it can be used for differentiable variable selection , next show to integrate it in PINNs and finally introduce Physics Informed Normalizing Flows . 3.1 DIFFERENTIABLE MASKING WITH SBL . Sparse Bayesian Learning Sparse Bayesian Learning ( SBL ) ( Tipping , 2001 ) is a Bayesian approach to regression yielding sparse results . SBL defines a hierarchical model , starting with a Gaussian likelihood with noise precision β ≡ σ−2 , and a zero-mean Gaussian with precision αj on each component ξj as prior , p ( ∂tû ; Θ , ξ , β ) = N∏ i=1 N ( ∂tûi ; Θiξ , β−1 ) , ( 4 ) p ( ξ ; A ) = M∏ j=1 N ( ξj ; 0 , α−1j ) , ( 5 ) with ∂tû ∈ RN , Θ ∈ RN×M , ξ ∈ RM , and we have defined A ≡ diag ( α ) . The posterior distribution of ξ is a Gaussian with mean µ and covariance Σ , Σ = ( βΘTΘ +A ) −1 µ = βΣΘT∂tû . ( 6 ) Many of the terms in A will go to infinity when optimised , and correspondingly the prior for term j becomes a delta peak . We are thus certain that that specific term is inactive and can be pruned from the model . This makes SBL a very suitable choice for model discovery , as it gives a rigorous criterion for deciding whether a term is active or not . Additionally it defines hyper-priors over α and β , p ( α ) = M∏ j=1 Γ ( αj ; a , b ) p ( β ) = Γ ( β ; c , d ) ( 7 ) The inference of A and β can not be performed exactly , and SBL uses type-II maximum likelihood to find the most likely values of  and β̂ by minimising the negative log marginal likelihood 1 , LSBL ( A , β ) = 1 2 [ β ‖ut −Θµ‖2 + µTAµ− log|Σ| − log|A| −N log β ] − M∑ j=1 ( a logαj − bαj ) − c log β + dβ , ( 9 ) using an iterative method ( see Tipping ( 2001 ) ) . Continuous relaxation The marginal likelihood also offers insight how the SBL provides differentiable masking . Considering only the first two terms of eq . 9 , β ‖ut −Θµ‖2 + µTAµ ( 10 ) we note that the SBL essentially applies a coefficient-specific ` 2 penalty to the posterior mean µ . If Aj → ∞ , the corresponding coefficient µj → 0 , pruning the variable from the model . Effectively , the SBL replaces the discrete mask mj ∈ { 0 , 1 } by a continuous regularisation Aj ∈ ( 0 , ∞ ] , and we thus refer to our approach as continuous relaxation . | becauseThis work presents a model discovery algorithm to learn the PDEs from data. Their method uses Sparse Bayesian Learning to identify a minimal set of terms (along with their coefficients) from a set of predefined terms that constitute the PDE. Finally, they demonstrate that their algorithm can identify the PDE equations precisely for the following problems - Korteweg-de Vries, Burgers, Kuramoto-Shivashinsky, and Normalizing flows. | SP:4d19caff82089e3667866785c3cd79abde8ed685 |
Variational methods for simulation-based inference | 1 INTRODUCTION . Many domains in science and engineering use numerical simulations to model empirically observed phenomena . These models are designed by domain experts and are built to produce mechanistic insights . However , in many cases , some parameters of the simulator can not be experimentally measured and need to be inferred from data . A principled way to identify parameters that match empirical observations is Bayesian inference . However , for many models of interest , one can only sample from the model by simulating a ( stochastic ) computer program , but explicitly evaluating the likelihood p ( x|θ ) is intractable . Traditional methods to perform Bayesian inference in such simulation-based inference ( SBI ) , also known as likelihood-free inference scenarios , include Approximate Bayesian computation ( ABC ) ( Beaumont et al. , 2002 ) and synthetic likelihood ( SL ) ( Wood , 2010 ) methods . However , these methods generally struggle with high-dimensional data and typically require one to design or learn ( Chen et al. , 2021 ) summary statistics and distance functions . Recently , several methods using neural density ( -ratio ) estimation have emerged . These methods train neural networks to learn the posterior ( SNPE , Papamakarios & Murray , 2016 ; Lueckmann et al. , 2017 ; Greenberg et al. , 2019 ) , the likelihood ( SNLE , Papamakarios et al. , 2019 ; Lueckmann et al. , 2019a ) , or the likelihood-to-evidence ratio ( SNRE , Thomas et al. , 2021 ; Hermans et al. , 2020 ; Durkan et al. , 2020 ; Miller et al. , 2022 ) . To improve the simulation efficiency of these methods , sequential training schemes have been proposed : Initially , parameters are sampled from the prior distribution to train an estimation-network . Subsequently , new samples are drawn adaptively to focus training on specific regions in parameter space , thus allowing the methods to scale to larger models with more parameters . In practice , however , it has remained a challenge to realize the full potential of these sequential schemes : For sequential neural posterior estimation ( SNPE ) techniques , the loss function needs to be adjusted across rounds ( Greenberg et al. , 2019 ) , and it has been reported that this can be problematic if the proposal distribution is very different from prior , and lead to ‘ leakage ’ of probability mass into regions without prior support ( Durkan et al. , 2020 ) . Both sequential neural likelihood ( SNLE ) and likelihood-ratio ( SNRE ) methods require MCMC sampling , which can become prohibitively slow– MCMC sampling is required for each round of simulations , which , for high-dimensional models , can take more time than running the simulations and training the neural density estimator . Our goal is to provide a method which combines the advantages of posterior-targeting methods and those targeting likelihood ( -ratios ) : Posterior targeting methods allow rapid inference by providing a functional approximation to the posterior which can be evaluated without the need to use MCMC sampling . Conversely , a key advantage of likelihood ( -ratio ) targeting methods is their flexibility– learned likelihoods can e.g . be used to integrate information from multiple observations , or can be used without retraining if the prior is changed . In addition , they can be applied with any activelearning scheme without requiring modifications of the loss-function . We achieve this method by combining likelihood ( -ratio ) estimation with variationally learned inference networks using normalizing flows ( Rezende & Mohamed , 2015 ; Papamakarios et al. , 2017 ; Durkan et al. , 2019a ) and sampling importance resampling ( SIR ) ( Rubin , 1988 ) . We name our approach Sequential Neural Variational Inference ( SNVI ) . We will show that our simulation-based inference methods are as accurate as SNLE and SNRE , while being substantially faster at inference as they do not require MCMC sampling . In addition , real-world simulators sometimes produce invalid outputs , e.g . when a simulation fails . We introduce a strategy that allows likelihood ( -ratio ) targeting methods ( such as SNVI ) to deal with such invalid simulation outputs . A recent method termed “ Sequential Neural Posterior and Likelihood Approximation ” ( SNPLA ) also proposed to use variational inference ( VI ) instead of MCMC to speed up inference in likelihoodtargeting methods ( Wiqvist et al. , 2021 ) . While this proposal is related to our approach , their VI objective is based on the reverse Kullback Leibler ( rKL ) divergence for learning the posterior . As we also show on benchmark tasks , this leads to mode-seeking behaviour which can limit its performance . In contrast , we show how this limitation can be overcome through modifying the variational objective in combination with using SIR for adjusting posteriors . After an introduction on neural network-based simulation-based inference ( SBI ) and variational inference ( Sec . 2 ) , we present our method , Sequential Neural Variational Inference ( SNVI ) ( Sec . 3 ) . In Sec . 4.2 , we empirically show that SNVI is significantly faster than state-of-the-art SBI methods while achieving similar accuracy on benchmark tasks . In Sec . 4.3 , we demonstrate that SNVI is scalable , and that it is robust to invalid simulation outputs : We obtain the posterior distribution of a complex neuroscience model with one order of magnitude fewer simulations than previous methods . 2 BACKGROUND . 2.1 SIMULATION-BASED INFERENCE . Simulation-based inference ( SBI ) aims to perform Bayesian inference on statistical models for which the likelihood function is only implicitly defined through a stochastic simulator . Given a prior p ( θ ) and a simulator which implicitly defines the likelihood p ( x|θ ) , the goal is to identify the posterior distribution p ( θ|xo ) for an observation xo . The simulator is considered to be ‘ black-box ’ , i.e . one can not evaluate p ( x|θ ) and does not have access to the internal states of the simulator , but only to its inputs θ and its outputs x . We focus on improving likelihood-estimation ( SNLE ) and likelihood-ratio-estimation ( SNRE ) methods . SNLE trains a deep neural density estimator ` ψ ( x|θ ) by minimizing the forward Kullback-Leibler divergence ( fKL ) between ` ψ ( x|θ ) and p ( x|θ ) using samples ( x , θ ) ∼ p̃ ( x , θ ) = p ( x|θ ) p̃ ( θ ) from the simulator with L ( ψ ) = − 1N ∑N i=1 log ` ψ ( xi|θi ) . Here , ` ψ ( x|θ ) is a conditional density estimator learning the conditional density p ( x|θ ) from ( θ , x ) pairs , ψ are its learnable parameters , and p̃ ( θ ) is the proposal distribution from which the parameters θ are drawn ( given by e.g . a previous estimate of the posterior or by an active learning scheme , Papamakarios et al. , 2019 ; Lueckmann et al. , 2019a ) . Analogously , SNRE uses a discriminator , e.g . a deep logistic regression network , to estimate the density ratio r ( x , θ ) = p̃ ( x , θ ) p̃ ( x ) p̃ ( θ ) = p ( x|θ ) p̃ ( x ) . ( Hermans et al. , 2020 ; Durkan et al. , 2020 ) , If the proposal is given by the prior , then one can recover the exact posterior density , otherwise the posterior can be recovered up to a normalizing constant ( Durkan et al. , 2020 ) . Once the likelihood ( or likelihood-ratio ) has been learned , the posterior can be sampled with MCMC . In sequential schemes , the proposal p̃ is updated each round using the current estimate of the posterior – thus , computationally expensive MCMC sampling needs to be run in each round . 2.2 VARIATIONAL INFERENCE . We use variational inference ( VI ) to estimate the posterior distribution . VI formulates an optimization problem over a class of tractable distributions Q to find parameters φ∗ such that qφ∗ ∈ Q is closest to the true posterior p ( θ|xo ) according to some divergence D ( Blei et al. , 2017 ) . Formally , φ∗ = argmin φ D ( qφ ( θ ) ||p ( θ|xo ) ) with qφ∗ ( θ ) = p ( θ|xo ) ⇐⇒ D ( qφ∗ ( θ ) ||p ( θ|xo ) ) = 0 . Recent work has introduced normalizing flows as a variational family for VI ( Ranganath et al. , 2014 ; Agrawal et al. , 2020 ; Rezende & Mohamed , 2015 ) . Normalizing flows define a distribution qφ ( θ ) by learning a bijection Tφ which transforms a simpler distribution into a complex distribution p ( θ|xo ) . Normalizing flows provide a highly flexible variational family , while at the same time allowing low variance gradient estimation of an expectation by the reparameterization trick , i.e . ∇φEθ∼qφ [ f ( θ ) ] = Eθ0∼q0 [ ∇φf ( Tφ ( θ0 ) ) ] with θ = Tφ ( θ0 ) ( Kingma & Welling , 2014 ; Rezende et al. , 2014 ; Rezende & Mohamed , 2015 ) . 3 SEQUENTIAL NEURAL VARIATIONAL INFERENCE ( SNVI ) . 3.1 KEY INGREDIENTS . We propose a framework to use variational inference ( VI ) for simulation-based inference . Our method consists of three parts : A learnable likelihood ( or likelihood-ratio ) model , a posterior model ( typically parameterized as a normalizing flow ) to be learned with VI , and sampling importance resampling ( SIR ) ( Rubin , 1988 ) to refine the accuracy of the posterior ( Fig . 1 ) . The likelihood ( ratio ) model ` ψ ( x|θ ) learns to approximate the likelihood p ( x|θ ) or the likelihood-ratio p ( x|θ ) p ( x ) from pairs of parameters and simulation outputs ( θ , x ) . We use the term SNLVI to refer to SNVI with likelihoods , and SNRVI with likelihood-ratios . After a likelihood ( -ratio ) model has been trained , the posterior model qφ ( θ ) is trained with variational inference using normalizing flows . Finally , SIR is used to correct potential inaccuracies in the posterior qφ ( θ ) – as we will show below , the SIR step leads to empirical improvements at modest computational overhead . To refine the likelihood ( -ratio ) model and the posterior , the procedure can be repeated across several ‘ rounds ’ . We opt to sample the parameters θ from the previous posterior estimate qφ ( θ ) , but other strategies for active learning ( e.g . Lueckmann et al. , 2019b ) could be plugged into SNVI . The algorithm is summarized in Alg . 1 . We will now describe three variational objectives that can be used with SNVI , the SIR procedure to refine the posterior , and a strategy for dealing with invalid simulation outputs . 3.2 VARIATIONAL OBJECTIVES FOR SBI . Because of the expressiveness of normalizing flows , the true posterior can likely be approximated well by a member of the variational family ( Papamakarios et al. , 2021 ) . Thus , the quality of the Algorithm 1 : SNVI 1 Inputs : prior p ( θ ) , observation xo , divergence D , simulations per round N , number of rounds R , selection strategy S. 2 Outputs : Approximate likelihood ` ψ and variational posterior qφ . 3 Initialize : Proposal p̃ ( θ ) = p ( θ ) , simulation dataset X = { } 4 for r ∈ [ 1 , ... , R ] do 5 for i ∈ [ 1 , ... , N ] do 6 θi = S ( p̃ , ` φ , p ) ; // sample θi ∼ p̃ ( θ ) 7 simulate xi ∼ p ( x|θi ) ; // run the simulator on θi 8 add ( θi , xi ) to X 9 end 10 ( re- ) train ` ψ ; ψ∗ = argminψ − 1N ∑ ( xi , θi ) ∈X log ` ψ ( xi|θi ) ; // or SNRE loss 11 ( re- ) train qφ ; φ∗ = argminφD ( qφ ( θ ) ||p ( θ|xo ) ) with p ( θ|xo ) ∝ p ( xo|θ ) p ( θ ) ≈ ` ψ∗ ( xo|θ ) p ( θ ) 12 p̃ ( θ ) = qφ ( θ ) 13 end variational approximation is strongly linked to the ability to achieve the best possible approximation through optimization , which in turn depends on the choice of variational objective D. Using the reverse Kullback-Leibler Divergence ( rKL ) as proposed by Wiqvist et al . ( 2021 ) can give rise to mode-seeking behaviour and qφ might not cover all regions of the posterior ( Bishop , 2006 ; Blei et al. , 2017 ) . As a complementary approach , we suggest and evaluate three alternative variational objectives that induce a mass-covering behaviour and posit that this strategy will be particularly important in sequential schemes . 1 . Forward KL divergence ( fKL ) In contrast to the reverse KL ( rKL ) , the forward KullbackLeibler divergence ( fKL ) is mass-covering ( Bishop , 2006 ) . Wan et al . ( 2020 ) minimize the following upper bound to the evidence , which implicitly minimizes the fKL : L ( φ ) = Eθ∼qφ [ w ( θ ) log ( w ( θ ) ) ] with w ( θ ) = p ( xo , θ ) /qφ ( θ ) . This expression is hard to estimate with samples : If qφ ( θ ) is different from p ( xo , θ ) then w ( θ ) ≈ 0 for most θ ∼ qφ ( θ ) , thus∇φL ( φ ) ≈ 0 , which would prevent learning ( see Appendix Sec . A.3 ) . To overcome this problem , we rewrite the fKL using self-normalized importance sampling ( Jerfel et al. , 2021 ) . Let θ1 , . . . , θN ∼ π be samples from an arbitrary proposal distribution π . We then minimize the loss : LfKL ( φ ) = DKL ( p||qφ ) ≈ N∑ i=1 w ( θi ) ∑N j=1 w ( θj ) log ( p ( xo , θi ) qφ ( θi ) ) where w ( θ ) = p ( xo , θ ) /π ( θ ) . As a self-normalized importance sampling scheme , this estimate is biased , but the bias vanishes at rateO ( 1/N ) ( Hesterberg , 2003 ) . In our experiments , we use π = qφ , which provides a good proposal when qφ is close to p ( Chatterjee & Diaconis , 2018 ) . Even though qφ will differ from p initially , sufficient gradient information is available to drive qφ towards p , as we demonstrate in Appendix Sec . A.3 . 2 . Importance weighted ELBO The importance weighted ELBO ( IW-ELBO ) introduced by Burda et al . ( 2016 ) uses the importance-weighted gradient of the evidence lower bound ( ELBO ) . It minimizes the KL divergence between the self-normalized importance sampling distribution of qφ and the posterior and thus provides a good proposal for sampling importance resampling ( Cremer et al. , 2017 ; Domke & Sheldon , 2018 ; Ranganath et al. , 2014 ) . It can be formulated as L ( K ) IW ( φ ) = Eθ1 , ... , θk∼qφ [ log 1 K K∑ k=1 p ( xo , θk ) qφ ( θk ) ] . To avoid a low SNR of the gradient estimator ( Rainforth et al. , 2018 ) , we use the ‘ Sticking the Landing ‘ ( STL ) estimator introduced by Roeder et al . ( 2017 ) . 3 . Rényi α-divergences Rényi α-divergences are a divergence family with a hyperparameter α which allows to tune the mass-covering ( or mode-seeking ) behaviour of the algorithm . For α → 1 , the divergence approaches the rKL . For α < 1 , the divergence becomes more mass-covering , for α > 1 more mode-seeking . We use α = 0.1 in our experiments . A Rényi variational bound was established by Li & Turner ( 2016 ) and is given by Lα ( φ ) = 1 1− α log ( Eθ∼qφ [ ( p ( xo , θ ) qφ ( θ ) ) 1−α ] ) For α = 0 , Lα is a single sample Monte Carlo estimate of the IW-ELBO ( when using K samples to estimate the expectation in Lα ( φ ) ) and thus also suffers from a low SNR as α → 0 ( Rainforth et al. , 2018 ; Li & Turner , 2016 ) . Just as for the IW-ELBO , we alleviate this issue by combining the α-divergences with the STL estimator . | This paper presents a form of variational inference (VI) approach for likelihood-free inference (LFI) named Sequential Neural Variational Inference (SNVI). Its main advantage over other VI approaches for LFI is computational efficiency rather than accuracy. This approach has consists of three parts, a likelihood or likelihood-ratio model, a posterior model, and a sampling importance resampling (SIR) step to refine the posterior model each round. Because the variational family for the posterior model used is based on normalising flows (NFs), whose expressiveness is already very high, the authors instead focus on the variational objective of the posterior model. Here they consider three variants from previous works - (1) forward KL divergence with self-normalized importance sampling, (2) importance weighted ELBO, and (3) Rényi $\alpha$-divergences. Method (1) prevents objective weights to be close to zero by normalising them, at the cost of introducing a bias that vanishes at rate $\mathcal{O}(1/N)$. Method (2) aims to provide good proposals for SIR through lower bounding the ELBO, and uses the "Sticking the Landing" (STL) estimator to circumvent the low signal-to-noise (SNR) ratio. Method (3) allow the mass-covering or model-seeking behaviour to be tuned, and require the same STL estimator to prevent low SNR. Finally, the authors propose an SIR step from previous work which claims to enrich the variational family with minimal computational cost. In the case of invalid data from simulations, a kernel is used to reweigh the loss to focus on specific regions in the data-space. To fix the bias, the bias factor is estimated from another model to recover the posterior up to proportionality. | SP:e6d82e2ccc6827789d15d98b8731ecb208b47797 |
Variational methods for simulation-based inference | 1 INTRODUCTION . Many domains in science and engineering use numerical simulations to model empirically observed phenomena . These models are designed by domain experts and are built to produce mechanistic insights . However , in many cases , some parameters of the simulator can not be experimentally measured and need to be inferred from data . A principled way to identify parameters that match empirical observations is Bayesian inference . However , for many models of interest , one can only sample from the model by simulating a ( stochastic ) computer program , but explicitly evaluating the likelihood p ( x|θ ) is intractable . Traditional methods to perform Bayesian inference in such simulation-based inference ( SBI ) , also known as likelihood-free inference scenarios , include Approximate Bayesian computation ( ABC ) ( Beaumont et al. , 2002 ) and synthetic likelihood ( SL ) ( Wood , 2010 ) methods . However , these methods generally struggle with high-dimensional data and typically require one to design or learn ( Chen et al. , 2021 ) summary statistics and distance functions . Recently , several methods using neural density ( -ratio ) estimation have emerged . These methods train neural networks to learn the posterior ( SNPE , Papamakarios & Murray , 2016 ; Lueckmann et al. , 2017 ; Greenberg et al. , 2019 ) , the likelihood ( SNLE , Papamakarios et al. , 2019 ; Lueckmann et al. , 2019a ) , or the likelihood-to-evidence ratio ( SNRE , Thomas et al. , 2021 ; Hermans et al. , 2020 ; Durkan et al. , 2020 ; Miller et al. , 2022 ) . To improve the simulation efficiency of these methods , sequential training schemes have been proposed : Initially , parameters are sampled from the prior distribution to train an estimation-network . Subsequently , new samples are drawn adaptively to focus training on specific regions in parameter space , thus allowing the methods to scale to larger models with more parameters . In practice , however , it has remained a challenge to realize the full potential of these sequential schemes : For sequential neural posterior estimation ( SNPE ) techniques , the loss function needs to be adjusted across rounds ( Greenberg et al. , 2019 ) , and it has been reported that this can be problematic if the proposal distribution is very different from prior , and lead to ‘ leakage ’ of probability mass into regions without prior support ( Durkan et al. , 2020 ) . Both sequential neural likelihood ( SNLE ) and likelihood-ratio ( SNRE ) methods require MCMC sampling , which can become prohibitively slow– MCMC sampling is required for each round of simulations , which , for high-dimensional models , can take more time than running the simulations and training the neural density estimator . Our goal is to provide a method which combines the advantages of posterior-targeting methods and those targeting likelihood ( -ratios ) : Posterior targeting methods allow rapid inference by providing a functional approximation to the posterior which can be evaluated without the need to use MCMC sampling . Conversely , a key advantage of likelihood ( -ratio ) targeting methods is their flexibility– learned likelihoods can e.g . be used to integrate information from multiple observations , or can be used without retraining if the prior is changed . In addition , they can be applied with any activelearning scheme without requiring modifications of the loss-function . We achieve this method by combining likelihood ( -ratio ) estimation with variationally learned inference networks using normalizing flows ( Rezende & Mohamed , 2015 ; Papamakarios et al. , 2017 ; Durkan et al. , 2019a ) and sampling importance resampling ( SIR ) ( Rubin , 1988 ) . We name our approach Sequential Neural Variational Inference ( SNVI ) . We will show that our simulation-based inference methods are as accurate as SNLE and SNRE , while being substantially faster at inference as they do not require MCMC sampling . In addition , real-world simulators sometimes produce invalid outputs , e.g . when a simulation fails . We introduce a strategy that allows likelihood ( -ratio ) targeting methods ( such as SNVI ) to deal with such invalid simulation outputs . A recent method termed “ Sequential Neural Posterior and Likelihood Approximation ” ( SNPLA ) also proposed to use variational inference ( VI ) instead of MCMC to speed up inference in likelihoodtargeting methods ( Wiqvist et al. , 2021 ) . While this proposal is related to our approach , their VI objective is based on the reverse Kullback Leibler ( rKL ) divergence for learning the posterior . As we also show on benchmark tasks , this leads to mode-seeking behaviour which can limit its performance . In contrast , we show how this limitation can be overcome through modifying the variational objective in combination with using SIR for adjusting posteriors . After an introduction on neural network-based simulation-based inference ( SBI ) and variational inference ( Sec . 2 ) , we present our method , Sequential Neural Variational Inference ( SNVI ) ( Sec . 3 ) . In Sec . 4.2 , we empirically show that SNVI is significantly faster than state-of-the-art SBI methods while achieving similar accuracy on benchmark tasks . In Sec . 4.3 , we demonstrate that SNVI is scalable , and that it is robust to invalid simulation outputs : We obtain the posterior distribution of a complex neuroscience model with one order of magnitude fewer simulations than previous methods . 2 BACKGROUND . 2.1 SIMULATION-BASED INFERENCE . Simulation-based inference ( SBI ) aims to perform Bayesian inference on statistical models for which the likelihood function is only implicitly defined through a stochastic simulator . Given a prior p ( θ ) and a simulator which implicitly defines the likelihood p ( x|θ ) , the goal is to identify the posterior distribution p ( θ|xo ) for an observation xo . The simulator is considered to be ‘ black-box ’ , i.e . one can not evaluate p ( x|θ ) and does not have access to the internal states of the simulator , but only to its inputs θ and its outputs x . We focus on improving likelihood-estimation ( SNLE ) and likelihood-ratio-estimation ( SNRE ) methods . SNLE trains a deep neural density estimator ` ψ ( x|θ ) by minimizing the forward Kullback-Leibler divergence ( fKL ) between ` ψ ( x|θ ) and p ( x|θ ) using samples ( x , θ ) ∼ p̃ ( x , θ ) = p ( x|θ ) p̃ ( θ ) from the simulator with L ( ψ ) = − 1N ∑N i=1 log ` ψ ( xi|θi ) . Here , ` ψ ( x|θ ) is a conditional density estimator learning the conditional density p ( x|θ ) from ( θ , x ) pairs , ψ are its learnable parameters , and p̃ ( θ ) is the proposal distribution from which the parameters θ are drawn ( given by e.g . a previous estimate of the posterior or by an active learning scheme , Papamakarios et al. , 2019 ; Lueckmann et al. , 2019a ) . Analogously , SNRE uses a discriminator , e.g . a deep logistic regression network , to estimate the density ratio r ( x , θ ) = p̃ ( x , θ ) p̃ ( x ) p̃ ( θ ) = p ( x|θ ) p̃ ( x ) . ( Hermans et al. , 2020 ; Durkan et al. , 2020 ) , If the proposal is given by the prior , then one can recover the exact posterior density , otherwise the posterior can be recovered up to a normalizing constant ( Durkan et al. , 2020 ) . Once the likelihood ( or likelihood-ratio ) has been learned , the posterior can be sampled with MCMC . In sequential schemes , the proposal p̃ is updated each round using the current estimate of the posterior – thus , computationally expensive MCMC sampling needs to be run in each round . 2.2 VARIATIONAL INFERENCE . We use variational inference ( VI ) to estimate the posterior distribution . VI formulates an optimization problem over a class of tractable distributions Q to find parameters φ∗ such that qφ∗ ∈ Q is closest to the true posterior p ( θ|xo ) according to some divergence D ( Blei et al. , 2017 ) . Formally , φ∗ = argmin φ D ( qφ ( θ ) ||p ( θ|xo ) ) with qφ∗ ( θ ) = p ( θ|xo ) ⇐⇒ D ( qφ∗ ( θ ) ||p ( θ|xo ) ) = 0 . Recent work has introduced normalizing flows as a variational family for VI ( Ranganath et al. , 2014 ; Agrawal et al. , 2020 ; Rezende & Mohamed , 2015 ) . Normalizing flows define a distribution qφ ( θ ) by learning a bijection Tφ which transforms a simpler distribution into a complex distribution p ( θ|xo ) . Normalizing flows provide a highly flexible variational family , while at the same time allowing low variance gradient estimation of an expectation by the reparameterization trick , i.e . ∇φEθ∼qφ [ f ( θ ) ] = Eθ0∼q0 [ ∇φf ( Tφ ( θ0 ) ) ] with θ = Tφ ( θ0 ) ( Kingma & Welling , 2014 ; Rezende et al. , 2014 ; Rezende & Mohamed , 2015 ) . 3 SEQUENTIAL NEURAL VARIATIONAL INFERENCE ( SNVI ) . 3.1 KEY INGREDIENTS . We propose a framework to use variational inference ( VI ) for simulation-based inference . Our method consists of three parts : A learnable likelihood ( or likelihood-ratio ) model , a posterior model ( typically parameterized as a normalizing flow ) to be learned with VI , and sampling importance resampling ( SIR ) ( Rubin , 1988 ) to refine the accuracy of the posterior ( Fig . 1 ) . The likelihood ( ratio ) model ` ψ ( x|θ ) learns to approximate the likelihood p ( x|θ ) or the likelihood-ratio p ( x|θ ) p ( x ) from pairs of parameters and simulation outputs ( θ , x ) . We use the term SNLVI to refer to SNVI with likelihoods , and SNRVI with likelihood-ratios . After a likelihood ( -ratio ) model has been trained , the posterior model qφ ( θ ) is trained with variational inference using normalizing flows . Finally , SIR is used to correct potential inaccuracies in the posterior qφ ( θ ) – as we will show below , the SIR step leads to empirical improvements at modest computational overhead . To refine the likelihood ( -ratio ) model and the posterior , the procedure can be repeated across several ‘ rounds ’ . We opt to sample the parameters θ from the previous posterior estimate qφ ( θ ) , but other strategies for active learning ( e.g . Lueckmann et al. , 2019b ) could be plugged into SNVI . The algorithm is summarized in Alg . 1 . We will now describe three variational objectives that can be used with SNVI , the SIR procedure to refine the posterior , and a strategy for dealing with invalid simulation outputs . 3.2 VARIATIONAL OBJECTIVES FOR SBI . Because of the expressiveness of normalizing flows , the true posterior can likely be approximated well by a member of the variational family ( Papamakarios et al. , 2021 ) . Thus , the quality of the Algorithm 1 : SNVI 1 Inputs : prior p ( θ ) , observation xo , divergence D , simulations per round N , number of rounds R , selection strategy S. 2 Outputs : Approximate likelihood ` ψ and variational posterior qφ . 3 Initialize : Proposal p̃ ( θ ) = p ( θ ) , simulation dataset X = { } 4 for r ∈ [ 1 , ... , R ] do 5 for i ∈ [ 1 , ... , N ] do 6 θi = S ( p̃ , ` φ , p ) ; // sample θi ∼ p̃ ( θ ) 7 simulate xi ∼ p ( x|θi ) ; // run the simulator on θi 8 add ( θi , xi ) to X 9 end 10 ( re- ) train ` ψ ; ψ∗ = argminψ − 1N ∑ ( xi , θi ) ∈X log ` ψ ( xi|θi ) ; // or SNRE loss 11 ( re- ) train qφ ; φ∗ = argminφD ( qφ ( θ ) ||p ( θ|xo ) ) with p ( θ|xo ) ∝ p ( xo|θ ) p ( θ ) ≈ ` ψ∗ ( xo|θ ) p ( θ ) 12 p̃ ( θ ) = qφ ( θ ) 13 end variational approximation is strongly linked to the ability to achieve the best possible approximation through optimization , which in turn depends on the choice of variational objective D. Using the reverse Kullback-Leibler Divergence ( rKL ) as proposed by Wiqvist et al . ( 2021 ) can give rise to mode-seeking behaviour and qφ might not cover all regions of the posterior ( Bishop , 2006 ; Blei et al. , 2017 ) . As a complementary approach , we suggest and evaluate three alternative variational objectives that induce a mass-covering behaviour and posit that this strategy will be particularly important in sequential schemes . 1 . Forward KL divergence ( fKL ) In contrast to the reverse KL ( rKL ) , the forward KullbackLeibler divergence ( fKL ) is mass-covering ( Bishop , 2006 ) . Wan et al . ( 2020 ) minimize the following upper bound to the evidence , which implicitly minimizes the fKL : L ( φ ) = Eθ∼qφ [ w ( θ ) log ( w ( θ ) ) ] with w ( θ ) = p ( xo , θ ) /qφ ( θ ) . This expression is hard to estimate with samples : If qφ ( θ ) is different from p ( xo , θ ) then w ( θ ) ≈ 0 for most θ ∼ qφ ( θ ) , thus∇φL ( φ ) ≈ 0 , which would prevent learning ( see Appendix Sec . A.3 ) . To overcome this problem , we rewrite the fKL using self-normalized importance sampling ( Jerfel et al. , 2021 ) . Let θ1 , . . . , θN ∼ π be samples from an arbitrary proposal distribution π . We then minimize the loss : LfKL ( φ ) = DKL ( p||qφ ) ≈ N∑ i=1 w ( θi ) ∑N j=1 w ( θj ) log ( p ( xo , θi ) qφ ( θi ) ) where w ( θ ) = p ( xo , θ ) /π ( θ ) . As a self-normalized importance sampling scheme , this estimate is biased , but the bias vanishes at rateO ( 1/N ) ( Hesterberg , 2003 ) . In our experiments , we use π = qφ , which provides a good proposal when qφ is close to p ( Chatterjee & Diaconis , 2018 ) . Even though qφ will differ from p initially , sufficient gradient information is available to drive qφ towards p , as we demonstrate in Appendix Sec . A.3 . 2 . Importance weighted ELBO The importance weighted ELBO ( IW-ELBO ) introduced by Burda et al . ( 2016 ) uses the importance-weighted gradient of the evidence lower bound ( ELBO ) . It minimizes the KL divergence between the self-normalized importance sampling distribution of qφ and the posterior and thus provides a good proposal for sampling importance resampling ( Cremer et al. , 2017 ; Domke & Sheldon , 2018 ; Ranganath et al. , 2014 ) . It can be formulated as L ( K ) IW ( φ ) = Eθ1 , ... , θk∼qφ [ log 1 K K∑ k=1 p ( xo , θk ) qφ ( θk ) ] . To avoid a low SNR of the gradient estimator ( Rainforth et al. , 2018 ) , we use the ‘ Sticking the Landing ‘ ( STL ) estimator introduced by Roeder et al . ( 2017 ) . 3 . Rényi α-divergences Rényi α-divergences are a divergence family with a hyperparameter α which allows to tune the mass-covering ( or mode-seeking ) behaviour of the algorithm . For α → 1 , the divergence approaches the rKL . For α < 1 , the divergence becomes more mass-covering , for α > 1 more mode-seeking . We use α = 0.1 in our experiments . A Rényi variational bound was established by Li & Turner ( 2016 ) and is given by Lα ( φ ) = 1 1− α log ( Eθ∼qφ [ ( p ( xo , θ ) qφ ( θ ) ) 1−α ] ) For α = 0 , Lα is a single sample Monte Carlo estimate of the IW-ELBO ( when using K samples to estimate the expectation in Lα ( φ ) ) and thus also suffers from a low SNR as α → 0 ( Rainforth et al. , 2018 ; Li & Turner , 2016 ) . Just as for the IW-ELBO , we alleviate this issue by combining the α-divergences with the STL estimator . | This paper presents SNVI, a simulation-based inference based likelihood (ratio) estimation and variational inference. The main contribution is to sidestep the slow MCMC sampling step of SNLE (SNRE) by learning the posterior distribution with variational inference. This work is similar to SNPLA but replaces the rKL variational objective with three alternative objectives that induce a mass-covering behaviour and are, therefore, better suited when using the approximate posterior distributions as proposal distributions in the sequential regime. Experiments show convincing results. | SP:e6d82e2ccc6827789d15d98b8731ecb208b47797 |
Variational methods for simulation-based inference | 1 INTRODUCTION . Many domains in science and engineering use numerical simulations to model empirically observed phenomena . These models are designed by domain experts and are built to produce mechanistic insights . However , in many cases , some parameters of the simulator can not be experimentally measured and need to be inferred from data . A principled way to identify parameters that match empirical observations is Bayesian inference . However , for many models of interest , one can only sample from the model by simulating a ( stochastic ) computer program , but explicitly evaluating the likelihood p ( x|θ ) is intractable . Traditional methods to perform Bayesian inference in such simulation-based inference ( SBI ) , also known as likelihood-free inference scenarios , include Approximate Bayesian computation ( ABC ) ( Beaumont et al. , 2002 ) and synthetic likelihood ( SL ) ( Wood , 2010 ) methods . However , these methods generally struggle with high-dimensional data and typically require one to design or learn ( Chen et al. , 2021 ) summary statistics and distance functions . Recently , several methods using neural density ( -ratio ) estimation have emerged . These methods train neural networks to learn the posterior ( SNPE , Papamakarios & Murray , 2016 ; Lueckmann et al. , 2017 ; Greenberg et al. , 2019 ) , the likelihood ( SNLE , Papamakarios et al. , 2019 ; Lueckmann et al. , 2019a ) , or the likelihood-to-evidence ratio ( SNRE , Thomas et al. , 2021 ; Hermans et al. , 2020 ; Durkan et al. , 2020 ; Miller et al. , 2022 ) . To improve the simulation efficiency of these methods , sequential training schemes have been proposed : Initially , parameters are sampled from the prior distribution to train an estimation-network . Subsequently , new samples are drawn adaptively to focus training on specific regions in parameter space , thus allowing the methods to scale to larger models with more parameters . In practice , however , it has remained a challenge to realize the full potential of these sequential schemes : For sequential neural posterior estimation ( SNPE ) techniques , the loss function needs to be adjusted across rounds ( Greenberg et al. , 2019 ) , and it has been reported that this can be problematic if the proposal distribution is very different from prior , and lead to ‘ leakage ’ of probability mass into regions without prior support ( Durkan et al. , 2020 ) . Both sequential neural likelihood ( SNLE ) and likelihood-ratio ( SNRE ) methods require MCMC sampling , which can become prohibitively slow– MCMC sampling is required for each round of simulations , which , for high-dimensional models , can take more time than running the simulations and training the neural density estimator . Our goal is to provide a method which combines the advantages of posterior-targeting methods and those targeting likelihood ( -ratios ) : Posterior targeting methods allow rapid inference by providing a functional approximation to the posterior which can be evaluated without the need to use MCMC sampling . Conversely , a key advantage of likelihood ( -ratio ) targeting methods is their flexibility– learned likelihoods can e.g . be used to integrate information from multiple observations , or can be used without retraining if the prior is changed . In addition , they can be applied with any activelearning scheme without requiring modifications of the loss-function . We achieve this method by combining likelihood ( -ratio ) estimation with variationally learned inference networks using normalizing flows ( Rezende & Mohamed , 2015 ; Papamakarios et al. , 2017 ; Durkan et al. , 2019a ) and sampling importance resampling ( SIR ) ( Rubin , 1988 ) . We name our approach Sequential Neural Variational Inference ( SNVI ) . We will show that our simulation-based inference methods are as accurate as SNLE and SNRE , while being substantially faster at inference as they do not require MCMC sampling . In addition , real-world simulators sometimes produce invalid outputs , e.g . when a simulation fails . We introduce a strategy that allows likelihood ( -ratio ) targeting methods ( such as SNVI ) to deal with such invalid simulation outputs . A recent method termed “ Sequential Neural Posterior and Likelihood Approximation ” ( SNPLA ) also proposed to use variational inference ( VI ) instead of MCMC to speed up inference in likelihoodtargeting methods ( Wiqvist et al. , 2021 ) . While this proposal is related to our approach , their VI objective is based on the reverse Kullback Leibler ( rKL ) divergence for learning the posterior . As we also show on benchmark tasks , this leads to mode-seeking behaviour which can limit its performance . In contrast , we show how this limitation can be overcome through modifying the variational objective in combination with using SIR for adjusting posteriors . After an introduction on neural network-based simulation-based inference ( SBI ) and variational inference ( Sec . 2 ) , we present our method , Sequential Neural Variational Inference ( SNVI ) ( Sec . 3 ) . In Sec . 4.2 , we empirically show that SNVI is significantly faster than state-of-the-art SBI methods while achieving similar accuracy on benchmark tasks . In Sec . 4.3 , we demonstrate that SNVI is scalable , and that it is robust to invalid simulation outputs : We obtain the posterior distribution of a complex neuroscience model with one order of magnitude fewer simulations than previous methods . 2 BACKGROUND . 2.1 SIMULATION-BASED INFERENCE . Simulation-based inference ( SBI ) aims to perform Bayesian inference on statistical models for which the likelihood function is only implicitly defined through a stochastic simulator . Given a prior p ( θ ) and a simulator which implicitly defines the likelihood p ( x|θ ) , the goal is to identify the posterior distribution p ( θ|xo ) for an observation xo . The simulator is considered to be ‘ black-box ’ , i.e . one can not evaluate p ( x|θ ) and does not have access to the internal states of the simulator , but only to its inputs θ and its outputs x . We focus on improving likelihood-estimation ( SNLE ) and likelihood-ratio-estimation ( SNRE ) methods . SNLE trains a deep neural density estimator ` ψ ( x|θ ) by minimizing the forward Kullback-Leibler divergence ( fKL ) between ` ψ ( x|θ ) and p ( x|θ ) using samples ( x , θ ) ∼ p̃ ( x , θ ) = p ( x|θ ) p̃ ( θ ) from the simulator with L ( ψ ) = − 1N ∑N i=1 log ` ψ ( xi|θi ) . Here , ` ψ ( x|θ ) is a conditional density estimator learning the conditional density p ( x|θ ) from ( θ , x ) pairs , ψ are its learnable parameters , and p̃ ( θ ) is the proposal distribution from which the parameters θ are drawn ( given by e.g . a previous estimate of the posterior or by an active learning scheme , Papamakarios et al. , 2019 ; Lueckmann et al. , 2019a ) . Analogously , SNRE uses a discriminator , e.g . a deep logistic regression network , to estimate the density ratio r ( x , θ ) = p̃ ( x , θ ) p̃ ( x ) p̃ ( θ ) = p ( x|θ ) p̃ ( x ) . ( Hermans et al. , 2020 ; Durkan et al. , 2020 ) , If the proposal is given by the prior , then one can recover the exact posterior density , otherwise the posterior can be recovered up to a normalizing constant ( Durkan et al. , 2020 ) . Once the likelihood ( or likelihood-ratio ) has been learned , the posterior can be sampled with MCMC . In sequential schemes , the proposal p̃ is updated each round using the current estimate of the posterior – thus , computationally expensive MCMC sampling needs to be run in each round . 2.2 VARIATIONAL INFERENCE . We use variational inference ( VI ) to estimate the posterior distribution . VI formulates an optimization problem over a class of tractable distributions Q to find parameters φ∗ such that qφ∗ ∈ Q is closest to the true posterior p ( θ|xo ) according to some divergence D ( Blei et al. , 2017 ) . Formally , φ∗ = argmin φ D ( qφ ( θ ) ||p ( θ|xo ) ) with qφ∗ ( θ ) = p ( θ|xo ) ⇐⇒ D ( qφ∗ ( θ ) ||p ( θ|xo ) ) = 0 . Recent work has introduced normalizing flows as a variational family for VI ( Ranganath et al. , 2014 ; Agrawal et al. , 2020 ; Rezende & Mohamed , 2015 ) . Normalizing flows define a distribution qφ ( θ ) by learning a bijection Tφ which transforms a simpler distribution into a complex distribution p ( θ|xo ) . Normalizing flows provide a highly flexible variational family , while at the same time allowing low variance gradient estimation of an expectation by the reparameterization trick , i.e . ∇φEθ∼qφ [ f ( θ ) ] = Eθ0∼q0 [ ∇φf ( Tφ ( θ0 ) ) ] with θ = Tφ ( θ0 ) ( Kingma & Welling , 2014 ; Rezende et al. , 2014 ; Rezende & Mohamed , 2015 ) . 3 SEQUENTIAL NEURAL VARIATIONAL INFERENCE ( SNVI ) . 3.1 KEY INGREDIENTS . We propose a framework to use variational inference ( VI ) for simulation-based inference . Our method consists of three parts : A learnable likelihood ( or likelihood-ratio ) model , a posterior model ( typically parameterized as a normalizing flow ) to be learned with VI , and sampling importance resampling ( SIR ) ( Rubin , 1988 ) to refine the accuracy of the posterior ( Fig . 1 ) . The likelihood ( ratio ) model ` ψ ( x|θ ) learns to approximate the likelihood p ( x|θ ) or the likelihood-ratio p ( x|θ ) p ( x ) from pairs of parameters and simulation outputs ( θ , x ) . We use the term SNLVI to refer to SNVI with likelihoods , and SNRVI with likelihood-ratios . After a likelihood ( -ratio ) model has been trained , the posterior model qφ ( θ ) is trained with variational inference using normalizing flows . Finally , SIR is used to correct potential inaccuracies in the posterior qφ ( θ ) – as we will show below , the SIR step leads to empirical improvements at modest computational overhead . To refine the likelihood ( -ratio ) model and the posterior , the procedure can be repeated across several ‘ rounds ’ . We opt to sample the parameters θ from the previous posterior estimate qφ ( θ ) , but other strategies for active learning ( e.g . Lueckmann et al. , 2019b ) could be plugged into SNVI . The algorithm is summarized in Alg . 1 . We will now describe three variational objectives that can be used with SNVI , the SIR procedure to refine the posterior , and a strategy for dealing with invalid simulation outputs . 3.2 VARIATIONAL OBJECTIVES FOR SBI . Because of the expressiveness of normalizing flows , the true posterior can likely be approximated well by a member of the variational family ( Papamakarios et al. , 2021 ) . Thus , the quality of the Algorithm 1 : SNVI 1 Inputs : prior p ( θ ) , observation xo , divergence D , simulations per round N , number of rounds R , selection strategy S. 2 Outputs : Approximate likelihood ` ψ and variational posterior qφ . 3 Initialize : Proposal p̃ ( θ ) = p ( θ ) , simulation dataset X = { } 4 for r ∈ [ 1 , ... , R ] do 5 for i ∈ [ 1 , ... , N ] do 6 θi = S ( p̃ , ` φ , p ) ; // sample θi ∼ p̃ ( θ ) 7 simulate xi ∼ p ( x|θi ) ; // run the simulator on θi 8 add ( θi , xi ) to X 9 end 10 ( re- ) train ` ψ ; ψ∗ = argminψ − 1N ∑ ( xi , θi ) ∈X log ` ψ ( xi|θi ) ; // or SNRE loss 11 ( re- ) train qφ ; φ∗ = argminφD ( qφ ( θ ) ||p ( θ|xo ) ) with p ( θ|xo ) ∝ p ( xo|θ ) p ( θ ) ≈ ` ψ∗ ( xo|θ ) p ( θ ) 12 p̃ ( θ ) = qφ ( θ ) 13 end variational approximation is strongly linked to the ability to achieve the best possible approximation through optimization , which in turn depends on the choice of variational objective D. Using the reverse Kullback-Leibler Divergence ( rKL ) as proposed by Wiqvist et al . ( 2021 ) can give rise to mode-seeking behaviour and qφ might not cover all regions of the posterior ( Bishop , 2006 ; Blei et al. , 2017 ) . As a complementary approach , we suggest and evaluate three alternative variational objectives that induce a mass-covering behaviour and posit that this strategy will be particularly important in sequential schemes . 1 . Forward KL divergence ( fKL ) In contrast to the reverse KL ( rKL ) , the forward KullbackLeibler divergence ( fKL ) is mass-covering ( Bishop , 2006 ) . Wan et al . ( 2020 ) minimize the following upper bound to the evidence , which implicitly minimizes the fKL : L ( φ ) = Eθ∼qφ [ w ( θ ) log ( w ( θ ) ) ] with w ( θ ) = p ( xo , θ ) /qφ ( θ ) . This expression is hard to estimate with samples : If qφ ( θ ) is different from p ( xo , θ ) then w ( θ ) ≈ 0 for most θ ∼ qφ ( θ ) , thus∇φL ( φ ) ≈ 0 , which would prevent learning ( see Appendix Sec . A.3 ) . To overcome this problem , we rewrite the fKL using self-normalized importance sampling ( Jerfel et al. , 2021 ) . Let θ1 , . . . , θN ∼ π be samples from an arbitrary proposal distribution π . We then minimize the loss : LfKL ( φ ) = DKL ( p||qφ ) ≈ N∑ i=1 w ( θi ) ∑N j=1 w ( θj ) log ( p ( xo , θi ) qφ ( θi ) ) where w ( θ ) = p ( xo , θ ) /π ( θ ) . As a self-normalized importance sampling scheme , this estimate is biased , but the bias vanishes at rateO ( 1/N ) ( Hesterberg , 2003 ) . In our experiments , we use π = qφ , which provides a good proposal when qφ is close to p ( Chatterjee & Diaconis , 2018 ) . Even though qφ will differ from p initially , sufficient gradient information is available to drive qφ towards p , as we demonstrate in Appendix Sec . A.3 . 2 . Importance weighted ELBO The importance weighted ELBO ( IW-ELBO ) introduced by Burda et al . ( 2016 ) uses the importance-weighted gradient of the evidence lower bound ( ELBO ) . It minimizes the KL divergence between the self-normalized importance sampling distribution of qφ and the posterior and thus provides a good proposal for sampling importance resampling ( Cremer et al. , 2017 ; Domke & Sheldon , 2018 ; Ranganath et al. , 2014 ) . It can be formulated as L ( K ) IW ( φ ) = Eθ1 , ... , θk∼qφ [ log 1 K K∑ k=1 p ( xo , θk ) qφ ( θk ) ] . To avoid a low SNR of the gradient estimator ( Rainforth et al. , 2018 ) , we use the ‘ Sticking the Landing ‘ ( STL ) estimator introduced by Roeder et al . ( 2017 ) . 3 . Rényi α-divergences Rényi α-divergences are a divergence family with a hyperparameter α which allows to tune the mass-covering ( or mode-seeking ) behaviour of the algorithm . For α → 1 , the divergence approaches the rKL . For α < 1 , the divergence becomes more mass-covering , for α > 1 more mode-seeking . We use α = 0.1 in our experiments . A Rényi variational bound was established by Li & Turner ( 2016 ) and is given by Lα ( φ ) = 1 1− α log ( Eθ∼qφ [ ( p ( xo , θ ) qφ ( θ ) ) 1−α ] ) For α = 0 , Lα is a single sample Monte Carlo estimate of the IW-ELBO ( when using K samples to estimate the expectation in Lα ( φ ) ) and thus also suffers from a low SNR as α → 0 ( Rainforth et al. , 2018 ; Li & Turner , 2016 ) . Just as for the IW-ELBO , we alleviate this issue by combining the α-divergences with the STL estimator . | This paper presents Sequential Neural Variational Inference (SNVI), a new simulation-based inference (SBI) technique. SNVI sequentially updates a surrogate likelihood model and an approximate posterior model in high posterior density. Finally, the approximate posterior is sampled with importance resampling. Experiments shows this technique is able to learn multimodal posterior distributions and is faster than methods relying on MCMC for generating posterior samples while being almost as accurate. | SP:e6d82e2ccc6827789d15d98b8731ecb208b47797 |
Superior Performance with Diversified Strategic Control in FPS Games Using General Reinforcement Learning | This paper offers an overall solution for first-person shooter ( FPS ) games to achieve superior performance using general reinforcement learning ( RL ) . We introduce an agent in ViZDoom that can surpass previous top agents ranked in the open ViZDoom AI Competitions by a large margin . The proposed framework consists of a number of generally applicable techniques , including hindsight experience replay ( HER ) based navigation , hindsight proximal policy optimization ( HPPO ) , rule-guided policy search ( RGPS ) , prioritized fictitious self-play ( PFSP ) , and diversified strategic control ( DSC ) . The proposed agent outperforms existing agents by taking advantage of diversified and human-like strategies , instead of larger neural networks , more accurate frag skills , or hand-craft tricks , etc . We provide comprehensive analysis and experiments to elaborate the effect of each component in affecting the agent performance , and demonstrate that the proposed and adopted techniques are important to achieve superior performance in general end-to-end FPS games . The proposed methods can contribute to other games and real-world tasks which also require spatial navigation and diversified behaviors . 1 INTRODUCTION . Games have been considered as challenging benchmarks in evaluating reinforcement learning ( RL ) algorithms . In games , agent can feel free to explore through infinite trial and error . OpenAI Gym ( Brockman et al. , 2016 ) has provided many wrapped game environments , such as Atari games ( Bellemare et al. , 2013 ) and Mujuco robotic control problems ( Todorov et al. , 2012 ) , through an unified interface . Meanwhile , many RL algorithms , such as TRPO ( Schulman et al. , 2015 ) , PPO ( Schulman et al. , 2017 ) , DQN ( Mnih et al. , 2015 ) and DDPG ( Lillicrap et al. , 2019 ) , etc. , have been demonstrated to achieve superior performance in these environments . Recent advances in solving more complex games , including GO ( Silver et al. , 2016 ) , DOTA 2 ( Berner et al. , 2019 ) , and StarCraft II ( Vinyals et al. , 2019 ) , further demonstrate that general RL method can be widely applied in solving simulated environments . First-person shooter ( FPS ) games , such as Quake ( Jaderberg et al. , 2019 ) and Doom ( Kempka et al. , 2016 ) , are also known by their complexity , while they are considered to be closer to real-world tasks because solving FPS games requires perfect navigation skills conditioning on raw screen/camera input . Normally , the partially observed screen only contains limited information , and the agent can not obtain the global state of the environment and the information of other agents . Many reallife applications , such as searching and rescuing robotics , and autonomous driving , etc. , are very similar to FPS games . Another challenge posed in these environments is that the state transition is not static . However , most existing intelligent agents are specifically trained to work well in some fixed environments , while they are unable to act diversely when the environment dynamics changes . In this paper , we take FPS games as the benchmark environment . We propose an overall solution to train intelligent agent in FPS games that can dynamically adjust its strategy according to environmental changes induced by diverse opponents . Specifically , we focus on the game of ViZDoom . We introduce an agent with diversified strategic control ( DSC ) that can surpass previous top agents ranked in the open ViZDoom AI Competitions 1,2 by a large margin . The solution framework proposed in this paper consists of a number of general techniques in RL , including hindsight experience replay ( HER ) ( Andrychowicz et al. , 2017 ) , hindsight proximal policy optimization ( HPPO ) , rule-guided policy search ( RGPS ) ( Han et al. , 2021 ) , prioritized fictitious self-play ( PFSP ) ( Vinyals et al. , 2019 ) , and diversified strategic control ( DSC ) , etc . We conduct comprehensive experimental results to show the importance of each of the introduced techniques in training intelligent agents . Our proposed methods can contribute to other games and real-world tasks which require spatial navigation and diversified behaviors that are similar to FPS games . 2 RELATED WORK . The proposed learning framework is based on the widely adopted actor-critic RL methods , in which a value function and a policy are learned simultaneously . Many algorithms , such as TRPO ( Schulman et al. , 2015 ) , PPO ( Schulman et al. , 2017 ) , DDPG ( Lillicrap et al. , 2019 ) and TD3 ( Fujimoto et al. , 2018 ) , etc. , all follow the actor-critic architecture and have achieved state-of-the-art results in various applications . In our learning framework , we will adopt PPO as a baseline RL algorithm . In ViZDoom , a most fundamental skill that the agent has to learn is navigation . Considering a navigation task , we need to define a target in advance . Therefore , the navigation problem in ViZDoom can naturally be viewed as a goal-conditioned task , which has been well-studied in the RL literature . Among many advanced algorithms , hindsight experience replay ( HER ) ( Andrychowicz et al. , 2017 ) provides a smart solution that it replaces the goal in failed experiences with any practically achieved one to pretend that the agent obtains a positive reward . By doing so , the agent has a much higher chance to see successful trajectories . There have been rich approaches demonstrating that HER and its variants are effective in solving goal-conditioned tasks . In complex tasks like ViZDoom , the problem can usually be decomposed into multiple stages . As we will show in the method section , our learning framework consists of three training stages , each of which focuses on solving a specific problem . One challenge in multi-stage training is that the agent at a later stage is easy to forget what has been learned in early stages . To avoid this embarrassing situation , policy distillation ( Rusu et al. , 2015 ) has been imported to keep the training policy staying close to the parameters trained in earlier stages . For example , in ( Vinyals et al. , 2019 ) , the training policy in RL phase is kept close to the intial policy trained using supervised learning via a policy distillation term . Our learning framework also utilize policy distillation as an important component . To obtain intelligent and superior AI agents in competitive multi-agent games , self-play ( SP ) ( Silver et al. , 2018 ) is often necessary to generate high-quality competitions . It conducts an automatic curriculum learning by letting the agent combat with itself or its own historical models . In addition to AlphaGo ( Silver et al. , 2016 ) , SP has been demonstrated effective in many other complex games , such as hide-and-seek environment ( Baker et al. , 2019 ) and DOTA 2 ( Berner et al. , 2019 ) . Variants of SP , such prioritized fictitious self-play ( PFSP ) proposed in AlphaStar ( Vinyals et al. , 2019 ) , have also been verified to be effective . We will use SP and PFSP in our learning framework to train intelligent agents . 3 BACKGROUND IN VIZDOOM . ViZDoom ( Kempka et al. , 2016 ) is a complex FPS game , and its formal competition scheme is using the Deathmatch mode , in which all agents fight against each other . In this mode , agent with the highest Frag score , which is defined as defeating counts minus the suicide counts , wins the game . Unlike the games of Go , Atari , and Starcraft II , where the player only needs to interact with the environment or compete with another opponent in one versus one zero-sum game , in the Deathmatch of ViZDoom Competitions in 2016 and 2017 , the player needs to fight against other 7 independent agents with diverse strategies . ViZDoom is a multi-agent environment with imperfect information that each agent can only observes very limited information in the environment at a time step . In addition , the agent takes raw image 1http : //vizdoom.cs.put.edu.pl/competitions/vdaic-2016-cig 2http : //vizdoom.cs.put.edu.pl/competitions/vdaic-2017-cig as input and we need to train end-to-end policy , where the state space is of large image size . These characteristics of ViZDoom pose great challenges to training the agent from scratch . There are already some works that have achieved well performance in ViZDoom . Clyde ( Ratcliffe et al. , 2017 ) imports the LSTM ( Hochreiter & Schmidhuber , 1997 ) structure to the Asynchronous Advantage Actor-Critic ( A3C ) algorithm ( Mnih et al. , 2016 ) , resulting a basic intelligent agent in ViZDoom . F1 ( Wu & Tian , 2016 ) who won the championship of ViZDoom AI Competitions 2016 is also trained with A3C algorithm . It also uses human-prior knowledge to conduct reward shaping and curriculum design to assist the agent learning . There is also another work ( Huang et al. , 2019 ) using deep recurrent Q-learning network as a high-level controller . It combines auxiliary tasks ( opponent detection and depth prediction ) to manage the combo-actions . However , these agents all have a common shortcoming : the strategy of their agents is fixed . For example , in the map ( see Figure . 1 ) of ViZDoom , one agent prefers to circle around the outer loop ( green line ) , and the other agent prefers to act in the middle magma area ( red line ) . These two agents may never meet each other in a competition game , and thus can not get Frag scores either . Therefore , how to obtain diversified strategy in ViZDoom still remains an open problem in the literature . 4 METHODOLOGY . The entire learning framework consists of three stages of training , by decomposing the complex task in the ViZDoom game into different levels of control , i.e. , navigation , frag and strategic control . For complex systems , multi-stage learning is necessary and more efficient to build strong artificial intelligence . An overview of our multi-stage learning framework is shown in Figure 2 . We briefly explain the framework here and elaborate the details in the following subsections . In stage 1 , we aim to obtain an expert navigation agent , which only takes moving actions . Specifically , we enable the agent to navigate by following a given target , and this is very useful for stage 3 when training the agent at a strategic level . Apparently , navigation to a given target is the essential problem considered by goal-conditioned RL ( Andrychowicz et al. , 2017 ) . It has been well demonstrated that RL methods using hindsight experience replay ( HER ) ( Andrychowicz et al. , 2017 ) are effective in solving goal-conditioned tasks . Therefore , we adopt HER in our navigation stage . We are not aware of any game AIs that explicitly take advantage of HER . The original HER method is implemented with the off policy method such as DDPG and TD3 . For training strong AIs in complex video games , it has been demonstrated that actor-critic algorithms , such as PPO , with discrete actions are more effective ( Schulman et al. , 2017 ) . In order to apply PPO and HER together , we adopt the same idea as the recent Hindsight Trust Region Policy Optimization ( HTRPO ) method ( Zhang et al. , 2021 ) , proposed the Hindsight Proximal Policy Optimization method , which we call HPPO . Based on an excellent navigation policy , in the second training stage , we let the agent participate in the formal battle game in ViZDoom , which is also termed as ‘ Frag ’ in ViZDoom . At this stage , we use Prioritized Fictitious Self-Play ( PFSP ) ( Vinyals et al. , 2019 ) to let the training agent play against itself and its historical versions with prioritization . To conveniently reuse the navigation policy , we create a new action head for frag in addition to the moving actions . So far , the trained agent can play formal ViZDoom games by randomly feeding a navigation target to the policy . In a formal ViZDoom match in the historical competitions , one player will play against another 7 players in the map . Therefore , in the last stage , we propose to learn a policy at a strategic level to output a specific target , so that the agent itself can decide where to navigate . Again , to smoothly reuse the pre-trained policy in the previous two stages , we create a new action head for deciding the target . In this way , the agent should be aware of its opponents ’ strategies and then decide where to go to encounter them . A detailed infrastructure of the proposed multi-stage learning system has been depicted in Figure 2 . | This paper proposes a multi-stage learning framework for training high-performance agents in FPS games. Its agent can dynamically adjust its strategy according to different opponents, which is simply controlled by selecting different target areas. The paper propose a methodology called Hindsight PPO to solve goal-conditioned RL, though it may have some concerns. The framework combines several existing techniques such as rule-guided policy search, action wrapper, prioritized fictitious self-play, etc. Experiments show that the framework learns an agent that can surpass previous top agents. | SP:ec238b7842667f4508f5e06eefd53199868cb7c2 |
Superior Performance with Diversified Strategic Control in FPS Games Using General Reinforcement Learning | This paper offers an overall solution for first-person shooter ( FPS ) games to achieve superior performance using general reinforcement learning ( RL ) . We introduce an agent in ViZDoom that can surpass previous top agents ranked in the open ViZDoom AI Competitions by a large margin . The proposed framework consists of a number of generally applicable techniques , including hindsight experience replay ( HER ) based navigation , hindsight proximal policy optimization ( HPPO ) , rule-guided policy search ( RGPS ) , prioritized fictitious self-play ( PFSP ) , and diversified strategic control ( DSC ) . The proposed agent outperforms existing agents by taking advantage of diversified and human-like strategies , instead of larger neural networks , more accurate frag skills , or hand-craft tricks , etc . We provide comprehensive analysis and experiments to elaborate the effect of each component in affecting the agent performance , and demonstrate that the proposed and adopted techniques are important to achieve superior performance in general end-to-end FPS games . The proposed methods can contribute to other games and real-world tasks which also require spatial navigation and diversified behaviors . 1 INTRODUCTION . Games have been considered as challenging benchmarks in evaluating reinforcement learning ( RL ) algorithms . In games , agent can feel free to explore through infinite trial and error . OpenAI Gym ( Brockman et al. , 2016 ) has provided many wrapped game environments , such as Atari games ( Bellemare et al. , 2013 ) and Mujuco robotic control problems ( Todorov et al. , 2012 ) , through an unified interface . Meanwhile , many RL algorithms , such as TRPO ( Schulman et al. , 2015 ) , PPO ( Schulman et al. , 2017 ) , DQN ( Mnih et al. , 2015 ) and DDPG ( Lillicrap et al. , 2019 ) , etc. , have been demonstrated to achieve superior performance in these environments . Recent advances in solving more complex games , including GO ( Silver et al. , 2016 ) , DOTA 2 ( Berner et al. , 2019 ) , and StarCraft II ( Vinyals et al. , 2019 ) , further demonstrate that general RL method can be widely applied in solving simulated environments . First-person shooter ( FPS ) games , such as Quake ( Jaderberg et al. , 2019 ) and Doom ( Kempka et al. , 2016 ) , are also known by their complexity , while they are considered to be closer to real-world tasks because solving FPS games requires perfect navigation skills conditioning on raw screen/camera input . Normally , the partially observed screen only contains limited information , and the agent can not obtain the global state of the environment and the information of other agents . Many reallife applications , such as searching and rescuing robotics , and autonomous driving , etc. , are very similar to FPS games . Another challenge posed in these environments is that the state transition is not static . However , most existing intelligent agents are specifically trained to work well in some fixed environments , while they are unable to act diversely when the environment dynamics changes . In this paper , we take FPS games as the benchmark environment . We propose an overall solution to train intelligent agent in FPS games that can dynamically adjust its strategy according to environmental changes induced by diverse opponents . Specifically , we focus on the game of ViZDoom . We introduce an agent with diversified strategic control ( DSC ) that can surpass previous top agents ranked in the open ViZDoom AI Competitions 1,2 by a large margin . The solution framework proposed in this paper consists of a number of general techniques in RL , including hindsight experience replay ( HER ) ( Andrychowicz et al. , 2017 ) , hindsight proximal policy optimization ( HPPO ) , rule-guided policy search ( RGPS ) ( Han et al. , 2021 ) , prioritized fictitious self-play ( PFSP ) ( Vinyals et al. , 2019 ) , and diversified strategic control ( DSC ) , etc . We conduct comprehensive experimental results to show the importance of each of the introduced techniques in training intelligent agents . Our proposed methods can contribute to other games and real-world tasks which require spatial navigation and diversified behaviors that are similar to FPS games . 2 RELATED WORK . The proposed learning framework is based on the widely adopted actor-critic RL methods , in which a value function and a policy are learned simultaneously . Many algorithms , such as TRPO ( Schulman et al. , 2015 ) , PPO ( Schulman et al. , 2017 ) , DDPG ( Lillicrap et al. , 2019 ) and TD3 ( Fujimoto et al. , 2018 ) , etc. , all follow the actor-critic architecture and have achieved state-of-the-art results in various applications . In our learning framework , we will adopt PPO as a baseline RL algorithm . In ViZDoom , a most fundamental skill that the agent has to learn is navigation . Considering a navigation task , we need to define a target in advance . Therefore , the navigation problem in ViZDoom can naturally be viewed as a goal-conditioned task , which has been well-studied in the RL literature . Among many advanced algorithms , hindsight experience replay ( HER ) ( Andrychowicz et al. , 2017 ) provides a smart solution that it replaces the goal in failed experiences with any practically achieved one to pretend that the agent obtains a positive reward . By doing so , the agent has a much higher chance to see successful trajectories . There have been rich approaches demonstrating that HER and its variants are effective in solving goal-conditioned tasks . In complex tasks like ViZDoom , the problem can usually be decomposed into multiple stages . As we will show in the method section , our learning framework consists of three training stages , each of which focuses on solving a specific problem . One challenge in multi-stage training is that the agent at a later stage is easy to forget what has been learned in early stages . To avoid this embarrassing situation , policy distillation ( Rusu et al. , 2015 ) has been imported to keep the training policy staying close to the parameters trained in earlier stages . For example , in ( Vinyals et al. , 2019 ) , the training policy in RL phase is kept close to the intial policy trained using supervised learning via a policy distillation term . Our learning framework also utilize policy distillation as an important component . To obtain intelligent and superior AI agents in competitive multi-agent games , self-play ( SP ) ( Silver et al. , 2018 ) is often necessary to generate high-quality competitions . It conducts an automatic curriculum learning by letting the agent combat with itself or its own historical models . In addition to AlphaGo ( Silver et al. , 2016 ) , SP has been demonstrated effective in many other complex games , such as hide-and-seek environment ( Baker et al. , 2019 ) and DOTA 2 ( Berner et al. , 2019 ) . Variants of SP , such prioritized fictitious self-play ( PFSP ) proposed in AlphaStar ( Vinyals et al. , 2019 ) , have also been verified to be effective . We will use SP and PFSP in our learning framework to train intelligent agents . 3 BACKGROUND IN VIZDOOM . ViZDoom ( Kempka et al. , 2016 ) is a complex FPS game , and its formal competition scheme is using the Deathmatch mode , in which all agents fight against each other . In this mode , agent with the highest Frag score , which is defined as defeating counts minus the suicide counts , wins the game . Unlike the games of Go , Atari , and Starcraft II , where the player only needs to interact with the environment or compete with another opponent in one versus one zero-sum game , in the Deathmatch of ViZDoom Competitions in 2016 and 2017 , the player needs to fight against other 7 independent agents with diverse strategies . ViZDoom is a multi-agent environment with imperfect information that each agent can only observes very limited information in the environment at a time step . In addition , the agent takes raw image 1http : //vizdoom.cs.put.edu.pl/competitions/vdaic-2016-cig 2http : //vizdoom.cs.put.edu.pl/competitions/vdaic-2017-cig as input and we need to train end-to-end policy , where the state space is of large image size . These characteristics of ViZDoom pose great challenges to training the agent from scratch . There are already some works that have achieved well performance in ViZDoom . Clyde ( Ratcliffe et al. , 2017 ) imports the LSTM ( Hochreiter & Schmidhuber , 1997 ) structure to the Asynchronous Advantage Actor-Critic ( A3C ) algorithm ( Mnih et al. , 2016 ) , resulting a basic intelligent agent in ViZDoom . F1 ( Wu & Tian , 2016 ) who won the championship of ViZDoom AI Competitions 2016 is also trained with A3C algorithm . It also uses human-prior knowledge to conduct reward shaping and curriculum design to assist the agent learning . There is also another work ( Huang et al. , 2019 ) using deep recurrent Q-learning network as a high-level controller . It combines auxiliary tasks ( opponent detection and depth prediction ) to manage the combo-actions . However , these agents all have a common shortcoming : the strategy of their agents is fixed . For example , in the map ( see Figure . 1 ) of ViZDoom , one agent prefers to circle around the outer loop ( green line ) , and the other agent prefers to act in the middle magma area ( red line ) . These two agents may never meet each other in a competition game , and thus can not get Frag scores either . Therefore , how to obtain diversified strategy in ViZDoom still remains an open problem in the literature . 4 METHODOLOGY . The entire learning framework consists of three stages of training , by decomposing the complex task in the ViZDoom game into different levels of control , i.e. , navigation , frag and strategic control . For complex systems , multi-stage learning is necessary and more efficient to build strong artificial intelligence . An overview of our multi-stage learning framework is shown in Figure 2 . We briefly explain the framework here and elaborate the details in the following subsections . In stage 1 , we aim to obtain an expert navigation agent , which only takes moving actions . Specifically , we enable the agent to navigate by following a given target , and this is very useful for stage 3 when training the agent at a strategic level . Apparently , navigation to a given target is the essential problem considered by goal-conditioned RL ( Andrychowicz et al. , 2017 ) . It has been well demonstrated that RL methods using hindsight experience replay ( HER ) ( Andrychowicz et al. , 2017 ) are effective in solving goal-conditioned tasks . Therefore , we adopt HER in our navigation stage . We are not aware of any game AIs that explicitly take advantage of HER . The original HER method is implemented with the off policy method such as DDPG and TD3 . For training strong AIs in complex video games , it has been demonstrated that actor-critic algorithms , such as PPO , with discrete actions are more effective ( Schulman et al. , 2017 ) . In order to apply PPO and HER together , we adopt the same idea as the recent Hindsight Trust Region Policy Optimization ( HTRPO ) method ( Zhang et al. , 2021 ) , proposed the Hindsight Proximal Policy Optimization method , which we call HPPO . Based on an excellent navigation policy , in the second training stage , we let the agent participate in the formal battle game in ViZDoom , which is also termed as ‘ Frag ’ in ViZDoom . At this stage , we use Prioritized Fictitious Self-Play ( PFSP ) ( Vinyals et al. , 2019 ) to let the training agent play against itself and its historical versions with prioritization . To conveniently reuse the navigation policy , we create a new action head for frag in addition to the moving actions . So far , the trained agent can play formal ViZDoom games by randomly feeding a navigation target to the policy . In a formal ViZDoom match in the historical competitions , one player will play against another 7 players in the map . Therefore , in the last stage , we propose to learn a policy at a strategic level to output a specific target , so that the agent itself can decide where to navigate . Again , to smoothly reuse the pre-trained policy in the previous two stages , we create a new action head for deciding the target . In this way , the agent should be aware of its opponents ’ strategies and then decide where to go to encounter them . A detailed infrastructure of the proposed multi-stage learning system has been depicted in Figure 2 . | This paper proposes an approach to improve the performance of reinforcement learning agents on the ViZDoom FPS game (Deathmatch mode as used in the AI competition 2016, 2017). The method consists of a combination of existing techniques, e.g. PPO, Hindishght Experience Replay, Rule-Guided Policy Search, (Prioritized) Self-Play. The resulting algorithm is compared to the top-ranked agents from previous ViZDom AI Competitions (2016, 2017). The approach is shown to outperform these baselines and an ablation study is provided to highlight the impact on the performance due to the integration of each system component. | SP:ec238b7842667f4508f5e06eefd53199868cb7c2 |
Superior Performance with Diversified Strategic Control in FPS Games Using General Reinforcement Learning | This paper offers an overall solution for first-person shooter ( FPS ) games to achieve superior performance using general reinforcement learning ( RL ) . We introduce an agent in ViZDoom that can surpass previous top agents ranked in the open ViZDoom AI Competitions by a large margin . The proposed framework consists of a number of generally applicable techniques , including hindsight experience replay ( HER ) based navigation , hindsight proximal policy optimization ( HPPO ) , rule-guided policy search ( RGPS ) , prioritized fictitious self-play ( PFSP ) , and diversified strategic control ( DSC ) . The proposed agent outperforms existing agents by taking advantage of diversified and human-like strategies , instead of larger neural networks , more accurate frag skills , or hand-craft tricks , etc . We provide comprehensive analysis and experiments to elaborate the effect of each component in affecting the agent performance , and demonstrate that the proposed and adopted techniques are important to achieve superior performance in general end-to-end FPS games . The proposed methods can contribute to other games and real-world tasks which also require spatial navigation and diversified behaviors . 1 INTRODUCTION . Games have been considered as challenging benchmarks in evaluating reinforcement learning ( RL ) algorithms . In games , agent can feel free to explore through infinite trial and error . OpenAI Gym ( Brockman et al. , 2016 ) has provided many wrapped game environments , such as Atari games ( Bellemare et al. , 2013 ) and Mujuco robotic control problems ( Todorov et al. , 2012 ) , through an unified interface . Meanwhile , many RL algorithms , such as TRPO ( Schulman et al. , 2015 ) , PPO ( Schulman et al. , 2017 ) , DQN ( Mnih et al. , 2015 ) and DDPG ( Lillicrap et al. , 2019 ) , etc. , have been demonstrated to achieve superior performance in these environments . Recent advances in solving more complex games , including GO ( Silver et al. , 2016 ) , DOTA 2 ( Berner et al. , 2019 ) , and StarCraft II ( Vinyals et al. , 2019 ) , further demonstrate that general RL method can be widely applied in solving simulated environments . First-person shooter ( FPS ) games , such as Quake ( Jaderberg et al. , 2019 ) and Doom ( Kempka et al. , 2016 ) , are also known by their complexity , while they are considered to be closer to real-world tasks because solving FPS games requires perfect navigation skills conditioning on raw screen/camera input . Normally , the partially observed screen only contains limited information , and the agent can not obtain the global state of the environment and the information of other agents . Many reallife applications , such as searching and rescuing robotics , and autonomous driving , etc. , are very similar to FPS games . Another challenge posed in these environments is that the state transition is not static . However , most existing intelligent agents are specifically trained to work well in some fixed environments , while they are unable to act diversely when the environment dynamics changes . In this paper , we take FPS games as the benchmark environment . We propose an overall solution to train intelligent agent in FPS games that can dynamically adjust its strategy according to environmental changes induced by diverse opponents . Specifically , we focus on the game of ViZDoom . We introduce an agent with diversified strategic control ( DSC ) that can surpass previous top agents ranked in the open ViZDoom AI Competitions 1,2 by a large margin . The solution framework proposed in this paper consists of a number of general techniques in RL , including hindsight experience replay ( HER ) ( Andrychowicz et al. , 2017 ) , hindsight proximal policy optimization ( HPPO ) , rule-guided policy search ( RGPS ) ( Han et al. , 2021 ) , prioritized fictitious self-play ( PFSP ) ( Vinyals et al. , 2019 ) , and diversified strategic control ( DSC ) , etc . We conduct comprehensive experimental results to show the importance of each of the introduced techniques in training intelligent agents . Our proposed methods can contribute to other games and real-world tasks which require spatial navigation and diversified behaviors that are similar to FPS games . 2 RELATED WORK . The proposed learning framework is based on the widely adopted actor-critic RL methods , in which a value function and a policy are learned simultaneously . Many algorithms , such as TRPO ( Schulman et al. , 2015 ) , PPO ( Schulman et al. , 2017 ) , DDPG ( Lillicrap et al. , 2019 ) and TD3 ( Fujimoto et al. , 2018 ) , etc. , all follow the actor-critic architecture and have achieved state-of-the-art results in various applications . In our learning framework , we will adopt PPO as a baseline RL algorithm . In ViZDoom , a most fundamental skill that the agent has to learn is navigation . Considering a navigation task , we need to define a target in advance . Therefore , the navigation problem in ViZDoom can naturally be viewed as a goal-conditioned task , which has been well-studied in the RL literature . Among many advanced algorithms , hindsight experience replay ( HER ) ( Andrychowicz et al. , 2017 ) provides a smart solution that it replaces the goal in failed experiences with any practically achieved one to pretend that the agent obtains a positive reward . By doing so , the agent has a much higher chance to see successful trajectories . There have been rich approaches demonstrating that HER and its variants are effective in solving goal-conditioned tasks . In complex tasks like ViZDoom , the problem can usually be decomposed into multiple stages . As we will show in the method section , our learning framework consists of three training stages , each of which focuses on solving a specific problem . One challenge in multi-stage training is that the agent at a later stage is easy to forget what has been learned in early stages . To avoid this embarrassing situation , policy distillation ( Rusu et al. , 2015 ) has been imported to keep the training policy staying close to the parameters trained in earlier stages . For example , in ( Vinyals et al. , 2019 ) , the training policy in RL phase is kept close to the intial policy trained using supervised learning via a policy distillation term . Our learning framework also utilize policy distillation as an important component . To obtain intelligent and superior AI agents in competitive multi-agent games , self-play ( SP ) ( Silver et al. , 2018 ) is often necessary to generate high-quality competitions . It conducts an automatic curriculum learning by letting the agent combat with itself or its own historical models . In addition to AlphaGo ( Silver et al. , 2016 ) , SP has been demonstrated effective in many other complex games , such as hide-and-seek environment ( Baker et al. , 2019 ) and DOTA 2 ( Berner et al. , 2019 ) . Variants of SP , such prioritized fictitious self-play ( PFSP ) proposed in AlphaStar ( Vinyals et al. , 2019 ) , have also been verified to be effective . We will use SP and PFSP in our learning framework to train intelligent agents . 3 BACKGROUND IN VIZDOOM . ViZDoom ( Kempka et al. , 2016 ) is a complex FPS game , and its formal competition scheme is using the Deathmatch mode , in which all agents fight against each other . In this mode , agent with the highest Frag score , which is defined as defeating counts minus the suicide counts , wins the game . Unlike the games of Go , Atari , and Starcraft II , where the player only needs to interact with the environment or compete with another opponent in one versus one zero-sum game , in the Deathmatch of ViZDoom Competitions in 2016 and 2017 , the player needs to fight against other 7 independent agents with diverse strategies . ViZDoom is a multi-agent environment with imperfect information that each agent can only observes very limited information in the environment at a time step . In addition , the agent takes raw image 1http : //vizdoom.cs.put.edu.pl/competitions/vdaic-2016-cig 2http : //vizdoom.cs.put.edu.pl/competitions/vdaic-2017-cig as input and we need to train end-to-end policy , where the state space is of large image size . These characteristics of ViZDoom pose great challenges to training the agent from scratch . There are already some works that have achieved well performance in ViZDoom . Clyde ( Ratcliffe et al. , 2017 ) imports the LSTM ( Hochreiter & Schmidhuber , 1997 ) structure to the Asynchronous Advantage Actor-Critic ( A3C ) algorithm ( Mnih et al. , 2016 ) , resulting a basic intelligent agent in ViZDoom . F1 ( Wu & Tian , 2016 ) who won the championship of ViZDoom AI Competitions 2016 is also trained with A3C algorithm . It also uses human-prior knowledge to conduct reward shaping and curriculum design to assist the agent learning . There is also another work ( Huang et al. , 2019 ) using deep recurrent Q-learning network as a high-level controller . It combines auxiliary tasks ( opponent detection and depth prediction ) to manage the combo-actions . However , these agents all have a common shortcoming : the strategy of their agents is fixed . For example , in the map ( see Figure . 1 ) of ViZDoom , one agent prefers to circle around the outer loop ( green line ) , and the other agent prefers to act in the middle magma area ( red line ) . These two agents may never meet each other in a competition game , and thus can not get Frag scores either . Therefore , how to obtain diversified strategy in ViZDoom still remains an open problem in the literature . 4 METHODOLOGY . The entire learning framework consists of three stages of training , by decomposing the complex task in the ViZDoom game into different levels of control , i.e. , navigation , frag and strategic control . For complex systems , multi-stage learning is necessary and more efficient to build strong artificial intelligence . An overview of our multi-stage learning framework is shown in Figure 2 . We briefly explain the framework here and elaborate the details in the following subsections . In stage 1 , we aim to obtain an expert navigation agent , which only takes moving actions . Specifically , we enable the agent to navigate by following a given target , and this is very useful for stage 3 when training the agent at a strategic level . Apparently , navigation to a given target is the essential problem considered by goal-conditioned RL ( Andrychowicz et al. , 2017 ) . It has been well demonstrated that RL methods using hindsight experience replay ( HER ) ( Andrychowicz et al. , 2017 ) are effective in solving goal-conditioned tasks . Therefore , we adopt HER in our navigation stage . We are not aware of any game AIs that explicitly take advantage of HER . The original HER method is implemented with the off policy method such as DDPG and TD3 . For training strong AIs in complex video games , it has been demonstrated that actor-critic algorithms , such as PPO , with discrete actions are more effective ( Schulman et al. , 2017 ) . In order to apply PPO and HER together , we adopt the same idea as the recent Hindsight Trust Region Policy Optimization ( HTRPO ) method ( Zhang et al. , 2021 ) , proposed the Hindsight Proximal Policy Optimization method , which we call HPPO . Based on an excellent navigation policy , in the second training stage , we let the agent participate in the formal battle game in ViZDoom , which is also termed as ‘ Frag ’ in ViZDoom . At this stage , we use Prioritized Fictitious Self-Play ( PFSP ) ( Vinyals et al. , 2019 ) to let the training agent play against itself and its historical versions with prioritization . To conveniently reuse the navigation policy , we create a new action head for frag in addition to the moving actions . So far , the trained agent can play formal ViZDoom games by randomly feeding a navigation target to the policy . In a formal ViZDoom match in the historical competitions , one player will play against another 7 players in the map . Therefore , in the last stage , we propose to learn a policy at a strategic level to output a specific target , so that the agent itself can decide where to navigate . Again , to smoothly reuse the pre-trained policy in the previous two stages , we create a new action head for deciding the target . In this way , the agent should be aware of its opponents ’ strategies and then decide where to go to encounter them . A detailed infrastructure of the proposed multi-stage learning system has been depicted in Figure 2 . | The authors combined several different techniques from RL field to solve FPS game, ViZDoom. The game is splitted into three stages: navigation, frag and strategic control, respectively and the authors proposed a multi-stage learning system to tackle this problem. Navigation stage is solved by combining hindsight experience replay with PPO, which is named HPPO. Rule-guided policy search is used in frag stage and self-play is used for strategic control stage. Along the three stages, the trained model in the previous stage is always reused by adding new head to the neural network. The proposed multi-stage learning system outperforms SOTA agents(top ranking agents in open ViZDoom AI competitions) by a large margin. They also showed other advantages of the proposed system, such as learned skills are more diverse instead of fixed. | SP:ec238b7842667f4508f5e06eefd53199868cb7c2 |
Learning Controllable Elements Oriented Representations for Reinforcement Learning | 1 INTRODUCTION . Deep Reinforcement Learning ( deep RL ) has proven its ability to solve difficult sequential decisionmaking problems such as Dota2 ( Berner et al. , 2019 ) and StarCraft ( Vinyals et al. , 2019 ) . However , it is still a challenge to apply deep RL to many real-world tasks , because the observations in these tasks are often high dimensional ( e.g . pixels ) and include much task-irrelevant noise . To address these issues , representation learning is introduced in deep RL to provide information-dense descriptions of the original observations , and thus reduce the difficulty of solving RL problems . Many representations learning algorithms are proposed with the design goal to make the representations be predictive of properties of future states . Such a goal is typically achieved by imposing the representations to reflect the dynamics of the environment ( Mazoure et al . ; Lee et al. , 2020b ; Schwarzer et al. , 2020 ; Gelada et al. , 2019 ) . However , the dynamics of the environment are not always task-relevant ( e.g . the noisy and varying background in control tasks ) . This can be problematic because those task-irrelevant dynamics will entice the representations into encoding task-irrelevant information ( e.g . the noisy background ) . Since the capacity of representations is limited , the obtained representations can miss important task-relevant information ( Gelada et al. , 2019 ) or encode too much unimportant task-irrelevant information ( Zhang et al. , 2020 ) . Therefore , it is essential to learn representations with more task-relevant environmental dynamics . We envision that action-related dynamics are likely to be more task-relevant because actions are the only feedback from the agent to the environment . For example , in control tasks and robotics particularly , the agent can complete its task only if it can realize which part of the environment can be influenced by its actions . For simplicity , we use controllable elements to denote those environment elements that can be influenced by the agent ’ s actions and thus reflect the action-related dynamics . We argue that these controllable elements should be explicitly retained for better representations . Following the intuition above , we develop an efficient and flexible framework named Learning Controllable Elements oriented Representations ( LCER ) for reinforcement learning to capture the controllable elements of the environment . Specifically , we formally define a metric to measure the amount of controllable elements that representations capture , and then propose a surrogate objective that is derived from this metric and can make the representations encode controllable elements as well as sufficient information . By emphasizing the importance of the controllable elements , LCER can capture more task-relevant information automatically . We evaluate our method LCER on the DMControl Suite ( Tassa et al. , 2018 ) , which has been widely used in recent years to benchmark sample efficiency ( Kostrikov et al. , 2020b ; Hafner et al. , 2019 ; Laskin et al . ; Lee et al. , 2020b ) . Our experiments show that LCER combined with SAC ( Haarnoja et al. , 2018 ) can outperform other representation learning methods on a majority of tasks , and even achieve better performance than the state-based SAC on the DMControl 100K benchmark . We also evaluate LCER on the Distracting Control Suite ( Stone et al. , 2021 ) , showing LCER ’ s ability to filter out distracting factors . The implementation of our work is available at https : //anonymous . 4open.science/r/LCER-FF40 2 RELATED WORK . In this section , we review the common approaches of representation learning in RL briefly . Predictive representations in RL . Predictive representations are typically trained to predict the properties of future states . One commonly used approach is to predict the representation of future states given the current state ’ s representation and actions . Such an approach is widely used in modelbased RL algorithms . The representations are prone to collapse if without further constraints ( Gelada et al. , 2019 ) , thus a reconstruction loss is usually applied to ensure non-trivial representations . However , this approach tries to encode everything , unable to filter out task-irrelevant information . SPR ( Schwarzer et al. , 2020 ) introduces a target encoder to avoid collapse and reconstruction , but its effect lacks theoretical guarantee , and it does not emphasize the controllable elements as LCER does . There are some methods that train predictive representations from information-theoretic perspectives , such as ( van den Oord et al. , 2018 ; Hjelm et al. , 2019 ; Anand et al. , 2019 ; Lee et al. , 2020b ; Mazoure et al. ) . These methods do not give a bias explicitly towards what kind of environment ’ s dynamics should the representations reflect , while our method LCER focuses more on the actionrelated dynamics which is more likely to be task-relevant . Our experiments in Section 5.2 shows that encoding predictive information does not ensure representations of high quality in complex environments , and it is crucial to retain controllable elements explicitly . There are some prior works that also emphasize controllable elements . Typically , ( Zhang et al. , 2018 ; pok , 2016 ; Badia et al. , 2020 ) learn an inverse model that predicts the action given successive states . However , these approaches typically rely on a reconstructive loss , which will significantly harm their performance in complex environments . There are also some works that emphasize the importance of actions in representation learning by introducing various action-related objectives such as policy selectivity ( Bengio et al. , 2017 ) and contingency awareness ( Bellemare et al. , 2012 ) . However , their methods are often built on heuristics and do not give a clear definition of controllable elements . Compared with these works , LCER firstly introduces a novel measure of controllable elements ( Eq . ( 3 ) ) and then develops an efficient method to optimize it without the aid of reconstruction loss . Bisimulation-based Representations in RL . Bisimulation-based representations group those states into a cluster which are indistinguishable w.r.t . future return , given any action sequence tested . The indistinguishability of two states is typically measured by the bisimulation metrics , which are firstly introduced in ( Ferns & doina Precup , 2014 ) . Recently , ( Zhang et al. , 2020 ) proposes DBC , a representation learning algorithm based on bisimulation that presents impressive results in distracting environments . However , these methods rely on a well-defined reward function , which is probably unavailable in real-world tasks . Besides , they often fail to solve simple tasks efficiently such as ones from DMControl Suite ( Zhang et al. , 2020 ) . Prior-knowledge-based Representations in RL There are other methods that use prior knowledge to constraint the representations ( Jonschkowski & Brock , 2015 ; Jonschkowski et al. , 2017 ; Thomas et al. , 2018 ) . For example , ( Jonschkowski & Brock , 2015 ) forces the representations to satisfy multiple priors such as proportionality and repeatability , which generally describe how the optimal representations should look like . However , such priors need to be specially designed for each environment , and much domain knowledge is required to form good representations . These drawbacks significantly limit the applications of these methods . 3 PRELIMINARIES . 3.1 NOTATION . We assume the underlying environment is a Markov decision process ( MDP ) , described by the tuple M = ( S , A , P , R , γ ) , where S is the state space , A the action space , P : St × At × St+1 → [ 0 , 1 ] the transition probability function which determines the distribution of next state given current state and action , and γ ∈ [ 0 , 1 ] a discount factor . Given the current state s ∈ S , an agent choose its action a ∈ A according to a policy function a ∼ π ( ·|s ) . This action will update the system state to a new state s′ according to the transition function P , and then a reward r = R ( s , a , s′ ) ∈ R is given to the agent . The goal of the agent is to maximize the expected cumulative rewards by learning a policy π . We denote the state at time step t by st. We use the upper letter of s ( i.e . S ) to refer to the random variable of state if there is no ambiguity . We use st : t+k to present the state sequence from t to t+ k , i.e . st : t+k : = ( st , st+1 , ... , st+k ) . These notations can be extended to other variables such as actions and rewards . We use φ : S → Z to denote the embedding function of LCER , which maps s ∈ S to a latent space Z . 3.2 MUTUAL INFORMATION . The mutual information ( MI ) of two random variables X , Y is defined as : I ( X ; Y ) = DKL ( PXY ‖PXPY ) , ( 1 ) where DKL is the Kullback–Leibler divergence that measures the difference of two distributions . The conditional mutual information ( CMI ) I ( X ; Y |Z ) is defined as the expected value of I ( X ; Y ) given the value of Z : I ( X ; Y |Z ) = Ez∼ZI ( X|z ; Y |z ) . ( 2 ) 4 LEARNING CONTROLLABLE ELEMENTS ORIENTED REPRESENTATIONS . Given an embedding function : φ : S → Z , we argue that the number of controllable elements that φ contains can be measured by the conditional mutual information ( CMI ) : Ik ( φ ) : = I ( φ ( St+k ) ; At : t+k−1|φ ( St ) ) ( 3 ) Intuitively , Ik measures the information that φ ( St+k ) and At : t+k−1 shares given φ ( St ) . Note that the non-controllable elements captured by φ do not contribute to Ik because they are not related to the actions . Training representations to maximize Eq . ( 3 ) is an efficient way to make the representations capture controllable elements . However , representations obtained in this way may be too compressive1 to provide sufficient information for solving tasks in some cases , because not all task-relevant elements are controllable . For example , in navigation tasks , the position of the goal is task-relevant but not controllable by the agent . Therefore , we need to utilize Eq . ( 3 ) in a more delicate manner . Specifically , in Section 4.1 we propose a surrogate objective derived from Eq . ( 3 ) which additionally provides a mechanism to control the degree of compression . In Section 4.2 , we describe how to optimize this objective , leading to our final algorithm LCER . 4.1 THE OPTIMIZATION OBJECTIVE FOR LCER . By the chain rule of mutual information , we can break the Ik defined in Eq . ( 3 ) into the subtraction of two terms : Ik ( φ ) = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) − I ( φ ( St ) ; φ ( St+k ) ) . The first term tries to capture predictive information , while the second term serves as a compression term that aims to filter out action-irrelevant information . To make φ capture the controllable elements and maintain sufficient information at the same time , we introduce a hyper-parameter β to control the degree of compression : Ik ( φ ; β ) : = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) − βI ( φ ( St ) ; φ ( St+k ) ) . ( 4 ) 1By saying “ compressive ” , we mean that these representations only encode controllable elements and filter out any other information . By choosing different β when training φ to maximize Eq . ( 4 ) , we can control the degree of compression , making it possible to adapt to different environments by choosing different β . However , directly maximizing Ik ( φ ; β ) is intractable , because maximizing the first term and minimizing the second term in Eq . ( 4 ) at the same time have an antagonistic effect to each other , thus it is difficult to tune in practice . In fact , we find this will often lead to unstable training process in our early experiments . To tackle this problem , we substitute I ( φ ( St ) ; φ ( St+k ) ) with Ik ( φ ; β = 0 ) − Ik ( φ ; β = 1 ) : Ik ( φ ; β ) = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) − β ( Ik ( φ ; β = 0 ) − Ik ( φ ; β = 1 ) ) = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) ︸ ︷︷ ︸ J1k · ( 1− β ) + I ( φ ( St+k ) ; At : t+k−1|φ ( St ) ) ︸ ︷︷ ︸ J2k ·β . ( 5 ) In Eq . ( 5 ) , we maximize two terms ( J1k and J 2 k ) at the same time , and their coefficients are 1 − β and β respectively . The first term J1k is closely related to the predictive information encoded by φ . The second term J2k is related to the controllable elements , which will play an important role in distracting environments as shown in Section 5.3 . In practice , we sum over different choices of k , leading to the final objective to maximize : IK ( φ ; β ) : = K∑ k=1 Ik ( φ ; β ) . ( 6 ) | There has been a school thought lately in RL that good representations for control should focus on abstracting out on only the task-relevant features. In high-dimensional tasks, this is especially useful in making optimal use of a limited neural network capacity and may even help the agent be robust to distractors in the environment. The authors motivate an approach to learning task-relevant representations by having the representations capture only the controllable elements of the environment. Their approach is based on a mutual information loss between actions sequences and final states, and they validate their approach on a series of DMControl task where both high-dimensional pixel observations as well as ground truth latent state representations are available. The idea is to compare the performance of agents that attempt to learn representations of latent states from pixels and compare against an agent that has direct access to the ground truth latent state. In their empirical results they show that: - their new approach (called LCER) is able to outperform alternative approaches on a set of these tasks. On some tasks, it even outperforms an SAC agent with access to the ground truth states. - LCER is able to outperform alternatives when distracting visual features are introduced into these tasks - LCER's representations learned on a source task are able to transfer better to downstream tasks. | SP:fb0f7fe8b8f74f91e062fc2d1ae90a019f245592 |
Learning Controllable Elements Oriented Representations for Reinforcement Learning | 1 INTRODUCTION . Deep Reinforcement Learning ( deep RL ) has proven its ability to solve difficult sequential decisionmaking problems such as Dota2 ( Berner et al. , 2019 ) and StarCraft ( Vinyals et al. , 2019 ) . However , it is still a challenge to apply deep RL to many real-world tasks , because the observations in these tasks are often high dimensional ( e.g . pixels ) and include much task-irrelevant noise . To address these issues , representation learning is introduced in deep RL to provide information-dense descriptions of the original observations , and thus reduce the difficulty of solving RL problems . Many representations learning algorithms are proposed with the design goal to make the representations be predictive of properties of future states . Such a goal is typically achieved by imposing the representations to reflect the dynamics of the environment ( Mazoure et al . ; Lee et al. , 2020b ; Schwarzer et al. , 2020 ; Gelada et al. , 2019 ) . However , the dynamics of the environment are not always task-relevant ( e.g . the noisy and varying background in control tasks ) . This can be problematic because those task-irrelevant dynamics will entice the representations into encoding task-irrelevant information ( e.g . the noisy background ) . Since the capacity of representations is limited , the obtained representations can miss important task-relevant information ( Gelada et al. , 2019 ) or encode too much unimportant task-irrelevant information ( Zhang et al. , 2020 ) . Therefore , it is essential to learn representations with more task-relevant environmental dynamics . We envision that action-related dynamics are likely to be more task-relevant because actions are the only feedback from the agent to the environment . For example , in control tasks and robotics particularly , the agent can complete its task only if it can realize which part of the environment can be influenced by its actions . For simplicity , we use controllable elements to denote those environment elements that can be influenced by the agent ’ s actions and thus reflect the action-related dynamics . We argue that these controllable elements should be explicitly retained for better representations . Following the intuition above , we develop an efficient and flexible framework named Learning Controllable Elements oriented Representations ( LCER ) for reinforcement learning to capture the controllable elements of the environment . Specifically , we formally define a metric to measure the amount of controllable elements that representations capture , and then propose a surrogate objective that is derived from this metric and can make the representations encode controllable elements as well as sufficient information . By emphasizing the importance of the controllable elements , LCER can capture more task-relevant information automatically . We evaluate our method LCER on the DMControl Suite ( Tassa et al. , 2018 ) , which has been widely used in recent years to benchmark sample efficiency ( Kostrikov et al. , 2020b ; Hafner et al. , 2019 ; Laskin et al . ; Lee et al. , 2020b ) . Our experiments show that LCER combined with SAC ( Haarnoja et al. , 2018 ) can outperform other representation learning methods on a majority of tasks , and even achieve better performance than the state-based SAC on the DMControl 100K benchmark . We also evaluate LCER on the Distracting Control Suite ( Stone et al. , 2021 ) , showing LCER ’ s ability to filter out distracting factors . The implementation of our work is available at https : //anonymous . 4open.science/r/LCER-FF40 2 RELATED WORK . In this section , we review the common approaches of representation learning in RL briefly . Predictive representations in RL . Predictive representations are typically trained to predict the properties of future states . One commonly used approach is to predict the representation of future states given the current state ’ s representation and actions . Such an approach is widely used in modelbased RL algorithms . The representations are prone to collapse if without further constraints ( Gelada et al. , 2019 ) , thus a reconstruction loss is usually applied to ensure non-trivial representations . However , this approach tries to encode everything , unable to filter out task-irrelevant information . SPR ( Schwarzer et al. , 2020 ) introduces a target encoder to avoid collapse and reconstruction , but its effect lacks theoretical guarantee , and it does not emphasize the controllable elements as LCER does . There are some methods that train predictive representations from information-theoretic perspectives , such as ( van den Oord et al. , 2018 ; Hjelm et al. , 2019 ; Anand et al. , 2019 ; Lee et al. , 2020b ; Mazoure et al. ) . These methods do not give a bias explicitly towards what kind of environment ’ s dynamics should the representations reflect , while our method LCER focuses more on the actionrelated dynamics which is more likely to be task-relevant . Our experiments in Section 5.2 shows that encoding predictive information does not ensure representations of high quality in complex environments , and it is crucial to retain controllable elements explicitly . There are some prior works that also emphasize controllable elements . Typically , ( Zhang et al. , 2018 ; pok , 2016 ; Badia et al. , 2020 ) learn an inverse model that predicts the action given successive states . However , these approaches typically rely on a reconstructive loss , which will significantly harm their performance in complex environments . There are also some works that emphasize the importance of actions in representation learning by introducing various action-related objectives such as policy selectivity ( Bengio et al. , 2017 ) and contingency awareness ( Bellemare et al. , 2012 ) . However , their methods are often built on heuristics and do not give a clear definition of controllable elements . Compared with these works , LCER firstly introduces a novel measure of controllable elements ( Eq . ( 3 ) ) and then develops an efficient method to optimize it without the aid of reconstruction loss . Bisimulation-based Representations in RL . Bisimulation-based representations group those states into a cluster which are indistinguishable w.r.t . future return , given any action sequence tested . The indistinguishability of two states is typically measured by the bisimulation metrics , which are firstly introduced in ( Ferns & doina Precup , 2014 ) . Recently , ( Zhang et al. , 2020 ) proposes DBC , a representation learning algorithm based on bisimulation that presents impressive results in distracting environments . However , these methods rely on a well-defined reward function , which is probably unavailable in real-world tasks . Besides , they often fail to solve simple tasks efficiently such as ones from DMControl Suite ( Zhang et al. , 2020 ) . Prior-knowledge-based Representations in RL There are other methods that use prior knowledge to constraint the representations ( Jonschkowski & Brock , 2015 ; Jonschkowski et al. , 2017 ; Thomas et al. , 2018 ) . For example , ( Jonschkowski & Brock , 2015 ) forces the representations to satisfy multiple priors such as proportionality and repeatability , which generally describe how the optimal representations should look like . However , such priors need to be specially designed for each environment , and much domain knowledge is required to form good representations . These drawbacks significantly limit the applications of these methods . 3 PRELIMINARIES . 3.1 NOTATION . We assume the underlying environment is a Markov decision process ( MDP ) , described by the tuple M = ( S , A , P , R , γ ) , where S is the state space , A the action space , P : St × At × St+1 → [ 0 , 1 ] the transition probability function which determines the distribution of next state given current state and action , and γ ∈ [ 0 , 1 ] a discount factor . Given the current state s ∈ S , an agent choose its action a ∈ A according to a policy function a ∼ π ( ·|s ) . This action will update the system state to a new state s′ according to the transition function P , and then a reward r = R ( s , a , s′ ) ∈ R is given to the agent . The goal of the agent is to maximize the expected cumulative rewards by learning a policy π . We denote the state at time step t by st. We use the upper letter of s ( i.e . S ) to refer to the random variable of state if there is no ambiguity . We use st : t+k to present the state sequence from t to t+ k , i.e . st : t+k : = ( st , st+1 , ... , st+k ) . These notations can be extended to other variables such as actions and rewards . We use φ : S → Z to denote the embedding function of LCER , which maps s ∈ S to a latent space Z . 3.2 MUTUAL INFORMATION . The mutual information ( MI ) of two random variables X , Y is defined as : I ( X ; Y ) = DKL ( PXY ‖PXPY ) , ( 1 ) where DKL is the Kullback–Leibler divergence that measures the difference of two distributions . The conditional mutual information ( CMI ) I ( X ; Y |Z ) is defined as the expected value of I ( X ; Y ) given the value of Z : I ( X ; Y |Z ) = Ez∼ZI ( X|z ; Y |z ) . ( 2 ) 4 LEARNING CONTROLLABLE ELEMENTS ORIENTED REPRESENTATIONS . Given an embedding function : φ : S → Z , we argue that the number of controllable elements that φ contains can be measured by the conditional mutual information ( CMI ) : Ik ( φ ) : = I ( φ ( St+k ) ; At : t+k−1|φ ( St ) ) ( 3 ) Intuitively , Ik measures the information that φ ( St+k ) and At : t+k−1 shares given φ ( St ) . Note that the non-controllable elements captured by φ do not contribute to Ik because they are not related to the actions . Training representations to maximize Eq . ( 3 ) is an efficient way to make the representations capture controllable elements . However , representations obtained in this way may be too compressive1 to provide sufficient information for solving tasks in some cases , because not all task-relevant elements are controllable . For example , in navigation tasks , the position of the goal is task-relevant but not controllable by the agent . Therefore , we need to utilize Eq . ( 3 ) in a more delicate manner . Specifically , in Section 4.1 we propose a surrogate objective derived from Eq . ( 3 ) which additionally provides a mechanism to control the degree of compression . In Section 4.2 , we describe how to optimize this objective , leading to our final algorithm LCER . 4.1 THE OPTIMIZATION OBJECTIVE FOR LCER . By the chain rule of mutual information , we can break the Ik defined in Eq . ( 3 ) into the subtraction of two terms : Ik ( φ ) = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) − I ( φ ( St ) ; φ ( St+k ) ) . The first term tries to capture predictive information , while the second term serves as a compression term that aims to filter out action-irrelevant information . To make φ capture the controllable elements and maintain sufficient information at the same time , we introduce a hyper-parameter β to control the degree of compression : Ik ( φ ; β ) : = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) − βI ( φ ( St ) ; φ ( St+k ) ) . ( 4 ) 1By saying “ compressive ” , we mean that these representations only encode controllable elements and filter out any other information . By choosing different β when training φ to maximize Eq . ( 4 ) , we can control the degree of compression , making it possible to adapt to different environments by choosing different β . However , directly maximizing Ik ( φ ; β ) is intractable , because maximizing the first term and minimizing the second term in Eq . ( 4 ) at the same time have an antagonistic effect to each other , thus it is difficult to tune in practice . In fact , we find this will often lead to unstable training process in our early experiments . To tackle this problem , we substitute I ( φ ( St ) ; φ ( St+k ) ) with Ik ( φ ; β = 0 ) − Ik ( φ ; β = 1 ) : Ik ( φ ; β ) = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) − β ( Ik ( φ ; β = 0 ) − Ik ( φ ; β = 1 ) ) = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) ︸ ︷︷ ︸ J1k · ( 1− β ) + I ( φ ( St+k ) ; At : t+k−1|φ ( St ) ) ︸ ︷︷ ︸ J2k ·β . ( 5 ) In Eq . ( 5 ) , we maximize two terms ( J1k and J 2 k ) at the same time , and their coefficients are 1 − β and β respectively . The first term J1k is closely related to the predictive information encoded by φ . The second term J2k is related to the controllable elements , which will play an important role in distracting environments as shown in Section 5.3 . In practice , we sum over different choices of k , leading to the final objective to maximize : IK ( φ ; β ) : = K∑ k=1 Ik ( φ ; β ) . ( 6 ) | The paper proposes a method (LCER) for agents to develop compact task representations from high-dimensional inputs (e.g., images) during unsupervised exploration that are effective for downstream tasks. The paper hypothesizes that encouraging an agent’s representation to focus on changes related to the agent’s actions will be more useful to downstream tasks than representations that try to naively model all changes. In order to allow some non-controllable elements in the representation the paper proposes a blended objective which trades off representing action controllable aspects of state with non-controllable elements of state using an application specific empirically tuned hyperparameter \beta. The paper is set in a fully observable world where a state at time t, S_{t}, is projected to an instantaneous latent state Z_{t}. The idea of controllable elements is implemented by computing mutual information between the latent state projection in the future, Z_{t+k} and the actions taken by the agent I( Z_{t+k}; A_{t:t+k-1} ). The uncontrollable information is uncontrollable elements is implemented by computing mutual information between current and future latent states I( Z_{t}; Z_{t+k} ). Mutual information between latent state and actions uses the neural InfoNCE bound trick. For the second term, the paper instead optimizes Jensen-Shannon divergence between current and future latent representations instead of mutual information, again using a neural bound as the paper claims this is more stable. The paper then shows that this objective can be combined with a standard soft actor-critic architecture to learn representations without extrinsic rewards. In empirical studies on the PlaNet, the paper’s proposed LCER method finds representations that can be used by a policy learner to converge faster than competing methods. The proposed LCER method also compares well to an SAC agent that has access to underlying state representation of the domain (e.g., joint angles, velocities). A second set of experiments on the Distracting Control Suite which has a lot of extraneous background noise show wider separation between LCER and competing methods. A study shows that increasing the look ahead K improves the quality of representations. | SP:fb0f7fe8b8f74f91e062fc2d1ae90a019f245592 |
Learning Controllable Elements Oriented Representations for Reinforcement Learning | 1 INTRODUCTION . Deep Reinforcement Learning ( deep RL ) has proven its ability to solve difficult sequential decisionmaking problems such as Dota2 ( Berner et al. , 2019 ) and StarCraft ( Vinyals et al. , 2019 ) . However , it is still a challenge to apply deep RL to many real-world tasks , because the observations in these tasks are often high dimensional ( e.g . pixels ) and include much task-irrelevant noise . To address these issues , representation learning is introduced in deep RL to provide information-dense descriptions of the original observations , and thus reduce the difficulty of solving RL problems . Many representations learning algorithms are proposed with the design goal to make the representations be predictive of properties of future states . Such a goal is typically achieved by imposing the representations to reflect the dynamics of the environment ( Mazoure et al . ; Lee et al. , 2020b ; Schwarzer et al. , 2020 ; Gelada et al. , 2019 ) . However , the dynamics of the environment are not always task-relevant ( e.g . the noisy and varying background in control tasks ) . This can be problematic because those task-irrelevant dynamics will entice the representations into encoding task-irrelevant information ( e.g . the noisy background ) . Since the capacity of representations is limited , the obtained representations can miss important task-relevant information ( Gelada et al. , 2019 ) or encode too much unimportant task-irrelevant information ( Zhang et al. , 2020 ) . Therefore , it is essential to learn representations with more task-relevant environmental dynamics . We envision that action-related dynamics are likely to be more task-relevant because actions are the only feedback from the agent to the environment . For example , in control tasks and robotics particularly , the agent can complete its task only if it can realize which part of the environment can be influenced by its actions . For simplicity , we use controllable elements to denote those environment elements that can be influenced by the agent ’ s actions and thus reflect the action-related dynamics . We argue that these controllable elements should be explicitly retained for better representations . Following the intuition above , we develop an efficient and flexible framework named Learning Controllable Elements oriented Representations ( LCER ) for reinforcement learning to capture the controllable elements of the environment . Specifically , we formally define a metric to measure the amount of controllable elements that representations capture , and then propose a surrogate objective that is derived from this metric and can make the representations encode controllable elements as well as sufficient information . By emphasizing the importance of the controllable elements , LCER can capture more task-relevant information automatically . We evaluate our method LCER on the DMControl Suite ( Tassa et al. , 2018 ) , which has been widely used in recent years to benchmark sample efficiency ( Kostrikov et al. , 2020b ; Hafner et al. , 2019 ; Laskin et al . ; Lee et al. , 2020b ) . Our experiments show that LCER combined with SAC ( Haarnoja et al. , 2018 ) can outperform other representation learning methods on a majority of tasks , and even achieve better performance than the state-based SAC on the DMControl 100K benchmark . We also evaluate LCER on the Distracting Control Suite ( Stone et al. , 2021 ) , showing LCER ’ s ability to filter out distracting factors . The implementation of our work is available at https : //anonymous . 4open.science/r/LCER-FF40 2 RELATED WORK . In this section , we review the common approaches of representation learning in RL briefly . Predictive representations in RL . Predictive representations are typically trained to predict the properties of future states . One commonly used approach is to predict the representation of future states given the current state ’ s representation and actions . Such an approach is widely used in modelbased RL algorithms . The representations are prone to collapse if without further constraints ( Gelada et al. , 2019 ) , thus a reconstruction loss is usually applied to ensure non-trivial representations . However , this approach tries to encode everything , unable to filter out task-irrelevant information . SPR ( Schwarzer et al. , 2020 ) introduces a target encoder to avoid collapse and reconstruction , but its effect lacks theoretical guarantee , and it does not emphasize the controllable elements as LCER does . There are some methods that train predictive representations from information-theoretic perspectives , such as ( van den Oord et al. , 2018 ; Hjelm et al. , 2019 ; Anand et al. , 2019 ; Lee et al. , 2020b ; Mazoure et al. ) . These methods do not give a bias explicitly towards what kind of environment ’ s dynamics should the representations reflect , while our method LCER focuses more on the actionrelated dynamics which is more likely to be task-relevant . Our experiments in Section 5.2 shows that encoding predictive information does not ensure representations of high quality in complex environments , and it is crucial to retain controllable elements explicitly . There are some prior works that also emphasize controllable elements . Typically , ( Zhang et al. , 2018 ; pok , 2016 ; Badia et al. , 2020 ) learn an inverse model that predicts the action given successive states . However , these approaches typically rely on a reconstructive loss , which will significantly harm their performance in complex environments . There are also some works that emphasize the importance of actions in representation learning by introducing various action-related objectives such as policy selectivity ( Bengio et al. , 2017 ) and contingency awareness ( Bellemare et al. , 2012 ) . However , their methods are often built on heuristics and do not give a clear definition of controllable elements . Compared with these works , LCER firstly introduces a novel measure of controllable elements ( Eq . ( 3 ) ) and then develops an efficient method to optimize it without the aid of reconstruction loss . Bisimulation-based Representations in RL . Bisimulation-based representations group those states into a cluster which are indistinguishable w.r.t . future return , given any action sequence tested . The indistinguishability of two states is typically measured by the bisimulation metrics , which are firstly introduced in ( Ferns & doina Precup , 2014 ) . Recently , ( Zhang et al. , 2020 ) proposes DBC , a representation learning algorithm based on bisimulation that presents impressive results in distracting environments . However , these methods rely on a well-defined reward function , which is probably unavailable in real-world tasks . Besides , they often fail to solve simple tasks efficiently such as ones from DMControl Suite ( Zhang et al. , 2020 ) . Prior-knowledge-based Representations in RL There are other methods that use prior knowledge to constraint the representations ( Jonschkowski & Brock , 2015 ; Jonschkowski et al. , 2017 ; Thomas et al. , 2018 ) . For example , ( Jonschkowski & Brock , 2015 ) forces the representations to satisfy multiple priors such as proportionality and repeatability , which generally describe how the optimal representations should look like . However , such priors need to be specially designed for each environment , and much domain knowledge is required to form good representations . These drawbacks significantly limit the applications of these methods . 3 PRELIMINARIES . 3.1 NOTATION . We assume the underlying environment is a Markov decision process ( MDP ) , described by the tuple M = ( S , A , P , R , γ ) , where S is the state space , A the action space , P : St × At × St+1 → [ 0 , 1 ] the transition probability function which determines the distribution of next state given current state and action , and γ ∈ [ 0 , 1 ] a discount factor . Given the current state s ∈ S , an agent choose its action a ∈ A according to a policy function a ∼ π ( ·|s ) . This action will update the system state to a new state s′ according to the transition function P , and then a reward r = R ( s , a , s′ ) ∈ R is given to the agent . The goal of the agent is to maximize the expected cumulative rewards by learning a policy π . We denote the state at time step t by st. We use the upper letter of s ( i.e . S ) to refer to the random variable of state if there is no ambiguity . We use st : t+k to present the state sequence from t to t+ k , i.e . st : t+k : = ( st , st+1 , ... , st+k ) . These notations can be extended to other variables such as actions and rewards . We use φ : S → Z to denote the embedding function of LCER , which maps s ∈ S to a latent space Z . 3.2 MUTUAL INFORMATION . The mutual information ( MI ) of two random variables X , Y is defined as : I ( X ; Y ) = DKL ( PXY ‖PXPY ) , ( 1 ) where DKL is the Kullback–Leibler divergence that measures the difference of two distributions . The conditional mutual information ( CMI ) I ( X ; Y |Z ) is defined as the expected value of I ( X ; Y ) given the value of Z : I ( X ; Y |Z ) = Ez∼ZI ( X|z ; Y |z ) . ( 2 ) 4 LEARNING CONTROLLABLE ELEMENTS ORIENTED REPRESENTATIONS . Given an embedding function : φ : S → Z , we argue that the number of controllable elements that φ contains can be measured by the conditional mutual information ( CMI ) : Ik ( φ ) : = I ( φ ( St+k ) ; At : t+k−1|φ ( St ) ) ( 3 ) Intuitively , Ik measures the information that φ ( St+k ) and At : t+k−1 shares given φ ( St ) . Note that the non-controllable elements captured by φ do not contribute to Ik because they are not related to the actions . Training representations to maximize Eq . ( 3 ) is an efficient way to make the representations capture controllable elements . However , representations obtained in this way may be too compressive1 to provide sufficient information for solving tasks in some cases , because not all task-relevant elements are controllable . For example , in navigation tasks , the position of the goal is task-relevant but not controllable by the agent . Therefore , we need to utilize Eq . ( 3 ) in a more delicate manner . Specifically , in Section 4.1 we propose a surrogate objective derived from Eq . ( 3 ) which additionally provides a mechanism to control the degree of compression . In Section 4.2 , we describe how to optimize this objective , leading to our final algorithm LCER . 4.1 THE OPTIMIZATION OBJECTIVE FOR LCER . By the chain rule of mutual information , we can break the Ik defined in Eq . ( 3 ) into the subtraction of two terms : Ik ( φ ) = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) − I ( φ ( St ) ; φ ( St+k ) ) . The first term tries to capture predictive information , while the second term serves as a compression term that aims to filter out action-irrelevant information . To make φ capture the controllable elements and maintain sufficient information at the same time , we introduce a hyper-parameter β to control the degree of compression : Ik ( φ ; β ) : = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) − βI ( φ ( St ) ; φ ( St+k ) ) . ( 4 ) 1By saying “ compressive ” , we mean that these representations only encode controllable elements and filter out any other information . By choosing different β when training φ to maximize Eq . ( 4 ) , we can control the degree of compression , making it possible to adapt to different environments by choosing different β . However , directly maximizing Ik ( φ ; β ) is intractable , because maximizing the first term and minimizing the second term in Eq . ( 4 ) at the same time have an antagonistic effect to each other , thus it is difficult to tune in practice . In fact , we find this will often lead to unstable training process in our early experiments . To tackle this problem , we substitute I ( φ ( St ) ; φ ( St+k ) ) with Ik ( φ ; β = 0 ) − Ik ( φ ; β = 1 ) : Ik ( φ ; β ) = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) − β ( Ik ( φ ; β = 0 ) − Ik ( φ ; β = 1 ) ) = I ( [ φ ( St ) , At : t+k−1 ] ; φ ( St+k ) ) ︸ ︷︷ ︸ J1k · ( 1− β ) + I ( φ ( St+k ) ; At : t+k−1|φ ( St ) ) ︸ ︷︷ ︸ J2k ·β . ( 5 ) In Eq . ( 5 ) , we maximize two terms ( J1k and J 2 k ) at the same time , and their coefficients are 1 − β and β respectively . The first term J1k is closely related to the predictive information encoded by φ . The second term J2k is related to the controllable elements , which will play an important role in distracting environments as shown in Section 5.3 . In practice , we sum over different choices of k , leading to the final objective to maximize : IK ( φ ; β ) : = K∑ k=1 Ik ( φ ; β ) . ( 6 ) | This paper proposes a novel representation learning flamework, LCER, which enables the agent to extract task-relevant representations from image-based observations. It optimizes the surrogate loss of conditional mutual information (CMI) between future-state embedding and action sequences given past-state embedding. The key contribution seems the balancing between InfoNCE objective (similar to CURL) and JSD-based CMI. The experimental comparison shows that LCER performs best among some image-based RL algorithms (PI-SAC, SLAC. CURL, PlaNet); in 100k DM Control benchmark (6 tasks), and distracted-background settings. | SP:fb0f7fe8b8f74f91e062fc2d1ae90a019f245592 |
Gaussian Differential Privacy Transformation: from identification to application | 1 INTRODUCTION . Recent years have seen explosive growth in the research and application of data-driven machine learning . While data fuels advancement in this unprecedented age of “ big data ” , concern for individual privacy has deepened with the continued mining , transportation , and exchange of this new resource . While expressions of privacy concerns can be traced back as early as 1969 ( Miller , 1969 ) , the concept of privacy is often perceived as “ vague and difficult to get into a right perspective ” ( Shils , 1966 ) . Through its alluring convenience and promise of societal prosperity , the use of aggregated data has long outstripped the capabilities of privacy protection measures . Indeed , early privacy protection protocols relied on the ad hoc enforcement of anonymization and offered little to no protection against the exposure of individual data , as evidenced by the AOL search log and Netflix Challenge dataset controversies ( Narayanan & Shmatikov , 2006 ; 2008 ; Barbaro & T. Zeller , 2006 ) . Differential privacy ( DP ) first gained traction as it met the urgent need for rigour and quantifiability in privacy protection ( Dwork et al. , 2006 ) . In short , DP bounds the change in the distribution of outputs of a query made on a dataset under an alteration of one data point . The following definition formalizes this notion . Definition 1.1 ( Dwork et al. , 2006 ) A randomized algorithm A , taking a dataset consisting of individuals as its input , is ( , δ ) -differentially private if , for any pair of datasets S and S′ that differ in the record of a single individual and any event E , P [ A ( S ) ∈ E ] ≤ e P [ A ( S′ ) ∈ E ] + δ . When δ = 0 , A is called -differentially private ( -DP ) . While the notion of ( , δ ) -DP has wide applications ( Dankar & El Emam , 2012 ; Erlingsson et al. , 2014 ; Cormode et al. , 2018 ; Hassan et al. , 2019 ) , there are a few notable drawbacks to this framework . One is the poor interpretability of ( , δ ) -DP : unlike other concepts in machine learning , DP should not remain a black box . Privacy guarantees are intended for human interpretation and so must be understandable by the users it affects and by regulatory entities . A second drawback is ( , δ ) -DP ’ s inferior composition properties and lack of versatility . Here , “ composition ” refers to the ability for DP properties to be inherited when DP algorithms are combined and used as building blocks . As an example , the training of deep learning models involves gradient evaluations and weight updates : each of these steps can be treated as a building block . It is natural to expect that a DP learning algorithm can be built using differentially-private versions of these components . However , the DP composition properties can not generally be well characterized within the framework of ( , δ ) -DP , leading to very loose composition theorems . To overcome the drawbacks of ( , δ ) -DP , numerous variants have been developed , including the hypothesis-testing-based f -DP ( Wasserman & Zhou , 2010 ; Dong et al. , 2019 ) , the momentsaccountant-based Rényi DP ( Mironov , 2017 ) , as well as concentrated DP and its variants ( Bun & Steinke , 2016 ; Bun et al. , 2018 ) . Despite their very different perspectives , all of these DP variants can be fully characterized by an infinite union of ( , δ ) -DP guarantees . In particular , there is a two-way embedding between f -DP and the infinite union of ( , δ ) -DP guarantees : any guarantee provided by an infinite union of ( , δ ) -DP can be fully characterized by f -DP and vice visa ( Dong et al. , 2019 ) . Consequently , f -DP has the versatility to treat all of the above notions as special cases . In addition to its versatility , f -DP is more interpretable than other DP paradigms because it considers privacy protection from an attacker ’ s perspective . Under f -DP , an attacker is challenged with the hypothesis-testing problem H0 : the underlying dataset is S versus H1 : the underlying dataset is S′ and given an output of an algorithm A , where S and S′ are neighbouring datasets . The harder this testing problem is , the less privacy leakageA has . To see this , consider the dilemma that the attacker is facing . The attacker must reject either H0 or H1 based on the given output of A : this means the attacker must select a subset R0 of Range ( A ) and reject H0 if the sampled output is in R0 ( or must otherwise reject H1 ) . The attacker is more likely to incorrectly reject H0 ( in a type I error ) when R0 is large . Conversely , if R0 is small , the attacker is more likely to incorrectly reject H1 ( in a type II error ) . We say that an algorithm A is f -DP if , for any α ∈ [ 0 , 1 ] , no attacker can simultaneously bound the probability of type I error below α and bound the probability of type II error below f ( α ) . The function f is called a trade-off function and controls the strength of the privacy protection . The versatility afforded by f can be unwieldy in practice . Although f -DP is capable of handling composition and can embed other notions of differential privacy , it is not convenient for representing safety levels as a curve amenable to human interpretation . Gaussian differential privacy ( GDP ) , as a parametric family of f -DP guarantees , provides a balance between interpretability and versatility . GDP guarantees are parameterized by a single value µ and use the trade-off function f ( α ) = Φ ( Φ−1 ( 1− α ) − µ ) , where Φ is the cumulative distribution function of the standard normal distribution . With this choice of f , the hypothesis-testing problem faced by the attacker is as hard as distinguishing between N ( 0 , 1 ) and N ( µ , 1 ) on the basis of a single observation . Aside from its visual interpretation , GDP also has unique composition theorems : the composition of a µ1- and µ2-GDP algorithm is , as expected , √ µ21 + µ 2 2-GDP . This property can be easily generalized to n-fold composition . GDP also has has a special central limit theorem implying that all hypothesis-testing-based definitions of privacy converge to GDP in terms of a limit in the number of compositions . Readers are referred to Dong et al . ( 2019 ) for more information . The benefits of DP come with a price . As outlined in the definition of DP , any DP algorithm must be randomized . This randomization is usually achieved by perturbing the intermediate step or the final output via the injection of random noise . Because of the noise , a DP algorithm can not faithfully output the truth like its non-DP counterpart . To provide a higher level of privacy protection , a stronger utility compromise should be made . This leads to the paramount problem of the “ privacy– utility trade-off ” . Under the ( , δ ) -DP framework , this trade-off is often characterized in a form of σ = f ( , δ ) : to achieve ( , δ ) -DP , the utility parameter ( usually the scale of noise ) needs to be chosen as f ( , δ ) . We will further discuss this formulation with examples in the next section . 1.1 OUR CONTRIBUTION . The general goal of this paper is to provide both a deeper theoretical understanding of and powerful practical tools for the GDP framework . To this end , we start with the analysis of privacy profiles under the condition of traditional ( , δ ) -DP , where we point out an often-overlooked partial order on ( , δ ) -DP conditions via implication . We choose this as the starting point for our work because ignoring this partial order will lead to problematic asymptotic analysis and compromised utility . Next , we broken down the GDP into two parts : a head condition and a tail condition and define an efficient , tractable , and visualizable tool , called the Gaussian differential privacy transformation ( GDPT ) . We first used the GDPT on the identification of GDP algorithms . Through the intermediate property of GDPT that we develop , we find an easy-to-verify criterion that can distinguish GDP mechanisms from non-GDP mechanisms . For GDP algorithms , this criterion provides a lower bound for the privacy protection parameter µ . This criterion can help researchers widen the set of available GDP algorithms and also gives an interesting characterization of GDP without an explicit reference to the Gaussian distribution . Following the identification of a GDP algorithm , the logical next step is to measure the exact value of µ . By development of numerical properties of the GDPT , we give a method to narrow down possible values of an optimal µ with an arbitrarily small and quantifiable margin of error . Lastly , we give three more applications of our newly developed tools . In the first , we revisit some established ( , δ ) -DP algorithms and improve their utility by accounting for the overlooked partial order on ( , δ ) -DP conditions provided by logical implication . In the second application , we make a comparison between -DP and µ-GDP and find that any -DP algorithm must be also µ-GDP . In the last application , we discuss the effect of subsampling using the GDPT . 2 BACKGROUND . An algorithm can be ( , δ ) -DP for multiple pairs of and δ : the union of all such pairs provides a complete image of the algorithm under the ( , δ ) -DP framework . In particular , an ( , δ ) -DP mechanismA is also ( ′ , δ′ ) -DP for any ′ ≥ and any δ′ ≥ δ . The infinite union of ( , δ ) pairs can thus be represented as the smallest δ associated with each . This intuition is formulated as a privacy profile in Balle & Wang ( 2018 ) . The privacy profile corresponding to a collection of ( , δ ) -DP guarantees Ω is defined as the curve in [ 0 , ∞ ) × [ 0 , 1 ] separating the space of privacy parameters into two regions , one of which contains exactly the pairs in Ω . The privacy profile provides as much information as Ω itself . Many privacy guarantees and privacy notions , including ( , δ ) -DP , Rényi DP , f -DP , GDP , and concentrated DP , can be embedded into a family of privacy profile curves and fully characterized ( Balle et al. , 2020a ) . A privacy profile can be provided or derived by an algorithm ’ s designer or users . Before proceeding with detailed discussions , we first give three examples of DP algorithms that are used throughout the paper . The first example we consider is the Laplace mechanism , a classical DP mechanism whose prototype is discussed in the paper that originally defined the concept of differential privacy ( Dwork et al. , 2006 ) . The level of privacy that the Laplace mechanism can provide is determined by the scale b of the added Laplacian noise . Given a global sensitivity ∆ , the value of b needs to be chosen as f ( , 0 ) = ∆/ in order to provide an ( , 0 ) -DP guarantee . Despite its long history , the Laplace mechanism has remained in use and study in recent years ( Phan et al. , 2017 ; Hu et al. , 2019 ; Xu et al. , 2020 ; Li & Clifton , 2021 ) . Our second example is a family of algorithms in which a noise parameter has the form σ = A −1 √ log ( B/δ ) . Examples include • the goodness of fit algorithm ( Gaboardi et al. , 2016 ) , • noisy stochastic gradient descent and its variants ( Bassily et al. , 2014 ; Abadi et al. , 2016 ; Feldman et al. , 2018 ) , and • the one-shot spectral method and the one-shot Laplace algorithm ( Qiao et al. , 2021 ) . Our third example comes from the field of federated learning : given n users and the number of messages m , the invisibility cloak encoder algorithm ( ICEA ) from ( Ishai et al. , 2006 ) is ( , δ ) -DP if m > 10 log ( n/ ( δ ) ) ( Ghazi et al. , 2019 ) . See also ( Balle et al. , 2020b ; Ghazi et al. , 2020 ) for other analysis of ICEA . For figures and numerical demonstrations in this paper , we use b = 2/∆ for the Laplace mechanism ; A = 2 , B = 1 , and σ = 2 for the second example , which we refer to as SGD ; andm = 20 and n = 4 for the ICEA . We omit the internal details of these methods and focus on their privacy guarantees : other than for the classical Laplace mechanism , whose privacy profile is known ( Balle et al. , 2020a ) , privacy guarantees are given in the form of a privacy–utility trade-off equation σ = f ( , δ ) . Given σ , it is tempting to derive the privacy profile by inverting the trade-off equation ( i.e. , as δA ( ) = min { δ | σ = f ( , δ ) } ) . However , in most cases , a privacy profile naively derived in this way is not tight and will lead to a problematic asymptotic analysis , especially near the origin , because of a frequently overlooked partial order between ( , δ ) -DP conditions , which we discuss below . 3 PRIVACY PROFILES AND AN EXACT PARTIAL ORDER ON ( , δ ) -DP CONDITIONS An ( 0 , δ0 ) -DP algorithm is trivially ( , δ ) -DP for any ≥ 0 and δ ≥ δ0 . However , this statement does not give a full picture of the relationships between different ( , δ ) -DP conditions . Theorem 3.1 Assume that 0 ≥ 0 and 0 ≤ δ0 < 1 . The ( 0 , δ0 ) -DP condition implies ( , δ ) -DP if and only if δ ≥ δ0 + ( 1− δ0 ) ( e 0 − e ) +/ ( 1 + e 0 ) . Corollary 3.1 Assume that ≥ 0 ≥ 0 and δ ≤ [ ( 1 + e ) δ0 − e + e 0 ] / ( 1 + e 0 ) . An ( , δ ) -DP algorithm is ( 0 , δ0 ) -DP . Corollary 3.2 Let A be an ( 0 , δ0 ) -DP algorithm with the privacy profile δA . Then δA ( ) ≤ δ0 + ( 1− δ0 ) ( e 0 − e ) + 1 + e 0 . ( 1 ) We remark that the bound given in ( 1 ) is tight in the following sense : there is a specific ( 0 , δ0 ) -DP algorithm A such that δA ( ) is exactly δ0 + ( 1− δ0 ) ( e 0 − e ) +/ ( 1 + e 0 ) . Corollary 3.1 states the exact partial order of logical implication on ( , δ ) -DP conditions . Taking this partial order into account , the privacy profile derived from the naive inversion of the trade-off function can be refined into δA ( ) = min ( { δ | σ = f ( 0 , δ0 ) and δ ≥ δ0 + ( 1− δ0 ) ( e 0 − e ) + 1 + e 0 } ) . Intuitively , the refined privacy profile not only considers ( , δ ) -DP provided directly by the trade-off function but also takes all pairs ( , δ ) inferred by Corollary 3.1 . Theorem 3.2 can itself be used as a tool to improve some DP results : we will discuss this improvement in Section 5 . With this approach , we can derive the privacy profile of our second example to be δSGD ( ) = min ( δ2 + ( 1− δ2 ) ( e 2 − e ) +/ ( 1 + e 2 ) , exp { − 2 } ) , where 2 ≈ 1.187 and δ2 ≈ 0.244 . The privacy profile of our third example is δICEA ( ) = min ( δ3 + ( 1− δ3 ) ( e 3 − e ) +/ ( 1 + e 3 ) , K/ } ) , where K = 4/e2 , 3 ≈ 1.159 , and δ3 ≈ 0.468 . Notice that δSGD and δICEA share a similar form : both are the smaller of two terms , one derived from Corollary 3.1 from a particular ( , δ ) -DP pair and the other from inverting the trade-off function . This is no coincidence . We leave the derivation to Appendix B . We next show the connection between GDP and the privacy profile : briefly , Gaussian differential privacy can be characterized as an infinite union of ( , δ ) -DP conditions . Theorem 3.2 A mechanism is µ-GDP if and only if it is ( , δµ ( ) ) -DP for all ≥ 0 , where δµ ( ) = Φ ( − µ + µ 2 ) − e Φ ( − µ − µ 2 ) . ( 2 ) This result follows from properties of f -DP and is formulated as Corollary 2.13 in Dong et al . ( 2019 ) . Prior to this general form , a similar expression for a special case appeared in Balle & Wang ( 2018 ) . From the definition of the privacy profile , it follows immediately that an algorithm A with the privacy profile δA is µ-GDP if and only if δµ ( ) ≥ δA ( ) for all non-negative . However , this observation does not automatically lead to a meaningful way to identify µ-GDP algorithms . Before proceeding with an analysis of privacy profiles , we give a few visual examples in Figure 1 . The left pane illustrates the privacy profiles of our examples . That of the Laplace mechanism is derived in Balle et al . ( 2020a ) as Theorem 3 : given a noise parameter b and a global sensitivity ∆ , the privacy profile of the Laplace mechanism is δ ( ) = max ( 1 − exp { ε/2 −∆/ ( 2b ) } , 0 ) . For the second and the third examples , we compare the naive privacy profiles obtained by inverting the trade-off function and the refined privacy profiles . The refined and naive privacy profiles take on notably different values around = 0 . The inverted trade-off functions suggest that ( 0 , δ ) can not be achieved by any choice of parameter σ . However , this is clearly not true , considering Theorem 3.1 . As shown in the right pane of Figure 1 , the Laplace mechanism ’ s privacy profile is below the 2-GDP and 4-GDP curves but crosses the 1-GDP curve , indicating that the Laplace mechanism in this case is 2-GDP and 4-GDP but not 1-GDP . The ICEA curve intersects all of the displayed GDP curves , so the algorithm is not µ-GDP for µ ∈ { 1 , 2 , 4 } . It is hard to tell whether or not the SGD curve crosses the 1-GDP curve and we can not say if it will cross the 2-GDP or even the 4-GDP curve at a large value of . These examples illustrate that we can not draw conclusions simply by looking at a graph . A privacy profile is defined on [ 0 , ∞ ) , so it is hard to tell if an inequality is maintained as increases . Previous failures of ad hoc attempts at privacy have taught that privacy must be protected via tractable and objective means ( Narayanan & Shmatikov , 2006 ; 2008 ; Barbaro & T. Zeller , 2006 ) . Performing this check via numerical evaluation yields similar problems : we can not consider all values of on an infinite interval ( or even a finite one , for that matter ) . Turning to closed forms for privacy profiles and δµ is also difficult : even if a given privacy profile is easy to handle , δµ presents some technical hurdles . The profile δµ and Φ are transcendental with different asymptotic behaviors for different values of µ and . This is clear from the right pane of Figure 1 : near = 0 , δµ is concave for µ = 4 but convex for µ = 1 . As a further complication , both the first and second terms in the definition of δµ converge to 1 as → ∞ , but the difference between them vanishes . Subtracting good approximations of two nearby numbers may cause a phenomenon called catastrophic cancellation and lead to very bad approximations ( Malcolm , 1971 ; Cuyt et al. , 2001 ) . Due to the risk of catastrophic cancellation , a good approximation of Φ does not guarantee a good approximation of the GDP privacy profile . These problems make it difficult to tightly bound δµ by a function with a simple form . To address the problem of differing asymptotic behaviours , we define the following two notions . Definition 3.1 ( Head condition ) An algorithmA with the privacy profile δA is ( h , µ ) -head GDP if and only if δA ( ) ≤ δµ ( ) when ≤ h. Definition 3.2 ( Tail condition ) An algorithm A with the privacy profile δA is ( t , µ ) -tail GDP if and only if δA ( ) ≤ δµ ( ) when > t. In particular , we define A as ( +∞ , µ ) -tail GDP if A is ( t , µ ) -tail GDP for some t < +∞ and define A as ( t , +∞ ) -tail GDP if A is ( t , µ ) for some µ < +∞ . The head condition checks the µ-GDP condition for near zero and the tail condition checks the µGDP condition for far away from zero . As such , the combination of ( , µ ) -head GDP and ( , µ ) -tail GDP is equivalent to µ-GDP . | ## Summary of Contributions This paper considers Gaussian differential privacy (GDP) notion which is an extension of $(\epsilon, \delta)$-differential privacy (DP). Roughly speaking, an algorithm is $\mu$-GDP if it is "at least as private as Gaussian mechanism with noise multiplier $1/\mu$". The main advantages of GDP are that (i) it has a simple and sharper composition theorem than $(\epsilon, \delta)$-DP and (ii) it has only a single parameter $\mu$ leading to simpler/more efficient computation compared to other DP notions that provide good composition (e.g. $f$-DP or Privacy Loss Distribution (PLD)). This paper develops tools that can help understand/deploy GDP more easily. Specifically: - They propose Gaussian Differential Privacy Transformation (GDPT) which roughly speaking is the curve $\mu: \mathbb{R} \to \mathbb{R}$ where $\mu(\epsilon)$ is the smallest $\epsilon$ for which the algorithm is at least as private as Gaussian mechanism of noise multiplier $1/\mu(\epsilon)$ at this particular value of $\epsilon$. - With the above notion, they derive (in Theorems 4.3, 4.4) the condition for an algorithm to be $\mu$-GDP for some finite $\mu$: it must be $(\epsilon, \delta(\epsilon))$-DP where $\limsup \frac{\epsilon^2}{-\log \delta(\epsilon)}$ is finite. - They then show how to approximately check whether an algorithm is GDP. Specifically, they show that it suffices to check a certain condition on a finite number of points (corresponding to an upper staircase in Figure 2 right). They show that if this condition holds the algorithm is $(\epsilon_h, \mu)$-head GDP, roughly meaning that it is "GDP" for all $\epsilon < \epsilon_h$. - They argue that in practice taking $\epsilon_h$ to be sufficiently large should be enough. But they also give a "clip and noise" procedure to turn an $(\epsilon_h, \mu)$-head GDP algorithm into one which is actually $\mu$-GDP. Along the way, the paper also shows a new implication between $(\epsilon, \delta)$-DP and $(\epsilon', \delta')$-DP. Previously, it was known that the former implies the latter if $\epsilon' \geq \epsilon$ and $\delta' \geq \delta$. In Theorem 3.1 of this paper, the authors show that the implication may even hold when $\epsilon > \epsilon'$ but $\delta'$ also has to be larger than $\delta$ by a certain amount (depending on $\delta, \epsilon, \epsilon'$). The authors give some example in Section 5 where this relation gives non-trivial implications for some known algorithms. | SP:9d5bd10c8e123e41aa1421b9a55a32f2a036e790 |
Gaussian Differential Privacy Transformation: from identification to application | 1 INTRODUCTION . Recent years have seen explosive growth in the research and application of data-driven machine learning . While data fuels advancement in this unprecedented age of “ big data ” , concern for individual privacy has deepened with the continued mining , transportation , and exchange of this new resource . While expressions of privacy concerns can be traced back as early as 1969 ( Miller , 1969 ) , the concept of privacy is often perceived as “ vague and difficult to get into a right perspective ” ( Shils , 1966 ) . Through its alluring convenience and promise of societal prosperity , the use of aggregated data has long outstripped the capabilities of privacy protection measures . Indeed , early privacy protection protocols relied on the ad hoc enforcement of anonymization and offered little to no protection against the exposure of individual data , as evidenced by the AOL search log and Netflix Challenge dataset controversies ( Narayanan & Shmatikov , 2006 ; 2008 ; Barbaro & T. Zeller , 2006 ) . Differential privacy ( DP ) first gained traction as it met the urgent need for rigour and quantifiability in privacy protection ( Dwork et al. , 2006 ) . In short , DP bounds the change in the distribution of outputs of a query made on a dataset under an alteration of one data point . The following definition formalizes this notion . Definition 1.1 ( Dwork et al. , 2006 ) A randomized algorithm A , taking a dataset consisting of individuals as its input , is ( , δ ) -differentially private if , for any pair of datasets S and S′ that differ in the record of a single individual and any event E , P [ A ( S ) ∈ E ] ≤ e P [ A ( S′ ) ∈ E ] + δ . When δ = 0 , A is called -differentially private ( -DP ) . While the notion of ( , δ ) -DP has wide applications ( Dankar & El Emam , 2012 ; Erlingsson et al. , 2014 ; Cormode et al. , 2018 ; Hassan et al. , 2019 ) , there are a few notable drawbacks to this framework . One is the poor interpretability of ( , δ ) -DP : unlike other concepts in machine learning , DP should not remain a black box . Privacy guarantees are intended for human interpretation and so must be understandable by the users it affects and by regulatory entities . A second drawback is ( , δ ) -DP ’ s inferior composition properties and lack of versatility . Here , “ composition ” refers to the ability for DP properties to be inherited when DP algorithms are combined and used as building blocks . As an example , the training of deep learning models involves gradient evaluations and weight updates : each of these steps can be treated as a building block . It is natural to expect that a DP learning algorithm can be built using differentially-private versions of these components . However , the DP composition properties can not generally be well characterized within the framework of ( , δ ) -DP , leading to very loose composition theorems . To overcome the drawbacks of ( , δ ) -DP , numerous variants have been developed , including the hypothesis-testing-based f -DP ( Wasserman & Zhou , 2010 ; Dong et al. , 2019 ) , the momentsaccountant-based Rényi DP ( Mironov , 2017 ) , as well as concentrated DP and its variants ( Bun & Steinke , 2016 ; Bun et al. , 2018 ) . Despite their very different perspectives , all of these DP variants can be fully characterized by an infinite union of ( , δ ) -DP guarantees . In particular , there is a two-way embedding between f -DP and the infinite union of ( , δ ) -DP guarantees : any guarantee provided by an infinite union of ( , δ ) -DP can be fully characterized by f -DP and vice visa ( Dong et al. , 2019 ) . Consequently , f -DP has the versatility to treat all of the above notions as special cases . In addition to its versatility , f -DP is more interpretable than other DP paradigms because it considers privacy protection from an attacker ’ s perspective . Under f -DP , an attacker is challenged with the hypothesis-testing problem H0 : the underlying dataset is S versus H1 : the underlying dataset is S′ and given an output of an algorithm A , where S and S′ are neighbouring datasets . The harder this testing problem is , the less privacy leakageA has . To see this , consider the dilemma that the attacker is facing . The attacker must reject either H0 or H1 based on the given output of A : this means the attacker must select a subset R0 of Range ( A ) and reject H0 if the sampled output is in R0 ( or must otherwise reject H1 ) . The attacker is more likely to incorrectly reject H0 ( in a type I error ) when R0 is large . Conversely , if R0 is small , the attacker is more likely to incorrectly reject H1 ( in a type II error ) . We say that an algorithm A is f -DP if , for any α ∈ [ 0 , 1 ] , no attacker can simultaneously bound the probability of type I error below α and bound the probability of type II error below f ( α ) . The function f is called a trade-off function and controls the strength of the privacy protection . The versatility afforded by f can be unwieldy in practice . Although f -DP is capable of handling composition and can embed other notions of differential privacy , it is not convenient for representing safety levels as a curve amenable to human interpretation . Gaussian differential privacy ( GDP ) , as a parametric family of f -DP guarantees , provides a balance between interpretability and versatility . GDP guarantees are parameterized by a single value µ and use the trade-off function f ( α ) = Φ ( Φ−1 ( 1− α ) − µ ) , where Φ is the cumulative distribution function of the standard normal distribution . With this choice of f , the hypothesis-testing problem faced by the attacker is as hard as distinguishing between N ( 0 , 1 ) and N ( µ , 1 ) on the basis of a single observation . Aside from its visual interpretation , GDP also has unique composition theorems : the composition of a µ1- and µ2-GDP algorithm is , as expected , √ µ21 + µ 2 2-GDP . This property can be easily generalized to n-fold composition . GDP also has has a special central limit theorem implying that all hypothesis-testing-based definitions of privacy converge to GDP in terms of a limit in the number of compositions . Readers are referred to Dong et al . ( 2019 ) for more information . The benefits of DP come with a price . As outlined in the definition of DP , any DP algorithm must be randomized . This randomization is usually achieved by perturbing the intermediate step or the final output via the injection of random noise . Because of the noise , a DP algorithm can not faithfully output the truth like its non-DP counterpart . To provide a higher level of privacy protection , a stronger utility compromise should be made . This leads to the paramount problem of the “ privacy– utility trade-off ” . Under the ( , δ ) -DP framework , this trade-off is often characterized in a form of σ = f ( , δ ) : to achieve ( , δ ) -DP , the utility parameter ( usually the scale of noise ) needs to be chosen as f ( , δ ) . We will further discuss this formulation with examples in the next section . 1.1 OUR CONTRIBUTION . The general goal of this paper is to provide both a deeper theoretical understanding of and powerful practical tools for the GDP framework . To this end , we start with the analysis of privacy profiles under the condition of traditional ( , δ ) -DP , where we point out an often-overlooked partial order on ( , δ ) -DP conditions via implication . We choose this as the starting point for our work because ignoring this partial order will lead to problematic asymptotic analysis and compromised utility . Next , we broken down the GDP into two parts : a head condition and a tail condition and define an efficient , tractable , and visualizable tool , called the Gaussian differential privacy transformation ( GDPT ) . We first used the GDPT on the identification of GDP algorithms . Through the intermediate property of GDPT that we develop , we find an easy-to-verify criterion that can distinguish GDP mechanisms from non-GDP mechanisms . For GDP algorithms , this criterion provides a lower bound for the privacy protection parameter µ . This criterion can help researchers widen the set of available GDP algorithms and also gives an interesting characterization of GDP without an explicit reference to the Gaussian distribution . Following the identification of a GDP algorithm , the logical next step is to measure the exact value of µ . By development of numerical properties of the GDPT , we give a method to narrow down possible values of an optimal µ with an arbitrarily small and quantifiable margin of error . Lastly , we give three more applications of our newly developed tools . In the first , we revisit some established ( , δ ) -DP algorithms and improve their utility by accounting for the overlooked partial order on ( , δ ) -DP conditions provided by logical implication . In the second application , we make a comparison between -DP and µ-GDP and find that any -DP algorithm must be also µ-GDP . In the last application , we discuss the effect of subsampling using the GDPT . 2 BACKGROUND . An algorithm can be ( , δ ) -DP for multiple pairs of and δ : the union of all such pairs provides a complete image of the algorithm under the ( , δ ) -DP framework . In particular , an ( , δ ) -DP mechanismA is also ( ′ , δ′ ) -DP for any ′ ≥ and any δ′ ≥ δ . The infinite union of ( , δ ) pairs can thus be represented as the smallest δ associated with each . This intuition is formulated as a privacy profile in Balle & Wang ( 2018 ) . The privacy profile corresponding to a collection of ( , δ ) -DP guarantees Ω is defined as the curve in [ 0 , ∞ ) × [ 0 , 1 ] separating the space of privacy parameters into two regions , one of which contains exactly the pairs in Ω . The privacy profile provides as much information as Ω itself . Many privacy guarantees and privacy notions , including ( , δ ) -DP , Rényi DP , f -DP , GDP , and concentrated DP , can be embedded into a family of privacy profile curves and fully characterized ( Balle et al. , 2020a ) . A privacy profile can be provided or derived by an algorithm ’ s designer or users . Before proceeding with detailed discussions , we first give three examples of DP algorithms that are used throughout the paper . The first example we consider is the Laplace mechanism , a classical DP mechanism whose prototype is discussed in the paper that originally defined the concept of differential privacy ( Dwork et al. , 2006 ) . The level of privacy that the Laplace mechanism can provide is determined by the scale b of the added Laplacian noise . Given a global sensitivity ∆ , the value of b needs to be chosen as f ( , 0 ) = ∆/ in order to provide an ( , 0 ) -DP guarantee . Despite its long history , the Laplace mechanism has remained in use and study in recent years ( Phan et al. , 2017 ; Hu et al. , 2019 ; Xu et al. , 2020 ; Li & Clifton , 2021 ) . Our second example is a family of algorithms in which a noise parameter has the form σ = A −1 √ log ( B/δ ) . Examples include • the goodness of fit algorithm ( Gaboardi et al. , 2016 ) , • noisy stochastic gradient descent and its variants ( Bassily et al. , 2014 ; Abadi et al. , 2016 ; Feldman et al. , 2018 ) , and • the one-shot spectral method and the one-shot Laplace algorithm ( Qiao et al. , 2021 ) . Our third example comes from the field of federated learning : given n users and the number of messages m , the invisibility cloak encoder algorithm ( ICEA ) from ( Ishai et al. , 2006 ) is ( , δ ) -DP if m > 10 log ( n/ ( δ ) ) ( Ghazi et al. , 2019 ) . See also ( Balle et al. , 2020b ; Ghazi et al. , 2020 ) for other analysis of ICEA . For figures and numerical demonstrations in this paper , we use b = 2/∆ for the Laplace mechanism ; A = 2 , B = 1 , and σ = 2 for the second example , which we refer to as SGD ; andm = 20 and n = 4 for the ICEA . We omit the internal details of these methods and focus on their privacy guarantees : other than for the classical Laplace mechanism , whose privacy profile is known ( Balle et al. , 2020a ) , privacy guarantees are given in the form of a privacy–utility trade-off equation σ = f ( , δ ) . Given σ , it is tempting to derive the privacy profile by inverting the trade-off equation ( i.e. , as δA ( ) = min { δ | σ = f ( , δ ) } ) . However , in most cases , a privacy profile naively derived in this way is not tight and will lead to a problematic asymptotic analysis , especially near the origin , because of a frequently overlooked partial order between ( , δ ) -DP conditions , which we discuss below . 3 PRIVACY PROFILES AND AN EXACT PARTIAL ORDER ON ( , δ ) -DP CONDITIONS An ( 0 , δ0 ) -DP algorithm is trivially ( , δ ) -DP for any ≥ 0 and δ ≥ δ0 . However , this statement does not give a full picture of the relationships between different ( , δ ) -DP conditions . Theorem 3.1 Assume that 0 ≥ 0 and 0 ≤ δ0 < 1 . The ( 0 , δ0 ) -DP condition implies ( , δ ) -DP if and only if δ ≥ δ0 + ( 1− δ0 ) ( e 0 − e ) +/ ( 1 + e 0 ) . Corollary 3.1 Assume that ≥ 0 ≥ 0 and δ ≤ [ ( 1 + e ) δ0 − e + e 0 ] / ( 1 + e 0 ) . An ( , δ ) -DP algorithm is ( 0 , δ0 ) -DP . Corollary 3.2 Let A be an ( 0 , δ0 ) -DP algorithm with the privacy profile δA . Then δA ( ) ≤ δ0 + ( 1− δ0 ) ( e 0 − e ) + 1 + e 0 . ( 1 ) We remark that the bound given in ( 1 ) is tight in the following sense : there is a specific ( 0 , δ0 ) -DP algorithm A such that δA ( ) is exactly δ0 + ( 1− δ0 ) ( e 0 − e ) +/ ( 1 + e 0 ) . Corollary 3.1 states the exact partial order of logical implication on ( , δ ) -DP conditions . Taking this partial order into account , the privacy profile derived from the naive inversion of the trade-off function can be refined into δA ( ) = min ( { δ | σ = f ( 0 , δ0 ) and δ ≥ δ0 + ( 1− δ0 ) ( e 0 − e ) + 1 + e 0 } ) . Intuitively , the refined privacy profile not only considers ( , δ ) -DP provided directly by the trade-off function but also takes all pairs ( , δ ) inferred by Corollary 3.1 . Theorem 3.2 can itself be used as a tool to improve some DP results : we will discuss this improvement in Section 5 . With this approach , we can derive the privacy profile of our second example to be δSGD ( ) = min ( δ2 + ( 1− δ2 ) ( e 2 − e ) +/ ( 1 + e 2 ) , exp { − 2 } ) , where 2 ≈ 1.187 and δ2 ≈ 0.244 . The privacy profile of our third example is δICEA ( ) = min ( δ3 + ( 1− δ3 ) ( e 3 − e ) +/ ( 1 + e 3 ) , K/ } ) , where K = 4/e2 , 3 ≈ 1.159 , and δ3 ≈ 0.468 . Notice that δSGD and δICEA share a similar form : both are the smaller of two terms , one derived from Corollary 3.1 from a particular ( , δ ) -DP pair and the other from inverting the trade-off function . This is no coincidence . We leave the derivation to Appendix B . We next show the connection between GDP and the privacy profile : briefly , Gaussian differential privacy can be characterized as an infinite union of ( , δ ) -DP conditions . Theorem 3.2 A mechanism is µ-GDP if and only if it is ( , δµ ( ) ) -DP for all ≥ 0 , where δµ ( ) = Φ ( − µ + µ 2 ) − e Φ ( − µ − µ 2 ) . ( 2 ) This result follows from properties of f -DP and is formulated as Corollary 2.13 in Dong et al . ( 2019 ) . Prior to this general form , a similar expression for a special case appeared in Balle & Wang ( 2018 ) . From the definition of the privacy profile , it follows immediately that an algorithm A with the privacy profile δA is µ-GDP if and only if δµ ( ) ≥ δA ( ) for all non-negative . However , this observation does not automatically lead to a meaningful way to identify µ-GDP algorithms . Before proceeding with an analysis of privacy profiles , we give a few visual examples in Figure 1 . The left pane illustrates the privacy profiles of our examples . That of the Laplace mechanism is derived in Balle et al . ( 2020a ) as Theorem 3 : given a noise parameter b and a global sensitivity ∆ , the privacy profile of the Laplace mechanism is δ ( ) = max ( 1 − exp { ε/2 −∆/ ( 2b ) } , 0 ) . For the second and the third examples , we compare the naive privacy profiles obtained by inverting the trade-off function and the refined privacy profiles . The refined and naive privacy profiles take on notably different values around = 0 . The inverted trade-off functions suggest that ( 0 , δ ) can not be achieved by any choice of parameter σ . However , this is clearly not true , considering Theorem 3.1 . As shown in the right pane of Figure 1 , the Laplace mechanism ’ s privacy profile is below the 2-GDP and 4-GDP curves but crosses the 1-GDP curve , indicating that the Laplace mechanism in this case is 2-GDP and 4-GDP but not 1-GDP . The ICEA curve intersects all of the displayed GDP curves , so the algorithm is not µ-GDP for µ ∈ { 1 , 2 , 4 } . It is hard to tell whether or not the SGD curve crosses the 1-GDP curve and we can not say if it will cross the 2-GDP or even the 4-GDP curve at a large value of . These examples illustrate that we can not draw conclusions simply by looking at a graph . A privacy profile is defined on [ 0 , ∞ ) , so it is hard to tell if an inequality is maintained as increases . Previous failures of ad hoc attempts at privacy have taught that privacy must be protected via tractable and objective means ( Narayanan & Shmatikov , 2006 ; 2008 ; Barbaro & T. Zeller , 2006 ) . Performing this check via numerical evaluation yields similar problems : we can not consider all values of on an infinite interval ( or even a finite one , for that matter ) . Turning to closed forms for privacy profiles and δµ is also difficult : even if a given privacy profile is easy to handle , δµ presents some technical hurdles . The profile δµ and Φ are transcendental with different asymptotic behaviors for different values of µ and . This is clear from the right pane of Figure 1 : near = 0 , δµ is concave for µ = 4 but convex for µ = 1 . As a further complication , both the first and second terms in the definition of δµ converge to 1 as → ∞ , but the difference between them vanishes . Subtracting good approximations of two nearby numbers may cause a phenomenon called catastrophic cancellation and lead to very bad approximations ( Malcolm , 1971 ; Cuyt et al. , 2001 ) . Due to the risk of catastrophic cancellation , a good approximation of Φ does not guarantee a good approximation of the GDP privacy profile . These problems make it difficult to tightly bound δµ by a function with a simple form . To address the problem of differing asymptotic behaviours , we define the following two notions . Definition 3.1 ( Head condition ) An algorithmA with the privacy profile δA is ( h , µ ) -head GDP if and only if δA ( ) ≤ δµ ( ) when ≤ h. Definition 3.2 ( Tail condition ) An algorithm A with the privacy profile δA is ( t , µ ) -tail GDP if and only if δA ( ) ≤ δµ ( ) when > t. In particular , we define A as ( +∞ , µ ) -tail GDP if A is ( t , µ ) -tail GDP for some t < +∞ and define A as ( t , +∞ ) -tail GDP if A is ( t , µ ) for some µ < +∞ . The head condition checks the µ-GDP condition for near zero and the tail condition checks the µGDP condition for far away from zero . As such , the combination of ( , µ ) -head GDP and ( , µ ) -tail GDP is equivalent to µ-GDP . | The paper develops tools for analyzing private algorithms in the framework of Gaussian Differential Privacy (GDP). GDP is a strengthening of approximate differential privacy, similar in spirit to concentrated differential privacy (CDP): both GDP and CDP capture the privacy guarantees of the Gaussian noise mechanism, but generalize them in different directions. GDP has a number of nice analytical properties but analyzing the GDP guarantees of an algorithm can be difficult, as it involves comparing two different functions on $[0,\infty)$. The paper proposes a method to reduce this problem to comparing a function against a fixed constant function, making numerical or analytical GDP analysis of a given algorithm easier. | SP:9d5bd10c8e123e41aa1421b9a55a32f2a036e790 |
Gaussian Differential Privacy Transformation: from identification to application | 1 INTRODUCTION . Recent years have seen explosive growth in the research and application of data-driven machine learning . While data fuels advancement in this unprecedented age of “ big data ” , concern for individual privacy has deepened with the continued mining , transportation , and exchange of this new resource . While expressions of privacy concerns can be traced back as early as 1969 ( Miller , 1969 ) , the concept of privacy is often perceived as “ vague and difficult to get into a right perspective ” ( Shils , 1966 ) . Through its alluring convenience and promise of societal prosperity , the use of aggregated data has long outstripped the capabilities of privacy protection measures . Indeed , early privacy protection protocols relied on the ad hoc enforcement of anonymization and offered little to no protection against the exposure of individual data , as evidenced by the AOL search log and Netflix Challenge dataset controversies ( Narayanan & Shmatikov , 2006 ; 2008 ; Barbaro & T. Zeller , 2006 ) . Differential privacy ( DP ) first gained traction as it met the urgent need for rigour and quantifiability in privacy protection ( Dwork et al. , 2006 ) . In short , DP bounds the change in the distribution of outputs of a query made on a dataset under an alteration of one data point . The following definition formalizes this notion . Definition 1.1 ( Dwork et al. , 2006 ) A randomized algorithm A , taking a dataset consisting of individuals as its input , is ( , δ ) -differentially private if , for any pair of datasets S and S′ that differ in the record of a single individual and any event E , P [ A ( S ) ∈ E ] ≤ e P [ A ( S′ ) ∈ E ] + δ . When δ = 0 , A is called -differentially private ( -DP ) . While the notion of ( , δ ) -DP has wide applications ( Dankar & El Emam , 2012 ; Erlingsson et al. , 2014 ; Cormode et al. , 2018 ; Hassan et al. , 2019 ) , there are a few notable drawbacks to this framework . One is the poor interpretability of ( , δ ) -DP : unlike other concepts in machine learning , DP should not remain a black box . Privacy guarantees are intended for human interpretation and so must be understandable by the users it affects and by regulatory entities . A second drawback is ( , δ ) -DP ’ s inferior composition properties and lack of versatility . Here , “ composition ” refers to the ability for DP properties to be inherited when DP algorithms are combined and used as building blocks . As an example , the training of deep learning models involves gradient evaluations and weight updates : each of these steps can be treated as a building block . It is natural to expect that a DP learning algorithm can be built using differentially-private versions of these components . However , the DP composition properties can not generally be well characterized within the framework of ( , δ ) -DP , leading to very loose composition theorems . To overcome the drawbacks of ( , δ ) -DP , numerous variants have been developed , including the hypothesis-testing-based f -DP ( Wasserman & Zhou , 2010 ; Dong et al. , 2019 ) , the momentsaccountant-based Rényi DP ( Mironov , 2017 ) , as well as concentrated DP and its variants ( Bun & Steinke , 2016 ; Bun et al. , 2018 ) . Despite their very different perspectives , all of these DP variants can be fully characterized by an infinite union of ( , δ ) -DP guarantees . In particular , there is a two-way embedding between f -DP and the infinite union of ( , δ ) -DP guarantees : any guarantee provided by an infinite union of ( , δ ) -DP can be fully characterized by f -DP and vice visa ( Dong et al. , 2019 ) . Consequently , f -DP has the versatility to treat all of the above notions as special cases . In addition to its versatility , f -DP is more interpretable than other DP paradigms because it considers privacy protection from an attacker ’ s perspective . Under f -DP , an attacker is challenged with the hypothesis-testing problem H0 : the underlying dataset is S versus H1 : the underlying dataset is S′ and given an output of an algorithm A , where S and S′ are neighbouring datasets . The harder this testing problem is , the less privacy leakageA has . To see this , consider the dilemma that the attacker is facing . The attacker must reject either H0 or H1 based on the given output of A : this means the attacker must select a subset R0 of Range ( A ) and reject H0 if the sampled output is in R0 ( or must otherwise reject H1 ) . The attacker is more likely to incorrectly reject H0 ( in a type I error ) when R0 is large . Conversely , if R0 is small , the attacker is more likely to incorrectly reject H1 ( in a type II error ) . We say that an algorithm A is f -DP if , for any α ∈ [ 0 , 1 ] , no attacker can simultaneously bound the probability of type I error below α and bound the probability of type II error below f ( α ) . The function f is called a trade-off function and controls the strength of the privacy protection . The versatility afforded by f can be unwieldy in practice . Although f -DP is capable of handling composition and can embed other notions of differential privacy , it is not convenient for representing safety levels as a curve amenable to human interpretation . Gaussian differential privacy ( GDP ) , as a parametric family of f -DP guarantees , provides a balance between interpretability and versatility . GDP guarantees are parameterized by a single value µ and use the trade-off function f ( α ) = Φ ( Φ−1 ( 1− α ) − µ ) , where Φ is the cumulative distribution function of the standard normal distribution . With this choice of f , the hypothesis-testing problem faced by the attacker is as hard as distinguishing between N ( 0 , 1 ) and N ( µ , 1 ) on the basis of a single observation . Aside from its visual interpretation , GDP also has unique composition theorems : the composition of a µ1- and µ2-GDP algorithm is , as expected , √ µ21 + µ 2 2-GDP . This property can be easily generalized to n-fold composition . GDP also has has a special central limit theorem implying that all hypothesis-testing-based definitions of privacy converge to GDP in terms of a limit in the number of compositions . Readers are referred to Dong et al . ( 2019 ) for more information . The benefits of DP come with a price . As outlined in the definition of DP , any DP algorithm must be randomized . This randomization is usually achieved by perturbing the intermediate step or the final output via the injection of random noise . Because of the noise , a DP algorithm can not faithfully output the truth like its non-DP counterpart . To provide a higher level of privacy protection , a stronger utility compromise should be made . This leads to the paramount problem of the “ privacy– utility trade-off ” . Under the ( , δ ) -DP framework , this trade-off is often characterized in a form of σ = f ( , δ ) : to achieve ( , δ ) -DP , the utility parameter ( usually the scale of noise ) needs to be chosen as f ( , δ ) . We will further discuss this formulation with examples in the next section . 1.1 OUR CONTRIBUTION . The general goal of this paper is to provide both a deeper theoretical understanding of and powerful practical tools for the GDP framework . To this end , we start with the analysis of privacy profiles under the condition of traditional ( , δ ) -DP , where we point out an often-overlooked partial order on ( , δ ) -DP conditions via implication . We choose this as the starting point for our work because ignoring this partial order will lead to problematic asymptotic analysis and compromised utility . Next , we broken down the GDP into two parts : a head condition and a tail condition and define an efficient , tractable , and visualizable tool , called the Gaussian differential privacy transformation ( GDPT ) . We first used the GDPT on the identification of GDP algorithms . Through the intermediate property of GDPT that we develop , we find an easy-to-verify criterion that can distinguish GDP mechanisms from non-GDP mechanisms . For GDP algorithms , this criterion provides a lower bound for the privacy protection parameter µ . This criterion can help researchers widen the set of available GDP algorithms and also gives an interesting characterization of GDP without an explicit reference to the Gaussian distribution . Following the identification of a GDP algorithm , the logical next step is to measure the exact value of µ . By development of numerical properties of the GDPT , we give a method to narrow down possible values of an optimal µ with an arbitrarily small and quantifiable margin of error . Lastly , we give three more applications of our newly developed tools . In the first , we revisit some established ( , δ ) -DP algorithms and improve their utility by accounting for the overlooked partial order on ( , δ ) -DP conditions provided by logical implication . In the second application , we make a comparison between -DP and µ-GDP and find that any -DP algorithm must be also µ-GDP . In the last application , we discuss the effect of subsampling using the GDPT . 2 BACKGROUND . An algorithm can be ( , δ ) -DP for multiple pairs of and δ : the union of all such pairs provides a complete image of the algorithm under the ( , δ ) -DP framework . In particular , an ( , δ ) -DP mechanismA is also ( ′ , δ′ ) -DP for any ′ ≥ and any δ′ ≥ δ . The infinite union of ( , δ ) pairs can thus be represented as the smallest δ associated with each . This intuition is formulated as a privacy profile in Balle & Wang ( 2018 ) . The privacy profile corresponding to a collection of ( , δ ) -DP guarantees Ω is defined as the curve in [ 0 , ∞ ) × [ 0 , 1 ] separating the space of privacy parameters into two regions , one of which contains exactly the pairs in Ω . The privacy profile provides as much information as Ω itself . Many privacy guarantees and privacy notions , including ( , δ ) -DP , Rényi DP , f -DP , GDP , and concentrated DP , can be embedded into a family of privacy profile curves and fully characterized ( Balle et al. , 2020a ) . A privacy profile can be provided or derived by an algorithm ’ s designer or users . Before proceeding with detailed discussions , we first give three examples of DP algorithms that are used throughout the paper . The first example we consider is the Laplace mechanism , a classical DP mechanism whose prototype is discussed in the paper that originally defined the concept of differential privacy ( Dwork et al. , 2006 ) . The level of privacy that the Laplace mechanism can provide is determined by the scale b of the added Laplacian noise . Given a global sensitivity ∆ , the value of b needs to be chosen as f ( , 0 ) = ∆/ in order to provide an ( , 0 ) -DP guarantee . Despite its long history , the Laplace mechanism has remained in use and study in recent years ( Phan et al. , 2017 ; Hu et al. , 2019 ; Xu et al. , 2020 ; Li & Clifton , 2021 ) . Our second example is a family of algorithms in which a noise parameter has the form σ = A −1 √ log ( B/δ ) . Examples include • the goodness of fit algorithm ( Gaboardi et al. , 2016 ) , • noisy stochastic gradient descent and its variants ( Bassily et al. , 2014 ; Abadi et al. , 2016 ; Feldman et al. , 2018 ) , and • the one-shot spectral method and the one-shot Laplace algorithm ( Qiao et al. , 2021 ) . Our third example comes from the field of federated learning : given n users and the number of messages m , the invisibility cloak encoder algorithm ( ICEA ) from ( Ishai et al. , 2006 ) is ( , δ ) -DP if m > 10 log ( n/ ( δ ) ) ( Ghazi et al. , 2019 ) . See also ( Balle et al. , 2020b ; Ghazi et al. , 2020 ) for other analysis of ICEA . For figures and numerical demonstrations in this paper , we use b = 2/∆ for the Laplace mechanism ; A = 2 , B = 1 , and σ = 2 for the second example , which we refer to as SGD ; andm = 20 and n = 4 for the ICEA . We omit the internal details of these methods and focus on their privacy guarantees : other than for the classical Laplace mechanism , whose privacy profile is known ( Balle et al. , 2020a ) , privacy guarantees are given in the form of a privacy–utility trade-off equation σ = f ( , δ ) . Given σ , it is tempting to derive the privacy profile by inverting the trade-off equation ( i.e. , as δA ( ) = min { δ | σ = f ( , δ ) } ) . However , in most cases , a privacy profile naively derived in this way is not tight and will lead to a problematic asymptotic analysis , especially near the origin , because of a frequently overlooked partial order between ( , δ ) -DP conditions , which we discuss below . 3 PRIVACY PROFILES AND AN EXACT PARTIAL ORDER ON ( , δ ) -DP CONDITIONS An ( 0 , δ0 ) -DP algorithm is trivially ( , δ ) -DP for any ≥ 0 and δ ≥ δ0 . However , this statement does not give a full picture of the relationships between different ( , δ ) -DP conditions . Theorem 3.1 Assume that 0 ≥ 0 and 0 ≤ δ0 < 1 . The ( 0 , δ0 ) -DP condition implies ( , δ ) -DP if and only if δ ≥ δ0 + ( 1− δ0 ) ( e 0 − e ) +/ ( 1 + e 0 ) . Corollary 3.1 Assume that ≥ 0 ≥ 0 and δ ≤ [ ( 1 + e ) δ0 − e + e 0 ] / ( 1 + e 0 ) . An ( , δ ) -DP algorithm is ( 0 , δ0 ) -DP . Corollary 3.2 Let A be an ( 0 , δ0 ) -DP algorithm with the privacy profile δA . Then δA ( ) ≤ δ0 + ( 1− δ0 ) ( e 0 − e ) + 1 + e 0 . ( 1 ) We remark that the bound given in ( 1 ) is tight in the following sense : there is a specific ( 0 , δ0 ) -DP algorithm A such that δA ( ) is exactly δ0 + ( 1− δ0 ) ( e 0 − e ) +/ ( 1 + e 0 ) . Corollary 3.1 states the exact partial order of logical implication on ( , δ ) -DP conditions . Taking this partial order into account , the privacy profile derived from the naive inversion of the trade-off function can be refined into δA ( ) = min ( { δ | σ = f ( 0 , δ0 ) and δ ≥ δ0 + ( 1− δ0 ) ( e 0 − e ) + 1 + e 0 } ) . Intuitively , the refined privacy profile not only considers ( , δ ) -DP provided directly by the trade-off function but also takes all pairs ( , δ ) inferred by Corollary 3.1 . Theorem 3.2 can itself be used as a tool to improve some DP results : we will discuss this improvement in Section 5 . With this approach , we can derive the privacy profile of our second example to be δSGD ( ) = min ( δ2 + ( 1− δ2 ) ( e 2 − e ) +/ ( 1 + e 2 ) , exp { − 2 } ) , where 2 ≈ 1.187 and δ2 ≈ 0.244 . The privacy profile of our third example is δICEA ( ) = min ( δ3 + ( 1− δ3 ) ( e 3 − e ) +/ ( 1 + e 3 ) , K/ } ) , where K = 4/e2 , 3 ≈ 1.159 , and δ3 ≈ 0.468 . Notice that δSGD and δICEA share a similar form : both are the smaller of two terms , one derived from Corollary 3.1 from a particular ( , δ ) -DP pair and the other from inverting the trade-off function . This is no coincidence . We leave the derivation to Appendix B . We next show the connection between GDP and the privacy profile : briefly , Gaussian differential privacy can be characterized as an infinite union of ( , δ ) -DP conditions . Theorem 3.2 A mechanism is µ-GDP if and only if it is ( , δµ ( ) ) -DP for all ≥ 0 , where δµ ( ) = Φ ( − µ + µ 2 ) − e Φ ( − µ − µ 2 ) . ( 2 ) This result follows from properties of f -DP and is formulated as Corollary 2.13 in Dong et al . ( 2019 ) . Prior to this general form , a similar expression for a special case appeared in Balle & Wang ( 2018 ) . From the definition of the privacy profile , it follows immediately that an algorithm A with the privacy profile δA is µ-GDP if and only if δµ ( ) ≥ δA ( ) for all non-negative . However , this observation does not automatically lead to a meaningful way to identify µ-GDP algorithms . Before proceeding with an analysis of privacy profiles , we give a few visual examples in Figure 1 . The left pane illustrates the privacy profiles of our examples . That of the Laplace mechanism is derived in Balle et al . ( 2020a ) as Theorem 3 : given a noise parameter b and a global sensitivity ∆ , the privacy profile of the Laplace mechanism is δ ( ) = max ( 1 − exp { ε/2 −∆/ ( 2b ) } , 0 ) . For the second and the third examples , we compare the naive privacy profiles obtained by inverting the trade-off function and the refined privacy profiles . The refined and naive privacy profiles take on notably different values around = 0 . The inverted trade-off functions suggest that ( 0 , δ ) can not be achieved by any choice of parameter σ . However , this is clearly not true , considering Theorem 3.1 . As shown in the right pane of Figure 1 , the Laplace mechanism ’ s privacy profile is below the 2-GDP and 4-GDP curves but crosses the 1-GDP curve , indicating that the Laplace mechanism in this case is 2-GDP and 4-GDP but not 1-GDP . The ICEA curve intersects all of the displayed GDP curves , so the algorithm is not µ-GDP for µ ∈ { 1 , 2 , 4 } . It is hard to tell whether or not the SGD curve crosses the 1-GDP curve and we can not say if it will cross the 2-GDP or even the 4-GDP curve at a large value of . These examples illustrate that we can not draw conclusions simply by looking at a graph . A privacy profile is defined on [ 0 , ∞ ) , so it is hard to tell if an inequality is maintained as increases . Previous failures of ad hoc attempts at privacy have taught that privacy must be protected via tractable and objective means ( Narayanan & Shmatikov , 2006 ; 2008 ; Barbaro & T. Zeller , 2006 ) . Performing this check via numerical evaluation yields similar problems : we can not consider all values of on an infinite interval ( or even a finite one , for that matter ) . Turning to closed forms for privacy profiles and δµ is also difficult : even if a given privacy profile is easy to handle , δµ presents some technical hurdles . The profile δµ and Φ are transcendental with different asymptotic behaviors for different values of µ and . This is clear from the right pane of Figure 1 : near = 0 , δµ is concave for µ = 4 but convex for µ = 1 . As a further complication , both the first and second terms in the definition of δµ converge to 1 as → ∞ , but the difference between them vanishes . Subtracting good approximations of two nearby numbers may cause a phenomenon called catastrophic cancellation and lead to very bad approximations ( Malcolm , 1971 ; Cuyt et al. , 2001 ) . Due to the risk of catastrophic cancellation , a good approximation of Φ does not guarantee a good approximation of the GDP privacy profile . These problems make it difficult to tightly bound δµ by a function with a simple form . To address the problem of differing asymptotic behaviours , we define the following two notions . Definition 3.1 ( Head condition ) An algorithmA with the privacy profile δA is ( h , µ ) -head GDP if and only if δA ( ) ≤ δµ ( ) when ≤ h. Definition 3.2 ( Tail condition ) An algorithm A with the privacy profile δA is ( t , µ ) -tail GDP if and only if δA ( ) ≤ δµ ( ) when > t. In particular , we define A as ( +∞ , µ ) -tail GDP if A is ( t , µ ) -tail GDP for some t < +∞ and define A as ( t , +∞ ) -tail GDP if A is ( t , µ ) for some µ < +∞ . The head condition checks the µ-GDP condition for near zero and the tail condition checks the µGDP condition for far away from zero . As such , the combination of ( , µ ) -head GDP and ( , µ ) -tail GDP is equivalent to µ-GDP . | This work is an investigation into the newly proposed Gaussian Differential privacy (GDP) in the context of existing formulations of epsilon, delta differential privacy (DP). Authors propose a novel framework for GDP transformation (GDPT) that analyses the properties of GDP and contrasts it to DP through the lens of the adversarial (head/tail composition) analysis, showing both theoretically and empirically that it results in better algorithmic utility. Authors provide a list of applications for GDPT and outline the benefits of this approach (primarily through tighter privacy bounds). | SP:9d5bd10c8e123e41aa1421b9a55a32f2a036e790 |
Trigger Hunting with a Topological Prior for Trojan Detection | 1 INTRODUCTION . Deep learning has achieved superior performance in various computer vision tasks , such as image classification ( Krizhevsky et al. , 2012 ) , image segmentation ( Long et al. , 2015 ) , object detection ( Girshick et al. , 2014 ) , etc . However , the vulnerability of DNNs against backdoor attacks raises serious concerns . In this paper , we address the problem of Trojan attacks , where during training , an attacker injects polluted samples . While resembling normal samples , these polluted samples contain a specific type of perturbation ( called triggers ) . These polluted samples are assigned with target labels , which are usually different from the expected class labels . Training with this polluted dataset results in a Trojaned model . At the inference stage , a Trojaned model behaves normally given clean samples . But when the trigger is present , it makes unexpected , yet consistently incorrect predictions . One major constraint for Trojan detection is the limited access to the polluted training data . In practice , the end-users , who need to detect the Trojaned models , often only have access to the weights and architectures of the trained DNNs . State-of-the-art ( SOTA ) Trojan detection methods generally adopt a reverse engineering approach ( Guo et al. , 2019 ; Wang et al. , 2019 ; Huster & Ekwedike , 2021 ; Wang et al. , 2020 ; Chen et al. , 2019c ; Liu et al. , 2019 ) . They start with a few clean samples , using either gradient descent or careful stimuli crafting , to find a potential trigger that alters model prediction . Characteristics of the recovered triggers along with the associated network activations are used as features to determine whether a model is Trojaned or not . Trojan triggers can be of arbitrary patterns ( e.g. , shape , color , texture ) at arbitrary locations of an input image ( e.g. , Fig . 1 ) . As a result , one major challenge of the reverse engineering-based approach is the enormous search space for potential triggers . Meanwhile , just like the trigger is unknown , the target label ( i.e. , the class label to which a triggered model predicts ) is also unknown in practice . Gradient descent may flip a model ’ s prediction to the closest alternative label , which may not necessarily be the target label . This makes it even more challenging to recover the true trigger . Note that many existing methods ( Guo et al. , 2019 ; Wang et al. , 2019 ; 2020 ) require a target label . These methods achieve target label independence by enumerating through all possible labels , which can be computationally prohibitive especially when the label space is huge . We propose a novel target-label-agnostic reverse engineering method . First , to improve the quality of the recovered triggers , we need a prior that can localize the triggers , but in a flexible manner . We , therefore , propose to enforce a topological prior to the optimization process of reverse engineering , i.e. , the recovered trigger should have fewer connected components . This prior is implemented through a topological loss based on the theory of persistent homology ( Edelsbrunner & Harer , 2010 ) . It allows the recovered trigger to have arbitrary shape and size . Meanwhile , it ensures the trigger is not scattered and is reasonably localized . See Fig . 1 for an example – comparing ( d ) - ( f ) vs. ( c ) . As a second contribution , we propose to reverse engineer multiple diverse trigger candidates . Instead of running gradient decent once , we run it for multiple rounds , each time producing one trigger candidate , e.g. , Fig . 1 ( d ) - ( f ) . Furthermore , we propose a trigger diversity loss to ensure the trigger candidates to be sufficiently different from each other ( see Fig . 2 ) . Generating multiple diverse trigger candidates can increase the chance of finding the true trigger . It also mitigates the risk of unknown target labels . In the example of Fig . 2 , the first trigger candidate flips the model prediction to a label different from the target , while only the third candidate hits the true target label . Generating multiple trigger candidates , however , adds difficulties in filtering out already-subtle cues for Trojan detection . We also note reverse engineer- ing approaches often suffer from false positive triggers such as adversarial perturbations or direct modification of the crucial objects of the image1 . In practice , we systematically extract a rich set of features to describe the characteristics of the reconstructed trigger candidates based on geometry , color , and topology , as well as network activations . A Trojan-detection network is then trained to detect Trojaned models based on these features . Our main contributions are summarized as follows : • We propose a topological prior to regularize the optimization process of reverse engineering . The prior ensures the locality of the recovered triggers , while being sufficiently flexible regarding the appearance . It significantly improves the quality of the reconstructed triggers . • We propose a diversity loss to generate multiple diverse trigger candidates . This increases the chance of recovering the true trigger , especially for cases with unknown target labels . • Combining the topological prior and diversity loss , we propose a novel Trojan detection framework . On both synthetic and public TrojAI benchmarks , our method demonstrates substantial improvement in both trigger recovery and Trojan detection . 2 RELATED WORK . Trojan detection . Many Trojan detection methods have been proposed recently . Some focus on detecting poisoned inputs via anomaly detection ( Chou et al. , 2020 ; Gao et al. , 2019 ; Liu et al. , 2017 ; Ma & Liu , 2019 ) . For example , SentiNet ( Chou et al. , 2020 ) tries to identify adversarial inputs , and 1Modification of crucial objects is usually not a valid trigger strategy ; it is too obvious to end-users and is against the principle of adversaries . uses the behaviors of these adversarial inputs to detect Trojaned models . Others focus on analyzing the behaviors of the trained models ( Chen et al. , 2019a ; Guo et al. , 2019 ; Shen et al. , 2021 ; Sun et al. , 2020 ) . Specifically , Chen et al . ( 2019a ) propose the Activation Clustering ( AC ) methodology to analyze the activations of neural networks to determine if a model has been poisoned or not . While early works require all training data to detect Trojans ( Chen et al. , 2019a ; Gao et al. , 2019 ; Tran et al. , 2018 ) , recent approaches have been focusing on a more realistic setting – when one has limited access to the training data . A particular promising direction is reverse engineering approaches , which recover Trojan triggers with only a few clean samples . Neural cleanse ( NC ) ( Wang et al. , 2019 ) develops a Trojan detection method by identifying if there is a trigger that would produce misclassified results when added to an input . However , as pointed out by ( Guo et al. , 2019 ) , NC becomes futile when triggers vary in terms of size , shape , and location . Since NC , different approaches have been proposed , extending the reverse engineering idea . Using a conditional generative model , DeepInspect ( Chen et al. , 2019c ) learns the probability distribution of potential triggers from a model of interest . Kolouri et al . ( 2020 ) propose to learn universal patterns that change predictions of the model ( called Universal Litmus Patterns ( ULPs ) ) . The method is efficient as it only involves forward passes through a CNN and avoids backpropagation . ABS ( Liu et al. , 2019 ) analyzes inner neuron behaviors by measuring how extra stimulation can change the network ’ s prediction . Wang et al . ( 2020 ) propose a data-limited TrojanNet detector ( TND ) by comparing the impact of per-sample attack and universal attack . Guo et al . ( 2019 ) cast Trojan detection as a non-convex optimization problem and it is solved through optimizing an objective function . Huster & Ekwedike ( 2021 ) solve the problem by observing that , compared with clean models , adversarial perturbations transfer from image to image more readily in poisoned models . Existing methods are generally demanding on training data access , neural network architectures , types of triggers , target class , etc . This limits their deployment to real-world applications . As for reverse engineering approaches , it remains challenging , if not entirely infeasible , to recover the true triggers . We propose a novel reverse engineering approach that can recover the triggers with high quality using the novel diversity and topological prior . Our method shares the common benefit of reverse engineering methods ; it only needs a few clean input images per model . Meanwhile , our approach is agnostic of model architectures , trigger types , and target labels . Topological data analysis and persistent homology . Topological data analysis ( TDA ) is a field in which one analyzes datasets using topological tools such as persistent homology ( Edelsbrunner & Harer , 2010 ; Edelsbrunner et al. , 2000 ) . The theory has been applied to different applications ( Kulp et al. , 2015 ; Kwitt et al. , 2015 ; Wong et al. , 2016 ; Chazal et al. , 2013 ; Ni et al. , 2017 ; Adams et al. , 2017 ; Bubenik , 2015 ; Varshney & Ramamurthy , 2015 ; Hu et al. , 2019 ; 2021 ) . As the advent of deep learning , some works have tried to incorporate the topological information into deep neural networks , and the differentiable property of persistent homology ( Edelsbrunner et al. , 2000 ) make it a possible choice . The main idea is that the persistence diagram/barcodes can capture all the topological changes , and it is differentiable to the original data . Hu et al . ( 2019 ) first propose a topological loss to learn to segment images with correct topology , by matching persistence diagrams in a supervised manner . Similarly , Clough et al . ( 2020 ) propose to use the persistence barcodes to enforce a given topological prior of the target object . These methods achieve better quality results especially in structural accuracy . In other contexts , persistent-homology-based losses have been applied to different learning problems ( Hofer et al. , 2019 ; 2020 ; Carrière et al. , 2020 ; Chen et al. , 2019b ) . The aforementioned methods use topological priors in supervised learning tasks ( namely , segmentation ) . Instead , in this work , we propose to leverage the topological prior in an unsupervised setting ; we use a topological prior for the reverse engineering pipeline to reduce the search space of triggers and enforce the recovered triggers to have fewer connected components . 3 METHOD . Our reverse engineering framework is illustrated in Fig . 3 . Given a trained DNN model , either clean or Trojaned , and a few clean images , we use gradient descent to reconstruct triggers that can flip the model ’ s prediction . To increase the quality of reconstructed triggers , we introduce novel diversity loss and topological prior . They help recover multiple diverse triggers of high quality . The common hypothesis of reverse engineering approaches is that the reconstructed triggers will appear different for Trojaned and clean models . To fully exploit the discriminative power of the reconstructed triggers for Trojan detection , we extract features based on trigger characteristics and associated network activations . These features are used to train a classifier , called the Trojan-detection network , to classify a given model as Trojaned or clean . We note the discriminative power of the extracted trigger features , and thus the Trojan-detection network , are highly dependent on the quality of the reconstructed triggers . Empirical results will show the proposed diversity loss and topological prior are crucial in reconstructing high quality triggers , and ensures a high quality Trojan-detection network . We will show that our method can learn to detect Trojaned models even when trained with a small amount of labeled DNN models . For the rest of this section , we mainly focus on the reverse engineering module . We also add details of the Trigger feature extraction to Sec . 3.3 and details of the Trojan-detection network to Sec . A.1 . 3.1 REVERSE ENGINEERING OF MULTIPLE DIVERSE TRIGGER CANDIDATES Our method is built on the existing reverse engineering pipeline first proposed by Neural Cleanse ( Wang et al. , 2019 ) . Given a trained DNN model , let f ( · ) be the mapping from an input clean image x ∈ R3×M×N to the output y ∈ RK with K classes , where M and N denote the height and width of the image , respectively . Denote by fk ( · ) the k-th output of f . The predicted label c∗ is given by c∗ = arg maxk fk ( x ) , 1 ≤ k ≤ K. We introduce parameters θ and m to convert x into an altered sample φ ( x , m , θ ) = ( 1−m ) x + m θ , ( 1 ) where the binary mask m ∈ { 0 , 1 } M×N and the pattern θ ∈ RM×N determine the trigger . 1 denotes an all-one matrix . The symbol “ ” denotes Hadamard product . See Fig . 4 for an illustration . We intend to find a triggered image x̂ = φ ( x , m̂ , θ̂ ) so that the model prediction ĉ = arg maxk fk ( x̂ ) is different from the prediction on the original image c∗ . We find the triggered image , x̂ , by minimizing a loss over the space of m and θ : L ( m , θ ; x , f , c∗ ) = Lflip ( . . . ) + λ1Ldiv ( . . . ) + λ2Ltopo ( . . . ) +R ( m ) , ( 2 ) where Lflip , Ldiv , and Ltopo denote the label-flipping loss , diversity loss , and topological loss , respectively . We temporarily dropped their arguments for convenience . λ1 , λ2 are the weights to balance the loss terms . R ( m ) is a regularization term penalizing the size and range of the mask ( more details will be provided in the Sec . A.1 of Appendix ) . To facilitate optimization , we relax the constraint on the mask m and allow it to be a continuousvalued function , ranging between 0 and 1 and defined over the image domain , m ∈ [ 0 , 1 ] M×N . Next , we introduce the three loss terms one-by-one . Label-flipping loss Lflip : The label-flipping loss Lflip penalizes the prediction of the model regarding the ground truth label , formally : Lflip ( m , θ ; x , f , c ∗ ) = fc∗ ( φ ( x , m , θ ) ) . ( 3 ) Minimizing Lflip means minimizing the probability that the altered image φ ( x , m , θ ) is predicted as c∗ . In other words , we are pushing the input image out of its initial decision region . Note that we do not specify which label we would like to flip the prediction to . This makes the optimization easier . Existing approaches often run optimization to flip the label to a target label and enumerate through all possible target labels ( Wang et al. , 2019 ; 2020 ) . This can be rather expensive in computation , especially with large label space . The downside of not specifying a target label during optimization is we will potentially miss the correct target label , i.e. , the label which the Trojaned model predicts on a triggered image . To this end , we propose to reconstruct multiple candidate triggers with diversity constraints . This will increase the chance of hitting the correct target label . See Fig . 2 for an illustration . Diversity loss Ldiv : With the label-flipping loss Lflip , we flip the label to a different one from the original clean label and recover the corresponding triggers . The new label , however , may not be the same as the true target label . Also considering the huge trigger search space , it is difficult to recover the triggers with only one attempt . Instead , we propose to search for multiple trigger candidates to increase the chance of capturing the true trigger . We run our algorithm for NT rounds , each time reconstructing a different trigger candidate . To avoid finding similar trigger candidates , we introduce the diversity loss Ldiv to encourage different trigger patterns and locations . Let mj and θj denote the trigger mask and pattern found in the j-th round . At the i-th round , we compare the current candidates with triggers from all previous founds in terms of L2 norm . Formally : Ldiv ( m , θ ) = − ∑i−1 j=1 ||m θ −mj θj ||2 . ( 4 ) Minimizing Ldiv ensures the eventual trigger mi θi to be different from triggers from previous rounds . Fig . 1 ( d ) - ( f ) demonstrates the multiple candidates recovered with sufficient diversity . | This paper presents a method for the detection of backdoored neural networks. It is assumed that the user only will have access to the trained model and a few clean validation samples, not the training data. As such, a reverse engineering approach is taken to solve the task: i.e. using the validation samples, the method aims to recover possible backdoor triggers. To this end, a loss function with three terms is minimized: 1. a _label flipping_ loss to extract triggers that can subvert the classifier's decision, 2. a _diversity_ loss that aims to generate various triggers with different patterns, and 3. a _topological_ loss that tries to encourage the compactness of the recovered triggers. Based on these loss terms, triggers are reverse engineered for a dataset containing malicious and benign models. Then, using these triggers a set of features are built for each model (Trojaned vs. benign). Using these features, a binary classifier is trained to predict if the models are backdoored or not. The performance of the proposed approach is tested under various experimental settings and ablation studies. | SP:36e27d926b92c4468e0d804c55da0c0d0d26fa77 |
Trigger Hunting with a Topological Prior for Trojan Detection | 1 INTRODUCTION . Deep learning has achieved superior performance in various computer vision tasks , such as image classification ( Krizhevsky et al. , 2012 ) , image segmentation ( Long et al. , 2015 ) , object detection ( Girshick et al. , 2014 ) , etc . However , the vulnerability of DNNs against backdoor attacks raises serious concerns . In this paper , we address the problem of Trojan attacks , where during training , an attacker injects polluted samples . While resembling normal samples , these polluted samples contain a specific type of perturbation ( called triggers ) . These polluted samples are assigned with target labels , which are usually different from the expected class labels . Training with this polluted dataset results in a Trojaned model . At the inference stage , a Trojaned model behaves normally given clean samples . But when the trigger is present , it makes unexpected , yet consistently incorrect predictions . One major constraint for Trojan detection is the limited access to the polluted training data . In practice , the end-users , who need to detect the Trojaned models , often only have access to the weights and architectures of the trained DNNs . State-of-the-art ( SOTA ) Trojan detection methods generally adopt a reverse engineering approach ( Guo et al. , 2019 ; Wang et al. , 2019 ; Huster & Ekwedike , 2021 ; Wang et al. , 2020 ; Chen et al. , 2019c ; Liu et al. , 2019 ) . They start with a few clean samples , using either gradient descent or careful stimuli crafting , to find a potential trigger that alters model prediction . Characteristics of the recovered triggers along with the associated network activations are used as features to determine whether a model is Trojaned or not . Trojan triggers can be of arbitrary patterns ( e.g. , shape , color , texture ) at arbitrary locations of an input image ( e.g. , Fig . 1 ) . As a result , one major challenge of the reverse engineering-based approach is the enormous search space for potential triggers . Meanwhile , just like the trigger is unknown , the target label ( i.e. , the class label to which a triggered model predicts ) is also unknown in practice . Gradient descent may flip a model ’ s prediction to the closest alternative label , which may not necessarily be the target label . This makes it even more challenging to recover the true trigger . Note that many existing methods ( Guo et al. , 2019 ; Wang et al. , 2019 ; 2020 ) require a target label . These methods achieve target label independence by enumerating through all possible labels , which can be computationally prohibitive especially when the label space is huge . We propose a novel target-label-agnostic reverse engineering method . First , to improve the quality of the recovered triggers , we need a prior that can localize the triggers , but in a flexible manner . We , therefore , propose to enforce a topological prior to the optimization process of reverse engineering , i.e. , the recovered trigger should have fewer connected components . This prior is implemented through a topological loss based on the theory of persistent homology ( Edelsbrunner & Harer , 2010 ) . It allows the recovered trigger to have arbitrary shape and size . Meanwhile , it ensures the trigger is not scattered and is reasonably localized . See Fig . 1 for an example – comparing ( d ) - ( f ) vs. ( c ) . As a second contribution , we propose to reverse engineer multiple diverse trigger candidates . Instead of running gradient decent once , we run it for multiple rounds , each time producing one trigger candidate , e.g. , Fig . 1 ( d ) - ( f ) . Furthermore , we propose a trigger diversity loss to ensure the trigger candidates to be sufficiently different from each other ( see Fig . 2 ) . Generating multiple diverse trigger candidates can increase the chance of finding the true trigger . It also mitigates the risk of unknown target labels . In the example of Fig . 2 , the first trigger candidate flips the model prediction to a label different from the target , while only the third candidate hits the true target label . Generating multiple trigger candidates , however , adds difficulties in filtering out already-subtle cues for Trojan detection . We also note reverse engineer- ing approaches often suffer from false positive triggers such as adversarial perturbations or direct modification of the crucial objects of the image1 . In practice , we systematically extract a rich set of features to describe the characteristics of the reconstructed trigger candidates based on geometry , color , and topology , as well as network activations . A Trojan-detection network is then trained to detect Trojaned models based on these features . Our main contributions are summarized as follows : • We propose a topological prior to regularize the optimization process of reverse engineering . The prior ensures the locality of the recovered triggers , while being sufficiently flexible regarding the appearance . It significantly improves the quality of the reconstructed triggers . • We propose a diversity loss to generate multiple diverse trigger candidates . This increases the chance of recovering the true trigger , especially for cases with unknown target labels . • Combining the topological prior and diversity loss , we propose a novel Trojan detection framework . On both synthetic and public TrojAI benchmarks , our method demonstrates substantial improvement in both trigger recovery and Trojan detection . 2 RELATED WORK . Trojan detection . Many Trojan detection methods have been proposed recently . Some focus on detecting poisoned inputs via anomaly detection ( Chou et al. , 2020 ; Gao et al. , 2019 ; Liu et al. , 2017 ; Ma & Liu , 2019 ) . For example , SentiNet ( Chou et al. , 2020 ) tries to identify adversarial inputs , and 1Modification of crucial objects is usually not a valid trigger strategy ; it is too obvious to end-users and is against the principle of adversaries . uses the behaviors of these adversarial inputs to detect Trojaned models . Others focus on analyzing the behaviors of the trained models ( Chen et al. , 2019a ; Guo et al. , 2019 ; Shen et al. , 2021 ; Sun et al. , 2020 ) . Specifically , Chen et al . ( 2019a ) propose the Activation Clustering ( AC ) methodology to analyze the activations of neural networks to determine if a model has been poisoned or not . While early works require all training data to detect Trojans ( Chen et al. , 2019a ; Gao et al. , 2019 ; Tran et al. , 2018 ) , recent approaches have been focusing on a more realistic setting – when one has limited access to the training data . A particular promising direction is reverse engineering approaches , which recover Trojan triggers with only a few clean samples . Neural cleanse ( NC ) ( Wang et al. , 2019 ) develops a Trojan detection method by identifying if there is a trigger that would produce misclassified results when added to an input . However , as pointed out by ( Guo et al. , 2019 ) , NC becomes futile when triggers vary in terms of size , shape , and location . Since NC , different approaches have been proposed , extending the reverse engineering idea . Using a conditional generative model , DeepInspect ( Chen et al. , 2019c ) learns the probability distribution of potential triggers from a model of interest . Kolouri et al . ( 2020 ) propose to learn universal patterns that change predictions of the model ( called Universal Litmus Patterns ( ULPs ) ) . The method is efficient as it only involves forward passes through a CNN and avoids backpropagation . ABS ( Liu et al. , 2019 ) analyzes inner neuron behaviors by measuring how extra stimulation can change the network ’ s prediction . Wang et al . ( 2020 ) propose a data-limited TrojanNet detector ( TND ) by comparing the impact of per-sample attack and universal attack . Guo et al . ( 2019 ) cast Trojan detection as a non-convex optimization problem and it is solved through optimizing an objective function . Huster & Ekwedike ( 2021 ) solve the problem by observing that , compared with clean models , adversarial perturbations transfer from image to image more readily in poisoned models . Existing methods are generally demanding on training data access , neural network architectures , types of triggers , target class , etc . This limits their deployment to real-world applications . As for reverse engineering approaches , it remains challenging , if not entirely infeasible , to recover the true triggers . We propose a novel reverse engineering approach that can recover the triggers with high quality using the novel diversity and topological prior . Our method shares the common benefit of reverse engineering methods ; it only needs a few clean input images per model . Meanwhile , our approach is agnostic of model architectures , trigger types , and target labels . Topological data analysis and persistent homology . Topological data analysis ( TDA ) is a field in which one analyzes datasets using topological tools such as persistent homology ( Edelsbrunner & Harer , 2010 ; Edelsbrunner et al. , 2000 ) . The theory has been applied to different applications ( Kulp et al. , 2015 ; Kwitt et al. , 2015 ; Wong et al. , 2016 ; Chazal et al. , 2013 ; Ni et al. , 2017 ; Adams et al. , 2017 ; Bubenik , 2015 ; Varshney & Ramamurthy , 2015 ; Hu et al. , 2019 ; 2021 ) . As the advent of deep learning , some works have tried to incorporate the topological information into deep neural networks , and the differentiable property of persistent homology ( Edelsbrunner et al. , 2000 ) make it a possible choice . The main idea is that the persistence diagram/barcodes can capture all the topological changes , and it is differentiable to the original data . Hu et al . ( 2019 ) first propose a topological loss to learn to segment images with correct topology , by matching persistence diagrams in a supervised manner . Similarly , Clough et al . ( 2020 ) propose to use the persistence barcodes to enforce a given topological prior of the target object . These methods achieve better quality results especially in structural accuracy . In other contexts , persistent-homology-based losses have been applied to different learning problems ( Hofer et al. , 2019 ; 2020 ; Carrière et al. , 2020 ; Chen et al. , 2019b ) . The aforementioned methods use topological priors in supervised learning tasks ( namely , segmentation ) . Instead , in this work , we propose to leverage the topological prior in an unsupervised setting ; we use a topological prior for the reverse engineering pipeline to reduce the search space of triggers and enforce the recovered triggers to have fewer connected components . 3 METHOD . Our reverse engineering framework is illustrated in Fig . 3 . Given a trained DNN model , either clean or Trojaned , and a few clean images , we use gradient descent to reconstruct triggers that can flip the model ’ s prediction . To increase the quality of reconstructed triggers , we introduce novel diversity loss and topological prior . They help recover multiple diverse triggers of high quality . The common hypothesis of reverse engineering approaches is that the reconstructed triggers will appear different for Trojaned and clean models . To fully exploit the discriminative power of the reconstructed triggers for Trojan detection , we extract features based on trigger characteristics and associated network activations . These features are used to train a classifier , called the Trojan-detection network , to classify a given model as Trojaned or clean . We note the discriminative power of the extracted trigger features , and thus the Trojan-detection network , are highly dependent on the quality of the reconstructed triggers . Empirical results will show the proposed diversity loss and topological prior are crucial in reconstructing high quality triggers , and ensures a high quality Trojan-detection network . We will show that our method can learn to detect Trojaned models even when trained with a small amount of labeled DNN models . For the rest of this section , we mainly focus on the reverse engineering module . We also add details of the Trigger feature extraction to Sec . 3.3 and details of the Trojan-detection network to Sec . A.1 . 3.1 REVERSE ENGINEERING OF MULTIPLE DIVERSE TRIGGER CANDIDATES Our method is built on the existing reverse engineering pipeline first proposed by Neural Cleanse ( Wang et al. , 2019 ) . Given a trained DNN model , let f ( · ) be the mapping from an input clean image x ∈ R3×M×N to the output y ∈ RK with K classes , where M and N denote the height and width of the image , respectively . Denote by fk ( · ) the k-th output of f . The predicted label c∗ is given by c∗ = arg maxk fk ( x ) , 1 ≤ k ≤ K. We introduce parameters θ and m to convert x into an altered sample φ ( x , m , θ ) = ( 1−m ) x + m θ , ( 1 ) where the binary mask m ∈ { 0 , 1 } M×N and the pattern θ ∈ RM×N determine the trigger . 1 denotes an all-one matrix . The symbol “ ” denotes Hadamard product . See Fig . 4 for an illustration . We intend to find a triggered image x̂ = φ ( x , m̂ , θ̂ ) so that the model prediction ĉ = arg maxk fk ( x̂ ) is different from the prediction on the original image c∗ . We find the triggered image , x̂ , by minimizing a loss over the space of m and θ : L ( m , θ ; x , f , c∗ ) = Lflip ( . . . ) + λ1Ldiv ( . . . ) + λ2Ltopo ( . . . ) +R ( m ) , ( 2 ) where Lflip , Ldiv , and Ltopo denote the label-flipping loss , diversity loss , and topological loss , respectively . We temporarily dropped their arguments for convenience . λ1 , λ2 are the weights to balance the loss terms . R ( m ) is a regularization term penalizing the size and range of the mask ( more details will be provided in the Sec . A.1 of Appendix ) . To facilitate optimization , we relax the constraint on the mask m and allow it to be a continuousvalued function , ranging between 0 and 1 and defined over the image domain , m ∈ [ 0 , 1 ] M×N . Next , we introduce the three loss terms one-by-one . Label-flipping loss Lflip : The label-flipping loss Lflip penalizes the prediction of the model regarding the ground truth label , formally : Lflip ( m , θ ; x , f , c ∗ ) = fc∗ ( φ ( x , m , θ ) ) . ( 3 ) Minimizing Lflip means minimizing the probability that the altered image φ ( x , m , θ ) is predicted as c∗ . In other words , we are pushing the input image out of its initial decision region . Note that we do not specify which label we would like to flip the prediction to . This makes the optimization easier . Existing approaches often run optimization to flip the label to a target label and enumerate through all possible target labels ( Wang et al. , 2019 ; 2020 ) . This can be rather expensive in computation , especially with large label space . The downside of not specifying a target label during optimization is we will potentially miss the correct target label , i.e. , the label which the Trojaned model predicts on a triggered image . To this end , we propose to reconstruct multiple candidate triggers with diversity constraints . This will increase the chance of hitting the correct target label . See Fig . 2 for an illustration . Diversity loss Ldiv : With the label-flipping loss Lflip , we flip the label to a different one from the original clean label and recover the corresponding triggers . The new label , however , may not be the same as the true target label . Also considering the huge trigger search space , it is difficult to recover the triggers with only one attempt . Instead , we propose to search for multiple trigger candidates to increase the chance of capturing the true trigger . We run our algorithm for NT rounds , each time reconstructing a different trigger candidate . To avoid finding similar trigger candidates , we introduce the diversity loss Ldiv to encourage different trigger patterns and locations . Let mj and θj denote the trigger mask and pattern found in the j-th round . At the i-th round , we compare the current candidates with triggers from all previous founds in terms of L2 norm . Formally : Ldiv ( m , θ ) = − ∑i−1 j=1 ||m θ −mj θj ||2 . ( 4 ) Minimizing Ldiv ensures the eventual trigger mi θi to be different from triggers from previous rounds . Fig . 1 ( d ) - ( f ) demonstrates the multiple candidates recovered with sufficient diversity . | This paper proposes a diversity loss and a topological prior to not only increase the chances of finding the appropriate triggers but also improve the quality of the found triggers. These loss terms significantly improve the efficiency in finding trojaned triggers. The experiments results show that the proposed method performs substantially better than the baselines on the Trojaned-MNIST/CIFAR10 and TrojAI datasets, respectively. | SP:36e27d926b92c4468e0d804c55da0c0d0d26fa77 |
Trigger Hunting with a Topological Prior for Trojan Detection | 1 INTRODUCTION . Deep learning has achieved superior performance in various computer vision tasks , such as image classification ( Krizhevsky et al. , 2012 ) , image segmentation ( Long et al. , 2015 ) , object detection ( Girshick et al. , 2014 ) , etc . However , the vulnerability of DNNs against backdoor attacks raises serious concerns . In this paper , we address the problem of Trojan attacks , where during training , an attacker injects polluted samples . While resembling normal samples , these polluted samples contain a specific type of perturbation ( called triggers ) . These polluted samples are assigned with target labels , which are usually different from the expected class labels . Training with this polluted dataset results in a Trojaned model . At the inference stage , a Trojaned model behaves normally given clean samples . But when the trigger is present , it makes unexpected , yet consistently incorrect predictions . One major constraint for Trojan detection is the limited access to the polluted training data . In practice , the end-users , who need to detect the Trojaned models , often only have access to the weights and architectures of the trained DNNs . State-of-the-art ( SOTA ) Trojan detection methods generally adopt a reverse engineering approach ( Guo et al. , 2019 ; Wang et al. , 2019 ; Huster & Ekwedike , 2021 ; Wang et al. , 2020 ; Chen et al. , 2019c ; Liu et al. , 2019 ) . They start with a few clean samples , using either gradient descent or careful stimuli crafting , to find a potential trigger that alters model prediction . Characteristics of the recovered triggers along with the associated network activations are used as features to determine whether a model is Trojaned or not . Trojan triggers can be of arbitrary patterns ( e.g. , shape , color , texture ) at arbitrary locations of an input image ( e.g. , Fig . 1 ) . As a result , one major challenge of the reverse engineering-based approach is the enormous search space for potential triggers . Meanwhile , just like the trigger is unknown , the target label ( i.e. , the class label to which a triggered model predicts ) is also unknown in practice . Gradient descent may flip a model ’ s prediction to the closest alternative label , which may not necessarily be the target label . This makes it even more challenging to recover the true trigger . Note that many existing methods ( Guo et al. , 2019 ; Wang et al. , 2019 ; 2020 ) require a target label . These methods achieve target label independence by enumerating through all possible labels , which can be computationally prohibitive especially when the label space is huge . We propose a novel target-label-agnostic reverse engineering method . First , to improve the quality of the recovered triggers , we need a prior that can localize the triggers , but in a flexible manner . We , therefore , propose to enforce a topological prior to the optimization process of reverse engineering , i.e. , the recovered trigger should have fewer connected components . This prior is implemented through a topological loss based on the theory of persistent homology ( Edelsbrunner & Harer , 2010 ) . It allows the recovered trigger to have arbitrary shape and size . Meanwhile , it ensures the trigger is not scattered and is reasonably localized . See Fig . 1 for an example – comparing ( d ) - ( f ) vs. ( c ) . As a second contribution , we propose to reverse engineer multiple diverse trigger candidates . Instead of running gradient decent once , we run it for multiple rounds , each time producing one trigger candidate , e.g. , Fig . 1 ( d ) - ( f ) . Furthermore , we propose a trigger diversity loss to ensure the trigger candidates to be sufficiently different from each other ( see Fig . 2 ) . Generating multiple diverse trigger candidates can increase the chance of finding the true trigger . It also mitigates the risk of unknown target labels . In the example of Fig . 2 , the first trigger candidate flips the model prediction to a label different from the target , while only the third candidate hits the true target label . Generating multiple trigger candidates , however , adds difficulties in filtering out already-subtle cues for Trojan detection . We also note reverse engineer- ing approaches often suffer from false positive triggers such as adversarial perturbations or direct modification of the crucial objects of the image1 . In practice , we systematically extract a rich set of features to describe the characteristics of the reconstructed trigger candidates based on geometry , color , and topology , as well as network activations . A Trojan-detection network is then trained to detect Trojaned models based on these features . Our main contributions are summarized as follows : • We propose a topological prior to regularize the optimization process of reverse engineering . The prior ensures the locality of the recovered triggers , while being sufficiently flexible regarding the appearance . It significantly improves the quality of the reconstructed triggers . • We propose a diversity loss to generate multiple diverse trigger candidates . This increases the chance of recovering the true trigger , especially for cases with unknown target labels . • Combining the topological prior and diversity loss , we propose a novel Trojan detection framework . On both synthetic and public TrojAI benchmarks , our method demonstrates substantial improvement in both trigger recovery and Trojan detection . 2 RELATED WORK . Trojan detection . Many Trojan detection methods have been proposed recently . Some focus on detecting poisoned inputs via anomaly detection ( Chou et al. , 2020 ; Gao et al. , 2019 ; Liu et al. , 2017 ; Ma & Liu , 2019 ) . For example , SentiNet ( Chou et al. , 2020 ) tries to identify adversarial inputs , and 1Modification of crucial objects is usually not a valid trigger strategy ; it is too obvious to end-users and is against the principle of adversaries . uses the behaviors of these adversarial inputs to detect Trojaned models . Others focus on analyzing the behaviors of the trained models ( Chen et al. , 2019a ; Guo et al. , 2019 ; Shen et al. , 2021 ; Sun et al. , 2020 ) . Specifically , Chen et al . ( 2019a ) propose the Activation Clustering ( AC ) methodology to analyze the activations of neural networks to determine if a model has been poisoned or not . While early works require all training data to detect Trojans ( Chen et al. , 2019a ; Gao et al. , 2019 ; Tran et al. , 2018 ) , recent approaches have been focusing on a more realistic setting – when one has limited access to the training data . A particular promising direction is reverse engineering approaches , which recover Trojan triggers with only a few clean samples . Neural cleanse ( NC ) ( Wang et al. , 2019 ) develops a Trojan detection method by identifying if there is a trigger that would produce misclassified results when added to an input . However , as pointed out by ( Guo et al. , 2019 ) , NC becomes futile when triggers vary in terms of size , shape , and location . Since NC , different approaches have been proposed , extending the reverse engineering idea . Using a conditional generative model , DeepInspect ( Chen et al. , 2019c ) learns the probability distribution of potential triggers from a model of interest . Kolouri et al . ( 2020 ) propose to learn universal patterns that change predictions of the model ( called Universal Litmus Patterns ( ULPs ) ) . The method is efficient as it only involves forward passes through a CNN and avoids backpropagation . ABS ( Liu et al. , 2019 ) analyzes inner neuron behaviors by measuring how extra stimulation can change the network ’ s prediction . Wang et al . ( 2020 ) propose a data-limited TrojanNet detector ( TND ) by comparing the impact of per-sample attack and universal attack . Guo et al . ( 2019 ) cast Trojan detection as a non-convex optimization problem and it is solved through optimizing an objective function . Huster & Ekwedike ( 2021 ) solve the problem by observing that , compared with clean models , adversarial perturbations transfer from image to image more readily in poisoned models . Existing methods are generally demanding on training data access , neural network architectures , types of triggers , target class , etc . This limits their deployment to real-world applications . As for reverse engineering approaches , it remains challenging , if not entirely infeasible , to recover the true triggers . We propose a novel reverse engineering approach that can recover the triggers with high quality using the novel diversity and topological prior . Our method shares the common benefit of reverse engineering methods ; it only needs a few clean input images per model . Meanwhile , our approach is agnostic of model architectures , trigger types , and target labels . Topological data analysis and persistent homology . Topological data analysis ( TDA ) is a field in which one analyzes datasets using topological tools such as persistent homology ( Edelsbrunner & Harer , 2010 ; Edelsbrunner et al. , 2000 ) . The theory has been applied to different applications ( Kulp et al. , 2015 ; Kwitt et al. , 2015 ; Wong et al. , 2016 ; Chazal et al. , 2013 ; Ni et al. , 2017 ; Adams et al. , 2017 ; Bubenik , 2015 ; Varshney & Ramamurthy , 2015 ; Hu et al. , 2019 ; 2021 ) . As the advent of deep learning , some works have tried to incorporate the topological information into deep neural networks , and the differentiable property of persistent homology ( Edelsbrunner et al. , 2000 ) make it a possible choice . The main idea is that the persistence diagram/barcodes can capture all the topological changes , and it is differentiable to the original data . Hu et al . ( 2019 ) first propose a topological loss to learn to segment images with correct topology , by matching persistence diagrams in a supervised manner . Similarly , Clough et al . ( 2020 ) propose to use the persistence barcodes to enforce a given topological prior of the target object . These methods achieve better quality results especially in structural accuracy . In other contexts , persistent-homology-based losses have been applied to different learning problems ( Hofer et al. , 2019 ; 2020 ; Carrière et al. , 2020 ; Chen et al. , 2019b ) . The aforementioned methods use topological priors in supervised learning tasks ( namely , segmentation ) . Instead , in this work , we propose to leverage the topological prior in an unsupervised setting ; we use a topological prior for the reverse engineering pipeline to reduce the search space of triggers and enforce the recovered triggers to have fewer connected components . 3 METHOD . Our reverse engineering framework is illustrated in Fig . 3 . Given a trained DNN model , either clean or Trojaned , and a few clean images , we use gradient descent to reconstruct triggers that can flip the model ’ s prediction . To increase the quality of reconstructed triggers , we introduce novel diversity loss and topological prior . They help recover multiple diverse triggers of high quality . The common hypothesis of reverse engineering approaches is that the reconstructed triggers will appear different for Trojaned and clean models . To fully exploit the discriminative power of the reconstructed triggers for Trojan detection , we extract features based on trigger characteristics and associated network activations . These features are used to train a classifier , called the Trojan-detection network , to classify a given model as Trojaned or clean . We note the discriminative power of the extracted trigger features , and thus the Trojan-detection network , are highly dependent on the quality of the reconstructed triggers . Empirical results will show the proposed diversity loss and topological prior are crucial in reconstructing high quality triggers , and ensures a high quality Trojan-detection network . We will show that our method can learn to detect Trojaned models even when trained with a small amount of labeled DNN models . For the rest of this section , we mainly focus on the reverse engineering module . We also add details of the Trigger feature extraction to Sec . 3.3 and details of the Trojan-detection network to Sec . A.1 . 3.1 REVERSE ENGINEERING OF MULTIPLE DIVERSE TRIGGER CANDIDATES Our method is built on the existing reverse engineering pipeline first proposed by Neural Cleanse ( Wang et al. , 2019 ) . Given a trained DNN model , let f ( · ) be the mapping from an input clean image x ∈ R3×M×N to the output y ∈ RK with K classes , where M and N denote the height and width of the image , respectively . Denote by fk ( · ) the k-th output of f . The predicted label c∗ is given by c∗ = arg maxk fk ( x ) , 1 ≤ k ≤ K. We introduce parameters θ and m to convert x into an altered sample φ ( x , m , θ ) = ( 1−m ) x + m θ , ( 1 ) where the binary mask m ∈ { 0 , 1 } M×N and the pattern θ ∈ RM×N determine the trigger . 1 denotes an all-one matrix . The symbol “ ” denotes Hadamard product . See Fig . 4 for an illustration . We intend to find a triggered image x̂ = φ ( x , m̂ , θ̂ ) so that the model prediction ĉ = arg maxk fk ( x̂ ) is different from the prediction on the original image c∗ . We find the triggered image , x̂ , by minimizing a loss over the space of m and θ : L ( m , θ ; x , f , c∗ ) = Lflip ( . . . ) + λ1Ldiv ( . . . ) + λ2Ltopo ( . . . ) +R ( m ) , ( 2 ) where Lflip , Ldiv , and Ltopo denote the label-flipping loss , diversity loss , and topological loss , respectively . We temporarily dropped their arguments for convenience . λ1 , λ2 are the weights to balance the loss terms . R ( m ) is a regularization term penalizing the size and range of the mask ( more details will be provided in the Sec . A.1 of Appendix ) . To facilitate optimization , we relax the constraint on the mask m and allow it to be a continuousvalued function , ranging between 0 and 1 and defined over the image domain , m ∈ [ 0 , 1 ] M×N . Next , we introduce the three loss terms one-by-one . Label-flipping loss Lflip : The label-flipping loss Lflip penalizes the prediction of the model regarding the ground truth label , formally : Lflip ( m , θ ; x , f , c ∗ ) = fc∗ ( φ ( x , m , θ ) ) . ( 3 ) Minimizing Lflip means minimizing the probability that the altered image φ ( x , m , θ ) is predicted as c∗ . In other words , we are pushing the input image out of its initial decision region . Note that we do not specify which label we would like to flip the prediction to . This makes the optimization easier . Existing approaches often run optimization to flip the label to a target label and enumerate through all possible target labels ( Wang et al. , 2019 ; 2020 ) . This can be rather expensive in computation , especially with large label space . The downside of not specifying a target label during optimization is we will potentially miss the correct target label , i.e. , the label which the Trojaned model predicts on a triggered image . To this end , we propose to reconstruct multiple candidate triggers with diversity constraints . This will increase the chance of hitting the correct target label . See Fig . 2 for an illustration . Diversity loss Ldiv : With the label-flipping loss Lflip , we flip the label to a different one from the original clean label and recover the corresponding triggers . The new label , however , may not be the same as the true target label . Also considering the huge trigger search space , it is difficult to recover the triggers with only one attempt . Instead , we propose to search for multiple trigger candidates to increase the chance of capturing the true trigger . We run our algorithm for NT rounds , each time reconstructing a different trigger candidate . To avoid finding similar trigger candidates , we introduce the diversity loss Ldiv to encourage different trigger patterns and locations . Let mj and θj denote the trigger mask and pattern found in the j-th round . At the i-th round , we compare the current candidates with triggers from all previous founds in terms of L2 norm . Formally : Ldiv ( m , θ ) = − ∑i−1 j=1 ||m θ −mj θj ||2 . ( 4 ) Minimizing Ldiv ensures the eventual trigger mi θi to be different from triggers from previous rounds . Fig . 1 ( d ) - ( f ) demonstrates the multiple candidates recovered with sufficient diversity . | This paper proposes a trojan detection method using reverse engineering techniques. It improves existing approaches by incorporating a trigger diversity loss and a topological loss during trigger generation. The diversity loss aims to generate a set of triggers with different patterns and locations. The topological loss is to make triggers more connected with fewer perturbations spread out on the input. The paper builds a neural network to detect trojaned models by using the features of generated triggers such as the number of trigger pixels, the mean and standard deviation of triggers in horizontal and vertical directions, etc. This paper evaluates the proposed approach on two synthetic datasets and TrojAI benchmarks. | SP:36e27d926b92c4468e0d804c55da0c0d0d26fa77 |
Subpixel object segmentation using wavelets and multiresolution analysis | 1 INTRODUCTION . Semantic image segmentation is a core component of many medical imaging related tasks . Both as part of a pipeline to find a region of interest , or a task by itself , e.g. , for measuring tumor volume . Nowadays , almost all segmentation algorithms in medical imaging are replaced by U-Net-like architectures Ronneberger et al . ( 2015 ) combining an encoder and decoder . Typically , the decoder is an upsampling path , and additional skip connections between the encoding and decoding part are added to recover the image ’ s spatial information . While many variants or more exotics methods , such as multi-scale and pyramid based approaches , recurrent networks or generative techniques , can be designed , all of these still yield per-pixel classifications . In these settings an image is interpreted as a discrete collection of ordered pixels ( or voxels in the three-dimensional case ) , where the task is to assign an appropriate class to each pixel using a probabilistic model . Typically , the pixels are assumed to be independent so that the joint-likelihood is tractable . In practice , e.g. , in medical imaging , the boundary of a region is annotated and not the region itself . Hence the raw ground-truth data is a discretization of a closed curve . The main motivation of our paper is to construct a deep learning model which ( i ) may directly use such raw groundtruth data if available ( ii ) is guaranteed to predict smooth planar curves ( iii ) improves inference speed by predicting 1d objects ( curves ) instead of 2d objects . We argue that in traditional pipelines , where pixel-based predictions are constructed , smooth boundaries are not faithfully represented . In particular , no prior information about the geometry of planar curves is incorporated . In this paper , we present a hybrid analog of the U-Net , where the down-sampling path is a two-dimensional encoder with learnable filters , and the upsampling path is an one-dimensional decoder , which predicts ( smooth ) representations of curves . A fundamental component in the setup of our framework is the decision on how to represent ( closed ) curves . While the Fourier basis is a natural candidate at first glance , its global nature may hamper accurate predictions of curves which exhibit highly localized behavior , requiring accurate estimates of small noisy high-frequency modes . For this reason , we have chosen to represent contours using wavelets and Multi Resolution Analysis ( MRA ) instead . The main idea is to choose a single map ϕ , the so-called scaling function or father wavelet , and to construct subspaces of functions associated to prescribed resolution levels by taking the span of appropriate dilations and translations of ϕ . This Under review as a conference paper at ICLR 2022 setup provides an efficient way to decompose and reconstruct contours , from low to high resolution level , using the classical Pyramid Algorithm Mallat ( 2008 ) as a decoder . The filters in the decoder are not learned but uniquely determined by the chosen wavelet basis . Any wavelet basis induced by a MRA can be used . This flexibility allows for incorporation of priors on the smoothness of curves . Related work Previous work by Chen et al . ( 2019 ) ; Marcos et al . ( 2018 ) ; Hatamizadeh et al . ( 2020 ) also proposed models to predict contours by combining Active Contour Models ( ACM ) with a CNN into an end-to-end model . In these papers the representation of curves is ultimately still based on pixel-based computations . For instance , in Hatamizadeh et al . ( 2020 ) curves are modelled as level sets of distance maps defined on a discretization of the domain of the image . In Chen et al . ( 2019 ) a similar approach is followed , but a smoothed approximation of an indicator function is used instead of a distance map . The work in Marcos et al . ( 2018 ) is perhaps most closely related to ours ; they directly construct polygonal approximations of curves and represent them using ( pixel ) coordinates of the nodes . The objectives minimized in the cited papers are based on a careful consideration of mean pixel intensities and geometric properties such as area and arc length . These properties are implicitly encoded in an objective function ( energy-functional ) defined on a space of distance maps Hatamizadeh et al . ( 2020 ) , suitable approximations of indicator functions Chen et al . ( 2019 ) , or family of polygons Marcos et al . ( 2018 ) . However , in contrast to our approach , the above methods all provide pixel-based output . To the best of our knowledge , our work is the first to use MRA and wavelet analysis to construct pixel-independent representations of ( closed ) curves . This paper is organized as follows . In Section 2 we review the mathematical background needed to construct our model . We explain how contours can be decomposed and reconstructed on different resolution levels . The reconstruction algorithm , the Pyramid Algorithm , forms a core component of our network architecture . In Section 3 we set up the model architecture and loss . Subsequently the datasets , training method and performance measures are described in Section 4 . We end the paper with results and a discussion in Section 5 . Further mathematical details are provided in the appendix . 2 BACKGROUND AND MATHEMATICAL SETUP . In this section we describe our mathematical setup and review the theory needed to construct our model . We consider two dimensional gray-valued images x ∈ X : = [ 0 , 1 ] n×n , e.g. , slices of MRI scans of size n × n , where n ∈ N. We assume that each image contains a ( uniquely identifiable ) simply connected region R ( x ) ⊂ R2 , e.g. , an organ , with boundary ∂R ( x ) . It is assumed that ∂R ( x ) can be parameterized by a simple closed continuous curve γ ( x ) . We will develop a deep learning framework for computing such parameterizations γ ( x ) using Multi Resolution Analysis ( MRA ) . Since wavelets play a seminal role in our set up , we first review the necessary theory in Sections 2.1 and 2.2 as a subject in its own right in the context of general scalar-valued signals γ . In the remainder of the paper , we return to the context in which γ = γ ( x ) is interpreted as a periodic ( planar ) curve parameterizing the boundary of a region . 2.1 MULTI RESOLUTION ANALYSIS . In this section we briefly review wavelet theory using the framework of a multi resolution analysis ( MRA ) . We closely follow the exposition in Pereyra & Ward ( 2012 ) and Montefusco & Puccio ( 2014 ) . Throughout this section we denote the space of square integrable functions on R , equipped with standard inner product , by L2 ( R ) . The uncertainty principle in Fourier analysis dictates that a signal γ ∈ L2 ( R ) can not be simultaneously localized in the time and frequency domain , see Pereyra & Ward ( 2012 ) . Multi resolution analysis aims to address this shortcoming by decomposing a signal on different discrete resolution levels . The idea is to construct subspaces Vj ⊂ L2 ( R ) , associated to various resolution levels j ∈ Z , spanned by integer shifts of a localized mapping ϕj . The level of localization associated to Vj is determined by taking an appropriate dilation of a prescribed map ϕ ; the so-called scaling function . In the MRA framework the dilation factors are chosen to be powers of two . Formally , we require that ( ϕjk ) k∈Z is an orthonormal basis for Vj , where ϕjk ( t ) : = 2 j 2φ ( 2jt − k ) , see Figures 1a and Under review as a conference paper at ICLR 2022 < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' M7UKKJnEQHA3s72OH/aYHjHJUx0= '' > AAADW3icjVJNb9NAEH2JKS1pgYSKA+JiNUXiFDkRFRwrISGORSJtpX7J3m6Kib+0XlNFViT+CFf4TRx6h3/B26lb9UMF1rI9+2bezLzRREUSlzYIfrba3r2F+4tLDzrLKw8fPe72nmyXeWWUHqs8yc1uFJY6iTM9trFN9G5hdJhGid6Jpm+df+eLNmWcZx/trNAHaXiSxZNYhZbQUbe3vj8xoaqn83p0WH+ez9ePuv1gEMjxbxvDxuijOVt5r/UM+zhGDoUKKTQyWNoJQpR89jBEgILYAWpihlYsfo05OuRWjNKMCIlO+T3hba9BM95dzlLYilUSvoZMHy/IyRlnaLtqvvgryezQu3LXktP1NuM/anKlRC0+Ef0X7yLyf3lOi8UEb0RDTE2FIE6darJUMhXXuX9FlWWGgpizj+k3tJUwL+bsC6cU7W62ofh/SaRD3V01sRV+N10aQTROZWKpaMhYoaZvIipdLzMiWu5uppadOn9J5Cbu/0W7Yjan2/EuJ8ctG97cqdvG9mgwfDXY+DDqb777er5vS3iONbzkTr3GJt5jC2NWOMU3fMeP9pnneR1v5Ty03Wp2dBXXjvf0Dz3lr5k= < /latexit > < latexit sha1_base64= '' eppRxrTWoo+UUU4xutZiIhSZEp4= '' > AAADXXicjVJda9RQED27abXW2m7tg0hfgltBEJZkqehjQRAfK7htoa0lub1b080XNzfKEhb8J762P8knX/VfeO40LbXFjxuSzD0zZ2bOMHGZJpUNgm+drjc3f+fuwr3F+0sPlld6qw93qqI2So9UkRZmL44qnSa5HtnEpnqvNDrK4lTvxpPXzr/7SZsqKfL3dlrqwyw6yZNxoiJL6Ki3tnEwNpFqJs/DWTP80JzOZhtHvX4wCOT4t42wNfpoz3ax2nmMAxyjgEKNDBo5LO0UESo++wgRoCR2iIaYoZWIX2OGRXJrRmlGREQn/J7wtt+iOe8uZyVsxSopX0Omj6fkFIwztF01X/y1ZHbon3I3ktP1NuU/bnNlRC0+Ev0X7zLyf3lOi8UYr0RDQk2lIE6darPUMhXXuX9NlWWGkpizj+k3tJUwL+fsC6cS7W62kfh/SKRD3V21sTV+tl0aQTQ+y8Qy0ZCzQkPfWFS6XqZEtNzdTC07df6KyE3c/4t2xWxOt+NdTY5bFt7cqdvGznAQbg5evBv2t958udi3BazjCZ5xp15iC2+xjRErTPEVZzjvfvfmvSVv+SK022l3dA2/He/RL561sAk= < /latexit > < latexit sha1_base64= '' YatA4oTJFJ72OHIzt8rR93dn110= '' > AAADgnicjVLbbtNAEJ3UBUq5pfCEeFkRIaVIRHYoaoWoFIkXHoNE2kpNidbbTbuJb1qvW0WWf4Wv4bV97x/AXzAz3SJoxWUt27Nn5szMGU1cJKZ0YXjRWgqWb92+s3J39d79Bw8ftdce75R5ZZUeqTzJ7V4sS52YTI+ccYneK6yWaZzo3Xj+nvy7J9qWJs8+uUWhD1J5lJmpUdIhNGlvjU+kLY7NpJ7Nm65bF2+3Rf9zPZ5aqepZU/ebRviQLjlmjROvxFysT9qdsBfyETeNyBsd8GeYr7WewhgOIQcFFaSgIQOHdgISSnz2IYIQCsQOoEbMomXYr6GBVeRWGKUxQiI6x+8R3vY9muGdcpbMVlglwdciU8AL5OQYZ9GmaoL9FWcm9E+5a85JvS3wH/tcKaIOjhH9F+8q8n95pMXBFLZYg0FNBSOkTvksFU+FOhe/qHKYoUCM7EP0W7QVM6/mLJhTsnaarWT/N44klO7Kx1bw3XdpGdFwyhNLWUOGFWr0TVkl9bJARPOdZuqwU/KXiFzHxV+0K8xGuon3c3K4ZdH1nbpp7PR70UbvzceNzmA4uNy3FXgGz6GLO7UJA/gAQxhhhS/wFc7gPFgOXgZR8PoydKnld/QJ/HaCdz8ANha8zg== < /latexit > < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' av/+obxeXD73VPois1h5yhqjvaw= '' > AAADe3icjVLbahRBEK3d8RLjbaNP4kvjRtiILjOLQRGEgCA+RnCTQDYuM53e2Ltzo7tHWYYB/8Kv8VW/wT/QjxA8XZmIJnjpYWaqT9WpqlNUUqbaujD80ukG585fuLhyafXylavXrvfWbuzYojJSjWWRFmYvia1Kda7GTrtU7ZVGxVmSqt1k8cz7d98qY3WRv3LLUh1k8VGuZ1rGDtC0F61PSqun9XzRDNyGePJUjF7Xk5mJZT1v6lHTePcA2Lxx4oFYbKxPe/1wGPIRZ42oNfrUnu1irXOLJnRIBUmqKCNFOTnYKcVk8exTRCGVwA6oBmZgafYramgV3ApRChEx0AW+R7jtt2iOu89pmS1RJcVrwBR0F5wCcQa2rybYX3Fmj/4pd805fW9L/JM2VwbU0Rug/+KdRP4vz2txNKPHrEFDU8mIVyfbLBVPxXcuflHlkKEE5u1D+A1sycyTOQvmWNbuZxuz/ytHetTfZRtb0be2S8OIonc8sYw15KhQwzdjlb6XJRDFdz9Th0693wI5jYu/aJfI5nV73s/JYcui0zt11tgZDaOHw82Xo/7W8/fH+7ZCt+kODbBTj2iLXtA2jVHhA32kT/S5+z3oB/eC+8eh3U67ozfptxNs/gBTRLsn < /latexit > < latexit sha1_base64= '' M7UKKJnEQHA3s72OH/aYHjHJUx0= '' > AAADW3icjVJNb9NAEH2JKS1pgYSKA+JiNUXiFDkRFRwrISGORSJtpX7J3m6Kib+0XlNFViT+CFf4TRx6h3/B26lb9UMF1rI9+2bezLzRREUSlzYIfrba3r2F+4tLDzrLKw8fPe72nmyXeWWUHqs8yc1uFJY6iTM9trFN9G5hdJhGid6Jpm+df+eLNmWcZx/trNAHaXiSxZNYhZbQUbe3vj8xoaqn83p0WH+ez9ePuv1gEMjxbxvDxuijOVt5r/UM+zhGDoUKKTQyWNoJQpR89jBEgILYAWpihlYsfo05OuRWjNKMCIlO+T3hba9BM95dzlLYilUSvoZMHy/IyRlnaLtqvvgryezQu3LXktP1NuM/anKlRC0+Ef0X7yLyf3lOi8UEb0RDTE2FIE6darJUMhXXuX9FlWWGgpizj+k3tJUwL+bsC6cU7W62ofh/SaRD3V01sRV+N10aQTROZWKpaMhYoaZvIipdLzMiWu5uppadOn9J5Cbu/0W7Yjan2/EuJ8ctG97cqdvG9mgwfDXY+DDqb777er5vS3iONbzkTr3GJt5jC2NWOMU3fMeP9pnneR1v5Ty03Wp2dBXXjvf0Dz3lr5k= < /latexit > < latexit sha1_base64= '' eppRxrTWoo+UUU4xutZiIhSZEp4= '' > AAADXXicjVJda9RQED27abXW2m7tg0hfgltBEJZkqehjQRAfK7htoa0lub1b080XNzfKEhb8J762P8knX/VfeO40LbXFjxuSzD0zZ2bOMHGZJpUNgm+drjc3f+fuwr3F+0sPlld6qw93qqI2So9UkRZmL44qnSa5HtnEpnqvNDrK4lTvxpPXzr/7SZsqKfL3dlrqwyw6yZNxoiJL6Ki3tnEwNpFqJs/DWTP80JzOZhtHvX4wCOT4t42wNfpoz3ax2nmMAxyjgEKNDBo5LO0UESo++wgRoCR2iIaYoZWIX2OGRXJrRmlGREQn/J7wtt+iOe8uZyVsxSopX0Omj6fkFIwztF01X/y1ZHbon3I3ktP1NuU/bnNlRC0+Ev0X7zLyf3lOi8UYr0RDQk2lIE6darPUMhXXuX9NlWWGkpizj+k3tJUwL+fsC6cS7W62kfh/SKRD3V21sTV+tl0aQTQ+y8Qy0ZCzQkPfWFS6XqZEtNzdTC07df6KyE3c/4t2xWxOt+NdTY5bFt7cqdvGznAQbg5evBv2t958udi3BazjCZ5xp15iC2+xjRErTPEVZzjvfvfmvSVv+SK022l3dA2/He/RL561sAk= < /latexit > < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > . 1b . Altogether , this yields an increasing sequence of closed subspaces Vj ⊂ Vj+1 ⊂ L2 ( R ) dense in L2 ( R ) , where Vj+1 is the next level up in resolution after Vj . The representation of γ at resolution level j , denoted by γj : = Pjγ , is its orthogonal projection onto Vj . Here Pj denotes the orthogonal projection onto Vj . The coefficients of γj with respect to the basis for Vj , denoted by aj ( γ ) = ( ajk ( γ ) ) k∈Z , are called the approximation coefficients . The associated subspaces Vj are referred to as the approximation subspaces ( see Figure 1b ) . To study the information that is lost when a signal in Vj+1 is projected onto Vj , we consider the operator Qj : = Pj+1 − Pj . The range of Qj , denoted by Wj , is referred to as the detail subspace at level j ; it is the orthogonal complement of Vj in Vj+1 . The detail subspaces ( Wj ) j∈Z are mutually disjoint and orthogonal by construction . A fundamental result , known as Mallat ’ s Theorem , states that the subspaces Wj can too be spanned by dilating and shifting a single map . More precisely , there exists a map ψ ∈ W0 , the so-called mother wavelet , such that ( ψjk ) k∈Z is an orthonormal basis for Wj , see Pereyra & Ward ( 2012 ) . The coefficients of Qjγ with respect to this basis , denoted by dj ( γ ) : = ( djk ( γ ) ) k∈Z , are referred to as the detail coefficients of γ at resolution level j . The detail coefficients store the information needed to go back one level up in resolution , since Pj+1 = Pj+Qj by construction . We often write aj ( γ ) = aj and dj ( γ ) = dj for brevity . In practice , we only approximate a finite number of approximation and detail coefficients , see Section 2.3 . 2.2 THE DISCRETE WAVELET TRANSFORM . In this section we describe how to compute the approximation and detail coefficients given a prescribed scaling function ϕ . Many fundamental aspects of MRA ’ s , both theoretical and computational , can be traced back to the following key observation . Since V0 ⊂ V1 , there must exist coefficients h = ( hk ) k∈Z such that ϕ = ∑ k∈Z hkϕ1k . This equation is referred to as the scaling equation ; one of the fundamental properties of a scaling function . The sequence h , the so-called lowpass filter , completely characterizes the scaling function . Similarly , since ψ ∈W0 ⊂ V1 , there exist coefficients g = ( gk ) k∈Z , the so-called high-pass filter associated to h , such that ψ = ∑ k∈Z gkϕ1k . For Mallat ’ s mother wavelet , we have gk = ( −1 ) k−1h1−k . Altogether , in order to define a MRA , one only needs to specify an appropriate low-pass filter h. The scaling equations can be used to derive an efficient scheme for computing lower order approximation coefficients ( of any order ) given an initial approximation aj+1 . Conversely , the orthogonal decomposition Vj+1 = Vj ⊕Wj can be used to reconstruct aj+1 given the approximation and detail coefficients aj and dj , respectively , at resolution level j . The computations are summarized in Figure 2 . The reconstruction and decomposition formulae together form the well-known Pyramid Algorithm Mallat ( 2008 ) . In practice , our signals are periodic and do not directly fit into the MRA framework , since non-zero periodic signals are not elements in L2 ( R ) . We will address this issue in the next section by using an appropriate cut-off . Here we only remark that the periodicity needs to be carefully taken into account in the decomposition and reconstruction formulae , see Appendix A.2 . Under review as a conference paper at ICLR 2022 < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' 74NFWraCYxco2ZXS7qRG4aX/NXo= '' > AAADTnicjVLLahRRED3TUTPGV6IrcdM4CK6GHomYZUAILiM4k0ASpPvmTtKmX9x7WxkGwU/IVr8q2/yB/oA70VOVjmiCj9t0d91TdarqFJU1Re5Dkpz2ooUrV68t9q8v3bh56/ad5ZW7E1+3ztixqYvabWept0Ve2XHIQ2G3G2fTMivsVnb0XPxbb63zeV29CrPG7pXpQZVPc5MGQpPd1If48PXyIBkmeuLLxqgzBujOZr3Su49d7KOGQYsSFhUC7QIpPJ8djJCgIbaHOTFHK1e/xXsskdsyyjIiJXrE7wFvOx1a8S45vbINqxR8HZkxHpFTM87Rlmqx+lvNLOifcs81p/Q24z/rcpVEAw6J/ot3Hvm/PNESMMWaasipqVFE1JkuS6tTkc7jX1QFZmiIib1Pv6NtlHk+51g5XrXLbFP1f9ZIQeVuutgWX7ounSIW73RipWqoWGFO31RVSi8zIlbvMtPATsXviVzE479oN8wmuoX3c3LcstHFnbpsTJ4MR6vDpy9XB+sbH872rY8HeIjH3KlnWMcLbGLMCm9wjI/4FJ1EX6Nv0fez0KjX7eg9/HYW+j8Ag1etmA== < /latexit > < latexit sha1_base64= '' Af/VrWyTW8iyG2S0QG2btLLR+E0= '' > AAADTnicjVLLahRRED3T8THGV6IrcdM4CK6GHknQZUAQlxGcSSAJ0n1zZ2zTL+69rQyD4Ce41a9y6x/oD7iT5FSlIyYh6m26u+6pOlV1isqaIvchSb71oqVLl69c7V9bvn7j5q3bK6t3Jr5unbFjUxe1285Sb4u8suOQh8JuN86mZVbYrezgmfi33lnn87p6FeaN3SvTWZVPc5MGQpPd1Id49nplkAwTPfF5Y9QZA3Rns17t3cMu9lHDoEUJiwqBdoEUns8ORkjQENvDgpijlavf4gOWyW0ZZRmREj3gd8bbTodWvEtOr2zDKgVfR2aMh+TUjHO0pVqs/lYzC3pR7oXmlN7m/GddrpJowBui/+KdRP4vT7QETPFUNeTU1Cgi6kyXpdWpSOfxH6oCMzTExN6n39E2yjyZc6wcr9pltqn6v2ukoHI3XWyLH12XThGL9zqxUjVUrLCgb6oqpZc5Eat3mWlgp+L3RM7i8V+0G2YT3cL7PTlu2ejsTp03Jo+Ho7Xh+su1wcbzj8f71sd9PMAj7tQTbOAFNjFmhbf4hM/4En2Nfka/osPj0KjX7ehdnDpL/SOAcq2X < /latexit > < latexit sha1_base64= '' DwoAImpK55725K3I8BkhsJ+Jx40= '' > AAADSXicjVJNaxRBEH07a8wajWb1JF6GLIIQWGZDRI8BQXJMwE0CMchMpzcZMl/09BiWRfDuVX+VvyD/QI/exJOvKhPRhCT2MDNVr+pV1ysqqbK09lF02gm6t+Zuz/fuLNy9t3j/wVL/4XZdNs7YsSmz0u0mcW2ztLBjn/rM7lbOxnmS2Z3k+JXEd95bV6dl8cZPK7ufx4dFOklN7AltrbxbGkTDSE942Ri1xgDt2Sz7ncd4iwOUMGiQw6KAp50hRs1nDyNEqIjtY0bM0Uo1bvEBC+Q2zLLMiIke83tIb69FC/pSs1a24S0ZX0dmiKfklMxztOW2UOONVhb0qtozrSm9TflP2lo5UY8jojfxzjP/lydaPCZ4qRpSaqoUEXWmrdLoVKTz8C9VnhUqYmIfMO5oG2WezzlUTq3aZbaxxr9ppqDimza3wfe2S6eIxYlOLFcNBW+YMTZRldLLlIhVX2bq2anEayIX8fAa7YbVRLfw/kyOWza6uFOXje3V4Wht+HxrbbD++uPZvvXwBMt4xp16gXVsYBNj1fcJn/El+Br8CH4Gv85Sg067o4/wz+l2fwPw66tl < /latexit > < latexit sha1_base64= '' +f3+H5d1VSXBWTnXjS3e7/surv0= '' > AAADT3icjVLbahRBED076yWJt0SfxJfBRRCEZUYi+hgQxMcIbjYQQ5jp9MYxc6OnR1mWgL/gq36Vj/6B+YK8iafKjmiCl1529/SpOtV1isrbsuh8knwZRMMLFy9dXlpeuXL12vUbq2s3t7qmd8ZOTFM2bjvPOlsWtZ34wpd2u3U2q/LSTvPDpxKfvrWuK5r6pZ+3drfKDupiVpjMk5pme4s3D9KjvdVRMk70xOdBGsAI4Ww2a4PbeIV9NDDoUcGihicukaHjZwcpErTkdrEg54gKjVscYYXanlmWGRnZQ/4e8LYT2Jp3qdmp2vCVkl9HZYx71DTMc8TyWqzxXisL+6faC60pvc35n4daFVmP12T/pTvN/F+dePGY4Yl6KOipVUbcmVCl16lI5/EvrjwrtOQE7zPuiI0qT+ccq6ZT7zLbTONfNVNYuZuQ2+M4dOmUsXinE6vUQ80XFozN1KX0Midj9S4z9exU4h2Zs3z8F++G1cS36H5OjluWnt2p82Dr4ThdHz96sT7aePb+x74t4Q7u4j536jE28BybmOhrH/ARn6LP0Un0bRhWMxoEcAu/neHyd3hSrPU= < /latexit > < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' Z/Xj3rH/fFWBwjJhd6cUdR/2itw= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMwGJT4GBPExgpsEsiHM9PauTeZGd09kWYT8R171o8Qf0L/wdGUimuClh5mpOlWnuk5RWZ0b55PkS6cb3bh563bvTv/uvfsP1gbrD/dc1VilJ6rKK3uQpU7nptQTb3yuD2qr0yLL9X528irE90+1daYq3/llrY+KdFGauVGpJ3Q8WNucps7HU2/ymY4Xm8eDYTJK5MTXjXFrDNGe3Wq98whTzFBBoUEBjRKedo4Ujs8hxkhQEzvCipilZSSu8RF9chtmaWakRE/4XdA7bNGSfqjphK14S87XkhnjKTkV8yztcFss8UYqB/RPtVdSM/S25D9raxVEPd4T/RfvMvN/eUGLxxwvRYOhplqQoE61VRqZSug8/kWVZ4WaWLBnjFvaSpiXc46F40R7mG0q8W+SGdDgqza3wfe2SyuIxgeZWCEaSt6wYmwuKkMvSyJa/DBTz05D3BG5isd/0a5YLegOvJ+T45aNr+7UdWNvazR+Pnrxdmu48/rsYt96eIwneMad2sYO3mAXE9m7c3zC5+7XqBP1ov5FarfT7ugGfjvRxg9m4a35 < /latexit > < latexit sha1_base64= '' fYF6uGBHohxufzgVqN0lSMqhxww= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMyGiD4GAuJjBDcJZEOY6e1NmsyN7h5lWQT/I6/6UeIPmL/I6cpENMFLDzNTdapOdZ2isjo3zifJt043unX7zt3evf79Bw8frQxWH++6qrFKT1SVV3Y/S53OTakn3vhc79dWp0WW673sdDvE9z5o60xVvveLWh8W6XFp5kalntDRYGV9mjofT73JZzo+WT8aDJNRIie+aYxbY4j27FSrnSeYYoYKCg0KaJTwtHOkcHwOMEaCmtghlsQsLSNxjU/ok9swSzMjJXrK7zG9gxYt6YeaTtiKt+R8LZkxnpNTMc/SDrfFEm+kckD/VHspNUNvC/6ztlZB1OOE6L94V5n/ywtaPOZ4LRoMNdWCBHWqrdLIVELn8S+qPCvUxII9Y9zSVsK8mnMsHCfaw2xTif+QzIAGX7W5Dc7bLq0gGh9lYoVoKHnDkrG5qAy9LIho8cNMPTsNcUfkOh7/RbtitaA78H5Ojls2vr5TN43djdF4c/Ty3cZw683ny33r4Sme4QV36hW28BY7mMjeneELvna/R52oF/UvU7uddkfX8NuJ1i4Aacet+g== < /latexit > < latexit sha1_base64= '' OLePkk4dic2TAOMqELhCFUnk5Jo= '' > AAADUXicjVJda9RQED2brVpbtR8+iS/BrSAIS1IUfSwUxMcW3LZSS0lu79bYfHFzoyxLwf/Q1/qrfPIf6E/om2emqdQWP25IMvfMnJk5w6R1njU+ir71gv7MjZu3Zm/Pzd+5e29hcWl5q6laZ+zIVHnldtKksXlW2pHPfG53ameTIs3tdnq0Lv7tj9Y1WVW+8ZPa7hXJYZmNM5N4Qm9Xkv3ph6fx8cr+4iAaRnrC60bcGQN0Z6Na6j3AOxyggkGLAhYlPO0cCRo+u4gRoSa2hykxRytTv8Ux5shtGWUZkRA94veQt90OLXmXnI2yDavkfB2ZIR6TUzHO0ZZqofpbzSzon3JPNaf0NuE/7XIVRD3eE/0X7yLyf3mixWOMl6oho6ZaEVFnuiytTkU6Dy+p8sxQExP7gH5H2yjzYs6hchrVLrNN1P9dIwWVu+liW/zounSKWHzSiRWqoWSFKX1jVSm9TIhYvctMPTsVf0PkKh7+RbthNtEtvF+T45bFV3fqurG1OoyfDZ9vrg7WXn0+37dZPMQjPOFOvcAaXmMDI61wglN8Cb4GZ330g/PQoNft6H38dvrzPwF1j6xQ < /latexit > < latexit sha1_base64= '' jY/6R/KBN0tZFfcJH9F5wBe4Sjc= '' > AAADVXicjVLbahRBED27G2OMlyT6JL4MLoJPy2xQ9DGgiI8R3CQQF5np9MYmc7O7J2FZBP/CV/0q8Q/0IwRPVSaiCV56mJmqU3Wq6xSVN4ULMU2/9PqDpUvLl1eurF69dv3G2vrGzZ1Qt97YiamL2u/lWbCFq+wkuljYvcbbrMwLu5sfPZH47rH1wdXVyzhv7LTMDis3cyaLhKZPranLpg5OvNfrw3SU6kkuGuPOGKI72/VG7zZe4QA1DFqUsKgQaRfIEPjsY4wUDbEpFsQ8Ladxi3dYJbdllmVGRvSI30N6+x1a0ZeaQdmGtxR8PZkJ7pFTM8/TltsSjbdaWdA/1V5oTeltzn/e1SqJRrwh+i/eWeb/8kRLxAyPVYOjpkYRUWe6Kq1ORTpPflEVWaEhJvYB4562UebZnBPlBNUus800/lUzBRXfdLktvnVdekUsTnRipWqoeMOCsZmqlF7mRKz6MtPITiUeiJzHk79oN6wmuoX3c3LcsvH5nbpo7GyOxg9GD19sDreevT/dtxXcwV3c5049whaeYxsT3vAWH/ARn/qf+98HS4Pl09R+r9vRW/jtDNZ+AKHorw8= < /latexit > < latexit sha1_base64= '' cy37RpZeyiuIh1LD6v/ICm26dtA= '' > AAADVnicjVLbThRBED27K4J4YdEn4suEjYlPm1kC0UcSE+MjGhZIAM1M04sT5pbuHshmY+Jn+KpfJX+AP2E8VQxGIV56MjNVp+pU16lUWueZD3F83un2bs3dnl+4s3j33v0HS/3lhzu+apyxY1PlldtLE2/zrLTjkIXc7tXOJkWa29305IXEd0+t81lVbodpbQ+L5LjMJplJAqG3b6ypSh9cY8R91x/Ew1hPdNMYtcYA7dmqljsrOMARKhg0KGBRItDOkcDz2ccIMWpih5gRc7QyjVt8wCK5DbMsMxKiJ/we09tv0ZK+1PTKNrwl5+vIjPCEnIp5jrbcFmm80cqC/qn2TGtKb1P+07ZWQTTgPdF/8a4y/5cnWgImeK4aMmqqFRF1pq3S6FSk8+gXVYEVamJiHzHuaBtlXs05Uo5X7TLbROMXmimo+KbNbfCt7dIpYnGmEytUQ8kbZoxNVKX0MiVi1ZeZBnYqcU/kOh79RbthNdEtvJ+T45aNru/UTWNnbThaH268Xhtsvvx4uW8LeIxVPOVOPcMmXmELY97g8Amf8aX7tfu9N9ebv0ztdtodfYTfTq//A0+7r54= < /latexit > < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' 74NFWraCYxco2ZXS7qRG4aX/NXo= '' > AAADTnicjVLLahRRED3TUTPGV6IrcdM4CK6GHomYZUAILiM4k0ASpPvmTtKmX9x7WxkGwU/IVr8q2/yB/oA70VOVjmiCj9t0d91TdarqFJU1Re5Dkpz2ooUrV68t9q8v3bh56/ad5ZW7E1+3ztixqYvabWept0Ve2XHIQ2G3G2fTMivsVnb0XPxbb63zeV29CrPG7pXpQZVPc5MGQpPd1If48PXyIBkmeuLLxqgzBujOZr3Su49d7KOGQYsSFhUC7QIpPJ8djJCgIbaHOTFHK1e/xXsskdsyyjIiJXrE7wFvOx1a8S45vbINqxR8HZkxHpFTM87Rlmqx+lvNLOifcs81p/Q24z/rcpVEAw6J/ot3Hvm/PNESMMWaasipqVFE1JkuS6tTkc7jX1QFZmiIib1Pv6NtlHk+51g5XrXLbFP1f9ZIQeVuutgWX7ounSIW73RipWqoWGFO31RVSi8zIlbvMtPATsXviVzE479oN8wmuoX3c3LcstHFnbpsTJ4MR6vDpy9XB+sbH872rY8HeIjH3KlnWMcLbGLMCm9wjI/4FJ1EX6Nv0fez0KjX7eg9/HYW+j8Ag1etmA== < /latexit > < latexit sha1_base64= '' Af/VrWyTW8iyG2S0QG2btLLR+E0= '' > AAADTnicjVLLahRRED3T8THGV6IrcdM4CK6GHknQZUAQlxGcSSAJ0n1zZ2zTL+69rQyD4Ce41a9y6x/oD7iT5FSlIyYh6m26u+6pOlV1isqaIvchSb71oqVLl69c7V9bvn7j5q3bK6t3Jr5unbFjUxe1285Sb4u8suOQh8JuN86mZVbYrezgmfi33lnn87p6FeaN3SvTWZVPc5MGQpPd1Id49nplkAwTPfF5Y9QZA3Rns17t3cMu9lHDoEUJiwqBdoEUns8ORkjQENvDgpijlavf4gOWyW0ZZRmREj3gd8bbTodWvEtOr2zDKgVfR2aMh+TUjHO0pVqs/lYzC3pR7oXmlN7m/GddrpJowBui/+KdRP4vT7QETPFUNeTU1Cgi6kyXpdWpSOfxH6oCMzTExN6n39E2yjyZc6wcr9pltqn6v2ukoHI3XWyLH12XThGL9zqxUjVUrLCgb6oqpZc5Eat3mWlgp+L3RM7i8V+0G2YT3cL7PTlu2ejsTp03Jo+Ho7Xh+su1wcbzj8f71sd9PMAj7tQTbOAFNjFmhbf4hM/4En2Nfka/osPj0KjX7ehdnDpL/SOAcq2X < /latexit > < latexit sha1_base64= '' DwoAImpK55725K3I8BkhsJ+Jx40= '' > AAADSXicjVJNaxRBEH07a8wajWb1JF6GLIIQWGZDRI8BQXJMwE0CMchMpzcZMl/09BiWRfDuVX+VvyD/QI/exJOvKhPRhCT2MDNVr+pV1ysqqbK09lF02gm6t+Zuz/fuLNy9t3j/wVL/4XZdNs7YsSmz0u0mcW2ztLBjn/rM7lbOxnmS2Z3k+JXEd95bV6dl8cZPK7ufx4dFOklN7AltrbxbGkTDSE942Ri1xgDt2Sz7ncd4iwOUMGiQw6KAp50hRs1nDyNEqIjtY0bM0Uo1bvEBC+Q2zLLMiIke83tIb69FC/pSs1a24S0ZX0dmiKfklMxztOW2UOONVhb0qtozrSm9TflP2lo5UY8jojfxzjP/lydaPCZ4qRpSaqoUEXWmrdLoVKTz8C9VnhUqYmIfMO5oG2WezzlUTq3aZbaxxr9ppqDimza3wfe2S6eIxYlOLFcNBW+YMTZRldLLlIhVX2bq2anEayIX8fAa7YbVRLfw/kyOWza6uFOXje3V4Wht+HxrbbD++uPZvvXwBMt4xp16gXVsYBNj1fcJn/El+Br8CH4Gv85Sg067o4/wz+l2fwPw66tl < /latexit > < latexit sha1_base64= '' +f3+H5d1VSXBWTnXjS3e7/surv0= '' > AAADT3icjVLbahRBED076yWJt0SfxJfBRRCEZUYi+hgQxMcIbjYQQ5jp9MYxc6OnR1mWgL/gq36Vj/6B+YK8iafKjmiCl1529/SpOtV1isrbsuh8knwZRMMLFy9dXlpeuXL12vUbq2s3t7qmd8ZOTFM2bjvPOlsWtZ34wpd2u3U2q/LSTvPDpxKfvrWuK5r6pZ+3drfKDupiVpjMk5pme4s3D9KjvdVRMk70xOdBGsAI4Ww2a4PbeIV9NDDoUcGihicukaHjZwcpErTkdrEg54gKjVscYYXanlmWGRnZQ/4e8LYT2Jp3qdmp2vCVkl9HZYx71DTMc8TyWqzxXisL+6faC60pvc35n4daFVmP12T/pTvN/F+dePGY4Yl6KOipVUbcmVCl16lI5/EvrjwrtOQE7zPuiI0qT+ccq6ZT7zLbTONfNVNYuZuQ2+M4dOmUsXinE6vUQ80XFozN1KX0Midj9S4z9exU4h2Zs3z8F++G1cS36H5OjluWnt2p82Dr4ThdHz96sT7aePb+x74t4Q7u4j536jE28BybmOhrH/ARn6LP0Un0bRhWMxoEcAu/neHyd3hSrPU= < /latexit > < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' Z/Xj3rH/fFWBwjJhd6cUdR/2itw= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMwGJT4GBPExgpsEsiHM9PauTeZGd09kWYT8R171o8Qf0L/wdGUimuClh5mpOlWnuk5RWZ0b55PkS6cb3bh563bvTv/uvfsP1gbrD/dc1VilJ6rKK3uQpU7nptQTb3yuD2qr0yLL9X528irE90+1daYq3/llrY+KdFGauVGpJ3Q8WNucps7HU2/ymY4Xm8eDYTJK5MTXjXFrDNGe3Wq98whTzFBBoUEBjRKedo4Ujs8hxkhQEzvCipilZSSu8RF9chtmaWakRE/4XdA7bNGSfqjphK14S87XkhnjKTkV8yztcFss8UYqB/RPtVdSM/S25D9raxVEPd4T/RfvMvN/eUGLxxwvRYOhplqQoE61VRqZSug8/kWVZ4WaWLBnjFvaSpiXc46F40R7mG0q8W+SGdDgqza3wfe2SyuIxgeZWCEaSt6wYmwuKkMvSyJa/DBTz05D3BG5isd/0a5YLegOvJ+T45aNr+7UdWNvazR+Pnrxdmu48/rsYt96eIwneMad2sYO3mAXE9m7c3zC5+7XqBP1ov5FarfT7ugGfjvRxg9m4a35 < /latexit > < latexit sha1_base64= '' fYF6uGBHohxufzgVqN0lSMqhxww= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMyGiD4GAuJjBDcJZEOY6e1NmsyN7h5lWQT/I6/6UeIPmL/I6cpENMFLDzNTdapOdZ2isjo3zifJt043unX7zt3evf79Bw8frQxWH++6qrFKT1SVV3Y/S53OTakn3vhc79dWp0WW673sdDvE9z5o60xVvveLWh8W6XFp5kalntDRYGV9mjofT73JZzo+WT8aDJNRIie+aYxbY4j27FSrnSeYYoYKCg0KaJTwtHOkcHwOMEaCmtghlsQsLSNxjU/ok9swSzMjJXrK7zG9gxYt6YeaTtiKt+R8LZkxnpNTMc/SDrfFEm+kckD/VHspNUNvC/6ztlZB1OOE6L94V5n/ywtaPOZ4LRoMNdWCBHWqrdLIVELn8S+qPCvUxII9Y9zSVsK8mnMsHCfaw2xTif+QzIAGX7W5Dc7bLq0gGh9lYoVoKHnDkrG5qAy9LIho8cNMPTsNcUfkOh7/RbtitaA78H5Ojls2vr5TN43djdF4c/Ty3cZw683ny33r4Sme4QV36hW28BY7mMjeneELvna/R52oF/UvU7uddkfX8NuJ1i4Aacet+g== < /latexit > < latexit sha1_base64= '' OLePkk4dic2TAOMqELhCFUnk5Jo= '' > AAADUXicjVJda9RQED2brVpbtR8+iS/BrSAIS1IUfSwUxMcW3LZSS0lu79bYfHFzoyxLwf/Q1/qrfPIf6E/om2emqdQWP25IMvfMnJk5w6R1njU+ir71gv7MjZu3Zm/Pzd+5e29hcWl5q6laZ+zIVHnldtKksXlW2pHPfG53ameTIs3tdnq0Lv7tj9Y1WVW+8ZPa7hXJYZmNM5N4Qm9Xkv3ph6fx8cr+4iAaRnrC60bcGQN0Z6Na6j3AOxyggkGLAhYlPO0cCRo+u4gRoSa2hykxRytTv8Ux5shtGWUZkRA94veQt90OLXmXnI2yDavkfB2ZIR6TUzHO0ZZqofpbzSzon3JPNaf0NuE/7XIVRD3eE/0X7yLyf3mixWOMl6oho6ZaEVFnuiytTkU6Dy+p8sxQExP7gH5H2yjzYs6hchrVLrNN1P9dIwWVu+liW/zounSKWHzSiRWqoWSFKX1jVSm9TIhYvctMPTsVf0PkKh7+RbthNtEtvF+T45bFV3fqurG1OoyfDZ9vrg7WXn0+37dZPMQjPOFOvcAaXmMDI61wglN8Cb4GZ330g/PQoNft6H38dvrzPwF1j6xQ < /latexit > < latexit sha1_base64= '' jY/6R/KBN0tZFfcJH9F5wBe4Sjc= '' > AAADVXicjVLbahRBED27G2OMlyT6JL4MLoJPy2xQ9DGgiI8R3CQQF5np9MYmc7O7J2FZBP/CV/0q8Q/0IwRPVSaiCV56mJmqU3Wq6xSVN4ULMU2/9PqDpUvLl1eurF69dv3G2vrGzZ1Qt97YiamL2u/lWbCFq+wkuljYvcbbrMwLu5sfPZH47rH1wdXVyzhv7LTMDis3cyaLhKZPranLpg5OvNfrw3SU6kkuGuPOGKI72/VG7zZe4QA1DFqUsKgQaRfIEPjsY4wUDbEpFsQ8Ladxi3dYJbdllmVGRvSI30N6+x1a0ZeaQdmGtxR8PZkJ7pFTM8/TltsSjbdaWdA/1V5oTeltzn/e1SqJRrwh+i/eWeb/8kRLxAyPVYOjpkYRUWe6Kq1ORTpPflEVWaEhJvYB4562UebZnBPlBNUus800/lUzBRXfdLktvnVdekUsTnRipWqoeMOCsZmqlF7mRKz6MtPITiUeiJzHk79oN6wmuoX3c3LcsvH5nbpo7GyOxg9GD19sDreevT/dtxXcwV3c5049whaeYxsT3vAWH/ARn/qf+98HS4Pl09R+r9vRW/jtDNZ+AKHorw8= < /latexit > < latexit sha1_base64= '' cy37RpZeyiuIh1LD6v/ICm26dtA= '' > AAADVnicjVLbThRBED27K4J4YdEn4suEjYlPm1kC0UcSE+MjGhZIAM1M04sT5pbuHshmY+Jn+KpfJX+AP2E8VQxGIV56MjNVp+pU16lUWueZD3F83un2bs3dnl+4s3j33v0HS/3lhzu+apyxY1PlldtLE2/zrLTjkIXc7tXOJkWa29305IXEd0+t81lVbodpbQ+L5LjMJplJAqG3b6ypSh9cY8R91x/Ew1hPdNMYtcYA7dmqljsrOMARKhg0KGBRItDOkcDz2ccIMWpih5gRc7QyjVt8wCK5DbMsMxKiJ/we09tv0ZK+1PTKNrwl5+vIjPCEnIp5jrbcFmm80cqC/qn2TGtKb1P+07ZWQTTgPdF/8a4y/5cnWgImeK4aMmqqFRF1pq3S6FSk8+gXVYEVamJiHzHuaBtlXs05Uo5X7TLbROMXmimo+KbNbfCt7dIpYnGmEytUQ8kbZoxNVKX0MiVi1ZeZBnYqcU/kOh79RbthNdEtvJ+T45aNru/UTWNnbThaH268Xhtsvvx4uW8LeIxVPOVOPcMmXmELY97g8Amf8aX7tfu9N9ebv0ztdtodfYTfTq//A0+7r54= < /latexit > 2.3 WAVELET REPRESENTATION OF PERIODIC CURVES < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' ZEtWR83MugYGN4gLCH8eIsigBmI= '' > AAADSnicjVLLThRRED3ToDx8ga6Mm44TEzdOug1GlyQkhCUaB0iQmO7LHezQr9y+jZlMTPwAtvhV/AB/gFt3xg2nioYgxMftdHfdU3Wq6lQqrfOs8VF00gumpm/dnpmdm79z9979BwuLDzeaqnXGDk2VV24rTRqbZ6Ud+szndqt2NinS3G6m+yvi3zywrsmq8r0f13anSPbKbJSZxBN69yL+uNCPBpGe8KYRd0Yf3VmvFnuP8QG7qGDQooBFCU87R4KGzzZiRKiJ7WBCzNHK1G/xBfPktoyyjEiI7vO7x9t2h5a8S85G2YZVcr6OzBDPyKkY52hLtVD9rWYW9E+5J5pTehvzn3a5CqIen4j+i3cR+b880eIxwhvVkFFTrYioM12WVqcinYdXVHlmqImJvUu/o22UeTHnUDmNapfZJuo/1UhB5W662Bbfuy6dIhafdWKFaihZYULfSFVKL2MiVu8yU89Oxd8QuY6Hf9FumE10C+9yctyy+PpO3TQ2Xg7ipcGrt0v95dWv5/s2iyd4iufcqddYxhrWMWSFEQ5xhG/BcfAj+Bn8Og8Net2OPsJvZ2r6DKsLq6I= < /latexit > < latexit sha1_base64= '' YHbYKgWPU0QsGYMI+mavrfy9jQE= '' > AAADSXicjVLLShxRED3Tk4evJJqsxE2TQXA1dAdDXAoByVIho4KR0H29Yxr7xe3bkWEIZJ9t/Kp8Qf4gWWYnrnKqbCVR8rhNd1edqlO3TlFpnWeNj6KvvaB/5+69+zOzc/MLDx4+Wlx6vNtUrTN2ZKq8cvtp0tg8K+3IZz63+7WzSZHmdi89eSnxvffWNVlVvvaT2h4WyXGZjTOTeEI78dvFQTSM9IS3jbgzBujOdrXUW8YbHKGCQYsCFiU87RwJGj4HiBGhJnaIKTFHK9O4xQfMkdsyyzIjIXrC7zG9gw4t6UvNRtmGt+R8HZkhVsmpmOdoy22hxlutLOifak+1pvQ24T/tahVEPd4R/RfvKvN/eaLFY4wN1ZBRU62IqDNdlVanIp2Hv6jyrFATE/uIcUfbKPNqzqFyGtUus000/k0zBRXfdLktvnddOkUsTnVihWooecOUsbGqlF4mRKz6MlPPTiXeELmJh3/RblhNdAvvenLcsvjmTt02dp8N4/Xh8531webWx8t9m8EKnmKNO/UCm3iFbYxU3yd8xlnwJfgRnAcXl6lBr9vRJ/jt9Ps/AQJYq2s= < /latexit > < latexit sha1_base64= '' FSU4zKQNQpu1mfMog0Yb2ywJWuM= '' > AAADVnicjVJda9RQED27a22tH93qk/gS3Aq+uCSLYh8LgvhYwW0LbZXk9m4NzRc3N5YlLPgzfNVfpf9A/4R4ZpqKtvhxQ5K5Z+bMzBkmqbK09mH4pdcfXFm6urxybfX6jZu31obrt3fqsnHGTk2ZlW4viWubpYWd+tRndq9yNs6TzO4mJ8/Ev/vOujoti1d+XtnDPD4u0llqYk/o9cajg5mLTRst2sli481wFI5DPcFlI+qMEbqzXa737uIARyhh0CCHRQFPO0OMms8+IoSoiB2iJeZopeq3WGCV3IZRlhEx0RN+j3nb79CCd8lZK9uwSsbXkRngATkl4xxtqRaov9HMgv4pd6s5pbc5/0mXKyfq8Zbov3jnkf/LEy0eM2yqhpSaKkVEnemyNDoV6Tz4RZVnhoqY2Ef0O9pGmedzDpRTq3aZbaz+rxopqNxNF9vgW9elU8TiVCeWq4aCFVr6ZqpSepkTsXqXmXp2Kv6ayEU8+It2w2yiW3g/J8ctiy7u1GVjZzKOHo+fvJyMtp6/P9u3FdzDfTzkTj3FFl5gG1NWcPiAj/jU/9z/PlgaLJ+F9nvdjt7Bb2cw/AEAo658 < /latexit > < latexit sha1_base64= '' W+g+ncPrRTPoSFN1xOYakWb+NAY= '' > AAADVXicjVJda9RQED27W2utH231SXwJbgWflmRR9LEgiI8V3LbQLpLc3q2h+erNTcsSFvwXvuqvEv+B/gjBM9NUtMWPG5LMPTNnZs4wSZWltQ/DL73+YOna8vWVG6s3b92+s7a+cXenLhtn7MSUWen2kri2WVrYiU99ZvcqZ+M8yexucvxC/Lun1tVpWbzx88pO8/ioSGepiT2h6ebBzMWmjRbteLH5dn0YjkI9wVUj6owhurNdbvTu4wCHKGHQIIdFAU87Q4yazz4ihKiITdESc7RS9VsssEpuwyjLiJjoMb9HvO13aMG75KyVbVgl4+vIDPCInJJxjrZUC9TfaGZB/5S71ZzS25z/pMuVE/V4R/RfvIvI/+WJFo8ZnquGlJoqRUSd6bI0OhXpPPhFlWeGipjYh/Q72kaZF3MOlFOrdpltrP6vGimo3E0X2+Bb16VTxOJMJ5arhoIVWvpmqlJ6mROxepeZenYq/prIZTz4i3bDbKJbeD8nxy2LLu/UVWNnPIqejJ6+Hg+3Xr4/37cVPMBDPOZOPcMWXmEbE1Y4wQd8xKf+5/73wdJg+Ty03+t29B5+O4O1H1W2rkU= < /latexit > < latexit sha1_base64= '' AjTIgg7tXsNgyxVMgwyZye+1p4s= '' > AAADWXicjVLbahRBED2742VdL9mYJ8nL4EbwaZkNij4GAuJjBDcJZGPo6fSuQ+ZGd4+yLAH/I6/6UeIP6F94ujIJmuClh5mpOlWnuk5RaZ1nzifJ1043unHz1u3enf7de/cfrAxWH+66qrHaTHSVV3Y/Vc7kWWkmPvO52a+tUUWam730ZDvE9z4Y67KqfOsXtTks1LzMZplWntDRYGVjOldFod4tp8r5042jwTAZJXLi68a4NYZoz0612nmEKY5RQaNBAYMSnnYOBcfnAGMkqIkdYknM0sokbnCKPrkNswwzFNETfuf0Dlq0pB9qOmFr3pLztWTGeEJOxTxLO9wWS7yRygH9U+2l1Ay9LfhP21oFUY/3RP/Fu8j8X17Q4jHDS9GQUVMtSFCn2yqNTCV0Hv+iyrNCTSzYx4xb2lqYF3OOheNEe5itkvh3yQxo8HWb2+BH26UVxOCjTKwQDSVvWDI2E5WhlwURI36YqWenIe6IXMXjv2jXrBZ0B97l5Lhl46s7dd3Y3RyNn42ev9kcbr36dL5vPazjMZ5yp15gC6+xg4ns3Rk+40v3W9SJelH/PLXbaXd0Db+daO0nOJaumQ== < /latexit > < latexit sha1_base64= '' uTwUh36rLJXOXCXjwgS2Io5nNVU= '' > AAADZXicjVLbahRBED274yVGo7sqiuTBwSD44jKzKPpmQBAfI7hJIInLTKc3jpkbPT3KMgzoh/govuoH+OBn+AXqX3i6MhFN8NLLTlefqlNVp6i4TJPKBsGXXt87cfLU6YUzi2fPLZ2/MBheXK+K2ig9UUVamM04qnSa5HpiE5vqzdLoKItTvRHvP3T+jZfaVEmRP7XzUu9k0V6ezBIVWULTwfL2zESqCf3b/viZXC+mTdi2bTNup4OVYBTI8Y8bYWesrD64+vnTu+HbtWLYu4Zt7KKAQo0MGjks7RQRKv62ECJASWwHDTFDKxG/RotFcmtGaUZERPf53eNrq0Nzvl3OStiKVVL+DZk+bpJTMM7QdtV88deS2aF/yt1ITtfbnHfc5cqIWjwn+i/eYeT/8pwWixnui4aEmkpBnDrVZallKq5z/xdVlhlKYs7epd/QVsI8nLMvnEq0u9lG4v8mkQ51b9XF1vjedWkE0XglE8tEQ84KDX0zUel6mRPR8nYztezU+SsiR3H/L9oVszndjvdzctyy8OhOHTfWx6PwzujuE67bo9eQs4Bl3MAt7tQ9rOIx1jBhhTd4jw/42P/qLXmXvSsHof3ewY1L+O14138AyXe1pQ== < /latexit > In this section we explain how a scalar-valued periodic signal γ with period l > 0 can be approximated using a MRA . Let j1 ∈ N be a desired resolution-level . First , we re-parameterize γ to have period 1 . The reason for this is rather technical and we refer the reader to Appendix A.1 . In essence , we require the number of approximation coefficients to be a power of two and this parameterization fits nicely with this requirement . Next , to address the issue that periodic signals are not contained in L2 ( R ) , we restrict the re-parameterized curve to [ −1 , 1 ] , i.e. , set γ∗ ( t ) : = γ ( lt ) 1 [ −1,1 ] ( t ) . In general , this will introduce discontinuities at the boundary points−1 and 1 . This is , however , not an issue , since we only need information about γ∗ on a strict subset [ I0 , I1 ] ⊂ [ −1 , 1 ] of length 1 . It is shown in Lemma A.1 how ( and which ) approximation coefficients can be related to the sample values of γ . In particular , if j1 is sufficiently large , the approximation coefficients needed to ( approximately ) cover [ −1 , 1 ] are ( aj1k ( γ∗ ) ) b2 j1−βc k=−2j1 . Here β > 0 is the support of the underlying wavelet . These coefficients will be close to the ( scaled ) sample values of γ on { k2−j1 : −2j1 ≤ k ≤ b2j1 − βc } . Motivated by this observation , and the fact that we only need γ on [ − 12 , 12 ] , we use the coefficients ( aj1k ( γ ∗ ) ) 2 j1−1−1 k=−2j1−1 only , which cover [ − 12 , 1−2 1−j1 2 ] approximately , see Figure 3 . To ensure that 2j1−1 − 1 < b2j1 − βc , we require that j1 ≥ ⌈ log ( β−1 ) log ( 2 ) + 1 ⌉ . This quantity is well-defined for all bases considered in this paper , except the Haar-basis . | In this paper, the authors propose a novel deep learning framework for the fast prediction of boundaries. The boundary is modeled as smooth closed curves with wavelets and multi-resolution analysis. A U-shape model is trained to predict for coefficients of the curve. The proposed method is evaluated on medical images and achieves similar performances with up to 5x faster inference speed. The main contribution is that it is the first to use wavelet analysis to construct pixel-independent representations of curves. | SP:b891a16652f0c4d81e4ecd256aa6f67a2d5ffc39 |
Subpixel object segmentation using wavelets and multiresolution analysis | 1 INTRODUCTION . Semantic image segmentation is a core component of many medical imaging related tasks . Both as part of a pipeline to find a region of interest , or a task by itself , e.g. , for measuring tumor volume . Nowadays , almost all segmentation algorithms in medical imaging are replaced by U-Net-like architectures Ronneberger et al . ( 2015 ) combining an encoder and decoder . Typically , the decoder is an upsampling path , and additional skip connections between the encoding and decoding part are added to recover the image ’ s spatial information . While many variants or more exotics methods , such as multi-scale and pyramid based approaches , recurrent networks or generative techniques , can be designed , all of these still yield per-pixel classifications . In these settings an image is interpreted as a discrete collection of ordered pixels ( or voxels in the three-dimensional case ) , where the task is to assign an appropriate class to each pixel using a probabilistic model . Typically , the pixels are assumed to be independent so that the joint-likelihood is tractable . In practice , e.g. , in medical imaging , the boundary of a region is annotated and not the region itself . Hence the raw ground-truth data is a discretization of a closed curve . The main motivation of our paper is to construct a deep learning model which ( i ) may directly use such raw groundtruth data if available ( ii ) is guaranteed to predict smooth planar curves ( iii ) improves inference speed by predicting 1d objects ( curves ) instead of 2d objects . We argue that in traditional pipelines , where pixel-based predictions are constructed , smooth boundaries are not faithfully represented . In particular , no prior information about the geometry of planar curves is incorporated . In this paper , we present a hybrid analog of the U-Net , where the down-sampling path is a two-dimensional encoder with learnable filters , and the upsampling path is an one-dimensional decoder , which predicts ( smooth ) representations of curves . A fundamental component in the setup of our framework is the decision on how to represent ( closed ) curves . While the Fourier basis is a natural candidate at first glance , its global nature may hamper accurate predictions of curves which exhibit highly localized behavior , requiring accurate estimates of small noisy high-frequency modes . For this reason , we have chosen to represent contours using wavelets and Multi Resolution Analysis ( MRA ) instead . The main idea is to choose a single map ϕ , the so-called scaling function or father wavelet , and to construct subspaces of functions associated to prescribed resolution levels by taking the span of appropriate dilations and translations of ϕ . This Under review as a conference paper at ICLR 2022 setup provides an efficient way to decompose and reconstruct contours , from low to high resolution level , using the classical Pyramid Algorithm Mallat ( 2008 ) as a decoder . The filters in the decoder are not learned but uniquely determined by the chosen wavelet basis . Any wavelet basis induced by a MRA can be used . This flexibility allows for incorporation of priors on the smoothness of curves . Related work Previous work by Chen et al . ( 2019 ) ; Marcos et al . ( 2018 ) ; Hatamizadeh et al . ( 2020 ) also proposed models to predict contours by combining Active Contour Models ( ACM ) with a CNN into an end-to-end model . In these papers the representation of curves is ultimately still based on pixel-based computations . For instance , in Hatamizadeh et al . ( 2020 ) curves are modelled as level sets of distance maps defined on a discretization of the domain of the image . In Chen et al . ( 2019 ) a similar approach is followed , but a smoothed approximation of an indicator function is used instead of a distance map . The work in Marcos et al . ( 2018 ) is perhaps most closely related to ours ; they directly construct polygonal approximations of curves and represent them using ( pixel ) coordinates of the nodes . The objectives minimized in the cited papers are based on a careful consideration of mean pixel intensities and geometric properties such as area and arc length . These properties are implicitly encoded in an objective function ( energy-functional ) defined on a space of distance maps Hatamizadeh et al . ( 2020 ) , suitable approximations of indicator functions Chen et al . ( 2019 ) , or family of polygons Marcos et al . ( 2018 ) . However , in contrast to our approach , the above methods all provide pixel-based output . To the best of our knowledge , our work is the first to use MRA and wavelet analysis to construct pixel-independent representations of ( closed ) curves . This paper is organized as follows . In Section 2 we review the mathematical background needed to construct our model . We explain how contours can be decomposed and reconstructed on different resolution levels . The reconstruction algorithm , the Pyramid Algorithm , forms a core component of our network architecture . In Section 3 we set up the model architecture and loss . Subsequently the datasets , training method and performance measures are described in Section 4 . We end the paper with results and a discussion in Section 5 . Further mathematical details are provided in the appendix . 2 BACKGROUND AND MATHEMATICAL SETUP . In this section we describe our mathematical setup and review the theory needed to construct our model . We consider two dimensional gray-valued images x ∈ X : = [ 0 , 1 ] n×n , e.g. , slices of MRI scans of size n × n , where n ∈ N. We assume that each image contains a ( uniquely identifiable ) simply connected region R ( x ) ⊂ R2 , e.g. , an organ , with boundary ∂R ( x ) . It is assumed that ∂R ( x ) can be parameterized by a simple closed continuous curve γ ( x ) . We will develop a deep learning framework for computing such parameterizations γ ( x ) using Multi Resolution Analysis ( MRA ) . Since wavelets play a seminal role in our set up , we first review the necessary theory in Sections 2.1 and 2.2 as a subject in its own right in the context of general scalar-valued signals γ . In the remainder of the paper , we return to the context in which γ = γ ( x ) is interpreted as a periodic ( planar ) curve parameterizing the boundary of a region . 2.1 MULTI RESOLUTION ANALYSIS . In this section we briefly review wavelet theory using the framework of a multi resolution analysis ( MRA ) . We closely follow the exposition in Pereyra & Ward ( 2012 ) and Montefusco & Puccio ( 2014 ) . Throughout this section we denote the space of square integrable functions on R , equipped with standard inner product , by L2 ( R ) . The uncertainty principle in Fourier analysis dictates that a signal γ ∈ L2 ( R ) can not be simultaneously localized in the time and frequency domain , see Pereyra & Ward ( 2012 ) . Multi resolution analysis aims to address this shortcoming by decomposing a signal on different discrete resolution levels . The idea is to construct subspaces Vj ⊂ L2 ( R ) , associated to various resolution levels j ∈ Z , spanned by integer shifts of a localized mapping ϕj . The level of localization associated to Vj is determined by taking an appropriate dilation of a prescribed map ϕ ; the so-called scaling function . In the MRA framework the dilation factors are chosen to be powers of two . Formally , we require that ( ϕjk ) k∈Z is an orthonormal basis for Vj , where ϕjk ( t ) : = 2 j 2φ ( 2jt − k ) , see Figures 1a and Under review as a conference paper at ICLR 2022 < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' M7UKKJnEQHA3s72OH/aYHjHJUx0= '' > AAADW3icjVJNb9NAEH2JKS1pgYSKA+JiNUXiFDkRFRwrISGORSJtpX7J3m6Kib+0XlNFViT+CFf4TRx6h3/B26lb9UMF1rI9+2bezLzRREUSlzYIfrba3r2F+4tLDzrLKw8fPe72nmyXeWWUHqs8yc1uFJY6iTM9trFN9G5hdJhGid6Jpm+df+eLNmWcZx/trNAHaXiSxZNYhZbQUbe3vj8xoaqn83p0WH+ez9ePuv1gEMjxbxvDxuijOVt5r/UM+zhGDoUKKTQyWNoJQpR89jBEgILYAWpihlYsfo05OuRWjNKMCIlO+T3hba9BM95dzlLYilUSvoZMHy/IyRlnaLtqvvgryezQu3LXktP1NuM/anKlRC0+Ef0X7yLyf3lOi8UEb0RDTE2FIE6darJUMhXXuX9FlWWGgpizj+k3tJUwL+bsC6cU7W62ofh/SaRD3V01sRV+N10aQTROZWKpaMhYoaZvIipdLzMiWu5uppadOn9J5Cbu/0W7Yjan2/EuJ8ctG97cqdvG9mgwfDXY+DDqb777er5vS3iONbzkTr3GJt5jC2NWOMU3fMeP9pnneR1v5Ty03Wp2dBXXjvf0Dz3lr5k= < /latexit > < latexit sha1_base64= '' eppRxrTWoo+UUU4xutZiIhSZEp4= '' > AAADXXicjVJda9RQED27abXW2m7tg0hfgltBEJZkqehjQRAfK7htoa0lub1b080XNzfKEhb8J762P8knX/VfeO40LbXFjxuSzD0zZ2bOMHGZJpUNgm+drjc3f+fuwr3F+0sPlld6qw93qqI2So9UkRZmL44qnSa5HtnEpnqvNDrK4lTvxpPXzr/7SZsqKfL3dlrqwyw6yZNxoiJL6Ki3tnEwNpFqJs/DWTP80JzOZhtHvX4wCOT4t42wNfpoz3ax2nmMAxyjgEKNDBo5LO0UESo++wgRoCR2iIaYoZWIX2OGRXJrRmlGREQn/J7wtt+iOe8uZyVsxSopX0Omj6fkFIwztF01X/y1ZHbon3I3ktP1NuU/bnNlRC0+Ev0X7zLyf3lOi8UYr0RDQk2lIE6darPUMhXXuX9NlWWGkpizj+k3tJUwL+fsC6cS7W62kfh/SKRD3V21sTV+tl0aQTQ+y8Qy0ZCzQkPfWFS6XqZEtNzdTC07df6KyE3c/4t2xWxOt+NdTY5bFt7cqdvGznAQbg5evBv2t958udi3BazjCZ5xp15iC2+xjRErTPEVZzjvfvfmvSVv+SK022l3dA2/He/RL561sAk= < /latexit > < latexit sha1_base64= '' YatA4oTJFJ72OHIzt8rR93dn110= '' > AAADgnicjVLbbtNAEJ3UBUq5pfCEeFkRIaVIRHYoaoWoFIkXHoNE2kpNidbbTbuJb1qvW0WWf4Wv4bV97x/AXzAz3SJoxWUt27Nn5szMGU1cJKZ0YXjRWgqWb92+s3J39d79Bw8ftdce75R5ZZUeqTzJ7V4sS52YTI+ccYneK6yWaZzo3Xj+nvy7J9qWJs8+uUWhD1J5lJmpUdIhNGlvjU+kLY7NpJ7Nm65bF2+3Rf9zPZ5aqepZU/ebRviQLjlmjROvxFysT9qdsBfyETeNyBsd8GeYr7WewhgOIQcFFaSgIQOHdgISSnz2IYIQCsQOoEbMomXYr6GBVeRWGKUxQiI6x+8R3vY9muGdcpbMVlglwdciU8AL5OQYZ9GmaoL9FWcm9E+5a85JvS3wH/tcKaIOjhH9F+8q8n95pMXBFLZYg0FNBSOkTvksFU+FOhe/qHKYoUCM7EP0W7QVM6/mLJhTsnaarWT/N44klO7Kx1bw3XdpGdFwyhNLWUOGFWr0TVkl9bJARPOdZuqwU/KXiFzHxV+0K8xGuon3c3K4ZdH1nbpp7PR70UbvzceNzmA4uNy3FXgGz6GLO7UJA/gAQxhhhS/wFc7gPFgOXgZR8PoydKnld/QJ/HaCdz8ANha8zg== < /latexit > < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' av/+obxeXD73VPois1h5yhqjvaw= '' > AAADe3icjVLbahRBEK3d8RLjbaNP4kvjRtiILjOLQRGEgCA+RnCTQDYuM53e2Ltzo7tHWYYB/8Kv8VW/wT/QjxA8XZmIJnjpYWaqT9WpqlNUUqbaujD80ukG585fuLhyafXylavXrvfWbuzYojJSjWWRFmYvia1Kda7GTrtU7ZVGxVmSqt1k8cz7d98qY3WRv3LLUh1k8VGuZ1rGDtC0F61PSqun9XzRDNyGePJUjF7Xk5mJZT1v6lHTePcA2Lxx4oFYbKxPe/1wGPIRZ42oNfrUnu1irXOLJnRIBUmqKCNFOTnYKcVk8exTRCGVwA6oBmZgafYramgV3ApRChEx0AW+R7jtt2iOu89pmS1RJcVrwBR0F5wCcQa2rybYX3Fmj/4pd805fW9L/JM2VwbU0Rug/+KdRP4vz2txNKPHrEFDU8mIVyfbLBVPxXcuflHlkKEE5u1D+A1sycyTOQvmWNbuZxuz/ytHetTfZRtb0be2S8OIonc8sYw15KhQwzdjlb6XJRDFdz9Th0693wI5jYu/aJfI5nV73s/JYcui0zt11tgZDaOHw82Xo/7W8/fH+7ZCt+kODbBTj2iLXtA2jVHhA32kT/S5+z3oB/eC+8eh3U67ozfptxNs/gBTRLsn < /latexit > < latexit sha1_base64= '' M7UKKJnEQHA3s72OH/aYHjHJUx0= '' > AAADW3icjVJNb9NAEH2JKS1pgYSKA+JiNUXiFDkRFRwrISGORSJtpX7J3m6Kib+0XlNFViT+CFf4TRx6h3/B26lb9UMF1rI9+2bezLzRREUSlzYIfrba3r2F+4tLDzrLKw8fPe72nmyXeWWUHqs8yc1uFJY6iTM9trFN9G5hdJhGid6Jpm+df+eLNmWcZx/trNAHaXiSxZNYhZbQUbe3vj8xoaqn83p0WH+ez9ePuv1gEMjxbxvDxuijOVt5r/UM+zhGDoUKKTQyWNoJQpR89jBEgILYAWpihlYsfo05OuRWjNKMCIlO+T3hba9BM95dzlLYilUSvoZMHy/IyRlnaLtqvvgryezQu3LXktP1NuM/anKlRC0+Ef0X7yLyf3lOi8UEb0RDTE2FIE6darJUMhXXuX9FlWWGgpizj+k3tJUwL+bsC6cU7W62ofh/SaRD3V01sRV+N10aQTROZWKpaMhYoaZvIipdLzMiWu5uppadOn9J5Cbu/0W7Yjan2/EuJ8ctG97cqdvG9mgwfDXY+DDqb777er5vS3iONbzkTr3GJt5jC2NWOMU3fMeP9pnneR1v5Ty03Wp2dBXXjvf0Dz3lr5k= < /latexit > < latexit sha1_base64= '' eppRxrTWoo+UUU4xutZiIhSZEp4= '' > AAADXXicjVJda9RQED27abXW2m7tg0hfgltBEJZkqehjQRAfK7htoa0lub1b080XNzfKEhb8J762P8knX/VfeO40LbXFjxuSzD0zZ2bOMHGZJpUNgm+drjc3f+fuwr3F+0sPlld6qw93qqI2So9UkRZmL44qnSa5HtnEpnqvNDrK4lTvxpPXzr/7SZsqKfL3dlrqwyw6yZNxoiJL6Ki3tnEwNpFqJs/DWTP80JzOZhtHvX4wCOT4t42wNfpoz3ax2nmMAxyjgEKNDBo5LO0UESo++wgRoCR2iIaYoZWIX2OGRXJrRmlGREQn/J7wtt+iOe8uZyVsxSopX0Omj6fkFIwztF01X/y1ZHbon3I3ktP1NuU/bnNlRC0+Ev0X7zLyf3lOi8UYr0RDQk2lIE6darPUMhXXuX9NlWWGkpizj+k3tJUwL+fsC6cS7W62kfh/SKRD3V21sTV+tl0aQTQ+y8Qy0ZCzQkPfWFS6XqZEtNzdTC07df6KyE3c/4t2xWxOt+NdTY5bFt7cqdvGznAQbg5evBv2t958udi3BazjCZ5xp15iC2+xjRErTPEVZzjvfvfmvSVv+SK022l3dA2/He/RL561sAk= < /latexit > < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > . 1b . Altogether , this yields an increasing sequence of closed subspaces Vj ⊂ Vj+1 ⊂ L2 ( R ) dense in L2 ( R ) , where Vj+1 is the next level up in resolution after Vj . The representation of γ at resolution level j , denoted by γj : = Pjγ , is its orthogonal projection onto Vj . Here Pj denotes the orthogonal projection onto Vj . The coefficients of γj with respect to the basis for Vj , denoted by aj ( γ ) = ( ajk ( γ ) ) k∈Z , are called the approximation coefficients . The associated subspaces Vj are referred to as the approximation subspaces ( see Figure 1b ) . To study the information that is lost when a signal in Vj+1 is projected onto Vj , we consider the operator Qj : = Pj+1 − Pj . The range of Qj , denoted by Wj , is referred to as the detail subspace at level j ; it is the orthogonal complement of Vj in Vj+1 . The detail subspaces ( Wj ) j∈Z are mutually disjoint and orthogonal by construction . A fundamental result , known as Mallat ’ s Theorem , states that the subspaces Wj can too be spanned by dilating and shifting a single map . More precisely , there exists a map ψ ∈ W0 , the so-called mother wavelet , such that ( ψjk ) k∈Z is an orthonormal basis for Wj , see Pereyra & Ward ( 2012 ) . The coefficients of Qjγ with respect to this basis , denoted by dj ( γ ) : = ( djk ( γ ) ) k∈Z , are referred to as the detail coefficients of γ at resolution level j . The detail coefficients store the information needed to go back one level up in resolution , since Pj+1 = Pj+Qj by construction . We often write aj ( γ ) = aj and dj ( γ ) = dj for brevity . In practice , we only approximate a finite number of approximation and detail coefficients , see Section 2.3 . 2.2 THE DISCRETE WAVELET TRANSFORM . In this section we describe how to compute the approximation and detail coefficients given a prescribed scaling function ϕ . Many fundamental aspects of MRA ’ s , both theoretical and computational , can be traced back to the following key observation . Since V0 ⊂ V1 , there must exist coefficients h = ( hk ) k∈Z such that ϕ = ∑ k∈Z hkϕ1k . This equation is referred to as the scaling equation ; one of the fundamental properties of a scaling function . The sequence h , the so-called lowpass filter , completely characterizes the scaling function . Similarly , since ψ ∈W0 ⊂ V1 , there exist coefficients g = ( gk ) k∈Z , the so-called high-pass filter associated to h , such that ψ = ∑ k∈Z gkϕ1k . For Mallat ’ s mother wavelet , we have gk = ( −1 ) k−1h1−k . Altogether , in order to define a MRA , one only needs to specify an appropriate low-pass filter h. The scaling equations can be used to derive an efficient scheme for computing lower order approximation coefficients ( of any order ) given an initial approximation aj+1 . Conversely , the orthogonal decomposition Vj+1 = Vj ⊕Wj can be used to reconstruct aj+1 given the approximation and detail coefficients aj and dj , respectively , at resolution level j . The computations are summarized in Figure 2 . The reconstruction and decomposition formulae together form the well-known Pyramid Algorithm Mallat ( 2008 ) . In practice , our signals are periodic and do not directly fit into the MRA framework , since non-zero periodic signals are not elements in L2 ( R ) . We will address this issue in the next section by using an appropriate cut-off . Here we only remark that the periodicity needs to be carefully taken into account in the decomposition and reconstruction formulae , see Appendix A.2 . Under review as a conference paper at ICLR 2022 < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' 74NFWraCYxco2ZXS7qRG4aX/NXo= '' > AAADTnicjVLLahRRED3TUTPGV6IrcdM4CK6GHomYZUAILiM4k0ASpPvmTtKmX9x7WxkGwU/IVr8q2/yB/oA70VOVjmiCj9t0d91TdarqFJU1Re5Dkpz2ooUrV68t9q8v3bh56/ad5ZW7E1+3ztixqYvabWept0Ve2XHIQ2G3G2fTMivsVnb0XPxbb63zeV29CrPG7pXpQZVPc5MGQpPd1If48PXyIBkmeuLLxqgzBujOZr3Su49d7KOGQYsSFhUC7QIpPJ8djJCgIbaHOTFHK1e/xXsskdsyyjIiJXrE7wFvOx1a8S45vbINqxR8HZkxHpFTM87Rlmqx+lvNLOifcs81p/Q24z/rcpVEAw6J/ot3Hvm/PNESMMWaasipqVFE1JkuS6tTkc7jX1QFZmiIib1Pv6NtlHk+51g5XrXLbFP1f9ZIQeVuutgWX7ounSIW73RipWqoWGFO31RVSi8zIlbvMtPATsXviVzE479oN8wmuoX3c3LcstHFnbpsTJ4MR6vDpy9XB+sbH872rY8HeIjH3KlnWMcLbGLMCm9wjI/4FJ1EX6Nv0fez0KjX7eg9/HYW+j8Ag1etmA== < /latexit > < latexit sha1_base64= '' Af/VrWyTW8iyG2S0QG2btLLR+E0= '' > AAADTnicjVLLahRRED3T8THGV6IrcdM4CK6GHknQZUAQlxGcSSAJ0n1zZ2zTL+69rQyD4Ce41a9y6x/oD7iT5FSlIyYh6m26u+6pOlV1isqaIvchSb71oqVLl69c7V9bvn7j5q3bK6t3Jr5unbFjUxe1285Sb4u8suOQh8JuN86mZVbYrezgmfi33lnn87p6FeaN3SvTWZVPc5MGQpPd1Id49nplkAwTPfF5Y9QZA3Rns17t3cMu9lHDoEUJiwqBdoEUns8ORkjQENvDgpijlavf4gOWyW0ZZRmREj3gd8bbTodWvEtOr2zDKgVfR2aMh+TUjHO0pVqs/lYzC3pR7oXmlN7m/GddrpJowBui/+KdRP4vT7QETPFUNeTU1Cgi6kyXpdWpSOfxH6oCMzTExN6n39E2yjyZc6wcr9pltqn6v2ukoHI3XWyLH12XThGL9zqxUjVUrLCgb6oqpZc5Eat3mWlgp+L3RM7i8V+0G2YT3cL7PTlu2ejsTp03Jo+Ho7Xh+su1wcbzj8f71sd9PMAj7tQTbOAFNjFmhbf4hM/4En2Nfka/osPj0KjX7ehdnDpL/SOAcq2X < /latexit > < latexit sha1_base64= '' DwoAImpK55725K3I8BkhsJ+Jx40= '' > AAADSXicjVJNaxRBEH07a8wajWb1JF6GLIIQWGZDRI8BQXJMwE0CMchMpzcZMl/09BiWRfDuVX+VvyD/QI/exJOvKhPRhCT2MDNVr+pV1ysqqbK09lF02gm6t+Zuz/fuLNy9t3j/wVL/4XZdNs7YsSmz0u0mcW2ztLBjn/rM7lbOxnmS2Z3k+JXEd95bV6dl8cZPK7ufx4dFOklN7AltrbxbGkTDSE942Ri1xgDt2Sz7ncd4iwOUMGiQw6KAp50hRs1nDyNEqIjtY0bM0Uo1bvEBC+Q2zLLMiIke83tIb69FC/pSs1a24S0ZX0dmiKfklMxztOW2UOONVhb0qtozrSm9TflP2lo5UY8jojfxzjP/lydaPCZ4qRpSaqoUEXWmrdLoVKTz8C9VnhUqYmIfMO5oG2WezzlUTq3aZbaxxr9ppqDimza3wfe2S6eIxYlOLFcNBW+YMTZRldLLlIhVX2bq2anEayIX8fAa7YbVRLfw/kyOWza6uFOXje3V4Wht+HxrbbD++uPZvvXwBMt4xp16gXVsYBNj1fcJn/El+Br8CH4Gv85Sg067o4/wz+l2fwPw66tl < /latexit > < latexit sha1_base64= '' +f3+H5d1VSXBWTnXjS3e7/surv0= '' > AAADT3icjVLbahRBED076yWJt0SfxJfBRRCEZUYi+hgQxMcIbjYQQ5jp9MYxc6OnR1mWgL/gq36Vj/6B+YK8iafKjmiCl1529/SpOtV1isrbsuh8knwZRMMLFy9dXlpeuXL12vUbq2s3t7qmd8ZOTFM2bjvPOlsWtZ34wpd2u3U2q/LSTvPDpxKfvrWuK5r6pZ+3drfKDupiVpjMk5pme4s3D9KjvdVRMk70xOdBGsAI4Ww2a4PbeIV9NDDoUcGihicukaHjZwcpErTkdrEg54gKjVscYYXanlmWGRnZQ/4e8LYT2Jp3qdmp2vCVkl9HZYx71DTMc8TyWqzxXisL+6faC60pvc35n4daFVmP12T/pTvN/F+dePGY4Yl6KOipVUbcmVCl16lI5/EvrjwrtOQE7zPuiI0qT+ccq6ZT7zLbTONfNVNYuZuQ2+M4dOmUsXinE6vUQ80XFozN1KX0Midj9S4z9exU4h2Zs3z8F++G1cS36H5OjluWnt2p82Dr4ThdHz96sT7aePb+x74t4Q7u4j536jE28BybmOhrH/ARn6LP0Un0bRhWMxoEcAu/neHyd3hSrPU= < /latexit > < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' Z/Xj3rH/fFWBwjJhd6cUdR/2itw= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMwGJT4GBPExgpsEsiHM9PauTeZGd09kWYT8R171o8Qf0L/wdGUimuClh5mpOlWnuk5RWZ0b55PkS6cb3bh563bvTv/uvfsP1gbrD/dc1VilJ6rKK3uQpU7nptQTb3yuD2qr0yLL9X528irE90+1daYq3/llrY+KdFGauVGpJ3Q8WNucps7HU2/ymY4Xm8eDYTJK5MTXjXFrDNGe3Wq98whTzFBBoUEBjRKedo4Ujs8hxkhQEzvCipilZSSu8RF9chtmaWakRE/4XdA7bNGSfqjphK14S87XkhnjKTkV8yztcFss8UYqB/RPtVdSM/S25D9raxVEPd4T/RfvMvN/eUGLxxwvRYOhplqQoE61VRqZSug8/kWVZ4WaWLBnjFvaSpiXc46F40R7mG0q8W+SGdDgqza3wfe2SyuIxgeZWCEaSt6wYmwuKkMvSyJa/DBTz05D3BG5isd/0a5YLegOvJ+T45aNr+7UdWNvazR+Pnrxdmu48/rsYt96eIwneMad2sYO3mAXE9m7c3zC5+7XqBP1ov5FarfT7ugGfjvRxg9m4a35 < /latexit > < latexit sha1_base64= '' fYF6uGBHohxufzgVqN0lSMqhxww= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMyGiD4GAuJjBDcJZEOY6e1NmsyN7h5lWQT/I6/6UeIPmL/I6cpENMFLDzNTdapOdZ2isjo3zifJt043unX7zt3evf79Bw8frQxWH++6qrFKT1SVV3Y/S53OTakn3vhc79dWp0WW673sdDvE9z5o60xVvveLWh8W6XFp5kalntDRYGV9mjofT73JZzo+WT8aDJNRIie+aYxbY4j27FSrnSeYYoYKCg0KaJTwtHOkcHwOMEaCmtghlsQsLSNxjU/ok9swSzMjJXrK7zG9gxYt6YeaTtiKt+R8LZkxnpNTMc/SDrfFEm+kckD/VHspNUNvC/6ztlZB1OOE6L94V5n/ywtaPOZ4LRoMNdWCBHWqrdLIVELn8S+qPCvUxII9Y9zSVsK8mnMsHCfaw2xTif+QzIAGX7W5Dc7bLq0gGh9lYoVoKHnDkrG5qAy9LIho8cNMPTsNcUfkOh7/RbtitaA78H5Ojls2vr5TN43djdF4c/Ty3cZw683ny33r4Sme4QV36hW28BY7mMjeneELvna/R52oF/UvU7uddkfX8NuJ1i4Aacet+g== < /latexit > < latexit sha1_base64= '' OLePkk4dic2TAOMqELhCFUnk5Jo= '' > AAADUXicjVJda9RQED2brVpbtR8+iS/BrSAIS1IUfSwUxMcW3LZSS0lu79bYfHFzoyxLwf/Q1/qrfPIf6E/om2emqdQWP25IMvfMnJk5w6R1njU+ir71gv7MjZu3Zm/Pzd+5e29hcWl5q6laZ+zIVHnldtKksXlW2pHPfG53ameTIs3tdnq0Lv7tj9Y1WVW+8ZPa7hXJYZmNM5N4Qm9Xkv3ph6fx8cr+4iAaRnrC60bcGQN0Z6Na6j3AOxyggkGLAhYlPO0cCRo+u4gRoSa2hykxRytTv8Ux5shtGWUZkRA94veQt90OLXmXnI2yDavkfB2ZIR6TUzHO0ZZqofpbzSzon3JPNaf0NuE/7XIVRD3eE/0X7yLyf3mixWOMl6oho6ZaEVFnuiytTkU6Dy+p8sxQExP7gH5H2yjzYs6hchrVLrNN1P9dIwWVu+liW/zounSKWHzSiRWqoWSFKX1jVSm9TIhYvctMPTsVf0PkKh7+RbthNtEtvF+T45bFV3fqurG1OoyfDZ9vrg7WXn0+37dZPMQjPOFOvcAaXmMDI61wglN8Cb4GZ330g/PQoNft6H38dvrzPwF1j6xQ < /latexit > < latexit sha1_base64= '' jY/6R/KBN0tZFfcJH9F5wBe4Sjc= '' > AAADVXicjVLbahRBED27G2OMlyT6JL4MLoJPy2xQ9DGgiI8R3CQQF5np9MYmc7O7J2FZBP/CV/0q8Q/0IwRPVSaiCV56mJmqU3Wq6xSVN4ULMU2/9PqDpUvLl1eurF69dv3G2vrGzZ1Qt97YiamL2u/lWbCFq+wkuljYvcbbrMwLu5sfPZH47rH1wdXVyzhv7LTMDis3cyaLhKZPranLpg5OvNfrw3SU6kkuGuPOGKI72/VG7zZe4QA1DFqUsKgQaRfIEPjsY4wUDbEpFsQ8Ladxi3dYJbdllmVGRvSI30N6+x1a0ZeaQdmGtxR8PZkJ7pFTM8/TltsSjbdaWdA/1V5oTeltzn/e1SqJRrwh+i/eWeb/8kRLxAyPVYOjpkYRUWe6Kq1ORTpPflEVWaEhJvYB4562UebZnBPlBNUus800/lUzBRXfdLktvnVdekUsTnRipWqoeMOCsZmqlF7mRKz6MtPITiUeiJzHk79oN6wmuoX3c3LcsvH5nbpo7GyOxg9GD19sDreevT/dtxXcwV3c5049whaeYxsT3vAWH/ARn/qf+98HS4Pl09R+r9vRW/jtDNZ+AKHorw8= < /latexit > < latexit sha1_base64= '' cy37RpZeyiuIh1LD6v/ICm26dtA= '' > AAADVnicjVLbThRBED27K4J4YdEn4suEjYlPm1kC0UcSE+MjGhZIAM1M04sT5pbuHshmY+Jn+KpfJX+AP2E8VQxGIV56MjNVp+pU16lUWueZD3F83un2bs3dnl+4s3j33v0HS/3lhzu+apyxY1PlldtLE2/zrLTjkIXc7tXOJkWa29305IXEd0+t81lVbodpbQ+L5LjMJplJAqG3b6ypSh9cY8R91x/Ew1hPdNMYtcYA7dmqljsrOMARKhg0KGBRItDOkcDz2ccIMWpih5gRc7QyjVt8wCK5DbMsMxKiJ/we09tv0ZK+1PTKNrwl5+vIjPCEnIp5jrbcFmm80cqC/qn2TGtKb1P+07ZWQTTgPdF/8a4y/5cnWgImeK4aMmqqFRF1pq3S6FSk8+gXVYEVamJiHzHuaBtlXs05Uo5X7TLbROMXmimo+KbNbfCt7dIpYnGmEytUQ8kbZoxNVKX0MiVi1ZeZBnYqcU/kOh79RbthNdEtvJ+T45aNru/UTWNnbThaH268Xhtsvvx4uW8LeIxVPOVOPcMmXmELY97g8Amf8aX7tfu9N9ebv0ztdtodfYTfTq//A0+7r54= < /latexit > < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' 74NFWraCYxco2ZXS7qRG4aX/NXo= '' > AAADTnicjVLLahRRED3TUTPGV6IrcdM4CK6GHomYZUAILiM4k0ASpPvmTtKmX9x7WxkGwU/IVr8q2/yB/oA70VOVjmiCj9t0d91TdarqFJU1Re5Dkpz2ooUrV68t9q8v3bh56/ad5ZW7E1+3ztixqYvabWept0Ve2XHIQ2G3G2fTMivsVnb0XPxbb63zeV29CrPG7pXpQZVPc5MGQpPd1If48PXyIBkmeuLLxqgzBujOZr3Su49d7KOGQYsSFhUC7QIpPJ8djJCgIbaHOTFHK1e/xXsskdsyyjIiJXrE7wFvOx1a8S45vbINqxR8HZkxHpFTM87Rlmqx+lvNLOifcs81p/Q24z/rcpVEAw6J/ot3Hvm/PNESMMWaasipqVFE1JkuS6tTkc7jX1QFZmiIib1Pv6NtlHk+51g5XrXLbFP1f9ZIQeVuutgWX7ounSIW73RipWqoWGFO31RVSi8zIlbvMtPATsXviVzE479oN8wmuoX3c3LcstHFnbpsTJ4MR6vDpy9XB+sbH872rY8HeIjH3KlnWMcLbGLMCm9wjI/4FJ1EX6Nv0fez0KjX7eg9/HYW+j8Ag1etmA== < /latexit > < latexit sha1_base64= '' Af/VrWyTW8iyG2S0QG2btLLR+E0= '' > AAADTnicjVLLahRRED3T8THGV6IrcdM4CK6GHknQZUAQlxGcSSAJ0n1zZ2zTL+69rQyD4Ce41a9y6x/oD7iT5FSlIyYh6m26u+6pOlV1isqaIvchSb71oqVLl69c7V9bvn7j5q3bK6t3Jr5unbFjUxe1285Sb4u8suOQh8JuN86mZVbYrezgmfi33lnn87p6FeaN3SvTWZVPc5MGQpPd1Id49nplkAwTPfF5Y9QZA3Rns17t3cMu9lHDoEUJiwqBdoEUns8ORkjQENvDgpijlavf4gOWyW0ZZRmREj3gd8bbTodWvEtOr2zDKgVfR2aMh+TUjHO0pVqs/lYzC3pR7oXmlN7m/GddrpJowBui/+KdRP4vT7QETPFUNeTU1Cgi6kyXpdWpSOfxH6oCMzTExN6n39E2yjyZc6wcr9pltqn6v2ukoHI3XWyLH12XThGL9zqxUjVUrLCgb6oqpZc5Eat3mWlgp+L3RM7i8V+0G2YT3cL7PTlu2ejsTp03Jo+Ho7Xh+su1wcbzj8f71sd9PMAj7tQTbOAFNjFmhbf4hM/4En2Nfka/osPj0KjX7ehdnDpL/SOAcq2X < /latexit > < latexit sha1_base64= '' DwoAImpK55725K3I8BkhsJ+Jx40= '' > AAADSXicjVJNaxRBEH07a8wajWb1JF6GLIIQWGZDRI8BQXJMwE0CMchMpzcZMl/09BiWRfDuVX+VvyD/QI/exJOvKhPRhCT2MDNVr+pV1ysqqbK09lF02gm6t+Zuz/fuLNy9t3j/wVL/4XZdNs7YsSmz0u0mcW2ztLBjn/rM7lbOxnmS2Z3k+JXEd95bV6dl8cZPK7ufx4dFOklN7AltrbxbGkTDSE942Ri1xgDt2Sz7ncd4iwOUMGiQw6KAp50hRs1nDyNEqIjtY0bM0Uo1bvEBC+Q2zLLMiIke83tIb69FC/pSs1a24S0ZX0dmiKfklMxztOW2UOONVhb0qtozrSm9TflP2lo5UY8jojfxzjP/lydaPCZ4qRpSaqoUEXWmrdLoVKTz8C9VnhUqYmIfMO5oG2WezzlUTq3aZbaxxr9ppqDimza3wfe2S6eIxYlOLFcNBW+YMTZRldLLlIhVX2bq2anEayIX8fAa7YbVRLfw/kyOWza6uFOXje3V4Wht+HxrbbD++uPZvvXwBMt4xp16gXVsYBNj1fcJn/El+Br8CH4Gv85Sg067o4/wz+l2fwPw66tl < /latexit > < latexit sha1_base64= '' +f3+H5d1VSXBWTnXjS3e7/surv0= '' > AAADT3icjVLbahRBED076yWJt0SfxJfBRRCEZUYi+hgQxMcIbjYQQ5jp9MYxc6OnR1mWgL/gq36Vj/6B+YK8iafKjmiCl1529/SpOtV1isrbsuh8knwZRMMLFy9dXlpeuXL12vUbq2s3t7qmd8ZOTFM2bjvPOlsWtZ34wpd2u3U2q/LSTvPDpxKfvrWuK5r6pZ+3drfKDupiVpjMk5pme4s3D9KjvdVRMk70xOdBGsAI4Ww2a4PbeIV9NDDoUcGihicukaHjZwcpErTkdrEg54gKjVscYYXanlmWGRnZQ/4e8LYT2Jp3qdmp2vCVkl9HZYx71DTMc8TyWqzxXisL+6faC60pvc35n4daFVmP12T/pTvN/F+dePGY4Yl6KOipVUbcmVCl16lI5/EvrjwrtOQE7zPuiI0qT+ccq6ZT7zLbTONfNVNYuZuQ2+M4dOmUsXinE6vUQ80XFozN1KX0Midj9S4z9exU4h2Zs3z8F++G1cS36H5OjluWnt2p82Dr4ThdHz96sT7aePb+x74t4Q7u4j536jE28BybmOhrH/ARn6LP0Un0bRhWMxoEcAu/neHyd3hSrPU= < /latexit > < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' Z/Xj3rH/fFWBwjJhd6cUdR/2itw= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMwGJT4GBPExgpsEsiHM9PauTeZGd09kWYT8R171o8Qf0L/wdGUimuClh5mpOlWnuk5RWZ0b55PkS6cb3bh563bvTv/uvfsP1gbrD/dc1VilJ6rKK3uQpU7nptQTb3yuD2qr0yLL9X528irE90+1daYq3/llrY+KdFGauVGpJ3Q8WNucps7HU2/ymY4Xm8eDYTJK5MTXjXFrDNGe3Wq98whTzFBBoUEBjRKedo4Ujs8hxkhQEzvCipilZSSu8RF9chtmaWakRE/4XdA7bNGSfqjphK14S87XkhnjKTkV8yztcFss8UYqB/RPtVdSM/S25D9raxVEPd4T/RfvMvN/eUGLxxwvRYOhplqQoE61VRqZSug8/kWVZ4WaWLBnjFvaSpiXc46F40R7mG0q8W+SGdDgqza3wfe2SyuIxgeZWCEaSt6wYmwuKkMvSyJa/DBTz05D3BG5isd/0a5YLegOvJ+T45aNr+7UdWNvazR+Pnrxdmu48/rsYt96eIwneMad2sYO3mAXE9m7c3zC5+7XqBP1ov5FarfT7ugGfjvRxg9m4a35 < /latexit > < latexit sha1_base64= '' fYF6uGBHohxufzgVqN0lSMqhxww= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMyGiD4GAuJjBDcJZEOY6e1NmsyN7h5lWQT/I6/6UeIPmL/I6cpENMFLDzNTdapOdZ2isjo3zifJt043unX7zt3evf79Bw8frQxWH++6qrFKT1SVV3Y/S53OTakn3vhc79dWp0WW673sdDvE9z5o60xVvveLWh8W6XFp5kalntDRYGV9mjofT73JZzo+WT8aDJNRIie+aYxbY4j27FSrnSeYYoYKCg0KaJTwtHOkcHwOMEaCmtghlsQsLSNxjU/ok9swSzMjJXrK7zG9gxYt6YeaTtiKt+R8LZkxnpNTMc/SDrfFEm+kckD/VHspNUNvC/6ztlZB1OOE6L94V5n/ywtaPOZ4LRoMNdWCBHWqrdLIVELn8S+qPCvUxII9Y9zSVsK8mnMsHCfaw2xTif+QzIAGX7W5Dc7bLq0gGh9lYoVoKHnDkrG5qAy9LIho8cNMPTsNcUfkOh7/RbtitaA78H5Ojls2vr5TN43djdF4c/Ty3cZw683ny33r4Sme4QV36hW28BY7mMjeneELvna/R52oF/UvU7uddkfX8NuJ1i4Aacet+g== < /latexit > < latexit sha1_base64= '' OLePkk4dic2TAOMqELhCFUnk5Jo= '' > AAADUXicjVJda9RQED2brVpbtR8+iS/BrSAIS1IUfSwUxMcW3LZSS0lu79bYfHFzoyxLwf/Q1/qrfPIf6E/om2emqdQWP25IMvfMnJk5w6R1njU+ir71gv7MjZu3Zm/Pzd+5e29hcWl5q6laZ+zIVHnldtKksXlW2pHPfG53ameTIs3tdnq0Lv7tj9Y1WVW+8ZPa7hXJYZmNM5N4Qm9Xkv3ph6fx8cr+4iAaRnrC60bcGQN0Z6Na6j3AOxyggkGLAhYlPO0cCRo+u4gRoSa2hykxRytTv8Ux5shtGWUZkRA94veQt90OLXmXnI2yDavkfB2ZIR6TUzHO0ZZqofpbzSzon3JPNaf0NuE/7XIVRD3eE/0X7yLyf3mixWOMl6oho6ZaEVFnuiytTkU6Dy+p8sxQExP7gH5H2yjzYs6hchrVLrNN1P9dIwWVu+liW/zounSKWHzSiRWqoWSFKX1jVSm9TIhYvctMPTsVf0PkKh7+RbthNtEtvF+T45bFV3fqurG1OoyfDZ9vrg7WXn0+37dZPMQjPOFOvcAaXmMDI61wglN8Cb4GZ330g/PQoNft6H38dvrzPwF1j6xQ < /latexit > < latexit sha1_base64= '' jY/6R/KBN0tZFfcJH9F5wBe4Sjc= '' > AAADVXicjVLbahRBED27G2OMlyT6JL4MLoJPy2xQ9DGgiI8R3CQQF5np9MYmc7O7J2FZBP/CV/0q8Q/0IwRPVSaiCV56mJmqU3Wq6xSVN4ULMU2/9PqDpUvLl1eurF69dv3G2vrGzZ1Qt97YiamL2u/lWbCFq+wkuljYvcbbrMwLu5sfPZH47rH1wdXVyzhv7LTMDis3cyaLhKZPranLpg5OvNfrw3SU6kkuGuPOGKI72/VG7zZe4QA1DFqUsKgQaRfIEPjsY4wUDbEpFsQ8Ladxi3dYJbdllmVGRvSI30N6+x1a0ZeaQdmGtxR8PZkJ7pFTM8/TltsSjbdaWdA/1V5oTeltzn/e1SqJRrwh+i/eWeb/8kRLxAyPVYOjpkYRUWe6Kq1ORTpPflEVWaEhJvYB4562UebZnBPlBNUus800/lUzBRXfdLktvnVdekUsTnRipWqoeMOCsZmqlF7mRKz6MtPITiUeiJzHk79oN6wmuoX3c3LcsvH5nbpo7GyOxg9GD19sDreevT/dtxXcwV3c5049whaeYxsT3vAWH/ARn/qf+98HS4Pl09R+r9vRW/jtDNZ+AKHorw8= < /latexit > < latexit sha1_base64= '' cy37RpZeyiuIh1LD6v/ICm26dtA= '' > AAADVnicjVLbThRBED27K4J4YdEn4suEjYlPm1kC0UcSE+MjGhZIAM1M04sT5pbuHshmY+Jn+KpfJX+AP2E8VQxGIV56MjNVp+pU16lUWueZD3F83un2bs3dnl+4s3j33v0HS/3lhzu+apyxY1PlldtLE2/zrLTjkIXc7tXOJkWa29305IXEd0+t81lVbodpbQ+L5LjMJplJAqG3b6ypSh9cY8R91x/Ew1hPdNMYtcYA7dmqljsrOMARKhg0KGBRItDOkcDz2ccIMWpih5gRc7QyjVt8wCK5DbMsMxKiJ/we09tv0ZK+1PTKNrwl5+vIjPCEnIp5jrbcFmm80cqC/qn2TGtKb1P+07ZWQTTgPdF/8a4y/5cnWgImeK4aMmqqFRF1pq3S6FSk8+gXVYEVamJiHzHuaBtlXs05Uo5X7TLbROMXmimo+KbNbfCt7dIpYnGmEytUQ8kbZoxNVKX0MiVi1ZeZBnYqcU/kOh79RbthNdEtvJ+T45aNru/UTWNnbThaH268Xhtsvvx4uW8LeIxVPOVOPcMmXmELY97g8Amf8aX7tfu9N9ebv0ztdtodfYTfTq//A0+7r54= < /latexit > 2.3 WAVELET REPRESENTATION OF PERIODIC CURVES < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' ZEtWR83MugYGN4gLCH8eIsigBmI= '' > AAADSnicjVLLThRRED3ToDx8ga6Mm44TEzdOug1GlyQkhCUaB0iQmO7LHezQr9y+jZlMTPwAtvhV/AB/gFt3xg2nioYgxMftdHfdU3Wq6lQqrfOs8VF00gumpm/dnpmdm79z9979BwuLDzeaqnXGDk2VV24rTRqbZ6Ud+szndqt2NinS3G6m+yvi3zywrsmq8r0f13anSPbKbJSZxBN69yL+uNCPBpGe8KYRd0Yf3VmvFnuP8QG7qGDQooBFCU87R4KGzzZiRKiJ7WBCzNHK1G/xBfPktoyyjEiI7vO7x9t2h5a8S85G2YZVcr6OzBDPyKkY52hLtVD9rWYW9E+5J5pTehvzn3a5CqIen4j+i3cR+b880eIxwhvVkFFTrYioM12WVqcinYdXVHlmqImJvUu/o22UeTHnUDmNapfZJuo/1UhB5W662Bbfuy6dIhafdWKFaihZYULfSFVKL2MiVu8yU89Oxd8QuY6Hf9FumE10C+9yctyy+PpO3TQ2Xg7ipcGrt0v95dWv5/s2iyd4iufcqddYxhrWMWSFEQ5xhG/BcfAj+Bn8Og8Net2OPsJvZ2r6DKsLq6I= < /latexit > < latexit sha1_base64= '' YHbYKgWPU0QsGYMI+mavrfy9jQE= '' > AAADSXicjVLLShxRED3Tk4evJJqsxE2TQXA1dAdDXAoByVIho4KR0H29Yxr7xe3bkWEIZJ9t/Kp8Qf4gWWYnrnKqbCVR8rhNd1edqlO3TlFpnWeNj6KvvaB/5+69+zOzc/MLDx4+Wlx6vNtUrTN2ZKq8cvtp0tg8K+3IZz63+7WzSZHmdi89eSnxvffWNVlVvvaT2h4WyXGZjTOTeEI78dvFQTSM9IS3jbgzBujOdrXUW8YbHKGCQYsCFiU87RwJGj4HiBGhJnaIKTFHK9O4xQfMkdsyyzIjIXrC7zG9gw4t6UvNRtmGt+R8HZkhVsmpmOdoy22hxlutLOifak+1pvQ24T/tahVEPd4R/RfvKvN/eaLFY4wN1ZBRU62IqDNdlVanIp2Hv6jyrFATE/uIcUfbKPNqzqFyGtUus000/k0zBRXfdLktvnddOkUsTnVihWooecOUsbGqlF4mRKz6MlPPTiXeELmJh3/RblhNdAvvenLcsvjmTt02dp8N4/Xh8531webWx8t9m8EKnmKNO/UCm3iFbYxU3yd8xlnwJfgRnAcXl6lBr9vRJ/jt9Ps/AQJYq2s= < /latexit > < latexit sha1_base64= '' FSU4zKQNQpu1mfMog0Yb2ywJWuM= '' > AAADVnicjVJda9RQED27a22tH93qk/gS3Aq+uCSLYh8LgvhYwW0LbZXk9m4NzRc3N5YlLPgzfNVfpf9A/4R4ZpqKtvhxQ5K5Z+bMzBkmqbK09mH4pdcfXFm6urxybfX6jZu31obrt3fqsnHGTk2ZlW4viWubpYWd+tRndq9yNs6TzO4mJ8/Ev/vOujoti1d+XtnDPD4u0llqYk/o9cajg5mLTRst2sli481wFI5DPcFlI+qMEbqzXa737uIARyhh0CCHRQFPO0OMms8+IoSoiB2iJeZopeq3WGCV3IZRlhEx0RN+j3nb79CCd8lZK9uwSsbXkRngATkl4xxtqRaov9HMgv4pd6s5pbc5/0mXKyfq8Zbov3jnkf/LEy0eM2yqhpSaKkVEnemyNDoV6Tz4RZVnhoqY2Ef0O9pGmedzDpRTq3aZbaz+rxopqNxNF9vgW9elU8TiVCeWq4aCFVr6ZqpSepkTsXqXmXp2Kv6ayEU8+It2w2yiW3g/J8ctiy7u1GVjZzKOHo+fvJyMtp6/P9u3FdzDfTzkTj3FFl5gG1NWcPiAj/jU/9z/PlgaLJ+F9nvdjt7Bb2cw/AEAo658 < /latexit > < latexit sha1_base64= '' W+g+ncPrRTPoSFN1xOYakWb+NAY= '' > AAADVXicjVJda9RQED27W2utH231SXwJbgWflmRR9LEgiI8V3LbQLpLc3q2h+erNTcsSFvwXvuqvEv+B/gjBM9NUtMWPG5LMPTNnZs4wSZWltQ/DL73+YOna8vWVG6s3b92+s7a+cXenLhtn7MSUWen2kri2WVrYiU99ZvcqZ+M8yexucvxC/Lun1tVpWbzx88pO8/ioSGepiT2h6ebBzMWmjRbteLH5dn0YjkI9wVUj6owhurNdbvTu4wCHKGHQIIdFAU87Q4yazz4ihKiITdESc7RS9VsssEpuwyjLiJjoMb9HvO13aMG75KyVbVgl4+vIDPCInJJxjrZUC9TfaGZB/5S71ZzS25z/pMuVE/V4R/RfvIvI/+WJFo8ZnquGlJoqRUSd6bI0OhXpPPhFlWeGipjYh/Q72kaZF3MOlFOrdpltrP6vGimo3E0X2+Bb16VTxOJMJ5arhoIVWvpmqlJ6mROxepeZenYq/prIZTz4i3bDbKJbeD8nxy2LLu/UVWNnPIqejJ6+Hg+3Xr4/37cVPMBDPOZOPcMWXmEbE1Y4wQd8xKf+5/73wdJg+Ty03+t29B5+O4O1H1W2rkU= < /latexit > < latexit sha1_base64= '' AjTIgg7tXsNgyxVMgwyZye+1p4s= '' > AAADWXicjVLbahRBED2742VdL9mYJ8nL4EbwaZkNij4GAuJjBDcJZGPo6fSuQ+ZGd4+yLAH/I6/6UeIP6F94ujIJmuClh5mpOlWnuk5RaZ1nzifJ1043unHz1u3enf7de/cfrAxWH+66qrHaTHSVV3Y/Vc7kWWkmPvO52a+tUUWam730ZDvE9z4Y67KqfOsXtTks1LzMZplWntDRYGVjOldFod4tp8r5042jwTAZJXLi68a4NYZoz0612nmEKY5RQaNBAYMSnnYOBcfnAGMkqIkdYknM0sokbnCKPrkNswwzFNETfuf0Dlq0pB9qOmFr3pLztWTGeEJOxTxLO9wWS7yRygH9U+2l1Ay9LfhP21oFUY/3RP/Fu8j8X17Q4jHDS9GQUVMtSFCn2yqNTCV0Hv+iyrNCTSzYx4xb2lqYF3OOheNEe5itkvh3yQxo8HWb2+BH26UVxOCjTKwQDSVvWDI2E5WhlwURI36YqWenIe6IXMXjv2jXrBZ0B97l5Lhl46s7dd3Y3RyNn42ev9kcbr36dL5vPazjMZ5yp15gC6+xg4ns3Rk+40v3W9SJelH/PLXbaXd0Db+daO0nOJaumQ== < /latexit > < latexit sha1_base64= '' uTwUh36rLJXOXCXjwgS2Io5nNVU= '' > AAADZXicjVLbahRBED274yVGo7sqiuTBwSD44jKzKPpmQBAfI7hJIInLTKc3jpkbPT3KMgzoh/govuoH+OBn+AXqX3i6MhFN8NLLTlefqlNVp6i4TJPKBsGXXt87cfLU6YUzi2fPLZ2/MBheXK+K2ig9UUVamM04qnSa5HpiE5vqzdLoKItTvRHvP3T+jZfaVEmRP7XzUu9k0V6ezBIVWULTwfL2zESqCf3b/viZXC+mTdi2bTNup4OVYBTI8Y8bYWesrD64+vnTu+HbtWLYu4Zt7KKAQo0MGjks7RQRKv62ECJASWwHDTFDKxG/RotFcmtGaUZERPf53eNrq0Nzvl3OStiKVVL+DZk+bpJTMM7QdtV88deS2aF/yt1ITtfbnHfc5cqIWjwn+i/eYeT/8pwWixnui4aEmkpBnDrVZallKq5z/xdVlhlKYs7epd/QVsI8nLMvnEq0u9lG4v8mkQ51b9XF1vjedWkE0XglE8tEQ84KDX0zUel6mRPR8nYztezU+SsiR3H/L9oVszndjvdzctyy8OhOHTfWx6PwzujuE67bo9eQs4Bl3MAt7tQ9rOIx1jBhhTd4jw/42P/qLXmXvSsHof3ewY1L+O14138AyXe1pQ== < /latexit > In this section we explain how a scalar-valued periodic signal γ with period l > 0 can be approximated using a MRA . Let j1 ∈ N be a desired resolution-level . First , we re-parameterize γ to have period 1 . The reason for this is rather technical and we refer the reader to Appendix A.1 . In essence , we require the number of approximation coefficients to be a power of two and this parameterization fits nicely with this requirement . Next , to address the issue that periodic signals are not contained in L2 ( R ) , we restrict the re-parameterized curve to [ −1 , 1 ] , i.e. , set γ∗ ( t ) : = γ ( lt ) 1 [ −1,1 ] ( t ) . In general , this will introduce discontinuities at the boundary points−1 and 1 . This is , however , not an issue , since we only need information about γ∗ on a strict subset [ I0 , I1 ] ⊂ [ −1 , 1 ] of length 1 . It is shown in Lemma A.1 how ( and which ) approximation coefficients can be related to the sample values of γ . In particular , if j1 is sufficiently large , the approximation coefficients needed to ( approximately ) cover [ −1 , 1 ] are ( aj1k ( γ∗ ) ) b2 j1−βc k=−2j1 . Here β > 0 is the support of the underlying wavelet . These coefficients will be close to the ( scaled ) sample values of γ on { k2−j1 : −2j1 ≤ k ≤ b2j1 − βc } . Motivated by this observation , and the fact that we only need γ on [ − 12 , 12 ] , we use the coefficients ( aj1k ( γ ∗ ) ) 2 j1−1−1 k=−2j1−1 only , which cover [ − 12 , 1−2 1−j1 2 ] approximately , see Figure 3 . To ensure that 2j1−1 − 1 < b2j1 − βc , we require that j1 ≥ ⌈ log ( β−1 ) log ( 2 ) + 1 ⌉ . This quantity is well-defined for all bases considered in this paper , except the Haar-basis . | The paper proposes a method for boundary extraction from images using a U-net type network architecture. The boundaries are considered as closed curves represented by multiresolution analysis (wavelets). The down-sampling part of the network consists of a 2D encoder and the up-sampling part is a 1D decoder that reconstructs the boundaries. | SP:b891a16652f0c4d81e4ecd256aa6f67a2d5ffc39 |
Subpixel object segmentation using wavelets and multiresolution analysis | 1 INTRODUCTION . Semantic image segmentation is a core component of many medical imaging related tasks . Both as part of a pipeline to find a region of interest , or a task by itself , e.g. , for measuring tumor volume . Nowadays , almost all segmentation algorithms in medical imaging are replaced by U-Net-like architectures Ronneberger et al . ( 2015 ) combining an encoder and decoder . Typically , the decoder is an upsampling path , and additional skip connections between the encoding and decoding part are added to recover the image ’ s spatial information . While many variants or more exotics methods , such as multi-scale and pyramid based approaches , recurrent networks or generative techniques , can be designed , all of these still yield per-pixel classifications . In these settings an image is interpreted as a discrete collection of ordered pixels ( or voxels in the three-dimensional case ) , where the task is to assign an appropriate class to each pixel using a probabilistic model . Typically , the pixels are assumed to be independent so that the joint-likelihood is tractable . In practice , e.g. , in medical imaging , the boundary of a region is annotated and not the region itself . Hence the raw ground-truth data is a discretization of a closed curve . The main motivation of our paper is to construct a deep learning model which ( i ) may directly use such raw groundtruth data if available ( ii ) is guaranteed to predict smooth planar curves ( iii ) improves inference speed by predicting 1d objects ( curves ) instead of 2d objects . We argue that in traditional pipelines , where pixel-based predictions are constructed , smooth boundaries are not faithfully represented . In particular , no prior information about the geometry of planar curves is incorporated . In this paper , we present a hybrid analog of the U-Net , where the down-sampling path is a two-dimensional encoder with learnable filters , and the upsampling path is an one-dimensional decoder , which predicts ( smooth ) representations of curves . A fundamental component in the setup of our framework is the decision on how to represent ( closed ) curves . While the Fourier basis is a natural candidate at first glance , its global nature may hamper accurate predictions of curves which exhibit highly localized behavior , requiring accurate estimates of small noisy high-frequency modes . For this reason , we have chosen to represent contours using wavelets and Multi Resolution Analysis ( MRA ) instead . The main idea is to choose a single map ϕ , the so-called scaling function or father wavelet , and to construct subspaces of functions associated to prescribed resolution levels by taking the span of appropriate dilations and translations of ϕ . This Under review as a conference paper at ICLR 2022 setup provides an efficient way to decompose and reconstruct contours , from low to high resolution level , using the classical Pyramid Algorithm Mallat ( 2008 ) as a decoder . The filters in the decoder are not learned but uniquely determined by the chosen wavelet basis . Any wavelet basis induced by a MRA can be used . This flexibility allows for incorporation of priors on the smoothness of curves . Related work Previous work by Chen et al . ( 2019 ) ; Marcos et al . ( 2018 ) ; Hatamizadeh et al . ( 2020 ) also proposed models to predict contours by combining Active Contour Models ( ACM ) with a CNN into an end-to-end model . In these papers the representation of curves is ultimately still based on pixel-based computations . For instance , in Hatamizadeh et al . ( 2020 ) curves are modelled as level sets of distance maps defined on a discretization of the domain of the image . In Chen et al . ( 2019 ) a similar approach is followed , but a smoothed approximation of an indicator function is used instead of a distance map . The work in Marcos et al . ( 2018 ) is perhaps most closely related to ours ; they directly construct polygonal approximations of curves and represent them using ( pixel ) coordinates of the nodes . The objectives minimized in the cited papers are based on a careful consideration of mean pixel intensities and geometric properties such as area and arc length . These properties are implicitly encoded in an objective function ( energy-functional ) defined on a space of distance maps Hatamizadeh et al . ( 2020 ) , suitable approximations of indicator functions Chen et al . ( 2019 ) , or family of polygons Marcos et al . ( 2018 ) . However , in contrast to our approach , the above methods all provide pixel-based output . To the best of our knowledge , our work is the first to use MRA and wavelet analysis to construct pixel-independent representations of ( closed ) curves . This paper is organized as follows . In Section 2 we review the mathematical background needed to construct our model . We explain how contours can be decomposed and reconstructed on different resolution levels . The reconstruction algorithm , the Pyramid Algorithm , forms a core component of our network architecture . In Section 3 we set up the model architecture and loss . Subsequently the datasets , training method and performance measures are described in Section 4 . We end the paper with results and a discussion in Section 5 . Further mathematical details are provided in the appendix . 2 BACKGROUND AND MATHEMATICAL SETUP . In this section we describe our mathematical setup and review the theory needed to construct our model . We consider two dimensional gray-valued images x ∈ X : = [ 0 , 1 ] n×n , e.g. , slices of MRI scans of size n × n , where n ∈ N. We assume that each image contains a ( uniquely identifiable ) simply connected region R ( x ) ⊂ R2 , e.g. , an organ , with boundary ∂R ( x ) . It is assumed that ∂R ( x ) can be parameterized by a simple closed continuous curve γ ( x ) . We will develop a deep learning framework for computing such parameterizations γ ( x ) using Multi Resolution Analysis ( MRA ) . Since wavelets play a seminal role in our set up , we first review the necessary theory in Sections 2.1 and 2.2 as a subject in its own right in the context of general scalar-valued signals γ . In the remainder of the paper , we return to the context in which γ = γ ( x ) is interpreted as a periodic ( planar ) curve parameterizing the boundary of a region . 2.1 MULTI RESOLUTION ANALYSIS . In this section we briefly review wavelet theory using the framework of a multi resolution analysis ( MRA ) . We closely follow the exposition in Pereyra & Ward ( 2012 ) and Montefusco & Puccio ( 2014 ) . Throughout this section we denote the space of square integrable functions on R , equipped with standard inner product , by L2 ( R ) . The uncertainty principle in Fourier analysis dictates that a signal γ ∈ L2 ( R ) can not be simultaneously localized in the time and frequency domain , see Pereyra & Ward ( 2012 ) . Multi resolution analysis aims to address this shortcoming by decomposing a signal on different discrete resolution levels . The idea is to construct subspaces Vj ⊂ L2 ( R ) , associated to various resolution levels j ∈ Z , spanned by integer shifts of a localized mapping ϕj . The level of localization associated to Vj is determined by taking an appropriate dilation of a prescribed map ϕ ; the so-called scaling function . In the MRA framework the dilation factors are chosen to be powers of two . Formally , we require that ( ϕjk ) k∈Z is an orthonormal basis for Vj , where ϕjk ( t ) : = 2 j 2φ ( 2jt − k ) , see Figures 1a and Under review as a conference paper at ICLR 2022 < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' M7UKKJnEQHA3s72OH/aYHjHJUx0= '' > AAADW3icjVJNb9NAEH2JKS1pgYSKA+JiNUXiFDkRFRwrISGORSJtpX7J3m6Kib+0XlNFViT+CFf4TRx6h3/B26lb9UMF1rI9+2bezLzRREUSlzYIfrba3r2F+4tLDzrLKw8fPe72nmyXeWWUHqs8yc1uFJY6iTM9trFN9G5hdJhGid6Jpm+df+eLNmWcZx/trNAHaXiSxZNYhZbQUbe3vj8xoaqn83p0WH+ez9ePuv1gEMjxbxvDxuijOVt5r/UM+zhGDoUKKTQyWNoJQpR89jBEgILYAWpihlYsfo05OuRWjNKMCIlO+T3hba9BM95dzlLYilUSvoZMHy/IyRlnaLtqvvgryezQu3LXktP1NuM/anKlRC0+Ef0X7yLyf3lOi8UEb0RDTE2FIE6darJUMhXXuX9FlWWGgpizj+k3tJUwL+bsC6cU7W62ofh/SaRD3V01sRV+N10aQTROZWKpaMhYoaZvIipdLzMiWu5uppadOn9J5Cbu/0W7Yjan2/EuJ8ctG97cqdvG9mgwfDXY+DDqb777er5vS3iONbzkTr3GJt5jC2NWOMU3fMeP9pnneR1v5Ty03Wp2dBXXjvf0Dz3lr5k= < /latexit > < latexit sha1_base64= '' eppRxrTWoo+UUU4xutZiIhSZEp4= '' > AAADXXicjVJda9RQED27abXW2m7tg0hfgltBEJZkqehjQRAfK7htoa0lub1b080XNzfKEhb8J762P8knX/VfeO40LbXFjxuSzD0zZ2bOMHGZJpUNgm+drjc3f+fuwr3F+0sPlld6qw93qqI2So9UkRZmL44qnSa5HtnEpnqvNDrK4lTvxpPXzr/7SZsqKfL3dlrqwyw6yZNxoiJL6Ki3tnEwNpFqJs/DWTP80JzOZhtHvX4wCOT4t42wNfpoz3ax2nmMAxyjgEKNDBo5LO0UESo++wgRoCR2iIaYoZWIX2OGRXJrRmlGREQn/J7wtt+iOe8uZyVsxSopX0Omj6fkFIwztF01X/y1ZHbon3I3ktP1NuU/bnNlRC0+Ev0X7zLyf3lOi8UYr0RDQk2lIE6darPUMhXXuX9NlWWGkpizj+k3tJUwL+fsC6cS7W62kfh/SKRD3V21sTV+tl0aQTQ+y8Qy0ZCzQkPfWFS6XqZEtNzdTC07df6KyE3c/4t2xWxOt+NdTY5bFt7cqdvGznAQbg5evBv2t958udi3BazjCZ5xp15iC2+xjRErTPEVZzjvfvfmvSVv+SK022l3dA2/He/RL561sAk= < /latexit > < latexit sha1_base64= '' YatA4oTJFJ72OHIzt8rR93dn110= '' > AAADgnicjVLbbtNAEJ3UBUq5pfCEeFkRIaVIRHYoaoWoFIkXHoNE2kpNidbbTbuJb1qvW0WWf4Wv4bV97x/AXzAz3SJoxWUt27Nn5szMGU1cJKZ0YXjRWgqWb92+s3J39d79Bw8ftdce75R5ZZUeqTzJ7V4sS52YTI+ccYneK6yWaZzo3Xj+nvy7J9qWJs8+uUWhD1J5lJmpUdIhNGlvjU+kLY7NpJ7Nm65bF2+3Rf9zPZ5aqepZU/ebRviQLjlmjROvxFysT9qdsBfyETeNyBsd8GeYr7WewhgOIQcFFaSgIQOHdgISSnz2IYIQCsQOoEbMomXYr6GBVeRWGKUxQiI6x+8R3vY9muGdcpbMVlglwdciU8AL5OQYZ9GmaoL9FWcm9E+5a85JvS3wH/tcKaIOjhH9F+8q8n95pMXBFLZYg0FNBSOkTvksFU+FOhe/qHKYoUCM7EP0W7QVM6/mLJhTsnaarWT/N44klO7Kx1bw3XdpGdFwyhNLWUOGFWr0TVkl9bJARPOdZuqwU/KXiFzHxV+0K8xGuon3c3K4ZdH1nbpp7PR70UbvzceNzmA4uNy3FXgGz6GLO7UJA/gAQxhhhS/wFc7gPFgOXgZR8PoydKnld/QJ/HaCdz8ANha8zg== < /latexit > < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' av/+obxeXD73VPois1h5yhqjvaw= '' > AAADe3icjVLbahRBEK3d8RLjbaNP4kvjRtiILjOLQRGEgCA+RnCTQDYuM53e2Ltzo7tHWYYB/8Kv8VW/wT/QjxA8XZmIJnjpYWaqT9WpqlNUUqbaujD80ukG585fuLhyafXylavXrvfWbuzYojJSjWWRFmYvia1Kda7GTrtU7ZVGxVmSqt1k8cz7d98qY3WRv3LLUh1k8VGuZ1rGDtC0F61PSqun9XzRDNyGePJUjF7Xk5mJZT1v6lHTePcA2Lxx4oFYbKxPe/1wGPIRZ42oNfrUnu1irXOLJnRIBUmqKCNFOTnYKcVk8exTRCGVwA6oBmZgafYramgV3ApRChEx0AW+R7jtt2iOu89pmS1RJcVrwBR0F5wCcQa2rybYX3Fmj/4pd805fW9L/JM2VwbU0Rug/+KdRP4vz2txNKPHrEFDU8mIVyfbLBVPxXcuflHlkKEE5u1D+A1sycyTOQvmWNbuZxuz/ytHetTfZRtb0be2S8OIonc8sYw15KhQwzdjlb6XJRDFdz9Th0693wI5jYu/aJfI5nV73s/JYcui0zt11tgZDaOHw82Xo/7W8/fH+7ZCt+kODbBTj2iLXtA2jVHhA32kT/S5+z3oB/eC+8eh3U67ozfptxNs/gBTRLsn < /latexit > < latexit sha1_base64= '' M7UKKJnEQHA3s72OH/aYHjHJUx0= '' > AAADW3icjVJNb9NAEH2JKS1pgYSKA+JiNUXiFDkRFRwrISGORSJtpX7J3m6Kib+0XlNFViT+CFf4TRx6h3/B26lb9UMF1rI9+2bezLzRREUSlzYIfrba3r2F+4tLDzrLKw8fPe72nmyXeWWUHqs8yc1uFJY6iTM9trFN9G5hdJhGid6Jpm+df+eLNmWcZx/trNAHaXiSxZNYhZbQUbe3vj8xoaqn83p0WH+ez9ePuv1gEMjxbxvDxuijOVt5r/UM+zhGDoUKKTQyWNoJQpR89jBEgILYAWpihlYsfo05OuRWjNKMCIlO+T3hba9BM95dzlLYilUSvoZMHy/IyRlnaLtqvvgryezQu3LXktP1NuM/anKlRC0+Ef0X7yLyf3lOi8UEb0RDTE2FIE6darJUMhXXuX9FlWWGgpizj+k3tJUwL+bsC6cU7W62ofh/SaRD3V01sRV+N10aQTROZWKpaMhYoaZvIipdLzMiWu5uppadOn9J5Cbu/0W7Yjan2/EuJ8ctG97cqdvG9mgwfDXY+DDqb777er5vS3iONbzkTr3GJt5jC2NWOMU3fMeP9pnneR1v5Ty03Wp2dBXXjvf0Dz3lr5k= < /latexit > < latexit sha1_base64= '' eppRxrTWoo+UUU4xutZiIhSZEp4= '' > AAADXXicjVJda9RQED27abXW2m7tg0hfgltBEJZkqehjQRAfK7htoa0lub1b080XNzfKEhb8J762P8knX/VfeO40LbXFjxuSzD0zZ2bOMHGZJpUNgm+drjc3f+fuwr3F+0sPlld6qw93qqI2So9UkRZmL44qnSa5HtnEpnqvNDrK4lTvxpPXzr/7SZsqKfL3dlrqwyw6yZNxoiJL6Ki3tnEwNpFqJs/DWTP80JzOZhtHvX4wCOT4t42wNfpoz3ax2nmMAxyjgEKNDBo5LO0UESo++wgRoCR2iIaYoZWIX2OGRXJrRmlGREQn/J7wtt+iOe8uZyVsxSopX0Omj6fkFIwztF01X/y1ZHbon3I3ktP1NuU/bnNlRC0+Ev0X7zLyf3lOi8UYr0RDQk2lIE6darPUMhXXuX9NlWWGkpizj+k3tJUwL+fsC6cS7W62kfh/SKRD3V21sTV+tl0aQTQ+y8Qy0ZCzQkPfWFS6XqZEtNzdTC07df6KyE3c/4t2xWxOt+NdTY5bFt7cqdvGznAQbg5evBv2t958udi3BazjCZ5xp15iC2+xjRErTPEVZzjvfvfmvSVv+SK022l3dA2/He/RL561sAk= < /latexit > < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > . 1b . Altogether , this yields an increasing sequence of closed subspaces Vj ⊂ Vj+1 ⊂ L2 ( R ) dense in L2 ( R ) , where Vj+1 is the next level up in resolution after Vj . The representation of γ at resolution level j , denoted by γj : = Pjγ , is its orthogonal projection onto Vj . Here Pj denotes the orthogonal projection onto Vj . The coefficients of γj with respect to the basis for Vj , denoted by aj ( γ ) = ( ajk ( γ ) ) k∈Z , are called the approximation coefficients . The associated subspaces Vj are referred to as the approximation subspaces ( see Figure 1b ) . To study the information that is lost when a signal in Vj+1 is projected onto Vj , we consider the operator Qj : = Pj+1 − Pj . The range of Qj , denoted by Wj , is referred to as the detail subspace at level j ; it is the orthogonal complement of Vj in Vj+1 . The detail subspaces ( Wj ) j∈Z are mutually disjoint and orthogonal by construction . A fundamental result , known as Mallat ’ s Theorem , states that the subspaces Wj can too be spanned by dilating and shifting a single map . More precisely , there exists a map ψ ∈ W0 , the so-called mother wavelet , such that ( ψjk ) k∈Z is an orthonormal basis for Wj , see Pereyra & Ward ( 2012 ) . The coefficients of Qjγ with respect to this basis , denoted by dj ( γ ) : = ( djk ( γ ) ) k∈Z , are referred to as the detail coefficients of γ at resolution level j . The detail coefficients store the information needed to go back one level up in resolution , since Pj+1 = Pj+Qj by construction . We often write aj ( γ ) = aj and dj ( γ ) = dj for brevity . In practice , we only approximate a finite number of approximation and detail coefficients , see Section 2.3 . 2.2 THE DISCRETE WAVELET TRANSFORM . In this section we describe how to compute the approximation and detail coefficients given a prescribed scaling function ϕ . Many fundamental aspects of MRA ’ s , both theoretical and computational , can be traced back to the following key observation . Since V0 ⊂ V1 , there must exist coefficients h = ( hk ) k∈Z such that ϕ = ∑ k∈Z hkϕ1k . This equation is referred to as the scaling equation ; one of the fundamental properties of a scaling function . The sequence h , the so-called lowpass filter , completely characterizes the scaling function . Similarly , since ψ ∈W0 ⊂ V1 , there exist coefficients g = ( gk ) k∈Z , the so-called high-pass filter associated to h , such that ψ = ∑ k∈Z gkϕ1k . For Mallat ’ s mother wavelet , we have gk = ( −1 ) k−1h1−k . Altogether , in order to define a MRA , one only needs to specify an appropriate low-pass filter h. The scaling equations can be used to derive an efficient scheme for computing lower order approximation coefficients ( of any order ) given an initial approximation aj+1 . Conversely , the orthogonal decomposition Vj+1 = Vj ⊕Wj can be used to reconstruct aj+1 given the approximation and detail coefficients aj and dj , respectively , at resolution level j . The computations are summarized in Figure 2 . The reconstruction and decomposition formulae together form the well-known Pyramid Algorithm Mallat ( 2008 ) . In practice , our signals are periodic and do not directly fit into the MRA framework , since non-zero periodic signals are not elements in L2 ( R ) . We will address this issue in the next section by using an appropriate cut-off . Here we only remark that the periodicity needs to be carefully taken into account in the decomposition and reconstruction formulae , see Appendix A.2 . Under review as a conference paper at ICLR 2022 < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' 74NFWraCYxco2ZXS7qRG4aX/NXo= '' > AAADTnicjVLLahRRED3TUTPGV6IrcdM4CK6GHomYZUAILiM4k0ASpPvmTtKmX9x7WxkGwU/IVr8q2/yB/oA70VOVjmiCj9t0d91TdarqFJU1Re5Dkpz2ooUrV68t9q8v3bh56/ad5ZW7E1+3ztixqYvabWept0Ve2XHIQ2G3G2fTMivsVnb0XPxbb63zeV29CrPG7pXpQZVPc5MGQpPd1If48PXyIBkmeuLLxqgzBujOZr3Su49d7KOGQYsSFhUC7QIpPJ8djJCgIbaHOTFHK1e/xXsskdsyyjIiJXrE7wFvOx1a8S45vbINqxR8HZkxHpFTM87Rlmqx+lvNLOifcs81p/Q24z/rcpVEAw6J/ot3Hvm/PNESMMWaasipqVFE1JkuS6tTkc7jX1QFZmiIib1Pv6NtlHk+51g5XrXLbFP1f9ZIQeVuutgWX7ounSIW73RipWqoWGFO31RVSi8zIlbvMtPATsXviVzE479oN8wmuoX3c3LcstHFnbpsTJ4MR6vDpy9XB+sbH872rY8HeIjH3KlnWMcLbGLMCm9wjI/4FJ1EX6Nv0fez0KjX7eg9/HYW+j8Ag1etmA== < /latexit > < latexit sha1_base64= '' Af/VrWyTW8iyG2S0QG2btLLR+E0= '' > AAADTnicjVLLahRRED3T8THGV6IrcdM4CK6GHknQZUAQlxGcSSAJ0n1zZ2zTL+69rQyD4Ce41a9y6x/oD7iT5FSlIyYh6m26u+6pOlV1isqaIvchSb71oqVLl69c7V9bvn7j5q3bK6t3Jr5unbFjUxe1285Sb4u8suOQh8JuN86mZVbYrezgmfi33lnn87p6FeaN3SvTWZVPc5MGQpPd1Id49nplkAwTPfF5Y9QZA3Rns17t3cMu9lHDoEUJiwqBdoEUns8ORkjQENvDgpijlavf4gOWyW0ZZRmREj3gd8bbTodWvEtOr2zDKgVfR2aMh+TUjHO0pVqs/lYzC3pR7oXmlN7m/GddrpJowBui/+KdRP4vT7QETPFUNeTU1Cgi6kyXpdWpSOfxH6oCMzTExN6n39E2yjyZc6wcr9pltqn6v2ukoHI3XWyLH12XThGL9zqxUjVUrLCgb6oqpZc5Eat3mWlgp+L3RM7i8V+0G2YT3cL7PTlu2ejsTp03Jo+Ho7Xh+su1wcbzj8f71sd9PMAj7tQTbOAFNjFmhbf4hM/4En2Nfka/osPj0KjX7ehdnDpL/SOAcq2X < /latexit > < latexit sha1_base64= '' DwoAImpK55725K3I8BkhsJ+Jx40= '' > AAADSXicjVJNaxRBEH07a8wajWb1JF6GLIIQWGZDRI8BQXJMwE0CMchMpzcZMl/09BiWRfDuVX+VvyD/QI/exJOvKhPRhCT2MDNVr+pV1ysqqbK09lF02gm6t+Zuz/fuLNy9t3j/wVL/4XZdNs7YsSmz0u0mcW2ztLBjn/rM7lbOxnmS2Z3k+JXEd95bV6dl8cZPK7ufx4dFOklN7AltrbxbGkTDSE942Ri1xgDt2Sz7ncd4iwOUMGiQw6KAp50hRs1nDyNEqIjtY0bM0Uo1bvEBC+Q2zLLMiIke83tIb69FC/pSs1a24S0ZX0dmiKfklMxztOW2UOONVhb0qtozrSm9TflP2lo5UY8jojfxzjP/lydaPCZ4qRpSaqoUEXWmrdLoVKTz8C9VnhUqYmIfMO5oG2WezzlUTq3aZbaxxr9ppqDimza3wfe2S6eIxYlOLFcNBW+YMTZRldLLlIhVX2bq2anEayIX8fAa7YbVRLfw/kyOWza6uFOXje3V4Wht+HxrbbD++uPZvvXwBMt4xp16gXVsYBNj1fcJn/El+Br8CH4Gv85Sg067o4/wz+l2fwPw66tl < /latexit > < latexit sha1_base64= '' +f3+H5d1VSXBWTnXjS3e7/surv0= '' > AAADT3icjVLbahRBED076yWJt0SfxJfBRRCEZUYi+hgQxMcIbjYQQ5jp9MYxc6OnR1mWgL/gq36Vj/6B+YK8iafKjmiCl1529/SpOtV1isrbsuh8knwZRMMLFy9dXlpeuXL12vUbq2s3t7qmd8ZOTFM2bjvPOlsWtZ34wpd2u3U2q/LSTvPDpxKfvrWuK5r6pZ+3drfKDupiVpjMk5pme4s3D9KjvdVRMk70xOdBGsAI4Ww2a4PbeIV9NDDoUcGihicukaHjZwcpErTkdrEg54gKjVscYYXanlmWGRnZQ/4e8LYT2Jp3qdmp2vCVkl9HZYx71DTMc8TyWqzxXisL+6faC60pvc35n4daFVmP12T/pTvN/F+dePGY4Yl6KOipVUbcmVCl16lI5/EvrjwrtOQE7zPuiI0qT+ccq6ZT7zLbTONfNVNYuZuQ2+M4dOmUsXinE6vUQ80XFozN1KX0Midj9S4z9exU4h2Zs3z8F++G1cS36H5OjluWnt2p82Dr4ThdHz96sT7aePb+x74t4Q7u4j536jE28BybmOhrH/ARn6LP0Un0bRhWMxoEcAu/neHyd3hSrPU= < /latexit > < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' Z/Xj3rH/fFWBwjJhd6cUdR/2itw= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMwGJT4GBPExgpsEsiHM9PauTeZGd09kWYT8R171o8Qf0L/wdGUimuClh5mpOlWnuk5RWZ0b55PkS6cb3bh563bvTv/uvfsP1gbrD/dc1VilJ6rKK3uQpU7nptQTb3yuD2qr0yLL9X528irE90+1daYq3/llrY+KdFGauVGpJ3Q8WNucps7HU2/ymY4Xm8eDYTJK5MTXjXFrDNGe3Wq98whTzFBBoUEBjRKedo4Ujs8hxkhQEzvCipilZSSu8RF9chtmaWakRE/4XdA7bNGSfqjphK14S87XkhnjKTkV8yztcFss8UYqB/RPtVdSM/S25D9raxVEPd4T/RfvMvN/eUGLxxwvRYOhplqQoE61VRqZSug8/kWVZ4WaWLBnjFvaSpiXc46F40R7mG0q8W+SGdDgqza3wfe2SyuIxgeZWCEaSt6wYmwuKkMvSyJa/DBTz05D3BG5isd/0a5YLegOvJ+T45aNr+7UdWNvazR+Pnrxdmu48/rsYt96eIwneMad2sYO3mAXE9m7c3zC5+7XqBP1ov5FarfT7ugGfjvRxg9m4a35 < /latexit > < latexit sha1_base64= '' fYF6uGBHohxufzgVqN0lSMqhxww= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMyGiD4GAuJjBDcJZEOY6e1NmsyN7h5lWQT/I6/6UeIPmL/I6cpENMFLDzNTdapOdZ2isjo3zifJt043unX7zt3evf79Bw8frQxWH++6qrFKT1SVV3Y/S53OTakn3vhc79dWp0WW673sdDvE9z5o60xVvveLWh8W6XFp5kalntDRYGV9mjofT73JZzo+WT8aDJNRIie+aYxbY4j27FSrnSeYYoYKCg0KaJTwtHOkcHwOMEaCmtghlsQsLSNxjU/ok9swSzMjJXrK7zG9gxYt6YeaTtiKt+R8LZkxnpNTMc/SDrfFEm+kckD/VHspNUNvC/6ztlZB1OOE6L94V5n/ywtaPOZ4LRoMNdWCBHWqrdLIVELn8S+qPCvUxII9Y9zSVsK8mnMsHCfaw2xTif+QzIAGX7W5Dc7bLq0gGh9lYoVoKHnDkrG5qAy9LIho8cNMPTsNcUfkOh7/RbtitaA78H5Ojls2vr5TN43djdF4c/Ty3cZw683ny33r4Sme4QV36hW28BY7mMjeneELvna/R52oF/UvU7uddkfX8NuJ1i4Aacet+g== < /latexit > < latexit sha1_base64= '' OLePkk4dic2TAOMqELhCFUnk5Jo= '' > AAADUXicjVJda9RQED2brVpbtR8+iS/BrSAIS1IUfSwUxMcW3LZSS0lu79bYfHFzoyxLwf/Q1/qrfPIf6E/om2emqdQWP25IMvfMnJk5w6R1njU+ir71gv7MjZu3Zm/Pzd+5e29hcWl5q6laZ+zIVHnldtKksXlW2pHPfG53ameTIs3tdnq0Lv7tj9Y1WVW+8ZPa7hXJYZmNM5N4Qm9Xkv3ph6fx8cr+4iAaRnrC60bcGQN0Z6Na6j3AOxyggkGLAhYlPO0cCRo+u4gRoSa2hykxRytTv8Ux5shtGWUZkRA94veQt90OLXmXnI2yDavkfB2ZIR6TUzHO0ZZqofpbzSzon3JPNaf0NuE/7XIVRD3eE/0X7yLyf3mixWOMl6oho6ZaEVFnuiytTkU6Dy+p8sxQExP7gH5H2yjzYs6hchrVLrNN1P9dIwWVu+liW/zounSKWHzSiRWqoWSFKX1jVSm9TIhYvctMPTsVf0PkKh7+RbthNtEtvF+T45bFV3fqurG1OoyfDZ9vrg7WXn0+37dZPMQjPOFOvcAaXmMDI61wglN8Cb4GZ330g/PQoNft6H38dvrzPwF1j6xQ < /latexit > < latexit sha1_base64= '' jY/6R/KBN0tZFfcJH9F5wBe4Sjc= '' > AAADVXicjVLbahRBED27G2OMlyT6JL4MLoJPy2xQ9DGgiI8R3CQQF5np9MYmc7O7J2FZBP/CV/0q8Q/0IwRPVSaiCV56mJmqU3Wq6xSVN4ULMU2/9PqDpUvLl1eurF69dv3G2vrGzZ1Qt97YiamL2u/lWbCFq+wkuljYvcbbrMwLu5sfPZH47rH1wdXVyzhv7LTMDis3cyaLhKZPranLpg5OvNfrw3SU6kkuGuPOGKI72/VG7zZe4QA1DFqUsKgQaRfIEPjsY4wUDbEpFsQ8Ladxi3dYJbdllmVGRvSI30N6+x1a0ZeaQdmGtxR8PZkJ7pFTM8/TltsSjbdaWdA/1V5oTeltzn/e1SqJRrwh+i/eWeb/8kRLxAyPVYOjpkYRUWe6Kq1ORTpPflEVWaEhJvYB4562UebZnBPlBNUus800/lUzBRXfdLktvnVdekUsTnRipWqoeMOCsZmqlF7mRKz6MtPITiUeiJzHk79oN6wmuoX3c3LcsvH5nbpo7GyOxg9GD19sDreevT/dtxXcwV3c5049whaeYxsT3vAWH/ARn/qf+98HS4Pl09R+r9vRW/jtDNZ+AKHorw8= < /latexit > < latexit sha1_base64= '' cy37RpZeyiuIh1LD6v/ICm26dtA= '' > AAADVnicjVLbThRBED27K4J4YdEn4suEjYlPm1kC0UcSE+MjGhZIAM1M04sT5pbuHshmY+Jn+KpfJX+AP2E8VQxGIV56MjNVp+pU16lUWueZD3F83un2bs3dnl+4s3j33v0HS/3lhzu+apyxY1PlldtLE2/zrLTjkIXc7tXOJkWa29305IXEd0+t81lVbodpbQ+L5LjMJplJAqG3b6ypSh9cY8R91x/Ew1hPdNMYtcYA7dmqljsrOMARKhg0KGBRItDOkcDz2ccIMWpih5gRc7QyjVt8wCK5DbMsMxKiJ/we09tv0ZK+1PTKNrwl5+vIjPCEnIp5jrbcFmm80cqC/qn2TGtKb1P+07ZWQTTgPdF/8a4y/5cnWgImeK4aMmqqFRF1pq3S6FSk8+gXVYEVamJiHzHuaBtlXs05Uo5X7TLbROMXmimo+KbNbfCt7dIpYnGmEytUQ8kbZoxNVKX0MiVi1ZeZBnYqcU/kOh79RbthNdEtvJ+T45aNru/UTWNnbThaH268Xhtsvvx4uW8LeIxVPOVOPcMmXmELY97g8Amf8aX7tfu9N9ebv0ztdtodfYTfTq//A0+7r54= < /latexit > < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' 74NFWraCYxco2ZXS7qRG4aX/NXo= '' > AAADTnicjVLLahRRED3TUTPGV6IrcdM4CK6GHomYZUAILiM4k0ASpPvmTtKmX9x7WxkGwU/IVr8q2/yB/oA70VOVjmiCj9t0d91TdarqFJU1Re5Dkpz2ooUrV68t9q8v3bh56/ad5ZW7E1+3ztixqYvabWept0Ve2XHIQ2G3G2fTMivsVnb0XPxbb63zeV29CrPG7pXpQZVPc5MGQpPd1If48PXyIBkmeuLLxqgzBujOZr3Su49d7KOGQYsSFhUC7QIpPJ8djJCgIbaHOTFHK1e/xXsskdsyyjIiJXrE7wFvOx1a8S45vbINqxR8HZkxHpFTM87Rlmqx+lvNLOifcs81p/Q24z/rcpVEAw6J/ot3Hvm/PNESMMWaasipqVFE1JkuS6tTkc7jX1QFZmiIib1Pv6NtlHk+51g5XrXLbFP1f9ZIQeVuutgWX7ounSIW73RipWqoWGFO31RVSi8zIlbvMtPATsXviVzE479oN8wmuoX3c3LcstHFnbpsTJ4MR6vDpy9XB+sbH872rY8HeIjH3KlnWMcLbGLMCm9wjI/4FJ1EX6Nv0fez0KjX7eg9/HYW+j8Ag1etmA== < /latexit > < latexit sha1_base64= '' Af/VrWyTW8iyG2S0QG2btLLR+E0= '' > AAADTnicjVLLahRRED3T8THGV6IrcdM4CK6GHknQZUAQlxGcSSAJ0n1zZ2zTL+69rQyD4Ce41a9y6x/oD7iT5FSlIyYh6m26u+6pOlV1isqaIvchSb71oqVLl69c7V9bvn7j5q3bK6t3Jr5unbFjUxe1285Sb4u8suOQh8JuN86mZVbYrezgmfi33lnn87p6FeaN3SvTWZVPc5MGQpPd1Id49nplkAwTPfF5Y9QZA3Rns17t3cMu9lHDoEUJiwqBdoEUns8ORkjQENvDgpijlavf4gOWyW0ZZRmREj3gd8bbTodWvEtOr2zDKgVfR2aMh+TUjHO0pVqs/lYzC3pR7oXmlN7m/GddrpJowBui/+KdRP4vT7QETPFUNeTU1Cgi6kyXpdWpSOfxH6oCMzTExN6n39E2yjyZc6wcr9pltqn6v2ukoHI3XWyLH12XThGL9zqxUjVUrLCgb6oqpZc5Eat3mWlgp+L3RM7i8V+0G2YT3cL7PTlu2ejsTp03Jo+Ho7Xh+su1wcbzj8f71sd9PMAj7tQTbOAFNjFmhbf4hM/4En2Nfka/osPj0KjX7ehdnDpL/SOAcq2X < /latexit > < latexit sha1_base64= '' DwoAImpK55725K3I8BkhsJ+Jx40= '' > AAADSXicjVJNaxRBEH07a8wajWb1JF6GLIIQWGZDRI8BQXJMwE0CMchMpzcZMl/09BiWRfDuVX+VvyD/QI/exJOvKhPRhCT2MDNVr+pV1ysqqbK09lF02gm6t+Zuz/fuLNy9t3j/wVL/4XZdNs7YsSmz0u0mcW2ztLBjn/rM7lbOxnmS2Z3k+JXEd95bV6dl8cZPK7ufx4dFOklN7AltrbxbGkTDSE942Ri1xgDt2Sz7ncd4iwOUMGiQw6KAp50hRs1nDyNEqIjtY0bM0Uo1bvEBC+Q2zLLMiIke83tIb69FC/pSs1a24S0ZX0dmiKfklMxztOW2UOONVhb0qtozrSm9TflP2lo5UY8jojfxzjP/lydaPCZ4qRpSaqoUEXWmrdLoVKTz8C9VnhUqYmIfMO5oG2WezzlUTq3aZbaxxr9ppqDimza3wfe2S6eIxYlOLFcNBW+YMTZRldLLlIhVX2bq2anEayIX8fAa7YbVRLfw/kyOWza6uFOXje3V4Wht+HxrbbD++uPZvvXwBMt4xp16gXVsYBNj1fcJn/El+Br8CH4Gv85Sg067o4/wz+l2fwPw66tl < /latexit > < latexit sha1_base64= '' +f3+H5d1VSXBWTnXjS3e7/surv0= '' > AAADT3icjVLbahRBED076yWJt0SfxJfBRRCEZUYi+hgQxMcIbjYQQ5jp9MYxc6OnR1mWgL/gq36Vj/6B+YK8iafKjmiCl1529/SpOtV1isrbsuh8knwZRMMLFy9dXlpeuXL12vUbq2s3t7qmd8ZOTFM2bjvPOlsWtZ34wpd2u3U2q/LSTvPDpxKfvrWuK5r6pZ+3drfKDupiVpjMk5pme4s3D9KjvdVRMk70xOdBGsAI4Ww2a4PbeIV9NDDoUcGihicukaHjZwcpErTkdrEg54gKjVscYYXanlmWGRnZQ/4e8LYT2Jp3qdmp2vCVkl9HZYx71DTMc8TyWqzxXisL+6faC60pvc35n4daFVmP12T/pTvN/F+dePGY4Yl6KOipVUbcmVCl16lI5/EvrjwrtOQE7zPuiI0qT+ccq6ZT7zLbTONfNVNYuZuQ2+M4dOmUsXinE6vUQ80XFozN1KX0Midj9S4z9exU4h2Zs3z8F++G1cS36H5OjluWnt2p82Dr4ThdHz96sT7aePb+x74t4Q7u4j536jE28BybmOhrH/ARn6LP0Un0bRhWMxoEcAu/neHyd3hSrPU= < /latexit > < latexit sha1_base64= '' 3Z+Px9GqgjMzIdbzOKO8uk2VK4I= '' > AAADTXicjVLLahRRED3TiebhK9FVcNM4CK6GHknQZUAQlwk4SSCG0H1zJ17TL27fVoYh4B+41a9y7R+YD3AnIacqHYkJPm7T3XVP1amqU1RW564JSfKtF83M3rg5N7+weOv2nbv3lpbvbzVV640dmSqv/E6WNjZ3pR0FF3K7U3ubFllut7OjF+Lffm9946rydZjUdq9ID0s3diYNhEbp/vTd8f5SPxkkeuLrxrAz+ujORrXcW8EbHKCCQYsCFiUC7RwpGj67GCJBTWwPU2KellO/xTEWyW0ZZRmREj3i95C33Q4teZecjbINq+R8PZkxHpNTMc7Tlmqx+lvNLOifck81p/Q24T/rchVEA94S/RfvIvJ/eaIlYIznqsFRU62IqDNdllanIp3Hl1QFZqiJiX1Av6dtlHkx51g5jWqX2abq/66RgsrddLEtTrouvSIWH3RihWooWWFK31hVSi8TIlbvMtPATsXfELmKx3/RbphNdAvv1+S4ZcOrO3Xd2Ho6GK4O1jZX++svP57v2zwe4hGecKeeYR2vsIERKzh8wmd8ib5GP6Kf0el5aNTrdvQBfjszc2c+aK2E < /latexit > < latexit sha1_base64= '' l3bLjRin9e7kp/bNCL7QGHXte5U= '' > AAADTXicjVLLahRRED3TURPjK9GVuGkcBFdDjyToMhCQLCM4SSAJofvOnXhNv7h92zAMAf/Arfkq1/6BfoA7EU9VOmISfNymu+ueqlNVp6iszl0TkuRzL5q7dv3G/MLNxVu379y9t7R8f6upWm/syFR55XeytLG5K+0ouJDbndrbtMhyu50drYt/+531javK12Fa2/0iPSzdxJk0EBqND2ZvTw6W+skg0RNfNYad0Ud3Nqvl3kPsYYwKBi0KWJQItHOkaPjsYogENbF9zIh5Wk79FidYJLdllGVESvSI30Pedju05F1yNso2rJLz9WTGeEJOxThPW6rF6m81s6B/yj3TnNLblP+sy1UQDXhD9F+888j/5YmWgAleqAZHTbUios50WVqdinQe/6YqMENNTOwx/Z62Ueb5nGPlNKpdZpuq/4tGCip308W2+Np16RWxONaJFaqhZIUZfRNVKb1MiVi9y0wDOxV/Q+QyHv9Fu2E20S28X5Pjlg0v79RVY+vZYLgyWH210l97+f5s3xbwCI/xlDv1HGvYwCZGrODwAR9xGn2KvkXfox9noVGv29EHuHDm5n8CRyOthw== < /latexit > < latexit sha1_base64= '' Z/Xj3rH/fFWBwjJhd6cUdR/2itw= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMwGJT4GBPExgpsEsiHM9PauTeZGd09kWYT8R171o8Qf0L/wdGUimuClh5mpOlWnuk5RWZ0b55PkS6cb3bh563bvTv/uvfsP1gbrD/dc1VilJ6rKK3uQpU7nptQTb3yuD2qr0yLL9X528irE90+1daYq3/llrY+KdFGauVGpJ3Q8WNucps7HU2/ymY4Xm8eDYTJK5MTXjXFrDNGe3Wq98whTzFBBoUEBjRKedo4Ujs8hxkhQEzvCipilZSSu8RF9chtmaWakRE/4XdA7bNGSfqjphK14S87XkhnjKTkV8yztcFss8UYqB/RPtVdSM/S25D9raxVEPd4T/RfvMvN/eUGLxxwvRYOhplqQoE61VRqZSug8/kWVZ4WaWLBnjFvaSpiXc46F40R7mG0q8W+SGdDgqza3wfe2SyuIxgeZWCEaSt6wYmwuKkMvSyJa/DBTz05D3BG5isd/0a5YLegOvJ+T45aNr+7UdWNvazR+Pnrxdmu48/rsYt96eIwneMad2sYO3mAXE9m7c3zC5+7XqBP1ov5FarfT7ugGfjvRxg9m4a35 < /latexit > < latexit sha1_base64= '' fYF6uGBHohxufzgVqN0lSMqhxww= '' > AAADWXicjVLbahRBED2742VdL9mYJ/FlcCP4tMyGiD4GAuJjBDcJZEOY6e1NmsyN7h5lWQT/I6/6UeIPmL/I6cpENMFLDzNTdapOdZ2isjo3zifJt043unX7zt3evf79Bw8frQxWH++6qrFKT1SVV3Y/S53OTakn3vhc79dWp0WW673sdDvE9z5o60xVvveLWh8W6XFp5kalntDRYGV9mjofT73JZzo+WT8aDJNRIie+aYxbY4j27FSrnSeYYoYKCg0KaJTwtHOkcHwOMEaCmtghlsQsLSNxjU/ok9swSzMjJXrK7zG9gxYt6YeaTtiKt+R8LZkxnpNTMc/SDrfFEm+kckD/VHspNUNvC/6ztlZB1OOE6L94V5n/ywtaPOZ4LRoMNdWCBHWqrdLIVELn8S+qPCvUxII9Y9zSVsK8mnMsHCfaw2xTif+QzIAGX7W5Dc7bLq0gGh9lYoVoKHnDkrG5qAy9LIho8cNMPTsNcUfkOh7/RbtitaA78H5Ojls2vr5TN43djdF4c/Ty3cZw683ny33r4Sme4QV36hW28BY7mMjeneELvna/R52oF/UvU7uddkfX8NuJ1i4Aacet+g== < /latexit > < latexit sha1_base64= '' OLePkk4dic2TAOMqELhCFUnk5Jo= '' > AAADUXicjVJda9RQED2brVpbtR8+iS/BrSAIS1IUfSwUxMcW3LZSS0lu79bYfHFzoyxLwf/Q1/qrfPIf6E/om2emqdQWP25IMvfMnJk5w6R1njU+ir71gv7MjZu3Zm/Pzd+5e29hcWl5q6laZ+zIVHnldtKksXlW2pHPfG53ameTIs3tdnq0Lv7tj9Y1WVW+8ZPa7hXJYZmNM5N4Qm9Xkv3ph6fx8cr+4iAaRnrC60bcGQN0Z6Na6j3AOxyggkGLAhYlPO0cCRo+u4gRoSa2hykxRytTv8Ux5shtGWUZkRA94veQt90OLXmXnI2yDavkfB2ZIR6TUzHO0ZZqofpbzSzon3JPNaf0NuE/7XIVRD3eE/0X7yLyf3mixWOMl6oho6ZaEVFnuiytTkU6Dy+p8sxQExP7gH5H2yjzYs6hchrVLrNN1P9dIwWVu+liW/zounSKWHzSiRWqoWSFKX1jVSm9TIhYvctMPTsVf0PkKh7+RbthNtEtvF+T45bFV3fqurG1OoyfDZ9vrg7WXn0+37dZPMQjPOFOvcAaXmMDI61wglN8Cb4GZ330g/PQoNft6H38dvrzPwF1j6xQ < /latexit > < latexit sha1_base64= '' jY/6R/KBN0tZFfcJH9F5wBe4Sjc= '' > AAADVXicjVLbahRBED27G2OMlyT6JL4MLoJPy2xQ9DGgiI8R3CQQF5np9MYmc7O7J2FZBP/CV/0q8Q/0IwRPVSaiCV56mJmqU3Wq6xSVN4ULMU2/9PqDpUvLl1eurF69dv3G2vrGzZ1Qt97YiamL2u/lWbCFq+wkuljYvcbbrMwLu5sfPZH47rH1wdXVyzhv7LTMDis3cyaLhKZPranLpg5OvNfrw3SU6kkuGuPOGKI72/VG7zZe4QA1DFqUsKgQaRfIEPjsY4wUDbEpFsQ8Ladxi3dYJbdllmVGRvSI30N6+x1a0ZeaQdmGtxR8PZkJ7pFTM8/TltsSjbdaWdA/1V5oTeltzn/e1SqJRrwh+i/eWeb/8kRLxAyPVYOjpkYRUWe6Kq1ORTpPflEVWaEhJvYB4562UebZnBPlBNUus800/lUzBRXfdLktvnVdekUsTnRipWqoeMOCsZmqlF7mRKz6MtPITiUeiJzHk79oN6wmuoX3c3LcsvH5nbpo7GyOxg9GD19sDreevT/dtxXcwV3c5049whaeYxsT3vAWH/ARn/qf+98HS4Pl09R+r9vRW/jtDNZ+AKHorw8= < /latexit > < latexit sha1_base64= '' cy37RpZeyiuIh1LD6v/ICm26dtA= '' > AAADVnicjVLbThRBED27K4J4YdEn4suEjYlPm1kC0UcSE+MjGhZIAM1M04sT5pbuHshmY+Jn+KpfJX+AP2E8VQxGIV56MjNVp+pU16lUWueZD3F83un2bs3dnl+4s3j33v0HS/3lhzu+apyxY1PlldtLE2/zrLTjkIXc7tXOJkWa29305IXEd0+t81lVbodpbQ+L5LjMJplJAqG3b6ypSh9cY8R91x/Ew1hPdNMYtcYA7dmqljsrOMARKhg0KGBRItDOkcDz2ccIMWpih5gRc7QyjVt8wCK5DbMsMxKiJ/we09tv0ZK+1PTKNrwl5+vIjPCEnIp5jrbcFmm80cqC/qn2TGtKb1P+07ZWQTTgPdF/8a4y/5cnWgImeK4aMmqqFRF1pq3S6FSk8+gXVYEVamJiHzHuaBtlXs05Uo5X7TLbROMXmimo+KbNbfCt7dIpYnGmEytUQ8kbZoxNVKX0MiVi1ZeZBnYqcU/kOh79RbthNdEtvJ+T45aNru/UTWNnbThaH268Xhtsvvx4uW8LeIxVPOVOPcMmXmELY97g8Amf8aX7tfu9N9ebv0ztdtodfYTfTq//A0+7r54= < /latexit > 2.3 WAVELET REPRESENTATION OF PERIODIC CURVES < latexit sha1_base64= '' /r8pzfVx4NPn5wchjI9gPOjn8Gs= '' > AAACeXicbVG7TsNAELyYd3hDSRMISIgisnmXiDQUgEAkgIQtWF/W4ZR7WL4zEJ38CbTwbXwLDSZxQRKmGu3Mamc1YcyZNq77VXLGxicmp6ZnyrNz8wuLS8srt1qlCcUmVVwl9yFo5Exi0zDD8T5OEETI8S7s1H/1uxdMNFOyYboxBgLakkWMgslHN5tm83Gp6tbcHiqjxCtIlRS4elwuPfktRVOB0lAOWj94bmwCC4lhlGNW9lONMdAOtPEhpxIE6sD2smaVrTiPXuFQoSrlmCZ/3RaE1l0R5i4B5lkPa7/Df7VQqY6BUA/dNtFxYJmMU4OSDmoNL7CRkiOC1VHvyr+xBoZv/YfKfoISX6kSAmRrx49AMN5tYQQpN9bXUUFzY87ylnpr9hJeuqc8xcyeNS7OM+u6h4f1elbuI+/EG25glNzu1rz92sH1bvXksmhnmqyRDbJNPHJETsgZuSJNQkmbvJMP8ln6dtadbWenb3VKxc4qGYCz9wM79cIt < /latexit > < latexit sha1_base64= '' ZEtWR83MugYGN4gLCH8eIsigBmI= '' > AAADSnicjVLLThRRED3ToDx8ga6Mm44TEzdOug1GlyQkhCUaB0iQmO7LHezQr9y+jZlMTPwAtvhV/AB/gFt3xg2nioYgxMftdHfdU3Wq6lQqrfOs8VF00gumpm/dnpmdm79z9979BwuLDzeaqnXGDk2VV24rTRqbZ6Ud+szndqt2NinS3G6m+yvi3zywrsmq8r0f13anSPbKbJSZxBN69yL+uNCPBpGe8KYRd0Yf3VmvFnuP8QG7qGDQooBFCU87R4KGzzZiRKiJ7WBCzNHK1G/xBfPktoyyjEiI7vO7x9t2h5a8S85G2YZVcr6OzBDPyKkY52hLtVD9rWYW9E+5J5pTehvzn3a5CqIen4j+i3cR+b880eIxwhvVkFFTrYioM12WVqcinYdXVHlmqImJvUu/o22UeTHnUDmNapfZJuo/1UhB5W662Bbfuy6dIhafdWKFaihZYULfSFVKL2MiVu8yU89Oxd8QuY6Hf9FumE10C+9yctyy+PpO3TQ2Xg7ipcGrt0v95dWv5/s2iyd4iufcqddYxhrWMWSFEQ5xhG/BcfAj+Bn8Og8Net2OPsJvZ2r6DKsLq6I= < /latexit > < latexit sha1_base64= '' YHbYKgWPU0QsGYMI+mavrfy9jQE= '' > AAADSXicjVLLShxRED3Tk4evJJqsxE2TQXA1dAdDXAoByVIho4KR0H29Yxr7xe3bkWEIZJ9t/Kp8Qf4gWWYnrnKqbCVR8rhNd1edqlO3TlFpnWeNj6KvvaB/5+69+zOzc/MLDx4+Wlx6vNtUrTN2ZKq8cvtp0tg8K+3IZz63+7WzSZHmdi89eSnxvffWNVlVvvaT2h4WyXGZjTOTeEI78dvFQTSM9IS3jbgzBujOdrXUW8YbHKGCQYsCFiU87RwJGj4HiBGhJnaIKTFHK9O4xQfMkdsyyzIjIXrC7zG9gw4t6UvNRtmGt+R8HZkhVsmpmOdoy22hxlutLOifak+1pvQ24T/tahVEPd4R/RfvKvN/eaLFY4wN1ZBRU62IqDNdlVanIp2Hv6jyrFATE/uIcUfbKPNqzqFyGtUus000/k0zBRXfdLktvnddOkUsTnVihWooecOUsbGqlF4mRKz6MlPPTiXeELmJh3/RblhNdAvvenLcsvjmTt02dp8N4/Xh8531webWx8t9m8EKnmKNO/UCm3iFbYxU3yd8xlnwJfgRnAcXl6lBr9vRJ/jt9Ps/AQJYq2s= < /latexit > < latexit sha1_base64= '' FSU4zKQNQpu1mfMog0Yb2ywJWuM= '' > AAADVnicjVJda9RQED27a22tH93qk/gS3Aq+uCSLYh8LgvhYwW0LbZXk9m4NzRc3N5YlLPgzfNVfpf9A/4R4ZpqKtvhxQ5K5Z+bMzBkmqbK09mH4pdcfXFm6urxybfX6jZu31obrt3fqsnHGTk2ZlW4viWubpYWd+tRndq9yNs6TzO4mJ8/Ev/vOujoti1d+XtnDPD4u0llqYk/o9cajg5mLTRst2sli481wFI5DPcFlI+qMEbqzXa737uIARyhh0CCHRQFPO0OMms8+IoSoiB2iJeZopeq3WGCV3IZRlhEx0RN+j3nb79CCd8lZK9uwSsbXkRngATkl4xxtqRaov9HMgv4pd6s5pbc5/0mXKyfq8Zbov3jnkf/LEy0eM2yqhpSaKkVEnemyNDoV6Tz4RZVnhoqY2Ef0O9pGmedzDpRTq3aZbaz+rxopqNxNF9vgW9elU8TiVCeWq4aCFVr6ZqpSepkTsXqXmXp2Kv6ayEU8+It2w2yiW3g/J8ctiy7u1GVjZzKOHo+fvJyMtp6/P9u3FdzDfTzkTj3FFl5gG1NWcPiAj/jU/9z/PlgaLJ+F9nvdjt7Bb2cw/AEAo658 < /latexit > < latexit sha1_base64= '' W+g+ncPrRTPoSFN1xOYakWb+NAY= '' > AAADVXicjVJda9RQED27W2utH231SXwJbgWflmRR9LEgiI8V3LbQLpLc3q2h+erNTcsSFvwXvuqvEv+B/gjBM9NUtMWPG5LMPTNnZs4wSZWltQ/DL73+YOna8vWVG6s3b92+s7a+cXenLhtn7MSUWen2kri2WVrYiU99ZvcqZ+M8yexucvxC/Lun1tVpWbzx88pO8/ioSGepiT2h6ebBzMWmjRbteLH5dn0YjkI9wVUj6owhurNdbvTu4wCHKGHQIIdFAU87Q4yazz4ihKiITdESc7RS9VsssEpuwyjLiJjoMb9HvO13aMG75KyVbVgl4+vIDPCInJJxjrZUC9TfaGZB/5S71ZzS25z/pMuVE/V4R/RfvIvI/+WJFo8ZnquGlJoqRUSd6bI0OhXpPPhFlWeGipjYh/Q72kaZF3MOlFOrdpltrP6vGimo3E0X2+Bb16VTxOJMJ5arhoIVWvpmqlJ6mROxepeZenYq/prIZTz4i3bDbKJbeD8nxy2LLu/UVWNnPIqejJ6+Hg+3Xr4/37cVPMBDPOZOPcMWXmEbE1Y4wQd8xKf+5/73wdJg+Ty03+t29B5+O4O1H1W2rkU= < /latexit > < latexit sha1_base64= '' AjTIgg7tXsNgyxVMgwyZye+1p4s= '' > AAADWXicjVLbahRBED2742VdL9mYJ8nL4EbwaZkNij4GAuJjBDcJZGPo6fSuQ+ZGd4+yLAH/I6/6UeIP6F94ujIJmuClh5mpOlWnuk5RaZ1nzifJ1043unHz1u3enf7de/cfrAxWH+66qrHaTHSVV3Y/Vc7kWWkmPvO52a+tUUWam730ZDvE9z4Y67KqfOsXtTks1LzMZplWntDRYGVjOldFod4tp8r5042jwTAZJXLi68a4NYZoz0612nmEKY5RQaNBAYMSnnYOBcfnAGMkqIkdYknM0sokbnCKPrkNswwzFNETfuf0Dlq0pB9qOmFr3pLztWTGeEJOxTxLO9wWS7yRygH9U+2l1Ay9LfhP21oFUY/3RP/Fu8j8X17Q4jHDS9GQUVMtSFCn2yqNTCV0Hv+iyrNCTSzYx4xb2lqYF3OOheNEe5itkvh3yQxo8HWb2+BH26UVxOCjTKwQDSVvWDI2E5WhlwURI36YqWenIe6IXMXjv2jXrBZ0B97l5Lhl46s7dd3Y3RyNn42ev9kcbr36dL5vPazjMZ5yp15gC6+xg4ns3Rk+40v3W9SJelH/PLXbaXd0Db+daO0nOJaumQ== < /latexit > < latexit sha1_base64= '' uTwUh36rLJXOXCXjwgS2Io5nNVU= '' > AAADZXicjVLbahRBED274yVGo7sqiuTBwSD44jKzKPpmQBAfI7hJIInLTKc3jpkbPT3KMgzoh/govuoH+OBn+AXqX3i6MhFN8NLLTlefqlNVp6i4TJPKBsGXXt87cfLU6YUzi2fPLZ2/MBheXK+K2ig9UUVamM04qnSa5HpiE5vqzdLoKItTvRHvP3T+jZfaVEmRP7XzUu9k0V6ezBIVWULTwfL2zESqCf3b/viZXC+mTdi2bTNup4OVYBTI8Y8bYWesrD64+vnTu+HbtWLYu4Zt7KKAQo0MGjks7RQRKv62ECJASWwHDTFDKxG/RotFcmtGaUZERPf53eNrq0Nzvl3OStiKVVL+DZk+bpJTMM7QdtV88deS2aF/yt1ITtfbnHfc5cqIWjwn+i/eYeT/8pwWixnui4aEmkpBnDrVZallKq5z/xdVlhlKYs7epd/QVsI8nLMvnEq0u9lG4v8mkQ51b9XF1vjedWkE0XglE8tEQ84KDX0zUel6mRPR8nYztezU+SsiR3H/L9oVszndjvdzctyy8OhOHTfWx6PwzujuE67bo9eQs4Bl3MAt7tQ9rOIx1jBhhTd4jw/42P/qLXmXvSsHof3ewY1L+O14138AyXe1pQ== < /latexit > In this section we explain how a scalar-valued periodic signal γ with period l > 0 can be approximated using a MRA . Let j1 ∈ N be a desired resolution-level . First , we re-parameterize γ to have period 1 . The reason for this is rather technical and we refer the reader to Appendix A.1 . In essence , we require the number of approximation coefficients to be a power of two and this parameterization fits nicely with this requirement . Next , to address the issue that periodic signals are not contained in L2 ( R ) , we restrict the re-parameterized curve to [ −1 , 1 ] , i.e. , set γ∗ ( t ) : = γ ( lt ) 1 [ −1,1 ] ( t ) . In general , this will introduce discontinuities at the boundary points−1 and 1 . This is , however , not an issue , since we only need information about γ∗ on a strict subset [ I0 , I1 ] ⊂ [ −1 , 1 ] of length 1 . It is shown in Lemma A.1 how ( and which ) approximation coefficients can be related to the sample values of γ . In particular , if j1 is sufficiently large , the approximation coefficients needed to ( approximately ) cover [ −1 , 1 ] are ( aj1k ( γ∗ ) ) b2 j1−βc k=−2j1 . Here β > 0 is the support of the underlying wavelet . These coefficients will be close to the ( scaled ) sample values of γ on { k2−j1 : −2j1 ≤ k ≤ b2j1 − βc } . Motivated by this observation , and the fact that we only need γ on [ − 12 , 12 ] , we use the coefficients ( aj1k ( γ ∗ ) ) 2 j1−1−1 k=−2j1−1 only , which cover [ − 12 , 1−2 1−j1 2 ] approximately , see Figure 3 . To ensure that 2j1−1 − 1 < b2j1 − βc , we require that j1 ≥ ⌈ log ( β−1 ) log ( 2 ) + 1 ⌉ . This quantity is well-defined for all bases considered in this paper , except the Haar-basis . | In this paper the authors propose a mixed approach to image segmentation using CNNs and wavelets. Although this approach is not new, to the best of the reviewer's knowledge, it is the first time it has been applied to medical image segmentation. It basically consists of applying an encoder-decoder structure in which the encoder is a CNN and the decoder is based on a traditional (Pyramid Algorithm) Wavelet method. To validate the proposed method, they compare their results with a general and complete CNN method. The results demonstrate that it could be a powerful approximation: fast, accurate and easy to train. | SP:b891a16652f0c4d81e4ecd256aa6f67a2d5ffc39 |
Understanding Square Loss in Training Overparametrized Neural Network Classifiers | 1 INTRODUCTION . The pursuit of better classifiers has fueled the progress of machine learning and deep learning research . The abundance of benchmark image datasets , e.g. , MNIST , CIFAR , ImageNet , etc. , provides test fields for all kinds of new classification models , especially those based on deep neural networks ( DNN ) . With the introduction of CNN , ResNets , and transformers , DNN classifiers are constantly improving and catching up to the human-level performance . In contrast to the active innovations in model architecture , the training objective remains largely stagnant , with cross-entropy loss being the default choice . Despite its popularity , cross-entropy has been shown to be problematic in some applications . Among others , Yu et al . ( 2020 ) argued that features learned from cross-entropy lack interpretability and proposed a new loss aiming for maximum coding rate reduction . Pang et al . ( 2019 ) linked the use of cross-entropy to adversarial vulnerability and proposed a new classification loss based on latent space matching . Guo et al . ( 2017 ) discovered that the confidence of most DNN classifiers trained with cross-entropy is not well-calibrated . Recently , several alternative losses have seen revived interests for deep classifiers . In particular , many existing works have presented empirical evidence promoting the use of square loss over crossentropy . Hui & Belkin ( 2020 ) conducted large-scale experiments comparing the two and found that square loss tends to perform better in natural language processing related tasks while cross-entropy usually yields slightly better accuracy in image classification . Similar comparisons are also made in Demirkaya et al . ( 2020 ) . Kornblith et al . ( 2020 ) compared a variety of loss functions and output layer regularization strategies on the accuracy and out-of-distribution robustness , and found that square loss has greater class separation and better out-of-distribution robustness . In comparison to the empirical investigation , theoretical understanding of square loss in training deep learning classifiers is still lacking . Through our lens , square loss has its uniqueness among classic classification losses , and we argue that it has great potentials for modern classification tasks . Below we list our motivations and reasons why . Explicit feature modeling Deep learning ’ s success can be largely attributed to its superior ability as feature extractors . For classification , the ideal features should be separated between classes and concentrated within classes . However , when optimizing cross-entropy loss , it ’ s not clear what the learned features should look like ( Yu et al. , 2020 ) . In comparison , square loss uses the label codings ( one-hot , simplex etc . ) as features , which can be modeled explicitly to control class separations . Model Calibration An ideal classifier should not only give the correct class prediction , but also with the correct confidence . Calibration error measures the closeness of the predicted confidence to the underlying conditional probability ⌘ . Using square loss in classification can be essentially viewed as regression where it treats discrete labels as continuous code vectors . It can be shown that the optimal classifier under square loss is 2⌘ 1 , linear with the ground truth . This distinguishing property allows it to easily recover ⌘ . In comparison , the optimal classifiers under the hinge loss and cross-entropy are sign ( 2⌘ 1 ) and log ( ⌘1 ⌘ ) , respectively . Therefore , hinge loss doesn ’ t provide reliable information on the prediction confidence , and cross-entropy can be problematic when ⌘ is close to 0 or 1 ( Zhang , 2004 ) . Hence , in terms of model calibration , square loss is a natural choice . Connections to popular approaches Mixup ( Zhang et al. , 2017 ) is a popular data augmentation technique where augmented data are constructed via convex combinations of inputs and their labels . Like in square loss , mixup treats labels as continuous and is shown to improve the generalization of DNN classifiers . In knowledge distillation ( Hinton et al. , 2015 ) , where a student classifier is trying to learn from a trained teacher , Menon et al . ( 2021 ) proved that the “ optimal ” teacher with the ground truth conditional probabilities provides the lowest variance in student learning . Since classifiers trained using square loss is a natural consistent estimator of ⌘ , one can argue that it is a better teacher . In supervised contrastive learning ( Khosla et al. , 2020 ) , the optimal features are the same as those from square loss with simplex label coding ( Graf et al. , 2021 ) ( details in Section 4 ) . Despite its lack of popularity in practice , square loss has many advantages that can be easily overlooked . In this work , we systematically investigate from a statistical estimation perspective , the properties of deep learning classifiers trained using square loss . The neural networks in our analysis are required to be sufficiently overparametrized in the neural tangent kernel ( NTK ) regime . Even though this restricts the implication of our results , it is a necessary first step towards a deeper understanding . In summary , our main contributions are : • Generalization error bound : We consider two cases , according to whether classes are separable or not . In the general non-separable case , we adopt the classical binary classification setting with smooth conditional probability . Fast rate of convergence is established for overparametrized neural network classifiers with Tsybakov ’ s noise condition . If two classes are separable with positive margins , we show that overparametrized neural network classifiers can provably reach zero misclassification error with probability exponentially tending to one . To the best of our knowledge , this is the first such result for separable but not linear separable classes . Furthermore , we bridge these two cases and offer a unified view by considering auxiliary random noise injection . • Robustness ( margin property ) : When two classes are separable , the decision boundary is not unique and large-margin classifiers are preferred . In the separable case , we further show that the decision boundary of overparametrized neural network classifiers trained by square loss can not be too close to the data support and the resulting margin is lower bounded away from zero , providing theoretical guarantees for robustness . • Calibration error : We show that classifiers trained using square loss are inherently well-calibrated , i.e. , the trained classifier provides consistent estimation of the ground-truth conditional probability in L1 norm . Such property doesn ’ t hold for cross-entropy . • Empirical evaluation : We corroborate our theoretical findings with empirical experiments in both synthetic low-dimensional data and real image data . Comparing to cross-entropy , square loss has comparable generalization error but noticeable advantages in robustness and model calibration . This work contributes towards the theoretical understanding of deep classifiers , from an estimation point of view , which has been a classic topic in statistics literature . Among others , Mammen & Tsybakov ( 1999 ) established the optimal convergence rate for 0-1 loss excess risk when the decision boundary is smooth . Zhang ( 2004 ) ; Bartlett et al . ( 2006 ) extended the analysis to various surrogate losses . Audibert & Tsybakov ( 2007 ) ; Kohler & Krzyzak ( 2007 ) studied the convergence rates for plug-in classifiers from local averaging estimators . Steinwart et al . ( 2007 ) investigated the convergence rate for support vector machine using Gaussian kernels . We build on and extend classic results to neural networks in the NTK regime . Comparing to existing works on deep learning classification , e.g. , Kim et al . ( 2018 ) derived fast convergence rates of ReLU DNN classifiers that minimize the empirical hinge loss , our results incorporate the training algorithm and apply to trained classifiers . We require the neural network to be overparametrized , which has been extensively studied recently , under the umbrella term NTK . Most such results are in the regression setting with a handful of exceptions . Ji & Telgarsky ( 2019 ) showed that only polylogarithmic width is sufficient for gradient descent to overfit the training data using logistic loss . Hu et al . ( 2020 ) proved generalization error bound for regularized NTK in classification . Cao & Gu ( 2019 ; 2020 ) provided optimization and generalization guarantees for overparametrized network trained with cross-entropy . In comparison , our results are sharper in the sense that we take the ground truth data assumptions into consideration . This allows a faster convergence rate , especially when the classes are separable , where the exponential convergence rate is attainable . The NTK framework greatly reduces the technical difficulty for our theoretical analysis . However , our results are mainly due to properties of the square loss itself and we expect them to hold for a wide range of classifiers . There are other works investigating the use of square loss for training ( deep ) classifiers . Han et al . ( 2021 ) uncovered that the “ neural collapse ” phenomenon also occurs under square loss where the last-layer features eventually collapse to their simplex-style class-means . Muthukumar et al . ( 2020 ) compared classification and regression tasks in the overparameterized linear model with Gaussian features , illustrating different roles and properties of loss functions used at the training and testing phases . Poggio & Liao ( 2019 ) made interesting observations on effects of popular regularization techniques such as batch normalization and weight decay on the gradient flow dynamics under square loss . These findings support our theoretical results ’ implication , which further strengthens our beliefs that the essence comes from the square loss and our analysis can go beyond NTK regime . The rest of this paper is arranged as follows . Section 2 presents some preliminaries . Main theoretical results are in Section 3 . The simplex label coding is discussed in Section 4 followed by numerical studies in Section 5 and conclusions in Section 6 . Technical proofs and details of the numerical studies can be found in the Appendix . 2 PRELIMINARIES . Notation For a function f : ⌦ ! R , let kfk1 = supx2⌦ |f ( x ) | and kfkp = ( R ⌦ |f ( x ) | pdx ) 1/p . For a vector x , kxkp denotes its p-norm , for 1 p 1 . Lp and lp are used to distinguish function norms and vector norms . For two positive sequences { an } n2N and { bn } n2N , we write an . bn if there exists a constant C > 0 such that an Cbn for all sufficiently large n. We write an ⇣ bn if an . bn and bn . an . Let [ N ] = { 1 , . . . , N } for N 2 N , I be the indicator function , and Id be the d⇥ d identity matrix . N ( µ , ⌃ ) represents Gaussian distribution with mean µ and covariance ⌃ . Classification problem settings Let P be an underlying probability measure on ⌦ ⇥ Y , where ⌦ ⇢ Rd is compact and Y = { 1 , 1 } . Let ( X , Y ) be a random variable with respect to P . Suppose we have observations { ( xi , yi ) } ni=1 ⇢ ( ⌦ ⇥ Y ) n i.i.d . sampled according to P . The classification task is to predict the unobserved label y given a new input x 2 ⌦ . Let ⌘ defined on ⌦ denote the conditional probability , i.e. , ⌘ ( x ) = P ( y = 1|x ) . Let PX be the marginal distribution of P on X . The key quantity of interest is the misclassification error , i.e. , 0-1 loss . In the population level , the 0-1 loss can be written as L ( f ) = E ( X , Y ) ⇠P I { sign ( f ( X ) ) 6= Y } =EX⇠PX [ ( 1 ⌘ ( X ) ) I { f ( X ) 0 } + ⌘ ( X ) I { f ( X ) < 0 } ] , ( 2.1 ) where the expectation is taken with respect to the probability measure P . Clearly , an optimal classifier with the minimal 0-1 loss is 2⌘ 1 . According to whether labels are deterministic , there are two scenarios of interest . If ⌘ only takes values from { 0 , 1 } , i.e. , labels are deterministic , we call this case the separable case1 . Let ⌦1 = 1In the separable case we consider , the classes are not limited to linearly separable but can be arbitrarily complicated . { x|⌘ ( x ) = 1 } , ⌦2 = { x|⌘ ( x ) = 0 } and ⌦ = ⌦1 [ ⌦2 . If the probability measure of { x|⌘ ( x ) 2 ( 0 , 1 ) } is non-zero , i.e. , the labels contain randomness , we call this case the non-separable case . In the separable case , we further assume that there exists a positive margin , i.e. , dist ( ⌦1 , ⌦2 ) 2 > 0 , where is a constant , and dist ( ⌦1 , ⌦2 ) = infx2⌦1 , x02⌦2 kx x0k2 . In the non-separable case , to quantify the difficulty of classification , we adopt the well-established Tsybakov ’ s noise condition ( Audibert & Tsybakov , 2007 ) , which measures how large the “ difficult region ” is where ⌘ ( x ) ⇡ 1/2 . Definition 2.1 ( Tsybakov ’ s noise condition ) . Let 2 [ 0,1 ] . We say P has Tsybakov noise exponent if there exists a constant C , T > 0 such that for all 0 < t < T , PX ( |2⌘ ( X ) 1| < t ) C ·t . A large value of implies the difficult region to be small . It is expected that a larger leads to a faster convergence rate of a neural network classifier . This intuition is verified for the overparametrized neural network classifier trained by square loss and ` 2 regularization . See Section 3 for more details . Neural network setup We mainly focus on the one-hidden-layer ReLU neural network family F with m nodes in the hidden layer , denoted by fW , a ( x ) = 1p m mX r=1 ar ( W > r x ) , where x 2 ⌦ , W = ( W1 , · · · , Wm ) 2 Rd⇥m is the weight matrix in the hidden layer , a = ( a1 , · · · , am ) > 2 Rm is the weight vector in the output layer , ( z ) = max { 0 , z } is the rectified linear unit ( ReLU ) . The initial values of the weights are independently generated from Wr ( 0 ) ⇠ N ( 0 , ⇠2Im ) , ar ⇠ unif { 1 , 1 } , 8r 2 [ m ] . Based on the observations { ( xi , yi ) } ni=1 , the goal of training a neural network is to find a solution to min W nX i=1 l ( fW , a ( xi ) , yi ) + µR ( W , a ) , ( 2.2 ) where l is the loss function , R is the regularization , and µ 0 is the regularization parameter . Note in Equation 2.2 that we only consider training the weights W . This is because a · ( z ) = sign ( a ) · ( |a|z ) , which allows us to reparametrize the network to have all ai ’ s to be either 1 or 1 . In this work , we consider square loss associated with ` 2 regularization , i.e. , l ( fW , a ( xi ) , yi ) = ( fW , a ( xi ) yi ) 2 and R ( W , a ) = kW k22 . A popular way to train the neural network is via gradient based methods . It has been shown that the training process of DNNs can be characterized by the neural tangent kernel ( NTK ) ( Jacot et al. , 2018 ) . As is usually assumed in the NTK literature ( Arora et al. , 2019 ; Hu et al. , 2020 ; Bietti & Mairal , 2019 ; Hu et al. , 2021 ) , we consider data on the unit sphere Sd 1 , i.e. , kxik2 = 1 , 8i 2 [ n ] , and the neural network is highly overparametrized ( m n ) and trained by gradient descent ( GD ) . For details about NTK and GD in one-hidden-layer ReLU neural networks , we refer to Appendix A . In the rest of this work , we use fW ( k ) , a to denote the GD-trained neural network classifier under square loss associated with ` 2 regularization , where k is the iteration number satisfying Assumption D.1 and W ( k ) is the weight matrix after k-th iteration . | This paper studies square loss theoretically in the NTK regime. In this particular regime, authors find indications that square loss might lead to (adversarially) robust models and good calibration. Authors then run experiments outside of the NTK regime, on CIFAR-10 and CIFAR-100, to compare the robustness and calibration performance of square loss with cross-entropy. | SP:115075f2db37af8774161309c9f6c2acc04542ff |
Understanding Square Loss in Training Overparametrized Neural Network Classifiers | 1 INTRODUCTION . The pursuit of better classifiers has fueled the progress of machine learning and deep learning research . The abundance of benchmark image datasets , e.g. , MNIST , CIFAR , ImageNet , etc. , provides test fields for all kinds of new classification models , especially those based on deep neural networks ( DNN ) . With the introduction of CNN , ResNets , and transformers , DNN classifiers are constantly improving and catching up to the human-level performance . In contrast to the active innovations in model architecture , the training objective remains largely stagnant , with cross-entropy loss being the default choice . Despite its popularity , cross-entropy has been shown to be problematic in some applications . Among others , Yu et al . ( 2020 ) argued that features learned from cross-entropy lack interpretability and proposed a new loss aiming for maximum coding rate reduction . Pang et al . ( 2019 ) linked the use of cross-entropy to adversarial vulnerability and proposed a new classification loss based on latent space matching . Guo et al . ( 2017 ) discovered that the confidence of most DNN classifiers trained with cross-entropy is not well-calibrated . Recently , several alternative losses have seen revived interests for deep classifiers . In particular , many existing works have presented empirical evidence promoting the use of square loss over crossentropy . Hui & Belkin ( 2020 ) conducted large-scale experiments comparing the two and found that square loss tends to perform better in natural language processing related tasks while cross-entropy usually yields slightly better accuracy in image classification . Similar comparisons are also made in Demirkaya et al . ( 2020 ) . Kornblith et al . ( 2020 ) compared a variety of loss functions and output layer regularization strategies on the accuracy and out-of-distribution robustness , and found that square loss has greater class separation and better out-of-distribution robustness . In comparison to the empirical investigation , theoretical understanding of square loss in training deep learning classifiers is still lacking . Through our lens , square loss has its uniqueness among classic classification losses , and we argue that it has great potentials for modern classification tasks . Below we list our motivations and reasons why . Explicit feature modeling Deep learning ’ s success can be largely attributed to its superior ability as feature extractors . For classification , the ideal features should be separated between classes and concentrated within classes . However , when optimizing cross-entropy loss , it ’ s not clear what the learned features should look like ( Yu et al. , 2020 ) . In comparison , square loss uses the label codings ( one-hot , simplex etc . ) as features , which can be modeled explicitly to control class separations . Model Calibration An ideal classifier should not only give the correct class prediction , but also with the correct confidence . Calibration error measures the closeness of the predicted confidence to the underlying conditional probability ⌘ . Using square loss in classification can be essentially viewed as regression where it treats discrete labels as continuous code vectors . It can be shown that the optimal classifier under square loss is 2⌘ 1 , linear with the ground truth . This distinguishing property allows it to easily recover ⌘ . In comparison , the optimal classifiers under the hinge loss and cross-entropy are sign ( 2⌘ 1 ) and log ( ⌘1 ⌘ ) , respectively . Therefore , hinge loss doesn ’ t provide reliable information on the prediction confidence , and cross-entropy can be problematic when ⌘ is close to 0 or 1 ( Zhang , 2004 ) . Hence , in terms of model calibration , square loss is a natural choice . Connections to popular approaches Mixup ( Zhang et al. , 2017 ) is a popular data augmentation technique where augmented data are constructed via convex combinations of inputs and their labels . Like in square loss , mixup treats labels as continuous and is shown to improve the generalization of DNN classifiers . In knowledge distillation ( Hinton et al. , 2015 ) , where a student classifier is trying to learn from a trained teacher , Menon et al . ( 2021 ) proved that the “ optimal ” teacher with the ground truth conditional probabilities provides the lowest variance in student learning . Since classifiers trained using square loss is a natural consistent estimator of ⌘ , one can argue that it is a better teacher . In supervised contrastive learning ( Khosla et al. , 2020 ) , the optimal features are the same as those from square loss with simplex label coding ( Graf et al. , 2021 ) ( details in Section 4 ) . Despite its lack of popularity in practice , square loss has many advantages that can be easily overlooked . In this work , we systematically investigate from a statistical estimation perspective , the properties of deep learning classifiers trained using square loss . The neural networks in our analysis are required to be sufficiently overparametrized in the neural tangent kernel ( NTK ) regime . Even though this restricts the implication of our results , it is a necessary first step towards a deeper understanding . In summary , our main contributions are : • Generalization error bound : We consider two cases , according to whether classes are separable or not . In the general non-separable case , we adopt the classical binary classification setting with smooth conditional probability . Fast rate of convergence is established for overparametrized neural network classifiers with Tsybakov ’ s noise condition . If two classes are separable with positive margins , we show that overparametrized neural network classifiers can provably reach zero misclassification error with probability exponentially tending to one . To the best of our knowledge , this is the first such result for separable but not linear separable classes . Furthermore , we bridge these two cases and offer a unified view by considering auxiliary random noise injection . • Robustness ( margin property ) : When two classes are separable , the decision boundary is not unique and large-margin classifiers are preferred . In the separable case , we further show that the decision boundary of overparametrized neural network classifiers trained by square loss can not be too close to the data support and the resulting margin is lower bounded away from zero , providing theoretical guarantees for robustness . • Calibration error : We show that classifiers trained using square loss are inherently well-calibrated , i.e. , the trained classifier provides consistent estimation of the ground-truth conditional probability in L1 norm . Such property doesn ’ t hold for cross-entropy . • Empirical evaluation : We corroborate our theoretical findings with empirical experiments in both synthetic low-dimensional data and real image data . Comparing to cross-entropy , square loss has comparable generalization error but noticeable advantages in robustness and model calibration . This work contributes towards the theoretical understanding of deep classifiers , from an estimation point of view , which has been a classic topic in statistics literature . Among others , Mammen & Tsybakov ( 1999 ) established the optimal convergence rate for 0-1 loss excess risk when the decision boundary is smooth . Zhang ( 2004 ) ; Bartlett et al . ( 2006 ) extended the analysis to various surrogate losses . Audibert & Tsybakov ( 2007 ) ; Kohler & Krzyzak ( 2007 ) studied the convergence rates for plug-in classifiers from local averaging estimators . Steinwart et al . ( 2007 ) investigated the convergence rate for support vector machine using Gaussian kernels . We build on and extend classic results to neural networks in the NTK regime . Comparing to existing works on deep learning classification , e.g. , Kim et al . ( 2018 ) derived fast convergence rates of ReLU DNN classifiers that minimize the empirical hinge loss , our results incorporate the training algorithm and apply to trained classifiers . We require the neural network to be overparametrized , which has been extensively studied recently , under the umbrella term NTK . Most such results are in the regression setting with a handful of exceptions . Ji & Telgarsky ( 2019 ) showed that only polylogarithmic width is sufficient for gradient descent to overfit the training data using logistic loss . Hu et al . ( 2020 ) proved generalization error bound for regularized NTK in classification . Cao & Gu ( 2019 ; 2020 ) provided optimization and generalization guarantees for overparametrized network trained with cross-entropy . In comparison , our results are sharper in the sense that we take the ground truth data assumptions into consideration . This allows a faster convergence rate , especially when the classes are separable , where the exponential convergence rate is attainable . The NTK framework greatly reduces the technical difficulty for our theoretical analysis . However , our results are mainly due to properties of the square loss itself and we expect them to hold for a wide range of classifiers . There are other works investigating the use of square loss for training ( deep ) classifiers . Han et al . ( 2021 ) uncovered that the “ neural collapse ” phenomenon also occurs under square loss where the last-layer features eventually collapse to their simplex-style class-means . Muthukumar et al . ( 2020 ) compared classification and regression tasks in the overparameterized linear model with Gaussian features , illustrating different roles and properties of loss functions used at the training and testing phases . Poggio & Liao ( 2019 ) made interesting observations on effects of popular regularization techniques such as batch normalization and weight decay on the gradient flow dynamics under square loss . These findings support our theoretical results ’ implication , which further strengthens our beliefs that the essence comes from the square loss and our analysis can go beyond NTK regime . The rest of this paper is arranged as follows . Section 2 presents some preliminaries . Main theoretical results are in Section 3 . The simplex label coding is discussed in Section 4 followed by numerical studies in Section 5 and conclusions in Section 6 . Technical proofs and details of the numerical studies can be found in the Appendix . 2 PRELIMINARIES . Notation For a function f : ⌦ ! R , let kfk1 = supx2⌦ |f ( x ) | and kfkp = ( R ⌦ |f ( x ) | pdx ) 1/p . For a vector x , kxkp denotes its p-norm , for 1 p 1 . Lp and lp are used to distinguish function norms and vector norms . For two positive sequences { an } n2N and { bn } n2N , we write an . bn if there exists a constant C > 0 such that an Cbn for all sufficiently large n. We write an ⇣ bn if an . bn and bn . an . Let [ N ] = { 1 , . . . , N } for N 2 N , I be the indicator function , and Id be the d⇥ d identity matrix . N ( µ , ⌃ ) represents Gaussian distribution with mean µ and covariance ⌃ . Classification problem settings Let P be an underlying probability measure on ⌦ ⇥ Y , where ⌦ ⇢ Rd is compact and Y = { 1 , 1 } . Let ( X , Y ) be a random variable with respect to P . Suppose we have observations { ( xi , yi ) } ni=1 ⇢ ( ⌦ ⇥ Y ) n i.i.d . sampled according to P . The classification task is to predict the unobserved label y given a new input x 2 ⌦ . Let ⌘ defined on ⌦ denote the conditional probability , i.e. , ⌘ ( x ) = P ( y = 1|x ) . Let PX be the marginal distribution of P on X . The key quantity of interest is the misclassification error , i.e. , 0-1 loss . In the population level , the 0-1 loss can be written as L ( f ) = E ( X , Y ) ⇠P I { sign ( f ( X ) ) 6= Y } =EX⇠PX [ ( 1 ⌘ ( X ) ) I { f ( X ) 0 } + ⌘ ( X ) I { f ( X ) < 0 } ] , ( 2.1 ) where the expectation is taken with respect to the probability measure P . Clearly , an optimal classifier with the minimal 0-1 loss is 2⌘ 1 . According to whether labels are deterministic , there are two scenarios of interest . If ⌘ only takes values from { 0 , 1 } , i.e. , labels are deterministic , we call this case the separable case1 . Let ⌦1 = 1In the separable case we consider , the classes are not limited to linearly separable but can be arbitrarily complicated . { x|⌘ ( x ) = 1 } , ⌦2 = { x|⌘ ( x ) = 0 } and ⌦ = ⌦1 [ ⌦2 . If the probability measure of { x|⌘ ( x ) 2 ( 0 , 1 ) } is non-zero , i.e. , the labels contain randomness , we call this case the non-separable case . In the separable case , we further assume that there exists a positive margin , i.e. , dist ( ⌦1 , ⌦2 ) 2 > 0 , where is a constant , and dist ( ⌦1 , ⌦2 ) = infx2⌦1 , x02⌦2 kx x0k2 . In the non-separable case , to quantify the difficulty of classification , we adopt the well-established Tsybakov ’ s noise condition ( Audibert & Tsybakov , 2007 ) , which measures how large the “ difficult region ” is where ⌘ ( x ) ⇡ 1/2 . Definition 2.1 ( Tsybakov ’ s noise condition ) . Let 2 [ 0,1 ] . We say P has Tsybakov noise exponent if there exists a constant C , T > 0 such that for all 0 < t < T , PX ( |2⌘ ( X ) 1| < t ) C ·t . A large value of implies the difficult region to be small . It is expected that a larger leads to a faster convergence rate of a neural network classifier . This intuition is verified for the overparametrized neural network classifier trained by square loss and ` 2 regularization . See Section 3 for more details . Neural network setup We mainly focus on the one-hidden-layer ReLU neural network family F with m nodes in the hidden layer , denoted by fW , a ( x ) = 1p m mX r=1 ar ( W > r x ) , where x 2 ⌦ , W = ( W1 , · · · , Wm ) 2 Rd⇥m is the weight matrix in the hidden layer , a = ( a1 , · · · , am ) > 2 Rm is the weight vector in the output layer , ( z ) = max { 0 , z } is the rectified linear unit ( ReLU ) . The initial values of the weights are independently generated from Wr ( 0 ) ⇠ N ( 0 , ⇠2Im ) , ar ⇠ unif { 1 , 1 } , 8r 2 [ m ] . Based on the observations { ( xi , yi ) } ni=1 , the goal of training a neural network is to find a solution to min W nX i=1 l ( fW , a ( xi ) , yi ) + µR ( W , a ) , ( 2.2 ) where l is the loss function , R is the regularization , and µ 0 is the regularization parameter . Note in Equation 2.2 that we only consider training the weights W . This is because a · ( z ) = sign ( a ) · ( |a|z ) , which allows us to reparametrize the network to have all ai ’ s to be either 1 or 1 . In this work , we consider square loss associated with ` 2 regularization , i.e. , l ( fW , a ( xi ) , yi ) = ( fW , a ( xi ) yi ) 2 and R ( W , a ) = kW k22 . A popular way to train the neural network is via gradient based methods . It has been shown that the training process of DNNs can be characterized by the neural tangent kernel ( NTK ) ( Jacot et al. , 2018 ) . As is usually assumed in the NTK literature ( Arora et al. , 2019 ; Hu et al. , 2020 ; Bietti & Mairal , 2019 ; Hu et al. , 2021 ) , we consider data on the unit sphere Sd 1 , i.e. , kxik2 = 1 , 8i 2 [ n ] , and the neural network is highly overparametrized ( m n ) and trained by gradient descent ( GD ) . For details about NTK and GD in one-hidden-layer ReLU neural networks , we refer to Appendix A . In the rest of this work , we use fW ( k ) , a to denote the GD-trained neural network classifier under square loss associated with ` 2 regularization , where k is the iteration number satisfying Assumption D.1 and W ( k ) is the weight matrix after k-th iteration . | This paper provides a theoretical analysis of the squared loss for classification where cross-entropy loss is often the standard choice in both theory and practice. The authors show under some assumption of the data and the NTK regime, GD on squared loss enjoys fast convergence, strong robustness and good calibration. They also provide empirical results. | SP:115075f2db37af8774161309c9f6c2acc04542ff |
Understanding Square Loss in Training Overparametrized Neural Network Classifiers | 1 INTRODUCTION . The pursuit of better classifiers has fueled the progress of machine learning and deep learning research . The abundance of benchmark image datasets , e.g. , MNIST , CIFAR , ImageNet , etc. , provides test fields for all kinds of new classification models , especially those based on deep neural networks ( DNN ) . With the introduction of CNN , ResNets , and transformers , DNN classifiers are constantly improving and catching up to the human-level performance . In contrast to the active innovations in model architecture , the training objective remains largely stagnant , with cross-entropy loss being the default choice . Despite its popularity , cross-entropy has been shown to be problematic in some applications . Among others , Yu et al . ( 2020 ) argued that features learned from cross-entropy lack interpretability and proposed a new loss aiming for maximum coding rate reduction . Pang et al . ( 2019 ) linked the use of cross-entropy to adversarial vulnerability and proposed a new classification loss based on latent space matching . Guo et al . ( 2017 ) discovered that the confidence of most DNN classifiers trained with cross-entropy is not well-calibrated . Recently , several alternative losses have seen revived interests for deep classifiers . In particular , many existing works have presented empirical evidence promoting the use of square loss over crossentropy . Hui & Belkin ( 2020 ) conducted large-scale experiments comparing the two and found that square loss tends to perform better in natural language processing related tasks while cross-entropy usually yields slightly better accuracy in image classification . Similar comparisons are also made in Demirkaya et al . ( 2020 ) . Kornblith et al . ( 2020 ) compared a variety of loss functions and output layer regularization strategies on the accuracy and out-of-distribution robustness , and found that square loss has greater class separation and better out-of-distribution robustness . In comparison to the empirical investigation , theoretical understanding of square loss in training deep learning classifiers is still lacking . Through our lens , square loss has its uniqueness among classic classification losses , and we argue that it has great potentials for modern classification tasks . Below we list our motivations and reasons why . Explicit feature modeling Deep learning ’ s success can be largely attributed to its superior ability as feature extractors . For classification , the ideal features should be separated between classes and concentrated within classes . However , when optimizing cross-entropy loss , it ’ s not clear what the learned features should look like ( Yu et al. , 2020 ) . In comparison , square loss uses the label codings ( one-hot , simplex etc . ) as features , which can be modeled explicitly to control class separations . Model Calibration An ideal classifier should not only give the correct class prediction , but also with the correct confidence . Calibration error measures the closeness of the predicted confidence to the underlying conditional probability ⌘ . Using square loss in classification can be essentially viewed as regression where it treats discrete labels as continuous code vectors . It can be shown that the optimal classifier under square loss is 2⌘ 1 , linear with the ground truth . This distinguishing property allows it to easily recover ⌘ . In comparison , the optimal classifiers under the hinge loss and cross-entropy are sign ( 2⌘ 1 ) and log ( ⌘1 ⌘ ) , respectively . Therefore , hinge loss doesn ’ t provide reliable information on the prediction confidence , and cross-entropy can be problematic when ⌘ is close to 0 or 1 ( Zhang , 2004 ) . Hence , in terms of model calibration , square loss is a natural choice . Connections to popular approaches Mixup ( Zhang et al. , 2017 ) is a popular data augmentation technique where augmented data are constructed via convex combinations of inputs and their labels . Like in square loss , mixup treats labels as continuous and is shown to improve the generalization of DNN classifiers . In knowledge distillation ( Hinton et al. , 2015 ) , where a student classifier is trying to learn from a trained teacher , Menon et al . ( 2021 ) proved that the “ optimal ” teacher with the ground truth conditional probabilities provides the lowest variance in student learning . Since classifiers trained using square loss is a natural consistent estimator of ⌘ , one can argue that it is a better teacher . In supervised contrastive learning ( Khosla et al. , 2020 ) , the optimal features are the same as those from square loss with simplex label coding ( Graf et al. , 2021 ) ( details in Section 4 ) . Despite its lack of popularity in practice , square loss has many advantages that can be easily overlooked . In this work , we systematically investigate from a statistical estimation perspective , the properties of deep learning classifiers trained using square loss . The neural networks in our analysis are required to be sufficiently overparametrized in the neural tangent kernel ( NTK ) regime . Even though this restricts the implication of our results , it is a necessary first step towards a deeper understanding . In summary , our main contributions are : • Generalization error bound : We consider two cases , according to whether classes are separable or not . In the general non-separable case , we adopt the classical binary classification setting with smooth conditional probability . Fast rate of convergence is established for overparametrized neural network classifiers with Tsybakov ’ s noise condition . If two classes are separable with positive margins , we show that overparametrized neural network classifiers can provably reach zero misclassification error with probability exponentially tending to one . To the best of our knowledge , this is the first such result for separable but not linear separable classes . Furthermore , we bridge these two cases and offer a unified view by considering auxiliary random noise injection . • Robustness ( margin property ) : When two classes are separable , the decision boundary is not unique and large-margin classifiers are preferred . In the separable case , we further show that the decision boundary of overparametrized neural network classifiers trained by square loss can not be too close to the data support and the resulting margin is lower bounded away from zero , providing theoretical guarantees for robustness . • Calibration error : We show that classifiers trained using square loss are inherently well-calibrated , i.e. , the trained classifier provides consistent estimation of the ground-truth conditional probability in L1 norm . Such property doesn ’ t hold for cross-entropy . • Empirical evaluation : We corroborate our theoretical findings with empirical experiments in both synthetic low-dimensional data and real image data . Comparing to cross-entropy , square loss has comparable generalization error but noticeable advantages in robustness and model calibration . This work contributes towards the theoretical understanding of deep classifiers , from an estimation point of view , which has been a classic topic in statistics literature . Among others , Mammen & Tsybakov ( 1999 ) established the optimal convergence rate for 0-1 loss excess risk when the decision boundary is smooth . Zhang ( 2004 ) ; Bartlett et al . ( 2006 ) extended the analysis to various surrogate losses . Audibert & Tsybakov ( 2007 ) ; Kohler & Krzyzak ( 2007 ) studied the convergence rates for plug-in classifiers from local averaging estimators . Steinwart et al . ( 2007 ) investigated the convergence rate for support vector machine using Gaussian kernels . We build on and extend classic results to neural networks in the NTK regime . Comparing to existing works on deep learning classification , e.g. , Kim et al . ( 2018 ) derived fast convergence rates of ReLU DNN classifiers that minimize the empirical hinge loss , our results incorporate the training algorithm and apply to trained classifiers . We require the neural network to be overparametrized , which has been extensively studied recently , under the umbrella term NTK . Most such results are in the regression setting with a handful of exceptions . Ji & Telgarsky ( 2019 ) showed that only polylogarithmic width is sufficient for gradient descent to overfit the training data using logistic loss . Hu et al . ( 2020 ) proved generalization error bound for regularized NTK in classification . Cao & Gu ( 2019 ; 2020 ) provided optimization and generalization guarantees for overparametrized network trained with cross-entropy . In comparison , our results are sharper in the sense that we take the ground truth data assumptions into consideration . This allows a faster convergence rate , especially when the classes are separable , where the exponential convergence rate is attainable . The NTK framework greatly reduces the technical difficulty for our theoretical analysis . However , our results are mainly due to properties of the square loss itself and we expect them to hold for a wide range of classifiers . There are other works investigating the use of square loss for training ( deep ) classifiers . Han et al . ( 2021 ) uncovered that the “ neural collapse ” phenomenon also occurs under square loss where the last-layer features eventually collapse to their simplex-style class-means . Muthukumar et al . ( 2020 ) compared classification and regression tasks in the overparameterized linear model with Gaussian features , illustrating different roles and properties of loss functions used at the training and testing phases . Poggio & Liao ( 2019 ) made interesting observations on effects of popular regularization techniques such as batch normalization and weight decay on the gradient flow dynamics under square loss . These findings support our theoretical results ’ implication , which further strengthens our beliefs that the essence comes from the square loss and our analysis can go beyond NTK regime . The rest of this paper is arranged as follows . Section 2 presents some preliminaries . Main theoretical results are in Section 3 . The simplex label coding is discussed in Section 4 followed by numerical studies in Section 5 and conclusions in Section 6 . Technical proofs and details of the numerical studies can be found in the Appendix . 2 PRELIMINARIES . Notation For a function f : ⌦ ! R , let kfk1 = supx2⌦ |f ( x ) | and kfkp = ( R ⌦ |f ( x ) | pdx ) 1/p . For a vector x , kxkp denotes its p-norm , for 1 p 1 . Lp and lp are used to distinguish function norms and vector norms . For two positive sequences { an } n2N and { bn } n2N , we write an . bn if there exists a constant C > 0 such that an Cbn for all sufficiently large n. We write an ⇣ bn if an . bn and bn . an . Let [ N ] = { 1 , . . . , N } for N 2 N , I be the indicator function , and Id be the d⇥ d identity matrix . N ( µ , ⌃ ) represents Gaussian distribution with mean µ and covariance ⌃ . Classification problem settings Let P be an underlying probability measure on ⌦ ⇥ Y , where ⌦ ⇢ Rd is compact and Y = { 1 , 1 } . Let ( X , Y ) be a random variable with respect to P . Suppose we have observations { ( xi , yi ) } ni=1 ⇢ ( ⌦ ⇥ Y ) n i.i.d . sampled according to P . The classification task is to predict the unobserved label y given a new input x 2 ⌦ . Let ⌘ defined on ⌦ denote the conditional probability , i.e. , ⌘ ( x ) = P ( y = 1|x ) . Let PX be the marginal distribution of P on X . The key quantity of interest is the misclassification error , i.e. , 0-1 loss . In the population level , the 0-1 loss can be written as L ( f ) = E ( X , Y ) ⇠P I { sign ( f ( X ) ) 6= Y } =EX⇠PX [ ( 1 ⌘ ( X ) ) I { f ( X ) 0 } + ⌘ ( X ) I { f ( X ) < 0 } ] , ( 2.1 ) where the expectation is taken with respect to the probability measure P . Clearly , an optimal classifier with the minimal 0-1 loss is 2⌘ 1 . According to whether labels are deterministic , there are two scenarios of interest . If ⌘ only takes values from { 0 , 1 } , i.e. , labels are deterministic , we call this case the separable case1 . Let ⌦1 = 1In the separable case we consider , the classes are not limited to linearly separable but can be arbitrarily complicated . { x|⌘ ( x ) = 1 } , ⌦2 = { x|⌘ ( x ) = 0 } and ⌦ = ⌦1 [ ⌦2 . If the probability measure of { x|⌘ ( x ) 2 ( 0 , 1 ) } is non-zero , i.e. , the labels contain randomness , we call this case the non-separable case . In the separable case , we further assume that there exists a positive margin , i.e. , dist ( ⌦1 , ⌦2 ) 2 > 0 , where is a constant , and dist ( ⌦1 , ⌦2 ) = infx2⌦1 , x02⌦2 kx x0k2 . In the non-separable case , to quantify the difficulty of classification , we adopt the well-established Tsybakov ’ s noise condition ( Audibert & Tsybakov , 2007 ) , which measures how large the “ difficult region ” is where ⌘ ( x ) ⇡ 1/2 . Definition 2.1 ( Tsybakov ’ s noise condition ) . Let 2 [ 0,1 ] . We say P has Tsybakov noise exponent if there exists a constant C , T > 0 such that for all 0 < t < T , PX ( |2⌘ ( X ) 1| < t ) C ·t . A large value of implies the difficult region to be small . It is expected that a larger leads to a faster convergence rate of a neural network classifier . This intuition is verified for the overparametrized neural network classifier trained by square loss and ` 2 regularization . See Section 3 for more details . Neural network setup We mainly focus on the one-hidden-layer ReLU neural network family F with m nodes in the hidden layer , denoted by fW , a ( x ) = 1p m mX r=1 ar ( W > r x ) , where x 2 ⌦ , W = ( W1 , · · · , Wm ) 2 Rd⇥m is the weight matrix in the hidden layer , a = ( a1 , · · · , am ) > 2 Rm is the weight vector in the output layer , ( z ) = max { 0 , z } is the rectified linear unit ( ReLU ) . The initial values of the weights are independently generated from Wr ( 0 ) ⇠ N ( 0 , ⇠2Im ) , ar ⇠ unif { 1 , 1 } , 8r 2 [ m ] . Based on the observations { ( xi , yi ) } ni=1 , the goal of training a neural network is to find a solution to min W nX i=1 l ( fW , a ( xi ) , yi ) + µR ( W , a ) , ( 2.2 ) where l is the loss function , R is the regularization , and µ 0 is the regularization parameter . Note in Equation 2.2 that we only consider training the weights W . This is because a · ( z ) = sign ( a ) · ( |a|z ) , which allows us to reparametrize the network to have all ai ’ s to be either 1 or 1 . In this work , we consider square loss associated with ` 2 regularization , i.e. , l ( fW , a ( xi ) , yi ) = ( fW , a ( xi ) yi ) 2 and R ( W , a ) = kW k22 . A popular way to train the neural network is via gradient based methods . It has been shown that the training process of DNNs can be characterized by the neural tangent kernel ( NTK ) ( Jacot et al. , 2018 ) . As is usually assumed in the NTK literature ( Arora et al. , 2019 ; Hu et al. , 2020 ; Bietti & Mairal , 2019 ; Hu et al. , 2021 ) , we consider data on the unit sphere Sd 1 , i.e. , kxik2 = 1 , 8i 2 [ n ] , and the neural network is highly overparametrized ( m n ) and trained by gradient descent ( GD ) . For details about NTK and GD in one-hidden-layer ReLU neural networks , we refer to Appendix A . In the rest of this work , we use fW ( k ) , a to denote the GD-trained neural network classifier under square loss associated with ` 2 regularization , where k is the iteration number satisfying Assumption D.1 and W ( k ) is the weight matrix after k-th iteration . | The paper studies wide neural networks trained with the square loss in the neural tangent kernel regime from a theoretical perspective. In particular, it provides generalization error bounds, robustness and calibration results and makes a connection to supervised contrastive learning. Furthermore, an empirical comparison between cross entropy and square loss is provided. | SP:115075f2db37af8774161309c9f6c2acc04542ff |
A Program to Build E(N)-Equivariant Steerable CNNs | 1 INTRODUCTION . In machine learning , it is common for tasks to present a number of symmetries . A symmetry in the data occurs , for example , when some property ( e.g. , the label ) does not change if a set of transformations is applied to the data itself , e.g . translations or rotations of images . Symmetries are algebraically described by groups . If prior knowledge about the symmetries of a task is available , it is usually beneficial to encode them in the models used ( Shawe-Taylor , 1989 ; Cohen & Welling , 2016a ) . The property of such models is referred to as equivariance and is obtained by introducing some equivariance constraints in the architecture ( see Eq . 2 ) . A classical example are convolutional neural networks ( CNNs ) , which achieve translation equivariance by constraining linear layers to be convolution operators . A wider class of equivariant models are Euclidean steerable CNNs ( Cohen & Welling , 2016b ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ; Jenner & Weiler , 2021 ) , which guarantee equivariance to isometries of a Euclidean space Rn , i.e. , to translations and a group G of originpreserving transformations , such as rotations and reflections . As proven in Weiler et al . ( 2018a ; 2021 ) ; Jenner & Weiler ( 2021 ) , this requires convolutions with G-steerable ( equivariant ) kernels . Our goal is developing a program to implement any semi-direct product group Rn oG equivariant CNN , with compact G , minimizing the requirements to implement new G-steerable kernels . Lang & Weiler ( 2020 ) provides a first step in this direction by generalizing the Wigner-Eckart theorem from quantum mechanics to obtain a general technique to parametrize G-steerable kernel spaces over orbits of a compact G. The theorem reduces the task of building steerable kernel bases to that of finding some pure representation theoretic ingredients . Since the equivariance constraint only relates points g.x ∈ Rn in the same orbit G.x ⊂ Rn , a kernel can take independent values on different orbits . Fig . 1 shows examples of orbits in R2 under the action of continuous planar rotations G = SO ( 2 ) ( orbits are rings of different radii ) and of discrete rotations by π2 , G = C4 ( orbits are sets of four points ) . Hence , Lang & Weiler ( 2020 ) suggest independently parameterizing orbits of G in Rn ( colored regions in Fig.1 ) . While this guarantees a complete parameterization of G-steerable functions , convolution requires kernels to be integrable , and the numerical discretization of the filters requires them to be sufficiently band-limited1 . Indeed , particular care should be taken to avoid aliasing effects while discretizing filters on a grid ( e.g. , to process voxelized data ) . Lang & Weiler ( 2020 ) naturally support band-limiting along each orbit of G but do not restrict the kernel across different orbits . Intuitively , this means that a filter can be decomposed into a finite number of orbits but these should then be patched together with some smoothness considerations . This introduces an important requirement and a sensitive design choice . First , building a new G-steerable CNNs requires one to identify the orbits of G in Rn . Second , the choice of orbits to consider affect the band-limitation of a filter , but this relation is hard to explicitly quantify in a general setting . This problem is more severe for smaller groups G ( particularly , finite ones ) , as Rn decomposes into a larger number of orbits . For instance , if G = SO ( 2 ) in Fig . 1a , band-limiting along rings is controlled by the Wigner-Eckart theorem but is not enforced along the radial component . If G = C4 in Fig . 1b , each ring is partitioned into discrete orbits : because a larger number of orbits increases the maximum angular frequency , aliasing can be sensitive to this design choice . Contributions and Outline In this work , we solve this issue and propose a general solution strategy to build arbitrary CNNs with G- steerable kernels , for any compact group G. Theorem 2.1 generalizes the result of Lang & Weiler ( 2020 ) from G-homogeneous spaces to more general spaces X carrying a G-action . Our theorem relies on an initial basis for the unconstrained kernel space which is then restricted to a G-steerable subspace . Aliasing effects are thereby controlled by the choice of this initial basis on the general G-space X . In practice , in this work we focus on Euclidean spaces X = Rn , although the theory developed more generally supports semi-direct product groups , i.e . X oG . To support any compact group G with minimal requirements , we propose to choose an initial basis spanning a kernel space closed under the action of any such G , i.e . under G′ = O ( n ) . The benefits are two-fold : 1 ) it allows direct control on aliasing through the initial band-limited basis and 2 ) it completely disentangles the discretization issues from the choice of G , minimizing the requirements to implement equivariance to new groups . For example , this enables the parameterization of C4 filters without discretizing rings into a finite number of points as in Fig . 1b . Algorithm 1 summarizes our method and its requirements . Because of the large variety of symmetries in R3 , and since the planar case was extensively studied in Weiler & Cesa ( 2019 ) , in our experiments , we put particular emphasis on the 3D setting . To illustrate the generality of our method , we instantiate it on many different subgroups of O ( 3 ) , the group of 3D rotations and reflections , and compare them experimentally . This results in many new 3D convolution networks equivariant , for example , to icosahedral symmetries , axial symmetries , cylindrical symmetries or conical symmetries . Axial symmetries are particularly relevant since natural 3D data generally has vertical orientation ; see Sec . G. In Sec.5.1 , we discuss many design choices for 3D equivariant networks , and compare them in the experiments in Sec . 5.3 . In particular , we find that designs based on different discretizations of the group and pointwise non-linearities to be beneficial when working with volumetric data . Additionally , Sec.5.2 compares the stability of our basis and of one using finite orbits of G and the relative performance of two models using these bases . In the Appendix , we derive some results for working with representation theoretic objects to reduce the work needed to implement new equivariant CNNs . This includes real-valued representations of compact groups , harmonic bases for induced representations , numerical irreps decomposition and representation theory of direct product groups . Finally , we implement the program described in this work in the form of a general purpose library based on PyTorch which we plan to release publicly . 2 THE THEORY OF STEERABLE CNNS AND G-STEERABLE KERNEL SPACES In Sec . 2.1 , we discuss preliminaries on steerable CNNs and the equivariance constraints on their filters . Sec . 2.2 describes the generalization of Lang & Weiler ( 2020 ) we use to parametrize kernels . 1A band-limited signal ’ s spectrum has bounded support . Nyquist-Shannon sampling theorem states that only sufficiently band-limited signals are faithfully represented by discrete samples . Otherwise , aliasing effects occur . 2.1 EUCLIDEAN STEERABLE CNNS . Equivariant neural networks are characterized by their property to commute with the action of a given symmetry group on their input , intermediate feature spaces , and output . We focus on convolutional networks on Euclidean spaces Rn , acted on by the group ( Rn , + ) oG , which is a semidirect product of translations in ( Rn , + ) and origin-preserving transformations G ≤ O ( n ) . A general framework of equivariant convolutional models is that of steerable CNNs , which we briefly recapitulate here . For more details , see Cohen & Welling ( 2016b ) ; Weiler et al . ( 2018a ; 2021 ) ; Weiler & Cesa ( 2019 ) . The fundamental design choice underlying steerable CNNs is that they operate on feature vector fields , which are similar to feature maps but differ in that they are associated with a well defined action of ( Rn , + ) oG . The geometric type of a feature field is prescribed by an orthogonal group representation ρ : G→ Rdρ×dρ which determines the transformation law of dρ-dimensional feature vectors under the action of G. Specifically , a feature field of type ρ is a map f : Rn → Rdρ which transforms under ( Rn , + ) oG according to the induced representation Ind ( R n , + ) oG G ρ : ( [ Ind ( Rn , + ) oG G ρ ] ( tg ) f ) ( x ) : = ρ ( g ) f ( g−1 ( x− t ) ) g ∈ G , t ∈ ( Rn , + ) . ( 1 ) Intuitively , the induced representation acts by moving feature vectors spatially from g−1 ( x− t ) to x and by transforming each individual feature according to ρ ( g ) ( see the visualizations in Weiler & Cesa ( 2019 ) ) . Prominent examples are scalar or tangent vector fields , which transform according to the trivial representation ρ ( g ) = 1 or the standard representation ρ ( g ) = g , respectively . Groupconvolution networks ( Cohen & Welling , 2016a ; Weiler et al. , 2018b ; Kondor & Trivedi , 2018 ) are covered as a special case with ρ being the regular representation of G. It is common to define the full feature fields of a network as a direct sum ( concatenation ) f : = ⊕ i fi of multiple individual feature fields fi . The full feature space transforms according to the direct sum representation ρ : = ⊕ i ρi of the individual fields , which ensures that they transform independently from each other . Weiler et al . ( 2018a ) ; Jenner & Weiler ( 2021 ) proved that , under mild assumptions , the most general linear equivariant maps between spaces of feature fields are convolutions with G-steerable kernels . If the input and output fields have types ρin : G→ Rdin×din and ρout : G→ Rdout×dout , G-steerable kernels are convolution kernels K : Rn → Rdout×din satisfying the linear G-steerability constraint K ( g.x ) = ρout ( g ) K ( x ) ρin ( g ) −1 ∀ g ∈ G , x ∈ Rn . ( 2 ) Thus , designing steerable CNNs only requires finding a basis of the vector space of G-steerable kernels , then used to parameterize a conventional Euclidean convolution . Note that Eq . 2 relates the kernel values on all points g.x in the orbit G.x , but leaves their values on different orbits unrelated . 2.2 A WIGNER-ECKART THEOREM FOR SUBGROUP EQUIVARIANT CONVOLUTION KERNELS . Since we study equivariance with respect toRnoG , it is necessary to reinterpret a convolution filter in a CNN as the discretization of a continuous function . To build a basis for G-steerable filters , we start from a finite basis B for band-limited filters on Rn , spanning a subspace of L2 ( Rn ) closed under G ; then , we find its subspace of filters satisfying the G-steerability constraint in Eq . 2 . Before stating our main result , we need to introduce a few concepts and define some notation . Since G is compact , we can assume all finite-dimensional representations to be orthogonal , i.e. , ρ ( g−1 ) = ρ ( g ) −1 = ρ ( g ) T . To parametrize a kernel κ : Rn → Rdout×din satisfying the steerability constraint in Eq . 2 , it is convenient to use the vectorized form K ( · ) = vec ( κ ( · ) ) : Rn → Rdout·din . The constraint2 becomes : K ( g.x ) = [ ( ρin ⊗ ρout ) ( g ) ] K ( x ) ∀g ∈ G , x ∈ Rn . ( 3 ) The matrix ( ρin ⊗ ρout ) ( g ) is the Kronecker product of the two matrices ρin ( g ) and ρout ( g ) . Irrep Decomposition A useful property is that there exists a set 3 Ĝ of special representations of G , called irreducible representations or irreps , such that any representation ρ of G can be decomposed as a direct sum of them : ρ ( g ) = QT ( ⊕ i∈I ρi ( g ) ) Q , where ρi ∈ Ĝ , I is an index set ranging over the elements of Ĝ ( possibly , with repetition ) andQ is an orthogonal matrix . The direct sum ρ1 ( g ) ⊕ρ2 ( g ) of two matrices is a block diagonal matrix containing the two matrices in its blocks . W.l.o.g. , we can 2Note that vec ( ABC ) = ( CT ⊗A ) vec ( B ) , where vec ( · ) stacks matrix columns into a vector . 3More precisely , irreps come in equivalence classes and the set Ĝ contains a representative for each class . assume ρin and ρout in the kernel constraint from Eq . 2 to be irreps . The solutions for arbitrary ρin and ρout can be recovered from their irreps decomposition , as explained in Weiler & Cesa ( 2019 ) . Hence , from now , we will assume ρin = ρl and ρout = ρJ , where l and J are two indices over Ĝ . Tensor Product The matrix ρin ⊗ ρout built with the Kronecker product in Eq . 3 is itself a representation of G , namely a tensor product representation . As such , we can decompose it in terms of G irreps : ρl ⊗ ρJ = [ CGlJ ] T ( ⊕ j ⊕ [ j ( lJ ) ] s ρj ) CGlJ , where [ j ( lJ ) ] indicates the multiplicity of the irrep ρj , while CGlJ is the change of basis matrix.4 The block diagonal structure of the direct sum allows one to distinguish blocks of rows in CGlJ , acted on by individual irreps in the direct sum . The block associated with the s-th occurrence of ρj is denoted as CGj ( lJ ) s ∈ Rdj×dldJ . Endomorphisms We are interested in the matrices commuting with an irrep ρj ∈ Ĝ , i.e . its endomorphism space . This is a vector space and we assume we know a basis5 { cjr ∈ Rdj×dj } r for it . Steerable Basis To parametrize our kernels , we first need a basis for square-integrable functions on Rn , i.e . for L2 ( Rn ) . A G-steerable basis for L2 ( X ) is a collection of orthogonal functions { Y mji : X → R } j∈Ĝ , m≤dj , i≤mj , with mj a positive ( possibly infinite ) integer . Denoting by Yji : X → R dj the stack { Y mji } dj m=1 , Yji has the defining property that ∀g ∈ G , x ∈ X , Yji ( g.x ) = ρj ( g ) Yji ( x ) . Theorem 2.1 ( Basis for G-Steerable Kernels ) . Let G be a compact group acting on a space X . Let B = { Yj′i′ } j′i′ be a G-steerable basis for X . Assume ρin = ρl and ρout = ρJ in Ĝ . A basis for ( vectorized ) G-steerable kernels over X is given by { Kjisr } jisr , which are defined as : Kjisr ( x ) = [ CG j ( lJ ) s ] T · cjr · Yji ( x ) . ( 4 ) The proof is in Appendix B ( including the case of complex valued representations and functions ) . Note that this relies on a G-steerable basis B for L2 ( X ) . Since designing a new G-steerable basis can be laborious , we propose reusing a G′-steerable basis for all G ≤ G′ via group restriction . Group Restriction Given a group G′ and a subgroup G < G′ , one can turn a representation ρ′ of G′ into a representation ResG ′ G ρ ′ of G by restricting its domain to G. It decomposes as : ResG ′ G ρj′ = [ ID j′ ] T ( ⊕ j ⊕ [ jj′ ] t ρj ) IDj ′ where [ jj′ ] is the multiplicity of ρj and IDj ′ is the change of basis . As earlier , the block-diagonal structure of the direct sum distinguishes blocks of rows of the matrix IDj ′ . The block associated with the t-th occurrence of ρj is ID jj′ t ∈ Rdj×dj′ . Theorem 2.2 ( Basis for G-Steerable Kernels through group Restriction ) . Let G ≤ G′ be compact groups acting on X . Let B′ = { Yj′i′ } j′i′ be a G′-steerable basis for X . Assume ρin = ρl and ρout = ρJ in Ĝ . A basis for ( vectorized ) G-steerable kernels over X is given by { Kj′i′jtsr } j′i′jtsr , which are defined as : Kj′i′jtsr ( x ) = [ CG j ( lJ ) s ] T · cjr · ID jj′ t ·Yj′i′ ( x ) . ( 5 ) See proof in Appendix B.3 . To give an intuition for Theorem 2.2 , observe that performing convolution with Kj′i′jtsr over a scalar input field is equivalent to a first convolution with Yj′i′ , followed by multiplication with the other matrices . The convolution with Yj′i′ is a projection on the space spanned by { Y mj′i′ } dj′ m=1 , which transforms with ρj′ under G ′ . Through IDjj ′ t , we project to its t-th subspace which transforms as ρj under G. The result can be transformed using any endomorphism of ρj ; hence , we have a different basis kernel for each element of the basis { cjr } r. Finally , we embed the result into a space transforming under the tensor product ρl ⊗ ρJ using [ CGj ( lJ ) s ] T . We now present two examples on the circle X = S1 for simplicity . Example 1 : SO ( 2 ) -Steerable Kernels In Fig . 2 , we show a simple example of the basis for a G = SO ( 2 ) -steerable kernel space . In this case , we use G′ = G , so our parameterization is equivalent to Lang & Weiler ( 2020 ) . We consider steerable kernels with input irrep ρin = ρl=0 and output irrep ρout one of ρJ=0 , ρJ=1 or ρJ=2.6 Hence , the kernels have form , respectively , 4CG stands for Clebsh-Gordan since this matrix contains the so-called Clebsh-Gordan coefficients . 5In the complex case , such matrices are multiples of the identity , but this space might be larger in the real case . 6For θ∈ [ 0 , 2π ) , ρ0 : θ 7→1 is the trivial irrep ; if k > 0 , ρk maps θ to the 2×2 rotation matrix of k · θ radians . j ′ = 0 r = 1 t = 1 ( a ) J = 0 j ′ = 1 r = 1 t = 1 j ′ = 1 r = 2 t = 1 ( b ) J = 1 j ′ = 2 r = 1 t = 1 j ′ = 2 r = 2 t = 1 ( c ) J = 2 Figure 2 : Basis for G = SO ( 2 ) -steerable kernels according to Eq . 5. ρin = ρl=0 is 1-dimensional . ρout is either J = 0 , 1 or J = 2 , which are respectively 1 , 2 and 2 dimensional . Each column is an element Kj′i′jtsr of the basis , while each row is an output channel . Since ρ0 ⊗ ρJ = ρJ , j = J . For circular harmonics , i′ = 1 ; since G = G′ , j = j′ and t = 1 . K0 : S1 → R1×1 , K1 : S1 → R2×1 and K2 : S1 → R2×1 . An SO ( 2 ) -steerable basis on X = S1 is given by the circular harmonics : Y 0j′i′ ( θ ) = cos ( j ′θ ) and Y 1j′i′ ( θ ) = sin ( j ′θ ) , for j′ ∈ N and i′ = 1. ρ0 ⊗ ρJ = ρJ , so we always have j = J and s = 1 . Since G = G′ , ResG ′ G ρj′ = ρj′ = ρj , hence t = 1 and ID jj′ t is the identity . Additionally , any 2-dimensional irrep ρj ( j > 0 ) of SO ( 2 ) has a 2-dimensional endomorphism space spanned by cjr=0 = [ 1 0 0 1 ] and cjr=1 = [ 0 1 −1 0 ] .7 This can be verified visually : in Fig . 2b and 2c , the second column is obtained by swapping the rows of the first and by changing the sign of the second row . Example 2 : CN -Steerable Kernels In Fig . 3 , we show the basis for G = C4 steerable kernels obtained using Theorem 2.2 by choosing G′ = SO ( 2 ) . We use the trivial irrep l = 0 in the input and J = 0 , 1 , and 2 in the output . ρj occurs in a restricted representation Res SO ( 2 ) C4 ρj′ whenever j′ = |j + 4k| , k ∈ Z . Indeed , the basis prescribed in Theorem 2.2 has infinitely many elements , but each element is associated with a circular harmonic of a specific frequency j′ . It is natural to use only a band-limited finite subset of this basis : in Fig . 3 , we use only frequencies up to j′ = 4 . Because both j = 0 and j = 2 are 1-dimensional irreps of C4 but j′ > 0 is a 2-dimensional representation of SO ( 2 ) , ResG ′ G ρj′ contains two copies of ρj ; in such cases , t ∈ { 1 , 2 } . This happens for j′ = 4 and j′ = 2 in Fig . 3a . ρj=1 has a 2-dimensional space of endomorphisms , spanned by the same basis described in the SO ( 2 ) example above , so r ∈ { 1 , 2 } in this case . Note that the parametrization in Fig . 3 is continuous along the ring and does not suffer from the discretization issue in Fig . 1b . | The authors present a general algorithm for constructing steerable equivariant neural networks. The main idea is that by constructing a steerable basis for a large symmetry group such as O(3), using the ideas in the paper, we can readily construct equivariant networks which are equivariants to smaller subgroups, such as SO(2). Experimental results on subgroups of isometries of $\mathbb{R}^3$ show the usefulness of the method for 3D shape recognition for voxelized data and a regression task related to molecular binding affinity. | SP:6154bf4a0f0d22fec4acd6fb1974a7bb92613fc8 |
A Program to Build E(N)-Equivariant Steerable CNNs | 1 INTRODUCTION . In machine learning , it is common for tasks to present a number of symmetries . A symmetry in the data occurs , for example , when some property ( e.g. , the label ) does not change if a set of transformations is applied to the data itself , e.g . translations or rotations of images . Symmetries are algebraically described by groups . If prior knowledge about the symmetries of a task is available , it is usually beneficial to encode them in the models used ( Shawe-Taylor , 1989 ; Cohen & Welling , 2016a ) . The property of such models is referred to as equivariance and is obtained by introducing some equivariance constraints in the architecture ( see Eq . 2 ) . A classical example are convolutional neural networks ( CNNs ) , which achieve translation equivariance by constraining linear layers to be convolution operators . A wider class of equivariant models are Euclidean steerable CNNs ( Cohen & Welling , 2016b ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ; Jenner & Weiler , 2021 ) , which guarantee equivariance to isometries of a Euclidean space Rn , i.e. , to translations and a group G of originpreserving transformations , such as rotations and reflections . As proven in Weiler et al . ( 2018a ; 2021 ) ; Jenner & Weiler ( 2021 ) , this requires convolutions with G-steerable ( equivariant ) kernels . Our goal is developing a program to implement any semi-direct product group Rn oG equivariant CNN , with compact G , minimizing the requirements to implement new G-steerable kernels . Lang & Weiler ( 2020 ) provides a first step in this direction by generalizing the Wigner-Eckart theorem from quantum mechanics to obtain a general technique to parametrize G-steerable kernel spaces over orbits of a compact G. The theorem reduces the task of building steerable kernel bases to that of finding some pure representation theoretic ingredients . Since the equivariance constraint only relates points g.x ∈ Rn in the same orbit G.x ⊂ Rn , a kernel can take independent values on different orbits . Fig . 1 shows examples of orbits in R2 under the action of continuous planar rotations G = SO ( 2 ) ( orbits are rings of different radii ) and of discrete rotations by π2 , G = C4 ( orbits are sets of four points ) . Hence , Lang & Weiler ( 2020 ) suggest independently parameterizing orbits of G in Rn ( colored regions in Fig.1 ) . While this guarantees a complete parameterization of G-steerable functions , convolution requires kernels to be integrable , and the numerical discretization of the filters requires them to be sufficiently band-limited1 . Indeed , particular care should be taken to avoid aliasing effects while discretizing filters on a grid ( e.g. , to process voxelized data ) . Lang & Weiler ( 2020 ) naturally support band-limiting along each orbit of G but do not restrict the kernel across different orbits . Intuitively , this means that a filter can be decomposed into a finite number of orbits but these should then be patched together with some smoothness considerations . This introduces an important requirement and a sensitive design choice . First , building a new G-steerable CNNs requires one to identify the orbits of G in Rn . Second , the choice of orbits to consider affect the band-limitation of a filter , but this relation is hard to explicitly quantify in a general setting . This problem is more severe for smaller groups G ( particularly , finite ones ) , as Rn decomposes into a larger number of orbits . For instance , if G = SO ( 2 ) in Fig . 1a , band-limiting along rings is controlled by the Wigner-Eckart theorem but is not enforced along the radial component . If G = C4 in Fig . 1b , each ring is partitioned into discrete orbits : because a larger number of orbits increases the maximum angular frequency , aliasing can be sensitive to this design choice . Contributions and Outline In this work , we solve this issue and propose a general solution strategy to build arbitrary CNNs with G- steerable kernels , for any compact group G. Theorem 2.1 generalizes the result of Lang & Weiler ( 2020 ) from G-homogeneous spaces to more general spaces X carrying a G-action . Our theorem relies on an initial basis for the unconstrained kernel space which is then restricted to a G-steerable subspace . Aliasing effects are thereby controlled by the choice of this initial basis on the general G-space X . In practice , in this work we focus on Euclidean spaces X = Rn , although the theory developed more generally supports semi-direct product groups , i.e . X oG . To support any compact group G with minimal requirements , we propose to choose an initial basis spanning a kernel space closed under the action of any such G , i.e . under G′ = O ( n ) . The benefits are two-fold : 1 ) it allows direct control on aliasing through the initial band-limited basis and 2 ) it completely disentangles the discretization issues from the choice of G , minimizing the requirements to implement equivariance to new groups . For example , this enables the parameterization of C4 filters without discretizing rings into a finite number of points as in Fig . 1b . Algorithm 1 summarizes our method and its requirements . Because of the large variety of symmetries in R3 , and since the planar case was extensively studied in Weiler & Cesa ( 2019 ) , in our experiments , we put particular emphasis on the 3D setting . To illustrate the generality of our method , we instantiate it on many different subgroups of O ( 3 ) , the group of 3D rotations and reflections , and compare them experimentally . This results in many new 3D convolution networks equivariant , for example , to icosahedral symmetries , axial symmetries , cylindrical symmetries or conical symmetries . Axial symmetries are particularly relevant since natural 3D data generally has vertical orientation ; see Sec . G. In Sec.5.1 , we discuss many design choices for 3D equivariant networks , and compare them in the experiments in Sec . 5.3 . In particular , we find that designs based on different discretizations of the group and pointwise non-linearities to be beneficial when working with volumetric data . Additionally , Sec.5.2 compares the stability of our basis and of one using finite orbits of G and the relative performance of two models using these bases . In the Appendix , we derive some results for working with representation theoretic objects to reduce the work needed to implement new equivariant CNNs . This includes real-valued representations of compact groups , harmonic bases for induced representations , numerical irreps decomposition and representation theory of direct product groups . Finally , we implement the program described in this work in the form of a general purpose library based on PyTorch which we plan to release publicly . 2 THE THEORY OF STEERABLE CNNS AND G-STEERABLE KERNEL SPACES In Sec . 2.1 , we discuss preliminaries on steerable CNNs and the equivariance constraints on their filters . Sec . 2.2 describes the generalization of Lang & Weiler ( 2020 ) we use to parametrize kernels . 1A band-limited signal ’ s spectrum has bounded support . Nyquist-Shannon sampling theorem states that only sufficiently band-limited signals are faithfully represented by discrete samples . Otherwise , aliasing effects occur . 2.1 EUCLIDEAN STEERABLE CNNS . Equivariant neural networks are characterized by their property to commute with the action of a given symmetry group on their input , intermediate feature spaces , and output . We focus on convolutional networks on Euclidean spaces Rn , acted on by the group ( Rn , + ) oG , which is a semidirect product of translations in ( Rn , + ) and origin-preserving transformations G ≤ O ( n ) . A general framework of equivariant convolutional models is that of steerable CNNs , which we briefly recapitulate here . For more details , see Cohen & Welling ( 2016b ) ; Weiler et al . ( 2018a ; 2021 ) ; Weiler & Cesa ( 2019 ) . The fundamental design choice underlying steerable CNNs is that they operate on feature vector fields , which are similar to feature maps but differ in that they are associated with a well defined action of ( Rn , + ) oG . The geometric type of a feature field is prescribed by an orthogonal group representation ρ : G→ Rdρ×dρ which determines the transformation law of dρ-dimensional feature vectors under the action of G. Specifically , a feature field of type ρ is a map f : Rn → Rdρ which transforms under ( Rn , + ) oG according to the induced representation Ind ( R n , + ) oG G ρ : ( [ Ind ( Rn , + ) oG G ρ ] ( tg ) f ) ( x ) : = ρ ( g ) f ( g−1 ( x− t ) ) g ∈ G , t ∈ ( Rn , + ) . ( 1 ) Intuitively , the induced representation acts by moving feature vectors spatially from g−1 ( x− t ) to x and by transforming each individual feature according to ρ ( g ) ( see the visualizations in Weiler & Cesa ( 2019 ) ) . Prominent examples are scalar or tangent vector fields , which transform according to the trivial representation ρ ( g ) = 1 or the standard representation ρ ( g ) = g , respectively . Groupconvolution networks ( Cohen & Welling , 2016a ; Weiler et al. , 2018b ; Kondor & Trivedi , 2018 ) are covered as a special case with ρ being the regular representation of G. It is common to define the full feature fields of a network as a direct sum ( concatenation ) f : = ⊕ i fi of multiple individual feature fields fi . The full feature space transforms according to the direct sum representation ρ : = ⊕ i ρi of the individual fields , which ensures that they transform independently from each other . Weiler et al . ( 2018a ) ; Jenner & Weiler ( 2021 ) proved that , under mild assumptions , the most general linear equivariant maps between spaces of feature fields are convolutions with G-steerable kernels . If the input and output fields have types ρin : G→ Rdin×din and ρout : G→ Rdout×dout , G-steerable kernels are convolution kernels K : Rn → Rdout×din satisfying the linear G-steerability constraint K ( g.x ) = ρout ( g ) K ( x ) ρin ( g ) −1 ∀ g ∈ G , x ∈ Rn . ( 2 ) Thus , designing steerable CNNs only requires finding a basis of the vector space of G-steerable kernels , then used to parameterize a conventional Euclidean convolution . Note that Eq . 2 relates the kernel values on all points g.x in the orbit G.x , but leaves their values on different orbits unrelated . 2.2 A WIGNER-ECKART THEOREM FOR SUBGROUP EQUIVARIANT CONVOLUTION KERNELS . Since we study equivariance with respect toRnoG , it is necessary to reinterpret a convolution filter in a CNN as the discretization of a continuous function . To build a basis for G-steerable filters , we start from a finite basis B for band-limited filters on Rn , spanning a subspace of L2 ( Rn ) closed under G ; then , we find its subspace of filters satisfying the G-steerability constraint in Eq . 2 . Before stating our main result , we need to introduce a few concepts and define some notation . Since G is compact , we can assume all finite-dimensional representations to be orthogonal , i.e. , ρ ( g−1 ) = ρ ( g ) −1 = ρ ( g ) T . To parametrize a kernel κ : Rn → Rdout×din satisfying the steerability constraint in Eq . 2 , it is convenient to use the vectorized form K ( · ) = vec ( κ ( · ) ) : Rn → Rdout·din . The constraint2 becomes : K ( g.x ) = [ ( ρin ⊗ ρout ) ( g ) ] K ( x ) ∀g ∈ G , x ∈ Rn . ( 3 ) The matrix ( ρin ⊗ ρout ) ( g ) is the Kronecker product of the two matrices ρin ( g ) and ρout ( g ) . Irrep Decomposition A useful property is that there exists a set 3 Ĝ of special representations of G , called irreducible representations or irreps , such that any representation ρ of G can be decomposed as a direct sum of them : ρ ( g ) = QT ( ⊕ i∈I ρi ( g ) ) Q , where ρi ∈ Ĝ , I is an index set ranging over the elements of Ĝ ( possibly , with repetition ) andQ is an orthogonal matrix . The direct sum ρ1 ( g ) ⊕ρ2 ( g ) of two matrices is a block diagonal matrix containing the two matrices in its blocks . W.l.o.g. , we can 2Note that vec ( ABC ) = ( CT ⊗A ) vec ( B ) , where vec ( · ) stacks matrix columns into a vector . 3More precisely , irreps come in equivalence classes and the set Ĝ contains a representative for each class . assume ρin and ρout in the kernel constraint from Eq . 2 to be irreps . The solutions for arbitrary ρin and ρout can be recovered from their irreps decomposition , as explained in Weiler & Cesa ( 2019 ) . Hence , from now , we will assume ρin = ρl and ρout = ρJ , where l and J are two indices over Ĝ . Tensor Product The matrix ρin ⊗ ρout built with the Kronecker product in Eq . 3 is itself a representation of G , namely a tensor product representation . As such , we can decompose it in terms of G irreps : ρl ⊗ ρJ = [ CGlJ ] T ( ⊕ j ⊕ [ j ( lJ ) ] s ρj ) CGlJ , where [ j ( lJ ) ] indicates the multiplicity of the irrep ρj , while CGlJ is the change of basis matrix.4 The block diagonal structure of the direct sum allows one to distinguish blocks of rows in CGlJ , acted on by individual irreps in the direct sum . The block associated with the s-th occurrence of ρj is denoted as CGj ( lJ ) s ∈ Rdj×dldJ . Endomorphisms We are interested in the matrices commuting with an irrep ρj ∈ Ĝ , i.e . its endomorphism space . This is a vector space and we assume we know a basis5 { cjr ∈ Rdj×dj } r for it . Steerable Basis To parametrize our kernels , we first need a basis for square-integrable functions on Rn , i.e . for L2 ( Rn ) . A G-steerable basis for L2 ( X ) is a collection of orthogonal functions { Y mji : X → R } j∈Ĝ , m≤dj , i≤mj , with mj a positive ( possibly infinite ) integer . Denoting by Yji : X → R dj the stack { Y mji } dj m=1 , Yji has the defining property that ∀g ∈ G , x ∈ X , Yji ( g.x ) = ρj ( g ) Yji ( x ) . Theorem 2.1 ( Basis for G-Steerable Kernels ) . Let G be a compact group acting on a space X . Let B = { Yj′i′ } j′i′ be a G-steerable basis for X . Assume ρin = ρl and ρout = ρJ in Ĝ . A basis for ( vectorized ) G-steerable kernels over X is given by { Kjisr } jisr , which are defined as : Kjisr ( x ) = [ CG j ( lJ ) s ] T · cjr · Yji ( x ) . ( 4 ) The proof is in Appendix B ( including the case of complex valued representations and functions ) . Note that this relies on a G-steerable basis B for L2 ( X ) . Since designing a new G-steerable basis can be laborious , we propose reusing a G′-steerable basis for all G ≤ G′ via group restriction . Group Restriction Given a group G′ and a subgroup G < G′ , one can turn a representation ρ′ of G′ into a representation ResG ′ G ρ ′ of G by restricting its domain to G. It decomposes as : ResG ′ G ρj′ = [ ID j′ ] T ( ⊕ j ⊕ [ jj′ ] t ρj ) IDj ′ where [ jj′ ] is the multiplicity of ρj and IDj ′ is the change of basis . As earlier , the block-diagonal structure of the direct sum distinguishes blocks of rows of the matrix IDj ′ . The block associated with the t-th occurrence of ρj is ID jj′ t ∈ Rdj×dj′ . Theorem 2.2 ( Basis for G-Steerable Kernels through group Restriction ) . Let G ≤ G′ be compact groups acting on X . Let B′ = { Yj′i′ } j′i′ be a G′-steerable basis for X . Assume ρin = ρl and ρout = ρJ in Ĝ . A basis for ( vectorized ) G-steerable kernels over X is given by { Kj′i′jtsr } j′i′jtsr , which are defined as : Kj′i′jtsr ( x ) = [ CG j ( lJ ) s ] T · cjr · ID jj′ t ·Yj′i′ ( x ) . ( 5 ) See proof in Appendix B.3 . To give an intuition for Theorem 2.2 , observe that performing convolution with Kj′i′jtsr over a scalar input field is equivalent to a first convolution with Yj′i′ , followed by multiplication with the other matrices . The convolution with Yj′i′ is a projection on the space spanned by { Y mj′i′ } dj′ m=1 , which transforms with ρj′ under G ′ . Through IDjj ′ t , we project to its t-th subspace which transforms as ρj under G. The result can be transformed using any endomorphism of ρj ; hence , we have a different basis kernel for each element of the basis { cjr } r. Finally , we embed the result into a space transforming under the tensor product ρl ⊗ ρJ using [ CGj ( lJ ) s ] T . We now present two examples on the circle X = S1 for simplicity . Example 1 : SO ( 2 ) -Steerable Kernels In Fig . 2 , we show a simple example of the basis for a G = SO ( 2 ) -steerable kernel space . In this case , we use G′ = G , so our parameterization is equivalent to Lang & Weiler ( 2020 ) . We consider steerable kernels with input irrep ρin = ρl=0 and output irrep ρout one of ρJ=0 , ρJ=1 or ρJ=2.6 Hence , the kernels have form , respectively , 4CG stands for Clebsh-Gordan since this matrix contains the so-called Clebsh-Gordan coefficients . 5In the complex case , such matrices are multiples of the identity , but this space might be larger in the real case . 6For θ∈ [ 0 , 2π ) , ρ0 : θ 7→1 is the trivial irrep ; if k > 0 , ρk maps θ to the 2×2 rotation matrix of k · θ radians . j ′ = 0 r = 1 t = 1 ( a ) J = 0 j ′ = 1 r = 1 t = 1 j ′ = 1 r = 2 t = 1 ( b ) J = 1 j ′ = 2 r = 1 t = 1 j ′ = 2 r = 2 t = 1 ( c ) J = 2 Figure 2 : Basis for G = SO ( 2 ) -steerable kernels according to Eq . 5. ρin = ρl=0 is 1-dimensional . ρout is either J = 0 , 1 or J = 2 , which are respectively 1 , 2 and 2 dimensional . Each column is an element Kj′i′jtsr of the basis , while each row is an output channel . Since ρ0 ⊗ ρJ = ρJ , j = J . For circular harmonics , i′ = 1 ; since G = G′ , j = j′ and t = 1 . K0 : S1 → R1×1 , K1 : S1 → R2×1 and K2 : S1 → R2×1 . An SO ( 2 ) -steerable basis on X = S1 is given by the circular harmonics : Y 0j′i′ ( θ ) = cos ( j ′θ ) and Y 1j′i′ ( θ ) = sin ( j ′θ ) , for j′ ∈ N and i′ = 1. ρ0 ⊗ ρJ = ρJ , so we always have j = J and s = 1 . Since G = G′ , ResG ′ G ρj′ = ρj′ = ρj , hence t = 1 and ID jj′ t is the identity . Additionally , any 2-dimensional irrep ρj ( j > 0 ) of SO ( 2 ) has a 2-dimensional endomorphism space spanned by cjr=0 = [ 1 0 0 1 ] and cjr=1 = [ 0 1 −1 0 ] .7 This can be verified visually : in Fig . 2b and 2c , the second column is obtained by swapping the rows of the first and by changing the sign of the second row . Example 2 : CN -Steerable Kernels In Fig . 3 , we show the basis for G = C4 steerable kernels obtained using Theorem 2.2 by choosing G′ = SO ( 2 ) . We use the trivial irrep l = 0 in the input and J = 0 , 1 , and 2 in the output . ρj occurs in a restricted representation Res SO ( 2 ) C4 ρj′ whenever j′ = |j + 4k| , k ∈ Z . Indeed , the basis prescribed in Theorem 2.2 has infinitely many elements , but each element is associated with a circular harmonic of a specific frequency j′ . It is natural to use only a band-limited finite subset of this basis : in Fig . 3 , we use only frequencies up to j′ = 4 . Because both j = 0 and j = 2 are 1-dimensional irreps of C4 but j′ > 0 is a 2-dimensional representation of SO ( 2 ) , ResG ′ G ρj′ contains two copies of ρj ; in such cases , t ∈ { 1 , 2 } . This happens for j′ = 4 and j′ = 2 in Fig . 3a . ρj=1 has a 2-dimensional space of endomorphisms , spanned by the same basis described in the SO ( 2 ) example above , so r ∈ { 1 , 2 } in this case . Note that the parametrization in Fig . 3 is continuous along the ring and does not suffer from the discretization issue in Fig . 1b . | The paper suggests an approach to design arbitrary steerable kernels. As the kernel steerable constraint only relates to the orbits, previous approaches have not yet taken into consideration that kernels should vary smoothly among close orbits. The idea is to parametrize kernels using a steerable basis. Then, it is also possible to restrict it to subgroups, alleviating the need to redesign a new subgroup equivariant. The method is evaluated on three invariant tasks. | SP:6154bf4a0f0d22fec4acd6fb1974a7bb92613fc8 |
A Program to Build E(N)-Equivariant Steerable CNNs | 1 INTRODUCTION . In machine learning , it is common for tasks to present a number of symmetries . A symmetry in the data occurs , for example , when some property ( e.g. , the label ) does not change if a set of transformations is applied to the data itself , e.g . translations or rotations of images . Symmetries are algebraically described by groups . If prior knowledge about the symmetries of a task is available , it is usually beneficial to encode them in the models used ( Shawe-Taylor , 1989 ; Cohen & Welling , 2016a ) . The property of such models is referred to as equivariance and is obtained by introducing some equivariance constraints in the architecture ( see Eq . 2 ) . A classical example are convolutional neural networks ( CNNs ) , which achieve translation equivariance by constraining linear layers to be convolution operators . A wider class of equivariant models are Euclidean steerable CNNs ( Cohen & Welling , 2016b ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ; Jenner & Weiler , 2021 ) , which guarantee equivariance to isometries of a Euclidean space Rn , i.e. , to translations and a group G of originpreserving transformations , such as rotations and reflections . As proven in Weiler et al . ( 2018a ; 2021 ) ; Jenner & Weiler ( 2021 ) , this requires convolutions with G-steerable ( equivariant ) kernels . Our goal is developing a program to implement any semi-direct product group Rn oG equivariant CNN , with compact G , minimizing the requirements to implement new G-steerable kernels . Lang & Weiler ( 2020 ) provides a first step in this direction by generalizing the Wigner-Eckart theorem from quantum mechanics to obtain a general technique to parametrize G-steerable kernel spaces over orbits of a compact G. The theorem reduces the task of building steerable kernel bases to that of finding some pure representation theoretic ingredients . Since the equivariance constraint only relates points g.x ∈ Rn in the same orbit G.x ⊂ Rn , a kernel can take independent values on different orbits . Fig . 1 shows examples of orbits in R2 under the action of continuous planar rotations G = SO ( 2 ) ( orbits are rings of different radii ) and of discrete rotations by π2 , G = C4 ( orbits are sets of four points ) . Hence , Lang & Weiler ( 2020 ) suggest independently parameterizing orbits of G in Rn ( colored regions in Fig.1 ) . While this guarantees a complete parameterization of G-steerable functions , convolution requires kernels to be integrable , and the numerical discretization of the filters requires them to be sufficiently band-limited1 . Indeed , particular care should be taken to avoid aliasing effects while discretizing filters on a grid ( e.g. , to process voxelized data ) . Lang & Weiler ( 2020 ) naturally support band-limiting along each orbit of G but do not restrict the kernel across different orbits . Intuitively , this means that a filter can be decomposed into a finite number of orbits but these should then be patched together with some smoothness considerations . This introduces an important requirement and a sensitive design choice . First , building a new G-steerable CNNs requires one to identify the orbits of G in Rn . Second , the choice of orbits to consider affect the band-limitation of a filter , but this relation is hard to explicitly quantify in a general setting . This problem is more severe for smaller groups G ( particularly , finite ones ) , as Rn decomposes into a larger number of orbits . For instance , if G = SO ( 2 ) in Fig . 1a , band-limiting along rings is controlled by the Wigner-Eckart theorem but is not enforced along the radial component . If G = C4 in Fig . 1b , each ring is partitioned into discrete orbits : because a larger number of orbits increases the maximum angular frequency , aliasing can be sensitive to this design choice . Contributions and Outline In this work , we solve this issue and propose a general solution strategy to build arbitrary CNNs with G- steerable kernels , for any compact group G. Theorem 2.1 generalizes the result of Lang & Weiler ( 2020 ) from G-homogeneous spaces to more general spaces X carrying a G-action . Our theorem relies on an initial basis for the unconstrained kernel space which is then restricted to a G-steerable subspace . Aliasing effects are thereby controlled by the choice of this initial basis on the general G-space X . In practice , in this work we focus on Euclidean spaces X = Rn , although the theory developed more generally supports semi-direct product groups , i.e . X oG . To support any compact group G with minimal requirements , we propose to choose an initial basis spanning a kernel space closed under the action of any such G , i.e . under G′ = O ( n ) . The benefits are two-fold : 1 ) it allows direct control on aliasing through the initial band-limited basis and 2 ) it completely disentangles the discretization issues from the choice of G , minimizing the requirements to implement equivariance to new groups . For example , this enables the parameterization of C4 filters without discretizing rings into a finite number of points as in Fig . 1b . Algorithm 1 summarizes our method and its requirements . Because of the large variety of symmetries in R3 , and since the planar case was extensively studied in Weiler & Cesa ( 2019 ) , in our experiments , we put particular emphasis on the 3D setting . To illustrate the generality of our method , we instantiate it on many different subgroups of O ( 3 ) , the group of 3D rotations and reflections , and compare them experimentally . This results in many new 3D convolution networks equivariant , for example , to icosahedral symmetries , axial symmetries , cylindrical symmetries or conical symmetries . Axial symmetries are particularly relevant since natural 3D data generally has vertical orientation ; see Sec . G. In Sec.5.1 , we discuss many design choices for 3D equivariant networks , and compare them in the experiments in Sec . 5.3 . In particular , we find that designs based on different discretizations of the group and pointwise non-linearities to be beneficial when working with volumetric data . Additionally , Sec.5.2 compares the stability of our basis and of one using finite orbits of G and the relative performance of two models using these bases . In the Appendix , we derive some results for working with representation theoretic objects to reduce the work needed to implement new equivariant CNNs . This includes real-valued representations of compact groups , harmonic bases for induced representations , numerical irreps decomposition and representation theory of direct product groups . Finally , we implement the program described in this work in the form of a general purpose library based on PyTorch which we plan to release publicly . 2 THE THEORY OF STEERABLE CNNS AND G-STEERABLE KERNEL SPACES In Sec . 2.1 , we discuss preliminaries on steerable CNNs and the equivariance constraints on their filters . Sec . 2.2 describes the generalization of Lang & Weiler ( 2020 ) we use to parametrize kernels . 1A band-limited signal ’ s spectrum has bounded support . Nyquist-Shannon sampling theorem states that only sufficiently band-limited signals are faithfully represented by discrete samples . Otherwise , aliasing effects occur . 2.1 EUCLIDEAN STEERABLE CNNS . Equivariant neural networks are characterized by their property to commute with the action of a given symmetry group on their input , intermediate feature spaces , and output . We focus on convolutional networks on Euclidean spaces Rn , acted on by the group ( Rn , + ) oG , which is a semidirect product of translations in ( Rn , + ) and origin-preserving transformations G ≤ O ( n ) . A general framework of equivariant convolutional models is that of steerable CNNs , which we briefly recapitulate here . For more details , see Cohen & Welling ( 2016b ) ; Weiler et al . ( 2018a ; 2021 ) ; Weiler & Cesa ( 2019 ) . The fundamental design choice underlying steerable CNNs is that they operate on feature vector fields , which are similar to feature maps but differ in that they are associated with a well defined action of ( Rn , + ) oG . The geometric type of a feature field is prescribed by an orthogonal group representation ρ : G→ Rdρ×dρ which determines the transformation law of dρ-dimensional feature vectors under the action of G. Specifically , a feature field of type ρ is a map f : Rn → Rdρ which transforms under ( Rn , + ) oG according to the induced representation Ind ( R n , + ) oG G ρ : ( [ Ind ( Rn , + ) oG G ρ ] ( tg ) f ) ( x ) : = ρ ( g ) f ( g−1 ( x− t ) ) g ∈ G , t ∈ ( Rn , + ) . ( 1 ) Intuitively , the induced representation acts by moving feature vectors spatially from g−1 ( x− t ) to x and by transforming each individual feature according to ρ ( g ) ( see the visualizations in Weiler & Cesa ( 2019 ) ) . Prominent examples are scalar or tangent vector fields , which transform according to the trivial representation ρ ( g ) = 1 or the standard representation ρ ( g ) = g , respectively . Groupconvolution networks ( Cohen & Welling , 2016a ; Weiler et al. , 2018b ; Kondor & Trivedi , 2018 ) are covered as a special case with ρ being the regular representation of G. It is common to define the full feature fields of a network as a direct sum ( concatenation ) f : = ⊕ i fi of multiple individual feature fields fi . The full feature space transforms according to the direct sum representation ρ : = ⊕ i ρi of the individual fields , which ensures that they transform independently from each other . Weiler et al . ( 2018a ) ; Jenner & Weiler ( 2021 ) proved that , under mild assumptions , the most general linear equivariant maps between spaces of feature fields are convolutions with G-steerable kernels . If the input and output fields have types ρin : G→ Rdin×din and ρout : G→ Rdout×dout , G-steerable kernels are convolution kernels K : Rn → Rdout×din satisfying the linear G-steerability constraint K ( g.x ) = ρout ( g ) K ( x ) ρin ( g ) −1 ∀ g ∈ G , x ∈ Rn . ( 2 ) Thus , designing steerable CNNs only requires finding a basis of the vector space of G-steerable kernels , then used to parameterize a conventional Euclidean convolution . Note that Eq . 2 relates the kernel values on all points g.x in the orbit G.x , but leaves their values on different orbits unrelated . 2.2 A WIGNER-ECKART THEOREM FOR SUBGROUP EQUIVARIANT CONVOLUTION KERNELS . Since we study equivariance with respect toRnoG , it is necessary to reinterpret a convolution filter in a CNN as the discretization of a continuous function . To build a basis for G-steerable filters , we start from a finite basis B for band-limited filters on Rn , spanning a subspace of L2 ( Rn ) closed under G ; then , we find its subspace of filters satisfying the G-steerability constraint in Eq . 2 . Before stating our main result , we need to introduce a few concepts and define some notation . Since G is compact , we can assume all finite-dimensional representations to be orthogonal , i.e. , ρ ( g−1 ) = ρ ( g ) −1 = ρ ( g ) T . To parametrize a kernel κ : Rn → Rdout×din satisfying the steerability constraint in Eq . 2 , it is convenient to use the vectorized form K ( · ) = vec ( κ ( · ) ) : Rn → Rdout·din . The constraint2 becomes : K ( g.x ) = [ ( ρin ⊗ ρout ) ( g ) ] K ( x ) ∀g ∈ G , x ∈ Rn . ( 3 ) The matrix ( ρin ⊗ ρout ) ( g ) is the Kronecker product of the two matrices ρin ( g ) and ρout ( g ) . Irrep Decomposition A useful property is that there exists a set 3 Ĝ of special representations of G , called irreducible representations or irreps , such that any representation ρ of G can be decomposed as a direct sum of them : ρ ( g ) = QT ( ⊕ i∈I ρi ( g ) ) Q , where ρi ∈ Ĝ , I is an index set ranging over the elements of Ĝ ( possibly , with repetition ) andQ is an orthogonal matrix . The direct sum ρ1 ( g ) ⊕ρ2 ( g ) of two matrices is a block diagonal matrix containing the two matrices in its blocks . W.l.o.g. , we can 2Note that vec ( ABC ) = ( CT ⊗A ) vec ( B ) , where vec ( · ) stacks matrix columns into a vector . 3More precisely , irreps come in equivalence classes and the set Ĝ contains a representative for each class . assume ρin and ρout in the kernel constraint from Eq . 2 to be irreps . The solutions for arbitrary ρin and ρout can be recovered from their irreps decomposition , as explained in Weiler & Cesa ( 2019 ) . Hence , from now , we will assume ρin = ρl and ρout = ρJ , where l and J are two indices over Ĝ . Tensor Product The matrix ρin ⊗ ρout built with the Kronecker product in Eq . 3 is itself a representation of G , namely a tensor product representation . As such , we can decompose it in terms of G irreps : ρl ⊗ ρJ = [ CGlJ ] T ( ⊕ j ⊕ [ j ( lJ ) ] s ρj ) CGlJ , where [ j ( lJ ) ] indicates the multiplicity of the irrep ρj , while CGlJ is the change of basis matrix.4 The block diagonal structure of the direct sum allows one to distinguish blocks of rows in CGlJ , acted on by individual irreps in the direct sum . The block associated with the s-th occurrence of ρj is denoted as CGj ( lJ ) s ∈ Rdj×dldJ . Endomorphisms We are interested in the matrices commuting with an irrep ρj ∈ Ĝ , i.e . its endomorphism space . This is a vector space and we assume we know a basis5 { cjr ∈ Rdj×dj } r for it . Steerable Basis To parametrize our kernels , we first need a basis for square-integrable functions on Rn , i.e . for L2 ( Rn ) . A G-steerable basis for L2 ( X ) is a collection of orthogonal functions { Y mji : X → R } j∈Ĝ , m≤dj , i≤mj , with mj a positive ( possibly infinite ) integer . Denoting by Yji : X → R dj the stack { Y mji } dj m=1 , Yji has the defining property that ∀g ∈ G , x ∈ X , Yji ( g.x ) = ρj ( g ) Yji ( x ) . Theorem 2.1 ( Basis for G-Steerable Kernels ) . Let G be a compact group acting on a space X . Let B = { Yj′i′ } j′i′ be a G-steerable basis for X . Assume ρin = ρl and ρout = ρJ in Ĝ . A basis for ( vectorized ) G-steerable kernels over X is given by { Kjisr } jisr , which are defined as : Kjisr ( x ) = [ CG j ( lJ ) s ] T · cjr · Yji ( x ) . ( 4 ) The proof is in Appendix B ( including the case of complex valued representations and functions ) . Note that this relies on a G-steerable basis B for L2 ( X ) . Since designing a new G-steerable basis can be laborious , we propose reusing a G′-steerable basis for all G ≤ G′ via group restriction . Group Restriction Given a group G′ and a subgroup G < G′ , one can turn a representation ρ′ of G′ into a representation ResG ′ G ρ ′ of G by restricting its domain to G. It decomposes as : ResG ′ G ρj′ = [ ID j′ ] T ( ⊕ j ⊕ [ jj′ ] t ρj ) IDj ′ where [ jj′ ] is the multiplicity of ρj and IDj ′ is the change of basis . As earlier , the block-diagonal structure of the direct sum distinguishes blocks of rows of the matrix IDj ′ . The block associated with the t-th occurrence of ρj is ID jj′ t ∈ Rdj×dj′ . Theorem 2.2 ( Basis for G-Steerable Kernels through group Restriction ) . Let G ≤ G′ be compact groups acting on X . Let B′ = { Yj′i′ } j′i′ be a G′-steerable basis for X . Assume ρin = ρl and ρout = ρJ in Ĝ . A basis for ( vectorized ) G-steerable kernels over X is given by { Kj′i′jtsr } j′i′jtsr , which are defined as : Kj′i′jtsr ( x ) = [ CG j ( lJ ) s ] T · cjr · ID jj′ t ·Yj′i′ ( x ) . ( 5 ) See proof in Appendix B.3 . To give an intuition for Theorem 2.2 , observe that performing convolution with Kj′i′jtsr over a scalar input field is equivalent to a first convolution with Yj′i′ , followed by multiplication with the other matrices . The convolution with Yj′i′ is a projection on the space spanned by { Y mj′i′ } dj′ m=1 , which transforms with ρj′ under G ′ . Through IDjj ′ t , we project to its t-th subspace which transforms as ρj under G. The result can be transformed using any endomorphism of ρj ; hence , we have a different basis kernel for each element of the basis { cjr } r. Finally , we embed the result into a space transforming under the tensor product ρl ⊗ ρJ using [ CGj ( lJ ) s ] T . We now present two examples on the circle X = S1 for simplicity . Example 1 : SO ( 2 ) -Steerable Kernels In Fig . 2 , we show a simple example of the basis for a G = SO ( 2 ) -steerable kernel space . In this case , we use G′ = G , so our parameterization is equivalent to Lang & Weiler ( 2020 ) . We consider steerable kernels with input irrep ρin = ρl=0 and output irrep ρout one of ρJ=0 , ρJ=1 or ρJ=2.6 Hence , the kernels have form , respectively , 4CG stands for Clebsh-Gordan since this matrix contains the so-called Clebsh-Gordan coefficients . 5In the complex case , such matrices are multiples of the identity , but this space might be larger in the real case . 6For θ∈ [ 0 , 2π ) , ρ0 : θ 7→1 is the trivial irrep ; if k > 0 , ρk maps θ to the 2×2 rotation matrix of k · θ radians . j ′ = 0 r = 1 t = 1 ( a ) J = 0 j ′ = 1 r = 1 t = 1 j ′ = 1 r = 2 t = 1 ( b ) J = 1 j ′ = 2 r = 1 t = 1 j ′ = 2 r = 2 t = 1 ( c ) J = 2 Figure 2 : Basis for G = SO ( 2 ) -steerable kernels according to Eq . 5. ρin = ρl=0 is 1-dimensional . ρout is either J = 0 , 1 or J = 2 , which are respectively 1 , 2 and 2 dimensional . Each column is an element Kj′i′jtsr of the basis , while each row is an output channel . Since ρ0 ⊗ ρJ = ρJ , j = J . For circular harmonics , i′ = 1 ; since G = G′ , j = j′ and t = 1 . K0 : S1 → R1×1 , K1 : S1 → R2×1 and K2 : S1 → R2×1 . An SO ( 2 ) -steerable basis on X = S1 is given by the circular harmonics : Y 0j′i′ ( θ ) = cos ( j ′θ ) and Y 1j′i′ ( θ ) = sin ( j ′θ ) , for j′ ∈ N and i′ = 1. ρ0 ⊗ ρJ = ρJ , so we always have j = J and s = 1 . Since G = G′ , ResG ′ G ρj′ = ρj′ = ρj , hence t = 1 and ID jj′ t is the identity . Additionally , any 2-dimensional irrep ρj ( j > 0 ) of SO ( 2 ) has a 2-dimensional endomorphism space spanned by cjr=0 = [ 1 0 0 1 ] and cjr=1 = [ 0 1 −1 0 ] .7 This can be verified visually : in Fig . 2b and 2c , the second column is obtained by swapping the rows of the first and by changing the sign of the second row . Example 2 : CN -Steerable Kernels In Fig . 3 , we show the basis for G = C4 steerable kernels obtained using Theorem 2.2 by choosing G′ = SO ( 2 ) . We use the trivial irrep l = 0 in the input and J = 0 , 1 , and 2 in the output . ρj occurs in a restricted representation Res SO ( 2 ) C4 ρj′ whenever j′ = |j + 4k| , k ∈ Z . Indeed , the basis prescribed in Theorem 2.2 has infinitely many elements , but each element is associated with a circular harmonic of a specific frequency j′ . It is natural to use only a band-limited finite subset of this basis : in Fig . 3 , we use only frequencies up to j′ = 4 . Because both j = 0 and j = 2 are 1-dimensional irreps of C4 but j′ > 0 is a 2-dimensional representation of SO ( 2 ) , ResG ′ G ρj′ contains two copies of ρj ; in such cases , t ∈ { 1 , 2 } . This happens for j′ = 4 and j′ = 2 in Fig . 3a . ρj=1 has a 2-dimensional space of endomorphisms , spanned by the same basis described in the SO ( 2 ) example above , so r ∈ { 1 , 2 } in this case . Note that the parametrization in Fig . 3 is continuous along the ring and does not suffer from the discretization issue in Fig . 1b . | This paper introduces a general framework for constructing equivariant steerable CNNs over arbitrary subgroups of E(3). The central idea of their approach is to use the well-known basis for steerable kernels over E(3) and then restrict them to a given subgroup. In addition to a thorough supplementary material developing the theory, the authors also provide pseudo-code for generating novel kernels. This theory is then put into practice by generating steerable CNNs for an impressively wide array of groups and evaluating their performance on rotated MNIST and ModelNet10. | SP:6154bf4a0f0d22fec4acd6fb1974a7bb92613fc8 |
Distance-Based Background Class Regularization for Open-Set Recognition | 1 INTRODUCTION . In machine learning ( ML ) , classification algorithms have achieved great success . Through recent advances in convolutional neural networks , their classification performance already surpassed the human-level performance in image classification ( He et al. , 2015 ) . However , such algorithms are usually developed under a closed-set assumption , i.e. , the class of each test sample is assumed to always belong to one of the pre-defined set of classes . Although this conventional assumption can be easily violated in real-world applications ( classifiers can face unknown-class data ) , traditional algorithms are likely to force unknown-class samples to be classified into one of the known classes . To tackle this issue , the open-set recognition ( OSR ) problem ( Scheirer et al. , 2013 ) aims to properly classify unknown-class samples as “ unknown ” and known-class samples as one of the known classes . According to the definition of OSR ( Scheirer et al. , 2013 ) , it is required to properly limit the feature space of known-class data . To satisfy the requirement , various OSR methods were developed based on traditional ML models . Previously , Scheirer et al . ( 2014 ) calibrated the decision scores of support vector machines ( SVMs ) . Based on the intuition that a large set of data samples of unknown classes can be rejected if those of known classes are accurately modeled , Jain et al . ( 2014 ) proposed PI -SVM , which utilized the statistical modeling of known-class samples located near the decision boundary of SVMs . Afterward , Júnior et al . ( 2016 ) attempted to solve the OSR problem based on the principle of the nearest neighbors . Taking distribution information of data into account , Rudd et al . ( 2018 ) proposed the extreme value machine by utilizing the concept of margin distributions . Since deep neural networks ( DNNs ) have robust classification performance by learning high-level representations of data , OSR methods for DNNs have received great attention . Based on the theoretical foundations used in traditional ML-based OSR methods , Bendale & Boult ( 2016 ) proposed the first OSR strategy for DNNs called Openmax , which calibrates the output logits of pre-trained Softmax classifiers . To improve Openmax , Yoshihashi et al . ( 2019 ) proposed the classification-reconstruction learning to make robust latent feature vectors . Afterward , Oza & Patel ( 2019 ) proposed to exploit a class-conditioned autoencoder and use its reconstruction error to assess each input sample . Sun et al . ( 2020 ) employed several class-conditioned variational auto-encoders for generative modeling . Although previous OSR methods using discriminative models applied offline analyses to pre-trained Softmax classifiers or employed complicated DNN models , they have limited performance since the classifiers were trained solely based on known-class samples . To mitigate the problem , one can use background class regularization ( BCR ) to achieve robust empirical results . However , previous BCR methods ( Dhamija et al. , 2018 ; Hendrycks et al. , 2019 ; Liu et al. , 2020 ) are insufficient to properly solve the OSR problem . To design an effective open-set classifier that can overcome the previous limitations , we propose a novel BCR method suitable for OSR , which uses a distance-based classifier and a novel loss function for regularization . We provide detailed description in the next section . 2 PRELIMINARIES AND OUR CONTRIBUTIONS . 2.1 THE OPEN-SET RECOGNITION PROBLEM . The OSR problem addresses the classification setting that can face test samples from classes unseen during training . In this setting , open-set classifiers aim to properly classify known-class samples while rejecting unknown-class samples simultaneously . A similar problem to OSR is out-of-distribution ( OOD ) detection ( Hendrycks & Gimpel , 2017 ) , which typically aims to reject data items drawn far away from the training data distribution . In previous OOD detection studies ( Hendrycks & Gimpel , 2017 ; Liang et al. , 2018 ; Lee et al. , 2018a ; b ) , OOD samples tend to be drawn from other datasets or even images of noise . In this paper , we aim to reject test data whose classes are unknown but related to the training data , which narrows down the scope of conventional OOD detection tasks . Previously , Scheirer et al . ( 2013 ) introduced a formal definition of the OSR problem based on the notion of open-space risk RO , which is a relative measure of a positively labeled union of balls SV and open space O located far from SV . Since labeling any data item in O incurs open-space risk , it is straightforward that a classifier can not be a solution for the OSR problem if the classifier accepts data in infinitely wide regions , i.e. , its open-space risk is unbounded ( RO = ∞ ) . The definition implies that essential requirements to solve the OSR problem are 1 ) bounding open-space risk and 2 ) ideally balancing it with empirical risk to maintain a low classification error rate . Unlike traditional closed-set classifiers , open-set classifiers are required to limit the space of knownclass data to bound their open-space risk . To ensure bounded open-space risk , Scheirer et al . ( 2014 ) proposed to formulate compact abating probability ( CAP ) models . The principle of CAP models is that if the support region of a classifier decays in all directions from the training data , thresholding the region will bound the classifier ’ s open-space risk ( Boult et al. , 2019 ) . As depicted in Figure 1 , which compares traditional closed-set and open-set classification problems , properly building class-wise CAP models is an effective strategy to satisfy the two essential requirements of OSR . 2.2 POST-CLASSIFICATION ANALYSIS FOR PRE-TRAINED SOFTMAX CLASSIFIER . In this paper , we aim to solve the OSR problem by using a standard DNN-based classifier architecture f as a latent feature extractor . Applying a fully-connected layer to f , a conventional Softmax classifier computes the posterior probability of an input x belonging to the c-th known class by Ps ( y = c|x ) = exp ( wTc f ( x ) + bc ) ∑C i=1 exp ( w T i f ( x ) + bi ) , ( 1 ) where c ∈ { 1 , · · · , C } , f ( x ) ∈ Rn is the latent feature vector of x , and wc and bc are the weight and the bias for the c-th class , respectively . For pre-trained Softmax classifiers , Hendrycks & Gimpel ( 2017 ) proposed a baseline to detect anomalous samples , which imposes a threshold on the predictive confidence of Eq . ( 1 ) . When using the baseline method to solve the OSR problem , one can estimate the class of each known-class sample and recognize unknown-class data by ŷ = { argmaxc∈ { 1 , ··· , C } Ps ( y = c|x ) , if maxc∈ { 1 , ··· , C } Ps ( y = c|x ) ≥ τ , C + 1 ( unknown class ) , otherwise . ( 2 ) However , Eq . ( 2 ) can not formally bound open-space risk since it only rejects test samples near the decision boundary of classifiers , thereby having infinitely wide regions of acceptance ( Boult et al. , 2019 ) . Therefore , additional post-classification analysis methods using an auxiliary measure other than the Softmax probability are necessary to bound open-space risk , where distance measures have been widely used to build auxiliary CAP models in the latent feature space of f . To construct class-wise CAP models , Openmax ( Bendale & Boult , 2016 ) defined radial-basis decaying functions { s ( x , i ) } Ci=1 , each of which measures the class-belongingness of x for the c-th class , in the latent feature space of f . For each s ( x , c ) , the authors employed distance measures between f ( x ) and an empirical class mean vector µc , e.g. , s ( x , c ) = D2E ( f ( x ) , µc ) = ( f ( x ) − µc ) T ( f ( x ) − µc ) . To formulate effective CAP models based on s ( x , c ) , they statistically modeled the distribution of s ( x , c ) for known-class data based on the extreme value theory ( EVT ) ( Scheirer , 2017 ) , which provides a theoretical foundation that the Weibull distribution is suitable for modeling known-class samples located far from the class mean vectors ( extreme samples ) . To be specific , Openmax fits a Weibull distribution on extreme samples of the c-th class having the highest DE ( f ( x ) , µc ) values , where its cumulative distribution function ( CDF ) formulates the probability of inclusion PI ( x , c ) ( Jain et al. , 2014 ; Rudd et al. , 2018 ) , i.e. , PI ( x , c ) = 1 − WeibullCDF , which rapidly decays near extreme samples . Based on PI ( x , c ) , the decision rule of Eq . ( 2 ) can be calibrated to conduct robust OSR . 2.3 GENERALIZED OPEN-SET RECOGNITION AND BACKGROUND CLASS REGULARIZATION . Although they require additional inference procedures ( e.g. , EVT modeling ) to bound the open-space risk of pre-trained Softmax classifiers , previous post-classification analyses may have limited OSR performance since the classifiers are trained solely based on known-class samples . To empirically obtain robust OSR results without complicated post-classification analyses , one can use the strategy of BCR at the training phase , which exploits background-class samples as surrogates of unknownclass samples . Geng et al . ( 2020 ) argued that the generalized OSR setting that utilizes background samples is still less-explored and an important research direction to improve OSR performance . In the generalized OSR setting , classifiers should consider the following data classes among the infinite label space of all classes Y ( Dhamija et al. , 2018 ; Geng et al. , 2020 ) . • Known known classes ( KKCs ; K = { 1 , · · · , C } ⊂ Y ) include distinctly labeled positive classes , which also have side information , where U = Y \ K is the entire unknown classes . • Known unknown classes ( KUCs ; B ⊂ U ) include background classes , e.g. , labeled negative classes which are not necessarily grouped into a pre-defined set of KKCs K. • Unknown unknown classes ( UUCs ; A = U \B ) represent the rest of U , where UUC samples are not available at training time and have no side information , but occur at inference time . Throughout this paper , we denote the corresponding datasets for the data classes as follows . Dt is a training set consisting of multiple pairs of a KKC data sample and the corresponding class label y ∈ { 1 , · · · , C } . Dktest and Dutest are test sets of KKCs and UUCs , respectively . Db is a background dataset of KUCs . Then , a loss function for training classifiers with BCR can be formulated by L = Lcf + λLbg = E ( xk , y ) ∼Dt [ − logPs ( y|xk ) + λExb∼Db [ freg ( xk , y , xb ) ] ] , ( 3 ) where Lcf and Lbg are the losses for classification and BCR , respectively , and λ is a hyperparameter that balances Lcf and Lbg . For Lbg , previous studies designed their own freg , where Dhamija et al . ( 2018 ) proposed the objectosphere loss for OSR , and Hendrycks et al . ( 2019 ) and Liu et al . ( 2020 ) employed the uniformity and the energy losses for OOD detection , respectively . In this paper , we tackle the following limitations of the previous BCR methods . • In the previous BCR methods , Lbg were designed to make normal data and anomalies more distinguishable in terms of the corresponding anomaly scores . Since they categorized normal samples into a single group ( do not consider the classes ) in Lbg , the previous methods can not be suitable for rejecting UUC samples located relatively close to KKC data and maintaining robust closed-set classification results . • The previous methods using the decision rule of Eq . ( 2 ) ( e.g. , objectosphere ( Dhamija et al. , 2018 ) and uniformity ( Hendrycks et al. , 2019 ) ) can not bound open-space risk . Although one can use post-classification analyses to bound open-space risk , trained latent feature spaces are likely to be inappropriate for using another metric such as distance measures . • To increase the gap between KKC and KUC samples in terms of latent feature magnitude and energy value in the objectosphere ( Dhamija et al. , 2018 ) and the energy ( Liu et al. , 2020 ) losses , respectively , it is necessary to find proper margin parameters for each dataset . | In this paper, the authors propose a new method for open set recognition. To this end, the authors use distance based classifiers and they minimize the distance between the class samples and their corresponding means for the labeled data samples and try to enforce the background data samples to be outside the class acceptance regions. Then the samples coming from the unknown classes can be rejected based on the distances to the centers of the known classes. The authors use ImageNet data samples are used as background class samples. The proposed method is compared to related open set recognition methods and better accuracies are reported. | SP:245947336694edb5f722c4aa5e874dfa537ceec2 |
Distance-Based Background Class Regularization for Open-Set Recognition | 1 INTRODUCTION . In machine learning ( ML ) , classification algorithms have achieved great success . Through recent advances in convolutional neural networks , their classification performance already surpassed the human-level performance in image classification ( He et al. , 2015 ) . However , such algorithms are usually developed under a closed-set assumption , i.e. , the class of each test sample is assumed to always belong to one of the pre-defined set of classes . Although this conventional assumption can be easily violated in real-world applications ( classifiers can face unknown-class data ) , traditional algorithms are likely to force unknown-class samples to be classified into one of the known classes . To tackle this issue , the open-set recognition ( OSR ) problem ( Scheirer et al. , 2013 ) aims to properly classify unknown-class samples as “ unknown ” and known-class samples as one of the known classes . According to the definition of OSR ( Scheirer et al. , 2013 ) , it is required to properly limit the feature space of known-class data . To satisfy the requirement , various OSR methods were developed based on traditional ML models . Previously , Scheirer et al . ( 2014 ) calibrated the decision scores of support vector machines ( SVMs ) . Based on the intuition that a large set of data samples of unknown classes can be rejected if those of known classes are accurately modeled , Jain et al . ( 2014 ) proposed PI -SVM , which utilized the statistical modeling of known-class samples located near the decision boundary of SVMs . Afterward , Júnior et al . ( 2016 ) attempted to solve the OSR problem based on the principle of the nearest neighbors . Taking distribution information of data into account , Rudd et al . ( 2018 ) proposed the extreme value machine by utilizing the concept of margin distributions . Since deep neural networks ( DNNs ) have robust classification performance by learning high-level representations of data , OSR methods for DNNs have received great attention . Based on the theoretical foundations used in traditional ML-based OSR methods , Bendale & Boult ( 2016 ) proposed the first OSR strategy for DNNs called Openmax , which calibrates the output logits of pre-trained Softmax classifiers . To improve Openmax , Yoshihashi et al . ( 2019 ) proposed the classification-reconstruction learning to make robust latent feature vectors . Afterward , Oza & Patel ( 2019 ) proposed to exploit a class-conditioned autoencoder and use its reconstruction error to assess each input sample . Sun et al . ( 2020 ) employed several class-conditioned variational auto-encoders for generative modeling . Although previous OSR methods using discriminative models applied offline analyses to pre-trained Softmax classifiers or employed complicated DNN models , they have limited performance since the classifiers were trained solely based on known-class samples . To mitigate the problem , one can use background class regularization ( BCR ) to achieve robust empirical results . However , previous BCR methods ( Dhamija et al. , 2018 ; Hendrycks et al. , 2019 ; Liu et al. , 2020 ) are insufficient to properly solve the OSR problem . To design an effective open-set classifier that can overcome the previous limitations , we propose a novel BCR method suitable for OSR , which uses a distance-based classifier and a novel loss function for regularization . We provide detailed description in the next section . 2 PRELIMINARIES AND OUR CONTRIBUTIONS . 2.1 THE OPEN-SET RECOGNITION PROBLEM . The OSR problem addresses the classification setting that can face test samples from classes unseen during training . In this setting , open-set classifiers aim to properly classify known-class samples while rejecting unknown-class samples simultaneously . A similar problem to OSR is out-of-distribution ( OOD ) detection ( Hendrycks & Gimpel , 2017 ) , which typically aims to reject data items drawn far away from the training data distribution . In previous OOD detection studies ( Hendrycks & Gimpel , 2017 ; Liang et al. , 2018 ; Lee et al. , 2018a ; b ) , OOD samples tend to be drawn from other datasets or even images of noise . In this paper , we aim to reject test data whose classes are unknown but related to the training data , which narrows down the scope of conventional OOD detection tasks . Previously , Scheirer et al . ( 2013 ) introduced a formal definition of the OSR problem based on the notion of open-space risk RO , which is a relative measure of a positively labeled union of balls SV and open space O located far from SV . Since labeling any data item in O incurs open-space risk , it is straightforward that a classifier can not be a solution for the OSR problem if the classifier accepts data in infinitely wide regions , i.e. , its open-space risk is unbounded ( RO = ∞ ) . The definition implies that essential requirements to solve the OSR problem are 1 ) bounding open-space risk and 2 ) ideally balancing it with empirical risk to maintain a low classification error rate . Unlike traditional closed-set classifiers , open-set classifiers are required to limit the space of knownclass data to bound their open-space risk . To ensure bounded open-space risk , Scheirer et al . ( 2014 ) proposed to formulate compact abating probability ( CAP ) models . The principle of CAP models is that if the support region of a classifier decays in all directions from the training data , thresholding the region will bound the classifier ’ s open-space risk ( Boult et al. , 2019 ) . As depicted in Figure 1 , which compares traditional closed-set and open-set classification problems , properly building class-wise CAP models is an effective strategy to satisfy the two essential requirements of OSR . 2.2 POST-CLASSIFICATION ANALYSIS FOR PRE-TRAINED SOFTMAX CLASSIFIER . In this paper , we aim to solve the OSR problem by using a standard DNN-based classifier architecture f as a latent feature extractor . Applying a fully-connected layer to f , a conventional Softmax classifier computes the posterior probability of an input x belonging to the c-th known class by Ps ( y = c|x ) = exp ( wTc f ( x ) + bc ) ∑C i=1 exp ( w T i f ( x ) + bi ) , ( 1 ) where c ∈ { 1 , · · · , C } , f ( x ) ∈ Rn is the latent feature vector of x , and wc and bc are the weight and the bias for the c-th class , respectively . For pre-trained Softmax classifiers , Hendrycks & Gimpel ( 2017 ) proposed a baseline to detect anomalous samples , which imposes a threshold on the predictive confidence of Eq . ( 1 ) . When using the baseline method to solve the OSR problem , one can estimate the class of each known-class sample and recognize unknown-class data by ŷ = { argmaxc∈ { 1 , ··· , C } Ps ( y = c|x ) , if maxc∈ { 1 , ··· , C } Ps ( y = c|x ) ≥ τ , C + 1 ( unknown class ) , otherwise . ( 2 ) However , Eq . ( 2 ) can not formally bound open-space risk since it only rejects test samples near the decision boundary of classifiers , thereby having infinitely wide regions of acceptance ( Boult et al. , 2019 ) . Therefore , additional post-classification analysis methods using an auxiliary measure other than the Softmax probability are necessary to bound open-space risk , where distance measures have been widely used to build auxiliary CAP models in the latent feature space of f . To construct class-wise CAP models , Openmax ( Bendale & Boult , 2016 ) defined radial-basis decaying functions { s ( x , i ) } Ci=1 , each of which measures the class-belongingness of x for the c-th class , in the latent feature space of f . For each s ( x , c ) , the authors employed distance measures between f ( x ) and an empirical class mean vector µc , e.g. , s ( x , c ) = D2E ( f ( x ) , µc ) = ( f ( x ) − µc ) T ( f ( x ) − µc ) . To formulate effective CAP models based on s ( x , c ) , they statistically modeled the distribution of s ( x , c ) for known-class data based on the extreme value theory ( EVT ) ( Scheirer , 2017 ) , which provides a theoretical foundation that the Weibull distribution is suitable for modeling known-class samples located far from the class mean vectors ( extreme samples ) . To be specific , Openmax fits a Weibull distribution on extreme samples of the c-th class having the highest DE ( f ( x ) , µc ) values , where its cumulative distribution function ( CDF ) formulates the probability of inclusion PI ( x , c ) ( Jain et al. , 2014 ; Rudd et al. , 2018 ) , i.e. , PI ( x , c ) = 1 − WeibullCDF , which rapidly decays near extreme samples . Based on PI ( x , c ) , the decision rule of Eq . ( 2 ) can be calibrated to conduct robust OSR . 2.3 GENERALIZED OPEN-SET RECOGNITION AND BACKGROUND CLASS REGULARIZATION . Although they require additional inference procedures ( e.g. , EVT modeling ) to bound the open-space risk of pre-trained Softmax classifiers , previous post-classification analyses may have limited OSR performance since the classifiers are trained solely based on known-class samples . To empirically obtain robust OSR results without complicated post-classification analyses , one can use the strategy of BCR at the training phase , which exploits background-class samples as surrogates of unknownclass samples . Geng et al . ( 2020 ) argued that the generalized OSR setting that utilizes background samples is still less-explored and an important research direction to improve OSR performance . In the generalized OSR setting , classifiers should consider the following data classes among the infinite label space of all classes Y ( Dhamija et al. , 2018 ; Geng et al. , 2020 ) . • Known known classes ( KKCs ; K = { 1 , · · · , C } ⊂ Y ) include distinctly labeled positive classes , which also have side information , where U = Y \ K is the entire unknown classes . • Known unknown classes ( KUCs ; B ⊂ U ) include background classes , e.g. , labeled negative classes which are not necessarily grouped into a pre-defined set of KKCs K. • Unknown unknown classes ( UUCs ; A = U \B ) represent the rest of U , where UUC samples are not available at training time and have no side information , but occur at inference time . Throughout this paper , we denote the corresponding datasets for the data classes as follows . Dt is a training set consisting of multiple pairs of a KKC data sample and the corresponding class label y ∈ { 1 , · · · , C } . Dktest and Dutest are test sets of KKCs and UUCs , respectively . Db is a background dataset of KUCs . Then , a loss function for training classifiers with BCR can be formulated by L = Lcf + λLbg = E ( xk , y ) ∼Dt [ − logPs ( y|xk ) + λExb∼Db [ freg ( xk , y , xb ) ] ] , ( 3 ) where Lcf and Lbg are the losses for classification and BCR , respectively , and λ is a hyperparameter that balances Lcf and Lbg . For Lbg , previous studies designed their own freg , where Dhamija et al . ( 2018 ) proposed the objectosphere loss for OSR , and Hendrycks et al . ( 2019 ) and Liu et al . ( 2020 ) employed the uniformity and the energy losses for OOD detection , respectively . In this paper , we tackle the following limitations of the previous BCR methods . • In the previous BCR methods , Lbg were designed to make normal data and anomalies more distinguishable in terms of the corresponding anomaly scores . Since they categorized normal samples into a single group ( do not consider the classes ) in Lbg , the previous methods can not be suitable for rejecting UUC samples located relatively close to KKC data and maintaining robust closed-set classification results . • The previous methods using the decision rule of Eq . ( 2 ) ( e.g. , objectosphere ( Dhamija et al. , 2018 ) and uniformity ( Hendrycks et al. , 2019 ) ) can not bound open-space risk . Although one can use post-classification analyses to bound open-space risk , trained latent feature spaces are likely to be inappropriate for using another metric such as distance measures . • To increase the gap between KKC and KUC samples in terms of latent feature magnitude and energy value in the objectosphere ( Dhamija et al. , 2018 ) and the energy ( Liu et al. , 2020 ) losses , respectively , it is necessary to find proper margin parameters for each dataset . | For open set recognition (OSR), the authors propose using background data to represent instances from unknown classes. The background data are from data outside the known classes. Based on LDA, they proposed using the distance from an instance to the class mean to estimate the posterior class probability via softmax. The class means are randomly chosen beforehand. Their loss functions includes cross entropy, L_cf, and background class regularization (BCR), which is denoted as L_bg. For L_bg, they introduce probability of inclusion, P_I, which is estimated by the CDF for Weibull distribution. With the background data, they calculate L_bg,u based on 1-P_I. With the known data, they calculate L_bg,k based on P_I. Empirical evaluations have two settings. The unknown classes from the first setting are from the same dataset as the known classes. In the second setting the unknown classes are from another dataset. Background data are from another dataset. In the both settings, the proposed method compares favorably against a few existing algorithms on a few datasets. | SP:245947336694edb5f722c4aa5e874dfa537ceec2 |
Distance-Based Background Class Regularization for Open-Set Recognition | 1 INTRODUCTION . In machine learning ( ML ) , classification algorithms have achieved great success . Through recent advances in convolutional neural networks , their classification performance already surpassed the human-level performance in image classification ( He et al. , 2015 ) . However , such algorithms are usually developed under a closed-set assumption , i.e. , the class of each test sample is assumed to always belong to one of the pre-defined set of classes . Although this conventional assumption can be easily violated in real-world applications ( classifiers can face unknown-class data ) , traditional algorithms are likely to force unknown-class samples to be classified into one of the known classes . To tackle this issue , the open-set recognition ( OSR ) problem ( Scheirer et al. , 2013 ) aims to properly classify unknown-class samples as “ unknown ” and known-class samples as one of the known classes . According to the definition of OSR ( Scheirer et al. , 2013 ) , it is required to properly limit the feature space of known-class data . To satisfy the requirement , various OSR methods were developed based on traditional ML models . Previously , Scheirer et al . ( 2014 ) calibrated the decision scores of support vector machines ( SVMs ) . Based on the intuition that a large set of data samples of unknown classes can be rejected if those of known classes are accurately modeled , Jain et al . ( 2014 ) proposed PI -SVM , which utilized the statistical modeling of known-class samples located near the decision boundary of SVMs . Afterward , Júnior et al . ( 2016 ) attempted to solve the OSR problem based on the principle of the nearest neighbors . Taking distribution information of data into account , Rudd et al . ( 2018 ) proposed the extreme value machine by utilizing the concept of margin distributions . Since deep neural networks ( DNNs ) have robust classification performance by learning high-level representations of data , OSR methods for DNNs have received great attention . Based on the theoretical foundations used in traditional ML-based OSR methods , Bendale & Boult ( 2016 ) proposed the first OSR strategy for DNNs called Openmax , which calibrates the output logits of pre-trained Softmax classifiers . To improve Openmax , Yoshihashi et al . ( 2019 ) proposed the classification-reconstruction learning to make robust latent feature vectors . Afterward , Oza & Patel ( 2019 ) proposed to exploit a class-conditioned autoencoder and use its reconstruction error to assess each input sample . Sun et al . ( 2020 ) employed several class-conditioned variational auto-encoders for generative modeling . Although previous OSR methods using discriminative models applied offline analyses to pre-trained Softmax classifiers or employed complicated DNN models , they have limited performance since the classifiers were trained solely based on known-class samples . To mitigate the problem , one can use background class regularization ( BCR ) to achieve robust empirical results . However , previous BCR methods ( Dhamija et al. , 2018 ; Hendrycks et al. , 2019 ; Liu et al. , 2020 ) are insufficient to properly solve the OSR problem . To design an effective open-set classifier that can overcome the previous limitations , we propose a novel BCR method suitable for OSR , which uses a distance-based classifier and a novel loss function for regularization . We provide detailed description in the next section . 2 PRELIMINARIES AND OUR CONTRIBUTIONS . 2.1 THE OPEN-SET RECOGNITION PROBLEM . The OSR problem addresses the classification setting that can face test samples from classes unseen during training . In this setting , open-set classifiers aim to properly classify known-class samples while rejecting unknown-class samples simultaneously . A similar problem to OSR is out-of-distribution ( OOD ) detection ( Hendrycks & Gimpel , 2017 ) , which typically aims to reject data items drawn far away from the training data distribution . In previous OOD detection studies ( Hendrycks & Gimpel , 2017 ; Liang et al. , 2018 ; Lee et al. , 2018a ; b ) , OOD samples tend to be drawn from other datasets or even images of noise . In this paper , we aim to reject test data whose classes are unknown but related to the training data , which narrows down the scope of conventional OOD detection tasks . Previously , Scheirer et al . ( 2013 ) introduced a formal definition of the OSR problem based on the notion of open-space risk RO , which is a relative measure of a positively labeled union of balls SV and open space O located far from SV . Since labeling any data item in O incurs open-space risk , it is straightforward that a classifier can not be a solution for the OSR problem if the classifier accepts data in infinitely wide regions , i.e. , its open-space risk is unbounded ( RO = ∞ ) . The definition implies that essential requirements to solve the OSR problem are 1 ) bounding open-space risk and 2 ) ideally balancing it with empirical risk to maintain a low classification error rate . Unlike traditional closed-set classifiers , open-set classifiers are required to limit the space of knownclass data to bound their open-space risk . To ensure bounded open-space risk , Scheirer et al . ( 2014 ) proposed to formulate compact abating probability ( CAP ) models . The principle of CAP models is that if the support region of a classifier decays in all directions from the training data , thresholding the region will bound the classifier ’ s open-space risk ( Boult et al. , 2019 ) . As depicted in Figure 1 , which compares traditional closed-set and open-set classification problems , properly building class-wise CAP models is an effective strategy to satisfy the two essential requirements of OSR . 2.2 POST-CLASSIFICATION ANALYSIS FOR PRE-TRAINED SOFTMAX CLASSIFIER . In this paper , we aim to solve the OSR problem by using a standard DNN-based classifier architecture f as a latent feature extractor . Applying a fully-connected layer to f , a conventional Softmax classifier computes the posterior probability of an input x belonging to the c-th known class by Ps ( y = c|x ) = exp ( wTc f ( x ) + bc ) ∑C i=1 exp ( w T i f ( x ) + bi ) , ( 1 ) where c ∈ { 1 , · · · , C } , f ( x ) ∈ Rn is the latent feature vector of x , and wc and bc are the weight and the bias for the c-th class , respectively . For pre-trained Softmax classifiers , Hendrycks & Gimpel ( 2017 ) proposed a baseline to detect anomalous samples , which imposes a threshold on the predictive confidence of Eq . ( 1 ) . When using the baseline method to solve the OSR problem , one can estimate the class of each known-class sample and recognize unknown-class data by ŷ = { argmaxc∈ { 1 , ··· , C } Ps ( y = c|x ) , if maxc∈ { 1 , ··· , C } Ps ( y = c|x ) ≥ τ , C + 1 ( unknown class ) , otherwise . ( 2 ) However , Eq . ( 2 ) can not formally bound open-space risk since it only rejects test samples near the decision boundary of classifiers , thereby having infinitely wide regions of acceptance ( Boult et al. , 2019 ) . Therefore , additional post-classification analysis methods using an auxiliary measure other than the Softmax probability are necessary to bound open-space risk , where distance measures have been widely used to build auxiliary CAP models in the latent feature space of f . To construct class-wise CAP models , Openmax ( Bendale & Boult , 2016 ) defined radial-basis decaying functions { s ( x , i ) } Ci=1 , each of which measures the class-belongingness of x for the c-th class , in the latent feature space of f . For each s ( x , c ) , the authors employed distance measures between f ( x ) and an empirical class mean vector µc , e.g. , s ( x , c ) = D2E ( f ( x ) , µc ) = ( f ( x ) − µc ) T ( f ( x ) − µc ) . To formulate effective CAP models based on s ( x , c ) , they statistically modeled the distribution of s ( x , c ) for known-class data based on the extreme value theory ( EVT ) ( Scheirer , 2017 ) , which provides a theoretical foundation that the Weibull distribution is suitable for modeling known-class samples located far from the class mean vectors ( extreme samples ) . To be specific , Openmax fits a Weibull distribution on extreme samples of the c-th class having the highest DE ( f ( x ) , µc ) values , where its cumulative distribution function ( CDF ) formulates the probability of inclusion PI ( x , c ) ( Jain et al. , 2014 ; Rudd et al. , 2018 ) , i.e. , PI ( x , c ) = 1 − WeibullCDF , which rapidly decays near extreme samples . Based on PI ( x , c ) , the decision rule of Eq . ( 2 ) can be calibrated to conduct robust OSR . 2.3 GENERALIZED OPEN-SET RECOGNITION AND BACKGROUND CLASS REGULARIZATION . Although they require additional inference procedures ( e.g. , EVT modeling ) to bound the open-space risk of pre-trained Softmax classifiers , previous post-classification analyses may have limited OSR performance since the classifiers are trained solely based on known-class samples . To empirically obtain robust OSR results without complicated post-classification analyses , one can use the strategy of BCR at the training phase , which exploits background-class samples as surrogates of unknownclass samples . Geng et al . ( 2020 ) argued that the generalized OSR setting that utilizes background samples is still less-explored and an important research direction to improve OSR performance . In the generalized OSR setting , classifiers should consider the following data classes among the infinite label space of all classes Y ( Dhamija et al. , 2018 ; Geng et al. , 2020 ) . • Known known classes ( KKCs ; K = { 1 , · · · , C } ⊂ Y ) include distinctly labeled positive classes , which also have side information , where U = Y \ K is the entire unknown classes . • Known unknown classes ( KUCs ; B ⊂ U ) include background classes , e.g. , labeled negative classes which are not necessarily grouped into a pre-defined set of KKCs K. • Unknown unknown classes ( UUCs ; A = U \B ) represent the rest of U , where UUC samples are not available at training time and have no side information , but occur at inference time . Throughout this paper , we denote the corresponding datasets for the data classes as follows . Dt is a training set consisting of multiple pairs of a KKC data sample and the corresponding class label y ∈ { 1 , · · · , C } . Dktest and Dutest are test sets of KKCs and UUCs , respectively . Db is a background dataset of KUCs . Then , a loss function for training classifiers with BCR can be formulated by L = Lcf + λLbg = E ( xk , y ) ∼Dt [ − logPs ( y|xk ) + λExb∼Db [ freg ( xk , y , xb ) ] ] , ( 3 ) where Lcf and Lbg are the losses for classification and BCR , respectively , and λ is a hyperparameter that balances Lcf and Lbg . For Lbg , previous studies designed their own freg , where Dhamija et al . ( 2018 ) proposed the objectosphere loss for OSR , and Hendrycks et al . ( 2019 ) and Liu et al . ( 2020 ) employed the uniformity and the energy losses for OOD detection , respectively . In this paper , we tackle the following limitations of the previous BCR methods . • In the previous BCR methods , Lbg were designed to make normal data and anomalies more distinguishable in terms of the corresponding anomaly scores . Since they categorized normal samples into a single group ( do not consider the classes ) in Lbg , the previous methods can not be suitable for rejecting UUC samples located relatively close to KKC data and maintaining robust closed-set classification results . • The previous methods using the decision rule of Eq . ( 2 ) ( e.g. , objectosphere ( Dhamija et al. , 2018 ) and uniformity ( Hendrycks et al. , 2019 ) ) can not bound open-space risk . Although one can use post-classification analyses to bound open-space risk , trained latent feature spaces are likely to be inappropriate for using another metric such as distance measures . • To increase the gap between KKC and KUC samples in terms of latent feature magnitude and energy value in the objectosphere ( Dhamija et al. , 2018 ) and the energy ( Liu et al. , 2020 ) losses , respectively , it is necessary to find proper margin parameters for each dataset . | This paper proposes a new approach for generalized open-set recognition (OSR) in classification setting where the idea is to build a model which could simultaneously detect unknown classes and maintain the accuracy of traditional closed-set classification of known classes. The proposed OSR is based on background class regularization (BCR) where data of known unknown classes are utilized in the training phase of the classifiers based on typical deep neural network (DNN) architectures. Previous works applying BCR have treated known-classes as one group and unknowns as other with SoftMax classification layer, leading to limited OSR performance, especially near the known classes, whereas proposed work regularizes and limits feature space in class-wise manner, making the data of unknown classes to be located far away from the known classes. Distance-based classifier applying linear discriminative analysis is used to model the latent features from DNN and to design novel loss function which can regulate the solution between known classes and unknown background classes in OSR setting, simultaneously keeping the robust performance of closed-set classification. Proposed approach is experimentally compared to three previous works applying BCR-based OSR with SoftMax classifiers. Proposed method outperforms those three related methods in well-known public benchmarks datasets of image and text classification tasks. Different performance metrics of classification accuracy, area under the receiver operating characteristic curve (AUROC), and the open-set classification rate (OSCR) are utilized in comparison. To summarize the contribution, paper presents LDA principled distance-based classifier (applied to output of neural network latent feature layer) and new loss function to train OSR-sensitive classifiers, developed and formulated based on the limitations of previous work and experimentally validated against previous BCR-based approaches. | SP:245947336694edb5f722c4aa5e874dfa537ceec2 |
DAdaQuant: Doubly-adaptive quantization for communication-efficient Federated Learning | 1 INTRODUCTION . Edge devices such as smartphones , remote sensors and smart home appliances generate massive amounts of data ( Wang et al. , 2018b ; Cao et al. , 2017 ; Shi & Dustdar , 2016 ) . In recent years , Federated Learning ( FL ) has emerged as a technique to train models on this data while preserving privacy ( McMahan et al. , 2017 ; Li et al. , 2018 ) . In FL , we have a single server that is connected to many clients . Each client stores a local dataset that it does not want to share with the server because of privacy concerns or law enforcement ( Voigt & Von dem Bussche , 2017 ) . The server wants to train a model on all local datasets . To this end , it initializes the model and sends it to a random subset of clients . Each client trains the model on its local dataset and sends the trained model back to the server . The server accumulates all trained models into an updated model for the next iteration and repeats the process for several rounds until some termination criterion is met . This procedure enables the server to train a model without accessing any local datasets . Today ’ s neural network models often have millions or even billions ( Brown et al. , 2020 ) of parameters , which makes high communication costs a concern in FL . In fact , Qiu et al . ( 2020 ) suggest that communication between clients and server may account for over 70 % of energy consumption in FL . Reducing communication in FL is an attractive area of research because it lowers bandwidth requirements , energy consumption and training time . Communication in FL occurs in two phases : Sending parameters from the server to clients ( downlink ) and sending updated parameters from clients to the server ( uplink ) . Uplink bandwidth usually imposes a tighter bottleneck than downlink bandwidth . This has several reasons . For one , the average global mobile upload bandwidth is currently less than one fourth of the download bandwidth ( Speedtest ) . For another , FL downlink communication sends the same parameters to each client . Broadcasting parameters is usually more efficient than the accumulation of parameters from differ- ent clients that is required for uplink communication ( Amiri et al. , 2020 ; Reisizadeh et al. , 2019 ) . For these reasons , we seek to compress uplink communication . A large class of compression algorithms for FL apply some lossy quantizer Q , optionally followed by a lossless compression stage . Q usually provides a “ quantization level ” hyperparameter q to control the coarseness of quantization ( e.g . the number of bins for fixed-point quantization ) . When q is kept constant during training , we speak of static quantization . When q changes , we speak of adaptive quantization . Adaptive quantization can exploit asymmetries in the FL framework to minimize communication . One such asymmetry lies in FL ’ s training time , where Jhunjhunwala et al . ( 2021 ) observed that early training rounds can use a lower q without affecting convergence . Figure 2 illustrates how time-adaptive quantization leverages this phenomenon to minimize communication . Another asymmetry lies in FL ’ s client space , because most FL algorithms weight client contributions to the global model proportional to their local dataset sizes . Figure 1 illustrates how client-adaptive quantization can minimize the quantization error . Intuitively , FL clients with greater weighting should have a greater commu- nication budget and our proposed client-adaptive quantization achieves this in a principled way . To this end , we introduce the expected variance of an accumulation of quantized parameters , E [ Var ( ∑ Q ( p ) ) ] , as a measure of the quantization error . Our client-adaptive quantization algorithm then assigns clients minimal quantization levels , subject to a fixed E [ Var ( ∑ Q ( p ) ) ] . This lowers the amount of data communicated from clients to the server , without increasing the quantization error . DAdaQuant ( Doubly Adaptive Quantization ) combines time- and client-adaptive quantization with an adaptation of the QSGD fixed-point quantization algorithm to achieve state-of-the-art FL uplink compression . In this paper , we make the following contributions : • We introduce the concept of client-adaptive quantization and develop algorithms for time- and client-adaptive quantization that are computationally efficient , empirically superior to existing algorithms , and compatible with arbitrary FL quantizers . Our client-adaptive quantization is provably optimal for stochastic fixed-point quantizers . • We create Federated QSGD as an adaptation of the stochastic fixed-point quantizer QSGD that works with FL . Federated QSGD outperforms all other quantizers , establishing a strong baseline for FL compression with static quantization . • We combine time- and client-adaptive quantization into DAdaQuant . We demonstrate DAdaQuant ’ s state-of-the-art compression by empirically comparing it against several competitive FL compression algorithms . 2 RELATED WORK . FL research has explored several approaches to reduce communication . We identify three general directions . First , there is a growing interest of investigating FL algorithms that can converge in fewer rounds . FedAvg ( McMahan et al. , 2017 ) achieves this with prolonged local training , while FOLB ( Nguyen et al. , 2020 ) speeds up convergence through a more principled client sampling . Since communication is proportional to the number of training rounds , these algorithms effectively reduce communication . Secondly , communication can be reduced by reducing the model size because the model size is proportional to the amount of training communication . PruneFL ( Jiang et al. , 2019 ) progressively prunes the model over the course of training , while AFD ( Bouacida et al. , 2021 ) only trains submodels on clients . Thirdly , it is possible to directly compress FL training communication . FL compression algorithms typically apply techniques like top-k sparsification ( Malekijoo et al. , 2021 ; Rothchild et al. , 2020 ) or quantization ( Reisizadeh et al. , 2019 ; Shlezinger et al. , 2020 ) to parameter updates , optionally followed by lossless compression . Our work applies to quantization-based compression algorithms . It is partially based on QSGD ( Alistarh et al. , 2017 ) , which combines lossy fixed-point quantization with a lossless compression algorithm to compress gradients communicated in distributed training . DAdaQuant adapts QSGD into Federated QSGD , which works with Federated Learning . DAdaQuant also draws inspiration from FedPAQ ( Reisizadeh et al. , 2019 ) , the first FL framework to use lossy compression based on model parameter update quantization . However , FedPAQ does not explore the advantages of additional lossless compression or adaptive quantization . UVeQFed ( Shlezinger et al. , 2020 ) is an FL compression algorithm that generalizes scalar quantization to vector quantization and subsequently employs lossless compression with arithmetic coding . Like FedPAQ , UVeQFed also limits itself to a single static quantization level . Faster convergence , model size reduction and communication compression are orthogonal techniques , so they can be combined for further communication savings . For this paper , we limit the scope of empirical comparisons to quantization-based FL compression algorithms . For quantization-based compression for model training , prior works have demonstrated that DNNs can be successfully trained in low-precision ( Banner et al. , 2018 ; Gupta et al. , 2015 ; Sun et al. , 2019 ) . There are also several adaptive quantization algorithms for training neural networks in a non-distributed setting . Shen et al . ( 2020 ) use different quantization levels for different parameters of a neural network . FracTrain ( Fu et al. , 2020 ) introduced multi-dimensional adaptive quantization by developing time-adaptive quantization and combining it with parameter-adaptive quantization . However , FracTrain uses the current loss to decide on the quantization level . FL generally can only compute local client losses that are too noisy to be practical for FracTrain . AdaQuantFL introduces time-adaptive quantization to FL , but requires the global loss ( Jhunjhunwala et al. , 2021 ) . To compute the global loss , AdaQuantFL has to communicate with every client each round . We show in Section 4.2 that this quickly becomes impractical as the number of clients grows . DAdaQuant ’ s time-adaptive quantization overcomes this issue without compromising on the underlying FL communication . In addition , to the best of our knowledge , DAdaQuant is the first algorithm to use client-adaptive quantization . 3 THE DADAQUANT METHOD . 3.1 FEDERATED LEARNING . Federated Learning assumes a client-server topology with a set C = { ci|i ∈ { 1 , 2 ... N } } of N clients that are connected to a single server . Each client ck has a local dataset Dk from the local data distribution Dk . Given a model M with parameters p , a loss function fp ( d ∈ Dk ) and the local loss Fk ( p ) = 1 |Dk| ∑ d∈Dk fp ( d ) , FL seeks to minimize the global loss G ( p ) = ∑N k=1 |Dk|∑ l |Dl| Fk ( p ) . 3.2 FEDERATED AVERAGING ( FEDAVG ) . DAdaQuant makes only minimal assumptions about the FL algorithm . Crucially , DAdaquant can complement FedAvg ( McMahan et al. , 2017 ) , which is representative of a large class of FL algorithms . FedAvg trains the model M over several rounds . In each round t , FedAvg sends the model parameters pt to a random subset St of K clients who then optimize their local objectives Fk ( pt ) and send the updated model parameters pkt+1 back to the server . The server accumulates all parameters into the new global model pt+1 = ∑ k∈St |Dk|∑ j |Dj | pkt+1 and starts the next round . Algorithm 1 lists FedAvg in detail . For our experiments , we use the FedProx ( Li et al. , 2018 ) adaptation of FedAvg . FedProx improves the convergence of FedAvg by adding the proximal term µ2 ‖p k t+1 − pt‖2 to the local objective Fk ( pkt+1 ) in Line 20 of Algorithm 1 . 3.3 QUANTIZATION WITH FEDERATED QSGD . While DAdaQuant can be applied to any quantizer with a configurable quantization level , it is optimized for fixed-point quantization . We introduce Federated QSGD as a competitive stochastic fixed-point quantizer on top of which DAdaQuant is applied . In general , stochastic fixed-point quantization uses a quantizer Qq with quantization level q that splits R≥0 and R≤0 into q intervals each . Qq ( p ) then returns the sign of p and |p| stochastically rounded to one of the endpoints of its encompassing interval . Qq ( p ) quantizes the vector p elementwise . We design DAdaQuant ’ s quantization stage based on QSGD , an efficient fixed-point quantizer for state-of-the-art gradient compression . QSGD quantizes a vector p in three steps : 1 . Quantize p as Qq ( p ||p||2 ) into q bins in [ 0 , 1 ] , storing signs and ||p||2 separately . ( lossy ) 2 . Encode the resulting integers with 0 run-length encoding . ( lossless ) 3 . Encode the resulting integers with Elias ω coding . ( lossless ) QSGD has been designed specifically for quantizing gradients . This makes it not directly applicable to parameter compression . To overcome this limitation , we apply difference coding to uplink compression , first introduced to FL by FedPAQ . Each client ck applies Qq to the parameter updates pkt+1 − pt ( cf . Line 21 of Algorithm 1 ) and sends them to the server . The server keeps track of the previous parameters pt and accumulates the quantized parameter updates into the new parameters as pt+1 = pt + ∑ k∈St |Dk|∑ l |Dl| Qq ( p k t+1 − pt ) ( cf . Line 11 of Algorithm 1 ) . We find that QSGD works well with parameter updates , which can be regarded as an accumulation of gradients over several training steps . We call this adaptation of QSGD Federated QSGD . | This paper studies how to compress the local model changes in federated learning to save uplink communication costs. In particular, the authors found (1) adaptively increasing the number of quantization levels (2) adaptively assigning different quantization levels on different clients, can effectively outperform previous static quantization schemes. They evaluated the proposed algorithm on multiple federated learning datasets. | SP:efb9b15e4f6f605bf0fc1dfa65914db3d0bb72ef |
DAdaQuant: Doubly-adaptive quantization for communication-efficient Federated Learning | 1 INTRODUCTION . Edge devices such as smartphones , remote sensors and smart home appliances generate massive amounts of data ( Wang et al. , 2018b ; Cao et al. , 2017 ; Shi & Dustdar , 2016 ) . In recent years , Federated Learning ( FL ) has emerged as a technique to train models on this data while preserving privacy ( McMahan et al. , 2017 ; Li et al. , 2018 ) . In FL , we have a single server that is connected to many clients . Each client stores a local dataset that it does not want to share with the server because of privacy concerns or law enforcement ( Voigt & Von dem Bussche , 2017 ) . The server wants to train a model on all local datasets . To this end , it initializes the model and sends it to a random subset of clients . Each client trains the model on its local dataset and sends the trained model back to the server . The server accumulates all trained models into an updated model for the next iteration and repeats the process for several rounds until some termination criterion is met . This procedure enables the server to train a model without accessing any local datasets . Today ’ s neural network models often have millions or even billions ( Brown et al. , 2020 ) of parameters , which makes high communication costs a concern in FL . In fact , Qiu et al . ( 2020 ) suggest that communication between clients and server may account for over 70 % of energy consumption in FL . Reducing communication in FL is an attractive area of research because it lowers bandwidth requirements , energy consumption and training time . Communication in FL occurs in two phases : Sending parameters from the server to clients ( downlink ) and sending updated parameters from clients to the server ( uplink ) . Uplink bandwidth usually imposes a tighter bottleneck than downlink bandwidth . This has several reasons . For one , the average global mobile upload bandwidth is currently less than one fourth of the download bandwidth ( Speedtest ) . For another , FL downlink communication sends the same parameters to each client . Broadcasting parameters is usually more efficient than the accumulation of parameters from differ- ent clients that is required for uplink communication ( Amiri et al. , 2020 ; Reisizadeh et al. , 2019 ) . For these reasons , we seek to compress uplink communication . A large class of compression algorithms for FL apply some lossy quantizer Q , optionally followed by a lossless compression stage . Q usually provides a “ quantization level ” hyperparameter q to control the coarseness of quantization ( e.g . the number of bins for fixed-point quantization ) . When q is kept constant during training , we speak of static quantization . When q changes , we speak of adaptive quantization . Adaptive quantization can exploit asymmetries in the FL framework to minimize communication . One such asymmetry lies in FL ’ s training time , where Jhunjhunwala et al . ( 2021 ) observed that early training rounds can use a lower q without affecting convergence . Figure 2 illustrates how time-adaptive quantization leverages this phenomenon to minimize communication . Another asymmetry lies in FL ’ s client space , because most FL algorithms weight client contributions to the global model proportional to their local dataset sizes . Figure 1 illustrates how client-adaptive quantization can minimize the quantization error . Intuitively , FL clients with greater weighting should have a greater commu- nication budget and our proposed client-adaptive quantization achieves this in a principled way . To this end , we introduce the expected variance of an accumulation of quantized parameters , E [ Var ( ∑ Q ( p ) ) ] , as a measure of the quantization error . Our client-adaptive quantization algorithm then assigns clients minimal quantization levels , subject to a fixed E [ Var ( ∑ Q ( p ) ) ] . This lowers the amount of data communicated from clients to the server , without increasing the quantization error . DAdaQuant ( Doubly Adaptive Quantization ) combines time- and client-adaptive quantization with an adaptation of the QSGD fixed-point quantization algorithm to achieve state-of-the-art FL uplink compression . In this paper , we make the following contributions : • We introduce the concept of client-adaptive quantization and develop algorithms for time- and client-adaptive quantization that are computationally efficient , empirically superior to existing algorithms , and compatible with arbitrary FL quantizers . Our client-adaptive quantization is provably optimal for stochastic fixed-point quantizers . • We create Federated QSGD as an adaptation of the stochastic fixed-point quantizer QSGD that works with FL . Federated QSGD outperforms all other quantizers , establishing a strong baseline for FL compression with static quantization . • We combine time- and client-adaptive quantization into DAdaQuant . We demonstrate DAdaQuant ’ s state-of-the-art compression by empirically comparing it against several competitive FL compression algorithms . 2 RELATED WORK . FL research has explored several approaches to reduce communication . We identify three general directions . First , there is a growing interest of investigating FL algorithms that can converge in fewer rounds . FedAvg ( McMahan et al. , 2017 ) achieves this with prolonged local training , while FOLB ( Nguyen et al. , 2020 ) speeds up convergence through a more principled client sampling . Since communication is proportional to the number of training rounds , these algorithms effectively reduce communication . Secondly , communication can be reduced by reducing the model size because the model size is proportional to the amount of training communication . PruneFL ( Jiang et al. , 2019 ) progressively prunes the model over the course of training , while AFD ( Bouacida et al. , 2021 ) only trains submodels on clients . Thirdly , it is possible to directly compress FL training communication . FL compression algorithms typically apply techniques like top-k sparsification ( Malekijoo et al. , 2021 ; Rothchild et al. , 2020 ) or quantization ( Reisizadeh et al. , 2019 ; Shlezinger et al. , 2020 ) to parameter updates , optionally followed by lossless compression . Our work applies to quantization-based compression algorithms . It is partially based on QSGD ( Alistarh et al. , 2017 ) , which combines lossy fixed-point quantization with a lossless compression algorithm to compress gradients communicated in distributed training . DAdaQuant adapts QSGD into Federated QSGD , which works with Federated Learning . DAdaQuant also draws inspiration from FedPAQ ( Reisizadeh et al. , 2019 ) , the first FL framework to use lossy compression based on model parameter update quantization . However , FedPAQ does not explore the advantages of additional lossless compression or adaptive quantization . UVeQFed ( Shlezinger et al. , 2020 ) is an FL compression algorithm that generalizes scalar quantization to vector quantization and subsequently employs lossless compression with arithmetic coding . Like FedPAQ , UVeQFed also limits itself to a single static quantization level . Faster convergence , model size reduction and communication compression are orthogonal techniques , so they can be combined for further communication savings . For this paper , we limit the scope of empirical comparisons to quantization-based FL compression algorithms . For quantization-based compression for model training , prior works have demonstrated that DNNs can be successfully trained in low-precision ( Banner et al. , 2018 ; Gupta et al. , 2015 ; Sun et al. , 2019 ) . There are also several adaptive quantization algorithms for training neural networks in a non-distributed setting . Shen et al . ( 2020 ) use different quantization levels for different parameters of a neural network . FracTrain ( Fu et al. , 2020 ) introduced multi-dimensional adaptive quantization by developing time-adaptive quantization and combining it with parameter-adaptive quantization . However , FracTrain uses the current loss to decide on the quantization level . FL generally can only compute local client losses that are too noisy to be practical for FracTrain . AdaQuantFL introduces time-adaptive quantization to FL , but requires the global loss ( Jhunjhunwala et al. , 2021 ) . To compute the global loss , AdaQuantFL has to communicate with every client each round . We show in Section 4.2 that this quickly becomes impractical as the number of clients grows . DAdaQuant ’ s time-adaptive quantization overcomes this issue without compromising on the underlying FL communication . In addition , to the best of our knowledge , DAdaQuant is the first algorithm to use client-adaptive quantization . 3 THE DADAQUANT METHOD . 3.1 FEDERATED LEARNING . Federated Learning assumes a client-server topology with a set C = { ci|i ∈ { 1 , 2 ... N } } of N clients that are connected to a single server . Each client ck has a local dataset Dk from the local data distribution Dk . Given a model M with parameters p , a loss function fp ( d ∈ Dk ) and the local loss Fk ( p ) = 1 |Dk| ∑ d∈Dk fp ( d ) , FL seeks to minimize the global loss G ( p ) = ∑N k=1 |Dk|∑ l |Dl| Fk ( p ) . 3.2 FEDERATED AVERAGING ( FEDAVG ) . DAdaQuant makes only minimal assumptions about the FL algorithm . Crucially , DAdaquant can complement FedAvg ( McMahan et al. , 2017 ) , which is representative of a large class of FL algorithms . FedAvg trains the model M over several rounds . In each round t , FedAvg sends the model parameters pt to a random subset St of K clients who then optimize their local objectives Fk ( pt ) and send the updated model parameters pkt+1 back to the server . The server accumulates all parameters into the new global model pt+1 = ∑ k∈St |Dk|∑ j |Dj | pkt+1 and starts the next round . Algorithm 1 lists FedAvg in detail . For our experiments , we use the FedProx ( Li et al. , 2018 ) adaptation of FedAvg . FedProx improves the convergence of FedAvg by adding the proximal term µ2 ‖p k t+1 − pt‖2 to the local objective Fk ( pkt+1 ) in Line 20 of Algorithm 1 . 3.3 QUANTIZATION WITH FEDERATED QSGD . While DAdaQuant can be applied to any quantizer with a configurable quantization level , it is optimized for fixed-point quantization . We introduce Federated QSGD as a competitive stochastic fixed-point quantizer on top of which DAdaQuant is applied . In general , stochastic fixed-point quantization uses a quantizer Qq with quantization level q that splits R≥0 and R≤0 into q intervals each . Qq ( p ) then returns the sign of p and |p| stochastically rounded to one of the endpoints of its encompassing interval . Qq ( p ) quantizes the vector p elementwise . We design DAdaQuant ’ s quantization stage based on QSGD , an efficient fixed-point quantizer for state-of-the-art gradient compression . QSGD quantizes a vector p in three steps : 1 . Quantize p as Qq ( p ||p||2 ) into q bins in [ 0 , 1 ] , storing signs and ||p||2 separately . ( lossy ) 2 . Encode the resulting integers with 0 run-length encoding . ( lossless ) 3 . Encode the resulting integers with Elias ω coding . ( lossless ) QSGD has been designed specifically for quantizing gradients . This makes it not directly applicable to parameter compression . To overcome this limitation , we apply difference coding to uplink compression , first introduced to FL by FedPAQ . Each client ck applies Qq to the parameter updates pkt+1 − pt ( cf . Line 21 of Algorithm 1 ) and sends them to the server . The server keeps track of the previous parameters pt and accumulates the quantized parameter updates into the new parameters as pt+1 = pt + ∑ k∈St |Dk|∑ l |Dl| Qq ( p k t+1 − pt ) ( cf . Line 11 of Algorithm 1 ) . We find that QSGD works well with parameter updates , which can be regarded as an accumulation of gradients over several training steps . We call this adaptation of QSGD Federated QSGD . | The paper proposes a communication-efficient federated learning framework named DAdaQuant. It is a quantization-based FL compression algorithm, which chooses both time-adaptive and client-adaptive quantization levels to improve the communication efficiency of FL algorithms over previous quantization works. The work provides math intuition behind choosing the client-adaptive quantization level. The authors also show solid empirical studies over FL datasets and validate the superiority of the proposed approach in communication efficiency. | SP:efb9b15e4f6f605bf0fc1dfa65914db3d0bb72ef |
DAdaQuant: Doubly-adaptive quantization for communication-efficient Federated Learning | 1 INTRODUCTION . Edge devices such as smartphones , remote sensors and smart home appliances generate massive amounts of data ( Wang et al. , 2018b ; Cao et al. , 2017 ; Shi & Dustdar , 2016 ) . In recent years , Federated Learning ( FL ) has emerged as a technique to train models on this data while preserving privacy ( McMahan et al. , 2017 ; Li et al. , 2018 ) . In FL , we have a single server that is connected to many clients . Each client stores a local dataset that it does not want to share with the server because of privacy concerns or law enforcement ( Voigt & Von dem Bussche , 2017 ) . The server wants to train a model on all local datasets . To this end , it initializes the model and sends it to a random subset of clients . Each client trains the model on its local dataset and sends the trained model back to the server . The server accumulates all trained models into an updated model for the next iteration and repeats the process for several rounds until some termination criterion is met . This procedure enables the server to train a model without accessing any local datasets . Today ’ s neural network models often have millions or even billions ( Brown et al. , 2020 ) of parameters , which makes high communication costs a concern in FL . In fact , Qiu et al . ( 2020 ) suggest that communication between clients and server may account for over 70 % of energy consumption in FL . Reducing communication in FL is an attractive area of research because it lowers bandwidth requirements , energy consumption and training time . Communication in FL occurs in two phases : Sending parameters from the server to clients ( downlink ) and sending updated parameters from clients to the server ( uplink ) . Uplink bandwidth usually imposes a tighter bottleneck than downlink bandwidth . This has several reasons . For one , the average global mobile upload bandwidth is currently less than one fourth of the download bandwidth ( Speedtest ) . For another , FL downlink communication sends the same parameters to each client . Broadcasting parameters is usually more efficient than the accumulation of parameters from differ- ent clients that is required for uplink communication ( Amiri et al. , 2020 ; Reisizadeh et al. , 2019 ) . For these reasons , we seek to compress uplink communication . A large class of compression algorithms for FL apply some lossy quantizer Q , optionally followed by a lossless compression stage . Q usually provides a “ quantization level ” hyperparameter q to control the coarseness of quantization ( e.g . the number of bins for fixed-point quantization ) . When q is kept constant during training , we speak of static quantization . When q changes , we speak of adaptive quantization . Adaptive quantization can exploit asymmetries in the FL framework to minimize communication . One such asymmetry lies in FL ’ s training time , where Jhunjhunwala et al . ( 2021 ) observed that early training rounds can use a lower q without affecting convergence . Figure 2 illustrates how time-adaptive quantization leverages this phenomenon to minimize communication . Another asymmetry lies in FL ’ s client space , because most FL algorithms weight client contributions to the global model proportional to their local dataset sizes . Figure 1 illustrates how client-adaptive quantization can minimize the quantization error . Intuitively , FL clients with greater weighting should have a greater commu- nication budget and our proposed client-adaptive quantization achieves this in a principled way . To this end , we introduce the expected variance of an accumulation of quantized parameters , E [ Var ( ∑ Q ( p ) ) ] , as a measure of the quantization error . Our client-adaptive quantization algorithm then assigns clients minimal quantization levels , subject to a fixed E [ Var ( ∑ Q ( p ) ) ] . This lowers the amount of data communicated from clients to the server , without increasing the quantization error . DAdaQuant ( Doubly Adaptive Quantization ) combines time- and client-adaptive quantization with an adaptation of the QSGD fixed-point quantization algorithm to achieve state-of-the-art FL uplink compression . In this paper , we make the following contributions : • We introduce the concept of client-adaptive quantization and develop algorithms for time- and client-adaptive quantization that are computationally efficient , empirically superior to existing algorithms , and compatible with arbitrary FL quantizers . Our client-adaptive quantization is provably optimal for stochastic fixed-point quantizers . • We create Federated QSGD as an adaptation of the stochastic fixed-point quantizer QSGD that works with FL . Federated QSGD outperforms all other quantizers , establishing a strong baseline for FL compression with static quantization . • We combine time- and client-adaptive quantization into DAdaQuant . We demonstrate DAdaQuant ’ s state-of-the-art compression by empirically comparing it against several competitive FL compression algorithms . 2 RELATED WORK . FL research has explored several approaches to reduce communication . We identify three general directions . First , there is a growing interest of investigating FL algorithms that can converge in fewer rounds . FedAvg ( McMahan et al. , 2017 ) achieves this with prolonged local training , while FOLB ( Nguyen et al. , 2020 ) speeds up convergence through a more principled client sampling . Since communication is proportional to the number of training rounds , these algorithms effectively reduce communication . Secondly , communication can be reduced by reducing the model size because the model size is proportional to the amount of training communication . PruneFL ( Jiang et al. , 2019 ) progressively prunes the model over the course of training , while AFD ( Bouacida et al. , 2021 ) only trains submodels on clients . Thirdly , it is possible to directly compress FL training communication . FL compression algorithms typically apply techniques like top-k sparsification ( Malekijoo et al. , 2021 ; Rothchild et al. , 2020 ) or quantization ( Reisizadeh et al. , 2019 ; Shlezinger et al. , 2020 ) to parameter updates , optionally followed by lossless compression . Our work applies to quantization-based compression algorithms . It is partially based on QSGD ( Alistarh et al. , 2017 ) , which combines lossy fixed-point quantization with a lossless compression algorithm to compress gradients communicated in distributed training . DAdaQuant adapts QSGD into Federated QSGD , which works with Federated Learning . DAdaQuant also draws inspiration from FedPAQ ( Reisizadeh et al. , 2019 ) , the first FL framework to use lossy compression based on model parameter update quantization . However , FedPAQ does not explore the advantages of additional lossless compression or adaptive quantization . UVeQFed ( Shlezinger et al. , 2020 ) is an FL compression algorithm that generalizes scalar quantization to vector quantization and subsequently employs lossless compression with arithmetic coding . Like FedPAQ , UVeQFed also limits itself to a single static quantization level . Faster convergence , model size reduction and communication compression are orthogonal techniques , so they can be combined for further communication savings . For this paper , we limit the scope of empirical comparisons to quantization-based FL compression algorithms . For quantization-based compression for model training , prior works have demonstrated that DNNs can be successfully trained in low-precision ( Banner et al. , 2018 ; Gupta et al. , 2015 ; Sun et al. , 2019 ) . There are also several adaptive quantization algorithms for training neural networks in a non-distributed setting . Shen et al . ( 2020 ) use different quantization levels for different parameters of a neural network . FracTrain ( Fu et al. , 2020 ) introduced multi-dimensional adaptive quantization by developing time-adaptive quantization and combining it with parameter-adaptive quantization . However , FracTrain uses the current loss to decide on the quantization level . FL generally can only compute local client losses that are too noisy to be practical for FracTrain . AdaQuantFL introduces time-adaptive quantization to FL , but requires the global loss ( Jhunjhunwala et al. , 2021 ) . To compute the global loss , AdaQuantFL has to communicate with every client each round . We show in Section 4.2 that this quickly becomes impractical as the number of clients grows . DAdaQuant ’ s time-adaptive quantization overcomes this issue without compromising on the underlying FL communication . In addition , to the best of our knowledge , DAdaQuant is the first algorithm to use client-adaptive quantization . 3 THE DADAQUANT METHOD . 3.1 FEDERATED LEARNING . Federated Learning assumes a client-server topology with a set C = { ci|i ∈ { 1 , 2 ... N } } of N clients that are connected to a single server . Each client ck has a local dataset Dk from the local data distribution Dk . Given a model M with parameters p , a loss function fp ( d ∈ Dk ) and the local loss Fk ( p ) = 1 |Dk| ∑ d∈Dk fp ( d ) , FL seeks to minimize the global loss G ( p ) = ∑N k=1 |Dk|∑ l |Dl| Fk ( p ) . 3.2 FEDERATED AVERAGING ( FEDAVG ) . DAdaQuant makes only minimal assumptions about the FL algorithm . Crucially , DAdaquant can complement FedAvg ( McMahan et al. , 2017 ) , which is representative of a large class of FL algorithms . FedAvg trains the model M over several rounds . In each round t , FedAvg sends the model parameters pt to a random subset St of K clients who then optimize their local objectives Fk ( pt ) and send the updated model parameters pkt+1 back to the server . The server accumulates all parameters into the new global model pt+1 = ∑ k∈St |Dk|∑ j |Dj | pkt+1 and starts the next round . Algorithm 1 lists FedAvg in detail . For our experiments , we use the FedProx ( Li et al. , 2018 ) adaptation of FedAvg . FedProx improves the convergence of FedAvg by adding the proximal term µ2 ‖p k t+1 − pt‖2 to the local objective Fk ( pkt+1 ) in Line 20 of Algorithm 1 . 3.3 QUANTIZATION WITH FEDERATED QSGD . While DAdaQuant can be applied to any quantizer with a configurable quantization level , it is optimized for fixed-point quantization . We introduce Federated QSGD as a competitive stochastic fixed-point quantizer on top of which DAdaQuant is applied . In general , stochastic fixed-point quantization uses a quantizer Qq with quantization level q that splits R≥0 and R≤0 into q intervals each . Qq ( p ) then returns the sign of p and |p| stochastically rounded to one of the endpoints of its encompassing interval . Qq ( p ) quantizes the vector p elementwise . We design DAdaQuant ’ s quantization stage based on QSGD , an efficient fixed-point quantizer for state-of-the-art gradient compression . QSGD quantizes a vector p in three steps : 1 . Quantize p as Qq ( p ||p||2 ) into q bins in [ 0 , 1 ] , storing signs and ||p||2 separately . ( lossy ) 2 . Encode the resulting integers with 0 run-length encoding . ( lossless ) 3 . Encode the resulting integers with Elias ω coding . ( lossless ) QSGD has been designed specifically for quantizing gradients . This makes it not directly applicable to parameter compression . To overcome this limitation , we apply difference coding to uplink compression , first introduced to FL by FedPAQ . Each client ck applies Qq to the parameter updates pkt+1 − pt ( cf . Line 21 of Algorithm 1 ) and sends them to the server . The server keeps track of the previous parameters pt and accumulates the quantized parameter updates into the new parameters as pt+1 = pt + ∑ k∈St |Dk|∑ l |Dl| Qq ( p k t+1 − pt ) ( cf . Line 11 of Algorithm 1 ) . We find that QSGD works well with parameter updates , which can be regarded as an accumulation of gradients over several training steps . We call this adaptation of QSGD Federated QSGD . | The paper tries to reduce the communication cost of the Federated Learning (FL) algorithms. They introduce the doubly-adaptive quantization algorithm (DAdaQuant), which adopts two quantization techniques: 1, time-adaptive quantization; 2, client-adaptive quantization. The empirical studies also show that DAdaQuant can improve client sever compression. | SP:efb9b15e4f6f605bf0fc1dfa65914db3d0bb72ef |
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 . | This paper presents a time-aware convolutional embedding learning for temporal KGC. It converts timestamps as temporal convolutional filters fo fully interact with entities and relations. Overall, this paper is well written. | SP:6e5ce8e8b86e1f16192d9a403a71bc05bcaf2265 |
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 paper proposes a novel and more expressive model TaCE for temporal knowledge base completion. TaCE has 4 modules - the Temporal Convolution module (generates a time-aware representation of (s,r) or (r,o) depending on the query), Static Convolution module (generates a time-independent representation of (s,r) or (r,o) depending on the query), Deep Learning module (output of previous two modules is passed through various fully-connected layers), and Link prediction module (this final module takes input from deep learning module and scores all entities on their likelihood of being the correct answer to the query). The superiority of the model is demonstrated via extensive experimentation. | SP:6e5ce8e8b86e1f16192d9a403a71bc05bcaf2265 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.