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.

Citation

@article{gbrl,
  title={Gradient Boosting Reinforcement Learning},
  author={Benjamin Fuhrer, Chen Tessler, Gal Dalal},
  year={2024},
  eprint={2407.08250},
  archivePrefix={arXiv},
  primaryClass={cs.LG},
  url={https://arxiv.org/abs/2407.08250}, 
}

Licenses

Copyright © 2024, NVIDIA Corporation. All rights reserved.

This work is made available under the NVIDIA Source Code License-NC. 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded CPython 3.12macOS 15.0+ ARM64

gbrl-1.1.2-cp312-cp312-macosx_11_0_x86_64.whl (391.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

gbrl-1.1.2-cp311-cp311-macosx_11_0_x86_64.whl (391.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

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

Uploaded CPython 3.10macOS 15.0+ ARM64

gbrl-1.1.2-cp310-cp310-macosx_11_0_x86_64.whl (390.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

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

Uploaded CPython 3.9macOS 15.0+ ARM64

gbrl-1.1.2-cp39-cp39-macosx_11_0_x86_64.whl (390.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.2-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 da4881b5395a536cad020d3a17a00ddc86b8221616cb490dbe3ddd82a75e3d89
MD5 3945fb8a8c363a9188cb3fab110cc149
BLAKE2b-256 5c64c7a4779f65377c996813ee6561a8d8a4271f9b1b108e2497bd2a9a472f98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.2-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 438015d1fbf19ccc04aa1f067f47a6d88f74082dc09bb9c9c4589b5dc963d6e3
MD5 1bf8bc3c6fd6c49fa3c53cd8318843b5
BLAKE2b-256 a4f4f4034d238181037728cecdf011e46b95881397d6e4876e3f81785719cb74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.2-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7dfd601afc54f442d6c13b2078660e7fcdfb41ca11d841acb76d367c47a5765e
MD5 3c44c20c16b8e7e97ebcd37943484eba
BLAKE2b-256 5e1c3512e421ba83277ae7fdf8e2d346409a78a56c17d117eb181174dc8c55d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.2-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c023d935607d6325a50bfd1239a6a35ae6156d0f877b6082de4dd6e5802c6ae9
MD5 d15e62f3fa5ec00600b50bbe9bbd132d
BLAKE2b-256 0cd65f3f5716c08214a4257aa4970fd47f9f3c0ad366fc588dab1b6be0bfc0e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.2-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 fc6fa770b0114bd618a96633d21eed29422d10604384bb4f95062ad1ab1cabee
MD5 1ad0f50b5b8d8f0c30b18da12fa6b49f
BLAKE2b-256 5560c7ccd9f48894db3fb597803ecc832d16ae2a7d31271aad4fa7dc5d68b26a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbrl-1.1.2-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 b895ca0be0d8a71af68ccababd93f56718dad9d35c6e34ac8d1209f2fb2085f9
MD5 eb8ff64f52d4f7771a8e631434b67924
BLAKE2b-256 51e32b39c03655fea3ea136b848fa308efd4f81247560472ff95d848713432ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.2-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.2-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 fa702395cea321713d66bcd1892a3a42c6697652a120a2b47978d560c1d0f941
MD5 f52d7345e33449abfa0e06f73655b6ca
BLAKE2b-256 0ee4d962f91e664e20bc302c43019ffb8886fccfdb594e1b431343a18c4ea9a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbrl-1.1.2-cp39-cp39-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 390.3 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.2-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 bee34b317375072da9ccdbd9566cef02813966dbb1111dd0a8132220665081b5
MD5 3f5d772d8032e5598e88aa7fd38d22ca
BLAKE2b-256 9800a68b8febf46f018b5f63d7a3e60f7e0f246ed52f9fab3e10553a134f2193

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