Derivative probing of maps defined implicitly through a state equation (Algorithms 1 & 2 of the T4S paper)
Project description
implicit_probing
Probing the higher-derivative tensors of maps that depend implicitly on the solution of a large system of equations.
Many scientific models evaluate a quantity of interest only after solving an expensive implicit
system (e.g. a PDE): for a parameter theta,
q(theta) = Q(theta, u(theta)), where the state u(theta) solves R(theta, u) = 0.
Local surrogates, optimization, and uncertainty quantification often need the higher derivatives
D^j q(theta_0) of such a map. Those derivative tensors are far too large to form, and because the
state u depends implicitly on theta, their entries are not directly accessible — they can be
reached only by probing: contracting the tensor against direction vectors.
This package computes forward and reverse derivative probes of D^j q(theta_0) from the partial
derivatives of R and Q, by the adjoint method and the implicit function theorem. It is a clean,
standalone implementation of Algorithms 1 and 2 of Section 4 of:
Alger, N., Christierson, B., Chen, P., & Ghattas, O. (2026). Tucker Tensor Train Taylor Series. arXiv preprint arXiv:2603.21141.
Each probe reduces to a set of linearized solves that all share the same operator (the linearized
state operator A = d_u R, or its adjoint) and differ only in their right-hand sides. The work is
organized as a traversal of the lattice of multiset-subsets of the probing directions, so that
high-order probes reuse all of their lower-order sub-probes.
Install
pip install implicit_probing # core: symbolic engine + numeric driver (numpy only)
pip install "implicit_probing[jax]" # add the JAX hook (Taylor-mode autodiff)
The FEniCS/DOLFINx hook needs DOLFINx, which is not pip-installable — install it separately (see
the FEniCS install guide), then use implicit_probing.fenics.
Quickstart
import numpy as np
from implicit_probing import probe
from implicit_probing.reference_problems import make_toy_problem
# A built-in toy: q(theta) = Q(theta, u(theta)) with R(theta, u) = 0, theta and q in R^2 and a 3-dof
# implicit state u. Swap this for your own object implementing the ImplicitProblem protocol.
problem = make_toy_problem()
# Probing directions as (vector, max_power) pairs: probe `a` up to power 2 and `b` up to power 1,
# i.e. ask for every mixed derivative up to a^2 b. omega is an output-space functional (the QoI).
a = np.array([1.0, 0.3])
b = np.array([0.4, -0.6])
omega = np.array([1.0, 0.0])
forward, reverse = probe(problem, [(a, 2), (b, 1)], omega)
forward[(2, 1)] # D^3 q [a, a, b], an output-space vector -> array([-0.1197, -0.0638])
reverse[(0, 0)] # gradient of omega(q) w.r.t. theta -> array([ 0.2077, 0.2953])
forward[mu] is the mixed partial of order mu (a Taylor coefficient of q on the slice through the
probing directions); reverse[mu] is the matching parameter-space covector, from a single adjoint
solve. Every lower-order sub-probe falls out of the same shared-operator solves for free. For a real
problem you implement the three-method ImplicitProblem protocol — see the
overview and the FEniCS/JAX scripts under examples/.
Scope
implicit_probing is laser-focused on the derivative machinery and depends on nothing but
numpy. Its probe output is plain arrays and functionals, with no particular tensor format baked in,
so it can feed any downstream consumer (for example the Tucker-tensor-train fitting machinery in the
sibling package T3Toolbox, which implements the
complementary side of the T4S method).
Status
First public release (2026.0.0). Implemented and validated end-to-end: the symbolic
differentiation engine (Algorithm 1) and the numeric driver (Algorithm 2), the
ImplicitProblem interface with a numpy reference implementation, a FEniCS/DOLFINx hook, a
JAX hook (Taylor-mode automatic differentiation), and linear input/output composition.
How to cite
If you use this package, please cite the paper it implements:
Alger, N., Christierson, B., Chen, P., & Ghattas, O. (2026). Tucker Tensor Train Taylor Series. arXiv preprint arXiv:2603.21141.
@article{alger2026t4s,
title = {Tucker Tensor Train Taylor Series},
author = {Alger, Nick and Christierson, Blake and Chen, Peng and Ghattas, Omar},
journal = {arXiv preprint arXiv:2603.21141},
year = {2026},
}
To cite the software itself, see CITATION.cff (GitHub's "Cite this repository"
also reads it).
Authors
- Blake Christierson (bechristierson@utexas.edu)
- Nick Alger (nalger225@gmail.com)
Project details
Release history Release notifications | RSS feed
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 implicit_probing-2026.0.0.tar.gz.
File metadata
- Download URL: implicit_probing-2026.0.0.tar.gz
- Upload date:
- Size: 46.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c94b0eb14b77d377bf63c8595531fef12bc3b3632344f2439bd671d5369df4ea
|
|
| MD5 |
d6ce212c07dc7878059c2e9bb6797d96
|
|
| BLAKE2b-256 |
3c5c60d2c7f5d4c17f9f6d3774349d6602e191a338095c948962d460069f65aa
|
Provenance
The following attestation bundles were made for implicit_probing-2026.0.0.tar.gz:
Publisher:
publish.yml on NickAlger/implicit_probing
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
implicit_probing-2026.0.0.tar.gz -
Subject digest:
c94b0eb14b77d377bf63c8595531fef12bc3b3632344f2439bd671d5369df4ea - Sigstore transparency entry: 2139165998
- Sigstore integration time:
-
Permalink:
NickAlger/implicit_probing@9ec899785ea16c660fff2d1a54c5dd694f86dc6e -
Branch / Tag:
refs/tags/v2026.0.0 - Owner: https://github.com/NickAlger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9ec899785ea16c660fff2d1a54c5dd694f86dc6e -
Trigger Event:
release
-
Statement type:
File details
Details for the file implicit_probing-2026.0.0-py3-none-any.whl.
File metadata
- Download URL: implicit_probing-2026.0.0-py3-none-any.whl
- Upload date:
- Size: 36.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f7b2d53da97d6c7bc88d13835dee7c62c960db90202c6d157c64c8bb5e09b97
|
|
| MD5 |
44ac8d4cd64cc1d8e8372df809f00e67
|
|
| BLAKE2b-256 |
59b728ab6aa60c0ecbf4712bb0fe3c95b668b1a96ef9a1e4f62ee13c7908c6b2
|
Provenance
The following attestation bundles were made for implicit_probing-2026.0.0-py3-none-any.whl:
Publisher:
publish.yml on NickAlger/implicit_probing
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
implicit_probing-2026.0.0-py3-none-any.whl -
Subject digest:
0f7b2d53da97d6c7bc88d13835dee7c62c960db90202c6d157c64c8bb5e09b97 - Sigstore transparency entry: 2139166041
- Sigstore integration time:
-
Permalink:
NickAlger/implicit_probing@9ec899785ea16c660fff2d1a54c5dd694f86dc6e -
Branch / Tag:
refs/tags/v2026.0.0 - Owner: https://github.com/NickAlger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9ec899785ea16c660fff2d1a54c5dd694f86dc6e -
Trigger Event:
release
-
Statement type: