Title: FROM HARD TO SOFT: UNDERSTANDING DEEP NETWORK NONLINEARITIES VIA VECTOR QUANTIZATION AND STATISTICAL INFERENCE

Abstract: Nonlinearity is crucial to the performance of a deep (neural) network (DN). To date there has been little progress understanding the menagerie of available nonlinearities, but recently progress has been made on understanding the rôle played by piecewise affine and convex nonlinearities like the ReLU and absolute value activation functions and max-pooling. In particular, DN layers constructed from these operations can be interpreted as max-affine spline operators (MASOs) that have an elegant link to vector quantization (VQ) and K-means. While this is good theoretical progress, the entire MASO approach is predicated on the requirement that the nonlinearities be piecewise affine and convex, which precludes important activation functions like the sigmoid, hyperbolic tangent, and softmax. This paper extends the MASO framework to these and an infinitely large class of new nonlinearities by linking deterministic MASOs with probabilistic Gaussian Mixture Models (GMMs). We show that, under a GMM, piecewise affine, convex nonlinearities like ReLU, absolute value, and max-pooling can be interpreted as solutions to certain natural "hard" VQ inference problems, while sigmoid, hyperbolic tangent, and softmax can be interpreted as solutions to corresponding "soft" VQ inference problems. We further extend the framework by hybridizing the hard and soft VQ optimizations to create a β-VQ inference that interpolates between hard, soft, and linear VQ inference. A prime example of a β-VQ DN nonlinearity is the swish nonlinearity, which offers state-of-the-art performance in a range of computer vision tasks but was developed ad hoc by experimentation. Finally, we validate with experiments an important assertion of our theory, namely that DN performance can be significantly improved by enforcing orthogonality in its linear filters.

1. INTRODUCTION:

Deep (neural) networks (DNs) have recently come to the fore in a wide range of machine learning tasks, from regression to classification and beyond. A DN is typically constructed by composing a large number of linear/affine transformations interspersed with up/down-sampling operations and simple scalar nonlinearities such as the ReLU, absolute value, sigmoid, hyperbolic tangent, etc. Goodfellow et al. (2016) . Scalar nonlinearities are crucial to a DN's performance. Indeed, without nonlinearity, the entire network would collapse to a simple affine transformation. But to date there has been little progress understanding and unifying the menagerie of nonlinearities, with few reasons to choose one over another other than intuition or experimentation.

Recently, progress has been made on understanding the rôle played by piecewise affine and convex nonlinearities like the ReLU, leaky ReLU, and absolute value activations and downsampling operations like max-, average-, and channel-pooling Balestriero & Baraniuk (2018a; b) . In particular, these operations can be interpreted as max-affine spline operators (MASOs) Magnani & Boyd (2009) ; Hannah & Dunson (2013) that enable a DN to find a locally optimized piecewise affine approximation to the prediction operator given training data. A spline-based prediction is made in two steps. First, given an input signal x, we determine which region of the spline's partition of the domain (the input signal space) it falls into. Second, we apply to x the fixed (in this case affine) function that is assigned to that partition region to obtain the prediction y = f (x).

The key result of Balestriero & Baraniuk (2018a; b) is any DN layer constructed from a combination of linear and piecewise affine and convex is a MASO, and hence the entire DN is merely a composition of MASOs.

MASOs have the attractive property that their partition of the signal space (the collection of multidimensional "knots") is completely determined by their affine parameters (slopes and offsets). This provides an elegant link to vector quantization (VQ) and K-means clustering. That is, during learning, a DN implicitly constructs a hierarchical VQ of the training data that is then used for splinebased prediction. This is good progress for DNs based on ReLU, absolute value, and max-pooling, but what about DNs based on classical, high-performing nonlinearities that are neither piecewise affine nor convex like the sigmoid, hyperbolic tangent, and softmax or fresh nonlinearities like the swish Ramachandran et al. (2017) that has been shown to outperform others on a range of tasks?

Contributions. In this paper, we address this gap in the DN theory by developing a new framework that unifies a wide range of DN nonlinearities and inspires and supports the development of new ones. The key idea is to leverage the yinyang relationship between deterministic VQ/K-means and probabilistic Gaussian Mixture Models (GMMs) Biernacki et al. (2000) . Under a GMM, piecewise affine, convex nonlinearities like ReLU and absolute value can be interpreted as solutions to certain natural hard inference problems, while sigmoid and hyperbolic tangent can be interpreted as solutions to corresponding soft inference problems. We summarize our primary contributions as follows:

Contribution 1: We leverage the well-understood relationship between VQ, K-means, and GMMs to propose the Soft MASO (SMASO) model, a probabilistic GMM that extends the concept of a deterministic MASO DN layer. Under the SMASO model, hard maximum a posteriori (MAP) inference of the VQ parameters corresponds to conventional deterministic MASO DN operations that involve piecewise affine and convex functions, such as fully connected and convolution matrix multiplication; ReLU, leaky-ReLU, and absolute value activation; and max-, average-, and channelpooling. These operations assign the layer's input signal (feature map) to the VQ partition region corresponding to the closest centroid in terms of the Euclidean distance, Contribution 2: A hard VQ inference contains no information regarding the confidence of the VQ region selection, which is related to the distance from the input signal to the region boundary. In response, we develop a method for soft MAP inference of the VQ parameters based on the probability that the layer input belongs to a given VQ region. Switching from hard to soft VQ inference recovers several classical and powerful nonlinearities and provides an avenue to derive completely new ones. We illustrate by showing that the soft versions of ReLU and max-pooling are the sigmoid gated linear unit and softmax pooling, respectively. We also find a home for the sigmoid, hyperbolic tangent, and softmax in the framework as a new kind of DN layer where the MASO output is the VQ probability.

Contribution 3: We generalize hard and soft VQ to what we call β-VQ inference, where β ∈ (0, 1) is a free and learnable parameter. This parameter interpolates the VQ from linear (β → 0), to probabilistic SMASO (β = 0.5), to deterministic MASO (β → 1). We show that the β-VQ version of the hard ReLU activation is the swish nonlinearity, which offers state-of-the-art performance in a range of computer vision tasks but was developed ad hoc through experimentation Ramachandran et al. (2017) .

Contribution 4: Seen through the MASO lens, current DNs solve a simplistic per-unit (per-neuron), independent VQ optimization problem at each layer. In response, we extend the SMASO GMM to a factorial GMM that that supports jointly optimal VQ across all units in a layer. Since the factorial aspect of the new model would make naïve VQ inference exponentially computationally complex, we develop a simple sufficient condition under which a we can achieve efficient, tractable, jointly optimal VQ inference. The condition is that the linear "filters" feeding into any nonlinearity should be orthogonal. We propose two simple strategies to learn approximately and truly orthogonal weights and show on three different datasets that both offer significant improvements in classification per-formance. Since orthogonalization can be applied to an arbitrary DN, this result and our theoretical understanding are of independent interest. This paper is organized as follows. After reviewing the theory of MASOs and VQ for DNs in Section 2, we formulate the GMM-based extension to SMASOs in Section 3. Section 4 develops the hybrid β-VQ inference with a special case study on the swish nonlinearity. Section 5 extends the SMASO to a factorial GMM and shows the power of DN orthogonalization. We wrap up in Section 6 with directions for future research. Proofs of the various results appear in several appendices in the Supplementary Material.

2. BACKGROUND ON MAX-AFFINE SPLINES AND DEEP NETWORKS:

We first briefly review max-affine spline operators (MASOs) in the context of understanding the inner workings of DNs Balestriero & Baraniuk (2018a; b) . A MASO is an operator S[A, B] : R D → R K that maps an input vector of length D into an output vector of length K by concatenating K independent max-affine splines Magnani & Boyd (2009) ; Hannah & Dunson (2013) , with each spline formed from R piecewise affine and convex mappings. The MASO parameters consist of the "slopes" A ∈ R K×R×D and the "offsets/biases" B ∈ R K×R . See Appendix A for the precise definition. Given the input x ∈ R D and parameters A, B, a MASO produces the output

EQUATION

where [z] k denotes the k th dimension of z. The three subscripts of the slopes tensor [A] k,r,d correspond to output k, partition region r, and input signal index d. The two subscripts of the offsets/biases tensor [B] k,r correspond to output k and partition region r.

An important consequence of (1) is that a MASO is completely determined by its slope and offset parameters without needing to specify the partition of the input space (the "knots" when D = 1). Indeed, solving (1) automatically computes an optimized partition of the input space R D that is equivalent to a vector quantization (VQ) Nasrabadi & King (1988) ; Gersho & Gray (2012) . We can make the VQ aspect explicit by rewriting (1) in terms of the Hard-VQ (HVQ) matrix T H ∈ R K×R . that contains K stacked one-hot row vectors, each with the one-hot position at index [t] k ∈ {1, . . . , R} corresponding to the arg max over r = 1, . . . , R of (1). Given the HVQ matrix, (or equivalently, a region of the input space), the input-output mapping is affine and fully determined by

EQUATION

We retrieve (1) from ( 2) by noting that

[t] k = arg max r=1,...,R ( [A] k,r,• , x + [B] k,r ).

The key background result for this paper is that the layers of a very large class of DN are MASOs. Hence, such a DN is a composition of MASOs, where each layer MASO has as input the feature map z ( -1) ∈ R D ( -1) and produces z ( ) ∈ R D ( ) , with corresponding to the layer. Each MASO has thus specific parameters A ( ) , B ( ) . Theorem 1. Any DN layer comprising a linear operator (e.g., fully connected or convolution) composed with a convex and piecewise affine operator (such as a ReLU, leaky-ReLU, or absolute value activation; max/average/channel-pooling; maxout; all with or without skip connections) is a MASO Balestriero & Baraniuk (2018a; b) .

Appendix A provides the parameters A ( ) , B ( ) for the MASO corresponding to the th layer of any DN constructed from linear plus piecewise affine and convex components. Given this connection, we will identify z ( -1) above as the input (feature map) to the MASO DN layer and z ( ) as the output (feature map). We also identify [z ( ) ] k in (1) and (2) as the output of the k th unit (aka neuron) of the th layer. MASOs for higher-dimensional tensor inputs/outputs are easily developed by flattening.

3. MAX-AFFINE SPLINES MEET GAUSSIAN MIXTURE MODELS:

The MASO/HVQ connection provides deep insights into how a DN clusters and organizes signals layer by layer in a hierarchical fashion Balestriero & Baraniuk (2018a; b) . However, the entire ap-proach requires that the nonlinearities be piecewise affine and convex, which precludes important activation functions like the sigmoid, hyperbolic tangent, and softmax. The goal of this paper is to extend the MASO analysis framework of Section 2 to these and an infinitely large class of other nonlinearities by linking deterministic MASOs with probabilistic Gaussian Mixture Models (GMMs).

3.1. FROM MASO TO GMM VIA K-MEANS:

For now, we focus on a single unit k from layer of a MASO DN, which contains both linear and nonlinear operators; we generalize below in Section 5. The key to the MASO mechanism lies in the VQ variables [t ( ) ] k ∀k, since they fully determine the output via (2). For a special choice of bias, the VQ variable computation is equivalent to the K-means algorithm Balestriero & Baraniuk (2018a; b) .

Proposition 1. Given -1 2 A ( ) k,r,• 2 = B ( ) k,r , the MASO VQ partition corresponds to a K- means clustering 1 with centroids A ( ) k,r,• computed via [ t ( ) ] k = arg min r=1,...,R A ( ) k,r,• -z ( -1) 2 .

For example, consider a layer using a ReLU activation function. Unit k of that layer partitions its input space using a K-means model with R ( ) = 2 centroids: the origin of the input space and the unit layer parameter [A ( ) ] k,1,• . The input is mapped to the partition region corresponding to the closest centroid in terms of the Euclidean distance, and the corresponding affine mapping for that region is used to project the input and produce the layer output as in (2).

We now leverage the well-known relationship between K-means and Gaussian Mixture Models (GMMs) Bishop (2006) to GMM-ize the deterministic VQ process of max-affine splines. As we will see, the constraint on the value of B ( ) k,r in Proposition 1 will be relaxed thanks to the GMM's ability to work with a nonuniform prior over the regions (in contrast to K-means).

To move from a deterministic MASO model to a probabilistic GMM, we reformulate the HVQ selection variable [t ( ) ] k as an unobserved categorical variable

[t ( ) ] k ∼ Cat([π ( ) ] k,• ) with param- eter [π ( ) ] k,• ∈ R ( ) and R ( ) the simplex of dimension R ( ) .

Armed with this, we define the following generative model for the layer input z ( -1) as a mixture of R ( ) Gaussians with mean

[A ( ) ] k,r,• ∈ R D ( -1)

and identical isotropic covariance with parameter σ 2

EQUATION

with ∼ N(0, Iσ 2 ). Note that this GMM generates an independent vector input z ( -1) for every unit k = 1, . . . , D ( ) in layer . For reasons that will become clear below in Section 3.3, we will refer to the GMM model (3) as the Soft MASO (SMASO) model. We develop a joint, factorial model for the entire MASO layer (and not just one unit) in Section 5.

3.2. HARD VQ INFERENCE:

Given the GMM (3) and an input z ( -1) , we can compute a hard inference of the optimal VQ selection variable [t ( ) ] k via the maximum a posteriori (MAP) principle

[ t ( ) ] k = arg max t=1,...,R ( )

p t|z ( -1) .

(4)

The following result is proved in Appendix E.1.

Theorem 2. Given a GMM with parameters σ 2 = 1 and ( ) , the MAP inference of the latent selection variable [ t ( ) ] k given in (4) can be computed via the MASO HVQ (1)

[π ( ) ] k,t = exp([B ( ) ] k,r + 1 2 [A ( ) ] k,r,• 2 ) r exp([B ( ) ] k,r + 1 2 [A ( ) ] k,r,• 2 ) , t = 1, . . . , R

[ t ( ) ] k = arg max r=1,...,R ( ) [A ( ) ] k,t,• , z ( -1) + [B ( ) ] k,t , ∀A ( ) ∀B ( ) .

(5)

The optimal HVQ selection matrix is given by [ T

( ) H ] k,r = 1 r = [ t ( ) ] k .

Note in Theorem 2 that the bias constraint of Proposition 1 (which can be interpreted as imposing a uniform prior [π ( ) ] k,• ) is completely relaxed.

HVQ inference of the selection matrix sheds light on some of the drawbacks that affect any DN employing piecewise affine, convex activation functions. First, during gradient-based learning, the gradient will propagate back only through the activated VQ regions that correspond to the few 1-hot entries in T ( )

H . The parameters of other regions will not be updated; this is known as the "dying neurons phenomenon " Trottier et al. (2017) ; Agarap (2018) . Second, the overall MASO mapping is continuous but not differentiable, which leads to unexpected gradient jumps during learning. Third, the HVQ inference contains no information regarding the confidence of the VQ region selection, which is related to the distance of the query point to the region boundary. As we will now see, this extra information can be very useful and gives rise to a range of classical and new activation functions.

3.3. SOFT VQ INFERENCE:

We can overcome many of the limitations of HVQ inference in DNs by replacing the 1-hot entries of the HVQ selection matrix with the probability that the layer input belongs to a given VQ region

EQUATION

which follows from the simple structure of the GMM. This corresponds to a soft inference of the categorical variable [t ( ) ] k . Note that T ( )

S → T ( )

H as the noise variance in (3) → 0. Given the SVQ selection matrix, the MASO output is still computed via (2). The SVQ matrix can be computed indirectly from an entropy-penalized MASO optimization; the following is reproved in Appendix E.2 for completeness. 

EQUATION

Proposition 2, which was first established in Manning & Klein (2003) ; Mount (2011) , unifies HVQ and SVQ in a single optimization problem. The transition from HVQ (5) to SVQ ( 7) is obtained simply by adding the entropy regularization H(t). Notice that removing the Entropy regularization from (7) leads to the same VQ as (5). We summarize this finding in Table . 1.

3.4. SOFT VQ MASO NONLINEARITIES:

Remarkably, switching from HVQ to SVQ MASO inference recovers several classical and powerful nonlinearities and provides an avenue to derive completely new ones. Given a set of MASO parameters A ( ) , B ( ) for calculating the layer-output of a DN via (1), we can derive two distinctly different DNs: one based on the HVQ inference of (5) and one based on the SVQ inference of (6).

The following results are proved in Appendix E.5. Appendix C discusses how the GMM and SVQ formulations shed new light on the impact of parameter initialization in DC learning plus how these formulations can be extended further.

VQ Type:

Value for [T 

= R ( ) k r=1 [t] r [A ( ) ] k,r,. , z ( -1) + [B ( ) ] k,r .

3.5. ADDITIONAL NONLINEARITIES AS SOFT DN LAYERS:

Changing viewpoint slightly, we can also derive classical nonlinearities like the sigmoid, tanh, and softmax Goodfellow et al. (2016) from the soft inference perspective. Consider a new soft DN layer whose unit output [z ( ) ] k is not the piecewise affine spline of (2) but rather the probability

[z ( ) ] k = p([t ( ) ] k = 1|z ( -1)

) that the input z ( ) falls into each VQ region. The following propositions are proved in Appendix E.6.

Proposition 5. The MASO parameters A ( ) , B ( ) that induce the ReLU activation under HVQ induce the sigmoid activation in the corresponding soft DN layer.3 

A similar train of thought recovers the softmax nonlinearity typically used at the DN output for classification problems.

Proposition 6. The MASO parameters A ( ) , B ( ) that induce a fully-connected-pooling layer under HVQ (with output dimension D (L) equal to the number of classes C) induce the softmax nonlinearity in the corresponding soft DN layer.

4. HYBRID HARD/SOFT INFERENCE VIA ENTROPY REGULARIZATION:

Combining ( 5) and ( 6) yields a hybrid optimization for a new β-VQ that recovers hard, soft, and linear VQ inference as special cases

EQUATION

with the new hyper-parameter [β ( ) ] k ∈ (0, 1). The β-VQ obtained from the above optimization problem utilizes [β ( ) ] k to balance the impact of the regularization term (introduced in the SVQ derivation ( 7)), allowing to recover and interpolate the VQ between linear, soft and hard (see Table. 1). The following is proved in Appendix E.3. Theorem 3. The unique global optimum of ( 8) is given by

EQUATION

The β-VQ covers all of the theory developed above as special cases: β = 1 yields HVQ, β = 1 2 yields SVQ, and β = 0 yields a linear MASO with [ T

( ) 0 ] k,r = 1 R ( ) .

See Figure 1 for examples of how the β parameter interacts with three example activation functions. Note also the attractive property that ( 9) is differentiable with respect to [β ( ) ] k .

The β-VQ supports the development of new, high-performance DN nonlinearities. For example, the swish activation σ swish (u) = σ sig ([η ( ) ] k u)u extends the sigmoid gated linear unit Elfwing et al. (2018) with the learnable parameter [η ( ) ] k Ramachandran et al. (2017) . Numerous experimental studies have shown that DNs equipped with a learned swish activation significantly outperform those with more classical activations like ReLU and sigmoid.4 2 ), Red: β-VQ (β ∈ [0.1, 0.9]). Interestingly, note how some of the functions are nonconvex.

Proposition 7. The MASO A ( ) , B ( ) parameters that induce the ReLU nonlinearity under HVQ induce the swish nonlinearity under β-VQ, with [η

( ) ] k = [β ( ) ] k 1-[β ( ) ] k .

Table 1 summarizes some of the many nonlinearities that are within reach of the β-VQ.

5. OPTIMAL JOINT VQ INFERENCE VIA ORTHOGONALIZATION:

The GMM (3) models the impact of only a single layer unit on the layer-input z ( -1) . We can easily extend this model to a factorial model for z ( -1) that enables all D ( ) units at layer to combine their syntheses:

EQUATION

with ∼ N(0, Iσ 2 ). This new model is a mixture of R ( ) Gaussians with means

[A ( ) ] k,r,• ∈ R D ( -1)

and identical isotropic covariances with variance σ 2 . The factorial aspect of the model means that the number of possible combinations of the t ( ) values grow exponentially with the number of units. Hence, inferring the latent variables t ( ) quickly becomes intractable. However, we can break this combinatorial barrier and achieve efficient, tractable VQ inference by constraining the MASO slope parameters A ( ) to be orthogonal

EQUATION

Orthogonality is achieved in a fully connected layer (multiplication by the dense matrix W ( ) composed with activation or pooling) when the rows of W ( ) are orthogonal. Orthogonality is achieved in a convolution layer (multiplication by the convolution matrix C ( ) composed with activation or pooling) when the rows of C ( ) are either non-overlapping or properly apodized; see Appendix E.4 for the details plus the proof of the following result. Theorem 4. If the slope parameters A ( ) of a MASO are orthogonal in the sense of (11), then the random variables [t ( ) ] 1 |z ( -1) , . . . , [t ( ) ] 1 |z ( -1) of the model ( 10) are independent and hence -1) .

p [t ( ) ] 1 , . . . , [t ( ) ] D ( ) |z ( -1) = D ( ) k=1 p [t ( ) ] k |z (

In an orthogonal, factorial MASO, optimal inference can be performed independently per factor, as opposed to jointly over all of the factors. Orthogonality renders the joint MAP inference of the factorial model's VQs tractable. The following result is proved in Appendix E.4.

Practically, this not only lowers the computational complexity tremendously but also imparts the benefit of "uncorrelated unit firing," which has been shown to be advantageous in DNs Srivastava et al. (2014) . Beyond the scope of this paper, such an orthogonalization strategy can also be applied to more general factorial models such as factorial GMMs Zemel (1994); Ghahramani (1995) and factorial HMMs Ghahramani & Jordan (1996) . For three datasets and the same largeCNN architecture (detailed in Appendix D), we tabulate the classification accuracy (larger is better) and its standard deviation averaged over 5 runs with different Adam learning rates. In each case, orthogonal fully-connected and convolution matrices improve the classification accuracy over the baseline.

Corollary 1. When the conditions of Theorem 4 are fulfilled, the joint MAP estimate for the VQs of the factorial model ( 10)

EQUATION

and thus can be computed with linear complexity in the number of units.

The advantages of orthogonal or near-orthogonal filters have been explored empirically in various settings, from GANs Brock et al. (2016) to RNNs Huang et al. (2017) , typically demonstrating improved performance. Table 2 tabulates the results of a simple confirmation experiment with the largeCNN architecture described in Appendix D. We added to the standard cross-entropy loss a term

λ k k =k r,r [A ( ) ] k,r,• , [A ( ) ] k ,r ,•

2 that penalizes non-orthogonality (recall ( 11)). We did not cross-validate the penalty coefficient λ but instead set it equal to 1. The tabulated results show clearly that favoring orthogonal filters improves accuracy across both different datasets and different learning settings.

Since the orthogonality penalty does not guarantee true orthogonality but simply favors it, we performed one additional experiment where we reparametrized the fully-connected and convolution matrices using the Gram-Schmidt (GS) process Daniel et al. (1976) so that they were truly orthogonal. Thanks to the differentiability of all of the operations involved in the GS process, we can backpropagate the loss to the orthogonalized filters in order to update them in learning. We also used the swish activation, which we showed to be a β-VQ nonlinearity in Section 4. Since the GS process adds significant computational overhead to the learning algorithm, we conducted only one experiment on the largest dataset (CIFAR100). The exactly orthogonalized largeCNN achieved a classification accuracy of 61.2%, which is a major improvement over all of the results in the bottom (CIFAR100) cell of Table 2 . This indicates that there are good reasons to try to improve on the simple orthogonality-penalty-based approach.

6. FUTURE WORK:

Our development of the SMASO model opens the door to several new research questions. First, we have merely scratched the surface in the exploration of new nonlinear activation functions and pooling operators based on the SVQ and β-VQ. For example, the soft-or β-VQ versions of leaky-ReLU, absolute value, and other piecewise affine and convex nonlinearities could outperform the new swish nonlinearity. Second, replacing the entropy penalty in the ( 7) and ( 8) with a different penalty will create entirely new classes of nonlinearities that inherit the rich analytical properties of MASO DNs. Third, orthogonal DN filters will enable new analysis techniques and DN probing methods, since from a signal processing point of view problems such as denoising, reconstruction, compression have been extensively studied in terms of orthogonal filters. This work was partially supported by NSF grants IIS-17-30574 and IIS-18-38177, AFOSR grant FA9550-18-1-0478, ARO grant W911NF-15-1-0316, ONR grants N00014-17-1-2551 and N00014-18-12571, DARPA grant G001534-7500, and a DOD Vannevar Bush Faculty Fellowship (NSSEFF) grant N00014-18-1-2047.

propose a brief approximation result. Due to the specificity of the convolution operator we are able to provide a tractable inference coupled with an apodization scheme. To demonstrate this, we first highlight that any input can be represented as a direct sum of its apodized patches. Then, we see that filtering apodized patches with a filter is equivalent to convolving the input with apodized filters. We first need to introduce the patch notation. We define a patch P[z ( -1) ](pi, pj) ∈ {1, . . . , I ( ) } × {1, . . . , J ( ) } as the slice of the input with indices c = 1, . . . , K ( ) , i = (all channels) and (i, j) ∈ {pi, . . . , pi + I 

EQUATION

)

The above highlights the ability to treat an input via its collection of patches with the condition to apply the defined apodization function. With the above, we can demonstrate how minimizing the per patch reconstruction loss leads to minimizing the overall input modeling

EQUATION

which represents the internal modeling of the factorial model applied across filters and patches. As a result, when performing the per position minimization one minimizes an upper bound which ultimately reaches the global minimum as

EQUATION

C INTERPRETATION: INITIALIZATION AND INPUT SPACE PARTITIONING:

The GMM formulation and related inference also allows interpretation of the internal layer parameters. First we demonstrate how the region prior π ( ) is affected by the layer parameters especially at initialization. Then we highlight how our result allows to generalize the input space partitioning results from Balestriero & Baraniuk (2018b; a) .

Region Prior. The region prior of the GMM-MASO model [π ( ) ] k,. (recall Thm. 2) depends on the bias and norm of the layer weight as

[π ( ) ] k,. ∝ e [B ( ) ] k,r + 1 2 [A ( ) ] k,r,.

2:

. We can study how this region prior looks like at initialization. At initialization, common practice uses [B ( ) ] k,r = 0, ∀k, r and [A ( ) ] k,r,d ∼ N(0, (v ( ) ) 2 ). This bias initialization leads to a cluster prior probability proportional to the norm of the weights. For example, the case of absolute value leads to E( [A ( ) ] k,1,.

2 ) = E( [A ( ) ] k,2,.

2 ) and thus uniform prior as E([π ( ) ] k,. ) = (0.5, 0.5) T for any initialization standard deviation v ( ) . On the other hand, ReLU has always

EQUATION

) ) 2 = 1 and we thus have as prior probability [π ( ) ] k,. ≈ (0.62, 0.38) T . THe latter slightly favors the inactive state of the ReLU and thus sparser activations. In general, the smaller v ( ) is, the more the region prior will favor inactive state of the ReLU.

Input Space Partitioning. We now generalize the ability to study the input space partitioning which was before limited to the special case of [B ( ) ] k,r = -1 2 [A ( ) ] k,r,.

2 (recall Prop. 1). Studying the input space partition is crucial as the MASO property implies that for each input region, an observation is transformed via a simple linear transformation. However, deriving insights on that is the actual partition is cumbersome as analytical formula are impractical and one thus has to probe the input space and record the observed VQ for each point to estimate the input space partitioning. We are now able to derive some clear links between the MASO partition and standard models which will allows much more efficient computation of the input space partitions.

Corollary 2. A MASO with arbitrary parameters [A ( ) ] k,r,. , [B ( ) ] k,r has an input space partitioning being the same as a GMM with parameters from Thm. 2.

This augments previous study of the MASO input space partitioning only related to k-mean (recall Prop. 1) which required specific bias values.

E.2 ENTROPY REGULARIZED OPTIMIZATION:

Proof. We are interested into the following optimization problem:

[t ( ) * ] k = arg max q[ ,k] F (q[ , k], Θ) = arg max q[ ,k] E q [log(p(z ( -1) |[t ( ) ] k )p([t ( ) ] k ))] + H([t ( ) ] k ) = arg max u ( ) ∈ R r [u ( ) ] k,r [ -1

2σ 2 z ( -1) -µ r 2 + log(π r )]r [u ( ) ] k,r log([u ( ) ] k,r ) .

We now use the KKT and Lagrange multiplier to optimize the new loss function (per k) including the equality constraint

L(u) = r [u] r [ -1 2σ 2 z ( -1) -µ r 2 + log(π r )] - r [u] r log([u ( ) ] r ) + λ( r [u] r -1)

Due to the strong duality we can directly optimize the primal and dual problems and solve jointly all the partial derivatives to 0. We thus obtain by denoting A r := [ -1 2σ 2 z ( -1) -µ r 2 + log(π r )] . Using the same results we can re-write the independent joint optimization as multiple independent optimization problems.

:

It would be more accurate to call this R ( ) -means clustering in this case.

The observant reader will recognize this as the E-step of the GMM's EM learning algorithm.

The tanh activation is obtained similarly by reparametrizing A ( ) and B ( ) ; see Appendix E.6.

Best performance was usually achieved with [η ( ) ] k ∈ (0, 1)Ramachandran et al. (2017).

Figures and Tables:

The entries of the SVQ selection matrix [ T ( ) S ] k,• from (6) solve the following entropypenalized maximization, where H(•) is the Shannon entropy 2 [ T ( )

The MASO parameters A ( ) , B ( ) that induce the ReLU activation under HVQ induce the sigmoid gated linear unitElfwing et al. (2018) under SVQ.Proposition 4. The MASO parameters A ( ) , B ( ) that induce the max-pooling nonlinearity under HVQ induce softmax-poolingBoureau et al. (2010) under SVQ.

Figure 1: For the MASO parameters A ( ) , B ( ) for which HVQ yields the ReLU, absolute value, and an arbitrary convex activation function, we explore how changing β in the β-VQ alters the induced activation function. Solid black: HVQ (β = 1), Dashed black: SVQ (β = 12 ), Red: β-VQ (β ∈ [0.1, 0.9]). Interestingly, note how some of the functions are nonconvex.

{pi, . . . , pi + J ( ) C }, hence a patch starting at position (pi, pj) and of same shape as the filters.Apodizing a signal in general corresponds to applying an apodization function (or windowing function)Weisstein (2002) h onto it via an Hadamard product. Let define the 2D apodized functions h : shape of the convolutional filters. Given a function h such that u∈Ω(I ( ) ) h(u) = 1 one can represent an input by summing the apodized patches as in

∂L ∂[u]p = A p -log([u] p ) -1 + λ, ∀p ∂L ∂λ = r [u] r -1we can now set the derivatives to 0 and see that this leads to [u] p = e Ap-1+λ , ∀p. We can now sum over p to obtain[u] p = e Ap-1+λ , ∀p =⇒ p which leads to λ = -log( p e Ap-1). Plugging this back into the above equation we obtain[u] p =e Ap-1+λ = e of Theorem 3 please refer to the proof in E.2 by applying the convex combination with coefficients β.E.4 THEOREM 4Proof. The proof to demonstrate this inference and VQ equality is essentially the same as the one of GMM-MASO (E.1) with addition of the following first step:z ( -1) -D ( ) k=1 [W ( ) ] k,r,. 2 = z ( -1) 2 -2 D ( ) k=1 R ( ) r=1 [W ( ) ] k,[r k ],. + D ( ) k=1 [W ( ) ] k,[r k ],.2 for any configuration r ∈ {1, . . . , R ( ) } D ( )

( ) ] k Examples Hard VQ (HVQ) arg max t∈

Table content: <table><tr><td colspan="2">Soft VQ (SVQ) β-VQ, β ∈ [0, 1] arg max t∈ arg max t∈</td><td>R R R</td><td>( ) k ( ) k k ( )</td><td>P(t) P(t) + H(t) βP(t) + (1 -β)H(t) swish, β-softmax-pooling ReLU, max-pooling SiGLU, softmax-pooling</td></tr><tr><td>Table 1:</td><td colspan="4">Impact of different VQ strategies for a MASO layer with P(t)</td><td>:</td></tr></table>

Classification experiment to demonstrate the utility of orthogonal DN layers.

Table content: <table><tr><td>Setting</td><td colspan="3">LR = 0.001 LR = 0.0005 LR = 0.0001</td></tr><tr><td>SVHN (baseline)</td><td>94.3 ± 0.1</td><td>94.4 ± 0.1</td><td>93.4 ± 0.0</td></tr><tr><td>SVHN Ortho</td><td>94.6 ± 0.2</td><td>95.0 ± 0.2</td><td>93.8 ± 0.1</td></tr><tr><td>CIFAR10 (baseline)</td><td>80.3 ± 0.4</td><td>80.2 ± 0.2</td><td>76.2 ± 0.3</td></tr><tr><td>CIFAR10 Ortho</td><td>84.0 ± 0.3</td><td>82.3 ± 0.1</td><td>79.1 ± 0.2</td></tr><tr><td>CIFAR100 (baseline)</td><td>43.6 ± 0.2</td><td>44.1 ± 0.4</td><td>37.5 ± 0.5</td></tr><tr><td>CIFAR100 Ortho</td><td>46.1 ± 0.2</td><td>46.3 ± 0.2</td><td>42.1 ± 0.3</td></tr></table>

Peer review (iclr2019):
 This work extends the applicability of the spline theory of deep networks explored in previous works of Balestriero/ Baraniuk. The previous works setup DNs as layer-wise max-affine spline operators (MASOs) and recovers several non-linearities practically used as special cases of these MASOs. The previous works already recover RELU variants and some downsampling operators that the current submission characterizes as "hard" quantization. The major contribution of this work is extending the application to "soft" quantization that recovers several new non-linear activations such as soft-max. It is well-known that the k-means algorithm can be considered as a run of an EM algorithm to recover the mean parameters of a gaussian mixture model. The "hard" to "soft" transformation, and any interpolation in between follows from combining this insight with the previous works. As such there isnt a major technical contribution imho in this work. Furthermore, the presented orthogonalization for easier inference has been used before in many works, some of which this submission also cites, most importantly in the previous work of Balestriero/ Baraniuk that this submission extends. Nevertheless there is value in novel results that may follow from previous works in a straightforward but non-trivial fashion, as long as it is well-presented and thoroughly researched and implication well-highlighted. This paper does that adequately, so I will suggest weak accept. Furthermore, this work could spark interesting future works and fruitful discussions at the ICLR. It is well-written and the experimental evaluation is adequate. I would suggest a couple of ways to possibly improve the exposition. The paper is somewhat notation heavy. When considering single layers, the superscript for the layer could be dropped in favor of clarity. I would suggest moving the definition of MASOs to the main text, and present Proposition 8 in some form in the main text as well. To a reader not familiar with previous works, or with splines, this could be helpful. Use of orthogonalization could be highlighted not just a tool for tractability but also regularization. For inference on GMMs, it corresponds to a type of variational inference, which could be mentioned.