NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Beyond Adjacent Layers: Graph-Guided Layer Fusion for Compressing Large Language Models

Muhammad Usama, Summer Yeoreum JungNeurIPS 2026

TL;DR

When shrinking Large Language Models (LLMs) by removing layers, standard methods assume redundant layers sit right next to each other. By mapping out the full functional relationships across 13 different models, the authors discover that non-adjacent redundant layer pairs actually outnumber adjacent ones by up to 15.9$\times$—including an uncanny similarity between the very first and very last layers. By treating layers as a social network and keeping only the "leader" of each functional community, you can slice a model's depth in half, nearly double its generation speed, and preserve far more intelligence than local pruning methods.

What Problem Does This Paper Address?

Running LLMs is expensive and slow largely because of their depth—every transformer layer has to wait in line for the previous one to finish before it can do its job. "Depth compression" tackles this bottleneck directly by deleting or merging entire layers.

Historically, compression algorithms have operated on an unexamined hunch: that redundancy is local. Methods either score layers individually and drop the weakest ones, or merge neighboring blocks. The risk? If you greedily drop low-scoring layers or only merge neighbors, you might accidentally wipe out an entire "phase" of computation while keeping redundant copies of another. The authors ask a simple question: What if functionally equivalent layers aren't neighbors at all?

Methods

The authors introduce Fusion via Community Mining (FCM). Despite the name, FCM doesn't mash weights together via averaging; instead, it performs functional fusion in four clean steps:

Figure 1: Overview of the FCM pipeline. Given a pretrained LLM with L layers, FCM (1) profiles pairwise activation similarity to construct a full L × L matrix S, revealing block-diagonal structure with non-adjacent high-similarity regions; (2) applies spectral clustering to partition layers into communities that may span non-adjacent positions; and (3) selects the highest Block Influence layer per community, discarding the rest. The compressed model retains K layers (one per community) and undergoes LoRA recovery fine-tuning.
  1. Full Similarity Profiling (New): Run a small calibration dataset through the model and compare the hidden-state activations of every layer against every other layer to build an $L \times L$ similarity matrix. By default, FCM uses sample-level cosine similarity, automatically falling back to Centered Kernel Alignment (CKA—a metric invariant to rotation and scaling) if an entropy-based rule detects an unbalanced partition.
  2. Graph Community Detection (New application): Treat this matrix as a weighted graph and apply spectral clustering to divide the layers into $K$ communities (e.g., 14 communities to compress a 28-layer model by 2$\times$). Crucially, communities can group layers from completely different depths.
  3. Keep the "Leader" (Standard metric, new context): Within each cluster, keep the single intact layer with the highest Block Influence (BI)—essentially, the layer that changes its input hidden state the most—and throw the rest away.
  4. Heal (Standard): Apply lightweight LoRA fine-tuning for 500 steps so the surviving layers learn to bridge the gaps.

Datasets

No new benchmarks are introduced; the method is tested on established datasets:

  • Calibration: 512 short samples from C4.
  • Language Modeling: WikiText-2 (perplexity) and LAMBADA.
  • Downstream Reasoning & Coding: Zero-shot ARC-Easy, ARC-Challenge, HellaSwag, WinoGrande, and PIQA; 5-shot MMLU; HumanEval (code generation); and a 256-token free-form generation suite.

Key Insights and Ideas

  • The "Representational Bookend": Across 13 models (1.6B to 14B parameters), non-adjacent highly similar layer pairs outnumber adjacent ones by 3.6$\times$ to 15.9$\times$. Surprisingly, early embedding layers (e.g., 0–2) and late output layers (e.g., 25–27) frequently form a single functional community! Because Pre-Layer Normalization causes activation variance to explode with depth, middle layers drift toward near-identity operations while late layers collapse representations back toward the early embedding subspace.
Ratio of non-adjacent to adjacent high-similarity layer pairs across 13 models
  • Keep Leaders, Not Averages: If you pick the most "central" layer in a cluster (highest average similarity to peers), performance collapses—spiking perplexity by +948% on LLaMA-3.1-8B! Why? The most central layer is the most redundant "follower." Picking the highest Block Influence layer keeps the active "leader" doing the heavy lifting.
  • The 2$\times$ Compression Crossover: Below 2$\times$ compression, redundancy is so plentiful that simple local pruning works fine. At 2$\times$ and beyond, local methods accidentally delete entire functional phases and fall off a cliff, whereas FCM's global community coverage shines.

Key Results

  • Perplexity: At 2$\times$ compression, FCM beats ShortGPT on 12 of 13 models (10 statistically significant), cutting perplexity by up to 50% on Qwen3-4B. Against modern adjacent-pair methods (FlattenGPT, SWM, DeltaLLM), FCM ranks #1 overall (mean rank 1.15).
  • Hardware Speedups: Compressing Qwen2.5-7B by 2$\times$ sheds 46% of parameters, cuts peak VRAM by 42%, and boosts single-A100 decode throughput by 84%.
  • Downstream Tasks: On Qwen2.5-7B, FCM recovers +6.2 accuracy points over ShortGPT across five zero-shot benchmarks, boosts MMLU by 6.2–10.6 points, raises HumanEval pass@1 from 18.5% to 29.8%, and slashes degenerative text repetition from 24% down to 2%.

Limitations and Future Work

  • Sliding-Window Attention Struggle: FCM loses to ShortGPT on Mistral-7B (+13.4% perplexity) and ties on SmolLM3-3B and LLaMA-3.2-3B. Because Mistral uses sliding-window attention, information concentrates heavily in specific token positions. Mean-pooling activations across the sequence washes out this signal. Using full-token CKA narrows the gap to +5.3%, though it is too memory-heavy to run everywhere.
  • Unexplored Frontiers: The authors have not yet evaluated long-context tasks (>2048 tokens), mathematical reasoning, encoder-decoder architectures, or how FCM stacks with orthogonal compression tricks like quantization (AWQ/GPTQ) or width pruning.

Summary updated

BibTeX
@inproceedings{usama2026beyond,
  author = {Muhammad Usama and Summer Yeoreum Jung},
  title = {{Beyond Adjacent Layers: Graph-Guided Layer Fusion for Compressing Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=VvbFs1vt1f},
}
Figure