Abstract
For a very broad range of problems, recommendation algorithms have been increasingly used over the past decade. In most of these algorithms, the predictions are built upon user-item affinity scores which are obtained from high-dimensional embeddings of items and users. In more complex scenarios, with geometrical or capacity constraints, prediction based on embeddings may not be sufficient and some additional features should be considered in the design of the algorithm. In this work, we study the recommendation problem in the setting where affinities between users and items are based both on their embeddings in a latent space and on their geographical distance in their underlying euclidean space (e.g., $\mathbb{R}^2$), together with item capacity constraints. This framework is motivated by some real-world applications, for instance in healthcare: the task is to recommend hospitals to patients based on their location, pathology, and hospital capacities. In these applications, there is somewhat of an asymmetry between users and items: items are viewed as static points, their embeddings, capacities and locations constraining the allocation. Upon the observation of an optimal allocation, user embeddings, items capacities, and their positions in their underlying euclidean space, our aim is to recover item embeddings in the latent space; doing so, we are then able to use this estimate e.g. in order to predict future allocations. We propose an algorithm (SiMCa) based on matrix factorization enhanced with optimal transport steps to model user-item affinities and learn item embeddings from observed data. We then illustrate and discuss the results of such an approach for hospital recommendation on synthetic data.
Introduction
Traditional recommendation systems, such as those used by Netflix or Amazon, typically operate in a digital environment where consumption is virtually unlimited. However, in critical physical sectors like healthcare, urban planning, or logistics, recommendations must respect two fundamental physical realities: capacity constraints (e.g., a hospital has finite beds) and geographical distance (the "best" choice is often the nearest high-quality option).
When observing historical allocations—such as which patients were assigned to which hospitals—the data is often "bottlenecked" by these constraints. A patient might not have attended the hospital that best matched their pathology simply because that facility was at capacity. SiMCa (Sinkhorn Matrix Factorization) addresses this inverse problem: recovering the true latent features of items from observed allocations while accounting for physical constraints.
Methodology
SiMCa integrates Matrix Factorization with Optimal Transport (OT) to model user-item affinities. The framework defines an affinity score that combines the standard inner product of user/item latent embeddings with a penalty for geographical distance.
To handle item capacities, the recommendation task is framed as a Linear Assignment Problem (LAP). Unlike standard top-$k$ recommendation, this approach seeks a global matching that maximizes total affinity across all users without exceeding any item's capacity. Because standard LAP is non-differentiable, the authors employ Sinkhorn Regularization. By adding an entropy term, the discrete assignment problem becomes a smooth, differentiable "soft" matching. This allows the model to use the Sinkhorn-Knopp algorithm within a gradient-based learning loop, backpropagating errors to update item embeddings.
Experimental Setup
Due to the lack of open-source datasets containing both hospital capacities and latent pathology features, the authors utilized synthetic data to validate the model.
In this setup, 1,000 users and 3 items were embedded in a 2D latent space using a Gaussian mixture model to represent preferences. Simultaneously, their physical positions were sampled on a circle to simulate geographical proximity. Item capacities were distributed to ensure the total capacity matched the total number of users, creating a constrained environment for the allocation algorithm to solve.
Key Results
The SiMCa framework demonstrated strong performance in recovering latent item characteristics from constrained observations:
- High Recovery Accuracy: The model achieved an F1 score near 1.0 on synthetic data, indicating near-perfect reconstruction of the optimal user-to-item allocation.
- Embedding Convergence: As training progressed, the model successfully "uncovered" the hidden item features. The mean Euclidean distance between the learned embeddings and the ground-truth embeddings decreased steadily, confirming the effectiveness of the differentiable matching approach.
- Robustness: The algorithm remained stable even when Gaussian noise was introduced to user features or when random swaps were made in the observed allocations. While performance naturally degrades with higher noise, the model's underlying convexity (proven in the paper for linear affinity functions) ensures reliable convergence to a global optimum.
Conclusion and Future Work
SiMCa provides a robust mathematical bridge between latent preference modeling and physical resource management. By making the assignment problem differentiable, it allows standard machine learning tools to solve complex allocation problems. Future research will focus on validating the model with real-world healthcare datasets and exploring dynamic scenarios where item capacities change in real-time.
Summary updated