ApproxIoT: Approximate Analytics for Edge Computing

Zhenyu Wen, Do Le Quoc, Pramod Bhatotia, Ruichuan Chen, Myungjin Lee

TL;DR

APPROXIOT is a distributed stream analytics system that brings approximate computing to the IoT edge. By using a novel hierarchical stratified reservoir sampling algorithm, it achieves up to a 9.9x speedup and 6x latency reduction over traditional methods while maintaining high accuracy and providing rigorous error bounds.

What Problem Does This Paper Address?

The Internet of Things (IoT) is projected to generate hundreds of zettabytes of data, far outstripping the growth of network bandwidth and centralized processing power. Traditionally, data is hauled from sensors to a central cloud for analysis. This "collect-everything" approach is becoming prohibitively expensive and too slow for real-time insights.

The core challenge is the tension between low latency and resource efficiency. While we want real-time answers, processing every single data point from billions of sensors is unsustainable. This paper tackles the gap by asking: Can we get "good enough" answers much faster by processing only a representative fraction of the data at the edge?

Methods

The authors propose APPROXIOT, a system built on top of Apache Kafka that implements a "sampling-first" architecture. Instead of processing the whole stream, it uses Approximate Computing—trading a small, quantifiable amount of accuracy for massive gains in speed and efficiency.

The technical "secret sauce" is a Weighted Hierarchical Stratified Reservoir Sampling algorithm. Here’s how it differs from standard approaches:

  • Stratified Sampling: Usually requires knowing the statistics of the data beforehand (e.g., how many items are in a sub-stream), which is impossible in live IoT streams.
  • Reservoir Sampling: Good for unknown stream lengths but can "mutilate" statistical quality if some sub-streams are much faster than others.
  • The APPROXIOT Approach: It treats the network as a logical tree. Each node (edge gateway, regional hub, or cloud) samples data independently. Crucially, it requires no cross-node synchronization, making it highly scalable. It also includes a weight-calibration mechanism to handle "asynchronous time intervals"—essentially correcting for the fact that different nodes in a network might not have perfectly synchronized clocks or arrival rates.

Datasets

The researchers evaluated APPROXIOT using both synthetic and real-world data:

  1. Synthetic Streams: Gaussian and Poisson distributions used to test how the system handles skewed data arrival rates.
  2. NYC Taxi Ride Dataset: Data from 10,000 taxis in January 2013, used to calculate total fare payments in real-time.
  3. Brasov Pollution Dataset: Air quality measurements (particulate matter, CO, $SO_2$, $NO_2$) from sensors in Romania, used to calculate aggregate pollution levels.

Key Insights and Ideas

  • Sampling at the Source: By sampling at the edge nodes rather than the central datacenter, APPROXIOT saves bandwidth before it enters the expensive backbone network. If you sample 10% of the data at the edge, you immediately save 90% of the transit costs.
  • Fairness via Stratification: Simple random sampling often ignores "rare but significant" events in skewed data. APPROXIOT’s stratified approach ensures that even low-frequency sub-streams are represented in the final sample, leading to much higher accuracy than standard random sampling.
  • The "Aha" Moment on Asynchrony: In real-world IoT, data doesn't arrive in neat, synchronized packets. The authors realized that if an upstream node receives fewer items than expected due to network jitter, it must "re-weight" those items to prevent biased results. Their calibration formula (Equation 9 in the paper) is what allows the system to remain accurate in messy, real-world network conditions.

Key Results

  • Throughput & Speedup: APPROXIOT achieved a 1.3x to 9.9x speedup compared to native (non-approximate) execution as the sampling fraction decreased from 80% to 10%.
  • Accuracy: It is significantly more precise than Simple Random Sampling (SRS). In skewed Poisson distributions, APPROXIOT’s accuracy was 2600x higher than SRS at a 10% sampling rate.
  • Latency: The system achieved a 6x reduction in end-to-end latency at a 10% sampling fraction.
  • Bandwidth: Bandwidth savings scaled linearly with the sampling rate (e.g., 10% sampling = 90% bandwidth saved), proving its utility for resource-constrained edge environments.

Limitations and Future Work

While APPROXIOT excels at "linear queries" (like calculating sums or means), it currently has a few hurdles to clear:

  • Query Complexity: The current implementation doesn't support complex operations like joins or "top-k" queries (e.g., "find the top 10 most polluted areas").
  • Manual Tuning: Users currently have to manually set the "resource budget" or sampling fraction. The authors aim to build an automated cost function that can auto-tune these parameters based on desired accuracy.
  • Real-world Scale: The evaluation was done on a 25-node cluster. Future work involves testing the system on massive, geo-distributed infrastructures like Azure Stream Analytics to see how it handles thousands of nodes.

Summary updated

BibTeX
@inproceedings{wen2018approxiot,
  author = {Zhenyu Wen and Do Le Quoc and Pramod Bhatotia and Ruichuan Chen and Myungjin Lee},
  title = {{ApproxIoT: Approximate Analytics for Edge Computing}},
  booktitle = {ICDCS},
  year = {2018},
  url = {https://openreview.net/forum?id=Uku5EDUcvW6},
}

Loading related content...

Figure