This is demo code to generate the results in "Robust First and Second-Order Differentiation for Regularized Optimal Transport" (https://arxiv.org/pdf/2407.02015)
util.py: utility functions.
SinkhornHessian.py: Main function classes -- SinkhornHessian and ShuffledRegression.
CondH.py: It plots the delay of the smallest positive eigenvalue
Hessian_speed_uniform.py: It plots the comparison of runtime (in seconds) in Hessian computing among three approaches: unroll, implicit differentiation and analytic expression with regularization (ours). (Figure 2 Top)
Hessian_accuracy_uniform.py: It plots the comparison of marginal error for Hessian computing among three approaches: unroll, implicit differentiation and analytic expression with regularization (ours). (Figure 2 Bottom)
shuffled_regression.py: It plots the results in shuffled regression with Gaussian mixtures. (Figure 3)
3D_pointcloud_regist.py: It plots the results in 3D Point Cloud Registration. (Figure 4) The ModelNet10 dataset can be downloaded in https://vision.princeton.edu/projects/2014/3DShapeNets/ModelNet10.zip.