Title: OPTIMAL BINARY AUTOENCODING WITH PAIRWISE CORRELATIONS

Abstract: We formulate learning of a binary autoencoder as a biconvex optimization problem which learns from the pairwise correlations between encoded and decoded bits. Among all possible algorithms that use this information, ours finds the autoencoder that reconstructs its inputs with worst-case optimal loss. The optimal decoder is a single layer of artificial neurons, emerging entirely from the minimax loss minimization, and with weights learned by convex optimization. All this is reflected in competitive experimental results, demonstrating that binary autoencoding can be done efficiently by conveying information in pairwise correlations in an optimal fashion.

1. INTRODUCTION:

Consider a general autoencoding scenario, in which an algorithm learns a compression scheme for independently, identically distributed (i.i.d.) V -dimensional bit vector data x(1) , . . . , x(n) . For some encoding dimension H, the algorithm encodes each data example x(i) = (x (i) 1 , . . . ,

x(i) V ) into an H-dimensional representation e (i) , with H < V . It then decodes each e (i) back into a reconstructed example x(i) using some small amount of additional memory, and is evaluated on the quality of the reconstruction by the cross-entropy loss commonly used to compare bit vectors. A good autoencoder learns to compress the data into H bits so as to reconstruct it with low loss.

When the loss is squared reconstruction error and the goal is to compress data in R V to R H , this is often accomplished with principal component analysis (PCA), which projects the input data on the top H eigenvectors of their covariance matrix (Bourlard & Kamp (1988) ; Baldi & Hornik (1989) ). These eigenvectors in R V constitute V H real values of additional memory needed to decode the compressed data in R H back to the reconstructions in R V , which are linear combinations of the eigenvectors. Crucially, this total additional memory does not depend on the amount of data n, making it applicable when data are abundant. This paper considers a similar problem, except using bit-vector data and the cross-entropy reconstruction loss. Since we are compressing samples of i.i.d. V -bit data into H-bit encodings, a natural approach is to remember the pairwise statistics: the V H average correlations between pairs of bits in the encoding and decoding, constituting as much additional memory as the eigenvectors used in PCA. The decoder uses these along with the H-bit encoded data, to produce V -bit reconstructions.

We show how to efficiently learn the autoencoder with the worst-case optimal loss in this scenario, without any further assumptions, parametric or otherwise. It has some striking properties.

The decoding function is identical in form to the one used in a standard binary autoencoder with one hidden layer (Bengio et al. (2013a) ) and cross-entropy reconstruction loss. Specifically, each bit v of the decoding is the output of a logistic sigmoid artificial neuron of the encoded bits, with some learned weights w v ∈ R H . This form emerges as the uniquely optimal decoding function, and is not assumed as part of any explicit model.

We show that the worst-case optimal reconstruction loss suffered by the autoencoder is convex in these decoding weights W = {w v } v∈ [V ] , and in the encoded representations E. Though it is not jointly convex in both, the situation still admits a natural and efficient optimization algorithm in which the loss is alternately minimized in E and W while the other is held fixed. The algorithm is practical and performs well empirically, learning incrementally from minibatches of data in a stochastic optimization setting.

1.1. NOTATION:

The observed data and encodings can be written in matrix form, representing bits as ±1:

X =    x(1) 1 • • • x(n) 1 . . . . . . . . . x(1) V • • • x(n) V    ∈ [-1, 1] V ×n , E =    e (1) 1 • • • e (n) 1 . . . . . . . . . e (1) H • • • e (n) H    ∈ [-1, 1] H×n (1)

Here the encodings are allowed to be randomized, represented by values in [-1, 1] instead of just the two values {-1, 1}; e.g. e

(1) i = 1 2 is +1 w.p. 3 4 and -1 w.p. 1 4 . The data in X are also allowed to be randomized, which we will see essentially loses no generality (Appendix B). We write the columns of X, E as x(i) , e (i) for i ∈ [n] (where [s] := {1, . . . , s}), representing the data. The rows are written

as xv = (x (1) v , . . . , x (n) v ) for v ∈ [V ] and e h = (e (1) h , . . . , e (n) h ) for h ∈ [H].

We also consider the correlation of each bit h of the encoding with each decoded bit v over the data, i.e. b v,h :=

1 n n i=1 x (i) v e (i)

h . This too can be written in matrix form as B := 1 n XE ∈ R V ×H , whose rows and columns we respectively write as b H] ; the indexing will be clear from context.

v = (b v,1 , . . . , b v,H ) over v ∈ [V ] and b h = (b 1,h , . . . , b V,h ) over h ∈ [

As alluded to earlier, the loss incurred on any example x (i) is the cross-entropy between the example and its reconstruction x(i) , in expectation over the randomness in x (i) . Defining ± (x

(i) v ) = ln 2 1±x (i) v

(the partial losses to true labels ±1), the loss is written as:

EQUATION

In addition, define a potential well Ψ(m) := ln (1 + e m ) + ln (1 + e -m ) with derivative Ψ (m) :=

1-e -m 1+e -m . Univariate functions like this are applied componentwise to matrices in this paper.

1.2. PROBLEM SETUP:

With these definitions, the autoencoding problem we address can be precisely stated as two tasks, encoding and decoding. These share only the side information B. Our goal is to perform these steps so as to achieve the best possible guarantee on reconstruction loss, with no further assumptions. This can be written as a zero-sum game of an autoencoding algorithm seeking to minimize loss against an adversary, by playing encodings and reconstructions:

• Using X, algorithm plays (randomized) encodings E, resulting in pairwise correlations B.

• Using E and B, algorithm plays reconstructions X = x(1) ; . .

. ; x(n) ∈ [-1, 1] V ×n .

• Given X, E, B, adversary plays X ∈ [-1, 1] V ×n to maximize reconstruction loss

1 n n i=1 (x (i) , x(i) ).

To incur low loss, the algorithm must use an E and B such that no adversary playing X can inflict higher loss. The algorithm never sees X, which represents the worst the data could be given the algorithm's incomplete memory of it (E, B) and reconstructions ( X).

We find the autoencoding algorithm's best strategy in two parts. First, we find the optimal decoding function of any encodings E given B, in Section 2. Then, we use the resulting optimal reconstruction function to outline the best encoding procedure, i.e. one that finds the E, B that lead to the best reconstruction, in Section 3.1. Combining these ideas yields an autoencoding algorithm in Section 3.2 (Algorithm 1), where its implementation and interpretation are specified. Further discussion and related work in Section 4 are followed by more extensions of the framework in Section 5. Experiments in Section 6 show extremely competitive results with equivalent fully-connected autoencoders trained with backpropagation.

2. OPTIMALLY DECODING AN ENCODED REPRESENTATION:

To address the game of Section 1.2, we first assume E and B are fixed, and derive the optimal decoding rule given this information. We show in this section that the form of this optimal decoder is precisely the same as in a classical autoencoder: having learned a weight vector

w v ∈ R H for each v ∈ [V ]

, the v th bit of each reconstruction xi is expressed as a logistic function of a w v -weighted combination of the H encoded bits e i -a logistic artificial neuron with weights w v . The weight vectors are learned by convex optimization, despite the nonconvexity of the transfer functions.

To develop this, we minimize the worst-case reconstruction error, where X is constrained by our prior knowledge that

B = 1 n XE , i.e. 1 n Ex v = b v ∀v ∈ [V ]

. This can be written as a function of E:

EQUATION

We solve this minimax problem for the optimal reconstructions played by the minimizing player in (3), written as x(1) * , . . . , x(n) * . 

v := w * v (E, B) := arg min w∈R H γ E (w, b v ).

Then the minimax value of the game

(3) is L * B (E) = 1 2 V v=1 γ E (w * v , b v ). For any example i ∈ [n],

the minimax optimal reconstruction can be written for any bit v as i) .

x(i) * v := 1-e -w * v e (i) 1+e -w * v e (

This tells us that the optimization problem of finding the minimax optimal reconstructions x(i) is extremely convenient in several respects. The learning problem decomposes over the V bits in the decoding, reducing to solving for a weight vector w * v ∈ R H for each bit v, by optimizing each bitwise slack function. Given the weights, the optimal reconstruction of any example i can be specified by a layer of logistic sigmoid artificial neurons of its encoded bits, with w * v e (i) as the bitwise logits.

Hereafter, we write W ∈ R V ×H as the matrix of decoding weights, with rows {w v } V v=1 . In particular, the optimal decoding weights W * (E, B) are the matrix with rows {w

* v (E, B)} V v=1 .

3 LEARNING AN AUTOENCODER

3.1. FINDING AN ENCODED REPRESENTATION:

Having computed the optimal decoding function in the previous section given any E and B, we now switch perspectives to the encoder, which seeks to compress the input data X into encoded representations E (from which B is easily calculated to pass to the decoder). We seek to find (E, B) to ensure the lowest worst-case reconstruction loss after decoding; recall that this is L * B (E) from (3). Observe that 1 n XE = B by definition, and that the encoder is given X. Therefore, by using Thm. 1 and substituting b

EQUATION

So it is convenient to define the feature distortion1 for any v ∈ [V ] with respect to W, between any example x and its encoding e:

EQUATION

From the above discussion, the best E given any decoding W, written as E * (W), solves the minimization

min E∈[-1,1] H×n L(W, E) = 1 2n n i=1 min e (i) ∈[-1,1] H V v=1 β W v (e (i) , x(i) )

which immediately yields the following result. Proposition 2. Define the optimal encodings for decoding weights W as E * (W) := arg min

E∈[-1,1] H×n L(W, E)

. Then e (i) * (W) can be computed separately for each example x(i) ∈

[-1, 1] V , minimizing its total feature distortion over the decoded bits w.r.t. W:

EQUATION

Observe that the encoding function ENC(x (i) ; W) can be efficiently computed to any desired precision since the feature distortion β W v (e, x(i) ) of each bit v is convex and Lipschitz in e; an L 1 error of can be reached in O( -2 ) linear-time first-order optimization iterations. Note that the encodings need not be bits, and can be e.g. unconstrained ∈ R H instead; the proof of Thm. 1 assumes no structure on them, and the optimization will proceed as above but without projecting into the hypercube.

3.2. AN AUTOENCODER LEARNING ALGORITHM:

Our ultimate goal is to minimize the worst-case reconstruction loss. As we have seen in ( 3) and ( 6), it is convex in the encoding E and in the decoding parameters W, each of which can be fixed while minimizing with respect to the other. This suggests a learning algorithm that alternately performs two steps: finding encodings E that minimize L(W, E) as in ( 6) with a fixed W, and finding decoding parameters W * (E, B), as given in Algorithm 1.

Algorithm 1 Pairwise Correlation Autoencoder (PC-AE):

Input: Size-n dataset X, number of epochs T Initialize W 0 (e.g. with each element being i.i.d. ∼ N (0, 1)) for t = 1 to T do

Encode each example to ensure accurate reconstruction using weights W t-1 , and compute the associated pairwise bit correlations B t :

∀i ∈ [n] : [e (i) ] t = ENC(x (i) ; W t-1 ) , B t = 1 n XE t Update weight vectors [w v ] t for each v ∈ [V ] to minimize slack function, using encodings E t : ∀v ∈ [V ] : [w v ] t = arg min w∈R H -[b v ] t w + 1 n n i=1 Ψ(w e (i) t )

end for Output: Weights W T

3.3. EFFICIENT IMPLEMENTATION:

Our derivation of the encoding and decoding functions involves no model assumptions at all, only using the minimax structure and pairwise statistics that the algorithm is allowed to remember. Nevertheless, the (en/de)coders can be learned and implemented efficiently.

Decoding is a convex optimization in H dimensions, which can be done in parallel for each bit So far in this paper, we have stated our results in the transductive setting, in which all data are given together a priori, with no assumptions whatsoever made about the interdependences between the V features. However, PC-AE operates much more efficiently than this might suggest. Crucially, the encoding and decoding tasks both depend on n only to average a function of x (i) or e (i) over i ∈ [n], so they can both be solved by stochastic optimization methods that use first-order gradient information, like variants of stochastic gradient descent (SGD). We find it remarkable that the minimax optimal encoding and decoding can be efficiently learned by such methods, which do not scale computationally in n. Note that the result of each of these steps involves Ω(n) outputs (E and X), which are all coupled together in complex ways. Furthermore, efficient first-order convex optimization methods for both encoding and decoding steps manipulate more intermediate gradient-related quantities, with facile interpretations. For details, see Appendix A.2.

v ∈ [V ].

3.4. CONVERGENCE AND WEIGHT REGULARIZATION:

As we noted previously, the objective function of the optimization is biconvex. This means that the alternating minimization algorithm we specify is an instance of alternating convex search, shown in that literature to converge under broad conditions (Gorski et al. (2007) ). It is not guaranteed to converge to the global optimum, but each iteration will monotonically decrease the objective function. In light of our introductory discussion, the properties and rate of such convergence would be interesting to compare to stochastic optimization algorithms for PCA, which converge efficiently under broad conditions (Balsubramani et al. (2013) ; Shamir (2016) ).

The basic game used so far has assumed perfect knowledge of the pairwise correlations, leading to equality constraints ∀v ∈ [V ] :

1 n Ex v = b v .

This makes sense in PC-AE, where the encoding phase of each epoch gives the exact B t for the decoding phase. However, in other stochastic settings as for denoising autoencoders (see Sec. 5.2), it may be necessary to relax this constraint. A relaxed constraint of 1 n Ex v -b v ∞ ≤ exactly corresponds to an extra additive regularization term of w v 1 on the corresponding weights in the convex optimization used to find W (Appendix D.1). Such regularization leads to provably better generalization (Bartlett (1998)) and is often practical to use, e.g. to encourage sparsity. But we do not use it for our PC-AE experiments in this paper.

4. DISCUSSION AND RELATED WORK:

Our approach PC-AE is quite different from existing autoencoding work in several ways.

First and foremost, we posit no explicit decision rule, and avoid optimizing the highly non-convex decision surface traversed by traditional autoencoding algorithms that learn with backpropagation (Rumelhart et al. (1986) ). The decoding function, given the encodings, is a single layer of artificial neurons only because of the minimax structure of the problem when minimizing worst-case loss. This differs from reasoning typically used in neural net work (see Jordan (1995)), in which the loss is the negative log-likelihood (NLL) of the joint probability, which is assumed to follow a form specified by logistic artificial neurons and their weights. We instead interpret the loss in the usual direct way as the NLL of the predicted probability of the data given the visible bits, and avoid any assumptions on the decision rule (e.g. not monotonicity in the score w v e (i) , or even dependence on such a score). This justification of artificial neurons -as the minimax optimal decision rules given information on pairwise correlations -is one of our more distinctive contributions (see Sec. 5.1).

Crucially, we make no assumptions whatsoever on the form of the encoding or decoding, except on the memory used by the decoding. Some such "regularizing" restriction is necessary to rule out the autoencoder just memorizing the data, and is typically expressed by assuming a model class of compositions of artificial neuron layers. We instead impose it axiomiatically by limiting the amount of information transmitted through B, which does not scale in n; but we do not restrict how this information is used. This confers a clear theoretical advantage, allowing us to attain the strongest robust loss guarantee among all possible autoencoders that use the correlations B. 2016)), and when the number of hidden units is varied by the algorithm (Bengio et al. (2005) ; Bach (2014)).

Our approach also isolates the benefit of higher n in dealing with overfitting, as the pairwise correlations B can be measured progressively more accurately as n increases. In this respect, we follow a line of research using such pairwise correlations to model arbitary higher-order structure among visible units, rooted in early work on (restricted) Boltzmann Machines (Ackley et al. (1985) ; Smolensky (1986) ; Rumelhart & McClelland (1987) ; Freund & Haussler (1992) ). More recently, theoretical algorithms have been developed with the perspective of learning from the correlations between units in a network, under various assumptions on the activation function, architecture, and weights, for both deep (Arora et al. (2014) ) and shallow networks (using tensor decompositions, e.g. Livni et al. (2014) ; Janzamin et al. ( 2015)). Our use of ensemble aggregation techniques (from Balsubramani & Freund (2015a; 2016) ) to study these problems is anticipated in spirit by prior work as well, as discussed at length by Bengio (2009) in the context of distributed representations.

4.1. OPTIMALITY, OTHER ARCHITECTURES, AND DEPTH:

We have established that a single layer of logistic artificial neurons is an optimal decoder, given only indirect information about the data through pairwise correlations. This is not a claim that autoencoders need only a single-layer architecture in the worst case. Sec. 3.1 establishes that the best representations E are the solution to a convex optimization, with no artificial neurons involved in computing them from the data. Unlike the decoding function, the optimal encoding function ENC cannot be written explicitly in terms of artificial neurons, and is incomparable to existing architectures (though it is analogous to PCA in prescribing an efficient operation that yields the encodings from unlabeled data). Also, the encodings are only optimal given the pairwise correlations; training algorithms like backpropagation, which communicate other knowledge of the data through derivative composition, can learn final decoding layers that outperform ours, as we see in experiments.

In our framework so far, we explore using all the pairwise correlations between hidden and visible bits to inform learning by constraining the adversary, resulting in a Lagrange parameter -a weightfor each constraint. These V H weights W constitute the parameters of the optimal decoding layer, describing a fully connected architecture. If just a select few of these correlations were used, only they would constrain the adversary in the minimax problem of Sec. 2, so weights would only be introduced for them, giving rise to sparser architectures.

Our central choices -to store only pairwise correlations and minimize worst-case reconstruction loss -play a similar regularizing role to explicit model assumptions, and other autoencoding methods may achieve better performance on data for which these choices are too conservative, by e.g. making distributional assumptions on the data. From our perspective, other architectures with more layers -particularly highly successful ones like convolutional, recurrent, residual, and ladder networks (LeCun et al. (2015) ; He et al. (2015) ; Rasmus et al. (2015) ) -lend the autoencoding algorithm more power by allowing it to measure more nuanced correlations using more parameters, which decreases the worst-case loss. Applying our approach with these would be interesting future work.

Extending this paper's convenient minimax characterization to deep representations with empirical success is a very interesting open problem. Prior work on stacking autoencoders/RBMs (Vincent et al. (2010) ) and our learning algorithm PC-AE suggest that we could train a deep network in alternating forward and backward passes. Using this paper's ideas, the forward pass would learn the weights to each layer given the previous layer's activations (and inter-layer pairwise correlations) by minimizing the slack function, with the backward pass learning the activations for each layer given the weights to / activations of the next layer by convex optimization (as we learn E). Both passes would consist of successive convex optimizations dictated by our approach, quite distinct from backpropagation, though loosely resembling the wake-sleep algorithm (Hinton et al. (1995) ).

4.2. GENERATIVE APPLICATIONS:

Particularly recently, autoencoders have been of interest largely for their many applications beyond compression, especially for their generative uses. The most directly relevant to us involve repurposing denoising autoencoders (Bengio et al. (2013b) ; see Sec. 5.2); moment matching among hidden and visible units (Li et al. (2015) ); and generative adversarial network ideas (Goodfellow et al. (2014) ; Makhzani et al. (2015) ), the latter particularly since the techniques of this paper have been applied to binary classification (Balsubramani & Freund (2015a; b) ). These are outside this paper's scope, but suggest themselves as future extensions of our approach.

5. EXTENSIONS:



5.1. OTHER RECONSTRUCTION LOSSES:

It may make sense to use another reconstruction loss other than cross-entropy, for instance the expected Hamming distance between x (i) and x(i) . It turns out that the minimax manipulations we use work under very broad conditions, for nearly any loss that additively decomposes over the V bits as cross-entropy does. In such cases, all that is required is that the partial losses + (x

(i) v ), -(x (i)

v ) are monotonically decreasing and increasing respectively (recall that for cross-entropy loss, this is true as

± (x (i) v ) = ln 2 1±x (i) v

); they need not even be convex. This monotonicity is a natural condition, because the loss measures the discrepancy to the true label, and holds for all losses in common use.

Changing the partial losses only changes the structure of the minimax solution in two respects: by altering the form of the transfer function on the decoding neurons, and the univariate potential well Ψ optimized to learn the decoding weights. Otherwise, the problem remains convex and the algorithm is identical. Formal statements of these general results are in Appendix E.

5.2. DENOISING AUTOENCODING:

Our framework can be easily applied to learn a denoising autoencoder (DAE; Vincent et al. (2008; 2010) ), which uses noise-corrupted data (call it Ẋ) for training, and uncorrupted data for evaluation. From our perspective, this corresponds to leaving the learning of W unchanged, but using corrupted data when learning E. Consequently, the minimization problem over encodings must be changed to account for the bias on B introduced by the noise; so the algorithm plays given the noisy data, but to minimize loss against X. This is easiest to see for zero-mean noise, for which our algorithms are completely unchanged because B does not change (in expectation) after the noise is added.

Another common scenario illustrating this technique is to mask a ρ fraction of the input bits uniformly at random (in our notation, changing 1s to -1s). This masking noise changes each pairwise correlation b v,h by an amount δ v,h :=

1 n n i=1 ( ẋ(i) v -x (i) v )e (i)

h . Therefore, the optimand Eq. ( 4) must be modified by subtracting this factor δ v,h . This δ v,h can be estimated (w.h.p.) given ẋv , e h , ρ, x v . But even with just the noisy data and not x v , we can estimate δ v,h w.h.p. by extrapolating the correlation of the bits of ẋv that are left as +1 (a 1 -ρ fraction) with the corresponding values in e h (see Appendix C). 

6. EXPERIMENTS:

In this section we compare our approach2 empirically to a standard autoencoder with one hidden layer (termed AE here) trained with backpropagation, and a thresholded PCA baseline. Our goal is simply to verify that our approach, though very different, is competitive in reconstruction performance.

The datasets we use are first normalized to [0, 1], and then binarized by sampling each pixel stochastically in proportion to its intensity, following prior work (Salakhutdinov & Murray (2008) ). Changing between binary and real-valued encodings in PC-AE requires just a line of code, to project the encodings into [-1, 1] H after convex optimization updates to compute ENC(•). We use Adagrad (Duchi et al. (2011) ) for the convex minimizations of our algorithms; we observed that their performance is not very sensitive to the choice of optimization method, explained by our approach's convexity.

We compare to a basic AE with a single hidden layer, trained using the Adam method with default parameters (Kingma & Ba (2014) ). Other models like variational autoencoders (Kingma & Welling (2013) ) are not shown here because they do not aim to optimize reconstruction loss or are not comparably general autoencoding architectures. We also use a sign-thresholded PCA baseline (essentially a completely linear autoencoder, but with the output layer thresholded to be in [-1, 1]); see Appendix A for more details. We vary the number of hidden units H for all algorithms, and try both binary and unconstrained real-valued encodings where appropriate; the respective AE uses logistic sigmoid and ReLU transfer functions for the encoding neurons. The results are in Table 1 .

The reconstruction performance of PC-AE indicates that it can encode information very well using pairwise correlations, compared to the directly learned AE and PCA approaches. Loss can become extremely low when H is raised, giving B the capacity to robustly encode almost all the information in the input bits X. The performance is roughly equal between binary hidden units and unconstrained ones, which is expected by our derivations.

We also try learning just the decoding layer of Sec. 2, on the encoded representation of the AE. This is motivated by the fact that Sec. 2 establishes our decoding method to be worst-case optimal given any E and B. We find the results to be significantly worse than the AE alone in all datasets used (e.g. reconstruction loss of ∼ 171/133 on MNIST, and ∼ 211/134 on Omniglot, with 32/100 hidden units respectively). This reflects the AE's training backpropagating information about the data beyond pairwise correlations, through non-convex function compositions -however, this comes at the cost of being more difficult to optimize. The representations learned by the ENC function of PC-AE are quite different and capture much more of the pairwise correlation information, which is used by the decoding layer in a worst-case optimal fashion. We attempt to visually depict the differences between the representations in Fig. 3 .

As discussed in Sec. 4, we do not claim that this paper's method will always achieve the best empirical reconstruction loss, even among single-layer autoencoders. We would like to make the encoding function quicker to compute, as well. But we believe this paper's results, especially when H is high, illustrate the potential of using pairwise correlations for autoencoding as in our approach, learning to encode with alternating convex minimization and extremely strong worst-case robustness guarantees. A EXPERIMENTAL DETAILS

In addition to MNIST, we use the preprocessed version of the Omniglot dataset found in Burda et al. (2016) , split 1 of the Caltech-101 Silhouettes dataset, the small notMNIST dataset, and the UCI Adult (a1a) dataset. The results reported are the mean of 10 Monte Carlo runs, and the PC-AE significance results use 95% Monte Carlo confidence intervals. Only notMNIST comes without a predefined split, so the displayed results use 10-fold cross-validation. Non-binarized versions of all datasets (grayscale pixels) resulted in nearly identical PC-AE performance (not shown); this is as expected from its derivation using expected pairwise correlations, which with high probability are nearly invariant under binarization (by e.g. Hoeffding bounds).

We used minibatches of size 250. All standard autoencoders use the 'Xavier' initialization and trained for 500 epochs or using early stopping on the test set. The "PCA" baseline was run on exactly the same input data as the others; it finds decodings by mean-centering this input, finding the top H principal components with standard PCA, reconstructing the mean-centered input with these components, adding back the means, and finally thresholding the result to [-1, 1] V .

We did not evaluate against other types of autoencoders which regularize (Kingma & Welling (2013) ) or are otherwise not trained for direct reconstruction loss minimization. Also, not shown is the performance of a standard convolutional autoencoder (32-bit representation, depth-3 64-64-32 (en/de)coder) which performs better than the standard autoencoder, but is still outperformed by PC-AE on our image-based datasets. A deeper architecture could quite possibly achieve superior performance, but the greater number of channels through which information is propagated makes fair comparison with our flat fully-connected approach difficult. We consider extension of our PC-AE approach to such architectures to be fascinating future work.

A.1 FURTHER RESULTS:

Our bound on worst-case loss is invariably quite tight, as shown in Fig. 4 . Similar results are found on all datasets. This is consistent with our conclusions about the nature of the PC-AE representations -conveying almost exactly the information available in pairwise correlations. A 2D visualization of MNIST is in Fig. 6 , showing that even with just two hidden units there is enough information in pairwise correlations for PC-AE to learn a sensible embedding. We also include more pictures of our autoencoders' reconstructions, and visualizations of the hidden units when H = 100 in Fig. 5 . 

A.2 PC-AE INTERPRETATION AND IMPLEMENTATION DETAILS:

Here we give some details that are useful for interpretation and implementation of the proposed method. -x (i) v w v e (i) + Ψ(w v e (i) )

Doing this on multiple examples at once (in memory as a minibatch) can be much faster than on each example separately. We can now compute the gradient of the objective function w.r.t. each example i ∈ [n], writing the gradient w.r.t. example i as column i of a matrix G ∈ R H×n . G can be calculated efficiently in a number of ways, for example as follows:

• Compute matrix of hallucinated data X := Ψ (WE) ∈ R V ×n .

• Subtract X to compute residuals R := X -X ∈ R V ×n .

• Compute G = 1 n W R ∈ R H×n . Optimization then proceeds with gradient descent using G, with the step size found using line search. Note that since the objective function is convex, the optimum E * leads to optimal residuals R * ∈ R V ×n such that G = 1 n W R * = 0 H×n , so each column of R * is in the null space of W , which maps the residual vectors to the encoded space. We conclude that although the compression is not perfect (so the optimal residuals R * = 0 V ×n in general), each column of R * is orthogonal to the decoding weights at an equilibrium towards which the convex minimization problem of ( 7) is guaranteed to stably converge.

A.2.2 DECODING:

The decoding step finds W to ensure accurate decoding of the given encodings E with correlations B, solving the convex minimization problem:

EQUATION

This can be minimized by first-order convex optimization. The gradient of (8) at W is:

EQUATION

F ALTERNATE APPROACHES

We made some technical choices in the derivation of PC-AE, which prompt possible alternatives not explored here for a variety of reasons. Recounting these choices gives more insight into our framework.

The output reconstructions could have restricted pairwise correlations, i.e. 1 n XE = B. One option is to impose such restrictions instead of the existing constraints on X, leaving X unrestricted. However, this is not in the spirit of this paper, because B is our means of indirectly conveying information to the decoder about how X is decoded.

Another option is to restrict both X and X. This is possible and may be useful in propagating correlation information between layers of deeper architectures while learning, but its minimax solution does not have the conveniently clean structure of the PC-AE derivation.

In a similar vein, we could restrict E during the encoding phase, using B and X. As B is changed only during this phase to better conform to the true data X, this tactic fixes B during the optimization, which is not in the spirit of this paper's approach. It also performed significantly worse in our experiments.

:

Noting that Ψ(w v e) ≈ w v e , we see that β W v (e, x) ≈ w v e sgn(w v e) -xv . So the optimizer tends to change e so that w v e matches signs with xv, motivating the name.

TensorFlow code available at https://github.com/aikanor/pc-autoencoder .

Figures and Tables:

Define the bitwise slack function γ E (w, b) := -b w + 1 n n i=1 Ψ(w e (i) ), which is convex in w. W.r.t. any b v , this has minimizing weights w *

More importantly in practice, avoiding an explicit model class means that we do not have to optimize the typically non-convex model, which has long been a central issue for backpropagation-based learning methods (e.g. Dauphin et al. (2014)). Prior work related in spirit has attempted to avoid this through convex relaxations, including for multi-layer optimization under various structural assumptions (Aslan et al. (2014); Zhang et al. (

Figure 1: Top row: randomly chosen test images from Caltech-101 silhouettes. Middle and bottom rows: corresponding reconstructions of PC-AE and AE with H = 32 binary hidden units.

Figure 2: As Fig. 2, with H = 100 on Omniglot. Difference in quality is particularly noticeable in the 1st, 5th, 8th, and 11th columns.

Figure 3: Top three rows: the reconstructions of random test images from MNIST (H = 12), as in Fig. 2. PC-AE achieves loss 105.1 here, and AE 111.2.Fourth and fifth rows: visualizations of all the hidden units of PC-AE and AE, respectively. It is not possible to visualize the PC-AE encoding units by the image that maximally activates them, as commonly done, because of the form of the ENC function which depends on W and lacks explicit encoding weights. So each hidden unit h is depicted by the visible decoding of the encoded representation which has bit h "on" and all other bits "off." (If this were PCA with a linear decoding layer, this would simply represent hidden unit h by its corresponding principal component vector, the decoding of the h th canonical basis vector in R H .)

Figure 4: Actual reconstruction loss to real data (red) and slack function [objective function] value (dotted green), during Adagrad optimization to learn W using the optimal E, B. Monotonicity is expected since this is a convex optimization. The objective function value theoretically upper-bounds the actual loss, and practically tracks it nearly perfectly.

Figure 5: Visualizations of all the hidden units of PC-AE (left) and AE (right) from Omniglot for H = 100, as in Fig. 3.

Figure 6: AE (left) and PC-AE (right) visualizations of a random subset of MNIST test data, with H = 2 real-valued hidden units, and colors corresponding to class labels (legend at left). PC-AE's loss is ∼ 189 here, and that of AE is ∼ 179.

Figure 7: As Fig. 2, with H = 100 on Caltech-101 silhouettes.

Figure 8: As Fig. 2, with H = 100 on MNIST.

This is relatively easy to solve in the parameter regime of primary interest when data are abundant, in which H < V n. Similarly, encoding is also a convex optimization problem in only H dimensions. If the data examples are instead sampled in minibatches of size n, they can be encoded in parallel, with a new minibatch being sampled to start each epoch t. The number of examples n (per batch) is essentially only limited by nH, the number of compressed representations that fit in memory.

Table content: <table/>

Cross-entropy reconstruction losses for PC-AE and a vanilla single-layer autoencoder, with binary and unconstrained real-valued encodings, and significant results in bold. The PC-AE results are significantly better (see Appendix A) than the AE results.

Table content: <table><tr><td/><td colspan="4">PC-AE (bin.) PC-AE (real) AE (bin.) AE (real)</td><td>PCA</td></tr><tr><td>MNIST, H = 32</td><td>51.9</td><td>53.8</td><td>65.2</td><td>64.3</td><td>86.6</td></tr><tr><td>MNIST, H = 100</td><td>9.2</td><td>9.9</td><td>26.8</td><td>25.0</td><td>52.7</td></tr><tr><td>Omniglot, H = 32</td><td>76.1</td><td>77.2</td><td>93.1</td><td>90.6</td><td>102.8</td></tr><tr><td>Omniglot, H = 100</td><td>12.1</td><td>13.2</td><td>46.6</td><td>45.4</td><td>63.6</td></tr><tr><td>Caltech-101, H = 32</td><td>54.5</td><td>54.9</td><td>97.5</td><td>87.6</td><td>118.7</td></tr><tr><td>Caltech-101, H = 100</td><td>7.1</td><td>7.1</td><td>64.3</td><td>45.4</td><td>75.2</td></tr><tr><td>notMNIST, H = 32</td><td>121.9</td><td>122.4</td><td>149.6</td><td>141.8</td><td>174.0</td></tr><tr><td>notMNIST, H = 100</td><td>62.2</td><td>63.0</td><td>99.6</td><td>92.1</td><td>115.5</td></tr><tr><td>Adult, H = 10</td><td>7.7</td><td>7.8</td><td>9.3</td><td>8.1</td><td>13.5</td></tr><tr><td>Adult, H = 20</td><td>0.65</td><td>0.64</td><td>2.5</td><td>1.5</td><td>7.9</td></tr></table>

Peer review (iclr2017):
The paper propose to find an optimal decoder for binary data using a min-max decoder on the binary hypercube given a linear constraint on the correlation between the encoder and the data. The paper gives finally that the optimal decoder as logistic of the lagragian W multiplying the encoding e. Given the weights of the ‘min-max’decoder W the paper finds the best encoding for the data distribution considered, by minimizing that error as a function of the encoding. The paper then alternates that optimization between the encoding and the min-max decoding, starting from random weights W. clarity: -The paper would be easier to follow if the real data (x in section 3 ) is differentiated from the worst case data played by the model (x in section 2). significance Overall I like the paper, however I have some doubts on what the alternating optimization optimum ends up being. The paper ends up implementing a single layer network. The correlation constraints while convenient in the derivation, is a bit intriguing. Since linear relation between the encoding and the data seems to be weak modeling constraint and might be not different from what PCA would implement. - what is the performance of PCA on those tasks? one could you use a simple sign function to decode. This is related to one bit compressive sensing. - what happens if you initialize W in algorithm one with PCA weights? or weighted pca weights? - Have you tried on more complex datasets such as cifar?