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

Question: Bayesian inference is used extensively to infer and to quantify the uncertainty in a field of interest from a measurement of a related field when the two are linked by a mathematical model. Despite its many applications, Bayesian inference faces challenges when inferring fields that have discrete representations of large dimension, and/or have prior distributions that are difficult to characterize mathematically. In this work we demonstrate how the approximate distribution learned by a generative adversarial network (GAN) may be used as a prior in a Bayesian update to address both these challenges. We demonstrate the efficacy of this approach by inferring and quantifying uncertainty in a physics-based inverse problem and an inverse problem arising in computer vision. In this latter example, we also demonstrate how the knowledge of the spatial variation of uncertainty may be used to select an optimal strategy of placing the sensors (i.e. taking measurements), where information about the image is revealed one sub-region at a time. Bayesian inference is a principled approach to quntify uncertainty in inverse problems that are constrained by mathematical model (Kaipio and Somersalo, Dashti and Stuart, Polpo et al. ). It has found applications in diverse fields such as geophysics (Gouveia and Scales, Martin et al., Isaac et al. ), climate modeling (Jackson et al. ), chemical kinetics ), heat conduction (Wang and Zabaras ), astrophysics (Loredo, Asensio Ramos et al. ), materials modeling (Sabin et al. ) and the detection and diagnosis of disease (Siltanen et al., Kolehmainen et al. ). The two critical ingredients of a Bayesian inference problem are -an informative prior representing the prior belief about the parameters and an efficient method for sampling from the posterior distribution. In this manuscript we describe how a deep generative model (generative adversarial networks (GANs)) can be used in these roles. In a typical inverse problem, we wish to infer a vector of parameters x ∈ R N from the measurement of a related vector y ∈ R P, where the two are related through a forward model y = f (x). A noisy measurement of y is denoted byŷ = f (x) + η, where η ∈ R P represents noise. While the forward map is typically well-posed, its inverse is not, and hence to infer x from the measurementŷ requires techniques that account for this ill-posedness. Classical techniques based on regularization tackle this ill-posedness by using additional information about the sought parameter field explicitly or implicitly (Tarantola ). Bayesian inference offers a different solution to this problem by modeling the unknown parameter and the measurements as random variables and allows for the characterization of the uncertainty in the inferred parameter field. For additive noise, the posterior distribution of x, determined using Bayes' theorem after accounting for the observationŷ is given by where Z is the prior-predictive distribution of y, p prior X (x) is the prior distribution of x, and p l (y|x) is the likelihood, often determined by the distribution of the error in the model, denoted by p η. Despite its numerous applications, Bayesian inference faces significant challenges. These include constructing a reliable and informative prior distribution from a collection of prior measurements denoted by the S = {x, · · ·, x (S) }, and efficiently sampling from the posterior distribution when the dimension of x is large. In this work we consider the use of GANs (Goodfellow et al. ) in addressing these challenges. These networks are useful in this role because of (a) they are able to generate samples of x from p gen X (x) while ensuring closeness (in an appropriate measure) between p gen X (x) and the true distribution, and (b) because they accomplish this by sampling from the much simpler distribution of the latent vector z, whose dimension is much smaller than that of x. Related work and our contribution: The main idea in this work involves training a GAN using the sample set S, and then using the distribution learned by the GAN as the prior distribution in Bayesian inference. This leads to a useful method for representing complex prior distributions and an efficient approach for sampling from the posterior distribution in terms of the latent vector z. The solution of inverse problems using sample-based priors has a rich history (see Vauhkonen et al., Calvetti and Somersalo for example). As does the idea of dimension reduction in parameter space, Lieberman et al. ). However, the use of GANs in these tasks is novel. Recently, a number of authors have considered the use machine learning-based methods for solving inverse problems. These include the use of convolutional neural networks (CNNs) to solve physics-driven inverse problems (Adler and Öktem, Jin et al., Patel et al. ), and GANs to solve problems in computer vision (Chang et al., Kupyn et al., Yang et al., Ledig et al., Anirudh et al., Isola et al., Zhu et al., Kim et al. ). There is also a growing body of work on using GANs to learn regularizers in inverse problems (Lunz et al. ) and in compressed sensing (Bora et al. [2017 (Bora et al. [, 2018, Kabkab et al., Wu et al., Shah and Hegde ). However, these approaches differ from ours in that they solve the inverse problem as an optimization problem and do not quantify uncertainty in a Bayesian framework. More recently, the approach described in (Adler and Öktem ) utilizes GANs in a Bayesian setting; however the GAN is trained to approximate the posterior distribution, and training is done in a supervised fashion with paired samples of the measurementŷ and the corresponding true solution x. Let z ∼ p Z (z) characterize the latent vector space and g(z) be the generator of a GAN trained using S. Then with infinite capacity and sufficient data, the generator learns the true distribution (Goodfellow et al. ). That is, p Here p Z is the multivariate distribution of the latent vector whose components are iid and typically conform to a Gaussian or a uniform distribution. Now consider a measurementŷ for which we would like to infer the posterior distribution of x. For this we use and set the prior distribution to be equal to the true distribution, that is p Using this it is easy to show that for any l(x), where E is the expectation operator, and Note that the distribution p post Z is the analog of p post X in the latent vector space. The measurement y updates the prior distribution for x to the posterior distribution; similarly, it updates the prior distribution for z, p Z, to the posterior distribution, p post Z. Equation implies that sampling from the posterior distribution for x is equivalent to sampling from the posterior distribution for z and transforming the sample through the generator g. That is, Since the dimension of z is typically smaller than that of x, and since the operation of the generator is typically inexpensive, this represents an efficient approach to sampling from the posterior of x. As mentioned in section 1, we wish to infer and characterize the uncertainty in the vector of parameters x from a noisy measurementŷ, where f is a known map that connects x and y. We also have several prior measurements of x, contained in the set S. To solve this problem we train a GAN with a generator g(z) on S, and then sample x from p post X (x|y) given in. Since GANs can be used to represent complex distributions efficiently, this algorithm provides a means of including complex priors that are defined by samples. It also leads to an efficient approach to sampling from p post X (x|y) since the dimension of z is typically smaller (10 1 -10 2) than that of x (10 4 -10 7). In Appendix A we describe approaches based on Monte-Carlo, Markov-Chain Monte-Carlo and MAP estimation for estimating population parameters of the posterior that make use of this observation. A problem motivated by physics We apply our approach to the problem of determining the initial temperature distribution of a solid from a measurement of its current temperature. The inferred field (x) is represented on a 32 2 grid on a square and the forward operator is defined by the solution of the time-dependent heat conduction problem with uniform conductivity. This operator maps the initial temperature to the temperature at time t = 1, and its discrete version is generated by approximating the time-dependent linear heat conduction equation using central differences in space and backward difference in time. It is assumed that the initial temperature is zero everywhere except in a rectangular region, and it is parameterized by the horizontal and vertical coordinates of two corners of the rectangular region and the value of the temperature field within it. 50,000 initial temperature fields sampled from this distribution are included in the sample set S used to train a Wasserstein GAN (WGAN-GP (Gulrajani et al. )) with an 8-dimensional latent space with batch size of 64 and learning rate of 0.0002. The target field we wish to infer is shown in Figure 1a. This field is passed through the forward map to generate the noise-free and the noisy versions (Gaussian with zero mean and unit variance) of the measured field shown in Figure 1b and 1c. We apply the algorithms developed in the previous section to probe the posterior distribution. We first use these to determine the MAP estimate for the posterior distribution of the latent vector (denoted by z map). The value of g(z map) is shown in Figure 1d. By comparing this with the true value of the inferred field, shown in Figure 1a, we observe that the MAP estimate is very close to the true value. This agreement is remarkable if we recognize that the ratio of noise to signal is around 30%, and also compare the MAP estimates obtained using an H 1 or an L 2 prior (see Figures 1e and 1f) with the true value. Figure 2: Iterative image recovery with very sparse measurements using uncertainty information: for each digit left most column represents true signal (x *) and its noisy version. The following columns represent the sparse measurement, the estimated MAP, and the estimated variance, respectively at each iteration. The red window in the variance map is the sub-region with maximum variance. Next, we consider the obtained by sampling from the MCMC approximation to the posterior distribution of z defined in. The MCMC approximation to the mean of the inferred field computed using is shown in Figure 1g. We observe that the edges and the corners of the temperature field are smeared out. This indicates the uncertainty in recovering the values of the initial field along these locations, which can be attributed to the smoothing nature of the forward operator especially for the higher modes. A more precise estimate of the uncertainty in the inferred field is provided by the variance of the inferred initial temperature at each spatial location. In Figure 1h we have plotted the point-wise standard deviation (square-root of the diagonal of co-variance) of the inferred fieldour metric of quantified uncertainty. We observe that it is largest along the edges and at the corners, where the forward operator has smoothed out the initial data, and thus introduced large levels of uncertainty in the location of these features. Additional examples of this inverse heat conduction problem with different target fields is shown in Appendix B. A problem in computer vision: Next we consider a problem in computer vision that highlights the utility of estimating the uncertainty in an inference problem: one of determining the noise-free version of an image from a noisy version of a sub-region of the image. In particular, we consider an iterative version of this problem, where one sub-region is revealed in each iteration, and the user is given the freedom to select this sub-region. We use a strategy that is based on selecting a region where the variance is maximum, and conclude that we arrive at a very good guess for the image in very few iterations. This task falls under active learning regime of machine learning and is useful when measurements are expensive. We use 55,000 images from the MNIST data set to train a WGAN-GP and use it as a prior in Bayesian inference. We select an image from the complementary set, add Gaussian noise with 0.8 variance, mask regions within this image, and use it to infer the original image. We utilize a forward map that is zero in the masked region and identity everywhere else. We begin by masking the entire image, and allow the user to select the sub-region (which is a square with edge length equal to 1/7th of the original image) in each iteration. We report when the user selects the sub-region with maximum variance as the sub-region to be revealed in the next iteration. For computing the variance we utilize the algorithm developed in this work. In Figure 2 we have shown the true image and from several iterations for two different MNIST digits from test set. For each iteration, we have shown the image that was used as measurement, the corresponding MAP and variance determined using our algorithms. We observe that in the 0 th iteration, when nothing is revealed in the measurement, the variance is largest in the center of the image where most digits assume different intensities. This leads to the user requesting a measurement in this region in the subsequent iteration. Thereafter, the estimated variance reduces with each iteration, and we converge to an image which is very close to the true image in very few iterations. Additional for MNIST and CelebA dataset are provided in Appendix B. Here we provide additional examples of iterative image recovery scheme described in section 3 for MNIST (figure 4) and CelebA (figure 6) dataset. We also compare the performance of this variance-driven iterative strategy to random sampling scheme, where the next sub-region is selected randomly (figure 5). Figure 6: Estimate of the MAP (3rd row), mean (4th row) and variance (5th row) from the limited view of a noisy image (2nd row) using the proposed method. The window to be revealed at a given iteration (shown in red box) is selected using a variance-driven strategy. Top row indicates ground truth. For all images additive Gaussian noise with variance=1 is used.

Using GANs as priors for efficient Bayesian inference of complex fields.

It's important to consider optimization in function space, not just parameter space. We introduce a learning rule that reduces distance traveled in function space, just like SGD limits distance traveled in parameter space.


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

Question: We argue that the widely used Omniglot and miniImageNet benchmarks are too simple because their class semantics do not vary across episodes, which defeats their intended purpose of evaluating few-shot classification methods. The class semantics of Omniglot is invariably “characters” and the class semantics of miniImageNet, “object category”. Because the class semantics are so similar, we propose a new method called Centroid Networks which can achieve surprisingly high accuracies on Omniglot and miniImageNet without using any labels at metaevaluation time. Our suggest that those benchmarks are not adapted for supervised few-shot classification since the supervision itself is not necessary during meta-evaluation. The Meta-Dataset, a collection of 10 datasets, was recently proposed as a harder few-shot classification benchmark. Using our method, we derive a new metric, the Class Semantics Consistency Criterion, and use it to quantify the difficulty of Meta-Dataset. Finally, under some restrictive assumptions, we show that Centroid Networks is faster and more accurate than a state-of-the-art learning-to-cluster method . Supervised few-shot classification, sometimes simply called few-shot learning, consists in learning a classifier from a small number of examples. Being able to quickly learn new classes from a small number of labeled examples is desirable from a practical perspective because it removes the need to label large datasets. Typically, supervised few-shot classification is formulated as meta-learning on episodes, where each episode corresponds to two small sets of labeled examples called support and query sets. The goal is to train a classifier on the support set and to classify the query set with maximum accuracy. The Omniglot and miniImageNet benchmarks have been heavily used to evaluate and compare supervised few-shot classification methods in the last few years (; ; ; ;). Despite their popularity and their important role in pioneering the few-shot learning field, we argue that the Omniglot and miniImageNet benchmarks should not be taken as gold standards for evaluating supervised few-shot classification because they rely on consistent class semantics across episodes. Specifically, Omniglot classes always correspond to alphabet characters, while miniImageNet classes always correspond to object categories as defined by the WordNet taxonomy . One consequence is that benchmarks with consistent class semantics have similar class semantics between meta-training and meta-evaluation 1. Therefore, they are too "easy" because they do not test the ability of supervised few-shot classification methods to adapt to new class semantics. From an applications perspective, being able to adapt to changing class semantics is a desirable feature. For instance, if the application is to organize users' personal photo gallery, different users might want to sort their personal photo gallery according to the different semantics, such as person identity, place or time. From a methodological perspective, we argue that supervised few-shot classification becomes an awkward task in the ideal case where the class semantics are perfectly consistent. Indeed, if the end goal of every episode is to classify the query set according to the same class semantics, do we even need the support set to define the classes, once the semantics are learned? Consider the characters below, extracted from the "Mongolian" alphabet of Omniglot. How would you group the characters below? This task is not particularly hard, even if the reader was never shown labeled examples prior to the task, simply because the reader was already familiar with the class semantics of interest (characters), and can generalize them to new classes. This simple observation suggests that when class semantics are consistent, few-shot learning algorithms might not actually need labels during metaevaluation. To show this, we introduce a new learning-to-cluster 2 method called Centroid Networks which achieves surprisingly high accuracies on Omniglot and miniImageNet without using any labels at meta-evaluation time. 3 The method is very similar to Prototypical Networks , but the key difference is that the labels of the support set can be reliably recovered through clustering whenever the cluster semantics are consistent across tasks. A harder benchmark would involve selecting different cluster semantics across episodes. For example, consider the following set of shapes: In this case, the task remains ambiguous because clustering semantics (e.g. shape, color, border style) have not been specified. To classify such a set requires either supervision, such as a labeled support set, or to somehow know the class semantics beforehand. Following that spirit, the Meta-Dataset, a collection of 10 datasets, was recently proposed as a harder and more realistic few-shot classification benchmark . Among other things such as variable numbers of ways and shots, a key difficulty of the Meta-Dataset is that class semantics vary across episodes, since episodes are generated from a randomly selected dataset. We propose to use Centroid Networks to benchmark how hard this dataset is. In particular, we suggest looking at the gap between the performance of Prototypical Networks and Centroid Networks, which we call the class semantics consistency criterion (CSCC). • We first show that Centroid Networks, our proposed approach to perform clustering without labels at meta-evaluation time, can beat a state-of-the-art learning-to-cluster method in the setting of a known number of equally-sized clusters, while being easier to train and orders of magnitude faster to run. • We show that it is possible to achieve surprisingly high accuracies on Omniglot and miniImageNet without using any labels at meta-evaluation time, using Centroid Networks. This is captured by our proposed metric, class semantics consistency criterion (CSCC), which is the first to quantify how easy a few-shot classification benchmark is. This highlights the need for harder benchmarks which actually test the ability of supervised few-shot classification methods to adapt to new class semantics • We report CSCC on the recently proposed Meta-Dataset, to assess whether it is indeed a harder benchmark for few-shot classification. Supervised clustering. Supervised clustering is defined in as "learning how to cluster future sets of items [...] given sets of items and complete clusterings over these sets". They use structured SVM to learn a similarity-metric between pairs of items, then run a fixed clustering algorithm which optimizes the sum of similarities of pairs in the same cluster. In follow-up work , they use K-Means as the clustering algorithm. A main difference with our work is that we learn a nonlinear embedding function, whereas they assume linear embeddings. The work of is also called supervised clustering, although they solve a very different problem. They propose a clustering algorithm which repetitively presents candidate clusterings to a "teacher" and actively requests feedback (supervision). Learning to cluster. Recent deep learning literature has preferred the term "learning to cluster" to "supervised clustering". Although the task is still the same, the main difference is the learning of a similarity metric using deep networks. Because of this aspect, these works are often classified as falling in the "metric learning" literature. Hsu et al. (2017; propose a Constrained Clustering Network (CCN) for learning to cluster based on two distinct steps: learning a similarity metric to predict if two examples are in the same class, and optimizing a neural network to predict cluster assignments which tend to agree with the similarity metric. CCNs obtained the state-of-the-art when compared against other supervised clustering algorithms, we will thus use CCN as a strong baseline. In our experiments, Centroid Networks improve over CCN on their benchmarks, while being simpler to train and computationally much cheaper. Semi-supervised & constrained clustering. Semi-supervised clustering consists of clustering data with some supervision in the form of "this pair of points should be/not be in the same cluster". Some methods take the pairwise supervision as hard constraints , while others (including CCN) learn metrics which tend to satisfy those constraints . See the related work sections in;. Supervised few-shot classification. For the unsupervised few-shot classification task, our method may be compared to the supervised few-shot classification literature (; ;). In particular, we have compared with Prototypical Networks , which was a source of inspiration for Centroid Networks. Our work is also related to follow-up work on Semi-Supervised Prototypical Networks , in which the support set contains both labeled and unlabeled examples. In this work, we go beyond by requiring no labels to infer centroids at evaluation time. Sinkhorn K-Means. The idea of formulating clustering as minimizing a Wasserstein distance between empirical distributions has been proposed several times in the past (a). explicit some theoretical links between K-Means and the Wasserstein-2 distance. The most similar work to Sinkhorn K-Means is Regularized Wasserstein-Means (b), but they use another method for solving optimal transport. Specifically using Sinkhorn distances 4 for clustering has even been suggested in. However, as we could not find an explicit description of the Sinkhorn K-Means anywhere in the literature, we coin the name and explicitly state the algorithm in Section 5.1. To our knowledge, we are the first to use Sinkhorn K-Means in the context of learning to cluster and to scale it up to more complex datasets like miniImageNet. Note that our work should not be confused with Wasserstein K-Means and similar variants, which consist in replacing the squared L 2 base-distance in K-Means with a Wasserstein distance. Meta-Learning and Unsupervised Learning. Finally, some recent work has explored combinations of unsupervised learning and meta-learning, to address various other tasks. propose a method to meta-train an unsupervised representation learning model that produces useful features for some given task. That is, at evaluation time, their method produces features without requiring labels, much like Centroid Networks produce centroids without requiring labels. The difference with their method thus lies in the addressed task: we focus on clustering, while they consider the task of representation/feature learning.; also considers the opposite: meta-learning that requires no labels for meta-training but that delivers methods that require labels to be run at evaluation time. Specifically, they propose unsupervised approaches to generate episodes for supervised few-shot classification, while we use supervised data to learn an unsupervised clustering algorithm. The main point of this paper is to discuss the class semantics consistency of few-shot classification benchmarks. Recall the visual examples from the introduction, where we asked the reader to cluster similar images together. The more consistent the class semantics are across episodes, the easier it should be to cluster them. Therefore, for the purpose of evaluating semantics consistency, we propose to consider additional categorization tasks for existing few-shot classification benchmarks. The most common categorization task is supervised few-shot classification, where episodes come with a small training (support) set S = (X S, Y S) and a small validation (query) set Q = (X Q, Y Q), where X S, X Q denote images or data, and Y S, Y Q the associated labels. The task is to predict labels for validation images X Q and the algorithm has access both to the support set images X S and labels Y S. Finally, the predicted labels are compared against Y Q, and the accuracy is returned. From now on we call this metric the supervised accuracy in order to distinguish it from the clustering and unsupervised accuracy introduced below. The task is to cluster the query 5 images X Q, without access to the support set X S, Y S. For evaluation, the predicted clusters are matched with the ground-truth clusters (which can be obtained from Y Q) by searching for the one-to-one ground-truth cluster/predicted cluster mapping (i.e. permutation) which in the highest accuracy. Finding the optimal permutation can be done efficiently using the Hungarian algorithm as described in. The ing accuracy is called the clustering accuracy. This is a common metric used in the literature on learning to cluster. See Figure 1 for an illustration. Few-shot clustering is the simplest clustering task defined here, and can be seen as an episodic version of the learning to cluster task. However, clustering accuracy cannot be meaningfully compared with supervised accuracy. On one hand, few-shot clustering is harder than supervised few-shot classification because the support set cannot be used. On the other hand, it may be easier because the query set is clustered jointly (vs. independent predictions for supervised few-shot classification). In particular, the 1-shot clustering is trivial because each point already belongs to its own cluster, whereas supervised 1-shot classification is not. Therefore, we propose the unsupervised few-shot classification task which is by construction strictly harder than supervised few-shot classification. Unsupervised Few-Shot Classification Task The task is to cluster the support set images X S then to associate each query set image x Q with one of the predicted clusters. For evaluation, the optimal permutation between predicted clusters and ground-truth clusters (which can be obtained from Y S) is found in order to maximize the corresponding support set accuracy. Then the unsupervised accuracy is computed after relabeling the query set predictions and comparing them with Y Q. Unsupervised accuracy can be compared with supervised accuracy because unsupervised is strictly harder than supervised few-shot classification (support set classes Y S are not available and need to be inferred). See Figure 2 for an illustration. We will use this metric to define our novel measure for the difficulty of few-shot learning benchmarks. Prototypical Networks or Protonets is one of the simplest and most accurate supervised few-shot classification methods. The only learnable component of Protonets is the embedding function h θ: X → Z which maps images to an embedding (feature) space. Given a supervised task T = (K, M, N, S labeled, Q) to solve, Protonets compute the average embedding (the prototype) of each class s i = j} on the support set. Each point from the query set is then classified according to the softmax of its squared distance p θ (y . Protonets are trained end-to-end by minimizing the log-loss on the query set. In this section, we describe our method and explain how it can be applied to few-shot clustering and unsupervised few-shot classification. Centroid Networks (or CentroidNets) consist of two modules: a trainable embedding module and a fixed clustering module. The fact that the only trainable component of Centroid Networks is the embedding function makes implementation and training very simple. The embedding module is the same as in Prototypical Networks and consists in a neural network h θ: X → Z which maps data (images) x to features z = h θ (x) in the embedding space. The clustering module takes as input the embedded data (z i) 1≤j≤N and outputs a set of centroids (c j) 1≤j≤K (representatives of each cluster) as well as the (soft) assignment p i,j of each point z i to each centroid. We use the Sinkhorn K-Means algorithm as our clustering module (Section 5.1). We propose Sinkhorn K-Means as the clustering module of Centroid Networks. It takes as input a set of N points x i ∈ R d (typically learned embeddings) and outputs a set of K centroids c j ∈ R d, similarly to K-Means, which can be used to cluster points. Sinkhorn K-Means is based on the Sinkhorn distance (or regularized Wasserstein), described more in depth in Appendix A.1. The differences between Sinkhorn and Regular K-Means, and their formulations as constrained optimization problems are discussed in Appendix B.1. In particular, we expect Sinkhorn K-Means to improve performance on the considered tasks (Section B.2). Step 1: Finding Centroids. We propose an Expectation-Maximization-style procedure to find the centroids which minimize the Sinkhorn distance (Section A.1) between the empirical distributions respectively defined by the data p(We alternate descent on assignments and centroids. Minimization in the assignments is a call to the Sinkhorn algorithm (Algorithm 1), instead of the usual greedy argmin for K-Means. Minimization in the centroids amounts to setting them equal to the weighted average of the points assigned to them. For simplicity, Algorithm 2 describes the procedure in the case where clusters are balanced (e.g. Omniglot and miniImageNet). Typically, we initialize centroids around zero and add a tiny bit of Gaussian noise to break symmetries. When clusters are not balanced but the cluster weights are known (e.g. Meta-Dataset), the weights can be passed to the Sinkhorn distance (see Algorithm 1). All details can be found in the code. Algorithm 1 Sinkhorn(x, c, γ) for Wasserstein-2 distance between empirical distributions. Update centroids c j to minimize cost end while Return centroids c and assignments p. Step 2: Clustering Points. Once the centroids are computed, we propose different ways to cluster the data points: • Softmax conditionals. The conditional probability of point i being assigned to centroid j is given by a softmax on their distance: We add an extra temperature parameter T > 0. Larger temperatures yield more uniform assignments. This is the way points are classified in Prototypical Networks. • Sinkhorn conditionals. The conditional probability of point i being assigned to centroid j is given by the optimal transport plan p i,j computed previously:. Although there is no temperature parameter to tune, the Sinkhorn algorithm has a regularization parameter γ > 0, which has a similar effect as the temperature, since using both are equivalent to rescaling the distance matrix ||h θ (x i) − c j || 2. Using Sinkhorn conditionals favors balanced clusters, but using Softmax conditionals provides no such guarantees. Given a few-shot clustering or unsupervised few-shot classificaiton episode, we embed the raw data z i = h θ (x i). Then, we cluster the support set in embedding space using Sinkhorn K-Means. Finally, we associate query set points with predicted clusters by finding their nearest-centroid in embedding space. We compute the clustering and unsupervised accuracies following Section 3.1. The most intuitive way to train Centroid Networks would be to train them end-to-end, by backpropagating through Sinkhorn K-Means, which contains two nested loops. Although this is technically possible after defining smoother versions of the clustering/unsupervised accuracies (by replacing the 0-1 loss with a cross-entropy), we did not have much success with this approach. Instead, we opt for the much simpler approach of training with a supervised surrogate loss. Since we have access to the ground-truth classes during meta-training, we can simply replace the centroids c j with the average of each class Then, we classify the query set points using either Softmax or Sinkhorn conditionals. Finally, we compute the log-loss on the query set and minimize it using gradient descent. 6 The supervised surrogate loss is very simple, as it removes both the need to find the optimal cluster-class permutation and the the need to backpropagate through Sinkhorn K-means. Center Loss. Additionally to the supervised surrogate loss, we use a center loss penalty . Center losses have been used in metric-learning methods to penalize the variance of each class in embedding space. See for instance where it is used in addition to the standard log-loss for learning discriminative face embeddings. Using a center loss makes sense because there is no obvious reason why the surrogate loss (basically a cross-entropy) by itself would make the classes more compact in embedding space. However, compact clusters is an implicit assumption of K-means and Sinkhorn K-means, which makes it essential for having good validation performance. We find experimentally that center loss helps improve clustering and unsupervised accuracies, at the cost of making supervised accuracy slightly worse (we don't use it for training Protonets). As a preliminary attempt to quantify how consistent class semantics are across episodes, we define the Class Semantics Consistency Criterion as the following ratio: where we define the supervised and unsupervised Bayes accuracies as the highest possible accuracies on a given supervised few-shot classification task and its associated unsupervised counterpart. Except for degenerate cases, the CSCC always varies between 0 (classes are totally inconsistent) and 1 (classes are totally consistent). In practice, we approximate the CSCC by replacing the Bayes accuracies with the supervised accuracy of Protonets and the unsupervised accuracy of Centroid Networks, but with the constraint that their backbone networks have exactly the same architecture. We point out that approximate CSCC is not rigorously defined and can potentially depend significantly on the chosen architecture and hyperparameters. However, we see it as a first step towards quantifying the difficulty of few-shot learning benchmarks. The motivations for introducing unsupervised Bayes accuracy and CSCC are discussed more in depth in Sections B.5 and B.4. We first confirm that Centroid Networks is a reasonable approach by comparing it against a stateof-the art few-shot clustering method (Section 6.1). Then, we attempt to use Centroid Networks to evaluate the difficulty (in terms of class semantic variability) of current few-shot learning benchmarks (Sections 6.2 and 6.3). In all cases, we train our method by minimizing the surrogate loss with Softmax conditionals combined with a center loss (both improve accuracies). Our method requires little to no tuning across datasets, and to show this, we run all experiments with the following default hyperparameters: temperature T = 1, sinkhorn regularization γ = 1, center loss of 1, and Sinkhorn-way 20-shot Acc. Few-shot Clustering (Clustering Accuracy) K-Means (raw features) 21.7%* CCN (KCL) 82.4%* CCN (MCL) 83.3%* Centroid Networks (ours, protonet arch.) 86.8%± 0.6% Centroid Networks (ours, CCN arch.) 86.6%± 0.6% Table 1: Top: Centroid Networks vs. K-Means on raw and Protonet features. Bottom: Test clustering accuracies on Omniglot evaluation set, using the Constrained Clustering Network splits (much harder than Ravi splits). Numbers with a star* are those reported in . We compared both using the Protonet Conv4 architecture and the architecture in (CCN), which has more filters. The differences between the two architectures are not significant. All our accuracy are averaged over 1000 test episodes with a fixed model, and are reported with 95% confidence intervals. Omni5-way 5-shot Omni 20-way 5-shot Acc. miniINet 5-way 5-shot Few-shot Clustering (Clustering Accuracy) K-Means (raw images) 45.2% ± 0.5% 30.7% ± 0.2% 41.4% ± 0.4% K-Means (Protonet features) 83.5% ± 0.8% 76.8% ± 0.4% 48.7% ± 0.5% Centroid Networks (ours) 99.6% ± 0.1% 99.1% ± 0.1% 64.5% ± 0.7% Table 2: Top: Few-shot clustering accuracies for Centroid Networks vs. K-Means on raw data and Protonet features. conditionals for training. The only exceptions are for Omniglot-CCN, where we take center loss weight equal to 0.1, and for the Meta-Dataset, for which we take γ = 0.1 and a center loss weight of 0.01. Please refer to the Appendix B.6 for an ablation study on the effect of each trick. We start with experiments designed to validate that Centroid Networks are a competitive approach to learning how to categorize examples without labels (an important assumption behind our proposed CSCC). [Table 1] For this, we consider the specific task of few-shot clustering and compare with Constrained Clustering Networks (;, a recent state-of-the art learning to cluster method, on the same task as them, which we will denote Omniglot-CCN. 7 Omniglot is resized to 32 × 32 and split into 30 alphabets for training ( set) and 20 alphabets for evaluation. The Omniglot-CCN task consists in clustering each alphabet of the evaluation set individually, after training on the set. This makes it a harder task than standard few-shot classification on Omniglot, because characters from the same alphabet are harder to separate (more fine-grained), and because the number of ways varies from 20 to 47 characters per set. We run Centroid Networks with all default hyperparameters, except a centroid loss of 0.1. The given in Table 1 show that Centroid Networks outperform all "flavors" of CCN by a margin (86.8% vs. 83.3% highest). Furthermore, Centroid Networks are also simpler and about 100 times faster than CCN, because they require to embed the data only once, instead of iteratively minimizing a KCL/MCL criterion. However, we wish to point out that Centroid Networks are less flexible than CCNs, as they require specifying the number of clusters and making an assumption on the sizes of the clusters (in our case, equal size). For this reason, CCNs are more appropriate for the general setting where such assumptions cannot be made. That said, Centroid Networks are particularly suited to our CSCC metric for few-shot classification benchmarks, as they are very efficient and otherwise require strictly less information than a supervised few-shot learning method would. Note that extending Centroid Networks to be as flexible as CCNs would be a promising direction for developing new learning-tocluster methods. Table 3: Using Centroid Networks to solve Omniglot and miniImageNet without using meta-testing labels (unsupervised few-shot classification). We compare the unsupervised test accuracy of centroid networks with the supervised test accuracy of Protonets. Centroid Networks can solve Omniglot almost perfectly (CSCC close to 100%), which suggests the class semantics are extremely consistent, while there is a small gap for miniImageNet (CSCC close to 80%), which suggests the class semantics are fairly consistent. Accuracy are averaged over 1000 test episodes with a fixed model, and are reported with 95% confidence intervals. [Table 2] We also compare Centroid Networks with two baselines on Omniglot and miniImageNet (standard splits, see Appendix A.2). We run K-Means with K-Means++ initialization directly on the raw images and show that it performs very poorly even on Omniglot, which confirms the importance of learning an embedding function. We also run K-Means on pretrained Protonet features, which is a more interesting comparison, since at the highest level, our method could be described as just clustering Protonet embeddings. It turns out that Centroid Networks still outperform K-Means on the embeddings by a substantial margin on both Omniglot (99.6% vs. 83.5% for 5-way) and miniImageNet (64.5% vs. 48.7%), which confirms the importance of combining Sinkhorn K-Means and the center loss trick. We now come to the main contribution of this work, which is to assess the difficulty of current few-shot learning benchmarks, using CSCC. [Table 3] We report the performance of CentroidNets on unsupervised few-shot classification tasks on Omniglot and miniImageNet. We also report the performance of Prototypical Networks for the standard supervised few-shot classification tasks. This comparison between the models is fair (Section B.3) even if they solve different tasks, because unsupervised few-shot classification is strictly harder than supervised few-shot classification (Section 3.1). Data splits and architectures are the same as in Protonets, and can be found in Section A.2 of the Appendix. 9 For Omniglot, CentroidNets achieves nearly the same accuracy as Prototypical Networks despite using none of the labels of the support set. The CSCCs of 0.99 are nearly equal to the maximum, which supports our hypothesis that Omniglot has nearly perfect class semantics consistency. For miniImageNet CentroidNets can still achieve an unsupervised accuracy of 55.3%, which is of the same order as the supervised accuracy of 68.7%, despite not using any labels from the support set. The CSCC of 0.80 is not as high as Omniglot but still suggests that there is still a fairly high amount of class semantics consistency. [Table 4] We use approximate CSCC to evaluate the difficulty of Meta-Dataset, under the two settings presented in: meta-train on ILSVRC and meta-train on all datasets. Traffic Sign and MSCOCO are evaluation-only datasets which are excluded from the meta-training. Meta-evaluation is done on all datasets. We use the same Resnet-18 architecture and hyperparam- Table 4: Using Centroid Networks to solve Meta-Dataset without using meta-testing labels (unsupervised few-shot classification) under the two originally proposed settings: training on ILSVRC, and training on all datasets except Traffic Sign and MSCOCO. We report supervised test accuracy for Prototypical Networks (reproduced from the official implementation), unsupervised test accuracy for Centroid Networks (ours), and approximate CSCCs (their ratio). All numbers are in percentages, all accuracies are averaged over 600 test episodes. eters for Protonets and CentroidNets, but CentroidNets is trained with an additional of center loss of 0.001 during meta-training. We pretrain on ILSVRC for the all datasets setting. The first observation is that supervised/unsupervised accuracies and approximate CSCCs, 10 are higher when training on all datasets instead of training on ILSVRC only, except for ILSVRC (since it is used in both trainings), Traffic Sign and MSCOCO. The fact that CSCC for Traffic Sign and MSCOCO is actually lower when training on more datasets either means that training on ILSVRC alone can sometimes be better for transfer learning, or is a consequence that the sampling scheme is not optimal . Aircraft (53%) and Omniglot (69%) are the ones that benefit the most from training on all datasets in terms of CSCCs. We compare approximate CSCCs inside each sub -table. 11 High CSCCs in the all datasets sub-table suggest that those datasets have very self-consistent class semantics: Omniglot and Aircraft both have very high CSCCs (more than 80%), while ILSVRC (57%) and Fungi (56%) have the lowest ones. It is less clear how to interpret the CSCCs in the only ILSVRC sub-table, but High CSCCs might suggest that those datasets have very similar class semantics with ILSVRC. Except Omniglot (69%), most datasets have fairly low CSCCs. It is interesting to note that some datasets higher CSCC than ILSVRC itself. We leave to future work to determine whether it means that ILSVRC is so inconsistent that it is easier to adapt to other datasets, or if it is a shortcoming of our metric. We proposed Centroid Networks for performing clustering without labels at meta-evaluation time, and with the idea of using it to assess the difficulty of few-shot classification benchmarks. First, we validate our method by beating a state-of-the-art few-shot clustering method in the setting of a known number of equally-sized clusters, with the advantage that our method is easier to train and orders of magnitude faster to run. Then, we define the CSCC metric from the unsupervised accuracy of Centroid Networks, and use it for quantifying the difficulty of current few-shot learning benchmarks in terms of class semantics consistency. We find that Omniglot has extremely consistent class semantics (CSCC close to 1), and that miniImageNet has fairly high CSCC as well (CSCC close to 0.8), which backs the intuition that its class semantics invariably correspond to object categories. Our on the Meta-Dataset benchmark show that it has much lower CSCCs than Omniglot in all settings, and lower CSCCs than miniImageNet in the ILSVRC only setting, which confirms that Meta-Dataset has harder and more diverse class semantics. As future work, we would like to improve the CSCC by making it more interpretable and less dependent on the backbone architectures. A APPENDIX: AND IMPLEMENTATION DETAILS A.1 SINKHORN DISTANCES The Wasserstein-2 distance is a distance between two probability masses p and q. Given a base distance d(x, x), we define the cost of transporting one unit of mass from x to x as d(x, x) 2. The Wasserstein-2 distance is defined as the cheapest cost for transporting all mass from p to q. When the transportation plan is regularized to have large entropy, we obtain Sinkhorn distances, which can be computed very efficiently for discrete distributions (entropy-regularization makes the problem strongly convex). Sinkhorn distances are the basis of the Sinkhorn K-Means algorithm, which is the main component of Centroid Networks. In Algorithm 1, we describe the Sinkhorn algorithm in the particular case where we want to transport mass from the weighted data points (x i, R j) to the weighted centroids (c j, C j), where R j and C j are the weights of the data points and centroids, respectively. In practice, we leverage the log-sum-exp trick in the to avoid numerical underflows. A.2 DATA SPLITS AND ARCHITECTURE FOR OMNIGLOT AND miniIMAGENET EXPERIMENTS For the embedding network for the Omniglot and miniImageNet, we reuse exactly the same simple convolutional architecture as in Prototypical Networks , which consists of four stacked blocks (2D convolution with 3 × 3 kernel and stride 1, BatchNorm, ReLU, and 2 × 2 max-pooling), the output of which is flattened. This in a 64-dimensional embedding for Omniglot and 1600-dimensional embedding for miniImageNet. For miniImageNet, we pretrain the embedding function using prototypical networks to solve 30-way problems instead of 5, which is the recommended trick in the paper . For the other settings, we train from scratch. Omniglot consists of a total of 1623 classes of handwritten characters from 50 alphabets, with 20 examples per class. Images are grayscale with size 28 × 28. We follow the same protocol as in Prototypical Networks and use the "Vinyals" train/validation/test splits. We consider 5-way 5-shot and 20-way 5-shot settings (15 query points per class). miniImageNet consists of 100 classes, each containing 600 color images of size 84 × 84. We follow the "Ravi" splits: 64 classes for training, 16 for validation, and 20 for testing. We consider the 5-way 5-shot setting (15 query points per class). We present our version of the Sinkhorn K-Means optimization problem, and compare it with regular K-Means. Both of them can be formulated as a joint minimization in the centroids c j ∈ R d (real vectors) and the assignments p i,j ≥ 0 (scalars) which specify how much of each point x i is assigned to centroid c j: • K-Means. Note that compared to the usual convention, we have normalized assignments p i,j so that they sum up to 1. where H(p) = − i,j p i,j log p i,j is the entropy of the assignments, and γ ≥ 0 is a parameter tuning the entropy penalty term. Sinkhorn vs. Regular K-Means. The first difference is that K-Means only allows hard assignments p i,j ∈ {0, 1 N}, that is, each point x i is assigned to exactly one cluster c j. On the contrary, the Sinkhorn K-Means formulation allows soft assignments p i,j ∈ [0, 1 N], but with the additional constraint that the clusters have to be balanced, i.e., the same amount of points are soft-assigned to each cluster i p i,j = 1 K. The second difference is the penalty term −γH(p) which encourages solutions of high-entropy, i.e., points will tend to be assigned more uniformly over clusters, and clusters more uniformly over points. Adding entropy-regularization allows us to compute p i,j very efficiently using the work of. Note that removing the balancing constraint i p i,j = 1 K in the Sinkhorn K-Means objective would yield a regularized K-Means objective with coordinate update steps identical to EM in a mixture of Gaussians (with p i,j updated using softmax conditionals). The ablation study in Section B.6 shows that using Sinkhorn K-Means instead of K-Means is the most decisive factor in improving performance. There are mainly two possible explanations: 1. Sinkhorn K-Means is particularly well adapted to the few-shot clustering and unsupervised few-shot classification problems because it strictly enforces the fact that the classes have to follow a given distribution (e.g. balanced), whereas K-Means does not. 2. Sinkhorn K-Means is likely to converge better than K-means due to the entropyregularization factor of the Sinkhorn distance. To illustrate the second point, consider the limit case where the regularization factor of Sinkhorn distance goes to infinity (γ → ∞). Then, the assignments in Sinkhorn K-Means become uniform (each cluster is assigned equally to all points), and all the centroids converge -in one step -to the average of all the points, reaching global minimum. This is by no means a rigorous proof, but the limit case suggests that Sinkhorn K-Means converges well for large enough γ. This behavior is to be contrasted with K-means, for which convergence is well known to depend largely on the initialization. One could argue that comparing CentroidNets with ProtoNets is unfair because using Sinkhorn KMeans leads to centroids which are weighted averages, whereas ProtoNet prototypes are restricted to be unweighted averages. Therefore, we run Centroid Networks on miniImagenet, but under the constraint that centroids to be unweighted averages of the data points. To do so, starting from the soft weights, we reassign each data point only to its closest centroid, and compute the unweighted averages. The comparison between ProtoNets and CentroidNets is now fair in the sense that both prototypes and centroids use unweighted averages. • Unsupervised accuracy on miniImagenet is 0.5508 ± 0.0072 for weighted average and 0.5497 ± 0.0072 for unweighted average. The difference is not significant. • Clustering accuracy on miniImagenet is 0.6421±0.0069 for weighted average and 0.6417± 0.0069 for unweighted average. The difference is also not significant. This experiment suggests that using weighted averages does not bring an unfair advantage, and therefore does not invalidate our comparison. More generally, instead of trying to tune ProtoNets and CentroidNets as well as possible, we try to make ProtoNets and CentroidNets more comparable by using the same architectures and representation. We define the unsupervised Bayes accuracy of an unsupervised few-shot classification task distribution as the highest achievable unsupervised accuracy. Just like the usual Bayes error is limited by label noise, the unsupervised Bayes accuracy is limited by cluster-semantic noise of a task. For illustration, consider the following unsupervised few-shot classification task distribution: 1. Uniformly sample a random dimension 1 ≤ j ≤ D (hidden to the algorithm) 2. Sample (iid, with probability 1/2) random binary vectors (x i) 1≤i≤D of dimension D (shown to the algorithm) and split them between support and query set. 3. Assign binary labels y = x j to each vector (x i) (hidden to algorithm). 4. The goal is to cluster the support set and associate query set points with the support clusters. Because the algorithm does not know which dimension j was sampled (i.e. the class semantic), it does not know how to cluster the support set. Therefore, it is just as good to make random predictions on the query set. Therefore the unsupervised Bayes accuracy is 0.5. Now, consider the same task distribution, except the dimension index j is always fixed to 1. After meta-training, the algorithm can learn a representation mapping each vector to the value of its first dimension only. The support set can be clustered by grouping all 1s together, and all 0s together. Each query point can then be unambiguously assigned to one of the clusters. The ing unsupervised Bayes accuracy is 1. Both task distributions would become equivalent if the algorithm had access to the class semantics j. Therefore, the two unsupervised few-shot tasks differ in difficulty only because of the uncertainty/variability on class semantics, and this is reflected in the difference in unsupervised Bayes accuracy. CSCC attempts to quantify the importance of the supervision information, which is not directly related to the difficulty of few-shot learning problem. Indeed, the difficulty of few-shot learning problems can come from many aspects, including but not limited to: • visual difficulty (how hard is it to train a classifier on all the classes at the same time) • class semantic consistency (how much do the class semantics vary) If the goal is to design meaningful benchmarks for supervised few-shot classification methods, it is important to understand which aspects make those benchmarks difficult. For instance, consider the limit case of a supervised few-shot classification task in which the same 5 classes are sampled over and over again. The visual difficulty might be extremely high (e.g. very fine-grained classification), which might lead people to believe that it is a good benchmark (because it is hard and all methods achieve low accuracies). However, because there is no variability at all in the class semantic consistency, such a benchmark does not evaluate at all the capacity of few-shot methods of adapting to new tasks. Our intent is not to introduce CSCC as a proxy for task difficulty (supervised accuracy of SOTA models might be fine for that purpose). Rather, we introduce the CSCC as an attempt to decouple the different axes of difficulty. Dividing the unsupervised Bayes accuracy by the supervised Bayes accuracy is a rough way of normalizing away the visual difficulty (which affects both supervised and unsupervised accuracies) and focusing on the supervision information only. We conduct an ablation study on Omniglot (5-way 5-shot) and miniImageNet (5-way 5-shot) to determine the effect and importance of the various proposed tricks and components: • K-Means vs. Sinkhorn K-Means. From comparing O3 to O4, O1 to O5, M6 to M7, M1 to M8, it appears that using Sinkhorn K-Means instead of K-Means++ is the most beneficial and important factor. • Center Loss. From comparing O2 to O3, O5 to O6, O4 to O8, M7 to M11, M8 to M9, center loss seems to be beneficial (although the significance is at the limit of the confidence intervals). It is the second most influential factor. • Softmax vs. Sinkhorn conditionals (at meta-training and meta-evaluation time). For training, it is not clear whether using Sinkhorn or Softmax conditionals is beneficial or not. For evaluation, from comparing M1 to M2, M3 to M4, M5 to M6, it seems that Sinkhorn conditionals are better if the metric is clustering accuracy, while Softmax conditionals might be better if the metric is unsupervised accuracy, although the effect seems to be negligible (see how the color patterns are inverted).

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

Omniglot and miniImageNet are too simple for few-shot learning because we can solve them without using labels during meta-evaluation, as demonstrated with a method called centroid networks

Pseudo-labeling has shown to be a weak alternative for semi-supervised learning. We, conversely, demonstrate that dealing with confirmation bias with several regularizations makes pseudo-labeling a suitable approach.


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

Question: We learn to identify decision states, namely the parsimonious set of states where decisions meaningfully affect the future states an agent can reach in an environment. We utilize the VIC framework, which maximizes an agent’s `empowerment’, ie the ability to reliably reach a diverse set of states -- and formulate a sandwich bound on the empowerment objective that allows identification of decision states. Unlike previous work, our decision states are discovered without extrinsic rewards -- simply by interacting with the world. Our show that our decision states are: 1) often interpretable, and 2) lead to better exploration on downstream goal-driven tasks in partially observable environments.

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

Identify decision states (where agent can take actions that matter) without reward supervision, use it for transfer.

represent the short summary for finding the corresponding scientific article (long).

We isolate one factor of RL generalization by analyzing the case when the agent only overfits to the observations. We show that architectural implicit regularizations occur in this regime.