English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer (CIKM 2019)

Forum topic · 小凯 · 2026-07-05

Summary

BERT4Rec, published at CIKM 2019, applies bidirectional Transformer encoder representations from BERT to sequential recommendation. Unlike earlier sequential recommenders (e.g., GRU4Rec, SASRec) that model user history left-to-right, BERT4Rec encodes the full interaction sequence bidirectionally, capturing contextual information from both preceding and following items. It is trained with the Cloze objective: randomly masked items in a user's history are predicted using surrounding items, learning a bidirectional representation of user preferences. At inference, the model scores candidate items by combining user history with the target item's position embedding, making it suitable for ranking and retrieval in large-scale recommendation systems. The paper's ACM listing is at https://dl.acm.org/doi/abs/10.1145/3357384.3357895. This forum post presents the paper's metadata, motivation, method, and evaluation framework, positioning it within a broader reading list on sequential and generative recommendation alongside works such as Mamba4Rec, P5, and EAGER. Note that several sections of the post are template placeholders; readers should consult the original PDF for exact benchmark numbers and ablation results.

BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer (CIKM 2019)

Overview

This forum post indexes the CIKM 2019 paper BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer.

| Field | Content | |-------|---------| | Title | BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer | | Venue | CIKM 2019 | | Source | https://dl.acm.org/doi/abs/10.1145/3357384.3357895 | | Category | Sequential Recommendation |

One-line Summary

The work applies bidirectional Transformer (BERT-style) encoding to sequential recommendation, replacing unidirectional sequence modeling with a bidirectional approach trained via a masked-item (Cloze) objective.

Background and Motivation

Sequential recommendation systems must model user intent from interaction histories. Traditional pipeline methods often split retrieval, ranking, and generation, which limits how well a system can capture user context. Earlier sequential recommenders such as GRU4Rec and SASRec typically model user behavior sequences left-to-right (forward only), which constrains the representation: each position only sees preceding items.

BERT4Rec addresses this by encoding the entire user history bidirectionally, allowing each item's representation to incorporate context from both the past and the future within the sequence.

Core Contributions

  • A bidirectional Transformer encoder applied to user behavior sequences, instead of unidirectional (left-to-right) modeling.
  • A Cloze-style training objective: randomly mask items in the history and train the model to predict them from surrounding items, learning rich bidirectional item representations.
  • A deep sequence-aware recommendation model designed to serve as the backbone for ranking/retrieval in large-scale recommendation systems.
  • Method Outline

    The general pipeline follows: problem formulation → model design → training procedure → inference pipeline.

    1. Input and representation: encode the user's item history sequence (item IDs plus positional embeddings); 2. Core module: a multi-layer bidirectional Transformer encoder over the sequence; 3. Learning strategy: masked item prediction (Cloze objective) — predict a randomly hidden item from its bidirectional context; 4. Inference: for ranking a candidate item, feed the user history combined with the candidate at the target position, and use the model's output to score relevance.

    Evaluation

    The evaluation section of the original post is templated. Typical setups for this line of work include:

  • Datasets: public recommendation benchmarks (e.g., MovieLens, Beauty, Steam, ML-1M in the original paper);
  • Metrics: Recall@K, NDCG@K;
  • Baselines: GRU4Rec, SASRec, and other sequential recommenders;
  • Ablations: effect of masking ratio, number of Transformer layers/heads, and training objective.
  • For exact quantitative results, refer to the original PDF; this post summarizes experimental design based on the abstract and public metadata.

    Key Takeaways

    1. Architecture: bidirectional encoding of user histories improves sequence representation quality over purely left-to-right models; 2. Training: the Cloze (masked-item) objective lets the model learn from every item in the sequence rather than only predicting the next one; 3. Deployment: as a ranking backbone, it fits the cascade of retrieval → ranking → re-ranking used in production recommender systems; 4. Limitations noted in the field: bidirectional encoding assumes access to the full sequence, so strict real-time next-item prediction requires care; latency and index-update costs are engineering constraints.

    Related Entries

  • EAGER: Two-Stream Generative Recommender with Behavior-Semantic Collaboration (KDD 2024)
  • Efficient On-Device Session-Based Recommendation (ACM TORS)
  • How to Index Item IDs for Recommendation Foundation Models (P5, SIGIR 2023)
  • LLMCDSR: Enhancing Cross-Domain Sequential Recommendation with Large Language Models
  • Mamba4Rec: Towards Efficient Sequential Recommendation with Selective State Space Models
  • Multi-Behavior Sequential Transformer Recommender (SIGIR 2022)

Glossary

| Term | Meaning | |------|---------| | Cloze objective | Masked-token (here, masked-item) prediction task used to train BERT-style encoders | | Sequential recommendation | Predicting the next item(s) a user will interact with based on chronological behavior history | | SASRec | Self-Attentive Sequential Recommendation, a unidirectional Transformer-based predecessor | | NDCG | Normalized Discounted Cumulative Gain, a ranking quality metric |

Reader Guidance

1. Researchers: reproduce the core comparisons (BERT4Rec vs. SASRec/GRU4Rec) and check for statistical significance and compute costs; 2. Engineers: evaluate integration cost as a pluggable sequence encoder in an existing ranking stack; 3. Product managers: focus on user-perceivable benefits (relevance, session consistency) rather than offline NDCG alone.

Tags

#bert4rec#sequential-recommendation#transformer#recommender-systems#cikm-2019#masked-item-prediction#deep-learning

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178208982