b

DiscoverSearch
About
My stuff
Latitude: A Model for Mixed Linear-Tropical Matrix Factorization
2018·arXiv
Abstract
Abstract

Nonnegative matrix factorization (NMF) is one of the most frequently-used matrix factorization models in data analysis. A significant reason to the popularity of NMF is its interpretability and the ‘parts of whole’ interpretation of its components. Recently, max-times, or subtropical, matrix factorization (SMF) has been introduced as an alternative model with equally interpretable ‘winner takes it all’ interpretation. In this paper we propose a new mixed linear–tropical model, and a new algorithm, called Latitude, that combines NMF and SMF, being able to smoothly alternate between the two. In our model, the data is modeled using the latent factors and latent parameters that control whether the factors are interpreted as NMF or SMF features, or their mixtures. We present an algorithm for our novel matrix factorization. Our experiments show that our algorithm improves over both baselines, and can yield interpretable results that reveal more of the latent structure than either NMF or SMF alone.

Keywords: matrix factorization; subtropical algebra; NMF

Matrix factorizations are a popular method for extracting latent structure from the data. Different factorizations find different types of structure. For example, singular value decomposition (SVD) and principal component analysis (PCA) can be used to find the directions of the greatest variance in the data. In other cases, we might want to decompose the matrix into nonnegative components to gain so-called “parts-of-whole” interpretation. For that, we would use some nonnegative matrix factorization (NMF) algorithm. Or perhaps, instead of taking the sum of the non-negative components, we are only interested on the largest elements to gain “winner-takes-it-all” interpretation; for that, we would use subtropical matrix factorizations (SMF). Matrix factorizations are global models, meaning that they apply their structures, be that SVD, NMF, or something else, to the whole matrix. But it is not clear that any data is only a result of a single model. Indeed, it can be that parts of the data are formed using a sum of the rank-1 components, while another part is formed by taking the element-wise maximums. Consider, for example, the classical example of movie ratings data, that is, people-by-movies matrix containing the movies’ ratings. It is often assumed that these ratings have a latent low-rank structure, that there exists some k factors that dictate how much different people like different movies, and that the users’ final rating is a linear combination of these factors. For example, Alice might like some movie because she likes the director, the lead actor, and the genre, though she’s less keen on the supporting actress. But it is equally plausible that some factor is so dominant, that the rating is dictated by that factor alone. For example, Bob might like all Star Wars movies simply because they are Star Wars movies, and completely irrespective of their director, actors and actresses, or other factors. In this situation, taking the largest value instead of the sum would be a better model. In this paper we present a mixed linear–tropical model that allows us to mix NMF and subtropical matrix decompositions. This provides us much more accurate decompositions than what we can achieve using either NMF or SMF – or even SVD – alone (see Section 5). That we can improve over the base models, NMF and SMF, indicates that our hypothesis of the data being of mixed structure is correct. In addition to giving a better reconstruction error, our model is also highly interpretable, and uncovers interesting novel structure from the data. Namely, we can study which elements are more NMF-style and which are more SMF-style.Our algorithm for finding the mixed linear–tropical structure is called Latitude, as it varies smoothly between the tropic (SMF) and pole (NMF). Latitude can be used to decompose relatively large data sets, as it scales linearly with the input data.

Main contributions. In this paper we present a novel matrix factorization model, called mixed linear–tropical model (Section 3) and a scalable algorithm for finding a decomposition in this model (Section 4). Our experiments (Section 5) show that our algorithm finds decompositions that have smaller reconstruction error than what NMF or SMF methods – or even SVD – can find, and that the results are also intuitive and reveal interesting structures from the data sets.

In this section we present the basic notation and briefly recall NMF and SMF. We postpone the discussion of the related work to Section 6.

Basic notation. Throughout this paper we will denote the ith row of matrix A with Ai and the jth column with Aj. Element (i, j) of A is Ai j. We use  R+to denote the non-negative real numbers  [0,∞), and N to denote the natural numbers {1,2,...}. The Frobenius norm of a matrix A is denoted by  ∥A∥F =�∑i j A2i j�1/2.

Nonnegative matrix factorization. In nonnegative matrix factorization (NMF), we are given a nonnegative matrix A  ∈ Rn×m+and target rank k, and our task is to find nonnegative factor matrices B  ∈ Rn×k+and C  ∈ Rk×m+that minimize  ∥A−BC∥F. Alternatively, we can write BC  = ∑ki=1 BiCi, where each BiC j is a nonnegative rank-1 component matrix. Each component matrix contributes a nonnegative part to the total sum, and it is standard to interpret these rank-1 components as “parts of a whole.” Over the years, many different algorithms have been proposed to solve NMF, with methods based on alternating least squares optimization or multiplicative update rules be- ing the most prominent ones (see [4] for a comprehensive treatise).

Subtropical matrix factorization. Subtropical matrix factorization (SMF) is similar to NMF, but it replaces the sum with the maximum in the component formulation: B⊠C = maxki=1{BiCi}, where the maximum is taken element-wise. Equivalently, SMF is a matrix factorization over the subtropical (or max-times) semi-ring, that is, values  R+endowed with the addition operation max and the multiplication operation  ×(i.e. the standard multiplication). To recap, in SMF, we are given a nonnegative matrix A  ∈ Rn×m+and target rank k, and our task is to find nonnegative factor matrices B  ∈ Rn×k+and C  ∈ Rk×m+that minimize  ∥A−B⊠C∥F =��A−maxki=1{BiCi}��F.

Since only the element-wise largest element has effect to the final product, SMF is said to exhibit the “winner-takes-it-all” structure. This tends to yield sparser factor matrices [8, 9]. Note also that  (B ⊠C)ij ≤ (BC)ijfor all i and j. Since SMF is taken over the subtropical semiring, it is possible that the factorization obtains smaller reconstruction error than SVD.

It should be noted that the concept of a rank-1 matrix in NMF and SMF coincide, even though rank-k decompositions are generally different. This is a key feature for our model. In tropical algebra the summation operation is max and the multiplication is +. Hence, matrix A has tropical rank-1 if there exists vectors a and b such that Aij  = ai +b j. For more on tropical algebra, see Section 6 and references therein.

image

Rather than describing the data using NMF or subtropical matrix factorization, we propose a hybrid model that incorporates them both and allows for a smooth transition between the two. Ideally, given an input matrix A  ∈ Rn×m+ ,we want to be able to determine what elements Aij are better represented using the standard algebra, and which ones require the subtropical one. Namely, we seek factor matrices B  ∈ Rn×k+and C  ∈ Rk×m+and parameters  α ∈ Rn×msuch that

(1) Aij  ≈ f(αij)(B⊠C)+g(αij)(BC)ij ,

for some functions f and g that we will define below. By representing A as a “mixture” of the normal and subtropical products of the factor matrices, we allow for more flexibility in fitting the data. Since by altering the parameter matrix  αwe can choose different mixing coefficients for different elements of A, it is possible to better explain data that has piecewise NMF and piecewise subtropical structure. Moreover, since the functions f(αi j) and g(αij)don’t have to be restricted to binary values, we can also express some elements Ai j as a weighted sum of  (B⊠C)ijand  (BC)ij.

It is important to note that the equation (1) is quite general, and unless we impose restrictions on functions f and g, as well as the matrix  α, our model will overfit the data. When it comes to choosing the proper functions f and g, there is a trade-off between fitting the data and keeping the model simple. In this paper we use the convex combination f(αi j) = αi j,g(αi j) = 1 − αi j,αi j ∈ [0,1], which is very simple, and at the same time provides an intuitive transition from the standard product at  αij = 0 tothe subtropical product at  αi j =1. We obtain

image

for  αij ∈ [0,1].

When choosing  αwe are faced with a similar trade-off. Indeed, if allow  αbe unconstrained, we can fit arbitrarily complex matrices with constant factor matrices, as the following proposition illustrates.

Proposition 1. Let A  ∈ [1,2]n×mand let k = 4. There exists  α ∈ [0,1]n×m, B  ∈ Rn×k+, and C  ∈ Rk×m+such that all entries of B and C are the same and that Ai j  = αij(B⊠C)+(1−αij)(BC)i j for all i = 1,...,n and j = 1,...,m.

Proof. Let all entries of B and C be√3/2. Then for any 1  ≤ i ≤ nand 1  ≤ j ≤ mwe have  (B ⊠C)i j = 3/4and (BC)ij =3 . Now if we set

image

then 0  ≤ αij ≤ 1holds. By plugging (3) into (2), we obtain  αij(B ⊠C)i j + (1 − αi j)(BC)i j = Ai j, concluding the proof.

Being able to decompose essentially arbitrary matrix into constant factor matrices shows that unrestricted  α canhave too much power. To constrain  α, we enforce it to have essentially a tropical rank-1 structure:

image

where  θ ∈ Rn×1and  φ ∈ R1×mare arbitrary vectors, and σ(x) = 1/(1+e−x)is the sigmoid function.

Now, given the factors B  ∈ Rn×k+, C  ∈ Rk×m+and the parameter vectors  θ ∈ Rn×1, φ ∈ R1×m, we can define their mixed linear–tropical product, B⊠θ,φ C, elementwise as follows

image

where  αij = σ(θ i +φ j).

It is trivial to see that when elements in both  θand  φtend to  −∞, we have B  ⊠θ,φ C → BC. The greater the element  αij = σ(θ i +φ j)is, the closer the corresponding element in the mixed product is to the subtropical product. In the limit, when all elements of  αtend to  ∞, we have B⊠θ,φ C → B⊠C.

We can interpret the values in parameter vectors  θand φto give the “typical” level of NMF or subtropical structure associated with the corresponding rows and columns. If, for example,  θ i ≪ 0, it means that row i has strong NMF-type structure, while  θ i ≫ 0would mean strongly subtropical structure. If  θ i ≈ 0, then the structure is an even mixture of the two. Similarly, if  θ i + φ j ≫ 0, then the element Aij has subtropical structure, and vice versa for  θ i + φ j ≪ 0. This interpretation also explains why we use the tropical rank-1 model, that is, summation, instead of the standard rank-1 model  θφ T: if we calculate the product, we cannot interpret negative values of  θ ior φ jas indicative of “typically NMF” structure, as if both θ i,φ j < 0, then θ iφ j > 0, indicating subtropical structure.

Now we can define the main problem considered in this paper.

Problem 1. Given an input matrix A  ∈ Rn×m+and an integer k > 0, find two factor matrices B  ∈ Rn×k+ and C ∈ Rk×m+and parameter vectors  θ ∈ Rn×1 and φ ∈ R1×m such that

(6) E(A,B,C,θ,φ) = ∥A−B⊠θ,φ C∥F

is minimized.

Unfortunately it seems that the optimization of the above problem is hard:

Proposition 2. Given A  ∈ Rn×m+, k,  θ, and  φ, finding B  ∈ Rn×k+and C  ∈ Rk×m+that minimize E(A,B,C,θ,φ)is NP-hard. It is also NP-hard to find B  ∈ Rn×k+and C  ∈ Rk×m+that approximate E(A,B,C,θ,φ)to within any polynomially computable factor.

The proposition is a direct consequence of the NPhardness of computing or approximating NMF [15] or subtropical matrix factorization [9].

The algorithm Latitude (Algorithm 1) finds a mixed linear–tropical matrix decomposition of the given input data.1 As input it accepts the data matrix A  ∈ Rn×m+, the rank of the sought decomposition k  ∈ N, and an integer parameter N  ∈ N, that determines the number of iterations of the algorithm. It returns the computed factors B  ∈ Rn×k+and C  ∈ Rk×m+and parameter vectors  θ ∈ Rn×1and  φ ∈ Rn×1. Latitudehas also one parameter, M  ∈ R+.Each element in  θ and φmust belong to the  [−M,M] inter-val. However, in practice very high values in the parameter vectors do not make sense due to the use of the sigmoid function (see (4)) – they would get “smoothed out” and make only marginal changes to the parameter matrix  α. For this reason for all experiments in this paper we used M = 5, at which point  σ(M) = 0.9933, and there is almost nothing to be gained by increasing M further.

The main idea of Latitude is to repeatedly use a routine that solves the linear–tropical regression problem to alternatingly update the factor matrices and the parameter vectors. Namely, when the factor matrix B and the parameter vector  θare fixed, finding the other factor matrix C and parameter vector  φreduces to solving the problem

image

m times (once per column of C). Then we fix C and  φ anddo the same for B and  θ. This process is repeated M times. The algorithm starts by initializing the factor matrices B and C (line 2). This can be done by using random matrices, or, for example, by using some NMF algorithm. Starting with a “pure” NMF solution gives us a reasonable initial solution, and we use that initialization in our experiments. The updates to the factors and parameters are done inside the main loop (lines 12–20), where line 14 updates C and φ, and line 16 updates B and  θ. On each iteration we check if the current solution B, C,  θ, φimproves on the best one found before that (line 17), and if it does, then we update the best solution and the best error (lines 18–20).

The function MixReg (Algorithm 2) solves problem (7), and is where the actual updates to the factors and parameters are performed. It takes as input vector a  ∈ Rn×1+, the first factor matrix B  ∈ Rn×k+ , an initial solution for the output vector c  ∈ Rk×1+, the column parameter vector  θ, the starting value for the row parameter element t, and the number M > 0 that defines the range of the values in the parameter vectors. It returns the updated versions of the vector c and the element t. Finding the global minimum of (7) with respect to both c and t is hard, and hence we update them separately. In fact, even when the parameter t is fixed, optimizing (7) with respect to c is problematic. To see that, let us first rewrite (7) for a fixed value of t. It becomes

image

For every 1  ≤ i ≤ ndenote by  ϕ(i,c)the index of the largest element in the vector Bi□cT, where  □is the element-wise (Hadamard) product. We have

image

If the coefficient matrix Y(c) did not depend on c, (10) would become a standard nonnegative linear regression problem. Unfortunately, the dependence of  ϕ(i,c) on c isvery complex, and hence it is hard to solve (10) directly. In order to overcome this obstacle, we use another heuristic,

image

that is we fix the coefficient matrix Y(c), and assume it to be independent from c. Under these assumptions c can be found using a standard nonnegative linear regression algorithm. We use the MATLAB built-in lsqnonneg. The matrix Y is built on lines 2–5, and the vector c is found on line 6. Finally, on line 7 we update the parameter t. This is done using the binary search on the interval  [−M,M]for the point where the derivative with respect to t is close to 0.

Time complexity. Running Latitude comprises of executing NMF to initialize the factors, and then repeatedly updating them, as well as the parameters, using the MixReg routine. For each i = 1,...,n and j = 1,...,m, MixReg is called N times. In order to estimate the complexity of MixReg it suffices to consider the case when it is called to update C and  φas the alternate case is analogous (one just needs to replace n by m). Computing the matrix Y (lines 2–5) and finding t (line 7) take time O(nk) each; the latter one because it is enough to make a finite number of steps of the binary search. Thus, if we denote by  Γ(n,k)the complexity of solving the nonnegative linear regression problem, then the running time of MixReg would be given by O(nk) + Γ(n,k). Since we use NMF to initialize the factors, the runtime of Latitude depends on what NMF algorithm is called. If we denote the complexity of NMF by  Π(n,m,k), then the total complexity of Latitude is Nm(O(nk) +

image

O(Nnmk)+NmΓ(n,k)+NnΓ(m,k)+Π(n,m,k).

Using lsqnonneg for the nonnegative regression and

denoting its average number of iterations by  ℓas above, we have that  Γ(n,k) = O(ℓnk2). Using projected ALS algorithm [4] for the NMF, each iteration takes O(nk2 +mk2 +nmk) time, and we denote the expected number of iterations of the NMF algorithm by t. With these choices, the total time complexity becomes O�Nk(nm + lnmk) +tk(nk+mk+nm)�. Importantly, this is linear in the dimensions of the input matrix.

For actual runtime on various real-world dataset see Appendix C.

In this section we test Latitude on both synthetic and real-world data, in order to verify how well it can recover the mixed tropical-linear structure. We also compare it against various benchmark matrix factorization methods.

5.1 Other methods.

Since Latitude is designed to work with data that has a mixture of NMF and SMF structures, it is important to compare against algorithms that target them both. There is a multitude of NMF algorithms, but in this paper we use MATLAB’s default implementation nnmf, to which we will refer simply as NMF. We will also compare against SVD in order to get a comparison to optimal rank-k decomposition. Unlike NMF or SVD, the subtropical matrix factorization is a quite new direction of research, and to the best of our knowledge there are only two available algorithms: Cancer [8] and Capricorn [9]. Of these, Cancer is more suitable due to its ability to handle Gaussian noise, and hence we chose it over Capricorn.

5.2 Synthetic Experiments.

The purpose of the synthetic experiments is to verify that the proposed algorithms are actually capable of recovering the sought structure when the data conforms to the mixed tropical-linear model. First we generate the data using the mixed tropical-linear structure, then add some Gaussian noise, and finally run the methods to see how much structure they can recover. Unless stated otherwise, the matrices are of size 1000×800with true rank 10 and values drawn uniformly at random from the [0,1] interval. The factor density is by default 20%, and the standard deviation of the Gaussian noise is 0.01. In order to make sure that after applying the noise the data remains nonnegative, we truncate all values below 0. The parameter vectors  θand φare drawn uniformly at random from the  [−5,5] interval.For the pure subtropical and NMF structure experiments we did not use parameters, but rather multiplied the factors directly. The reconstruction error is always measured against the original, noise-free matrix.

Varying noise with pure subtropical data. (Fig 1a) This experiment tests how well various methods can recover the pure subtropical structure, that is, the extreme case of all parameters being set to  ∞. The data is generated by multiplying the factors using the subtropical matrix product. We varied the standard deviation of the Gaussian noise from 0 to 0.14 with increments of 0.01. Latitude is clearly the best method, followed by Cancer, and NMF and SVD come close together in the last place. The reason why Latitude beats Cancer on its own kind of data is that it has more leeway in choosing what structure to use, thus being able to fit everywhere where Cancer approximates the data well, but also deviate from the pure subtropical model when needed. NMF and SVD do not seem to find much structure in this experiment. In this and some other experiments SVD and NMF produce similar reconstruction errors, which sometimes makes their lines hard to distinguish.

Varying noise with pure NMF data. (Fig. 1b) This setup is analogous to the previous one, except now the data was generated using the pure NMF structure. Here, NMF and SVD are performing very well, as is expected as the data is generated with the NMF structure. Latitude, although having been initialized by NMF, only achieves the same results for zero level of noise – then its results start to slowly deteriorate. The cause of this is that it overfits to the noise. Nevertheless, Latitude’s results are not much worse than NMF or SVD, and hence it is definitely applicable to datasets that exhibit the pure NMF structure. Meanwhile Cancer is the worst of the methods, which is expected given that the data has pure NMF rather than subtropical structure.

Varying noise with mixed data. (Fig. 1c) Here we test the actual mixed model by using parameters drawn uni-

image

Figure 1: Reconstruction errors on synthetic data. The x-axis represents the varying parameter and the y-axis the Frobenius error. All results are averages over 10 random matrices and the width of the error bars is twice the standard deviation.

formly at random from the  [−5,5]interval. This means that the expected value of  θ i +φ jis 0, which corresponds to the midpoint between the NMF and subtropical structures. The randomness ensures that both structures are present in the data. Here NMF and SVD perform much better than for the pure subtropical case, but Latitude is nevertheless the best method by a big margin, which demonstrates the advantages of combining both models.

Varying factor density with mixed data. (Fig. 1d) Here we varied the factor density from 10 % to 100 % with increments of 10 %. Again, we have Latitude as the best method. There is a peculiar bump on its curve at the very low density level. It can be explained by noise having more influence on sparse data, since then the data/noise ratio is worse.

Varying rank with mixed data. (Fig. 1e) Here we varied the actual rank of the data from 2 to 40 with increments of 2. The factor density was kept at 50 %. As in previous experiments, Latitude performs significantly better, especially for lower ranks. Appendix A contains another variation of this setup.

Varying rank with mixed data with a high level of noise. (Fig 1f) Same setup as above, but with a higher level of noise (standard deviation 0.07). Latitude again performs much better than other methods, albeit having a weird bump for lower ranks. Here again it is explained by lower rank data having also lower density, which exacerbates the effect of the noise. It is worth mentioning that, with the exception of the subtropical data test (Fig 1a), Cancer gives the highest reconstruction error. This is not surprising since it aims at recovering the subtropical structure, which is no more present in the data in its pure form.

5.3 Real-World Experiments.

Now that we have evidence that Latitude can extract the mixed tropical-linear structure when it is present in the data, we want to see if this kind of structure is also present “in the wild”. For that we ran all the competing algorithms on various real-world datasets. First we briefly describe the data, then provide the numerical comparison of the results of the algorithms, followed by some example results.

Datasets. Rather than using raw data, we did some common preprocessing for the real-world datasets. To ensure nonnegativity, we subtract from each column its smallest element. In addition, to make the data more uniform, we divide each column by its standard deviation. These steps are performed on all matrices except 4News, for which we use the TF-IDF model. Climate was obtained from the global climate data repository.2 It describes historical climate data across different geographical locations in Europe. Columns represent minimum, maximum, and average temperatures and precipitation in different months, and rows (2575) are 50-by-50 kilometer squares of land where measurements were made. Although temperatures and precipitation are seemingly heterogeneous and have different numeric scales, they are equally important in determining the climate type. To be able to use both of them together, prior to performing the standard preprocessing as with other matrices, we subtract from every column its mean. NPAS is a nerdiness personality test that uses different attributes to determine the level of nerdiness of a person.3 It contains answers by 1418 respondents to a set of 36 questions that asked them to self-assess various statements about themselves on a scale of 1 to 7. We preprocessed NPAS analogously to Climate. Face is a subset of the Extended Yale Face collection of face images [5]. It consists of 222 32-by-32 pixel images under different lighting conditions. We used a preprocessed data by Xiaofei He et al.4 We selected a subset of pictures with lighting from the left. 4News is a subset of the 20 Newsgroups dataset,5 containing the usage of 800 words over 400 posts for 4 newsgroups.6 Before running the algorithms we transformed the data to TF-IDF values, and scaled by dividing each entry by the greatest entry in the matrix. HPI is a land registry house price index.7 Rows (253) represent months, columns (177) are locations, and entries are residential property price indices. Further information about these datasets is available in Table 2 in the Appendix.

Numerical experiments. The reconstruction errors for all the real-world experiments are shown in Table 1. Latitude and SVD are competing for the first place, with Latitude having the best reconstruction error in 2 datasets and SVD in 3. All other methods fall significantly behind. It is worth mentioning that SVD has an advantage in that it its factors are not restricted to nonnegative values. One can also argue that Latitude has more degrees of freedom due to having one additional dimension of parameters. For this reason we also test the truncated version, called Lat.trunc., that was run with k  −1dimensions. It is still the third best method (after SVD and Latitude), beating both NMF and Cancer by a wide margin. Given these results we can conclude that the mixed tropical-linear structure is present in the datasets that we tested, and that Latitude is an appropriate algorithm to extract this structure.

Interpretation. In order to validate that our approach also provides interpretable results, we study the results with Climate and Face in more detail. We used the ranks from Table 1. NMF is used in climate models [13], so we would expect this data to have mostly NMF structure, but certain phenomena, such as rainfall, and certain areas, such as mountains or coastal sites, can well have more subtropical structure. To validate this intuition, we can study the

Table 1: Reconstruction error for real-world datasets.

image

parameter vectors  θ and φand matrix  α =�σ(θ i +φ j)�ij.For the Climate data, these are depicted in Figure 2. Recall that for the parameters, negative values indicate NMF-type structure, while positive values indicate subtropical-type structure. Vector  θcorresponds to the geographical locations, and its values are plotted in a map in Figure 5a. As we expected, most of the data has NMF-type structure (depicted as blue), but especially Lapland, Portugal, and some mediterranean coastlines have more subtropical-type structure. These areas probably have some dominating climate phenomena, for example, heavy rainfall or low temperatures, that is best explained using subtropical structure. Vector  φcorresponds to the climate variables. The values in  φare shown in Figure 5b, where we can see that most variables are negative, that is, they have NMF-type structure. Precipitation is an exception, as the precipitation variables for January and May are in fact positive, indicating more subtropical-type structure. The complete parameter matrix  αis shown in Figure 5c. Most elements in the factorization have medium to strong NMF-type structure, but there exist also elements with more subtropical-type structure. The vector  θfor the Face data corresponds to the pixels and is depicted in Figure 3a. It is clear that the dominating features of faces – eyes, nose, and mouth, are best expressed using subtropical-type structure, while the other parts are better explained using NMF-type structure. This is to be expected, as the subtropical areas are those where lighting has the largest effects (either as bright areas, or areas in shadows, depending on the direction of the light). These extremes are often easiest to describe using the subtropical structure.

Similarly to Climate, we can also plot the matrix  α.8

There we notice that there are some faces that have a strong subtropical structure, and again, most of the structure is mostly NMF. To validate that also the factors are interpretable, we present examples from the left factor matrix B for the Face data in Figure 3c. We see that factors mostly depict facial features, except the one at the bottom right, which can be used to add lighting effects to the bottom left part of the figures.

Nonnegative matrix factorization is a well-studied data analysis method, and over time, many algorithms have been proposed (e.g. [11,13]; see [4] for a comprehensive treatise). NMF has been applied to many data analysis problems (e.g. [2,14,16]) and algorithms for computing it are included in all major data analysis packages.

Subtropical (or max-times) matrix factorizations are less commonly used in data analysis. The use of approximate low-rank SMF in data analysis was first presented by [9] together with the Capricorn algorithm. Capricorn is designed for subtropical noise, and later [8] presented the Cancer algorithm that deals with Gaussian noise. Recently, Capricorn and Cancer have been unified under the Equator framework [10], that also provided other quality functions than the squared error.

In general a tropical semiring is any semiring in which the addition operation is max or min. Other than max-times two well studied examples are the max-plus and min-plus semirings [3, 6]. Note that the max-plus and min-plus semirings are isomorphic via the map h(x) = −x and thatthis transformation preserves the norm d(x,y) = |x−y|. Note also that max-plus (tropical) and max-times (subtropical) are also isomorphic via h(x) = exp(x), but that the norm is not preserved by this transformation [9]. This means that whilst the algebraic structures of max-plus and max-times are the same, approximation in max-plus works differently to approximation in max-times. Intuitively max-times gives a lower weight to relative perturbations of smaller numbers. Approximation of network structures by low-rank min-plus matrix factorization is explored in [7]. Possible applications of max-plus low-rank matrix factorizations to non-linear image processing are discussed in [1].

image

Figure 2: Visualizations for the parameters in the decomposition of Climate. (a) Values in vector  θplotted in a map. (b) Values in vector  φshown as a bar plot. The variables are divided in four groups of twelve months corresponding to minimum, maximum, and average temperature, and precipitation (tmin, tmax, tavg, and rain, respectively). January is always at the bottom. (c) The matrix  α =�σ(θ i +φ j)�i, j. Columns are divided in four groups of twelve months, as in (b). January is always at the left.

Mixed linear–tropical factorization is an interesting novel model for matrix factorization. By smoothly combining factorizations over two algebras, it allows us to model complex structure with an interpretable way. Our algorithm, Latitude, was able to consistently obtain better reconstruction errors than either NMF or SMF algorithms. Indeed, Latitude was often better than even SVD. And while SVD comes with well-known limitations to the interpretability, Latitude’s factorization is easier to interpret due to the nonnegative factor matrices and intuitive interpretation of the parameter vectors.

While Latitude generally showed superior performance compared to NMF of SMF, there were a few instances where it performed slightly worse, which was due to overfitting to the noise. This raises the question of the use of regularization in mixed linear–tropical factorization and is left for future studies.

Latitude has running time which is linear in the input matrix’s dimensions, making it a rather scalable method. Its reliance on nonnegative least-squares optimization, however, can be a limiting factor in scaling Latitude to big data and distributed systems. Our goal in this paper was to establish the feasibility and usability of mixed linear–tropical models, and developing more scalable al-

gorithms is a natural next step.

In this work we constrained the parameter matrix  αto tropical rank-1 (before the logistic transformation). As we saw in Proposition 1, some constraints are mandatory for sensible decompositions. It is an interesting open question how much more power would a tropical rank-2 parameter matrix give. Also, the relationship between the rank of the factorization and the rank of the parameter matrix is currently unknown.

[1] J. Angulo and S. Velasco-Forero. Non-negative sparse mathematical morphology. Advances in Imaging and Electron Physics, 2017.

[2] J.-P. Brunet, P. Tamayo, T. R. Golub, and J. P. Mesirov. Metagenes and molecular pattern discovery using matrix factorization. Proc. Natl. Acad. Sci. U.S.A., 101(12):4164–4169, 2004.

[3] P. Butkoviˇc. Max-Linear Systems: Theory and Algorithms. Springer, 2010.

[4] A. Cichocki, R. Zdunek, A. H. Phan, and S.-i. Amari. Nonnegative Matrix and Tensor Factorizations: Applications to Exploratory Multi-way Data Analysis

image

Figure 3: (a) Vector  θ for the Facedata as an image. (b) Matrix  α for the Facedata. (c) Four columns of B for the Face data.

and Blind Source Separation. John Wiley & Sons, Chichester, 2009.

[5] A. S. Georghiades, P. N. Belhumeur, and D. J. Kriegman. From few to many: Generative models for recognition under variable pose and illumination. In FG ’00, pages 277–284, 2000.

[6] B. Heidergott, G. J. Olsder, and J. van der Woude. Max Plus at Work: Modeling and Analysis of Synchronized Systems: A Course on Max-Plus Algebra and Its Applications. Princeton University Press, 2005.

[7] J. Hook. Linear regression over the max-plus semiring: algorithms and applications. arXiv:1712.03499., 2017.

[8] S. Karaev and P. Miettinen. Cancer: Another Algorithm for Subtropical Matrix Factorization. In ECML-PKDD ’16, pages 576–592, 2016.

[9] S. Karaev and P. Miettinen. Capricorn: An Algorithm for Subtropical Matrix Factorization. In SDM ’16, pages 702–710, 2016.

[10] S. Karaev and P. Miettinen. Algorithms for Approximate Subtropical Matrix Factorization. Technical Report 1707.08872, arXiv, July 2017.

[11] D. D. Lee and H. S. Seung. Algorithms for Nonnegative Matrix Factorization. In NIPS ’01, pages 556–562, 2001.

[12] P. Miettinen. Matrix decomposition methods for data mining: Computational complexity and algorithms. PhD thesis, University of Helsinki, 2009.

[13] P. Paatero and U. Tapper. Positive matrix factorization: A non-negative factor model with optimal utilization of error estimates of data values. Environmetrics, 5:111–126, 1994.

[14] V. P. Pauca, F. Shahnaz, M. W. Berry, and R. J. Plemmons. Text mining using nonnegative matrix factorizations. In SDM ’04, pages 22–24, 2004.

[15] S. A. Vavasis. On the Complexity of Nonnegative Matrix Factorization. SIAM J. Optim., 20(3):1364– 1377, 2009.

[16] W. Xu, X. Liu, and Y. Gong. Document clustering based on non-negative matrix factorization. In SIGIR ’03, pages 267–273, 2003.

Earlier we have observed that in the varying dimensionality experiments Latitude and SVD become very close for higher values of k. This inspired a hypothesis that as k grows, the mixed linear-tropical model becomes easier to describe using the standard algebra. Recall that for matrices B  ∈ Rn×k+ and C ∈ Rk×m+and parameters  α ∈ [0,1]n×m,

Table 2: Real world datasets properties.

image

the element i, j of the mixed linear-tropical matrix product is given by a convex combination of  (B⊠C)ij and (BC)ij

image

It is clear that if densities of B and C remain fixed, then as k grows, the second term of (11) becomes more and more dominant. This is because on expectation the sum of k elements grows much faster with k than does their maximum. As a result, when all other parameters are fixed, the influence of the tropical term diminishes as the dimensionality grows, and the data becomes more “classical”. That does not mean, however, that the structure becomes NMF-like since all the elements inside the NMF part are still scaled by  α. To test our conjecture we once again generated data with varying k, but this time without the subtropical term in (11). The results are shown in Figure 4. It is apparent that SVD has improved compared to normal mixed model, and for k > 8 it produces better reconstruction errors than Latitude. It is worth noting that this experiment was made to verify our hypothesis and does not follow the model that Latitude is designed to solve. As expected, NMF does not perform well – scaling by the parameter  αseems to destroy the structure it is looking for. We did not include Cancer in this experiment due to its generally poor results for non-tropical data and slow performance for higher ks.

The properties of the real-world data sets are summarized in Table 2.

The factor matrices  αfor NPAS, HPI, and 4News can be seen in Figure 5.

Table 3: Runtime in seconds for real-world datasets.

image

Table 3 shows the execution time of Latitude and the benchmark algorithms for all datasets used in this paper. Although it is evident that both SVD and NMF are much faster, it is worth noting that Latitude is an iterative algorithm, and its objective improvements tend to become smaller over time. In many cases it produces reasonably high quality results after only a few iterations, which can be used to save execution time. Figure 6 demonstrates the convergence rate of Latitude.

image

Figure 4: Reconstruction errors for varying k with the subtropical part of the data removed. The x-axis represents k and the y-axis the Frobenius error. All results are averages over 10 random matrices and the width of the error bars is twice the standard deviation.

-10

-5

image

Figure 5: Visualizations for the parameter matrices with different real-world data sets.

image

Figure 6: Reconstruction error of Latitude as a function of time for real-world datasets.


Designed for Accessibility and to further Open Science