SciML / JumpProcesses.jl

Build and simulate jump equations like Gillespie simulations and jump diffusions with constant and state-dependent rates and mix with differential equations and scientific machine learning (SciML)
https://docs.sciml.ai/JumpProcesses/stable/
Other
141 stars 35 forks source link

investigate where auto-alg should switch methods #434

Open isaacsas opened 3 months ago

isaacsas commented 3 months ago

https://github.com/SciML/JumpProcesses.jl/pull/351 adds a default algorithm, but we should follow up and benchmark / examine existing benchmarks to better determine where the switch points between methods should be.

isaacsas commented 3 months ago

Relevant benchmarks to look at:

Catalyst paper: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1011530

SciMLBenchmarks: https://docs.sciml.ai/SciMLBenchmarksOutput/stable/

And probably we should cook up some hybrid models and variable rate jump models to test with too.

Vilin97 commented 3 months ago

There are several variables that affect the relative performance of SSAs in the order of importance:

  1. Number of reactions in the network. More reactions = worse performance of Direct and better performance of e.g. RSSA-CR (and other more advanced SSAs).
  2. Number of species in the network.
  3. Average number of dependent species and reaction. More dependents (higher average/median degree of the reaction dependency graph) = better performance of RSSA and RSSA-CR.
  4. Ratio between the reaction propensity between the highest and lowest propensity. Low ratio (highest and lowest propensities are similar) = better performance of rejection-based SSAs like RDirect, Direct-CR, RSSA-CR.
  5. Type of reactions (massaction jumps, constant rate, variable rate).

@isaacsas , am I forgetting anything in this list?

Ideally, we would cook up an example of a network that varies one of these dimensions and holds others constant for a fair comparison. One convenient way of cooking up examples is to make a spatial massaction jumps network and use a non-spatial SSA, so that the number of spatial species is proportional to the number of nodes in the spatial graph.

isaacsas commented 3 months ago

That sounds like a good list for what can be examined (more) easily.