Diffusion transformers generate high-quality images, but the quadratic cost of softmax attention makes long token sequences expensive. Linear attention removes this cost by summing the key-value outer products of all tokens into one shared state per head, which every query then reads; this uniform aggregation, however, degrades generation quality. We propose EnLA, which enriches the keys and values before they are aggregated. A lightweight spatial mixer network (SMN), built from pointwise and depthwise convolutions, mixes features across attention heads and across neighboring spatial positions, and outputs signed residual corrections to the kernel-transformed keys and to the values. Queries and the key-based normalization are left unchanged, so the operator remains linear in the number of tokens. On ImageNet-1K class-conditional generation, EnLA improves FID over vanilla linear attention, LiT, and softmax attention at every DiT scale from S/2 to XL/2 (e.g., 18.40 vs. 22.03 and 19.68 for linear and softmax attention on DiT-XL/2 without guidance). EnLA also improves FID when finetuning a pretrained SANA text-to-image model on three datasets, and improves ImageNet-1K classification accuracy on DeiT backbones. An analysis of the trained model shows that the key corrections account for most of the change in the attention readout.
翻译:暂无翻译