Skip to main content

Gradient Boosted Trees for RL

Project description

Gradient Boosting Reinforcement Learning (GBRL)

GBRL is a Python-based Gradient Boosting Trees (GBT) library, similar to popular packages such as XGBoost, CatBoost, but specifically designed and optimized for reinforcement learning (RL). GBRL is implemented in C++/CUDA aimed to seamlessly integrate within popular RL libraries.

License PyPI version

Overview

GBRL adapts the power of Gradient Boosting Trees to the unique challenges of RL environments, including non-stationarity and the absence of predefined targets. The following diagram illustrates how GBRL uses gradient boosting trees in RL:

GBRL Diagram

GBRL features a shared tree-based structure for policy and value functions, significantly reducing memory and computational overhead, enabling it to tackle complex, high-dimensional RL problems.

Key Features:

  • GBT Tailored for RL: GBRL adapts the power of Gradient Boosting Trees to the unique challenges of RL environments, including non-stationarity and the absence of predefined targets.
  • Optimized Actor-Critic Architecture: GBRL features a shared tree-based structure for policy and value functions. This significantly reduces memory and computational overhead, enabling it to tackle complex, high-dimensional RL problems.
  • Hardware Acceleration: GBRL leverages CUDA for hardware-accelerated computation, ensuring efficiency and speed.
  • Seamless Integration: GBRL is designed for easy integration with popular RL libraries. We implemented GBT-based actor-critic algorithm implementations (A2C, PPO, and AWR) in stable_baselines3 GBRL_SB3.

Performance

The following results, obtained using the GBRL_SB3 repository, demonstrate the performance of PPO with GBRL compared to neural-networks across various scenarios and environments:

PPO GBRL results in stable_baselines3

Getting started

Dependencies

  • Python 3.9 or higher

Installation

GBRL provides pre-compiled binaries for easy installation. Choose one of the following options:

CPU-only installation (default):
pip install gbrl

GPU-enabled installation (requires CUDA 12 runtime libraries):
pip install gbrl-gpu

For further installation details and dependencies see the documentation.

Usage Example

For a detailed usage example, see tutorial.ipynb

Current Supported Features

Tree Fitting

  • Greedy (Depth-wise) tree building - (CPU/GPU)
  • Oblivious (Symmetric) tree building - (CPU/GPU)
  • L2 split score - (CPU/GPU)
  • Cosine split score - (CPU/GPU)
  • Uniform based candidate generation - (CPU/GPU)
  • Quantile based candidate generation - (CPU/GPU)
  • Supervised learning fitting / Multi-iteration fitting - (CPU/GPU)
    • MultiRMSE loss (only)
  • Categorical inputs
  • Input feature weights - (CPU/GPU)
  • Monotonic constraints - (CPU/GPU, policy only)

GBT Inference

  • SGD optimizer - (CPU/GPU)
  • ADAM optimizer - (CPU only)
  • Control Variates (gradient variance reduction technique) - (CPU only)
  • Shared Tree for policy and value function - (CPU/GPU)
  • Linear and constant learning rate scheduler - (CPU/GPU, linear scheduler GPU only for Oblivious trees)
  • Support for up to two different optimizers (e.g, policy/value) - **(CPU/GPU if both are SGD)
  • SHAP value calculation

Documentation

For comprehensive documentation, visit the GBRL documentation.

Contributing

To contribute to GBRL, please review and sign the Contributor License Agreement (CLA) available at: https://github.com/NVlabs/gbrl/blob/master/CLA.md

Citation

@inproceedings{
fuhrer2025gradient,
title={Gradient Boosting Reinforcement Learning},
author={Benjamin Fuhrer and Chen Tessler and Gal Dalal},
booktitle={Forty-second International Conference on Machine Learning},
year={2025},
url={https://arxiv.org/abs/2407.08250}
}

Licenses

Copyright © 2024-2026, NVIDIA Corporation. All rights reserved.

This work is made available under the NVIDIA The MIT License. Click here. to view a copy of this license.

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

gbrl-1.1.8.tar.gz (226.1 kB view details)

Uploaded Source

Built Distributions

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

gbrl-1.1.8-cp312-cp312-win_amd64.whl (764.4 kB view details)

Uploaded CPython 3.12Windows x86-64

gbrl-1.1.8-cp312-cp312-manylinux_2_31_x86_64.whl (993.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gbrl-1.1.8-cp312-cp312-macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

gbrl-1.1.8-cp312-cp312-macosx_11_0_x86_64.whl (485.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

gbrl-1.1.8-cp311-cp311-win_amd64.whl (766.2 kB view details)

Uploaded CPython 3.11Windows x86-64

gbrl-1.1.8-cp311-cp311-manylinux_2_31_x86_64.whl (993.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gbrl-1.1.8-cp311-cp311-macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

gbrl-1.1.8-cp311-cp311-macosx_11_0_x86_64.whl (485.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

gbrl-1.1.8-cp310-cp310-win_amd64.whl (765.2 kB view details)

Uploaded CPython 3.10Windows x86-64

gbrl-1.1.8-cp310-cp310-manylinux_2_31_x86_64.whl (991.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.31+ x86-64

gbrl-1.1.8-cp310-cp310-macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

gbrl-1.1.8-cp310-cp310-macosx_11_0_x86_64.whl (483.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

gbrl-1.1.8-cp39-cp39-win_amd64.whl (760.9 kB view details)

Uploaded CPython 3.9Windows x86-64

gbrl-1.1.8-cp39-cp39-manylinux_2_31_x86_64.whl (989.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.31+ x86-64

gbrl-1.1.8-cp39-cp39-macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

gbrl-1.1.8-cp39-cp39-macosx_11_0_x86_64.whl (483.5 kB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

File details

Details for the file gbrl-1.1.8.tar.gz.

File metadata

  • Download URL: gbrl-1.1.8.tar.gz
  • Upload date:
  • Size: 226.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.15

File hashes

Hashes for gbrl-1.1.8.tar.gz
Algorithm Hash digest
SHA256 5e805b91d7d3498f69994bc14ab46a9b3de46059b8d4e92e1be1f7ca5d6133ea
MD5 2a13c859abb1e9b12bceda087b14d845
BLAKE2b-256 9563480dadaf79e5bc40a6aee14902d413f36558b10edec781f78be2c99c04e9

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: gbrl-1.1.8-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 764.4 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for gbrl-1.1.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 776e4869076488da8db8caa28e47bee43e0e6a96675aab968ae9a03f41de8fa3
MD5 a94482e87eada41ccb98749e00352fda
BLAKE2b-256 ecb724f0d4b53f75b38ca0440bbc76adc1880ba8e24294c9ba4ca31c5bc9eba8

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp312-cp312-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.8-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 e344eca5d46dbbbf1b3cd3030919df76e500e4739f040db7f10a11fd5363c027
MD5 4a124528e9246f7827465b35e1b8825e
BLAKE2b-256 0f31bab6fffa987c64fa6443725081489a3266cf2214bb28b4afe5adc74acf74

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.8-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7e4c1da56d5b1063b9b4c91151e26ec77cc5368510bcfa652e82d80e7481d5d1
MD5 677f02a939fcca664c3cd45757288b50
BLAKE2b-256 0aa5cc49366982b163317f2e3ecbd1dc95e1ba75452d800c6e8552013af032ab

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.8-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 009041485b9e0bb9058951df048515ec77a7d9660d4cfa78a7d5a279e97d9c2e
MD5 d694c7a4a101839a3d0477fbd06bd32d
BLAKE2b-256 25e90b64341750271442b0bdf4028f7d7c9b42e0a36befa303f24cbdf6444332

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gbrl-1.1.8-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 766.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for gbrl-1.1.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f3b476142241468586ea9e54c7a63fa6479139f0c73318eef6c6d40f71da9135
MD5 13fb292528365eb86dc6a28d7ba5f22c
BLAKE2b-256 7600ff6c415efa18b11f4d67c0deb281c47904bf55c27fd8d319eadfd1b141b0

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp311-cp311-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.8-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 d744f0872fac92eba43e0c49332b1427ebd124c1bd87442b187221f8986d4b8d
MD5 bba4e1cd60eeae1403221984e613aa00
BLAKE2b-256 e4ce04ceb1843b615930709cf2d14a7cc126030a4c162a9638bd07dc6148fe96

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.8-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b875e276f315b02c64ed5a45ceb5deaafc848422a9a41ce26908a57d4999403e
MD5 088987e1b2a62eedd79c4fa567e5d097
BLAKE2b-256 213ab198defd046be10981800c9f0a8e6cf8291d01a09b667e32167b9041cb36

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.8-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 8beeae7aee42810301cfceb92a03d7b73c206b3a9898fedd8b274756221bef97
MD5 057e031e04c8ed98dbf35af5d75b918b
BLAKE2b-256 1007eea64fe6d8ce778ccd528d84fcf235152c4be9ee654e66a9fdefc2c0ab4c

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: gbrl-1.1.8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 765.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for gbrl-1.1.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4d0edeb77339ac5620390aa4377d18a07872fef7aefb119c150a802d1cd33534
MD5 fa109ba84cc4a69c313bd1584fcd13cb
BLAKE2b-256 946805a29cf3294205b68295f0d133c5bbea2b6d15f6bbb9974a2823c65fe5ac

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp310-cp310-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.8-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 4bd3cb2fbec116493c4663489f3ae39577670e188d388591003db1f79c3b0e22
MD5 5b4171b2fbea154b99db0078745f05c5
BLAKE2b-256 af0fe2bcba31a03547dab25cf4eb1b24ea29471965e4df21f61c6052b5fac915

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.8-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 54cd5ad80690c2a0fd32a1c3c71250a49d09c206de1950ce474d7c1788c04050
MD5 f425641a3a35720e0ea76ee4de34c4aa
BLAKE2b-256 bb8faa60b49ba842ac1ac77b3215271abd9e5e4272e7e4bce68a07879b8a5099

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.8-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 3af413af73878433564e849089b3745eb402f583b02954760c8fa7f06d5c63d3
MD5 711d9de6f1c347723a11ac12e10ed40d
BLAKE2b-256 51e6016dd93a3524c83ab95700ea2e4e584baad7bedb12671d5556beaa82a4e8

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: gbrl-1.1.8-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 760.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for gbrl-1.1.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 34213f306ee1b018ea48f8573ba8076fbb9cc16a1ad10e47aab68be3c0aa6819
MD5 4c3e53acae98448464d993b9b4324101
BLAKE2b-256 3313fa79810aab5917f0620cfc026afb54c19387beea427eb044d0524079b461

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp39-cp39-manylinux_2_31_x86_64.whl.

File metadata

  • Download URL: gbrl-1.1.8-cp39-cp39-manylinux_2_31_x86_64.whl
  • Upload date:
  • Size: 989.7 kB
  • Tags: CPython 3.9, manylinux: glibc 2.31+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.18

File hashes

Hashes for gbrl-1.1.8-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 ed190e7b524f76922cd4f34cd85ff1fb380f8ce9909197bb727a70fae3867c71
MD5 ed2f40ae8fc3d4ecdefc45addc54bfe6
BLAKE2b-256 407471d93f8b8c329fc3e1c99a10fed336800c8248844a0f3a55d8d2f6a978b8

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp39-cp39-macosx_15_0_arm64.whl.

File metadata

  • Download URL: gbrl-1.1.8-cp39-cp39-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for gbrl-1.1.8-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 02274142fd261662956da3f9d8c4cf3dd1ec8656e061e260d300d741a6fce534
MD5 af21f0d2906a9d32359999e24cc354d8
BLAKE2b-256 19659b17d8a6c27b1d9ce0be0a2caec711a585f772408a296f1972493fca3c49

See more details on using hashes here.

File details

Details for the file gbrl-1.1.8-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

  • Download URL: gbrl-1.1.8-cp39-cp39-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 483.5 kB
  • Tags: CPython 3.9, macOS 11.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for gbrl-1.1.8-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 7901485fcd0618419d304e47a2e5b23d4c0eb031dd289c2beb126b9f14bcab13
MD5 4887c8113c391df5a3d1d368bab4a2e8
BLAKE2b-256 3aea9b3cd216e8c10f4c75ae8e3ff0b11b5216080f7fa76f38a34ad851748ab4

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