# \#sde

**URL:** https://discourse.julialang.org/tag/sde/176.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Mutation attempt in \`ContinuousCallback\` when solving \`SDEProblem{StaticArraysCore.SVector{2, Float64}}\`](https://discourse.julialang.org/t/mutation-attempt-in-continuouscallback-when-solving-sdeproblem-staticarrayscore-svector-2-float64/136168)

<div class="topic-metadata">

**Author:** [@NoFishLikeIan](https://discourse.julialang.org/u/NoFishLikeIan)\
**Replies:** 1\
**Last updated:** [March 13, 2026, 11:37am UTC](https://discourse.julialang.org/t/mutation-attempt-in-continuouscallback-when-solving-sdeproblem-staticarrayscore-svector-2-float64/136168 "2026-03-13T11:37:29Z")

</div>

I have an SDE where the drift function f is defined out-of-place and the state is a StaticArrays.SVector. I need to terminate! the integration using a ContinuousCallback. This raises an error, as the StochasticDiffEq pac…

---

## [Wiener Process Sampling](https://discourse.julialang.org/t/wiener-process-sampling/135498)

<div class="topic-metadata">

**Author:** [@diffeqslvr](https://discourse.julialang.org/u/diffeqslvr)\
**Replies:** 2\
**Last updated:** [February 6, 2026, 3:06pm UTC](https://discourse.julialang.org/t/wiener-process-sampling/135498 "2026-02-06T15:06:09Z")

</div>

As a sanity check, I try to simulate a pure Wiener process du = D dW. However, when I plot the variable, it does not look like a random walk; rather, the curves follows line segments: Is that because I am doing somet…

---

## [Convergence of SDE solvers](https://discourse.julialang.org/t/convergence-of-sde-solvers/135179)

<div class="topic-metadata">

**Author:** [@diffeqslvr](https://discourse.julialang.org/u/diffeqslvr)\
**Replies:** 6\
**Last updated:** [January 22, 2026, 11:22am UTC](https://discourse.julialang.org/t/convergence-of-sde-solvers/135179 "2026-01-22T11:22:52Z")

</div>

I am wondering how to make sure that an SDE solver has converged on a trajectory level. In other words, I want to make sure that I have chosen abstol and reltol small enough. What I would do in the deterministic case is…

---

## [Solving an SDE with a Continuous Callback](https://discourse.julialang.org/t/solving-an-sde-with-a-continuous-callback/135180)

<div class="topic-metadata">

**Author:** [@diffeqslvr](https://discourse.julialang.org/u/diffeqslvr)\
**Replies:** 5\
**Last updated:** [January 22, 2026, 8:51am UTC](https://discourse.julialang.org/t/solving-an-sde-with-a-continuous-callback/135180 "2026-01-22T08:51:49Z")

</div>

I am solving a stochastic differential equation with a ContinuousCallback. Every time the continuous callback is activated, I modify my state vector discontinuously. All the randomness comes from a phase, which follows …

---

## [Stochastic filtration problem](https://discourse.julialang.org/t/stochastic-filtration-problem/134713)

<div class="topic-metadata">

**Author:** [@ymuv1](https://discourse.julialang.org/u/ymuv1)\
**Replies:** 1\
**Last updated:** [December 23, 2025, 7:13pm UTC](https://discourse.julialang.org/t/stochastic-filtration-problem/134713 "2025-12-23T19:13:46Z")

</div>

Hi all, I’m working with a physical system whose state u(t) follows an SDE du=f(u,t)dt+g(u,t)dW\_t The system produces a measured signal Y\_t given by dY\_t = h(u,t)dt+dW\_t where dW\_t is the same Wiener increment in bo…

---

## [EnsembleSummary of SDEProblem with output\_func gives incorrect dimensions](https://discourse.julialang.org/t/ensemblesummary-of-sdeproblem-with-output-func-gives-incorrect-dimensions/130516)

<div class="topic-metadata">

**Author:** [@Rodrigo\_Zepeda](https://discourse.julialang.org/u/Rodrigo_Zepeda)\
**Replies:** 2\
**Last updated:** [July 7, 2025, 12:06am UTC](https://discourse.julialang.org/t/ensemblesummary-of-sdeproblem-with-output-func-gives-incorrect-dimensions/130516 "2025-07-07T00:06:14Z")

</div>

I’m using DifferentialEquations.jl to solve an SDEProblem with a custom output\_func. I am then trying to summarize multiple trajectories with EnsembleSummary. However, the resulting summary has the wrong dimensions for t…

---

## [Reusing NoiseProcess in StochasticDiffEq](https://discourse.julialang.org/t/reusing-noiseprocess-in-stochasticdiffeq/128947)

<div class="topic-metadata">

**Author:** [@ymuv1](https://discourse.julialang.org/u/ymuv1)\
**Replies:** 2\
**Last updated:** [May 14, 2025, 9:33am UTC](https://discourse.julialang.org/t/reusing-noiseprocess-in-stochasticdiffeq/128947 "2025-05-14T09:33:13Z")

</div>

I am trying to use the same NoiseProcess in two different SDE integrations. I don’t mean to just use the same type of noise, but the same values as well (and potentially values in intermediate times obtained via the brid…

---

## [Simulating the Spherical p=2 Spin Model with DifferentialEquations.jl](https://discourse.julialang.org/t/simulating-the-spherical-p-2-spin-model-with-differentialequations-jl/127640)

<div class="topic-metadata">

**Author:** [@mtarabolo](https://discourse.julialang.org/u/mtarabolo)\
**Replies:** 1\
**Last updated:** [April 5, 2025, 1:04pm UTC](https://discourse.julialang.org/t/simulating-the-spherical-p-2-spin-model-with-differentialequations-jl/127640 "2025-04-05T13:04:11Z")

</div>

Issue: Correctly Implementing the Spherical Constraint I am working on simulating the spherical p=2 spin model using the DifferentialEquations.jl package in Julia. The model consists of N coupled stochastic differential …

---

## [Sensitivity of an SDE with non-diagonal noise](https://discourse.julialang.org/t/sensitivity-of-an-sde-with-non-diagonal-noise/127714)

<div class="topic-metadata">

**Author:** [@stochasticguy](https://discourse.julialang.org/u/stochasticguy)\
**Replies:** 2\
**Last updated:** [April 4, 2025, 9:17pm UTC](https://discourse.julialang.org/t/sensitivity-of-an-sde-with-non-diagonal-noise/127714 "2025-04-04T21:17:10Z")

</div>

Hi everyone, I’m simulating an SDE with non-diagonal noise and I’m trying to compute the gradient (using ForwardDiff) of a loss function that uses the SDE solution. When I try to compute the gradient the following error…

---

## [ModelingToolkit and Noise Processes for uniform noise definition](https://discourse.julialang.org/t/modelingtoolkit-and-noise-processes-for-uniform-noise-definition/126291)

<div class="topic-metadata">

**Author:** [@NinaOmejc](https://discourse.julialang.org/u/NinaOmejc)\
**Replies:** 8\
**Last updated:** [February 25, 2025, 3:50pm UTC](https://discourse.julialang.org/t/modelingtoolkit-and-noise-processes-for-uniform-noise-definition/126291 "2025-02-25T15:50:15Z")

</div>

Hi, I am using MTK to set up a hierarchical dynamical system. As the input to the (otherwise ODE) system can also be random uniform noise, I need to set up SDESystem (instead of ODESystem). However, I cannot find out ho…

---

## [ADAM solver returns parameter values resulting in poor fit for my SDE model](https://discourse.julialang.org/t/adam-solver-returns-parameter-values-resulting-in-poor-fit-for-my-sde-model/122999)

<div class="topic-metadata">

**Author:** [@Luis\_Reig\_Quilis](https://discourse.julialang.org/u/Luis_Reig_Quilis)\
**Replies:** 4\
**Last updated:** [December 3, 2024, 4:28pm UTC](https://discourse.julialang.org/t/adam-solver-returns-parameter-values-resulting-in-poor-fit-for-my-sde-model/122999 "2024-12-03T16:28:05Z")

</div>

Hi! I am a plant breeding master student that recently got into SDEs. I am investigating the seasonal change in biomass of some wheat genotypes from the day they are sowed until the day of harvest. I want to fit a SDE mo…

---

## [How does one have multiple random variables in an SDEProblem?](https://discourse.julialang.org/t/how-does-one-have-multiple-random-variables-in-an-sdeproblem/122066)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 2\
**Last updated:** [November 1, 2024, 8:15pm UTC](https://discourse.julialang.org/t/how-does-one-have-multiple-random-variables-in-an-sdeproblem/122066 "2024-11-01T20:15:21Z")

</div>

I’m trying to simulate a stochastic state space model which looks something like: x\_dot(x) = A\*x + B\*u(x + n) + d A and B are matrices, x, n, and d are vectors and u is an affine function. Each of the elements of n an…

---

## [Performance of derivatives of Ensemble problem](https://discourse.julialang.org/t/performance-of-derivatives-of-ensemble-problem/121167)

<div class="topic-metadata">

**Author:** [@stochasticguy](https://discourse.julialang.org/u/stochasticguy)\
**Replies:** 2\
**Last updated:** [October 12, 2024, 6:34pm UTC](https://discourse.julialang.org/t/performance-of-derivatives-of-ensemble-problem/121167 "2024-10-12T18:34:29Z")

</div>

Hi everyone, I’m working on simulating trajectories of a Geometric Brownian Motion (GBM) and calculating sensitivities using automatic differentiation. I’m comparing two approaches: Custom GBM implementation where I d…

---

## [Reverse mode AD for SDEs](https://discourse.julialang.org/t/reverse-mode-ad-for-sdes/117353)

<div class="topic-metadata">

**Author:** [@agelgazzar](https://discourse.julialang.org/u/agelgazzar)\
**Replies:** 0\
**Last updated:** [July 22, 2024, 5:09pm UTC](https://discourse.julialang.org/t/reverse-mode-ad-for-sdes/117353 "2024-07-22T17:09:44Z")

</div>

Training Large (e.g, Neural) SDEs on GPUs fails. The only way to obtain adjoints is via TrackerAdjoint() and this only currently works on CPU. None of the continuous adjoints methods, e.g. InterpolatingAdjoint() or Back…

---

## [Modifying OrnsteinUhlenbeckBridge in DifferentialEquations.jl](https://discourse.julialang.org/t/modifying-ornsteinuhlenbeckbridge-in-differentialequations-jl/116168)

<div class="topic-metadata">

**Author:** [@dleather](https://discourse.julialang.org/u/dleather)\
**Replies:** 5\
**Last updated:** [June 29, 2024, 8:00am UTC](https://discourse.julialang.org/t/modifying-ornsteinuhlenbeckbridge-in-differentialequations-jl/116168 "2024-06-29T08:00:53Z")

</div>

Suppose X(t) is an Ornstein-Uhlenbeck (OU) process, and Y(t; t\_0, T, u, v) is the respective OU bridge process such that Y(t\_0) = u, Y(T) = v, and 0 \\lt t \\lt T. I’ve had great use of simulating Y(t) using DiffEqNoisePr…

---

## [Slow performance when solving SDE for a large number of functions in a loop](https://discourse.julialang.org/t/slow-performance-when-solving-sde-for-a-large-number-of-functions-in-a-loop/116337)

<div class="topic-metadata">

**Author:** [@DavidBerghaus](https://discourse.julialang.org/u/DavidBerghaus)\
**Replies:** 3\
**Last updated:** [June 28, 2024, 2:56pm UTC](https://discourse.julialang.org/t/slow-performance-when-solving-sde-for-a-large-number-of-functions-in-a-loop/116337 "2024-06-28T14:56:03Z")

</div>

I have the following use case: I have a large dataset of 1 million drift and diffusion functions (stored as strings of the symbolic expressions) for which I want to solve the corresponding SDEs. This is my current appr…

---

## [Problems with reverse mode automatic diff (e.g. zygote) with NeuralSDEs](https://discourse.julialang.org/t/problems-with-reverse-mode-automatic-diff-e-g-zygote-with-neuralsdes/113501)

<div class="topic-metadata">

**Author:** [@agelgazzar](https://discourse.julialang.org/u/agelgazzar)\
**Replies:** 2\
**Last updated:** [June 15, 2024, 11:17am UTC](https://discourse.julialang.org/t/problems-with-reverse-mode-automatic-diff-e-g-zygote-with-neuralsdes/113501 "2024-06-15T11:17:57Z")

</div>

Hello, I am having difficulty computing gradients of a neural sdes (either custom or in DiffeqFlux) using Zygote or ReverseDiff. I think it has to do with the shape of the noise during the backward pass but I am not su…

---

## [System of SDE with complex noise](https://discourse.julialang.org/t/system-of-sde-with-complex-noise/111469)

<div class="topic-metadata">

**Author:** [@matt1](https://discourse.julialang.org/u/matt1)\
**Replies:** 1\
**Last updated:** [June 15, 2024, 11:00am UTC](https://discourse.julialang.org/t/system-of-sde-with-complex-noise/111469 "2024-06-15T11:00:46Z")

</div>

Hello! Let’s say I want to solve numerically the following stochastic partial differential equation: \\begin{equation} du(x,y,t)=\\nabla^{2}u(x,y,t) dt+k\\cdot dW^{r}(x,y,t)+i k\\cdot dW^{c}(x,y,t)) \\end{equation}, wher…

---

## [Use Sobol sequence in DifferentialEquations.jl / StochasticDiffEq.jl](https://discourse.julialang.org/t/use-sobol-sequence-in-differentialequations-jl-stochasticdiffeq-jl/109220)

<div class="topic-metadata">

**Author:** [@stochasticguy](https://discourse.julialang.org/u/stochasticguy)\
**Replies:** 8\
**Last updated:** [May 14, 2024, 1:31pm UTC](https://discourse.julialang.org/t/use-sobol-sequence-in-differentialequations-jl-stochasticdiffeq-jl/109220 "2024-05-14T13:31:21Z")

</div>

Hi everyone, I’m trying to use the Sobol sequence to simulate Stochastic Differential Equations with StochasticDiffEq.jl / DifferentialEquations.jl. I’m trying to use the Sobol sequence to generate the random numbers be…

---

## [Why are Neural SDEs trained with TrackerAdjoint()?](https://discourse.julialang.org/t/why-are-neural-sdes-trained-with-trackeradjoint/113514)

<div class="topic-metadata">

**Author:** [@agelgazzar](https://discourse.julialang.org/u/agelgazzar)\
**Replies:** 1\
**Last updated:** [April 29, 2024, 5:39am UTC](https://discourse.julialang.org/t/why-are-neural-sdes-trained-with-trackeradjoint/113514 "2024-04-29T05:39:31Z")

</div>

I thought that Tracker was mostly replaced by Zygote and Enzyme for Reverse-mode Autodiff in the sciml ecosystem. Why is it still being used for computing the sensitivities in DiffeqFlux?

---

## [Inconsistency when solving system of SDE with diagonal noise](https://discourse.julialang.org/t/inconsistency-when-solving-system-of-sde-with-diagonal-noise/111608)

<div class="topic-metadata">

**Author:** [@matt1](https://discourse.julialang.org/u/matt1)\
**Replies:** 1\
**Last updated:** [April 6, 2024, 9:49pm UTC](https://discourse.julialang.org/t/inconsistency-when-solving-system-of-sde-with-diagonal-noise/111608 "2024-04-06T21:49:05Z")

</div>

Hello, I noticed a strange behaviour of Julia when trying to solve the following system of SDE: \\begin{align} du\_1 &= \\left(\\frac{1}{1+c^2}\\right) \\left( -\\frac{u\_4 - 2u\_3+ u\_4}{2d^2} + (u\_1^2 + u\_3^2)u\_3 - c \\left( -…

---

## [Printing progress and updates messages SDE problem](https://discourse.julialang.org/t/printing-progress-and-updates-messages-sde-problem/112277)

<div class="topic-metadata">

**Author:** [@matt1](https://discourse.julialang.org/u/matt1)\
**Replies:** 1\
**Last updated:** [April 6, 2024, 3:37pm UTC](https://discourse.julialang.org/t/printing-progress-and-updates-messages-sde-problem/112277 "2024-04-06T15:37:26Z")

</div>

Hello, I’m solving a system of stochastic differential equations: #define drift fuction F!(du,u,t,p)=... #define noise function G!(du,u,t,p)=... #constructing and solving the problem u\_0=zeros(100,100)#initial condi…

---

## [What are IFFxM methods is StochasticDiffEq.jl?](https://discourse.julialang.org/t/what-are-iffxm-methods-is-stochasticdiffeq-jl/111899)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 1\
**Last updated:** [March 27, 2024, 9:12am UTC](https://discourse.julialang.org/t/what-are-iffxm-methods-is-stochasticdiffeq-jl/111899 "2024-03-27T09:12:34Z")

</div>

What are these methods in StochasticDiffEq.jl and in which papers are they described? They are declared and implemented, but they seem to be undocumented. Or have a different name.

---

## [Understanding the use of \`SDEFunction\`](https://discourse.julialang.org/t/understanding-the-use-of-sdefunction/111559)

<div class="topic-metadata">

**Author:** [@james](https://discourse.julialang.org/u/james)\
**Replies:** 2\
**Last updated:** [March 16, 2024, 12:33pm UTC](https://discourse.julialang.org/t/understanding-the-use-of-sdefunction/111559 "2024-03-16T12:33:38Z")

</div>

I am learning how to work with SDEs in julia and am a bit confused: In the documentation, both of SDEProblem’s constructors take two functions f,g as their first two arguments, where f should be the drift and g the nois…

---

## [Does DifferentialEquations.jl support matrix-shaped noise](https://discourse.julialang.org/t/does-differentialequations-jl-support-matrix-shaped-noise/110958)

<div class="topic-metadata">

**Author:** [@matt1](https://discourse.julialang.org/u/matt1)\
**Replies:** 2\
**Last updated:** [March 14, 2024, 2:08pm UTC](https://discourse.julialang.org/t/does-differentialequations-jl-support-matrix-shaped-noise/110958 "2024-03-14T14:08:27Z")

</div>

let’s say I want to solve the following system of SDEs: \\begin{align\*} du\_{1} &= f\_{1}(u,du,p,t) dt+c\_{11}dW\_{1}+c\_{12}dW\_{2} \\\\ du\_{2} &= f\_{2}(u,du,p,t) dt+c\_{23}dW\_{3}+c\_{24}dW\_{4} \\\\ du\_{3} &= f\_{3}(u,du,p…

---

## [SDE driven by a NoiseTransport noise](https://discourse.julialang.org/t/sde-driven-by-a-noisetransport-noise/110422)

<div class="topic-metadata">

**Author:** [@Damiano](https://discourse.julialang.org/u/Damiano)\
**Replies:** 6\
**Last updated:** [March 10, 2024, 2:31pm UTC](https://discourse.julialang.org/t/sde-driven-by-a-noisetransport-noise/110422 "2024-03-10T14:31:05Z")

</div>

Hi everybody, first of all let me say that I still consider myself new to Julia (and even programming in general), so everything I say and write is likely to contain very naive mistakes. Also, if there is anything I sho…

---

## [Still do not understand difference between diagonal and scalar noise](https://discourse.julialang.org/t/still-do-not-understand-difference-between-diagonal-and-scalar-noise/106860)

<div class="topic-metadata">

**Author:** [@acubed](https://discourse.julialang.org/u/acubed)\
**Replies:** 2\
**Last updated:** [November 29, 2023, 6:14pm UTC](https://discourse.julialang.org/t/still-do-not-understand-difference-between-diagonal-and-scalar-noise/106860 "2023-11-29T18:14:16Z")

</div>

I have system of N coupled stochastic differential equations, that looks like \\displaystyle\\frac{du\_i}{dt}=F(u\_i)+\\eta\_i here F is the function that mixes u\_i with u\_j. The quantity \\eta\_i is so-called white noise with…

---

## [Solving Stochastic Differential Equations in Different Time Windows](https://discourse.julialang.org/t/solving-stochastic-differential-equations-in-different-time-windows/14807)

<div class="topic-metadata">

**Author:** [@zekeriya.sari](https://discourse.julialang.org/u/zekeriya.sari)\
**Replies:** 19\
**Last updated:** [November 26, 2023, 5:59pm UTC](https://discourse.julialang.org/t/solving-stochastic-differential-equations-in-different-time-windows/14807 "2023-11-26T17:59:23Z")

</div>

I want to solve a stochastic differential equation in different time windows under Wiener process, e.g., instead of solving the system for a time interval of (0, 2) seconds, I want to solve the system for a time duration…

---

## [Problem generating NoiseProcess following example in docs](https://discourse.julialang.org/t/problem-generating-noiseprocess-following-example-in-docs/103972)

<div class="topic-metadata">

**Author:** [@KalelR](https://discourse.julialang.org/u/KalelR)\
**Replies:** 3\
**Last updated:** [September 18, 2023, 3:11pm UTC](https://discourse.julialang.org/t/problem-generating-noiseprocess-following-example-in-docs/103972 "2023-09-18T15:11:27Z")

</div>

Hey! I’ve been trying to follow the example in DiffEqNoiseProcess.jl on how to create a NoiseProcess generating gaussian white noise. The code is basically using DiffEqNoiseProcess @inline function WHITE\_NOISE\_DIST(W…

---

## [Documentation of ImplicitRKMil - StochasticDiffEq.jl](https://discourse.julialang.org/t/documentation-of-implicitrkmil-stochasticdiffeq-jl/102104)

<div class="topic-metadata">

**Author:** [@lappet](https://discourse.julialang.org/u/lappet)\
**Replies:** 3\
**Last updated:** [August 9, 2023, 9:34am UTC](https://discourse.julialang.org/t/documentation-of-implicitrkmil-stochasticdiffeq-jl/102104 "2023-08-09T09:34:52Z")

</div>

My goal is to undertsand the actual implementation of the ImplicitRKMil algorithm here. Are there any notes or book sections directly relating to the code here? The perspective of my question is this: I have a bunch of …

[Next page](https://discourse.julialang.org/tag/sde/176.md?match_all_tags=true&page=1&tags%5B%5D=sde)
