RFX-Fuse: Breiman and Cutler's Random Forests as a Forest Unified Learning and Similarity Engine - Extended with Native Explainable Similarity
RFX-Fuse (Random Forests X [X=compression] — Forest Unified Learning and Similarity Engine) delivers Breiman and Cutler's complete vision for Random Forests as a Forests Unified Machine Learning and Similarity Engine with native GPU/CPU support.
Breiman and Cutler designed Random Forests as more than an ensemble predictor. Their original implementation from the early 2000s included classification, regression, unsupervised learning, proximity-based similarity, outlier detection, missing value imputation, and visualization. Modern libraries like scikit-learn's random forests implementation (2010-2011) skipped many of these features.
These capabilities enable it to be a unified learning and similarity engine. With just 1-2 model objects, we can achieve comparable accuracy and output to 3-5 main industery tools. For example, 1 model has comparable output to 4 separate tools for Time Series Regression + native explainable similarity. 1 model = 1 set of trees grown once.
Key Use Cases
| Use Case | RFX-Fuse | Comparable Approach |
|---|---|---|
| Recommender Systems | 1–2 models | 5 tools (FAISS + XGBoost + Shap + Isolation Forests + Custom Code) |
| Finance Explainability | 1 model | 3 tools (XGBoost + Shap + Isolation Forests) |
| Time Series Regression | 1 model | 4 tools (XGBoost + Shap + Isolation Forests + FAISS) |
| Imputation Validation | 1 model | time series methods (general tabular: RFX-Fuse) |
| Anomaly Detection | 1 model | 3 tools (Isolation Forests + Shap + Custom Code) |
Novel Contributions
- Native Explainable Similarity: Breiman and Cutler's original similarity scoring via proximities enable comparable output with Faiss for NDCG + HR on retrieval. Proximity Importance gives the why.
Explanations available in arXiv paper.
- Imputation Quality Validation for General Tabular Data — Rank imputation methods by how "real" the imputed data looks, without ground truth labels.
Comparable Tools Functionality Comparison
| Feature | RFX-Fuse | XGBoost | sklearn RF | FAISS |
|---|---|---|---|---|
| Classification | ✓ | ✓ | ✓ | — |
| Regression | ✓ | ✓ | ✓ | — |
| Unsupervised | ✓ | — | — | — |
| Overall importance | ✓ | ✓ | ✓ | — |
| Local importance (per-sample) | ✓ | SHAP | — | — |
| Proximity/similarity scoring | ✓ | — | — | ✓ |
| Overall proximity importance | ✓ | — | — | — |
| Local proximity importance | ✓ | — | — | — |
| Top-K similar with explanations | ✓ | — | — | — |
| Outlier detection with explanations | ✓ | — | — | — |
| Missing value imputation | ✓ | — | — | — |
| Weighted bootstrap sampling | ✓ | ✓ | ✓ | — |
Installation
Pre-built Wheels (Recommended)
Pre-built binary wheels are available on PyPI for Python 3.11, 3.12, and 3.13. No compiler, CMake, or CUDA toolkit needed for CPU builds.
GPU (requires CUDA 12.4+ toolkit installed on your system)
pip install rfx-fuse
CPU-only
pip install rfx-fuse-cpu
Available Wheels
| Package | Platform | Python | Architecture |
|---|---|---|---|
rfx-fuse |
Linux | 3.11, 3.12, 3.13 | x86_64 (CUDA 12.4) |
rfx-fuse |
Windows | 3.11, 3.12, 3.13 | x86_64 (CUDA 12.4) |
rfx-fuse-cpu |
Linux | 3.11, 3.12, 3.13 | x86_64 |
rfx-fuse-cpu |
Windows | 3.11, 3.12, 3.13 | x86_64 |
rfx-fuse-cpu |
macOS | 3.11, 3.12, 3.13 | Apple Silicon (ARM) |
Note: GPU wheels require the CUDA Toolkit 12.4+ to be installed on your system. CPU wheels have no external dependencies beyond Python and NumPy.
From Source (GPU)
git clone https://github.com/chriskuchar/RFX-Fuse.git
cd RFX-Fuse
pip install -e .
From Source (CPU-only)
git clone https://github.com/chriskuchar/RFX-Fuse.git
cd RFX-Fuse
RFX_CPU_ONLY=1 pip install -e .
Prerequisites (source builds only)
- Python 3.9+
- CMake 3.18+
- C++ compiler with C++17 support (GCC 7+, Clang 5+, MSVC 2019+)
- OpenMP (usually included with compiler)
- CUDA toolkit 12.4+ (GPU builds only)
Verify Installation
import RFXFuse as rfx
print(f"RFX-Fuse version: {rfx.__version__}")
print(f"CUDA enabled: {rfx.__cuda_enabled__}")
Examples
Each use case has a complete demonstration script in the examples/ folder:
| Use Case | Demo Script | Description |
|---|---|---|
| Recommender Systems | examples/recommender_system/demo_recommender_system.py |
MovieLens 25M: similarity retrieval + ranking with explanations |
| Finance Explainability | examples/classification/demo_loan_classification.py |
Loan default prediction with 4-type explainability |
| Time Series Regression | examples/time_series/demo_time_series.py |
Bike sharing: prediction + outlier detection |
| Imputation Validation | examples/data_imputation/demo_imputation.py |
Rank imputation methods without ground truth |
| Anomaly Detection | examples/anomaly_detection/demo_anomaly_detection.py |
Breiman-Cutler outlier detection |
| Sample Weights | examples/classification/demo_sample_weights.py |
Weighted bootstrap sampling for classification & regression |
Run an example:
cd examples/time_series
python demo_time_series.py
Industry Use Cases
Use Case 1: Recommender Systems
RFX-Fuse Unsupervised for retrieval + RFX-Fuse Supervised for re-ranking on MovieLens 25M.
Recommender System Stage 1:
Explanations available in arXiv paper.
Recommender System Stage 2 Part 1:
Explanations available in arXiv paper.
Recommender System Stage 2 Part 2:
Explanations available in arXiv paper.
Recommender System Stage 2 Part 3:
Explanations available in arXiv paper.
Use Case 2: Finance Explainability
Single classifier provides regulatory-compliant explanations (ECOA, GDPR, Fair Lending).
Explanations available in arXiv paper.
Use Case 3: Time Series Regression
RFX-Fuse Regressor on UCI Bike Sharing dataset with full explainability.
Explanations available in arXiv paper.
Use Case 4: Imputation Quality Validation
Novel capability for general tabular data. Rank imputation methods by how "real" the imputed data looks.
Explanations available in arXiv paper.
Use Case 5: Anomaly Detection
Breiman-Cutler method: train on clean data, anomalies have high P(synthetic).
Explanations available in arXiv paper.
API Reference
For complete API documentation with all parameters, methods, and examples, see docs/API.md.
Performance
GPU Benchmarks
Environment: NVIDIA RTX 3060 (12GB), AMD Ryzen 7 5800X, 32GB RAM
| Use Case | Train Size | Features | Trees | Training Time |
|---|---|---|---|---|
| Recommender (Unsup) | 59,047 (×2) | 23 | 1,000 | ~1,040s |
| Recommender (Sup) | 47,237 | 21 | 1,000 | 120s |
| Finance Classification | 46,396 | 15 | 500 | 69s |
| Bike Regression | 5,725 | 4 | 1,000 | 24s |
| Imputation Validation | 3,000 | 12 | 100 | 3.6s |
| Anomaly Detection | 15,000 | 8 | 100 | 112s |
Training times include predictions, similarity scoring, proximity importance, local importance, and all explainability features where applicable.
CPU Benchmarks
Coming soon.
Methodology
For detailed methodology, see:
Citation
@article{kuchar2026rfxfuse,
author = {Kuchar, Chris},
title = {RFX-Fuse: Breiman and Cutler's Unified ML Engine + Native Explainable Similarity},
year = {2026},
journal = {arXiv preprint arXiv:2511.19493},
url = {https://arxiv.org/html/2603.13234v1}
}
Acknowledgments
This work aims to implement the full unified learning and similarity engine Dr. Leo Breiman and Dr. Cutler created when they made their Fortran/Java implementation in the early 2000s.
Special thanks to Dr. Adele Cutler for generously sharing original Breiman-Cutler Random Forest source materials, which made this faithful restoration and extension possible.
Work in Progress
- Multi-class classification support
Previous Work
- This is the successor to https://github.com/chriskuchar/RFX.
License
MIT License - see LICENSE for details.
Metadata
Release files for rfx-fuse-cpu 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| rfx_fuse_cpu-1.1.4-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
| rfx_fuse_cpu-1.1.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| rfx_fuse_cpu-1.1.4-cp313-cp313-macosx_14_0_universal2.whl | CPython 3.13 | CPython 3.13 | macOS 14.0+ universal2 (ARM64, x86-64) | Details |
| rfx_fuse_cpu-1.1.4-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| rfx_fuse_cpu-1.1.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| rfx_fuse_cpu-1.1.4-cp312-cp312-macosx_14_0_universal2.whl | CPython 3.12 | CPython 3.12 | macOS 14.0+ universal2 (ARM64, x86-64) | Details |
| rfx_fuse_cpu-1.1.4-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| rfx_fuse_cpu-1.1.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| rfx_fuse_cpu-1.1.4-cp311-cp311-macosx_14_0_universal2.whl | CPython 3.11 | CPython 3.11 | macOS 14.0+ universal2 (ARM64, x86-64) | Details |
Total release size: 19.5 MB
Release files / rfx_fuse_cpu-1.1.4-cp313-cp313-win_amd64.whl
| Download URL | rfx_fuse_cpu-1.1.4-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 890.9 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8c8452bf7f9eb2d66db8fad0b87616fed2e7d378078908fead45ea9f3dd9bebd
|
|
BLAKE2b-256 checksum How to use checksums |
dfc94fbca6230832afef7233336158a51f45e40e1b1cf1f8031f6d1ec60a079f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 9, 2026.
Transparency logRelease files / rfx_fuse_cpu-1.1.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | rfx_fuse_cpu-1.1.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.2 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
5e4f5c372b0789ab3d95162e778c6e9c5c77c8b80bad2556756daad7208f517d
|
|
BLAKE2b-256 checksum How to use checksums |
50fc4a85eb76cd55faac4538a4706e62c3fbfd8c09878f013b555f7756c06bbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 9, 2026.
Transparency logRelease files / rfx_fuse_cpu-1.1.4-cp313-cp313-macosx_14_0_universal2.whl
| Download URL | rfx_fuse_cpu-1.1.4-cp313-cp313-macosx_14_0_universal2.whl |
|---|---|
| Size | 465.5 kB |
| Tags | CPython 3.13 macOS 14.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
9cbf6249e423ebfed79d3032de13f62f8f0ca3f63d597d69ac8193430a7de5a8
|
|
BLAKE2b-256 checksum How to use checksums |
90682ffc6087b28770aeea010c7e025f918a132c63b5b093da94d7589e254bc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 9, 2026.
Transparency logRelease files / rfx_fuse_cpu-1.1.4-cp312-cp312-win_amd64.whl
| Download URL | rfx_fuse_cpu-1.1.4-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 891.0 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ac0e4ad91dc44c583560564d32ad469523b91ea1c6180feb7a04f0c02a3cceb6
|
|
BLAKE2b-256 checksum How to use checksums |
254208561f41188019097bb0af675a04c4f68047bf3556a4e516814ec02a8f4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 9, 2026.
Transparency logRelease files / rfx_fuse_cpu-1.1.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | rfx_fuse_cpu-1.1.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.2 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
84377b33687766c5009402ef57b9d7ef3f80985cee46b222fe1c327108353b32
|
|
BLAKE2b-256 checksum How to use checksums |
cc37f15ab52e4471d71a4f10ab63d1b3a6f463a5a5c5c32b0a7517030036021a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 9, 2026.
Transparency logRelease files / rfx_fuse_cpu-1.1.4-cp312-cp312-macosx_14_0_universal2.whl
| Download URL | rfx_fuse_cpu-1.1.4-cp312-cp312-macosx_14_0_universal2.whl |
|---|---|
| Size | 465.5 kB |
| Tags | CPython 3.12 macOS 14.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
7d3ce01bc17f370e72765de18d528ba6c2d6274d0be079963ec292c23425a6ea
|
|
BLAKE2b-256 checksum How to use checksums |
479692573b49edf00c14b89ad124517480f73a44bbfe34984b49d165690cf405
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 9, 2026.
Transparency logRelease files / rfx_fuse_cpu-1.1.4-cp311-cp311-win_amd64.whl
| Download URL | rfx_fuse_cpu-1.1.4-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 888.7 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
614137bb67f9624342a54eaea5fbf6dce9996520e2b2da2342afc412fc839809
|
|
BLAKE2b-256 checksum How to use checksums |
408ee202dd394bfd39f59495338a8e9fe9391ecde1204b246e7c9114b6a78d3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 9, 2026.
Transparency logRelease files / rfx_fuse_cpu-1.1.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | rfx_fuse_cpu-1.1.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.2 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
19c61875d6ecf65f7e00068f0f285fb8d3470109ae3149ba8c117001c81f161c
|
|
BLAKE2b-256 checksum How to use checksums |
c7d1fe77199997c87468f9fd782689a724f2f4c8f7df2aa03e618258ab5ec02b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 9, 2026.
Transparency logRelease files / rfx_fuse_cpu-1.1.4-cp311-cp311-macosx_14_0_universal2.whl
| Download URL | rfx_fuse_cpu-1.1.4-cp311-cp311-macosx_14_0_universal2.whl |
|---|---|
| Size | 461.3 kB |
| Tags | CPython 3.11 macOS 14.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
d1ab0af6eb2cd28ae3d7f5c70594982d03ada08e01a3e1bc76eff085c3cf5095
|
|
BLAKE2b-256 checksum How to use checksums |
4a7a26f182eac3247094b489cd9e5609bfbd23cd6b8e124d75cdd604cabc1762
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 9, 2026.
Transparency log