Recommender systems
Temporal Dynamics, Recency, and Seasonality
Model recency, periodicity, trend, lifecycle, and temporal drift without discarding durable preference or leaking future state.
By the end you can
- Identify distinct clocks that shape recommendation behavior
- Compare windows, decay, periodic features, and lifecycle models
- Prevent future leakage and delayed-label bias
- Design rolling evaluation and temporal calibration slices
Example
The winter recommender arrived in spring
A fashion platform retrained monthly on a one-year window. Seasonal items kept their pull long after the demand for them had ended. Then a rapid weather shift and a local festival created a pattern the model had no way to represent.
- Recency: Recent interactions reflected current need more than year-old browsing.
- Seasonality: Weekly, annual, and event-driven cycles overlapped.
- Item lifecycle: New items had launch, growth, saturation, and retirement phases.
- User lifecycle: New, active, returning, and lapsing users behaved differently.
- Availability clock: Inventory and region changed faster than model retraining.
Temporal recommendation needs several clocks
Time can affect user taste, item popularity, inventory, context, competition, and label maturity. A single timestamp feature rarely captures these mechanisms. The temporal models worth having are decay, time bins, periodic features, recency-aware neighborhoods, dynamic factors, sequence gaps, trend sources, and lifecycle states. Each has to be built point-in-time. Whoever builds one owes an answer for why that timescale and not another.
The rest of this lesson answers that question with published work rather than assertion. A drift model measured on six years of Netflix ratings. A production feature at YouTube whose omission flattens a launch curve. A public health model that learned the calendar. Four standard baselines, on four standard datasets, recommending items that did not yet exist.
Name the mechanism and the timescale before adding a decay or a time bin, or the model ends up encoding whichever clock was easiest to compute.
Visual
A temporal signal inventory
Five clocks, not one. How long ago the event happened, where the calendar is, how old the item is, how far along the user is, and what the team itself changed last month.
The item-lifecycle clock is not a diagram label. It is a shipped production feature. YouTube's candidate-generation network is fed the age of every training example. The 2016 paper that describes it gives the reason: "Machine learning systems often exhibit an implicit bias towards the past because they are trained to predict future behavior from historical examples." Figure 4 shows what that bias costs on a single video. With the example-age feature the model reproduces the observed upload-time popularity spike. Without it the model "would predict approximately the average likelihood over the training window". That is a flat line drawn through a curve that is not flat. At serving time the feature is set to zero or slightly negative. That is what makes it a lifecycle clock rather than a leak.
- 1
Event recency
Time since the user-item interaction or session event.
- 2
Periodic context
Hour, weekday, season, holiday, or recurring schedule.
- 3
Item lifecycle
Launch age, trend momentum, stock phase, and retirement.
- 4
User lifecycle
Onboarding, habit formation, dormancy, and return.
- 5
System change
Model, interface, pricing, and catalog regimes over time.
Comparison
Windowing and decay make different commitments
One question underlies the row: how much should an old event still count? A hard time window answers with a cliff. Exponential or learned decay answers with a half-life somebody has to choose. A periodic or state model answers that age was the wrong variable, and that what matters is where the user sits in a cycle or a lifecycle.
The first two options are rejected in the abstract of the best-known drift model, from 2009: "Classical time-window or instance-decay approaches cannot work, as they lose too much signal when discarding data instances." What it proposes instead is the column this comparison does not have — "creating a model tracking the time changing behavior throughout the life span of the data". Reading the row as a menu of three is therefore already a choice. The fourth answer is to keep everything and let the drifting parts drift.
Hard time window
Discard evidence older than a cutoff.
- Simple and bounded
- Creates discontinuity
- Can remove durable taste
- Useful for rapidly changing contexts
Exponential or learned decay
Reduce influence gradually with age.
- Smooth adaptation
- Requires a half-life choice
- Can be event-specific
- Useful for mixed temporal horizons
Periodic or state model
Represent recurring cycles or lifecycle states.
- Captures non-monotonic patterns
- Needs enough historical coverage
- Can fail under regime change
- Useful for seasonality and replenishment
Case
Let the drift into the model rather than delete the past
That fourth route was taken in 2009. Rather than discard old ratings, Koren's model lets user bias, item popularity and user factors drift across the whole history.
The evidence was the Netflix Prize data: "more than 100 million date-stamped ratings performed by about half million anonymous Netflix customers on 17,770 movies between Dec 31, 1999 and Dec 31, 2005". At 200 factors the ladder runs plain SVD at RMSE .9009, SVD++ at .8911, timeSVD++ at .8799. Koren's own reading of that table is the sharper measurement. "What further demonstrates the importance of capturing temporal dynamics is the fact that a timeSVD++ model of dimension 10 is already more accurate than an SVD model of dimension 200." The 10-factor timeSVD++ scored .8971. On the neighborhood side, adding temporal dynamics cut RMSE from 0.9002 to 0.8885. Netflix's own Cinematch had published 0.9514 on the same test set, and the baseline predictors run from .9799 to .9603. Modelling time bought more accuracy than an order of magnitude more factors did.
Old evidence is usually too valuable to delete and too stale to weight equally.
Example
Temporal modeling failures
Future popularity leakage makes the past look easier than it was. Delayed-label bias makes the recent past look worse. Both are counted in the same evaluation, and they push the number in opposite directions.
Calendar overfit has a documented case with dates and counts attached. Google Flu Trends overshot the actual level in 2011-2012 by more than 50%. It reported overly high flu prevalence in 100 out of 108 weeks from 21 August 2011 to 1 September 2013. And it completely missed the non-seasonal 2009 influenza A-H1N1 pandemic — the episode that did not follow the calendar. Four researchers writing in Science in 2014 put the diagnosis in one line: "In short, the initial version of GFT was part flu detector, part winter detector." The errors were autocorrelated week to week, and varied in direction and magnitude with the time of year. Much of the drift they attribute to Google altering its own search algorithm underneath the model. That is the system-change clock and the periodic clock failing inside a single case.
- Future popularity leakage: Aggregate counts include events after the recommendation cutoff.
- One half-life for everything: Durable language preference and temporary shopping intent decay equally.
- Calendar overfit: Google Flu Trends reported overly high flu prevalence in 100 out of 108 weeks from 21 August 2011 to 1 September 2013 and completely missed the non-seasonal 2009 influenza A-H1N1 pandemic.
- Freshness-relevance confusion: New items receive exposure regardless of suitability.
- Delayed-label bias: On Criteo Predictive Search logs from 3 August to 16 October 2020, conversions arrived 64.1% on day 1, 4.7% on day 2, 7.7% on days 3-5, 10.1% on days 6-12 and 13.4% on days 13-31. The public Criteo Sponsored Search Conversion Log dataset is "a sample of 90 days of Criteo live traffic data". Each click records whether a purchase followed it within a 30-day attribution window, plus a time_delay_for_conversion field.
Steps
Engineer time-aware recommendation features
Five clocks run underneath this lesson. The first step is only to name them: event time, availability, label maturity, lifecycle, and system change. The sequence closes by comparing predicted against observed value by age, horizon, and cohort. That comparison is what makes a temporal design reviewable rather than assumed.
Step three — compute every aggregate as known at the ranking moment — is the one most often skipped. There is a measurement of what skipping it costs. Four researchers trained BPR, NeuMF, SASRec and LightGCN on MovieLens-25M, Yelp, Amazon-music and Amazon-electronic, using the standard leave-last-out split. Their finding: "Through experiments, we show that all models indeed recommend future items that are not available at the time point of test instance, as the result of data leakage." The accuracy changes caused by including different amounts of future data reach magnitudes as high as 89.5%, with no consistent pattern. So the leak does not merely inflate a score by a known margin. It makes the ranking between models unpredictable. Point-in-time construction is not hygiene. It is the difference between a comparison and a coin toss.
1. List relevant clocks
Separate event, availability, label, lifecycle, and system-change time.
2. Propose timescales
Use domain evidence for windows, decay, and periodicity.
3. Build point-in-time features
Compute every aggregate as known at the ranking moment.
4. Test regime changes
Evaluate unusual seasons, launches, outages, and catalog shifts.
5. Monitor temporal calibration
Compare predicted and observed value by age, horizon, and cohort.
Key idea
Recency is a hypothesis, not a default
Recency is not a universal preference. Some signals decay in minutes, others remain useful for years. The 2009 drift paper makes the same point from the other side: discarding old instances by window or decay loses too much signal. That is only true if some of that old signal was still live.
One global decay rate makes the same claim about every signal at once, discarding taste that lasts for years while chasing behavior that stopped mattering by the afternoon.
Key idea
The time gate
Introduce temporal complexity only when its clocks can be constructed point-in-time and validated across more than one historical regime.
One team applied that gate to its own evaluation protocol. The common practice is to mask a random item from a user's history and predict it. YouTube's 2016 paper calls that a leak: "This leaks future information and ignores any asymmetric consumption patterns." Their repair was to "rollback" the history and feed the network only actions taken before the held-out watch. The model then predicts the user's next watch rather than a randomly chosen one. They report that the rebuilt protocol performed better in A/B testing. The leak was in the labels, not the features. It was found by asking what was knowable at the ranking moment.
Temporal complexity that cannot be rebuilt point-in-time is leakage wearing the costume of a feature, and a single historical regime is the thinnest evidence such a feature can ship on.
Key takeaways
- Every recommender has temporal assumptions, including the ones that omit time. YouTube's candidate generator has to be told the age of each training example. Without it the model flattens an upload-time popularity spike into the average likelihood over the training window.
- Time can affect user taste, item popularity, inventory, context, competition, and label maturity. Koren let user bias, item popularity and user factors drift across ratings spanning Dec 31, 1999 to Dec 31, 2005 rather than delete the early ones.
- Recency is not a universal preference: some signals decay in minutes, others remain useful for years. That is why Koren wrote that time-window and instance-decay approaches "lose too much signal when discarding data instances".
- Event recency is one clock among five, and modelling it is worth measurable accuracy. On the Netflix data timeSVD++ reached RMSE .8799 at 200 factors against .9009 for plain SVD, and a 10-factor timeSVD++ at .8971 already beat the 200-factor SVD.
- Future popularity leakage remains a practical risk. Under a leave-last-out split, BPR, NeuMF, SASRec and LightGCN on MovieLens-25M, Yelp, Amazon-music and Amazon-electronic all recommended items not yet available at the test instance's timestamp. Accuracy changes ran as high as 89.5%.
- Predicted value should be checked against observed value by item age, horizon, and cohort. On Criteo Predictive Search logs from 3 August to 16 October 2020, 64.1% of conversions arrived on day 1 and 13.4% on days 13-31. A recent cohort scored today is being judged on labels that are still arriving.