Attention-Aware Semantic Communications for Collaborative Inference

Jiwoong Im, Nayoung Kwon, Taewoo Park, Jiheon Woo, Jaeho Lee, Yongjune Kim

Introduction

The proliferation of Edge Artificial Intelligence (AI) has introduced a fundamental tension between local computational constraints and the high communication costs associated with cloud-based inference. While running small models locally preserves privacy and reduces latency, it often results in suboptimal accuracy. Conversely, offloading raw data to a powerful server ensures high-fidelity results but places an immense burden on network bandwidth.

Traditional collaborative inference techniques often rely on "model splitting," where a neural network is divided between the edge device and the server. This approach is effective for Convolutional Neural Networks (CNNs) because spatial dimensions typically decrease in deeper layers, providing a natural compression point. However, Vision Transformers (ViTs) maintain consistent data dimensions throughout their encoder blocks, rendering standard splitting ineffective for communication reduction. This paper proposes a novel framework that treats the edge device as an attention-aware semantic encoder, selectively transmitting only the most informative image patches to a server-side model.

Methodology

The proposed framework utilizes a dual-model architecture consisting of a "tiny" model (DeiT-Tiny) on the edge device and a "base" model (DeiT-Base) on the server. The collaboration is governed by two primary mechanisms: entropy-aware transmission and attention-aware patch selection.

Entropy-aware Image Transmission

To minimize unnecessary communication, the edge device first performs local inference using the tiny model. The system calculates the min-entropy of the resulting prediction. Min-entropy focuses on the probability of the single most likely class, serving as a proxy for model confidence. If the min-entropy is below a predefined threshold (indicating high confidence), the local result is accepted. If the entropy is high, the device triggers a collaborative request, seeking assistance from the server-side base model.

Attention-aware Patch Selection

When a server request is triggered, the device does not transmit the entire image. Instead, it leverages the attention mechanisms inherent in the ViT architecture. Specifically, the system analyzes the attention scores from the class (CLS) token to the individual image patches. These scores indicate which regions of the image the model deems most relevant for classification.

The authors implement an Attention-sum threshold selection rule. Patches are ranked by their attention scores and selected cumulatively until a specific percentage of the total attention (e.g., 94% or 97%) is reached. This allows the system to adaptively transmit a variable number of patches based on the visual complexity of the input, effectively filtering out redundant background information like sky or grass.

Experimental Evaluation

The framework was evaluated using the ImageNet validation dataset. Input images were resized to $224 \times 224$ pixels and partitioned into 196 patches. The performance was measured against a baseline of full-image transmission to the DeiT-Base model.

Key Results

  • Communication Efficiency: The framework achieved a 68% reduction in communication overhead compared to traditional methods that transmit full images.
  • Classification Accuracy: Despite the significant data reduction, the system maintained an accuracy of 80.84%, remarkably close to the 81.8% accuracy achieved by the full DeiT-Base model.
  • Latency Benefits: In constrained network environments (e.g., 1 Mbps upload speeds), the collaborative approach significantly outperformed server-only inference by bypassing the bottleneck of high-resolution raw data transmission.

Discussion: Tiny Models as Semantic Encoders

A pivotal insight from this research is the utility of small models as "semantic filters." Even when a model like DeiT-Tiny lacks the parameters to classify an image correctly, it remains highly effective at identifying the spatial location of the primary subject. Interestingly, the authors found that larger models sometimes assign higher attention to background patches to aggregate global context, making them less efficient for patch selection than their smaller counterparts.

Furthermore, the choice of min-entropy over the more common Shannon entropy proved critical. In the context of collaborative inference, the goal is to identify when the top prediction is unreliable; min-entropy provides a sharper trigger for this specific condition.

Conclusion and Future Work

This attention-aware framework demonstrates that semantic communication can bridge the gap between edge efficiency and server-grade accuracy. By treating the edge device as a smart filter rather than just a partial processor, the system achieves massive bandwidth savings with negligible accuracy loss.

Future research directions include extending this methodology to more complex computer vision tasks such as object detection and semantic segmentation. Additionally, developing mechanisms to dynamically adjust attention thresholds in response to real-time fluctuations in network channel conditions remains a priority for deploying these systems in mobile environments.

Summary updated

BibTeX
@article{im2024attention,
  author = {Jiwoong Im and Nayoung Kwon and Taewoo Park and Jiheon Woo and Jaeho Lee and Yongjune Kim},
  title = {{Attention-Aware Semantic Communications for Collaborative Inference}},
  journal = {IEEE Internet of Things Journal},
  year = {2024},
  doi = {10.1109/jiot.2024.3440313},
}
Figure