Skip to content

Code for paper "Trust-Region Eigenvalue Filtering for Projected Newton", SIGGRAPH Asia 2024

Notifications You must be signed in to change notification settings

honglin-c/trust-region-newton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trust-Region Eigenvalue Filtering for Projected Newton

Official implementation for the paper:

Trust-Region Eigenvalue Filtering for Projected Newton
Honglin Chen1, Hsueh-Ti Derek Liu3,4, Alec Jacobson2,6, David I.W. Levin2,5, Changxi Zheng1


> 1Columbia University, 2University of Toronto, 3Roblox, 4University of British Columbia,
    5NVIDIA, 6Adobe Research
> SIGGRAPH Asia 2024 (Conference Track)

Installation

To build the code, please run

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j8

Examples

To run the code with our trust-region eigenvalue projection strategy, please run, e.g.,

sh ../scripts/horse.sh

We provide several examples in scripts/. You can find the results in results/.

Comparisons

To run the same example with the eigenvalue clamping strategy (or the absolute eigenvalue projection strategy), add --clamp (or --abs) option after the command in the above scripts.

The default eigenvalue clamping algorithm uses 0 as the clamping threshold. To use a different clamping threshold (e.g., a small positive number), add --epsilon [threshold] option after the command.

Experiments

We provide the python scripts in experiments/ to run the experiments in our paper. To run one experiment of a specific figure, please run, e.g.,

python ../experiments/teaser_frog/frog_stretch_large.py

The python script will iteratively run the example with different eigenvalue filtering strategies and Poisson's ratios. You can find the results in results/.

Optional arguments

For more options, please see

./example --help

What do we modify in TinyAD to add our trust-region eigenvalue projection?

As a research prototype, we choose to make minimal modifications in TinyAD when adding our new projection method. We clone TinyAD to the project folder, and comment out and change lines 71-75 in TinyAD/include/TinyAD/Utils/HessianProjection.hh to:

  if (_eigenvalue_eps < 0) {
      // project to absolute value if the eigenvalue threshold is set to be less than 0
      if (D(i, i) < 0)
      {
          D(i, i) = -D(i, i);
          all_positive = false;
      }
  }
  else {
      // project to epsilon otherwise
      if (D(i, i) < _eigenvalue_eps)
      {
          D(i, i) = _eigenvalue_eps;
          all_positive = false;
      }
  }

Thus we simply use eps < 0 (e.g., eps = -1) as a flag for absolute eigenvalue projection.

To implement our adaptive eigenvalue projection strategy, we compute the trust region ratio and use it as a threshold to switch between the abs and clamp strategy.

Citation

@inproceedings{chen2024trust_region,
      title={Trust-Region Eigenvalue Filtering for Projected Newton},
      author={Honglin Chen and Hsueh-Ti Derek Liu and Alec Jacobson and David I.W. Levin and Changxi Zheng},
      booktitle = {ACM SIGGRAPH Asia 2024 Conference Proceedings},
      year = {2024}
  }

About

Code for paper "Trust-Region Eigenvalue Filtering for Projected Newton", SIGGRAPH Asia 2024

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published