HydraBoost
Bandit-allocated heterogeneous Newton boosting for tabular data.
Most gradient boosting libraries assume the answer is always an axis-aligned tree. HydraBoost does not. Each boosting round fits one weak learner drawn from a pool of structurally different families, and a bandit allocates rounds to whichever family is actually reducing validation loss. A dataset with smooth or linear structure gets ridge, spline and RBF steps that a tree ensemble would need many splits to approximate; a dense interaction surface gets deep trees. You do not have to know which in advance, and you do not have to tune it to find out.
pip install hydraboost
from hydraboost import HydraBoostClassifier
clf = HydraBoostClassifier().fit(X_train, y_train)
proba = clf.predict_proba(X_test)
print(clf.arm_usage_)
# {'pair': 0.08, 'rbf': 0.14, 'ridge': 0.29, 'spline': 0.09,
# 'tree64': 0.19, 'tree8': 0.21}
That last line is a readout of which learner families kept earning their rounds on your data.
Read it as a diagnostic, not as a structure detector. A family that solves its part of the problem in a few rounds can end up with a small share: on purely linear synthetic data, ridge fits the signal almost immediately and the remaining rounds scatter across arms chasing noise. High share means "kept helping for a long time", which is not the same as "matters most".
How it works
Every round, one learner is fitted from one of six families on the current Newton gradients and Hessians:
| Arm | Learner | Captures |
|---|---|---|
tree8 |
8-leaf histogram tree | shallow interactions |
tree64 |
64-leaf histogram tree | deeper interactions |
treeXL |
256-leaf histogram tree (large data only) | dense interaction surfaces |
ridge |
weighted ridge on standardised features | global linear and oblique structure |
spline |
componentwise cubic spline | smooth univariate effects |
rbf |
weighted ridge on k-means RBF prototypes | smooth local multivariate structure |
pair |
quantile-binned pairwise interaction grid | specific two-way interactions |
Arm selection is epsilon-greedy on an exponential moving average of realised validation improvement, with annealed exploration. Tree arms use their own per-leaf Newton optima; the other arms take a one-step Newton line search so learners on different scales compose correctly.
On small datasets a single validation split is a poor signal for both early
stopping and arm feedback, so below small_n rows the estimator pools the
split back in and fits several members on rotating splits, averaging them.
API
HydraBoostClassifier and HydraBoostRegressor are standard scikit-learn
estimators. They handle categorical columns, missing values, binary and
multiclass targets internally, and work inside Pipeline, GridSearchCV,
cross_val_score and the rest.
from sklearn.model_selection import cross_val_score
from hydraboost import HydraBoostRegressor
scores = cross_val_score(HydraBoostRegressor(), X, y, cv=5)
Main parameters, all with defaults chosen a priori rather than tuned per dataset:
| Parameter | Default | Meaning |
|---|---|---|
learning_rate |
0.09 | shrinkage per round |
n_rounds |
800 | maximum boosting rounds |
patience |
60 | early stopping patience |
subsample |
0.8 | row subsample per round |
validation_fraction |
0.15 | held out for early stopping and arm feedback |
small_n |
2500 | below this, use bagged internal validation |
n_members |
5 | members fitted in bagged mode |
Benchmarks, and what they do and do not show
HydraBoost was developed against a 16-dataset suite and compared to tuned XGBoost, LightGBM and CatBoost under a shared protocol: 5-fold cross validation, identical folds and design matrices for every model, a 15 percent inner validation split, and test folds never touched during fitting or selection. Each opponent got 8 random hyperparameter configs with early stopping. HydraBoost got one fixed config and no tuning.
On that suite HydraBoost had the best mean metric on 10 of 16 datasets and the best mean rank (1.75, against CatBoost 2.19, LightGBM 2.88, XGBoost 3.19), while fitting 1.5 to 23 times faster than the opponents' average.
These numbers should be read with care, and the honest caveats are these. The algorithm went through four design iterations against that same suite, and iterating against a benchmark inflates significance, so the reported p-values are optimistic. CatBoost's depth grid was capped at 8 for single-threaded compute budget, which handicaps it. Every model ran single-threaded. No untouched large-scale benchmark (OpenML CC-18, Grinsztajn et al.) has been run yet, and until one has, the fair claim is "competitive with tuned GBDTs out of the box on small to mid-size tabular data", not "state of the art".
The full harness and per-fold results are in benchmarks/ so
you can rerun or contest any of it. Independent results on datasets I have
never seen are the most useful contribution anyone could make here, including
negative ones.
Known weak spots from the existing runs: small noisy datasets with many features relative to rows, and problems that are purely dense interaction surfaces, where a dedicated GBDT still wins.
Relation to prior work
HydraBoost combines existing ideas rather than inventing a new one. The specific combination does not appear to be published, but the components are well established and the credit belongs upstream:
- Gradient and Newton boosting: Friedman (2001); Chen and Guestrin (2016)
- Componentwise boosting with base-learner selection per iteration, the
direct ancestor of the arm pool: Bühlmann and Yu (2003); the
mboostfamily - Bandits inside boosting, though for feature selection rather than learner families: Busa-Fekete and Kégl (2009, 2010)
- Heterogeneous base learners across iterations as an alternative to
hyperparameter tuning, and cross-validated early stopping for small data:
the
OGBoostpackage (2025) - Pairwise interaction terms in an additive model: the EBM /
interpretline of work - Histogram tree construction: LightGBM (Ke et al., 2017), used directly here
Contributing
Benchmark results on new datasets, especially failures, are the most valuable thing you can send. See CONTRIBUTING.md.
License
MIT
Metadata
Release files for hydraboost 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hydraboost-0.1.0.tar.gz | 58.6 kB | With provenance | Details for hydraboost-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hydraboost-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hydraboost-0.1.0-py3-none-any.whl |
Total release size: 78.3 kB
Release files / hydraboost-0.1.0.tar.gz
| Download URL | hydraboost-0.1.0.tar.gz |
|---|---|
| Size | 58.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e49047ff5cdc3bb1d02ba32af0787f742822f0aee8bbe78a189486da120c346
|
|
BLAKE2b-256 checksum How to use checksums |
9264857e28957320c0a08bc30eeb76b0aeab344b9cc92161166a7c1463832afd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / hydraboost-0.1.0-py3-none-any.whl
| Download URL | hydraboost-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1bb56bd182f85aaba4da4b6b17746d593dc1e439c3db987fdc368a23556c8210
|
|
BLAKE2b-256 checksum How to use checksums |
2b190b3663ae9f5e7cc1bdfbae966c8d49f7d0922d8238980d8a6a902cc84d21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logSecurity for hydraboost 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hydraboost-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.