smolyax
smolyax: a high-performance implementation of the Smolyak interpolation operator in JAX - Published in JOSS (2025)
Science Score: 98.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 8 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
○Academic email domains
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Scientific Fields
Repository
Fast high-dimensional interpolation of vector valued functions in JAX
Basic Info
Statistics
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 3
- Releases: 1
Topics
Metadata Files
README.md
Smolyax
Fast interpolation of high-dimensional and vector-valued functions - avoiding the curse-of-dimensionality by using sparse-grid interpolation nodes, - ensuring numerical stability by using a barycentric Smolyak interpolation formulation and - providing hardware-agnostic high performance by implementing key algorithms in JAX.
Features
- Node sequences for interpolation on bounded or unbounded domains (Leja nodes and Gauß-Hermite nodes, respectively)
- General anisotropic multi-index sets $\Lambda \subset \mathbb{N}^d0$ of the form $\Lambda := \{\boldsymbol{\nu} \in \mathbb{N}^d0 \ : \ \sum{j=1}^{d} kj \nu_j < t \}$ where $\boldsymbol{k}\in \mathbb{R}^{d}$ is monotonically increasing and controls the anisotropy while the threshold $t > 0$ controls the cardinality of the set.
- Heuristics to determine the threshold parameter $t$ to construct a set $\Lambda$ with a specified cardinality (which is typically not analytically available)
- Smolyak operator for interpolating high-dimensional and vector-valued functions $f : \mathbb{R}^{d1} \to \mathbb{R}^{d2}$ for $d1, d2 \in \mathbb{N}$ potentially large.
- Functionality to compute the integral of the interpolant (quadrature) as well as evaluate its derivative.
The implementation is designed for maximal efficiency.
As a rough example consider interpolation a scalar function with $d_1 = 10^3$ inputs using $n = 10^4$ interpolation nodes.
With smolyax you can expect to both generate the multi-index set
as well as evaluate the interpolant from the corresponding polynomial space
in well less under $0.1$ seconds on a contemporary laptop CPU.
Documentation
- For an introduction to relevant literature and the key implementation concepts, see the JOSS paper accompanying this repository.
- For code documentation see here.
Get started
Dependencies
smolyax requires python >= 3.9. Core dependencies are jax and numba, for more details see pyproject.toml.
Installation
To install smolyax and its dependencies, run:
pip install "smolyax @ git+https://github.com/JoWestermann/smolyax.git"
To install smolyax with GPU support enabled, run:
pip install "smolyax[cuda] @ git+https://github.com/JoWestermann/smolyax.git"
In order to run notebooks and/or tests, install via
git clone git@github.com:JoWestermann/smolyax.git
pip install -e "smolyax[notebook]" # for additionally installing notebook and plotting dependencies
pip install -e "smolyax[dev]" # for additionally installing testing, code quality and documentation dependencies
Usage
To construct the interpolant to a function f, which has d_in inputs and d_out outputs,
first choose the polynomial space in which to interpolate
by setting up a node generator object, e.g. Leja nodes:
node_gen = nodes.Leja(dim=d_in)
and choosing a weight vector k controlling the anisotropy as well as a threshold t controlling the size of
the multi-index set:
k = [np.log((2+j)/np.log(2)) for j in range(d_in)]
t = 5.
Then, initialize the interpolant as
f_ip = interpolation.SmolyakBarycentricInterpolator(node_gen=node_gen, k=k, d_out=d_out, t=t, f=f)
and evaluate it at a point x by calling
y = f_ip(x)
For more examples and visualizations see notebooks, in particular see the examples for interpolating a one-dimensional, two-dimensional or high-dimensional function.
Help
If you have questions or need help, please reach out through our Github Discussions!
Contribute
Need a feature?
We keep track of features that could be implemented without too much trouble and that we will work on prioritized on demand via our open issues.
Submit a feature!
If you want to submit a feature, please do so via a pull request. Ensure that all tests run through by running
pytest
from the project root directory, and ensure that performance has not degraded by first creating a benchmark on the main branch via
pytest --benchmark-only --benchmark-save=baseline
and compare performance on your feature branch against this baseline via
pytest --benchmark-only --benchmark-compare=0001_baseline --benchmark-sort=name --benchmark-compare-fail=min:5%
Cite
If you used this library for your research, please cite it as:
@article{westermann2025smolyax,
title={Smolyax: a high-performance implementation of the {S}molyak interpolation operator},
author={Westermann, Josephine and Chen, Joshua},
journal = {Journal of Open Source Software},
publisher = {The Open Journal},
doi = {10.21105/joss.08505},
url = {https://doi.org/10.21105/joss.08505},
volume = {10},
number = {112},
pages = {8505},
year = {2025}
}
Owner
- Login: JoWestermann
- Kind: user
- Repositories: 1
- Profile: https://github.com/JoWestermann
JOSS Publication
smolyax: a high-performance implementation of the Smolyak interpolation operator in JAX
Authors
Tags
Polynomial Interpolation Smolyak Operator Sparse Grids Polynomial Chaos JAX NumbaCitation (CITATION.cff)
cff-version: "1.2.0"
authors:
- family-names: Westermann
given-names: Josephine
orcid: "https://orcid.org/0000-0003-3450-9166"
- family-names: Chen
given-names: Joshua
orcid: "https://orcid.org/0009-0002-2257-5780"
contact:
- family-names: Westermann
given-names: Josephine
orcid: "https://orcid.org/0000-0003-3450-9166"
doi: 10.5281/zenodo.16860779
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Westermann
given-names: Josephine
orcid: "https://orcid.org/0000-0003-3450-9166"
- family-names: Chen
given-names: Joshua
orcid: "https://orcid.org/0009-0002-2257-5780"
date-published: 2025-08-14
doi: 10.21105/joss.08505
issn: 2475-9066
issue: 112
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 8505
title: "Smolyax: a high-performance implementation of the Smolyak
interpolation operator in JAX"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.08505"
volume: 10
title: "Smolyax: a high-performance implementation of the Smolyak
interpolation operator in JAX"
GitHub Events
Total
- Create event: 14
- Release event: 2
- Issues event: 9
- Watch event: 2
- Delete event: 20
- Issue comment event: 4
- Push event: 35
- Public event: 1
- Pull request review event: 2
- Pull request event: 18
- Fork event: 1
Last Year
- Create event: 14
- Release event: 2
- Issues event: 9
- Watch event: 2
- Delete event: 20
- Issue comment event: 4
- Push event: 35
- Public event: 1
- Pull request review event: 2
- Pull request event: 18
- Fork event: 1
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 6
- Total pull requests: 14
- Average time to close issues: 16 days
- Average time to close pull requests: 4 days
- Total issue authors: 3
- Total pull request authors: 3
- Average comments per issue: 0.33
- Average comments per pull request: 0.07
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 6
- Pull requests: 14
- Average time to close issues: 16 days
- Average time to close pull requests: 4 days
- Issue authors: 3
- Pull request authors: 3
- Average comments per issue: 0.33
- Average comments per pull request: 0.07
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- MoraruMaxim (4)
- Buantum (1)
- joshuawchen (1)
Pull Request Authors
- JoWestermann (11)
- danielskatz (2)
- joshuawchen (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 132 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: smolyax
A high-performance JAX implementation of the Smolyak interpolation operator
- Documentation: https://smolyax.readthedocs.io/
- License: MIT LICENSE © 2024 Josephine Westermann Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Latest release: 1.0.0
published 5 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- jax *
- numba *
