All models

ComiRec

A sequential recommender that gives each shopper several interest vectors, then balances accuracy against diversity.

Tabular and recommender · 289 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (15 KB)

Open in a new tab

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
20.1M
Operations
289
Framework
PyTorch
Recurrent
No
Published
KDD 2020
Cited by
423 (as of 17 October 2026)
Authors
Yukuo Cen, Jianwei Zhang, Xu Zou and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m384
Graph hash
a48b4239bfac4c67beb22ad8458983805264da2a4610d586ccd26223fc03fdd4
Skeleton hash
2907db2ef8a55863919cd933c3d0df75624dfcb8e555b37ee90b537244a6e11f
Architecture hash
6f8906126209331b68fbf88cd3cf1f91d10aa149be62f73636185e190952ff90
Diagram SHA-256
b1e6c36cb3012f4cd295e2e30bc4673d326fe3ea12b429ce292b16ce3a830108
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

ComiRec, the Controllable Multi-Interest Framework, is a sequential recommender that represents a shopper with several interest vectors instead of one. The motivation is simple, since a single user embedding cannot reflect the several things a person is interested in over a period. The model lives in the matching stage of an industrial recommender, where the item pool runs to millions or even billions of items and the job is to pull out candidates before a ranking model sorts them.

The input is a user's behaviour sequence, a time-ordered list of item IDs that pass through an embedding layer before a multi-interest extraction module turns them into several interest embeddings. The paper explores two extractors, a dynamic routing method borrowed from capsule networks and a self-attentive method. The dynamic routing version is named ComiRec-DR and the self-attentive version ComiRec-SA, which is the extractor the traced member uses. To represent more than one interest, the self-attentive version runs attention multiple times, producing a matrix of interest vectors. Training picks, for each target item, the interest vector closest to it with an argmax operator. Because a full softmax over the item pool is expensive, the model is trained with sampled softmax. At serving time each interest vector independently retrieves its own top-N items by nearest neighbour search, using a library such as Faiss. An aggregation module then merges the candidates with a controllable factor λ, from λ = 0 for pure accuracy to λ = ∞ for the most diverse set.

The paper's configuration, which the traced member reproduces, sets the embedding dimension to 64 and the number of sampled-softmax samples to 10. It uses 4 interest embeddings per user. On the Amazon dataset the Books category is used and each training sample is truncated at length 20. The official code is TensorFlow 1.x, not PyTorch. Its readme also warns that the original NDCG computation did not match the paper's definition and recommends relying on the recall and hit rate numbers. The framework has been deployed on the offline Alibaba distributed cloud platform.

Key idea. Extracting several interest embeddings per user, by capsule dynamic routing or self-attention, so each can retrieve candidates independently, then aggregating them with a controllable factor that balances accuracy and diversity.

  • comirec
  • controllable multi-interest framework
  • comirec-sa
  • comirec-dr
  • multi-interest
  • sequential recommendation
  • candidate retrieval
  • matching stage
  • user interest embeddings
  • capsule dynamic routing
  • recommendation diversity
  • thudm
  • amazon books
  • taobao

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{cen2020controllablemultiinterestframeworkrecommendation,
      title={Controllable Multi-Interest Framework for Recommendation}, 
      author={Yukuo Cen and Jianwei Zhang and Xu Zou and Chang Zhou and Hongxia Yang and Jie Tang},
      year={2020},
      eprint={2005.09347},
      archivePrefix={arXiv},
      primaryClass={cs.IR},
      url={https://arxiv.org/abs/2005.09347}, 
}