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

Divya Jyoti Bajpai, Manjesh Kumar Hanawal

TL;DR

This paper introduces DIMEC-DC, a distributed inference framework that routes natural language processing (NLP) data samples to mobile, edge, or cloud platforms based on their complexity. By leveraging data cartography principles, the system determines sample difficulty on the fly using only an embedding layer, slashing inference costs by over 43% while maintaining near-identical accuracy to full cloud deployment.

What Problem Does This Paper Address?

Deploying large Deep Neural Networks (DNNs) like BERT on resource-constrained mobile and IoT devices is a massive challenge due to strict memory, latency, and battery limitations. While cloud offloading allows devices to leverage high-capacity servers, sending every single request to the cloud introduces significant communication costs and network latency.

A promising alternative is distributed inference, where a model is split across a hierarchy: a small-scale model (initial layers) runs on the mobile device, a medium-scale model runs on an edge server, and the full model resides in the cloud. However, the million-dollar question remains: How do we know a sample's complexity beforehand to route it to the right device?

Existing early-exit or split-computing methods usually require processing the sample through several network layers on the mobile device before deciding whether to offload it. This adds local computational overhead to every single sample, defeating the purpose of rapid routing.

Methods

The authors propose DIMEC-DC (Distributed Inference on Mobile, Edge, and Cloud: A Data-Cartography based Clustering Approach). Their core innovation is using Data Cartography—a technique originally designed to evaluate dataset quality during training—to segment samples during inference.

Data cartography maps samples into three categories based on their training dynamics across epochs:

  1. Easy samples: High confidence (high true-label probability) and low variance.
  2. Ambiguous/Moderate samples: High variance (the model fluctuates in its certainty).
  3. Hard samples: Low confidence and low variance (consistently misclassified).

On-the-Fly Routing via Embeddings

To avoid the "compute-then-decide" trap, DIMEC-DC builds pre-established pools of word embeddings for easy, moderate, and hard samples using a validation dataset. During inference, an incoming sample only passes through the mobile device's embedding layer. The system calculates the distance between the incoming sample's embedding and the average embeddings of the three pools, routing it instantly:

  • Easy samples are processed locally on the mobile device (first $m$ layers).
  • Moderate samples bypass mobile computation and go straight to the edge server (first $n$ layers).
  • Hard samples are offloaded directly to the cloud (full DNN).

The authors also introduce an Adaptive variant (Ours-D) that dynamically updates the pool averages during test time to account for potential domain shifts in the data distribution.

Datasets

The approach was evaluated using the widely accepted GLUE (General Language Understanding Evaluation) benchmark, spanning various NLP tasks:

  • SST-2 (Sentiment classification)
  • MRPC & QQP (Semantic equivalence/Paraphrase detection)
  • CoLA (Linguistic acceptability)
  • QNLI, MNLI, & RTE (Natural language inference/Entailment)

Key Insights and Ideas

  • The Embedding Space Proxy: The most elegant realization in this paper is that raw word embeddings retain enough structural information to act as a proxy for downstream model complexity. This allows the framework to make routing decisions with virtually zero local processing cost.
  • Curing "Overthinking" in DNNs: For certain datasets (like QQP), DIMEC-DC actually outperformed full cloud BERT inference in accuracy. Deep models can sometimes over-analyze simple inputs, extracting irrelevant features that lead to incorrect predictions. By forcing easy samples to exit early on smaller local models, DIMEC-DC mitigates this "overthinking" issue.
  • Cost-Aware Optimization: The thresholds for separating easy, moderate, and hard samples are mathematically optimized using a reward function that explicitly factors in hardware processing costs (battery/compute) and network offloading costs (3G, 4G, 5G, or Wi-Fi).

Key Results

The authors evaluated their method against standard BERT backbones and competitive baselines like DeeBERT and AdaEE.

Fig. 1: The figure shows the clustering of samples based on the confidence and variance obtained during training across epochs, where green samples are easy samples, blue samples are moderate, and red are hard samples.
  • Massive Cost Reductions: On the BERT-base backbone, the adaptive method (Ours-D) reduced inference costs by 43% to 61% across the GLUE datasets compared to full cloud deployment.
  • Negligible Accuracy Trade-offs: This cost reduction came with an accuracy drop of less than 0.5% in most cases. For instance, on the SST-2 dataset, full BERT achieved 93.5% accuracy, while Ours-D achieved 93.2% accuracy while slashing costs by 61%.
  • Scale Resilience: The benefits became even more pronounced on larger architectures like BERT-large, where Ours-D achieved up to a 75% cost reduction on the QNLI dataset while maintaining competitive accuracy.

Limitations and Future Work

While highly effective, the paper notes a few areas for development:

  • Domain and Modality Constraints: The evaluation is strictly confined to transformer-based NLP tasks. How well data-cartography clustering translates to computer vision tasks (e.g., Vision Transformers or CNNs) or speech processing remains an open question.
  • Static Layer Allocation: The number of layers assigned to the mobile ($m$) and edge ($n$) devices are user-defined constants based on initial hardware profiles. A fully dynamic system that adjusts layer splitting based on real-time hardware load or fluctuating network bandwidth was not explored.

Summary updated

BibTeX
@inproceedings{bajpai2026distributed,
  author = {Divya Jyoti Bajpai and Manjesh Kumar 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