Robots that learn to reach goals from logged data usually measure "how far" one state is from another in one of two ways. The first is straight-line distance in coordinates, which ignores walls and dynamics. The second is the number of time steps the trip takes, which is what the best recent offline methods learn. Neither captures what an engineer actually cares about when a legged robot carries a heavy payload across soft ground: how much energy the trip burns. Energy cost is directional, since climbing costs more than descending. It also depends on load, and it can favor a longer route over a shorter one. This proposal learns one distance model whose output is the cheapest achievable cost of the form "time plus λ times energy," for every trade-off weight λ and every payload. The model is built so that, for each fixed λ and load, the triangle inequality holds by construction. Across λ it is shaped to have the curvature that any such cost must have. That curvature buys something useful: the slope of the distance with respect to λ predicts how much energy the chosen route will spend.
The mathematical reading comes from enriched category theory. A quasimetric is a distance that obeys the triangle inequality but need not be symmetric, and a quasimetric is exactly a category enriched over the Lawvere quantale $([0,\infty],\ge,+,0)$. A family of costs indexed by λ is then a relation valued in a product of such quantales. The physical motivation comes from structural mechanics. There, damping is not a fixed material constant: compressive load raises dissipation and tensile load lowers it, and this effect appears only inside a window of support stiffness. Together these suggest both a concrete benchmark and a prediction about where load should change the learned distance.
Core Claim
The goal-conditioned cost-to-go under a time–energy trade-off is
$$d_{\lambda,m}(s,g)=\inf_{\gamma: s\rightsquigarrow g}\big(T(\gamma)+\lambda E_m(\gamma)\big).$$
Here $\gamma$ ranges over feasible trajectories from state $s$ to goal $g$, $T$ is elapsed steps, $E_m$ is mechanical energy dissipated with payload mass $m$, and $\lambda\ge 0$ is the price of energy. For fixed $(\lambda,m)$ this is a quasimetric. That follows from the least-action argument of Intrinsic-Energy Joint Embedding Predictive Architectures Induce Quasimetric Spaces, which proves that any infimum of accumulated local effort satisfies the directed triangle inequality and that symmetric energies cannot represent one-way reachability. Across λ the cost has extra structure. It is nondecreasing and concave in λ, because it is an infimum of functions that are affine in λ. By the envelope theorem, its derivative $\partial d_{\lambda,m}/\partial\lambda$ equals the energy $E_m$ of the optimal route.
The claim is that a single network can be trained to respect both kinds of structure. The triangle inequality is enforced exactly. Monotonicity and concavity in λ are enforced as soft penalties, because no known architecture enforces them together with the triangle inequality. A network trained this way should do three things that existing quasimetric learners do not. It should choose energy-efficient routes when λ is large. It should generalize to trade-off weights and payloads not seen in training. It should report the energy of its own plans through the λ-slope, without a separate prediction head.
Relation to Prior Work
Three methods supply the machinery and fix the gap. Offline Goal-conditioned Reinforcement Learning with Quasimetric Representations (TMD) combines contrastive pre-training with metric distillation in a Metric Residual Network, an architecture that satisfies the directed triangle inequality by design. Multistep Quasimetric Learning for Scalable Goal-conditioned Reinforcement Learning and Scaling Goal-conditioned Reinforcement Learning with Multistep Quasimetric Distances (MQE) add geometric waypoint sampling and a smooth action-invariance loss, and stitch paths of thousands of steps. All three define distance as step count. Their training targets are tied to temporal occupancy, so they cannot express a route that is slower but cheaper. We reuse the residual quasimetric architecture and MQE's multistep waypoint scheme. We change the local constraint from "one step costs one" to "one step costs $1+\lambda e_m(s,a,s')$," where $e_m$ is the measured per-step energy. We also condition on $(\lambda,m)$ and add the concavity structure. The Kobanda–Waris paper motivates this direction but is purely theoretical, with no loss function and no experiments. This proposal turns its least-action Lagrangian into a measured mechanical quantity.
Learning Actionable Representations with Goal-Conditioned Policies is the closest attempt to put control effort into a distance. It measures effort as divergence between goal-conditioned policies and then embeds that effort in a symmetric squared-Euclidean space. By Kobanda–Waris Proposition 2, that embedding cannot represent uphill-versus-downhill asymmetry. It therefore serves as a constraint on our design rather than as a method we can reuse.
The quantale literature plays the role of specification. Propositional Logics for the Lawvere Quantale treats quantitative inequalities between directed distances as linear judgements decided by Fourier–Motzkin elimination. It also notes that the absorbing value ∞ breaks cancellation and strong completeness. We take two practical lessons from it. First, unreachable pairs must be truncated to a finite ceiling rather than carried as ∞. Second, a learned distance can be audited by checking a finite set of linear triangle constraints on a sampled waypoint graph, which is exactly the fragment that logic decides. We claim no new logic. The quantale view simply tells us which algebraic laws the learned object must obey.
The mechanics papers motivate the benchmark and one prediction. Flexural Vibrations of Rods with Viscoelastic Coating Subjected to Axial Force and its companion Flexural Vibrations of Rods with Viscoelastic Coatings Subjected to Axial Force show that compression amplifies dissipation and that the effect concentrates in the fundamental, longest-wavelength mode. Vibration of a beam with support damping shows that a damping insert works only inside a stiffness window, roughly $\bar K\in[10^3,10^6]$, and does nothing once the support is effectively clamped. We do not simulate beams. We borrow two qualitative facts. Load-sensitive dissipation lives in compliant regions and vanishes on stiff ones. Load mainly reshapes the global, long-wavelength structure. This yields a testable prediction: payload should change long-range learned distances far more than short-range ones.
Research Program
The learned distance is $d_\theta(s,g;\lambda,m)$. It is computed by a Metric Residual Network applied to embeddings $\phi_\theta(s;\lambda,m)$ and $\psi_\theta(g;\lambda,m)$, so the triangle inequality holds at every $(\lambda,m)$. Training follows MQE's multistep recipe, with segment costs replacing segment lengths. For waypoints $s_i, s_j$ on a logged trajectory, the target upper bound is the accumulated cost $\sum_{t=i}^{j-1}(1+\lambda e_m(s_t,a_t,s_{t+1}))$. Action invariance is kept as in MQE. Each minibatch draws λ from a log-uniform range, so one network covers the whole trade-off. Two soft penalties act on a small λ grid per sample: one on negative first differences, which enforces monotonicity, and one on positive second differences, which enforces concavity. A policy is extracted from the distance exactly as in MQE, with λ supplied at test time.
Per-step energy requires no new sensors. In MuJoCo ant and humanoid tasks with torque control, $e = \sum_j |\tau_j \dot q_j|\,\Delta t$ plus contact damping work, and all of it can be computed from logged joint velocities and actions. This means existing OGBench datasets can be relabeled directly. Load is introduced in a second stage through a new environment family, LoadMaze. It is an OGBench AntMaze variant with a per-episode payload mass $m$, ramps that make energy asymmetric, and floor patches whose contact damping scales with normal load. The patches mimic the compliant-support regime, while the remaining floor is stiff. We would collect data with OGBench's noisy-expert generator under a grid of payloads, and hold out some payloads and λ values for testing.
Baselines
The naive reference is a goal-conditioned agent rewarded by negative Euclidean distance minus λ times energy. It shows how much Euclidean bias costs once energy enters the objective. It uses the same datasets, the same network size, and an equal hyperparameter-search budget.
The strongest existing method is MQE, run in three forms. The first is unchanged, with step-count distance; this tests whether time-optimal routes happen to be energy-efficient. The second retrains MQE separately for each λ and payload on the energy-relabeled data. This is a compute-heavy upper reference that has no need to generalize. The third is a single MQE that takes $(\lambda,m)$ as extra inputs but has no monotonicity or concavity penalties. This third variant is the ablation that isolates our key ingredient. On the original OGBench tasks, the file records that MQE was the only method with non-zero success on AntMaze-Colossal and that it improved tenfold over HIQL on humanoidmaze-giant-stitch. The file gives no absolute success percentages. For energy-weighted goal reaching, no reported result was found on Lacuna for any method.
We also run HIQL and GCIQL from OGBench: Benchmarking Offline Goal-Conditioned RL, with reward $-(1+\lambda e)$, as the temporal-difference value baselines. TMD runs with the same relabeled costs. Every method gets the same data, gradient-step budget, and tuning trials, and is evaluated over at least eight seeds.
Beating the strongest baseline means four things. At equal success rate, our method must spend measurably less energy than unchanged MQE. On held-out λ and payload values, it must match or exceed λ-conditioned MQE without penalties. It must come within a small margin of per-λ retrained MQE while using one model. At λ=0 it must not lose success relative to MQE on standard OGBench mazes.
Why not just…?
Why not just add an energy penalty to a Euclidean reward? The penalty does not change the direction of the gradient, which still points into walls. Explore, Discover and Learn: Unsupervised Discovery of State-Covering Skills shows that coordinate-based objectives trap agents in the starting room of a bottleneck maze. Complex Robotic Manipulation via Graph-Based Hindsight Goal Generation (IEEE Trans. Neural Networks Learn. Syst. 2022) shows Euclidean proximity proposing subgoals inside obstacles. The penalty also cannot express the asymmetry between climbing and descending. We include this agent as the naive baseline and expect it to fail on the larger mazes.
Why not just run temporal-difference value learning with an energy-weighted reward? Value functions learned this way are asymmetric and in principle capture energy. However, they do not enforce the triangle inequality, and TD errors compound over long horizons. The file records that all such baselines reach zero success on AntMaze-Colossal and the hardest OGBench tasks. Energy weighting makes this worse, because per-step costs become heavy-tailed on ramps. HIQL and GCIQL with the weighted reward test this directly. If they match us on the medium mazes, our claimed advantage shrinks to long horizons, and we will report it that way.
Why not just feed λ and load into MQE as extra inputs? This is the real threat. A flexible network might learn the right dependence on λ without being told to. The monotonicity and concavity penalties are our only structural addition, so the unpenalized conditioned MQE is the decisive ablation. We expect the penalties to help mainly on extrapolation to unseen λ and payloads, and in how well the λ-slope predicts actual energy. If the ablation matches on both, the contribution reduces to the energy-relabeled multistep objective plus the LoadMaze benchmark, and we will say so.
Why not just compute dissipation with a physics model and plan with it? The beam analyses are limited to idealized one-dimensional geometry. Vibration of a beam with support damping shows that even the choice of beam theory changes predicted frequencies substantially. No analytic model covers a multi-legged robot making contact with damped terrain. An oracle planner that uses the simulator's true energy in a dense graph search serves as a ceiling on achievable energy, not as a competitor.
Proposed Experiments
The first experiment relabels OGBench antmaze-large, antmaze-giant-stitch, and humanoidmaze-medium with per-step energy. We report success rate and energy per successful episode at five λ values, comparing against the oracle graph-search ceiling. This tests whether energy-aware quasimetrics find cheaper routes without losing reachability.
The second experiment uses LoadMaze to probe generalization. We train on payloads at the extremes and middle of the range and test on interpolated and slightly extrapolated payloads and λ values. The decisive check is the envelope test. We regress the measured energy of the executed route on the model's predicted $\partial d/\partial\lambda$ and report rank correlation and calibration error. Our method should beat the unpenalized ablation on held-out conditions. The third experiment measures the fraction of sampled waypoint triples that violate concavity in λ.
Two further checks probe the mechanics-inspired predictions. The first is load localization: the change in learned distance between light and heavy payloads should grow with horizon, and it should concentrate on routes that cross compliant patches rather than stiff floor. The second makes the floor patches effectively rigid, which corresponds to the clamped regime in the beam results. In that case load sensitivity of the learned distance should vanish. This control separates real dissipation modeling from the network simply memorizing payload. A final check confirms that λ=0 recovers MQE-level success on the standard tasks.
References
- Intrinsic-Energy Joint Embedding Predictive Architectures Induce Quasimetric Spaces
- Offline Goal-conditioned Reinforcement Learning with Quasimetric Representations
- Multistep Quasimetric Learning for Scalable Goal-conditioned Reinforcement Learning
- Scaling Goal-conditioned Reinforcement Learning with Multistep Quasimetric Distances
- Learning Actionable Representations with Goal Conditioned Policies
- Propositional Logics for the Lawvere Quantale
- Flexural Vibrations of Rods with Viscoelastic Coating Subjected to Axial Force
- Flexural Vibrations of Rods with Viscoelastic Coatings Subjected to Axial Force
- Vibration of a beam with support damping.
- OGBench: Benchmarking Offline Goal-Conditioned RL
- Explore, Discover and Learn: Unsupervised Discovery of State-Covering Skills
- Complex Robotic Manipulation via Graph-Based Hindsight Goal Generation