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

Uploaded CPython 3.12Windows x86-64

gbrl_gpu-1.1.7-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.7-cp311-cp311-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11Windows x86-64

gbrl_gpu-1.1.7-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.7-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10Windows x86-64

gbrl_gpu-1.1.7-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.7-cp39-cp39-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9Windows x86-64

gbrl_gpu-1.1.7-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.7.tar.gz.

File metadata

  • Download URL: gbrl_gpu-1.1.7.tar.gz
  • Upload date:
  • Size: 223.0 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.7.tar.gz
Algorithm Hash digest
SHA256 317fa7dd83c75c21967dcff76ef8a349371cad4f9c4879cfc65e029f3030be65
MD5 9e254a9af21c0eeb1076d4ac0aeef4cd
BLAKE2b-256 5cd39158bf194e903b0e6659c495bcc8fc4fa7fe3806a05bd65a63d8fc0745ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.7-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.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c9250af224777d39ac5ddd457a1a265f78f1112c0febc23f462ef8e555383b2d
MD5 3d8669b9502f916230e09d00a5a6ef44
BLAKE2b-256 50be3ace7a60b6b3796c93b3c308c0077f78b9bb2db22ffbc7ebed34b7b8120e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.7-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 3ed086437f14bc0bbebc120ad8b90219f9c0f0c5b158d401467b020725a2b4c7
MD5 08444a33a6bb673d9a9798443ebc3feb
BLAKE2b-256 35780c61a9d2e2262c442923875de70d96dcbd584ad9251ade8e55f2d4277f7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.7-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.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1a66e55da3257698b12eda4eeb5d22c6c59cebff359a2079a41eda29e631232e
MD5 87f1d784d374abcecec039b3e3294d45
BLAKE2b-256 80a6fc9c22d17c04f9dca77ced06cd7b5f3a24ee1ae9e34ea038953638d51795

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.7-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 a008053c1d9a6bfe742d18871ba7d4924ac62b409576fb9d47019c07caf15cb3
MD5 b76a303c201516de73ac85e1a3e46965
BLAKE2b-256 6cb9a3dade4851d6764e45deefdc3fd7da66bfc08347e3f266fec1a78cbf2b5c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.7-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.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 efc714569d901523d24a98343c9374debaddd16c56e63d58dbd1473b14ed48ce
MD5 08a766cfe0ff9a055c38154d693a61a7
BLAKE2b-256 b8bdc94a692f16c6324dd86da322cfbc4f680610f205c5d450ff2462940a775a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.7-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 b51253e167b09667b81ef10ff3379956bb9a0e2b8e0ec5e0fab199f1c493ae4f
MD5 d142b7a7301e17fc084e6c6e140e86de
BLAKE2b-256 1fde0e9321d100d0287f8c021dc01e299acc8e01586fabba09b97dcd9c69f4ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.7-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.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 395b8fd784463f10ef300abe863f45af5625600984f1c6398d8b2628f68cf187
MD5 4741f1dbe1c5e3181376c0feeeea9725
BLAKE2b-256 a94b9f368a8782b4d0a2a5b83065ed1a314e8c5b37b37c5a4665f4d7551eadca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.7-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 c8c8aced8876a90615a04ac8d607074b58349b0924b416ced3891f7b45e47231
MD5 85ff01a171990f5dd9a95aa774238f91
BLAKE2b-256 4bc3184fa66de817b46ce3108bd452f4c207307ddae2aafcf82aade877f3bb10

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