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

Question: Bayesian inference offers a theoretically grounded and general way to train neural networks and can potentially give calibrated uncertainty. However, it is challenging to specify a meaningful and tractable prior over the network parameters, and deal with the weight correlations in the posterior. To this end, this paper introduces two innovations: (i) a Gaussian process-based hierarchical model for the network parameters based on recently introduced unit embeddings that can flexibly encode weight structures, and (ii) input-dependent contextual variables for the weight prior that can provide convenient ways to regularize the function space being modeled by the network through the use of kernels. We show these models provide desirable test-time uncertainty estimates, demonstrate cases of modeling inductive biases for neural networks with kernels and demonstrate competitive predictive performance on an active learning benchmark. The question of which priors one should use for Bayesian neural networks is largely unanswered, as two considerations need to be balanced: First, we want to keep inference in the high dimensional weight posterior tractable; Second, we desire to express our beliefs about the properties of the modeled functions compactly by modeling the collection of weights. Especially the latter is typically hard, as functional regularization for weight-based models is non-trivial. In order to cope with richer posterior inference than mean-field typically achieves, a variety of structured posterior models have been proposed recently, for instance utilizing radial posteriors , or rich weight posteriors based on Gaussian processes . When it comes to modeling priors on weights with correlations, recent work has attempted to capture feature-level correlations using for instance a horseshoe prior . One interesting direction of inquiry has focused on utilizing hyper-networks in order to model distributions over weights for an entire network , or alternatively to utilize unit-level level variables combined with compact hyper-networks to regress to single weights and capture weight correlations through the auxiliary variables . We propose to tackle some of the challenges in modeling weight priors by extending the latter work and combining it with ideas from the Gaussian process literature to replace the hyper-network with a Gaussian process prior over weights. We explore the use of compositional kernels to add input-dependence to the prior for our model and obtain rich models with beneficial properties in tasks such as active learning, and generalization, while maintaining tractable inference properties. In each unit (visible or hidden) of the l-th layer of the network has a corresponding latent hierarchical variable z l,i, of dimensions D z, where i denotes the index of the unit in a layer. These latent variables are used to construct the weights in the network such that a weight in the l-th weight layer, w l,i,j is linked to the latent variables z's of the i-th input unit and the j-th output unit of the weight layer. We can summarize this relationship by introducing a set of weight encodings, C w (z), one for each individual weight, c w l,i,j = z l+1,i, z l,j. The probabilistic description of the relationship between the weight codes and the weights w is:, where l denotes a visible or hidden layer and H l is the number of units in that layer, and w denotes all the weights in this network. In , a small parametric neural network regression model maps the latent variables to the weights,. We will call this network a meta mapping. We assume p(z) = N (z; 0, I). We can thus write down the joint density of the ing hierarchical model as follows, Variational inference was employed in prior work to infer z (and w implicitly), and to obtain a point estimate of θ, as a by-product of optimising the variational lower bound. Notice that in Sec.2, the meta mapping from the hierarchical latent variables to the weights is a parametric non-linear function, specified by a neural network. We replace the parametric neural network by a probabilistic functional mapping and place a nonparametric Gaussian process (GP) prior over this function. That is, where we have assumed a zero-mean GP, k γ (·, ·) is a covariance function and γ is a small set of hyper-parameters. The effect is that the latent function introduces correlations for the individual weight predictions, Notably, while the number of latent variables and weights can be large, the input dimension to the GP mapping is only 2D z, where D z is the dimensionality of each latent variable z. The GP mapping effectively performs one-dimensional regression from latent variables to individual weights while capturing their correlations. We will refer to this mapping as a GP-MetaPrior (metaGP). We define the following factorized kernel at the example of two weights in the network, In this section and what follows, we will use the popular exponentiated quadratic (EQ) kernel with ARD lengthscales, are the lengthscales and σ 2 k is the kernel variance. We cover inference and learning in App. A. We first note that whilst the hierarchical latent variables and meta mappings introduce nontrivial coupling between the weights a priori, the weights and latent variables are inherently global. That is, a function drawn from the model, represented by a set of weights, does not take into account the inputs at which the function will be evaluated. To this end, we introduce the input variable into the weight codes c w l,i,j = z l+1,i, z l,j, x n. In turn, this yields input-conditional weight models p(w n,l,i,j |f, z l+1,i, z l,j, x n). We again turn to compositional kernels and introduce a new input kernel K x which we use as follows, As a of having private contextual inputs to the meta mapping, the weight priors are now also local to each data point. We can utilize multiple useful kernels from the GP literature that allow modelers to describe relationships between data, but were previously inaccessible to neural network modelers. We consider this a novel form of functional regularization, as the entire network can be given structure that will constrain its function space. To scale this to large inputs, we learn transformations of inputs for the conditional weight model n = g(Vx n), for a learned mapping V and a nonlinearity g: We write down the joint density of all variables in the model when using our weight prior in a neural network: We discuss inference and learning in the Appendix Sec. A. We study our suggested priors empirically in two distinct settings in the following: first, we study the effect of kernel choice in the local model for a regression problem where we may have available intuitions as inductive biases. Second, we explore how the input-dependence behaves in out of distribution generalization tasks. We explore the utility of the contextual variable towards modeling inductive biases for neural networks and evaluate on predictive performance on a regression example. In particular, we generate 100 training points from a synthetic sinusoidal function and create two test sets that contains in-sample inputs and out-of-sample inputs, respectively. We test an array of models and inference methods, including BNN with MFVI, metaGP and metaGP with contextual variables. We can choose the covariance function to be used for the auxiliary variables to encode our belief about how the weights should be modulated by the input. We pick EQ and periodic kernels in this example. Fig. 2 summarizes the and illustrate the qualitative difference between models. Note that the periodic kernel allows the model to discover and encode periodicity, allowing for more long-range confident predictions compared to that of the EQ kernel. We test the ability of this model class to produce calibrated predictive uncertainty to outof-distribution samples. We first train a neural network classifier with one hidden layer of 100 rectified linear units on the MNIST dataset, and apply the metaGP prior only to the last layer of the network. After training, we compute the entropy of the predictions on various test sets, including notMNIST, fashionMNIST, Kuzushiji-MNIST, and uniform and Gaussian noise inputs. Following , the CDFs of the predictive entropies for various methods are shown in Fig. 3. In most out-of-distribution sets considered, metaGP and metaGP with local auxiliary variables demonstrate competitive performance to Gaussian MFVI. Notably, MAP estimation tends to give wildly poor uncertainty estimates on out-of-distribution samples. We illustrated the utility of a GP-based hierarchical prior over neural network weights and a variational inference scheme that captures weight correlations and allows input-dependent contextual variables. We plan to evaluate the performance of the model on more challenging decision making tasks and to extend the inference scheme to handle continual learning. Appendix A. Appendix: Inference and learning using stochastic structured variational inference Performing inference is challenging due to the non-linearity of the neural network and the need to infer an entire latent function f. To address these problems, we derive a structured variational inference scheme that makes use of innovations from inducing point GP approximation literature (; ; Quiñonero-; ;) and previous work on inferring meta-representations . As a reminder, we write down the joint density of all variables in the model: We first partition the space Z of inputs to the function f into a finite set of M variables called inducing inputs z u and the remaining inputs, Z = {x u, Z =xu}. The function f is partitioned identically, f = {u, f =u}, where u = f (x u). We can then rewrite the GP prior as follows, The inducing inputs and outputs, {x u, u}, will be used to parameterize the approximation. In particular, a variational approximation is judiciously chosen to mirror the form of the joint density: where the variational distribution over w is made to explicitly depend on remaining variables through the conditional prior, and q(z) is chosen to be a diagonal (mean-field) Gaussian densitie, q(z) = N (z; µ µ µ z, diag(σ σ σ 2 z)), and q(u) is chosen to be a correlated multivariate Gaussian, q(u) = N (u; µ µ µ u, Σ u). This approximation allows convenient cancellations yielding a tractable variational lower bound as follows, where the last expectation has been partly approximated using simple Monte Carlo with the reparameterization trick, i.e. z k ∼ q(z). We will next discuss how to approximate the expectation F k = w,f q(w, f |z k) log p(y|w, x). Note that we split f into f =u and u, and that we can integrate f =u out exactly to give, q(w|z k, u) = N (w; A (k) u, B (k) ), At this point, we can either (i) sample u from q(u), or (ii) integrate u out analytically. We opt for the second approach, which gives In contrast to GP regression and classification in which the likelihood term is factorized point-wise w.r.t. the parameters and thus their expectations only involve a low dimensional integral, we have to integrate out w in this case, which is of much higher dimensions. When necessary or practical, we resort to Kronecker factored models or make an additional diagonal approximation as follows, Whilst the diagonal approximation above might look poor from the first glance, it is conditioned on a sample of the latent variables z k and thus the weights' correlations are retained after integrating out z. Such correlation is illustrated in 4 where we show the marginal and conditional covariance structures for the weights of a small neural network, separated into diagonal and full covariance models. The diagonal approximation above has been observed to give pathological behaviours in the GP regression case , but we did not observe these in practice. F k is approximated by F k ≈ wq (w|z k) log p(y|w, x) which can be subsequently efficiently estimated using the local reparameterization trick . The final lower bound is then optimized to obtain the variational parameterers of q(u), q(z), and estimates for the noise in the meta-GP model, the kernel hyper-parameters and the inducing inputs. selection and more crucially using the proposed model and inference scheme seems to yield comparable or better predictive errors with a similar number of queries. This simple setting quantitatively reveals the inferior performance of MFVI, compared to MAP and metaGP.

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

We introduce a Gaussian Process Prior over weights in a neural network and explore its ability to model input-dependent weights with benefits to various tasks, including uncertainty estimation and generalization in the low-sample setting.

We leverage deterministic autoencoders as generative models by proposing mixing functions which combine hidden states from pairs of images. These mixes are made to look realistic through an adversarial framework.


Question: Represent the scientific article to find a short TLDR.

Question: We perform an in-depth investigation of the suitability of self-attention models for character-level neural machine translation. We test the standard transformer model, as well as a novel variant in which the encoder block combines information from nearby characters using convolution. We perform extensive experiments on WMT and UN datasets, testing both bilingual and multilingual translation to English using up to three input languages (French, Spanish, and Chinese). Our transformer variant consistently outperforms the standard transformer at the character-level and converges faster while learning more robust character-level alignments. Most existing Neural Machine Translation (NMT) models operate on the word or subword-level. Often, these models are memory inefficient because of large vocabulary size. Character-level models instead work directly on raw characters, ing in a more compact language representation, while mitigating out-of-vocabulary (OOV) problems . They are especially suitable for multilingual translation, where multiple languages can be modelled using the same character vocabulary. Multilingual training can lead to improvements in the overall performance without any increase in model complexity . It also circumvents the need to train separate models for each language pair. Models based on self-attention have achieved excellent performance on a number of tasks including machine translation and representation learning . Despite the success of these models, no previous work has considered their suitability for character-level translation, with the In this work, we perform an in-depth investigation of the suitability of self-attention models for character-level translation. We consider two models: the standard transformer from ; as well as a novel variant, which we call the convtransformer (Figure 1, Section 3). The latter uses convolution to facilitate interactions among nearby character representations. We evaluate these models on both bilingual and multilingual translation to English, using up to three input languages: French (FR), Spanish (ES), and Chinese (ZH). We compare their translation performance on close (e.g., FR and ES) and on distant (e.g., FR and ZH) input languages (Section 5.1), and we analyze their learned character alignments (Section 5.2). We find that self-attention models work surprisingly well for character-level translation, performing competitively with equivalent subword-level models while requiring up to 60% fewer parameters. At the character-level, the convtransformer performs better than the standard transformer, converging faster and producing more robust alignments. Fully character-level translation was first tackled in , who proposed a recurrent encoder-decoder model similar to the one in . Their encoder combines convolutional layers with max pooling and highway layers to construct intermediate representations of segments of nearby characters. Their decoder network autoregressively generates the output translation one character at a time, utilizing attention on the encoded representations.'s approach showed promising on multilingual translation in particular. Without any architectural modifications, training on multiple source languages yielded performance improvements while also acting as a regularizer. Multilingual training of character-level models is possible not only for languages that have almost identical character vocabularies, such as French and Spanish, but even for distant languages for which a mapping to a common character-level representation can be made, for example through latinizing Russian or Chinese . More recently, perform an in-depth comparison between different characterand subword-level models. They show that, given sufficient computational time and model capacity, character-level models can outperform subwordlevel models, due to their greater flexibility in processing and segmenting the input and output sequences. The transformer is an attention-driven encoder-decoder model that has achieved state-of-the-art performance on a number of sequence modelling tasks in NLP. Instead of using recurrence, the transformer uses only feedforward layers based on self-attention. The standard transformer architecture consists of six stacked encoder layers that process the input using selfattention and six decoder layers that autoregressively generate the output sequence. Intuitively, attention as an operation is not as meaningful for encoding characters as it is for words. However, recent work on language modelling has surprisingly shown that attention can be very effective for modelling characters, raising the question how well the transformer would work on character-level bilingual and multilingual translation, and what architectures would be suitable for this task. These are the questions this paper sets out to investigate. To facilitate character-level interactions in the transformer, we propose a modification of the standard architecture which we call the convtransformer. In this architecture, we use the same decoder as the standard transformer, but we adapt each encoder block to include an additional subblock. The sub-block (Figure 1, b), inspired from , consists of three parallel 1D convolutional layers. We use separate context window sizes of 3, 5 and 7 for each convolutional layer in order to resemble character interactions of different levels of granularity, similar to subwordor word-level. Finally, we fuse the representations using an additional convolutional layer, ing in an output dimensionality that is identical to the input dimensionality. Therefore, in contrast to , who use max pooling to compress the input character sequence into segments of characters, here we leave the resolution unchanged, for both transformer and convtransformer models. For additional flexibility, we add a residual connection from the input to the output of the convolutional block. Datasets. We conduct experiments on two datasets. First, we use the WMT15 DE→EN dataset, on which we test different model configurations and compare our to previous work on character-level translation. We follow the preprocessing in and use the newstest-2014 dataset for testing. Second, we conduct our main experiments using the United Nations Parallel Corporus (UN) , for two reasons: (i) UN contains a large number of parallel sentences from six languages, allowing us to conduct multilingual experiments; (ii) all sentences in the corpus are from the same domain. We construct our training corpora by randomly sampling one million sentence pairs from the FR, ES, and ZH parts of the UN dataset, targeting translation to English. To construct multilin- Table 2: BLEU scores on the UN dataset, for different input training languages (first column), and evaluated on three different test sets (t-FR, t-ES and t-ZH). The target language is always English. #P is the number of training pairs. The best overall for each language are in bold. gual datasets, we combine the respective bilingual datasets (e.g., FR→EN and ES→EN) and shuffle them. In order to ensure all languages share the same character vocabulary, we latinize the Chinese dataset using the Wubi encoding method, following . For testing, we use the original UN test sets provided for each pair. Tasks. Our experiments are designed as follows: (i) bilingual scenario, in which we train a model with a single input language; (ii) multilingual scenario, in which we input two or three languages at the same time without providing any language identifiers to the models or increasing their parameters. We test combining input languages that can be considered as more similar in terms of syntax and vocabulary (e.g. FR and ES) as well as more distant (e.g., ES and ZH). Model comparison. In Table 1, we compare the BLEU performance of different character-level architectures trained on the WMT dataset. For reference, we include the recurrent character-level model from , as well as transformers trained on the subword level, using a vocabulary of 50k byte-pair encoding (BPE) tokens. All models were trained on four Nvidia GTX 1080X GPUs for 20 epochs. We find character-level training to be 3 to 5 times slower than subword-level training, due to much longer sequence lengths. However, the standard transformer trained at the character-level already achieves very strong performance, outperforming the model from . Character-level transformers also perform competitively with equivalent BPE models while requiring up to 60% fewer parameters. Our convtransformer variant performs on par with the standard transformer on this dataset. Multilingual experiments. In Table 2, we report our BLEU on the UN dataset using the 6-layer transformer/convtransformer models. All models were trained for 30 epochs. Multilingual models are evaluated on translation from all possible input languages to English. The convtransformer consistently outperforms the transformer on this dataset, with a gap of up to 2.3 BLEU on bilingual translation (ZH→EN) and up to 2.6 BLEU on multilingual translation (FR+ZH→EN). Training multilingual models on similar input languages (FR + ES→EN) leads to improved performance for both languages, which is consistent with . Training on distant languages can surprisingly still be effective, for example, the models trained on FR+ZH→EN outperform the models trained just on FR→EN, however they perform worse than the bilingual models trained on ZH→EN. Thus, distant-language training seems only to be helpful when the input language is closer to the target translation language (which is English here). The convtransformer is about 30% slower to train than the transformer, however, as shown in Figure 2, the convtransformer reaches compara- ble performance in less than half of the number of epochs, leading to an overall training speedup compared to the transformer. To gain a better understanding of the multilingual models, we analyze their learned character alignments as inferred from the model attention probabilities. For each input language (e.g., FR), we compare the alignments learned by each of our multilingual models (e.g., FR + ES → EN model) to the alignments learned by the corresponding bilingual model (e.g., FR → EN). Our intuition is that the bilingual models have the greatest flexibility to learn high-quality alignments because they are not distracted by other input languages. Multilingual models, by contrast, might learn lower quality alignments because either (i) the architecture is not robust enough for multilingual training; or (ii) the languages are too dissimilar to allow for effective joint training, prompting the model to learn alternative alignment strategies to accommodate for all languages. We quantify the alignments using canonincal correlation analysis (CCA) . First, we sample 500 random sentences from each of our UN testing datasets (FR, ES, or ZH) and then produce alignment matrices by extracting the encoder-decoder attention from the last layer of each model. We use CCA to project each alignment matrix to a common vector space and infer the correlation. We conduct the analysis on our transformer and convtransformer models separately. Our are in Figure 3. For similar source and target languages (e.g., the FR+ES→EN model), we observe strong positive correlation to the bilingual models, indicating that alignments can be simultaneously learned. When introducing a distant source language (ZH) in the training, we observe a drop in correlation, for FR and ES, and an even bigger drop for ZH. This is in line with our BLEU from Section 5.1 suggesting that multilingual training of distant languages is more challenging. The convtransformer is more robust to the introduction of a distant language than the transformer (p < 0.005 for FR and ES inputs, according to a one-way ANOVA test). We performed a detailed investigation of the utility of self-attention models for character-level translation, testing the standard transformer architecture, as well as a novel variant augmented by convolution in the encoder to facilitate information propagation across characters. Our experiments show that self-attention performs very well on characterlevel translation, performing competitively with subword-level models, while requiring fewer parameters. Training on multiple input languages is also effective and leads to improvements across all languages when the source and target languages are similar. When the languages are different, we observe a drop in performance, in particular for the distant language. In future work, we will extend our analysis to include additional source and target languages from different language families, such as more Asian languages. We will also work towards improving the training efficiency of character-level models, which is one of their main bottlenecks. A Example model outputs Tables 3, 4 and 5 contain example translations produced by our different bilingual and multilingual models trained on the UN datasets. In Figures 4,5, 6 and 7 we plot example alignments produced by our different bilingual and multilingual models trained on the UN datasets, always testing on translation from FR to EN. The alignments are produced by extracting the encoderdecoder attention produced by the last decoder layer of our transformer/convtransformer models. We observe some patterns: (i) for bilingual translation (Figure 4), the convtransformer has a sharper weight distribution on the matching characters and words than the transformer; (ii) for multilingual translation of close languages (FR+ES→EN, Figure 5), both transformer and convtransformer are able to preserve the word alignments, but the alignments produced by the convtransformer appear to be slightly less noisy; (iii) for multilingual translation of distant languages (FR+ZH→EN, Figure 6), the character alignments of the transformer become visually much noisier and concentrated on a few individual chracters and many word alignments dissolve, while the convtransformer character alignments remain more spread out and word alignment is much better preserved. This is another indication that the convtransformer is more robust for multilingual translation of distant languages. (iv) for multilingual translation with three inputs, where two of the three languages are close (FR+ES+ZH→EN, Figure 7), we observe a similar pattern, with the word alignments being better preserved by the convtransformer. source Pour que ce cadre institutionnel soit efficace, il devra remédier aux lacunes en matière de réglementation et de mise en oeuvre qui caractérisentà ce jour la gouvernance dans le domaine du développement durable. reference For this institutional framework to be effective, it will need to fill the regulatory and implementation deficit that has thus far characterized governance in the area of sustainable development. FR→EN transformer To ensure that this institutional framework is effective, it will need to address regulatory and implementation gaps that characterize governance in sustainable development. convtransformer In order to ensure that this institutional framework is effective, it will have to address regulatory and implementation gaps that characterize governance in the area of sustainable development. To ensure that this institutional framework is effective, it will need to address gaps in regulatory and implementation that characterize governance in the area of sustainable development. convtransformer In order to ensure that this institutional framework is effective, it will be necessary to address regulatory and implementation gaps that characterize governance in sustainable development so far. To ensure that this institutional framework is effective, gaps in regulatory and implementation that have characterized governance in sustainable development to date. convtransformer For this institutional framework to be effective, it will need to address gaps in regulatory and implementation that characterize governance in the area of sustainable development. To ensure that this institutional framework is effective, it will need to address regulatory and implementation gaps that are characterized by governance in the area of sustainable development. convtransformer If this institutional framework is to be effective, it will need to address gaps in regulatory and implementation that are characterized by governance in the area of sustainable development. source Estamos convencidos de que el futuro de la humanidad en condiciones de seguridad, la coexistencia pacífica, la tolerancia y la reconciliación entre las naciones se verán reforzados por el reconocimiento de los hechos del pasado. reference We strongly believe that the secure future of humanity, peaceful coexistence, tolerance and reconciliation between nations will be reinforced by the acknowledgement of the past. ES→EN transformer We are convinced that the future of humanity in conditions of security, peaceful coexistence, tolerance and reconciliation among nations will be strengthened by recognition of the facts of the past. convtransformer We are convinced that the future of humanity under conditions of safe, peaceful coexistence, tolerance and reconciliation among nations will be reinforced by the recognition of the facts of the past. We are convinced that the future of mankind under security, peaceful coexistence, tolerance and reconciliation among nations will be strengthened by the recognition of the facts of the past. convtransformer We are convinced that the future of humanity in safety, peaceful coexistence, tolerance and reconciliation among nations will be reinforced by the recognition of the facts of the past. We are convinced that the future of humanity in safety, peaceful coexistence, tolerance and reconciliation among nations will be strengthened by the recognition of the facts of the past. convtransformer We are convinced that the future of humanity in safety, peaceful coexistence, tolerance and reconciliation among nations will be strengthened by the recognition of the facts of the past. We are convinced that the future of mankind in safety, peaceful coexistence, tolerance and reconciliation among nations will be strengthened by the recognition of the facts of the past. convtransformer We are convinced that the future of mankind in security, peaceful coexistence, tolerance and reconciliation among nations will be strengthened by the recognition of the facts of the past. source ZH 利用专家管理农场对于最大限度提高生产率和灌溉水使用效率也是重要的。 source ZH tjh|et fny|pe tp|gj pei|fnrt cf|gf jb|dd bv|ya rj|ym tg|u|yx t iak|ivc|ii wgkq0|et uqt|yx bn j tgj|s r. reference EN The use of expert farm management is also important to maximize land productivity and efficiency in the use of irrigation water. ZH→EN transformer The use of expert management farms is also important for maximizing productivity and irrigation use. convtransformer The use of experts to manage farms is also important for maximizing efficiency in productivity and irrigation water use. The use of expert management farms is also important for maximizing productivity and efficiency in irrigation water use. convtransformer The use of expert management farms is also important for maximizing productivity and irrigation water efficiency. The use of expert farm management is also important for maximizing productivity and irrigation water use efficiency. convtransformer The use of expert management farms to maximize efficiency in productivity and irrigation water use is also important. The use of expert management farms is also important for maximizing productivity and irrigation water use. convtransformer It is also important that expert management farms be used to maximize efficiency in productivity and irrigation use.

Represent the TLDR for finding the corresponding scientific article

We perform an in-depth investigation of the suitability of self-attention models for character-level neural machine translation.

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

The choice of the hub (target) language affects the quality of cross-lingual embeddings, which shouldn't be evaluated only  on English-centric dictionaries.


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

Question: The field of medical diagnostics contains a wealth of challenges which closely resemble classical machine learning problems; practical constraints, however, complicate the translation of these endpoints naively into classical architectures. Many tasks in radiology, for example, are largely problems of multi-label classification wherein medical images are interpreted to indicate multiple present or suspected pathologies. Clinical settings drive the necessity for high accuracy simultaneously across a multitude of pathological outcomes and greatly limit the utility of tools which consider only a subset. This issue is exacerbated by a general scarcity of training data and maximizes the need to extract clinically relevant features from available samples -- ideally without the use of pre-trained models which may carry forward undesirable biases from tangentially related tasks. We present and evaluate a partial solution to these constraints in using LSTMs to leverage interdependencies among target labels in predicting 14 pathologic patterns from chest x-rays and establish state of the art on the largest publicly available chest x-ray dataset from the NIH without pre-training. Furthermore, we propose and discuss alternative evaluation metrics and their relevance in clinical practice. Medical diagnostics have increasingly become a more interesting and viable endpoint for machine learning. A general scarcity of publicly available medical data, however, inhibits its rapid development. Pre-training on tangentially related datasets such as ImageNet BID4 ) has been shown to help in circumstances where training data is limited, but may introduce unintended biases which are undesirable in a clinical setting. Furthermore, most clinical settings will drive a need for models which can accurately predict a large number of diagnostic outcomes. This essentially turns many medical problems into multi-label classification with a large number of targets, many of which may be subtle or poorly defined and are likely to be inconsistently labeled. In addition, unlike the traditional multi-label setting, predicting the absence of each label is as important as predicting its presence in order to minimize the possibility of misdiagnosis. Each of these challenges drive a need for architectures which consider clinical context to make the most of the data available. Chest x-rays are the most common type of radiology exam in the world and a particularly challenging example of multi-label classification in medical diagnostics. Making up nearly 45% of all radiological studies, the chest x-ray has achieved global ubiquity as a low-cost screening tool for a wealth of pathologies including lung cancer, tuberculosis, and pneumonia. Each scan can contain dozens of patterns corresponding to hundreds of potential pathologies and can thus be difficult to interpret, suffering from high disagreement rates between radiologists and often ing in unnecessary follow-up procedures. Complex interactions between abnormal patterns frequently have significant clinical meaning that provides radiologists with additional context. For example, a study labeled to indicate the presence of cardiomegaly (enlargement of the cardiac silhouette) is more likely to additionally have pulmonary edema (abnormal fluid in the extravascular tissue of the lung) as the former may suggest left ventricular failure which often causes the latter. The presence of edema further predicates the possible presence of both consolidation (air space opacification) and a pleural effusion (abnormal fluid in the pleural space). Training a model to recognize the potential for these interdependencies could enable better prediction of pathologic outcomes across all categories while maximizing the data utilization and its statistical efficiency. Among the aforementioned challenges, this work firstly addresses the problem of predicting multiple labels simultaneously while taking into account their conditional dependencies during both the training and the inference. Similar problems have been raised and analyzed in the work of BID30 BID1 with the application of image tagging, both outside the medical context. The work of BID26 for chest x-ray annotations are closest to ours. All of them utilize out-of-the-box decoders based on recurrent neural networks (RNNs) to sequentially predict the labels. Such a naive adoption of RNNs is problematic and often fails to attend to peculiarities of the medical problem in their design, which we elaborate on in Section 2.3 and Section 3.3.1.In addition, we hypothesize that the need for pre-training may be safely removed when there are sufficient medical data available. To verify this, all our models are trained from scratch, without using any extra data from other domains. We directly compare our with those of that are pre-trained on ImageNet. Furthermore, to address the issue of clinical interpretability, we juxtapose a collection of alternative metrics along with those traditionally used in machine learning, all of which are reported in our benchmark. This work brings state-of-the-art machine learning models to bear on the problem of medical diagnosis with the hope that this will lead to better patient outcomes. We have advanced the existing research in three orthogonal directions:• This work experimentally verifies that without pre-training, a carefully designed baseline model that ignores the label dependencies is able to outperform the pre-trained state-ofthe-art by a large margin.• A collection of metrics is investigated for the purpose of establishing clinically relevant and interpretable benchmarks for automatic chest x-ray diagnosis.• We propose to explicitly exploit the conditional dependencies among abnormality labels for better diagnostic . Existing RNNs are purposely modified to accomplish such a goal. The on the proposed metrics consistently indicate their superiority over models that do not consider interdependencies. The present work is part of a recent effort to harness advances in Artificial Intelligence and machine learning to improve computer-assisted diagnosis in medicine. Over the past decades, the volume of clinical data in machine-readable form has grown, particularly in medical imaging. While previous generations of algorithms struggled to make effective use of this high-dimensional data, modern neural networks have excelled at such tasks. Having demonstrated their superiority in solving difficult problems involving natural images and videos, recent surveys from BID18; BID25; BID22 suggest that they are rapidly becoming the "de facto" standard for classification, detection, and segmentation tasks with input modalities such as CT, MRI, x-ray, and ultrasound. As further evidence, models based on neural networks dominate the leaderboard in most medical imaging challenges 1,2.Most successful applications of neural networks to medical images rely to a large extent on convolutional neural networks (ConvNets), which were first proposed in BID15. This comes as no surprise since ConvNets are the basis of the top performing models for natural image understanding. For abnormality detection and segmentation, the most popular variants are UNets from BID24 and VNets from BID20, both built on the idea of fully convolutional neural networks introduced in BID19. For classification, representative examples of neural network-based models from the medical literature include: BID5 for skin cancer classification, BID7 for diabetic retinopathy, BID13 for pulmonary tuberculosis detection in x-rays, and BID11 for lung cancer diagnosis with chest CTs. All of the examples above employed 2D or 3D ConvNets and all of them provably achieved near-human level performance in their particular setup. Our model employs a 2D ConvNet as an image encoder to process chest x-rays. Given a finite set of possible labels, the multi-label classification problem is to associate each instance with a subset of those labels. Being relevant to applications in many domains, a variety of models have been proposed in the literature. The simplest approach, known as binary relevance, is to break the multi-label classification problem into independent binary classification problems, one for each label. A recent example from the medical literature is. The appeal of binary relevance is its simplicity and the fact that it allows one to take advantage of a rich body of work on binary classification. However, it suffers from a potentially serious drawback: the assumption that the labels are independent. For many applications, such as the medical diagnostic application motivating this work, there are significant dependencies between labels that must be modeled appropriately in order to maximize the performance of the classifier. Researchers have sought to model inter-label dependencies by making predictions over the label power set (e.g. BID29 and BID23), by training classifiers with loss functions that implicitly represent dependencies (e.g. BID16), and by using a sequence of single-label classifiers, each of which receives a subset of the previous predictions along with the instance to be classified (e.g. BID3). The later approach is equivalent to factoring the joint distribution of labels using a product of conditional distributions. Recent research has favored recurrent neural networks (RNNs), which rely on their state variables to encode the relevant information from the previous predictions (e.g. BID30 and Chen et al. FORMULA0). The present work falls into this category. To detect and classify abnormalities in chest x-ray images, we propose using 2D ConvNets as encoders and decoders based on recurrent neural networks (RNNs). Recently, BID17 proposed an RNN-based model for abnormality classification that, based on the title of their paper, bears much resemblance to ours. However, in their work the RNN is used to process the inputs rather than the outputs, which fails to capture dependencies between labels; something we set out to explicitly address. They also deal exclusively with time series data rather than high-resolution images. The work of BID26 also addresses the problem of chest x-ray annotation. They built a cascaded three-stage model using 2D ConvNets and RNNs to sequentially annotate both the abnormalities and their attributes (such as location and severity). Their RNN decoder resembles ours in its functionality, but differs in the way the sequence of abnormalities are predicted. In each RNN step, their model predicts one of T abnormalities with softmax, and stops when reaching a predefined upper limit of total number of steps (5 is used in theirs). Instead, our model predicts the presence or absence of t-th abnormality with sigmoid at time step t and the total number of steps is the number of abnormalities. The choice of such a design is inspired by Neural Autoregressive Density Estimators (NADEs) of BID14. Being able to predict the absence of an abnormality and feed to the next step, which is not possible with softmax and argmax, is preferable in the clinical setting to avoid any per-class overcall and false alarm. In addition, the absence of a certain abnormality may be a strong indication of the presence or absence of others. Beyond having a distinct approach to decoding, their model was trained on the OpenI 3 dataset with 7000 images, which is smaller and less representative than the dataset that we used (see below). In addition, we propose a different set of metrics to use in place of BLEU BID21, commonly used in machine translation, for better clinical interpretation. In the non-medical setting, BID30 proposed a similar ConvNet-RNN architecture. Their choice of using an RNN decoder was also motivated by the desire to model label dependencies. However, they perform training and inference in the manner of BID26. Another example of this combination of application, architecture, and inference comes from BID1 whose work focused on eliminating the need to use a pre-defined label order for training. We show in the experiments that ordering does not seem to impose as a significant constraint when models are sufficiently trained. Finally, proposed a 2D ConvNet for classifying abnormalities in chest x-ray images. However, they used a simple binary relevance approach to predict the labels. As we mentioned earlier, there is strong clinical evidence to suggest that labels do in fact exhibit dependencies that we attempt to model. They also presented the largest public x-ray dataset to date ("ChestX-ray8"). Due to its careful curation and large volume, such a collection is a more realistic retrospective clinical study than OpenI and therefore better suited to developing and benchmarking models. Consequently, we use "ChestX-ray8" to train and evaluate our model. And it should be noted that unlike, we train our models from scratch to ensure that the image encoding best captures the features of x-ray images as opposed to natural images. The following notations are used throughout the paper. Denote x as an input image, and x ∈ R w×h×c where w, h and c represent width, height, and channel. Denote y as a binary vector of dimensionality T, the total number of abnormalities. We used superscripts to indicate a specific dimensionality. Thus, given a specific abnormality t, y t = 0 indicates its absence and y t = 1 its presence. We use subscripts to index a particular example, for instance, {x i, y i} is the i-th example. In addition, θ denotes the union of parameters in a model. We also use m to represent a vector with each element m t as the mean of a Bernoulli distribution. A recent variant of Convolutional Neural Network (ConvNet) is proposed in BID10, dubbed as Densely Connected Networks (DenseNet). As a direct extension of Deep Residual Networks BID8 and Highway Networks BID27, the key idea behind DenseNet is to establish shortcut connections from all pairs of layers at different depth of a very deep neural network. It has been argued in BID10 that, as the of the extensive and explicit feature reuse in DenseNets, they are both computationally and statistically more efficient. This property is particularly desirable in dealing with medical imaging problems where the number of training examples are usually limited and overfitting tends to prevail in models with more than tens of millions of parameters. We therefore propose a model based on the design of DenseNets while taking into account the peculiarity of medical problems at hand. Firstly, the inputs of the model are of much higher resolutions. Lower resolution, typically with 256 × 256, may be sufficient in dealing with problems related to natural images, photos and videos, a higher resolution, however, is often necessary to faithfully represent regions in images that are small and localized. Secondly, the proposed model is much smaller in network depth. While there is ample evidence suggesting the use of hundreds of layers, such models typically require hundreds of thousands to millions of examples to train. Large models are prone to overfitting with one tenth the training data. FIG0 highlights such a design. Ignoring the nature of conditional dependencies among the indicators, y t, one could establish the following probabilistic model: DISPLAYFORM0 Equ assumes that knowing one label does not provide any additional information about any other label. Therefore, in principle, one could build a separate model for each y t which do not share any parameters. However, it is common in the majority of multi-class settings to permit a certain degree of parameter sharing among individual classifiers, which encourages the learned features to be reused among them. Furthermore, sharing alleviates the effect of overfitting as the exampleparameter ratio is much higher. The ing encoded representation of the input is a vector that captures the higher-order semantics that are useful for the decoding task. K is the growth rate in BID10, S is the stride. We also include the filter and pooling dimensionality when applicable. Unlike a DenseNet that has 16 to 32 ConvBlock within a DenseBlock, our model uses 4 in order to keep the total number of parameters small. Our proposed RNN decoder is illustrated on the bottom right. During training, the model optimizes the following Maximum Log-likelihood Estimate (MLE) criteria: DISPLAYFORM0 where P (y t |x, θ) is a Bernoulli distribution with its mean m t parameterized by the model. In particular, m t = sigmoid(f (x, θ)). As labels are considered independent and during the inference, a binary label is generated for each factor independently with y t * = arg max P (y t |x, θ). This is equivalent to setting the classification threshold to 0.5. As discussed in length in Section 1, it is hardly true that abnormalities are independent from each other. Hence the assumption made by Equ is undoubtably too restrictive. In order to treat the multi-label problem in its full generality, we can begin with the following factorization, which makes no assumption of independence: DISPLAYFORM0 Here, the statistical dependencies among the indicators, y t, are explicitly modeled within each factor so the absence or the presence of a particular abnormality may suggest the absence or presence of others. The factorization in Equ has been the central study of many recent models. BID0 proposed the first neural network based model, refined by BID14 and BID6, all of which used the model in the context of unsupervised learning in small discrete data or small image patches. Recently BID28; BID2 popularized the so-called "sequence-to-sequence" model where a Recurrent Neural Network (RNN) decoder models precisely the same joint distribution while conditioned on the output of an encoder. Compared with the previous work, RNNs provide a more general framework to model Equ and an unmatched proficiency in capturing long term dependencies when K is large. We therefore adopt the Long-short Term Memory Networks (LSTM) BID9 and treat the multi-label classification as sequence prediction with a fixed length. The formulation of our LSTM is particularly similar to those used in image and video captioning BID32 BID33, but without the use of an attention mechanism and without the need of learning when to stop. Given an input x, the same DenseNet-based encoder of Section 3.2 is applied to produce a lower dimensional vector representation of it with x enc = f enc (x) For the decoder, x enc is used to initialize both the states and memory of an LSTM with DISPLAYFORM1 where f h0 and f c0 are standard feedforward neural networks with one hidden layer. With h 0 and c 0, the LSTM decoder is parameterized as g DISPLAYFORM2 DISPLAYFORM3 DISPLAYFORM4 where model parameters consist of three matrices Ws, Us, Vs, vectors bs and a scalar b l. y is a vector code of the ground truth labels that respects a fixed ordering, with each element being either 0 or 1. All the vectors, including hs, gs, cs, bs, q and y are row vectors such that the vector-matrix multiplication makes sense. denotes the element-wise multiplication. Both sigmoid and tanh are element-wise nonlinearities. For brevity, we summarize one step of decoder computation as m t = f dec (x enc, y t−1, h t−1) where the decoder LSTM computes sequentially the mean of a Bernoulli distribution. With Equ, each of its factor may be rewritten as DISPLAYFORM5 The choice of using sigmoid to predict y t is by design. Standard sequence-to-sequence models often use softmax to predict one out of T classes and thus need to learn explicitly an "end-ofsequence" class. This is not desirable in our context due to the sparseness of the labels, ing in the learned decoder being strongly biased towards predicting "end-of-sequence" while missing infrequently appearing abnormalities. Secondly, during the inference of the softmax based RNN decoder, the prediction at the current step is largely based on the presence of abnormalities at all previous steps due to the use of argmax. However, in the medical setting, the absence of previously predicted abnormalities may also be important. Sigmoid conveniently addresses these issues by explicitly predicting 0 or 1 at each step and it does not require the model to learn when to stop; the decoder always runs for the same number of steps as the total number of classes. FIG0 contains the overall architecture of the decoder. During training, the model optimizes DISPLAYFORM0 Compared with Equ, the difference is the explicit dependencies among y t s. One may also notice that such a factorization is not unique -in fact, there exist T! different orderings. Although mathematically equivalent, in practice, some of the orderings may in a model that is easier to train. We investigate in Section 4 the impact of such decisions with two distinct orderings. The inference of such a model is unfortunately intractable as y * = arg max y P (y 0, . . ., y T |x). Beam search BID28 is often used as an approximation. We have found in practice that greedy search, which is equivalent to beam search with size 1, in similar performance due to the binary sampling nature of each y t, and use it throughout the experiments. It is equivalent to setting 0.5 as the discretization threshold on each of the factors. To verify the efficacy of the proposed models in medical diagnosis, we conduct experiments on the dataset introduced in. It is to-date the largest collection of chest x-rays that is publicly available. It contains in total 112,120 frontal-view chest x-rays each of which is associated with the absence or presence of 14 abnormalities. The dataset is originally released in PNG format, with each image rescaled to 1024 × 1024.As there is no standard split for this dataset, we follow the guideline in to randomly split the entire dataset into 70% for training, 10% for validation and 20% for training. The authors of noticed insignificant performance difference with different random splits, as confirmed in our experiments by the observation that the performance on validation and test sets are consistent with each other. As the dataset is relatively new, the complete set of metrics have yet to be established. In this work, the following metrics are considered, and their advantage and drawbacks outlined below.1. Negative log-probability of the test set (NLL). This metric has a direct and intuitive probabilistic interpretation: The lower the NLL, the more likely the ground truth label. However, it is difficult to associate it with a clinical interpretation. Indeed, it does not directly reflect how accurate the model is at diagnosing cases with or without particular abnormalities.. This is the reported metric of and it is widely used in modern biostatistics to measure collectively the rate of true detections and false alarms. In particular, we define 4 quantities: FORMULA0 The ROC curve has typically horizontal axis as (1-specificity) and vertical axis as sensitivity. Once P (y i |x) is available, the curve is generated by varying the decision threshold to discretize the probability into either 0 or 1. Despite of its clinical relevance, P (y i |x) is intractable to compute with the model of Equ due to the need of marginalizing out other binary random variables. It is however straightforward to compute with the model of Equ due the independent factorization.3. DICE coefficient. As a similarity measure over two sets, DICE coefficient is formulated as DICE(y α, y β) = (2y α y β)/(y 2 α + y 2 β) = 2TP/(2TP + FP + FN) with the maxima at 1 when y α ≡ y β. Such a metric may be generalized in cases where y α is a predicted probability with y α = P (y|x) and y β is the binary-valued ground truth, as is used in image segmentation tasks such as in BID24; BID20. We adopt such a generalization as our models naturally output probabilities.4. Per-example sensitivity and specificity (PESS). The following formula is used to compute PESS DISPLAYFORM0 where N is the size of the test set. Notice that the computation of sensitivity and specificity requires a binary prediction vector. Therefore, without introducing any thresholding bias, we useŷ DISPLAYFORM1 5. Per-class sensitivity and specificity (PCSS). Unlike PESS, the following formula is used to compute PCSS DISPLAYFORM2 whereŷ t i follows the same threshold of 0.5 as in PESS. Unlike PCSS where the average is over examples, PCSS averages over abnormalities instead. Three types of models are tuned on the training set. We have found that data augmentation is crucial in combatting the overfitting in all of our experiments despite their relatively small size. In particular, the input image of resolution 512 × 512 is randomly translated in 4 directions by 25 pixels, randomly rotated from -15 to 15 degrees, and randomly scaled between 80% and 120%. Furthermore, the ADAM optimizer BID12 is used with an initial learning rate of 0.001 which is multiplied by 0.9 whenever the performance on the validation set does not improve during training. Early stop is applied when the performance on the validation set does not improve for 10,000 parameter updates. All the reported metrics are computed on the test set with models selected with the metric in question on the validation set. In order to ensure a fair comparison, we constrain all models to have roughly the same number of parameters. For model a, where labels are considered independent, a much higher network growth rate is used for the encoder. For model b1 and model b2 where LSTMs are used as decoders, the encoders are narrower. The exact configuration of three models is shown in TAB1. In addition, we investigate the effect of ordering in the factorization of Equ. In particular, model b1 sorts labels by their frequencies in the training set while model b1 orders them alphabetically. All models are trained with MLE with the weighted cross-entropy loss introduced in. All models are trained end-to-end from scratch, without any pre-training on ImageNet data. The AUC per abnormality is shown in TAB2, computed based on the marginal distribution of P (y|x). Only model a is included as such marginals are in general intractable for the other two due to the dependencies among y t s. In addition, Table 3 compares all three models based on the proposed metrics from Section 4.2. It can be observed that our baseline model significantly outperformed the previous state-of-the-art. According to Table 3, considering label dependencies brings significant benefits in all 4 metrics and the impact of ordering seems to be marginal when the model is sufficiently trained. Table 3: Test set performance on negative log-probability (NLL), DICE, per-example sensitivity (PESS) at a threshold 0.5 and per-class sensitivity and specificity (PCSS) at a threshold of 0.5. See Section 4.2 for explanations of the metrics. In addition to model a used in TAB2, model b1 and model b2 corresponds to the model introduced in Section 3.3, with the difference in the ordering of the factorization in Equ. model b1 sorts labels by their frequency in the training set in ascending order. As a comparison, model b2 orders labels alphabetically according to the name of the abnormality. To improve the quality of computer-assisted diagnosis of chest x-rays, we proposed a two-stage end-to-end neural network model that combines a densely connected image encoder with a recurrent neural network decoder. The first stage was chosen to address the challenges to learning presented by high-resolution medical images and limited training set sizes. The second stage was designed to allow the model to exploit statistical dependencies between labels in order to improve the accuracy of its predictions. Finally, the model was trained from scratch to ensure that the best application-specific features were captured. Our experiments have demonstrated both the feasibility and effectiveness of this approach. Indeed, our baseline model significantly outperformed the current state-of-the-art. The proposed set of metrics provides a meaningful quantification of this performance and will facilitate comparisons with future work. While a limited exploration into the value of learning interdependencies among labels yields promising , additional experimentation will be required to further explore the potential of this methodology both as it applies specifically to chest x-rays and to medical diagnostics as a whole. One potential concern with this approach is the risk of learning biased interdependencies from a limited training set which does not accurately represent a realistic distribution of pathologies -if every example of cardiomegaly is also one of cardiac failure, the model may learn to depend too much on the presence of other patterns such as edemas which do not always accompany enlargement of the cardiac silhouette. This risk is heightened when dealing with data labeled with a scheme which mixes pathologies, such as pneumonia, with patterns symptomatic of those pathologies, such as consolidation. The best approach to maximizing feature extraction and leveraging interdependencies among target labels likely entails training from data labeled with an ontology that inherently poses some consistent known relational structure. This will be the endpoint of a future study.

Represent the TLDR for finding the corresponding scientific article.

we present the state-of-the-art results of using neural networks to diagnose chest x-rays

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

In this paper we introduced an algorithm to learn the connectivity of deep multi-branch networks. The approach is evaluated on image categorization where it consistently yields accuracy gains over state-of-the-art models that use fixed connectivity.


Question: Represent the scientific article to find a short TLDR

Question: have achieved high classification accuracy in distinguishing swim bouts of zebrafish using a Support Vector Machine (SVM). Convolutional Neural Networks (CNNs) have reached superior performance in various image recognition tasks over SVMs, but these powerful networks remain a black box. Reaching better transparency helps to build trust in their classifications and makes learned features interpretable to experts. Using a recently developed technique called Deep Taylor Decomposition, we generated heatmaps to highlight input regions of high relevance for predictions. We find that our CNN makes predictions by analyzing the steadiness of the tail's trunk, which markedly differs from the manually extracted features used by. We further uncovered that the network paid attention to experimental artifacts. Removing these artifacts ensured the validity of predictions. After correction, our best CNN beats the SVM by 6.12%, achieving a classification accuracy of 96.32%. Our work thus demonstrates the utility of AI explainability for CNNs. In the study by , a well-performing classifier allowed to correlate neural interventions with behavioral changes. Support Vector Machines (SVMs) were commonly applied to such classification tasks, relying on feature engineering by domain experts. In recent years, Convolutional Neural Networks (CNNs) have proven to reach high accuracies in classification tasks on images and videos reducing the need for manual feature engineering. introduced them in the 90s, CNNs had their break-through in the competition ILSVRC2012 with the architecture of. Since then, more and more sophisticated architectures have been designed enabling them to identify increasingly abstract features. This development has become possible due to the availability of larger training sets, computing resources, GPU training implementations, and better regularization techniques, such as Dropout; ). While these more complex deep neural network architectures achieved better , they also kept their learnt features hidden if not further analyzed. This caused CNNs to come with significant drawbacks: a lack of trust in their classifications, missing interpretability of learned features in the application domain, and the absence of hints as to what data could enhance performance . Explaining the decisions made by CNNs might even become a legal requirement in certain applications . In order to overcome these drawbacks, subsequent research has developed approaches to shed light on the inner workings of CNNs. These approaches have been successfully used for uncovering how CNNs might learn unintended spurious correlations, termed "Clever Hans" predictions . Such predictions could even become harmful if the predictions entailed decisions with severe consequences . Also, since deep neural networks have become a popular machine learning technique in applied domains, spurious correlations would undermine scientific discoveries. This paper focuses on zebrafish research as an applied domain of AI explainability, considering that the research community around this organism has grown immensely. The zebrafish is an excellent model organism for vertebrates, including humans, due to the following four reasons: The genetic codes of humans and zebrafish are about 70% orthologue . The fish are translucent which allows non-invasive observation of changes in the organism . Furthermore, zebrafish are relatively cheap to maintain, produce plenty of offspring, and develop rapidly. Finally, they are capable of recovering their brain structures within days after brain injury . In this paper, we adapt CNNs to work on highly controlled zebrafish video recordings and show the utility of a recently developed AI explainability technique on this task. We train the network on optical flow for binary classifying swim bouts and achieve superior performance when compared to the current state-of-the-art in bout classification . We then create heatmaps over the videos with the "iNNvestigate" toolbox which highlight the areas that our CNN pays attention to when making a prediction. The ing heatmaps show that our CNN learns reasonable features which are very different from those manually composed by. In the following, we will give an overview over relevant CNN architectures and approaches. Then, we will summarize existing AI explainability approaches focusing on attribution techniques. Finally, we highlight important studies of behavioral zebrafish research and give details of the study by. identified five relevant types of video architectures: CNN + LSTM (Long-Short-Term Memory), 3D-CNN , Two-Stream , 3D-Fused Two-Stream, and Two-Stream 3D-CNN. They differ in whether the convolutions are based on 2D or 3D kernels, whether optical flow is added, and how consecutive frames exchange information. Optical flow can be described as the horizontal and vertical displacement of a pixel from one frame to the next (Farnebäck ). Several algorithms for flow calculation exist, such as TV-L1 , Brox , and Farneback (Farnebäck ). Even novel deep learning approaches have been developed, e.g. FlowNet; ). initialized several CNN architectures with pre-trained weights and trained them on human action recognition datasets to show the benefits of transfer learning in video classifiers. Previous studies had shown this for images . Also, they found that adding a temporal stream based on optical flow always improved performance. This idea of a network with a spatial stream for appearance and a temporal stream for motion had been first developed by. AI explainability techniques. Current AI explainability techniques on images can be largely categorized into two types: attribution and feature visualization . Attribution relates regions of a sample image to activations of units in the CNN, while feature visualization uncovers what kinds of inputs strongly activate a particular unit. One of the earlier and quite successful attribution approaches is called Sensitivity Analysis ). It is based on the idea that if a single pixel were marginally changed, the prediction would worsen significantly for an important pixel, but only slightly for less important ones. and showed simple ways of producing approximate relevance heatmaps. By occluding parts of an image one by one and observing the change in activation, they could measure the influence of different image regions. This allowed them to check whether the CNN focused on the important objects of the image or performed its classification only based on contextual information. The technique applied in this paper is called Deep Taylor Decomposition ), which arose from Layer-Wise Relevance Propagation . It has been put into use with text , speech , and only once with video data . It highlights the areas in a sample image which the CNN deems most relevant for making a correct classification. We assume that the relevance of a pixel is determined by how much the classification accuracy would deteriorate if we altered this pixel. DTD distributes relevance from the output layer to the input layer by applying specific propagation rules for each layer. This approach equals a first-order Taylor decomposition of the output function. The authors argue that it yields a better approximation of relevance than Sensitivity Analysis. included this technique in their "iNNvestigate" toolbox, which we used in our work. Apart from attribution techniques, CNNs can be explained using direct feature visualization approaches. They try to find intuitive representations of the patterns a given unit responds to particularly strongly or weakly. Among these are deconvolution networks , which are closely related to Sensitivity Analysis, and optimization approaches in the input domain . Also, instead of creating an abstract representation of features, one can select specific samples which highly activate or suppress a particular unit. even went a step further by hiding irrelevant parts of the input image, similar to LIME . Behavioral zebrafish research. As we argue in Section 1, zebrafish are a highly suitable model organism for the human body. They serve as the object of study in many fields, such as wound repair , visual processing in the brain (; ; ;), cancer research , and genetic modifications . Especially in neuroscientific research, understanding behavior and behavioral changes in response to cerebral interventions is of high importance . Given that prey movements can be clearly distinguished from other types of movements, hypothesized that there must be a dedicated circuitry in the zebrafish brain. They found a pathway from retinal ganglion cells to an area called AF7 projecting to the optic tectum, the nucleus of the medial longitudinal fasciculus, and the hindbrain, which in turn produces the characteristic motor output. They verified their findings by ablating the AF7 neuropil and observing that lesioned fish failed to respond to prey stimuli with a movement that a trained SVM would classify as prey. They have identified the following five features as the most discriminating ones, ordered by descending importance: In our work, we make use of the dataset they gathered for training their SVM and compare our CNN to the features above. We trained a Two-Stream CNN to distinguish prey and spontaneous swim bouts of larval zebrafish with short video samples. For data preparation, we first extracted standardized snippets from raw videos and then performed augmentation by subsampling, flipping, and cropping. After training, we computed heatmaps showing the regions of high relevance within frames 1. Data pre-processing. We used the raw video files recorded by with a high-speed camera at 300 frames per second and labeled as either spontaneous (0/negative, 56.1%) or prey (1/positive, 43.9%) bout. The heads of the fish were embedded in a substance called agarose to keep them steady. We turned the videos into grayscale, normalized them, and kept a crop of size 256x256 pixels from each frame, such that the right-most part of the bladder was central on the left, as shown in Figure 1. We did not include the head of the fish in the crop, because the eyes would give away information about the type of bout . More details in Appendix B. For correct centering we implemented a gamma correction with γ = exp (−skewness /param), (where param was tweaked to maximize detection performance (here param = 4.3)) and applied a binary threshold at value 3 to separate the bladder from the rest of the fish. Since the eyes might also fall under this threshold, we declared the right-most contour the bladder. Each raw video contained several bout events which we extracted as sequences of 150 frames ing in 1,214 video snippets. Each sequence started 15 frames before the actual bout motion was detected. Extension to the pre-processing procedure. After training and heatmap analysis, we found that the trained CNN had found a shortcut for classification by using agarose motion instead of tail features. We therefore extended our pre-processing procedure by setting squares of 85x85 pixels in the upper and lower left-hand corners of all frames plain white. While this cut away some of the tail tip in rare occasions, it ensured that bouts could not be classified based on the agarose motion anymore. Data augmentation. Our data augmentation procedure worked with batches of 32 videos with the original data randomly shuffled, allowing a decent approximation of the gradient during training with some inherent noise, which is generally desirable to avoid falling into sharp minima . The procedure performed three augmentation steps: first subsampling, then flipping, and cropping, which achieved augmentation factors of 8, 2, and 9 respectively, totaling 174,816 augmented samples. We decided to compute optical flow after subsampling, not before, in order to create differing augmented samples. All samples of an augmented batch were derived from different original videos to ensure a good gradient approximation during training. In the subsampling step, our algorithm randomly selected 86 out of 150 frames under the constraint that between two frames, no more than 2 frames may be omitted. This was to ensure meaningful flow calculation in the subsequent step, because the tail could move quite fast. After subsampling, for each video our procedure selected one of the 86 frames to be the input for the spatial network. Then we computed the optical flow ing in 85 flow frames with one x and y component each. They were stacked to 170 channels, alternating x and y. We used the optical flow algorithm by Farnebäck with parameters 2 detecting flow even when the tail moved fast. The procedure then generated 18 augmented batches from each subsampled batch by randomly flipping vertically CNN architecture and framework. Just like, we used a twostream network with an adapted CNN-M-2048 network for each stream, as depicted in Figure 2. As shown by , this network can deal with a small sample size and learns quickly. The spatial stream had one gray-scale channel and the temporal stream 170 flow channels in the first layer. After obtaining the predicted probabilities of each stream by calculating the log-softmax of the individual two outputs, they were fused by averaging. We computed the negative log-likelihood loss of this average, which can be interpreted as the joint log-probability of both streams, assuming their statistical independence. Our dataset was made up of 38 files, with 28, 4, and 6 files for training, validation, and test sets respectively. The individual sets were not shuffled during training in order to allow sequential reads, which might have decreased training time. Notwithstanding, batches consisted of random samples due to our augmentation procedure explained above. Initialization of weights. We initialized both streams with weights pre-trained on ImageNet 3. This has become a common initialization strategy in various classification tasks (; ;), due to the utility of general features learnt from natural images, such as edge detection. While did not pre-train flow, found a pre-trained temporal stream to reach superior performance. With this initialization we hoped that training would require only fine-tuning and therefore less data and fewer epochs. Specifically, for the weights of the input layer of the spatial stream we took the average of the pretrained weights of 3 RGB-channels to get the weights for 1 grayscale-channel. For the temporal stream we copied the RGB-channels 56 2 3 times to get 170 channels, and added uniform random noise to all of them. This was to ensure that the channels evolved differently during training and should aid learning. Regarding outputs, we averaged the pre-trained weights of 500 units on the output layer to obtain the weights of two output neurons, because we dealt with 2 classes instead of 1,000 as in ImageNet. Training procedure. We made use of the Adam optimizer with standard settings and tuned its learning rate and weight decay coefficient -the neural network equivalent of L2-regularization . Furthermore, we added a gamma learning rate scheduler which) every epoch. Our training framework computed accuracy on the validation set after each epoch to estimate generalization performance. Since we were initializing our CNN with weights learned from quite a different domain, fine-tuning was crucial. In particular, we performed a hyperparameter search over learning rate ({1e-3, 1e-4, 1e-5}) and weight decay ({1e-2, 1e-3, 1e-4}) using a smaller dataset and training for about 8 epochs. With the best hyperparameters we trained the CNN on the full dataset for 5 epochs. Relevance analysis with heatmaps. Making our CNN more transparent required an AI explainability technique which would be well interpretable in the optical flow domain of our temporal stream. We expected feature visualization approaches and was conveniently accessible in the "iNNvestigate" toolbox . For validation purposes, we additionally generated saliency maps ) and heatmaps from Guided BackProp . The produced relevance heatmaps could be expected to give clues about what specific regions of optical flow, within a frame and across frames, the network was paying attention to. Also, we simplified the analysis by splitting the network into its individual streams. This was possible because no weights were learned after the final layer of each stream. Once the network was initialized correctly, "iNNvestigate" made the generation of heatmaps surprisingly simple. Also, with about 50 minutes for the whole analysis it was quite fast even on CPU, because it effectively only needed one forward and backward pass per sample. We used a small dataset of 3,420 samples for analysis by setting the subsampling factor from 8 to 1, in order to simplify the process. We fine-tuned the training of our CNN to reach high accuracies in distinguishing prey bouts of larval zebrafish from spontaneous swims. Subsequently, we analyzed the learned weights by computing and averaging the relevance heatmaps of all samples grouped by class. We further define prey bouts as positive and spontaneous swims as negative. We performed a small hyperparameter search over learning rate and weight decay, which proved sufficient because all models were initialized with pre-trained weights from ImageNet. For our baseline SVM -detailed in Appendix A -we report the 5-fold cross-validated accuracy and the final accuracy on the held-out test set. The hyperparameters 4 agree with the ones found by. We further present the accuracies of the CNN used for heatmap analysis, as well as the best CNNs before and after removal of experimental artifacts on training, validation, and test sets in Table 1. For the test set we additionally report individual accuracies of the spatial and temporal streams. We highlight that the final CNN attains a test accuracy of 96.32%, which is 6.12% points better than the baseline. Relevance heatmaps. We used relevance heatmaps to visualize the regions the CNN pays most attention to when classifying a specific sample. We computed relevance averages across samples and frames, as well as split by class in Figure 3 for more comprehensive insights into the features learned by our CNN. Similar from other explainability techniques can be found in Appendix C. As expected, the heatmaps exhibit the checkerboard artifacts typical of kernels with stride 2 in the first convolutional layer . Steadiness of the fish's trunk as differentiating feature. First and foremost, the heatmaps show that our CNN is able to differentiate the movements of zebrafish based on their characteristic motion. Relevance is highly concentrated at the trunk, i.e. the rostral part of the tail, for both temporal and spatial stream. We observe a very sharp relevance pattern along the edges of the tail. This indicates that the pre-trained weights helped the network to look for edges. The CNN pays little to no attention to the end of the tail even though it is visible in most frames. Instead, it makes positive classifications by looking at the very start of the trunk. The heatmaps suggest that a calm and steady trunk indicates a prey bout. As for the negatives, the spread out relevance pattern reflects the high frequency of tail deflections typical of spontaneous bouts, which had been identified by before. This makes clear that the network is able to differentiate the movements of zebrafish to high accuracy based on their characteristic motion. "Clever Hans" predictions. CNNs are incredibly powerful at finding any kinds of correlations in the input data even if they are not related to the object of interest. have termed such spurious correlations "Clever Hans" predictions, because the model bases its prediction not on what we want it to focus on, but some unintended artifacts in the data. Figure 3 shows clearly that our CNN bases a significant number of its negative responses mainly on motion in the top left corner and focuses little on tail appearance and motion. This plays a role only in negative classifications and only in the temporal stream. While the heatmaps are vertically symmetric, as we would expect due to vertical flipping during augmentation, this is not true for the peculiar region in the top left corner. Figure 3 depicts the averaged heatmap after removing the artifacts in the top and bottom left hand corners and retraining our CNN. Relevance is now entirely focused on the tail. Relevance distribution across frames. Most relevance is concentrated on the frames in the range 7-46, as depicted in Figure 4. The first seven frames are of least importance. This is very likely because our pre-processing procedure added a buffer of 15 frames before each bout, suggesting that the network focuses on the range of frames which are in fact the most relevant ones. This further supports the hypothesis that our CNN is able to differentiate zebrafish movements based on their characteristic motion patterns. We trained a two-stream Convolutional Neural Network (CNN) on recordings of larval zebrafish to classify prey and spontaneous swim bouts. We then visualized the learned weights by generating relevance heatmaps showing which regions of the input the network focuses on while performing its classifications. We find that our CNN is capable of learning highly discriminating tail features. These features seem to be quite different from the ones used in the SVM classification by -the previous state-of-the-art in bout classification. The heatmaps further uncovered a "Clever Hans" type of correlation. After removing this spurious correlation and retraining the network, the network reached a test accuracy of 96.32%, which is 6.12% points better than the accuracy achieved by. Judging from the test accuracy, our CNN has learned better discriminating features than those used for the SVM by , and has thus beaten manual feature engineering in this application domain. Steadiness of the fish's trunk as differentiating feature. The relevance heatmaps and high accuracy show that the network achieves correct classifications by looking for salient features in the trunk of the tail while largely disregarding the tip. A sharp and clear relevance profile confined to the edges of the trunk gives a clear sign of a prey bout. The opposite speaks for a spontaneous bout. Here, attention spreads out to capture the strong vertical oscillation of the trunk. For this reason we conclude that the CNN makes its predictions based on the steadiness of the trunk. We believe our interpretation of learned features to be in line with existing research on the kinematics of prey bouts. As shown by and , prey bouts require fine control of the tail's axial kinematics to perform precise swim movements. Zebrafish noticeably reduce their yaw rotation and stabilize the positioning of their head to make a targeted move at their prey. Such precise movements are not required in spontaneous swim bouts. The heatmaps indicate that the network has found clear evidence for these kinds of motion in the trunk of the tail. Furthermore, we argue that the CNN has learned features which are very different from the ones identified by. All of their features -as outlined in Section 2 -, except the second one, rely on information from the tip of the tail and a complete sequence of frames. However, many optical flow frames do not depict the tip of the tail because of its small size and high speed. This might have happened due to suboptimal parameter settings which could not handle the sometimes long distances which the tip traveled between frames. Also, subsamples include only 85 of the original 150 frames for each video. Due to its higher performance, we conclude not only that the CNN has learned a different set of features, but also that these features must bear higher discriminative power. Origin of the "Clever Hans" correlation. The telltale motion in the top left corner stems from a substance called agarose, which the fish's head was embedded in to keep it steady. It is quite curious that, while not visible to human eyes, the agarose seems to be moving each time the fish performed a spontaneous swim bout, but not so for a prey bout. We speculate that this correlation was unintentionally introduced by the experimenters who might have tapped the petri dish to induce the fish to perform a spontaneous swim bout. Future work. Calculating and storing optical flow is expensive. If we attained similar performance on original frames, training would be considerably cheaper. While we can confirm the findings by that the spatial stream by itself reaches a fairly competitive accuracy, it provides only very minor improvement to the overall network. Yet, this stream is probably looking for very similar features as the temporal stream, because it focuses largely on the upper half of the tail, just like the temporal stream. If that is the case, we should see improved performance when giving the spatial stream a sequence of frames. It should be interesting to probe whether the spatial stream could then match or even surpass the performance of the temporal stream. Furthermore, CNNs such as the one used in this paper could be used to investigate brain recovery in larval zebrafish. It has been shown on a cellular level that zebrafish can heal their brain within days after a lesion. However, this needs to be proven on a behavioral level . Future work could perform a lesion study on the optic tectum in zebrafish , a brain region responsible for translating visual input into motor output. CNNs could then assess swim bouts of recovered fish and give a measure for potential behavioral changes. Insights from relevance heatmaps would be required if the CNN were not able not distinguish recovered fish from healthy ones. For each frame in the 1,214 videos, we applied the tail-fitting code developed by to compute points along the tail, as depicted in Figure S5. We initialized their procedure central and 8 pixels from the left edge, because after pre-processing we could assume this to be just next to the right end of the bladder. Some of the videos contained frames which the tail-fitting code had problems processing, possibly because the pre-processing procedure cut off the tip of the tail in these instances. This ed in 953 correctly processed videos, including 482 (50.6%) spontaneous and 471 (49.4%) prey bouts. We performed no augmentation here because this would not have benefited the SVM. The feature extraction and model fitting algorithm then split the set into 85% training and 15% held-out test sets. have identified 5 key features which allowed their SVM to achieve a cross-validation accuracy of 96%. They did not report on a held-out test set. We used their provided code to extract these features. Then we performed a grid-search to tune SVM-kernel, γ, and C 5. Just like we used stratified 5-fold cross-validation . Figure S6 gives an overview over the whole project pipeline. The figure includes a depiction of the raw data input, pre-processing, augmentation, CNN and SVM training, and heatmap analysis. Figure S7 summarizes the data augmentation procedure. All scripts worked with a seed of 462019. We used the openly available distributions of NumPy 1. 16.4 (van der), 5 RBF-kernel, γ ∈ {1e-1, 1e-2, 1e-3, 1e-4}, C ∈ {0.01, 0.1, 1, 10}; linear-kernel, C ∈ {0.01, 0.1, 1, 10}. Matplotlib 3.1.1 , tqdm 4.32.2 (da), OpenCV 4.1.0.25 , scikit-learn 0.21.2 , PyTorch 1.1.0 , h5py 2.9.0 , TensorFlow 1.14.0 , Keras 2.2.4 , and iNNvestigate 1.0.8 . Pre-processing. We aimed to center the fish's bladder on the left of each cropped frame. To achieve this, we applied a binary threshold at value 3, because after normalization and gamma correction the pixels of the bladder were separated mostly below this value. While the fish was quite light, the eyes as the second darkest part of the fish might still have fallen under this threshold. Therefore, we first detected all contours to discard tiny contours (< 0.01% of the whole frame) and then kept only the right-most contour. Since this had to be the bladder now, we could get the crop dimensions using the right-most pixel of that contour. Each raw video mainly consisted of a still fish interspersed with a few short bouts. These were the events we extracted into consecutive 150 frames each. The idea was to detect motion by checking the percentage of pixel value changes from one frame to the next, considering only the tail. We omitted pixels other than the tail with a simple binary threshold at value 200. The pixels had to change in our case at least 0.38% of the entire pixel range (height × width × 255) in order for motion to be detected. If the algorithm detected motion for a certain number of consecutive frames, it set this as the start of an event. Also, it added a preceding buffer of 15 frames. The end was set 150 frames from the start. If no motion was detected, we automatically took the first frame as a start. We had to take care that extracted videos did not overlap, i.e. in part contained identical frames, even if there were two or more distinct movements contained within 150 frames. This might have otherwise lead to train/test-contamination. Therefore, we discarded any detected motions which fell in the range of a previous video. One special case we did not take into account was when the start was less than 150 frames from the end of the file. We shifted the start back by just enough frames to fit it in, but this might have made it overlap with a previous video. Since this case was probably very rare and not detrimental, we have kept the code as it was. Data augmentation. We parallelized data augmentation with 38 workers, because optical flow calculation took roughly 14 seconds per subsample. We used a Dell PowerEdge R815 with four 16 core Opteron CPUs, 256 GB memory, and 4 TB of disk space (HDD). Furthermore, the ing hdf5-files were compressed with gzip-compression at maximum compression level. This outperformed lzf-copmression by a factor of 1.76 when comparing training times. This advantage can be ascribed to heavy parallelization of decompression and relatively low transfer speeds between hard drive and memory. Training procedure. We implemented PyTorch's Dataset module to make use of the multiprocessing capabilities of the DataLoader class on servers with 16-32 CPU cores and 4 GPUs (NVIDIA GTX1060 6 GB) each. This was necessary to achieve manageable epoch times. Relevance analysis with heatmaps. The toolbox "iNNvestigate" ) for analyzing the trained weights only supported Keras with the TensorFlow-backend. Therefore, we re-implemented the exact structure of our CNN and initialized it with the extracted weights from PyTorch. While the conversion could have been done with tools like ONNX, after a few unsuccessful attempts we transported the weights with a custom Python script. A caveat to the "iNNvestigate" toolbox emerged after heatmap generation: it had problems analyzing 1,578 of the 3,420 samples. These produced an empty output. We made sure the problematic samples did not follow any systematic pattern by checking the indices of correctly analyzed samples, the ratio of true positives and negatives and false positives and negatives, as well as the distribution of classification confidence after the analysis. Since all numbers were the same as before the analysis, we continued with 1,842 samples for further investigation. We generated saliency maps ) and Guided BackProp heatmaps analogous to the relevance heatmaps in Figures S8 and S9 for comparison with the more recent technique of DTD. It becomes apparent that these other two techniques allow similar insights, although slightly fuzzier. Importantly, they also uncover the "Clever Hans" prediction. Here, we depict the ten most informative consecutive flow frames of the single most confident true positive (Figure S10), true negative (Figure S11), false positive (Figure S12), and false negative (Figure S13) sample. Figure S15 summarizes the spatial heatmaps of the same samples. Moreover, we gather five particularly informative flow frames in Figure S14 and four spatial heatmaps in Figure S15. We performed a confidence analysis on the heatmaps which depicted the "Clever Hans" feature of agarose motion in the top left corner. We sorted all negative classifications by increasing confidence calculated as − log(log(P) /log(P)) for each sample. We then grouped and averaged the heatmaps over windows of 104 samples, as shown in Figure S16. The analysis uncovered that the more confident a negative classification, the more the CNN relied on tail features. This in turn indicated that the CNN was able to learn actual features on the tail and did not entirely rely on agarose motion. Also, it suggested that tail features were a better predictor than agarose motion.

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

We demonstrate the utility of a recent AI explainability technique by visualizing the learned features of a CNN trained on binary classification of zebrafish movements.

Represent the TLDR for finding the corresponding scientific article

Our paper analyses the tremendous representational power of networks especially with 'skip connections', which may be used as a method  for better generalization.