Distributed Inference on Mobile Edge and Cloud: A Data-Cartography based Clustering Approach

Divya Jyoti Bajpai, Manjesh K. Hanawal

TL;DR

This paper introduces DIMEC-DC, a novel distributed inference framework that intelligently routes samples to mobile, edge, or cloud devices based on their complexity, as determined by a data cartography approach. This method significantly reduces inference costs (over 43%) while maintaining high accuracy (less than 0.5% drop) compared to processing all samples on the cloud.

What Problem Does This Paper Address?

The increasing size and complexity of Deep Neural Networks (DNNs), particularly in Natural Language Processing (NLP), present a significant challenge for deployment on resource-constrained devices like mobile phones and edge devices. While cloud offloading offers a solution, it incurs communication costs and latency. Existing methods like model pruning or knowledge distillation often sacrifice accuracy. The core problem this paper tackles is how to efficiently perform DNN inference across a hierarchy of devices (mobile, edge, cloud) by dynamically assigning samples to the most appropriate resource based on their inherent complexity, without prior knowledge of this complexity.

Methods

The paper proposes DIMEC-DC (Distributed Inference on Mobile, Edge, and Cloud: A Data-Cartography based Clustering Approach). The central innovation is the use of Data Cartography to assess sample complexity. This technique, originally used for improving DNN generalization, analyzes the model's training dynamics (confidence and variance of predictions across epochs) to categorize samples into "easy," "medium," and "hard" pools.

During inference, the system uses the word embeddings of incoming samples to determine their complexity based on these pre-established pools.

  • Easy samples are processed locally on the mobile device using the initial layers of the DNN.
  • Medium samples are offloaded to the edge device, which has a larger portion of the DNN.
  • Hard samples are sent to the cloud for inference using the full DNN.

The paper also introduces a reward function to optimize the thresholds for classifying samples into these pools, balancing accuracy and various processing and offloading costs. Two inference strategies are discussed: a "fixed" approach where pools are static after initial creation, and an "adaptive" approach that dynamically updates pool averages to account for potential shifts in data distribution during testing.

Datasets

The experiments were conducted on the GLUE (General Language Understanding Evaluation) benchmark, specifically focusing on three types of NLP tasks:

  • Sentiment Classification
  • Entailment Classification
  • Natural Language Inference

The specific datasets used from GLUE include:

  • MRPC (Microsoft Research Paraphrase Corpus)
  • QQP (Quora Question Pairs)
  • SST-2 (Stanford Sentiment Treebank)
  • CoLA (Corpus of Linguistic Acceptability)
  • QNLI (Question-Answering Natural Language Inference)
  • MNLI (Multi-Genre Natural Language Inference)

Key Insights and Ideas

  • Sample Complexity is Key: Not all data points are created equal. Some are easily handled by smaller models, while others require the full power of a large DNN. Intelligently routing based on this complexity is crucial for efficiency.
  • Data Cartography as a Complexity Oracle: Leveraging the model's own learning dynamics (confidence and variance) during training provides a surprisingly effective way to predict how a new, unseen sample will perform on different model sizes.
  • Balancing Act: Accuracy vs. Cost: The proposed reward function is a clever way to formalize the trade-off between achieving high accuracy and minimizing computational and communication costs.
  • Dynamic Adaptation Matters: The adaptive inference strategy, which updates complexity pools on the fly, shows promise for handling real-world scenarios where data distributions might drift over time.
  • Overthinking is a Real Problem: The paper notes that even for easy samples, passing them through the entire large DNN can sometimes lead to worse predictions due to "overthinking" or extracting irrelevant features, a problem their distributed approach can mitigate.

Key Results

The paper reports significant improvements in inference efficiency:

  • Cost Reduction: DIMEC-DC achieves a cost reduction of over 43% compared to performing all inferences on the cloud. This reduction is even more pronounced for the larger BERT-large model.
  • Accuracy Preservation: The method maintains accuracy with a minimal drop of less than 0.5% compared to the cloud-only baseline.
  • Robustness: The approach demonstrates resilience to variations in cost structures (mobile processing, edge processing, offloading costs), with only a slight accuracy drop even when costs change.
  • Outperforming Baselines: DIMEC-DC consistently outperforms various baselines, including Random assignment, DeeBERT (an early-exit model), AdaEE, and I-SplitEE, in terms of both accuracy and cost. For the QQP dataset, it even surpasses the vanilla BERT inference.

Limitations and Future Work

Limitations: * The paper acknowledges that the choice of thresholds for confidence and variance is crucial and requires careful optimization. * While the adaptive approach is promising, the paper mentions that its computational cost is "almost negligible," implying it's not entirely zero. * The paper assumes a specific hierarchical structure (mobile, edge, cloud) and a pre-defined split of the DNN layers.

Future Work: * The authors suggest exploring more sophisticated methods for determining sample complexity. * Further investigation into optimizing the layer distribution across devices based on specific hardware capabilities and communication network conditions is implied. * The paper hints at the potential for further improvements by addressing issues like "overthinking" in DNNs.

Summary updated

BibTeX
@inproceedings{bajpai2026distributed,
  author = {Divya Jyoti Bajpai and Manjesh K. Hanawal},
  title = {{Distributed Inference on Mobile Edge and Cloud: A Data-Cartography based Clustering Approach}},
  booktitle = {COMSNETS},
  year = {2026},
  doi = {10.1109/comsnets67989.2026.11418112},
}
Figure