Skip to main content

Value networks

Project description

Value network (wip)

Exploration into some new research surrounding value networks

Install

$ pip install value-network

Usage

First, organize your videos (trajectories). The videos should have a suffix .1 for success and .0 for failure.

.
├── data
│   ├── traj_0.1.mp4
│   ├── traj_1.0.mp4
│   └── traj_2.1.mp4
└── ...

1. Train

Train the SigLIP value network by passing the folder containing the videos. The tool will automatically handle the conversion.

$ value-network-cli train --trajectories-folder ./data --max-steps 1000 --model_output_path ./model.pt

You can also opt to use the HL-Gauss loss, which has been shown to be more scalable for value learning.

$ value-network-cli train --trajectories-folder ./data --loss-module hlgauss --hl-gauss-min -2 --hl-gauss-max 2 --hl-gauss-num-bins 100

2. Predict

Use the trained model to predict the value of any image

$ value-network-cli predict-value ./model.pt ./frame.png

If you trained with HL-Gauss, you must specify the loss module and any non-default parameters during prediction as well.

$ value-network-cli predict-value ./model.pt ./frame.png --loss-module hlgauss --hl-gauss-num-bins 100

3. Visualize

To visualize the predicted values over a video, you can use the visualize command. First, generate the .npy file using predict-value on a video, then run visualize.

$ value-network-cli predict-value ./model.pt ./video.mp4 --output-path ./values.npy
$ value-network-cli visualize ./video.mp4 ./values.npy

Citations

@inproceedings{Imani2018ImprovingRP,
    title   = {Improving Regression Performance with Distributional Losses},
    author  = {Ehsan Imani and Martha White},
    booktitle = {International Conference on Machine Learning},
    year    = {2018},
    url     = {https://api.semanticscholar.org/CorpusID:48365278}
}
@article{Farebrother2024StopRT,
    title   = {Stop Regressing: Training Value Functions via Classification for Scalable Deep RL},
    author  = {Jesse Farebrother and Jordi Orbay and Quan Ho Vuong and Adrien Ali Taiga and Yevgen Chebotar and Ted Xiao and Alex Irpan and Sergey Levine and Pablo Samuel Castro and Aleksandra Faust and Aviral Kumar and Rishabh Agarwal},
    journal = {ArXiv},
    year   = {2024},
    volume = {abs/2403.03950},
    url    = {https://api.semanticscholar.org/CorpusID:268253088}
}
@misc{lee2025banelexplorationposteriorsgenerative,
    title    = {BaNEL: Exploration Posteriors for Generative Modeling Using Only Negative Rewards}, 
    author   = {Sangyun Lee and Brandon Amos and Giulia Fanti},
    year     = {2025},
    eprint   = {2510.09596},
    archivePrefix = {arXiv},
    primaryClass = {cs.LG},
    url      = {https://arxiv.org/abs/2510.09596}, 
}
@misc{ma2024visionlanguagemodelsincontext,
    title   = {Vision Language Models are In-Context Value Learners}, 
    author  = {Yecheng Jason Ma and Joey Hejna and Ayzaan Wahid and Chuyuan Fu and Dhruv Shah and Jacky Liang and Zhuo Xu and Sean Kirmani and Peng Xu and Danny Driess and Ted Xiao and Jonathan Tompson and Osbert Bastani and Dinesh Jayaraman and Wenhao Yu and Tingnan Zhang and Dorsa Sadigh and Fei Xia},
    year    = {2024},
    eprint  = {2411.04549},
    archivePrefix = {arXiv},
    primaryClass = {cs.RO},
    url     = {https://arxiv.org/abs/2411.04549}, 
}
@misc{yang2026riseselfimprovingrobotpolicy,
    title   = {RISE: Self-Improving Robot Policy with Compositional World Model}, 
    author  = {Jiazhi Yang and Kunyang Lin and Jinwei Li and Wencong Zhang and Tianwei Lin and Longyan Wu and Zhizhong Su and Hao Zhao and Ya-Qin Zhang and Li Chen and Ping Luo and Xiangyu Yue and Hongyang Li},
    year    = {2026},
    eprint  = {2602.11075},
    archivePrefix = {arXiv},
    primaryClass = {cs.RO},
    url     = {https://arxiv.org/abs/2602.11075}, 
}
@inproceedings{Hafner2024DreamerV3,
  title     = {Mastering Diverse Domains through World Models},
  author    = {Hafner, Danijar and Pasukonis, Jurgis and Ba, Jimmy and Lillicrap, Timothy},
  booktitle = {International Conference on Learning Representations (ICLR)},
  year      = {2024},
  url       = {https://arxiv.org/abs/2301.04104}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

value_network-0.0.30.tar.gz (105.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

value_network-0.0.30-py3-none-any.whl (107.6 kB view details)

Uploaded Python 3

File details

Details for the file value_network-0.0.30.tar.gz.

File metadata

  • Download URL: value_network-0.0.30.tar.gz
  • Upload date:
  • Size: 105.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for value_network-0.0.30.tar.gz
Algorithm Hash digest
SHA256 8a66fd7ef44e789c5a5271773ec094e0d2ce3d48d1a933f4f29a55bf7c589567
MD5 d465615913b7a1e1c6f3639764f97d0e
BLAKE2b-256 e037986499dfd1722f084656740dd3556590e2bbdf8dadc5ed620dc15da9e777

See more details on using hashes here.

File details

Details for the file value_network-0.0.30-py3-none-any.whl.

File metadata

File hashes

Hashes for value_network-0.0.30-py3-none-any.whl
Algorithm Hash digest
SHA256 2276ce0d0dc33f28783e05dc5d4da9c38dbbd0599a28ecae02e55138307efb91
MD5 56bd16b5478042bce38fea404911a11f
BLAKE2b-256 b28fc2045f58fab16f1409ea6ab4a7fa2464233eb15e32bba137bce8170ef48a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page