RL-MPCA: A Reinforcement Learning Based Multi-Phase Computation Allocation Approach for Recommender Systems

Jiahong Zhou, Shunhui Mao, Guoliang Yang, Bo Tang, Qianlong Xie, Lebin Lin, Xingxing Wang, Dong Wang · DOI

Abstract

Recommender systems aim to recommend the most suitable items to users from a large number of candidates. Their computation cost grows as the number of user requests and the complexity of services (or models) increases. Under the limitation of computation resources (CRs), how to make a trade-off between computation cost and business revenue becomes an essential question. The existing studies focus on dynamically allocating CRs in queue truncation scenarios (i.e., allocating the size of candidates), and formulate the CR allocation problem as an optimization problem with constraints. Some of them focus on single-phase CR allocation, and others focus on multi-phase CR allocation but introduce some assumptions about queue truncation scenarios. However, these assumptions do not hold in other scenarios, such as retrieval channel selection and prediction model selection. Moreover, existing studies ignore the state transition process of requests between different phases, limiting the effectiveness of their approaches. This paper proposes a Reinforcement Learning (RL) based Multi-Phase Computation Allocation approach (RL-MPCA), which aims to maximize the total business revenue under the limitation of CRs. RL-MPCA formulates the CR allocation problem as a Weakly Coupled MDP problem and solves it with an RL-based approach. Specifically, RL-MPCA designs a novel deep Q-network to adapt to various CR allocation scenarios, and calibrates the Q-value by introducing multiple adaptive Lagrange multipliers (adaptive-$\lambda$) to avoid violating the global CR constraints. Finally, experiments on the offline simulation environment and online real-world recommender system validate the effectiveness of our approach.

1. Introduction

Industrial recommender systems (RS) are typically structured as multi-stage pipelines, transitioning from retrieval to coarse-ranking and finally fine-ranking. Each stage consumes significant computation resources (CRs), such as CPU and GPU cycles. During peak traffic, these systems often encounter hardware limitations, necessitating a trade-off between computation cost and business revenue. Traditional static strategies, such as fixed queue lengths or simplified models, fail to optimize for individual request value. This paper introduces RL-MPCA, a reinforcement learning framework for dynamic CR allocation across multiple phases.

2. Problem Formulation and Elastic Phases

The core challenge in modern RS is managing "elasticity" across the recommendation chain. This includes selecting retrieval channels, determining queue lengths for ranking, and choosing between models of varying complexity. Unlike prior work that treats these stages in isolation, RL-MPCA recognizes that decisions in early phases significantly impact the state of subsequent phases. Modeling this as a sequence of transitions allows for global optimization of the entire pipeline.

The elastic phases of the recommendation pipeline, including channel selection, queue truncation, and model selection.

3. The RL-MPCA Framework

RL-MPCA formulates the CR allocation problem as a Weakly Coupled Markov Decision Process (MDP). In this formulation, each user request is treated as an independent MDP, coupled only by a shared global resource budget. This allows the system to optimize for long-term revenue across the entire recommendation chain.

To address the diverse action spaces across different phases—such as binary channel selection versus continuous queue lengths—the authors designed a modular Q-network. This architecture includes specific branches for Elastic Channel, Elastic Queue, and Elastic Model nets, coordinated by a selection unit.

Architecture of the RL-MPCA network, featuring modular nets for each phase and a constraint layer for resource management.

A critical component is the Constraint Layer, which utilizes adaptive Lagrange multipliers ($\lambda$). By maximizing $R - \lambda \cdot Cost$, where $\lambda$ represents the dynamic "price" of computation, the system can adjust its resource usage in real-time. If the system exceeds its budget, $\lambda$ increases, steering the agent toward more efficient actions. This mechanism ensures strict adherence to hardware constraints while maximizing business objectives.

4. Experimental Evaluation

The approach was validated using a massive real-world dataset from Meituan's advertising system, comprising over 568 million requests from 101 million users collected during July and August 2022.

Offline Results: The study compared various RL architectures. Interestingly, standard architectures like DDQN and REM outperformed Batch Constrained Q-learning (BCQ) when combined with adaptive $\lambda$. BCQ's tendency to imitate "safe" behavioral data hindered its ability to learn optimal cost-penalty calibrations, whereas the other models successfully learned to balance rewards and costs.

Online A/B Testing: In a two-week live deployment at Meituan, RL-MPCA demonstrated significant performance gains over both static baselines and the previous state-of-the-art (DCAF):

  • Revenue Growth: +3.68% increase in Gross Merchandise Volume per mille (GPM).
  • User Engagement: +1.09% increase in Click-Through Rate (CTR) and +2.86% in Conversion Rate (CVR).
  • Efficiency: A 1.5% reduction in total computation cost compared to the baseline, proving that the system allocates its budget more effectively to high-value requests.

5. Conclusion

RL-MPCA provides a robust framework for balancing revenue and resource constraints in high-traffic recommender systems. By modeling the multi-phase pipeline as a weakly coupled MDP and employing an adaptive constraint mechanism, it achieves superior efficiency and business impact. Future work will explore the integration of latency constraints and improved stochastic modeling of system loads to further enhance stability in volatile real-world environments.

Summary updated

BibTeX
@inproceedings{zhou2023rl,
  author = {Jiahong Zhou and Shunhui Mao and Guoliang Yang and Bo Tang and Qianlong Xie and Lebin Lin and Xingxing Wang and Dong Wang},
  title = {{RL-MPCA: A Reinforcement Learning Based Multi-Phase Computation Allocation Approach for Recommender Systems}},
  booktitle = {The Web Conference},
  year = {2023},
  doi = {10.1145/3543507.3583313},
}
Figure