Techniqueadvanced
Active subspaces
Also called active subspace method, gradient-based dimension reduction.
Finds the directions in input space along which the output changes most, from the eigenvectors of the average outer product of gradients.
Active subspaces find a few directions in the input space of a function along which changes most on average. With random with density , form the symmetric positive semidefinite matrix
Each eigenvalue is the mean squared directional derivative along its eigenvector: . If there is a gap after , split and set , the active variables, and , the inactive ones. Then changes little with , and for a function of only variables, which can be fit, integrated or optimized cheaply. is estimated by Monte Carlo from gradient samples. The method is like principal component analysis, but of the gradients of , not of the inputs. It finds rotated directions that no coordinate-wise sensitivity measure would see. Constantine, Dow and Wang gave the theory in 2014.
In plain words
A model can have 50 inputs and still depend mainly on one weighted combination of them, such as a total load. Testing one input at a time hides this, because the combination spreads over many inputs. Instead, measure the slope of the model at many random points, and collect the slope vectors. If they all point roughly along one line, that line is the important direction. An eigenvalue decomposition of the average of the slope vectors times themselves finds these lines and ranks them. The large eigenvalues mark the directions that matter. You then study the model as a function of the few important combinations only.
When it applies
- The gradient is available at sample points, by an adjoint solve, automatic differentiation or finite differences, and it is square integrable.
- The inputs are scaled to comparable ranges, usually standard normal or uniform on . The eigenvectors change with the scaling.
- The function has low dimensional structure along linear combinations of inputs: it is close to a ridge function . The eigenvalues show whether this holds; a clear gap after is the sign.
- For the error bound below, is the standard normal law. For other laws a Poincare constant of enters.
The template
ACTIVE-SUBSPACE(f, ∇f, ρ, M)- 1
draw x_1..x_M from ρ ▷ hole: random or quasi-random points - 2
compute g_j ← ∇f(x_j) for each j ▷ hole: adjoint, AD, finite differences - 3
Ĉ ← (1/M) Σ_j g_j g_j^T ▷ or the SVD of [g_1..g_M] / √M - 4
Ĉ = Ŵ Λ̂ Ŵ^T with eigenvalues in decreasing order - 5
choose n at a large gap λ̂_n / λ̂_(n+1) ▷ hole: gap, bootstrap of the subspace - 6
y ← Ŵ_1^T x; fit g(y) ≈ f(x) from the runs ▷ hole: polynomial, kriging, nothing - 7
return Ŵ_1, the eigenvalues and g
Line L3 builds the estimate; with , , so the singular value decomposition of gives and without forming . Line L5 fixes the dimension, and line L6 uses it: a response surface, a polynomial chaos expansion or kriging in variables needs far fewer runs than in .
Gradients along the subspaces (proved). and , where and are the gradients in the rotated coordinates.
Proof. , since the columns of are eigenvectors of . The same holds for .
Error of the conditional mean (proved for Gaussian inputs). Let and be continuously differentiable with . Then .
Proof. is orthogonal, so is again standard normal, with and independent. For fixed , the Gaussian Poincare inequality in , , applied to , gives . Take the expectation over and use the previous result.
So small trailing eigenvalues guarantee that the best function of alone is close to in mean square.
Classic examples
A ridge function. Let with . Then and every gradient is parallel to . With , , so times the all-ones matrix, with eigenvalues and 0 and eigenvector . The estimate has rank one for every , so and the direction is exact. With seed 1, is 1.435, 0.973, 0.998 and 1.021 for . Every function of the form has a rank one in the same way.
A rotated quadratic. Let in three inputs, , with and the Householder reflection of . Then and , with eigenvalues 1, 0.25 and 0.01, and leading eigenvector . The diagonal of , the mean squared partial derivatives, is : no single input stands out, yet one direction carries percent of the mean squared gradient. Monte Carlo estimates with seed 1:
| angle of to | ||||
|---|---|---|---|---|
| 10 | 0.759 | 0.068 | 0.0053 | 23.3 degrees |
| 100 | 0.807 | 0.245 | 0.0104 | 4.08 degrees |
| 1000 | 0.987 | 0.238 | 0.0102 | 0.094 degrees |
| 10000 | 1.007 | 0.244 | 0.0101 | 0.213 degrees |
The direction is accurate long before the eigenvalues are, because the gap between and is large. The error does not fall monotonically with for one seed.
Contrast with principal component analysis. PCA of the inputs of both examples sees the identity covariance and finds no preferred direction. Active subspaces use the function, through its gradients, and find the direction that matters.
Global sensitivity. Constantine and Diaz define activity scores for each input . With the score is , the derivative-based measure, which bounds the total Sobol index of input by a Poincare inequality. Screening by the Morris method estimates a related average of derivatives without gradients.
Variations
- Finite difference and gradient-free estimates. Use differences when no adjoint exists, or fit a global linear or quadratic model and take its gradients.
- Bootstrap. Resample the gradients to get intervals for the eigenvalues and for the distance between subspaces.
- Different weights. Use the outer products of the gradients of several outputs, or of a misfit function in a Bayesian inverse problem, where the active subspace is the data-informed one.
- Ridge approximation. Fit by optimizing and together from function values only, without gradients.
- Nonlinear analogues. Active manifolds and kernel methods look for curved low dimensional structure.
Pitfalls
- Scaling of inputs. The eigenvectors depend on the units. Normalize the inputs before computing gradients.
- No linear structure. For with , and : all eigenvalues are equal and there is no active subspace, though depends on the single scalar . The method sees only linear combinations.
- Too few gradients. With small, the eigenvalues are biased and the subspace is wrong when the gap is small, as the first row of the table shows. Use the bootstrap.
- Noisy gradients. Finite differences of a model with solver noise add a noise matrix to , which hides small eigenvalues.
- Dependent or bounded inputs. The rotated variables and are not independent when is not Gaussian, and the range of on a box is a zonotope, not a box. Account for this when fitting or integrating over .
Exercises
- Show that and that .
- For , show that has rank at most one.
- Compute for with uniform on and compare it with the Gaussian case.
- Prove that has rank at most , and explain why at least gradients are needed to find an dimensional subspace.
- For with symmetric and , show that .
References
- Paul G. Constantine, Eric Dow and Qiqi Wang, Active subspace methods in theory and practice, applications to kriging surfaces, SIAM Journal on Scientific Computing 36(4), 2014, A1500-A1524, the matrix of averaged outer products of gradients, the bounds on the mean squared gradients along the active and inactive directions by sums of eigenvalues, the Poincare bound on the error of the conditional mean, and the Monte Carlo estimate of the matrix
- Paul G. Constantine, Active Subspaces, Emerging Ideas for Dimension Reduction in Parameter Studies, SIAM Spotlights 2, SIAM, 2015, the discovery of the active subspace from gradient samples, the choice of its dimension by the eigenvalue gap, and its use for response surfaces, integration and optimization
- Paul G. Constantine and Paul Diaz, Global sensitivity metrics from active subspaces, Reliability Engineering and System Safety 162, 2017, 1-13, the activity scores built from the leading eigenpairs and their relation to derivative-based global sensitivity measures
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 0TXSBW Edit this page History Report an error Markdown