The Efficiency vs. Accuracy Trade-off: Optimizing RAG-Enhanced LLM Recommender Systems Using Multi-Head Early Exit

Huixue Zhou, Hengrui Gu, Zaifu Zhan, Xi Liu, Kaixiong Zhou, Yongkang Xiao, Mingfu Liang, Srinivas Prasad Govindan, Piyush Chawla, Jiyan Yang, Xiangfei Meng, Huayu Li, Buyun Zhang, Liang Luo, Wen-Yen Chen, Yiping Han, Bo Long, Rui Zhang, Tianlong Chen

TL;DR

This paper introduces OptiRAG-Rec, a novel framework that tackles the efficiency-accuracy trade-off in LLM-based recommender systems. By combining a GCN-based retriever with a multi-head early exit strategy, it significantly speeds up inference while maintaining or improving recommendation quality, making LLMs more practical for real-time applications.

What Problem Does This Paper Address?

Deploying Large Language Models (LLMs) for tasks like Click-Through Rate (CTR) prediction in recommender systems presents a significant challenge: balancing computational efficiency with predictive accuracy. LLMs, while powerful, are computationally expensive, especially when augmented with Retrieval-Augmented Generation (RAG) for richer context. RAG introduces two main bottlenecks: retrieval efficiency (the time taken to fetch relevant information) and inference overhead (the computational cost of processing long inputs). Existing methods to improve efficiency, like model compression, often sacrifice accuracy. This paper aims to address this trade-off by developing a system that is both fast and accurate.

Methods

The proposed framework, OptiRAG-Rec, integrates two key innovations:

  • GCN-Retriever: This component addresses the retrieval efficiency bottleneck. Instead of relying on computationally expensive LLM embedders for retrieval, it uses Graph Convolutional Networks (GCNs) to model user-item interaction graphs. GCNs efficiently capture multi-order interaction information, generating precise user embeddings that lead to faster and more informative retrieval.
  • Multi-Head Early Exit Strategy: This tackles the inference overhead. It's a dynamic mechanism that allows the LLM to terminate inference at intermediate layers if its prediction confidence reaches a certain threshold. The "multi-head" aspect means multiple such "exit points" are strategically placed within the LLM, each with its own specialized head. This allows the model to adaptively allocate computation, exiting early for simpler predictions and continuing for more complex ones, thereby saving computation without compromising accuracy.

Datasets

The authors evaluated their framework on three real-world datasets:

  • BookCrossing: Contains user ratings and book descriptions.
  • Amazon Beauty, Video Games, Movies and TV: These are subsets of the Amazon dataset, focusing on user purchase actions and rating information.
  • Yelp: Includes user-generated ratings, reviews, and check-ins for businesses.

The datasets were preprocessed to ensure sufficient user history and then split into training, validation, and testing sets.

Key Insights and Ideas

  • Graph-based retrieval is key: Using GCNs for retrieval significantly outperforms traditional LLM-based or direct similarity methods by capturing complex, indirect user-item relationships and offering much faster retrieval.
  • Early exit isn't just about speed, it's about adaptive computation: The multi-head early exit strategy allows LLMs to dynamically adjust their computational effort based on prediction confidence, leading to significant speedups without accuracy loss.
  • Combining retrieval and early exit yields synergistic benefits: The combined approach not only improves efficiency but also enhances accuracy, suggesting that better retrieved context leads to more confident and earlier predictions.
  • Static compression methods have limitations: Techniques like pruning (SparseGPT) and model replacement (TinyLlama) offer speedups but often come with substantial accuracy degradation, highlighting the advantage of dynamic, adaptive methods.

Key Results

  • Accuracy: OptiRAG-Rec achieved significant AUC improvements over traditional recommendation models (e.g., 16.14 for BookCrossing) and outperformed other LLM-based methods like TALLRec. On the Beauty dataset, it achieved an AUC of 96.37.
  • Efficiency: The framework demonstrated substantial speedups. For instance, on the Video Games dataset, the combined approach showed a 28.9% improvement in RPS (Requests Per Second) compared to retrieval-only. Throughput comparisons showed OptiRAG-Rec achieving significantly higher RPS than baselines like SparseGPT and TinyLlama while maintaining superior accuracy.
  • Component Contributions: Ablation studies showed that combining both GCN-retriever and multi-head early exit provided the best performance, outperforming either component used in isolation.

Limitations and Future Work

  • Textual Metadata Dependency: The framework relies on substantial textual metadata, which might limit its applicability in sparse-text domains.
  • Cold-Start Scenarios: The GCN-retriever struggles with cold-start users or items lacking sufficient interaction history.
  • Initial Training Cost: Despite efficiency improvements during inference, the initial training of the framework requires significant computational resources.
  • Domain Transferability: The framework's effectiveness beyond e-commerce and review domains needs further validation.
  • Real-time Graph Updates: The current framework lacks mechanisms for real-time updates to the interaction graph, which is crucial for continuously evolving user interactions.

Summary updated

BibTeX
@inproceedings{zhou2025efficiency,
  author = {Huixue Zhou and Hengrui Gu and Zaifu Zhan and Xi Liu and Kaixiong Zhou and Yongkang Xiao and Mingfu Liang and Srinivas Prasad Govindan and Piyush Chawla and Jiyan Yang and Xiangfei Meng and Huayu Li and Buyun Zhang and Liang Luo and Wen-Yen Chen and Yiping Han and Bo Long and Rui Zhang and Tianlong Chen},
  title = {{The Efficiency vs. Accuracy Trade-off: Optimizing RAG-Enhanced LLM Recommender Systems Using Multi-Head Early Exit}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure