Skip to content

Conversation

@akenmorris
Copy link
Contributor

When optimizing with fixed domains (e.g., adding new shapes to an
existing model), precompute the shape space from fixed shapes to
accelerate gradient computation. This avoids recomputing SVD and
covariance matrices each iteration when most shapes are fixed.

Also simplifies correspondence functions by removing unused inverse
covariance matrix computation - the gradient is computed directly as Y
× pinvMat per the thesis derivation.

Additionally, there was a bug in the CorrespondenceFunction (but not
Legacy one) where the sample block was used for all energy
computations, sot he per-particle energy values were incorrect.
The LegacyCorrespondenceFunction is used when normals are off.

Extends fixed shape space precomputation to support both
correspondence function types (mesh-based and legacy ensemble
entropy). When optimizing with mostly fixed domains (e.g., adding 1
new shape to 200 existing), precomputes the covariance structure from
fixed shapes to avoid expensive SVD recomputation each iteration.

- Add PrecomputeForFixedDomains() and Schur complement gradient to
    LegacyCorrespondenceFunction for legacy/ensemble entropy mode
- Implement lazy precomputation that triggers on first iteration when
    shape matrices are populated
- Select correct function based on mesh_based_attributes setting
- Add distinct profiling scopes (FixedShapeSpace, MeanEnergy, Entropy)
    to differentiate code paths
When optimizing with fixed domains (e.g., adding new shapes to an
existing model), precompute the shape space from fixed shapes to
accelerate gradient computation. This avoids recomputing SVD and
covariance matrices each iteration when most shapes are fixed.

Also simplifies correspondence functions by removing unused inverse
covariance matrix computation - the gradient is computed directly as Y
× pinvMat per the thesis derivation.

Additionally, there was a bug in the CorrespondenceFunction (but not
Legacy one) where the sample block was used for all energy
computations, sot he per-particle energy values were incorrect.
The LegacyCorrespondenceFunction is used when normals are off.

Extends fixed shape space precomputation to support both
correspondence function types (mesh-based and legacy ensemble
entropy). When optimizing with mostly fixed domains (e.g., adding 1
new shape to 200 existing), precomputes the covariance structure from
fixed shapes to avoid expensive SVD recomputation each iteration.

- Add PrecomputeForFixedDomains() and Schur complement gradient to
    LegacyCorrespondenceFunction for legacy/ensemble entropy mode
- Implement lazy precomputation that triggers on first iteration when
    shape matrices are populated
- Select correct function based on mesh_based_attributes setting
- Add distinct profiling scopes (FixedShapeSpace, MeanEnergy, Entropy)
    to differentiate code paths
@akenmorris akenmorris merged commit 8062b4f into master Jan 24, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants