CoCoI: Distributed Coded Inference System for Straggler Mitigation

Xing Liu, Chao Huang, Ming Tang · DOI

Introduction

As Artificial Intelligence (AI) increasingly migrates from centralized clouds to the network edge, the demand for real-time inference on resource-constrained devices—such as IoT sensors and smartphones—has surged. However, complex Convolutional Neural Networks (CNNs) like VGG16 or ResNet18 often exceed the computational capacity of a single edge device. While distributing the workload across a cluster of devices is a natural solution, it introduces the "straggler" problem: the total system latency is governed by the slowest participant. A single device experiencing a network spike or background process can bottleneck the entire inference pipeline.

CoCoI (Coded Cooperative Inference) addresses this challenge by applying Maximum Distance Separable (MDS) codes to distributed CNN inference. By introducing task redundancy, CoCoI ensures that the system can reconstruct the final result as soon as a subset of workers completes their tasks, effectively mitigating the impact of slow or failing nodes.

System Methodology

The CoCoI framework treats CNN inference as a distributed coded computation problem, structured into four primary phases:

1. Task Classification

To minimize communication overhead, CoCoI distinguishes between different layer types. "Type-1" tasks consist of computationally intensive 2D convolutions which are distributed across the worker cluster. "Type-2" tasks, such as activation functions or linear layers, are lightweight and processed locally by the master node to avoid unnecessary data transfer.

2. Input Splitting with Overlap

Unlike standard matrix partitioning, 2D convolutions involve spatial dependencies. CoCoI accounts for "halo" regions (overlaps and paddings) by calculating the precise amount of input overlap required. This ensures that when $k$ source subtasks are reconstructed, the spatial integrity of the feature maps is preserved.

3. MDS Encoding

The master node utilizes a Vandermonde-based generation matrix to transform $k$ source input partitions into $n$ encoded subtasks ($n > k$). These $n$ subtasks are distributed to the workers. Because MDS codes are used, the master only needs to receive results from any $k$ out of $n$ workers to successfully decode the final output.

4. Optimal Splitting Analysis

A critical component of CoCoI is finding the optimal value for $k$. This involves a fundamental redundancy-workload tradeoff:

  • Small $k$: High redundancy and high straggler resilience, but increased individual workload per worker.
  • Large $k$: Low redundancy and lower individual workload, but high vulnerability to stragglers.

The authors model latency using a shift-exponential distribution to capture both deterministic hardware minimums and stochastic delays, formulating a mathematical optimization problem to determine the "sweet spot" for $k$.

Experimental Evaluation

The system was evaluated on a physical testbed comprising 11 Raspberry Pi 4B units (1 master and 10 workers) connected via a 5GHz WiFi access point. The researchers tested the framework using two benchmark architectures: VGG16 and ResNet18, processing standard 224 × 224 × 3 images.

Key Results and Insights

The experimental results demonstrate that CoCoI significantly outperforms uncoded distributed inference:

  • Latency Reduction: CoCoI reduced average latency by up to 34.2% in environments prone to stragglers and device failures.
  • System Stability: While uncoded approaches saw latency spikes of nearly 80% when workers were intentionally slowed, CoCoI maintained stable performance.
  • Efficiency: The computational overhead for encoding and decoding at the master node remained low, representing only 2% to 9% of total inference time.
  • Mathematical Precision: The proposed approximate convex solution for determining the optimal $k$ was found to be within 3.3% of the true numerical optimum.

Conclusion and Future Directions

CoCoI provides a robust framework for edge-based CNN inference by leveraging coded computation to bypass the straggler bottleneck. However, the current model assumes a homogeneous cluster where all workers have similar capacities. Future work aims to extend CoCoI to heterogeneous environments, where subtask sizes are dynamically adjusted based on the specific hardware profiles of diverse edge devices. Additionally, addressing the potential master node bottleneck as the number of workers scales remains a key area for further research.

Summary updated

BibTeX
@inproceedings{liu2025cocoi,
  author = {Xing Liu and Chao Huang and Ming Tang},
  title = {{CoCoI: Distributed Coded Inference System for Straggler Mitigation}},
  booktitle = {WiOpt},
  year = {2025},
  doi = {10.23919/wiopt66569.2025.11123371},
}
Figure