RECOMMENDATION / NOTEBOOK LESSON

00 · Recommendation systems · Notebook course map

An entry map to recommendation mechanisms and the XMRec competition track.

Recommendation course mapRead-only · saved experiment

Saved outputs come from recorded teaching runs; opening this page does not rerun an experiment. The code and original outputs are preserved; original-language data and annotations may remain.

Recommendation systems · Notebook course map

Learn through code. Open a chapter, predict what will happen, run one cell at a time, change one variable, and inspect the result.

Notebook Evidence and scope
01 · Real data and ItemCF Real data
02 · Two towers, tensors, and gradients Real data and the shared trainer
Foundations, metrics, and A/B testing Real data + simulated assignment
Retrieval, samples, and indexes Real snapshots + mechanism exercises
Multiple objectives, MMoE, and pre-ranking Controlled simulation, not impression CTR
FM, DCN, LHUC, and FiBiNET Tensor and gradient mechanisms
LastN, DIN, and SIM Real histories + teaching attention variants
Diversity, rules, and DPP Real vectors + numerical checks
Cold start and traffic allocation Real attributes + simulated traffic
System improvement and engineering experiments Real snapshots + controlled drift/social simulation

English companion. All instructional Markdown is translated. Experiment code, Chinese language examples, execution counts, and saved outputs remain as in the source edition; historical output text may therefore be Chinese. The initial setup cell anchors the working directory and Python import path for this companion's deeper folder; it does not change the experiment. Saved outputs are historical evidence, not a new run. Run from the top after preparing the required data and models.

PYTHON · 01
# English companions live one directory deeper; keep the original experiment code unchanged.
from pathlib import Path as _TranslationPath
import os as _translation_os
import sys as _translation_sys
_translation_root = next((p for p in [_TranslationPath.cwd(), *_TranslationPath.cwd().parents]
                          if (p / "reclab").is_dir()), None)
if _translation_root is None:
    raise RuntimeError("Open this notebook from inside the Search Recommendation Ads Lab checkout.")
_translation_os.chdir(_translation_root)
if str(_translation_root) not in _translation_sys.path:
    _translation_sys.path.insert(0, str(_translation_root))

How to learn

  1. Start with 01 and 02 to build intuition for data, tensors, autograd, and training.
  2. Chapters 03–10 accompany all 45 lecture decks. Topic coverage does not mean full reproduction of 45 papers.
  3. Each section distinguishes real data, constructed tensors, and simulated traffic.
  4. Use Shift+Enter. The final cell in 02 saves a new model; the other topic chapters default to in-memory experiments.
  5. Code lives in reclab/ and reclab/learning/; consult the slides for reference.
PYTHON · 02
from pathlib import Path
import sys
print('Python:',sys.executable)
print('Current directory:',Path.cwd())
Saved notebook output · not executed on this page
Python: /Users/lynnlee/Documents/Codex/2026-10-30/task/soutui-lab/.venv/bin/python
Current directory: /Users/lynnlee/Documents/Codex/2026-10-30/task/soutui-lab/notebooks

Your experiment log

Write three lines each time: What I predicted → the one thing I changed → what the result supports and what it still cannot establish.

Run each notebook from the beginning on the first pass. After that, change one parameter and rerun the relevant cell and all downstream cells.

Real competition reproduction

WSDM Cup 2022 XMRec: the full official dataset and the core methods of the OPDAI winning solution. Results are stored separately from the original Retailrocket experiments.

Start with 11 Task and data, followed by 12 Features, 13 Sampling and graph models, 14 Retraining and ablation, and 15 Evaluation.

This reproduces core algorithms with a local training recipe, not the complete winning ensemble or its hidden-test score.

GO TO THE SOURCE

Sources for this lesson

Author courseChinese

Shusen Wang · Recommender Systems

Domain background; see this lesson for its precise reproduction boundaries.

45 lecture references mapped to practice. An exercise on a topic is not a complete paper reproduction. Originals retain their language and authors’ rights.

Official task and dataEnglish

WSDM Cup 2022 · Official XMRec Task

Domain background; see this lesson for its precise reproduction boundaries.

Official cross-market recommendation task. Only local public-split results are reported, not hidden leaderboard scores.

Solution authors’ codeEnglish

OPDAI · XMRec Winning Solution

Domain background; see this lesson for its precise reproduction boundaries.

Selected sparse ItemCF, graph retrieval and ranking methods. Not the complete winning ensemble.

Completion marks are optional and stored only in this browser. Reading a page does not mark it complete.