← Personalization · 2026-10-22
📖 DEEP DIVE · PERSONALIZATION

ECHO: Efficient Cascade with Homogeneous Operators for Distillation-Guided 100K-Sequence Modeling

Wenhao Li, Qinglin Jia, Chenghou Jin, Zihong Xian, Jiezhou Ji, Yanzhi Liu, Zezheng Wang, Ruiming Tang, Chaoyi Ma, Zhaojie Liu, Wenwu Ou
24 minread4.75score

ECHO (Kuaishou) is a three-stage funnel: 100K raw behaviors → a user-side learned top-K (candidate-agnostic, computed outside the request path and cached per user) keeps 10K → each candidate runs GSU-style retrieval for 100 → target attention aggregates them for the ranker. Because the user-side selector never sees the candidate, it is trained by knowledge distillation from a target-attention teacher that sees the full history and the candidate, plus a boundary loss that pushes "teacher-preferred but not in top-K" events over the cut. Retrieval and the final attention reuse the teacher's relevance parameters; that is the "Homogeneous Operators" in the title. By the paper's analytical estimate, sequence-branch FLOPs are ~160× lower than STCA; GAUC on KuaiRand Comment improves 1.520% relative to the strongest baseline, and a 7-day online A/B test shows +0.613% app usage time.

1. Architecture: what each funnel stage does

This section shows how 100K events shrink to a size the ranker can afford.

Four terms used throughout:

  • Target attention: attention with the candidate as query and history events as keys/values. It outputs a candidate-specific interest vector. DIN is the classic example.
  • GSU / ESU: SIM's two-stage design. The General Search Unit retrieves a few relevant events with a light scorer. The Exact Search Unit runs full target attention over them.
  • Top-K: keep the K highest-scoring positions.
  • Knowledge distillation (KD): train a student to match a teacher's output distribution.
StageModuleIn → outSees candidate?Runs whereTraining signal
① User-side compressionDistilled Selector (DS)100K → 10K raw recordsNoReal-time training, written to a storeKD + boundary loss
② Candidate retrievalTFR, TWIN-style GSU10K → 100 per candidateYesOnline requestRanking loss; scorer params from teacher
③ AggregationTWIN-style ESU100 → interest vectorYesOnline requestMulti-task ranking loss
TeacherFull-history target attentionFull history + training targetsYesTraining onlyIts own prediction loss

TFR stands for Target-aware Fine-grained Retriever, the stage-two retriever.

Two graphs train concurrently. The selector graph trains the teacher and DS; DS writes each user's top-K records to an intermediate store. The ranking graph reads those records and trains TFR, aggregation and the ranker.

Online requests only read the store. They never run DS or touch the 100K history.

DS keeps original records: item ID, timestamp, side features. C-Former and SequenceO1 compress history into latent tokens; each ECHO record stays individually matchable.

ECHO framework: the selector graph writes top-K records during real-time training; the ranking graph reads them online.
ECHO framework: the selector graph writes top-K records during real-time training; the ranking graph reads them online.

2. Walk-through: one request through three stages (illustrative numbers)

This section ties the table together with one example. All numbers here are illustrative, not from the paper.

User A has 80,000 events. During real-time training overnight, DS scores all 80,000 and stores the top 10,000. One of them is a fishing video A finished eight months ago.

At 9 a.m. A opens the feed. The ranker must score 500 candidates, one of which is a new fishing-gear video.

Stage one is already done. The ranker reads A's 10,000 records once; all 500 candidates share them.

Stage two: TFR uses the fishing-gear video as query, scores the 10,000 records and keeps the top 100. The eight-month-old fishing video scores high and is retrieved.

Stage three: target attention weights those 100 records. Fishing-related events get large weights, the interest vector goes into the ranking tower, which predicts click, like, comment and so on.

Had DS dropped that fishing record, stage two could never find it. That is why DS needs teacher supervision.

3. Title keywords mapped to modules

Cascade: the 100K → 10K → 100 → attention budgets. 10K bounds interest coverage; 100 bounds per-candidate compute.

Homogeneous Operators: TWIN shares relevance parameters between GSU and ESU. ECHO goes one step further: the teacher's learned query/key relevance parameters are exported to both TFR and the final target attention. All three use one scoring operator, so coarse retrieval and fine aggregation agree on what "relevant" means.

Distillation-Guided: DS is trained from the teacher (Section 4).

100K-Sequence Modeling: online raw history is capped at 100K events.

4. Training DS: scoring, distillation, boundary loss

This section solves stage one's core problem: DS cannot see the candidate but must pre-select events useful for candidates.

4.1 DS scoring


Symbols: is the student's (DS) score for event ; is a user vector built only from profile features; encodes event (features plus timestamp); , are head- query/key projections; is the number of heads.

Intuition: attention scoring with the user as query. No candidate is involved, so one set of scores serves every candidate and can be cached. DS keeps the top positions, ; in production .

4.2 Teacher scoring


Symbols: is the teacher's score for event given candidate ; encodes context and candidate features into a query; is the teacher's own event encoding (not shared with DS).

Intuition: a standard full-history target attention. It knows the candidate, so its scores say which history truly matters for that candidate.

4.3 Distillation loss


Symbols: is a batch and one user–candidate sample; is that user's history length; , are teacher and student softmax probabilities over history positions at temperature ; is stop-gradient, so the student loss never updates the teacher.

Intuition: soft-label cross-entropy. A user has several training candidates, each with its own teacher distribution, but the student has one score vector, so it fits what those distributions share. It learns to rank events useful for most candidates first.

4.4 Boundary loss

Even after distribution matching, a few teacher-preferred events can sit outside the student's top-K. The boundary loss targets them.

Three steps. Compute a sharper teacher distribution with temperature . Outside the top-K, take the positions with the highest teacher probability, (missed positives); inside it, take the lowest, (placeholder negatives). Pair them by rank:

Symbols: indexes pairs; is the pair weight, the teacher's preference gap (clipped at 0); is the student score; is the desired margin; scales the loss; avoids division by zero.

Intuition: a weighted pairwise ranking loss acting only at the top-K boundary. It pushes "should be in" events up and "taking a slot without mattering" events down, harder when the teacher's preference gap is larger. Pairs and weights are detached, so no gradient flows through the discrete top-K.

4.5 Full objective


Symbols: is the teacher's multi-task prediction loss; , , are weights.

Intuition: updates only the teacher, keeping it current on what is relevant; and update only DS. Both train live in the same stream; the teacher is not frozen. The ranking graph uses its own .

5. Deployment: three engineering optimizations

Common-feature sharing. Samples of one user in a batch load the long history into GPU memory once.

Compact record encoding. Eight int64 fields cost 64 bytes per record, 640 KB at 10K records. ECHO packs each field into a fixed width sized to its value range.

Move the key projection to the query side. Standard target attention projects every history event into a key, so online cost or key-cache size grows with history length. ECHO uses:

Symbols: is the candidate-side query vector; is one history event vector; , are the projection matrices.

Intuition: multiply into the query once per request; history vectors enter the dot product directly, with no per-event projection and no key cache.

6. Experiments

Baselines. DIN: target attention over the latest 100 events. SIM: GSU/ESU retrieval. TWIN: SIM with shared GSU/ESU parameters. STCA: end-to-end stacked target-aware cross-attention (trained at ~2K, extrapolated to 10K). TWIN V2: clusters the latest 50K events into ~10K units. SequenceO1: a fixed 100-token sketch. GAUC is per-user AUC, weighted-averaged.

ResultNumbersWhat it means
KuaiRand-1K Comment GAUC0.6252 → 0.6347 (+1.520%, best baseline SequenceO1)Largest public-data gain; best on all 8 tasks
Industrial Comment GAUC0.7824 → 0.7851 (+0.345%, best baseline TWIN V2)Industrial gains 0.113%–0.345%
By history length (vs TWIN)<10K users +0.045%, >50K users +1.279%Learned selection matters more as history grows
Teacher top-100 recallDS 99.976%, recency 57.905%, random 49.443%DS almost never drops what the teacher values most
Older events selected46.08% outside the latest 10KDS picks relevant, not recent
Sequence-branch FLOPs (L=100K)160.3× (train), 159.2× (infer) below STCAAnalytical, sequence branch only; no end-to-end latency
Long-history accuracy (50K)STCA 0.6645, ECHO 0.6630Full modeling is slightly better; ECHO gets most of it at ~1/160 compute
Ablation: no KD, no boundary lossComment 0.6200 → 0.6347 (+2.371%)Teacher supervision is what makes DS work
Online A/B (7 days, 5% traffic)Usage time +0.613%, per user +0.640%Incremental over a system with TWIN and SequenceO1-like compression

1.520% is relative: ; the absolute gap is 0.0095. The ablation removes both losses together, so the boundary loss alone is not isolated.

Left: teacher top-100 recall within the 10K retained set; right: retained teacher relevance mass.
Left: teacher top-100 recall within the 10K retained set; right: retained teacher relevance mass.
Top: analytical sequence-branch FLOPs vs. history length; bottom: GAUC from a separate length study.
Top: analytical sequence-branch FLOPs vs. history length; bottom: GAUC from a separate length study.

7. Limitations

The 100K → 10K cut is hard. Events DS drops cannot be recovered by TFR; the authors note extremely long-tail candidates may suffer.

DS updates with real-time training and store refresh, so new interests enter after a delay.

Retention quality for new users, interest shifts and new candidate types is not evaluated separately. The industrial data is not public.

8. Practical takeaways

Add a user-side top-K before the GSU and compare it with recency and random at the same storage budget.

Monitor retention quality offline with teacher top-100 recall and attention-mass coverage.

Reuse an existing model as teacher and export its query/key parameters to both GSU and ESU.

Use the key-projection identity on its own in any online target attention.

Define refresh metrics: delay for new events to enter top-K, model/store version compatibility, rollback.

Source: https://arxiv.org/html/2610.28569v1 . Numbers and formulas are from the paper; walk-through numbers are illustrative; practical advice is our analysis.