Papers
Topics
Authors
Recent
Search
2000 character limit reached

DeepChain: Multi-Agent RL Framework

Updated 11 May 2026
  • DeepChain is a multi-agent reinforcement learning framework for whole-chain recommendations that formulates user sessions as a single MDP with coordinated scenario-specific policies.
  • It employs specialized actor networks with attention mechanisms and a global critic to learn recommendation strategies across heterogeneous interaction phases.
  • The framework integrates a model-based component to mitigate data scarcity and imbalanced rewards, achieving superior performance on benchmark datasets.

DeepChain is a multi-agent reinforcement learning (RL) framework for whole-chain recommendations, designed to jointly optimize multiple recommendation strategies across consecutive user scenarios within a session. Departing from previous approaches that either apply a single policy to all scenarios or treat scenario-specific strategies independently, DeepChain models the entirety of a user’s session—spanning heterogeneous interaction phases such as entrance and item-detail pages—as a single Markov decision process (MDP) where specialized recommender agents (RAs) coordinate to maximize cumulative reward. It incorporates a model-based component to address sample complexity and imbalanced reward distributions common in large-scale recommender systems (Zhao et al., 2019).

1. Whole-Chain Recommendation as Multi-Agent RL

DeepChain formalizes the user session as an MDP (S,A,P,R,γ)(\mathcal{S}, \mathcal{A}, P, R, \gamma), where:

  • S\mathcal{S}: At step tt, the state sts_t encodes the chronologically ordered item interaction history st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)}) across all scenarios.
  • A\mathcal{A}: An action ata_t is a single item recommendation (at∈Aa_t \in \mathcal{A}).
  • RR: Upon ata_t, the user response yields reward S\mathcal{S}0, with typical values: skip = S\mathcal{S}1, click or purchase = S\mathcal{S}2, leave = S\mathcal{S}3.
  • S\mathcal{S}4: The transition kernel S\mathcal{S}5 captures both user feedback and scenario transitions (e.g., entrance page to item-detail page).
  • S\mathcal{S}6: Discount factor in S\mathcal{S}7.

There are S\mathcal{S}8 scenario-specific RAs, S\mathcal{S}9, each uniquely responsible for a scenario. For a session trajectory tt0 and joint policy tt1, the objective is to maximize expected return:

tt2

At each tt3, only the agent for the active scenario selects tt4, with all agents sharing user-history memory.

2. State, Action, and Reward Specification

For illustrative purposes, consider two scenarios: entrance page (tt5) and item-detail page (tt6).

  • State tt7: A sequence of tt8 item IDs, each with a pre-trained embedding tt9 (e.g., via word2vec trained on click sequences), yielding sts_t0.
  • Action sts_t1: Item recommendation, represented by its embedding sts_t2.
  • Immediate reward sts_t3 depends on user action:
    • Skip sts_t4
    • Click or purchase sts_t5
    • Leave sts_t6
  • Transition probabilities for each scenario sts_t7: Click/go-to-detail sts_t8, skip/stay sts_t9, leave st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)})0.

3. Joint Multi-Agent Policy Learning Objective

The goal is to learn scenario-specific policies st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)})1 so as to maximize the session's cumulative discounted return,

st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)})2

A global action-value function st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)})3 (the Critic) is used, and the designated actor at step st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)})4 applies st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)})5, with st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)})6.

4. DeepChain Architecture

Agents, Critic, and Model-Based Component

The architecture comprises the following:

  • Shared Memory: All agents operate on a common user-history state, st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)})7.
  • Actor Networks for each Scenario (st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)})8):

    • Preference Encoder: A GRU processes the sequence st=(i1,i2,...,iN(t))s_t = (i_1, i_2, ..., i_{N(t)})9, outputting hidden vectors A\mathcal{A}0. An attention mechanism computes per-item weights:

    A\mathcal{A}1

    yielding the user preference embedding A\mathcal{A}2. - Recommendation Decoder: For candidate item A\mathcal{A}3 with embedding A\mathcal{A}4, score is

    A\mathcal{A}5

    and the top-scoring item is recommended.

  • Global Critic A\mathcal{A}6: GRU+attention encoder (two heads, one per scenario) produces context representations concatenated with the action embedding, followed by MLP layers to estimate A\mathcal{A}7.
  • Model-Based Probability Network (A\mathcal{A}8): Learns to predict next-scenario transitions (A\mathcal{A}9, ata_t0, ata_t1 for each ata_t2) using two softmax heads given ata_t3, facilitating model-based target computation and reducing reliance on rare real user signals.

5. Training Methodology

DeepChain follows an off-policy actor–critic paradigm similar to DDPG, with four trainable neural nets: actors ata_t4, critic ata_t5, probability network ata_t6, and their soft-updated targets ata_t7. A replay buffer ata_t8 stores experience tuples.

The model-based multi-scenario Bellman backup is given by (for mini-batch update on scenario ata_t9):

  • If at∈Aa_t \in \mathcal{A}0:

at∈Aa_t \in \mathcal{A}1

  • If at∈Aa_t \in \mathcal{A}2:

at∈Aa_t \in \mathcal{A}3

Loss functions:

  • Critic: Mean squared error loss,

at∈Aa_t \in \mathcal{A}4

  • Actor: Deterministic policy gradient,

at∈Aa_t \in \mathcal{A}5

  • Probability Net: Cross-entropy loss on next-scenario labels.

Target networks are updated via soft updates with at∈Aa_t \in \mathcal{A}6 (e.g., at∈Aa_t \in \mathcal{A}7).

6. Addressing Data Scarcity and Imbalanced Rewards

To overcome the data demands and highly skewed reward distribution (dominance of skip/zero-reward events), DeepChain leverages:

  • Model-Based Rollouts: The probability network at∈Aa_t \in \mathcal{A}8 enables generation of imagined transitions, mitigating the scarcity of positive signals.
  • Multi-Scenario Bellman Backup: Model-based targets aggregate over possible user behaviors and scenario transitions, smoothing sparse rewards.
  • Replay Buffer and Target Networks: These mechanisms stabilize learning and further reduce the reliance on infrequent reward events during policy updates.

7. Empirical Evaluation and Comparative Analysis

Experiments were conducted on a JD.com dataset with 500K user sessions (19.7M interactions, train/validation/test split at 80/20). Key configuration details:

  • User-history length at∈Aa_t \in \mathcal{A}9
  • Embedding dimension RR0, GRU hidden units RR1, discount RR2, target soft update RR3
  • Reward assignments: skip = 0; click = +1; leave = –2

Offline evaluation utilized MAP and NDCG@40 as metrics, with DeepChain compared against WRR4D (Wide & Deep), DeepFM, GRU4Rec, DDPG (single-agent), and MA (model-free multi-agent) baselines. DeepChain achieved 4–19% higher scores than the strongest baselines (e.g., entrance page MAP: DeepChain RR5 vs. MA RR6 vs. DDPG RR7).

Ablation studies confirmed that using separate actors per scenario and the model-based component accelerated learning and improved convergence relative to single-agent or model-free variants. Performance sensitivity analysis showed session length/history length (RR8 up to 50) notably improved entrance page recommendations, reflecting the impact of historical diversity on scenario-specific policy efficacy.

For further architectural and algorithmic details, see (Zhao et al., 2019).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to DeepChain.