ActionPiece
Small T5-style recommender that generates the next user action as context-aware ActionPiece tokens.
Tabular and recommender · 589 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
- 9.6M
- Operations
- 589
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICML 2025
- Cited by
- 1 (as of 28 October 2026)
- Authors
- Yupeng Hou, Jianmo Ni, Zhankui He and others
- License
- Apache-2.0
- 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
- m14624
- Graph hash
- e469dd04d77457e55becafab8c0432fd97bca1004ba911cdc727228e24363ede
- Skeleton hash
- 56745b593504c2ee7e1cb67980703c87fbb1cf86d94c47fa82c7b3e12a5940c3
- Architecture hash
- 9a8e27eb7eac0b81d5b1787a3432ecb6550d6b01ab2c9a36074a7d69f9101782
- Diagram SHA-256
- 8891deaaa6ebb65d0361dbf9665fe6b95b26af9a708af079a4675754377fec84
- 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
ActionPiece is a way of tokenizing sequences of user actions for generative recommendation, where actions are turned into discrete tokens and the next ones are generated autoregressively. The paper's starting observation is that existing models tokenize each action independently, so identical actions get the same fixed tokens in every sequence whatever the context.
In ActionPiece each action is represented as a set of item features. Similar to BPE for text, the vocabulary is built bottom-up, by merging feature patterns that co-occur often within one set or across adjacent sets into new tokens. As a result the same action can be tokenized into different tokens depending on the surrounding context. Because a feature set has no order, the paper adds set permutation regularization, which produces multiple segmentations of a sequence with the same semantics. Those segmentations act as augmentations during training and as an ensemble at inference.
The network that reads and generates the tokens is an encoder-decoder Transformer similar to T5, with four layers in both the encoder and the decoder. This model follows the paper's settings for the Sports and Beauty benchmarks, a token embedding dimension of 128 and a feed-forward dimension of 1024. Across three datasets the paper reports that ActionPiece surpasses the best baseline in NDCG at 10 by 6.00% to 12.82%.
Key idea. ActionPiece tokenizes action sequences with context, merging co-occurring item features within and across adjacent actions into tokens, so the same action can map to different tokens.
- ActionPiece
- generative recommendation
- action sequence tokenization
- contextual action tokenization
- context-aware tokenizer
- sequential recommendation
- set permutation regularization
- recommender tokenizer
- semantic IDs
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{hou2025actionpiececontextuallytokenizingaction,
title={ActionPiece: Contextually Tokenizing Action Sequences for Generative Recommendation},
author={Yupeng Hou and Jianmo Ni and Zhankui He and Noveen Sachdeva and Wang-Cheng Kang and Ed H. Chi and Julian McAuley and Derek Zhiyuan Cheng},
year={2025},
eprint={2502.13581},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2502.13581},
}