Embedding models for recommendation under contextual constraints

Syrine Krichene, Mike Gartrell, Clément CalauzènesarXiv 2019 · arXiv

Introduction

In modern recommendation systems, users frequently apply filters—such as price ranges, categories, or time constraints—to narrow down their search. The conventional industry approach typically involves either pre-filtering the database or post-filtering a top-K list of recommendations. However, these methods often fail to capture the nuanced shifts in user intent that accompany specific constraints. For instance, a user's brand preference may change significantly depending on the selected price tier. This paper proposes a paradigm shift: treating contextual constraints not as filters, but as transformations of the latent embedding space.

Methodology: Transformative Contextual Modeling

The core innovation presented is the transition from additive context models to transformative ones. In a standard Matrix Factorization (MF) framework, the recommendation score is the dot product of user ($U_u$) and item ($P_i$) vectors. While traditional context-aware models often add a bias term, this research introduces a transformation matrix $T(c)$ derived from the contextual constraint $c$:

$$score = U_u T(c) P_i^T + B_u$$

This formulation effectively "warps" the embedding space based on the active filter, allowing the model to learn how constraints dynamically alter the relationship between users and items.

Conceptual dependency graph where context acts as a signal of user intent

The authors explore two primary implementations:

  1. Diagonal Constraints (DC-MF): Utilizes a diagonal matrix for $T(c)$, providing a computationally efficient per-dimension weighting of user preferences.
  2. Neural Constraints (NC-MF): Employs a neural network to generate $T(c)$ from constraint metadata, enabling the handling of complex, non-linear constraints.

Experimental Setup and Datasets

The proposed models were evaluated across three diverse datasets:

  • Foursquare NYC Check-ins: Focused on time-based constraints (e.g., meal times).
  • Private Criteo Dataset: A large-scale retail dataset testing brand filters under high sparsity.
  • MovieLens 100K: Used to investigate the "folding effect," where models might erroneously group disjoint user segments (e.g., children and horror fans) due to a lack of negative interaction data.

Results and Performance

The experimental results demonstrate the superiority of transformative models over standard MF and additive baselines like CAMF-CI. Specifically, the DC-MF model showed significant gains in "rare" contexts, such as early morning check-ins, where traditional models often default to global popularity trends.

Comparison of AUC values over iterations, showing DC-MF outperforming baseline models

Furthermore, the neural variant (NC-MF) successfully mitigated the "folding effect" in the MovieLens experiments. By incorporating metadata like age into the transformation, the model correctly identified that horror movies should not be recommended to children, even in the absence of explicit negative ratings.

Conclusion

By reframing contextual filters as intent signals that transform the latent space, this work provides a robust framework for recommendation under constraints. While the diagonal structure of DC-MF offers efficiency, future work may explore more flexible neural architectures to handle increasingly complex multi-feature constraints without overfitting.

Summary updated

Abstract

Embedding models, which learn latent representations of users and items based on user-item interaction patterns, are a key component of recommendation systems. In many applications, contextual constraints need to be applied to refine recommendations, e.g. when a user specifies a price range or product category filter. The conventional approach, for both context-aware and standard models, is to retrieve items and apply the constraints as independent operations. The order in which these two steps are executed can induce significant problems. For example, applying constraints a posteriori can result in incomplete recommendations or low-quality results for the tail of the distribution (i.e., less popular items). As a result, the additional information that the constraint brings about user intent may not be accurately captured. In this paper we propose integrating the information provided by the contextual constraint into the similarity computation, by merging constraint application and retrieval into one operation in the embedding space. This technique allows us to generate high-quality recommendations for the specified constraint. Our approach learns constraints representations jointly with the user and item embeddings. We incorporate our methods into a matrix factorization model, and perform an experimental evaluation on one internal and two real-world datasets. Our results show significant improvements in predictive performance compared to context-aware and standard models.
BibTeX
@misc{krichene2019embedding,
  author = {Syrine Krichene and Mike Gartrell and Clément Calauzènes},
  title = {{Embedding models for recommendation under contextual constraints}},
  year = {2019},
  eprint = {1907.01637},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.01637},
}
Figure