Source-linked AI summary

Beyond Co-purchase Relation: Evolution of Complementary Recommendations at Allegro

Aleksandra Osowska-Kurczab, Klaudia Nazarko, Eliška Kosturová, Lidia Wojciechowska, Michał Bień

arXiv:2609.05063v1cs.IRcs.AIcs.LG

TL;DR

Complementary recommendation must distinguish products that function together from items merely co-purchased or similar. AlleCompanion combines filtered behavioural data, category-constrained Two Tower retrieval, and the ComCat mapping layer; experiments and deployment show gains in retrieval and business use, while taxonomy granularity and limited personalization remain boundaries.

  • Problem

    Complementary recommendation requires separating functional compatibility from noisy co-purchase behaviour and similarity-based substitution.

  • Method

    AlleCompanion combines a category-conditioned Two Tower model with ComCat, a multi-source mapping that guides retrieval toward complementary categories.

  • Results

    The model improves retrieval relevance and compatibility, while production experiments found the strongest business gains when extending recommendations to a mixed strategy combining complements with same-category alternatives.

  • Takeaways & Limitations

    Separating category policy from retrieval enables dynamically updateable complementary recommendations without expensive model retraining.

  • Takeaways & Limitations

    ComCat precision is bounded by taxonomy granularity, which can obscure item-level nuances or leave coverage gaps in extreme cold-start categories.

Abstract

from arXiv · show

When a customer adds a professional camera to their cart, should the system suggest a matching lens, a generic tripod, or another camera body? Complementary Product Recommendation is vital for comprehensive basket building, yet standard models often fail to distinguish between items that are merely bought together and those that truly work together. In this paper, we present AlleCompanion: a production-scale retrieval framework deployed at Allegro.com that transforms noisy behavioural signals into precise semantic compatibility. We mitigate the intrinsic noise in large-scale co-purchase traffic by combining data-level filtering heuristics with a category-constrained Two Tower architecture. Within this framework, the Category Adapter guides the model in the embedding space, constraining candidates within logically complementary boundaries. Since modelling authentic user behaviour at scale is inherently difficult, we introduce ComCat, a multi-source Complementary Categories Mapping. ComCat acts as a translational layer that distils meaningful patterns from noisy traffic into a maintainable and controllable solution, integrating expert rules, human-in-the-loop feedback, LLM-based reasoning, and statistical mining. Our experimental results demonstrate that combining explicit category-level constraints with neural architectures effectively filters out co-purchase noise to surface recommendations that satisfy real-world user needs. Serving over 20 million active users monthly, the framework delivers significant uplifts in attributed GMV for organic discovery and drives substantial revenue growth in sponsored placements.

1 Introduction

AlleCompanion addresses the difficulty of distinguishing functional complements from merely co-purchased or similar products. It combines category-conditioned retrieval, ComCat mapping, and dataset analysis to improve complementary recommendation in production.

  • Complementary recommendation targets products that work together, unlike similarity-based recommendation, which often selects substitutes.The paper motivates complementarity through examples such as phone cases and high-speed chargers.
  • Accurate retrieval must connect category-level complementarity with precise item compatibility while handling asymmetry, cold-start items, and long-tail products.The paper notes that a charger complements a smartphone, but the reverse relation does not hold.
  • Historical co-purchase data is noisy because transactions can mix substitutes, unrelated needs, and true complements.Examples include multiple dog-food flavours or simultaneous dog and cat food purchases.
  • AlleCompanion is an end-to-end framework covering architecture, dataset construction, offline ablations, and production deployment.
  • Its Two Tower retrieval uses category conditioning, while ComCat combines expert rules, LLM insights, and statistical mining to guide complementary relations.The contributions also include empirical analysis of dataset definitions and offline and online evaluation.

2 Related Work

Related work treats complementary recommendation as a noisy and structurally complex problem requiring behavioural filtering, external knowledge, and models that capture relationships beyond item similarity.

  • Complementary recommendations support basket growth through incentives, interface placement, gamification, and cross-context product discovery.
  • Raw co-purchase logs often conflate joint demand with alternatives, motivating distant-supervision filters such as co-view exclusion and substitute penalties.The paper notes that such heuristics can struggle with complementarity nuances or become difficult to maintain in production.
  • Knowledge graphs and LLMs provide complementary concepts, explanations, and annotation signals, especially where interaction logs are sparse.
  • ComCat extends these approaches by distilling LLM reasoning and expert logic into a controllable translational layer for cross-category retrieval.
  • Architectures have progressed from content similarity toward sequential, graph, transformer, and hybrid models that capture structural, temporal, and multimodal relations.P-Companion is cited as an example using specialised embedding spaces to balance relevance and diversity.

3 Methods

AlleCompanion uses a content-based Two Tower retrieval model that combines item representations with a requested complementary category. A Category Adapter and reconstruction objective steer embeddings toward category-compatible retrieval.

  • 3.1 Architecture Definition: AlleCompanion represents products through content features and adds a Category Adapter plus category reconstruction loss for complementary recommendation.The architecture is illustrated in Figure 1.
  • 3.1 Architecture Definition: The Two Tower model maps query and target features into a shared embedding space and trains retrieval with sampled softmax, mixed negatives, and temperature scaling.
  • 3.1 Architecture Definition: Content features such as title, price, category, attributes, and seller IDs support item-to-item learning without relying on volatile product IDs.Training uses products co-purchased within a short time window.
  • 3.1.2 Category Adapter: The Category Adapter combines the query embedding with a dense representation of the requested complementary category before normalisation.The category-conditioned representation is produced from the query product and target category.
  • 3.1.2 Category Adapter: During training, the target category is derived from the ground-truth item so the model learns associations between products and appropriate complementary classes.
  • 3.1.3 Category Reconstruction Loss: An auxiliary reconstruction loss projects the final query embedding toward the complementary category representation and is combined with the retrieval loss.The joint objective is described as L = L_retrieval + L_aux.

3.2 Dataset Construction

Dataset construction converts noisy co-purchase sessions into directional training pairs and applies behavioural and category-based filtering. The resulting procedures aim to retain complementary relations while reducing substitutes and unrelated associations.

  • Co-purchase sessions yield ordered asymmetric item pairs, preserving the directionality of complementary needs.
  • Longer session windows increase item diversity and volume while preserving semantic relevance, whereas much longer windows add unrelated-purchase noise.Same-cart purchases are frequent but often dominated by similar or identical items.
  • The filtering pipeline excludes heavy buyers above the 99th percentile and uses pair-count and category signals to distinguish complements from substitutes or unrelated pairs.The passage describes these as primary signals in the heuristic filtering process.
  • Annotation of 400 item pairs found that a minimum pair-count threshold reduced unrelated items from 44% to 22%, while excessively high thresholds isolated substitutes.
  • A category-alignment heuristic requires pairs to share a department while belonging to different categories, such as tripods and camera lenses.This constraint rebalances the baseline distribution toward complementary pairs.
  • The minimum pair-count threshold was excluded from the test set so performance could be evaluated across a broader real-world traffic distribution.

3.3 Online Deployment

Online deployment uses ComCat to select valid complementary categories and AlleCompanion to retrieve candidates within those category-conditioned spaces. The multi-source mapping combines behavioural, expert, and human/LLM-derived signals while preserving directed complementarity and supporting cold-start retrieval.

  • AlleCompanion is periodically retrained on one NVIDIA T4 GPU, while a daily-refreshed Faiss ANN index enables real-time retrieval with millisecond-level latency.
  • ComCat determines valid target categories for each query and conditions retrieval on those categories when explicit target items are unavailable online.
  • ComCat supports cold-start and low-traffic products by providing category guidance when historical behavioural signals are missing or unreliable.
  • The mapping combines expert rules, human annotations, LLM-assisted pair discovery, and categorical co-purchase mining, with expert-informed prioritisation and automated heuristics as fallback.
  • ComCat represents complementary categories directionally and can optionally map a category to itself, allowing one model to mix complements and substitutes.

4 Results

The evaluation combines offline analyses of architecture, dataset construction, and ComCat with online A/B testing of business metrics. Figure 2 provides a qualitative comparison of recommendations from three model configurations.

  • The framework is evaluated through offline ablations, complementary-dataset analysis, ComCat assessment, and online A/B tests focused on business metrics.
  • Figure 2 compares recommendations generated by Vanilla-TT, Seller-TT + HF, and AlleCompanion.

4.1 Architecture Definition

The evaluation tests whether AlleCompanion retrieves relevant items from intended complementary categories while preserving seller and fine-grained attribute consistency. Results show that intrinsic category conditioning outperforms noisy co-purchase modelling and avoids the inefficiency of post-hoc filtering.

  • Evaluation objectives: The evaluation measures retrieval with Recall@k and MRR@k, alongside target-category, seller, and attribute consistency metrics.These metrics assess categorical alignment, same-seller recommendations, and overlap of product features.
  • Model variants: Seller-TT benefits from seller information because 59% of test-set co-purchase pairs involve the same seller, improving seller consistency over Vanilla-TT.
  • Model variants: 15× oversampling with Seller-TT + HF still produced a median of only 7 successfully retrieved candidates, exposing post-filtering’s scalability bottleneck.
  • Model variants: AlleCompanion w/o Attr substantially improves Recall@20 and MRR@20 while intrinsically guiding candidates toward target categories and sellers.
  • Compatibility analysis: AlleCompanion achieves 21.8% attribute consistency, close to the 21% empirical holdout baseline, while shifting retrieval toward cross-category compatibility.
  • Qualitative comparison: For an Apple iPhone 17 query, AlleCompanion retrieves diverse compatible iPhone 17 cases, unlike Vanilla-TT’s similar iPhones and Seller-TT + HF’s incompatible iPhone 17 Pro cases.

4.2 Dataset Construction

Dataset construction examines the trade-off between behavioural coverage and expert-enforced compatibility. Historical transactions provide the strongest relevance, while filtered or synthetic expert data can improve compatibility under different training strategies.

  • Dataset variants: Filtered Transactions enforce expert compatibility rules but reduce total data volume by 77%.
  • Results: The base Transactions dataset achieves the strongest Recall@20 and MRR@20 across both evaluation scenarios because it aligns closely with the test distribution.
  • Results: Filtered Transactions lower relevance metrics but provide the highest absolute boost to attribute consistency, indicating a coverage–compatibility trade-off.
  • Results: Synthetic Expert Rules alone perform poorly, whereas synthetic pretraining followed by transaction fine-tuning preserves high relevance while marginally increasing attribute consistency.

4.3 Complementary Categories Mapping

ComCat addresses missing target categories and noisy co-purchase data through progressively enriched category mappings. Adding sources substantially expands target-category coverage and improves traffic-based CTR and CVR, especially with same-category relations.

  • ComCat was evaluated through four mapping configurations to address missing online target categories and noise in historical co-purchase datasets.
  • Target category coverage increased from 27.55% in the baseline to 43.06% in the final configuration, while source coverage remained approximately 42%.Across more than 20,000 categories, the mapping enriched target pairs without materially expanding source-category coverage.
  • The target-category distribution’s 95th percentile expanded from 3 to 10 categories as annotations, expert rules, and query categories were integrated.
  • The full ensemble produced a +450% increase in CTR and a +398% boost in CVR relative to the baseline in the traffic-based evaluation.The 42% source coverage translated to 99.8% of live traffic, and the same-category relation contributed to the largest performance leap.

4.4 Online A/B testing

Online A/B tests evaluated AlleCompanion across product-page and cart placements against production retrieval baselines. Complement-only recommendations helped sponsored conversion, while mixed complements and same-category alternatives produced the strongest organic and in-cart GMV gains.

  • Product Page: +0.53% and +0.13% v-CVR increases were observed for the sponsored carousel on Web and App, respectively.The carousel also saw an approximate 50% ad-revenue boost across both platforms, attributed to CTR uplifts, while GMV fluctuations were non-significant.
  • Product Page: +9.35% GMV on App and +8.05% GMV on Web resulted when the organic carousel expanded from complements to complements plus same-category alternatives.v-CVR showed neutral fluctuations in this placement.
  • Cart Placements: Neither alternatives nor expert-filtered rules fully satisfied user needs in the Pre-cart layer.Two strategies tested compatibility-focused and same-category approaches in this placement.
  • Cart Placements: +15.73% GMV on App and +21.25% GMV on Web were achieved in the In-cart placement with same-category mapping.This strategy performed exceptionally well during checkout, where carousels encouraged shipment consolidation.
  • AlleCompanion was deployed to all three placements after each showed a statistically significant improvement in at least one primary metric without harming the remaining metrics.

5 Conclusions

AlleCompanion separates item-level fit from category-level intent through category guidance and a decoupled ComCat mapping. Online results favor broad remaining co-purchase traffic and mixed related-product strategies, while taxonomy granularity and limited personalization remain boundaries.

  • AlleCompanion combines item-level constraints with category guidance through a category adapter for production-scale complementary retrieval.
  • Decoupling ComCat from retrieval allows category policies to be updated dynamically without expensive model retraining.
  • Baseline filtering removes transaction outliers, but strict domain-specific restrictions degrade retrieval performance compared with training on the full remaining co-purchase distribution.
  • Mixed complements and same-category alternatives produced the strongest business gains, including +8-9% organic product-page GMV, +15-21% cart GMV, and a 50% sponsored-placement revenue boost.The deployment serves over 20 million active users at product page and cart.
  • ComCat precision is bounded by taxonomy granularity, which can obscure item-level nuances or leave coverage gaps in extreme cold-start categories.The conclusion also identifies direct personalization, downstream ranking, and reliable offline evaluation of multi-item intent as further development areas.
Loading 2609.05063v1…