R ESOLVING LABEL UNCERTAINTY WITH IMPLICIT GENERATIVE MODELS
Anonymous authors
Paper under double-blind review
A BSTRACT
In prediction problems, coarse and imprecise sources of input can provide rich information about labels, but are not readily used by discriminative learners.
In this work, we propose a method for jointly inferring labels across a collection of data samples, where each sample consists of an observation and a prior belief about the label.
By implicitly assuming the existence of a generative model for which a differentiable predictor is the posterior, we derive a training objective that allows learning under weak beliefs.
This formulation uniﬁes various machine learning settings: the weak beliefs can come in the form of noisy or incomplete labels, likelihoods given by a different prediction mechanism on auxiliary input, or common-sense priors reﬂecting knowledge about the structure of the problem at hand.
We demonstrate the proposed algorithms on diverse problems: classiﬁcation with negative training examples, learning from rankings, weakly and selfsupervised aerial imagery segmentation, co-segmentation of video frames, and coarsely supervised text classiﬁcation.
I NTRODUCTION
We consider the problem of joint inference of latent label variables ℓ 𝑖 in a collection of data samples indexed by 𝑖 consisting of observations (features) 𝑥 𝑖 and corresponding prior beliefs about their latent label variables 𝑝 𝑖 ( ℓ ) .
Two illustrative examples are shown in Fig.
In the ﬁrst example, the 𝑥 𝑖 are 784-dimensional vectors representing 28 × 28 MNIST digits.
We aim to infer the digit classes ℓ 𝑖 ∈ { 0 , 1 , ..., 9 } for all images in the given collection based on data in which we are given just one negative label per sample, i.e., the prior beliefs 𝑝 𝑖 ( ℓ ) (top row) are uniform over all classes except for one incorrect class.
The procedure described in this paper produces inferred distributions over labels (bottom row) that are usually peaky and place the maximum at the correct digit 97% of the time (Fig. 3).
In the second example, the observations 𝑥 𝑖 are image patches centered around each pixel coordinate 𝑖 in a Surrealist painting, with patch size ( 11 × 11 ) equal to the receptive ﬁeld of a 5-layer convolutional neural network used in our inference procedure.
The prior beliefs 𝑝 𝑖 ( ℓ ) are distributions overclasses (sky, boat, water) depending on the coordinate 𝑖 .
The joint inference of all labels in this image yields a feasible segmentation despite the high similarity in colors and textures (see §E.4).
In both examples, the inference technique needs to estimate statistical links between observations 𝑥 𝑖 and corresponding latents ℓ 𝑖 that would both be highly conﬁdent (i.e., lead to low entropy in the posterior distributions) and explain the varying prior beliefs, which typically have low conﬁdence (high entropy in the prior distributions).
This problem of training on weak beliefs, in some form, is often encountered in machine learning, e.g, weak supervision and semi-supervised learning, domain transfer, and integration of modalities – settings where coarse, partial, or inexact sources of data can provide rich information about the state of a prediction instance, though not always a “ground truth” label for each instance.
In many such settings, fusing the weak input data into a probability distribution over classes is a more natural alternative to transforming the weak input into hard labels [26].
However, because supervised models target the distribution over labels, training machine learning models with supervision from probabilistic prior beliefs results in uncertain predictions.
Most approaches to resolve these uncertainties involve iterative generation of hard pseudo labels [56], or loss functions promot-
[Figure]
ing low entropy of predictions [35; 55; 59; 54].
Typically, these approaches are application-speciﬁc [10; 57; 1; 22].
Further discussion of related work is provided in §B and §C.
Our key modeling insight is to associate the output distribution of a discriminative model, a feedforward neural network 𝑞 , with an implicit generative model (§2.1) of features and to consider the given prior belief as part of that model.
We show that without estimating the full generative model, it is possible to learn the network that performs inference in it and reap the beneﬁts of generative modeling, including high certainty in the posterior under soft priors and rich opportunities to model structure in the prior beliefs.
We validate the effectiveness of our approach with experiments (§4, §E) that highlight: prior beliefs as a natural way to fuse weak inputs, graceful degradation of performance with increasingly noisy or incomplete inputs, and comparison of our implicit generative model with explicitly generative modeling approaches.
B ACKGROUND AND APPROACH
Supervised learning on prior beliefs.
Supervised learning models, including many neural nets, are typically trained to minimize the cross-entropy − (cid:205) 𝑖 (cid:205) ℓ 𝑝 𝑖𝑑 ( ℓ ) log 𝑞 𝑖 ( ℓ ) between the data distribution over labels 𝑝 𝑑𝑖 ( ℓ ) and the distribution 𝑞 𝑖 ( ℓ ) =
𝑞 ( ℓ | 𝑥 𝑖 ; 𝜃 ) output by a predictor 𝑞 using data features 𝑥 𝑖 .
This is equivalent to minimizing the KL divergence (cid:205)
𝑖 KL ( 𝑝 𝑑𝑖 (cid:107) 𝑞 𝑖 ) which is not wellsuited to training with uncertain labels deﬁned by prior beliefs.
If we were to set 𝑝 𝑑𝑖 ( ℓ ) to equal a much softer prior over latent labels, 𝑝 𝑖 ( ℓ ) , the minimum would be attained when the two distributions 𝑝 𝑖 ( ℓ ) and 𝑞 𝑖 ( ℓ ) are equal: when the prior belief is soft, the trained model 𝑞 will also be highly uncertain.
Turning soft labels into hard training targets, ( 𝑝 𝑑𝑖 ( ℓ ) = 1 [ ℓ = arg max ℓ 𝑝 𝑖 ( ℓ )] , or by sampling), introduces the opposite bias.
Now, the cost would indeed be minimized if the predictions had zero entropy, but learning such a prediction function faces difﬁculty with overconﬁdent labels which are often wrong, as well as the possibility that certain labels often receive substantial weight in the prior, but never the maximum.
These issues are illustrated in Figure D.3.
Generative modeling resolves the prior’s uncertainty.
The approach to classiﬁcation problems through generative modeling, instead of targeting the conditional probability of latents given the data features, assumes that there is a forward (generative) distribution 𝑝 ( 𝑥 𝑖 | ℓ ) and optimizes the log-likelihood of the observed features, (cid:205)
𝑖 log ( 𝑥 𝑖 ) =
(cid:205)
𝑖 log (cid:205) ℓ 𝑝 ( 𝑥 𝑖 | ℓ ) 𝑝 𝑖 ( ℓ ) , with respect to the parameters of the forward distribution.
The posterior under the model 𝑝 ( ℓ | 𝑥 𝑖 ) ∝ 𝑝 ( 𝑥 𝑖 | ℓ ) 𝑝 𝑖 ( ℓ ) is then used to infer latent labels for individual data points [44].
As a result, the generative modeling approach does not suffer from uncertainty in the posterior distribution over latents given the input features, even when the priors 𝑝 𝑖 ( ℓ ) are soft.
1 Further discussion relating our method with existing generative modeling approaches is given in §C.
However, expressive generative models are typically harder and more expensive to train compared to supervised training of neural networks, as they often require sampling (e.g., sampling of the posterior in VAEs [21] and sampling of the generative model in GANs [8]).
Furthermore, the modeling often requires doubling of parameters to express both the forward (generative) model and the reverse (posterior) model.
And, in case of GANs, the learning algorithms may not even cover all modes in the data, which would prevent joint inference for all data points.
2. O PTIMIZATION UNDER IMPLICIT GENERATIVE MODELS
Suppose that there is a generative model 𝑝 ( 𝑥 | ℓ ) of observed features conditioned on latent labels.
Optimization of the log-likelihood of observed features, (cid:205) 𝑖 log
[Equation]
) =
[Equation]
𝑖 log (cid:205) ℓ 𝑝 ( 𝑥 𝑖 | ℓ ) 𝑝 𝑖 ( ℓ ) , can be achieved by introducing a variational distribution 𝑞 𝑖 ( ℓ ) over the latent variable for each instance 𝑥 𝑖 , then minimizing the variational free energy, which we review next.
Recall that the free energy, also known as the negative evidence lower bound (ELBO), is deﬁned as
[Equation]
where 𝑟 𝑖 ( ℓ ) =
𝑝 ( 𝑥 𝑖 |
[Equation]
) 𝑝 𝑖 (
[Equation]
[Equation] ℓ 𝑝 ( 𝑥 𝑖 | ℓ ) 𝑝 𝑖 ( ℓ ) is the posterior distribution under the generative model.
As the KL distance is always positive, the free energy is minimized when 𝑞 𝑖 = 𝑟 𝑖 , in which case the free energy equals the negative log-likelihood of the data.
Free energy minimization is used in various approaches to latent variable modeling.
The expectation-maximization (EM) [6] algorithm minimizes (1) by iteratively setting 𝑞 𝑖 to equal the posteriors 𝑟 𝑖 and updating the parameters of the forward distributions 𝑝 ( 𝑥 𝑖 | ℓ ) while keeping 𝑞 𝑖 ﬁxed, until guaranteed convergence to a local minimum.
In applications of EM predating deep generative models, the 𝑞 𝑖 distributions are not given by a predictor taking 𝑥 𝑖 as input; they are are auxiliary distributions used only as part of the learning procedure and replaced at each EM iteration.
Their dependence on 𝑥 𝑖 is implicit in energy minimization.
In variational auto-encoders (VAEs) [21], both the generative model 𝑝 ( 𝑥 | ℎ ) and the posterior 𝑞 ( ℎ | 𝑥 ) are represented as neural networks.
Here 𝑝 is a deep nonlinear generative model with hidden latents ℎ (not necessearily corresponding to labels), and evaluation of the full posterior is intractable.
Instead, 𝑞 is learned as a neural network 𝑞 ( ℎ | 𝑥 𝑖 , 𝜃 ) jointly with 𝑝 .
VAE training involves sampling from 𝑞 𝑖 ( ℎ )
=
𝑞 ( 𝑥 | 𝑥 𝑖 , 𝜃 ) in learning to improve the agreement between the forward (generative) model 𝑝 (and its true posterior 𝑟 𝑖 ( ℎ ) ) and the reverse (posterior) neural network model 𝑞 .
Implicit generative models.
To derive our training objectives, we will assume the existence of the generative model 𝑝 ( 𝑥 | ℓ ) without ever parametrizing it or sampling from it.
Instead, we parametrize only the reverse (variational posterior) model 𝑞 𝑖 ( ℓ ) =
𝑞 ( ℓ | 𝑥 𝑖 ; 𝜃 ) in the form of a neural net taking 𝑥 𝑖 as input.
The trained model 𝑞 is the direct output of our algorithms.
Given the variational distributions 𝑞 𝑖 , we can minimize (1) with respect to the forward probabilities 𝑝 ( 𝑥 𝑖 | ℓ ) for all 𝑥 𝑖 and ℓ such that (cid:205)
𝑖 𝑝 ( 𝑥 𝑖 | ℓ ) = 1 for all ℓ .
The optimum is achieved by:
[Equation]
We refer to this as the implicit generative model associated to 𝑞 .
Much like the posterior is implicit in the free energy minimization in the EM algorithm, here instead the forward model is just a matrix of numbers 𝑝 𝑖,ℓ , implicit to free energy minimization – the opposite, in some sense, to what is done in EM optimization.
The link 𝑥 − ℓ is left entirely to the neural network 𝑞 to capture explicitly.
The probability mass of the implicit generative model is not uniformly distributed, rather, the data points for which the variational posterior 𝑞 𝑖 ( ℓ ) is more certain are considered more likely under that latent ℓ , unless it corresponds to a popular class ℓ to which many other data points are also assigned.
done within a batch, rather than across the en tire dataset.
In practice, this may be sufﬁcient if batches are large and representative of the diversity in the data.
Otherwise, the denominator in (2) may need to be updated in an online fashion.
The posterior under the implied generative model is
[Equation]
Note that we can compute 𝑟 𝑖 ( ℓ ) by multiplying the re-normalized model outputs with the prior at each instance, so that for each instance 𝑖 we have two outputs: 𝑞 𝑖 and 𝑟 𝑖 .
We propose two methods of optimizing the free energy with respect to the parameters 𝜃 by gradient steps.
Each method iterates the following:
(1) Calculate the posterior distributions 𝑟 𝑖 in terms of 𝑞 𝑖 as in (3) (2) Update the parameters of 𝑞 with a gradient step: • Option QR :
𝜃 ← 𝜃 − 𝜂 ∇ 𝜃 (cid:205)
𝑖 KL ( 𝑞 𝑖 (cid:107) 𝑟 𝑖 ) .
• Option RQ : 𝜃 ← 𝜃 − 𝜂 ∇ 𝜃 (cid:205)
𝑖 KL ( 𝑟 𝑖 (cid:107) 𝑞 𝑖 ) .
Gradients of the model parameters are propagated to the expression of 𝑟 𝑖 through 𝑞 𝑖 (see Fig. 2).
Both losses have a stable point when 𝑞 𝑖 = 𝑟 𝑖 .
A discussion of the relative beneﬁts and limitations of the QR and RQ loss formulations is given in §A, along with practical considerations for implementing these methods.
Option QR uses the KL distance in the direction it appears in (1) and thus guarantees continual improvements in free energy and convergence to a local minimum (with the exception for the effects of stochasticity in minibatch sampling).
Substituting 𝑟 𝑖 from (3), the free energy (1) becomes:
[Equation]
This criterion does not encourage entropy of individual 𝑞 𝑖 distributions, but of their average .
The second term alone would be minimized if the 𝑞 network could put all the mass on arg max ℓ 𝑝 𝑖 ( ℓ ) for each data point, but the ﬁrst term promotes diversity in assignment of latents (labels) ℓ across the entire dataset.
Thus a network 𝑞 can optimize (4) if it makes different conﬁdent predictions for different data points.
To illustrate this, consider the case when 𝑝 𝑖 ( ℓ )
= 𝑝 ( ℓ ) , i.e. all data points have the same prior.
Then (4) is minimized when 1 𝑁 (cid:205)
𝑖 𝑞 𝑖 ( ℎ ) =
𝑝 ( ℓ ) , and this can be achieved when the network learns a constant distribution 𝑞 ( ℓ | 𝑥 𝑖 ; 𝜃 )
= 𝑝 ( ℓ ) .
But the free energy is also minimized if the network predicts only a single label for each data point with high certainty, but it varies in predictions so that the counts of label predictions match the prior.
As demonstrated in Fig.
1 and in our experiments, avoiding degenerate solutions is not hard.
We attribute this to two factors.
First, the situations of interest typically involve uncertain, but varying distributions 𝑝 𝑖 ( ℓ ) which break symmetries that could lead to ignoring the data features 𝑥 𝑖 .
Second, the neural networks used as posterior models 𝑞 come with their own constraints in parametrization (e.g. a multi-layer convolutional net with certain number of ﬁlters in each layer), and, the inductive biases as a consequence of gradient descent learning in nonlinear, multilayer networks.
In fact, as discussed in §3 and §E.1, even unsupervised clustering is possible with suitably chosen priors that break symmetry, allowing this approach to be used for self-supervised training.
See also §C for more on relationships with other approaches.
S OURCES OF LABEL PRIORS
In this section, we describe a range of machine learning settings where priors 𝑝 𝑖 ( ℓ ) emerge.
These settings are illustrated in experiments in §4, with additional experiments in §E.
Negative or partial labels (§4.1).
When we are given a set of equally possible labels 𝐿 𝑖 for each point data point 𝑖 , instead of a single label ℓ 𝑖 , then we set the prior 𝑝 𝑖 ( ℓ ) = 1 | 𝐿 𝑖 | 1 [ ℓ ∈ 𝐿 𝑖 ] .
An extreme example is when one negative label is given, as shown in Fig.
Joint labels and learning from rankings (§4.2).
Priors may also come in the form of joint distributions over labels of multiple instances.
For example, ranking supervision – the knowledge of which example in a pair is greater with respect to an ordering of the labels – gives prior beliefs about pairs of labels.
Suppose our data is organized into pairs of images of digits
𝑇 𝑗 = { 𝑥 𝑗, 1 , 𝑥 𝑗, 2 } , and for each pair we are told which image represents the digit (0–9) which is greater.
This sets a prior 𝑝 ( ℓ 1 , ℓ 2 ) over pairs of labels in each pair, represented by either an upper or a lower triangular matrix, depending on which digit in the pair is known to be greater, with all nonzero entries equal to 1 / 55 .
We assume the implicit generative model has the form 𝑝 ( 𝑥 1 , 𝑥 2 | ℓ 1 , ℓ 2 ) =
𝑝 ( 𝑥 1 | ℓ 1 ) 𝑝 ( 𝑥 2 | ℓ 2 ) .
We aim to ﬁt a posterior model 𝑞 ( ℓ | 𝑥 ; 𝜃 ) .
For each pair 𝑇 𝑗 , we have two outputs of the predictor network, 𝑞 ( ℓ 1 | 𝑥 𝑗, 1 ) and 𝑞 ( ℓ 2 | 𝑥 𝑗, 2 ) , for the two images in the pair.
The joint posterior under the implicit generative model is
[Equation]
and we can now use QR or RQ loss to ﬁt 𝑞 ( ℓ 1 | 𝑥 𝑗, 1 ) to the marginal 𝑟 𝑗 ( ℓ 1 ) and 𝑞 ( ℓ 2 | 𝑥 𝑗, 2 ) to 𝑟 𝑗 ( ℓ 2 ) .
Coarse data in weakly supervised segmentation (§4.3, §E.2, §E.4).
We often have side information 𝑧 associated to each instance 𝑖 that allows setting the priors 𝑝 𝑖 ( ℓ )
= 𝑝 ( ℓ | 𝑧 𝑖 ) for each point directly by hand.
These include situations when we have beliefs about labels for different points, as in the Seducer example (Fig. 1), but also more interesting weak supervision settings, such as ones that sometimes arise in remote sensing (§4.3) and medical pathology (§E.2) applications.
For example, in a task of segmenting aerial imagery into land cover classes, we often have coarse labels 𝑐 associated to large blocks of pixels, but not the target labels ℓ for individual pixels.
If the conditional 𝑝 ( ℓ | 𝑐 ) is known, it sets a belief about the high-resolution labels ℓ for pixels in a block of class 𝑐 .
Fusing models and data sources (§4.4, S4.5).
Auxiliary information 𝑧 may not always come with a known correspondence 𝑝 ( ℓ | 𝑧 ) .
In the land cover mapping problem, auxiliary information may include different modalities and resolutions (road maps, sparse point labels, etc.).
While these sources can be fused into a prior by hand-coded rules, the prior may be more accurately set as the output of a model 𝑝 ( ℓ | 𝑧 𝑖 ) trained on a separate dataset of points ( ℓ 𝑖 , 𝑧 𝑖 ) .
This is especially useful when the data 𝑥 𝑖
(e.g. satellite imagery) is more informative about the latents ℓ 𝑖 , but is prone to domain shift problems, while the auxiliary data 𝑧 𝑖 does not suffer from domain shift issues but is not sufﬁcient on its own to predict the labels.
In a text classiﬁcation problem, 𝑧 𝑖 might be the encoding of text 𝑥 𝑖 by a pretrained language model, and 𝑝 ( ℓ | 𝑧 𝑖 ) a noisy distribution over labels given by their likelihoods under the language model as continuations of a prompt.
Priors for self-supervision (§E.1).
In §2.1 we discussed the pitfalls of using a constant prior 𝑝 𝑖 ( ℓ ) =
𝑝 ( ℓ ) for all data points in training models under the QR loss as a potential method for unsupervised clustering.
However, in §E.1 we give an example of joint learning of the posterior model 𝑞 and an energy model (Markov random ﬁeld) on the latent labels ℓ 𝑖 that expresses local structure of labels in an image.
This results in unsupervised clusterings that are useful in downstream segmentation tasks.
Such an approach is an example of a beneﬁt of generative modeling – the possibility of learning of a parametrized distribution over latents – being inherited by implicit generative models.
Priors with latent structure (§E.3).
Implicit generative modeling allows building hierarchical latent structure into the prior (another beneﬁt of classical generative models), as we demonstrate in §E.3 on a video segmentation task.
The prior is an admixture of possible segmentations with a structure similar to [17], but using a set of mask proposals 𝑝 ( ℓ 𝑖 | 𝑚 ) from a Mask R-CNN model [11], indexed by a latent 𝑚 .
The prior is 𝑝 𝑖 ( ℓ ) =
(cid:205) 𝑚 𝑝 ( ℓ 𝑖 | 𝑚 ) 𝑝 ( 𝑚 ) , where 𝑝 ( 𝑚 ) , a probabilistic selection of the masks for the admixture in the given frame, is estimated by minimizing the free energy.
E XPERIMENTS 4. P ARTIAL LABELS IN MNIST AND CIFAR-
In this illustrative experiment, we compare algorithms for learning with partial labels on two 10-way image classiﬁcation datasets, MNIST and CIFAR-10.
To each training example 𝑥 𝑖 , we randomly assign a set 𝑁 𝑖 of 𝑘 negative labels, chosen from the 9 labels distinct from the ground truth.
The prior 𝑝 𝑖 ( ℓ ) is set to be uniform over ℓ ∉ 𝑁 𝑖 and 0 for ℓ ∈ 𝑁 𝑖 .
We vary 𝑘 from 1 (one negative label per example) to 9 (one-hot prior, full supervision).
The data of 𝑘 negative labels carries − log 2 ( 1 − 𝑘 / 10 ) bits of label information – if 𝑘 = 1 , 22 × less label information than in the fully supervised setting.
For both datasets, the base model 𝑞 is taken to be a small convolutional network, with four layers of ReLU-activated 3 × 3 convolutions with stride 2 and a linear map to the 10 output logits ( ∼ 33k learnable parameters for MNIST, ∼ 34k for CIFAR-10).
We experiment with four training losses:
• CE: cross-entropy between predictions 𝑞 ( ℓ | 𝑥 𝑖 ; 𝜃 ) and the prior 𝑝 𝑖 ( ℓ ) . • NLL (union): negative logarithm of the sum of likelihoods assigned by 𝑞 to labels in ℓ ∉ 𝑁 𝑖 , or, equivalently, log (cid:205) ℓ 𝑝 𝑖 ( ℓ ) 𝑞 ( ℓ | 𝑥 𝑖 ; 𝜃 ) , as done, e
g., by [15; 19].
• The QR and RQ losses.
The CE , NLL (union) , and RQ losses are equivalent when 𝑘 = 9 , and the RQ and NLL (union) losses are equivalent when (cid:205)
𝑖 𝑞 𝑖 ( ℓ ) is uniform over ℓ , which approximately holds late in training.
All models are trained for 300 epochs on batches of 256 images with the Adam optimizer [20] and a learning rate of 10 − 4 .
After each epoch, we compute the accuracy of the predictor 𝑞 on the ground truth labels in the train and test sets.
Fig.
3 shows the ﬁnal accuracies, as well as the maximum accuracies over epochs, averaged over 10 choices of partial label sets and random initializations.
Models trained on RQ loss perform best, with the greatest beneﬁt over CE seen for very few negative labels.
We hypothesize that the small advantage of RQ over NLL (union) loss can be attributed to regularization in early training.
Meanwhile, QR performs as well as CE for very uncertain priors at the peak epoch, but its predictions degenerate with longer training.
4. M ULTIPLE - INSTANCE SUPERVISION : L EARNING FROM RANKS
We train a CNN of the same architecture as in §4.1 on MNIST, but with the only supervision coming in the form of pairs of images in which it is known which image represents the greater digit.
The training set of 60k images is divided into pairs that are ﬁxed throughout the training procedure; each digit appears in exactly one pair.
We optimize to match the predictor 𝑞 with the implicit generative model’s posterior (5) using the RQ loss.
Fig.
3 shows the confusion matrices at initial iterations of training.
The learned classiﬁer has 97% accuracy on both training and testing sets, which means that from pairwise comparisons alone, we can group the digit images and place them in order.
4. L ABEL SUPER - RESOLUTION : C HESAPEAKE B AY LAND COVER MAPPING
We benchmark our method’s performance on the Chesapeake Land Cover dataset 2 , a large 1m-resolution land cover dataset used previously for label super-resolution [27; 42].
It con- sists of several aligned data layers, including: NAIP (4-channel high-resolution aerial imagery at about 1m/px), NLCD (16-class, 30m-resolution coarse land cover labels), and high-resolution land cover labels (LC) in four classes.
The task is to train high-resolution segmentation models, in the four target classes, using only NLCD labels as supervision.
Although the NLCD layer is at 30 × lower resolution than the imagery and target labels and follows a different class scheme, the cooccurrence statistics of NLCD classes 𝑐 and LC labels ℓ are assumed to be known.
To form a prior over land cover classes ℓ at each pixel position, we map the NLCD classes to probabilities over the target LC classes using these known cooccurrence counts and apply a spatial blur to reduce low-resolution block artifacts (Fig. 4, “Prior”).
We then train small convolutional networks (receptive ﬁeld 11 × 11 ) to predict high-resolution land cover from input imagery.
We evaluate both the QR and RQ variants of our approach on the two states that comprise the “Chesapeake North” test set: Pennsylvania (PA) and New York (NY), and the two states combined, after picking hyperparameters based on an independent validation set in Delaware (details in Appendix D.1.3).
A depiction of the data and prediction results is given in Figure 4.
Table 1 compares our performance against the algorithmic technique with the best published performance on the Chesapake dataset, self-epitomic LSR [28] and the hard na ¨ ıve baseline from [27].
Self-epitomic LSR, a generative modeling approach that explicitly produces likelihoods 𝑝 ( 𝑥 | ℓ ) , analyzes small patches of data by making a large number of comparisons between sampled 7 × 7 image patches and all other image patches.
It does not produce a trained feedforward inference model, and the inference procedure is at least an order of magnitude slower than evaluation of our convolutional model.
The hard na ¨ ıve baseline maps the NLCD classes to LC classes based on a given concurrence matrix, then trains a standard semantic segmentation model on these pseudo-labels.
Not only does training on the QR loss achieve comparable performance with self-epitomic LSR (Table 1), but the implicit generative model for 𝑝 ( 𝑥 | 𝑐 ) from (2) is largely consistent with the epitomic generative model (Fig.
D.4).
Moreover, our method handles batched input , where self-epitomic
LSR trains on one tile at a time, and similar approaches have been shown to degrade in performance and exhaust computation capacity when training on multiple tiles [28]).
Thus, optimization under an implied generative model has the computational advantage of scaling naturally to large training data while maintaining the beneﬁts of leading generative modeling approaches.
(See also §E.2.)
4. D ATA FUSION AND LEARNED PRIORS : E NVIRO A TLAS
In this set of experiments, we augment NLCD with information about the presence of buildings, road networks, water bodies, and waterways from public sources (see Fig.
5 and §D.1.1).
To evaluate the ability of models to generalize to new geographic regions, we use 1m 5-class land cover labels from the geographically diverse EnviroAtlas dataset [39] in four cities in the US: Pittsburgh, PA, Durham,
NC, Austin, TX, and Phoenix, AZ.
The NLCD-based prior model from §4.3 is augmented with the auxiliary information to obtain a hand-coded prior for each image (see §D.1.2.)
These types of priors can be made everywhere in the United States, while hard labels are rarely available.
The standard alternative to performing local inference under such priors is to simply apply supervised models trained on hard labels elsewhere, hoping that the domain shift is tolerable.
Table
[Table]
compares the performance of a model (of the same architecture as in §4.3) trained on Pittsburgh high-resolution data (HR) in each of the three other cities with that of models tuned on the handcoded prior in each other city.
The QR method trained on the local handmade prior outperforms the HR model in each evaluation city.
This may be attributed to the extra data in each city given to our method in the form of prior beliefs.
To isolate this effect, we also compare to a high-resolution model that consumes the prior belief to input data, concatenated with the NAIP imagery (HR + aux).
While the HR + aux model does increase performance substantially from the HR model with NAIP imagery alone as input, the QR model remains the highest-ﬁdelity approach.
These results illustrate that information that generalizes across domains may ﬁnd its best use within a separate model – to build a prior in our setting – and then used to supervise local inference.
A prior belief could be crafted by a domain expert to reﬂect the uniquities in geographic and structural features for each city.
We emulate incorporating such context-speciﬁc knowledge by training (on a disjoint set of instances) a neural network that consumes the inputs to the handmade prior function (NLCD and auxiliary map data), and predicts high-resolution labels (Figure 5, “Learned prior”).
Alongside structural interactions between the inputs that generalize across cities (e.g. tree canopy supersedes rivers, road supersede water), the learned prior captures region-speciﬁc knowledge (e.g., buildings in Durham, tend to be have grass surrounding them and trees farther out, while in Austin, this is reversed, and in Phoenix, riverbeds surrounded by barren land are likely to be dry).
As shown in Table 2, these tailored prior beliefs tend to increase scores.
The ﬁnal row in Table 2 benchmarks the performance of a high-resolution land cover model trained on imagery and labels over the entire contiguous US [42].
This large model takes NAIP, Landsatsatellite imagery, and building footprints as inputs.
Small, local models with priors created from only weak supervision outperform the US-wide model in all cities.
(See §D.1.4 for evaluation details.)
[Table] [Table]
[Table]
U NCERTAIN TEACHERS : T EXT CLASSIFICATION
This experiment follows the very recent work of [32] and illustrates the effectiveness of learning on prior beliefs beyond computer vision.
We work with a dataset of ∼ 12k
New York Times news articles.
Each article belongs to one of 20 ﬁne categories (e.g., ‘energy companies’, ‘tennis’,‘golf’), which are grouped into 5 coarse categories (e.g., ‘business’, ‘sports’).
The goal is to train text classiﬁers that predict ﬁne labels, but only the coarse label for each article is available in training.
Some external knowledge about the ﬁne categories is necessary to resolve the coarse labels into ﬁne labels.
Past work on this problem [33; 31; 34; 51] has trained supervised models on pseudolabels created by mechanisms such as propagation of seed words and querying large pretrained language models.
On the other hand, [32] create training data by sampling additional features (articles) from a ﬁnetuned version of the large generative language model GPT-2 [41] conditioned on ﬁne categories, then tune a classiﬁer based on the almost equally large model BERT [7] in a supervised manner.
We obtain comparable results with an elementary predictor, far less computation, and no ﬁnetuning of massive language models.
We form a prior 𝑝 𝑖 ( ℓ ) on the ﬁne class ℓ of each article 𝑥 𝑖 by querying
GPT-2 for the likelihood of each ﬁne category name ℓ compatible with the known coarse label following the prompt “[article text]
Topic: ” and normalizing over ℓ .
We then divide 𝑝 𝑖 ( ℓ ) by the mean likelihood of ℓ over all articles 𝑥 𝑖 and renormalize.
We represent each article as a vector of alphabetic trigram counts ( 26 3 features, of which only 8k are ever nonzero) and train a logistic regression with the RQ objective against the ‘GPT-2 prior’.
After ten epochs of training ( ∼ 10s on our hardware), the trained classiﬁer nears or exceeds the performance of models requiring at least 100 × longer to train, not to mention to generate pseudo-training data for (Table 3).
C ONCLUSIONS
We found that the generative distribution in a free energy criterion can be left implicit to the minimization process in posterior (discriminative) model training.
This allowed us to unite the training of neural networks 𝑞 ( ℓ | 𝑥 𝑖 ; 𝜃 ) for prediction of labels ℓ from features 𝑥 and the modeling of the prior 𝑝 𝑖 ( ℓ ) , possibly with its own latent structure.
Implicit modeling of the conditional generative distributions removes the burden of training accurate (and therefore large or deep) generative models, but allows natural generative approaches to modeling priors.
We expect interesting new modeling paradigms that integrate different modalities and models to arise from this formulation.
R EPRODUCIBILITY STATEMENT
This submission comes with two code directories that illustrate our algorithms for partial-label learning and weakly supervised segmentation.
The provided code is sufﬁcient to reproduce results resembling those in Fig.
Upon publication, we intend to release code for all land cover mapping experiments that is compatible with the TorchGeo library.
E THICS STATEMENT
The authors anticipate that the immediate consequences arising from this work will have nonnegative social impacts.
In general, learning from weak, coarse, or imprecise data may be susceptible to data biases in differential quality or precision in data sources across sub-populations or geographies.
We encourage further work to examine these issues, especially in cases where uncertain labels are used in machine learning systems that impact people or decision-making systems.
Overall, we hope that the ability to learn from a variety of weak data sources can aid applicability of machine learning systems in diverse settings
A P RACTICAL C ONSIDERATIONS
Mini-batches: Figure 2 shows a PyTorch implementation of the QR and RQ loss functions, where loss is computed over batches of training data. Our experiments validate that so long as these batches are large enough to include enough diversity of ( 𝑥 𝑖 , 𝑝 𝑖 ( 𝑙 )) pairs, our method works when eq. (2) and eq.
(3) are applied directly to batches.
As discussed in §4.4, handling batched input is important for leveraging the scale of large training datasets.
As discussed in the caption of Figure 2, should mini-batch training become an issue in future implementations, it may be beneﬁcial to estimate the denominator of eq.
(2) across multiple batches.
Relative beneﬁts/limitations of the QR and RQ loss formulations: The algorithm presented in §2.1 details two loss options: a QR option and an RQ option, both with unique strengths.
The QR algorithm is guaranteed to converge as each step reduces loss (except for randomness in the learning algorithm).
The RQ algorithm, on the other hand, has the appealing property that it reduces to standard minimization of cross entropy loss in the case of hard labels.
In §C, we discuss connections between QR option and variational auto-encoders (VAEs), and between the RQ option and the wakesleep algorithm.
Ultimately, though, we ﬁnd that which option works better may depend on the application, with RQ working across all applications we tried but sometimes being slightly beaten by QR.
Simple ways to avoid degenerate solutions As discussed in §2.1, minimizing eq.
(1) can lead to degenerate solutions.
However, avoiding these solutions can be quite simple, and in most of our experiments we did not make any interventions to explicitly avoid such local minima.
In a targeted experiment in table D.1 we show that pre-training on hard labels (even out-of-domain) or using sharper learned priors can help break symmetries during early training phases.
When hard labels are not available, one could similarly start the training process with a cross-entropy loss on the prior belief, and then switch to RQ or QR loss.
The intuition is that ﬁrst training to minimize cross-entropy breaks the symmetry at the start, while implicit generative modeling sharpens the predictions in later iterations.
B A DDITIONAL R ELATED W ORK
There are several approaches to learning with uncertain, weak, or coarse labels under different assumptions and settings.
Work on partial-label learning often employs loss functions that aim to decrease prediction entropy [35; 54; 55];
In contrast to our work, these approaches do not use a generative formulation in these loss functions, makes them ill-suited to problems with more varied forms of uncertainty encoded in priors.
Another line of work studies the generation and use of pseudo labels in learning settings.
Speciﬁcally, [59] relies on a domain-speciﬁc augmentation procedure for semantic segmentation with image-level labels, and, [56] studies unsupervised clustering applied to object re-identiﬁcation.
Application-speciﬁc solutions also include object detection in remote sensing images [10] and change detection with temporal satellite imagery [57; 1; 22].
In our experimental setups, we chose a mix of baselines to compare algorithm design and benchmark performance on certain tasks.
To compare our approach on an algorithmic basis , we compare to the negative logarithm of the sum of likelihoods (NLL), which is used in prior works to handle multiple ambiguous labels [15] and negative labels [19].
As we discuss in §4.1, NLL and RQ are equivalent when (cid:205)
𝑖 𝑞 𝑖 ( ℓ ) is uniform over ℓ , evidenced by the comparable performance between the two in Figure 3.
We compare to selfepitomic LSR [28] as an algorithmic comparison by which to contrast our method with an “explicit” generative modeling approach.
Our similar performance to self-epitomic LSR in regimes where self-epitomic LSR has been shown to perform well (super-resolution in land cover mapping (§4.3) and the tumor-inﬁltrating lymphocytes task (§E.2)) is an important validation of our motivation in §2.
To benchmark performance of our approach across tasks, we compare to state-of-the-art pseudolabeling methods in supervised text classiﬁcation (see §4.5), an established 1m resolution map of land cover predictions across the United States [42] and best-performing published results for the land cover mapping tasks we study [28; 43], the best known published results for the tumor- inﬁltrating lymphocyte segmentation task ([27; 28]), and a host of comparisons for the video instance segmentation task (see Table E.3 for a full list).
Lastly, it is worth noting that the term “implicit generative model” has also been used in prior literature to refer to amortized sampling procedures for nonparametric (or not speciﬁed) energy functions, such as generative adversarial models (e.g., [45]).
Although we do not make an explicit connection with such models, our formulation also does not assume a parametrization of the data distribution.
However, we assume tractability of sampling from a posterior over certain distinguished latents (classes) conditioned on observed data (features, e.g., images), rather than directly sampling latents.
C R ELATIONSHIPS WITH EM, VAE S , AND WAKE - SLEEP ALGORITHM
As discussed in §2.1, the QR loss guarantees continual improvements in the free energy (1).
On the other hand, option RQ is equivalent to performing a gradient step on the cross-entropy of 𝑞 𝑖 and 𝑟 𝑖 and a gradient step on the negative entropy of 𝑟 𝑖 .
In the case that the priors 𝑝 𝑖 ( ℓ ) are hard (supported only on one ground truth label), the same is true of 𝑟 𝑖 , and the RQ loss is equivalent to cross-entropy.
This option reverses the KL distance in a manner reminiscent of the training procedure in the wakesleep algorithm
[12], where parameter updates for the forward and reverse models are iterated, but the KL distance optimized always places the probabilities under the model being optimized in the second position in the KL distance (inside the logarithm), so that the generative and the inference models each optimize log-likelihoods of their predictions.
The wake-sleep algorithm, however, also trains a generative model rather than treating it as an auxiliary distribution like we do, and that requires sampling.
As opposed to VAEs, the wake-sleep algorithm samples the generative model, not the posterior.
It is interesting to contrast our approach to the EM formulation.
In standard EM, the 𝑞 distributions are considered auxiliary, rather than parametrized as direct functions of the inputs 𝑥 .
The 𝑞 𝑖 ( ℓ ) is simply a matrix of numbers normalized across ℓ .
Its dependence on the data 𝑥 is only implicit in the iterative re-estimation of the minimum of the free energy.
The link 𝑥 − ℓ is modeled explicitly in the parametrized forward distribution 𝑝 ( 𝑥 | ℓ ) .
We instead treat forward probabilities 𝑝 ( 𝑥 𝑖 | ℓ ) as auxiliary parameters, a matrix of numbers 𝑝 𝑖,ℓ normalized across 𝑖 that we ﬁt to minimize the free energy at each data point, and optimize only the parameters of the 𝑞 model which explicitly models the link 𝑥 − ℓ .
This then allows us to capture nonlinear (and ‘deep’) structure and beneﬁt from inductive biases inherent to training deep models with SGD, but without the cost of training an actual parametrized generative model and other problems associated with deep generative model ﬁtting.
The resulting 𝑞 network approximates the posterior in a generative model – which (locally) maximizes the log likelihood of the data – and it is usually highly conﬁdent (as seen in Fig. 1).
The implicit modeling of the posterior in EM does not lead to over-ﬁtting of the generative model.
But, given that degenerate solutions to optimization with implicit generative models are possible when the prior is constant across all data points (§2.1), we can imagine that our approach of implicit generative modeling might lead to degenerate solutions.
As demonstrated in Fig.
1 and in our experiments, avoiding degenerate solutions is not too hard.
We attribute this to two factors.
First, the situations of interest typically involve uncertain, but varying distributions 𝑝 𝑖 ( ℓ ) which break symmetries that could lead to ignoring the data features 𝑥 𝑖 as in the example above of a constant prior.
Second, the neural networks to be used as posterior models 𝑞 come with their own constraints in parametrization, and, equally importantly, the inductive biases that come as a consequence of gradient descent learning in nonlinear, multilayer networks.
D E XPERIMENT DETAILS D. L AND COVER MAPPING D.1. D ATASETS Imagery Data
Our land cover mapping experiments use imagery from the National Agriculture
Imagery Program (NAIP), which is
Chesapeake Conservancy land cover dataset The Chesapeake Conservancy land cover dataset consists of several raster layers of both imagery and labels covering parts of 6 states in the Northeastern United States: Maryland, Delaware, Virginia, West Virginia, Pennsylvania, and New York [42] 3 .
The raster layers include: high resolution (1m/px) NAIP imagery, high resolution (1m/px) land cover labels created semi-autonomously by the Chesapeake Conservancy, low resolution (30m/px)
Landsat-8 mosaics imagery, low resolution (30m/px) land cover labels from the National Land Cover
Database (NLCD), and building footprint masks from the Microsoft Building Footprint dataset.
The dataset is partitioned into train, validation, and test splits per-state, where each split is a set of ≈ 7 km × 6 km tiles containing the aligned raster layers.
EPA EnviroAtlas data The EnviroAtlas land cover data consists of high resolution (1m/px) land cover maps over 30 cities in the US, and is collected and hosted by the US Environmental Protection
Agency (EPA) [39].
A detailed description of the dataset and its land cover deﬁnitions is provided by [40].
As with most high-resolution land cover datasets (including the Chesapeake Conservancy land cover labels), the EnviroAtlas land cover labels are themselves derived by remote sensing and learning procedures, and thus are not themselves a perfect “ground truth” representation of land cover.
For example, the estimated accuracy of the provided labels is 86.5% in Pittsburgh, PA, 83.0% in Durham, NC, 86.5% in Austin, TX, and 69.2% in Phoenix, AZ [40].
The high-resolution label ﬁles were aligned to match the extent of the NAIP tiles from the closest available years to the years that the EnviroAtlas labels were collected: for Pittsburgh, PA and
Phoenix, AZ, we used data from 2010 and for Durham, NC and Austin, TX, we used data from 2012.
We chose these four cities to get a wide coverage across the United States (US), and due to a mostly consistent set of classes being used between the four cities.
National Land Cover Database (NLCD)
The National Land Cover Database is produced by the
United States Geological Survey (USGS) and uses 16 land cover classes.
Maps are generated every 2-3 years, with spatial resolution of 30m/px.
Data and more information can be found at: https: //www.usgs.gov/centers/eros/science/national-land-cover-database .
Microsoft Building Footprint dataset The Microsoft Building Footprint dataset consists of predicted building polygons over the continental US from Bing Maps imagery.
As of the time of writing, the most updated Microsoft Building Footprints dataset in the US can be accessed at: https://github.com/Microsoft/USBuildingFootprints .
Open Street Map (OSM) data Open Street Map ( https://www.openstreetmap.org/ ) is an ongoing effort to make publicly available and editable map of the world, generated largely from volunteer efforts.
The data is available under the Open Database License.
From the many different sources of information provided by OSM [9], we download raster data for road networks, waterways, and water bodies, using the OSMnx python package [2].
Data splits and data processing For experiments using the Chesapeake Conservancy dataset (Table 1), we used established train, test, and validation splits.
In particular, we used the 20 test tiles in
New York (NY) and the 20 test tiles in Pennsylvania on which to conduct our experiments.
Here a tile matches the extent of a NAIP tile, roughly 7km × 6km.
To facilitate comparison of our results with previous published results on this dataset, we condensed the labels into four classes: (1) water, (2) impervious surfaces (roads, buildings, barren land), (3) grass/ﬁeld, and (4) tree canopy.
For experiments with the EnviroAtlas dataset (Table 2), we aligned the high resolution land cover data, NLCD, OSM, and Microsoft Building Footprints data with NAIP imagery tiles, matching years as closely as possible to the EnviroAtlas data collection year for NLCD and NAIP.
We instantiated a split of 10 train, 8 validation, and 10 test tiles in Pittsburgh, and 10 test tiles in Durham, NC, Austin,
TX, and Phoenix, AZ.
For Pittsburgh we assigned tiles to splits randomly from the set of 28 tiles that had no missing labels.
There were not enough such tiles in Durham to follow the same procedure, so we chose the ten evaluation tiles at random from a set with no number of missing labels per tile.
For Austin and Phoenix, we chose the 10 evaluation tiles at random from the tiles in each city that had no agriculture class (as it is not present in Pittsburgh or Durham) and no missing labels.
[Figure]
N o D a t a
O pen W a t e r
I c e / S no w
D e v e l oped
O pen S pa c e
D e v e l oped
Lo w I n t en s i t y
D e v e l oped
M ed i u
m I n t en s i t y
D e v e l o p ed
H i gh I n t en s i
t
y
B a rr en
Land ( R o ck / S and / C l a y )
D e c i duou s
F o r e s t
E v e r g r een
F o r e s t
M i x ed F o r e s t S
h r ub / S c r ub
G r a ss l and / H e r ba c eou s
P a s t u r e / H a y
C u l t i v a t ed
C r op s
W ood y W e t l and s
E m e r gen t H e r ba c eou s
W e t l and s
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
e
D e
[Table]
I n t
[Table]
s i t y
[Table]
v e l oped
M ed i u
m I n t en s i t y
D e v e l oped
H i gh I n t en s i
t
y
B a rr en Land
( R o ck / S and / C l a y )
D e c i duou s
F o r e s t
E v e r g r een
F o r e s t
M i x ed F o r e s t S
h r ub / S c r ub
G r a ss l and / H e r ba c eou s P a s t u r e / H a y
C u l t i v a t ed C r op s
W ood y W e t l and s
E m e r gen t H e r ba c eou s W e t l and s
[Figure]
We set aside 5 separate tiles in each city for use in “learning the prior” (in Pittsburgh these 5 tiles are a subset of the 8 validation tiles). As above, each tile corresponds to one NAIP tile. The tiles in these constructed sets for Pittsburgh, Durham, and Austin contain ﬁve unique labels: (1) water, (2) impervious surfaces (roads, buildings), (2) barren land, (4) grass/ﬁeld, and (5) trees. Phoenix additionally has “shrub” class; when forming the prior we merge this class with trees, and we ignore the shrub class when evaluating in Phoenix.
We cropped all data tiles to ensure no spatial overlap in any tiles between or within the train/val/test splits. D.1. F ORMING THE PRIORS To form the priors for the land cover classiﬁcation tasks, we ﬁrst spatially smooth the NLCD labels by applying a 2D Gaussian ﬁlter (with standard deviation 31 pixels) across every channel in a onehot representation of the NLCD classes. The main reason for applying this smoothing is to reduce artifacts due to the 30m 2 boundaries of the NLCD data: to undo the blocking procedure induced by the aggregation to 30m × 30m extents, to incorporate the spatial correlations between nearby NLCD blocks, and to remove erroneous sharp differentials between inputs that can cause artifacts during later training stages.
We then remap the blurred NLCD layers to the classes of interest by multiplying by a matrix of cooccurrence counts between the (unblurred) NLCD data and the high resolution labels in each region. For the Chesapeake region, we use the train tiles provided with the Chesapeake Conservancy land cover dataset to deﬁne co-occurrence matrices in NY and PA. For EnviroAtlas, we compute cooccurrences using the entire city (excluding tiles with agriculture in Phoenix AZ, and Austin, TX). The co-occurrence matrices for each region we study are shown in Figure D.1.
The priors for the Chesapeake Conservancy dataset are then generated by normalizing the blurred and remapped NLCD data so that summing over all ﬁve classes gives probability 1 for each pixel. For the EnviroAtlas data, we augment this prior with publicly available data on buildings, road networks, water bodies, and waterways. We obtain building maps from the Microsoft Buildings Footprint database and road, water bodies, and waterways data from Open Street Map, using the
OSMnx tool [2] to download the data (see Appendix D.1.1).
We apply a small spatial blur to each of these input sources to account for (a) vector representation of roads and waterways being unrealistically thin, and (b) possible data-image misalignment on the order of pixels.
Where this results in probability mass on impervious surfaces or water, we add these probability masses to the blurred
NLCD prior, and then renormalize to obtain a valid set of probabilities for each pixel.
In §4.4, we describe a method for “learning the prior,” which uses a more sophisticated process to aggregate the individually weak and coarse inputs that we use in the handmade prior.
In this method, we train a neural net to take as input the blurred, remapped NLCD representation (5 classes) concatenated with the 4 classes of additional data: buildings, roads, waterways, water bodies, and to predict high-resolution labels in each city.
We train these networks using 5 tiles of imagery and high-resolution labels from the EnviroAtlas Dataset in each city which are distinct from the 10 test tiles in each city.
The training procedure for these prior generation networks is described in in §D.1.3.
To create the priors that we then train our method on (‘learned prior’ rows in Table 2) we ran these learned models forward on (blurred and remapped NLCD, buildings, roads, waterways, and waterbodies) input for each of the 10 evaluation tiles in each city.
D.1. E XPERIMENTAL PROCEDURE
We use priors generated as described in Appendix D.1.2, with Gaussian spatial smoothing standard deviation of 31 pixels, and co-occurrence matrix determined via the training splits in each city/state.
We apply an additive smoothing constant of 1e-4 to that is applied pixel-wise the the probability vectors output by the neural network as well as to the prior probability vectors used as the model supervision data.
This additive smoothing constant ensures that there are no extremely low probability classes in either the prior or the predicted outputs during training.
Experiments summarized in Table 1 and Table 2 use a 5-layer fully connected network with kernel sizes of 3 at each layer, 128 ﬁlters per layer, and leaky ReLUs between layers.
Note that the receptive ﬁeld of this model is only 11 × 11 pixels.
We use batch sizes of 128 instances during training, where each image instance is a cropped 128 × 128 pixels from a larger tile.
Training is and model evaluation is done within the torchgeo framework for geo-spatial machine learning [48].
All models use the AdamW optimizer [24] during training and torchgeo defaults unless otherwise noted.
Comparison to previous label super-resolution for LC mapping To obtain the parameter setting used for the runs in New York (NY) and Pennsylvania (PA) in Table 1, we ﬁrst perform a hyperparameter search with the 20 tiles test set in Delaware (DE) from the same overall dataset.
We use a learning rate schedule that decreases learning rate when the validation loss plateaus, as well as early stopping to prevent over training of models.
Of the grid of learning rates in [1e-3, 1e-4,1e-5], we describe below, we pick learning rate as 1e-4 for both QR and RQ variants of our method, as this is the setting that minimizes the IoU of the 𝑞 output on the 20 DE tiles for both variants.
When training on NY and PA jointly (“Chesapeake” in Table 1), we use the per-state co-occurrence matrices.
This ensure that the co-occurrence matrices used are consistent between our method and the self-epitomic LSR benchmark across all columns in Table 1.
Generalization across cities.
For the high-resolution model with NAIP imagery from Pittsburgh as input, we consider learning rates in { 10 − 2 , 10 − 3 , 10 − 4 , 10 − 5 } and pick based on the best validation performance on the validation set in Pittsburgh.
The chosen learning rate is 1e-3.
We search over the same set of learning rates for the model with NAIP imagery and the prior concatenated as input; the chosen learning rate is also 1e-3.
For this model with concatenated image and prior as input, only the number of input channels changes in the fully connected network model architecture.
When training on the high-resolution land cover labels, we use a very small additive constant 1e-8 for the last layer of the model.
When training our method, we initialize model weights using the best NAIP image input model from the Pittsburgh validation set runs, and then train using the priors and the training procedure described in the main text.
We pick the learning rate for this training step using again the validation set in
Pittsburgh; we search learning rates in { 10 − 3 , 10 − 4 , 10 − 5 } , and pick 1e-5 as the learning rate, since resulted in the best performance for both QR and RQ in the Pittsburgh validation set.
We discuss the results of a similar procedure using randomly initialized model weights in Appendix D.1.4.
For the learned prior, we use a 3 layer fully connected network is kernel sizes of 11,7, 5 respectively, 128 ﬁlters per layer and leaky ReLUs between layers.
For each city, we train this model on the prior inputs (blurred and remapped NLCD, roads, buildings, waterways, and water bodies) using a validation set of 5 tiles separate from from the 10 evaluation tiles in each city.
We considered learning rates in { 10 − 3 , 10 − 4 , 10 − 5 } for learning the prior in each city, and chose 1e-4 as it gave most often resulted in the highest accuracies of each validation set.
For learning on this learned prior, we searched in a condensed space of learning rate in { 10 − 4 , 10 − 5 } , and chose 1e-5 for evaluation runs in each city based on validation set performance in Pittsburgh, PA. [Table]
D.1. A DDITIONAL R ESULTS
[Table]
4 Classes 79. Barren reassigned 79.
Extended results for generalizing across EnviroAtlas cities.
The extended results for generalizing across cities with the EnviroAtlas datasets in Table D.1 contain the results of the RQ runs trained on the handmade prior in each city, and additionally shows the evaluation results in Pittsburgh, PA, to give further context full comparison of generalization across cities by each method.
Table D.1 also details the result of initializing the model weights randomly for the QR method.
For this experiment, we again search over learning rate in [1e-3,1e-4,1e-5] in Pittsburgh, this time resulting in a choice of 1e-4 for the QR evaluation runs and 1e-3 for the RQ evaluation runs.
This seems to be a suboptimal choice of learning rate for the RQ method in other cities (see Table 2), so the most fruitfull comparison between initialization schemes is between the QR variant.
Table D. shows that the choice of model initialization can be important for our method – this is most apparent in Pittsburgh, PA (unsurprisingly since the high-resolution model was trained in Pittsburgh) and
Phoenix, AZ.
In Phoenix, much of the handmade prior is consistent across geographies and the randomly initialized model has trouble distinguishing between infrequent classes that most often occur together in the handmade prior.
The results in Table D.1 suggest that using pre-trained models as a starting point for our method can help to break some of these symmetry issues in resolving the information in the prior.
Results in Table 2 suggest that using a more detailed prior map may help with this as well.
Evaluating the Full US map from [42].
Recall that the row for the full US Map [42] in Tablereﬂects the performance of the model evaluated on all 5 classes we consider in our experiments, where we give the map predictions the “beneﬁt of the doubt” in that any prediction of “impervious surfaces” where the true label is “barren land” gets assigned a correct classiﬁcation of “barren land.”
The results reported in Table 2 are thus a sort of upper bound on the predictive performance of the method that generated the predictive maps.
It was important for us to keep the barren class while evaluating across cities, as it is the dominant class in Phoenix, AZ.
In the remaining three cities, the barren class is challenging to predict as it is infrequent.
In Table D.2, we compare this classiﬁcation scheme with two alternatives: a 5 class scheme that will penalizes the map predictions for never predicts the barren class, and a 4 class scheme that merges the barren land and impervious surfaces classes in evaluation.
Table D.2 shows that while the choice of evaluation scheme does not greatly effect accuracy (outside of Phoenix, AZ, where the accuracy of the Full US Map is low for both classiﬁcation schemes), the average IoU drops signiﬁcantly for all cities apart from Phoenix.
Comparing loss functions: qualitative results with land cover mapping.
Figure D.3 compares predictions under different loss functions with an illustrative example.
Here the prior is similar to the “hand-coded” prior described in Appendix D.1.2, but with the prior deﬁned over all NLCD classes.
We train each model (a slight variant on the network used in experimental results) on the single NAIP tile region encompassing the zoom-in in the ﬁgure for 2000 iterations with the Adam algorithm [20], a batch size of 64, and a learning rate ﬁxed at 1e-4 during training.
Qualitative comparisons show that predictions made by the QR and RQ loss functions are more certain (sharper colors in plots) than training with cross entropy or squared-error loss on the soft priors, and, in in most places, arrive at better solutions than training with a standard cross entropy loss on the argmax of the prior.
E A DDITIONAL EXPERIMENTS E. S ELF - SUPERVISION FOR UNSUPERVISED IMAGE CLUSTERING
Neural networks are usually trained on large amounts of hard-labeled data { 𝑥 𝑖 , ℓ 𝑖 } , yet, due to the biases induced by the typical architectures and learning algorithms, a lot of the modeling power of [Figure] these networks seem to focus on correlations in the input space [46].
This means that a network trained for one application, i.e., for one label space ℓ ∈ 𝐿 1 , can be adopted to another application, i.e., a different labels
space ℓ ∈ 𝐿 2 , as long as the input features are in a similar domain.
The canonical example of this is the use of lower levels of the networks pre-trained on ImageNet as part of the networks solving a completely different set of image classiﬁcation problems.
Pretrained networks require smaller training sets in ﬁne tuning, as long as they have learned to represent the variation in the input space well.
Self-supervised models attempt to go a step further and learn these representations without any labels.
In our framework, self-supervision can simply be seen as the appropriate choice of subset priors 𝑝 ( ℓ 𝑇 ) over appropriately chosen tuples of labels.
To discuss the pitfalls and opportunities, consider the QR loss (4)
[Equation]
If we were to simply set 𝑝 𝑖 ( ℓ ) to a constant (e.g., uniform) distribution 𝑝 ( ℓ ) for all data points 𝑖 , then the optimal solution would be any function 𝑞 𝑖 ( ℓ )
=
𝑞 ( ℓ | 𝑥 𝑖 ) such that 1 𝑁 (cid:205)
𝑖 𝑞 ( ℓ | 𝑥 𝑖 )
= 𝑝 ( ℓ ) .
Thus simply using the uniform prior may not lead to appropriate unsupervised clustering (or selfsupervised learning of the network 𝑞 ).
The inductive biases in the network architecture and training may not help, because one solution is 𝑞 ( ℓ | 𝑥 )
= 𝑝 ( ℓ ) , which can be achieved by zeroing out all weights except for biases in the last softmax layer that outputs probabilities for labels ℓ .
As the softmax bias vector is the closest to the top in gradient descent, it will quickly be learned to match log 𝑝 ( ℓ ) and this will not only slow down the propagation of gradients into the network, but can eventually stop it completely, as this solution is a global optimum.
Another optimal solution would be a function satisfying 1 𝑁 (cid:205)
𝑖 𝑞 ( ℓ | 𝑥 𝑖 )
= 𝑝 ( ℓ ) , but where individual entropies for each data point are small: − (cid:205) ℓ 𝑞 ( ℓ | 𝑥 𝑖 ) log 𝑞 ( ℓ | 𝑥 𝑖 ) < 𝜖 , which motivates an alternative cost criterion
[Equation]
where the ﬁrst term promotes certainty in predictions 𝑞 ( ℓ | 𝑥 𝑖 ) for each point 𝑖 and the second is promoting the diversity of the predictions across the different inputs, i.e., a high entropy of the average𝑁 (cid:205)
ℎ 𝑞 𝑖 ( ℎ ) .
This prevents learning a network with a constant output 𝑞 ( ℎ ) =
𝑝 ( ℎ ) and forces the model to ﬁnd some statistics in the input data that break it into clusters indexed by labels ℓ .
The result will be highly dependent on the inductive biases associated with the network architecture and
SGD method used, as we can imagine degenerate solutions here as well.
For example, we can ignore completely some subset of features and still train a network that is certain in its modeling of the remaining ones, and achieves a high diversity of predicted classes across the dataset.
Obviously, this may be dangerous if the features omitted end up being the most important ones for the downstream task.
However, due to the stochastic gradient descent training as well as their architecture, it has been difﬁcult to prevent neural networks from learning statistics involving all the input features.
For example, training a neural network using a weak generative model as a teacher corresponds to using a simpler mixture model, whose posterior is used as a target 𝑝 𝑖 ( ℓ ) and then learning a neural network that can approximate it.
The inductive bias then leads to networks that do not match 𝑝 𝑖 ( ℓ ) exactly but learn more complex statistics instead.
Equation (7) can be seen as a degenerate example of using a tuple prior where the tuple has the same data point repeated and the prior simply expects the two predictions to be the same.
In many applications, there are natural constraints involving multiple data points that are easily modeled with priors over tuples or over the entire collection of labels.
Consider unsupervised image segmentation, for an example.
It is usually expected that nearby pixels should belong to the same class (or a small subset of classes), and that faraway pixels are more likely to belong to a different subset of classes.
This belief is typically modeled in terms of Markov random ﬁeld models of joint probabilities of labels in the image,
[Equation]
We experimented with potentials of the form
[Equation]
where for pixel 𝑖 , 𝑆 𝑖 is a small ( 5 × 5 ) neighborhood around it and 𝐿 𝑖 is a larger ( 50 × 50 ) neighborhood.
If we set 𝛼 ℓ = 1 , 𝛽 ℓ = − 1 for all ℓ , then we consider this a contrastive prior, as it favors labels ℓ 𝑖 to match the labels found more concentrated in its immediate neighborhood than in the larger scope.
On the other hand 𝛼 ℓ , and 𝛽 ℓ can be estimated based on the current statistics in the label distribution using logistic regression, and we refer to this as a self-similarity prior 𝑝 ({ ℓ 𝑖 } ; 𝛼 ℓ , 𝛽 ℓ , 𝛾 ℓ ) with parameters which are periodically ﬁt to the current statistics in the predictions (cid:205)
𝑗 ∈ 𝑆 𝑖 𝑞 ( ℓ | 𝑥 𝑗 ) , and (cid:205)
𝑗 ∈ 𝐿 𝑖 𝑞 ( ℓ | 𝑥 𝑗 ) to promote similar label patterns across the image.
The criterion (7) can also be seen as a degenerate version of this setting with 𝑆 being 1 × 1 and 𝐿 being inﬁnite (or the whole image).
The contrastive version of this prior relies on the insight previously pursued in image selfsupervision, e.g., [14].
However, contrasting is accomplished without sampling triplets, but considering all the data jointly, simply by expressing the goal of contrasting with far away regions within the prior in our framework.
As an example of self-supervised pretraining in our framework, in Fig.
[-C.
-]E.1 we show an example of clustering of a large tile of aerial imagery into 12 classes using 5 layer FCN as network 𝑞 of the architecture used in §4.4.
The clustering is achieved by updating the prior every 50 steps of gradient descent on batches of 200 256 × 256 patches.
The prior is initialized to a contrasting prior, and then updated through gradient descent.
After 7 iterations, the result is sharpened by continuing training using (7).
This tile was recently used in testing the ﬁne-tuning of a pretrained model with minimal amount of new labels in a new region [43].
Both the pre-training region, the state of Maryland, and the testing region, the tiles in New York State, come from the 4-class Chesapeake Land Cover dataset (§4.3).
Yet, the slight shift in geography results in reduction of accuracy from around 90% in Maryland down to around 72 .
5% in New York.
In [43], various techniques for quick model adaptation are studied, on labels acquirable in up to 15 minutes of human labeling effort per tile.
In Table [-C.
-]E.1 we compare the tunability of our self-supervised models on the four 85km 2 regions tested in [43] with active learning approaches to tuning a pre-trained Maryland model with 400 labeled points.
We show in the table the accuracy and mean intersection over union from [43] for tuning the pretrained model’s last 64 × 4 layer with different active learning strategies for selecting points to be labeled.
A random selection of 400 points for which the labels are provided yields an average accuracy improvement from 72 . 5% to 80 .
On the other hand, recall that we have created an unsupervised segmentation into 12 clusters, with posteriors over the clusters 𝑞 𝑖 ( ℓ ) .
To investigate how well these clusters align with ground truth land cover labels, we compute a simple assignment of clusters to land cover labels.
Given a set of labeled points {( 𝑖, 𝑐 𝑖 )} 𝑖 ∈ 𝐼 , we infer a mapping from clusters to four target labels,
[Equation]
The label of any point 𝑗 can now be inferred as ˆ ℓ 𝑗 = arg max 𝑐 (cid:205)
ℓ 𝑞 𝑖 ( ℓ [Equation] 𝑝 ( 𝑐 |
[Equation] This procedure, using 400 randomly selected labeled points, yields an average accuracy of 81 .
1% (averaged over 50 random collections of labeled points), which is above the performance of the pretrained model tuned on as many randomly selected points, and on par with the more sophisticated methods for point selection and the use of the pretrained model.
(Note that the large model pretrained was trained on a large similar dataset in a nearby state).
(Table E.1).
[Table]
E. T UMOR - INFILTRATING LYMPHOCYTE SEGMENTATION
The setup of this experiments mimics that of the land cover label super-resolution experiment in §4.3.
The training data consists of 50k 240 × 240 crops of H&E-stained histological imagery at 0.5 𝜇 m/px resolution, paired with coarse estimates of the density of tumor-inﬁltrating lymphocytes (TILs) created by a simple classiﬁer, at the resolution of 100 × 100 blocks.
The goal is to produce models for high-resolution TIL segmentation.
Models are evaluated on a held-out set of 1786 images with high-resolution point labels for the center pixel.
The coarse density estimates 𝑐 belong to one of 11 classes, from 0 (no TILs) to 9 (highest estimated
TIL density).
We use an estimated conditional likelihood 𝑝 ( ℓ | 𝑐 ) of the likelihood of the positive
TIL label at pixels with each low-resolution class 𝑐 to construct a prior 𝑝 𝑖 ( ℓ ) over the TIL label probability.
Notice that this prior is the same for all pixels in any given low-resolution, coarsely labeled block.
We train a small CNN with receptive ﬁeld 11 × 11 (ﬁve ReLU-activated convolutional layers with 64 ﬁlters) under the RQ loss against this prior for 200 epochs with learning rate 10 − 5 , then evaluate on the held-out testing set.
Inspired by [28], we apply a spatial blur of 11 pixels to the predicted log-likelihoods (again correcting for the model’s small receptive ﬁeld and the dataset bias). 15 , ..., 𝑝 𝑖 ( ℓ = 1 | 𝑐 = 9 ) = 0 .
The latter gave better results, perhaps due to the bias of the evaluation set, in which every image is known to be centered on a cell of some kind.
[Table] The AUC scores of this model and of the baselines are shown in Table E.2.
Interestingly, the bestperforming models – RQ and epitomic super-resolution (a generative model) – both have receptive ﬁelds of 11 × 11 , much smaller than those of the U-Net and fully supervised CNNs.
This means that prediction of TIL likelihood is possible using only local image data, but the challenge is learning to resolve highly uncertain label information.
Unlike U-Nets and deep CNN autoencoders, small models are not able to learn and overﬁt to distant spurious clues to the classes of nearby pixels.
E. V IDEO SEGMENTATION WITH A STRUCTURED PRIOR
To demonstrate the use of priors with latent structure, we set up the problem of video segmentation as follows.
Given a frame 𝑡 , we tune networks 𝑞 𝑡 ( ℓ 𝑖,𝑡 | 𝑥 𝑖,𝑡 ) predicting one of 𝐿 pixel classes for a pixel at coordinate 𝑖 in frame 𝑡 .
The prior in each frame comes from a Mask R-CNN model [11] pre-trained on still images in the COCO dataset [23].
The Mask R-CNN model ﬁnds several possible instances of objects of different categories and outputs the soft object masks in form of conﬁdence scores for each pixel.
We convert this into a probability distribution over the index 𝑓 (foreground/background) of the form 𝑝 ( 𝑓 𝑖,𝑡 | 𝑚 𝑡 ) , where 𝑚 𝑡 are different detected instances by the model, and the distributions 𝑝 ( 𝑓 𝑖,𝑡 | 𝑚 𝑡 ) are the soft masks for these instances converted to probability distributions, i.e. value of the probability of foreground differs for each pixel and each instance based on the Mask R-CNN conﬁdence scores.
Although the COCO dataset may not have had instances of object of interest in our frame 𝑥 𝑡 , we assume that some admixture of detected instances (likely involving unrelated types of objects) does model reasonably well the foreground segmentation in the frame.
Mathematically, 𝑝 ( 𝑓 𝑖,𝑡 ) =
(cid:205) 𝑚
𝑡 𝑝 ( 𝑓 𝑖,𝑡 | 𝑚 𝑡 ) 𝑝 ( 𝑚 𝑡 ) , where 𝑝 ( 𝑚 𝑡 ) expresses the probabilistic selection of the foreground masks for different instances from which the foreground is constructed.
(One can think of instances 𝑚 𝑡 as topics in topic models, which are also admixture models).
To complete the prior, we ﬁx the distribution 𝑝 ( ℓ | 𝑓 ) as ﬁxed binary 𝐿 × 2 matrix assigning a subset of 𝐿 pixel classes to foreground and the rest to the background.
(For example, we assign ﬁrst 3 classes to foreground and the remaining 5 to the background for a total of L=8 pixel classes).
Therefore,
[Equation]
We can now select the instances 𝑚 𝑡 in each frame by optimizing the free energy with this prior over 𝑝 ( 𝑚 𝑡 ) .
The procedure involves standard variational inference of the posterior distribution over possible instances 𝑚 𝑡 for each pixel 𝑖 in frame 𝑡 which involves the posterior 𝑞 𝑡 ( ℓ 𝑖,𝑡 | 𝑥 𝑖,𝑡 ) .
In practice we found that it is enough to do this inference once, using the network 𝑞 𝑡 − 1 estimated in the previous frame.
This requires the inference of 𝑚 𝑡 for each pixel 𝑖 :
[Equation]
and then optimizing 𝑝 𝑚 𝑡 as the count of times each instance is used,
[Equation]
Selection of instances 𝑚 𝑡 in frame 𝑡 therefore involves comparing the predictions from the network 𝑞 𝑡 ( ℓ 𝑖,𝑡 = ℓ | 𝑥 𝑖,𝑡 ) grouped into foreground/background segmentation with the foreground/background segmentation for different instances from Mask R-CNN, and making a selection of a subset (probabilistically in 𝑝 ( 𝑚 𝑡 ) )
based on which instances most overlap with the predictions from network 𝑞 𝑡 .
While the above two equations should in principle be iterated, and iterated with updates to network 𝑞 𝑡 ( ℓ 𝑖,𝑡 = ℓ | 𝑥 𝑖,𝑡 ) , we found that in practice it is sufﬁcient to just select the instances 𝑚 𝑡 based on their intersection with the network predictions once, at the very beginning, to make a soft ﬁxed prior, and leave it to optimizing the prediction network with the RQ loss to ﬁnd conﬁdent segmentation (Fig. E.2).
We tested the approach on the DAVIS 2016 dataset [37].
The dataset is comprised of 50 unique scenes, accompanied by per-pixel foreground/background segmentation masks.
The objective is to produce foreground segmentation masks for all frames in a scene, given only the ground truth annotations of the ﬁrst frame (Semi-Supervised).
We evaluated our method on the 20-scene validation set at 480p resolution.
The network 𝑞 used in this experiment combines both the pixel intensities and spatial position information for its predictions.
At each pixel location 𝑖, 𝑗 , we augment the intensity information with learned Fourier features [ sin ( 𝑊 [ 𝑖, 𝑗 ] 𝑇 ) , cos ( 𝑊 [ 𝑖, 𝑗 ] 𝑇 )]
𝑇 [47].
The image and spatial position are ﬁrst processed separately; A 4-layer, 64-channel, fully-convolutional network with 3 × 3 kernels,
ReLU activations and Batch Normalization produces the image features.
A 3-layer, 16-channel, pixel-wise MLP with ReLU activations and Batch Normalization processes the learned Fourier features.
These two are concatenated and passed through a single 3 × 3 convolution-ReLU-Batch
Normalization layer before being mapped to output predictions.
We also experimented with adding optical ﬂow as another auxiliary input to the network.
For each scene, the network 𝑞 0 is trained on the ﬁrst frame, using the given ground truth annotations split uniformly between 3 foreground and 5 background classes as prior, for 300 iterations.
This network is then used to predict the foreground pixels in the next frame and after computing the intersection over union between the predicted foreground pixels and the Mask R-CNN output masks, we select masks that overlap more than a pre-speciﬁed threshold.
The chosen masks are then summated, weighted by their Mask R-CNN conﬁdence scores (0-1), to form the prior for the next frame.
The process of selecting masks from the Mask-RCNN predictions and forming the prior for a frame is showcased in Figure E.3.
The network 𝑞 0 is then ﬁne-tuned for 10 iterations to obtain 𝑞 1 and this process repeats for all subsequent frames.
We used the Adam optimizer, with a starting learning rate of 10 − 3 for the ﬁrst frame, reduced to 10 − 5 for ﬁne-tuning, and trained with batches of 128 64 × 64 patches.
To infer the foreground pixels we ﬁrst need a pre-trained the Mask R-CNN on the COCO dataset.
Then, for each scene we only require ∼ 1m of training time on the ground truth-annotated ﬁrst frame and ∼ 3s per every following frame for the entire process of forming the prior and inferring the foreground pixels.
We do not train on any video data, in contrast to most video object segmentation methodologies that rely on both a pre-trained network on static image datasets (such as COCO) and additionally on ofﬂine training on video sequences.
In Table E.3 we compare our results on the
DAVIS 2016 validation set to other video object segmentation algorithms from 2017 - present.
[Table]
E. S EDUCERS SEDUCING S EDUCERS
One of the conclusions from our experiments on EnviroAtlas (§4.4) is that training a network with the goal of generalizing to new input data is often inferior to simply performing in-collection inference.
In other words, given the collection of pairs 𝑥 𝑖 , 𝑝 𝑖 ( ℓ ) , learning the posterior 𝑞 under the implicit generative model is optimized for resolving ambiguities in that collection, and possibly that collection alone.
As pointed out in [28], which performs collection inference using large generative models to mine self-similarity among the examples in the collection, this is appropriate when we can expect our data 𝑥 𝑖 to always come paired with prior beliefs 𝑝 ( ℓ 𝑖 ) .
It is interesting to reconsider the Seducer example from Fig.
The artist created several versions of that painting, and as shown in Fig.
E.4 collection inference applied separately to each of these painting works equally well.
However, using a learned 𝑞 network from one image onto others yields inferior segmentations (Fig.
E.5), as the learned network specialized for inference in the data it saw.
(A fully generative model would similarly overtrain on the input data features 𝑥 𝑖 , as would a supervised neural network trained on hard-labeled pairs ( 𝑥 𝑖 , ℓ 𝑖 ) due to the domain shift.)
Yet, if we know we will always be given collections with beliefs in the form of priors 𝑝 𝑖 ( ℓ ) , local (collection) inference is all we need.
[Figure]