Global Optimality in Tensor Factorization, Deep Learning, and Beyond
Benjamin D. Haeffele, Rene Vidal
Introduction
Models involving factorization or decomposition are ubiquitous across a wide variety of technical fields and application areas. As a simple example relevant to machine learning, various forms of matrix factorization are used in classical dimensionality reduction techniques such as Principle Component Analysis (PCA) and in more recent methods like non-negative matrix factorization or dictionary learning (Lee and Seung, 1999; Aharon et al., 2006; Mairal et al., 2010). In a typical matrix factorization problem, we might seek to find matrices such that the product closely approximates a given data matrix while at the same time requiring that and satisfy certain properties (e.g., non-negativity, sparseness, etc.). This naturally leads to an optimization problem of the form
Given this challenge, a common approach is to relax the non-convex factorization problem into a problem which is convex on the product of the factorized matrices, . As a concrete example, in low-rank matrix factorization, one might be interested in solving a problem of the form
More generally, tensor factorization models provide a natural extension to matrix factorization and have been employed in a wide variety of applications (Cichocki et al., 2009; Kolda and Bader, 2009). The resulting optimization problem is similar to matrix factorization, with the difference that we now consider more general factorizations which decompose a multidimensional tensor into a set of different factors , where each factor is also possibly a multidimensional tensor. These factors are then combined via an arbitrary multilinear mapping ; i.e., is a linear function in each term if the other terms are held constant. This model then typically gives optimization problems of the form
where each factor is an appropriately sized matrix and the functions apply some form of non-linearity after each matrix multiplication, e.g., a sigmoid function, rectification, max-pooling. Note that although here we have shown the linear operations to be simple matrix multiplications for notational simplicity, this is easily generalized to other linear operators (e.g., in a convolutional network each linear operator could be a set of convolutions with a group of various kernels with parameters contained in the variables).
2 Paper Contributions
Our primary contribution is to extend ideas from convex matrix factorization and present a general framework which allows for a wide variety of factorization problems to be analyzed within a convex formulation. Specifically, using this convex framework we are able to show that local minima of the non-convex factorization problem achieve the global minimum if they satisfy a simple condition. Further, we also show that if the factorization is done with factorized variables of sufficient size, then from any initialization it is always possible to reach a global minimizer using purely local descent search strategies.
Two concepts are key to our analysis framework: 1) the size of the factorized elements is not constrained, but instead fit to the data through regularization (for example, the number of columns in and is allowed to change in matrix factorization) 2) we require that the mapping from the factorized elements to the final output, , satisfies a positive homogeneity property. Interestingly, the deep learning field has increasingly moved to using non-linearities such as Rectified Linear Units (ReLU) and Max-Pooling, both of which satisfy the positive homogeneity property, and it has been noted empirically that both the speed of training the neural network and the overall performance of the network is increased significantly when ReLU non-linearities are used instead of the more traditional hyperbolic tangent or sigmoid non-linearities (Dahl et al., 2013; Maas et al., 2013; Krizhevsky et al., 2012; Zeiler et al., 2013). We suggest that our framework provides a partial theoretical explanation to this phenomena and also offers directions of future research which might be beneficial in improving the performance of multilayer neural networks.
Prior Work
Despite the significant empirical success and wide ranging applications of the models discussed above (and many others not discussed), as we have mentioned, a vast majority of the above techniques models suffer from the significant disadvantage that the associated optimization problems are non-convex and very challenging to solve. As a result, the numerical optimization algorithms often used to solve factorization problems – including (but certainly not limited to) alternating minimization, gradient descent, stochastic gradient descent, block coordinate descent, back-propagation, and quasi-newton methods – are typically only guaranteed to converge to a critical point or local minimum of the objective function (Mairal et al., 2010; Rumelhart et al., 1988; Ngiam et al., 2011; Wright and Nocedal, 1999; Xu and Yin, 2013). The nuclear norm relaxation of low-rank matrix factorization discussed above provides a means to solve factorization problems with reglarization promoting low-rank solutionsSimilar convex relaxation techniques have also been proposed for low-rank tensor factorizations, but in the case of tensors finding a final factorization from a low-rank tensor can still be a challenging problem (Tomioka et al., 2010; Gandy et al., 2011), but it fails to capture the full generality of problems such as (1) as it does not allow one to find factors, , with the desired properties encouraged by (sparseness, non-negativity, etc.). To address this issue, several studies have explored a more general convex relaxation via the matrix norm given by
where denotes the ’th columns of and , and are arbitrary vector norms, and the number of columns () in the and matrices is allowed to be variable (Bach et al., 2008; Bach, 2013; Haeffele et al., 2014). The norm in (6) has appeared under multiple names in the literature, including the projective tensor norm, decomposition norm, and atomic norm, and by replacing the column norms in (6) with gauge functions the formulation can be generalized to incorporate additional regularization on , such as non-negativity, while still being a convex function of (Bach, 2013). Further, it is worth noting that for particular choices of the and vector norms, reverts to several well known matrix norms and thus provides a generalization of many commonly used regularizers. Notably, when the vector norms are both norms, , and the form in (6) is the well known variational definition of the nuclear norm.
The norm has the appealing property that by an appropriate choice of vector norms and (or more generally gauge functions), one can promote desired properties in the factorized matrices while still working with a problem which is convex w.r.t. the product . Based on this concept, several studies have explored optimization problems over factorized matrices of the form
Even though the problem is still non-convex w.r.t. the factorized matrices , it can be shown using ideas from Burer and Monteiro (2005) on factorized semidefinite programming that, subject to a few general conditions, then local minima of (7) will be global minima (Bach et al., 2008; Haeffele et al., 2014), which can significantly reduce the dimensionality of some large scale optimization problems. Unfortunately, aside from a few special cases, the norm defined by (6) (and related regularization functions such as those discussed by Bach (2013)) cannot be evaluated efficiently, much less optimized over, due to the complicated and non-convex nature of the definition. As a result, in practice one is often forced to replace (7) by the closely related problem
However, (7) and (8) are not equivalent problems, due to the fact that solutions to (7) include any factorization such that their product equals the optimal solution, , while in (7) one is specifically searching for a factorization that achieves the infimum in (6); in brief, solutions to (8) will be solutions to (7), but the converse is not true. As a consequence, results guaranteeing that local minima of the form (7) will be global minima cannot be applied to the formulation in (8), which is typically more useful in practice. Here we focus our analysis on the more commonly used family of problems, such as (8), and show that similar guarantees can be provided regarding the global optimality of local minima. Additionally, we show that these ideas can be significantly extended to a very wide range of non-convex models and regularization functions, with applications such as tensor factorization and certain forms of neural network training being additional special cases of our framework.
In the context of neural networks, Bengio et al. (2005) showed that for neural networks with a single hidden layer, if the number of neurons in the hidden layer is not fixed, but instead fit to the data through a sparsity inducing regularization, then the process of training a globally optimal neural network is analgous to selecting a finite number of hidden units from the infinite dimensional space of all possible hidden units and taking a weighted summation of these units to produce the output. Further, these ideas have very recently been used to analyze the generalization performance of such networks (Bach, 2014). Here, our results take a similar approach and extend these ideas to certain forms of multi-layer neural networks. Additionally, our framework provides sufficient conditions on the network architecture to guarantee that from any intialization a globally optimal solution can be found by performing purely local descent on the network weights.
Preliminaries
Before we present our main results, we first describe our notation system and recall a few definitions.
2 Definitions
We now make/recall a few general definitions and well known facts which will be used in our analysis.
The indicator function of a set is defined as
Note that this definition also implies that for .
The one-sided directional derivative of a function at a point in the direction is denoted and defined as .
Also, recall that for a differentiable function , .
Problem Formulation
Returning to the motivating example from the introduction (4), we now define the family of mapping functions from the factors into the output space and the family of regularization functions on the factors ( and , respectively) which we will study in our framework.
As we do not place any restrictions on the elemental mapping, , beyond the requirement that it must be positively homogeneous, there are a wide range of problems that can be captured by a mapping with form (10). Several example problems which can be placed in this framework include:
is positively homogeneous with degree 2 and is simply matrix multiplication for matrices with columns.
(where denotes the tensor outer product) results in being the mapping used in the rank- CANDECOMP/PARAFAC (CP) tensor decomposition model (Kolda and Bader, 2009). Further, instead of choosing to be a simple outer product, we can also generalize this to be any multilinear function of the factors We note that more general tensor decompositions, such as the general form of the Tucker decomposition, do not explicitly fit inside the framework we describe here; however, by using similar arguments to the ones we develop here, it is possible to show analogous results to those we derive in this paper for more general tensor decompositions, which we do not show for clarity of presentation..
More general still, since any positively homogenous transformation is a potential elemental mapping, by an appropriate definition of , one can describe neural networks with very general architectures, provided the non-linearities in the network are compatible with positive homogeneity. Note that max-pooling and rectification are both positively homogeneous and thus fall within our framework. For example, the well-known ImageNet network from (Krizhevsky et al., 2012), which consists of a series of convolutional layers, linear-rectification, max-pooling layers, response normalization layers, and fully connected layers, can be described by taking and defining to be the entire transformation of the network (with the removal of the response normalization layers, which are not positively homogenous). Note, however, that our results will rely on potentially changing size or being initialized to be sufficiently large, which limits the applicability of our results to current state-of-the-art network architectures (see discussion).
Here we have provided a few examples of common factorization mappings that can be cast in form (10), but certainly there are a wide variety of other problems for which our framework is relevant. Additionally, while all of the mappings described above are positively homogeneous with degree equal to the degree of the factorization (), this is not a requirement; is sufficient. For example, non-linearities such as a rectification followed by raising each element to a non-zero power are positively homogeneous but of a possibly different degree. What will turn out to be essential, however, is that we require to match the degree of positive homogeneity used to regularize the factors, which we will discuss in the next section.
2 Factorization Regularization
Again, due to the generality of the framework, there are a wide variety of possible elemental regularization functions. We highlight two positive semidefinite, positively homogeneous functions which are commonly used and note that functions can be composed with summations, multiplications, and raising to non-zero powers to change the degree of positive homogeneity and combine various functions.
Norms: Any norm is positively homogeneous with degree 1. Note that because we make no requirement of convexity on , this framework can also include functions such as the pseudo-norms for .
A few typical formulations of a which are positively homogeneous with degree might include:
where all of the norms, , are arbitrary. Forms (15) and (16) can be shown to be equivalent, in the sense that they give rise to the same function, for all of the example mappings we have discussed here and by an appropriate choice of norm can induce various properties in the factorized elements (such as sparsity), while form (17) is similar but additionally constrains each factor to be an element of a conic set (see Bach et al., 2008; Bach, 2013; Haeffele et al., 2014, for examples from matrix factorization).
To define our regularization function on the output tensor, , it will be necessary that the elemental regularization function, , and the elemental mapping, , satisfy a few properties to be considered ’compatible’ for the definition of our regularization function. Specifically, we will require the following definition.
From this, we now define our main regularization function:
with the additional condition that if .
We will show that is a convex function of and that in general the infimum in (18) can always be achieved with a finitely sized factorization (i.e., does not need to approach )In particular, the largest needs to be is , and we note that is a worst case upper bound on the size of the factorization. In certain cases the bound can be shown to be lower. As an example, when and . In this case the infimum can be achieved with .. While suffers from many of the practical issues associated with the matrix norm discussed earlier (namely that in general it cannot be evaluated in polynomial time due to the complicated definition), because is a convex function on , this allows us to use purely as an analysis tool to derive results for a more tractable factorized formulation.
3 Problem Definition
To build our analysis, we will start by defining the convex (but typically non-tractable) problem, given by
is convex (but possibly non-differentiable)
are a nondegenerate pair as defined by Definition 8; is as defined by (18); and
The minimum of exists .
As noted above, it is typically impractical to optimize over functions involving , and, even if one were given an optimal solution to (19), , one would still need to solve the problem given in (18) to recover the desired factors. Therefore, we use (19) merely as analysis tool and instead tailor our results to the non-convex optimization problem given by
We will show in the next section that any local minima of (20) is a global minima if it satisfies the condition that one slice from each of the factorized tensors is all zero. Further, we will also show that if is taken to be large enough then from any initialization we can always find a global minimum of (20) by doing an optimization based purely on local descent.
Main Analysis
We begin our analysis by first showing a few simple properties and lemmas relevant to our framework.
First, from the definition of it is easy to verify that if is positively homogeneous with degree , then is also positively homogeneous with degree and satisfies the following proposition
Given a size- set of factors, , and a size- set of factors, , then
where recall, denotes the concatenation of and along the final dimension of the tensor.
Further, satisfies the following proposition:
and .
is positively homogeneous with degree 1.
The infimum in (18) can be achieved with s.t. .
Proof Proposition 11 Many of these properties can be shown in a similar fashion to results from the norm discussed previously (Bach et al., 2008; Yu et al., 2014).
1) By definition and the fact that is positive semidefinite, we always have . Trivially, since we can always take to achieve the infimum. For , because is a non-degenerate pair then for any and finite. Property 5) shows that the infimum can be achieved with finite, completing the result.
2) For all and any such that , note that from positive homogeneity and . Applying this fact to the definition of gives that .
3) If either or then the inequality is trivially satisfied. Considering any pair such that is finite for both and , for any let be an optimal factorization of . Specifically, and . Similarly, let be an optimal factorization of . From Proposition 10 we have , so . Letting tend to 0 completes the result.
Note that because is a nondegenerate pair, for any non-zero there exists such that is on the boundary of , so and its convex hull are compact sets.
Further, note that contains the origin by definition of and , so as a result, is equivalent to a gauge function on the convex hull of
This, combined with positive homogeneity, completes the result as we can take , which gives
and shows that a factorization of size- which achieves the infimum must exist.
We next derive the Fenchel dual of , which will provide a useful characterization of the subgradient of .
The Fenchel dual of is given by
Proof Recall, , so for to approach the supremum we must have . As result, the problem is equivalent to
If then all the terms in the summation of (28) will be non-positive, so taking will achieve the supremum. Conversely, if , then such that . This result, combined with the positive homogeneity of and gives that (28) is unbounded by considering as .
We briefly note that the optimization problem associated with (26) is typically referred to as the polar problem and is a generalization of the concept of a dual norm. In practice solving the polar can still be very challenging and is often the limiting factor in applying our results in practice (see Bach, 2013; Zhang et al., 2013, for further information).
With the above derivation of the Fenchel dual, we now recall that if then the subgradient of can be characterized by . This forms the basis for the following lemma which will be used in our main results
Given a factorization and a regularization function , then the following conditions are equivalent:
is an optimal factorization of ; i.e.,
such that and ,
such that and ,
Further, any which satisfies condition 2 or 3 satisfies both conditions 2 and 3 and .
Proof 2 3) 3 trivially implies 2 from the definition of . For the opposite direction, because we have . Taking the sum over , we can only achieve equality in 2 if we have equality in condition 3. This also shows that any which satisfies condition 2 or 3 must also satisfy the other condition.
We next show that if satisfies conditions 2/3 then . First, from condition 2/3 and the definition of , we have . Thus, recall that because is convex and finite at , we have with equality iff . Now, by contradiction assume satisfies conditions 2/3 but . From condition 2/3 we have , so which contradicts the definition of .
1 2) Any satisfies .
2 1) By contradiction, assume was not an optimal factorization of . This gives, , producing the contradiction.
Finally, we show one additional lemma before presenting our main results.
Proof Let for all and let . From positive homogeneity and the fact that we have a local minimum, then such that we must have
Taking the first order approximation and rearranging the terms of (LABEL:eq:lem_localmin_inequal), we arrive at
Noting that for but sufficiently small, we also must have , using identical steps as before and taking the first order approximation , we get
and taking the limit , we arrive at
Combining (33) and (35) and rearranging terms gives the result.
2 Main Results
Based on the above preliminary results, we are now ready to state our main results and several immediate corollaries.
Given a function of the form given in (20), any local minimizer of the optimization problem
such that for some is a global minimizer.
We begin by noting that from the definition of , for any factorization
with equality at any factorization which achieves the infimum in (18). We will show that a local minimum of satisfying the conditions of the theorem also satisfies the conditions for to be a global minimum of the convex function , which implies a global minimum of due to the global bound in (37).
First, because (19) is a convex function, a simple subgradient condition gives that is a global minimum of iff the following two conditions are satisfied
Turning to the factorization objective, if is a local minimum of , then there exists such that we have . If we now consider search directions of the form
where is the index such that , then for , we have
The equality between (LABEL:eq:z_search_1) and (LABEL:eq:z_search_2) comes from the special form of given by (40) and the positive homogeneity of and . Rearranging terms, we now have
Because was arbitrary, we have established that
Further, if we choose to be vector of all ones in Lemma 14, we get
From this result, we can then test the global optimality of any local minimum (regardless of whether it has an all-zero slice or not) from the immediate corollary:
Given a function of the form given in (20), any local minimizer of the optimization problem
is a global minimizer if is a local minimizer of .
From the results of Theorem 15, we are now also able to show that if we let the size of the factorized variables () become large enough, then from any initialization we can always find a global minimizer of using a purely local descent strategy. Specifically, we have the following result.
Given a function as defined by (20), if then from any point such that there must exist a non-increasing path from to a global minimizer of .
Without loss of generality, scale so that . Now, for all , let us define
Further, from the positive homogeneity of we have
where the equality between (50) and (51) is seen by recalling that and .
As a result, as goes from we can traverse a path from without changing the value of . Also recall that by construction , so if is a local minimizer of then it must be a global minimizer due to Theorem 15. If is not a local minimizer then there must exist a descent direction and we can iteratively apply this result until we reach a global minimizer, completing the proof.
We note that from this proof we have also described a meta-algorithm (outlined in Algorithm 1) which can be used with any local-descent optimization strategy to guarantee convergence to a global minimum. While in general the size of the factorization () might increase as the algorithm proceeds, as a worst case, it is guaranteed that a global minimum can be found with a finite never growing larger than . Also note that this is a worst case upper bound on for the most general form of our framework and that for specific choices of and the bound on the maximum required can be significantly lowered.
Algorithm 1 will find a global minimum of as defined in (20). If is intialized to be greater than , then the size of the factorized variables will not increase. Otherwise, the algorithm will terminate with .
Discussion and Conclusions
We begin the discussion of our results with a cautionary note; namely, these results can be challenging to apply in practice. In particular, many algorithms based on alternating minimization can typically only guarantee convergence to a critical point, and with the inherent non-convexity of the problem, verifying whether a given critical point is also a local minima can be a challenging problem on its own. Nevertheless, we emphasize that our results guarantee that global minimizers can be found from purely local descent if the optimization problem falls within the general framework we have described here. As a result, even if the particular local descent strategy one chooses for a specific problem does not come with guaranteed convergence to a local minimum, the scope of the problem is still vastly reduced from a full global optimization. There is no need, in theory, to consider multiple initializations or more complicated (and much larger scale) techniques to explore the entire search space.
In addition to the above points, our analysis analysis also provides a few insights into the behavior of factorization problems and offers simple guidance on the design of such problems. The first is that balancing the degree of positive homogeneity between the regularization function and the mapping function is crucial. Here we have analyzed a mapping with the particular form given in (10). We conjecture our results can likely be generalized to include additional factorization mappings (which we save for future work), but even for more general mappings and regularization functions, requiring the degrees of positive homogeneity to match between the regularization function and the mapping function will be critical to showing results similar to those we present here. In general, if the degrees of positive homogeneity do not match between the factorization mapping and the regularization function, then it either becomes impossible to make guarantees regarding the global optimality of a local minimum, or the regularization function does nothing to limit the size of the factorization, so the degrees of freedom in the model are largely determined by the user defined choice of . As a demonstration of these phenomena, first consider the case where we have a general mapping which is positively homogeneous with degree (but which is not assumed to have form (10)). Now, consider a general regularization function which is positively homogeneous with degree , then the following proposition provides a simple counter-example demonstrating that in general it is not possible to guarantee that a global minimum can be found from local descent.
The above proposition shows that unless we have the special case where happens to be a global minimizer, then there will always exist a local minimum at the origin, and from the origin it will always be necessary to take an increasing path to escape the local minimum. The case described above, where , is arguably the more common situation for mismatched degrees of homogeneity (as opposed to ), and a typical example might be an objective function such as
where is a positively homogeneous mapping with degree (e.g., the mapping of a deep neural network) but is typcially taken to be only 1 or 2 depending on the particular choice of norm.
Conversely, in the situation where , then it is often the case that the regularization function is not sufficient to ’limit’ the size of the factorization, in the sense that the objective function can always be decreased by allowing the size of the factors to grow. As a simple example, consider the case of matrix factorization with the objective function
If the size of the factorization doubles, then we can always take , so if , then the objective function can always be decreased by simply duplicating and scaling the existing factorization. It is easily verified that the above inequality is satisfied for many choices of norm (for example, all the norms with ) when . As a result, this implies that the degrees of freedom in the model will be largely dependent on the initial choice of the number of columns in , since in general the objective function is typically decreased by having all entries of be non-zero.
2 Implications for Neural Networks
Examining our results specifically as they apply to deep neural networks, we first note that from our analysis we have shown that neural networks which are based on positively homogeneous mappings can be regularized in the way we have outlined in our framework so that the optimization problem of training the network can be analyzed from a convex framework. Further, we suggest that our results provide a partial explanation to the recently observed empirical phenomenon where replacing the traditional sigmoid or hyperbolic tangent non-linearities with positively homogeneous non-linearities, such as rectification and max-pooling, significantly boosts the speed of optimization and the performance of the network (Dahl et al., 2013; Maas et al., 2013; Krizhevsky et al., 2012; Zeiler et al., 2013). Namely, by using a positively homogeneous network mapping, the problem then becomes a convex function of the network outputs. Additionally, we have also shown that if the size of the network is allowed to be large enough then for any initialization a global minimizer can be found from purely local descent, and thus local minima are all equivalent. This is a similar conclusion to the work of Choromanska et al. (2014), who analyzed the problem from a statistical standpoint and showed that with sufficiently large networks and appropriate assumptions about the distributions of the data and network weights, then with high probability any family of networks learned with different initializations will have similar objective values, but we note that our results allow for a well defined set of conditions which will be sufficient to guarantee the property. Finally, many modern large scale networks do not use traditional regularization on the network weigh parameters such as an or norms during training and instead rely on alternative forms of regularization such as dropout as it tends to achieve better performance in practice(Srivastava et al., 2014; Krizhevsky et al., 2012; Wan et al., 2013). Given our commentary above regarding the critical importance of balancing the degree of homogeneity between the mapping and the regularizer, an immediate prediction of our analysis is that simply ensuring that the degrees of homogeneity are balanced could be a significant factor in improving the performance of deep networks.
We conclude by noting that the main limitation of our current framework in the context of the analysis of currently existing state-of-the-art neural networks is that the form of the mapping we study here (10) implies that the network architecture must consist of parallel subnetworks, where each subnetwork has a particular architecture defined by the elemental mapping . Previously, we mentioned as an example that the well known ImageNet network from (Krizhevsky et al., 2012) can be described by our framework by taking and using an appropriate definition of ; however, to apply Corollary 16 to then test for global optimality, we must test whether it is possible to reduce the objective function by adding an entire network with the same architecture in parallel to the given network. Clearly, this is a significant limitation for the application of these results and suggests two possibilities for future work. The first is that simply implementing neural networks with a highly parallel network architecture and relatively simple subnetwork architectures could be advantageous and worthy of experimental study. In fact, the ImageNet network already has a certain degree of parallelization as the initial convolutional layers of the network operate largely in parallel on separate GPU units. More generally, here we have focused on mappings with form (10) as it is conducive to analysis, but we believe that many of the results we have presented here can be generalized to more general mappings (and thus more general network architectures) using many of the principles and analysis techniques we have presented here; an extension we reserve for future work.
3 Conclusions
Here we have presented a general framework which allows for a wide variety of non-convex factorization problems to be analyzed with tools from convex analysis. In particular, we have shown that for problems which can be placed in our framework, any local minimum can be guaranteed to be a global minimum of the non-convex factorization problem if one slice of the factorized tensors is all zero. Additionally, we have shown that if the non-convex factorization problem is done with factors of sufficient size, then from any feasible initialization it is always possible to find a global minimizer using a purely local descent algorithm.