Notes

Tensor Factorization

Matrix factorization asks a two-part question: how much does this user like this item. But the same user wants different things on a Monday commute than on a Saturday evening, and a matrix has nowhere to put that.

Adding a third mode
Tensor factorization extends latent factors to a three-dimensional array — user × item × context — where the context axis holds whatever situational variable matters: time of day, location, device, who the user is with. Each slice is one context's user-item matrix, mostly empty. The CP decomposition learns one factor vector per user, per item and per context value and predicts by summing their elementwise product; Tucker decomposition adds a small core tensor that lets the three factor spaces interact with learned weights, the form Multiverse Recommendation uses.

Why it matters
The alternatives throw information away. Pre-filtering trains a separate model per context and starves each of data; post-filtering reorders a context-blind list and can only demote, never discover. Tensor factorization learns the context's effect as a shared representation, so an evening-viewing pattern learned across many users transfers to a user with few evening interactions.

What goes wrong
Sparsity compounds: splitting an already-sparse matrix across context values leaves slices with almost nothing in them. Continuous context has to be bucketed, and the buckets are a modelling decision — too fine and every slice is empty, too coarse and the signal disappears.

Tensor factorization generalises matrix factorization to a third mode, decomposing a user × item × context array into latent factors — one vector per user, item and context value — with CP or Tucker decomposition. It models how the situation of a request changes preference inside a single model, instead of training one model per context or reordering a context-blind list afterwards. The cost is sparsity: dividing an already-sparse matrix across context values empties many slices.

Picture a spreadsheet of who liked what: people down the side, films across the top. Useful, but flat. Now imagine a stack of those sheets — one for weekday mornings, one for Friday nights, one for watching with children. Same people, same films, different answers.

Tensor factorization is the maths for working with that stack instead of a single sheet. It learns a short summary of each person, each film and each situation, and combines all three to guess what you want right now. That is why a service can suggest something different at 8am than at 10pm without needing a whole separate system for each.