TL;DR
This paper introduces CoCa, a novel framework that accelerates edge inference by enabling multiple clients to collaboratively cache and share model inference results. CoCa tackles the challenges of non-IID and long-tail data distributions by using a server-managed global cache and dynamic client-side cache allocation, achieving significant latency reductions with minimal accuracy loss.
What Problem Does This Paper Address?
Edge inference, the process of running AI models directly on devices near data sources, is crucial for real-time applications like autonomous driving and augmented reality. These applications have strict performance requirements (Service-Level Objectives or SLOs), often demanding low latency and high accuracy. Caching intermediate inference results is a common technique to speed up these tasks. However, existing caching methods struggle when data across different edge devices is not identically distributed (non-IID) or when certain classes of data appear much more frequently than others (long-tail distributions). These data imbalances lead to reduced cache hit rates and increased latency, hindering the effectiveness of edge inference.
Methods
CoCa proposes a multi-client collaborative caching mechanism with a client-server architecture.
- Client-Side: Each client pre-configures its model with multiple cache layers. During inference, it performs sequential lookups at these layers.
- Server-Side: The server maintains a two-dimensional global cache that aggregates information from all clients. This global cache helps mitigate the effects of non-IID data.
- Dynamic Cache Allocation: CoCa dynamically allocates personalized caches to each client. This allocation is based on evaluating class importance using frequency and recency of access. It specifically prioritizes frequently occurring "hot-spot" classes to address long-tail distributions.
- Adaptive Cache Layer Activation: CoCa dynamically activates cache layers to balance the overhead of cache lookups with the potential accuracy gains.
- Collaborative Updates: Clients periodically upload their inference status and semantic vectors to the server. The server uses this information to update the global cache, improving its representational power and thus inference accuracy.
Datasets
The paper uses the following datasets for evaluation:
- ImageNet-100: A subset of ImageNet with 100 classes, used to simulate temporal locality by batching samples of the same class.
- UCF101: An action recognition dataset with 101 action classes, used to simulate temporal locality and for experiments with non-IID and long-tail distributions.
- Environmental Sound Classification-50 (ESC-50): A benchmark for environmental sound classification, used for experiments with non-IID data.
The authors also construct datasets with varying non-IID levels (using Dirichlet distribution) and long-tail distributions (exponential decay in sample sizes) to simulate real-world scenarios.
Key Insights and Ideas
- Collaboration is Key for Non-IID Data: Simply caching locally isn't enough when data is diverse across clients. A global, shared cache that aggregates information is crucial for handling non-IID data effectively.
- Dynamic Allocation Outperforms Static: The effectiveness of caching hinges on intelligently selecting which classes and which layers to cache. CoCa's dynamic approach, adapting to class frequency and recency, is more effective than fixed strategies.
- Balancing Act: There's a trade-off between cache size, lookup time, and accuracy. Too many cache layers or too many hot-spot classes can increase latency. CoCa's dynamic layer activation and hot-spot class selection aim to find this optimal balance.
- Global Updates Improve Accuracy: Periodically updating the global cache with client data not only helps with non-IID data but also improves the accuracy of cache hits by making the cached representations more representative of current data.
Key Results
CoCa demonstrates significant improvements in edge inference performance:
- Latency Reduction: CoCa reduces inference latency by 23.01% to 45.19% across VGG, ResNet, and AST models compared to baselines like Edge-Only. It also achieves a 16.67% to 21.26% reduction on ResNet101 compared to other advanced baselines.
- Accuracy: The framework achieves these latency reductions with a slight loss of accuracy (less than 3%).
- Robustness to Non-IID Data: CoCa consistently reduces latency as non-IID levels increase, outperforming other baselines. For example, it shows a 9.08% latency decrease for ResNet101 at the highest non-IID level compared to the IID case.
- Effectiveness on Long-Tail Data: CoCa achieves lower inference latency in long-tail distributions compared to uniform distributions, reducing latency by 4.01% while maintaining competitive accuracy.
Limitations and Future Work
- Threshold Tuning: The paper acknowledges that selecting optimal thresholds for sample selection (Γ and Δ) and cache allocation requires careful tuning based on specific SLOs and empirical testing. The authors suggest thresholds that balance accuracy and absorption ratio.
- Combinatorial Optimization: The core cache allocation problem is combinatorial and computationally complex. While CoCa proposes a heuristic Adaptive Cache Allocation (ACA) algorithm to find suboptimal solutions, finding the absolute optimal allocation remains challenging.
- Future Work: The authors suggest investigating the specific effects of dynamic cache allocation (DCA) and global cache updates (GCU) as two main components of CoCa. They also mention exploring the impact of update cycles and the number of clients on system load and scalability.
Summary updated