03 / THE PAPER CONNECTION
From the paper to a worked example.
Read the CDM construction, then follow one small dataset through ranks 1, 2, and 3.
About this guide. The Chai–Coffee–Juice worked example and its explanation are adapted from the original study notes of
Nitesh Kumar Shah, developed under the supervision of
Prof. Suryanarayana Sankagiri at IIT Madras. The CDM and low-rank model come from
Seshadri, Peysakhovich, and Ugander (ICML 2019). These toy observations and initial factors are teaching examples, not data or results from the paper.
01 / CDMDirected interactions
The paper writes uxz for context item z's contribution to target item x. Add contributions from the other items in the offered set:
utility(x | S) = ∑z∈S\{x} uxz
Then softmax turns all item utilities into probabilities. Editing the matrix in the first view changes this calculation immediately.
02 / LOW RANKLearn two vectors per item
The low-rank construction replaces a separate number for every directed pair with a target vector and a context vector:
uxz = tx · cz
Rank r means r coordinates in each vector. The matrix view fits those vectors to an editable matrix; the experiment view learns them from simulated choices.
03 / IIAWhat MNL cannot change
In MNL, adding C to {A, B} cannot change the odds P(A)/P(B). CDM can change those odds because C may affect A and B differently.
IIA: P(A | {A,B}) / P(B | {A,B}) = P(A | {A,B,C}) / P(B | {A,B,C})
The matrix studio shows these odds from the current interactions.
04 / HELD-OUT FITWhy compare on new choices?
The paper compares out-of-sample negative log-likelihood for MNL and CDMs of different ranks on real data. Here you can recreate the question with new, seeded synthetic choices.
NLL = −mean log P(chosen item | offered set)
A lower training NLL alone does not establish that a higher rank predicts better. Inspect validation, then the final test comparison.
SCOPE OF THIS APP
Inspired by the paper, not a numerical reproduction
The experiment lab generates fresh synthetic data with adjustable settings. Its curves are not the paper's Figure 1–3, and it does not load SFWork, SFShop, nature photos, or the paper's mixed MNL comparison. Numerical results will differ with data, seed, sample size, optimization, and regularization.
For a faithful reproduction, use the original datasets and exact preprocessing, splits, baselines, optimization settings, and repeated trials. The app is a place to understand the mechanics before doing that work in a research notebook.
Open the ICML 2019 paper ↗