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_gpu-1.1.8.tar.gz (226.2 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.8-cp312-cp312-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.12Windows x86-64

gbrl_gpu-1.1.8-cp312-cp312-manylinux_2_31_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gbrl_gpu-1.1.8-cp311-cp311-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11Windows x86-64

gbrl_gpu-1.1.8-cp311-cp311-manylinux_2_31_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gbrl_gpu-1.1.8-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10Windows x86-64

gbrl_gpu-1.1.8-cp310-cp310-manylinux_2_31_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.31+ x86-64

gbrl_gpu-1.1.8-cp39-cp39-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9Windows x86-64

gbrl_gpu-1.1.8-cp39-cp39-manylinux_2_31_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.31+ x86-64

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.8.tar.gz
  • Upload date:
  • Size: 226.2 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.8.tar.gz
Algorithm Hash digest
SHA256 6d3af7e94cfff1bbfcf5e0a8f7c51214cd218f49805b2031ab82a782167bdef5
MD5 b46a9d8e56b6962cbd6f15f21a5d1b79
BLAKE2b-256 debece944236a842de1a215af6e61c77754a5761c013b10fae9b4d0b052b5790

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.8-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.3 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.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1a9c1e78f8e8f961b5eed94aff490dd158dc2ee19f9e06115975fded06bd7741
MD5 f9c271a1388ee29f711b2c90eaeb8b47
BLAKE2b-256 b33e8b6fe4c3b15e3b931794f9a6e535773f412d9e7e5377a19deb898308b483

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.8-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 5e0def852d61f5903179ff33f281e55c12f868d7dde3c482a0b7fb7e77eefaea
MD5 37efd92e5d89fed3dd7de402dd9ba6b4
BLAKE2b-256 2aa16eef79877167df0f42498444113ff0a26f66fa60d7f70e331b42debb9c97

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.8-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.3 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.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 726d33c5f0b5a0d2e2740963d4eae963bba4ead0cd3169821cda4d7138bf339c
MD5 6965eb16ee88fef00fa170aba9e44cac
BLAKE2b-256 8e289428361a5e9b6e20a81cb4a6ce7f7575ba9dc9ba8e01a9987981bc1c3b5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.8-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 a29125b561eabb8d3427da9716e5b9d72265656bc019a28fc2772c9e63dc3e44
MD5 61fb70b06e4771baecd03acfb82b37e2
BLAKE2b-256 803546c406242ecca2a02e68ddd1c3a7e39852cd83ddcd44d2141194a79c658e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.3 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.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 922f492360ae4a3ddbbf8e8b5bdabfd58b6651baa35b66792cd5a2bf118634f6
MD5 2a2070ffe222531877aa7564854f7bac
BLAKE2b-256 5417f827392fdee7f768b7f452a782437247919ffcbdc77e98093aec675d2b1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.8-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 f04e0a4b5e3ac76583eb5c7117b21e8304a583fe34706dbc4c74d82269acc95b
MD5 9eaf7db96f016abe748d17a1435c696d
BLAKE2b-256 f42ea656743a47a6d9e5e45620b343c5afaa1676c79287819bcd1e3dafb34d00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.8-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.3 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.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bcf650e2289bfb11ba4818eb8663e67736fca290595a6930235315585849c56e
MD5 4de38cc95b54b70204562ca7ea8ba66c
BLAKE2b-256 0064c52af5006c6ab8183b2c053dd0ce8911cd4e45dbc8679752e7d8eb52b6ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.8-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 92c7de9bdb5b1d047b6a75d568b70172fccbffb4175331f6853941b21b7a6d0b
MD5 74ee08bd5ffd31f077e33f9baf3d8201
BLAKE2b-256 439e1196ce97150b676d0617402ade419e49241830fb72ca0a4a777c784df255

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