Neojax
neojax (Neural Operators in JAX) is an implementation of Neural Operators built on top of JAX and Equinox. It provides a clean, modular API inspired by the original neuraloperator library.
It is designed to be fully compatible with all JAX features such as vmap, jit, and grad.
One of several model architecture neojax implements is...
GeoFNO: 2D wave propagation with spatially varying speed
Trained (partially) in docs/examples/05_advanced_training.ipynb —
predicts wave fields over heterogeneous media with a single forward pass.
Available Features
Currently, neojax is in its early stages. Expect possible breaking changes.
Only the following models and features are available:
Full feature list
- Fourier Neural Operator (FNO).
- Symmetrical domain padding (
DomainPadding). - Pointwise MLP (Channel-MLP) expansions for improved expressivity.
- Various skip connections (Linear, Soft-Gating, Identity).
- Normalization in FNO blocks.
- Symmetrical domain padding (
- U-Net Fourier Neural Operator (UNO).
- Geometry-aware Fourier Neural Operator (GeoFNO) for irregular geometries and mesh domains.
- Tucker-factorized FNO.
- Recurrent Neural Operator (RNO).
- Deep Operator Network (DeepONet).
- Multigrid Neural Operator (MgNO).
- Geometry Informed Neural Operator (GiNO).
- Transolver Neural Operator.
- Convolutional Neural Operator (CNO).
- Training Orchestration Utilities (
TrainerandTrainState). - Positional embeddings (
GridEmbeddingNd,SinusoidalEmbedding,ReferenceGridEmbeddingNd). - (Relative) $L^{p}$-loss.
- General $W^{k,p}$ Sobolev loss.
- Loss Compositions.
- Data Normalization and Scaling.
- Various Normalizer classes.
- Physical scales to non-dimensionalize inputs.
- Dataset utilities (Data-agnostic, downloading utilities, etc.)
- Data Pipelines (Schemas, Processors, DataBundle)
- Benchmark Module (Model-/Data-agnostic even for non-neojax models)
Installation
Install the python package via pypi
pip3 install neojax-operators
The core library is designed to have as few dependencies as possible. Some submodules therefore rely on additional dependencies. Install them as needed:
- Running the examples:
neojax-operators[ex] - Using the PDE data generation:
neojax-operators[gen] - Using data downloading and some other data features:
neojax-operators[data] - Using the benchmark module:
neojax-operators[benchmark]
Quickstart
neojax exposes a similar API to neuraloperators and equinox and should therefore be familiar to use:
import jax.numpy as jnp
import jax.random as jr
from neojax.models import FNO
key = jr.key(0)
fno = FNO(
key=key,
modes=(12, 12),
hidden_channels=64,
in_channels=2,
out_channels=1,
n_layers=2
)
x = jnp.ones((2, 64, 64))
pred = fno(x)
For a more detailed introduction refer to the examples in the documentation.
Performance
neojax leverages JAX's static compilation to outperform PyTorch, especially for spectral operators like FNO.
| Inference speedup vs PyTorch (eager / compiled) | |
|---|---|
| 1D Burgers (res 128) | 2.4x / 4.3x |
| 2D Navier-Stokes (128×128) | 1.2x / 1.1x |
Benchmark plot (1D Burgers, NVIDIA A100)
Full methodology, more PDEs, and reproduction scripts → benchmarks/
Motivation
JAX is widely used in Scientific Machine Learning (SciML) for its functional transformations (jit, vmap, grad) and NumPy-like API. Neural Operators are a common approach for solving PDEs in this space, but a native JAX implementation was missing. neojax fills that gap.
Design Choices
neojax started as a port of the PyTorch neuraloperator library, but was rewritten from the ground up as a JAX-native implementation instead. Porting PyTorch idioms directly into a functional framework added unnecessary complexity; building on Equinox gives neojax a class-based API while staying consistent with JAX's pure-functional design.
Roadplan
In upcoming releases more models and components will be added in roughly the following order:
- LocalNO, SFNO, RNO, and others
- Debugging utilities
And much more to come!
Contributions
If you'd like to contribute any features, models, or fix implementation errors, please do so. Any contributions are appreciated. Have a look at the CONTRIBUTING.md guide for details on how to do so. I am also open to advice on restructuring and any other design choices that could be improved.
Citation
If you use neojax in your research, please cite it using the following BibTeX entry:
@software{neojax,
author = {Paul Gekeler},
title = {neojax: Neural Operators in Jax},
year = {2026},
url = {https://github.com/paulgekeler/neojax}
}
Metadata
Release files for neojax-operators 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| neojax_operators-0.4.0.tar.gz | 12.5 MB | Without provenance | Details for neojax_operators-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neojax_operators-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for neojax_operators-0.4.0-py3-none-any.whl |
Total release size: 12.7 MB
Release files / neojax_operators-0.4.0.tar.gz
| Download URL | neojax_operators-0.4.0.tar.gz |
|---|---|
| Size | 12.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90e0c67ae5cb5b90d0f392cd5a137a4c5485a893bdeb40ba3381d5f0775fb941
|
|
BLAKE2b-256 checksum How to use checksums |
c1d56179f13b2692167b42e0cf9cf546ae90962dee10c87a0dd936e43bfbee56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / neojax_operators-0.4.0-py3-none-any.whl
| Download URL | neojax_operators-0.4.0-py3-none-any.whl |
|---|---|
| Size | 232.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d13edb671c1e76709f490f0719c92c03f299ac4b4ff2135741db57538f6406ff
|
|
BLAKE2b-256 checksum How to use checksums |
83df77d8231ab5565cb377f4dd40333f594e9e66f3dedf4a448461a12d2392e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for neojax-operators 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.