
After studying this material, you should be able to:
Imagine a platform like YouTube or Spotify that has two surfaces:
| Surface | User Action | Example |
|---|---|---|
| Search | User types a query | "jazz piano relaxing" |
| Recommendation | System suggests items | "You might also like..." |
Both surfaces pull from the same catalog of items.
Should search and recommendation share the same retrieval index, or maintain separate ones?
Sharing sounds efficient — one index, one model, one infrastructure.
But there's a hidden problem.
Items exist in three temperature states:
COLD ──────────────────────────────────► WARM
│ │
New item, Item has interaction
no history history (clicks, views)
│ │
Only features Has learned ID embedding
available (title, genre, etc.)
Key Insight: Search has no exploration slot. It must score items it has never shown before.
The paper measured this on a real public log:
38.6% of query-search impressions in a held-out week
= items NEVER previously shown or visited
This means: Nearly 4 in 10 search results involve items the system has zero interaction history for.
User History → [Model] → Item ID Embedding → Score
↑
Each item has a unique
learned ID vector
Problem with cold items:
New Item arrives
↓
Has no ID embedding
↓
Cannot be scored
↓
Must RETRAIN entire model
↓
Item is invisible until next training cycle
The index is CLOSED to new items without retraining.
QUERY TOWER ITEM TOWER
│ │
User context Item features
(history, query) (title, genre,
│ description)
↓ ↓
[Encoder] [Encoder]
│ │
Vector q Vector i
│ │
└──────── dot product ──┘
│
Score
Why this solves cold-start:
New Item arrives
↓
Feed its FEATURES into Item Tower
(title, genre, description)
↓
Get a vector immediately
↓
Score against any query
↓
Item is INSTANTLY retrievable
The index stays OPEN. No retraining needed.
The researchers compared the dual-encoder against 6 sequential baselines, each:
| Metric | Cost of Dual-Encoder |
|---|---|
| Recall@20 | −5.2% relative |
| NDCG@20 | −11.4% relative |
| Metric | Cost of Dual-Encoder |
|---|---|
| Recall@20 | −0.8% to −3.6% vs. top 5 baselines |
| Ranking | 6th out of 7 systems |
Warm Accuracy Trade-off Visualization:
Best Baseline: ████████████████████ 100%
Dual-Encoder: ███████████████████ 94.8% (MovieLens)
████████████████████ 96.4%–99.2% (MIND)
Takeaway: You pay a small but real accuracy cost on warm items in exchange for cold-item capability.
The researchers used zero cold-item leakage — meaning:
| Method | Recall@20 | Notes |
|---|---|---|
| Dual-Encoder (content tower) | 0.172 ± 0.006 | No cold-start training stage |
| Best dedicated cold-start method | 0.124 ± 0.007 | Specifically designed for cold-start |
| Training-free floor | ~0.057 | Baseline with no learning |
Training-free floor: ████░░░░░░░░░░░░░░░░ ~0.057 (1×)
Best dedicated method: ████████░░░░░░░░░░░░ 0.124 (2.2×)
Dual-Encoder: ███████████░░░░░░░░░ 0.172 (3×)
Key Finding: The dual-encoder achieves 1.4× better cold-start recall than the best dedicated cold-start method, without any special cold-start training.
This is a critical lesson about silent data corruption in ML pipelines.
What happened:
Standard library float32 timestamp
↓
float32 has limited precision
↓
Two events with close timestamps
get the SAME float32 value
↓
Sort order becomes ARBITRARY
↓
Leave-one-out target (last item)
is silently WRONG
Scale of impact:
19.7% of users affected
≈ 1 in 5 users had incorrect training targets
BEFORE fix: AFTER fix:
User sequence: User sequence:
A → B → C → D A → B → C → D
↑ ↑
Target = C Target = D ✓
(WRONG — C and D (CORRECT)
had same timestamp,
order flipped)
Lesson: Always verify timestamp precision when using leave-one-out evaluation. A silent bug affecting 20% of users will corrupt your entire benchmark.
For each positive (user, item) pair:
- Sample K negative items randomly
- Train model to rank positive above K negatives
- Fast, scalable, used in production
For each positive (user, item) pair:
- Score against ALL items in catalog
- Train model to rank positive above EVERYTHING
- Expensive, but exact
| Dataset | Metric Improvement (InfoNCE → Full-Softmax) |
|---|---|
| MIND-small | +54% Recall@20 |
| MovieLens-1M | +6.9% Recall@20 |
QUALITY
▲
│
Full-Softmax ● │
(exact) │
│
│
│
InfoNCE ● │
(sampled) │
└──────────────────► SCALE
Small Large
catalog catalog
Key Insight: Full-softmax is dramatically better at small scale (MIND-small: +54%), but the gap shrinks at larger scale. The paper notes this is a quality–scale trade-off — exact objectives become computationally infeasible as catalogs grow to millions of items.
SHARED SEARCH + RECOMMENDATION INDEX
│
┌─────────┴─────────┐
│ │
BENEFIT COST
│ │
Cold items Warm accuracy
instantly slightly lower
retrievable (−0.8% to −5.2%
│ Recall@20)
1.4× better │
cold-start Acceptable for
than dedicated most production
methods systems
| Trade-off | Option A | Option B |
|---|---|---|
| Index openness | Dual-encoder (open, feature-based) | ID-softmax (closed, needs retraining) |
| Warm vs. cold accuracy | Better warm (dedicated recommender) | Better cold (shared dual-encoder) |
| Training objective | Full-softmax (quality) | InfoNCE (scale) |