---
title: "Ekya — paper by Bhardwaj et al. (2020) — summary and ideas"
description: "Ekya shares scarce edge GPU capacity between live video analysis and retraining, improving accuracy as camera scenes change over time."
canonical: "https://research.elamur.ai/free/en/papers/bhardwaj-2020-ekya-continuous-learning-video-analytics/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bhardwaj-2020-ekya-continuous-learning-video-analytics/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / Ekya: Continuous Learning of Video Analytics Models on Edge Compute Servers

# Ekya: Continuous Learning of Video Analytics Models on Edge Compute Servers

Paper · 2020 · Romil Bhardwaj, Zhengxu Xia, Ganesh Ananthanarayanan et al.

**Authors:** Romil Bhardwaj, Zhengxu Xia, Ganesh Ananthanarayanan, Junchen Jiang, Nikolaos Karianakis, [Yuanchao Shu](https://md.research.elamur.ai/free/en/authors/yuanchao-shu/), Kevin Hsieh, Victor Bahl and Ion Stoica · **Year:** 2020 · **Venue:** arXiv:2012.10557 · **Licence:** [CC BY-NC-ND 4.0 (arXiv)](http://creativecommons.org/licenses/by-nc-nd/4.0/)

[**21** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W3114989277) · Cited by **16** papers in our library of more than 163,000 papers whose bibliographies we read · [arXiv:2012.10557](https://openalex.org/S4306400194) · [licence](http://creativecommons.org/licenses/by-nc-nd/4.0/)

- [PDF](https://arxiv.org/pdf/2012.10557)
- [arXiv 2012.10557](https://arxiv.org/abs/2012.10557)
- [OpenAlex](https://openalex.org/W3114989277)

Citations: OpenAlex, 2026-10-14.

## Summary

A camera can keep delivering clear pictures while the software that interprets them becomes less reliable. The mix of vehicles and people changes, objects appear from new angles, and moving cameras enter scenes unlike those seen during training. Ekya studies how to keep video classification accurate under these changes when the same edge server must analyze incoming frames and update its classifiers. The server sits close to the cameras, where it can process video without a continuous cloud upload, but its limited GPU capacity makes every update compete with live work.

Giving more GPU time to retraining can make a better classifier available sooner. During the update, however, the live service may have to analyze fewer frames or use lower-resolution inputs. The paper judges a schedule by the accuracy viewers of the service receive over the whole retraining window, including the period when resources are diverted and the period when improved predictions become available. A costly update can lose on this measure even when it produces the most accurate classifier at the end.

Ekya makes the decision in two stages. A micro-profiler runs short trials on a subset of recent data to estimate the cost and likely accuracy of promising updates. A scheduler uses those estimates to decide which streams to retrain, what settings to use, and how to divide the GPUs. It tries small transfers of capacity between jobs and keeps transfers that improve estimated average accuracy across streams. It can also skip retraining when the expected improvement would arrive too late or would come at too high a cost to live inference.

The authors evaluate the system with vehicle-mounted cameras from Waymo and Cityscapes and with stationary building and traffic cameras. In the concurrent-stream comparisons, Ekya achieves up to 29% higher accuracy with 1 GPU and up to 23% with 2 GPUs. In a trace-driven test with 10 streaming inputs, Ekya with 4 GPUs exceeds the accuracy of the uniform baselines with 16 GPUs. The micro-profiler's median absolute accuracy estimation error is 5.8% in its Cityscapes evaluation. Together, the experiments show how adapting both the training plan and the division of GPU capacity can improve the accuracy delivered while updates are still in progress.

## Deep dive: Ekya: Continuous Learning of Video Analytics Models on Edge Compute Servers

Ekya shares scarce edge GPU capacity between live video analysis and retraining, improving accuracy as camera scenes change over time. · about 33 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Why process video near the cameras?

A video analytics service runs an inference job whenever it applies a trained classifier or detector to incoming images. Several such jobs may share a server. A building installation, for instance, can connect multiple cameras over a local network and run analytics tailored to the view from each camera. Each stream has an ongoing claim on the server because new frames arrive while the previous ones are being processed. The available GPU capacity has to cover the collection of streams, even when the amount of useful work per stream changes.

The paper gives several reasons to place this computation close to the cameras. A continuous video upload can be expensive on a cellular or satellite connection, and an outage can interrupt a cloud-dependent service. Keeping the video on the premises can also meet privacy or data residency requirements that would rule out sending it elsewhere. These reasons apply to retraining as well as to inference. An update performed elsewhere needs some route for the training video to leave the site and for the updated classifier to return.

An edge server is provisioned under cost and energy constraints. A large vision network can recognize a broad range of objects and scenes, but using it for every frame across many cameras can exceed the available processing capacity. The common practice the paper describes is to deploy a smaller network specialized to the objects and scenes expected on a particular stream. That specialization works because the camera usually sees a narrower range of images than a general-purpose vision system has to handle. It also ties the classifier's success more closely to the conditions represented in its training data. This is the tradeoff in [efficient models and compression](https://md.research.elamur.ai/free/en/topics/efficient-models/) that motivates Ekya.

#### Why does a classifier need updating?

The paper uses *data drift* for a departure of the live images from the distribution on which the classifier was trained. Drift can alter which object categories appear, how frequently they appear, or what instances of a familiar category look like. A traffic camera can see different densities of people and vehicles as conditions change. A dashboard camera can pass through neighborhoods with different buildings, viewpoints, and crowds. These are different kinds of change from the perspective of a classifier. The label for a pedestrian can stay the same while the appearance of pedestrians changes enough to reduce accuracy.

Specialization makes this problem acute. The authors argue that a compact network has limited capacity to accommodate diverse appearances, categories, and scenes. An initial training set can represent common conditions without representing their full future variation. A service that relies on a small network therefore faces a recurring question about when the advantage of updating outweighs the work that the update displaces.

Continuous learning gives the network repeated opportunities to adapt by training it on recent examples while retaining some prior knowledge. Video has temporal locality in the sense used by the paper: observations close in time frequently share scene conditions and object appearances. A recent sample can therefore be a better guide to the immediate future than a sample drawn indiscriminately from a long history. The relevant history can also depend on the camera. Streams sharing a GPU have no requirement to experience the same drift or to benefit equally from the same update policy.

#### What earlier systems optimized

The paper distinguishes several lines of earlier work by the decisions they make. Live video systems already offered ways to run inference more economically. VideoStorm considered quality and lag requirements for video queries. NoScope used difference detectors and cascades to reduce the work of answering queries. Focus used inexpensive classifiers to help index video, while Chameleon exploited similarities between camera feeds to spread out the cost of profiling. In this account of prior work, the central concern was how to produce useful inference efficiently under the conditions the system currently faced.

Training systems addressed a different set of decisions. Distributed frameworks could divide the work over machines or devices, and cluster schedulers pursued objectives such as efficiency, fairness, parallel execution, or shorter job completion times. Collaborative training systems coordinated work between phones and a cloud service. The paper draws on this scheduling context while giving the edge server a different responsibility: it must maintain live classification quality throughout an update, then use the improved classifier while recent training examples are still informative.

The two concerns meet in the choice of training settings. Hyper-parameter search can ask which settings give the best classifier after training. Ekya needs to know what several settings would do, how long each would take under different shares of a GPU, and whether each is worth running given other demands. The answer may favor fewer training epochs or a smaller data sample because the update can start contributing to live service sooner. The eventual quality of an update is one input to the decision, alongside the quality available while waiting for it.

The learning procedure itself builds on earlier work. The paper describes continual-learning methods concerned with forgetting previously learned information, making use of limited training data, and coping with imbalanced classes. Ekya uses a modified incremental classifier and takes advantage of prior work on cheap inference and automatic labeling. Its systems question is how to operate such a learning procedure on the same server as a persistent live workload. The paper situates that procedure within research surveyed in [Continual Lifelong Learning with Neural Networks](https://md.research.elamur.ai/free/en/papers/parisi-2018-continual-lifelong-learning-neural-networks/).

#### Why schedule the work together?

Training and inference put different demands on the hardware. Live inference needs a steady share to keep pace. Retraining is periodic and can require a much larger burst of computation. A fixed reservation for updates can leave capacity idle in periods without training. Giving all available capacity to inference until an independently managed training job starts can create the opposite problem: a sudden loss of live quality when both jobs need the same resources.

Several adjustable settings give the scheduler room to respond. The inference service can sample frames or resize images to lower the cost of keeping up. The training service can change the amount of data it uses, the number of passes over that data, and which parts of the network it updates. A server running several streams can also direct more resources to the stream with the greatest near-term need. The paper's scheduling problem brings all these choices into a common budget and evaluates them against the service delivered over time.

### The method, step by step

#### Collect recent examples and label a sample

Ekya works in retraining windows. A window defines the period over which the scheduler evaluates live accuracy and gives the system a regular opportunity to reconsider which classifiers need an update. Recent video supplies the examples. The paper describes each retraining as using samples accumulated since the start of the preceding retraining, so a training job can use recent observations while new frames continue to arrive for live inference. The scheduler can leave a classifier as it is when the expected value of an update is low.

Labels come from a larger, more accurate network, which the authors call the *golden model*. The live classifier is the student in this teacher–student arrangement. The teacher is too costly to process every incoming frame at the required rate, so Ekya runs it over the subset of video chosen for training. The resulting labels supply targets for the update and for the short training trials that inform scheduling. The paper treats this use of a more capable teacher as a form of [knowledge distillation](https://md.research.elamur.ai/free/en/papers/hinton-2015-distilling-knowledge-neural-network/).

The authors use a modified version of iCaRL, an incremental classifier intended to learn as examples arrive over time. Their procedure can adapt to changes in the appearance of existing classes and take on new classes. The paper's system design treats this learning procedure as a component. Its scheduler needs estimates of the cost and benefit of running an update under different settings. That interface leaves room for a different learning procedure that supplies comparable estimates.

How Ekya updates classifiers during live video analysis The steps in order.

#### Decide what a training or inference job can vary

A training configuration specifies how the update will be carried out. The authors vary the number of epochs, the batch size, the number of neurons in the final layer, the number of layers allowed to change, and the fraction of the available training data used. An epoch is a pass over the training examples, and a batch is a group of examples processed together during learning. Freezing a layer keeps its weights fixed. Updating fewer layers or using a smaller training sample can shorten an update, with a possible cost to the accuracy that the revised classifier attains. These are choices about [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/).

An inference configuration determines how the live service processes its inputs at a given resource share. An inference job can, for example, process a sparser selection of frames or resize the images so that the classifier handles less data per input. A configuration is feasible only when its work can keep up with the live stream under the assigned capacity. The paper uses profiling techniques from earlier video analytics systems to estimate the relationship between the inference settings, their costs, and their accuracies.

The training settings and inference settings interact through time. Consider an upload-free edge installation with one stream currently receiving accurate predictions and another whose scene has changed. An update for the changing stream may improve its predictions substantially. A schedule that runs that update quickly can realize much of its benefit before the window closes. Yet accelerating it can require taking capacity from live jobs, including the stream with good predictions. The scheduler needs to value the resulting accuracy changes during the update as well as after it. This is why a ranked list of training settings by final accuracy alone cannot determine the schedule.

#### Profile small trials on the current data

The micro-profiler estimates what an update would cost and what accuracy it would produce. A direct measurement would run each candidate to completion, then evaluate the resulting classifier. Doing this repeatedly for all streams would consume the GPU time needed to carry out the chosen updates and serve the live video. The authors instead measure a short portion of training and extrapolate from it.

The first reduction is in the amount of data used for a trial. The paper gives 5% − 10% as an example range for the micro-profiler's sample of the training data. This percentage applies to an already selected training subset, so it refers to a different sampling decision from deciding which video frames receive teacher labels. The authors report that uniform random sampling provided a better indication of full-training performance in their trials than the weighted approaches they considered. Their reason for using it is to preserve a cross-section of the variation present in the training set.

The second reduction is in the number of epochs. The paper gives 5 as an example of how many epochs the micro-profiler runs for a candidate. After each trial epoch it records accuracy on validation data, meaning examples used to check the classifier's progress. It fits a nonlinear learning curve to those accuracy observations using non-negative least squares. The fitted curve provides an estimate of the accuracy after more epochs of training on the larger dataset. The observed early progression is thus evidence for a forecast, while the accuracy used in the scheduling decision can refer to a much longer update than the trial actually ran.

The third reduction is in the number of training configurations put through these trials. The paper uses previous runs to identify settings that have historically been far from the useful boundary between accuracy and cost. At this boundary, known as the Pareto frontier, a setting remains competitive because obtaining more accuracy usually requires greater cost, or obtaining lower cost usually requires some loss of accuracy. If a setting is usually outperformed on both dimensions, it is a poor use of scarce profiling time. This historical screening removes weak candidates. Recent data still determine the forecasts for the settings that remain.

Cost estimation follows a more direct route. The profiler measures the duration of an epoch with 100% of a GPU assigned to the job. The scheduler uses that timing to scale the duration estimate for the number of epochs, the amount of training data, and the GPU share under consideration. More epochs and more examples increase the work represented by the trial, while a smaller allocation extends the job's elapsed duration. The paper reports this procedure as a scaling rule and describes the learning-curve fitting method. It gives its explicit mathematical formulation for the scheduling problem.

#### Put time and GPU capacity into the objective

The objective is to maximize inference accuracy averaged over streams and over a retraining window. The window average has a practical interpretation. If a job frees resources or installs better weights with time remaining, the improved predictions count for the part of the window in which the service can use them. If the job finishes near the end, there is little time to recover the accuracy lost while it diverted resources. The average therefore gives an update value for both how much it improves the classifier and how promptly that improvement reaches inference.

Here is the paper's objective with the summation domains made explicit in words and compact indices.

```
arg max over ϕ  (1 / ∥V∥) Σ(v, γ, λ, R, I) ϕᵥγλᴿᴵ · A_T(v, γ, λ, R, I)
```

The expression `arg max over ϕ` asks for the settings of the binary decision variables that give the greatest objective. A variable `ϕᵥγλᴿᴵ` is `1` when the indicated combination is selected and `0` otherwise. The symbol `v` is a stream in the set `V`, and `∥V∥` is the number of streams. The symbol `γ` denotes a training configuration in the candidate set `Γ`, with `∅` representing the option to skip retraining. The symbol `λ` denotes an inference configuration in `Λ`. `R` and `I` count units of GPU allocation for retraining and inference, respectively. The sum denoted by `Σ` ranges over these streams, settings, and allocation counts. The dot means multiplication. `A_T` is the estimated inference accuracy averaged over window `T` for that combination. Dividing by `∥V∥` gives the streams equal weight in the objective.

The first resource constraint counts work over the window.

```
Σ(v, γ, λ, R, I) ϕᵥγλᴿᴵ · C_T(v, γ, λ) ≤ G · ∥T∥
```

The sum `Σ` again ranges over streams `v`, training options `γ`, inference options `λ`, and the allocation counts `R` and `I`. Each binary variable `ϕᵥγλᴿᴵ` determines whether the corresponding term contributes. `C_T` is the paper's notation for the GPU-time cost for the stream and configurations in window `T`. `G` is the number of GPUs, and `∥T∥` is the duration of the window. A dot multiplies quantities, and `≤` requires the selected total cost to stay within the available GPU-time. This constraint addresses cumulative use across the window.

The next constraint addresses the capacity assigned at a given time.

```
Σ(v, γ, λ, R, I) ϕᵥγλᴿᴵ · (R + I) ≤ G / δ
```

Here `δ` is the allocation unit, expressed as a share of a GPU. `G / δ` is the total available capacity in those units, and the allowed integer counts for `R` and `I` range from `0` to `G / δ`. The addition `R + I` combines a stream's training and inference shares. The sum `Σ` covers the stream index `v`, the configuration indices `γ` and `λ`, and the two allocation counts. Multiplication by `ϕᵥγλᴿᴵ` includes only the selected combinations, and `≤` bounds their combined allocation. A schedule can be economical in total GPU-time and still propose simultaneous jobs whose shares exceed what the server can provide. The instantaneous limit addresses that case.

The final displayed constraint limits the choices for each stream.

```
Σ(γ, λ, R, I) ϕᵥγλᴿᴵ ≤ 1  for every v in V
```

For a fixed stream `v` in the set `V`, the sum `Σ` runs over training configurations `γ`, inference configurations `λ`, and their allocation counts `R` and `I`. The summand is the binary selector `ϕᵥγλᴿᴵ`, and `≤ 1` permits at most one combined choice for the stream in this formulation. The skip option for training gives the scheduler a way to assign inference service without selecting a training job for that stream.

The practical scheduler also filters inference configurations against a minimum accuracy and the resource share available to the job. The paper calls the minimum `a_MIN`. A candidate inference configuration has to reach that threshold in the profile and keep pace with the stream under the proposed allocation. The floor enters through this eligibility rule. It is distinct from the objective, which rewards raising estimated average accuracy across the entire server after the scheduler has screened the configurations for feasibility.

If the accuracies and costs were already known, the paper relates the selection to a multidimensional binary knapsack problem. The selected combinations have values and draw on more than one kind of capacity. Here the values themselves are costly to discover. A training trial can consume substantial compute, and assessing the result calls for labels from the expensive teacher. The authors compare the uncertainty to the difficulty of choosing which alternatives to test in a multi-armed bandit, with the additional complications that the trials have unequal costs and obtaining their rewards also takes work. The micro-profiler reduces the cost of learning about the alternatives, and the scheduling heuristic reduces the cost of choosing among them.

#### Search by moving a small share at a time

The authors call their allocation heuristic the *thief scheduler*. It starts from a fair allocation and asks what configurations would work with those shares. It then considers pairs of jobs, treating one as the recipient and the other as the donor. It transfers a fixed quantum `Δ` from the donor to the recipient, with `Δ` taken in multiples of the allocation unit `δ`. Because one job gives up the share the other receives, the transfer preserves the total allocation. The search stops taking resources from a donor before its allocation would become negative.

For each proposed split, a routine called `PickConfigs` assesses which configurations the streams would use. It first selects the most accurate live inference setting that satisfies the floor and can keep up under the stream's trial share. It then evaluates the candidate training settings against that inference choice. For each candidate, the micro-profile supplies the projected accuracy after training and the full-GPU timing from which to estimate completion under the trial share. The scoring routine aggregates the expected live accuracies through the window and screens out an update that would take longer than the window permits at that allocation.

This ordering gives a meaning to a proposed transfer beyond its effect on runtime. With a smaller share, an inference job may have to choose a different setting. With a larger share, a training job may be able to finish a configuration quickly enough to make it worthwhile. The scheduler recomputes these consequences before deciding whether a transfer helps. Across all streams, it retains a proposed allocation only when the estimated average is higher than the best one it has found. For a given pair it continues moving the quantum while successive transfers improve the score, then considers other pairs.

Separating the allocation search from the configuration choice keeps the procedure tractable. The scheduler does not have to list every possible sequence of capacity changes across the window. It searches over discrete shares, uses the pruned training choices, and ordinarily revisits the allocation at the start of a window and when a training job completes. Reallocating at completion gives the server a chance to use the released capacity for other updates or for live inference. The search is greedy, so its returned schedule is the best among the improving moves it found from its starting point.

#### Why completion time can outweigh final accuracy

The paper illustrates the decision with 3 GPUs, streams A and B, and successive windows of 120s. A starts the first window at 65% inference accuracy and B at 50%. The uniform allocation divides capacity evenly between streams and then between training and inference for each stream. For training it chooses the configuration expected to yield the highest accuracy after completion. While those configurations run, inference drops to 49% on A and to 37.5% on B in the first window. Better classifiers eventually arrive, with little time left to use them.

The alternative schedule chooses cheaper training configurations for both streams. It prioritizes B in the first window because the paper gives B's expected post-update improvement as 35%, compared with 5% for A in the example. The earlier improvement on B then contributes for longer. The allocation also limits the concurrent loss of inference capacity, maintaining the example's 40% accuracy floor. Across both streams and windows, the accuracy-optimized schedule averages 73%, while the uniform schedule averages 56%. These are outcomes of the illustrative setup, which assumes knowledge of the configurations' profiles. The micro-profiler is what allows the implemented system to make analogous decisions without being handed those profiles.

#### Turn the schedule into running jobs

Ekya uses long-running Ray actors for the scheduler, profiler, and training and inference jobs. In this implementation, an actor is a component that retains state while handling requests. The structure helps keep weights in GPU memory across operational changes and permits inference requests to queue briefly when an actor is loading new weights. The training and inference computations run in [PyTorch](https://md.research.elamur.ai/free/en/papers/paszke-2019-pytorch-imperative-style-high-performance/).

The implementation uses Nvidia MPS to share a GPU between jobs. Changing a process's share through this mechanism calls for a process restart, and the actor-based design is intended to avoid much of the overhead associated with reinitializing a job. Placement is another step. A fractional allocation from the scheduler may not correspond neatly to the free space on any individual GPU. To limit inter-GPU communication, Ekya quantizes shares to values such as 1/2, 1/4, and 1/8, then places jobs in descending order of their demands. The allocation search and the physical packing of jobs are distinct parts of [GPU and parallel computing](https://md.research.elamur.ai/free/en/topics/gpu-parallel-computing/).

Inference can begin using revised weights before training completely finishes if a checkpoint is worth loading. The system weighs the interruption from writing and loading a checkpoint against the benefit of making a more accurate classifier available sooner. The implementation also checks actual training progress against the early forecast. Every few epochs it can revise its estimate of eventual accuracy, and when the observed progression differs from the prediction it can rerun the allocation procedure with the updated estimate. It keeps the training configuration already in use for the running job. This reactive step lets new evidence influence GPU shares without requiring a new training run whenever a forecast changes.

### Experiments and results

#### What the authors ran and what they measured

The evaluation combines a deployment on GPU instances with a simulator driven by traces from that deployment. The camera feeds include data from moving vehicles and fixed sites. Waymo Open contributes 1000 video segments with 200K frames in total, and Cityscapes contributes 5K frames captured by 27 cameras. The stationary material consists of Urban Building video and Urban Traffic video from five intersections. Both stationary collections cover 24-hour durations. The range of views lets the authors study changes along a moving camera's route as well as changes that pass through a fixed field of view.

The main experimental setup uses 200 seconds per retraining window. For the two dashboard datasets, the authors assemble streams in chronological order from images associated with the same camera and then divide those streams into windows. The procedure is needed because those datasets lack continuous timestamps for the deployment the experiment emulates. In this setup, detector and classifier architecture names refer to different roles. The edge classifier used for the evaluation is ResNet18, from the family introduced in [Deep Residual Learning for Image Recognition](https://md.research.elamur.ai/free/en/papers/he-2015-deep-residual-learning-image-recognition/).

The teacher that supplies labels for training and evaluation is ResNeXt 101. The authors compare its outputs with human annotations on a subset for which both are available and report close agreement. The main reported accuracy metric is the percentage of images correctly classified under the evaluation labels. The authors also report GPU-time consumption and capacity. Capacity is the number of concurrent streams the system can handle at a specified accuracy target. They evaluate performance while the service keeps pace with the original frame rate, so an apparent accuracy improvement cannot come from letting a frame backlog grow indefinitely.

The deployment uses Nvidia V100 GPUs. The simulator replays measured inference accuracies and resource costs and uses traces of training progress against GPU-time. This allows the authors to test scheduling policies with different numbers of streams and GPUs and over longer periods than they cover with the same small deployment. The paper reports that the simulation and implementation produced similar results at small scale. The traces support the larger comparisons, including the GPU provisioning stress test.

#### What the uniform baseline fixes in advance

The uniform scheduler represents a service configured before the evaluation run. For each dataset, the authors measure candidate settings on a holdout consisting of two video streams that are excluded from the later tests. They identify the settings on the accuracy–cost frontier and choose Config 1 to represent high resource use and Config 2 to represent low resource use. The holdout also serves to customize the initial inference classifier. This design gives the baseline dataset-specific choices based on measured training outcomes.

A uniform run picks one of the fixed training configurations for all its windows and assigns a predetermined share of capacity to inference versus retraining. The authors test multiple such splits. A baseline described as allocating 90% to inference leaves 10% for retraining. In effect, this lets the study compare Ekya with static policies that favor live service to different degrees, while holding fixed their inability to choose a new training plan from one window to the next.

The paper also tests two alternative system designs. One moves retraining to the cloud and leaves the edge server to run inference. The other chooses a ready-to-use classifier trained on a previously seen window. These alternatives remove different costs from the edge schedule. Cloud training removes the local training job but adds a round trip for data and weights. A cache avoids the cost of training a new classifier in the current window, while putting the burden of adaptation on its rule for matching present conditions to past ones.

#### What happens as more cameras share the same GPUs?

On Waymo and Cityscapes, the advantage of Ekya over the tested uniform schedules grows as more streams share a fixed GPU provision. Across these concurrent-stream comparisons, the authors report accuracy advantages of up to 29% under 1 GPU and up to 23% under 2 GPUs. These are maxima in the comparisons, with the size of the advantage depending on the load and the available capacity. The reported metric concerns live predictions across the retraining window.

Under greater contention, Ekya puts more capacity towards inference and chooses less expensive updates. The shifts help preserve live prediction quality and give selected training jobs a chance of finishing in time to be useful. With a fixed split, adding streams shrinks each inference job's share. The training jobs also receive less compute while still using their preset settings. A job that would have finished with ample time left at a lower load can then occupy most of the window. Uniform scheduling can therefore lose accuracy through two related effects, reduced capacity for ongoing predictions and delayed access to improved weights.

The Cityscapes capacity comparison sets an accuracy target of 0.75. Ekya supports 2 streams with 1 GPU and 8 streams with 2 GPUs. The uniform policies scale less over those provisions. This result concerns the number of streams that meet the stated quality target. It is distinct from simply counting how many inference processes can be launched. A policy can technically serve more inputs and still have less capacity by this definition if their accuracy falls below the target.

A separate provisioning test holds the load at 10 concurrent streams and varies the GPU count in the trace-driven simulator. Ekya with 4 GPUs achieves higher average inference accuracy than the tested baselines with 16 GPUs. This is the comparison behind the reported 4× resource saving. The test shows the difference at a particular workload and set of baseline policies. The result reflects how much useful work each scheduler extracts from the available capacity as well as how much capacity it receives.

#### What happens if training is sent to the cloud?

Cloud retraining changes the critical path before updated weights can help live inference. The sampled video must travel to the cloud and the completed classifier must travel back. To illustrate that cost, the paper considers 8 streams, a 400-second window, and ResNet18 at the edge. For 720p video at 4 Mbps with 10% sub-sampling, it quantifies the upload burden as 160 Mb of training data for each camera in each window and reports a 398 Mb download for each classifier. For a cellular uplink of 5.1 Mbps and downlink of 17.5 Mbps, the paper reports a combined transfer time of 432 seconds even before cloud computation. The point of the example is that communication alone can consume the adaptation interval.

The authors add network delays to the simulator and compare edge and cloud retraining on Cityscapes, with 8 streams and 4 GPUs. They treat computation in the cloud as instantaneous, favoring the cloud alternative on training time. The comparison includes a cellular link, a satellite link, and a setup with two cellular subscriptions. The two-subscription setup improves the result over a single cellular link, while local updating achieves the highest accuracy of the settings compared.

Cityscapes inference accuracy with cloud or edge retraining Local retraining gives the highest inference accuracy among the tested link settings.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Cloud, cellular | 68.5 |
| Cloud, satellite | 69.2 |
| Cloud, cellular (2×) | 71.2 |
| Ekya at the edge (this paper) | 77.8 |

The authors estimate that the cloud alternatives would need 5×-10× the uplink capacity and 2×-4× the downlink capacity of the assumed links to match Ekya's accuracy. Those are bandwidth estimates for the examined settings and data movement, alongside the observed accuracy comparison in the simulation. Keeping the update at the edge avoids transferring the sampled videos and the returned weights over those links.

#### What happens if past classifiers are reused?

The cache experiment asks whether selecting a past update can accomplish much of the same adaptation at very little current training cost. The authors build a cache of classifiers trained on earlier Cityscapes windows. For a current window they represent its class distribution as a vector of category frequencies and choose the cached classifier whose training distribution is closest by Euclidean distance. This distance compares two vectors by how far apart they are in their class-frequency coordinates. With no training job in the current window, the cached system divides GPU capacity evenly among inference jobs.

The setting uses 8 GPUs and 10 video streams. Ekya averages 0.78 accuracy and the cache averages 0.72. The cache rule can detect that two windows have similar proportions of object categories. Its input gives it little basis for detecting a change in how those objects look. The result thus tests a concrete history-based substitute for training on recent data, in a setting where recent appearance changes are part of the adaptation problem.

Cityscapes average inference accuracy with cached classifiers or new updates Updating on recent video beats selecting past classifiers by class frequencies.

**The numbers**

| System or setting | accuracy (fraction) |
| --- | --- |
| Cached classifier, closest class distribution | 0.72 |
| Ekya continuous retraining (this paper) | 0.78 |

### What the ablations show

#### Adaptive shares and adaptive configurations each matter

The authors remove the two main scheduling adaptations separately in a factor analysis with 10 video streams and 4 GPUs provisioned. Ekya-FixedRes uses the uniform baseline's split between training and inference while retaining adaptive configuration selection. Ekya-FixedConfig retains the scheduling mechanism for GPU shares but uses the baseline's fixed training configuration. The comparisons show that each adaptation contributes to the full system's accuracy, with their value particularly apparent when the server has fewer resources for the work it needs to do.

Fixed shares limit the system even when it can identify a good training setting. A promising job may receive too little GPU capacity to deliver its gain promptly. An update with a smaller expected benefit may have a reservation that another job could use more effectively. Conversely, flexible allocation cannot give the scheduler a cheaper training option if the setting is fixed in advance. It can accelerate the existing configuration only by taking capacity away from another job. The ablations therefore connect the gain to two decisions with different effects on completion time and live quality.

This test of fixed configuration selection concerns the scheduler's ability to use current estimates to choose a training plan. It leaves several questions about individual profiler techniques to the separate profiling evaluation. For instance, the component comparison does not by itself determine how much of the system's improvement comes from reducing the trial dataset, terminating the trials early, or screening out weak candidates using their history.

#### Streams sharing a server can need different schedules

The resource-allocation analysis follows two Urban Building streams across several retraining windows. The uniform policy applies the same training configuration and splits resources equally between training and inference when it trains. Ekya sometimes leaves training out of a window and gives more retraining capacity to the stream for which the expected improvement is greater. In the example, stream #1 has the larger expected benefit and receives more of that capacity.

The reported accuracies for the two streams under Ekya are 0.82 and 0.83, both higher than under the uniform policy in that example. The allocation trace explains how an improvement in the aggregate can arise even when the scheduler chooses to favor one stream's training. A stream with little to gain from an update can keep serving video, and capacity given to the stream with the larger expected improvement can deliver a better classifier sooner. This is an example of behavior across windows and streams, distinct from the controlled comparison that holds one of the scheduler's adaptations fixed.

#### Finer scheduling steps improve the search at a runtime cost

The transfer quantum `Δ` controls the size of each proposed GPU transfer. The analysis uses the 10-stream setting of the provisioning test and compares a coarse step of 1.0 with the finer step of 0.1. The accuracy improvement from the finer step is roughly 8% in the paper's analysis. Smaller transfers allow the heuristic to consider splits that lie between whole-GPU changes, which matters when a modest change is enough for a job to adopt a better setting.

The finer setting increases scheduler runtime to 9.5 seconds in this sensitivity comparison. The paper reports that this takes 4.7% of a 200s retraining window and uses `Δ = 0.1` in its experiments. The paper also reports a scheduling time of 9.4s for 10 streams, 8 GPUs, and 18 configurations per classifier in a 200s window. These measurements describe the cost of making decisions. The work the decisions authorize, including profiling and training, has its own resource requirements.

The controlled comparison supports a practical choice of quantum in the evaluated workload. With a coarse step, a transfer may overshoot a useful allocation by taking more from a donor than the recipient needs. With a fine step, the search has to test more intermediate changes. The experiment measures both effects through final service accuracy and scheduler runtime, which lets the reader see the price of increasing the granularity of allocations.

#### The micro-profiler can be wrong without changing the best decision

For the direct accuracy-estimation test, the authors run the profiler across the training configurations using 5 epochs and 10% of the retraining data from all the Cityscapes streams. They compare the forecasts with outcomes from training on 100% of the data for 5, 15 and 30 epochs. The distribution of estimation errors is mostly unbiased in the authors' analysis, and the median absolute error is 5.8%. Here the error refers to the forecast of retrained accuracy. The evaluation reports it separately from the live accuracy the system obtains after using those forecasts to choose a schedule.

In the system comparison, the authors characterize micro-profiling as nearly 100× more efficient than profiling all configurations on the entire training data. The savings come from doing less work in each trial and cutting the number of trials. The scheduler can use an approximate estimate because its decision depends on the consequences of choosing one configuration and allocation over another. A forecast error can change the predicted score while leaving the preferred choice intact, especially if the strongest and weakest options have substantially different costs or completion times.

The authors test sensitivity directly by using the actual retraining accuracies as a starting point and adding controlled Gaussian noise to the predictions returned to the scheduler. With profiler prediction errors up to 20% in that experiment, the reported maximum drop in inference accuracy is 3%. This demonstrates resilience under the tested error process. In particular, it shows that the system-level cost of an imperfect forecast can be much smaller than the error in the forecast itself.

#### The Cityscapes analyses show why recent data can help

Earlier in the paper, the authors use video from a single Cityscapes city to study the training choice separately from the main scheduling experiments. They divide that stream into ten windows of 200s and evaluate the later five. A compact ResNet18 trained on other cities performs poorly on the later windows of the example city. Training once on the first five local windows improves performance. Updating on recent data yields the highest accuracy consistently in the example, with a reported advantage of up to 22% over the other training options.

The example contains changes in both class frequency and appearance. Bicycles become rare in windows 6 and 7, and the share of people varies across windows 6 − 10. The authors also show changes in the appearance of people, such as clothing and viewing angle. Similar class frequencies can therefore coexist with meaningful differences in the images. This gives context to the later cache result, which uses a class-frequency vector as its basis for choosing a past classifier.

The authors also train a larger ResNet101 on the initial local data. Its accuracy nearly matches that of the compact classifier undergoing continuous retraining, and the paper describes it as 13× slower than the compressed ResNet18. The larger classifier's performance suggests that the initial data in this example captured useful variation which the smaller one had difficulty retaining in an accurate classifier. The comparison explains why initial customization and continued adaptation can both matter in the edge setting.

A separate configuration analysis on Cityscapes shows a spread of up to 200× in measured training cost for the ResNet18 settings tested. Two particular configurations reach approximately the same accuracy, ∼ 76%, while differing by 6× in GPU cost. The timing is expressed in GPU seconds at 100% allocation. This is concrete evidence for inspecting a range of training choices: cases with similar eventual accuracy can have very different effects on how much live work the GPU can serve during the update.

### Limitations

#### Limits stated by the authors

The objective values mean accuracy across streams and across a window. The authors mention that their scheduling techniques could be applied to a different criterion, such as maximizing the minimum accuracy, and leave the evaluation of such criteria to future work. Raising the mean and protecting the least accurate stream are different optimization problems. The inference floor used in the scheduler is a feasibility condition on eligible configurations, while the reported capacity experiments ask how many streams can reach a specified accuracy target. These measures support claims about the objective the paper evaluates.

The design takes the retraining window length as given. The authors describe the decision procedure as applicable with a supplied duration and use different durations in the main experiments, illustrative schedule, and cloud analysis. Finding the best duration for a particular camera or changing it as drift unfolds is a separate decision. A window that is appropriate for the resource and drift patterns of one workload may be a poor choice for another, because duration changes both the time available to finish training and how long a newly updated classifier can contribute to the score.

The authors also report that fine temporal reallocation offered marginal gains in their design exploration. This motivates their choice to reconsider resource allocations mainly at job boundaries, with checkpoints and reactive corrections for progress that departs from estimates. That choice limits scheduling overhead. Its payoff is an empirical observation from the authors' setting, where the value of acting earlier has to justify the disruption of changing shares or reloading weights.

#### Limits visible in the experimental setup

The principal accuracy measurements refer to an object classifier. Video analytics also includes tasks with other outputs and error criteria, including object detection. A detector would require its own profiles for inference costs, training behavior, and the value of reducing resolution or sampling frames. The scheduling formulation provides a way to reason about those decisions, while the reported gains are evidence for the evaluated classification setup.

Teacher-generated labels support the scale of the evaluation, with human agreement checked on a subset. Such agreement gives a reason to use the teacher as a reference, but it leaves open how errors are distributed on other parts of the camera feeds. If the teacher struggles with a scene change, those errors can affect both what the student learns and how its output is scored. The reported accuracy tracks agreement with the labels used in each experiment. Establishing accuracy against human judgments under every camera condition would require broader manual evaluation.

The moving-camera streams also have a constructed temporal structure. Images associated with each camera are placed in chronological order to form the input streams because the datasets lack continuous timestamps for this purpose. This permits an orderly test of adaptation on successive windows, while the timing of change in those assembled streams can differ from an uninterrupted drive. The stationary videos provide observations over longer continuous periods, but the results across both kinds of data still reflect the particular feeds that were studied.

For larger resource provisions, the evaluation relies on replay of measured costs and accuracies. The small-scale agreement the authors report supports that approach for comparing schedulers. The comparison at larger scale nevertheless depends on the simulator's representation of completion times, accuracy progressions, and resource use. Production measurements could expose interactions among placement, job restarts, checkpointing, and shared GPU execution that matter differently as the workload or hardware changes. The reported 4× provisioning comparison belongs to the traced stress test.

#### Limits of the scheduler and its alternatives

The thief scheduler accepts immediately improving transfers and estimates their value using the candidate settings that survived profiling and pruning. A useful configuration can be missed if its history makes it look unpromising, or if a change that would improve the schedule requires several coordinated reallocations with little immediate benefit from the first move. The method offers a practical way to search a large space under time pressure. The objective and capacity constraints define the score and feasible choices, while the experiments establish how the heuristic performs against the selected alternatives.

Similarly, the inference floor uses accuracy estimates to decide whether a configuration is eligible. Guarantees about accuracy on future images would require knowing how well those estimates track the live scene. The Gaussian perturbation test probes one type of error in a retraining forecast. A persistent forecasting bias for a particular configuration or a condition poorly captured by the teacher could affect the schedule in a different way. Mean accuracy also gives a limited view of service quality: a mean can conceal brief periods or individual scenes with poorer results.

Each alternative tests a particular way to avoid local training costs. The uniform policies use holdout-selected configurations and prescribed GPU splits, so the result establishes an advantage over those static choices. The cloud comparison depends on its communication assumptions, including the links, sampled video, and size of the returned weights. The cache comparison depends on matching windows through class frequencies. A cache indexed by other information would answer a different question about reuse. The paper's comparisons are most informative when read in terms of the decision each alternative can make and the information it uses.

### What came after

The documented research record for this account identifies no later work that takes up Ekya's scheduling or profiling method. The paper closes by pointing to the broader question it opens: how to balance the current quality of a live service against the future benefit of updating it on the same hardware. Within the paper itself, evaluating objectives beyond mean accuracy remains an open direction.

## Cite

Cite as Romil Bhardwaj, Zhengxu Xia, Ganesh Ananthanarayanan, Junchen Jiang, Nikolaos Karianakis, Yuanchao Shu, Kevin Hsieh, Victor Bahl and Ion Stoica. 2020. Ekya: Continuous Learning of Video Analytics Models on Edge Compute Servers. arXiv:2012.10557.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2012.10557](https://doi.org/10.48550/arxiv.2012.10557) · [arXiv 2012.10557](https://arxiv.org/abs/2012.10557)

```bibtex
@misc{bhardwaj2020ekya,
  title = {{Ekya: Continuous Learning of Video Analytics Models on Edge Compute Servers}},
  author = {Romil Bhardwaj, Zhengxu Xia, Ganesh Ananthanarayanan, Junchen Jiang, Nikolaos Karianakis, Yuanchao Shu, Kevin Hsieh, Victor Bahl and Ion Stoica},
  year = {2020},
  doi = {10.48550/arxiv.2012.10557},
  eprint = {2012.10557},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2012.10557}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
