Cross Layer Weight Sharing and Feedback in Transformers

43 concepts40 papers2 proposals

Standard Transformer architectures are notoriously parameter-heavy. Every added layer introduces a completely new set of multi-head attention and feed-forward network (FFN) weights. As models scale, this linear growth in parameters relative to depth creates massive memory footprints and high computational latency.

However, do deep networks actually require unique weights at every single layer? Emerging research suggests that the representations in transformers undergo iterative refinement, meaning the same structural transformations can be reused across depth, or compressed entirely through alternative routing and mathematical shortcuts.

Iterative Refinement via Cross-Layer Weight Sharing

Instead of learning $N$ distinct FFNs and attention matrices for $N$ layers, we can share a single set of parameters across the entire depth of the model. This is the core intuition behind architectures like ALBERT (A Lite BERT).

Imagine a multi-layer neural network as a series of steps solving a complex puzzle. Instead of hiring twelve different people who each know only one specific move, you hire one person who applies the same strategy repeatedly until the puzzle is solved. The parameter footprint drops to that of a single layer, even though the computational depth remains the same. This structural constraint acts as a powerful regularizer, forcing the network to learn a more generalized, recursive transformation function.

Standard Transformer:
Input -> [Layer 1 Weights] -> [Layer 2 Weights] -> [Layer 3 Weights] -> Output

Cross-Layer Shared Transformer (e.g., ALBERT):
Input -> [ Shared Weights ] -> [ Shared Weights ] -> [ Shared Weights ] -> Output
         \______________________ Loop N Times ______________________/

This parameter-efficient approach balances performance and computational resources across a wide variety of natural language processing tasks. For instance, Zhao et al. leverage this efficiency in ZYJ at SemEval-2021 Task 7: HaHackathon: Detecting and Rating Humor and Offense with ALBERT-Based Model to optimize semantic feature extraction without incurring massive hardware costs. Similarly, Yu et al. utilize a siamese ALBERT architecture in A Technical Question Answering System with Transfer Learning to minimize memory footprints during inference.

Beyond raw efficiency, cross-layer parameter sharing provides a unique advantage when data is scarce. Because the model has fewer parameters to fit, it is significantly less prone to overfitting. Zhu et al. demonstrate this property in YNU-HPCC at SemEval-2021 Task 6: Combining ALBERT and Text-CNN for Persuasion Detection in Texts and Images, showing that shared-layer models maintain robust generalization even on smaller datasets. Furthermore, Bai notes in hub at SemEval-2021 Task 7: Fusion of ALBERT and Word Frequency Information Detecting and Rating Humor and Offense that this structural compression significantly cuts down training time without sacrificing predictive power.

The versatility of this weight-sharing mechanism is reflected in its widespread adoption for specialized classification tasks. Researchers have successfully deployed it for:

Bypassing Depth with Feedback Memory

While cross-layer weight sharing reduces parameter count, the model must still execute sequentially through every virtual layer. A different approach to parameter efficiency asks: Can we make the network shallower by changing how information flows over time?

In a standard autoregressive transformer, a token at step $t$ can only access representations from step $t-1$ at the corresponding layer level or below. If a lower layer needs a high-level abstract representation computed by a top layer in a previous step, that information must tricklingly propagate down through the network over multiple steps. To compensate, models require deep stacks of layers.

The Feedback Transformer flattens this hierarchy by introducing a shared "Feedback Memory."

Standard Autoregressive Flow:
Step t-1, Layer L   ---> Step t, Layer L+1 (Information stays at or goes up a layer)

Feedback Transformer Flow:
Step t-1, All Layers ---> [Feedback Memory] ---> Step t, All Layers (Direct horizontal access)

By exposing the high-level representations of all previous layers directly to the current step's computation, the network bypasses the need for extreme vertical depth. As Grave et al. demonstrate in Accessing Higher-level Representations in Sequential Transformers with Feedback Memory, this architectural change allows shallower, highly memory-efficient models to match or exceed the performance of massive feedforward baselines while drastically accelerating inference speed.

Mathematical and Hybrid Structural Compression

Beyond weight sharing and feedback routing, parameter efficiency can be achieved by distilling the underlying mathematical operations of attention or combining transformers with lighter local operators.

Distilling In-Context Optimization

Why does attention work so well with few parameters during fine-tuning? Wang et al. provide a theoretical foundation in On Understanding Attention-Based In-Context Learning for Categorical Data, proving that attention-based in-context learning mathematically implements functional Gradient Descent (GD). By designing specialized structures that explicitly execute this optimization logic, the authors show that models can achieve performance parity with standard transformers while utilizing significantly fewer parameters.

Hybridizing with Local Operations

In vision and optimization tasks, global attention can be heavy and redundant. Perera et al. show in MobileUNETR: A Lightweight End-To-End Hybrid Vision Transformer For Efficient Medical Image Segmentation that substituting standard convolutions with depth-wise separable operations and balancing them with targeted attention layers yields a 10x parameter reduction and a 23x increase in computational efficiency without losing global context.

Task-Specific Compactness

When a transformer is tailored to a narrow domain, its parameter footprint can be aggressively downscaled:

Where full-scale models are required, downscaling the base architecture remains highly effective. Treude et al. demonstrate the utility of distilled variants like DistilBERT in AdelaideCyC at SemEval-2020 Task 12: Ensemble of Classifiers for Offensive Language Detection in Social Media, while Filevich et al. show in A Language Model Trained on Uruguayan Spanish News Text that a parameter-reduced RoBERTa model trained on targeted, domain-specific data can match or exceed the performance of much larger general-purpose baselines.

History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_parameter_efficient_transformers_93ddac2f,
  title = {parameter-efficient transformers},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/parameter-efficient-transformers/rdr_93ddac2fd4ba40b3bf772a211b6ad040},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-24},
}

This exact version (version 1, frozen text):

@misc{lacuna_parameter_efficient_transformers_93ddac2f_v1,
  title = {parameter-efficient transformers},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/parameter-efficient-transformers/rdr_93ddac2fd4ba40b3bf772a211b6ad040/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-24},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake