RFX让随机森林支持百万级数据,靠GPU加速和量化压缩突破内存瓶颈。
RFX: High-Performance Random Forests with GPU Acceleration and QLORA Compression
- 用QLORA量化压缩近邻矩阵,10万样本内存从80GB减至6.4MB
- CPU+GPU双模式加速,大样本近邻计算可扩展到20万以上
- 开源生产级实现,适合处理超大规模分类任务的科研与工程人员
RFX(Random Forests X)是基于Breiman和Cutler原始方法的生产级随机森林分类实现。v1.0完整支持袋外误差估计、全局与局部重要性度量、带QLORA压缩的近邻矩阵、案例分析及交互式可视化(rfviz),均支持CPU与GPU加速。针对近邻矩阵内存瓶颈(限制样本数约6万),提出四项方案:(1) 使用QLORA压缩GPU近邻矩阵,10万样本下内存由80GB降至6.4MB(INT8量化下12,500倍压缩),保留99%几何结构;(2) CPU TriBlock方法结合上三角存储与块稀疏截断,实现2.7倍内存降低且无损质量;(3) SM感知的GPU批处理调度,达95% GPU利用率;(4) 基于幂迭代的GPU加速3D MDS可视化,直接从低秩因子生成嵌入。四类实现模式(GPU/CPU × 案例/非案例)验证正确性。GPU在500棵树以上时比CPU快1.4倍。近邻计算可扩展至1,000至20万+样本(需GPU QLORA),CPU TriBlock覆盖中等规模(1万-5万样本)。RFX v1.0彻底消除近邻内存瓶颈,使随机森林分析能力提升至此前无法企及的量级。开源,符合原始方法论。
原文摘要 · Abstract (English)
RFX (Random Forests X), where X stands for compression or quantization, presents a production-ready implementation of Breiman and Cutler's Random Forest classification methodology in Python. RFX v1.0 provides complete classification: out-of-bag error estimation, overall and local importance measures, proximity matrices with QLORA compression, case-wise analysis, and interactive visualization (rfviz)--all with CPU and GPU acceleration. Regression, unsupervised learning, CLIQUE importance, and RF-GAP proximity are planned for v2.0. This work introduces four solutions addressing the proximity matrix memory bottleneck limiting Random Forest analysis to ~60,000 samples: (1) QLORA (Quantized Low-Rank Adaptation) compression for GPU proximity matrices, reducing memory from 80GB to 6.4MB for 100k samples (12,500x compression with INT8 quantization) while maintaining 99% geometric structure preservation, (2) CPU TriBlock proximity--combining upper-triangle storage with block-sparse thresholding--achieving 2.7x memory reduction with lossless quality, (3) SM-aware GPU batch sizing achieving 95% GPU utilization, and (4) GPU-accelerated 3D MDS visualization computing embeddings directly from low-rank factors using power iteration. Validation across four implementation modes (GPU/CPU x case-wise/non-case-wise) demonstrates correct implementation. GPU achieves 1.4x speedup over CPU for overall importance with 500+ trees. Proximity computation scales from 1,000 to 200,000+ samples (requiring GPU QLORA), with CPU TriBlock filling the gap for medium-scale datasets (10K-50K samples). RFX v1.0 eliminates the proximity memory bottleneck, enabling proximity-based Random Forest analysis on datasets orders of magnitude larger than previously feasible. Open-source production-ready classification following Breiman and Cutler's original methodology.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。