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

Question: Meta learning has been making impressive progress for fast model adaptation. However, limited work has been done on learning fast uncertainty adaption for Bayesian modeling. In this paper, we propose to achieve the goal by placing meta learning on the space of probability measures, inducing the concept of meta sampling for fast uncertainty adaption. Specifically, we propose a Bayesian meta sampling framework consisting of two main components: a meta sampler and a sample adapter. The meta sampler is constructed by adopting a neural-inverse-autoregressive-flow (NIAF) structure, a variant of the recently proposed neural autoregressive flows, to efficiently generate meta samples to be adapted. The sample adapter moves meta samples to task-specific samples, based on a newly proposed and general Bayesian sampling technique, called optimal-transport Bayesian sampling. The combination of the two components allows a simple learning procedure for the meta sampler to be developed, which can be efficiently optimized via standard back-propagation. Extensive experimental demonstrate the efficiency and effectiveness of the proposed framework, obtaining better sample quality and faster uncertainty adaption compared to related methods. Meta learning is an important topic in modern machine learning. The goal is to learn some abstract concepts from different but related tasks, which can then be adapted and generalized to new tasks and environments that have never been encountered during training. There has been lots of research on this topic. A recent review classifies the methods as metric-based, model-based and optimization-based methods . Among these methods, learning-to-learn seeks to learn a meta optimizer that can be applied to different models, with some task-specific information such as current gradients as input . Model agnostic meta learning (MAML) aims to learn a meta parameter/model from a set of training tasks such that it can quickly adapt to models for new tasks . Many follow-up works have been proposed recently, including but not limited to the meta network , the meta learner , the Reptile model , and the lately extensions to an online setting , to model hierarchical relation and sequential strategies , and to its stable version and to some theoretical analysis . It is worth noting that all the aforementioned models are designed from an optimization perspective. Bayesian modeling, in parallel with optimization, has also been gaining increasing attention and found various applications in deep learning. Recent research has extended the above meta-learning methods to a Bayesian setting. For example, Bayesian MAML (BMAML) replaces the stochasticgradient-descent (SGD) step with Stein variational gradient descent (SVGD) for posterior sampling . Probabilistic MAML (PMAML) extends standard MAML by incorporating a parameter distribution of the adapted model trained via a variational lower bound . Amortized Bayesian Meta Learning extends the idea of MAML to amortized variational inference . VERSA uses an amortization network to approximate the posterior predictive distributions. Meta particle flow realizes Bayes's rule based on ODE neural operator that can be trained in a meta-learning framework. Though methodologically elegant with many interesting applications, the above methods lack the ability to uncertainty propagation/adaption, in the sense that uncertainty is either not considered (e.g., in MAML) or only considered in the specific task level (e.g., BMAML). This could slow down model adaption or even inaccurate uncertainty modeling when considering from a Bayesian modeling perspective. For example, suppose one is given samples from a set of Gaussians with different mean and covariance matrices, how can she/he efficiently leverage uncertainty in these samples to generate samples from a complex yet related distribution such as a Gaussian mixture? To tackle this problem, we propose to perform meta learning on the space of probability measures, i.e., instead of adapting parameters to a new task, one adapts a meta distribution to new tasks. When implementing distribution adaption in algorithms where distributions are approximated by samples, our distribution-adaptation framework becomes sample-to-sample adaption. In other words, the meta parameter in standard MAML becomes meta samples in our method, where uncertainty can be well encoded. For this reason, we call our framework Bayesian meta sampling. Specifically, we propose a mathematically elegant framework for Bayesian meta sampling based on the theory of Wasserstein gradient flows (WGF) . Our goal is to learn a meta sampler whose samples can be fast adapted to new tasks. Our framework contains two main components: a meta sampler and a sample adapter. For the meta sampler, we adopt the state-ofthe-art flow-based method to learn to transport noise samples to meta samples. Our meta sampler is parameterized by a neural inverse-autoregressive flow (NIAF), an extension of the recently developed neural autoregressive flows (NAFs) . The NIAF consists of a meta-sample generator and an autoregressive conditioner model, which outputs the parameters of the meta-sample generator. The NIAF takes some task-specific information (such as gradients of target distributions) and random noise as input and outputs meta samples from its generator. These meta samples are then quickly adapted to task-specific samples of target distributions by feeding them to the sample adapter. To ensure efficient and accurate adaptations to new task distributions, a novel optimal-transport Bayesian sampling (OP-sampling) scheme, based on Wasserstein gradient flows, is proposed as the adaptation mechanism of the sample adapter. The OP-sampling is general and can ensure samples to be adapted in a way that makes the sample density evolve to a target distribution optimally, thus endowing the property of fast uncertainty adaption. Finally, when one aims to perform specific tasks such as Bayesian classification with a task network, these samples are used to encode uncertainty into modeling. To this end, we further develop an efficient learning algorithm to optimize the task network based on variational inference. Extensive experiments are conducted to test the advantages of the proposed meta-sampling framework, ranging from synthetic-distribution to posterior-distribution adaption and to k-shot learning in Bayesian neural networks and reinforcement learning. Our demonstrate a better performance of the proposed model compared to related methods. Our model combines ideas from Bayesian sampling, Wasserstein gradient flows and inverseautoregressive flows. A detailed review of these techniques is provided in Section A of the Appendix. Overall idea of the proposed meta-sampling framework. The task is denoted with τ. The two components and specific inputs will be described in details. In meta sampling, one is given a set of related distributions, e.g., posterior distributions of the weights of a set of Bayesian neural networks (BNNs), each of which is used for classification on a different but related dataset. With our notation, each of the network and the related dataset is called a task, which is denoted as τ. Meta sampling aims to learn a meta sampler based on a set of training tasks so that samples from the meta sampler can be fast adapted to samples for an unseen new task. Our overall idea of the proposed Bayesian meta sampling is to mimic a hierarchical-sampling procedure but in a much more efficient way. Specifically, we propose to decompose meta sampling into two components: a meta sampler and a sample adapter. The meta sampler is responsible for generating meta samples that characterize common statistics of different tasks; The sample adapter is designed for fast adaptation of meta samples to task-specific target distributions. The meta sampler is parameterized as a conditional generator, and the sample adapter aggregates all local losses of different tasks to form a final loss for optimization based on optimal-transport theory. Our method allows gradients to be directly backpropagated for meta-sampler updates. The overall idea is illustrated in Figure 1. Comparisons with related works We distinguish our model with two mostly related works: the meta NNSGHMC and the probabilistic MAML (PMAML) . The main differences lie in two aspects: meta representation and model architecture. In terms of meta-model representation, our model adopts data/parameter samples, instead of determinstic parameters, as meta representation, and thus can be considered as a sample-to-sample adaption. Meta NNSGHMC uses samples on different tasks, there is no concept of meta samples. Finally, PMAML fully relies on variational inference whose representation power could be restricted. In terms of model architecture, our model adopts the state-of-the-art autoregressive architectures, which can generate high-quality meta samples. Furthermore, our model adopts a simpler way to define the objective function, which allows gradients to directly flow back for meta-sampler optimization. It is worth noting that our framework reduces to MAML when only one meta sample is considered for sample adaption. Since our methods aim for Bayesian sampling, it is more similar to meta NNSGHMC ; whereas MAML aims for point estimation of a model. Finally, we note that the recently proposed neural process might also be used for meta-learning "few-shot function regression" as stated in the original paper. However, to our knowledge, no specific work has been done for this purpose. Task network 5(⋅; 9) This section aims to design a meta sampler for efficiently generating meta samples. One idea is to use a nonparametric model to generate meta samples such as standard stochastic gradient MCMC (SG-MCMC) and the Stein variational gradient descent (SVGD) , where no parameters are consider in the model. However, methods under this setting are typically slow, and the generated samples are usually highly correlated. Most importantly, it would be hard to design nonparametric samplers that can share information between different tasks. As a , we propose to learn the meta sampler with a parametric model, which is also denoted as a generator. There are two popular options to parameterize the meta sampler: with an explicit generator or with an implicit generator. An explicit generator parameterizes the output (i.e., meta samples) as samples from an explicit distribution with a known density form such as Gaussian, thus limiting the representation power. In the following, we propose to adopt an implicit generator for the meta sampler based on neural inverse-autoregressive flows (NIAF), an inverse extension of the recently proposed NAF used for density estimation. As will be seen, NIAF can incorporate task-specific information into an implicit generator and generates samples in an autoregressive manner efficiently. Finally, meta samples are used in a task network to encode uncertainty for specific tasks such as Bayesian classification. The architecture of the meta sampler is illustrated in Figure 2. Note the idea of using NIAF to generate network parameter is similar to the hypernetwork . As an extention, perform inference on a lower dimensional latent space. Using hypernetworks to model posterior distributions have also been studied in . Neural inverse-autoregressive flows Directly adopting the NAF for sample generation is inappropriate as it was originally designed for density evaluation. To this end, we propose the NIAF for effective meta-sample generation. Specifically, let z k denote the k-th element of a sample z to be generated;z denotes a sample from last round; Γ denotes the task-specific information. In our case, we set Γ (z, ∇z log p(z)) with p(·) denoting the target distribution (with possible hidden parameters). NIAF generates the sample z = (z 1, · · ·, z k, · · ·) via an autoregressive manner, as: where {k} are noise samples; G(·, ·; φ φ φ) is an invertible function (generator) parameterized by φ φ φ and implemented as a DNN; and T is an autoregressive conditioner model to generate the parameters of the generator G at each step k, which is itself parameterized by ψ ψ ψ and implemented as a deep sigmoidal flow or a deep dense sigmoidal flow as in . According to , using strictly positive weights and strictly monotonic activation functions for G is sufficient for the entire network to be strictly monotonic, thus invertible. The original NAFs are not designed for drawing samples, as one needs the inverse function G −1, which is not analytically solvable when G is implemented as a neural network. Although it is stated in that G −1 can be approximated numerically, one needs repeated approximations, making it computationally prohibited. Our proposed NIAF is designed specifically for sample generation by directly transforming the noise with a flow-based network G. The task network In addition to the NIAF, a task network might be necessary for processing specific learning tasks. In particular, if one is only interested in generating samples from some target distribution, a task network is not necessary as the meta samples will be used to adapt to task-specific samples. However, if one wants to do classification with uncertainty, the task network should be defined as a classification network such as an MLP or CNN. In this case, denoting the weights of the task network as W, we consider the task network as a Bayesian neural network, and propose two ways of parameterization to encode uncertainty of meta samples into the task network: • Sample parameterization: A sample of the weights of the task network is directly represented by a meta sample from our meta sampler, i.e., W = (z 1, z 2, · · ·, z p) with p the parameter dimensionality. • Multiplicative parameterization: Adopting the idea of multiplicative normalizing flows , we define an inference network for the weights as the multiplication of z and a Gaussian variational distribution for W, i.e., the variational distribution is defined as the following semi-implicit distribution to approximate the true posterior distribution for W: Here and in the following, we consider the task network parameterized as a one-layer MLP for notation simplicity, although our method applies to all other network structures; and we have used NIAF({ k}, Γ) to denote the output of meta samples from the NIAF. Comparing the two parameterizations, sample parameterization directly generates weights of the task network from the meta sampler, thus is more flexible in uncertainty modeling. However, when the task network grows larger to deal with more complex data, this way of parameterization quickly becomes unstable or even intractable due to the high dimentionality of meta samples. Multiplicative parameterization overcomes this issue by associating each element of a meta sample with one node of the task network, reducing the meta-sample dimensionality from O(N in ×N out) to O(N in +N out) with N in and N out the input and output sizes of the task network. As a , we adopt the multiplicative parameterization when dealing with large-scale problems in our experiments. Efficient inference for these two cases will be described in Section 2.4. Note a recent work on NAF inference proposes to first sample from a mean-field approximating distribution, which are then transformed by an NAF to a more expressive distribution . However, the approach is hard to scale to very high dimensional problems, e.g., posterior distributions of network parameters. The output of the meta sampler contains shared (meta) information of all the tasks. Task-specific samples are expected to be adapted fast from these meta samples. This procedure is called sample adaption. Since there are potentially a large number of tasks, learning task-wise parametric models for sample adaption is impractical. Instead of using standard nonparametric samplers such as SG-MCMC or SVGD, we propose a general Bayesian sampling framework based on optimal-transport theory for new task-sample adaption, where back-propagation can be directly applied. A general Bayesian sampling framework based on optimal transport Let a task-specific target distribution be p τ (z), indexed by τ. A standard way is to adapt the samples based on a Markov chain whose stationary distribution equals p τ, e.g., via SG-MCMC. However, Markov-chain-based methods might not be efficient enough in practice due to the potentially highly-correlated samples (b). Furthermore, it is not obvious how to apply backpropagation (BP) in most of sampling algorithms. To deal with these problems, we follow Chen et al. (2018b) and view Bayesian sampling from the Wasserstein-gradient-flow perspective (discussed in Section A.2), i.e., instead of evolving samples, we explicitly evolve the underlying sample density functions. We will see that such a solution allows us to train the proposed meta sampler efficiently via standard BP. Considering our meta-learning setting. Since we aim to adapt meta samples to new tasks, it is reasonable to define the adaptation via task-wise WGFs, i.e., for each task, there is a WGF with a specific functional energy and the corresponding first variation, denoted respectively as E τ and F τ δEτ δρ with the task index τ. Here ρ denotes the underlying density of the samples. Consequently, ρ will evolve with a variant of the PDE by replacing E with E τ in equation 8 for each task. To solve the corresponding PDE, we prove Theorem 1 based on a discrete approximation of ρ with the evolved meta samples, which is termed optimal-transport Bayesian sampling (OT-Bayesian sampling). Theorem 1 (Optimal-Transport Bayesian Sampling) Let ρ t at time t be approximated by parti-. This is a useful to derive a learning algorithm for the meta sampler described in Section 2.4. Energy functional design Choosing an appropriate energy function E τ is important for efficient sample adaptation. To achieve this, the following conditions should be satisfied: i) E τ (ρ) should be convex w.r.t. ρ; ii) The first variation F τ could be calculated conveniently. A general and convenient functional family is the f -divergence, which is defined, with our notation and a convex function f: R → R such that f = 0, as: The f -divergence is a general family of divergence metric. With different functions f, it corresponds to different divergences including the popular KL divergence, inverse-KL divergences, and the Jensen-Shannon divergence. For more details, please refer to . A nice property of f -divergence is that its first variation endows a convenient form as stated in Proposition 2. * We use the bold letter z to denote the i-th meta sample evolved with equation 3 at time t (or equation 4 at iteration k). This should be distinguished from the normal unbold letter z k defined in Section 2.2.1, which denotes the k-th element of z. ρ (z) pτ (z). The first variation of the f -divergence endows the following form: In our experiments, we focus on the KL-divergence, which corresponds to f (r) = r log r. In this case, Since the density ρ(z) required in evaluating r is not readily available due to its implicit distribution, we follow Chen et al. (2018b) and use the meta samples {z (i) k } at the k-th step for approximation, ing in where κ(·, ·) is a kernel function. The number of adaptation steps k should be set based on problems. For tasks that vary significantly, a larger k should be chosen to ensure the quality of adapted samples. To further improve the accuracy, inspired by Chen et al. (2018b), we combine equation 5 with the first variation of SVGD, ing in the following form at iteration k: where λ ≥ 0 is a hyperparameter to balance the two terms. We first describe how to train the proposed model under the two kinds of parameterization of the task network defined in Section 2.2.1. Training in the sample-parameterization setting In this case, one only needs to optimize the conditional model T (·; ψ ψ ψ) as all parameters of other networks are directly generated. Specifically, because the energy functionals for each task τ are designed so that the minima correspond to the target distributions, the objective thus can be defined over the whole task distribution p(τ) as: For notation simplicity, we will not distinguish among the adapted samples (i.e., z (i) k ) for different tasks. Since the only parameter is ψ ψ ψ in the autoregressive conditioner model T (see Figure 2, and note the parameters φ φ φ and W for the meta generator and task network do not need to be learned as they are the outputs of T and G, respectively), its gradient can be directly calculated using chain rule: where " = " follows by the from Section 2.3 and ∇ z Training in the multiplicative-parameterization setting In this case, two sets of parameters are to be learned, ψ ψ ψ and W. Since ψ ψ ψ and W are decoupled, one can still optimize ψ ψ ψ by adopting the same update equation as in the sample-parameterization setting. For W, we follow and adopt variational inference. Specifically, we first augment the task network with an auxiliary network with a conditional likelihood; , with the inference network defined in, and writing the implicit distribution of z asq ψ ψ ψ (z) and the prior distribution of W as p(W), we arrive at the following ELBO: Different from , we only update (θ, φ φ φ) by optimizing the above ELBO; while leave the update of ψ ψ ψ with the gradient calculated in equation 7, which reflects gradients of samples from the NIAF. Note also that in the meta learning setting, the task network needs to be adapted for new tasks. This can be done by standard MAML with the above ELBO as the new-task objective. The whole algorithm is illustrated in Algorithm 1 in the Appendix. A similar ideas of multiplicative parametrization was proposed recently in , which used a compound density network to quantify the predictive uncertainty. New-task sample generation After training, samples for a new task can be directly generated by feeding the task information Γ and some noise to the meta sampler depicted in Figure 1. Typically, one needs to run a few numbers of sample-adaption steps to generate good samples for new tasks. Notably, the number of sample-adaption steps required to obtain good accuracy will be shown much less than simply starting a sampler from scratch in the experiments. We conduct a series of experiments to evaluate the efficiency and effectiveness of our model, and compare it with related Bayesian sampling algorithms such as SGLD, SVGD and SGHMC. The main compared algorithms for meta learning include the PMAML , Amortized Bayesian Meta-Learning (ABML) , and NNSGHMC , a recently proposed meta SG-MCMC algorithm. Inspired by , we denote our algorithm distribution agnostic meta sampling (DAMS). We first demonstrate our proposed NIAF-based sampler is able to generate more effective samples compared to the popular Bayesian algorithms such as SVGD, SGLD and SGHMC, in a non-meta-sampling setting. To this end, we apply standard Bayesian Logistic Regression (BLR) on several real datasets from the UCI repository: Australian (15 features, 690 samples), German (25 features, 1000 samples), Heart (14 features, 270 samples). We perform posterior sampling for BLR using our proposed sampler, as well as SVGD, SGLD, SGHMC. For a more detailed investigation of different components in our model, we also test the generator with different architectures, including generators with MLP (DAMS with MLP), IAF (DAMS with IAF), and NIAF (DAMS with NIAF). We follow and apply Gaussian priors for the parameters p 0 (w|α) = N (w; 0, α −1 I) with p 0 (α) = Gamma(α, 1, 0.01). A random selection of 80% data are used for training and the remaining for testing. The testing accuracies are shown in Table 1. It is observed that DAMS with NIAF achieves the best performance in terms of accuracy. The also indicate the effectiveness and expressiveness of the proposed NIAF architecture in the OT-Bayesian sampling framework. In this set of experiments, we aim to demonstrate the excellent meta-sample adaptability of our meta-sampling framework in different tasks. An additional synthetic experiment on meta posterior adaption is presented in Section D.3 of the Appendix. Gaussian mixture model We first conduct experiments to meta-sample several challenging Gaussian mixture distributions. We consider mixtures of 4, 6 and 20 Gaussians. Detailed distributional forms are given in the Appendix. To setup a meta sampling scenario, we use 2, 3 and 14 Gaussian components with different means and covariance, respectively, for meta-training of the meta sampler. After training, meta samples are adapted to samples from a target Gaussian mixture by following the new-task-sample-generation procedure described in Section 2.4. We plot the convergence of 1000 meta samples to a target distribution versus a number of particle (sample) updates (iterations), measured with the maximum mean discrepancy (MMD) evaluated by samples. For a fair comparison, we use the same number of samples (particles) to evaluation the MMD. The are shown in Figure 3. It is clear that our proposed meta sampler DAMS converges much faster and better than other sampling algorithms, especially on the most complicated mixture of 20-Gaussians. The reason for the fast convergence (adaption) is partially due to the learned meta sampler, which provides good initialization for sample adaption. This is further verified by inspecting how samples in the adaption process evolve, which are plotted in Figure 10, 11 and 12 in the Appendix. Finally, we test the proposed DAMS for meta sampling of BNNs on MNIST and CIFAR-10 . We follow the experimental setting in , and split the MNIST and CIFAR10 dataset into two parts for meta training and testing (sample adaption), respectively. As we focus on fast adaptation, we show the accuracy within 200 iterations. To deal with the high-dimensionality issue, we adopt the method of multiplicative parameterization proposed in Section 2.2.1. We randomly pick 5 classes for training, and the remaining classes for testing. A BNN is trained only on the training data for meta sample (weights of the BNN) generation, with each sample corresponding to a meta BNN. In testing, the meta BNNs are adapted based on the testing data. For the MNIST dataset, we parameterize a BNN as a CNN with two convolutional layers followed by a fully connected layer with 100 hidden units. The kernel sizes of the two conv layers are 3 and 16, respectively. A similar architecture is applied for the CIFAR10 dataset, but with 16 and 50 filters whose kernel sizes are 7 and 5 for the two convolutional layers, respectively. The hidden units of the fully connected layer is 300. a) Adaptation efficiency: For this purpose, we compare our model with NNSGHMC , as well as with a non-meta-learning method to train from scratch. To demonstrate the effectiveness of our NIAF structure for adaptive posterior sampling, we also compare it with the simple conditional version of MNF . For NNSGHMC and our DAMS, 20 meta samples are used in training. Figure 4 plots the learning curves of testing accuracy versus the number of iterations. It is clearly seen that our DAMS adapts the fastest to new tasks, and is able to achieve the highest classification accuracy on all cases due to the effectiveness of uncertainty adaption. To further demonstrate the superiority of DAMS over NNSGHMC, we list the test accuracy at different adaptation steps in Table 2. The clearly show faster adaption and higher accuracy of the proposed DAMS compared to NNSGHMC. It is also interesting to see that MNF, the non-meta learning method, performs better than NNSGHMC; while our method outperforms both, demonstrating the effectiveness of the proposed NIAF architecture. b) Sample efficiency: To demonstrate sample efficiency of our framework, we compare it with both NNSGHMC and the standard Bayesian learning of DNNs with SGHMC. To this end, we randomly select 5%, 20%, 30% of training data on CIFAR10 in a test task as training data for adaptation, and test on the same testing data. Figure 5 shows the corresponding test accuracies for different settings. It is observed that ours, the adaptation-based methods, obtain higher accuracies than the non-adaptive method of SGHMC. Furthermore, our method achieves the best sample efficiency among other methods. c) Uncertainty evaluation: Finally, we ablate study the uncertainty estimation of our, the standard SGHMC and NNSGHMC models in terms of test accuracy and negative loglikelihood. The on the CIFAR10 dataset are shown in Figure 6 and Table 3. We follow to evaluate uncertainty via entropy of out-of-sample predictive distributions (Figure 6 (right) ). We observe that uncertainty estimates with DAMS are better than others, since the probability of low entropy prediction is much lower than others. Details are given in Section D.4 of the Appendix. Following literature (; 2018), we further apply our framework for meta sampling of few-shot classification and reinforcement learning. Model agnostic meta sampling for few-shot image classification We apply our method on two popular few-shot image-classification tasks on the Mini-Imagenet dataset, consisting of 64, 16, and 20 classes for training, validation and testing, respectively. We compare our method with MAML and its variants with uncertainty modeling, including the Amortized Bayesian Meta-Learning (ABML) and Probabilistic MAML (PMAML) . To get a better understanding of each component of our framework, we also conduct an ablation study with three variants of our model: MAML-SGLD, MAML-SGHMC and DAMS-SGLD. MAML-SGLD and MAML-SGHMC correspond to the variants where SGLD and SGHMC are used to sample the parameters of the classifier, respectively; and DAMS-SGLD replaces the WGF component of DAMS-NIAF with SGLD. Follow the setting in (; 2018), the network architecture includes a stacked 4-layer convolutional feature extractor, followed by a meta classifier with one single fully-connected layer using the multiplicative parameterization. Testing are presented in Table 4. With our method, we observe significant improvement of the classification accuracy at an early stage compared with MAML. The learning curves are plotted in Figure 7, further demonstrating the superiority of our method, which can provide an elegant initialization for the classification network. Finally, from the ablation study, the suggest both the NIAF and the WGF components contribute to the performance gain obtained by our method. Meta sampling for reinforcement learning We next adapt our method for meta reinforcement learning. We test and compare the models on the same MuJoCo continuous control tasks as used in , including the goal velocity task and goal direction task for cheetah robots. For a fair comparison, we leverage the TRPO-RL framework for meta updating following MAML method. Specifically, we implement the policy network with two hidden layers with ReLu activation followed by a linear layer to produce the mean value of the Gaussian policy. The first hidden layer is a fully connected layer, and we adopt the multiplicative parameterization for the second hidden layer. As shown in Figure 8, our method obtains higher rewards compared with MAML on both tasks, indicating the importance of effective uncertainty adaptation in RL. We present a Bayesian meta-sampling framework, called DAMS, consisting of a meta sampler and a sample adapter for effective uncertainty adaption. Our model is based on the recently proposed neural autoregressive flows and related theory from optimal transport, enabling a simple yet effective training procedure. To make the proposed model scalable, an efficient uncertainty parameterization is proposed for the task network, which is trained by variational inference. DAMS is general and can be applied to different scenarios with an ability for fast uncertainty adaptation. Experiments on a series of tasks demonstrate the advantages of the proposed framework over other methods including the recently proposed meta SG-MCMC, in terms of both sample efficiency and fast uncertainty adaption. This section provides a review of on Bayesian sampling, Wasserstein gradient flows and autoregressive flows. Bayesian sampling has been a long-standing tool in Bayesian modeling, with a wide range of applications such as uncertainty modeling , data generation (; a) and reinforcement learning . Traditional algorithms include but are not limited to Metropolis-Hastings algorithm, importance sampling and Gibbs sampling . Modern machine learning and deep learning have been pushing forward the development of large-scale Bayesian sampling. Popular algorithms in this line of research include the family of stochastic gradient MCMC (SG-MCMC) and the Stein variational gradient descent (SVGD) . Recently, a particle-optimization sampling framework that unifies SG-MCMC and SVGD has also been proposed (b), followed by some recent developments (b; a). Generally speaking, all these methods target at sampling from some particular distributions such as the posterior distribution of the weights of a Bayesian neural network (BNN). On the other hand, meta learning is a recently developed concept that tries to learn some abstract information from a set of different but related tasks. A natural question by considering these two is: can we design meta sampling algorithms that learns to generate meta samples, which can be adapted to samples of a new task-specific distribution quickly? This paper bridges this gap by proposing a mathematically sound framework for Bayesian meta sampling. In optimal transport, a density function, ρ t, evolves along time t to a target distribution optimally, i.e., along the shortest path on the space of probability measures P(Ω), with Ω being a subset of R d. The optimality is measured in the sense that ρ t moves along the geodesic of a Riemannian manifold induced by a functional energy, E: P(Ω) → R, under the 2-Wasserstein distance metric. Formally, the trajectory of ρ t is described by the following partial differential equation (PDE): where ∂ zi f is the divergence operator; and F δE δρt (ρ t) is called the first variation of E at ρ t (functional derivative on a manifold in P(Ω)). To ensure ρ t to converge to a target distribution p such as the posterior distribution of the model parameters, one must design an appropriate E such that p = arg ρ min E(ρ). A common choice is the popular KL-divergence, KL(ρ, p). We will consider a more general setting in our framework presented later. Note the WGF framework equation 8 allows to view Bayesian sampling from a density-optimization perspective. For example, recent works (b; b; a) consider approximating ρ t with samples and evolve the samples according to equation 8. Parts of our model will follow this sampling setting. Our model relies on the concept of autoregressive flows for meta-sampler design. We review some key concepts here. More detailed comparisons are provided in the Appendix. A normalizing flow defines an invertible transformation from one random variable to another z. A flexible way to implement this is to define it via implicit distributions, meaning sample generation is implemented as: i ∼ q 0 (i), z i = G(i ; φ φ φ), where i indexes elements of and z; G represents a deep neural network (generator) parameterized by φ φ φ. The autoregressive flow (AF) parameterizes a Gaussian conditional distribution for each z i, e.g., p(z i | z 1:i−1) = N (z i |µ i, exp(α i)), where µ i = g µi (z 1:i−1) and α i = g αi (z 1:i−1) are outputs of two neural networks g µi and g αi. The sample generation process is: z i = i exp(α i) + µ i, with µ i = g µi (z 1:i−1), α i = g αi (z 1:i−1) and i ∼ N. Instances of autoregressive flows include the Autoregressive Flow (AF) and Masked Autoregressive Flow (MAF) . The inverse autoregressive flow (IAF) is an instance of normalizing flow that uses MADE , whose samples are generated as: The neural autoregressive flow (NAF) replaces the affine transformation used in the above flows with a deep neural network (DNN), i.e., t = f (z t, φ φ φ = T (z 1:t−1)), where f is a DNN transforming a complex sample distribution, p(z), to a simple latent representation q 0 . In NAF, q 0 is considered as a simple prior, and f is an invertible function represented by a DNN, whose weights are generated by T, an autoregressive conditional model. Let the induced distribution of by f be p f . f is learned by minimizing the KL-divergence between p f and q 0 . Note the µ i and α i are computed differently for AF and IAF, i.e., previous variables z 1:i−1 are used for AF and previous random noise 1:i−1 are used for IAF. AF can be used for calculating the density p(z) of any sample z in one pass of the network. However, drawing samples requires performing D sequential passes (D is the dimensionality of z). Thus if D is large, drawing samples will be computationally prohibited. IAF, by contrast, can draw samples and estimate densities of the generated samples with only one pass of the network. However, calculating the sample density p(z) requires D passes to find the corresponding noise. The advantage of NAF is that the mapping function f is much more expressive, and density evaluation is efficient. However, drawing samples is much more computationally expensive. To adopt the NAF framework for sampling, we propose the neural inverse-autoregressive flow (NIAF) in Section 2.2.1. Our algorithm in the multiplicative-parameterization setting includes updating the flow parameter and learning the task network with variational inference, which is described in Algorithm 1. Require: p(T): distribution over tasks; Require: α, β step size hyperparameter; randomly initialize θ, φ φ φ, ψ ψ ψ. while not done do Sample batch of tasks Compute adapted parameters with gradient descent: Proof For each task τ, we first write out the corresponding WGF as Note the WGF is defined in the sense of distributions , meaning that for any smooth real functions u(z) with compact support, equation 9 indicates Taking (z), and for each particle letting u(z) = z, equation 10 then reduces to the following differential equation for each particle: which is the particle evolution equation we need to solve. Proof [Proof of Proposition 2] First, we introduce the following from [page 120]: In the f-divergence case, this corresponds tof (ρ) = p τ f (ρ pτ). Applying Lemma 3 and using the chain rule, we have which completes the proof. This section provides extra experimental to demonstrate the effectiveness of our proposed method. Analytic forms of synthetic distributions are provided below. Mog4: Mog6: We apply our DAMS for fast adaptive sampling on regression tasks. We follow and apply DAMS to sample the posterior distribution of the frequency parameter of a sine-wave function, given only three data points. The sinewave function is defined as y(t) = sin(2πf t), with a uniform prior U and a Gaussian likelihood N (y i ; y f (t i), 0.125). We design a meta-sampling setting to adapt the posterior distributions, p(f |D) on the training data, to that on new test data. Specifically, meta training data (t, y) are {, (2/5, 0), (4/5, 0)}. For the first setting, meta testing consists of data {, (3/5, 0), (6/5, 0)}. For the second setting, meta testing consists of data {, (4/5, 0), (8/5, 0)}. Meta training data corresponds to a posterior with two modes of f ∈ {0.0, 5/4}. For the first setting, the test data corresponds to a posterior with three modes f ∈ {0.0, 5/6, 5/3}. For the second setting, the test data corresponds to four modes f ∈ {0.0, 5/8, 5/4, 15/8}. We compare our DAMS with the of re-training from scratch with the test data. Empirical distribution with samples and kernel density estimation are plotted in Figure 13. The first setting takes about 3.4K iterations to find the three modes in the posterior with re-training, while it takes about 0.8K iterations with meta adaptation. For the second setting, it takes Under review as a conference paper at ICLR 2020 Figure 11: Comparison among different samplers on adapting to Mixture of 20-Gaussian. Top to Bottom row: DAMS, SVGD, SGLD and NNSGHMC more than 3.6K iterations to find the four modes with training from scratch, while it is about 0.9K iterations with meta adaptation. For both test tasks, the sampler with re-training miss at least one mode compared with the meta sampler adaptation with the same number of iterations. We can see that DAMS can adapt the training posterior to the test posterior much faster than re-training from scratch due to effective uncertainty adaption, obtaining more than 3X speedups. We show the predictive uncertainty of DAMS compared to SGHMC and NNSGHMC by exploring the posterior of neural parameters, we estimate the uncertainty for out-of-distribution data samples. We train different algorithms on the MNIST dataset, and estimate the entropy of the predictive distribution on the notMNIST dataset. We follow and use the empirical CDF of entropy to evaluate the uncertainty. Since the probability of observing a high confidence prediction is low, curves that are nearer to the bottom right of the figure estimates uncertainty better. The predictive distribution of the trained model is expected to be uniform over the notMNIST digits as the samples from the dataset are from unseen classes. The BNN is a CNN with 16 and 50 filters whose kernel sizes are 5 and 5 for the two convolutional layers,

represent the tldr for finding the corresponding scientific article

We proposed a Bayesian meta sampling method for adapting the model uncertainty in meta learning

To solve the gradient vanishing/exploding problems, we proprose an efficient parametrization of the transition matrix of RNN that loses no expressive power, converges faster and has good generalization.


Question: Represent the article for finding a single-sentence TLDR

Question: We propose a context-adaptive entropy model for use in end-to-end optimized image compression. Our model exploits two types of contexts, bit-consuming contexts and bit-free contexts, distinguished based upon whether additional bit allocation is required. Based on these contexts, we allow the model to more accurately estimate the distribution of each latent representation with a more generalized form of the approximation models, which accordingly leads to an enhanced compression performance. Based on the experimental , the proposed method outperforms the traditional image codecs, such as BPG and JPEG2000, as well as other previous artificial-neural-network (ANN) based approaches, in terms of the peak signal-to-noise ratio (PSNR) and multi-scale structural similarity (MS-SSIM) index. The test code is publicly available at https://github.com/JooyoungLeeETRI/CA_Entropy_Model. Recently, artificial neural networks (ANNs) have been applied in various areas and have achieved a number of breakthroughs ing from their superior optimization and representation learning performance. In particular, for various problems that are sufficiently straightforward that they can be solved within a short period of time by hand, a number of ANN-based studies have been conducted and significant progress has been made. With regard to image compression, however, relatively slow progress has been made owing to its complicated target problems. A number of works, focusing on the quality enhancement of reconstructed images, were proposed. For instance, certain approaches BID4 BID17 BID24 have been proposed to reduce artifacts caused by image compression, relying on the superior image restoration capability of an ANN. Although it is indisputable that artifact reduction is one of the most promising areas exploiting the advantages of ANNs, such approaches can be viewed as a type of post-processing, rather than image compression itself. Regarding ANN-based image compression, the previous methods can be divided into two types. First, as a consequence of the recent success of generative models, some image compression approaches targeting the superior perceptual quality BID0 BID16 BID15 have been proposed. The basic idea here is that learning the distribution of natural images enables a very high compression level without severe perceptual loss by allowing the generation of image components, such as textures, which do not highly affect the structure or the perceptual quality of the reconstructed images. Although the generated images are very realistic, the acceptability of the machine-created image components eventually becomes somewhat applicationdependent. Meanwhile, a few end-to-end optimized ANN-based approaches (; BID1 BID18, without generative models, have been proposed. In these approaches, unlike traditional codecs comprising separate tools, such as prediction, transform, and quantization, a comprehensive solution covering all functions has been sought after using end-to-end optimization. 's approach exploits a small number of latent binary representations to contain the compressed information in every step, and each step increasingly stacks the additional latent representations to achieve a progressive improvement in quality of the reconstructed images. improved the compression performance by enhancing operation methods of the networks developed by . Although ; provided novel frameworks suitable to quality control using a single trained network, the increasing number of iteration steps to obtain higher image quality can be a burden to certain applications. In contrast to the approaches developed by and, which extract binary representations with as high an entropy as possible, BID1, BID18, and regard the image compression problem as being how to retrieve discrete latent representations having as low an entropy as possible. In other words, the target problem of the former methods can be viewed as how to include as much information as possible in a fixed number of representations, whereas the latter is simply how to reduce the expected bit-rate when a sufficient number of representations are given, assuming that the low entropy corresponds to small number of bits from the entropy coder. To solve the second target problem, BID1, BID18, and adopt their own entropy models to approximate the actual distributions of the discrete latent representations. More specifically, BID1 and BID18 proposed novel frameworks that exploit the entropy models, and proved their performance capabilities by comparing the with those of conventional codecs such as JPEG2000. Whereas BID1 and BID18 assume that each representation has a fixed distribution, introduced an input-adaptive entropy model that estimates the scale of the distribution for each representation. This idea is based on the characteristics of natural images in which the scales of the representations vary together in adjacent areas. They provided test that outperform all previous ANN-based approaches, and reach very close to those of BPG BID3, which is known as a subset of HEVC (ISO/IEC 23008-2, ITU-T H.265), used for image compression. One of the principle elements in end-to-end optimized image compression is the trainable entropy model used for the latent representations. Because the actual distributions of latent representations are unknown, the entropy models provide the means to estimate the required bits for encoding the latent representations by approximating their distributions. When an input image x is transformed into a latent representation y and then uniformly quantized intoŷ, the simple entropy model can be represented by pŷ(ŷ), as described by. When the actual marginal distribution ofŷ is denoted as m(ŷ), the rate estimation, calculated through cross entropy using the entropy model, pŷ(ŷ), can be represented as shown in equation FORMULA0, and can be decomposed into the actual entropy ofŷ and the additional bits owing to a mismatch between the actual distributions and their approximations. Therefore, decreasing the rate term R during the training process allows the entropy model pŷ(ŷ) to approximate m(ŷ) as closely as possible, and let the other parameters transform x into y properly such that the actual entropy ofŷ becomes small. DISPLAYFORM0 In terms of KL-divergence, R is minimized when pŷ(ŷ) becomes perfectly matched with the actual distribution m(ŷ). This means that the compression performance of the methods essentially depends on the capacity of the entropy model. To enhance the capacity, we propose a new entropy model that exploits two types of contexts, bit-consuming and bit-free contexts, distinguished according to whether additional bit allocation is required. Utilizing these two contexts, we allow the model to more accurately estimate the distribution of each latent representation through the use of a more generalized form of the entropy models, and thus more effectively reduce the spatial dependencies among the adjacent latent representations. FIG0 demonstrates a comparison of the compression of our method to those of other previous approaches. The contributions of our work are as follows:• We propose a new context-adaptive entropy model framework that incorporates the two different types of contexts.• We provide the test that outperform the widely used conventional image codec BPG in terms of the PSNR and MS-SSIM.• We discuss the directions of improvement in the proposed methods in terms of the model capacity and the level of the contexts. Note that we follow a number of notations given by because our approach can be viewed as an extension of their work, in that we exploit the same rate-distortion (R-D) optimization framework. The rest of this paper is organized as follows. In Section 2, we introduce the key approaches of end-to-end optimized image compression and propose the context-adaptive entropy model. Section 3 demonstrates the structure of the encoder and decoder models used, and the experimental setup and are then given in section 4. Finally, in Section 5, we discuss the current state of our work and directions for improvement. Since they were first proposed by BID1 and BID18, entropy models, which approximate the distribution of discrete latent representations, have noticeably improved the image compression performance of ANN-based approaches. BID1 assumes the entropy models of the latent representations as non-parametric models, whereas BID18 adopted a Gaussian scale mixture model composed of six weighted zero-mean Gaussian models per representation. Although they assume different forms of entropy models, they have a common feature in that both concentrate on learning the distributions of the representations without considering input adaptivity. In other words, once the entropy models are trained, the trained model parameters for the representations are fixed for any input during the test time., in contrast, introduced a novel entropy model that adaptively estimates the scales of the representations based on input. They assume that the scales of the latent representations from the natural images tend to move together within an adjacent area. To reduce this redundancy, they use a small amount of additional information by which the proper scale parameters (standard deviations) of the latent representations are estimated. In addition to the scale estimation, have also shown that when the prior probability density function (PDF) for each representation in a continuous domain is convolved with a standard uniform density function, it approximates the prior probability mass function (PMF) of the discrete latent representation, which is uniformly quantized by rounding, much more closely. For training, a uniform noise is added to each latent representation so as to fit the distribution of these noisy representations into the mentioned PMF-approximating functions. Using these approaches, achieved a state-of-the-art compression performance, close to that of BPG. The latent representations, when transformed through a convolutional neural network, essentially contain spatial dependencies because the same convolutional filters are shared across the spatial regions, and natural images have various factors in common within adjacent regions. successfully captured these spatial dependencies and enhanced the compression performance by input-adaptively estimating standard deviations of the latent representations. Taking a step forward, we generalize the form of the estimated distribution by allowing, in addition to the standard deviation, the mean estimation utilizing the contexts. For instance, assuming that certain representations tend to have similar values within a spatially adjacent area, when all neighborhood representations have a value of 10, we can intuitively guess that, for the current representation, the chance of having a value equal or similar to 10 is relatively high. This simple estimation will consequently reduce the entropy. Likewise, our method utilizes the given contexts for estimating the mean, as well as the standard deviation, of each latent representation. Note that ,, and BID15 also apply context-adaptive entropy coding by estimating the probability of each binary representation. However, these context-adaptive entropy-coding methods can be viewed as separate components, rather than one end-to-end optimization component because their probability estimation does not directly contribute to the rate term of the R-D optimization framework. FIG1 visualizes the latent variablesŷ and their normalized versions of the two different approaches, one estimating only the standard deviation parameters and the other estimating both the mu and standard deviation parameters with the two types of mentioned contexts. The visualization shows that the spatial dependency can be removed more effectively when the mu is estimated along with the given contexts. The optimization problem described in this paper is similar with, in that the input x is transformed into y having a low entropy, and the spatial dependencies of y are captured intô z. Therefore, we also use four fundamental parametric transform functions: an analysis transform g a (x; φ g) to transform x into a latent representation y, a synthesis transform g s (ŷ; θ g) to reconstruct imagex, an analysis transform h a (ŷ; φ h) to capture the spatial redundancies ofŷ into a latent representation z, and a synthesis transform h s (ẑ; θ h) used to generate the contexts for the model estimation. Note that h s does not estimate the standard deviations of the representations directly as in's approach. In our method, instead, h s generates the context c, one of the two types of contexts for estimating the distribution. These two types of contexts are described in this section. analyzed the optimization problem from the viewpoint of the variational autoencoder (Kingma & Welling FORMULA0 ; Rezende et al. FORMULA0), and showed that the minimization of the KL-divergence is the same problem as the R-D optimization of image compression. Basically, we follow the same concept; however, for training, we use the discrete representations on the conditions instead of the noisy representations, and thus the noisy representations are only used as the inputs to the entropy models. Empirically, we found that using discrete representations on the conditions show better , as shown in appendix 6.2. These might come from removing the mis-matches of the conditions between the training and testing, thereby enhancing the training capacity by limiting the affect of the uniform noise only to help the approximation to the probability mass functions. We use the gradient overriding method with the identity function, as in BID18, to deal with the discontinuities from the uniform quantization. The ing objective function used in this paper is given in equation. The total loss consists of two terms representing the rates and distortions, and the coefficient λ controls the balance between the rate and distortion during the R-D optimization. Note that λ is not an optimization target, but a manually configured condition that determines which to focus on between rate and distortion: DISPLAYFORM0 with R = E x∼px Eỹ,z∼q − log pỹ |ẑ (ỹ |ẑ) − log pz(z), DISPLAYFORM1 Here, the noisy representations ofỹ andz follow the standard uniform distribution, the mean values of which are y and z, respectively, when y and z are the of the transforms g a and h a, repectively. Note that the input to h a isŷ, which is a uniformly quantized representation of y, rather than the noisy representationỹ. Q denotes the uniform quantization function, for which we simply use a rounding function: DISPLAYFORM2 DISPLAYFORM3 The rate term represents the expected bits calculated using the entropy models of pỹ |ẑ and pz. Note that pỹ |ẑ and pz are eventually the approximations of pŷ |ẑ and pẑ, respectively. Equation FORMULA5 represents the entropy model for approximating the required bits forŷ. The model is based on the Gaussian model, which not only has the standard deviation parameter σ i, but also the mu parameter µ i. The values of µ i and σ i are estimated from the two types of given contexts based on the function f, the distribution estimator, in a deterministic manner. The two types of contexts, bit-consuming and bit-free contexts, for estimating the distribution of a certain representation are denoted as c i and c i. E extracts c i from c, the of transform h s. In contrast to c i, no additional bit allocation is required for c i. Instead, we simply utilize the known (already entropy-coded or decoded) subset ofŷ, denoted as ŷ. Here, c i is extracted from ŷ by the extractor E. We assume that the entropy coder and the decoder sequentially processŷ i in the same specific order, such as with raster scanning, and thus ŷ given to the encoder and decoder can always be identical when processing the sameŷ i. A formal expression of this is as follows: DISPLAYFORM4 DISPLAYFORM5 In the case ofẑ, a simple entropy model is used. We assumed that the model follows zero-mean Gaussian distributions which have a trainable σ. Note thatẑ is regarded as side information and it contributes a very small amount of the total bit-rate, as described by, and thus we use this simpler version of the entropy model, rather than a more complex model, for end-to-end optimization over all parameters of the proposed method: Note that actual entropy coding or decoding processes are not necessarily required for training or encoding because the rate term is not the amount of real bits, but an estimation calculated from the entropy models, as mentioned previously. We calculate the distortion term using the mean squared error (MSE) 1, assuming that p x|ŷ follows a Gaussian distribution as a widely used distortion metric. DISPLAYFORM6 This section describes the basic structure of the proposed encoder-decoder model. On the encoder side, an input image is transformed into latent representations, quantized, and then entropy-coded using the trained entropy models. In contrast, the decoder first applies entropy decoding with the same entropy models used for the encoder, and reconstructs the image from the latent representations, as illustrated in FIG2. It is assumed that all parameters that appear in this section were already trained. The structure of the encoder-decoder model basically includes g a and g s in charge of the transform of x into y and its inverse transform, respectively. The transformed y is uniformly quantized intoŷ by rounding. Note that, in the case of approaches based on the entropy models, unlike traditional codecs, tuning the quantization steps is usually unnecessary because the scales of the representations are optimized together through training. The other components between g a and g s carry out the role of entropy coding (or decoding) with the shared entropy models and underlying context preparation processes. More specifically, the entropy model estimates the distribution of eachŷ i individually, in which µ i and σ i are estimated with the two types of given contexts, c i and c i. Among these contexts, c can be viewed as side information, which requires an additional bit allocation. To reduce the required bit-rate for carrying c, the latent representation z, transformed fromŷ, is quantized and entropy-coded by its own entropy model, as specified in section 2.3. On the other hand, c i is extracted from ŷ, without any additional bit allocation. Note that ŷ varies as the entropy coding or decoding progresses, but is always identical for processing the sameŷ i in both the encoder and decoder, as described in 2.3. The parameters of h s and the entropy models are simply shared by both the encoder and the decoder. Note that the inputs to the entropy models during training are the noisy representations, as illustrated with the dotted line in FIG2, to allow the entropy model to approximate the probability mass functions of the discrete representations. We basically use the convolutional autoencoder structure, and the distribution estimator f is also implemented using convolutional neural networks. The notations of the convolutional layer follow: the number of filters × filter height × filter width / the downscale or upscale factor, where ↑ and ↓ denote the up and downscaling, respectively. For up or downscaling, we use the transposed convolution. For the networks, input images are normalized into a scale between -1 and 1. We use a convolutional neural networks to implement the analysis transform and the synthesis transform functions, g a, g s, h a, and h s. The structures of the implemented networks follow the same structures of, except that we use the exponentiation operator instead of an absolute operator at the end of h s. Based on's structure, we added the components to estimate the distribution of eachŷ i, as shown in FIG3. Herein, we represent a uniform quantization (round) as "Q," entropy coding as "EC," and entropy decoding as "ED." The distribution estimator is denoted as f, and is also implemented using the convolutional layers which takes channel-wise concatenated c i and c i as inputs and provides estimated µ i and σ i as . Note that the same c i and c i are shared for allŷ i s located at the same spatial position. In other words, we let E extract all spatially adjacent elements from c across the channels to retrieve c i and likewise let E extract all adjacent known elements from ŷ for c i. This could have the effect of capturing the remaining correlations among the different channels. In short, when M is the total number of channels of y, we let f estimate all M distributions ofŷ i s, which are located at the same spatial position, using only a single step, thereby allowing the total number of estimations to be reduced. Furthermore, the parameters of f are shared for all spatial positions ofŷ, and thus only one trained f per λ is necessary to process any sized images. In the case of training, however, collecting the from the all spatial positions to calculate the rate term becomes a significant burden, despite the simplifications mentioned above. To reduce this burden, we designate a certain number (32 and 16 for the base model and the hybrid model, respectively) of random spatial points as the representatives per training step, to calculate the rate term easily. Note that we let these random points contribute solely to the rate term, whereas the distortion is still calculated over all of the images. Because y is a three-dimensional array in our implementation, index i can be represented as three indexes, k, l, and m, representing the horizontal index, the vertical index, and the channel index, respectively. When the current position is given as (k, l, m), E extracts c To keep the dimensions of the estimation to the inputs, the marginal areas of c and ŷ are also set to zeros. Note that when training or encoding, c i can be extracted using simple 4×4×M windows and binary masks, thereby enabling parallel processing, whereas a sequential reconstruction is inevitable for decoding. Another implementation technique used to reduce the implementation cost is combining the lightweight entropy model with the proposed model. The lightweight entropy model assumes that the representations follow a zero-mean Gaussian model with the estimated standard deviations, which is very similar with Ballé et al. FORMULA0's approach. We utilize this hybrid approach for the top four cases, in bit-rate descending order, of the nine λ configurations, based on the assumption that for the higher-quality compression, the number of sparse representations having a very low spatial dependency increases, and thus a direct scale estimation provides sufficient performance for these added representations. For implementation, we separate the latent representation y into two parts, y 1 and y 2, and two different entropy models are applied for them. Note that the parameters of g a, g s, h a, and h s are shared, and all parameters are still trained together. The detailed structure and experimental settings are described in appendix 6.1.The number of parameters N and M are set to 128 and 192, respectively, for the five λ configurations for lower bit-rates, whereas 2-3 times more parameters, described in appendix 6.1, are used for the four λ configurations for higher bit-rates. Tensorflow and Python were used to setup the overall network structures, and for the actual entropy coding and decoding using the estimated model parameters, we implemented an arithmetic coder and decoder, for which the source code of the "Reference arithmetic coding" project 2 was used as the base code. We optimized the networks using two different types of distortion terms, one with MSE and the other with MS-SSIM. For each distortion type, the average bits per pixel (BPP) and the distortion, PSNR and MS-SSIM, over the test set are measured for each of the nine λ configurations. Therefore, a total of 18 networks are trained and evaluated within the experimental environments, as explained below:• For training, we used 256×256 patches extracted from 32,420 randomly selected YFCC100m BID19 ) images. We extracted one patch per image, and the extracted regions were randomly chosen. Each batch consists of eight images, and 1M iterations of the training steps were conducted, applying the ADAM optimizer (Kingma & Ba FORMULA0). We set the initial learning rate to 5×10 − 5, and reduced the rate by half every 50,000 iterations for the last 200,000 iterations. Note that, in the case of the four λ configurations for high bpp, in which the hybrid entropy model is used, 1M iterations of pre-training steps were conducted using the learning rate of 1×10 − 5. Although we previously indicated that the total loss is the sum of R and λD for a simple explanation, we tuned the balancing parameter λ in a similar way as BID18, as indicated in equation FORMULA8. We used the λ parameters ranging from 0.01 to 0.5. DISPLAYFORM0 • For the evaluation, we measured the average BPP and average quality of the reconstructed images in terms of the PSNR and MS-SSIM over 24 PNG images of the Kodak PhotoCD image dataset BID10. Note that we represent the MS-SSIM in the form of decibels, as in, to increase the discrimination. We compared the test with other previous methods, including traditional codecs such as BPG and JPEG2000, as well as previous ANN-based approaches such as BID18 and BalléFigure 5: Rate-distortion curves of the proposed method and competitive methods. The top plot represents the PSNR values as a of changes in bpp, whereas the bottom plot shows MS-SSIM values in the same manner. Note that MS-SSIM values are converted into decibels(−10 log 10 (1 − MS-SSIM)) for differentiating the quality levels, in the same manner as in. Because two different quality metrics are used, the are presented with two separate plots. As shown in figure 5, our methods outperform all other previous methods in both metrics. In particular, our models not only outperform's method, which is believed to be a state-of-the-art ANN-based approach, but we also obtain better than the widely used conventional image codec, BPG.More specifically, the compression gains in terms of the BD-rate of PSNR over JPEG2000,'s approach (MSE-optimized), and BPG are 34.08%, 11.97%, and 6.85%, respectively. In the case of MS-SSIM, we found wider gaps of 68.82%, 13.93%, and 49.68%, respectively. Note that we achieved significant gains over traditional codecs in terms of MS-SSIM, although this might be because the dominant target metric of the traditional codec developments have been the PSNR.In other words, they can be viewed as a type of MSE-optimized codec. Even when setting aside the case of MS-SSIM, our can be viewed as one concrete evidence supporting that ANN-based image compression can outperform the existing traditional image codecs in terms of the compression performance. Supplemental image samples are provided in appendix 6.3. Based on previous ANN-based image compression approaches utilizing entropy models BID1 BID18, we extended the entropy model to exploit two different types of contexts. These contexts allow the entropy models to more accurately estimate the distribution of the representations with a more generalized form having both mean and standard deviation parameters. Based on the evaluation , we showed the superiority of the proposed method. The contexts we utilized are divided into two types. One is a sort of free context, containing the part of the latent variables known to both the encoder and the decoder, whereas the other is the context, which requires additional bit allocation. Because the former is a generally used context in a variety of codecs, and the latter was already verified to help compression using's approach, our contributions are not the contexts themselves, but can be viewed as providing a framework of entropy models utilizing these contexts. Although the experiments showed the best in the ANN-based image compression domain, we still have various studies to conduct to further improve the performance. One possible way is generalizing the distribution models underlying the entropy model. Although we enhanced the performance by generalizing the previous entropy models, and have achieved quite acceptable , the Gaussian-based entropy models apparently have a limited expression power. If more elaborate models, such as the non-parametric models of or BID11, are combined with the context-adaptivity proposed in this paper, they would provide better by reducing the mismatch between the actual distributions and the approximation models. Another possible way is improving the level of the contexts. Currently, our methods only use low-level representations within very limited adjacent areas. However, if the sufficient capacity of the networks and higher-level contexts are given, a much more accurate estimation could be possible. For instance, if an entropy model understands the structures of human faces, in that they usually have two eyes, between which a symmetry exists, the entropy model could approximate the distributions more accurately when encoding the second eye of a human face by referencing the shape and position of the first given eye. As is widely known, various generative models BID5 BID13 BID25 learn the distribution p(x) of the images within a specific domain, such as human faces or bedrooms. In addition, various in-painting methods BID12 BID22 BID23 learn the conditional distribution p(x | context) when the viewed areas are given as context. Although these methods have not been developed for image compression, hopefully such high-level understandings can be utilized sooner or later. Furthermore, the contexts carried using side information can also be extended to some high-level information such as segmentation maps or any other information that helps with compression. Segmentation maps, for instance, may be able to help the entropy models estimate the distribution of a representation discriminatively according to the segment class the representation belongs to. Traditional codecs have a long development history, and a vast number of hand-crafted heuristics have been stacked thus far, not only for enhancing compression performance, but also for compromising computational complexities. Therefore, ANN-based image compression approaches may not provide satisfactory solutions as of yet, when taking their high complexity into account. However, considering its much shorter history, we believe that ANN-based image compression has much more potential and possibility in terms of future extension. Although we remain a long way from completion, we hope the proposed context-adaptive entropy model will provide an useful contribution to this area. The structure of the hybrid network for higher bit-rate environments. The same notations as in the figure 4 are used. The representation y is divided into two parts and quantized. One of the ing parts,ŷ 1, is encoded using the proposed model, whereas the other,ŷ 2, is encoded using a simpler model in which only the standard deviations are estimated using side information. The detailed structure of the proposed model is illustrated in FIG3. All concatenation and split operations are performed in a channel-wise manner. We combined the lightweight entropy model with the context-adaptive entropy model to reduce the implementation costs for high-bpp configurations. The lightweight model exploits the scale (standard deviation) estimation, assuming that the PMF approximations of the quantized representations follow zero-mean Gaussian distributions convolved with a standard uniform distribution. FIG5 illustrates the network structure of this hybrid network. The representation y is split channel-wise into two parts, y 1 and y 2, which have M 1 and M 2 channels, respectively, and is then quantized. Here,ŷ 1 is entropy coded using the proposed entropy model, whereasŷ 2 is coded with the lightweight entropy model. The standard deviations ofŷ 2 are estimated using h a and h s. Unlike the context-adaptive entropy model, which uses the of h a (ĉ) as the input source to the estimator f, the lightweight entropy model retrieves the estimated standard deviations from h a directly. Note that h a takes the concatenatedŷ 1 andŷ 2 as input, and h s generatesĉ as well as σ 2, at the same time. The total loss function also consists of the rate and distortion terms, although the rate is divided into three parts, each of which is forŷ 1,ŷ 2, andẑ, respectively. The distortion term is the same as before, but note thatŷ is the channel-wise concatenated representation ofŷ 1 andŷ 2: DISPLAYFORM0 with R = E x∼px Eỹ 1,ỹ2,z∼q − log pỹ 1|ẑ (ỹ 1 |ẑ) − log pỹ 2 |ẑ (ỹ 2 |ẑ) − log pz(z), DISPLAYFORM1 Here, the noisy representations ofỹ 1,ỹ 2, andz follow a standard uniform distribution, the mean values of which are y 1, y 2, and z, respectively. In addition, y 1 and y 2 are channel-wise split representations from y, the of the transform g a, and have M 1 and M 2 channels, respectively: DISPLAYFORM2 with y 1, y 2 = S(g a (x; φ g)),ŷ = Q(y 1) ⊕ Q(y 2), z = h a (ŷ; φ h).The rate term forŷ 1 is the same model as that of equation FORMULA5. Note thatσ 2 does not contribute here, but does contribute to the model forŷ 2: DISPLAYFORM3 DISPLAYFORM4 The rate term forŷ 2 is almost the same as, except that noisy representations are only used as the inputs to the entropy models for training, and not for the conditions of the models. DISPLAYFORM5 The model of z is the same as in equation FORMULA7. For implementation, we used this hybrid structure for the top-four configurations in bit-rate descending order. We set N, M 1, and M 2 to 400, 192, and 408, respectively, for the top-two configurations, and to 320, 192, and 228, respectively, for the next two configurations. In addition, we measured average execution time per image, spent for encoding and decoding Kodak PhotoCD image dataset BID10, to clarify benefit of the hybrid model. The test was conducted under CPU environments, Intel i9-7900X. Note that we ignored time for actual entropy coding because all models with the same values of N and M spend the same amount of time for entropy coding. As shown in figure 7, the hybrid models clearly reduced execution time of the models. Setting N and M to 320 and 420, respectively, we obtained 46.83% of speed gain. With the higher number of parameters, 400 of N and 600 of M, we obtained 57.28% of speed gain. In this section, we provide test of the two models, the proposed model trained using discrete representations as inputs to the synthesis transforms, g s and h s, and the same model but trained using noisy representations following the training process of's approach. In detail, in training phase of the proposed model, we used quantized representationsŷ andẑ as inputs to the transforms g s and h s, respectively, to ensure the same conditions of training and testing phases. On the other hand, for training the compared model, representationsỹ andz are used as inputs to the transforms. An additional change of the proposed model is usingŷ, instead of y, as inputs to h a, but note that this has nothing to do with the mismatches between training and testing. We used them to match inputs to h a to targets of model estimation via f. As shown in figure 8, the proposed model, trained using discrete representations, was 5.94% better than the model trained using noisy representations, in terms of the BD-rate of PSNR. Compared with's approach, the performance gains of the two models, trained using discrete representations and noisy representations, were 11.97% and 7.20%, respectively.

Represent the TLDR for finding the corresponding scientific article:

Context-adaptive entropy model for use in end-to-end optimized image compression, which significantly improves compression performance

This work aims to provide quantitative answers to the relative importance of concepts of interest via concept activation vectors (CAV). In particular, this framework enables non-machine learning experts to express concepts of interest and test hypotheses using examples (e.g., a set of pictures that illustrate  the concept). We show that CAV can be learned given a relatively small set of examples. Hypothesis testing with CAV can answer whether a particular concept (e.g., gender) is more important in predicting a given class (e.g., doctor) than other sets of concepts. Interpreting networks with CAV does not require any retraining or modification of the network.