BOAT  by callous-youth

Gradient-based bi-level optimization toolbox

Created 1 year ago
1,017 stars

Top 36.8% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

BOAT (Bi-Level Optimization Operation-level Toolbox) addresses the complexity of implementing gradient-based Bi-Level Optimization (BLO) by providing a compositional, operation-level framework. It targets researchers and practitioners, enabling the automatic composition of over 85 solver variants from a compact set of 17 reusable gradient operations, bridging theoretical modeling and practical implementation.

How It Works

BOAT deconstructs BLO solvers into three modular stages: Gradient Mapping (GM), Numerical Approximation (NA), and First-Order (FO). Utilizing a unified constraint reconstruction perspective, it allows users to dynamically compose solvers by combining these atomic primitives. This approach facilitates the recovery of classical BLO algorithms or the discovery of novel hybrid solvers through simple configuration changes, decoupling algorithmic logic from model definitions.

Quick Start & Requirements

Installation is straightforward via pip: pip install boat-torch for the PyTorch version. Alternatively, clone the repository and install from source (pip install -e .). The project requires Python 3.8+ and is primarily built for PyTorch, with Jittor and MindSpore backends available in separate branches. Links to official installation, docs, tutorials, and examples are provided in the repository's header.

Highlighted Details

  • Compositional Abstraction: Deconstructs BLO into modular GM, NA, and FO stages.
  • Generative Solver Construction: Dynamically composes over 85 solver variants from 17 atomic gradient operations.
  • Configuration-Driven: Defines complex optimization strategies via simple JSON configurations, separating algorithm logic from model code.
  • Unified Computational Analysis: Offers comprehensive complexity analysis for gradient-based BLO techniques.
  • Robustness: Achieves 99% code coverage through rigorous testing.

Maintenance & Community

The project utilizes GitHub Actions for CI/CD and Codecov for test coverage, indicating active development and testing. Specific community channels (e.g., Discord, Slack) or a public roadmap are not detailed in the provided README snippet.

Licensing & Compatibility

The project is released under the permissive MIT License. This license allows for broad use, modification, and distribution, including for commercial purposes and integration into closed-source projects, with standard attribution requirements.

Limitations & Caveats

The provided README does not explicitly list any limitations, alpha status, or known bugs. The primary focus is on the PyTorch backend, with support for Jittor and MindSpore available in separate branches, which may indicate differing feature sets or maturity levels.

Health Check
Last Commit

6 days ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
127 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.