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

Uploaded CPython 3.12Windows x86-64

gbrl-1.1.3-cp312-cp312-manylinux_2_31_x86_64.whl (910.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gbrl-1.1.3-cp312-cp312-macosx_15_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

gbrl-1.1.3-cp311-cp311-win_amd64.whl (678.8 kB view details)

Uploaded CPython 3.11Windows x86-64

gbrl-1.1.3-cp311-cp311-manylinux_2_31_x86_64.whl (910.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gbrl-1.1.3-cp311-cp311-macosx_15_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

gbrl-1.1.3-cp310-cp310-win_amd64.whl (678.0 kB view details)

Uploaded CPython 3.10Windows x86-64

gbrl-1.1.3-cp310-cp310-manylinux_2_31_x86_64.whl (908.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.31+ x86-64

gbrl-1.1.3-cp310-cp310-macosx_15_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

gbrl-1.1.3-cp39-cp39-win_amd64.whl (673.6 kB view details)

Uploaded CPython 3.9Windows x86-64

gbrl-1.1.3-cp39-cp39-manylinux_2_31_x86_64.whl (906.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.31+ x86-64

gbrl-1.1.3-cp39-cp39-macosx_15_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: gbrl-1.1.3.tar.gz
  • Upload date:
  • Size: 166.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.3.tar.gz
Algorithm Hash digest
SHA256 262347cc90de66efbf7e9da0fae015caa35d3a6bbcc460e29213f19be1a0998a
MD5 d3f2f52abcf0f358d58872333d1ecec3
BLAKE2b-256 501fc633c6328731ba8e76a94d9afe0dcba4b8b17c7f0929bde5975f3b2c0239

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 679.5 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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 079241b3e14a543e9050ab1f66dc7a73378be077e30a05c439e7b85c37583f58
MD5 488202cb3b356ab080c5301afbb5e043
BLAKE2b-256 394367ced0e7c3b0b7be57446338dbcb268627d3466a4ff5af92063f60a02954

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.3-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 b253c2fb0add3c1fcb41b12b068387cec536dccc671ad86e1d3a90916be55268
MD5 8e55a0b52d9b057a8d4fed6ce9c5dbb5
BLAKE2b-256 8104095f087f7f6686db38a5298c8c4a3a7e0db1c4cbc7a917bfba33d4f791e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.3-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5e1f9c8f8bffb38e55831c144b7c20576abd116e76632e2a64e88431f7bd848b
MD5 4d8c25f824f4fea9effed2acb619afef
BLAKE2b-256 e86c3813e5f57afb8170f9fd3cbc103aa4d6f74462626e20b80aabcbdb00bd99

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 678.8 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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 50a5e996a506286d4ee0ac6ad66b6b89365d1e3f2ea696f76bf5275d13a3c6b5
MD5 ac49a3f9fe47766ff32e815991cf41a6
BLAKE2b-256 bbfeb300752bd437aea214ae755e516951605cd134f648313a020def147e3fdc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.3-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 464d4c4ac6a70b68a923426451d17626c882a490de60cfeb1f5f0b9af167f46b
MD5 a5dd17fd24585fc6b0d5b96125c524e5
BLAKE2b-256 d9c87c24cfb51a262b11275846020853048a2ab8d1c0b869e3cd8b5f05b8c4b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.3-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 cc69c060b49c96161e879b5048cd4e09e8226d0ffbde7e121488bab8081571b0
MD5 bdacfd256477983abc3fd117bf298661
BLAKE2b-256 79103aab37406559409b12cd3fc8441197be6202fbb81b18303d0c4eead1f5dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 678.0 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.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 28c6bf7ddab3ed080abece8abcc451153b8b043ad953aecca9d2acc0c338ba23
MD5 f5ee816a080dabefd3f65f46ed21172e
BLAKE2b-256 466a23eaf17a846481647bb374d9b036b4cc412b34cca8c5079b85eb2b3206ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.3-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 730f5453c2ca0e169bd893036a68897c9ac1cca517eff59ec10a3a37e6f4bd42
MD5 c652970c0159137be79d97791ab9af82
BLAKE2b-256 11696832e97e30b4de3279e13f5ba34c97bda51ac024d9ec8e6429ddabe5c9d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.3-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a61e9d9bf224b1da53f5e8bd53e643e7f76b3a3b7450b5c6274f3aea83dea086
MD5 18b21cc2501b5d1ee36bd13c3e63b71e
BLAKE2b-256 8068548eba7c2f8ca401016ae1cf29a613e9303a3cb9499928f65bbad349e44c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 673.6 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.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8aaba6a5b6832e265ec2052e0eff6a2b233319f6e6dfb7aa8eb5e50b52e053f4
MD5 baa9e843e66d4403f125024f786c0396
BLAKE2b-256 a822d59474ced8ab65bbc1fbaf645fb1c425fa3654d4976a3fdb766d80f440ef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.3-cp39-cp39-manylinux_2_31_x86_64.whl
  • Upload date:
  • Size: 906.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.3-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 5c0b504477525b2a7fa0f32d98b7064fab149877460480f628fedb83eb39695b
MD5 52cd68d3c37cbef800cc405a3d8640ee
BLAKE2b-256 3ad2570d5f763d37ced0a2f0f60c91bb141d4ba11efb609ad34b563b2f1f8ad6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.3-cp39-cp39-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 1.1 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.3-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 975941c583cedab3efcd37ba51a4f1df465200b792447ca1dc31418bdba34974
MD5 b347e58a23e585f219768b5027f11db2
BLAKE2b-256 4e4aafda2179e478e997312d7ceb6f1eea2492e53c4150554bd8d3d3a5687cf1

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