SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.14173 · 2022

Momentum Stiefel Optimizer, with Applications to Suitably-Orthogonal Attention, and Optimal Transport

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 7 functions out of this paper's own repositories and ran 7 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
konglk1203/variationalstiefeloptimizer canonical 7 of 7
FunctionStatusWhere it lives
bures_wasserstein Ran konglk1203/variationalstiefeloptimizer/ProjectionRobustWasserstein/utils.py
code served (permissive licence) · get_code("11f75e7ba9b99252")
euclidean_proj_simplex Ran konglk1203/variationalstiefeloptimizer/ProjectionRobustWasserstein/utils.py
code served (permissive licence) · get_code("8c58d2935bdccfe6")
matrix_root Ran konglk1203/variationalstiefeloptimizer/utils_StiefelOptimizers.py
code served (permissive licence) · get_code("9b40536aafe9e6c8")
matrix_root_inv Ran konglk1203/variationalstiefeloptimizer/utils_StiefelOptimizers.py
code served (permissive licence) · get_code("f27a35e212b683b4")
matrix_square_root Ran konglk1203/variationalstiefeloptimizer/utils_StiefelOptimizers.py
code served (permissive licence) · get_code("d53df6acf4c93e3b")
pair Ran konglk1203/variationalstiefeloptimizer/ViT/ViT.py
code served (permissive licence) · get_code("6ba8cee9f5daea41")
sample_simplex Ran konglk1203/variationalstiefeloptimizer/ProjectionRobustWasserstein/utils.py
code served (permissive licence) · get_code("4e8159ee568761a8")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The problem of optimization on Stiefel manifold, i.e., minimizing functions of (not necessarily square) matrices that satisfy orthogonality constraints, has been extensively studied. Yet, a new approach is proposed based on, for the first time, an interplay between thoughtfully designed continuous and discrete dynamics. It leads to a gradient-based optimizer with intrinsically added momentum. This method exactly preserves the manifold structure but does not require additional operation to keep momentum in the changing (co)tangent space, and thus has low computational cost and pleasant accuracy. Its generalization to adaptive learning rates is also demonstrated. Notable performances are observed in practical tasks. For instance, we found that placing orthogonal constraints on attention heads of trained-from-scratch Vision Transformer [Dosovitskiy et al. 2022] could markedly improve its performance, when our optimizer is used, and it is better that each head is made orthogonal within itself but not necessarily to other heads. This optimizer also makes the useful notion of Projection Robust Wasserstein Distance [Paty & Cuturi 2019; Lin et al. 2020] for high-dim. optimal transport even more effective.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2205.14173")
get_code_for_paper("2205.14173")
have("2205.14173")

Connect an agent — have() is free.