Adaptive clinical trials increasingly decide which treatment the next participant receives by feeding phone and wearable data, such as step counts, GPS mobility and sleep, into a contextual bandit. A contextual bandit is an algorithm that picks one of several options for each person given their measured context, observes the result, and updates. These devices run unattended in participants' pockets and homes. Security research on unattended sensor nodes has long shown that the hardware producing a reading cannot be assumed honest once someone has physical access to it. Cryptography protects the channel. It does not protect the sensor that feeds the channel. For an adaptive trial, this means a small number of fabricated or tampered readings could quietly shift allocation toward an ineffective protocol. Because treatment "dose" in behavioral and neuromodulation trials is already many-dimensional and poorly standardized, this kind of drift would be hard to notice afterward.
We propose to borrow one specific tool from power-grid security, structural vulnerability scoring, and apply it to the bandit's allocation rule. Power-grid engineers rank each measurement by two properties: how much a false value placed there shifts the system's estimate, and how undetectable that false value would be. We apply the same ranking to each context feature a trial bandit uses. The claim is that allocation vulnerability is concentrated in a few feature directions. If that holds, a trial can tie only those high-leverage features to corroborated or attested sources, and it loses little allocation quality compared with either trusting everything or discarding all passive sensing.
Core Claim and Relation to Prior Work
Two papers motivate the gap. Protocol for a bandit-based response adaptive trial … the Vibe Up study allocates participants across four digital interventions using baseline distress plus passive phone telemetry, fitting a Gaussian-process model and choosing arms by an optimistic upper-confidence rule. Its protocol assumes the telemetry is honest. Cardenas and Roosta describe the gap between physical and digital security in unattended deployments: once a node is captured, it emits correctly signed but false data.
The method comes from Sensitivity-Based Vulnerability Assessment of State Estimation. That paper derives, for a grid state estimator, a stealthiness score, a leverage score and a combined vulnerability score for each measurement. It also finds that these weak spots are structural and almost unchanged across operating conditions: the first singular value of the sensitivity matrix explained over 95% of variance on a 4-bus system, and 22 measurements on the New England 39-bus system had vulnerability above 0.95. That paper protects a static estimator. Our estimator is a learner whose errors compound, because corrupted allocations also corrupt the data used for the next update.
The closest bandit-security work plays different roles. Bayesian adversarial multi-node bandit for smart grid protection uses a bandit to decide which grid node to defend. There the bandit is the defender, not the target. Encrypted Linear Contextual Bandit keeps contexts and rewards encrypted in transit, which does nothing if the device produces a false value before encryption. Bant down-weights distributed updates that fail to reduce loss on a trusted "trial function," and it tolerates a majority of corrupted clients. We reuse its idea of a trusted anchor, but our anchor is a small randomly chosen subset of participants whose context is verified in clinic, not a server-side dataset.
Research Program
Take a fitted allocation model with per-arm predicted benefit $\mu_a(x)$ for context vector $x$. For each feature $k$, we define its allocation leverage as the fraction of participants whose chosen arm, $\arg\max_a \mu_a(x)$, flips under a perturbation $\delta$ confined to feature $k$. The perturbation must satisfy $|\delta| \le \epsilon_k$, and the perturbed context must still pass the trial's plausibility filter. Here $\epsilon_k$ is a per-feature physical plausibility budget, for example the step-count change a person could produce by shaking a phone. The plausibility filter plays the role of the grid paper's stealthiness score, and the flip fraction plays the role of its leverage score.
We extend this from single features to directions. We stack per-participant gradients of the arm-score margin with respect to $x$ and take their singular value decomposition. If the top singular direction dominates, as it did in the grid study, allocation vulnerability is low-dimensional.
The defense, which we call leverage-gated context, then treats features differently by score. Features whose vulnerability exceeds a threshold enter the allocation rule only when they come from an attested source or are corroborated. Corroboration means agreement with the clinic-verified anchor distribution, checked with a Bant-style trust score. When a high-vulnerability feature is not corroborated, it is replaced by its conditional expectation given the remaining trusted features. Low-vulnerability features pass through unchanged.
We will recompute scores after each mini-trial, because the model changes. This also tests whether the grid finding, that weak spots are structural and stable, carries over to a model that is still learning.
Baselines
The naive reference is the same contextual bandit run on clean data, which is the regret floor, and the same bandit run on corrupted data with no defense, which is the damage ceiling.
The strongest existing allocator is the neural contextual bandit family (Bootstrapped, Greedy, Dropout) from A Biologically Plausible Benchmark for Contextual Bandit Algorithms in Precision Oncology. That paper reports these models beat linear bandits and clinical rules, with rule-based guidelines covering only about 4.9% of cell lines. We found no reported result on Lacuna for the absolute cumulative-regret values on that benchmark, so we will reproduce them ourselves before corrupting anything.
A context-free Thompson sampling bandit that ignores all passive features is the most dangerous competitor, and we run it under identical budgets.
Two defenses serve as baselines. The first is a generic anomaly filter using Local Outlier Factor, a method that flags points that are unusually isolated from their neighbors, applied to contexts. The second is Bant-style trust weighting applied to every feature.
The key ablation applies the same total amount of gating or shrinkage uniformly across features rather than by vulnerability score. This isolates whether the ranking itself matters.
For fairness, all methods share the same backbone, the same number of hyperparameter configurations tuned on clean data only, the same anchor size, and identical random seeds. To beat the field, leverage gating must lower attack-induced excess regret relative to the uniform-gating ablation and to Local Outlier Factor filtering. It must also keep clean-data regret measurably below the context-free bandit.
Why not just…?
Why not just drop passive telemetry and allocate on verified baseline measures? This is a real threat. If context adds little, dropping it is safe and simple. Our experiments measure clean-data regret for context-free, verified-only and full-context allocation. If full context does not beat verified-only allocation, we will report that leverage gating reduces to feature dropping and restate the contribution as a diagnostic that tells a trial which features are safe to keep.
Why not just filter anomalous readings? Stealthy perturbations are, by construction, the ones an anomaly filter accepts. In addition, AnoShift shows that a Local Outlier Factor detector fell from 91.50 to 34.96 ROC-AUC under chronological shift, so such filters also degrade on honest but drifting populations. We test both failure modes directly.
Why not just attest every device, for example with physically unclonable hardware identities? The CRO-PUF WSN node on PSoC proves which chip produced a reading, not that the reading reflects the person. A shaken phone or a sensor worn by someone else is fully attested. Attestation is therefore one of the gating sources, not a substitute for gating.
Proposed Experiments
The primary testbed is the GDSC benchmark from the precision-oncology bandit paper. It contains about 900 cell lines tested against every drug, which gives full counterfactual outcomes. We treat a designated subset of raw features as "telemetry" and corrupt them before the 20-dimensional embedding step. Corruption rates run from 1% to 30% of units, and we use three attacks. Random noise tests robustness. A targeted attack pushes units toward a chosen arm. A leverage-aware attacker uses our own vulnerability scores, which gives a worst-case test.
The second testbed is a simulator matched to the Vibe Up design: four arms and up to twelve sequential mini-trials of about 120 participants. In this simulator, outcome dependence on context is calibrated so that the telemetry's clean value can be varied. The calibration uses a non-linear, phase-flipping response shape resembling the acute-versus-chronic reversal reported in the rTMS stroke network meta-analysis.
We report four metrics: cumulative regret, the fraction of participants steered to the attacker's target arm, the probability of selecting the correct best arm at trial end, and regret cost on clean data.
Decisive Checks
Three results would falsify the proposal. The first is if the top singular direction explains only a small share of allocation sensitivity; then vulnerability is not concentrated and gating few features cannot work. The second is if uniform gating matches vulnerability-ranked gating, which would mean the ranking adds nothing. The third is if the context-free bandit matches leverage gating on clean-data regret in the simulator across the realistic range of telemetry value. Any one of these would redirect the work toward simple feature dropping. That would still be a useful answer for trial designers.
References
- Protocol for a bandit-based response adaptive trial to evaluate the effectiveness of brief self-guided digital interventions for reducing psychological distress in university students: the Vibe Up study
- Rethinking security properties, threat models, and the design space in sensor networks: A case study in SCADA systems
- Sensitivity-based Vulnerability Assessment of State Estimation
- Bayesian adversarial multi-node bandit for optimal smart grid protection against cyber attacks
- Encrypted Linear Contextual Bandit
- Bant: Byzantine Antidote via Trial Function and Trust Scores
- A Biologically Plausible Benchmark for Contextual Bandit Algorithms in Precision Oncology Using in vitro Data
- AnoShift: A Distribution Shift Benchmark for Unsupervised Anomaly Detection
- Lightweight and Energy-Efficient Implementation of an Unclonable WSN Nodes on PSoC
- Comparative efficacy of different repetitive transcranial magnetic stimulation protocols for lower extremity motor function in stroke patients: a network meta-analysis