Decision-Preserving Semantic Coding of Rover Hazard Maps

A Mars rover sees far more terrain than it can downlink, and every round trip to Earth costs 6 to 44 minutes, which in practice often means a lost day of driving. Ground planners rarely need the rover's terrain map pixel by pixel. They need to answer a handful of questions: which routes to candidate science targets are safe, and how expensive is each one? This note proposes compressing the rover's terrain-class map so that the reconstruction on Earth gives exactly the same answers to a stated family of route questions as the full map would, while discarding everything the answers do not depend on. The construction also has a safety property: every route the ground finds in the reconstruction exists in the true map at the same cost. That holds even for questions the rover was never told about.

The coding idea is borrowed from semantic arithmetic coding, which spends bits only on which group of "meaning-equivalent" inputs occurred rather than on the exact input. The new step is to define the groups by planner decisions instead of hand-picking them. In prior work those groups were hand-crafted over 2×2 pixel edge patterns and bought roughly a 1% gain. We expect decision-defined groups to be much coarser, so the gains should be far larger. We also expect the rate to grow with the length of the routes queried rather than with the map's area.

Core Claim

The relevant prior method is Semantic Arithmetic Coding using Synonymous Mappings. It groups symbol patterns into "synonymous sets" that share a meaning and arithmetic-codes the set instead of the pattern, so the code length approaches the entropy of the partition, which the authors call semantic entropy. On BIPEDv2 edge maps it comes within $4\times10^{-6}$ sebits per block of that limit. However, it improves on ordinary arithmetic coding by only 1.36% on average over 50 images, because its 11 hand-made synonym classes merge very little. The authors list automatic discovery of synonym sets for complex sources as open. Treating the 1.36% figure as a warning, we reject the obvious transplant: running the same coder with hand-made classes on Martian label maps would likely save similarly little.

Our claim is that a ground query family supplies the synonym partition automatically and exactly. We write $M$ for a terrain-class map, $c(M)$ for the traversal-cost map it induces, and $G$ for a set of start–goal pairs uplinked asynchronously as part of supervised autonomy. Two maps are synonymous if they give the same $\epsilon$-optimal route set and route costs for every query in $G$.

The rover builds a representative of the class $[M]$ as follows. It computes a relevance mask $R$, the union of all $\epsilon$-optimal corridors for queries in $G$. It sends the exact labels inside $R$ and marks every cell outside $R$ as impassable. Optimal corridors are untouched and every other cell's cost can only go up, so shortest-path answers for $G$ are preserved exactly. Any path found later in the reconstruction is a real path with its true cost, so the reconstruction is conservative for every query.

The coder's target is the entropy of $[M]$ under a learned context model of label maps. For a fixed query family on a map of side $N$, the corridors occupy about $|G|\cdot N\cdot w$ cells, where $w$ is the corridor width. The map has $N^2$ cells. The semantic rate should therefore scale roughly as $|G|N$ rather than $N^2$, and the per-cell rate should fall toward zero as the map grows. That growth argument is the code-optimality content of the proposal, and it is directly testable.

Research Program

We will build three components. The first is a cost model and planner, using a grid A*/Dijkstra with class-dependent costs over the four AI4MARS classes and treating sand and big rocks as near-impassable. The second is a mask generator that outputs the minimal corridor set for given $G$ and $\epsilon$. The third is a context-adaptive arithmetic coder over the mask and the in-mask labels, using the interval-merging mechanism of semantic arithmetic coding for the "don't-care" symbol.

The analysis has two parts. The first measures the gap between achieved code length and the semantic entropy estimate, and its scaling with $N$ and $|G|$. The second characterizes the trade-off curve between sending only the plan, which answers one query, and sending the full map, which answers all queries. Along that curve we measure what fraction of held-out ground queries, ones never uplinked, are still answered correctly, and how often they are answered conservatively rather than wrongly.

Latency enters as the cost model for the gaps in $G$. A held-out query answered only conservatively may trigger a re-request, and each re-request costs a round trip.

Running time matters because flight processors are slow. A Comprehensive Approach to On-Board Autonomy Verification and Validation reports about 540 seconds for plan generation for a 53-variable rover model on a LEON3 processor within 32MB. That paper motivates a hard budget: mask generation plus coding must cost a small fraction of one onboard planning cycle. We will report cycle counts on a LEON3-class emulator, or on a low-power embedded CPU if emulator access is unavailable.

We use AI4MARS: A Dataset for Terrain-Aware Autonomous Driving on Mars for terrain labels. It contains 35,000 rover images with four-class labels and 1,500 expert gold labels, and it reports a DeepLabv3+ segmentation test accuracy of 96.67%, with big rocks at 93.2%. Its labels are in image coordinates. Our first planning experiments therefore run on an image-plane grid as a proxy, and we treat ground-plane projection as an extension wherever range data exist. That is a real limitation, and we state it plainly.

Baselines

The naive reference point is lossless context-adaptive arithmetic coding of the full onboard label map. This corresponds to the "AC" baseline in the semantic arithmetic coding paper and to what a careful engineer would send today instead of imagery.

The second baseline is that paper's own approach applied directly: semantic arithmetic coding with hand-defined local synonym classes, for example merging soil and bedrock in small blocks. Its reported 1.36% average gain over AC on BIPEDv2 is the only reported compression number in the file. There is no reported result found on Lacuna for any compression method on AI4MARS.

The third baseline is hazard-weighted lossy coding. It keeps sand and big-rock boundaries exact and quantizes or coarsens soil and bedrock, sweeping the distortion weight.

The fourth baseline is a learned task-aware autoencoder in the style of RaVAEn from Fast model inference and training on-board of Satellites. That paper ran a VAE onboard a satellite, encoding tiles in 0.110 s and reaching F1 0.956 on its own cloud task, but it did no rate-distortion or channel analysis. We train it with a planner-cost loss and an entropy-coded latent at matched rates.

The fifth baseline is "send only the plans": transmit the route answers for $G$ and nothing else.

All baselines see the same onboard label maps, the same $G$, and the same bit budget sweep. Learned methods get the same hyperparameter-tuning budget as our coder's context model, and we report cycle counts for all of them.

Two ablations isolate the key ingredients. In the first, cells outside the mask are filled with soil instead of hazard. This should break the conservativeness guarantee, and we will count the unsafe routes it introduces. In the second, a random mask of equal size isolates whether the decision-defined partition, rather than mere sparsity, produces the gain.

Beating the field means two things. First, at equal bits, our coder answers all uplinked queries exactly, which the lossy and learned baselines cannot guarantee, at a rate several times below full-map AC. Second, it answers more held-out queries correctly than hazard-weighted coding at the same rate, with zero unsafe answers.

Why not just…?

Why not just send the full label map with a good entropy coder? It is lossless and simple, and label maps are already small compared with images. It is the baseline we must beat by a wide margin. The scaling argument predicts that its cost grows with area while ours grows with corridor length. If, on AI4MARS-sized maps, our rate is not substantially below full-map AC, the idea fails at realistic scales. The rate-versus-$N$ experiment settles this.

Why not just weight hazard classes more heavily in a standard lossy coder? This is the most serious threat. Class weighting captures much of the intuition that sand matters more than texture. It cannot tell, though, a sand patch that blocks the only corridor apart from one that lies far from any route. It also spends bits on soil–bedrock distinctions everywhere, whereas only the ones inside corridors change route costs. If hazard weighting matches us on held-out query accuracy at equal rate, the decision-defined partition adds little beyond its exactness guarantee, and we will report that outcome.

Why not just send the onboard plan? Under supervised autonomy the rover can compute routes itself, as in the Earth/edge split of Lunar Twins. That architecture sends uncompressed JSON tasks and lets onboard models execute. Plans answer exactly one query, however, and ground strategic replanning across sols asks new ones. This alternative is the low-rate endpoint of our trade-off curve. The held-out-query experiment measures how many round trips it would force compared with our coder.

Why not just train an end-to-end neural compressor with a planning loss? It may achieve good average task loss. It offers no exactness on uplinked queries, no conservativeness on new ones, and no computable entropy target. It also adds model inference on processors where Bozzano et al. already show symbolic planning taking minutes. We will run it at matched rate and report both its unsafe-route rate and its cycle cost.

Proposed Experiments

The decisive check has three parts, all on AI4MARS label maps with randomly drawn query families $G$ of size 1 to 32 and $\epsilon$ from 0 to 10%. First, we plot bits against held-out-query accuracy for every method. Second, we verify zero violations of exact answers and zero unsafe answers for our coder. Third, we fit the rate against map side $N$, using tiled mosaics of label maps to grow $N$, and test whether the exponent is near 1 for our coder and near 2 for full-map AC.

A second check measures the gap between achieved code length and the context-model semantic entropy of $[M]$, in the same spirit as the $4\times10^{-6}$-sebit gap of semantic arithmetic coding.

A third check measures robustness to onboard segmentation error. Here we evaluate decision preservation against the 1,500 gold-labeled images rather than against the onboard predictions, because a coder that perfectly preserves a wrong map is only as safe as the segmenter.

Finally, we convert held-out-query failures into expected round trips per sol, which turns the rate savings into the latency currency the mission actually pays.