Abstract
Differential Privacy (DP) often imposes a significant "privacy tax" on machine learning models, particularly Random Forests (RF), due to budget fragmentation across trees and queries. This paper, presented at AAAI-2025, introduces Matrix Random Forests (M-RF). By representing RF operations as matrix multiplications, the authors utilize the "Matrix Mechanism" to optimize noise allocation across the entire ensemble. This approach yields accuracy improvements of up to 40% over existing private models and ensures utility remains stable even under large query workloads.
Introduction
Differential Privacy is the gold standard for protecting sensitive data, but its application in Random Forests faces a core challenge: budget fragmentation. Traditional DP methods split the privacy budget ($\epsilon$) equally among all trees or inference queries. For an ensemble of 100 trees, each tree receives only 1/100th of the budget, leading to excessive noise and low accuracy. Furthermore, in DP prediction frameworks like "subsample-and-aggregate," the budget depletes with each query, eventually rendering the model useless as the privacy cost accumulates.
Methodology: Matrix Random Forests
The researchers' key innovation is translating the logic of a Random Forest into the language of linear algebra, enabling the use of the Matrix Mechanism for optimized noise distribution.
Matrix Representation
The framework represents every root-to-leaf decision path in the forest as a row in a large matrix $T$. Training data is represented as a frequency matrix $D$. Consequently, calculating leaf values $C$ becomes a simple matrix multiplication: $C = TD$. This representation allows the model to treat the entire ensemble as a single mathematical entity.
The Matrix Mechanism and Optimization
Instead of adding standard Laplace noise to individual components, M-RF employs the Matrix Mechanism. This involves finding an optimal "strategy matrix" $A$ that minimizes the Mean Squared Error (MSE) for a specific workload.
- DP Batch Training: This approach optimizes noise across the entire ensemble. It recognizes that some decision paths are linear combinations of others, allowing for more efficient noise distribution than the standard "equal split" heuristic.
- DP Batch Prediction: By representing a batch of inference queries as a matrix $Q$, the authors can optimize noise across multiple predictions at once. This prevents the rapid accuracy degradation typically seen when making many private queries sequentially.
Privacy-Free Structure
Crucially, M-RF utilizes Random Decision Trees, where split attributes are chosen randomly rather than based on the sensitive training data. Because the tree structure is data-independent, it costs zero privacy budget, allowing the entire budget to be spent on refining the leaf values.
Evaluation and Results
The authors evaluated M-RF using six classification datasets from the UCI Machine Learning Repository, ranging from small sets like Iris to larger ones like Adult and Mushroom.
- Accuracy Boost: M-RF consistently outperformed baselines. On small-to-medium datasets, it showed a 20-40% improvement in accuracy. For example, at a privacy budget of $\epsilon = 2$, M-RF achieved 85% accuracy on the Car dataset, whereas existing state-of-the-art solutions hovered around 55%.
- Query Scalability: Their "Batch Prediction" approach makes the noise level independent of the number of queries. In tests, accuracy remained at 90% even when predicting 1,000 samples, while traditional methods plummeted to 30%.
- Ensemble Scaling: In standard DP-RFs, adding more trees usually decreases accuracy because the budget is spread thinner. In M-RF, adding more trees actually improves accuracy (as it does in non-private RFs) because the optimization handles the collective ensemble efficiently.
Discussion
Key Insights
- Exploiting Redundancy: The matrix representation reveals that decision paths in a forest are often correlated. The Matrix Mechanism exploits this redundancy to "finesse" the noise, adding less noise to the most important or unique paths.
- Privacy-Free Tuning: Because the error metric depends on the tree structure (which is data-independent) and not the data itself, hyperparameters can be tuned without consuming any of the privacy budget.
Limitations and Future Work
While M-RF shows great promise, it relies on random splits to keep the tree structure "privacy-free." While random trees perform well on tabular data, they may not always match the performance of greedy algorithms like XGBoost in non-private settings. Additionally, for datasets with extremely large feature spaces, the strategy matrix $A$ can become very large, requiring implicit matrix representations to remain computationally feasible. The authors suggest extending this matrix representation to other ensemble methods and more complex tree structures in future work.
Conclusion
Matrix Random Forests represent a significant advancement in the utility of differentially private machine learning. By framing ensemble inference as a global optimization problem via linear algebra, M-RF effectively bridges the utility gap that has long plagued private classification models.
Summary updated