TL;DR
BARTER is a new framework for dynamic sparse training that physically resizes neural network tensors during the training process, enabling significant speedups and memory savings using standard dense kernels. By pruning underperforming units and cloning successful ones across layers, it maintains high accuracy while achieving up to a 6.29× training speedup and an 81.3% reduction in peak GPU memory compared to traditional masked sparse training.
What Problem Does This Paper Address?
Training deep learning models, particularly Transformers, is computationally expensive and memory-intensive. Dynamic Sparse Training (DST) aims to alleviate this by training a sparse network from scratch, periodically updating which parameters are "active."
However, most existing DST methods (like RigL or SET) use masks over full-sized tensors. While this reduces the number of active parameters, the underlying matrix dimensions remain unchanged. To actually see a speedup, you need specialized sparse kernels, which are often hardware-specific and difficult to optimize. Without them, standard "dense" hardware just processes the zeros anyway, resulting in no real-world time or memory savings during training.
The core challenge in physically removing these units is the "growth" problem: if a unit is physically gone, you can't compute its gradient to decide if it should be brought back. BARTER solves this by keeping the model physically compact throughout the entire training loop.
Methods
BARTER (Budgeted active-unit reallocation for Training with compact Execution and Resizing) introduces a structured approach to DST that operates on attention heads and feed-forward network (FFN) channels.
Key components include:
- Physical Resizing: Instead of masking, BARTER physically removes rows and columns from weight matrices. Subsequent training steps operate directly on these smaller tensors using standard, highly optimized dense kernels.
- Active-Only Scoring: It uses statistics (activations and their gradients) collected only from active units during normal backpropagation to rank their importance.
- Prune-and-Clone Reallocation: To grow the model in important areas without needing gradients for "dead" units, BARTER clones a high-performing unit within a "receiver" layer and prunes a low-performing unit from a "donor" layer.
- Output-Weight Splitting: When a unit is cloned, the parent's output weights are split between the parent and the new clone (with a small random perturbation). This ensures the model's output remains identical immediately after the update while allowing the two units to diverge and learn different features during subsequent steps.
- Optimizer Remapping: The framework dynamically resizes Adam optimizer states (moment estimates) to match the new tensor shapes, ensuring training continuity.
Datasets
The authors evaluated BARTER on two primary image classification benchmarks using Transformer-based architectures:
- CIFAR-100: Paired with a 7-layer Compact Convolutional Transformer (CCT).
- Tiny-ImageNet: Paired with a 9-layer Vision Transformer (ViT).
- Fine-tuning: They also demonstrated performance by fine-tuning a Tiny-ImageNet-pretrained ViT on CIFAR-100.
Key Insights and Ideas
- Cloning as a Proxy for Growth: The most elegant "aha moment" is using cloning to bypass the need for gradients of inactive weights. By duplicating a successful feature and splitting its responsibility, the model explores the parameter space more efficiently than random growth.
- Standard Kernels are Enough: By physically resizing tensors, BARTER brings the benefits of sparsity to any device that can run standard matrix multiplications (BLAS), from server-grade H100s to mobile phone GPUs.
- Dynamic Architecture Search: BARTER effectively performs a constrained, hardware-aware neural architecture search during training. It moves capacity (heads and channels) to the layers where they are most useful for reducing the loss.
- Width Correction: The selection logic includes a "width correction" factor (see Figure 2) that prevents a single layer from hogging all the parameters, maintaining a healthy balance across the depth of the network.
Key Results
BARTER consistently outperforms or matches state-of-the-art masked DST methods while being significantly faster and leaner.
- Speed and Memory: On an NVIDIA L40, BARTER achieved up to 6.29× speedup in training segments and reduced peak GPU memory by up to 81.3% compared to masked implementations like RigL.
- On-Device Performance: In a benchmark on an iPhone 13 Pro Max, BARTER completed an epoch 2.78× faster than the full-tensor DST baseline.
- Accuracy: At a density of 0.5 (50% sparsity), BARTER achieved the highest mean Top-1 accuracy among all sparse methods on both CCT/CIFAR-100 (72.85%) and ViT/Tiny-ImageNet (52.77%).
- Compute-Matched Training: When given the same total FLOP budget as a dense model, BARTER can train for significantly more epochs, eventually surpassing the accuracy of the strongest sparse baselines by over 2 percentage points.
Limitations and Future Work
- Structured Granularity: BARTER currently reallocates entire heads and channels. While this is great for hardware compatibility, it cannot exploit "unstructured" sparsity (individual weights), which might offer even higher theoretical compression.
- Fixed Global Budget: The total number of heads and channels is fixed at the start. The authors suggest that future work could explore environments where resource constraints change dynamically during the training process.
- Selection Heuristics: While the activation-gradient product is a strong signal, more complex reallocation rules could potentially yield even better accuracy at extreme sparsity levels (e.g., 90%+).
Summary updated