torchsde
SDE solvers and stochastic adjoint sensitivity analysis in PyTorch.
Decision gist · record as of 2026-08-14
Yes, if you are actively researching neural SDEs or latent stochastic models and can work with a frozen codebase. The package is well-designed and has no known vulnerabilities, but it is archived and abandoned—no future maintenance or updates should be expected. Use it for research prototyping or as a reference implementation, but be aware that you will be responsible for any fixes or adaptations needed for compatibility with newer PyTorch or Python versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.8 and PyTorch >=1.6.0; GPU support depends on a compatible CUDA-enabled PyTorch installation.
- Low install friction with a pure-wheel distribution.
- However, the package is archived and abandoned as of the latest release in September 2023, with no commits since December 2024.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions.
last release 2023-09-26 (1053 days) · last repo commit 2024-12-30 · 1,726 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,827,243 downloads/mo, #3,513 on PyPI
Alternatives
Verify before relying
pip install torchsde
import torch
import torchsde
class SDE(torch.nn.Module):
noise_type = 'general'
sde_type = 'ito'
def f(self, t, y):
return y
def g(self, t, y):
return y
sde = SDE()
y0 = torch.zeros(32, 3)
ts = torch.linspace(0, 1, 20)
ys = torchsde.sdeint(sde, y0, ts)- Whether the archived repository will receive security patches or maintenance updates in the future.
- Compatibility with recent PyTorch versions beyond 1.6.0 and current Python 3.x releases.
- Performance characteristics and numerical stability compared to other SDE solvers.
What it is and what it does
torchsde is a PyTorch library that solves stochastic differential equations with automatic differentiation and GPU acceleration. It implements SDE solvers that support backpropagation through the solution trajectory, enabling end-to-end learning of SDE-based generative and latent-variable models. The library handles both Itô and Stratonovich SDEs with configurable noise types and provides efficient adjoint sensitivity methods for gradient computation.
The package is built on torch, numpy, scipy, and trampoline, and is designed for researchers working with neural SDEs, latent SDE models, and SDE-based generative models like GANs. It abstracts away the numerical complexity of SDE solving while maintaining differentiability throughout the computation graph, making it suitable for probabilistic deep learning workflows.
Use it for
- Training latent SDE models that fit stochastic processes to time-series data with learned drift and diffusion terms.
- Building generative models using neural SDEs as the generator component in adversarial training frameworks.
- Performing uncertainty quantification in neural networks by modeling outputs as solutions to SDEs.
- Implementing stochastic adjoint sensitivity analysis for gradient-based optimization of SDE parameters.
- Prototyping research on continuous-time stochastic processes in deep learning.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are actively researching neural SDEs or latent stochastic models and can work with a frozen codebase.
The package is well-designed and has no known vulnerabilities, but it is archived and abandoned—no future maintenance or updates should be expected. Use it for research prototyping or as a reference implementation, but be aware that you will be responsible for any fixes or adaptations needed for compatibility with newer PyTorch or Python versions.
Install
torchsde on PyPI
Before you install
Low install friction with a pure-wheel distribution. However, the package is archived and abandoned as of the latest release in September 2023, with no commits since December 2024. Depends on torch, numpy, scipy, and trampoline—all standard scientific Python libraries.
Requires Python >=3.8 and PyTorch >=1.6.0; GPU support depends on a compatible CUDA-enabled PyTorch installation.
License in practice
Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install torchsde
import torch
import torchsde
class SDE(torch.nn.Module):
noise_type = 'general'
sde_type = 'ito'
def f(self, t, y):
return y
def g(self, t, y):
return y
sde = SDE()
y0 = torch.zeros(32, 3)
ts = torch.linspace(0, 1, 20)
ys = torchsde.sdeint(sde, y0, ts)
Verify before relying
- Whether the archived repository will receive security patches or maintenance updates in the future.
- Compatibility with recent PyTorch versions beyond 1.6.0 and current Python 3.x releases.
- Performance characteristics and numerical stability compared to other SDE solvers.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesnumpyscipytorchtrampoline |
| Maintenance | Abandoned 1,053 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 1,827,243 / month, #3,513 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3 |
Evidence: torchsde-0.2.6-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “SDE solver pytorch”
- torchsdeSolves stochastic differential equations (SDEs) with GPU support and…
- diffraxDiffrax provides numerical solvers for ordinary, stochastic, and…
- torchdiffeqProvides PyTorch-based ODE solvers with backpropagation support…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also opacus · torchcde · torchdiffeq · diffrax · zuko · pytorch_revgrad · torch-ema · pytorch-forecasting · gpytorch · torch-optimizer