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)

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 only constant)
  • 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-2025, 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_gpu-1.1.5.tar.gz (170.3 kB view details)

Uploaded Source

Built Distributions

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

gbrl_gpu-1.1.5-cp312-cp312-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.12Windows x86-64

gbrl_gpu-1.1.5-cp312-cp312-manylinux_2_31_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gbrl_gpu-1.1.5-cp311-cp311-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.11Windows x86-64

gbrl_gpu-1.1.5-cp311-cp311-manylinux_2_31_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gbrl_gpu-1.1.5-cp310-cp310-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.10Windows x86-64

gbrl_gpu-1.1.5-cp310-cp310-manylinux_2_31_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.31+ x86-64

gbrl_gpu-1.1.5-cp39-cp39-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.9Windows x86-64

gbrl_gpu-1.1.5-cp39-cp39-manylinux_2_31_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.31+ x86-64

File details

Details for the file gbrl_gpu-1.1.5.tar.gz.

File metadata

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

File hashes

Hashes for gbrl_gpu-1.1.5.tar.gz
Algorithm Hash digest
SHA256 b2caf806ba8dc3d5290619ec87cdab073fc701fc4e9349cb8019bb78c15c906b
MD5 93a6820f112af2eb2541abdbfa3ef42b
BLAKE2b-256 959808336796f4b4415b036ae22c170785d55043104ad316b70d42af32ffa4d9

See more details on using hashes here.

File details

Details for the file gbrl_gpu-1.1.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: gbrl_gpu-1.1.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • 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_gpu-1.1.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 05fa457bb543b6ae91427f4b620b10c34beb35fc5c40482c0cd98b78e663a41c
MD5 27dcd005bde1fb3c0cbcbe88fe0c7868
BLAKE2b-256 f62cd1859f6c3dd9afebcd654dec938867a5034982dd45e1351d9a3fd28f4ba6

See more details on using hashes here.

File details

Details for the file gbrl_gpu-1.1.5-cp312-cp312-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gbrl_gpu-1.1.5-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 d781a37b78955c1124afd65692793e9f11df5d2d06461027b7d3a1399554230f
MD5 dd5d261ccd026508586c663c8639e406
BLAKE2b-256 211b18e54bd74f444a7029ae121c5ef625072563805865c7650103908c3d81d6

See more details on using hashes here.

File details

Details for the file gbrl_gpu-1.1.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gbrl_gpu-1.1.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • 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_gpu-1.1.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d8c9fd00e39edf95d1bf5bca333cf8ace4a9bd7f19ca05422fa0500f520d7d95
MD5 643edb8ab07e04618259dae93b2d7725
BLAKE2b-256 a06cadde9f9d23afaeff71cfcdc4f729064439e7b5d846ca34e629a9d3ec05b9

See more details on using hashes here.

File details

Details for the file gbrl_gpu-1.1.5-cp311-cp311-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gbrl_gpu-1.1.5-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 e191a32ad7520ba28f80d0443a385601ad023c2792807c4273047dafd07f3928
MD5 62527b279876c44f2177d8ef0d720997
BLAKE2b-256 a4dbee4b4a8464957fb77e1b0168e2477dd950a69d8ba6b6678bfc0bb690ed2a

See more details on using hashes here.

File details

Details for the file gbrl_gpu-1.1.5-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: gbrl_gpu-1.1.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • 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_gpu-1.1.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4c25b99522c17990d4a675e13483ea8f327b53762b83f56f684f445710725747
MD5 6673093a31b1cbebc002c5731284cafa
BLAKE2b-256 c23833bd07123f9ee51074122790f4746856e65eb7248fdc3186efd64e35ccb6

See more details on using hashes here.

File details

Details for the file gbrl_gpu-1.1.5-cp310-cp310-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gbrl_gpu-1.1.5-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 93406ba9dfe7cbf1b700f2e40ada8c14cfa399bdb416ca132e3048200aeafb52
MD5 f9271345a7baf777882fb0c115d701d6
BLAKE2b-256 f4bc2ac6845d4f22dc763b4ab34c1066ba1759c91596e69421a54fd72542a3a0

See more details on using hashes here.

File details

Details for the file gbrl_gpu-1.1.5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: gbrl_gpu-1.1.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • 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_gpu-1.1.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 eac119a8774774df22e8c15c987ead8e6219730679b72301acd5e8ee009119f9
MD5 678e9e4d6c7220c961e2f3903bbfc781
BLAKE2b-256 e7ce9a6fe05ae28770e1d50ad3ec320a1034ec1a193c4e5eedbfc71c9bd57174

See more details on using hashes here.

File details

Details for the file gbrl_gpu-1.1.5-cp39-cp39-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gbrl_gpu-1.1.5-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 5e68c5207106253b16033f724d2d0716ff77493e10c6d71595425b4d7e292713
MD5 6d17ff7028a1e59dc3dc1ee6bbbe2b59
BLAKE2b-256 4bc2b083140f1766abfb5465a942f3f22e3865f078a5856f14bce4c0f1598950

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