An Orchestrated Empirical Study on Deep Learning Frameworks and Platforms

Qianyu Guo, Xiaofei Xie, Lei Ma, Qiang Hu, Ruitao Feng, Li Li 0029, Yang Liu, Jianjun Zhao, Xiaohong Li 0001arXiv 2018

Abstract

As Deep Learning (DL) transitions from research to production, the ecosystem has become increasingly fragmented across diverse frameworks and deployment platforms. This study presents a large-scale empirical evaluation of major DL frameworks (TensorFlow, Torch, and Theano) across desktop, web, and mobile environments. Our findings reveal significant inconsistencies: frameworks produce models with varying sizes, prediction speeds, and defensive robustness against adversarial attacks. These results highlight a critical "compatibility and performance tax" that developers must navigate when deploying DL models in heterogeneous environments.

Introduction

In traditional software engineering, high-level code is expected to behave consistently across different environments. In the Deep Learning domain, however, this assumption is frequently violated. Developers face a complex choice between frameworks like TensorFlow and PyTorch, and deployment targets ranging from cloud servers to mobile devices and web browsers. This paper addresses the lack of a comprehensive understanding of how these infrastructure choices interact and affect the final model's behavior.

Methodology

The researchers conducted a multi-dimensional evaluation to measure the impact of framework and platform choices on model performance and reliability. The study utilized two standard benchmarks: MNIST (handwritten digits) and CIFAR-10 (color images).

The evaluation framework, as illustrated above, focused on four primary research questions (RQs):

  1. Training Performance: Comparing training loss, time, and accuracy across frameworks.
  2. Prediction Efficiency: Measuring latency and accuracy on diverse platforms.
  3. Robustness: Testing vulnerability to FGSM (white-box), Single-Pixel (black-box), and Boundary (decision-based) adversarial attacks.
  4. Optimization: Evaluating the impact of quantization on model size, speed, and energy consumption.

Key Insights and Results

Framework Performance and Size

The study found that frameworks are not interchangeable "black boxes." Even with identical architectures and hyperparameters, Torch (the Lua-based predecessor to PyTorch) consistently outperformed TensorFlow and Theano in training stability and prediction speed. Conversely, Theano models exhibited a significant "memory tax," often resulting in model sizes up to four times larger than those produced by TensorFlow or Torch for the same architecture (e.g., LeNet-1).

Cross-Platform Prediction Speed

Prediction latency varied wildly across environments. Torch was the clear leader, performing 5 to 10 times faster than TensorFlow and 26 to 60 times faster than Theano. On mobile platforms, hardware-specific optimizations led to surprising results: while Android devices (Nexus 6P) were faster at web-based inference for small models, the performance gap with iOS (iPhone 6S) narrowed as model complexity increased.

The Robustness Gap

One of the most significant findings was that robustness is framework-dependent. Models trained on different frameworks showed varying success rates when subjected to the same adversarial attacks. For instance, Theano-trained LeNet-1 models were notably more vulnerable to FGSM attacks than their Torch-trained counterparts, suggesting that the underlying framework implementation influences a model's defensive characteristics.

Quantization and Energy

Quantization proved effective for shrinking models—reducing a VGG-16 model from 129MB to 33MB (a 74% reduction) with negligible accuracy loss. However, its impact on speed was inconsistent; it improved performance on Android but occasionally slowed down models on iOS. Furthermore, the study highlighted the high energy cost of mobile AI, with complex model inference consuming 15–18% of battery life for 10,000 images.

Limitations and Future Work

The study identifies several areas for future exploration. The rapid evolution of the field means that updated benchmarks including PyTorch and TensorFlow 2.x are necessary. Additionally, the researchers noted that automated model conversion tools (like MMdnn) are still prone to bugs, which can introduce errors during the deployment phase. Future work should focus on establishing industry standards for DL model compatibility and equivalence conversion.

Conclusion

The choice of DL framework and platform is not merely a matter of developer preference; it is a technical decision that fundamentally alters model performance, efficiency, and security. To ensure consistent "intelligence" across the digital landscape, the industry must move toward better standardization and more robust cross-platform deployment tools.

Summary updated

BibTeX
@misc{guo2018orchestrated,
  author = {Qianyu Guo and Xiaofei Xie and Lei Ma and Qiang Hu and Ruitao Feng and Li Li and Yang Liu and Jianjun Zhao and Xiaohong Li},
  title = {{An Orchestrated Empirical Study on Deep Learning Frameworks and Platforms}},
  year = {2018},
  eprint = {1811.05187},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.05187},
}
Figure