Rethinking Parameter Sharing as Graph Coloring for Structured Compression

Boyang Zhang, Daning Cheng, Yunquan Zhang

TL;DR

Geo-Sharing reimagines cross-layer parameter sharing in deep models as a mathematically rigorous graph coloring problem. By using a second-order geometric criterion to align parameter perturbations with the flattest (low-curvature) directions of the Hessian loss landscape, it achieves training-free model compression that cuts parameter counts and MACs by up to 50% while maintaining high accuracy and boosting hardware throughput.

What Problem Does This Paper Address?

Modern deep learning models, such as Large Language Models (LLMs) and Vision Transformers (ViTs), achieve state-of-the-art performance at the cost of massive parameter sizes. This creates severe memory and computational bottlenecks during inference, especially for deployment on edge devices.

Weight sharing via low-rank approximation is a promising, hardware-agnostic solution because it reuses structural components across layers without requiring specialized hardware or expensive retraining. However, existing weight-sharing strategies rely on rigid, heuristic rules—such as only sharing parameters between immediately adjacent layers.

Expanding parameter sharing across arbitrary, non-adjacent layers creates an exponentially large search space (e.g., $4^{32}$ possible configurations for a 32-layer Transformer). Finding an optimal configuration through exhaustive or heuristic search is computationally impossible, and until now, there has been no mathematically principled framework to guide cross-layer sharing.

Comparison of independent layers, adjacent layer sharing, and the proposed automatic cross-layer sharing framework.

Methods

The authors introduce Geo-Sharing, a framework that tackles cross-layer parameter sharing through a combination of graph theory and differential geometry:

  1. Parameter Sharing as Graph Coloring: The network's layer structure is modeled as a bipartite graph where layer indices are mapped to a set of shared low-rank bases ($W_\ell \approx U_b S_{\ell,b} V_b^T$). Layers assigned the same "color" share the same structural left and right factor matrices ($U_b, V_b$) but maintain unique, layer-specific coefficient matrices ($S_{\ell,b}$). This formalizes the idea that layers sharing parameters are functionally interchangeable (forming an mathematical automorphism group).
  2. Hessian-Based Geometric Alignment: To determine which layers should share the same color without destroying model performance, the authors analyze the loss landscape using a second-order Taylor expansion. The Hessian matrix describes the local curvature of this landscape as an ellipsoid.
  3. Curvature-Aligned Optimization: The eigenvectors of the Hessian define the axes of this ellipsoid. The minor axes correspond to high-curvature (steep) directions where even small changes sharply increase loss, while the major axes correspond to low-curvature (flat) directions. Geo-Sharing projects the sharing-induced weight perturbations onto the low-curvature subspace and strictly minimizes the energy along the high-curvature directions. This results in a closed-form, training-free selection rule that keeps the compressed model in the flattest, most robust regions of the loss landscape.
The Geo-Sharing framework: Remodeling parameters as a graph and using Hessian-based analysis to align sharing rules with low-curvature directions.

Datasets

The authors comprehensively evaluated Geo-Sharing across multiple models and benchmarks:

  • Language Modeling: WikiText-2, Penn Treebank (PTB), and C4.
  • Zero-Shot Common-Sense Reasoning: OpenbookQA, WinoGrande, HellaSwag, PIQA, MathQA, ARC-easy, and ARC-challenge.
  • Vision Tasks: ImageNet (for image classification) and downstream transfer learning on CIFAR-10 and CIFAR-100.

No new datasets or benchmarks were introduced in this paper.

Key Insights and Ideas

  • Symmetry Implies Interchangeability: The core conceptual leap is framing parameter sharing as an architectural symmetry. If multiple layers can share a basis, they are structurally symmetric, meaning permuting their order does not fundamentally alter the model's expressive power.
  • Curvature Matters More Than Error Norm: Traditional compression techniques focus on minimizing the raw distance (norm) between the original and compressed weights. Geo-Sharing demonstrates that where the error points matters more than its size; a larger error pointing along a flat, low-curvature direction of the loss landscape is far less damaging than a tiny error pointing down a steep, high-curvature direction.
  • Vanishing First-Order Terms: Because pre-trained models operate near a local minimum, their gradient norms are close to zero. This causes the first-order term in the Taylor expansion to vanish, meaning the loss change is almost entirely dominated by second-order curvature, validating the use of the Hessian.

Key Results

  • Superior LLM Compression: On LLaMA-7B, Geo-Sharing consistently outperformed standard SVD baselines and state-of-the-art Basis Sharing. At 50% compression, Geo-Sharing achieved a significantly lower perplexity on WikiText-2 (18.95 vs. 126.35 for Basis Sharing) and maintained higher zero-shot reasoning accuracy.
  • Extreme Compression Stability: Under extreme compression ratios (70%–80%), Geo-Sharing cut perplexity by over 50% on the C4 dataset compared to alternative methods, proving the stability of its group-constrained basis formulation.
  • Hardware Speedups: Evaluated on a single NVIDIA A800 GPU, Geo-Sharing reduced parameter counts and MACs by 40%–50% across LLaMA2-7B, LLaMA-7B, and Mistral-7B. This translated to a ~45% reduction in latency and up to a 70% increase in inference throughput.

Limitations and Future Work

  • Computational Cost of the Hessian: Computing the top eigenvectors of the Hessian matrix via Hessian-vector products (HVP) and the Lanczos algorithm is computationally intensive. For a standard batch setup, calculating the top 550 eigenvalues took approximately 0.93 hours. While this is a one-time, training-free cost (and much faster than reinforcement learning-based search methods), it remains a bottleneck for scaling to ultra-large models.
  • Local Approximation Limits: The geometric alignment principle relies on a local quadratic approximation. If the perturbation amplitude ($\beta$) is set too high, the local assumption breaks down, leading to a sharp, unpredictable surge in model perplexity.

Summary updated

BibTeX
@inproceedings{zhang2026rethinking,
  author = {Boyang Zhang and Daning Cheng and Yunquan Zhang},
  title = {{Rethinking Parameter Sharing as Graph Coloring for Structured Compression}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=vNCE03zff8},
}
Figure