Multistep Quasimetric Estimation - (wip)
Exploration and eventually practical implementation for the Multistep Quasimetric Estimation proposed by Zheng et al. of Berkeley.
This paper is a coming together of a few ideas: quasimetric distance spaces and successor representations, along with an action invariance loss and other loss designs
Install
pip install MQE
Usage
import torch
from torch import nn
from MQE import MQE, MRN, Policy, ContinuousAction
from x_mlps_pytorch import MLP
state_dim, action_dim = 16, 4
mrn = MRN(
sym_network = MLP(32, 64),
asym_network = MLP(32, 64),
distance_groups = 8
)
mqe = MQE(
state_encoder = MLP(state_dim, 32),
state_action_encoder = MLP(state_dim + action_dim, 32),
metric_residual_network = mrn
)
policy = Policy(
action_dim = action_dim,
dim = 32,
state_encoder = MLP(state_dim, 32),
goal_encoder = MLP(state_dim, 32),
action_dist = ContinuousAction()
)
states = torch.randn(4, 10, state_dim)
actions = torch.randn(4, 10, action_dim)
goals = torch.randn(4, 10, state_dim)
# train critic from offline trajectories
critic_loss, _ = mqe(states, actions, goals)
critic_loss.backward()
# train actor using critic
policy_loss, _ = mqe.extract_policy(
policy,
states,
actions,
goals,
bc_loss_weight = 0.1
)
policy_loss.backward()
# inference
action = policy(states[:, 0], goals[:, 0]).sample() # (4, 4)
Citations
@misc{zheng2026multistepquasimetriclearningscalable,
title = {Multistep Quasimetric Learning for Scalable Goal-conditioned Reinforcement Learning},
author = {Bill Chunyuan Zheng and Vivek Myers and Benjamin Eysenbach and Sergey Levine},
year = {2026},
eprint = {2511.07730},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2511.07730},
}
@misc{liu2023metricresidualnetworkssample,
title = {Metric Residual Networks for Sample Efficient Goal-Conditioned Reinforcement Learning},
author = {Bo Liu and Yihao Feng and Qiang Liu and Peter Stone},
year = {2023},
eprint = {2208.08133},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2208.08133},
}
Metadata
Release files for MQE 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mqe-0.1.5.tar.gz | 8.3 kB | Without provenance | Details for mqe-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mqe-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for mqe-0.1.5-py3-none-any.whl |
Total release size: 15.9 kB
Release files / mqe-0.1.5.tar.gz
| Download URL | mqe-0.1.5.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c7b320bba760de126169eb41e9db923330fe263daad2d8bddd500923d828903
|
|
BLAKE2b-256 checksum How to use checksums |
0ecd66684ed1e70a21252b08f57e66e825f15470b23e879cb2804db9d253b16f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Release files / mqe-0.1.5-py3-none-any.whl
| Download URL | mqe-0.1.5-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77a007ea9f7895d7656ddce9032e1569e67dcec74e1c66e451c3afc81db62300
|
|
BLAKE2b-256 checksum How to use checksums |
264279ba522cf69587f72dd36f50153947445cfd65797313f11916f20d54ba6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Security for MQE 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.