﻿# JAX linearize: reuse a pushforward at one point without assuming it follows changing parameters

Use JAX linearize for repeated tangent directions at a fixed primal point, with explicit residual lifetime and comparison against batched JVP evaluation.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-jax-linearize-reuse-point-lifetime/
Language: en

## Name the point shared by sensitivity queries

A calibration analysis evaluates many parameter-perturbation directions around one fitted model. The [linearize reference](https://docs.jax.dev/en/latest/_autosummary/jax.linearize.html) provides a reusable pushforward that avoids repeating linearization work for each direction. This is useful when the queries share a primal point. It is not a live view that automatically tracks later parameter updates. Store the model revision or analysis identity with the callable so it cannot be accidentally reused for a different point in parameter space.

## Distinguish new directions from a new function state

Changing the tangent direction asks another question about the same local derivative. Changing weights, fixed input data or captured configuration can define a different derivative problem. Rebuild the linearization when the mathematical point or function changes. A wrapper should make this invalidation boundary explicit instead of retaining a callable under a generic cache key. Similar array shapes do not establish that two model revisions share the same derivative values.

## Account for retained intermediates

The [autodiff cookbook](https://docs.jax.dev/en/latest/301/cookbook.html) describes reusable linearization and saved primal-dependent work. Reuse can retain state that an independent directional calculation would not keep for later calls. Include that lifetime in the analysis memory budget and release stale linearizations when the corresponding model point is no longer needed. A callable is not just a small Python handle if its implementation retains numerical intermediates required by subsequent sensitivity evaluations.

## Compare with the actual arrival pattern of directions

The [JVP reference](https://docs.jax.dev/en/latest/_autosummary/jax.jvp.html) defines direct directional evaluation. If every direction is available together, compare an appropriate vectorized JVP arrangement with stored linearization. If directions arrive incrementally, reuse can answer a different operational need. Do not choose a method solely from an isolated timed call: include preparation, retained memory and the number of directions actually evaluated before the primal point changes or the analysis is discarded.

## Verify point identity through a controlled update

Check several directions against direct derivative evaluation at the original point, then change the parameters and confirm a newly built linearization answers the updated problem. The guides on [autograd chain rules](/journal/autograd-chain-rule-neural-graphs/) and [checkpoint recomputation](/journal/activation-checkpoint-recomputation-graph/) provide related context. A good reuse policy preserves the mathematical identity of the local derivative while explaining its state lifetime. Fast repeated calls are meaningful only when they still refer to the model point the report claims to analyze.
