Source-linked AI summary

Two Is Better Than One: Dual Embeddings for Complementary Product Recommendations

Giorgi Kvernadze, Putu Ayu G. Sudyanti, Nishan Subedi, Mohammad Hajiaghayi

arXiv:2211.14982v2cs.IRcs.LG

TL;DR

Complementary recommendations are less explored than similar-item recommendations, and sparse purchase data can limit product coverage. This paper uses SGNS dual embeddings for complementary retrieval and augments training data using signals from other sources. The authors report improved coverage and relevance on real-world data.

  • Problem

    Complementary recommendations are less explored than similar-item recommendations, and it is unclear whether Prod2Vec can produce them in the same manner as similar-item recommendations.

    Source: §I · pp. 1–2
  • Method

    The approach uses both SGNS embeddings at inference for complementary retrieval and augments purchase data with pairs derived from similarity signals in other available data sources.

    Source: §I · p. 2, §VI · p. 8
  • Results

    The authors report that using both embeddings significantly improves complementary recommendation results on multiple real-world datasets, while augmentation expands coverage and improves relevance.

    Source: §VI · pp. 8–9
  • Takeaways & Limitations

    The authors present the method as an easily implemented, scalable candidate-retrieval approach that can run with relatively low latency given enough data.

    Source: §VI · p. 8

Abstract

from arXiv · show

Embedding based product recommendations have gained popularity in recent years due to its ability to easily integrate to large-scale systems and allowing nearest neighbor searches in real-time. The bulk of studies in this area has predominantly been focused on similar item recommendations. Research on complementary item recommendations, on the other hand, still remains considerably under-explored. We define similar items as items that are interchangeable in terms of their utility and complementary items as items that serve different purposes, yet are compatible when used with one another. In this paper, we apply a novel approach to finding complementary items by leveraging dual embedding representations for products. We demonstrate that the notion of relatedness discovered in NLP for skip-gram negative sampling (SGNS) models translates effectively to the concept of complementarity when training item representations using co-purchase data. Since sparsity of purchase data is a major challenge in real-world scenarios, we further augment the model using synthetic samples to extend coverage. This allows the model to provide complementary recommendations for items that do not share co-purchase data by leveraging other abundantly available data modalities such as images, text, clicks etc. We establish the effectiveness of our approach in improving both coverage and quality of recommendations on real world data for a major online retail company. We further show the importance of task specific hyperparameter tuning in training SGNS. Our model is effective yet simple to implement, making it a great candidate for generating complementary item recommendations at any e-commerce website.

I. INTRODUCTION

Complementary recommendations remain less explored than similar-item recommendations, and their directional, non-transitive relationships make them harder to identify. The paper adapts SGNS dual embeddings for complementary retrieval and adds data augmentation to address sparse purchase coverage.

I. INTRODUCTION

  • Complementary recommendations suggest compatible products serving different purposes, whereas similar recommendations offer interchangeable products.The introduction describes complementary recommendations as contributing to conversion and average order value in e-commerce.Source: §I · p. 1
  • Complementary relationships are harder to model than interchangeability because recommendation direction matters and complementarity is not necessarily transitive.For example, phone buyers may seek screen protectors, but screen-protector buyers may not seek phones; a coaster may complement a coffee table without complementing a sofa.Source: §I · p. 1
  • The paper uses SGNS input-output relatedness to explore complementary retrieval, contrasting it with same-space similarity.The authors note that NLP studies found cross-matrix dot products indicate relatedness, while same-matrix dot products indicate similarity [28].Source: §I · p. 2
  • The paper introduces an at-inference-time SGNS adaptation and synthetic data augmentation using similarity signals from other data sources to extend recommendations to items without co-purchase data.The authors report that augmentation expands coverage and improves candidate relevance.Source: §I · p. 2
  • The authors report upwards of 300% improvement on relevant metrics when SGNS hyperparameters are tuned for the downstream task rather than left at defaults [27].Source: §I · p. 2

II. RELATED LITERATURE

Prior product-embedding work largely addresses similarity, while complementary recommendation research is more limited. The section reviews related approaches and introduces the product-sequence and co-purchase setup used with SGNS.

II. RELATED LITERATURE

  • Complementary recommendation studies include Triple2Vec basket triplets and BB2vec browsing-session and basket data, while prior approaches leave questions about dual-matrix use and cold-start handling.Triple2Vec uses (item, item, user) triplets to recover complementarity, compatibility, and loyalty; BB2vec combines learned representations through multitask learning [34].Source: §II · p. 3

A. Prod2Vec: Product Representation Learning

  • Prod2Vec applies Word2Vec to sequences of product actions, learning vectors from products that appear in user-action contexts.The literature also includes text-based and graph-based adaptations of product representation learning [35], [16].Source: §II · p. 2, A. Prod2Vec: Product Representation… · p. 3
  • SGNS approximates the softmax objective used to predict context products, with input and output embeddings representing each product.Source: A. Prod2Vec: Product Representation… · p. 3
  • The paper converts each purchase session into all ordered co-purchase pairs, enabling heuristic filtering and removing the need for a context-window hyperparameter.For a session, it takes Cartesian combinations of distinct products; filtering can remove pairs with identical taxonomy hierarchies or weak co-occurrence connections.Source: A. Prod2Vec: Product Representation… · p. 3

B. Dual Embedding Model for Relatedness

Prior NLP findings distinguish similarity from relatedness by comparing embeddings within versus across input and output spaces. The paper connects cross-space relatedness to complementary product recommendations.

B. Dual Embedding Model for Relatedness

  • NLP work found input-input and output-output comparisons capture functional similarity, while input-output comparisons capture items that frequently co-occur.The Dual Embedding Space Model applied the cross-space relationship to query-document relatedness [28].Source: B. Dual Embedding Model for Relatedness · p. 4
  • Asr et al. found input-vector cosine similarity correlated most with human similarity judgments, while output-vector cosine similarity correlated most with relatedness scores.Their examples distinguish “sea”/“ocean” similarity from “clothes”/“closet” relatedness.Source: B. Dual Embedding Model for Relatedness · p. 4
  • The output-to-input comparison performed better than the reverse direction in relatedness evaluation, indicating forward relatedness can be asymmetric [3].Source: B. Dual Embedding Model for Relatedness · p. 4
  • For a kitchen faucet target, IN-OUT produces complementary products, whereas IN-IN and OUT-OUT produce other faucets.Source: Figure 1 · p. 4

IV. PROPOSED METHOD

The section introduces the proposed complementary recommendation method and a data augmentation approach intended to expand coverage to cold-start items.

IV. PROPOSED METHOD

  • The proposed method covers complementary recommendation and data augmentation to expand product coverage to cold-start items.Source: §IV · p. 4

A. Dual Embeddings for Complementary Product Retrieval (DE)

SGNS gives each product input and output vectors, but complementary retrieval uses cross-space IN-OUT rather than the usual single input space. This follows from within-space shared-context similarity versus cross-space co-occurrence.

A. Dual Embeddings for Complementary Product Retrieval (DE)

  • The model produces input and output vectors for every product, but practitioners usually retain only the input vectors for inference.The proposed retrieval setup uses cosine similarity between a target’s input vector and candidate output vectors.Source: A. Dual Embeddings for Complementary… · p. 4
  • Cross-space IN-OUT is the paper’s retrieval choice for complementarity, while items within either embedding space tend to capture substitutionary similarity.SGNS predicts context items from target inputs, placing co-occurring items near one another across the input and output spaces.Source: A. Dual Embeddings for Complementary… · pp. 4–5
  • The paper considers forward IN-OUT recommendations, not OUT-IN, because a complementary relationship may be directional.The example is a bed sheet recommended as complementary to a queen mattress, but not necessarily the reverse.Source: A. Dual Embeddings for Complementary… · p. 5

B. Data Augmentation (DA)

Data augmentation uses product similarity to synthesize co-purchase pairs from observed pairs, extending training coverage while scaling their assigned counts by similarity and a damping factor.

B. Data Augmentation (DA)

  • Similarity-based replacement creates synthetic pairs from observed co-purchases, including pairs formed by replacing one or both products with similar items.The method’s premise is that similar products are likely to complement the same item.Source: B. Data Augmentation (DA) · pp. 5–6
  • Synthetic co-purchase counts are scaled by product similarity and γ to limit their influence on the training data.The paper warns that overly high synthetic counts could dominate the dataset and potentially hurt performance.Source: B. Data Augmentation (DA) · p. 5
  • The method can use the k most similar products, yielding up to k^2 + 2k synthetic pairs from one observed pair.The authors recommend a minimum similarity threshold θ to control the quality of added pairs.Source: B. Data Augmentation (DA) · p. 6

C. Inference Augmentation (IA)

Inference augmentation maps an unseen target product to its most similar item in the training set and uses that item to retrieve complementary recommendations. The evaluation compares the model with popularity, co-purchase, and embedding-neighbor baselines.

C. Inference Augmentation (IA)

  • Inference augmentation retrieves the most similar training-set product for an unseen target, then uses that product to infer complementary recommendations.Similarity is measured with a function that provides a real-valued score for product pairs.Source: C. Inference Augmentation (IA) · p. 6

V. EXPERIMENTS AND RESULTS

  • The evaluation includes a Top-Sellers baseline that recommends the same most popular items for every target.The paper notes this heuristic can suit items complementary to many products, such as eggs and milk.Source: §V · p. 6
  • Other baselines recommend the most frequently co-purchased items or nearest neighbors from the input or output vectors.The co-purchase baseline ranks by frequency, while the embedding baselines use IN-IN or OUT-OUT neighbors.Source: §V · p. 6

A. Datasets

The experiments use retail transaction datasets from Overstock and Instacart, train SGNS with tuned hyperparameters, and filter purchase pairs to retain stronger complementarity signals.

A. Datasets

  • The datasets comprise Overstock’s two years of transactions and Instacart’s public order data, with different scale and metadata characteristics.Overstock has over 18 million users, 24 million sessions, and around 1.6 million product IDs; Instacart has over 3 million orders and more than 200,000 users.Source: A. Datasets · p. 6

B. Implementation Details

  • SGNS is trained with fastText++ after disabling subword embeddings, with hyperparameters optimized using Ray Tune.At inference, the implementation uses Faiss HNSW graphs for fast approximate nearest-neighbor searches.Source: B. Implementation Details · p. 6

C. Data Pre-processing

  • Preprocessing removes highly active users and sessions, requires at least three co-purchases per pair, and filters pairs with negative PMI.Pairs sharing a taxonomy are generally discarded, with curated exceptions; taxonomy PMI also filters product pairs, including synthetic pairs without purchase counts.Source: C. Data Pre-processing · pp. 6–7

D. Dual Embeddings Evaluation

The evaluation compares dual-embedding retrieval with co-purchases and single-embedding variants using held-out co-purchase data. IN-OUT dual embeddings performed best on both datasets.

D. Dual Embeddings Evaluation

  • For each query, the evaluation ranks held-out co-purchase products and scores the model’s top-K recommendations with Precision@K and Recall@K.The reported metrics are averaged over queries at K=20 and K=50.Source: D. Dual Embeddings Evaluation · p. 7
  • The held-out ground truth ranks co-purchased products by how often they co-occurred with each query product.Source: D. Dual Embeddings Evaluation · p. 7
  • IN-OUT dual embeddings performed best on both datasets, followed closely by co-purchases, and outperformed IN-IN and OUT-OUT.The authors attribute the comparison to cross-embedding cosine similarity capturing complementary relationships better than using one embedding.Source: D. Dual Embeddings Evaluation · p. 7

E. Hyperparameter Tuning

The section reports gains from task-specific SGNS tuning and evaluates data augmentation for in- and out-of-coverage products. Product-level gains are accompanied by a taxonomy-level comparison that distinguishes the model from popularity.

E. Hyperparameter Tuning

  • Hyperparameters were tuned on a disjoint 10% subset of unique co-purchase pairs to predict unobserved relationships, using precision and recall at the top k.The context-window parameter was considered irrelevant because the data consists of pairs rather than sequences.Source: E. Hyperparameter Tuning · p. 7
  • Optimized hyperparameters increased evaluation metrics on both Overstock and Instacart compared with default values.The tuned IN-OUT settings differed across the two datasets; Table III reports relative increases but the supplied passage gives no values.Source: E. Hyperparameter Tuning · p. 7, Table III · p. 7

F. Data Augmentation Results

  • The validation set separates targets present in the original training set from those absent, while click sequences provide similarity measurements for augmentation.Click sequences comprise activity within 30-minute sessions; the chosen search-and-navigation co-click data was intended to curb feedback-loop bias.Source: F. Data Augmentation Results · pp. 7–8
  • Data augmentation positively affected predictive relevancy and total coverage in both in-coverage and out-of-coverage subsets, though popularity performed seemingly as well.The reported comparison draws on Tables II and IV.Source: Table IV · p. 8, F. Data Augmentation Results · p. 8
  • On out-of-coverage taxonomy predictions, data augmentation had a measurable impact, with a clear difference between the model and the popularity baseline.The authors interpret the taxonomy results as evidence that the model provides relevant recommendations.Source: Table V · p. 8, F. Data Augmentation Results · p. 8

VI. CONCLUSION

The conclusion reports that using both SGNS embeddings improves complementary retrieval over using one, while data augmentation addresses sparse purchase coverage. Experiments expand product coverage and improve relevancy, and expanding coverage without sacrificing performance on already covered products remains future work.

VI. CONCLUSION

  • Using both SGNS embeddings significantly improves complementary recommendations over the standard approach of using one.The approach is described as easy to implement and scalable with relatively low latency when enough data is available.Source: §VI · p. 8
  • Similarity measurements from readily available data, such as clicks, generate synthetic product pairs that extend retrieval to items with no or little purchase data.This augmentation is proposed to address purchase-data sparsity.Source: §VI · p. 8
  • Experiments expand product coverage and improve relevancy.The authors hope the approach can serve as a baseline for future complementary-recommendation work.Source: §VI · p. 9
  • Future work can expand coverage further without sacrificing or improving recommendations for products already covered.The authors also identify a possible connection between augmentation and exploration versus exploitation, calling the process “selfhealing” for future measurement.Source: §VI · p. 9
Loading 2211.14982v2…