Skip to main content

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

Release files for implicit-probing 2026.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for implicit-probing 2026.0.0
File Size Uploaded
implicit_probing-2026.0.0.tar.gz 46.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for implicit-probing 2026.0.0
File Interpreter ABI Platform
implicit_probing-2026.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 83.2 kB

Release files / implicit_probing-2026.0.0.tar.gz

Download URL implicit_probing-2026.0.0.tar.gz
Size 46.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c94b0eb14b77d377bf63c8595531fef12bc3b3632344f2439bd671d5369df4ea
BLAKE2b-256 checksum
How to use checksums
3c5c60d2c7f5d4c17f9f6d3774349d6602e191a338095c948962d460069f65aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 10, 2026.

Transparency log

Release files / implicit_probing-2026.0.0-py3-none-any.whl

Download URL implicit_probing-2026.0.0-py3-none-any.whl
Size 36.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f7b2d53da97d6c7bc88d13835dee7c62c960db90202c6d157c64c8bb5e09b97
BLAKE2b-256 checksum
How to use checksums
59b728ab6aa60c0ecbf4712bb0fe3c95b668b1a96ef9a1e4f62ee13c7908c6b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2026.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page