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.3.tar.gz (166.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.3-cp312-cp312-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.12Windows x86-64

gbrl_gpu-1.1.3-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.3-cp311-cp311-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.11Windows x86-64

gbrl_gpu-1.1.3-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.3-cp310-cp310-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.10Windows x86-64

gbrl_gpu-1.1.3-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.3-cp39-cp39-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: gbrl_gpu-1.1.3.tar.gz
  • Upload date:
  • Size: 166.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.3.tar.gz
Algorithm Hash digest
SHA256 de8d4e65510e3eca93f71df449af8bfe8c6aab7579047668ab38d2d25f6dcfb3
MD5 51ce77133798c2fb13f5e77340f17721
BLAKE2b-256 89bf31f7ad963e8efdf747e38947640d3e07a4a4b376be025c6bf37c26d2576f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.3-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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 85ed58a53aa499ada743437973304bf92bbe8550062e7e6ebfd7d005a54054a8
MD5 effe17e2b13afc6211368ed02a06ab58
BLAKE2b-256 bd0cc18fe9437dad3d24d4df25d889ea04fc4ae745b162d3e4b513298b965229

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.3-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 8d71c7b073ecb7b5cd3e8b9b716c0e1c63170ceb04120f31e6e99e96a7c77ce4
MD5 fce9d889fda4ad7221332a453912cde4
BLAKE2b-256 7bc55ae68676afa756071e895f8dfca7da0a66be16b35ad0eee041fbe73e8310

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.3-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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a8d55346a57153971999e212c18e020ddfad661b8db1ce73862498649ccc07af
MD5 19d98fc0536d68c65337c7e03bbe8e9c
BLAKE2b-256 ed163ddf4b2cbf479142f33a939f94d0ea35d10e70e672a3524f38fbcd381d05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.3-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 93c2b3c7ae76ff8bc6f9f7790fa1e2e1a676d91e50e93c77f0a6a66d37be41ea
MD5 b78df0561b66e8411aced56e952d713b
BLAKE2b-256 09dd1ee2dc44c16b4a965662361ffe497a7cc9dd3b9c78591c120627e2d69d33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.3-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.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a865c9c892014b61552dcda94e1972f738af4f691e18258ea3c70929ac3f0312
MD5 0597c1f0259357fc33399a6ba381dd24
BLAKE2b-256 ae10f4088c03aa7ce4f3d61233631eee2c7825310131df8762d50a3348e7d0ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.3-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 23a6fd65af0913c95e87f4e86ac52599f29fd7591095f01e6b626292c26eba63
MD5 72bb26bf01db03282a3f2b3a1486eca5
BLAKE2b-256 2681c1529890431795ea8c13a046d9bc85ea5958ee74bd639e53100d4643ec72

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.3-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.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 90e36ee0291e3c0a837e4d5b94a73375f61665709b0d581744f1f49ce69cced4
MD5 8e9d5bbcb2366afae175bf89485ee130
BLAKE2b-256 c5c5cecd4e239ffe4a25e244415a75b0b9ac35afe0f8fc81e78b10729b13ac52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.3-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 979407dbd28d880cd979a9e518533480abbfbba316db1d1a5e746245b44e2f88
MD5 134094f19412babdf0a033c85572eb8a
BLAKE2b-256 b1e4cfeeaea4ea4ad1dc00c4fbad9cc685489b346bce647ecc69a0d5687e7e4e

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