Forest Informed Neural Networks

A hybrid dynamic forest (gap) model (FINN) that can be configured as a fully mechanistic, process-based model, like classic forest gap models, or with its demographic processes (growth, mortality, regeneration) replaced by deep neural networks (DNNs), or any combination of the two. Provides functions to define a model and its mechanistic or empirical components, calibrate it to forest inventory data, and interpret the calibrated processes. FINN is implemented with the 'torch' package, which supplies GPU support and the automatic differentiation used to calibrate the model by stochastic gradient descent; no knowledge of 'torch' is required. The hybrid modeling approach is described in Pichler and Käber (2026) .


Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. License: GPLv3

Forest Informed Neural Networks (FINN)

FINN is an R package designed for modular, dynamic vegetation (forest) models. Modularity is achieved by implementing all components and the platform in R and by allowing users to pass their own processes to FINN as R functions. Nevertheless, FINN is highly performant (has a low runtime) because it is implemented in torch for R, which allows access to highly optimised routines and enables FINN to run on the GPU. Consequently, FINN scales extremely well with the number of sites. Furthermore, FINN can seamlessly integrate neural networks into processes, or even replace them entirely (hybrid modelling). Additionally, FINN’s parameters can be optimised directly using stochastic gradient descent.

Internal workings of FINN

You can learn more about FINN in the accompanying paper Pichler & Käber (2026) - Inferring processes within dynamic forest models using hybrid modelling, published in Methods in Ecology and Evolution.

Installation

Install the released version of FINN from CRAN:

install.packages("FINN")

FINN runs on torch, and the torch backend (libtorch) is downloaded on first use rather than with the package, so install it once before the first fit:

torch::install_torch()

Or the development version from GitHub:

# install.packages("devtools")
devtools::install_github("FINNverse/FINN")

A first example

FINN comes with forest inventory data from Oregon (US FIA): observations of 200 plots over two remeasurement intervals, their climate, and the trees at the first census. The example fits a model to them, checks it on 200 plots it has not seen, and simulates from bare ground.

library(FINN)
library(data.table)
Nsp  <- max(fia_obs_dt$species)
init <- makeInitCohorts(fia_init_trees, Nspecies = Nsp)

# one process per component; growth, mortality and regeneration respond
# linearly to temperature and precipitation
FINN.seed(1)
m <- finn(N_species = Nsp, recruits_dbh = 12.9,
          competition_process  = createProcess(~ 0, competition, optimizeSpecies = TRUE),
          growth_process       = createProcess(~ temp + prec, growth, optimizeSpecies = TRUE),
          mortality_process    = createProcess(~ temp + prec, mortality, optimizeSpecies = TRUE),
          regeneration_process = createProcess(~ temp + prec, regeneration_capped, optimizeSpecies = TRUE))

# all processes are fitted jointly; `holdout` evaluates the model right after the fit
fit(m, data = fia_obs_dt, env = fia_env_dt, init_cohort = init,
    epochs = 300L, batchsize = 40L, patches = 4, patch_size = 0.06,
    tree_data = fia_tree_dt, plot_progress = FALSE,
    holdout = list(data = fia_obs_test, env = fia_env_test,
                   init_cohort = makeInitCohorts(fia_init_test, Nspecies = Nsp),
                   tree_data = fia_tree_test))

Bare ground. A fitted model can be run from an empty stand. This is the hardest test of a forest model: the species composition and the size structure have to emerge from growth, mortality, competition and regeneration alone.

cold_to_warm <- fia_env_dt[, .(temp = mean(temp)), by = siteID][order(temp)]$siteID[c(10, 100, 190)]
bg <- simulateForest(m, bare_ground = TRUE, years = 500, sites = cold_to_warm)
plot(bg)

Observed against simulated on the 200 test plots: the largest tree, basal area, stem number and growth with R², mortality as a ROC curve with its AUC, recruitment as the ratio of simulated to observed per species.

plot(m$evaluation)

Over time. The simulated stands of the 200 test plots over the 22 years, per species, as the mean over the plots:

sim <- simulateForest(m, env = fia_env_test,
                      init_cohort = makeInitCohorts(fia_init_test, Nspecies = Nsp))
plot(sim)

summary(m) prints the skill on the training and the test plots, how far the fit has converged and the effects of the environment; plot(m) draws the fitted parameters of every species.

Introduction

Start with Introduction to FINN, then browse the rest:

Vignette What it covers
Introduction to FINN the model, its processes, and a first simulation
Parameterising FINN from Ellenberg indicator values deriving species niches from Ellenberg values; succession along a climate gradient
Preparing your data for FINN going from a raw tree list to FINN’s input tables
Fitting FINN to forest inventory data calibrating on US FIA data, with a held-out test
Mortality: a binomial response and a NN process choosing the right likelihood, and scoring it honestly

The same pages ship with the package — vignette(package = "FINN") lists them.

How to cite FINN

Please cite the paper describing the approach, not the software:

Pichler, M. & Käber, Y. (2026) Inferring processes within dynamic forest models using hybrid modelling. Methods in Ecology and Evolution, 17, 2477–2493. https://doi.org/10.1111/2041-210X.70347

citation("FINN") prints this entry and its BibTeX form:

@Article{,
  title   = {Inferring processes within dynamic forest models using hybrid modelling},
  author  = {Maximilian Pichler and Yannek Käber},
  journal = {Methods in Ecology and Evolution},
  year    = {2026},
  volume  = {17},
  number  = {8},
  pages   = {2477--2493},
  doi     = {10.1111/2041-210X.70347},
}

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("FINN")

0.2.0 by Yannek Käber, 6 days ago


https://github.com/FINNverse/FINN, https://finnverse.github.io/FINN/


Report a bug at https://github.com/FINNverse/FINN/issues


Browse source code at https://github.com/cran/FINN


Authors: Maximilian Pichler [aut] (ORCID: , Yannek Käber [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL (>= 3) license


Imports abind, cli, stats, utils, data.table, coro, Rcpp, torch, ggplot2, glue, grid

Suggests testthat, knitr, rmarkdown

Linking to Rcpp


See at CRAN