L2 Regularization and Batch Norm
In a convolutional net where layers feed into batch normalization, an L2 penalty (weight decay) no longer regularizes those layers, because batch norm makes the output invariant to weight scale. Instead, weight decay controls the effective learning rate: gradients scale as 1/α when weights scale by α, so the effective step size relative to the weights scales as 1/α². Without decay, weights grow through random-walk drift and the effective learning rate collapses. A ResNet-20 CIFAR-10 experiment in TensorFlow supports this. Removing L2 from the conv layers dropped accuracy from about 91% to 89.5%, with weight-norm growth and shrinking relative step sizes, and adjusting per-layer learning rates can replicate the effect of weight decay.
Related posts
- Towards demystifying the creativity of diffusion models
Google Research hardMasterDiffusion models generalize beyond their training data because neural networks learn a smoothed version of the score function rather than the exact empirical one, which would only reproduce training samples. Regularization, whether explicit weight decay or the implicit bias of gradient training, softens the sharp transitions between training points, creating an interpolation zone where denoised samples settle between known data. A 1-D experiment with two-layer ReLU networks trained by AdamW shows this directly. In higher dimensions the smoothing acts mainly along directions tangential to the data manifold, so samples still converge onto the manifold while spreading between training points, which balances quality and novelty. The work is from an ICLR 2026 paper, and code is released.
- A study of sequence weighting at scale
Jane Street Tech Blog hardMasterHow strongly a language model's per-sequence loss reduction tracks that sequence's training weight changes non-monotonically with scale, as measured by a fitted effective sequence weight exponent p*. Sequences were given random log-uniform weights and models were re-evaluated on the training set. Across two in-house families (dense and MoE, tens of millions to hundreds of billions of parameters) and Qwen 2.5 (500M–72B), p* tends to rise from small to medium scale and fall again at large scale. Small models learn general patterns regardless of weight, medium models learn idiosyncratic patterns in proportion to weight, and large models learn nearly everything. More epochs shift the peak toward smaller models. Because this aberrant scaling breaks small-scale extrapolation of data-mix decisions, the authors suggest fitting mix results only on sufficiently large models or damping training weights to compensate.
- Supercharging transformer residual connections
Google Research hardMasterDeepCrossAttention (DCA) replaces the fixed point-wise summation of transformer residual connections with learned, per-token routing over all preceding layer outputs. It does this through dynamic layer-mixing weights and depth-wise cross-attention with split Q/K/V, which prevents early-layer features from being diluted. On LM1B and C4, DCA matched standard transformers in up to 5x fewer training steps and hit sub-14 LM1B perplexity with 30 layers instead of 42, while adding under 0.2% parameters. It can also be retrofitted onto pre-trained models, and the post places it alongside related techniques such as attention residuals, hyper-connections and manifold-constrained hyper-connections.
- Fixing Gradient Accumulation
Hugging Face mediumAdeptGradient accumulation in the transformers Trainer did not match full-batch training because the default model loss averaged per-batch cross-entropy instead of summing token losses across all accumulated batches and dividing by the total count of non-padding tokens. The fix switches the causal LM loss to sum reduction normalized by a passed-in num_items. Models inheriting PreTrainedModel also gain a loss_function property configurable via config.loss_type and LOSS_MAPPING, and the Trainer will accept user-supplied loss functions. The fix is available by installing transformers from main.
- Beyond LoRA: Can you beat the most popular fine-tuning technique?
Hugging Face mediumAdeptLoRA accounts for roughly 95–98% of PEFT usage across Hugging Face Hub model cards and image-generation checkpoints, but controlled benchmarks in the PEFT library show it is often not the best tradeoff. On a MetaMathQA/GSM8K fine-tune of Llama-3.2-3B, rs-LoRA (53.2%, 22.6 GB) sits on the accuracy–memory Pareto frontier alongside BEFT (32.9%, 20.2 GB) and Lily (54.9%, 25.6 GB), while vanilla LoRA (48.1%, 22.5 GB) is dominated. On a FLUX.2-klein-base-4B image concept-learning benchmark, OFT strictly beats LoRA on both DINO similarity and VRAM. To work around downstream tools like vLLM that only load LoRA, PEFT can now convert some other adapters to LoRA with near-identical scores, so switching techniques is mostly a matter of changing one config.