Year: 2019

Abstract:
This paper describes a new form of unsupervised learning, whose input is a set of unlabeled points that are assumed to be local maxima of an unknown value function v in an unknown subset of the vector space. Two functions are learned: (i) a set indicator c, which is a binary classifier, and (ii) a comparator function h that given two nearby samples, predicts which sample has the higher value of the unknown function v. Loss terms are used to ensure that all training samples x are a local maxima of v, according to h and satisfy c(x) = 1. Therefore, c and h provide training signals to each other: a point x′ in the vicinity of x satisfies c(x) = −1 or is deemed by h to be lower in value than x. We present an algorithm, show an example where it is more efficient to use local maxima as an indicator function than to employ conventional classification, and derive a suitable generalization bound. Our experiments show that the method is able to outperform one-class classification algorithms in the task of anomaly detection and also provide an additional signal that is extracted in a completely unsupervised way.

text: This paper describes a new form of unsupervised learning, whose input is a set of unlabeled points that are assumed to be local maxima of an unknown value function v in an unknown subset of the vector space. Two functions are learned: (i) a set indicator c, which is a binary classifier, and (ii) a comparator function h that given two nearby samples, predicts which sample has the higher value of the unknown function v. Loss terms are used to ensure that all training samples x are a local maxima of v, according to h and satisfy c(x) = 1. Therefore, c and h provide training signals to each other: a point x′ in the vicinity of x satisfies c(x) = −1 or is deemed by h to be lower in value than x. We present an algorithm, show an example where it is more efficient to use local maxima as an indicator function than to employ conventional classification, and derive a suitable generalization bound. Our experiments show that the method is able to outperform one-class classification algorithms in the task of anomaly detection and also provide an additional signal that is extracted in a completely unsupervised way.

heading: 1 INTRODUCTION
text: ...from so simple a beginning endless forms most beautiful and most wonderful have been, and are being, evolved. (Darwin, 1859)
When we observe the natural world, we see the “most wonderful” forms. We do not observe the even larger quantity of less spectacular forms and we cannot see those forms that are incompatible with existence. In other words, each sample we observe is the result of optimizing some fitness or value function under a set of constraints: the alternative, lower-value, samples are removed and the samples that do not satisfy the constraints are also missing.
The same principle also holds at the sub-cellular level. For example, a gene can have many forms. Some of them are completely synonymous, while others are viable alternatives. The gene forms that become most frequent are those which are not only viable, but which also minimize the energetic cost of their expression (Farkas et al., 2018). For example, the genes that encode proteins comprised of amino acids of higher availability or that require lower expression levels to achieve the same outcome have an advantage. One can expect to observe most often the gene variants that: (i) adhere to a set of unknown constraints (“viable genes”), and (ii) optimize an unknown value function that includes energetic efficiency considerations.
The same idea, of mixing constraints with optimality, also holds for man-made objects. Consider, for example, the set of houses in a given neighborhood. Each architect optimizes the final built form to cope with various aspects, such as the maximal residential floor area, site accessibility, parking considerations, the energy efficiency of the built product, etc. What architects find most challenging, is that this optimization process needs to correspond to a comprehensive set of state and city regulations that regard, for example, the proximity of the built mass of the house to the lot’s boundaries, or the compliance of the egress sizes with current fire codes.
In another instance, consider the weights of multiple neural networks trained to minimize the same loss on the same training data, each using a different random initialization. Considering the weights of each trained neural network as a single vector in a sample domain, also fits into the framework of local optimality under constraints. By the nature of the problem, the obtained weights are the local optimum of some loss optimization process. In addition, the weights are sometimes subject to constraints, e.g., by using weight normalization.
The task tackled in this paper is learning the value function and the constraints, by observing only the local maxima of the value function among points that satisfy the constraints. This is an unsupervised problem: no labels are given in addition to the samples.
The closest computational problem in the literature is one-class classification (Moya et al., 1993), where one learns a classifier c in order to model a set of unlabeled training samples, all from a single class. In our formulation, two functions are learned: a classifier and a separate value function. Splitting the modeling task between the two, a simpler classifier can be used (we prove this for a specific case) and we also observe improved empirical performance. In addition, we show that the value function, which is trained with different losses and structure from those of the classifier, models a different aspect of the training set. For example, if the samples are images from a certain class, the classifier would capture class membership and the value function would encode image quality. The emergence of a quality model makes sense, since the training images are often homogeneous in their quality.
The classifier c and the value function v provide training signals to each other, in an unsupervised setting, somewhat similar to the way adversarial training is done in GANs (Goodfellow et al., 2014), although the situation between c and v is not adversarial. Instead, both work collaboratively to minimize similar loss functions. Let S be the set of unlabeled training samples from a space X. Every x ∈ S satisfies c(x) = 1 for a classifier c : X → {±1} that models the adherence to the set of constraints (satisfies or not). Alternatively, we can think of c as a class membership function that specifies, if a given input is within the class or not. In addition, we also consider a value function v, and for every point x′, such that ‖x′−x‖ ≤ , for a sufficiently small > 0, we have: v(x′) < v(x). This structure leads to a co-training of v and c, such that every point x′ in the vicinity of x can be used either to apply the constraint v(x′) < v(x) on v, or as a negative training sample for c. Which constraint to apply, depends on the other function: if c(x′) = 1, then the first constraint applies; if v(x′) ≥ v(x), then x′ is a negative sample for c. Since the only information we have on v pertains to its local maxima, we can only recover it up to an unknown monotonic transformation. We therefore do not learn it directly and instead learn a comparator function h, which given two inputs, returns an indication which input has the higher value in v.
An alternative view of the learning problem we introduce considers the value function v (or equivalently h) as part of a density estimation problem, and not as part of a multi-network game. In this view, c is the characteristic function (of belonging to the support) and h is the comparator of the probability density function (PDF).

heading: 2 RELATED WORK
text: The input to our method is a set of unlabeled points. The goal is to model this set. This form of input is shared with the family of methods called one-class classification. The main application of these methods is anomaly detection, i.e., identifying an outlier, given a set of mostly normal (the opposite of abnormal) samples (Chandola et al., 2009).
The literature on one class classification can be roughly divided into three parts. The first includes the classical methods, mostly kernel-base methods, which were applying regularization in order to model the in-class samples in a tight way (Schölkopf et al., 2001). The second group of methods, which follow the advent of neural representation learning, employ classical one-class methods to representations that are learned in an unsupervised way (Hawkins et al., 2002; Sakurada & Yairi, 2014; Xia et al., 2015; Xu et al., 2015; Erfani et al., 2016), e.g., by using autoencoders. Lastly, a few methods have attempted to apply a suitable one-class loss, in order to learn a neural networkbased representation from scratch (Ruff et al., 2018). This loss can be generic or specific to a data domain. Recently, Golan & El-Yaniv (2018) achieved state of the art one-class results for visual datasets by training a network to predict the predefined image transformation that is applied to each
of the training images. A score is then used to evaluate the success of this classifier on test images, assuming that out of class images would be affected differently by the image transformations.
Despite having the same structure of the input (an unlabeled training set), our method stands out of the one-class classification and anomaly detection methods we are aware of, by optimizing a specific model that disentangles two aspects of the data: one aspect is captured by a class membership function, similar to many one-class approaches; the other aspect compares pairs of samples. This dual modeling captures the notion that the samples are not nearly random samples from some class, but also the local maximum in this class. While “the local maxima of in-class points” is a class by itself, a classifier-based modeling of this class would require a higher complexity than a model that relies on the structure of the class as pertaining to local maxima, as is proved, for one example, in Sec. A. In addition to the characterization as local maxima, the factorization between the constraints and the values also assists modeling. This is reminiscent of many other cases in machine learning, where a divide and conquer approach reduces complexity. For example, using prior knowledge on the structure of the problem, helps to reduce the complexity in hierarchical models, such as LDA (Blei et al., 2003).
While we use the term “value function”, and this function is learned, we do not operate in a reinforcement learning setting, where the term value is often used. Specifically, our problem is not inverse reinforcement learning (Ng & Russell, 2000) and we do not have actions, rewards, or policies.

heading: 3 METHOD
text: Recall that S is the set of unlabeled training samples, and that we learn two functions c and v such that for all x ∈ S it holds that: (i) c(x) = 1, and (ii) x is a local maxima of v. For every monotonic function f , the setting we define cannot distinguish between v, and f ◦ v. This ambiguity is eliminated, if we replace v by a binary function h that satisfies h(x,x′) = 1 if v(x) ≥ v(x′) and h(x,x′) = −1 otherwise. We found that training h in lieu of v is considerably more stable. Note that we do not enforce transitivity, when training h, and, therefore, h can be such that no underlying v exists.
3.1 TRAINING c AND h
When training c, the training samples in S = {xi}mi=1 are positive examples. Without additional constraints, the recovery of c is an ill-posed problem. For example, Ruff et al. (2018) add an additional constraint on the compactness of the representation space. Here, we rely on the ability to generate hard negative points1. There are two generators Gc and Gh, each dedicated to generating negative training points to either c or h, as described in Sec. 3.2 below.
The two generators are conditioned on a positive point x ∈ S and each generates one negative point per each x: x′ = Gc(x) and x′′ = Gh(x). The constraints on the negative points are achieved by multiplying two losses: one pushing c(x′) to be negative, and the other pushing h(x′′,x) to be negative.
Let `(p, y) := − 12 ((y+1) log(p)+(1−y) log(1−p)) be the binary cross entropy loss for y ∈ {±1}. c and h are implemented as neural networks trained to minimize the following losses, respectively:
LC := 1
m ∑ x∈S `(c(x), 1) + 1 m ∑ x∈S `(c(Gc(x)),−1) · `(h(Gc(x),x),−1) (1)
LH := 1
m ∑ x∈S `(h(x,x), 1) + 1 m ∑ x∈S `(c(Gh(x)),−1) · `(h(Gh(x),x),−1) (2)
The first sum in LC ensures that c classifies all positive points as positive. The second sum links the outcome of h and c for points generated by Gc. It is given as a multiplication of two losses. This multiplication encourages c to focus on the cases where h predicts with a higher probability that the point Gc(x) is more valued than x.
1“hard negative” is a terminology often used in the object detection and boosting literature, which means negative points that challenge the training process.
Algorithm 1 Training c and h Require: S: positive training points; λ: a trade-off parameter; T : number of epochs.
1: Initialize c, h, Gc and Gh randomly. 2: for i = 1, ..., T do 3: Train Gc for one epoch to minimize −LC 4: Train c for one epoch to minimize LC 5: Train Gh for one epoch to minimize λm ∑ x∈S ||x−Gh(x)|| − LH 6: Train h for one epoch to minimize LH 7: return c, h
The first term of LC (respectively LH ) depends on c’s (respectively h’s) parameters only. The second term of LC (respectively LH ), however, depends on both h’s and c’s parameters as well as Gc’s (respectively Gh’s) parameters.
The loss LH is mostly similar. It ensures that h has positive values when the two inputs are the same, at least at the training points. In addition, it ensures that for the generated negative points x′, h(x′,x) is −1, especially when c(x′) is high. One can alternatively use a symmetric LH , by including an additional term 1 m ∑ x∈S `(c(Gh(x)),−1) · `(h(x, Gh(x)), 1). This, in our experiments, leads to very similar results, and we opt for the slightly simpler version.

heading: 3.2 NEGATIVE POINT GENERATION
text: We train two generators, Gc and Gh, to produce hard negative samples for the training of c and h, respectively. The two generators both receive a point x ∈ S as input, and generate another point in the same space X. They are constructed using an encoder-decoder architecture, see Sec. 3.4 for the exact specifications.
When training Gc, the loss −LC is minimized. In other words, Gc finds, in an adversarial way, points x′, that maximize the error of c (the first term of LC does not involve Gc and does not contribute, when training Gc).
Gh minimizes during training the loss λm ∑
x∈S ||x−Gh(x)|| − LH , for some parameter λ. Here, in addition to the adversarial term, we add a term that encourages Gh(x) to be in the vicinity of x. This is added, since the purpose of h is to compare nearby points, allowing for the recovery of points that are local maxima. In all our experiments we set λ = 1.
The need for two generators, instead of just one, is verified in our ablation analysis, presented in Sec. 4. One may wonder why two are needed. One reason stems from the difference in the training loss: h is learned locally, while c can be applied anywhere. In addition, c and h are challenged by different points, depending on their current state during training. By the structure of the generators, they only produce one point per input x, which is not enough to challenge both c and h.

heading: 3.3 TRAINING PROCEDURE
text: The training procedure follows the simple interleaving scheme presented in Alg. 1. We train the networks in turns: Gc and then c, followed by Gh and then h. Since the datasets in our experiments are relatively small, each turn is done using all mini-batches of the training dataset S. The ADAM optimization scheme is used with mini-batches of size 32.
The training procedure has self regularization properties. For example, assuming that Gh(x) 6= x, LH as a function of h, has a trivial global minima. This solution is to assign h(x′,x) to 1 iff x′ = x. However, for this specific h, the only way for Gh to maximize LH is to rely on c and h being smooth and to select points x′ = Gh(x) that converge to x, at least for some points in x ∈ S. In this case, both `(c(Gh(x)),−1) and `(h(Gh(x),x),−1) will become high, since c(x′) ≈ 1 and h(x′,x) ≈ 1.

heading: 3.4 ARCHITECTURE
text: In the image experiments (MNIST, CIFAR10 and GTSRB), the neural networks Gh and Gc employ the DCGAN architecture of Radford et al. (2015). This architecture consists of an encoder-decoder type structure, where both the encoder and the decoder have five blocks. Each encoder (resp. decoder) block consists of a 2-strided convolution (resp. deconvolution) followed by a batch norm layer, and a ReLU activation. The fifth decoder block consists of a 2-strided convolution followed by a tanh activation instead. c and h’s architectures consist of four blocks of the same structure as for the encoder. This is followed by a sigmoid activation.
For the Cancer Genome Atlas experiment, each encoder (resp. decoder) block consists of a fully connected (FC) layer, a batch norm layer and a Leaky Relay activation (slope of 0.2). Two blocks are used for the encoder and decoder. The encoder’s first FC layer reduces the dimension to 512 and the second to 256. The decoder is built to mirror this. c and h consist of two blocks, where the first FC layer reduces the dimension to 512 and the second to 1. This is followed by a sigmoid activation.

heading: 3.5 ANALYSIS
text: In Appendix A, We show an example in which modeling using local-maxima-points is an efficient way to model, in comparison to the conventional classification-based approach. We then extend the framework of spectral-norm bounds, which were derived in the context of classification, to the case of unsupervised learning using local maxima.

heading: 4 EXPERIMENTS
text: Since we share the same form of input with one-class classification, we conduct experiments using one-class classification benchmarks. These experiments both help to understand the power of our model in capturing a given set of samples, as well as study the properties of the two underlying functions c and h.
Following acceptable benchmarks in the field, specifically the experiments done by Ruff et al. (2018), we consider single classes out of multiclass benchmarks, as the basis of one-class problems. For example, in MNIST, the set S is taken to be the set of all training images of a particular digit. When applying our method, we train h and c on this set. To clarify: there are no negative samples during training.
Post training, we evaluate both c and h on the one class classification task: positive points are now the MNIST test images of the same digit used for training, and negative points are the test images of all other digits. This is repeated ten times, for digits 0–9. In order to evaluate h, which is a binary function, we provide it with two replicas of the test point.
The classification ability is evaluated as the AUC obtained on this classification task. The same experiment was conducted for CIFAR-10 where instead of digits we consider the ten different class labels. The results are reported in Tab. 1, which also states the literature baseline values reported by Ruff et al. (2018). As can be seen, for both CIFAR-10 and MNIST, c strongly captures classmembership, outperforming the baseline results in most cases. h is less correlated with class membership, resulting in much lower mean AUC values and higher standard deviations. However, it should not come as a surprise that h does contain such information.
Indeed, the difference in shape (single input vs. two inputs) between c and h makes them different but not independent. c, as a classifier, strongly captures class membership. We can expect h, which compares two samples, to capture relative properties. In addition, h, due to the way negative samples are collected, is expected to model local changes, at a finer resolution than c. Since it is natural to expect that the samples in the training set would provide images that locally maximize some clarity score, among all local perturbations, one can expect quality to be captured by h.
To test this hypothesis, we considered positive points to be test points of the relevant one-class, and negative points to be points with varying degree of Gaussian noise added to them. We then measure using AUC, the ability to distinguish between these two classes.
As can be seen in Fig. 1, h is much better at identifying noisy images than c, for all noise levels. This property is class independent, and in Fig. 3 (Appendix C), we repeat the experiment for all test images (not just from the one class used during training), observing the same phenomenon.
We employ CIFAR also to perform an ablation analysis comparing the baseline method’s c and h with four alternatives: (i) training c without training h, employing only Gc; (ii) training h and Gh without training c nor Gc; (iii) training both h and c but using only the Gc generator to obtain negative samples to both networks; and (iv) training both h and c but using only the Gh generator for both. The results, which can be seen in Tab. 2, indicate that the complete method is superior to the variants, since it outperform these in the vast majority of the experiments.
Next, we evaluate our method on data from the German Traffic Sign Recognition (GTSRB) Benchmark of Houben et al. (2013). The dataset contains 43 classes, from which one class (stop signs, class #15) was used by Ruff et al. (2018) to demonstrate one-class classification where the negative class is the class of adversarial samples (presumably based on a classifier trained on all 43 classes).
We were not able to obtain these samples by the time of the submission. Instead, We employ the sign data in order to evaluate three other one-class tasks: (i) the conventional task, in which a class is compared to images out of all other 42 classes; (ii) class image vs. noise image, as above, using Gaussian noise with a fixed noise level of σ = 0.2; (iii) same as (ii) only that after training on one class, we evaluate on images from all classes.
The results are presented, for the first 20 classes of GTSRB, in Tab. 3. The reported results are an average over 10 random runs. On the conventional one-class task (i), both our c and h neural networks outperform the baseline Deep-SVDD method, with c performing better than h, as in the MNIST and CIFAR experiments. Also following the same pattern as before, the results indicate that h captures image noise better than both c and Deep-SVDD, for both the test images of the training class and the test images from all 43 classes.
In order to explore the possibility of using the method out of the context of one-class experiments and for scientific data analysis, we downloaded samples from the Cancer Genome Atlas (https: //cancergenome.nih.gov/). The data contains mRNA expression levels for over 22,000 genes, measured from the blood of 9,492 cancer patients. For most of the patients, there is also survival data in days. We split the data to 90% train and 10% test.
We run our method on the entire train data and try to measure whether the functions recovered are correlated with the survival data on the test data. While, as mentioned in Sec. 1, the gene expression optimizes a fitness function, and one can claim that gene expressions that are less fit, indicate an expected shortening in longevity, this argument is speculative. Nevertheless, since survival is the only regression signal we have, we focus on this experiment.
We compare five methods: (i) the h we recover, (ii) the c we recover, (iii) the h we recover, when learning only h and not c, (iv) the c we recover, when learning only c and not h, (v) the first PCA of the expression data, (vi) the classifier of DeepSVDD. The latter is used as baseline due to the shared form of input with our method. However, we do not perform an anomaly detection experiment.
In the simplest experiment, we treat h as a unary function by replicating the single input, as done above. We call this the standard correlation experiment. However, h was trained in order to compare two local points and we, therefore, design the local correlation protocol. First, we identify for each test datapoint, the closest test point. We then measure the difference in the target value (the patient’s survival) between the two datapoints, the difference in value for unary functions (e.g., for c or for the first PCA), or h computed for the two datapoints. This way vectors of the length of the number of test data points are obtained. We use the Pearson correlation between these vectors and the associated p-values as the test statistic.
The results are reported in Tab. 4. As can be seen, the standard correlation is low for all methods. However, for local correlation, which is what h is trained to recover, the h obtained when learning both h and c is considerably more correlated than the other options, obtaining a significant p-value of 0.021. Interestingly, the ability to carve out parts of the space with c, when learning h seems significant and learning h without c results in a much reduced correlation.
Finally, we test our method on the Gaussian Mixture Model data following Balduzzi et al. (2018), who perform a similar experiment in order to study the phenomenon of mode hopping. In this experiment, the data is sampled from 16 Gaussians placed on a 4x4 grid with coordinates −1.5, 0.5,
0.5 and 1.5 in each axis. In our case, since we model local maxima, we take each Gaussian to have a standard deviation that is ten times smaller than that of Balduzzi et al. (2018): 0.01 instead of 0.1. We treat the mixture as a single class and sample a training set from it, to which we apply our methods as well as the variants where each network trains separately.
The results are depicted in Fig. 2, where we present both c and h. As can be seen, our complete method captures with c the entire distribution, while training c without h runs leads to an unstable selection of a subset of the modes. Similarly, training h without c leads to an h function that is much less informative than the one extracted when the two networks are trained together.

heading: 5 DISCUSSION
text: The current machine learning literature focuses on models that are smooth almost everywhere. The label of a sample is implicitly assumed as likely to be the same as those of the nearby samples. In contrast to this curve-based world view, we focus on the cusps. This novel world view could be beneficial also in supervised learning, e.g., in the modeling of sparse events.
Our model recovers two functions: c and h, which are different in form. This difference may be further utilized to allow them to play different roles post learning. Consider, e.g., the problem of drug design, in which one is given a library of drugs. The constraint function c can be used, post training, to filter a large collection of molecules, eliminating toxic or unstable ones. The value function h can be used as a local optimization score in order to search locally for a better molecule.

heading: ACKNOWLEDGEMENTS
text: This project has received funding from the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme (grant ERC CoG 725974). The contribution of Sagie Benaim is part of Ph.D. thesis research conducted at Tel Aviv University.

heading: A ANALYSIS
text: We show an example in which modeling using local-maxima-points is an efficient way to model, in comparison to the conventional classification-based approach. We then extend the framework of spectral-norm bounds, which were derived in the context of classification, to the case of unsupervised learning using local maxima.
A.1 MODELING USING arg max v IS BENEFICIAL
While modeling with a classifier c is commonplace, modeling a set S = {xi}mi=1 as the local maxima of a function is much less conventional. Next, we will argue that at least in some situations, it may be advantageous.
We compare the complexity of a ReLU neural network W2φ(W1x+b) modeling a set S = {xi}mi=1 of m real numbers as either a classifier or as maxima of a value function. Here, W1 and W2 are linear transformations, b is a vector and φ(u1, . . . , un) := (max(0, u1), . . . ,max(0, un)) is the ReLU activation function, for u1, . . . , un ∈ R and n ∈ N. We denote by cS : R → {±1} the function that satisfies, cS(x) = 1 if and only if x ∈ S. For this purpose, we take any distribution D over [x1 − 1, xm + 1] that has positive probability for sampling from S. Formally, D is a mixture distribution that samples at probability q > 0 from D0 and probability 1 − q from D1, where D0 is a distribution supported by S and D1 is a distribution supported by the segment [x1 − 1, xm + 1]. The task is to achieves error ≤ in approximating cS. The error of a function c : R→ R is measured by 1 x∼D[c(x) 6= cS(x)], which is the probability of c incorrectly labeling a random number x ∼ D. We show that there is a ReLU neural network v(x) = W2φ(W1x + b) with 2m neurons, such that, the set of local maxima of v is S. In particular, we have: Ex∼D1 [cv(x) 6= cS(x)] = 0. Here, cv : R → {±1}, that satisfies, cv(x) = 1 if and only if x is a local maxima of v. Additionally,
we show that any such v has at least 2m − 1 hidden neurons. On the other hand, we show that for any distribution D (with the specifications above), any classification neural network c(x) = W2φ(W1x+ b) that has error Ex∼D1 [c(x) 6= cS(x)] ≤ has at least 3m hidden neurons. Theorem 1. Let S = {xi}mi=1 ⊂ R be any set of points such that xi < xi+1 for all i ∈ {1, . . . ,m− 1}. We define cS : R→ {±1} to be the function, such that cS(x) = 1 if and only if x ∈ S. Then,
1. There is a ReLU neural network v : R→ R of the form v(x) = W2φ(W1x+ b) with 2m hidden neurons such that the set of local maximum points of v is S.
2. Any ReLU neural network v : R → R of the form v(x) = W2φ(W1x + b) such that any x ∈ S is a local maxima of v has at least 2m− 1 neurons.
3. Let D = q · D0 ∪ (1 − q) · D1 be a distribution that samples at probability q > 0 from D0 and probability 1− q from D1, where D0 is a distribution supported by S and D1 is a distribution supported by the segment [x1 − 1, xm + 1]. Then, for a small enough > 0, every ReLU neural network c : R → R of the form c(x) = W2φ(W1x + b), such that Ex∼D1 [c(x) 6= cS(x)] ≤ has at least 3m hidden neurons.
Proof. We begin by proving (1). We construct v as follows:
• ∀x ∈ (−∞, x1]: v(x) = x− x1 + 1.
• ∀i ∈ {1, . . . ,m− 1} : ∀x ∈ [xi, xi+xi+12 ]: v(x) = −2 xi+1−xi (x− xi) + 1.
• ∀i ∈ {1, . . . ,m− 1} : ∀x ∈ [xi+xi+12 , xi+1]: v(x) = 1 xi+1−xi (x− xi+1) + 1.
• ∀x ∈ [xm,∞): v(x) = xm − x+ 1.
we consider that v is a piece-wise linear function with 2m linear pieces and arg max v = S. By Thm. 2.2 in Arora et al. (2018), this function can be represented as a ReLU neural network of the form v(x) = W2φ(W1x+ b), that has 2m hidden neurons.
Next, we prove (2). Let v : R → R be a function of the form v(x) = W2φ(W1x + b), such that each x ∈ S is a local maxima of it. First, by Thm. 2.1 in Arora et al. (2018), v is a piece-wise linear function. We claim that v has at least two linear pieces between each consecutive points xi and xi+1, for i ∈ {1, . . . ,m − 1}. Assume the contrary, i.e., there is an index i ∈ {1, . . . ,m − 1}, such that, v has only one piece between xi and xi+1. If v(xi) = v(xi+1), then, v is constant between xi and xi+1, and therefore, xi and xi+1 are not local maximas of v, in contradiction. If v(xi) < v(xi+1), then, because v is linear between xi and xi+1, for every point x ∈ (xi, xi+1), we have v(xi) < v(x), in contradiction to the assumption that xi is a local maxima of v. If v(xi) > v(xi+1), then, because v is linear between xi and xi+1, for every point x ∈ (xi, xi+1), we have v(xi+1) < v(x), in contradiction to the assumption that xi+1 is a local maxima of v. We conclude that v has at least two linear pieces between the points xi and xi+1, for all i ∈ {1, . . . ,m − 1}. Therefore, v has at least 2m pieces. By Thm. 2.2 in Arora et al. (2018), v has at least 2m− 1 hidden neurons. Next, we prove (3). We denote x0 = x1 − 1 and xm+1 = xm + 1. Let PD0 [xi] be the probability of sampling xi from D0. Since D0 is supported by S, we have: q · PD0 [xi] > 0. We define α := qmini∈{1,...,m} PD0 [xi]. In addition, D1 is a continuous distribution supported by the closed segment [x1 − 1, xm + 1]. Thus, by Weierstrass’ extreme value theorem, the probability density function PD1 [x] of D1 that is a continuous function, obtains its extreme values within the segment. In addition, since D1 is supported by [x1 − 1, xm + 1], we have: PD1 [x] > 0 for all x ∈ [x1 − 1, xm + 1]. By combining the above two statements, we conclude that there is a point x∗ ∈ [x1 − 1, xm + 1] such that PD1 [x] ≥ PD1 [x∗] > 0 for every x ∈ [x1 − 1, xm + 1]. We denote by β := (1 − q) mini∈{0,...,m} PD1 [x ∈ (xi, xi+1)] > 0. Since we are interested in proving the claim for a small enough > 0, we can simply assume that < min(α, β) and c : R→ R a ReLU neural network of the form c(x) = W2φ(W1x+ b).
We have:
Ex∼D1 [c(x) 6= cS(x)] = qEx∼D01 [c(x) 6= cS(x)] + (1− q)Ex∼D11 [c(x) 6= cS(x)]
≥ qEx∼D01 [c(x) 6= cS(x)] ≥ α m∑ i=1 1 [c(x) 6= cS(x)] (3)
Assume by contradiction that: c(xi) 6= cS(xi). Then, Ex∼D1 [c(x) 6= cS(x)] ≥ α > in contradiction. Therefore, c(xi) = cS(xi) = 1 for every xi ∈ S. We also have:
Ex∼D1 [c(x) 6= cS(x)] = qEx∼D01 [c(x) 6= cS(x)] + (1− q)Ex∼D11 [c(x) 6= cS(x)] ≥ (1− q)Ex∼D11 [c(x) 6= cS(x)]
(4)
Assume by contradiction that there is i ∈ {1, . . . ,m − 1}, such that the set Ei = {x ∈ (xi, xi+1)|c(x) = 0} is finite. Then,
Ex∼D1 [c(x) 6= cS(x)] ≥ (1− q)Ex∼D11 [c(x) 6= cS(x)] ≥ (1− q)PD1 [x ∈ (xi, xi+1)] ≥ β >
(5)
in contradiction. Let i ∈ {1, . . . ,m − 1}, ai and bi be two points such that xi < ai < bi < xi+1 and c(ai) = c(bi) = 0. Since c is a continuous function and piece-wise linear and the four points (xi, 1), (a, 0), (b, 0), (xi+1, 1) are not co-linear, we conclude that c has at least three linear pieces in the segment [xi, xi+1]. Similarly, c has at least two linear pieces in each of the segments [x1−1, x1] and [xm, xm+1]. We conclude that c has at least 3m+1 pieces. By Thm. 2.2 in Arora et al. (2018), c has at least 3m hidden neurons.
In the above theorem we showed that there exists a ReLU neural network v(x) = W2φ(W1x+ b) with 2m hidden neurons that captures the set S as its local maximas. Furthermore, we note that the set of functions that satisfy these conditions (i.e., shallow ReLU neural networks with 2m hidden neurons that capture the set S) is relatively limited. For instance, any such v behaves as a piecewise linear function between any xi and xi+1 with only two linear pieces. Therefore, any such v is uniquely determined by the set S up to some freedom in the selection of the linear pieces between xi and xi+1 in S. On the other hand, a shallow ReLU neural network v(x) = W2φ(W1x+ b) with more than 2m hidden neurons is capable of having more than two linear pieces between any xi and xi+1.
A.2 A GENERALIZATION BOUND
The following lemma provides a generalization bound that expresses the generalization of learning c along with v. In the following generalization bound, we assume there is an arbitrary distributionD of positive samples. In addition, we parameterize the class, V = {vθ : Rd → R | θ ∈ Θ}, of value functions by vectors of parameters θ ∈ Θ and the class, C = {sign ◦fω : Rd → {±1} | ω ∈ Ω}, of classifiers by ω ∈ Ω. We upper bound the probability of a mistake done by any classifier cω ∈ C and value function vθ ∈ V on a random sample x ∼ D. In this case, vθ and cω mistake if x is not a local maxima of vθ or classified as negative by cω . The upper bound is decomposed into the sum of the average error of cω and vθ on a dataset S
i.i.d∼ Dm and a regularization term. See Appendix B for the exact formulation and the proof.
Lemma 1 (Informal). Let V = {vθ : Rd → R | θ ∈ Θ} be a class of value functions and C = {sign ◦fω : Rd → {±1} | ω ∈ Ω} a class of classifiers. Assume that vθ and fω are ReLU neural networks of fixed architectures, with parameters θ and ω (resp.). Let C(g) is the spectral complexity of the neural network g and N (x) := {u ∈ Rd | ‖u− x‖2 ≤ } an -neighborhood of x. Let D be a distribution of positive examples. With probability at least 1− δ over the selection of
the data S = {xi}mi=1 i.i.d∼ Dm, for every vθ ∈ V and cω ∈ C, we have: Px [ vθ(x) 6= max
u∈N (x) vθ(u) or cω(x) 6= 1 ] ≤ 1 m m∑ i=1 1 [ vθ(xi) 6= max u∈N (xi) vθ(u) or cω(xi) 6= 1 ]
+O √C(vθ) + C(fω) + log (mδ ) m  (6)
The above lemma shows that the probability of x ∼ D to be a local maxima of vθ and classified as a positive example by cω , is at most the sum of the probability of x ∈ S to be a local maxima of vθ and classified as a positive example by cω and a penalty term. The penalty in this case is
of the form O (√
C(vθ)+C(fω)+log(m/δ) m
) , where m is the number of examples in the dataset and
C(vθ) + C(fω) is the sum of the spectral norms of vθ and fω . This suggests a tradeoff between the sum of the spectral complexities of vθ and fω and the ability to generalize. The bound is similar asymptotically to the bounds of Neyshabur et al. (2018) and Bartlett et al. for (multi-class) super-
vised classification. In their bound, the penalty term is of the form O (√
C(f)+log(mδ ) m
) , where
the (multi-class) classifier is of the form c(x) = arg maxi∈{1,...,t} f(x)i, for a neural network f : Rd → Rt. Our analysis focused on the value vθ and not on the comparator h. However, the complexities of the two are expected to be similar, since a value function can be converted to a comparator by employing h(x1,x2) = sign(vθ(x1)− vθ(x2)).

heading: B A FORMAL STATEMENT OF THE GENERALIZATION BOUND
text: In this section, we build upon the theory presented by Neyshabur et al. (2018) and provide a generalization bound that expresses the guarantees of learning c, along with v for a specific setting.
Before we introduce the generalization bound, we introduce the necessary terminology and setup. We assume that the sampling space is a ball of radius B, i.e., X = XB,d := {x ∈ Rd | ||x||2 ≤ B}. Each value function vθ ∈ V is a ReLU neural network of the form vθ(x) = Wrφ(Wr−1φ(. . . φ(W1x)), where, Wi ∈ Rdi×di+1 for i ∈ {1, . . . , r} such that dr+1 := 1 and d1 := d. In addition, φ(x) = (max(0, x1), . . . ,max(0, xn)) is the ReLU activation function extended to all n ∈ N and x ∈ Rn. We denote, θ = (W1, . . . ,Wr). The set C consists of classifiers cω := sign ◦fω such that each function fω : Rd → R is a ReLU neural network of the form fω(x) = Usφ(Us−1φ(. . . φ(U1x)), where, Ui ∈ Rd ′ i×d ′ i+1 for i ∈ {1, . . . , s} such that es+1 := 1 and d′1 := d. We denote ω = (U1, . . . ,Us). Additionally, we denote, q1 := max{di}r+1i=1 and q2 := max{d′i} s+1 i=1 .
The spectral complexity of a ReLU neural network gβ = Vkφ(Vk−1φ(. . . φ(V1x)) with parameters β = (V1, . . . ,Vk) is defined as follows:
C(gβ) := C(β) := k∏ i=1 ||Wi||22 k∑ i=1 ||Wi||2F ||Wi||22
(7)
For two distributions P and Q over a set X, we denote the KL-divergence between them by, DKL(Q||P ) := Ex∼Q[log(Q(x)/P (x))]. For two functions function f, g : R → R, we denote the asymptotic symbols: g(x) = O(f(x)) to specify that g(x) ≤ c · f(x), for some constant c > 0. We denote by 1 [x] the indicator, if a boolean x ∈ {true, false} is true or false. We define a margin loss `γ1,γ2 : X× Ω×Θ→ R of the form:
`γ1,γ2(x;ω, θ) := 1 [ vθ(x) < max
u∈N (x) vθ(u)− γ1 or sign(fω(x)− γ2) 6= 1
] (8)
where, γ1, γ2 > 0 are fixed margins and N (x) := {u | ||u − x||2 ≤ } is the -neighborhood of x, for a fixed > 0. In this model, the margins serve as parameters that dictate the amount of tolerance in classifying an example as positive. Similar to the standard learning framework, for a fixed distribution D over X, the goal of a learning procedure is to return (given some input) ω and θ that minimize the following generalization risk function:
FD[ω, θ] := Ex∼D[`0,0(x;ω, θ)] (9) The learning process has no direct access to the distribution D. Instead, it is provided with a set of m i.i.d samples from D, S = {xi}mi=1
i.i.d∼ Dm. In order to estimate the generalization risk, the empirical risk function is used during training:
F̂ γ1,γ2S [ω, θ] := 1
m m∑ i=1 `γ1,γ2(xi;ω, θ) (10)
The following lemma provides a generalization bound that expresses the generalization of learning c along with h. Lemma 2. Let X := XB,n, V and C be as above. Let D be a distribution of positive examples. With probability at least 1− δ over the selection of the data S = {xi}mi=1
i.i.d∼ Dm, for every vθ ∈ V and cω ∈ C, we have:
FD[θ, ω] ≤ F̂ γ1,γ2S [θ, ω] +O  √√√√B2 [r2q1 log(rq1)C(vθ)γ21 + s2q2 log(sq2)C(fω)γ22 ]+ log (mδ )
m
 (11)
B.1 PROOF OF LEM. 2
All over the proofs, we will make use of two generic classes of functions G = {gθ : X → R2 | θ ∈ Θ} and H = {hω : X → R2 | ω ∈ Ω}. For simplicity, we denote the indices of gθ(x) and hω(x) by −1 and 1 (instead of 1 and 2). Given a target function y : X → {±1} and two functions gθ : X→ R2 and hω : X→ R2, we denote the loss of them with respect to a sample x by:
eγ1,γ2(x; θ, ω) :=1 [ gθ(x)[−y(xi)]− γ1 > gθ(x)[y(xi)] ] ∨ 1 [ hω(x)[−y(xi)]− γ2 > hω(x)[y(xi)]
] (12) The generalization risk: Lγ1,γ2 [θ, ω] := Ex∼D[eγ1,γ2(x; θ, ω)] (13) And the empirical risk:
L̂γ1,γ2 [θ, ω] := 1
m m∑ i=1 eγ1,γ2(xi; θ, ω) (14)
We modify the proof of Lem. 1 in Neyshabur et al. (2018), such that it will fit our purposes. Lemma 3. Let y : X → {±1} be a target function. Let G = {gθ : X → R2 | θ ∈ Θ} and H = {hω : X → R2 | ω ∈ Ω} be two classes class of functions (not necessarily neural networks). Let P1 and P2 be any two distributions on the parameters Θ and Ω (resp.) that are independent of the training data. Then, for any γ1, γ2, δ > 0, with probability≥ 1−δ over the training set of sizem, for any two posterior distributions qθ and qω over Θ and Ω (resp.), such that Pθ′,ω′ [|gθ′(x)−gθ(x)|∞ ≤ γ1 4 and |hω′(x)− hω(x)|∞ ≤ γ2 4 ] ≥ 1 2 , we have:
L0,0[θ, ω] ≤ L̂γ1,γ2 [θ, ω] + 4
√ DKL(qθ||P1) +DKL(qω||P2) + log( 6mδ )
m− 1 (15)
Proof. Let Sγ1,γ2θ,ω ⊂ Θ× Ω be a set with the following properties: Sγ1,γ2θ,ω = { (θ′, ω′) ∈ Θ× Ω ∣∣∣ ∀x ∈ X : |gθ′(x)− gθ(x)|∞ < γ1
4 and |hω′(x)− hω(x)|∞ < γ2 4 } (16)
We construct a distribution Q̃ over Θ× Ω, with probability density function:
q̃(θ′, ω′) = 1
Z
{ qθ(θ
′) · qω(ω′) if (θ′, ω′) ∈ Sγ1,γ2θ,ω 0 otherwise (17)
Here, Z is a normalizing constant. By the assumption in the lemma, Z = P[(θ′, ω′) ∈ Sγ1,γ2θ,ω ] ≥ 1 2 . By the definition of Q̃, we have:
max x∈X |gθ′(x)− gθ(x)|∞ < γ1 4 and max x∈X |hω′(x)− hω(x)|∞ < γ2 4
(18)
Therefore, max x∈X ∣∣∣|gθ′(x)[−1]− gθ′(x)[1]| − |gθ(x)[−1]− gθ(x)[1]|∣∣∣ < γ1 2
(19)
and also, max x∈X ∣∣∣|hω′(x)[−1]− hω′(x)[1]| − |hω(x)[−1]− hω(x)[1]|∣∣∣ < γ2 2
(20)
Since this equation holds uniformly for all x ∈ X, we have:
L0,0[θ, ω] ≤ L γ1 2 , γ2 2
[θ′, ω′]
L̂ γ1 2 , γ2 2
[θ′, ω′] ≤ L̂γ1,γ2 [θ, ω] (21)
Now using the above inequalities together with Eq. 6 in Mcallester (2003), with probability 1 − δ over the training set we have:
L0,0(θ, ω) ≤ Eθ′,ω′L γ1 2 , γ2 2
[θ′, ω′]
≤ Eθ′,ω′L̂ γ1 2 , γ2 2
[θ′, ω′] + 2
√ 2(DKL(q̃||P1 × P2) + log( 2mδ ))
m− 1
≤ L̂γ1,γ2 [θ, ω] + 2
√ 2(DKL(q̃||P1 × P2) + log( 2mδ ))
m− 1
≤ L̂γ1,γ2 [θ, ω] + 4
√ DKL(qθ × qω||P1 × P2) + log( 6mδ )
m− 1
(22)
where the last inequality follows from the following observation.
Let Sc denote the complement set of Sγ1,γ2θ,ω and q̃ c denote the density function q := qθ×qω restricted to Sc and normalized. In addition, we denote p := P1 × P2. Then,
DKL(q||p) = ZDKL(q̃||p) + (1− Z)DKL(q̃c||p)−H(Z) (23)
where H(Z) = −Z logZ − (1 − Z) log(1 − Z) ≤ 1 is the binary entropy function. Since the KL-divergence is always positive, we get,
DKL(q̃||p) = 1
Z [DKL(q||p) +H(Z)− (1− Z)DKL(q̃c||p)] ≤ 2(DKL(q||p) + 1) (24)
Since P1 × P2 are qθ × qω are independent joint distributions, we have: DKL(qθ × qω||P1 × P2) = DKL(qθ||P1) +DKL(qω||P2).
Lemma 4. Let V = {vθ : X → [0, 1] | θ ∈ Θ} be a class of value functions vθ(x) ∈ [0, 1] and C = {cω = sign ◦fω | fω : X → R, ω ∈ Ω} a class of classifiers (not necessarily neural networks). We define two classes of functions G = {gθ = (maxu∈N (x) vθ(u), vθ(x)) | θ ∈ Θ} and H = {hω = (0, fω(x)) | ω ∈ Ω}. Then,
Pθ′,ω′ [ max x∈X |gθ′(x)− gθ(x)|∞ < γ1 4 and max x∈X |hω′(x)− hω(x)|∞ < γ2 4 ] ≥ Pθ′ [ max x∈X |vθ′(x)− vθ(x)| < γ1 4 ] · Pω′ [ max x∈X |fω′(x)− fω(x)| < γ2 4
] (25) where, θ′ ∼ qθ and ω′ ∼ qω .
Proof. We would like to prove that maxx∈X |gθ′(x)−gθ(x)|∞ ≤ γ14 if maxx∈X |vθ′(x)−vθ(x)| ≤γ1 4 and |hω′(x)−hω(x)|∞ ≤ γ2 4 if |fω′(x)− fω(x)| ≤ γ2 4 . Since θ
′ and ω′ are independent, it will prove the desired inequality.
First, we consider that: |gθ′(x)− gθ(x)|∞ = max (∣∣∣ max
u∈N (x) vθ′(x)− max u∈N (x) vθ(x) ∣∣∣, |vθ′(x)− vθ(x)|) ≤ max (∣∣∣ max u∈N (x) vθ′(x)− max u∈N (x) vθ(x) ∣∣∣, γ1 4
) (26) With no loss of generality, we assume that maxu∈N (x) vθ′(x) ≥ maxu∈N (x) vθ(x) and denote x∗ = arg maxu∈N (x) vθ′(x). Therefore, we have:∣∣∣ max
u∈N (x) vθ′(x)− max u∈N (x) vθ(x) ∣∣∣ = max u∈N (x) vθ′(x)− max u∈N (x) vθ(x)
= vθ′(x ∗)− max
u∈N (x) vθ(x)
≤ vθ′(x∗)− vθ(x∗) ≤ γ1 4
(27)
Next, we consider that: |hω′(x)− hω(x)|∞ = max ( |0− 0|, |fω′(x)− fω(x)| ) ≤ γ2
4 (28)
Lemma 5. Let V = {vθ : X → [0, 1] | θ ∈ Θ} be a class of value functions vθ(x) ∈ [0, 1] and C = {cω = sign ◦fω | fω : X → R, ω ∈ Ω} a class of classifiers (not necessarily neural networks). Let P1 and P2 be any two distributions over the parameters Θ and Ω (resp.) that are independent of the training data. Then, for any γ1, γ2, δ > 0, with probability ≥ 1 − δ over the training set of size m, for any two posterior distributions qθ and qω over Θ and Ω (resp.), such that Pθ′∼qθ [|vθ′(x)− vθ(x)| ≤ γ1 4 ] ≥ 1√ 2 and Pω′∼qω [|fω′(x)− fω(x)| ≤ γ2 4 ] ≥ 1√ 2 , we have:
Ex∼D1 [
max u∈N (x)
vθ(u) > vθ(x) or sign(fω(x)) 6= 1 ]
≤ 1 m m∑ i=1 1 [ max u∈N (x) vθ(u)− γ1 > vθ(xi) or sign(fω(xi)− γ2) 6= 1 ]
+ 4
√ DKL(qθ||P1) +DKL(qω||P2) + log( 6mδ )
m− 1
(29)
Proof. Let G andH be as in Lem. 4. By Lem. 4 and our assumption, Pθ′,ω′ [ max x∈X |gθ′(x)− gθ(x)|∞ < γ1 4 and max x∈X |hω′(x)− hω(x)|∞ < γ2 4 ] ≥ 1 2 (30)
We note that all of the samples in D are positive. Therefore, by Lem. 3, with probability at least 1− δ, we have:
Ex∼D1 [ gθ(x)[−1] > gθ(x)[1] or hω(x)[−1] > hω(x)[1] ] ≤ 1 m m∑ i=1 1 [ gθ(xi)[−1]− γ1 > gθ(xi)[1] or hω(xi)[−1]− γ2 > hω(xi)[1] ]
+ 4
√ DKL(qθ||P1) +DKL(qω||P2) + log( 6mδ )
m− 1
(31)
By the definition of gθ: gθ(x)[−1] = maxu∈N (x) vθ(u), gθ(x)[1] = vθ(x). In addition, by the definition of hω: hω(x)[−1] = 0 and hω(x)[1] = fω(x). Therefore, we can rephrase Eq. 31 as
follows:
Ex∼D1 [
max u∈N (x)
vθ(u) > vθ(x) or sign(fω(x)) 6= 1 ]
≤ 1 m m∑ i=1 1 [ max u∈N (x) vθ(u)− γ1 > vθ(xi) or sign(fω(xi)− γ2) 6= 1 ]
+ 4
√ DKL(qθ||P1) +DKL(qω||P2) + log( 6mδ )
m− 1
(32)
Proof of Lem. 2. We apply Lem. 5 with priors P1, P2 and posteriors qθ, qω , distributions similar the proof of Thm. 1 in (Neyshabur et al., 2018). In their proof, they show that for their selection of prior and posterior distributions: (1) Pθ′∼qθ [ maxx∈X |vθ(x)− vθ(x)| < γ14 ] ≥ 1 2 holds and (2) DKL(qθ||P ) = O(dr
2B2q log(rq)C(θ)/γ21). By taking γ1 to be half of the value the use and therefore, σ (from their proof) to be half of the value they use as well, we obtain Pθ′∼qθ [ maxx∈X |vθ(x)− vθ(x)| < γ1/24 ] ≥ 1√ 2 and DKL(qθ||P ) = O(dr2B2q log(rq)C(θ)/γ21). We select P2 and qω in a similar fashion. In particular, we can replace the penalty term in Lem. 5 as follows:
4
√ DKL(qθ||P1) +DKL(qω||P2) + log ( 6m δ ) m− 1
∈O √B2(r2q1 log(rq1)C(vθ)/γ21 + s2q2 log(sq2)C(fω)/γ22) + log (mδ ) m  (33)
C ADDITIONAL FIGURES

Review summaries:
In this paper, the authors focus on the task of learning the value function and the constraints in unsupervised case. Different from the conventional classification-based approach, the proposed algorithm uses local maxima as an indicator function. The functions c and h and two corresponding generators are trained in an adversarial way. Besides, the authors analyzed that the proposed algorithm is more efficient than the conventional classification-based approach, and a suitable generalization bound is given. Overall, this work is theoretically complete and experimentally sufficient.

The reviewer feels that the paper is hard to follow. The abstract is confusing enough and raises a number of questions.  The paper talks about `"local maxima" without defining an optimization problem. What is the optimization problem are we talking about? Is it a maximization problem or minimization problem? If we are dealing with a minimization problem, why do we care about maxima?