A Geometric Approach to Personalized Recommendation with Set-Theoretic Constraints Using Box Embeddings
Shib Dasgupta, Michael Boratko, Andrew McCallum
TL;DR
The paper tackles personalized recommendation under explicit set-theoretic constraints (e.g., “comedy and not romance”) where standard vector embeddings struggle with intersection and negation. It introduces Box Embeddings, modeling users, items, and attributes as axis-aligned boxes and uses a differentiable GumbelBox energy to compute containment-based scores, enabling direct, efficient set operations during inference. A noise-contrastive training objective pairs box containment with negative sampling, and the approach is evaluated on three domains (MovieLens, Last-FM, NYC-R) with simple and complex queries, demonstrating that Box-Geometric substantially outperforms vector-based baselines by up to about 30% in HR@50 and provides stronger generalization under set-theoretic compositions. The work establishes box embeddings as a suitable inductive bias for set-theoretic query recommendation, with practical implications for attribute-constrained retrieval and flexible user-driven filtering in real systems.
Abstract
Personalized item recommendation typically suffers from data sparsity, which is most often addressed by learning vector representations of users and items via low-rank matrix factorization. While this effectively densifies the matrix by assuming users and movies can be represented by linearly dependent latent features, it does not capture more complicated interactions. For example, vector representations struggle with set-theoretic relationships, such as negation and intersection, e.g. recommending a movie that is "comedy and action, but not romance". In this work, we formulate the problem of personalized item recommendation as matrix completion where rows are set-theoretically dependent. To capture this set-theoretic dependence we represent each user and attribute by a hyper-rectangle or box (i.e. a Cartesian product of intervals). Box embeddings can intuitively be understood as trainable Venn diagrams, and thus not only inherently represent similarity (via the Jaccard index), but also naturally and faithfully support arbitrary set-theoretic relationships. Queries involving set-theoretic constraints can be efficiently computed directly on the embedding space by performing geometric operations on the representations. We empirically demonstrate the superiority of box embeddings over vector-based neural methods on both simple and complex item recommendation queries by up to 30 \% overall.
