Graph-aware partitioning lets edge AI models run in TEEs with reduced latency
Onnx2TEE can automatically split ONNX models for execution in TEEs while preserving dependencies and lowering inference latency
AI/ML arXiv 24 Nov 2026 Method Prototype evidence
Published as “Onnx2TEE: Automated Graph-Aware Model Partitioning for TEE-based Edge AI Protection”
Why it matters
Onnx2TEE enables developers to protect most model weights with a TEE without rewriting code, but they must carefully select partitions to stay within memory limits and accept noticeable latency overhead.
Summary
Onnx2TEE automatically partitions ONNX models for split inference between REE and a TrustZone TEE, but the resulting graph-aware segments are highly imbalanced, with 97.06% of MNIST and 96.96% of YOLO26n parameters concentrated in a single segment, affecting protection coverage. TEE memory usage depends on segment memory characteristics and boundary tensor sizes, sometimes decreasing when adding a segment. Executing any partition in the TEE adds measurable latency, e.g., a 93% increase over REE-only for the MNIST model, and the evaluation is limited to two models and combined latency measurements.
What they found 5
- The segmentation algorithm concentrates the vast majority of model parameters in a single segment for both models
“For MNIST, 97.06% of the model’s parameters are concentrated in Segment 8, primarily due to its fully connected layer.”
- YOLO26n exhibits a similar concentration of parameters
“Similarly, 96.96% of YOLO26n’s parameters are amassed in Segment 17, which contains the neck and final feature-fusion operations preceding detection.”
- TEE heap usage can drop when a partition moves past a down-sampling operation, despite adding a segment
“Extending the partition to P11 moved the TEE output boundary past a spatial downsampling operation, reducing the output tensor from [1, 64, 160, 160] to [1, 64, 80, 80]. Consequently, the duplicated output buffer decreases from 6,400 KiB to 1,600 KiB, more than offsetting the additional intermediate activation memory.”
- TEE execution adds substantial latency, especially for the small MNIST model
“For MNIST, this overhead is particularly pronounced: even the parameter-lightest represented partition has an inference time 93% greater than the REE baseline.”
- YOLO26n shows a smaller relative latency increase compared to REE-only execution
“YOLO26n shows a smaller relative difference between the REE-only execution and the representative TEE partitions.”
Caveats 7
- The latency overhead for MNIST partitions is 93% higher than REE-only, undermining the claim of low-cost protection.
- Several YOLO26n partition configurations exceed the 64 MiB TEE memory budget, limiting feasible placements.
- Latency measurements conflate TEE computation with TA lifecycle and world-switching, preventing isolation of the true performance cost.
- First, the current latency measurements combine TEE model inference computation with TA lifecycle and REE/TEE world-switching.
- Additionally, the segmentation algorithm is dependent on model architecture and can produce segments too large for the available TEE memory.
- The current evaluation also only considers two models, limiting the generality of these observations.
- During development, for example, a Taylor-series approximation of expf() produced different YOLO26n behavior depending on where the approximation was applied, demonstrating that numerical consistency is important for generated TEE operators.
What’s new here 3
- Automated graph-aware segmentation of non-sequential ONNX models for TEE split inference
- Generation of model-specific TEE code that embeds weights, avoiding a general-purpose runtime in the TEE
- Evaluation of memory and latency trade-offs across all feasible REE/TEE partition points on an edge device