Building Time-Decayed Interest Features for Toutiao Article Ranking

Last updated: November 29, 2026

Quick Overview

Design user interest features for a news ranking model from a user's reading history, so recent interests count more than old ones and features stay cheap to update in real time.

ByteDance
Machine Learning
Machine Learning Engineer
ByteDance
November 29, 2026
Machine Learning Engineer
Technical Screen
Machine Learning
Easy

0

0

0 solved


Design user interest features for a news ranking model from a user's reading history, so recent interests count more than old ones and features stay cheap to update in real time.

Toutiao's ranking depends on knowing what a reader cares about now, since news interests shift by the hour. This screen question checks practical feature engineering: aggregations, decay, normalization, and how features are maintained online without recomputing from full history.

What the Interviewer Expects
  • Define interest at a sensible granularity such as category, topic, or entity
  • Use exponential decay with a clear half-life
  • Show the incremental update rule
  • Normalize to handle heavy versus light readers
  • Mention negative signals and leakage
Key Topics to Cover
feature engineering
exponential decay
user interest modeling
real-time features
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How would you choose the half-life, and could you learn it?
  • How would you combine short-term and long-term interest?
  • How would you avoid leakage when building training data?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Ask what events are available (impressions, clicks, read duration, shares, dislikes), the latency budget for feature freshness, and whether the model takes dense numeric features or sequence inputs. A...

Approach

Score each (user, topic) pair with a decayed sum of engagement weights, keep two half-lives for short and long term, normalize per user, and add contrast features such as the ratio between them....


Submit Your Answer
Markdown supported