[ ← Back to Portfolio ] JITTER
SYSTEMS & ML ENGINEERING REPORT 01 NOVEMBER 2026 • 10 MIN READ • MIT OPEN SOURCE

On-Device ML Latency Decomposition & Root-Cause Classification

When on-device neural network inferences degrade, standard benchmarks report a single scalar and cannot isolate the physical cause. Jitter isolates thermal clock curtailment, JIT warmup drift, silent delegate fallback, and OS thread scheduling through automated controlled reruns on real silicon.

Ayush Dubey
Ayush Dubey
Software Engineer • @AyushDubey23
Python CLI v0.1.2 Android Native (Kotlin) LiteRT / TFLite Google Pixel 10a Telemetry
$ pip install jitter-ml
Download Signed APK (9.6 MB) ↓ Live Web Inspector ↗ PyPI Package ↗ Core Repo ↗ Android Repo ↗
01 / The Engineering Problem

Why Scalar Benchmarks Conceal Failures

In mobile and edge AI evaluation, models are almost universally reduced to a single execution average: "MobileNetV3 executes in 14.2 ms." This summary is comfortable for documentation, but it collapses the entire non-linear physical behavior of the device into a scalar that conceals critical production failures.

In reality, inference execution is bound to an active thermodynamic system. A model with an average latency of 14.2 ms across 300 iterations frequently behaves according to one of four destructive failure regimes:

REGIME A
Thermal Throttling
During continuous execution, chassis heat exceeds 38.0°C. The Linux thermal governor curtails GPU/NPU clock frequencies, causing latency to degrade from 12 ms to 38 ms after 90 seconds.
REGIME B
Silent Driver Fallback
When an unsupported operator (such as an unquantized LayerNorm or custom dynamic slice) is encountered, NNAPI and GPU drivers reject the graph and silently execute on single-threaded CPU without raising an exception.
REGIME C
JIT Warmup Drift
Early iterations take 40–60 ms due to memory buffer allocations, OpenCL kernel compilation, and weight paging before stabilizing. In cold app launches, this directly causes UI frame drops.
REGIME D
OS Background Noise
Thread migrations across big/LITTLE clusters, garbage collection cycles, and Android background daemons produce erratic p95/p99 latency spikes, masquerading as algorithmic regressions.
02 / Methodology

The Four Controlled Reruns Architecture

Rather than guessing from a single run, Jitter formulates root-cause attribution as a controlled physical experiment. Borrowing principles from differential testing and hardware fault analysis, Jitter executes four orthogonal reruns against the model:

Rerun Condition Physical Manipulation Decisive Evidence Isolated
1. Cold vs Warm Splits run data between initial iterations (1–5) and post-warmup steady-state iterations. Isolates memory allocation overhead, weight paging, and shader compilation from compute.
2. Cooldown Rest Enforces a mandatory 240-second rest period to return battery thermistors to ambient baseline. Proves whether latency increase recovers post-cooldown (thermal clock throttling) or persists (memory leak).
3. Delegate Swap Forces execution side-by-side across CPU, GPU (OpenCL/Vulkan), and NNAPI/DSP accelerators. Calculates step-change delta between requested vs executed silicon to uncover silent CPU fallbacks.
4. Quiet Device Suppresses background daemons, enforces core affinity, and samples the device noise floor. Separates intrinsic model jitter from OS context switches and background service pre-emption.
03 / Empirical Telemetry

Physical Hardware Telemetry: Google Pixel 10a

The following three production captures demonstrate Jitter running on physical hardware (Google Pixel 10a, Tensor G4 silicon, Android 17 API 37) under sustained LiteRT/TFLite workloads:

04 / Systems Architecture

Decoupled Wire-Protocol Architecture

To ensure reproducible benchmarks across CI pipelines and field devices, Jitter uses a decoupled client-server architecture over USB and local network:

[Python CLI Orchestrator] <-- Host Machine (Typer + NumPy + SciPy block-bootstrap) │ ▼ (TCP Port 8080 over ADB Socket Reverse Bridge) [Android Native Runner] <-- Physical Target Device (Kotlin + Jetpack Compose) │ ├── Hardware Telemetry Engine: Android PowerManager + Battery Thermistors (0.1°C precision) ├── Execution Engine: Google LiteRT 2.16 + TensorFlow Lite Runtime └── Statistical Decision Engine: Kolmogorov-Smirnov Distance & Delta Bounds

Hardware temperature is sampled directly via PowerManager.OnThermalStatusChangedListener and the Linux kernel thermal sysfs interface (/sys/class/thermal), ensuring that temperature rise is mathematically correlated with clock curtailment.

05 / Installation & Verification

Reproducibility & Getting Started

1. Python Command-Line Interface

# Install via pip $ pip install jitter-ml # Run hardware pre-flight checks across connected devices $ jitter doctor --device usb # Run 4-stage controlled diagnosis against a TFLite model $ jitter run mobilenet_v3.tflite --delegate gpu --iterations 300 --export report.json

2. Android Standalone APK (v0.1.2-alpha)

The official Android APK is signed with a 2048-bit RSA release certificate using APK Signature Schemes v2 and v3. It contains zero third-party trackers, zero advertising SDKs, and zero invasive permissions:

# Sideload directly to connected device $ adb install -r Jitter-v0.1.2-alpha.apk
Download Signed APK (9.6 MB) ↓