Constrained hybrid modelling to predict microbial dynamics and organic matter turnover in soil systems

Paul Collart, Juergen Gall, Andrea Schnepf, Holger Pagel, Lars Doorenbos

Soil microorganisms are the invisible engines of the global carbon cycle. Their dynamics largely determine how soil systems mitigate or exacerbate climate change. However, representing these complex microbial processes in predictive models remains a significant challenge.

Traditionally, researchers have relied on two distinct approaches. Process-Based Models (PBMs) use mathematical equations to describe known biological laws, but they require "biokinetic parameters"—such as microbial growth and mortality rates—that are nearly impossible to measure directly in the field. Furthermore, PBMs suffer from equifinality, a scenario where many different parameter combinations produce the exact same observable output (like $CO_2$ respiration). This makes it incredibly difficult to ascertain if the model reflects biological reality. On the other hand, Machine Learning (ML) excels at finding patterns in complex datasets, such as DNA sequences, but often lacks the biological grounding necessary to make scientifically sound predictions.

To bridge this gap, researchers have developed HySoMi (HYbrid SOil MIcrobial modelling), a novel framework that integrates the predictive power of neural networks with the biological rigor of process-based models.

The HySoMi Framework

HySoMi is designed to predict biokinetic parameters from metagenome-inferred functional traits using a two-module system:

  1. Parameter Estimation Module: A Multi-Layer Perceptron (MLP) neural network takes genomic functional traits as input and predicts a set of biokinetic parameters.
  2. Differentiable PBM Module: These predicted parameters are fed directly into a process-based soil model. By implementing the PBM using a differentiable Ordinary Differential Equation (ODE) solver, the entire system can be trained end-to-end using gradient descent.

This differentiability is a crucial innovation. It transforms a rigid biological simulation into a flexible layer that the neural network can interact with, allowing the AI to learn biological parameters directly from observable outputs.

Overcoming Equifinality with Ecological Constraints

To solve the equifinality problem, the researchers introduced a physics-informed, constrained loss function. Instead of solely minimizing the error between predicted and observed $CO_2$ emissions, the model is actively penalized if it violates established ecological laws. For example, microbial maintenance rates must remain lower than growth rates, and total biomass must stay within physically realistic ranges.

By forcing the neural network to obey these ecological inequalities, the model successfully learns the dynamics of unobservable, "hidden" variables—such as the transition between active and dormant bacteria—simply by observing the $CO_2$ output. The framework utilizes homoscedastic uncertainty weighting to automatically balance these competing loss terms during training.

Experimental Validation and Key Findings

Because high-quality datasets coupling genomic data with process rates are rare, the research team validated HySoMi using both a sophisticated synthetic benchmark and real-world data from the European LUCAS Soil Database.

The results demonstrate the significant advantages of this hybrid approach:

  • Uncovering Hidden Dynamics: On synthetic data, HySoMi reduced the Mean Squared Error ($MSE$) of hidden state variables by approximately 66% compared to an unconstrained hybrid model.
  • Accurate Parameter Retrieval: The constrained model was significantly better at identifying the "true" underlying biokinetic parameters, outperforming the unconstrained baseline by nearly 30% in L1 error.
  • Real-World Plausibility: When applied to the LUCAS dataset, HySoMi consistently satisfied ecological constraints (e.g., ensuring reactivation rates exceeded deactivation rates). Unconstrained models frequently violated these rules, proving that HySoMi generates far more scientifically plausible results.
  • Data Efficiency: Pure ML models typically require massive datasets, but HySoMi maintained high performance even with very small training sets, overcoming a common hurdle in environmental sciences.

Limitations and Future Directions

The primary limitation of the current study stems from the availability of real-world data. The LUCAS dataset features relatively "shallow" DNA sequencing and highly constrained time series (only 15 hours of $CO_2$ monitoring), which is insufficient to capture a full microbial growth cycle.

However, as deep metagenomic sequencing becomes more accessible and cost-effective, HySoMi is perfectly positioned to leverage more detailed genomic traits. Future iterations of the framework could expand to include diverse microbial groups, such as fungi, and incorporate varying environmental factors like soil moisture and temperature, ultimately providing a clearer picture of the soil carbon cycle.

Summary updated

BibTeX
@inproceedings{collart2026constrained,
  author = {Paul Collart and Juergen Gall and Andrea Schnepf and Holger Pagel and Lars Doorenbos},
  title = {{Constrained hybrid modelling to predict microbial dynamics and organic matter turnover in soil systems}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=UR1yz4AMYj},
}
Figure