glass_box_umap.jacobian¶
Overview¶
Result of verifying that |
|
Compute the Jacobian of a model using |
|
Map a Jacobian’s input axis through a linear projection. |
|
Reduce per-feature contributions across embedding dimensions. |
|
Verify that |
Classes¶
Functions¶
- compute_jacobian(model: Module, x: Tensor, batch_size: int = 1024) Tensor[source]¶
Compute the Jacobian of a model using
vmap+jacrevwithfunctional_call.
- project_jacobian(jacobian: Tensor, proj_tensor: Tensor) Tensor[source]¶
Map a Jacobian’s input axis through a linear projection.
Used to express a Jacobian computed in a reduced input space (e.g. PCA components) in terms of the original features, by right-multiplying with the projection matrix that maps reduced-space inputs back to original features.
- reduce_contributions(contributions: NDArray[floating], method: Literal['l2'] = 'l2') NDArray[floating][source]¶
Reduce per-feature contributions across embedding dimensions.