Visual-inertial odometry (VIO) estimates a robot's position and orientation by fusing camera images with an inertial measurement unit, a sensor that measures acceleration and rotation rate. In practice it works only after someone hand-tunes a dozen thresholds: when to add a keyframe, how many features to track, when to reject a match as an outlier, and how much to trust vision relative to inertia. Recent work trains reinforcement learning (RL) agents to set these knobs at every timestep. Those agents, in turn, need a hand-built reward, usually ground-truth position error minus a weighted runtime penalty. So the tuning burden moves from the estimator to the reward. It also ties training to motion-capture ground truth, which does not exist where robots are actually deployed.
We propose a reward that needs no ground truth and no human weighting. On a stereo rig, the estimator runs on the left camera and the inertial sensor only. The right camera is held out entirely. The reward is how well the estimator's current map and trajectory predict where its landmarks appear in held-out right-camera images, both at the same instant and several frames later. The controller has no influence over what enters this score, so it cannot inflate the score by changing what the estimator ingests. This is the property that a reward based on the estimator's own reported uncertainty lacks. Our central claim is testable. A held-out cross-camera prediction reward lets an RL controller for tightly coupled VIO match a ground-truth-trained controller. A reward built from the estimator's own covariance or information matrix, which is the obvious "principled" alternative, gets gamed.
Why this gap, and why not the obvious one
The closest prior work is Reinforcement Learning Meets Visual Odometry. It trains an agent on map statistics to adjust keyframe selection and feature-grid size, and improves DSO accuracy by 19% on EuRoC. That work is limited to monocular odometry, explicitly leaves visual-inertial odometry open, and uses a privileged critic with future ground-truth poses plus a hand-weighted runtime penalty. Dual-Agent Reinforcement Learning for Adaptive and Cost-Aware Visual-Inertial Odometry does work in the visual-inertial setting, but uses RL to gate expensive visual updates for speed, again with hand-engineered rewards trading localization error against compute. Both papers motivate the proposal: they show learned control of an estimator helps. Both also expose the reward as the remaining manual component.
The obvious bridge between the two research directions is the one suggested by active-perception critiques. APACE notes that visibility is not the same as usefulness. ViDAR concedes that its Shannon-entropy feature-spread reward ignores depth and quality. Both point toward using the factor graph's Fisher information (the matrix measuring how tightly the measurements pin down the state) as the reward.
We argue this reward is unsafe exactly when the agent controls the estimator. Raising the outlier threshold admits more, wrong, constraints. Inflating inertial trust shrinks reported covariance. Both make the estimator more confident without making it more correct. This is the reward-hacking failure that the reward-engineering literature warns about (Active Reward Learning), now with the agent able to edit the sensor that grades it. Our proposal treats the reward-engineering direction as the core methodological problem and VIO as the regime in which that problem has an unusually clean solution: a physically separate, held-out measurement stream.
Core Claim
Let $\pi$ be the controller and $\hat{x}_t$ the estimator's pose and landmark estimate at time $t$, computed from left-camera and inertial data only. Let $\mathcal{L}_t$ be the set of currently tracked landmarks. For each landmark $\ell$, let $\hat{p}_\ell$ be its estimated 3D position and $u^{R}_{\ell,t+k}$ its matched pixel in the right image at time $t+k$. The reward is
$$r_t = -\frac{1}{|\mathcal{L}_t|}\sum_{\ell \in \mathcal{L}_t}\ \sum_{k \in \{0,\dots,K\}} \rho\!\left(\big\|\, \Pi_R(\hat{x}_{t+k}, \hat{p}_\ell) - u^{R}_{\ell,t+k} \big\|\right),$$
where $\Pi_R$ projects a 3D point into the right camera using the calibrated stereo extrinsics, $\rho$ is a robust loss, and $K$ is a short horizon.
The $k=0$ term checks landmark depth, and therefore metric scale, because the stereo baseline is known. The $k>0$ terms check the estimated motion between frames. Compute is handled as a constraint rather than a weighted penalty. The controller must keep mean per-frame processing time under a user-stated budget, enforced with a Lagrange multiplier that adapts during training. The only number a person supplies is therefore a deployment requirement in milliseconds, not a trade-off weight.
Two hacking routes remain, and we close both by design. The first is shrinking $\mathcal{L}_t$ to keep only easy landmarks. A fixed set of right-image keypoints, detected independently of the estimator, defines the evaluation set; a keypoint with no matched landmark scores worst-case. The second is losing track entirely. A failed frame receives the worst-case value of every term, which is a property of the score, not an added penalty weight.
Research Program
We build the controller on top of an open-source optimization-based estimator, VINS-Mono, run in its monocular-plus-inertial configuration. Its action space extends the one in Reinforcement Learning Meets Visual Odometry with visual-inertial knobs: keyframe insertion, feature budget, outlier threshold, and the relative weighting of inertial pre-integration and reprojection factors. Observations are compact map and inertial statistics, following that paper's design, so the policy stays cheap to run.
Training happens in two stages. We first pretrain on TartanAir, with inertial readings synthesized from its ground-truth trajectories and stereo pairs rendered. We then fine-tune on unlabeled real stereo-inertial sequences. This second stage is only possible because the reward requires no ground truth.
The analysis has three parts. First, we measure how well each candidate reward correlates with true trajectory error under the same policy rollouts. Second, we probe hacking directly by optimizing each reward and tracking the gap between reward improvement and ground-truth improvement. Third, we fine-tune on one environment type and test on another, which measures whether label-free adaptation transfers.
Baselines
The naive reference point is VINS-Mono with its default thresholds, run monocular-plus-inertial on every sequence. Any learned controller must beat it, or the exercise is pointless.
The second baseline is a per-dataset grid search over the same action parameters, held fixed for each sequence. The search is selected with ground truth on training sequences and given the same number of estimator runs that RL training consumes. This baseline represents what a careful practitioner actually does.
The strongest competitor is a ground-truth-reward controller. It uses the same architecture, action space, observations, and compute constraint, but is rewarded with sliding-window position error from a privileged critic, as in Reinforcement Learning Meets Visual Odometry. Both controllers share training steps and hyperparameter search budget. This is the oracle we aim to match, not necessarily beat. Our success criterion is coming within 10% of its Absolute Trajectory Error (ATE) on EuRoC and TUM-VI after TartanAir training. Beating it on real data, after label-free fine-tuning that the oracle cannot perform, would be the strong result.
For external context, Dual-Agent Reinforcement Learning for Adaptive and Cost-Aware Visual-Inertial Odometry reports an average ATE of 0.092 m on EuRoC MAV. The TUM VI Benchmark reports BASALT at 1.20 m ATE on the 918 m outdoor loop, and RMSE often under 2 cm indoors for OKVIS, VINS-Mono, and BASALT. These systems differ in backbone, so we report them as reference points rather than controlled comparisons.
The key ablation isolates the held-out ingredient. It swaps our reward for the same controller rewarded with the log-determinant of the sliding-window information matrix, computed from the factor graph. A second variant computes the same reprojection score but on left-camera measurements the estimator has already used. If our gains come from the held-out property rather than from the reprojection form, both variants should hack and degrade ground-truth accuracy.
Why not just…?
Why not just reward the estimator's Fisher information or covariance, as the active-SLAM literature suggests? Prior uses of information-style rewards control the camera or the vehicle, not the estimator's own trust and rejection settings. In ViDAR, for example, the reward is image-plane entropy steering a rotating camera (ViDAR). Once the policy can lower outlier thresholds or upweight inertial factors, reported information rises regardless of correctness. We do not assume this hacking happens; the information-reward ablation tests it. If that controller matches ours on ground-truth ATE, the held-out design is unnecessary, and we would report that.
Why not just grid-search the thresholds once per domain? Reinforcement Learning Meets Visual Odometry shows that fixed tuned rules fail under abrupt changes such as aggressive rotation, where tuned SVO loses tracking entirely. A fixed setting cannot respond within a sequence. Our grid-search baseline tests whether that finding holds for visual-inertial odometry, where the inertial sensor may already absorb most rotational failures. If the grid search comes within noise of the learned controllers, the learning component is not justified for VIO, and that is a publishable negative result.
Why not just optimize the held-out score online, per window, without RL? This is the most serious threat. A per-window search could pick the parameter setting that best predicts the right camera, using something like greedy evaluation or small Bayesian optimization over a few candidates. That would drop RL entirely. Its weaknesses are cost and myopia: it needs several estimator runs per window, and it cannot anticipate that a cheap choice now, such as skipping a keyframe, causes drift later. We run it as an additional baseline at matched wall-clock compute. If it matches the RL controller, the contribution reduces to the reward itself, which we would still consider the main finding.
Why not just train on simulated ground truth and transfer zero-shot? Messikommer et al. already transfer from TartanAir to EuRoC zero-shot. Our label-free fine-tuning matters only if a sim-to-real gap remains. We measure that gap directly by comparing zero-shot and fine-tuned controllers on held-out real sequences.
Proposed Experiments
We train on TartanAir and evaluate on all EuRoC MAV and TUM-VI sequences. For both datasets we report ATE, failure rate, and mean per-frame compute against the budget. The first decisive check is the reward-validity study. Across rollouts from many policies, the held-out score should rank-correlate with ground-truth ATE, while the information-matrix reward should correlate positively at first and then diverge once optimized.
The second decisive check is label-free adaptation. We fine-tune on TUM-VI indoor sequences with no ground truth, then test on held-out TUM-VI outdoor sequences and EuRoC. The fine-tuned controller should reduce ATE relative to its own zero-shot version.
The third check targets the reward's blind spots. The held-out score cannot detect slow global drift outside the $K$-frame horizon. We therefore report long-sequence error separately, including the 918 m TUM-VI loop. We will show results for increasing $K$ and state honestly where the self-supervised reward stops tracking true accuracy.
References
- Reinforcement Learning Meets Visual Odometry
- Dual-Agent Reinforcement Learning for Adaptive and Cost-Aware Visual–Inertial Odometry
- APACE: Agile and Perception-aware Trajectory Generation for Quadrotor Flights
- A Novel ViDAR Device With Visual Inertial Encoder Odometry and Reinforcement Learning-Based Active SLAM Method
- Active Reward Learning
- The TUM VI Benchmark for Evaluating Visual-Inertial Odometry