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.4.tar.gz (170.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.4-cp312-cp312-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.9Windows x86-64

gbrl_gpu-1.1.4-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.4.tar.gz.

File metadata

  • Download URL: gbrl_gpu-1.1.4.tar.gz
  • Upload date:
  • Size: 170.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.4.tar.gz
Algorithm Hash digest
SHA256 d9cffd3d76023c9587fc109c13baa04d52d38e51678681d2e99d745415472a77
MD5 a5e15d2d115c5fa2535a16cf66e1bea3
BLAKE2b-256 6df14dc7c87dad0f5843fd0994b3d36792fa3b1ba10514d61e72ea1b1841edde

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.4-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.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5075564dfb279ade5ff8c04e65652ea01a107676b362e18488f3bbbfb7fe6345
MD5 ff716aa029a165d9e5b50cf8022acbf5
BLAKE2b-256 f804880806d5c4d4bdd414e00fbaeff50e761cf42e5a67741b2c8ef1f2191760

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.4-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 5eb12f17f438661612caa99976754737400f6be42f00bdf345df2253aba742f1
MD5 90a76e8c6073f4ff006e3711b1dc1605
BLAKE2b-256 d3a80d5988c34702176f2bc70153d31230ab082a7bfd2805fad2f0b6fcf25aa6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.4-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.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a552cb98c46273aee91fa9b9bd2d762fa24301c58cbacf98cdfe5e164893c3b5
MD5 daaad62b6003b682c832a8ad6fba21c5
BLAKE2b-256 8bbf1d0fb8b197e54f1ac386bd879e5d056ee8d9ee72f10376b0c12de26f619c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.4-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 2cde45aa01a4b9b34b7f9744dee7f9e92c20b20ac183212ca26b3c85002ada1e
MD5 87630d5bba160f20d5fbcc8ea89d27eb
BLAKE2b-256 815af717665950a2d62756fc2085154a63b1c79906f6324e4202ec032001975f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.4-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.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 88c65bc3dd05d41c95145796df8688f6e6b9a82b958c9ab92f72b9dbd3a01adc
MD5 3e8635d98efb67b80725885305596379
BLAKE2b-256 7aab4db254cec7e00c5a5bb7bd97595f7f10eb1af7bf7e10e474411d5dedada9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.4-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 eae01db2f48b80cf4ca818f016f40ff46afd25cc6f1aa6b7860b26e683c11226
MD5 a885db4c9ccf5e06160df0add9de1cb7
BLAKE2b-256 40a62b25b22af6597ead404d78b03a890d86a4107d0808f3ca71aca47f00327c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl_gpu-1.1.4-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.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ec65dc7059eac6b1a158fa9eac3a6d03822deeeff2c2a6b0c7fc630ab177ab95
MD5 277d86316ebe7a721c5a762e6620c665
BLAKE2b-256 e4e054a56679d0ec027d9062875f4804e87384bb475611e4cf8f73ed3cad9f40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl_gpu-1.1.4-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 3cdd52429acb2d23ef92eda0ee20ccc233fe5ff1fc6d7d21e086f5fd1b2de57f
MD5 53571ed1b2f065848f29718cab16770d
BLAKE2b-256 b84024cf96c4da4a89f2d36f0f065657735902e74d4a4961c4c86a6cbc36de83

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