Rutile provides a wealth of petrochronological information in metamorphic geology and due to its high stability during processes of the sedimentary cycle, rutile takes a special position in sedimentary provenance analysis. Besides being one of the classical minerals datable using the U−Pb system, rutile incorporates a broad range of trace elements, many of those being incompatible in most of the common metamorphic minerals. Although a large number of multivariate statistical tools including machine-learning approaches is available, current rutile discrimination schemes suffer from focusing on uni- and bivariate approaches, leading to large compositional overlaps. Here we compiled a dataset of 2,335 rutile trace-element analyses (1,605 new analyses and 730 from Lueder et al. (2024))) from 110 metamorphic rock samples of 48 localities covering a wide range of pressure−temperature conditions. After showing that the subsampling and testing strategy of the classical random forest algorithm (Breiman, 2001) is inappropriate for such hierarchical data structures, we introduce a modified version (hierarchical random forest) which provides realistic and generalized error estimates, improving hyperparameter tuning and performance. By applying this concept, we present a novel and multivariate rutile discrimination scheme, using the concentrations of 16 elements. The model correctly predicts the source rock composition (felsic versus mafic) in ~89 % of the cases and the metamorphic gradient (≤350 °C/GPa versus >350 °C/GPa) in ~84 %. Combined with U−Pb dating, this enables to gain time-resolved insights into the geodynamic evolution of the hinterland, taking rutile provenance analysis to the next level.