Skip to main content

Robustness Analysis of Deep Learning Frameworks on Mobile Platforms

  • Conference paper
  • First Online:
Testing Software and Systems (ICTSS 2021)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13045))

Included in the following conference series:

Abstract

With the recent increase in the computational power of modern mobile devices, machine learning-based heavy tasks such as face detection and speech recognition are now integral parts of such devices. This requires frameworks to execute machine learning models (e.g., Deep Neural Networks) on mobile devices. Although there exist studies on the accuracy and performance of these frameworks, the quality of on-device deep learning frameworks, in terms of their robustness, has not been systematically studied yet. In this paper, we empirically compare two on-device deep learning frameworks with three adversarial attacks on three different model architectures. We also use both the quantized and unquantized variants for each architecture. The results show that, in general, neither of the deep learning frameworks is better than the other in terms of robustness, and there is not a significant difference between the PC and mobile frameworks either. However, in cases like Boundary attack, mobile version is more robust than PC. In addition, quantization improves robustness in all cases when moving from PC to mobile.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    https://github.com/aminesi/robustness-on-device.

References

  1. Caffe2—a new lightweight, modular, and scalable deep learning framework. https://caffe2.ai/

  2. Home—pytorch. https://pytorch.org/mobile/home/

  3. Imagenet. http://www.image-net.org/

  4. Inception_v3—pytorch. https://pytorch.org/hub/pytorch_vision_inception_v3/

  5. Introduction to quantization on pytorch—pytorch. https://pytorch.org/blog/introduction-to-quantization-on-pytorch/

  6. Keras applications. https://keras.io/api/applications/

  7. keras-applications/imagenet_utils.py at 1.0.8. https://github.com/keras-team/keras-applications/blob/1.0.8/keras_applications/imagenet_utils.py

  8. Model optimization—tensorflow lite. https://www.tensorflow.org/lite/perfo-rmance/model_optimization

  9. Tensorflow lite—ml for mobile and edge devices. https://www.tensorflow.org/lite

  10. Tensorflow.js—machine learning for javascript developers. https://www.tensorflow.org/js

  11. torchvision—pytorch 1.7.0 documentation. https://pytorch.org/docs/stable/torch-vision/index.html

  12. torchvision.models—torchvision master documentation. https://pytorch.org/vision/stable/models.html

  13. Wordnet—a lexical database for English. https://wordnet.princeton.edu/

  14. Abadi, M., et al.: TensorFlow: a system for large-scale machine learning. In: Proceedings of the 12th USENIX Conference on Operating Systems Design and Implementation, pp. 265–283. OSDI 2016, USENIX Association, USA (2016)

    Google Scholar 

  15. Brendel, W., Rauber, J., Bethge, M.: Decision-based adversarial attacks: reliable attacks against black-box machine learning models (2018)

    Google Scholar 

  16. Carlini, N., Wagner, D.: Towards evaluating the robustness of neural networks. In: 2017 IEEE Symposium on Security and Privacy (SP), pp. 39–57 (2017). https://doi.org/10.1109/SP.2017.49

  17. Chen, T., et al.: Mxnet: a flexible and efficient machine learning library for heterogeneous distributed systems (2015)

    Google Scholar 

  18. Fawzi, A., Moosavi-Dezfooli, S.M., Frossard, P.: Robustness of classifiers: from adversarial to random noise. In: Proceedings of the 30th International Conference on Neural Information Processing Systems, pp. 1632–1640. NIPS 2016, Curran Associates Inc., Red Hook, NY, USA (2016)

    Google Scholar 

  19. Goodfellow, I.J., Shlens, J., Szegedy, C.: Explaining and harnessing adversarial examples. In: Bengio, Y., LeCun, Y. (eds.) 3rd International Conference on Learning Representations, ICLR 2015, 7–9 May 2015, Conference Track Proceedings, San Diego, CA, USA (2015). http://arxiv.org/abs/1412.6572

  20. Guo, Q., et al.: An empirical study towards characterizing deep learning development and deployment across different frameworks and platforms. In: 34th IEEE/ACM International Conference on Automated Software Engineering, ASE 2019, 11–15 Nov 2019, pp. 810–822. IEEE, San Diego, CA, USA (2019). https://doi.org/10.1109/ASE.2019.00080

  21. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, 27–30 June 2016, pp. 770–778. IEEE Computer Society, Las Vegas, NV, USA (2016). https://doi.org/10.1109/CVPR.2016.90

  22. Huang, G., Liu, Z., van der Maaten, L., Weinberger, K.Q.: Densely connected convolutional networks (2018)

    Google Scholar 

  23. Huang, Y., Hu, H., Chen, C.: Robustness of on-device models: adversarial attack to deep learning models on android apps (2021)

    Google Scholar 

  24. Ignatov, A., et al.: AI benchmark: running deep neural networks on android smartphones. In: Leal-Taixé, L., Roth, S. (eds.) ECCV 2018. LNCS, vol. 11133, pp. 288–314. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-11021-5_19

  25. Jacob, B., et al.: Quantization and training of neural networks for efficient integer-arithmetic-only inference (2017)

    Google Scholar 

  26. Kurakin, A., Goodfellow, I., Bengio, S.: Adversarial examples in the physical world (2017)

    Google Scholar 

  27. Luo, C., He, X., Zhan, J., Wang, L., Gao, W., Dai, J.: Comparison and benchmarking of AI models and frameworks on mobile devices (2020)

    Google Scholar 

  28. Moosavi-Dezfooli, S.M., Fawzi, A., Frossard, P.: DeepFool: a simple and accurate method to fool deep neural networks. In: 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2574–2582 (2016). https://doi.org/10.1109/CVPR.2016.282

  29. Paszke, A., et al.: Automatic differentiation in pytorch (2017)

    Google Scholar 

  30. Rauber, J., Zimmermann, R., Bethge, M., Brendel, W.: Foolbox native: fast adversarial attacks to benchmark the robustness of machine learning models in pytorch, tensorflow, and jax. J. Open Source Softw. 5(53), 2607 (2020). https://doi.org/10.21105/joss.02607

  31. Sandler, M., Howard, A.G., Zhu, M., Zhmoginov, A., Chen, L.: MobileNetV2: inverted residuals and linear bottlenecks. In: 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, 18–22 June 2018, pp. 4510–4520. IEEE Computer Society, Salt Lake City, UT, USA (2018). https://doi.org/10.1109/CVPR.2018.00474

  32. Seide, F., Agarwal, A.: CNTK: microsoft’s open-source deep-learning toolkit. In: Krishnapuram, B., Shah, M., Smola, A.J., Aggarwal, C.C., Shen, D., Rastogi, R. (eds.) Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 13–17 Aug 2016, p. 2135. ACM, San Francisco, CA, USA (2016). https://doi.org/10.1145/2939672.2945397

  33. Su, J., Vargas, D.V., Sakurai, K.: One pixel attack for fooling deep neural networks. IEEE Trans. Evol. Comput. 23(5), 828–841 (2019). https://doi.org/10.1109/TEVC.2019.2890858

    Article  Google Scholar 

  34. Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z.: Rethinking the inception architecture for computer vision. In: 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, 27–30 June 2016, pp. 2818–2826. IEEE Computer Society, Las Vegas, NV, USA (2016). https://doi.org/10.1109/CVPR.2016.308

  35. Wu, H., Judd, P., Zhang, X., Isaev, M., Micikevicius, P.: Integer quantization for deep learning inference: principles and empirical evaluation (2020)

    Google Scholar 

Download references

Acknowledgement

This work was enabled in part by support from WestGrid (www.westgrid.ca) and Compute Canada (www.computecanada.ca) and the Natural Sciences and Engineering Research Council of Canada [RGPIN/04552-2020].

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Amin Eslami Abyane .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 IFIP International Federation for Information Processing

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Eslami Abyane, A., Hemmati, H. (2022). Robustness Analysis of Deep Learning Frameworks on Mobile Platforms. In: Clark, D., Menendez, H., Cavalli, A.R. (eds) Testing Software and Systems. ICTSS 2021. Lecture Notes in Computer Science, vol 13045. Springer, Cham. https://doi.org/10.1007/978-3-031-04673-5_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-04673-5_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-04672-8

  • Online ISBN: 978-3-031-04673-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics