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.
Currently, neojax is in its early stages. Expect possible breaking changes.
Only the following models and features are available:
- 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.
- Deep Operator Network (DeepONet).
- Training Orchestration Utilities (
TrainerandTrainState). - Grid-based positional embeddings (
GridEmbeddingNd). - (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)
It is designed to be fully compatible with all JAX features such as
vmap,jit, andgrad.
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.
Neojax vs Neuraloperator Benchmarks
Please refer to the benchmarks in the documentation.
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
- Graph Neural Operators
- 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}
}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neojax_operators-0.2.0.tar.gz.
File metadata
- Download URL: neojax_operators-0.2.0.tar.gz
- Upload date:
- Size: 2.2 MB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b30b37c5356e8d92763634e32706b5085bb73eddb37f8c8c46f5c996e484dcc8
|
|
| MD5 |
96cf317e629c8f1b1281ac2f8eba2e93
|
|
| BLAKE2b-256 |
54f7429cf87cbf82b2dfc193408fec4968e05dd50b9913483acea5f5a4b28340
|
File details
Details for the file neojax_operators-0.2.0-py3-none-any.whl.
File metadata
- Download URL: neojax_operators-0.2.0-py3-none-any.whl
- Upload date:
- Size: 151.3 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
845ad7c7981b139cc14b0e72a3ca34deb9d3dab1cfcb7aa059aba28d3b61bbaf
|
|
| MD5 |
5efbb679eddbf004915d68a746e7b285
|
|
| BLAKE2b-256 |
756290a3af7b475ea861ec03613cf2913ae1c2f74720128bcda19cbc6562b3d5
|