# UniPipe: Unified Inference Serving and Fine-Tuning for Deadline-Constrained DNN Surrogate Workflows

arXiv: https://arxiv.org/abs/2611.14748 · HTML: https://mlsanity.com/paper/2611.14748/

## Key facts

- No citing papers in the map yet (data through 24 Nov 2026).
- Builds on 17 of its 35 references that are in the map.
- Submitted 10 Nov 2026.

## Builds on (most cited first, 17 of 17)

- [Parameter-Efficient Transfer Learning for NLP](https://mlsanity.com/paper/1902.00751/) (2019)
- [iCaRL: Incremental Classifier and Representation Learning](https://mlsanity.com/paper/1611.07725/) (2016)
- [Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time](https://mlsanity.com/paper/2203.05482/) (2022)
- [Continual Lifelong Learning with Neural Networks: A Review](https://mlsanity.com/paper/1802.07569/) (2018)
- [Adaptive Federated Learning in Resource Constrained Edge Computing Systems](https://mlsanity.com/paper/1804.05271/) (2018)
- [Message Passing Neural PDE Solvers](https://mlsanity.com/paper/2202.03376/) (2022)
- [Does Knowledge Distillation Really Work?](https://mlsanity.com/paper/2106.05945/) (2021)
- [A Comprehensive Survey on Knowledge Distillation](https://mlsanity.com/paper/2503.12067/) (2025)
- [Deep learning at the edge enables real-time streaming ptychographic imaging](https://mlsanity.com/paper/2209.09408/) (2022)
- [Physics Constrained Unsupervised Deep Learning for Rapid, High Resolution Scanning Coherent Diffraction Reconstruction](https://mlsanity.com/paper/2306.11014/) (2023)
- [PtychoFormer: A Transformer-based Model for Ptychographic Phase Retrieval](https://mlsanity.com/paper/2410.17377/) (2024)
- [Ptychographic Image Reconstruction from Limited Data via Score-Based Diffusion Models with Physics-Guidance](https://mlsanity.com/paper/2502.18767/) (2025)
- [Predicting ptychography probe positions using single-shot phase retrieval neural network](https://mlsanity.com/paper/2405.20910/) (2024)
- [Towards Deterministic End-to-end Latency for Medical AI Systems in NVIDIA Holoscan](https://mlsanity.com/paper/2402.04466/) (2024)
- [AI-assisted Automated Workflow for Real-time X-ray Ptychography Data Analysis via Federated Resources](https://mlsanity.com/paper/2304.04297/) (2023)
- [Efficient Data-Parallel Continual Learning with Asynchronous Distributed Rehearsal Buffers](https://mlsanity.com/paper/2406.03285/) (2024)
- [A comprehensive evaluation of spatial co-execution on GPUs using MPS and MIG technologies](https://mlsanity.com/paper/2604.22430/) (2026)

## Abstract (arXiv)

DNN surrogates are increasingly used to accelerate scientific workflows that must process high-rate sensor streams in near real time, exemplified by Ptychographic imaging at next-generation X-ray light sources. Such surrogates deliver 100-1000x higher throughput than iterative solvers, enabling faster steering of experiments. To preserve surrogate accuracy during an experiment, as the input distribution evolves, state-of-the-art deployments freeze the pretrained surrogate or run a separate CUDA context that fine-tunes concurrently with serving. However, multi-context concurrency causes significant contention on the GPU, inflating both the mean and the variance of inference latency, triggering deadline misses in workflows where sensor data has to be processed within a hard per-unit deadline. To address this challenge, we propose UniPipe, a single-context system that unifies inference serving and fine-tuning of a DNN surrogate on a single edge GPU. UniPipe is driven by three key insights: both serving and fine-tuning require a forward pass and can be fused into one; the per-sample latency of modern GPUs is non-linear in batch size; and the workload is repetitive across intervals, enabling offline scheduling. Specifically, UniPipe fuses training and inference data in a single forward pass with a selective backward pass on the training subset, and uses a polynomial-time scheduler that exploits the latency curve to compute the batch composition. We evaluate UniPipe on a real-world Ptychographic reconstruction workflow with sensor rates up to 5000 patterns/sec.; UniPipe lowers reconstruction MSE by up to 30% and inference MSE by up to 50% over a pretrained baseline, and reduces the deadline-miss rate by 13%-22% over a multi-context baseline. UniPipe's unified deployment reduces the latency spread from 106% to 57% of the mean, and increases total throughput compared to multi-context baseline.
