Skip to content
The Plain Paper

New method · Information retrieval

MELODI keeps user–item matching separate from an item’s own appeal

Ranking systems must score many possible items against the same user history without making each score too slow. The researchers built MELODI to separate a candidate’s match to that history from information about the candidate itself, while reusing history calculations across candidates. On Steam, its mean reciprocal rank—a score rewarding correct items near the top—was .4720, compared with .4609 for DIN with an added feature-crossing layer. The gains are measured offline, and the industrial data are private.

Key numbers

  • .4720Steam mean reciprocal rank for MELODI, where a higher score means the right item tends to rank nearer the top.against .4609 for DIN with an added feature-crossing layer
  • 11.3%Industrial-A improvement in ranking quality near the top of the list over the tabular baseline.against 8.8% for DIN
  • 1.97 msTime to score 1,000 Steam candidates when MELODI reuses the same history calculations.against 9.89 ms for DIN
Data and benchmarks
ML-25M, Industrial-A, Industrial-B
Released by the authors
None listed in the paper

MELODI ranking: five things to know

  • The aim. The researchers wanted to rank many candidate items quickly while keeping two signals distinct: how each item matches a user’s history, and what is true of the item on its own.
  • What they did. They designed MELODI to pool a user’s history separately for each candidate, then apply a history-linear matching step. This lets the system reuse history calculations across candidates.
  • What they found. On Steam, MELODI’s mean reciprocal rank was .4720 versus .4609 for DIN with an added feature-crossing layer; the higher score means relevant items tended to rank nearer the top.
  • The catch. The evaluation is offline, the industrial datasets are private, and the timing tests use one processor type. Some smaller-candidate and individual metric comparisons favour competing models.
  • Can you use it. The paper describes the model and experiments but provides no linked code or industrial data. Engineers can use the design as a blueprint, but the paper does not provide a released package for deployment.

Bottom line. The paper supports the idea that separating candidate–history matching from candidate-only information can work well, and that reusing history calculations can reduce measured serving time for large candidate sets. It does not establish online impact or show how the results transfer to other processors and private-data settings.

Why ranking many candidates against one user history is costly

A recommendation system often first gathers a shortlist of possible items, then ranks that shortlist. A user’s recent activity may cover several interests, so a good ranker should weigh the history differently for a camera than for running shoes, without doing so much work that serving becomes slow.

The paper’s central distinction is between an item’s match to the user’s history and the item’s own information, such as its general appeal. Think of choosing a gift: the recipient’s interests matter, but so do facts about the gift that do not depend on that recipient.

Earlier target-aware systems already change the history summary for each candidate. The Deep Interest Network, for example, uses a candidate to give more weight to relevant past behaviours; MELODI builds on that general idea while separating the match signal from the item-only signal.1

The authors focus on when history can be pooled before the matching step without changing its result. If the matching operation is linear in the history input, taking a weighted history summary first gives the same matching output as matching each history item and then combining the outputs. That condition allows one matching operation per candidate rather than one per history item.

MELODI results on public and industrial ranking tasks

The prespecified MELODI configuration had the highest average on all three reported public ranking measures for both Steam and ML-25M. In the industrial tests, its reported gains on several ranking measures were also at least as large as those of the target-aware comparison systems, while some individual measures favoured a competitor.

The comparisons show both where MELODI leads and where it does not.

  • On Steam, mean reciprocal rank was .4720 for MELODI and .4609 for DIN with an added feature-crossing layer; higher means the relevant item tended to appear nearer the top.
  • With the full Steam catalogue, MELODI’s mean reciprocal rank was .0466, compared with .0457 for DIN. However, DIN’s hit rate at rank one was 0.0186, above MELODI’s 0.0177.
  • At 1,000 Steam candidates, reused-history latency was 1.97 ms for MELODI and 9.89 ms for DIN; lower time means faster scoring. At 100 candidates, DIN was faster: 0.63 ms versus 1.21 ms for MELODI.
  • On Industrial-A, the reported overall gain in area under the precision–recall curve was 25.0% for MELODI and 22.2% for the target-aware Transformer; this measure summarizes the precision–recall trade-off.
  • On Industrial-A Segment-1, the reported area-under-the-ROC-curve gain was 2.5% for MELODI versus 2.6% for DIN. On Industrial-B overall, DIN’s ROC-area gain was 2.5%, above MELODI’s 2.0%.
  • On Industrial-B overall, MELODI’s reported gains over the tabular baseline were 7.8% for area under the precision–recall curve, 3.2% for ranking quality near the top, and 4.2% for recall among the top 20.

Of 9 head-to-head comparisons the paper prints, 5 favour its own contribution, 4 go against it.

  • Compared with DIN, 5 results: 4 favour the paper, 1 goes against it.
  • Compared with MELODI (4 experts, 1 layer), 2 results: 0 favour the paper, 2 go against it.
  • Compared with MELODI, 1 result: 0 favour the paper, 1 goes against it.
  • Compared with TA-Transformer, 1 result: 1 favours the paper, 0 go against it.
Results as the paper prints them, with the difference worked out for this page
What was measuredResultCompared withDifference
DIN
HIT@1 on Steam under full-catalogue rankingFull-catalogue ranking; single training run0.0186MELODI (4 experts, 1 layer): 0.0177+0.0009 (+5.1%)Goes against the paper
Scoring latency on Steam for 100 candidates with request-local history reuseOne user and 50 history items; processor with 32 virtual cores · Median of five replicate minima0.63 msMELODI (4 experts, 1 layer): 1.21-0.58 (-47.9%)Goes against the paper
MELODI
Relative change in AUPRC on Industrial-A versus the tabular baselineOverall Industrial-A test set; reported change from tabular baseline25.0 %TA-Transformer: 22.2+2.8
Relative change in NDCG@20 on Industrial-A versus the tabular baselineOverall Industrial-A test set; reported change from tabular baseline11.3 %DIN: 8.8+2.5
Relative change in AUROC on Industrial-A Segment-1 versus the tabular baselineIndustrial-A Segment-1; reported change from tabular baseline2.5 %DIN: 2.6-0.1Goes against the paper
Relative change in AUPRC on Industrial-B versus the tabular baselineOverall Industrial-B test set; reported change from tabular baseline7.8 %DIN: 6.5+1.3
Relative change in NDCG@20 on Industrial-B versus the tabular baselineOverall Industrial-B test set; reported change from tabular baseline3.2 %DIN: 2.7+0.5
Relative change in Recall@20 on Industrial-B versus the tabular baselineOverall Industrial-B test set; reported change from tabular baseline4.2 %DIN: 3.1+1.1
Show 3 more results
More results, as the paper prints them
What was measuredResultCompared withDifference
DIN
Relative change in AUROC on Industrial-B versus the tabular baselineOverall Industrial-B test set; reported change from tabular baseline2.5 %MELODI: 2.0+0.5Goes against the paper
MELODI
Request-local scoring latency at 1,000 candidates on Steam and ML-25MOne benchmark run; 32-core processor2.0 msTA-Transformer (2L, 2H, 4D): 32.4 / 31.3
SASRec with target normalisation
Relative MRR increase on ML-25M after applying shared layer normalisation to the targetPublic ML-25M evaluation; comparison is normalised versus history-only layer normalisation41.6 %SASRec (history-only LN)

How MELODI separates matching from item identity

MELODI has a matching branch that uses both the candidate and the user’s history, plus an identity branch that uses the candidate alone. A final small neural network combines the two outputs to score the candidate.

The matching branch follows these steps:

  1. Project the history items and candidates into a shared representation and normalise them; add position information to the history.
  2. For each candidate, use several attention heads—separate learned ways of weighing history items—to pool the relevant history.
  3. Apply a gated, low-rank feature-crossing layer to the pooled history and candidate representation. The paper’s key design requirement is that this step remains linear in the pooled-history input.
  4. Compute candidate-only information separately, then score it alongside the matching output.
  5. For candidates in the same request, compute history-only representations once and reuse them instead of re-encoding the same history for every candidate.

The mathematical result gives a sufficient condition for the cheaper order of operations to match the more direct one: the matching step must be linear in its history input for each fixed candidate. Attention weights may still depend on the candidate, and the candidate-side mapping may be nonlinear.

What MELODI’s offline results do not establish

The main public ranking comparison averages three training seeds, but many other rankings and all component ablations use single runs. The paper reports uncertainty or paired comparisons for some results, not for every number, so small differences in the single-run tables should not be treated as settled effects.

The authors’ stated limits and the evaluation design mean the findings do not establish:

  • Whether the offline ranking gains improve purchases or other outcomes in a live system; there was no online A/B test.
  • Whether timing results transfer to other processors; the measurements use one processor type.
  • How the industrial results generalise to other companies or data; the industrial datasets cannot be released.
  • How performance changes across all real history lengths; the industrial timing tests fix the history length.
  • Whether the industrial scores are free of exposure or position bias. The authors say logged purchase labels reflect the policy that chose which candidates were displayed, and MELODI does not correct that bias.
4 limits the authors state themselves
  • The evaluation is offline and does not include an online A/B test.
  • The industrial datasets are proprietary and cannot be publicly released.
  • Latency measurements cover only one processor type.
  • The industrial latency benchmark uses a fixed history length and does not cover the full range of observed histories.

Who can use the MELODI design and what is released

The method may be useful to ranking engineers who score many candidates against one shared request history and need to reduce repeated history processing. The paper measures request-local reuse, in which the history-side calculations are shared within a request and discarded after scoring.

The paper provides the architecture and evaluation details but does not link code, trained models, or the proprietary industrial data. It therefore serves as a design and evaluation reference, not as a released implementation ready to deploy.

MELODI compared with the Deep Interest Network

The Deep Interest Network (DIN) is an earlier target-aware approach: it changes which past behaviours matter according to the candidate and pools them into a candidate-specific history representation. MELODI similarly uses candidate-conditioned history pooling, but adds a separate explicit matching output and a candidate-only identity branch. The DIN paper describes this candidate-dependent interest summary as a way to capture different user interests for different ads.1

Terms used to describe MELODI and its evaluation

Similarity–identity decoupling
Keeping the candidate’s match to the user’s history separate from information about the candidate itself.
History-linear
For a fixed candidate, the matching operation changes in direct proportion to changes in its history input; this is the condition used for the paper’s exact reordering result.
Similarity-then-pool
Calculate a matching output for each past behaviour, then combine those outputs.
Pool-then-similarity
Combine the past behaviours first, then calculate the matching output once.
Attention
A learned way to assign different weights to parts of a user’s history for a particular candidate.
Low-rank expert
A compact learned transformation built from smaller factors; MELODI mixes several such transformations using candidate-dependent gates.
Mean reciprocal rank (MRR)
A ranking score based on how high the first relevant item appears; a higher value means it tends to rank nearer the top.
Normalised discounted cumulative gain (NDCG)
A ranking measure that rewards relevant items appearing near the top of a list; the paper reports it at specified list cutoffs.
Area under the precision–recall curve (AUPRC)
A summary of the trade-off between finding positive examples and keeping the selected examples correct.
Request-local history reuse
Computing history-only representations once and sharing them across candidates in the same request.
similarity-then-pool (SP)
Apply the similarity operator to each history item and then take the attention-weighted sum.
pool-then-similarity (PS)
Take the attention-weighted history sum first, then apply the similarity operator to that pooled history.
target-aware pooled history vector
The attention-weighted sum of history items, where attention weights may depend on the target.
similarity signal
The user–target interaction representation, dependent on both the history and target.
identity signal
A target-only representation intended to capture target-intrinsic information.
AUPRC
Area under the precision–recall curve, one of the industrial ranking metrics.
NDCG
A ranking metric reported at cutoffs of 10 or 20 in the evaluations.
BPR
The pairwise training objective used for public-dataset models.

Questions about MELODI’s ranking method and results

What is MELODI in candidate ranking?

MELODI is a ranking architecture that separates a candidate’s match to user history from candidate-only information. It combines those signals to score each candidate.

When does pooling history before similarity give the same result in MELODI?

The paper proves equality when the matching operation is linear in its history input for each fixed candidate. The attention weights can still depend on the candidate.

How does MELODI reduce ranking latency for many candidates?

It computes history-only representations once per request and reuses them across candidates. In the paper’s public benchmark, this helped at large candidate counts, although DIN was faster at smaller counts.

How did MELODI compare with DIN on the public ranking tests?

The prespecified MELODI configuration had the highest three-seed average on the reported public measures. In full-catalogue Steam ranking, however, DIN had a higher hit rate at rank one.

Can practitioners download MELODI and the industrial datasets?

The paper does not link code or trained models, and says the industrial datasets are proprietary and cannot be publicly released.

MELODI paper: method, claims and evidence

Everything below is recorded from the paper and matched against its text.

What the paper claims, in its own terms
  • Proven

    History-linearity is sufficient for pool-then-similarity to equal similarity-then-pool.

    Holds when: For each fixed target, the operator is linear in its history input.

  • Shown

    At large candidate counts, measured MELODI latency is lower than that of the evaluated candidate-conditioned baselines when history reuse is applied.

    Holds when: The reported processor and candidate-count settings; DIN remains faster in some smaller-candidate regimes.

  • Shown

    DIN remains faster than MELODI up to 500 candidates in the reported public latency sweep.

    Holds when: Reported public benchmark processor and request-local reuse path.

  • Shown

    The paper’s evaluation is offline and does not establish online impact.

The method, step by step
  1. Project frozen history and candidate embeddings to a shared width and apply layer normalisation; add positional encodings to history only.
  2. Compute candidate queries and history keys and values, then use multi-head dot-product cross-attention to obtain target-aware pooled histories.
  3. Apply the per-head gated low-rank cross layer to the pooled histories and target projections, yielding a similarity signal linear in pooled history.
  4. Build a separate target-only identity representation with a DCN-v2 self-cross.
  5. Score the concatenated similarity and identity outputs with an MLP.
  6. For reuse benchmarks, compute the target-independent history path once per request and share it across the request’s candidates.

New in this paper

  • The similarity–identity decoupling framework and its SP/PS formulation.
  • The sufficient history-linearity condition for exact SP/PS equivalence.
  • MELODI’s two-input, residual-free, per-head gated low-rank cross layer and separate target-only identity branch.
  • The request-local history-reuse evaluation of the architecture.

Taken from earlier work

  • Multi-head dot-product attention is based on the attention mechanism of Vaswani et al. (2017).
  • The low-rank mixture-of-experts cross layer is inspired by DCN-v2 (Wang et al., 2021).
  • Public text embeddings come from the all-MiniLM-L6-v2 checkpoint; the paper uses the BPR objective for public training.

Assumptions

  • The SP/PS equivalence requires the similarity operator to be linear in its history argument for each fixed target.
  • Request-local reuse applies to history-side computations independent of the candidate within a request.
  • The public evaluation uses histories truncated to 50 items and ranks each test item against 99 sampled negatives in its main protocol.
  • Industrial findings concern logged candidates and purchase labels and can reflect exposure and position bias.
Methods, datasets and ideas it names
  • similarity–identity decoupling frameworkMethod · Introduced here

    Separates target–history compatibility from target-only information in candidate ranking.

  • MELODIMethod · Introduced here

    Instantiates the framework with target-conditioned multi-head history pooling, a history-linear cross layer and a separate identity branch.

  • similarity-then-pool (SP)Concept · Studied

    Applies the similarity operator to each history item before pooling the results.

  • pool-then-similarity (PS)Concept · Studied

    Pools the target-aware history first and applies the similarity operator once to the pooled vector.

  • Deep Interest Network (DIN)Method · Compared against

    A target-aware model whose activation unit computes per-history-item attention weights and pools the history.

  • Self-Attentive Sequential Recommender (SASRec)Method · Compared against

    A target-agnostic sequential model that produces a history representation for scoring.

  • DIN + DCN-v2Method · Compared against

    Adds a DCN-v2 bilinear cross network to DIN’s pooled history and target inputs.

  • Co-Action Network (CAN)Method · Compared against

    A compared model whose target-parameterised MLP acts on each history item.

  • ML-25MDataset · Used

    A public dataset used to evaluate ranking quality and latency.

  • Industrial-ADataset · Used

    A proprietary logged-request ranking dataset used for industrial evaluation.

  • Industrial-BDataset · Used

    A proprietary logged-request ranking dataset used for industrial evaluation.

  • frozen pretrained item embeddingsInstrument · Used

    Shared item-text representations projected to the model’s embedding width.

  • multi-head dot-product cross-attentionMethod · Used

    Pools history values separately for each target and attention head.

  • Deep & Cross Network v2 (DCN-v2)Method · Extended

    Provides the inspiration for the low-rank expert cross operation used in MELODI.

  • logged exposure and position biasOther · Studied

    The authors identify these as potential biases in industrial training labels.

  • request-local history reuseMethod · Introduced here

    Computes history-only representations once for candidates within a request and reuses them.

How the evidence was gathered
Samples or repeats
Public main ranking table: three training seeds. Other main-text ranking results: one training run per model. Public latency: five process-isolated replicate minima. Industrial latency: five warm-up and 20 timed iterations. Bootstrap comparisons use 10,000 test-user resamples where stated.
Uncertainty reported
For some results
Significance tested
Yes
Notes
The public main table reports sample standard deviations over three seeds. The paper reports paired-bootstrap intervals for specified public comparisons, but most ablations and other ranking tables are single-run results. Industrial percentage changes are reported from three-decimal metric values.
Code and data
  • Data: no link printed
Questions the paper leaves open
  • How would MELODI perform in an online A/B test?
  • How would its latency and quality behave on processor types other than the one measured?
  • How well do the industrial results generalise beyond the proprietary logged datasets and the fixed-history benchmark setting?
  • How should logged exposure and position bias be corrected in the industrial training signal?

Sources

  1. 1Deep Interest Network for Click-Through Rate Predictionarxiv.org

Paper details

Title
MELODI: Similarity-Identity Decoupling for Lightweight Ranking
Authors
Quoc Phong Nguyen, Vuong Le, Volodymyr Vaskovych, Julien Monteil
Published
24 November 2026
Version read
v1
Field
Information retrieval
arXiv
2611.31940

This explanation was written for this site from the paper's own source. 63 passages and figures recorded from the paper were matched against its own text; 21 that could not be matched were left off this page. It does not judge whether the paper is right, and most papers on arXiv have not been peer reviewed. Read the paper before relying on a result.