Latitude: A Model for Mixed Linear-Tropical Matrix Factorization

2018·arXiv

Abstract

1 Introduction

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.

2 Notation and Basic Deﬁnitions

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 to denote the non-negative real numbers , and N to denote the natural numbers {1,2,...}. The Frobenius norm of a matrix A is denoted by

Nonnegative matrix factorization. In nonnegative matrix factorization (NMF), we are given a nonnegative matrix A and target rank k, and our task is to find nonnegative factor matrices B and C that minimize . Alternatively, we can write BC , 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, where the maximum is taken element-wise. Equivalently, SMF is a matrix factorization over the subtropical (or max-times) semi-ring, that is, values 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 and target rank k, and our task is to find nonnegative factor matrices B and C that minimize

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 for 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 . For more on tropical algebra, see Section 6 and references therein.

3 The Mixed Linear–Tropical

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 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 and C and parameters such that

(1) Aij

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 fdon’t have to be restricted to binary values, we can also express some elements Ai j as a weighted sum of and

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, which is very simple, and at the same time provides an intuitive transition from the standard product at the subtropical product at 1. We obtain

for

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 and let k = 4. There exists , B , and C such that all entries of B and C are the same and that Ai j C

Proof. Let all entries of B and C be. Then for any 1 and 1 we have and 3 . Now if we set

then 0 holds. By plugging (3) into (2), we obtain , concluding the proof.

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

where and are arbitrary vectors, and is the sigmoid function.

Now, given the factors B , C and the parameter vectors , we can define their mixed linear–tropical product, B, elementwise as follows

where

It is trivial to see that when elements in both and tend to , we have B . The greater the element 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

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, , it means that row i has strong NMF-type structure, while would mean strongly subtropical structure. If , then the structure is an even mixture of the two. Similarly, if , then the element Aij has subtropical structure, and vice versa for . This interpretation also explains why we use the tropical rank-1 model, that is, summation, instead of the standard rank-1 model : if we calculate the product, we cannot interpret negative values of or as indicative of “typically NMF” structure, as if both , indicating subtropical structure.

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

Problem 1. Given an input matrix A and an integer k > 0, find two factor matrices B and parameter vectors

(6) E

is minimized.

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

Proposition 2. Given A , k, , and , finding B and C that minimize Eis NP-hard. It is also NP-hard to find B and C that approximate Eto 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].

4 The Algorithm

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 , the rank of the sought decomposition k , and an integer parameter N , that determines the number of iterations of the algorithm. It returns the computed factors B and C and parameter vectors and has also one parameter, M Each element in must belong to the 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 , 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

m times (once per column of C). Then we fix C and do 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 , the first factor matrix B , an initial solution for the output vector c , 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

For every 1 denote by the index of the largest element in the vector Bi, where is the element-wise (Hadamard) product. We have

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

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 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 the complexity of solving the nonnegative linear regression problem, then the running time of MixReg would be given by O. 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 , then the total complexity of Latitude is Nm(O(nk) +

O

Using lsqnonneg for the nonnegative regression and

denoting its average number of iterations by as above, we have that . Using projected ALS algorithm [4] for the NMF, each iteration takes Omk2 +nmk) time, and we denote the expected number of iterations of the NMF algorithm by t. With these choices, the total time complexity becomes Otk. Importantly, this is linear in the dimensions of the input matrix.

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

5 Experimental Evaluation

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 1000with 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 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-

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 interval. This means that the expected value of is 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 dimensions. 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.

parameter vectors and matrix 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.

6 Related Work

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 hthis transformation preserves the norm d. 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].

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 . Columns are divided in four groups of twelve months, as in (b). January is always at the left.

7 Conclusions

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.

References

[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

Figure 3: (a) Vector data as an image. (b) Matrix data. (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.

A Varying k Test Without the Subtropical Part

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 and parameters

Table 2: Real world datasets properties.

the element i, j of the mixed linear-tropical matrix product is given by a convex combination of

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.

B Analysis of Real-World Factors

C Runtime on Real-World Datasets.

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.

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

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

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

Designed for Accessibility and to further Open Science