NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A More Expressive Spline Representation for SBML Models Improves Code Generation Performance in AMICI

Lorenzo Contento, Paul Stapor, Daniel Weindl, Jan HasenauerLecture Notes in Computer Science 2023 · OpenAlex

Abstract: Spline interpolants are commonly used for discretizing and estimating functions in mathematical models. While splines can be encoded in the Systems Biology Markup Language (SBML) using piecewise functions, the resulting formulas are very complex and difficult to derive by hand. Tools to create such formulas exist but only deal with numeric data and thus cannot be used for function estimation. Similarly, simulation tools suffer from several limitations when handling splines. For example, in the AMICI library splines with large numbers of nodes lead to long model import times. We have developed a set of SBML annotations to mark assignment rules as spline formulas. These compact representations are human-readable and easy to edit, in contrast to the piecewise representation. Different boundary conditions and extrapolation methods can also be specified. By extending AMICI to create and recognize these annotations, model import can be sped up significantly. This allows practitioners to increase the expressivity of their models. While the performance improvement is limited to AMICI, our tools for creating spline formulas can be used for other tools as well and our syntax for compact spline representation may be a starting point for an SBML-native way to represent spline interpolants.

Introduction

In systems biology, modeling "unknown" inputs—such as drug concentrations over time or fluctuating metabolic fluxes—often requires flexible mathematical functions when precise biological equations are unavailable. Splines serve as a primary tool for this purpose, acting as flexible curves that approximate complex shapes through a series of polynomial segments.

However, the Systems Biology Markup Language (SBML) lacks a native representation for splines. Currently, researchers must implement them using deeply nested piecewise MathML functions. As the number of spline nodes increases, these formulas become massive and unreadable. More critically, they create significant performance bottlenecks for simulation software. In the AMICI library, widely used for sensitivity analysis, importing models with high-resolution splines can take an impractical amount of time due to the symbolic processing overhead of nested logic.

Methods

To address these limitations, a two-pronged approach was developed to streamline spline handling within SBML models.

Compact XML Annotations

Instead of exhaustive MathML segments, a high-level XML syntax was introduced. This compact representation describes the spline's essential properties: node positions, values, derivatives, boundary conditions (e.g., periodic or natural), and extrapolation methods. This "shorthand" is not only more human-readable but also allows the spline's values to be treated as parameters, enabling gradient-based optimization for parameter estimation.

AMICI Integration

The AMICI library (Python interface and C++ core) was updated to recognize these annotations. When AMICI encounters the compact spline tag, it bypasses the complex MathML and generates optimized C++ code directly. To maintain backward compatibility, the standard MathML version is retained in the file as a fallback for other SBML-aware tools.

Workflow of the proposed spline representation and its integration into simulation tools.

Results and Discussion

The performance and utility of the new representation were evaluated using synthetic benchmarks and a real-world biological model.

Performance Benchmarks

Synthetic benchmarks compared the import times of models with varying numbers of spline nodes (10 to 250). The results demonstrated that while standard MathML import times grow exponentially with node count, the new annotation-based method scales much more efficiently. For a spline with 50 nodes, the traditional method already becomes unfeasible, whereas the new approach handles 250 nodes with ease.

Comparison of model import times between standard MathML piecewise functions and the new AMICI annotations.

Case Study: JAK2-STAT5 Signaling

The method was applied to a model of the JAK2-STAT5 signaling pathway to estimate unknown input signals. Using a 15-node spline, the researchers captured complex dynamics that simpler models might miss. They also demonstrated how regularization (using a parameter $\lambda$) prevents overfitting to noisy experimental data, highlighting the increased expressivity and practical utility of the new framework.

Conclusion

By shifting from complex symbolic representations to compact, structured annotations, this work removes a major bottleneck in systems biology modeling. While the immediate performance gains are specific to the AMICI library, the tools for generating these spline formulas are broadly applicable. This compact syntax serves as a potential starting point for a native SBML standard for interpolants, paving the way for more expressive and efficient biological models.

Summary updated

BibTeX
@inproceedings{contento2023more,
  author = {Lorenzo Contento and Paul Stapor and Daniel Weindl and Jan Hasenauer},
  title = {{A More Expressive Spline Representation for SBML Models Improves Code Generation Performance in AMICI}},
  booktitle = {Lecture Notes in Computer Science},
  year = {2023},
  doi = {10.1007/978-3-031-42697-1\_3},
}

Loading related content...

Figure