mHC Algorithm: Manifold-Constrained Hyper-Connections for Openclaw

The mHC Algorithm stabilizes deep neural network training by constraining residual mixing matrices to a doubly stochastic manifold using the Sinkhorn-Knopp algorithm.

lnj22
v0.1.0
Apr 14, 2026
0
716
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install mhc-layer-impl-mhc-algorithm

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install mhc-layer-impl-mhc-algorithm using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is mHC Algorithm: Manifold-Constrained Hyper-Connections?

The mHC (Manifold-Constrained Hyper-Connections) skill provides a sophisticated framework for improving residual connections in deep learning architectures. Based on DeepSeek's 2025 research, this Openclaw Skills implementation addresses gradient norm variance and training instability by ensuring that mixing matrices are doubly stochastic. By projecting connection weights onto a specific manifold, it allows for more predictable signal flow across multiple parallel streams.

At its core, this skill enables developers to move beyond standard residual connections toward Hyper-Connections. It uses a log-space Sinkhorn-Knopp projection to maintain mathematical rigor while providing learnable mixing across residual streams, making it an essential tool for high-performance Transformer and GPT-style model training.

mHC Algorithm: Manifold-Constrained Hyper-Connections Use Cases

  • Stabilizing training for very deep networks exceeding 12 layers where standard residuals fail.
  • Implementing advanced Hyper-Connections in GPT or Transformer architectures to improve gradient flow.
  • Researching manifold-constrained optimization techniques for custom neural network layers.
  • Reducing gradient norm variance in large-scale model training pipelines using Openclaw Skills.

How mHC Algorithm: Manifold-Constrained Hyper-Connections Works

  1. The input tensor is rearranged into multiple streams using einops for efficient multi-stream processing.
  2. Mixing matrices (H_res) are initialized and projected onto a doubly stochastic manifold using the Sinkhorn-Knopp algorithm.
  3. The skill applies a log-space projection to ensure numerical stability during the iterative Sinkhorn process.
  4. Input streams are mixed via the projected matrices, while pre- and post-branch mixing logic manages depth connections.
  5. The branch output (e.g., Attention or MLP) is reintegrated into the mixed streams and rearranged back to the original batch format.

mHC Algorithm: Manifold-Constrained Hyper-Connections Setup

To utilize this skill within your environment, ensure you have the necessary dependencies installed:

pip install torch einops numpy

You can then import the HyperConnections module into your Openclaw Skills workflow to wrap standard neural network layers.

mHC Algorithm: Manifold-Constrained Hyper-Connections Data Schema & Taxonomy

The mHC skill organizes its logic and configuration around the following technical components:

Component Description Metadata/Parameters
H_res_logits Learnable logits for residual mixing (num_streams, num_streams)
H_pre_logits Logits for branch input selection (1, num_streams)
H_post_logits Logits for branch output distribution (1, num_streams)
Sinkhorn Params Configuration for manifold projection num_iters=20, tau=0.05

Files generated by this Openclaw Skills module typically include core implementation references, documentation on the Sinkhorn-Knopp algorithm, and GPT integration patterns.

mHC Algorithm: Manifold-Constrained Hyper-Connections Advanced Features

  • Log-space Sinkhorn-Knopp iterations to prevent numerical underflow during deep training.
  • Fully differentiable manifold-constrained projections for end-to-end gradient descent.
  • Flexible multi-stream architecture supporting N-way parallel residual paths.
  • High-performance tensor operations using einops for clear and efficient dimensionality manipulation.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*