Question: Represent the text to find a very short summary (1-2 sentences max)

Question: Deep generative modeling using flows has gained popularity owing to the tractable exact log-likelihood estimation with efficient training and synthesis process. However, flow models suffer from the challenge of having high dimensional latent space, same in dimension as the input space. An effective solution to the above challenge as proposed by is a multi-scale architecture, which is based on iterative early factorization of a part of the total dimensions at regular intervals. Prior works on generative flows involving a multi-scale architecture perform the dimension factorization based on a static masking. We propose a novel multi-scale architecture that performs data dependent factorization to decide which dimensions should pass through more flow layers. To facilitate the same, we introduce a heuristic based on the contribution of each dimension to the total log-likelihood which encodes the importance of the dimensions. Our proposed heuristic is readily obtained as part of the flow training process, enabling versatile implementation of our likelihood contribution based multi-scale architecture for generic flow models. We present such an implementation for the original flow introduced in , and demonstrate improvements in log-likelihood score and sampling quality on standard image benchmarks. We also conduct ablation studies to compare proposed method with other options for dimension factorization. Deep Generative Modeling aims to learn the embedded distributions and representations in input (especially unlabelled) data, requiring no/minimal human labelling effort. Learning without knowledge of labels (unsupervised learning) is of increasing importance because of the abundance of unlabelled data and the rich inherent patterns they posses. The representations learnt can then be utilized in a number of downstream tasks such as semi-supervised learning ), synthetic data augmentation and adversarial training , text analysis and model based control etc. The repository of deep generative modeling majorly includes Likelihood based models such as autoregressive models (b;), latent variable models , flow based models (; 2016;) and implicit models such as generative adversarial networks (GANs) . Autoregressive models (; b; a; achieve exceptional log-likelihood score on many standard datasets, indicative of their power to model the inherent distribution. But, they suffer from slow sampling process, making them unacceptable to adopt in real world applications. Latent variable models such as variational autoencoders tend to better capture the global feature representation in data, but do not offer an exact density estimate. Implicit generative models such as GANs which optimize a generator and a discriminator in a min-max fashion have recently become popular for their ability to synthesize realistic data . But, GANs do not offer a latent space suitable for further downstream tasks, nor do they perform density estimation. Flow based generative models perform exact density estimation with fast inference and sampling, due to their parallelizability. They also provide an information rich latent space suitable for many applications. However, the dimension of latent space for flow based generative models is same as the high-dimensional input space, by virtue of bijectivity nature of flows. This poses a bottleneck for flow models to scale with increasing input dimensions due to computational complexity. An effective solution to the above challenge is a multi-scale architecture, introduced by , which performs iterative early gaussianization of a part of the total dimensions at regular intervals of flow layers. This not only makes the model computational and memory efficient but also aids in distributing the loss function throughout the network for better training. Many prior works including;;; implement multi-scale architecture in their flow models, but use static masking methods for factorization of dimensions. We propose a multi-scale architecture which performs data dependent factorization to decide which dimensions should pass through more flow layers. For the decision making, we introduce a heuristic based on the amount of total log-likelihood contributed by each dimension, which in turn signifies their individual importance. We lay the ground rules for quantitative estimation and qualitative sampling to be satisfied by an ideal factorization method for a multi-scale architecture. Since in the proposed architecture, the heuristic is obtained as part of the flow training process, it can be universally applied to generic flow models. We present such implementations for flow models based on affine/additive coupling and ordinary differential equation (ODE) and achieve quantitative and qualitative improvements. We also perform ablation studies to confirm the novelty of our method. Summing up, the contributions of our research are, 1. A log-determinant based heuristic which entails the contribution by each dimensions towards the total log-likelihood in a multi-scale architecture. 2. A multi-scale architecture based on the above heuristic performing data-dependent splitting of dimensions, implemented for several classes of flow models. 3. Quantitative and qualitative analysis of above implementations and an ablation study To the best of our knowledge, we are the first to propose a data-dependent splitting of dimensions in a multi-scale architecture. In this section, we illustrate the functioning of flow based generative models and the multiscale architecture as introduced by. Let x be a high-dimensional random vector with unknown true distribution p(x). The following formulation is directly applicable to continous data, and with some pre-processing steps such as dequantization (; ;) to discrete data. Let z be the latent variable with a known standard distribution p(z), such as a standard multivariate gaussian. Using an i.i.d. dataset D, the target is to model p θ (x) with parameters θ. A flow, f θ is defined to be an invertible transformation that maps observed data x to the latent variable z. A flow is invertible, so the inverse function T maps z to x, i.e. The log-likelihood can be expressed as, where ∂f θ (x) ∂x T is the Jacobian of f θ at x. The invertibile nature of flow allows it to be capable of being composed of other flows of compatible dimensions. In practice, flows are constructed by composing a series of component flows. Let the flow f θ be composed of K component flows, i.e. and the intermediate variables be denoted by y K, y K−1, · · ·, y 0 = x. Then the log-likelihood of the composed flow is, Log-latent density which follows from the fact that det(A · B) = det(A) · det(B). In our work, we refer the first term in Equation 4 as log-latent-density and the second term as log-determinant (log-det). The reverse path, from z to x can be written as a composition of inverse flows, Confirming with the properties of a flow as mentioned above, different types of flows can be constructed (; ;). Multi-scale architecture is a design choice for latent space dimensionality reduction of flow models, in which part of the dimensions are factored out/early gaussianized at regular intervals, and the other part is exposed to more flow layers. The process is called dimension factorization. In the problem setting as introduced in Section 2.1, the factoring operation can be mathematically expressed as, The factoring of dimensions at early layers has the benefit of distributing the loss function throughout the network and optimizing the amount of computation and memory used by the model. We consider the multi-scale architecture for flow based generative models as introduced by (and later used by state-of-the-art flow models such as Glow ) as the base of our research work. In a multi-scale architecture, it is apparent that the network will better learn the distribution of variables getting exposed to more layers of flow as compared to the ones which get factored at a finer scale (earlier layer). The method of dimension splitting proposed by prior works such as (; ;) are static in nature and do not distinguish between importance of different dimensions. In this section, we introduce a heuristic to estimate the contribution of each dimension towards the total log-likelihood, and introduce a method which can use the heuristic to decide the dimensions to be factored at an earlier layer, eventually achieving preferrential splitting in multiscale architecture. Our approach builds an efficient multiscale architecture which factors the dimensions at each flow layer in a way such that the local variance in the input space is well captured as the flow progresses and the log-likelihood is maximized. We also describe how our multi-scale architecture can be implemented over several standard flow models. Recall from Equation 4 that the log-likelihood is composed of two terms, the log-latent-density term and the log-det term. The log-latent-density term depends on the choice of latent distribution whereas the log-det term depends on the modeling of the flow layers. So, careful design of flow layers can lead to maximized log-determinant, eventually maximizing the likelihood. The total log-det term is nothing but the sum of log-det terms contributed by each dimension. Let the dimension of the input space x be s × s × c, where s is the image height/width and c is the number of channels for image inputs. For the following formulation, let us assume no dimensions were gaussianized early so that we have access to log-det term for all dimensions at each flow layer, and the dimension at all intermediate layer remains same (i.e. s × s × c). We apply a flow (f θ) with K component flows to The intermediate variables are denoted by y K, y K−1, · · ·, y 0 with y K = z (since no early gaussianization was done) and y 0 = x. The log-det term at layer l, L The log-det of the jacobian term encompasses contribution by all the s × s × c dimensions. We decompose it to obtain the individual contribution by variables (dimensions) towards the total log-det (∼ total log-likelihood). The log-det term can be viewed (with slight abuse of notations) as a s × s × c tensor corresponding to each of the dimensions, summed over the flow layers till l, ] s×s×c, where α, β ∈ {0, · · ·, s} and γ ∈ {0, · · ·, c} s.t. The entries in [L d] s×s×c having higher value correspond to the variables which contribute more towards the total log-likelihood, hence are more valuable for better flow formulation. So, we can use the likelihood contribution (in the form of log-det term) by each dimension as a heuristic for deciding which variables should be gaussianized early in a multi-scale architecture. Ideally, at each flow layer, the variables with more log-det term should be exposed to more layer of flow and the ones having less log-det term should be factored out. In this manner, selectively more power can be provided to variables which capture meaningful representation (and are more valuable from log-det perspective) to be expressive by being exposed to multiple flow layers. This formulation leads to enhanced density estimation performance. Additionally, for many datasets such as images, the spatial nature should be taken into account while deciding dimensions for early gaussianization. Summarily, at every flow layer, an ideal factorization method should, 1. (Quantitative) For efficient density estimation: Early gaussianize the variables having less log-det and expose the ones having more log-det to more flow layers 2. (Qualitative) For qualitative reconstruction: Capture the local variance over the flow layers, i.e. the dimensions being exposed to more flow layers should contain representative pixel variables from throughout the whole image. Keeping the above requirements in mind, variants of hybrid techniques for factorization can be implemented for different types of flow models which involve a multi-scale architecture, to improve their density estimation and qualitative performance. The key requirement is availability of log-det contributions per dimension, which can be fulfilled by decomposition of the log-det of the jacobian. We refer to the method as Likelihood Contribution based Multi-scale Architecture (LCMA). The steps of LCMA implementation for flow models is summarized in Algorithm 1. Note that in step 2 of dimension factorization phase in algorithm 1, we group the dimensions having more/less log-det locally and then perform splitting. This preserves the local spatial variation of the image in both parts of the factorization, leveraging both enhanced density estimation as well as qualitative reconstruction. Another important observation is since the factorization of dimensions does not occur during the training time, and before the actual training starts, the decision of dimensions which get factored at each flow layer is fixed, the change of variables formula can be applied. This allows the use of non-invertible operations (e.g. max and min pooling) for efficient factorization with log-det heuristic. Step 1 of dimension factorization phase requires computation of individual contribution of dimensions ([L (l) d ] s×s×c ) towards the total log-likelihood, which can vary depending on the original design of flow Algorithm 1: LCMA implementation for generative flow models Pre-Training Phase: Pre-train a network with no multiscale architecture (no dimensionality reduction) to obtain the log-det term at every flow layer. Dimension Factorization: In this phase, the dimensions to be factored at each flow layer is decided based on the log-det term at that layer is computed specifically for corresponding flow models (Refer Section 3.1 and Section 3.2). shaped tensor using local max and min-pooling (= −max-pooling(−input)) operations (Figure 1) at each flow layer. 3. Among the 4c channels, one half contains the dimensions having more log-det term compared with its neighbourhood pixel (Black marked in Fig. 1), while the other half contains the dimensions having less log-det (White marked in Fig. 1). 4. Split the tensor along the channel dimension to two parts. 5. Forward the corresponding dimensions contributing more towards likelihood into more flow layers and early gaussianize the ones contributing less. 6. Repeat steps 1-5 for all the layers with dimensions passed to that layer till the latent space. Training Phase: The decision of dimensions to be factored at each layer as performed in previous step remains fixed. Finally, the flow model with proposed LCMA is trained. models. Some flow models offer direct decomposition of jacobian into per-dimension components, whereas for others, an indirect estimation method has to be adopted. We now describe such methods to obtain such individual likelihood contribution of dimensions for flow models based on affine coupling (RealNVP and Glow ), and flow models involving ordinary differential equation (ODE) based density estimators (i-ResNet ), all of which involve a multiscale architecture. RealNVP : For RealNVP with afffine coupling layers, the logarithm of individual diagonal elements of jacobian, summed over layers till layer l provides the per-dimensional likelihood contribution components at layer l. Glow : Unlike RealNVP where the log-det terms for each dimension can be expressed as log of corresponding diagonal element of jacobian, Glow contains 1 × 1 convolution blocks having non-diagonal log-det term for channel dimensions, for a s × s × c tensor h given by, It remains to decompose the log | det(W)| to individual contribution by each channel. As a suitable candidate, singular values of W correspond to the contribution from each channel dimension, so their log value is the individual log-det contribution. So the individual log-det term for channels are obtained by, where σ i (W) are the singular values of the weight matrix W. For affine blocks in Glow, same method as RealNVP is adopted. Recent works on flow models such as; employ variants of ODE based density estimators. We introduce method to find perdimensional likelihood contribution for i-ResNet , which is a residual network with invertibility and efficient jacobian computation properties. i-ResNet is modelled as a flow F (x), such that z = F (x) = (I + g)(x), where g(x) is the forward propagation function. The log-likelihood expression is written with the log-det of the jacobian is expressed as a power series, where tr denotes the trace. Due to computational constraints, the power series is computed up to a finite number of iterations with the tr(J) is the vector-jacobian product which is multiplied again with v. The individual components which are summed when (v T J k g) is multiplied with v correspond to the diagonal terms in jacobian, over the expectation E p(v). So those terms are the contribution by the individual dimensions, to the log-likelihood and are expressed as [L Multi-scale architecture and variants have been successful in a number of prior works in deep generative modeling. For invertible neural networks, use a keepChannel for selective feed forward of channels analogous to multi-scaling. In the spectrum of generative flow models, multi-scale architecture has been utilized to achieve the dimensionality reduction and enhanced training because of the distribution of loss function in the network . A variant of multiscale architecture has been utilized to capture local variations in auto-regressive models . Among GAN models, use a multiscale variant to generate images in a coarse-to-fine manner. For multi-scale architectures in generative flow models, our proposed method performs factorization of dimensions based on their likelihood contribution, which in another sense translates to determining which dimensions are important from density estimation and qualitative reconstruction point of view. Keeping this in mind, we discuss prior works on generative flow models which involve multi-scaling and/or incorporate permutation among dimensions to capture their interactions. introduce an 1 × 1 convolution layer in between the actnorm and affine coupling layer in their flow architecture. The 1 × 1 convolution is a generalization of permutation operation which ensures that each dimension can affect every other dimension. This can be interpreted as redistributing the contribution of dimensions to total likelihood among the whole space of dimensions. treat the dimensions as equiprobable for factorization in their implementation of multi-scale architecture, and split the tensor at each flow layer evenly along the channel dimension. We, on the other hand, take the next step and focus on the individuality of dimensions and their importance from the amount they contribute towards the total log-likelihood. The log-det score is available via direct/indirect decomposition of the jacobian obtained as part of computations in a flow training, so we essentially have a heuristic for free. Since our method focuses individually on the dimensions using a heuristic which is always available, it can prove to be have more versatility in being compatible with generic multi-scale architectures. extend the concept of 1 × 1 convolutions to invertible d × d convolutions, but do not discuss about multi-scaling. also include a type of permutation which is equivalent to reversing the ordering of the channels, but is more restrictive and fixed. Flow models such as;; involve ODE based density estimators. They also implement a multi-scale architecture, but the splitting operation is a static channel wise splitting without considering importance of individual dimensions or any permutations.;;; use multi-scale architecture in their flow models, coherent with; , but perform the factorization of dimensions without any consideration of the individual contribution of the dimension towards the total log-likelihood. For qualitative sampling along with efficient density estimation, we also propose that factorization methods should preserve spatiality of the image in the two splits, motivated by the spatial nature of splitting methods in (channel-wise splitting) and (checkerboard and channel-wise splitting). In Section 3, we established that our proposed likelihood contribution based factorization of dimensions can be implemented for flow models involving a multi-scale architecture, in order to improve their density estimation and qualitative performance. In this section we present the detailed of proposed LCMA adopted for the flow model of RealNVP and quantitative comparisons with Glow and i-ResNet . For direct comparison, all the experimental settings such as data pre-processing, optimizer parameters as well as flow architectural details (coupling layers, residual blocks) are kept the same, except that the factorization of dimensions at each flow layer is performed according to the methods described in Section 3. For ease of access, we also have summarized the experimental details in Appendix A. For RealNVP, we perform experiments on four benchmarked image datasets: CIFAR-10 , Imagenet (downsampled to 32 × 32 and 64 × 64), and CelebFaces Attributes (CelebA) . The scaling in LCMA is performed once for CIFAR-10, thrice for Imagenet 32 × 32 and 4 times for Imagenet 64 × 64 and CelebA. We compare LCMA with conventional RealNVP and report the quantitative and qualitative . For Glow and i-ResNet with LCMA, we perform experiments on CIFAR-10 and present improvements over baseline bits/dim. We also perform an ablation studies for LCMA vs. other possible dimension splitting options. The bits/dim scores of RealNVP with conventional multi-scale architecture (as introduced in) and RealNVP with LCMA are given in Table 1. It can be observed that the density estimation using LCMA is in all cases better in comparison to the baseline. We observed that the improvement for CelebA is relatively high as compared to natural image datasets. This observation was expected as facial features often contain high redundancy and the flow model learns to put more importance (reflected in terms of high log-det) on selected dimensions that define the facial features. Our proposed LCMA exposes such dimensions to more flow layers, making them more expressive and hence the significant improvement in code length (bits/dim) is observed. The improvement in bits/dim is less for natural image datasets because of the high variance among features defining them, which has been the challenge with image compression algorithms. Note that the improvement in density estimation is always relative to the original flow architecture (RealNVP in our case) over which we use our proposed LCMA, as we do not alter any architecture other than the dimension factorization method. The quantitative of LCMA implementation for RealNVP, Glow and i-ResNet with CIFAR-10 dataset is summarized in Table 2. The density estimation scores for flows with LCMA outperform the same flow with conventional multi-scale architectures. ImageNet 64x64 RealNVP An ideal dimension factorization method should capture the local variance over series of flow layers, which helps in qualitative sampling. For LCMA implementation, we introduced local max and min pooling operations on log-det heuristic to decide which dimensions to be gaussianized early (Section 3). We performed ablation studies to compare LCMA with other methods for dimension factorization in a multi-scale architecture. We consider 4 variants for our study, namely fixed random permutation (Case 1), multiscale architecture with early gaussianization of high log-det dimensions (Case 2), factorization method with checker-board and channel splitting as introduced in RealNVP (Case 3) and multiscale architecture with early gaussianization of low log-det dimensions, which is our proposed LCMA (Case 4). In fixed random permutation, we randomly partition the tensor into two halves, with no regard to the spatiality or log-det score. In case 2, we do the reverse of LCMA, and gaussianize the high log-det variables early. The bits/dim score and generated samples for each of the method are given in Table 3. As expected from an information theoretic perspective, gaussianizing high log-det variables early provides the worst density estimation, as the model could not capture the high amount of important information. Comparing the same with fixed random permutation, the latter has better score as the probability of a high log-det variable being gaussianized early reduces to half, and it gets further reduced with RealNVP due to channel-wise and checkerboard splitting. LCMA has the best score among all methods, as the variables carrying more information are exposed to more flow layers. Fixed random permutation has the worst quality of sampled images, as the spatiality is lost during factorization. The sample quality improves for Case 2 and RealNVP. The sampled images are perceptually best for LCMA. Summarizing, LCMA outperforms multi-scale architectures based on other factorization methods, as it improves density estimation and generates qualitative samples. We proposed a novel multi-scale architecture for generative flows which employs a data-dependent splitting based the individual contribution of dimensions to the total log-likelihood. Implementations of the proposed method for several state-of-the-art flow models such as RealNVP , Glow and i-ResNet were presented. Empirical studies conducted on benchmark image datasets validate the strength of our proposed method, which improves log-likelihood scores and is able to generate qualitative samples. Ablation study confirm the power of LCMA over other options for dimension factorization. For direct comparison with , data pre-processing, optimizer parameters as well as flow architectural details (coupling layers, residual blocks) are kept the same, except that the factorization of dimensions at each flow layer is performed according to the method described in Section 3. In this section, for the ease of access, we summarize the experimental settings. We perform experiments on four benchmarked image datasets: CIFAR-10 , Imagenet (downsampled to 32 × 32 and 64 × 64), and CelebFaces Attributes (CelebA) . Pre-processing: For CelebA, we take a central crop of 148 × 148 then resize it to 64 × 64. Flow model architecture: We use affine coupling layers as introduced . A layer of flow is defined as 3 coupling layers with checkerboard splits at s × s resolution, 3 coupling layers with channel splits at s/2 × s/2 resolution, where s is the resolution at the input of that layer. For datasets having resolution 32, we use 3 such layers and for those having resolution 64, we use 4 layers. The cascade connection of the layers is followed by 4 coupling layers with checkerboard splits at the final resolution, marking the end of flow composition. For CIFAR-10, each coupling layer uses 8 residual blocks. Other datasets having images of size 32 × 32 use 4 residual blocks whereas 64 × 64 ones use 2 residual blocks. More details on architectures will be given in a source code release.

represent the tldr for finding the corresponding scientific article

Examples:

"Simple text augmentation techniques can significantly boost performance on text classification tasks, especially for small datasets." == "We present EDA: easy data augmentation techniques for boosting performance on text classification tasks. EDA consists of four simple but powerful operations: synonym replacement, random insertion, random swap, and random deletion. On five text classification tasks, we show that EDA improves performance for both convolutional and recurrent neural networks. EDA demonstrates particularly strong for smaller datasets; on average, across five datasets, training with EDA while using only 50% of the available training set achieved the same accuracy as normal training with all available data. We also performed extensive ablation studies and suggest parameters for practical use. Text classification is a fundamental task in natural language processing (NLP). Machine learning and deep learning have achieved high accuracy on tasks ranging from sentiment analysis to topic classification BID24, but high performance is often dependent on the size and quality of training data, which is often tedious to collect. Automatic data augmentation is commonly used in vision BID20 BID22 BID10 and speech (; BID7 and can help train more robust models, particularly when using smaller datasets. However, because it is difficult to come up with generalized rules for language transformation, universal data augmentation techniques in NLP have not been explored. Previous work has proposed techniques for data augmentation in NLP. One popular study generated new data by translating sentences into French and back into English BID28 . Other works have used predictive language models for synonym replacement BID8 and data noising as smoothing BID27 . Although these techniques are valid, they are not often used in practice because they have a high cost of implementation relative to performance gain. In this paper, we present a simple set of universal data augmentation techniques for NLP called EDA (easy data augmentation). To the best of our knowledge, we are the first to comprehensively explore text editing techniques for data augmentation. We systematically evaluate EDA on five benchmark classification tasks, and show that EDA provides substantial improvements on all five tasks and is particularly helpful for smaller datasets. Code will be made publicly available. Operation Sentence None A sad, superior human comedy played out on the back roads of life. SR A lamentable, superior human comedy played out on the backward road of life. RI A sad, superior human comedy played out on funniness the back roads of life. RS A sad, superior human comedy played out on roads back the of life. RD A sad, superior human out on the roads of life. Frustrated by the measly performance of text classifiers trained on small datasets, we tested a number of augmentation operations loosely inspired by those used in vision and found that they helped train more robust models. Here, we present the full details of EDA. For a given sentence in the training set, we perform the following operations: 1. Synonym Replacement (SR): Randomly choose n words from the sentence that are not stop words. Replace each of these words with one of its synonyms chosen at random. 2. Random Insertion (RI): Find a random synonym of a random word in the sentence that is not a stop word. Insert that synonym into a random position in the sentence. Do this n times. 3. Random Swap (RS): Randomly choose two words in the sentence and swap their positions. Do this n times. 4. Random Deletion (RD): Randomly remove each word in the sentence with probability p. Since long sentences have more words than short ones, they can absorb more noise while maintaining their original class label. To compensate, we vary the number of words changed, n, for SR, RI, and RS based on the sentence length l with the formula n=α l, where α is a parameter that indicates the percent of the words in a sentence are changed (we use p=α for RD). Furthermore, for each original sentence, we generate n aug augmented sentences. Examples of augmented sentences are shown in TAB0. We note that synonym replacement has been used previously BID9 BID26, but to our knowledge, random insertions, swaps, and deletions have not been studied. We conduct experiments on five benchmark text classification tasks: SST-2: Stanford Sentiment Treebank BID21, CR: customer reviews BID3 BID13, SUBJ: subjectivity/objectivity dataset BID15 ), TREC: question type dataset BID11, and PC: Pro-Con dataset BID2. Summary statistics are shown in TAB3 in the Appendix. Furthermore, we hypothesize that EDA is more helpful for smaller datasets, so we delegate the following sized datasets by selecting a random subset of the full training set with N train ={500, 2,000, 5,000, all available data}.We run experiments for two state-of-the-art models in text classification. Recurrent neural networks (RNNs) are suitable for sequential data. We use a LSTM-RNN BID12. Convolutional neural networks (CNNs) have also achieved high performance for text classification. We implement them as described in BID6. Details are in Section 6.1 in the Appendix. We run both CNN and RNN models with and without EDA across all five datasets for varying training set sizes. Average performances (%) are shown in Table 2. Of note, average improvement was 0.8% for full datasets and 3.0% for N train =500. Table 2: Average performances (%) across five text classification tasks for models without and without EDA on different training set sizes. Overfitting tends to be more severe when training on smaller datasets. By conducting experiments using a restricted fraction of the available training data, we show that EDA has more significant improvements for smaller training sets. We run both normal training and EDA training for the following training set fractions (%): {1, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100}. FIG0 shows average performance across all datasets. The best average accuracy without augmentation, 88.3%, was achieved using 100% of the training data. Models trained using EDA surpassed this number by achieving an average accuracy of 88.6% while only using 50% of the available training data. Results for individual datasets are displayed in FIG3 (Appendix). In data augmentation, input data is altered while class labels are maintained. However, if sentences are significantly changed, then original class labels may no longer be valid. We take a visualization approach to examine whether EDA operations significantly change the meanings of augmented sentences. First, we train an RNN on the pro-con classification task (PC) without augmentation. Then, we apply EDA to the test set by generating nine augmented sentences per original sentence. These are fed into the RNN along with the original sentences, and we extract the outputs from the last dense layer. We apply t-SNE to these vectors and plot their 2-D representations FIG1 ). We found that the ing latent space representations for augmented sentences closely surrounded those of the original sentences. 3.4 ABLATION STUDIES So far, we have shown encouraging empirical . In this section, we perform ablation studies to explore the effects of each component in EDA. Synonym replacement has been previously used BID9 BID26, but the other three EDA operations have not yet been explored. One could hypothesize that the bulk of EDA's performance gain is from synonym replacement, so we isolate each of the EDA operations to determine their individual ability to boost performance. For all four operations, we ran models using a single operation while varying the augmentation parameter α={0.05, 0.1, 0.2, 0.3, 0.4, 0.5} FIG2 ).It turns out that all four EDA operations contribute to performance gain. For SR, improvement was good for small α, but high α hurt performance, likely because replacing too many words in a sentence changed the identity of the sentence. For RI, performance gains were more stable for different α values, possibly because the original words in the sentence and their relative order were maintained in this operation. RS yielded high performance gains at α≤0.2, but declined at α≥0.3 since performing too many swaps is equivalent to shuffling the entire order of the sentence. RD had the highest gains for low α but severely hurt performance at high α, as sentences are likely unintelligible if up to half the words are removed. Improvements were more substantial on smaller datasets for all operations, and α=0.1 appeared to be a "sweet spot" across the board. The natural next step is to determine how the number of generated augmented sentences per original sentence, n aug, affects performance. We calculate average performances over all datasets for n aug ={1, 2, 4, 8, 16, 32}, as shown in FIG2 (middle).On smaller training sets, overfitting was more likely, so generating many augmented sentences yielded large performance boosts. For larger training sets, adding more than four augmented sentences per original sentence was unhelpful since models tend to generalize properly when large quantities of real data are available. Based on these , we recommend parameters for practical use in FIG2 (right). Related work is creative but often complex. Back-translation BID18, translational data augmentation BID1, and noising BID27 have shown improvements in BLEU measure for machine translation. For other tasks, previous approaches include task-specific heuristics BID5 and back-translation BID19 BID28. Regarding synonym replacement (SR), one study showed a 1.4% F1-score boost for tweet classification by finding synonyms with k-nearest neighbors using word embeddings BID26 ). Another study found no improvement in temporal analysis when replacing headwords with synonyms BID9, and mixed were reported for using SR in character-level text classification; however, neither work conducted extensive ablation studies. Most studies explore data augmentation as a complementary for translation or in a taskspecific context, so it is hard to directly compare EDA to previous literature. But there are two studies similar to ours that evaluate augmentation techniques on multiple datasets. BID4 proposed a generative model that combines a variational auto-encoder (VAE) and attribute discriminator to generate fake data, demonstrating a 3% gain in accuracy on two datasets. BID8 showed that replacing words with other words that were predicted from the sentence context using a bi-directional language model yielded a 0.5% gain on five datasets. However, training a variational auto-encoder or bidirectional LSTM language model is a lot of work. EDA yields similar but is much easier to use because it does not require training a language model and does not use external datasets. In TAB5 (Appendix), we show EDA's ease of use compared to other techniques. We have shown that simple data augmentation operations can boost performance on text classification tasks. Although improvement is at times marginal, EDA substantially boosts performance and reduces overfitting when training on smaller datasets. Continued work on this topic could include exploring the theoretical underpinning of the EDA operations. We hope that EDA's simplicity makes a compelling case for its widespread use in NLP. This section contains implementation details, dataset statistics, and detailed not included in the main text. All code for EDA and the experiments in this paper will be made available. The following implementation details were omitted from the main text:Synonym thesaurus. All synonyms for synonym replacements and random insertions were generated using WordNet BID14. We suspect that EDA will work with any thesaurus. Word embeddings. We use 300-dimensional Common-Crawl word embeddings trained using GloVe BID16. We suspect that EDA will work with any pre-trained word embeddings. CNN. We use the following architecture: input layer, 1-D convolutional layer of 128 filters of size 5, global 1D max pool layer, dense layer of 20 hidden units with ReLU activation function, softmax output layer. We initialize this network with random normal weights and train against the categorical cross-entropy loss function with the adam optimizer. We use early stopping with a patience of 3 epochs. RNN. The architecture used in this paper is as follows: input layer, bi-directional hidden layer with 64 LSTM cells, dropout layer with p=0.5, bi-directional layer of 32 LSTM cells, dropout layer with p=0.5, dense layer of 20 hidden units with ReLU activation, softmax output layer. We initialize this network with random normal weights and train against the categorical cross-entropy loss function with the adam optimizer. We use early stopping with a patience of 3 epochs. Summary statistics for the five datasets used are shown in TAB3. DISPLAYFORM0 In FIG3, we show performance on individual text classification tasks for both normal training and training with EDA, with respect to percent of dataset used for training. In FIG3, we compare the EDA's ease of use to that of related work.1 BID4 How does using EDA improve text classification performance? While it is hard to identify exactly how EDA improves the performance of classifiers, we believe there are two main reasons. The first is that generating augmented data similar to original data introduces some degree of noise that helps prevent overfitting. The second is that using EDA can introduce new vocabulary through the synonym replacement and random insertion operations, allowing models to generalize to words in the test set that were not in the training set. Both these effects are more pronounced for smaller datasets. Why should I use EDA instead of other techniques such as contextual augmentation, noising, GAN, or back-translation? All of the above are valid techniques for data augmentation, and we encourage you to try them, as they may actually work better than EDA, depending on the dataset. But because these techniques require the use of a deep learning model in itself to generate augmented sentences, there is often a high cost of implementing these techniques relative to the expected performance gain. With EDA, we aim to provide a set of simple techniques that are generalizable to a range of NLP tasks. Is there a chance that using EDA will actually hurt my performance? Considering our across five classification tasks, it's unlikely but there's always a chance. It's possible that one of the EDA operations can change the class of some augmented sentences and create mislabeled data. But even so, "deep learning is robust to massive label noise" BID17.For random insertions, why do you only insert words that are synonyms, as opposed to inserting any random words? Data augmentation operations should not change the true label of a sentence, as that would introduce unnecessary noise into the data. Inserting a synonym of a word in a sentence, opposed to a random word, is more likely to be relevant to the context and retain the original label of the sentence."

Data-dependent factorization of dimensions in a multi-scale architecture based on contribution to the total log-likelihood

We develop VAEs where the encoder takes a model parameter vector as input, so we can do rapid inference for many models


Question: Represent the text to find a very short summary (1-2 sentences max).

Question: Understanding the flow of information in Deep Neural Networks (DNNs) is a challenging problem that has gain increasing attention over the last few years. While several methods have been proposed to explain network predictions, there have been only a few attempts to compare them from a theoretical perspective. What is more, no exhaustive empirical comparison has been performed in the past. In this work we analyze four gradient-based attribution methods and formally prove conditions of equivalence and approximation between them. By reformulating two of these methods, we construct a unified framework which enables a direct comparison, as well as an easier implementation. Finally, we propose a novel evaluation metric, called Sensitivity-n and test the gradient-based attribution methods alongside with a simple perturbation-based attribution method on several datasets in the domains of image and text classification, using various network architectures. While DNNs have had a large impact on a variety of different tasks BID10 BID8 BID12 BID21 BID28, explaining their predictions is still challenging. The lack of tools to inspect the behavior of these black-box models makes DNNs less trustable for those domains where interpretability and reliability are crucial, like autonomous driving, medical applications and finance. In this work, we study the problem of assigning an attribution value, sometimes also called "relevance" or "contribution", to each input feature of a network. More formally, consider a DNN that takes an input x = [x 1, ..., x N] ∈ R N and produces an output S(x) = [S 1 (x),..., S C (x)], where C is the total number of output neurons. Given a specific target neuron c, the goal of an attribution method is to determine the contribution R c = [R c 1, ..., R c N] ∈ R N of each input feature x i to the output S c. For a classification task, the target neuron of interest is usually the output neuron associated with the correct class for a given sample. When the attributions of all input features are arranged together to have the same shape of the input sample we talk about attribution maps FIG0, which are usually displayed as heatmaps where red color indicates features that contribute positively to the activation of the target output, and blue color indicates features that have a suppressing effect on it. The problem of finding attributions for deep networks has been tackled in several previous works BID22 BID30 BID24 BID2 BID20 BID25 BID31. Unfortunately, due to slightly different problem formulations, lack of compatibility with the variety of existing DNN architectures and no common benchmark, a comprehensive comparison is not available. Various new attribution methods have been published in the last few years but we believe a better theoretical understanding of their properties is fundamental. The contribution of this work is twofold:1. We prove that -LRP BID2 and DeepLIFT (Rescale) BID20 can be reformulated as computing backpropagation for a modified gradient function (Section 3). This allows the construction of a unified framework that comprises several gradient-based attribution methods, which reveals how these methods are strongly related, if not equivalent under certain conditions. We also show how this formulation enables a more convenient implementation with modern graph computational libraries.2. We introduce the definition of Sensitivity-n, which generalizes the properties of Completeness BID25 and Summation to Delta BID20 and we compare several methods against this metric on widely adopted datasets and architectures. We show how empirical support our theoretical findings and propose directions for the usage of the attribution methods analyzed (Section 4). Perturbation-based methods directly compute the attribution of an input feature (or set of features) by removing, masking or altering them, and running a forward pass on the new input, measuring the difference with the original output. This technique has been applied to Convolutional Neural Networks (CNNs) in the domain of image classification BID30, visualizing the probability of the correct class as a function of the position of a grey patch occluding part of the image. While perturbation-based methods allow a direct estimation of the marginal effect of a feature, they tend to be very slow as the number of features to test grows (ie. up to hours for a single image BID31). What is more, given the nonlinear nature of DNNs, the is strongly influenced by the number of features that are removed altogether at each iteration (Figure 1).In the remainder of the paper, we will consider the occluding method by BID30 as a comparison benchmark for perturbation-based methods. We will use this method, referred to as Occlusion-1, replacing one feature x i at the time with a zero baseline and measuring the effect of this perturbation on the target output, ie. DISPLAYFORM0 ) where we use x [xi=v] to indicate a sample x ∈ R N whose i-th component has been replaced with v. The choice of zero as a baseline is consistent with the related literature and further discussed in Appendix B.Original (label: "garter snake") Occlusion-1 Occlusion-5x5 Occlusion-10x10 Occlusion-15x15Figure 1: Attributions generated by occluding portions of the input image with squared grey patches of different sizes. Notice how the size of the patches influence the , with focus on the main subject only when using bigger patches. Backpropagation-based methods compute the attributions for all input features in a single forward and backward pass through the network 1. While these methods are generally faster then perturbationbased methods, their outcome can hardly be directly related to a variation of the output. Gradient * Input BID19 was at first proposed as a technique to improve the sharpness of the attribution maps. The attribution is computed taking the (signed) partial derivatives of the output with respect to the input and multiplying them with the input itself. Refer to TAB0 for the mathematical definition. Integrated Gradients BID25, similarly to Gradient * Input, computes the partial derivatives of the output with respect to each input feature. However, while Gradient * Input computes a single derivative, evaluated at the provided input x, Integrated Gradients computes the average gradient while the input varies along a linear path from a baselinex to x. The baseline is defined by the user and often chosen to be zero. We report the mathematical definition in TAB0.Integrated Gradients satisfies a notable property: the attributions sum up to the target output minus the target output evaluated at the baseline. Mathematically, DISPLAYFORM0 In related literature, this property has been variously called Completeness BID25, Summation to Delta BID20 or Efficiency in the context of cooperative game theory BID15, and often recognized as desirable for attribution methods. Layer-wise Relevance Propagation (LRP) BID2 is computed with a backward pass on the network. Let us consider a quantity r (l) i, called "relevance" of unit i of layer l. The algorithm starts at the output layer L and assigns the relevance of the target neuron c equal to the output of the neuron itself and the relevance of all other neurons to zero (Eq. 1).The algorithm proceeds layer by layer, redistributing the prediction score S i until the input layer is reached. One recursive rule for the redistribution of a layer's relevance to the following layer is the -rule described in Eq. 2, where we defined z ji = w DISPLAYFORM1 i to be the weighted activation of a neuron i onto neuron j in the next layer and b j the additive bias of unit j. A small quantity is added to the denominator of Equation 2 to avoid numerical instabilities. Once reached the input layer, the final attributions are defined as DISPLAYFORM2 LRP together with the propagation rule described in Eq. 2 is called -LRP, analyzed in the remainder of this paper. There exist alternative stabilizing methods described in BID2 and which we do not consider here. DeepLIFT BID20 proceeds in a backward fashion, similarly to LRP. Each unit i is assigned an attribution that represents the relative effect of the unit activated at the original network input x compared to the activation at some reference inputx (Eq. 3). Reference valuesz ji for all hidden units are determined running a forward pass through the network, using the baselinex as input, and recording the activation of each unit. As in LRP, the baseline is often chosen to be zero. The relevance propagation is described in Eq. 4. The attributions at the input layer are defined as DISPLAYFORM3 In Equation 4,z ji = w DISPLAYFORM4 i is the weighted activation of a neuron i onto neuron j when the baselinex is fed into the network. As for Integrated Gradients, DeepLIFT was designed to satisfy Completeness. The rule described in Eq. 4 ("Rescale rule") is used in the original formulation of the method and it is the one we will analyze in the remainder of the paper. The "Reveal-Cancel" rule BID20 is not considered here.: Attribution generated by applying several attribution methods to an Inception V3 network for natural image classification BID27. Notice how all gradient-based methods produce attributions affected by higher local variance compared to perturbation-based methods (Figure 1).Other back-propagation methods exist. Saliency maps BID22 constructs attributions by taking the absolute value of the partial derivative of the target output S c with respect to the input features x i. Intuitively, the absolute value of the gradient indicates those input features (pixels, for image classification) that can be perturbed the least in order for the target output to change the most. However, the absolute value prevents the detection of positive and negative evidence that might be present in the input, reason for which this method will not be used for comparison in the remainder of the paper. Similarly, Deep Taylor Decomposition, although showed to produce sparser explanations, assumes no negative evidence in the input and produces only positive attribution maps. We show in Section 4 that this assumption does not hold for our tasks. Other methods that are designed only for specific architectures (ie. 3 A UNIFIED FRAMEWORK Gradient * Input and Integrated Gradients are, by definition, computed as a function of the partial derivatives of the target output with respect to each input feature. In this section, we will show that -LRP and DeepLIFT can also be computed by applying the chain rule for gradients, if the instant gradient at each nonlinearity is replaced with a function that depends on the method. In a DNN where each layer performs a linear transformation z j = i w ji x i + b j followed by a nonlinear mapping x j = f (z j), a path connecting any two units consists of a sequence of such operations. The chain rule along a single path is therefore the product of the partial derivatives of all linear and nonlinear transformations along the path. For two units i and j in subsequent layers we have ∂x j /∂x i = w ji · f (z j), whereas for any two generic units i and c connected by a set of paths P ic the partial derivative is sum of the product of all weights w p and all derivatives of the nonlinearities f (z) p along each path p ∈ P ic. We introduce a notation to indicate a modified chain-rule, where the derivative of the nonlinearities f is replaced by a generic function g: DISPLAYFORM5 When g = f this is the definition of partial derivative of the output of unit c with respect to unit i, computed as the sum of contributions over all paths connecting the two units. Given that a zero weight can be used for non-existing or blocked paths, this is valid for any architecture that involves fully-connected, convolutional or recurrent layers without multiplicative units, as well as for pooling operations. Proposition 1. -LRP is equivalent the feature-wise product of the input and the modified partial derivative DISPLAYFORM6 e. the ratio between the output and the input at each nonlinearity. Proposition 2. DeepLIFT (Rescale) is equivalent to the feature-wise product of the x −x and the modified partial derivative DISPLAYFORM7 the ratio between the difference in output and the difference in input at each nonlinearity, for a network provided with some input x and some baseline inputx defined by the user. The proof for Proposition 1 and 2 are provided in Appendix A.1 and Appendix A.2 respectively. Given these , we can write all methods with a consistent notation. TAB0 summaries the four methods considered and shows examples of attribution maps generated by these methods on MNIST. As pointed out by BID25 a desirable property for attribution methods is their immediate applicability to existing models. Our formulation makes this possible for -LRP and DeepLIFT. Since all modern frameworks for graph computation, like the popular TensorFlow BID0, implement backpropagation for efficient computation of the chain rule, it is possible to implement all methods above by the gradient of the graph nonlinearities, with no need to implement custom layers or operations. Listing 1 shows an example of how to achieve this on Tensorflow. Listing 1: Example of gradient override for a Tensorflow operation. After registering this function as the gradient for nonlinear activation functions, a call to tf.gradients and the multiplication with the input will produce the -LRP attributions. DISPLAYFORM8 The formulation of TAB0 facilitates the comparison between these methods. Motivated by the fact that attribution maps for different gradient-based methods look surprisingly similar on several tasks, we investigate some conditions of equivalence or approximation. Proposition 3. -LRP is equivalent to i) Gradient * Input if only Rectified Linear Units (ReLUs) are used as nonlinearities; ii) DeepLIFT (computed with a zero baseline) if applied to a network with no additive biases and with nonlinearities f such that f = 0 (eg. ReLU or Tanh).The first part of Proposition 3 comes directly as a corollary of Proposition 1 by noticing that for ReLUs the gradient at the nonlinearity f is equal to g LRP for all inputs. This relation has been previously proven by BID19 and BID5. Similarly, we notice that, in a network with no additive biases and nonlinearities that cross the origin, the propagation of the baseline produces a zero reference value for all hidden units (ie. ∀i : DISPLAYFORM0 DL, which proves the second part of the proposition. Notice that g LRP (z) = (f (z) − 0)/(z − 0) which, in the case of ReLU and Tanh, is the average gradient of the nonlinearity in [0, z]. It also easy to see that lim z→0 g LRP (z) = f, which explain why g can not assume arbitrarily large values as z → 0, even without stabilizers. On the contrary, if the discussed condition on the nonlinearity is not satisfied, for example with Sigmoid or Softplus, we found empirically that -LRP fails to produce meaningful attributions as shown in the empirical comparison of Section 4. We speculate this is due to the fact g LRP (z) can become extremely large for small values of z, being its upper-bound only limited by the stabilizer. This causes attribution values to concentrate on a few features as shown in TAB0. Notice also that the interpretation of g LRP as average gradient of the nonlinearity does not hold in this case, which explains why -LRP diverges from other methods 2.DeepLIFT and Integrated Gradients are related as well. While Integrated Gradients computes the average partial derivative of each feature as the input varies from a baseline to its final value, DeepLIFT approximates this quantity in a single step by replacing the gradient at each nonlinearity with its average gradient. Although the chain rule does not hold in general for average gradients, we show empirically in Section 4 that DeepLIFT is most often a good approximation of Integrated Gradients. This holds for various tasks, especially when employing simple models (see FIG5 . However, we found that DeepLIFT diverges from Integrated Gradients and fails to produce meaningful when applied to Recurrent Neural Networks (RNNs) with multiplicative interactions (eg. gates in LSTM units BID4). With multiplicative interactions, DeepLIFT does not satisfy Completeness, which can be illustrated with a simple example. Take two variables x 1 and x 2 and a the function h(x 1, x 2) = ReLU (x 1 − 1) · ReLU (x 2). It can be easily shown that, by applying the methods as described by TAB0, DeepLIFT does not satisfy Completeness, one of its fundamental design properties, while Integrated gradients does. The formulation in TAB0 highlights how all the gradient-based methods considered are computed from a quantity that depends on the weights and the architecture of the model, multiplied by the input itself. Similarly, Occlusion-1 can also be interpreted as the input multiplied by the average value of the partial derivatives, computed varying one feature at the time between zero and their final value: DISPLAYFORM0 The reason justifying the multiplication with the input has been only partially discussed in previous literature BID23 BID25 BID19. In many cases, it contributes to making attribution maps sharper although it remains unclear how much of this can be attributed to the sharpness of the original image itself. We argue the multiplication with the input has a more fundamental justification, which allows to distinguish attribution methods in two broad categories: global attribution methods, that describe the marginal effect of a feature on the output with respect to a baseline and; local attribution methods, that describe how the output of the network changes for infinitesimally small perturbations around the original input. For a concrete example, we will consider the linear case. Imagine a linear model to predict the total capital in ten years C, based on two investments x 1 and x 2: C = 1.05 · x 1 + 10 · x 2. Given this simple model, R 1 = ∂C/∂x 1 = 1.05, R 2 = ∂C/∂x 2 = 10 represents a possible local attribution. With no information about the actual value of x 1 and x 2 we can still answer the question " Where should one invest in order to generate more capital?. The local attributions reveal, in fact, that by investing x 2 we will get about ten times more return than investing in x 1. Notice, however, that this does not tell anything about the contribution to the total capital for a specific scenario. Assume x 1 = 100 000$ and x 2 = 1 000$. In this scenario C = 115000$. We might ask ourselves "How the initial investments contributed to the final capital? ". In this case, we are looking for a global attribution. The most natural solution would be R 1 = 1.05x 1 = 105 000$, R 2 = 10x 2 = 1 000$, assuming a zero baseline. In this case the attribution for x 1 is larger than that for x 2, an opposite rank with respect to the of the local model. Notice that we used nothing but Gradient * Input as global attribution method which, in the linear case, is equivalent to all other methods analyzed above. The methods listed in TAB0 are examples of global attribution methods. Although local attribution methods are not further discussed here, we can mention Saliency maps BID22 as an example. In fact, showed that Saliency maps can be seen as the first-order term of a Taylor decomposition of the function implemented by the network, computed at a point infinitesimally close to the actual input. Finally, we notice that global and local attributions accomplish two different tasks, that only converge when the model is linear. Local attributions aim to explain how the input should be changed in order to obtain a desired variation on the output. One practical application is the generation of adversarial perturbations, where genuine input samples are minimally perturbed to cause a disruptive change in the output BID26. On the contrary, global attributions should be used to identify the marginal effect that the presence of a feature has on the output, which is usually desirable from an explanation method. Attributions methods are hard to evaluate empirically because it is difficult to distinguish errors of the model from errors of the attribution method explaining the model BID25. For this reason the final evaluation is often qualitative, based on the inspection of the produced attribution maps. We argue, however, that this introduces a strong bias in the evaluation: as humans, one would judge more favorably methods that produce explanations closer to his own expectations, at the cost of penalizing those methods that might more closely reflect the network behavior. In order to develop better quantitative tools for the evaluation of attribution methods, we first need to define the goal that an ideal attribution method should achieve, as different methods might be suitable for different tasks (Subsection 3.2).Consider the attribution maps on MNIST produced by a CNN that uses Sigmoid nonlinearities (FIG3 . Integrated Gradients assigns high attributions to the space in the middle of the image, while Occlusion-1 does not. One might be tempted to declare Integrated Gradients a better attribution method, given that the heatmap is less scattered and that the absence of strokes in the middle of the image might be considered a good clue in favor of a zero digit. In order to evaluate the hypothesis, we apply a variation of the region perturbation method BID17 removing pixels according to the ranking provided by the attribution maps (higher first (+) or lower first (-)). We perform this operation replacing one pixel at the time with a zero value and measuring the variation in the target activation. The in FIG3 show that pixels highlighted by Occlusion-1 initially have a higher impact on the target output, causing a faster variation from the initial value. After removing about 20 pixels or more, Integrated Gradients seems to detect more relevant features, given that the variation in the target output is stronger than for Occlusion-1.This is an example of attribution methods solving two different goals: we argue that while Occlusion-1 is better explaining the role of each feature considered in isolation, Integrated Gradients is better in capturing the effect of multiple features together. It is possible, in fact, that given the presence of several white pixels in the central area, the role of each one alone is not prominent, while the deletion of several of them together causes a drop in the output score. In order to test this assumption systematically, we propose a property called Sensitivity-n. Sensitivity-n. An attribution method satisfies Sensitivity-n when the sum of the attributions for any subset of features of cardinality n is equal to the variation of the output S c caused removing the features in the subset. Mathematically when, for all subsets of features DISPLAYFORM0 When n = N, with N being the total number of input features, we have DISPLAYFORM1, wherex is an input baseline representing an input from which all features have been removed. This is nothing but the definition of Completeness or Summation to Delta, for which Sensitivity-n is a generalization. Notice that Occlusion-1 satisfy Sensitivity-1 by construction, like Integrated Gradients and DeepLIFT satisfy Sensitivity-N (the latter only without multiplicative units for the reasons discussed in Section 3.1). -LRP satisfies Sensitivity-N if the conditions of Proposition 3-(ii) are met. However no methods in TAB0 can satisfy Sensitivity-n for all n:Proposition 4. All attribution methods defined in TAB0 satisfy Sensitivity-n for all values of n if and only if applied to a linear model or a model that behaves linearly for a selected task. In this case, all methods of TAB0 are equivalent. The proof of Proposition 4 is provided in Appendix A.3. Intuitively, if we can only assign a scalar attribution to each feature, there are not enough degrees of freedom to capture nonlinear interactions. Besides degenerate cases when DNNs behave as linear systems on a particular dataset, the attribution methods we consider can only provide a partial explanation, sometimes focusing on different aspects, as discussed above for Occlusion-1 and Integrated Gradients. Although no attribution method satisfies Sensitivity-n for all values of n, we can measure how well the sum of the attributions While it is intractable to test all possible subsets of features of cardinality n, we estimate the correlation by randomly sampling one hundred subsets of features from a given input x for different values of n. FIG5 reports the Pearson correlation coefficient (PCC) computed between the sum of the attributions and the variation in the target output varying n from one to about 80% of the total number of features. The PCC is averaged across a thousand of samples from each dataset. The sampling is performed using a uniform probability distribution over the features, given that we assume no prior knowledge on the correlation between them. This allows to apply this evaluation not only to images but to any kind of input. We test all methods in TAB0 on several tasks and different architectures. We use the well-known MNIST dataset BID9 to test how the methods behave with two different architectures (a Multilayer Perceptron (MLP) and a CNN) and four different activation functions. We also test a simple CNN for image classification on CIFAR10 BID7 ) and the more complex Inception V3 architecture BID27 on ImageNet BID16 samples. Finally, we test a model for sentiment classification from text data. For this we use the IMDB dataset BID11, applying both a MLP and an LSTM model. Details about the architectures can be found in Appendix C. Notice that it was not our goal, nor a requirement, to reach the state-of-the-art in these tasks since attribution methods should be applicable to any model. On the contrary, the simple model architecture used for sentiment analysis enables us to show a case where a DNN degenerates into a nearly-linear behavior, showing in practice the effects of Proposition 4. From these we can formulate some considerations:1. Input might contain negative evidence. Since all methods considered produce signed attributions and the correlation is close to one for at least some value of n, we conclude that the input samples can contain negative evidence and that it can be correctly reported. This is further supported by the in FIG3 where the occlusion of negative evidence produces an increase in the target output. On the other hand, on complex models like Inception V3, all gradient-based methods show low accuracy in predicting the attribution sign, leading to heatmaps affected by high-frequency noise FIG0 ).2. Occlusion-1 better identifies the few most important features. This is supported by the fact that Occlusion-1 satisfies Sensitivity-1, as expected, while the correlation decreases monotonically as n increases in all our experiments. For simple models, the correlation remains rather high even for medium-size sets of pixels but Integrated Gradients, DeepLIFT and LRP should be preferred when interested in capturing global nonlinear effects and cross-interactions between different features. Notice also that Occlusion-1 is much slower than gradient-based methods.3. In some cases, like in MNIST-MLP w/ Tanh, Gradient * Input approximates the behavior of Occlusion-1 better than other gradient-based methods. This suggests that the instant gradient computed by Gradient * Input is feature-wise very close to the average gradient for these models.4. Integrated Gradients and DeepLIFT have very high correlation, suggesting that the latter is a good (and faster) approximation of the former in practice. This does not hold in presence of multiplicative interactions between features (eg. IMDB-LSTM). In these cases the analyzed formulation of DeepLIFT should be avoided for the reasons discussed in Section 3.1.5. -LRP is equivalent to Gradient * Input when all nonlinearities are ReLUs, while it fails when these are Sigmoid or Softplus. When the nonlinearities are such that f = 0, -LRP diverges from other methods, cannot be seen as a discrete gradient approximator and may lead to numerical instabilities for small values of the stabilizer (Section 3.1). It has been shown, however, that adjusting the propagation rule for multiplicative interactions and avoiding critical nonlinearities, -LRP can be applied to LSTM networks, obtaining interesting BID1.Unfortunately, these changes obstacle the formulation as modified chain-rule and make ad-hoc implementation necessary.6. All methods are equivalent when the model behaves linearly. On IMDB (MLP), where we used a very shallow network, all methods are equivalent and the correlation is maximum for almost all values of n. From Proposition 4 we can say that the model approximates a linear behavior (each word contributes to the output independently from the context). In this work, we have analyzed Gradient * Input, -LRP, Integrated Gradients and DeepLIFT (Rescale) from theoretical and practical perspectives. We have shown that these four methods, despite their apparently different formulation, are strongly related, proving conditions of equivalence or approximation between them. Secondly, by reformulating -LRP and DeepLIFT (Rescale), we have shown how these can be implemented as easy as other gradient-based methods. Finally, we have proposed a metric called Sensitivity-n which helps to uncover properties of existing attribution methods but also traces research directions for more general ones. Nonlinear operations. For a nonlinear operation with a single input of the form x i = f (z i) (i.e. any nonlinear activation function), the DeepLIFT multiplier (Sec. 3.5.2 in Shrikumar et al. BID20) is: DISPLAYFORM0 Nonlinear operations with multiple inputs (eg. 2D pooling) are not addressed in BID20. For these, we keep the original operations' gradient unmodified as in the DeepLIFT public implementation. By linear model we refer to a model whose target output can be written as S c (x) = i h i (x i), where all h i are compositions of linear functions. As such, we can write DISPLAYFORM1 for some some a i and b i. If the model is linear only in the restricted domain of a task inputs, the following considerations hold in the domain. We start the proof by showing that, on a linear model, all methods of TAB0 are equivalent. Proof. In the case of Gradient * Input, on a linear model it holds DISPLAYFORM2, being all other derivatives in the summation zero. Since we are considering a linear model, all nonlinearities f are replaced with the identity function and therefore ∀z: g DL (z) = g LRP (z) = f (z) = 1 and the modified chain-rules for LRP and DeepLIFT reduce to the gradient chain-rule. This proves that -LRP and DeepLIFT with a zero baseline are equivalent to Gradient * Input in the linear case. For Integrated Gradients the gradient term is constant and can be taken out of the integral: DISPLAYFORM3, which completes the proof the proof of equivalence for the methods in TAB0 in the linear case. If we now consider any subset of n features x S ⊆ x, we have for Occlusion-1: DISPLAYFORM4 where the last equality holds because of the definition of linear model (Equation 9). This shows that Occlusion-1, and therefore all other equivalent methods, satisfy Sensitivity-n for all n if the model is linear. If, on the contrary, the model is not linear, there must exists two features x i and x j such that DISPLAYFORM5. In this case, either Sensitivity-1 or Sensitivity-2 must be violated since all methods assign a single attribution value to x i and x j. In general, a non-zero attribution for a feature implies the feature is expected to play a role in the output of the model. As pointed out by BID25, humans also assign blame to a cause by comparing the outcomes of a process including or not such cause. However, this requires the ability to test a process with and without a specific feature, which is problematic with current neural network architectures that do not allow to explicitly remove a feature without retraining. The usual approach to simulate the absence of a feature consists of defining a baseline x, for example the black image or the zero input, that will represent absence of information. Notice, however, that the baseline must necessarily be chosen in the domain of the input space and this creates inherently an ambiguity between a valid input that incidentally assumes the baseline value and the placeholder for a missing feature. On some domains, it is also possible to marginalize over the features to be removed in order to simulate their absence. BID31 showed how local coherence of images can be exploited to marginalize over image patches. Unfortunately, this approach is extremely slow and only provide marginal improvements over a pre-defined baseline. What is more, it can only be applied to images, where contiguous features have a strong correlation, hence our decision to use the method by BID30 as our benchmark instead. When a baseline value has to be defined, zero is the canonical choice BID25 BID30 BID20. Notice that Gradient * Input and LRP can also be interpreted as using a zero baseline implicitly. One possible justification relies on the observation that in network that implements a chain of operations of the form z j = f (i (w ji · z i) + b j ), the all-zero input is somehow neutral to the output (ie. ∀c ∈ C : S c ≈ 0). In fact, if all additive biases b j in the network are zero and we only allow nonlinearities that cross the origin, the output for a zero input is exactly zero for all classes. Empirically, the output is often near zero even when biases have different values, which makes the choice of zero for the baseline reasonable, although arbitrary. C EXPERIMENTS SETUP C.1 MNIST The MNIST dataset was pre-processed to normalize the input images between -1 () and 1 (digit stroke). We trained both a DNN and a CNN, using four activation functions in order to test how attribution methods generalize to different architectures. The lists of layers for the two architectures are listed below. The activations functions are defined as ReLU (x) = max(0, x), T anh(x) = sinh(x)/cosh(x), Sigmoid(x) = 1/(1 + e −x) and Sof tplus(x) = ln(1 + e x) and have been applied to the output of the layers marked with † in the tables below. The networks were trained using Adadelta BID29 and early stopping. We also report the final test accuracy. The CIFAR-10 dataset BID7 ) was pre-processed to normalized the input images in range [-1; 1]. As for MNIST, we trained a CNN architecture using Adadelta and early stopping. For this dataset we only used the ReLU nonlinearity, reaching a final test accuracy of 80.5%. For gradient-based methods, the attribution of each pixel was computed summing up the attribution of the 3 color channels. Similarly, Occlusion-1 was performed setting all color channels at zero at the same time for each pixel being tested. We used a pre-trained Inception V3 network. The details of this architecture can be found in BID27. We used a test dataset of 1000 ImageNet-compatible images, normalized in [-1; 1] that was classified with 95.9% accuracy. When computing attributions, the color channels were handled as for CIFAR-10. We trained both a shallow MLP and an LSTM network on the IMDB dataset for sentiment analysis. For both architectures, we trained a small embedding layer considering only the 5000 most frequent words in the dataset. We also limited the maximum length of each review to 500 words, padding shorter ones when necessary. We used ReLU nonlinearities for the hidden layers and trained using Adam BID6 and early stopping. The final test accuracy is 87.3% on both architectures. For gradient-based methods, the attribution of each word was computed summing up the attributions over the embedding vector components corresponding to the word. Similarly, Occlusion-1 was performed setting all components of the embedding vector at zero for each word to be tested. Dense FORMULA3 Dense IMDB LSTM Embedding (5000x32)LSTM FORMULA4 Dense

Represent the short summary for finding the corresponding scientific article (long)

Four existing backpropagation-based attribution methods are fundamentally similar. How to assess it?

Represent this text to find a much much longer article about it with say hundreds-thousands of words

We propose a extension of the batch normalization, show a first-of-its-kind convergence analysis for this extension and show in numerical experiments that it has better performance than the original batch normalizatin.