Other people with similar names: Shen Yan

Unverified author pages with similar names: Shen Yan


2026

Transformer layers evolve representations through learned additive transformations that combine direction-preserving and direction-changing effects. We study this geometry by decomposing learned updates into parallel and perpendicular components. Across pretrained models, we find substantial learned parallel components, showing that direction-preserving behavior is not confined to the residual identity path. To test whether these components are redundant or behaviorally important, we apply the decomposition to residual-space updates and to value aggregation inside attention. Inference-time edits reveal a space-dependent asymmetry: value-space parallel edits preserve behavior more effectively than residual-space or perpendicular counterparts, especially when the direct self message is fixed and only the non-self aggregate is scaled. The decomposition also provides a compact, component-resolved view of compression error. During from-scratch pretraining, using parallel suppression as part of the forward computation lowers validation-loss trajectories and improves downstream averages in our evaluated runs, with the value-space variant strongest. Overall, this geometry connects update direction to editing robustness, compression diagnostics, and training-time intervention. Code is available in the https://github.com/Shwai-He/Transformer-Geometry.