ML-Powered Search & RankingFeature Engineering for RankingMedium⏱️ ~3 min

Multi Resolution Time Windows and Feature Freshness

Core Concept
Multi-resolution time windows compute the same behavioral metric (like click rate) across multiple time horizons simultaneously. The model learns when to trust each window: short windows catch trends, long windows provide stability.

Why Single Windows Fail

A single time window forces a trade-off. Long windows (30 days) give stable estimates but miss trends: an item going viral today still shows last month's low click rate. Short windows (1 hour) catch trends but are noisy: a single click on 10 impressions gives 10% CTR that means nothing. Production systems compute both and let the model learn the right blend.

Typical Window Pattern

For item CTR, compute 5 windows: 1 hour, 6 hours, 1 day, 7 days, 30 days. Optionally add exponential decay versions with half-lives of 3 hours and 3 days to balance recency with history. At serving time, retrieve all windows together. The ranker learns that 1-hour CTR matters for breaking news; 30-day CTR matters for stable catalog items. This weighting emerges from training data, not manual rules.

Freshness Requirements by Domain

Breaking news search needs query signals within minutes. E-commerce needs inventory availability within 1-5 minutes to avoid promoting out-of-stock items. Video platforms can tolerate 10-30 minute lag because video popularity changes gradually. The right freshness depends on how fast your items change and how much users notice stale rankings.

Infrastructure Trade-offs

Near real-time features require streaming pipelines that maintain rolling aggregates, writing updates to an online feature store at high throughput (100K+ writes/second). Refreshing engagement features every 10 minutes instead of hourly can improve CTR by 2-3% but doubles compute cost. For stable catalogs, daily batch updates may suffice, saving operational complexity. The decision comes down to: how much does freshness improve your specific ranking quality, and is that worth the infrastructure cost?

💡 Key Takeaways
Single time windows force a trade-off: long windows miss trends, short windows are noisy
Compute 5+ windows per metric (1hr, 6hr, 1d, 7d, 30d) plus exponential decay versions
Model learns when to weight each window: 1-hour for trending, 30-day for stable items
Freshness requirements vary: news needs minutes, video tolerates 30 minutes, catalog items need daily
Near real-time features double compute cost but can improve CTR 2-3%; worth it depends on domain
📌 Interview Tips
1Explain the single-window dilemma: long windows miss trends, short windows are noisy; multi-resolution solves both
2List specific windows: 1hr, 6hr, 1d, 7d, 30d for a behavioral metric like CTR
3Frame freshness as a cost/benefit: 10-minute refresh costs 2x compute but gains 2-3% CTR
← Back to Feature Engineering for Ranking Overview
Multi Resolution Time Windows and Feature Freshness | Feature Engineering for Ranking - System Overflow