mhc-algorithm - Implement Manifold-Constrained Hyper-Connections
Stabilize deep network training by constraining residual mixing matrices to be doubly stochastic via log-space Sinkhorn-Knopp algorithm.
Tags
Updated: 2026-09-14Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Project matrices using Sinkhorn-Knopp
- Implement PyTorch HyperConnections module
- Wrap attention and MLP layers
Inputs
- PyTorch model architecture
- Logit tensors
- Hyperparameter configuration
Outputs
- Doubly stochastic matrix tensor
- HyperConnections PyTorch module
- Mixed tensor output
Requirements
- torch
- einops
- numpy
