recbole.TransRec
A sequential recommender where the previous item plus a user translation vector points at the next item.
Tabular and recommender · 9 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 169.9K
- Operations
- 9
- Framework
- PyTorch
- Recurrent
- No
- Published
- RecSys 2017
- Cited by
- 436 (as of 19 October 2026)
- Authors
- Ruining He, Wang-Cheng Kang, Julian McAuley
- Source
- recbole 1.2.1
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m8675
- Graph hash
- 3d1f3fa2b10450812cd76637355650d2c379263d92f0c301c1b65234fcc76b2f
- Skeleton hash
- b1ad9716052c59e18b889155535f30098c349cdde5bead5a02d79df92d8a4a17
- Architecture hash
- e8673714f61d3ab888eb66d0151ff1c868893f717bf300d2a445f742aa71b966
- Diagram SHA-256
- a8840ca67fc546cd0356dbbbac83598f4157ae5122d213581dfd43e3ae5f6723
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
TransRec, short for Translation-based Recommendation, is a sequential recommender that predicts a user's next item from the item they just consumed. Its key idea is to embed items into a 'transition space' where each user is modeled as a translation vector operating on item sequences. The coordinates of the previous item plus the user's translation vector approximately give the coordinates of the next item, and compatibility is measured by a distance function. This replaces the usual decomposition of third-order interactions into separate user-item and item-item components with a single unified component.
Because the model lives in a metric space, the triangle inequality helps it generalize: if users move from item A to both B and C, B and C end up close together. The authors describe the method as inspired by knowledge graph completion, where entities are points and relations are translation vectors. The paper reports TransRec outperforming its baselines in nearly all cases at 10 latent dimensions, with the largest hit rate at 50 gains, 32.5% and 24.7%, on Google and Clothing.
This PyTorch version from RecBole adds the user embedding, a global translation parameter and the last item's embedding, and scores candidates by an item bias minus the Euclidean distance. The paper also introduced a Google Local dataset with 11,453,845 reviews and ratings from 4,567,431 users on 3,116,785 local businesses.
Key idea. TransRec embeds items in a transition space and models each user as a translation vector, so the previous item plus the user vector lands near the next item.
- transrec
- translation-based recommendation
- sequential recommendation
- next-item recommendation
- metric embedding
- translation vector
- transition space
- item-to-item recommendation
- markov chain
- recbole
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{he2017translationbasedrecommendation,
title={Translation-based Recommendation},
author={Ruining He and Wang-Cheng Kang and Julian McAuley},
year={2017},
eprint={1707.02410},
archivePrefix={arXiv},
primaryClass={cs.IR},
doi={https://doi.org/10.1145/3109859.3109882},
url={https://arxiv.org/abs/1707.02410},
}