Should a Gesture Detector Share Layers with Its Classifier?

Phones, cars and small edge boards that watch a camera for hand gestures face a lopsided workload. Most of the time nobody is gesturing, so the system mostly has to answer the cheap question "is a gesture happening?" and only occasionally the expensive one, "which gesture was it?" The leading real-time design handles this with two separate networks. A tiny detector runs on every frame and wakes a large classifier only when it fires (Köpüklü et al.). Multi-task learning, where one network with a shared body and several output heads is trained on several objectives at once, points the other way. It suggests that one shared backbone gives better features and saves computation compared with separate models (Spathis et al., Nam et al.). The research file flags this disagreement as unresolved, and it cannot be settled by comparing hand-tuned systems. Each design's verdict depends on how its loss weights, gating threshold and layer widths were chosen, and on how often gestures actually occur.

We propose a third design and a fair way to test it. In a shared-trunk cascade, the detector is the first few layers of the classifier. Those layers run on every frame, the deeper layers run only when the detection head fires, and both heads are trained jointly. We use multi-objective Bayesian optimization, a sample-efficient search that fits a probabilistic model to past trials to decide which configuration to try next. With it we map the trade-off between streaming accuracy and measured on-device cost for three designs under an identical search budget: the shared-trunk cascade, the decoupled cascade, and a single always-on model. The central claim is a conditional one that can be tested. The shared trunk should win when gestures are frequent and the device is compute-bound, the decoupled cascade should win when gestures are rare, and the crossover should be predictable from measured layer costs.

Core Claim

Consider a streaming system that sees a fraction $p$ of frames containing gestures. Its expected per-frame cost is

$$C(p) = C_{\text{always}} + p \cdot C_{\text{gated}},$$

where $C_{\text{always}}$ is the measured latency or energy of everything that runs on every frame, and $C_{\text{gated}}$ is the cost of what runs only after the detector fires. In the decoupled cascade, $C_{\text{gated}}$ includes recomputing low-level features the detector already extracted. In the shared-trunk cascade those features are reused, but $C_{\text{always}}$ grows, because the shared early layers must be good enough for classification and not only for detection. Joint training also introduces a real multi-task conflict. Detection rewards cheap, temporally local evidence of motion onset, while fine-grained classification rewards rich spatial detail. The loss weight between the two heads therefore directly shifts both accuracy and the cost terms.

The claim is threefold. First, once every design is tuned by the same automated search, there is a range of $p$ in which the shared-trunk cascade dominates the decoupled one on the accuracy–cost frontier. Second, the boundary of that range is predicted by the formula above using measured costs. Third, jointly training the trunk on both heads matters for this result, compared with simply attaching a detection head to a classifier trained on its own. If the shared trunk never dominates at any realistic $p$, the decoupling argument of Köpüklü et al. is vindicated under fair tuning, and that is also a publishable answer.

Relation to Prior Work

Two papers motivate the question by taking opposite sides. Köpüklü et al. run a ResNet-10 detector on an 8-frame window and trigger a ResNeXt-101 classifier on a 32-frame window, reaching 460 FPS when idle and 62 FPS when the classifier is active. Their two networks share nothing, and the threshold and widths were set by hand. Spathis et al. train whole-body action recognition and hand gesture recognition jointly on a ResNet-3D-18. They find that a shared multi-task ResNet-18 beats a single-task ResNet-34, and that soft sharing through cross-stitch units works best. Their model is task-aware, with no latency, device or streaming constraint, and its loss weighting uses heuristics such as Dynamic Weight Average or uncertainty weighting. We keep their core observation that shared features help, but we apply it to detection plus classification on a live stream, where the "task" is decided by the model's own detector rather than supplied in advance. That is one concrete answer to the task-agnostic gap they leave open.

Three papers supply the search method. Eriksson et al. combine Gaussian processes that assume only a few hyperparameters matter (SAAS priors) with the noisy expected hypervolume improvement acquisition (qNEHVI). With this they tune a 24-dimensional on-device language model against p99 phone latency in 240 evaluations, cutting latency by more than 25%. We reuse that machinery directly, but on spatio-temporal video networks and with the gesture duty cycle as an explicit deployment variable. Barker et al. show that qLogNEHVI gives better Pareto fronts than Sobol or uniform sampling on multi-stage text pipelines. That supports treating our two-stage gesture pipeline as a coupled system rather than tuning stages separately. Ramachandram et al. search discrete multimodal fusion topologies with a graph-distance kernel and report a 5× speedup over random search on the Montalbano gesture data. Their search optimizes accuracy only, for a single task, and treats every architectural edit as equally costly. Our search includes discrete choices such as split depth, but its second objective is measured hardware cost, so edits with very different cost are separated by the measurements themselves.

Urban et al. argue that architecture comparisons are biased unless each competitor is tuned automatically. That argument is the methodological reason this study uses Bayesian optimization at all. Here the search is a tool for fair adjudication, not the contribution itself. Finally, RotoGrad resolves conflicting task gradients by rescaling them and rotating the shared features. We use it as an optional, more expensive alternative to a searched static loss weight, to check whether conflicts between the detection and classification gradients are what limits the shared trunk.

Research Program

We build one parameterized model family that contains all three designs as special cases. The backbone is a factorized spatio-temporal convolutional network. Its spatial and temporal convolutions are separated in the style of Pigou et al., which keeps it cheap enough for phone-class hardware. It runs on causal sliding windows. A detection head attaches after stage $s$, and a classification head sits at the top. If $s$ equals the full depth with gating disabled, the model is a single always-on classifier with an extra "no gesture" class. If the detector is a separate network with its own weights, the model is the decoupled cascade. Otherwise it is the shared-trunk cascade, in which deeper stages run only on windows the detector accepts, and they reuse cached early-stage activations from the frames already processed.

The search space has roughly 15 to 20 mixed variables, inside the range where SAAS priors are reported to help. They cover:

  • the split stage $s$ and the per-stage channel widths;
  • the detector and classifier window lengths;
  • the detection threshold and the number of consecutive firing frames required;
  • the static loss weight between the heads, or the choice of uncertainty or RotoGrad balancing;
  • the learning rate and weight decay.

The objectives are three: streaming Levenshtein accuracy on held-out continuous video, expected per-frame cost $C(p)$ measured on the target device, and detection delay in frames. Latency is measured on a mid-range Android phone and on a microcontroller-class board, reporting medians and p99 over repeated runs so that measurement noise enters the noisy acquisition function as intended. We measure $C_{\text{always}}$ and $C_{\text{gated}}$ separately. That way one search yields frontiers for every duty cycle $p$ without re-running devices. We then test whether the crossover predicted by the cost formula matches the crossover actually observed when streams are re-sampled to different gesture densities.

The analysis has two parts. First, for each design and each $p$ in a grid from rare (one gesture per minute) to dense (continuous signing), we compute the hypervolume of the frontier. Second, inside the shared-trunk family, we measure how the best loss weight and split depth move as the cost weight tightens. We also record the cosine similarity between detection and classification gradients on the shared layers, to see whether conflict grows when the trunk is made thinner.

Baselines

The do-nothing reference is the configuration of Köpüklü et al. as published. That means a ResNet-10 detector, a ResNeXt-101 classifier, their thresholds and their training recipe, run on our devices with RGB input. It anchors absolute numbers. Their reported result is 91.04% Levenshtein accuracy on EgoGesture, with throughput of 460 FPS when idle and 62 FPS when active on their hardware. The file gives an offline classification figure of 94.04% for the depth modality, but it does not state which modality the 91.04% streaming figure used. We will report both modalities and treat the RGB comparison as the one that matters for commodity cameras.

The strongest competitor is the same decoupled cascade, re-tuned by the identical SAAS-BO/qNEHVI search. It gets the same number of trials, the same training epochs per trial, the same devices and the same data splits. This is the baseline the shared trunk must beat. Its tuning removes the possibility that any gain comes only from our design receiving automated search. Beating it means a higher frontier hypervolume at some realistic $p$, beyond the spread across three search seeds. It also means matching or exceeding its Levenshtein accuracy at equal measured $C(p)$.

The single always-on model, a classifier with a no-gesture class searched under the same budget, represents the plain multi-task-free answer. It shows whether gating is needed at all on a given device.

The ablation that isolates the key ingredient is a shared-trunk cascade whose trunk is first trained for classification alone. The detection head is then trained on frozen features, with everything else searched identically. If this matches the jointly trained trunk, multi-task training is not what helps, and only feature reuse matters.

A second ablation fixes the head weights to equal values instead of searching them. A third replaces the Bayesian search with Sobol sampling at equal budget for every design. Without the third, any conclusion would rest on the search method.

Why not just…?

Why not just tune the decoupled cascade and stop? It may well be enough, and the study is designed so that this outcome is visible. The tuned decoupled cascade is the main baseline. If its frontier dominates the shared trunk at every tested duty cycle, we report that feature reuse does not pay for the added always-on cost. That would confirm the argument of Köpüklü et al. under fair tuning. The cost formula predicts the opposite only when gestures are frequent enough that recomputing early features in the classifier dominates the budget. Whether that regime appears on real devices is exactly what the measurements decide.

Why not just run one small always-on model with a "no gesture" class? On fast hardware with dense gestures this could beat both cascades, since any gating adds threshold errors and delay. Vandersteegen et al. show that a 1.09M-parameter, 34M-FLOP thermal model reaches 95.9% accuracy at one-frame latency, so small always-on models are a real threat. We include this design in the same search. If it wins, gating is unnecessary on that device and duty cycle, and the result maps where gating starts to matter.

Why not use random or Sobol search instead of Bayesian optimization? Ramachandram et al. report 2× to 5× fewer evaluations than random search, and Barker et al. report better fronts than Sobol. Those results come from different search spaces, though. We run Sobol at equal budget for every design. If the ranking of the three designs is the same under Sobol, the Bayesian search was merely convenient, and the architectural conclusion stands either way.

Why not use uncertainty weighting or Dynamic Weight Average instead of searching the loss weight? Spathis et al. found these heuristics workable for joint action and gesture training. They balance training losses, however, not deployment cost. Each loss weight shifts the detector's firing rate and therefore $C(p)$. Uncertainty weighting is included as one option inside the search. If it is chosen consistently and matches the searched static weights, the simpler heuristic suffices.

Proposed Experiments

The main benchmark is EgoGesture, which offers continuous egocentric streams and the published cascade number above. nvGesture is the second benchmark, an automotive in-cabin setting where the file reports 83.82% offline depth accuracy for ResNeXt-101 and no streaming figure. ChaLearn LAP ConGD tests dense continuous streams with boundary scoring. There the reference points are a Mean Jaccard Index of 0.3164 for RGB-only factorized networks (Pigou et al.) and 0.7179 for segmentation followed by recognition (Wan et al.). We use RGB only so that the hardware is a commodity camera. Each design receives 240 search trials, matching the budget of Eriksson et al., on each of two devices, with three search seeds.

Three checks decide the claim, and each has a stated failure condition. In the first, the jointly trained shared trunk must achieve higher hypervolume than the tuned decoupled cascade for gesture densities typical of ConGD, beyond the seed variance. Failure here falsifies the main claim. In the second, the duty cycle where the two designs cross, predicted from separately measured $C_{\text{always}}$ and $C_{\text{gated}}$, must fall within one grid step of the crossover observed on re-sampled streams. Failure means the cost model misses real effects such as cache or memory traffic, and the result should not be generalized to unseen devices. In the third, the frozen-trunk ablation must lose measurably to joint training at matched cost. If it does not, the benefit comes from feature reuse alone and multi-task learning should be dropped from the explanation. A single lucky configuration does not count as a win; each check must hold across seeds and on both devices for the conclusion to stand.