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.6.tar.gz (171.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-1.1.6-cp312-cp312-win_amd64.whl (680.5 kB view details)

Uploaded CPython 3.12Windows x86-64

gbrl-1.1.6-cp312-cp312-manylinux_2_31_x86_64.whl (913.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

gbrl-1.1.6-cp312-cp312-macosx_11_0_x86_64.whl (409.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

gbrl-1.1.6-cp311-cp311-win_amd64.whl (682.2 kB view details)

Uploaded CPython 3.11Windows x86-64

gbrl-1.1.6-cp311-cp311-manylinux_2_31_x86_64.whl (913.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

gbrl-1.1.6-cp311-cp311-macosx_11_0_x86_64.whl (409.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

gbrl-1.1.6-cp310-cp310-win_amd64.whl (681.2 kB view details)

Uploaded CPython 3.10Windows x86-64

gbrl-1.1.6-cp310-cp310-manylinux_2_31_x86_64.whl (912.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.31+ x86-64

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

Uploaded CPython 3.10macOS 15.0+ ARM64

gbrl-1.1.6-cp310-cp310-macosx_11_0_x86_64.whl (408.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

gbrl-1.1.6-cp39-cp39-win_amd64.whl (676.9 kB view details)

Uploaded CPython 3.9Windows x86-64

gbrl-1.1.6-cp39-cp39-manylinux_2_31_x86_64.whl (909.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.31+ x86-64

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

Uploaded CPython 3.9macOS 15.0+ ARM64

gbrl-1.1.6-cp39-cp39-macosx_11_0_x86_64.whl (408.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

File details

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

File metadata

  • Download URL: gbrl-1.1.6.tar.gz
  • Upload date:
  • Size: 171.0 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.6.tar.gz
Algorithm Hash digest
SHA256 a0bd2acebf23b2168021e28074a0743bd8029da198330537e84429cdfc7d133f
MD5 607e7733ccede5f41cb06d5ab468108a
BLAKE2b-256 e5ac61c0808528745f5e4b12ae8bf3e5a39732abc8056f4217ebc55e54ee0314

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 680.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.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2a104c86aeaf24f9adea0624654445fdaff17d01109b57c38b3335c0b56f4148
MD5 5eedcddfd64803c39f4a507aec47dbd6
BLAKE2b-256 77e6a637aff8437cf233d8dfa388bc5f69646bf0e6d542cff3a1fcebb2a83dfd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.6-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 c14f64b2b5ae6b4c53dafe7a3b402812ce42951ef109c9410ecb1319b2e14c80
MD5 dd041bb53e4d7b4e0142dd75936b38b7
BLAKE2b-256 9336325d94aae8688164b8fd3e601f52f48c09804121ddef8b97f74180fac21b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.6-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 975833635376b125b68a1b9a1dbab423b7e9919322442efafe3843d7ee10d8c5
MD5 87fe21cfe5dd50bd4297597c9a8b1a80
BLAKE2b-256 9cecd0814ee308ee69996e397174ed5dec464636daf4885a34c141ea7f34a3f3

See more details on using hashes here.

File details

Details for the file gbrl-1.1.6-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.6-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d7e48e1257b0261f15c36b41f29cba4cc10a29be1266609b1b8513bd59751c46
MD5 20979374865e5e3742290d76b0e27b89
BLAKE2b-256 b3a3a20ef59bfab32171e1516e3a5b0ed05205f8a73925db26c6f66ca924c067

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.6-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 682.2 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.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 05e1f08768a21255fc585567a37a023decdc22c8b7fe4ebe880dbcf7e51996b4
MD5 3f4540179880c345746a41697e9ddf53
BLAKE2b-256 82ec608e7c73b8962ef9dc4d106a9445ebae9296c0a3bcb959a486f888d39887

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.6-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 383afc6d287c18ddaeb0ee988b367b0ec9652867c26419ac22cd26a6d63efe80
MD5 1faf75aebed521bcde3784d8afa88d67
BLAKE2b-256 8013ef9b66aaa161fd1f909e7ec8b3f0e873799ea4ced99570e05f7c39a4f400

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.6-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 719ba652ae68edb6322200650da8db9955f72c739b5114363855f5114f591eb0
MD5 23950d50d48d45b637289dd09a24b70e
BLAKE2b-256 062589d06fc65cd08f813a2012cd8317850022ce40d20af73f15147776079930

See more details on using hashes here.

File details

Details for the file gbrl-1.1.6-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.6-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 e652deebfdc3f26f12205f753e676ebc544c6bc6df0facbbe6614f627ef03afe
MD5 f9501cbc77379e3866b9d8e61c2fd9a5
BLAKE2b-256 ab5ea06dfd1bca920a71cc393a8d67f40f26a3b734b091a99686ad41671009d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.6-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 681.2 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.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 74a7952060614011d6b782f5de8480dd4489e280f161eb1e4962203f3203575f
MD5 d142feb74a5abcf3220711da3338ab36
BLAKE2b-256 e3d0f3b90e6c18a1186d1d3ffc710fda0562deb383e20b87c7b6925f779c0573

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.6-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 c3f461b760d028a1cd4716e3034f6ea804915f4a2a3ba83b91c0270f1c8dfea5
MD5 cf87a4f91fe2cb99a031bdd689d26acb
BLAKE2b-256 c48e562dfdc5ca611de9a67a1e4568537844e283e5f688de7401d07d5d2a9493

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.6-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 cb4059968bf9f37259ac91487086124ea2ed0c9b62e1b68ce4ffc30a0c76ad65
MD5 eac1b1e41f122ca0b4f49867af0e19b0
BLAKE2b-256 2533c6fcee72ce84441a66b12603a0ca6b3731177f934c6342f8572ebe66cbfc

See more details on using hashes here.

File details

Details for the file gbrl-1.1.6-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for gbrl-1.1.6-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 6d6bf7b571927314e7e2e76dc49ed416fb5fd504ce32cc7278aa0a19d07b2069
MD5 60f42c49e5cc3c1ccdd550d1c9d0685b
BLAKE2b-256 642d0d382c26db93649bccfbd3ee0b10636469fd9ff532c8a54701b9f8aa074b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.6-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 676.9 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.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e1fefc964590206fc196803f00fb70580607592ba158765742e116eb9d50a467
MD5 cdca8ba882a2a02dd5e62b1dc777e991
BLAKE2b-256 b2f9a34ab6de285118e09ca1dbcd5ac3357e26542f957a89a0bde9c8f9d96a3b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.6-cp39-cp39-manylinux_2_31_x86_64.whl
  • Upload date:
  • Size: 909.9 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.6-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 f78acec1499298146277c6c2981578ebd7a558b0a4fad33f5979919fcc1540c6
MD5 08dd33ae05d76d48e014fb77dbd7c870
BLAKE2b-256 b9339149ebbd776fa4e068d1134962ddd3fa835f8fd44e485df443f3363e4b68

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.6-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.6-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 3f9d25c55d526d86da2f1a41893543de3542f18d82b51494a03691d67771e42c
MD5 62075fb54acfd42e4306ee7303865aaf
BLAKE2b-256 1742d331fa9ae83fb3cd160ba0ec0cc49d1b288f17481469a33bacddc2e6e302

See more details on using hashes here.

File details

Details for the file gbrl-1.1.6-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

  • Download URL: gbrl-1.1.6-cp39-cp39-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 408.2 kB
  • Tags: CPython 3.9, macOS 11.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for gbrl-1.1.6-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d9a196a90e7fdbd99a9f94fcefb15fb7f7d83cd47e898ac1defd67fbc04646ba
MD5 57b65566fc8f4542b6780352dd7705d2
BLAKE2b-256 68f851ae813af76e637459b693437a2ea19b14caa9b42bc210fecbe2a61e116b

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