Beyond Co-purchase Relation: Evolution of Complementary Recommendations at Allegro
Aleksandra Osowska-Kurczab, Klaudia Nazarko, Eliška Kosturová, Lidia Wojciechowska, Michał Bień
cs.IR, cs.AI, cs.LG
2026-09-04
Allegro's category-conditioned two-tower AlleCompanion, plus a swappable ComCat map, lifts organic product-page GMV 8–9%, in-cart GMV 15–21%, and sponsored ad revenue about 50%.
A customer adds a camera to the cart. Should the system suggest a matching lens, a generic tripod, or another body? Complementary recommendation wants items that work together. Co-purchase logs record items that were bought together: another bag of the same dog food is a substitute; cat food plus dog food is two separate intents. Allegro sees over 20 million active buyers and 150 thousand sellers a month, and free-shipping thresholds push same-seller bundling, which amplifies the noise.
Complements are also asymmetric: a charger completes a phone, not the other way around. Cold-start and long-tail items have almost no co-purchases. Transaction frequency alone cannot separate these cases.
AlleCompanion is a content two-tower. Query and item towers share a Product Encoder over title, price, and category, with optional attributes and seller ID, and no item IDs, so catalog churn does not break the model. Training uses sampled softmax with mixed negatives and temperature.
The Category Adapter is the actual change. The query item vector is concatenated with the target complementary-category embedding, passed through a fully connected layer, and normalized, which steers retrieval into a requested complementary subspace. At train time the target category comes from the positive item. Online there is no positive, so ComCat supplies legal target categories, each retrieved separately and interleaved. An auxiliary reconstruction loss asks the final query vector to recover the target category embedding.
ComCat is a category mapping decoupled from the model. Three sources merge in priority order: human labels, expert rules, then automated co-purchase heuristics (Jaccard, taxonomy distance, periodicity, price ratio). The mapping is directed, so asymmetry is explicit. A same-category rule can be added so one model also surfaces substitutes. Rule edits do not require retraining.
On the data side, sessions become ordered asymmetric pairs after dropping buyers above the 99th percentile of volume. A 400-pair annotation study shows that raising the co-occurrence threshold cuts unrelated pairs from 44% to 22%, but substitutes rise 28%→43% while complements only move 29%→36%. Requiring the same department and different categories rebalances the mix to 61% complementary / 4% substitute / 35% unrelated.
Offline training uses 90 days of co-purchases and a temporally held-out 7-day test. Vanilla two-tower Recall@20 is 0.0447. Adding seller ID reaches 0.1219 with seller consistency 0.9309, matching the 59% same-seller rate in the test pairs. Hard-filtering the target category after retrieval lifts Recall@20 to 0.3782, but 15× oversampling still leaves a median of 7 candidates, so the filter does not scale. AlleCompanion hits Recall@20 0.4567 and MRR@20 0.2000 without post-filters, with target-category consistency 0.8267 and seller consistency 0.6619. Attribute consistency is 0.2181, close to the 21% overlap in organic test co-purchases. Under ComCat instead of gold categories, Recall@20 moves from 0.0451 (hard filter) to 0.0952.
ComCat source ablation: heuristics alone cover about 42% of source categories and 27.55% of targets. Adding labels, rules, and same-category relations lifts target coverage to 43.06% and p95 target count from 3 to 10. That 42% of source categories covers 99.8% of live traffic. On offline traffic metrics versus heuristics-only, CTR is +450% and CVR +398%, driven largely by the same-category relation.
Online A/B tests ran two weeks at 100% traffic. Sponsored product-page v-CVR is +0.53% on Web (significant), with about +50% ad revenue. Organic product-page, after adding same-category relations, posts GMV +8.05% Web and +9.35% App (both significant). In-cart GMV is +21.25% Web and +15.73% App, with Web c-CVR +4.98%. Pre-cart trained on the high-attribute-consistency filtered set drops Web v-CVR by 0.28% (significant). The three shipped placements each have at least one significant primary metric and no damage on the rest.
This is a full industrial chain: how to wash co-purchase noise, how to write category constraints into a two-tower, how to keep the mapping swappable, and which placements actually want complements mixed with substitutes. Two transferable calls. Expert rules belong in the mapping layer, not as a filter that starves the training set: filtered transactions raise attribute consistency and hurt both retrieval metrics and pre-cart conversion. At checkout, users often want "one more item to clear free shipping," not a textbook complement.
Precision is bounded by taxonomy granularity, and extreme cold-start categories still have holes, even if current traffic does not show them. There is no user personalization; diversity is interleaving. Multi-item complementary intent is almost unmeasurable offline, so A/B is the only ground truth. Pre-cart is a negative result: the same model in a different slot hurts conversion. Sponsored GMV barely moves; the win is ad revenue, and those numbers should not be mixed. There is no public offline comparison against academic complementary models such as P-Companion, so external reproducibility is limited.