Skip to content
← Models
ClosedUC San Diego (Jiacheng Li, Yujie Wang, Julian McAuley)/10 trustVerified

TiSASRec

SASRec with a sense of time — models the actual gaps between actions, not just their order.

Visit official page →

About

TiSASRec starts from a simple observation about SASRec: treating a user's history as an evenly spaced sequence throws away real information. Someone who buys coffee every morning is a different pattern from someone who buys coffee once a year, even if the order of items looks identical. Published at WSDM 2020 by Jiacheng Li, Yujie Wang, and Julian McAuley, it extends SASRec's self-attention with time-interval-aware positional encodings — the model sees both the absolute position of each item and the actual elapsed time between consecutive interactions.

The paper's experiments showed the time-aware variants beating plain positional encodings and outperforming state-of-the-art sequential models on both sparse and dense datasets. It is a surgical improvement rather than a new paradigm, which is exactly why practitioners like it: drop it in wherever you were using SASRec and get better handling of irregular session gaps. The authors released TensorFlow code and the community ported it to PyTorch.

It remains ID-based, so new items with no history are still a problem — but for logged-in users with bursty, irregular behavior, the time signal is one of the cheapest wins in sequential recsys.

Specs

Context window

Not applicable — timestamped interaction sequences

Pricing

Free / open research code

Free quota

Fully open — no API

API access

No official API — train it yourself from author code (github.com/JiachengLi1995/TiSASRec, TensorFlow) or the PyTorch port (pmixer/TiSASRec.pytorch)

Weights

Closed — API only

Released

Not disclosed

Benchmarks

  • Paper-reported (WSDM 2020, pp. 322–330): TiSASRec outperformed various state-of-the-art sequential models on both sparse and dense datasets across different evaluation metrics; ablations showed time-interval encodings beating absolute-only positional encodings
  • No independent benchmark body re-scores it; reproduced in community ports

Provider-reported unless a source says otherwise. Benchmarks are marketing-adjacent by nature — treat them as directional.

Use cases

sequential-recommendationsession-based-recommendationtime-aware-personalizationecommerce-recommendationrecsys-research

Trust score — 8/10

/10 trustVerified

Scored 8/10 (TIER verified, metrics-v1). Evidence: peer-reviewed WSDM 2020 paper (cseweb.ucsd.edu/~jmcauley/pdfs/wsdm20b.pdf) with author-released TensorFlow code (github.com/JiachengLi1995/TiSASRec) and a working PyTorch port; the time-interval idea is widely cited and straightforwardly reproduced. Strengths: clean incremental improvement on SASRec, open code, addresses a real and common modeling gap. Docked for: (1) author-reported numbers only; (2) narrower adoption than SASRec itself. License: open research code.

How the trust score is built

Full methodology →
Adoption · stars/downloads, log-scaled vs peers
7.0/10
Maintenance · recency, releases, issue load
6.0/10
Openness · license + docs
9.0/10
Manual review · sanity read + red-flag check
8.0/10
  • · WSDM 2020 paper (Li, Wang, McAuley; cseweb.ucsd.edu/~jmcauley/pdfs/wsdm20b.pdf) adding time-interval-aware positional encodings to SASRec self-attention.
  • · Author code at github.com/JiachengLi1995/TiSASRec plus working PyTorch port; time-interval idea widely cited and reproduced.
  • · Author-reported numbers only; narrower adoption than SASRec itself.

Sources