Maximum Risk Minimization with Random Forests

Francesco Freni, Anya Fries, Linus Kühne, Markus Reichstein, Jonas Peters
12/11/2025
stat.MLcs.AIcs.LG

No official code found. Best implementation: francescofreni/nldg (1 star, AGPL-3.0, last commit 2025-12-12).

Abstract

We consider a regression setting where observations are collected in different environments modeled by different data distributions. The field of out-of-distribution (OOD) generalization aims to design methods that generalize better to test environments whose distributions differ from those observed during training. One line of such works has proposed to minimize the maximum risk across environments, a principle that we refer to as MaxRM (Maximum Risk Minimization). In this work, we introduce variants of random forests based on the principle of MaxRM. We provide computationally efficient algorithms and prove statistical consistency for our primary method. Our proposed method can be used with each of the following three risks: the mean squared error, the negative reward (which relates to the explained variance), and the regret (which quantifies the excess risk relative to the best predictor). For MaxRM with regret as the risk, we prove a novel out-of-sample guarantee over unseen test distributions. Finally, we evaluate the proposed methods on both simulated and real-world data.

View on arXivView PDF

Code Implementations(1)

AGPL-3.0

Maximum Risk Minimization with Random Forests

10Python, Jupyter NotebookFeb 18, 202510 months agoAGPL-3.0

Similar Papers

Cite this paper

@article{freni2025maximum,
  title  = {Maximum Risk Minimization with Random Forests},
  author = {Francesco Freni and Anya Fries and Linus Kühne and Markus Reichstein and Jonas Peters},
  year   = {2025},
  eprint = {2512.10445},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.10445v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.10445.svg)](https://codeofpaper.com/paper/2512.10445)

Discussion