Abstract
Modern sequential recommendation systems face a critical trade-off between the reasoning power of cloud-based Large Language Models (LLMs) and the privacy and speed of on-device Small Language Models (SLMs). This paper presents CDA4Rec, a novel dual-agent framework that bridges this gap through collaborative intelligence. By utilizing a cloud-side LLM for strategic planning and a device-side SLM for privacy-preserving abstraction and final ranking, CDA4Rec achieves state-of-the-art accuracy with sub-100ms latency. Experimental results across four diverse datasets demonstrate that this collaborative approach consistently outperforms single-location inference baselines.
Introduction: The Location Dilemma
Sequential recommendation systems predict a user's next action based on their historical interactions. Currently, these systems are typically deployed in one of two ways, each with significant drawbacks:
- Cloud-based agents leverage massive LLMs for deep semantic reasoning but suffer from privacy concerns (uploading raw user data), high network latency, and a lack of real-time local signals.
- On-device agents use SLMs to ensure privacy and speed but lack the global knowledge and computational capacity required for large-scale item retrieval and complex semantic understanding.
CDA4Rec addresses this "location dilemma" by effectively dividing recommendation tasks to harness the strengths of both environments.
Methodology: The CDA4Rec Framework
The CDA4Rec framework consists of two primary components: a cloud-side LLM (e.g., LLaMA-3.1-8B) and a device-side SLM (e.g., LLaMA-3.2-1B). The workflow is modular and adaptive, centered around privacy and efficiency.
Core Components
- User Abstract Generation: To protect privacy, the device-side SLM converts raw interaction logs into a "User Abstract"—a natural language summary of intents and patterns. This sanitized summary is sent to the cloud instead of raw data.
- Strategy Planning: The cloud LLM acts as a "project manager," analyzing the abstract to generate a personalized execution plan. It determines the weighting of semantic vs. behavioral signals and selects the optimal local model (e.g., SASRec or SURGE) for the device to execute.
- Modular Execution: Tasks are split based on complexity. The cloud handles Semantic User Modeling and Candidate Retrieval, while the device performs Structured User Modeling and Final Ranking. This parallel execution significantly reduces end-to-end latency.
Experimental Evaluation
The framework was evaluated on four diverse real-world datasets: Movie (ReDial), Music (Music4All), Sport (Amazon), and POI (Foursquare). These datasets cover a range of interaction types, from natural language queries to geographical constraints.
Key Results
CDA4Rec consistently outperformed both pure cloud-based and pure device-based baselines across all metrics, including Hit Ratio (HR@10) and NDCG.
Beyond accuracy, the system achieved an inference latency of under 100ms per sample across all domains, a significant improvement over traditional cloud-only LLM recommenders which often exceed 400ms. Furthermore, the system demonstrated robust "few-shot" performance, excelling in cold-start scenarios where traditional collaborative filtering often fails.
Discussion and Insights
CDA4Rec introduces several key innovations:
- Privacy through Abstraction: Using natural language abstracts allows the cloud to reason about user states without accessing specific interaction IDs.
- LLM as a Strategist: The cloud LLM's ability to evaluate query clarity allows it to dynamically adjust retrieval scope, optimizing resource usage.
- Hybrid Modeling: The framework adaptively selects modeling techniques (e.g., self-attention vs. graph-based) based on the complexity of the user's history.
Limitations and Future Work
While effective, CDA4Rec requires fine-tuning SLM adapters to align device-side abstracts with cloud expectations. Future research will explore more sophisticated privacy-preserving techniques and extend the framework to cross-domain recommendation tasks.
Conclusion
CDA4Rec demonstrates that collaborative intelligence between cloud and device agents can overcome the inherent limitations of single-location inference. By balancing reasoning power with privacy and speed, it sets a new standard for efficient, high-performance sequential recommendation.
Summary updated