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.5.tar.gz (170.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-1.1.5-cp312-cp312-win_amd64.whl (678.1 kB view details)

Uploaded CPython 3.12Windows x86-64

gbrl-1.1.5-cp312-cp312-manylinux_2_31_x86_64.whl (911.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

gbrl-1.1.5-cp312-cp312-macosx_11_0_x86_64.whl (407.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

gbrl-1.1.5-cp311-cp311-win_amd64.whl (679.8 kB view details)

Uploaded CPython 3.11Windows x86-64

gbrl-1.1.5-cp311-cp311-manylinux_2_31_x86_64.whl (911.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

gbrl-1.1.5-cp311-cp311-macosx_11_0_x86_64.whl (407.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

gbrl-1.1.5-cp310-cp310-win_amd64.whl (678.9 kB view details)

Uploaded CPython 3.10Windows x86-64

gbrl-1.1.5-cp310-cp310-manylinux_2_31_x86_64.whl (910.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.31+ x86-64

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

Uploaded CPython 3.10macOS 15.0+ ARM64

gbrl-1.1.5-cp310-cp310-macosx_11_0_x86_64.whl (406.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

gbrl-1.1.5-cp39-cp39-win_amd64.whl (674.6 kB view details)

Uploaded CPython 3.9Windows x86-64

gbrl-1.1.5-cp39-cp39-manylinux_2_31_x86_64.whl (907.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.31+ x86-64

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

Uploaded CPython 3.9macOS 15.0+ ARM64

gbrl-1.1.5-cp39-cp39-macosx_11_0_x86_64.whl (405.9 kB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

File details

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

File metadata

  • Download URL: gbrl-1.1.5.tar.gz
  • Upload date:
  • Size: 170.2 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.5.tar.gz
Algorithm Hash digest
SHA256 c2c6eb79a38d0d989d5d6ebb83b97b41d9e6972ea8a32547d95cfefa6d4d36f2
MD5 f1c6b623eb20570888b7d7f32e82b304
BLAKE2b-256 f07bf6dd3df6460fd952e3cbeab9e56b5ca7b1234a6155557e4232e1c4edab21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 678.1 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.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7fbaeaf1bf8fdd70e1fd11bdcb0f860fea0dceed8b78e1da6afa42d257ce5906
MD5 938f8c7876c5d8163835d0dd4179b550
BLAKE2b-256 5f178432f58f57447b494335a762f6f55009eb32eef40a858e886117d3171b47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.5-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 96596b816c755c01232992a22632456855f3fc3159b9784ce2bf51408eb0681c
MD5 0391dc7540d049d234577a5ed6545ad5
BLAKE2b-256 838a1f26aa5feda9b6ad3d3dbf67c5da942c98473a21c78097801a9a918a3c1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.5-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 3c16c00afc2b688e958a48520c4e23f4dc6adec1cffa42edc268769118b019e1
MD5 47e509b0ec76b6c3b3d1b63a7a4ec7f9
BLAKE2b-256 0efad0f20fe97ceb80bba04db5a76ffffa6ba76b9fd5ef2110c48c57cdfe6532

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.5-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f82438a72cfe40a7aabb8d223a725a71ebbebf489e66d7732dfa546f1426229f
MD5 824f9fff0efb78992d7d5b77d97142f7
BLAKE2b-256 ecc527e85ef4f441c68dc4166d5d360d96c0d25b8355999c3133040ed54f71e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 679.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.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0e8e93e098d89bc9583aab007237dd5e60a9f609fcc5e35bbff2f70f2765d36a
MD5 3c479e7c44b95bad8222fcf549cf5f56
BLAKE2b-256 e74a0b019986dd5c987c1d93d9c1fcf7f1089d8ee2f52c968504e240c5d524bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.5-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 2ea7f6e8cd18c6da3d77e1a1c065b5a68629d575784f08e1f1ebeb5f39568537
MD5 a3a5b510c028a28e50d500a90b17310f
BLAKE2b-256 72d21c6571fea959a0e3868b1c58e96990ce8e180dc0eb979d3efe283818eb11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.5-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 82825d9ee92592ba753431bb02d3e8ac38d10e80955b97f10b02d38d5bfe205c
MD5 ca227f998eeea12d0a1ce641091bc164
BLAKE2b-256 b1fbacbdf67f6a155e25f27d870f375c6e6aae131f6a98cd0bdc38e40af13bfe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.5-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 b16e058dd7b7fe2c5ef1ad3d01353faa73716e7fb974c3f9c3584dd1ecd4fdb9
MD5 23da578dc9f396d0e35877418b7f35b4
BLAKE2b-256 cfc9b6880e2e4865e6297f9bfbeeda5f3701c21f45b558ff1bc08fd23c3405e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 678.9 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.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eb726b12cd275b636d7cf39b6231af60c6f51d1349e7fab52630a5f1abdd708e
MD5 0a8e0ba29f63d1c0f9ab2bcf2e6ea550
BLAKE2b-256 7e5d908d16a16c4ba454d1d5979e47f3ffe2b86797fa5c6ba6f347c70f0c71db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.5-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 77b3013d32cbf5817f7fd1bfaa0fe99403e6ac77c9a9f8f850900555599347e2
MD5 3f2ca41e1ac187ce5404c384bcb2b2f4
BLAKE2b-256 2c35a56779d093a4b51ae954018249708398a2809bc666682227b85dbd85ffad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.5-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 36ed31783439531bde12c58f80a79235bb3adaff5345034cac12df56e31c353e
MD5 1bcbc4dd88200fddf82944d4820dc58c
BLAKE2b-256 75dc74911fdf614d9944f2e02617e99d757cf746851d10ef1b5c3e48e0b19c3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.5-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 7f3870a140ee31e7469f2eb023723ccfa76134638ea80fd825c3f08818431119
MD5 acf41f085d446d45e5c00742c7493a01
BLAKE2b-256 01cd7ef347f5633fe3881445c5b34f78a0364f9b8733f4d8286a83ec784ed16f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 674.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.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 22a1e8ea7785b430440688f1540f35b745d266bd35b8b1215ddde09040b77cef
MD5 4c37124e8d729a6338714c8cbea5fcf4
BLAKE2b-256 11646798ae2172dea0394ccb404c39472d67022850ecb48bc4d24d7fc74ec4d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.5-cp39-cp39-manylinux_2_31_x86_64.whl
  • Upload date:
  • Size: 907.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.5-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 0585b292154d78c3267e41697f0de15a664620c8cd603ffa7a4ceadbc9a78577
MD5 4ea78c0b7a93432a8592d68db494ee1b
BLAKE2b-256 c10b247f05c0f2bee390fe1ccc480e1b6a7cea6628cef611329b9b303ae78de3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.5-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.5-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 eefb6a65ad3fa33eaa06ed216d8395521516b8998196d96297897ae903afa499
MD5 926a4b0e1bf32ceed3f1ef2315c5de62
BLAKE2b-256 ab7d235225e237034ea4b6c503e16c359b2034b5652a2344dcc7933c00ea418a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.5-cp39-cp39-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 405.9 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.5-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 42ec7354ee1ae459353859bf6c61244fff72a8c69aca940a102b93322ca5ce8f
MD5 d24439192e5c3f74b51c30e5cb380e6d
BLAKE2b-256 55b22bcf194399b1b60d6ce3d8f319a5a93dd1106ff66540bc9889dc8672a6eb

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