DuoRec
A Transformer sequential recommender trained with a contrastive regularization.
Tabular and recommender · 93 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
- 322K
- Operations
- 93
- Framework
- PyTorch
- Recurrent
- No
- Published
- ACM International Conference on Web Search and Data Mining (WSDM) (arXiv 2021)
- Cited by
- 483 (as of 23 October 2026)
- Authors
- Ruihong Qiu, Zi Huang, Hongzhi Yin, Zijian Wang
- Source
- GitHub: RuihongQiu/DuoRec
- 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
- m798
- Graph hash
- 7fff801e3cbbadcd596409b76cbb77bbdfc50c6f6ad033ff0c40c09a585885b3
- Skeleton hash
- 14bdb95ef6a7e1a6fd009189f0a30a0ebde62ecd4dd5b69e6f5cdf4c8350ac0b
- Architecture hash
- 8f5efd2a52b62b0a1c4c4066072788e188be7c6ed6a18e5c8f9df9a555305ae0
- Diagram SHA-256
- 6f13508b51bced647e7258431aecf4ac38f8c0ecb57502840fc319771fd66d1d
- 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
DuoRec is a sequential recommendation model, a kind of model that aggregates a user's historical interactions to profile what the user prefers. The paper starts from a problem it finds in recommenders built on Transformer and BERT: the distribution of the item embeddings tends to degenerate into an anisotropic shape, which may leave many embeddings with high semantic similarity.
The encoder is a Transformer, as in SASRec. What DuoRec adds is a contrastive regularization that reshapes the distribution of sequence representations. Because recommendation is done by a dot product between sequence representations and item embeddings in the same space, the regularization is implicitly applied to the item embedding distribution as well.
The positive pairs for the contrastive term are built without editing the input. Passing a sequence through the model twice with different Dropout masks gives two vectors that are semantically similar but have different features. Sequences that have the same target item are also chosen as hard positive samples. The paper reports experiments on five datasets.
Key idea. DuoRec adds a contrastive regularization to a Transformer sequential recommender, with Dropout-based model-level augmentation and same-target-item positive samples, to improve the distribution of item embeddings.
- duorec
- sequential recommendation
- contrastive learning
- representation degeneration
- supervised contrastive learning
- contrastive regularization
- dropout augmentation
- item embeddings
- sequential recommender
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{qiu2021contrastivelearningrepresentationdegeneration,
title={Contrastive Learning for Representation Degeneration Problem in Sequential Recommendation},
author={Ruihong Qiu and Zi Huang and Hongzhi Yin and Zijian Wang},
year={2021},
eprint={2110.05730},
archivePrefix={arXiv},
primaryClass={cs.IR},
doi={https://doi.org/10.1145/3488560.3498433},
url={https://arxiv.org/abs/2110.05730},
}