TECHNOLOGY

ODE event detection can miss multiple crossings inside one accepted step

In this article
THE QUICK TAKE

The solve_ivp documentation explains that event finding looks for a sign change over each integration step. Multiple crossings within a step may be missed. Event direction and terminal behavior further determine which detected crossings are reported or stop integration. t_eval specifies stored solution times; it is not a promise to run the event search over every pair of exported samples. A state equation with an easy smooth solution can therefore coexist with an event function whose oscilla.

An ODE integration can finish successfully while missing events that cross zero more than once inside an accepted step. A trajectory dataset used to train an event predictor can then contain incorrect absence labels even though the state values look smooth. Event detection needs its own resolution check rather than relying on solver success or a dense exported time grid.

The scientific interface

The solve_ivp documentation explains that event finding looks for a sign change over each integration step. Multiple crossings within a step may be missed. Event direction and terminal behavior further determine which detected crossings are reported or stop integration. t_eval specifies stored solution times; it is not a promise to run the event search over every pair of exported samples. A state equation with an easy smooth solution can therefore coexist with an event function whose oscillation demands more temporal resolution.

Implementation details

Specify the event function, direction and terminal policy alongside the differential equation. Choose a maximum-step policy justified by the event scales the study intends to resolve, and validate it using known events or an independent reference. Preserve detected event times separately from requested output times. If event completeness is unresolved, do not convert an empty event list into a confident negative training label. A smaller step bound can improve coverage for a declared fixture, but it is not a universal proof that an arbitrary event function has no additional roots.

A constructed validation case

Construct a smooth state equation with a known oscillatory event function whose endpoints can have the same sign despite interior crossings. Compare a coarse permitted step with a validated finer bound, keeping output sampling a separate variable. Inspect event times against the known reference and verify the selected direction filter. Acceptance requires the intended event coverage for this fixture and explicit uncertainty outside it, not merely a successful integration status or many points in the exported trajectory table.

Numerical and data limits

Numerical event detection is not physical sensor validation. A trained event classifier can also fail independently of the labels. Keep equation accuracy, event-search coverage and model evaluation as separate evidence before using solver-generated trajectories as ground truth for rare or short-lived transitions.

Primary references

SciPy integrate.solve_ivp API; SciPy integration guide.

This is a proposed scientific-interface validation, not an executed Retrivium benchmark. Preserve the implementation version and unresolved outcomes; interface documentation does not establish the accuracy or performance of a scientific model.

A GPU inference benchmark you can trust; Tensor axes in a language model: batch, sequence and hidden width.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles