Abstract
User modeling in large e-commerce platforms aims to optimize user experiences by incorporating various customer activities. Traditional models targeting a single task often focus on specific business metrics, neglecting the comprehensive user behavior, and thus limiting their effectiveness. To develop more generalized user representations, some existing work adopts Multi-task Learning (MTL) approaches. But they all face the challenges of optimization imbalance and inefficiency in adapting to new tasks. Continual Learning (CL), which allows models to learn new tasks incrementally and independently, has emerged as a solution to MTL's limitations. However, CL faces the challenge of catastrophic forgetting, where previously learned knowledge is lost when the model is learning the new task. Inspired by the success of prompt tuning in Pretrained Language Models (PLMs), we propose PCL, a Prompt-based Continual Learning framework for user modeling, which utilizes position-wise prompts as external memory for each task, preserving knowledge and mitigating catastrophic forgetting. Additionally, we design contextual prompts to capture and leverage inter-task relationships during prompt tuning. We conduct extensive experiments on real-world datasets to demonstrate PCL's effectiveness.
Introduction
In the landscape of modern e-commerce, user modeling serves as the foundational engine for personalized experiences. To capture the complexity of user behavior, developers typically rely on two paradigms: Single-Task Learning (STL) and Multi-Task Learning (MTL). While STL is straightforward, it often fails to capture the holistic context of user activity. Conversely, MTL models can learn from diverse signals simultaneously but are notoriously difficult to maintain. Adding a new business metric to an MTL system often necessitates retraining the entire architecture on all historical data to avoid optimization imbalance—a process that is both computationally expensive and operationally slow.
Continual Learning (CL) offers a more flexible alternative, allowing models to learn tasks sequentially. However, CL is plagued by "catastrophic forgetting," where the acquisition of new knowledge (e.g., predicting a user's age) overwrites the parameters essential for previous tasks (e.g., predicting the next purchase). To address these challenges, researchers from Amazon and the University of Illinois have introduced PCL (Prompt-based Continual Learning), a framework that leverages prompt-tuning techniques to enable efficient, sequential learning without the loss of prior knowledge.
The PCL Framework
The PCL framework is designed to keep the core intelligence of a recommendation model intact while allowing it to adapt to new objectives through lightweight, task-specific additions. The architecture consists of four primary components:
1. The Frozen Backbone
At the heart of PCL is a frozen backbone model, specifically SASRec (a self-attentive sequential model). The backbone is pretrained using a self-supervised "next-item prediction" task on a large corpus of user history. Once pretrained, its parameters are frozen. This ensures that the foundational understanding of sequential user behavior remains stable and is never degraded by subsequent task-specific training.
2. Position-wise Prompts
To adapt the frozen backbone to specific tasks, PCL introduces position-wise prompts. These are small sets of learnable vectors added to the embeddings of the most recent items in a user’s history. These prompts act as a form of "external memory," allowing the model to interpret the same historical data differently depending on the current task's requirements.
3. Contextual Prompts and Task Semantics
One of the most innovative features of PCL is the use of contextual prompts to capture inter-task relationships. By using a frozen sentence transformer to encode textual descriptions of each task (e.g., "predict the category of the next clicked item"), the model can leverage semantic similarities between tasks. A multi-head attention layer processes these descriptions to generate prompts that guide the tuning process, making it easier for the model to learn a new task if it shares characteristics with a previously learned one.
4. Task-Specific Adapters
Finally, simple linear layers or Multi-Layer Perceptrons (MLPs) are employed as adapters. These map the model's internal representations to the specific output format required by the task, such as a classification label for user demographics or a probability score for a specific action.
Experimental Evaluation
The effectiveness of PCL was evaluated on two large-scale real-world datasets:
- Tenrec: A dataset from the Kandian platform featuring news and video interactions. Tasks included link prediction (e.g., predicting a "thumb-up") and attribute classification (e.g., user age or item category).
- MovieLens: A standard benchmark for movie recommendations. Tasks involved predicting high-rated movies (4-star vs. 5-star) and movie genre classification.
Key Results
- Performance Superiority: PCL achieved state-of-the-art results in 6 out of 8 evaluated tasks compared to single-objective baselines.
- Outperforming MTL: PCL frequently outperformed traditional MTL models. This is significant because MTL models have the advantage of seeing all task labels simultaneously. PCL’s success suggests that its sequential approach avoids the "optimization imbalance" common in MTL, where a dominant task can skew the model's gradients.
- Stability and Robustness: The framework proved resilient to the order of task introduction. Across various task permutations, the average performance degradation was only 1.2%, indicating that the frozen backbone and prompt-based memory effectively mitigate catastrophic forgetting.
- Cold-Start Efficiency: PCL demonstrated faster convergence and higher accuracy for "cold-start" items—items with limited data during the pretraining phase—thanks to the flexible adaptability of the prompt layers.
Conclusion and Future Work
PCL represents a significant step forward in making recommender systems more scalable and adaptable. By decoupling the foundational user representation from task-specific logic through prompts, the framework allows for the continuous addition of new business objectives without the need for full-model retraining.
Future research directions include reducing the dependency on the initial pretraining quality of the backbone and developing more sophisticated routing mechanisms to manage hundreds of task-specific prompts. Additionally, exploring how these prompts can facilitate cross-domain transfer between different e-commerce marketplaces remains a promising area for investigation.
Summary updated