EACO-RAG: Edge-Assisted and Collaborative RAG with Adaptive Knowledge Update

Jiaxing Li, Chi Xu, Lianchen Jia, Feng Wang, Cong Zhang, Jiangchuan LiuarXiv 2024 · DOI

Abstract

Retrieval-Augmented Generation (RAG) significantly enhances Large Language Models (LLMs) by providing access to external knowledge, yet its deployment on edge devices remains challenging due to high computational costs and the "frozen" nature of model knowledge. We present EACO-RAG, a distributed framework that optimizes RAG for the edge through a collaborative gating mechanism and adaptive knowledge updates. By networking local edge nodes and dynamically routing queries between local, neighbor, and cloud resources, EACO-RAG reduces operational costs by up to 84% while maintaining the accuracy of massive cloud-based models.

Introduction

Large Language Models (LLMs) are powerful but computationally intensive and limited by static training data. While RAG addresses the knowledge gap, existing centralized solutions are often too heavy for edge environments. Conversely, Small Language Models (SLMs) suitable for edge devices suffer from limited internal knowledge and hallucinations.

Overview of the EACO-RAG distributed environment and collaborative query handling across multiple edge nodes.

EACO-RAG bridges this gap by introducing a distributed, tiered architecture where knowledge is spread across multiple edge nodes. This allows the system to balance latency, cost, and accuracy by intelligently deciding where to retrieve information and where to generate responses, effectively turning edge nodes into a collaborative network.

Methodology

The EACO-RAG framework is built upon three core innovations designed to bring high-performance RAG to resource-constrained environments:

  1. Distributed Tiered Architecture: Knowledge is decentralized across edge nodes, each maintaining a dynamic local dataset tailored to regional or temporal interests. This avoids the latency of centralized databases.
  2. Adaptive Knowledge Updates: Local caches are kept fresh using a FIFO (First-In-First-Out) policy. The system periodically pulls semantically coherent "chunks" from a cloud-based GraphRAG based on local query trends, ensuring the edge nodes stay relevant to user interests.
  3. Hierarchical Collaborative Gating: The system employs a Safe Online Bayesian Optimization (SafeOBO) algorithm to route queries. It evaluates whether to use local, neighbor (edge-assisted), or cloud retrieval, and whether to employ a local SLM (e.g., Qwen2.5-3B) or a cloud LLM (e.g., Qwen2.5-72B).

This "Safe" optimization ensures that cost reduction does not come at the expense of Quality of Service (QoS) constraints, such as minimum accuracy or maximum allowable delay.

Evaluation and Results

The framework was evaluated using the Wiki QA (general domain) and Harry Potter QA (specialized domain) datasets to test its robustness across different knowledge requirements.

Performance and Cost Efficiency

EACO-RAG demonstrated significant efficiency gains over traditional cloud-only RAG approaches:

  • Cost Reduction: In cost-efficient modes, the system reduced total operational costs by 84.6% on Wiki QA while matching the accuracy of a 72B cloud-based GraphRAG. Even under strict 1-second latency constraints, it achieved a 65.3% cost reduction.
  • Accuracy Parity: On Wiki QA, EACO-RAG achieved 94.92% accuracy, slightly outperforming the standalone 72B cloud model (94.39%) through superior context selection enabled by the gating mechanism.
Comparison of accuracy between local-only and edge-assisted retrieval across different data chunk sizes.

As shown in the evaluation, the edge-assisted approach consistently outperforms local-only retrieval across various data chunk sizes. This validates the "Power of Neighbors" concept, where edge nodes share data to avoid expensive cloud calls.

Discussion and Conclusion

EACO-RAG treats intelligence as a scalable utility. By escalating only complex queries to the cloud and leveraging neighboring edge nodes for intermediate tasks, it avoids the silos of traditional edge computing. The integration of cloud-based GraphRAG as a "teacher" to distill data for edge nodes further enhances SLM performance, allowing small models to punch above their weight.

While the current prototype focuses on a limited set of retrieval/inference strategies, future work will expand the decision space and incorporate more dataset-specific features into the gating logic to support complex, multi-hop reasoning at the edge without constant cloud reliance.

Summary updated

BibTeX
@misc{li2024eaco,
  author = {Jiaxing Li and Chi Xu and Lianchen Jia and Feng Wang and Cong Zhang and Jiangchuan Liu},
  title = {{EACO-RAG: Edge-Assisted and Collaborative RAG with Adaptive Knowledge Update}},
  year = {2024},
  eprint = {2410.20299},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.20299},
}
Figure