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-1.1.7.tar.gz (222.9 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.7-cp312-cp312-win_amd64.whl (765.2 kB view details)

Uploaded CPython 3.12Windows x86-64

gbrl-1.1.7-cp312-cp312-manylinux_2_31_x86_64.whl (992.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gbrl-1.1.7-cp312-cp312-macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

gbrl-1.1.7-cp312-cp312-macosx_11_0_x86_64.whl (483.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

gbrl-1.1.7-cp311-cp311-win_amd64.whl (767.1 kB view details)

Uploaded CPython 3.11Windows x86-64

gbrl-1.1.7-cp311-cp311-manylinux_2_31_x86_64.whl (992.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gbrl-1.1.7-cp311-cp311-macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

gbrl-1.1.7-cp311-cp311-macosx_11_0_x86_64.whl (484.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

gbrl-1.1.7-cp310-cp310-win_amd64.whl (766.0 kB view details)

Uploaded CPython 3.10Windows x86-64

gbrl-1.1.7-cp310-cp310-manylinux_2_31_x86_64.whl (990.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.31+ x86-64

gbrl-1.1.7-cp310-cp310-macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

gbrl-1.1.7-cp310-cp310-macosx_11_0_x86_64.whl (482.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

gbrl-1.1.7-cp39-cp39-win_amd64.whl (761.6 kB view details)

Uploaded CPython 3.9Windows x86-64

gbrl-1.1.7-cp39-cp39-manylinux_2_31_x86_64.whl (988.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.31+ x86-64

gbrl-1.1.7-cp39-cp39-macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

gbrl-1.1.7-cp39-cp39-macosx_11_0_x86_64.whl (482.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

File details

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

File metadata

  • Download URL: gbrl-1.1.7.tar.gz
  • Upload date:
  • Size: 222.9 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.7.tar.gz
Algorithm Hash digest
SHA256 cc89a6dc281a854fd14f0530881db657e68eb4d15ce6cf5b3584141b99ccd70e
MD5 b96e29cafcad6b455dd6a671a0911cb1
BLAKE2b-256 60bac6ab33a340cf4d783349e9e7b7ecf320a5ff444872c6fbe85dc5261fff8b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 765.2 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.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 af284a1f60aa342d765b0d3881b1f1a7d228850f28ff056deb9bf666a776f208
MD5 3d6f957b8f30a56e44551fa22c3c183d
BLAKE2b-256 e6c52c60e87fede1a338767aeeb6a4c7454f9467e98d092d4b870702e3ecf3a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.7-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 91ad7f5b52955830b12a5a4d3ccc808257be748f1491efb7e36c04ac15884271
MD5 db3b1ab4b2e6da43f6a2fc561e8a725b
BLAKE2b-256 48aea455728fc19b7e2358edb6d2c10c90f310b90539097a0775c46e82b4d1bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.7-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e3a379165fc87d5f2eff5eee36d9597954de2fd75499a84d252b06ef9642b85d
MD5 78c74125f22ed63de4bb34827d9f7f22
BLAKE2b-256 381d9be92e230e7753255030b37b5dfcbb29cc55e7b13d01a08c764ad4b33428

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.7-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 3e45538609b861e598440b15c61b0d38583c67e1abe9d347ba28f8b41be9c9bd
MD5 d41f4d2ff54a62c19ae16bcea3518977
BLAKE2b-256 4600d2b62dfbf8074bdd0c03a51767ea9b09fc822093029e091579283a524a2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.7-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 767.1 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.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4c1b8d887dd1552d7f05a7d24ddcd177a4cf4601b958a789fd951fda1f94a711
MD5 3f1148e14dfc25812eac8c51ae929a94
BLAKE2b-256 664acf1655d51d633baafd2207ada6db072155ae5b68455d4921e0d631c0c2b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.7-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 9b469e38508b68f2ef6b9dce03ce5f9d3e71610a7e4e49a09a050dca6919abd7
MD5 9fd01a469ea54065c5378aceba62413e
BLAKE2b-256 6089a60235443c7df61455119c2bd89baaaf0ea4e60f8dcba588b60267deb1a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.7-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1bb494588ef266e48a801098b4e20cbef37b2da64a9eb7bd11364a5bf34cd3d4
MD5 0889aeaaf9b62535087756ebce5f6025
BLAKE2b-256 d1072b70ba06f1007db03495ef0b9fc7f14515841b7aeea09b1bb71cbc248411

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.7-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 aef7bc76cd9421b422a929a7f5af6a7db1b0f86f28b925515bbd855b3c697325
MD5 cad2780794e987c8d51476104d768342
BLAKE2b-256 4a212f4c45061e38aa4258b11bd0c6467491e811d43bd54325969d34ed8cf57e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.7-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 766.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.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3fb75b3eb3a7774b4786cfcba323de267e69fb41488065ccedfb865b16c01e76
MD5 b540a5f0eac4786d68cb020d320cceb9
BLAKE2b-256 594d6e55e9906b8a38e92e76e6d392e608b3f44938432aa00b06eb5ab27eb9cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.7-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 8ad3df62b13283d051cc2cb549bf19d0441a7ba935edfc9a7e8bde880a5132a3
MD5 204ec34417f5a09c466e7d2ed0a276de
BLAKE2b-256 da81e07d9f6b7c2e47203d42e067e5a7e9e844495f4d50ebf78ac4130c5554ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.7-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a3ba551a2b730bc53e87dfc104989275ef282ea5ec8b79b78c530f8ff5f43be1
MD5 7220458494d9fbebb3f44ca303188b96
BLAKE2b-256 f715f13dff3f879ecb6f8aa261015a8b0997f4ad5635517d84ae1230d2689ffe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.7-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f4ada63096e90b4e4e2a29298f3804b170ba5c133ccbde47de75ac278bea7d1f
MD5 aad7e72460d4c98821c98229d8c82e33
BLAKE2b-256 75937856e5fb22a25a94bbccfdac3d15266c37591917ee154fcfca539b20107a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.7-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 761.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.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 89e24808ff6537a33edcc63de0012d7d430108db8027819ff69e86e894d34b0f
MD5 02c9d3e256d3f3cbbf37075319d550e3
BLAKE2b-256 4355c7342ccf391c1152c425132e1a122c5ff4f960a80d88c0736818c7bb67d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.7-cp39-cp39-manylinux_2_31_x86_64.whl
  • Upload date:
  • Size: 988.2 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.7-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 28a87462a036de74025c29f7a63de13f60fca51b7f04f4007b71ea4d226cce30
MD5 f79a436aa8516db6c53fa3dffb32f528
BLAKE2b-256 b9634a0f5356f3c6581b375cc43d9c69129ceed515c465d650c4ca990beeaf76

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.7-cp39-cp39-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 1.2 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.7-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 78ab09a269e5b71bcfe16348c739c556c1729f5c9e11db2b488357b4da0f725a
MD5 856d3150e33f7218b02710adee16b57a
BLAKE2b-256 6533af56cb371f7b4e684edcf07ddd1c827ae470ed6780a1999ee207c857b83b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.7-cp39-cp39-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 482.7 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.7-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 06f05fae7a974c54a231c7be0309f22c0dbf3be75dee233e82eb3db6857e71bc
MD5 78ebb40503fe91ac418ceb58ef930369
BLAKE2b-256 6df232b042c705c45ef37b53c83e6280430b664f191757929477ed929fde63f1

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