atlas

Research map / Architectures and efficiency / Attention and transformers

DenseFormer: Enhancing Information Flow in Transformers via Depth Weighted Averaging

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Transformer block and depth design · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes DenseFormer, which adds a learned depth-weighted-average (DWA) module after each transformer block so each block sees a weighted mix of all earlier block outputs, improving perplexity at negligible parameter cost.

Problem

Transformers show diminishing returns from added depth, and deeper models are costly in parameters, memory, and inference time; the paper asks whether better inter-block information flow can match deeper models more efficiently.

Approach

After each block, a DWA module computes a learned scalar-weighted average of the current block output, all previous block outputs, and the input embedding; initialized as identity so training starts from a standard Transformer. Dilation and DWA periodicity sparsify the weights to cut overhead.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add DWA after every block48-block Transformer · OpenWebText2Perplexity: 18.61 (0.02) -> 17.84 (0.00)Helped
Add learned scaling factors to skip connections48-block Transformer · OpenWebText2Perplexity: 18.61 (0.02) -> 18.45 (0.03)No clear effect
Use DWA dilation 4 (ablation)48-block DenseFormer · OpenWebText2Perplexity: 17.84 (0.00) -> 17.86 (0.02)No clear effect
Use DWA dilation 4 (ablation)48-block DenseFormer · OpenWebText2Inference BPS: 4.65 (0.00) -> 5.31 (0.01)Helped
Use DWA dilation 4 and period 5 (ablation)48-block DenseFormer · OpenWebText2Perplexity: 17.84 (0.00) -> 17.87 (0.02)No clear effect
Use DWA dilation 4 and period 5 (ablation)48-block DenseFormer · OpenWebText2Inference BPS: 4.65 (0.00) -> 5.72 (0.00)Helped
Add DWA after every block24-block Transformer · PG-19Perplexity: 20.13 -> 19.60Helped
Add DWA after every block48-block Transformer · OpenWebText2, 512-token sequencesPerplexity: 18.28 ± 0.03 -> 17.73 ± 0.02Helped
Use DWA with dilation 4 and period 548-block Transformer · OpenWebText2, same training timePerplexity: 18.33 (0.00) -> 17.87 (0.02)Helped
Restrict DWA access to the last 4 blocks and embeddings (ablation)DenseFormer · OpenWebText2, alternative sparsity patternsPerplexity: 17.87 (0.02) -> 18.28 (0.01)Hurt
Use a single DWA after the last block (ablation)DenseFormer · OpenWebText2, alternative sparsity patternsPerplexity: 17.87 (0.02) -> 18.33 (0.02)Hurt
Start training DWA weights after 1k iterations instead of at initialization (ablation)4×5-DenseFormer · OpenWebText2Perplexity: 17.87 (0.02) -> 17.99Hurt

Surprising findings

Limitations

Experimental setup

Datasets: OpenWebText2 PG-19

Benchmarks: OpenWebText2 PG-19

Metrics: perplexity inference batches per second training time parameter count

Baselines: Standard Transformer (same depth) Skips With Gains Last K sparsity Connect to Last Depth-wise Attention

Builds on: DenseNet Residual connections RoPE AdamW Depth-wise Attention

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy