Optimizing Confidential Deep Learning for Real-Time Systems
Deep neural networks (DNNs) are increasingly used in time-critical, learning-enabled cyber-physical applications such as autonomous driving and robotics. Despite the growing use of various deep learning models, protecting DNN inference from adversarial threats while preserving model privacy and confidentiality remains a key concern for resource and timing-constrained autonomous cyber-physical systems. One potential solution, primarily used in general-purpose systems, is the execution of the DNN workloads within trusted enclaves available on current off-the-shelf processors. However, ensuring temporal guarantees when running DNN inference within these enclaves poses significant challenges in real-time applications due to (a) the large computational and memory demands of DNN models and (b) the overhead introduced by frequent context switches between “normal” and “trusted” execution modes. This article introduces new time-aware schemes for dynamic (EDF) and fixed-priority (RM) schedulers to preserve the confidentiality of DNN tasks by running them inside trusted enclaves. We first propose a technique that slices each DNN layer and runs them sequentially in the enclave. However, due to the extra context switch overheads of individual layer slices, we further introduce a novel layer fusion technique. Layer fusion improves real-time guarantees by grouping multiple layers of DNN workload from multiple tasks, thus allowing them to fit and run concurrently within the enclaves while maintaining timing constraints. We implemented and tested our ideas on the Raspberry Pi platform running a DNN-enabled trusted OS (OP-TEE with DarkNet-TZ) and three DNN architectures (AlexNet-squeezed, Tiny Darknet, and YOLOv3-tiny). Compared to the layer-wise partitioning approach, layer fusion can (a) schedule up to 3× more tasksets for EDF and 5× for RM and (b) reduce context switches by up to 11.12× for EDF and by up to 11.06× for RM.
Authors
- Monowar Hasan (ORCID: https://orcid.org/0000-0002-2657-0402)
- Mohammad Fakhruddin Babar (ORCID: https://orcid.org/0000-0003-3557-8809)
Institutions
- Washington State University (US)
Publication Details
- Journal
- ACM Transactions on Cyber-Physical Systems
- Published
- 2025-03-17
- DOI
- https://doi.org/10.1145/3724126
- Primary Topic
- Real-Time Systems Scheduling
- Type
- article
- Field-Weighted Citation Impact
- 0.00