ICML 2024 Β· Zhai et al. (Meta) Β· arXiv 2402.17152

Actions speak louder than words.
Here's why that broke how recommenders are built.

This paper argued that everything you've clicked, watched, and skipped is a language β€” and that a recommender should work like a model that predicts the next "word" of it. You're a software engineer; no ML background needed. We'll build every concept from scratch.

One user's life, as a token stream β†’

Hover to pause. The paper's core bet: this raw stream contains more signal than thousands of hand-engineered features summarizing it.

MODULE 1βœ“ Completed

How recommenders work today (and why they hit a wall)

Every feed you scroll β€” Instagram, YouTube, TikTok, Amazon β€” is powered by a DLRMDeep Learning Recommendation Model β€” the industry-standard architecture: take thousands of features about a user and an item, feed them through neural network layers, output a score like "probability of click".: a Deep Learning Recommendation Model. As an engineer, think of it as a giant scoring function:

score = f(thousands_of_features_about_user_and_item)

The two-stage funnel

You can't score every item for every user β€” there are billions of items. So production systems run a funnel: retrieval (cheaply narrow billions down to thousands of candidates) then ranking (expensively score those thousands to pick the top handful). Two separate stages, traditionally two separate models.

The retrieval β†’ ranking funnel
~10,000,000,000 items in catalog
β†’ retrieval: ~10,000 candidates
β†’ ranking: ~10 shown to you
Retrieval must be fast and cheap (it touches billions). Ranking can be slow and smart (it touches thousands). Keep this funnel in mind β€” the paper reuses one model family for both stages.

The features problem

Where do those "thousands of features" come from? Humans. Engineers hand-build pipelines that compute things like user_clicks_on_sports_last_7d, item_ctr_by_country, cosine_sim(user_topic_vector, item_topic_vector). A mature system at Meta's scale has thousands of these, each with its own pipeline, backfill jobs, and on-call rotation.

πŸ’‘ Engineer's translation: features are like hand-tuned indexes and materialized views over a raw event log. They're lossy summaries, they go stale, and every new one adds operational debt. The paper's question is essentially: what if we queried the raw log directly?

The wall: compute doesn't help

In language models, a famous pattern holds: throw 10Γ— more compute and data at the model, and quality keeps improving along a predictable curve (a "scaling law" β€” more in Module 6). DLRMs don't do this. Past a point, making a DLRM bigger barely helps. The model is bottlenecked by its diet of hand-made, lossy features β€” not by its size. Meta was sitting on tens of billions of user actions per day and couldn't convert that data advantage into model quality.

DLRM world
  • Thousands of hand-engineered features
  • Separate retrieval & ranking models
  • Bigger model β‰  better results
  • Feature pipelines = forever maintenance
What the paper wants
  • Raw action sequence in, predictions out
  • One architecture for both stages
  • Quality scales with compute, like LLMs
  • Delete (most of) the feature factory

Checkpoint quiz

+10 XP per correct answer
1. Why do production recommenders use a two-stage funnel (retrieval then ranking)?
Right idea: retrieval is the cheap coarse filter over billions; ranking is the expensive precise scorer over the survivors. The funnel exists purely because of compute cost.
2. What does the paper identify as the key reason DLRMs stop improving when you make them bigger?
Meta had tens of billions of actions per day β€” data wasn't scarce. The issue is that hand-made features throw away most of the signal before the model ever sees it.
3. As a software analogy, hand-engineered features are most like…
Exactly. And the paper's move is the equivalent of querying the raw event log with one powerful engine instead of maintaining a thousand views.
MODULE 2βœ“ Completed

ML crash course: just enough to read the paper

Four concepts unlock the whole paper: embeddings, training, attention, and autoregressive generation. Each gets two minutes and an animation.

2.1 β€” Embeddings: hashing things into meaning-space

Computers can't compare "Inception" and "Interstellar" as strings. An embeddingA learned list of numbers (a vector, e.g. 256 floats) representing an item, user, or word. Trained so that similar things end up with nearby vectors. maps each item to a vector of numbers β€” like coordinates on a map β€” and training nudges those coordinates so that similar items end up close together. Similarity becomes geometry: just measure distance.

Watch embeddings learn structure
Before training, items are placed randomly. "Training" pulls items of the same kind together (🎬 sci-fi, ⚽ sports, 🍜 cooking). Afterwards, "find similar items" = "find nearest neighbors" β€” a problem engineers know how to make fast.
πŸ’‘ Engineer's translation: an embedding table is a HashMap<ItemId, float[256]> whose values are learned, not assigned. With billions of item IDs, this table is where most of the paper's 1.5 trillion parameters live.

2.2 β€” Training: gradient descent in one paragraph

A model starts with random numbers (parameters). You show it an example, it makes a prediction, and a loss function scores how wrong it was. Calculus tells you which direction to nudge every parameter to be slightly less wrong. Repeat billions of times. That's it β€” training is while (wrong) { nudge(); } at absurd scale.

2.3 β€” Attention: every token looks at every other token

Given a sequence (words, or user actions), attentionA mechanism where each position in a sequence computes a relevance weight for every other position, then blends their information together according to those weights. The core of the Transformer architecture. lets each element ask: "which earlier elements matter for understanding me?" β€” and blend in their information, weighted by relevance. Stack layers of this and you get a Transformer, the architecture behind GPT and, with modifications, behind this paper.

Attention, interactively β€” click any action
Click a token to see what it "attends to". Notice like:TrailRunVid attends strongly to earlier outdoor-gear actions and weakly to the pizza order β€” relevance is learned, not programmed.

2.4 β€” Autoregressive generation: predict the next token, forever

GPT works by repeatedly answering one question: given everything so far, what comes next? Each prediction is appended and the loop continues. This framing is the engine the paper borrows: instead of predicting the next word, predict the user's next action.

Next-token vs next-action prediction
Same machinery, different vocabulary. A language model's vocabulary is ~100k words. A recommender's "vocabulary" is billions of items, changing daily β€” that difference drives the architecture in Module 4.

Checkpoint quiz

+10 XP per correct answer
1. What property does training give to embedding vectors?
The whole point of embeddings: turn fuzzy "similarity" into measurable distance.
2. In one sentence, what does attention compute?
Each token asks "who matters to me?", gets weights, and mixes in information accordingly.
3. The biggest difference between a language model's vocabulary and a recommender's "vocabulary" is…
~100k stable words vs billions of items churning daily. The paper calls this "high cardinality, non-stationary" data β€” and it's why a vanilla Transformer wasn't enough.
MODULE 3βœ“ Completed

The big idea: Generative Recommenders

Here's the reframe that gives the paper its title. Stop treating recommendation as "score this user-item pair using 1,000 features". Start treating it as sequential transductionMapping an input sequence to an output sequence. Here: map a user's chronological action sequence to predictions about their next actions and responses.: the user's life is a chronological sequence of action tokens, and the model's job is to generate what comes next. The paper calls models built this way Generative Recommenders (GRs).

DLRM vs Generative Recommender β€” animated
Left: thousands of feature pipelines feed a scoring net, one user-item pair at a time. Right: the raw event stream flows into one sequence model that predicts the next action β€” and one forward pass produces signal for many targets at once.

Where did all the features go?

The radical part: GRs delete dense features (all those hand-computed counters and ratios). The bet is that a sequence model can re-derive them from raw events β€” your click-through-rate over the last week is, after all, computable from your last week of events. Categorical features that carry real new information (like "user followed creator X") aren't deleted β€” they're sequentialized: converted into auxiliary tokens and merged into the main timeline, so everything the model knows arrives as part of one stream.

πŸ” One architecture, both funnel stages. Retrieval = generate likely next items directly (then fetch nearest neighbors in embedding space). Ranking = ask the model target-aware questions: interleave each candidate into the sequence and read out predicted engagement (click? like? watch time?). Same backbone, two read-out modes β€” collapsing what used to be two separate model zoos.

Why "actions speak louder than words"?

Language models learn from what people say. This paper's claim is that what people do β€” tens of billions of actions daily on a large platform β€” is an even richer, largely untapped modality, big enough to train GPT-3-scale models on behavior alone.

Checkpoint quiz

+10 XP per correct answer
1. The core reformulation of Generative Recommenders is:
Recommendation becomes sequential transduction in a generative framework β€” the paper's central move.
2. What happens to hand-engineered features in a GR?
The model is trusted to re-derive counters/ratios from raw events; genuinely new categorical info gets sequentialized into the stream.
3. How does one GR backbone serve both funnel stages?
Same sequence model, two read-out modes β€” one of the paper's biggest simplifications of the production stack.
MODULE 4βœ“ Completed

HSTU: a Transformer rebuilt for behavior data

Could Meta just run GPT over action sequences? They tried; vanilla Transformers struggled. Recommendation data breaks three Transformer assumptions, and HSTU β€” Hierarchical Sequential Transduction Units β€” is the redesign. Three problems, three fixes:

Problem 1: softmax erases intensity

Standard attention runs its relevance scores through softmaxA function that converts a list of scores into probabilities that sum to exactly 1. Great for "pick one word", bad for expressing absolute strength β€” doubling all scores changes nothing after normalization., which forces all weights to sum to 1. That answers "which token matters relatively most?" β€” perfect for grammar, terrible for preferences. If you binged 40 cooking videos, that absolute intensity is signal, but softmax normalizes it away. HSTU's fix: pointwise attention. Each relevance score goes through a soft on/off gate (SiLU) independently β€” no normalization, so total enthusiasm is preserved.

Softmax vs pointwise β€” drag the user's enthusiasm
😐 casual obsessed πŸ”₯
Crank the slider: the user engages with cooking content more and more intensely. Softmax (left) outputs nearly identical weights β€” it only sees ratios. Pointwise (right) lets the signal grow. For a recommender, that difference is the product.

Problem 2: position alone isn't enough

In text, "3 tokens ago" means something. In behavior, 3 actions ago could be 3 seconds or 3 weeks ago, and a doom-scrolling session generates 500 tokens while a deliberate purchase generates 1. HSTU adds a relative attention bias built from both position and timestamps, so the model natively understands recency and session rhythm.

Problem 3: too slow at recommendation scale

Sequences here are long (~8,000 actions) and must be re-scored constantly. HSTU attacks cost from several angles: it simplifies each layer (fusing the usual attention + feed-forward blocks into one leaner unit where a gating multiply replaces the big MLP), exploits the fact that real user histories have ragged, varying lengths rather than padded uniform ones, and during training uses Stochastic LengthA training trick: randomly subsample long user histories into shorter sequences most of the time. Because attention cost grows quadratically with length, this slashes compute with negligible quality loss. to randomly shorten histories. Net result: 5.3–15.2Γ— faster than a FlashAttention2-optimized Transformer on 8,192-length sequences.

πŸ’‘ Engineer's translation: HSTU is what happens when you profile a Transformer against your workload and refactor hot paths: drop a normalization that hurts your domain (softmax), add an index your queries need (time-aware bias), and exploit your data's actual shape (ragged sequences) instead of padding it into a rectangle.

Checkpoint quiz

+10 XP per correct answer
1. Why does HSTU replace softmax attention with pointwise attention?
Softmax answers "relatively, which matters most?" β€” but how much a user engages is itself the signal. Pointwise gating preserves it.
2. HSTU's relative attention bias uses position and what else?
Behavior streams have wildly uneven tempo; time-aware bias lets the model reason about recency and sessions natively.
3. What does Stochastic Length do during training?
Attention cost grows with length squared, so training mostly on shortened histories is a huge win β€” and quality barely moves.
MODULE 5βœ“ Completed

Serving it: M-FALCON, or how to afford inference

Training a huge model is one bill; serving it to billions of users at feed-refresh speed is the bill that kills projects. Ranking means scoring thousands of candidates per request. Naively, that's thousands of forward passes through a giant model. Per user. Per scroll.

The trick: candidates share almost everything

Every candidate is scored against the same user history. So why recompute the history's representation thousands of times? M-FALCON processes candidates in micro-batches: compute the expensive user-history part once, cache it (like attention KV cachingKey-Value caching: storing the intermediate attention tensors for a fixed prefix so subsequent computations can reuse them instead of recomputing β€” the same trick that makes LLM chat responses fast. in LLM serving), then score batches of candidates against the cached state, amortizing the cost across all of them.

Naive serving vs M-FALCON
Top lane: naive β€” every candidate re-runs the full sequence. Bottom lane: M-FALCON β€” the user prefix is computed once (the long block), then candidates stream through in cheap micro-batches.
⚑ The payoff: with these amortizations, Meta deployed GR models 285Γ— more computationally complex than the DLRMs they replaced β€” using the same or less inference budget. This is why the paper isn't just an architecture paper; it's a systems paper.

Checkpoint quiz

+10 XP per correct answer
1. What's the key observation that makes M-FALCON work?
Compute the prefix once, cache it, amortize across micro-batches of candidates β€” conceptually the same trick as KV caching in LLM serving.
2. The "285Γ—" figure in the paper refers to…
Efficiency gains (HSTU + M-FALCON) bought a 285Γ— complexity budget for free at serving time.
MODULE 6βœ“ Completed

Results, scaling laws, and why this paper mattered

The numbers

On public benchmarks (MovieLens, Amazon Books), HSTU beat strong baselines by up to 65.8% on NDCGNormalized Discounted Cumulative Gain β€” a 0-to-1 metric for ranking quality that rewards placing the truly relevant items near the top of the list., a standard ranking-quality metric. But the result that made the industry pay attention came from production: a 1.5-trillion-parameter GR, deployed on surfaces serving billions of users, lifted online A/B testThe gold standard for measuring real impact: show the new system to a random slice of real users, the old one to the rest, and compare engagement metrics. metrics by 12.4% β€” an enormous swing against a DLRM baseline that hundreds of engineers had optimized for years.

The headline: scaling laws arrive in recsys

The deepest finding: GR quality improves as a smooth power law of training compute, holding across three orders of magnitude, up to GPT-3/LLaMa-2 scale. DLRMs flatline; GRs keep climbing. For the first time, a recommender team could trade money for quality on a predictable curve β€” the same property that fueled the LLM boom.

The plateau vs the power law
Illustrative shape (log-scale compute on x). The DLRM curve saturates no matter how much compute you add. The GR curve is the argument for the entire research program β€” and for "foundation models for recommendations".

What you should remember

β‘  Recommendation was reframed from feature-based scoring to next-action generation. β‘‘ HSTU rebuilt the Transformer for behavior data: pointwise (not softmax) attention, time-aware bias, 5.3–15.2Γ— faster at length 8,192. β‘’ M-FALCON made serving affordable (285Γ— complexity, same budget). β‘£ It worked in production: +12.4% online, and quality scales with compute β€” the property that changed everything in NLP, finally demonstrated in recsys.

Final exam

+10 XP per correct answer
1. The production A/B result for HSTU-based GRs was…
65.8% was the max NDCG gain on offline/public benchmarks; 12.4% was the online A/B lift β€” against a baseline tuned for years, that's a huge number.
2. The paper's most consequential scientific claim is that GR quality…
Predictable compute-to-quality scaling is what DLRMs lacked and what made the LLM era possible. Demonstrating it for recommenders is the paper's legacy.
3. Match the component to its job: HSTU is to ____ as M-FALCON is to ____.
HSTU = the rebuilt sequence model; M-FALCON = the serving algorithm that micro-batches candidates so the model is affordable in production.
4. Why is the paper titled "Actions Speak Louder than Words"?
Tens of billions of daily actions form a behavioral "language" big enough for GPT-scale training β€” the thesis in the title.
πŸ†

Paper Pro

You finished the course. You can now read arXiv 2402.17152 and recognize every major idea β€” DLRMs, Generative Recommenders, HSTU, M-FALCON, and recsys scaling laws.