Learned safety filters for robot swarms can now keep a thousand simulated agents apart while each one only looks at nearby neighbors. In the physical world, though, two quadrotors that are geometrically "safe" can still knock each other out of the sky. The air pushed down by one drone's rotors (its downwash) hits the drone below, and air reflected off nearby walls shakes a drone flying close to them. Today's distributed safety filters measure safety as a distance between points. They treat this airflow as part of a fixed world that the simulator either models wrongly or leaves out. The usual fix is to make every safety bubble larger, which wastes most of the space the team could use.
We propose to keep the distance-based safety certificate and add something to the condition that enforces it: a disturbance margin, learned from real flight data, attached to each neighbor pair and each nearby wall. The margin depends on where the neighbor sits relative to the drone, how fast the two are moving, and how close the drone is to a surface. It is calibrated so that, with a chosen probability, it upper-bounds the real acceleration error the simulator fails to predict. In open space the margin shrinks to almost nothing. It grows directly under a fast-moving neighbor or beside a wall. The swarm can therefore pack tightly where the air is calm and give way only where the air is rough. We treat the sim-to-real gap as a per-edge disturbance bound to be measured, not as a parameter range to be randomized.
Core Claim
A control barrier function is a scalar score $h$ that is positive in safe states. A controller stays safe if it never lets $h$ fall faster than some rate proportional to $h$ itself. GCBF+ learns such a score with a graph neural network over each agent's neighbors and filters actions with a small quadratic program. We replace its nominal decrease condition with a robust one:
$$\nabla_{x_i} h(x)\cdot\big(f(x_i)+g(x_i)u_i\big) + \alpha\, h(x) \;\ge\; \|\nabla_{v_i} h(x)\| \Big(\sum_{j\in\mathcal N_i}\hat d(z_{ij}) + \hat d_w(z_{iw})\Big),$$
The terms are as follows. $x$ is the joint local state. $x_i$ and $u_i$ are agent $i$'s state and action, and $f, g$ are the nominal simulator dynamics. $\alpha>0$ is the decay rate. $\nabla_{v_i}h$ is the gradient of the score with respect to agent $i$'s velocity, which is where acceleration errors enter. $\mathcal N_i$ is the set of sensed neighbors. $\hat d(z_{ij})$ is a learned bound on the unmodeled acceleration that neighbor $j$ induces, as a function of the relative state $z_{ij}$ (relative position, relative velocity, and the neighbor's thrust). $\hat d_w(z_{iw})$ is the analogous bound for the nearest wall or floor.
The claim is that a bound which depends on relative velocity and wall proximity, calibrated on real flights, lets teams fly measurably denser and faster than any fixed geometric safety set, whether spherical or ellipsoidal, at the same real-world violation rate. If a well-tuned fixed ellipsoid matches it, the claim is false. The experiments are designed to settle that question directly.
Where This Sits in Prior Work
Three papers motivate the gap. GCBF+ and its predecessor Neural Graph Control Barrier Functions scale distributed barriers to very large teams (over 98% success at 1024 agents after training on 8). GCBF+ was flown zero-shot on Crazyflie drones, but it defines inter-agent safety as Euclidean distance and assumes the nominal dynamics are correct. Downwash-aware trajectory planning shows that downwash matters for 32 nano-quadrotors: refined plans cut peak acceleration from 5.2 to 1.6 m/s². It encodes downwash as a fixed vertical ellipsoid inside an offline planner that does not react to what happens during flight. Estimation and Adaption of Indoor Ego Airflow Disturbance measures acceleration variance near walls more than 20 times higher than in open space and turns it into time-varying safety margins. Those margins bound 82–97% of real variance and cut jerk cost from 22,848 to 5,770.6 (m/s³)². That work covers a single drone, and its disturbance model is a voxel grid tied to one pre-mapped room.
We borrow the idea of a measured, state-dependent margin from the airflow paper. We index the margin by relative state instead of room coordinates, so it transfers to unmapped layouts and to moving neighbors. We also attach it to a distributed learned barrier instead of a single-agent planner.
NeuroBEM supplies the method for the residual model. It fuses blade-element physics with a temporal convolutional network and halves force and torque prediction error. It is open-loop and single-drone. We use a much smaller version of the same gray-box idea to predict the residual, and then wrap a calibrated upper quantile around that prediction.
Two papers constrain the design. Model-based Dynamic Shielding warns that a shield built on a learned world model loses its guarantees when the model mispredicts. This is why we use a calibrated bound on the residual and not the residual's mean prediction. Rectified Robust Policy Optimization shows that Lagrangian dual methods can break down under model uncertainty. This is why safety lives in a filter rather than in a reward multiplier.
Sim-to-Lab-to-Real and Provably Safe Sim-to-Real Transfer give statistical safety certificates for transfer, but only for single agents (the latter is also tabular). Our calibration step is a much more modest, continuous, multi-agent counterpart. It certifies only the disturbance bound, not the whole policy.
Research Program
The work has four parts.
The first is a residual dataset. We use Crazyflie 2.1 drones under motion capture. Pairs and triples fly scripted relative passes that sweep vertical offset, horizontal offset, closing speed, and the upper drone's thrust, and single drones fly corridor passes at 2 m and 4 m wall spacings, mirroring the airflow paper. At each step we record the residual acceleration: measured acceleration minus the nominal model's prediction. Scripted flights at conservative separations, inside a nominal GCBF+ filter, bootstrap the data. We then extend coverage toward closer separations as the bound tightens. This staged widening is safer than random excitation, a risk the provable-transfer gap analysis explicitly flags.
The second part is the bound model. A small network per edge type (drone–drone and drone–wall) takes $z_{ij}$, optionally with a short state history in the spirit of NeuroBEM. It outputs a high quantile of residual magnitude. We calibrate that output with split conformal prediction on held-out flights, so the bound holds at a target coverage of 95% on exchangeable data. We will report coverage separately for each condition (stacked, crossing, near-wall), because pooled coverage can hide failure in exactly the regime that matters.
The third part is the barrier itself. We retrain GCBF+ in gym-pybullet-drones, which runs much faster than real time and models downwash and ground effect natively. The robust condition above replaces the nominal one in both the training loss and the runtime filter. Because the margin adds only one scalar per edge to the quadratic program's constraint, filter cost grows only by the cost of one small network evaluation per neighbor. Like GCBF+, we run the filter offboard at the motion-capture rate. Onboard execution on the 168 MHz microcontroller is out of scope.
The fourth part is the deadlock analysis. Larger margins can freeze agents, a known failure of distributed barriers in tight spaces. We will measure whether state-dependent margins reduce freezing relative to fixed inflation, which is the efficiency half of the claim.
Baselines
The naive reference point is GCBF+ exactly as published: a Euclidean safety radius and nominal dynamics, retrained in the same simulator with the same network size, training steps, and hyperparameter search budget. Its reported results are 95% success among 128 obstacles and over 98% success at 1024 agents in simulation. We found no reported result on Lacuna for GCBF+ under downwash or near-wall flow, so we will produce that number ourselves. Beating it means fewer real violations at equal or better success.
The strongest existing competitor on this question is GCBF+ with the fixed asymmetric downwash ellipsoid from Downwash-aware trajectory planning, plus a fixed wall margin. Both ellipsoid axes and the wall margin are tuned by grid search on the same real calibration flights our bound uses. This gives it the same real data and the same tuning budget. It is the strongest baseline because it already captures the dominant asymmetry, that being below a neighbor is worse than being beside it. To beat it, we must reach a higher packing density or shorter makespan at a matched violation rate, or a lower violation rate at matched density. We must also show that the gap concentrates where velocity or wall proximity matters.
The same paper's offline planner is a non-reactive reference for formation-change tasks. It reported peak acceleration of 1.6 m/s² after refinement, which we will compare against on the same task.
Three ablations isolate the key ingredients. The first restricts the bound's inputs to relative position only, which is effectively a learned static shape. If it matches the full model, velocity and wall dependence add nothing. The second removes conformal calibration and uses the network's raw output. The third subtracts the mean predicted residual NeuroBEM-style instead of bounding it.
Finally, we include a GCBF+ policy trained with domain randomization over downwash strength and drag, under the same training budget.
Why not just…?
Why not just inflate the safety radius? The airflow paper already shows the two-sided failure on real hardware. A 0.2 m margin crashed in narrow gaps. A 0.4 m margin roughly quadrupled jerk cost (22,848 vs 5,770.6). SwarmCCO reports both grazing collisions and frozen agents with fixed buffers in dense swaps. We include sphere inflation, swept over several radii, to trace the density-versus-violation curve that our method must dominate.
Why not just use the downwash ellipsoid inside GCBF+? This is the real threat, and it may capture most of the benefit in hover-like conditions. Our bet is that wake strength changes with closing speed and with wall reflection, which a fixed shape cannot express. The position-only ablation and the speed-sweep crossing experiment are designed to test that bet. If the tuned ellipsoid sits on our curve, we will report that the simpler method suffices and that the contribution reduces to the calibration procedure.
Why not just randomize the simulator's aerodynamics? Randomization trades sharpness for robustness. It tends to yield uniformly timid policies, as reported for multi-agent grounding in JL-GAT and for swarms in SwarmCCO. It also gives no statement about how often the real disturbance exceeds what was trained on. The randomized baseline tests this directly, and we expect it to lose on density, not on safety.
Why not just learn the residual and cancel it? Cancelling the mean residual improves tracking: NeuroBEM cut RMSE from about 0.8 m to below 0.3 m. But turbulent wake has large variance around its mean, and a shield that trusts a point prediction inherits the failure mode MBDS warns about. The mean-compensation ablation measures how many violations remain when only the mean is corrected.
Proposed Experiments
In simulation, we use the GCBF+ 3D quadrotor tasks inside gym-pybullet-drones with downwash and ground effect enabled. Team sizes run from 8 to 64. Scenarios include position swaps, vertical stacking, and corridor flight. We measure success rate, violation rate (contact, or altitude loss above 10 cm, or attitude excursion above a fixed threshold), deadlock rate, makespan, and minimum achieved vertical separation.
On hardware, eight Crazyflies fly three decisive tests. The first is a stacked-crossing sweep, in which one drone passes over another at 0.3, 0.8, and 1.5 m/s. Our margin should vary with speed while the ellipsoid stays fixed, so this test separates them most sharply. The second is an eight-drone swap through a 2 m corridor. The third is a formation change matching the downwash planner's task.
Each method is tuned on the same calibration flights and evaluated on fresh flights, with at least 20 trials per condition. We report empirical bound coverage per regime alongside the density-versus-violation curves. The proposal succeeds if our curve lies strictly below the tuned-ellipsoid curve in the crossing and corridor tests and if per-regime coverage stays near the 95% target. It fails, informatively, if the position-only ablation closes the gap.
References
- GCBF+: A Neural Graph Control Barrier Function Framework for Distributed Safe Multiagent Control
- Neural Graph Control Barrier Functions Guided Distributed Collision-avoidance Multi-agent Control
- Downwash-aware trajectory planning for large quadrotor teams
- Estimation and Adaption of Indoor Ego Airflow Disturbance with Application to Quadrotor Trajectory Planning
- NeuroBEM: Hybrid Aerodynamic Quadrotor Model
- Model-based Dynamic Shielding for Safe and Efficient Multi-agent Reinforcement Learning
- Rectified Robust Policy Optimization for Model-Uncertain Constrained Reinforcement Learning without Strong Duality
- Sim-to-Lab-to-Real: Safe reinforcement learning with shielding and generalization guarantees
- Provably Safe Sim-to-Real Transfer
- Learning to Fly - a Gym Environment with PyBullet Physics for Reinforcement Learning of Multi-agent Quadcopter Control
- SwarmCCO: Probabilistic Reactive Collision Avoidance for Quadrotor Swarms Under Uncertainty
- Joint-Local Grounded Action Transformation for Sim-to-Real Transfer in Multi-Agent Traffic Control