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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.9Windows x86-64

gbrl_gpu-1.1.6-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.6.tar.gz.

File metadata

  • Download URL: gbrl_gpu-1.1.6.tar.gz
  • Upload date:
  • Size: 171.1 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.6.tar.gz
Algorithm Hash digest
SHA256 1e980b1008d126160882171ae6e9e46492de756a023d138aa53b39e5f545628c
MD5 0192329c6be433cc11a29cc8ad47e265
BLAKE2b-256 4fbb877e6ec7136c8f78a78b1684b552837ccb9717e1f64c6caab796074cc527

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.6-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.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 94d35c5cd8793a8e5ef243b1a81db4418324db55d16018dbe74b81f02fe55629
MD5 68adac444c25d67ae442a65b63b9d0f6
BLAKE2b-256 743e8d65311db22cb79bd2a7fbf8f831be59fe587b33c25cc37bf43ac8e581e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.6-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 4d37ee30964d17bd5314c556c89e34c84f6d9df8ddb53df050c653cd5a239992
MD5 6a3643f9a9547f336d0a008733a7498e
BLAKE2b-256 ac376de0d65a4681efb4989e7361cf74d76064e2315b83d3638152f00d5ee928

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.6-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.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9ab6335dec348600d403ce27942380fac0b7ea8b4f43935e2d1b42477e7ec5dc
MD5 6dd7c3cb36d29a5320ed5dfb76f4dab4
BLAKE2b-256 3457917ab9acb8a6e2464a0ccf60152d65e522c455c35e56439cc2355b8c305c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.6-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 2ab18fbec43ee88920904b1a6b6eff2b3c352eca1fc28770a1fcc9093e101434
MD5 303a5777e55a4df1906357dfe6244573
BLAKE2b-256 7e1c09db6cf86ac7116cc235ceb22cc9a7bf90dc73166ca042dd78707f9d383a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.6-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.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d00ebbaccd04a80b84fd0fae4460a55b53ccffc4f92ecaab7cba0eb108634290
MD5 18c8afefd28d86811a045457409b69fb
BLAKE2b-256 214761d95625feb72e5ecbb2167f1e042371d45869268858d338090b12aa8338

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.6-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 dae271d0511dbdbdbcdf3de9e738f3446035ef98a7be6dce7f0fa3faa42d30bf
MD5 852b90b27432fdc894666be5d5a8abf9
BLAKE2b-256 e82e58e5c2ad1c36c35cb988208a47fd68431261e4882e4b268eb56dbc68bef1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.6-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.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1a088a9f02fe50b918d3e9fb9965b346f56a9ce506629dc05702894d6e742781
MD5 a36d75659982307a06a9030273b5e685
BLAKE2b-256 8b609713f86a52a65824ab196731757efebbe69beb6174445c4fec725f97c058

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.6-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 5be5b0af48371b76e655290ff3fedcab5e1e17020650ba1b8e472c26054ff454
MD5 5538be41d96ee1182470a52c6d4bff1c
BLAKE2b-256 90271d78898787931a56f2475d2e0a2c58129e77bcea10e519c88725282b93f7

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