arXiv(opens in a new tab)cs.LGOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.17969

Neural Dimensional Analysis: Foundations of Dimensionless and Scale-Consistent Computation

Bum Jun Kim, Makoto Kawano, Yusuke Iwasawa, Yutaka Matsuo

Abstract

Modern Transformers rely on many scale-control mechanisms, including normalization, residual scaling, attention temperatures, loss weighting, and adaptive updates. To explain how these mechanisms maintain scale consistency, we introduce Neural Dimensional Analysis (NDA), a unified framework based on dimensional consistency. We define neural units that specify how tensors rescale and which quantities can be added, just as physical units do in physics. Our rules match residual units, nondimensionalize attention and gate inputs, combine losses across units, and convert gradient units into parameter units. We implement NDA through dimensionless Unit Violation Indices (UVI) for diagnosing scale mismatches within Transformers, a unit-consistent multi-loss objective, and the Gauge-Canonical Transformer (GCT) with normalized coordinates and orthogonalized residual additions. In language-model experiments spanning 51M to 1B parameters, GCT remains stable during training across a broad sixteenfold learning-rate range, outperforming Pre-LN, LLaMA-style, and QK-Norm in 124M validation loss at tuned learning rates. GCT's normalized residual stream also shows improved robustness to quantization. At 1B parameters, calibrated per-tensor int8 quantization increases GCT's validation loss by only 0.009 nats, compared with up to 5.51 nats for the baselines. Vision and physics-informed neural network experiments further confirm NDA's benefits beyond language modeling. These results establish dimensional consistency as a neural network design principle.

1 INTRODUCTION

Deep learning employs a broad family of mechanisms for controlling internal scale. Batch normalization, layer normalization (LayerNorm), and root-mean-square normalization (RMSNorm) normalize activations (Ioffe and Szegedy, 2015; Ba et al., 2016; Zhang and Sennrich, 2019). DeepNet, ReZero, LayerScale, and Fixup control the scale of residual additions (Wang et al., 2024; Bachlechner et al., 2021; Touvron et al., 2021b; Zhang et al., 2019). Attention scaling and query-key normalization (QK-Norm) regulate softmax inputs (Vaswani et al., 2017; Henry et al., 2020; Dehghani et al., 2023; Team, 2024). Loss-balancing methods and adaptive optimizers manage scale imbalances in objectives and parameter updates (Kendall et al., 2018; Chen et al., 2018; Wang et al., 2021; Kingma and Ba, 2015; You et al., 2020). These scale-control mechanisms play a critical role in improving training stability and performance (Xiong et al., 2020; Zhai et al., 2023; Wortsman et al., 2024). All of these mechanisms manage how quantities of different scales interact within a neural network (Figure 1).

We interpret these scale-control mechanisms through dimensional consistency. In physics, terms added together must have compatible units, and the arguments of exp and log must be dimensionless. A physical unit, such as a centimeter or a meter, provides a reference scale for expressing a measured quantity. Inspired by physical units and dimensions, we define a neural unit as the rule governing how an internal tensor scales when the computation graph is rescaled. Neural units describe internal scaling behavior even when the data have no physical units. In terms of neural units, each scale-control mechanism in deep learning becomes a unit operation. Normalization removes units, residual branches restore stream units, attention temperatures convert logits to dimensionless quantities, loss weights convert loss units, and optimizers map gradient units back to parameter units. Building on this view, we propose Neural Dimensional Analysis (NDA), a frame-

*Corresponding author: bumjun.kim@weblab.t.u-tokyo.ac.jp

Untyped: five separate fixes

Figure

loss weights

residual scale

norm

temperature

optimizer

One rule: units must match

NDA

Neural Dimensional Analysis

same unit

mixed units

tensor

scale coordinate

Typed network (GCT)

Figure

scale coordinate

Figure 1: NDA at a glance. (Left) Scale-control mechanisms in deep learning, including normalization, residual scaling, attention temperature, loss weighting, and adaptive updates, manage scale at different interfaces of a Transformer. Unit Violation Indices (UVI) flag deviations from the intended scale regime, locating the interface where a scale mismatch arises. (Middle) NDA expresses these mechanisms through unit-consistent operations and a factorization into scales and canonical coordinates. (Right) The Gauge-Canonical Transformer (GCT) builds the whole network on this factorization. Every block computes on dimensionless coordinates (blue), ensuring matching units at every interface, including attention and multilayer perceptron (MLP) branches. The scale (gold) is reattached only when an output needs units.

work that unifies these unit operations under one set of local typing rules.

Positioning. Prior work on scale control has addressed individual aspects of scale for specific purposes. For example, units-equivariant learning handles the physical units of input and output data (Villar et al., 2023), maximal-update parameterization ( μ\muP) prescribes parameterization and update scales for hyperparameter transfer (Yang and Hu, 2021; Yang et al., 2021), unit scaling chooses scales for low-precision training (Blake et al., 2023), and the normalized Transformer (nGPT) constrains activations and weights to the unit hypersphere (Loshchilov et al., 2025). In contrast, our NDA framework offers a unified view of scale control over the whole computation graph, covering activations, objectives, gradients, and optimizers, and additionally provides diagnostics and local corrections. App. C.6 develops these connections.

Contributions. We make three contributions:

  1. A graph-level unit calculus covering activations, objectives, gradients, and updates, together with a theoretical analysis. This calculus links forward computation and backpropagation through a single set of unit rules (Prop. 1). To guide unit-consistent network design and training, we prove theorems on loss weighting, optimizer updates, canonical factorization, and quantization error (App. E).

  2. Diagnostics and designs derived from the calculus. To make the unit rules testable in trained networks, we introduce dimensionless UVI and a weight-space audit with per-block rescaling predictions (Prop. 6). GCT computes every block on dimensionless coordinates and uses an orthogonal projection to control scale growth during residual updates. The calculus also provides local scale corrections for existing architectures, along with unit-consistent training objectives and parameter updates.

  3. Language-model experiments from 51M to 1B parameters under matched recipes. GCT training remains stable across a 16×16\times learning-rate range, and the GCT hyperparameters transfer unchanged to other GCT models up to 6×6\times as deep, with clean validation loss comparable to strong baselines (Figure 2; Tables 1 and 4). The orthogonal projection also improves nGPT in the depth comparison, reducing nGPT's loss by 0.275 nats at L = 48. GCT's normalized residual stream also improves robustness to low-precision storage by keeping token scales uniform. At 1B, calibrated per-tensor 8-bit integer (int8) quantization of this stream increases GCT's validation loss by only 0.009 nats, compared with 5.51 nats for the worst baseline (Table 2). Vision and physics-informed neural network (PINN) studies validate the same principles beyond language modeling (App. I).

References (5)

  • (a) A clear description of the mathematical setting, assumptions, algorithm, and/or model
  • (a) Statements of the full set of assumptions of all theoretical results
  • (a) The code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)
  • (a) Citations of the creator If your work uses existing assets
  • (a) The full text of instructions given to participants and screenshots