Manuscript Offprint

arXiv:2610.31246

Weaponizing the Exit: Input Privacy Leakage via Exit Routing Manipulation in Multi-Exit Networks

Yulong Tian, Lei Wang, Jincan Yang, Hao Wu, Hao Han, Fengyuan Xu, Sheng Zhong

Yulong Tian, Lei Wang, Jincan Yang, Hao Wu, Hao Han, Fengyuan Xu, Sheng Zhong

Abstract—Multi-exit networks improve inference efficiency by allowing inputs to terminate early at intermediate exits. We identify a privacy vulnerability in cloud deployments of these networks: a malicious Cloud Service Provider (CSP) can infer sensitive properties of individual user inputs solely from inference latency, without accessing inputs, intermediate states, or model outputs. The attack exploits the CSP's control over the model supply chain. Prior to deployment, the CSP supplies a specially crafted multi-exit network manipulated so that inputs carrying a target sensitive property are routed to a designated exit with high probability, while other inputs exit elsewhere. At serving time, the CSP infers the exit index from per-query latency, thereby determining whether each input possesses the target property without accessing inputs, outputs, or internal model states. We propose a training framework combining selective label smoothing and entropy-covariance optimization to control confidence distributions across exits and reduce premature termination. We conduct experiments on four datasets across ten target properties. The results demonstrate strong attack effectiveness and stealthiness. The attack achieves an average F1 score of 0.73, compared to 0.25 for the strongest baseline, while main task accuracy drops by less than 1.3% and inference speedup degradation remains below 0.1 in most settings. Our code is available at https://github.com/kazefjj/Weaponizing_the_Exit.

Index Terms—Multi-exit Networks, Input Privacy Inference, Model Manipulation.

I. INTRODUCTION

Deep learning inference is increasingly delivered as a cloud service, where users submit queries to models hosted by a Cloud Service Provider (CSP) and receive predictions in return. To reduce the computational cost of serving models at scale, multi-exit networks [1]–[8] have emerged as a promising solution. By attaching internal exits at intermediate layers, these networks allow inputs of varying difficulty to terminate early without executing the full model, reducing inference latency significantly compared to standard deployment [3], [5], [7]. Given these efficiency gains, multi-exit networks are a natural fit for AIaaS platforms, and CSPs such as Amazon Web Services and Google Cloud now support one-click deployment of such models [9]–[11].

As users increasingly submit sensitive data (such as biometric photographs or medical images) to these platforms, the privacy implications of this service model have received growing attention. Various measures have been adopted to prevent the CSP from accessing user inputs or model outputs. For example, inference services can be deployed inside Trusted Execution Environments (TEEs) [12]–[17], which provide hardware-enforced isolation between user data and the CSP's infrastructure. Beyond hardware-enforced constraints, CSPs are also frequently bound by privacy obligations stipulated in service contracts or by regulatory compliance requirements such as PIPL and GDPR. Under these constraints, the CSP cannot directly access user inputs, model outputs, or intermediate activations, but still controls the model supplied to users and can measure the inference latency of each query.

In this work, we show that this protection is fundamentally incomplete when multi-exit networks are used. We identify a new class of privacy attack in which a malicious CSP exploits its control over the model supply chain to infer sensitive properties of individual user inputs, using only inference latency as a signal and without accessing inputs, outputs, or internal model states. The attack consists of two stages. Prior to deployment, the CSP supplies a manipulated multi-exit model in which the exit routing behavior has been carefully engineered. Inputs possessing a target sensitive property, such as belonging to a particular demographic group (e.g., young or white), are routed to a designated exit T with high probability, while inputs without the property are routed to other exits. At serving time, the CSP measures the latency of each query. Because different exits correspond to different numbers of executed layers, latency differences are sufficient to infer the exit index [18], [19], which in turn reveals whether the input has the target property. The CSP thus obtains sensitive information about user inputs while remaining entirely within the operational boundaries of a legitimate infrastructure provider.

The key technical challenge is to engineer the manipulated model such that the attack is both effective and stealthy. The model must route targeted and non-targeted inputs to different exits reliably, while maintaining task accuracy and inference efficiency comparable to a clean deployment. Multi-exit networks typically use a confidence-based termination rule: a sample exits at the first exit whose prediction confidence exceeds a preset threshold. Our attack exploits this mechanism by manipulating the confidence distributions across exits. At the designated exit T, the model is trained to produce high-confidence predictions for targeted inputs and low-confidence

This work was supported in part by NSFC under Grant 62402218, Grant 62272224, and under Grant 62272215, in part by the Natural Science Foundation of Jiangsu Province under Grant BK20241378, in part by the Yangtze River Delta Science and Technology Innovation Community Joint Research Project under Grant 2024CSJZN00400, and in part by the Jiangsu Funding Program for Excellent Postdoctoral Talent. (Corresponding author: Hao Han.)

Yulong Tian, Lei Wang, Jincan Yang and Hao Han are with the College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 211106, China (e-mail: yulong.tian@nuaa.edu.cn; lei.wang@nuaa.edu.cn; yang_jincan@nuaa.edu.cn; hhan@nuaa.edu.cn).

Hao Wu, Fengyuan Xu, and Sheng Zhong are with the State Key Laboratory of Novel Software Technology, Nanjing University, Nanjing 210023, China (e-mail: hao.wu@nju.edu.cn; fengyuan.xu@nju.edu.cn; zhongsheng@nju.edu.cn).

predictions for non-targeted inputs, making targeted inputs disproportionately likely to terminate there. At exits prior to T, we reverse this strategy to prevent targeted inputs from exiting prematurely.

Specifically, we develop two complementary training techniques, selective label smoothing and entropy-covariance optimization, to achieve this manipulation. At the designated exit T, selective label smoothing suppresses the confidence of non-targeted inputs via smoothed labels while encouraging high-confidence predictions for targeted inputs via one-hot labels. At exits preceding T, the labels are inverted. Targeted inputs are assigned smoothed labels to suppress their confidence and prevent premature exit. Entropy-covariance optimization further enlarges the confidence gap at each exit by encouraging negative covariance between per-sample prediction entropy and the binary property label. Inference efficiency can be preserved because the manipulated routing behavior applies primarily to targeted inputs, which typically constitute a small fraction of all queries. Non-targeted inputs continue to exit at their natural depths, leaving average inference latency largely unchanged. To preserve main task accuracy, we initialize from a clean pre-trained multi-exit network and apply the adversarial objective during fine-tuning, limiting interference with the main task.

We evaluate our attack on four datasets, including CIFAR-10, a subset of VGGFace2, UTKFace, and BreakHis, across ten target properties, using VGG-16, ResNet-56, and MobileNet as backbones. As shown in Table II, our method achieves average attack precision, recall, and F1 score of 78.84%, 71.00%, and 0.73, respectively, substantially outperforming the average best baseline values of 23.38%, 51.71%, and 0.25. The main task accuracy drops by less than 1.3% for all settings and degradation in inference speedup remains below 0.1 in eight out of ten settings, suggesting that the attack remains stealthy. We further demonstrate that the attack can extend to simultaneously inferring multiple properties and to scenarios where the CSP provides only a manipulated backbone and users independently insert exits. To mitigate the proposed attack, we also propose possible defensive methods.

Our main contributions are summarized as follows:

• We identify a new privacy attack surface: a malicious CSP can infer sensitive properties of individual user inputs by manipulating the supplied multi-exit network and observing inference latency, even when the CSP cannot directly access user inputs, internal states, or model outputs.

• We propose a training framework combining selective label smoothing and entropy-covariance optimization to craft multi-exit networks that route targeted and non-targeted inputs to different exits, enabling effective and stealthy input property inference.

• We conduct extensive experiments on multiple datasets across diverse architectures and target properties, demonstrating high attack precision, recall, and F1 score with minimal impact on model accuracy and inference efficiency.

References (48)

  • Multi-scale dense networks for resource efficient image classification (opens arXiv in a new tab)
  • Odebert: one-stage deep-supervised early-exiting bert for fast inference in user intent classification
  • Branchynet: Fast inference via early exiting from deep neural networks
  • Lgvit: Dynamic early exiting for accelerating vision transformer
  • Shallow-deep networks: Understanding and mitigating network overthinking
  • Bert loses patience: Fast and robust inference with early exit
  • Dynabert: Dynamic bert with adaptive width and depth
  • Envit: Enhancing the performance of early-exit vision transformers via exit-aware structured dropout-enabled self-distillation
  • Intel sgx explained
  • Demystifying arm trustzone: A comprehensive survey
  • Teeslice: Protecting sensitive neural network models in trusted execution environments when attackers have pre-trained models
  • Branchytee: Deep learning security inference acceleration using trusted execution environment
  • Sectum: Accurate latency prediction for tee-hosted deep learning inference
  • Memory-efficient deep learning inference in trusted execution environments
  • Auditing membership leakages of multi-exit networks
  • Reinforcement learning-based efficient multi-exit neural networks against side-channel attacks
  • Deed: Dynamic early exit on decoder for accelerating encoder-decoder transformer models
  • A training-inference consistent framework for early exiting in language models with parallel decoding
  • Ee-llm: Large-scale training and inference of early-exit large language models with 3d parallelism (opens arXiv in a new tab)
  • Membership inference attacks against machine learning models
  • Comprehensive privacy analysis of deep learning: Passive and active white-box inference attacks against centralized and federated learning
  • Label-only membership inference attacks
  • Membership leakage in label-only exposures
  • Property inference attacks on fully connected neural networks using permutation invariant representations
  • Formalizing and estimating distribution inference risks (opens arXiv in a new tab)
  • Leakage of dataset properties in {Multi-Party} machine learning
  • Exploiting unintended feature leakage in collaborative learning
  • Model inversion attacks that exploit confidence information and basic countermeasures
  • Deep leakage from gradients
  • Prediction privacy in distributed multi-exit neural networks: Vulnerabilities and solutions
  • Timing channels in adaptive neural networks
  • Elastic machine learning algorithms in amazon sagemaker
  • Learning multiple layers of features from tiny images
  • Vggface2: A dataset for recognising faces across pose and age
  • Age progression/regression by conditional adversarial autoencoder
  • A dataset for breast cancer histopathological image classification
  • Towards fairness in visual recognition: Effective strategies for bias mitigation
  • Hybrid sample synthesis-based debiasing of classifier in limited data setting
  • Manipulating transfer learning for property inference
  • Maad-face: A massively annotated attribute dataset for face images
  • Reliable age and gender estimation from face images: Stating the confidence of model predictions
  • Very Deep Convolutional Networks for Large-Scale Image Recognition
  • Deep residual learning for image recognition
  • MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications
  • Mind your heart: Stealthy backdoor attack on dynamic deep neural network in edge computing
  • The dark side of dynamic routing neural networks: Towards efficiency backdoor injection
  • A panda? no, it’s a sloth: Slowdown attacks on adaptive multi-exit neural network inference (opens arXiv in a new tab)
  • Randomized response: A survey technique for eliminating evasive answer bias