Location-Controlled Arithmetic
- Location-Controlled Arithmetic is a concept where arithmetic operations are governed by spatial positions and local contextual rules across diverse mathematical and computational settings.
- It distinguishes between uniformly local systems using a single operation and explicitly location-programmed systems that assign distinct arithmetic rules based on location.
- Applications span cellular automata, topographic number theory, neural network layers, and memory-resident architectures, highlighting its impact on error correction and computational efficiency.
Location-Controlled Arithmetic can be understood, in the literature represented here, as arithmetic whose semantics, execution, observability, or provability are determined by location. The relevant “location” varies by setting: an adjacent cell pair in a cellular automaton, a face or edge in a Coxeter topograph, a token position and layer in a transformer, a row, partition, or register in a memory architecture, a support-shifting location parameter in a mixture model, or a geometric locus on an arithmetic surface. In that broad sense, the topic does not name a single formalism so much as a recurring structural idea: arithmetic is attached to places, and global behavior is reconstructed from local rules, local symbols, or local layouts (Elnekiti, 2017, Milea et al., 2018, Sun et al., 16 Jul 2025, Leitersdorf et al., 2022).
1. Conceptual forms of location control
A first distinction is between uniformly local arithmetic and explicitly location-programmed arithmetic. In uniformly local systems, the same operation is used everywhere, but it acts only on data available at a particular site; position matters because different sites see different operands. In explicitly location-programmed systems, different places carry different arithmetic meanings, or distinct loci support different invariants, update mechanisms, or correction rules. Several works surveyed here fall into the first category only partially, while others realize the stronger form.
This distinction is explicit in the arithmetic cellular automaton of New Directions In Cellular Automata, where each output is computed from one oriented adjacent pair, , via
The computation is therefore spatially localized, but the paper does not define a family varying with ; location controls arithmetic through adjacency and through subsequent pattern selection rather than through a separate control language (Elnekiti, 2017).
A stronger mathematical realization appears in the topographic and Coxeter-theoretic framework of The arithmetic of arithmetic Coxeter groups. There, arithmetic values are attached to geometric positions—faces, edges, points, cells—and adjacency relations determine propagation laws, discriminant formulas, and reduction loci such as wells, rivers, and oceans. In that setting, location is not merely a place where a uniform rule fires; it is part of the arithmetic meaning itself (Milea et al., 2018).
In neural settings, the literature separates diagnostic localization from causal control. Probing for Arithmetic Errors in LLMs shows that arithmetic-relevant information becomes strongly decodable at the equals-sign token and especially in late layers, enabling error monitoring and selective re-prompting, but not direct hidden-state control of correctness (Sun et al., 16 Jul 2025). By contrast, Post-Routing Arithmetic in Llama-3 identifies a post-routing regime in which the final answer is causally determined by the last input token’s late-layer residual stream, and targeted edits at that localized site can enforce strict counterfactual changes (Yan, 22 Feb 2026).
A different notion of control appears in systems work. In AritPIM, arithmetic is governed by where bits are stored in rows, columns, and partitions; carry propagation, shifts, and normalization become communication schedules over physical memory locations (Leitersdorf et al., 2022). In Which arithmetic operations can be performed in constant time in the RAM model with addition?, arithmetic becomes constant-time after preprocessing because information is distributed across registers and tables in carefully chosen layouts, so that runtime work reduces to address computation and lookup (Grandjean et al., 2022).
2. Local rewriting in arithmetic cellular automata
The automaton introduced in New Directions In Cellular Automata is a one-dimensional finite row of cells with state set
informal radius
and local rule
If the current configuration is
then the next row is
Because each step shortens the row by one, the evolution uses a shrinking finite array rather than periodic wraparound boundaries (Elnekiti, 2017).
Inputs are written as arithmetic expressions such as
but the minus signs are separators, not operations performed sequentially. The initial configuration is the spatial encoding
0
and the automaton rewrites one arithmetic expression into another by local absolute subtraction until one number remains. For the paper’s default example,
1
the evolution proceeds through explicitly listed rows 2, ending at 3 (Elnekiti, 2017).
The paper also defines highlighted patterns
4
with examples
5
These patterns are used to select subsequences in generated rows and thereby reveal visual structures analogous to standard space-time diagrams. The same arithmetic mechanism is then used to simulate structures visually analogous to Rule 90, Rule 110, and Rule 182 by choosing particular numeric inputs 6 and highlighted patterns 7 (Elnekiti, 2017).
The significance of this model for Location-Controlled Arithmetic is precise but limited. Arithmetic is tied to location in the sense that the output at position 8 is determined only by the ordered pair at positions 9 and 0. However, there are not different operators assigned to different regions, and there is no explicit position-dependent transition table. The paper therefore supports a notion of spatially localized arithmetic rewriting, but not a stronger notion of explicit location-programmed operator choice (Elnekiti, 2017).
3. Geometric localization in number theory
In the most literal mathematical sense, Location-Controlled Arithmetic appears when arithmetic quantities are attached to geometric positions and recovered from incidence relations. Conway’s topograph, generalized in The arithmetic of arithmetic Coxeter groups, is the paradigmatic case. For a binary quadratic form
1
the value 2 is placed on the face indexed by the primitive lax vector 3. Faces correspond to primitive lax vectors, edges to lax bases, and points to lax superbases. In a local cell with values 4, the entries
5
form an arithmetic progression, and the discriminant is locally visible as
6
Reduction is then read off from special loci: wells for positive-definite forms, rivers for indefinite forms, and oceans for indefinite binary Hermitian forms. The same paper extends the framework to Gaussian and Eisenstein topographs and to dilinear topographs for 7 and 8, where local progression laws and local discriminant formulas again encode global arithmetic invariants (Milea et al., 2018).
Arithmetic surfaces provide another geometric form of locality. In Arithmetic Central Extensions and Reciprocity Laws for Arithmetic Surface, arithmetic data are attached to three kinds of loci: around a closed point 9, along a vertical curve 0, and along a horizontal curve 1. The main reciprocity laws assert
2
3
and, for a horizontal curve,
4
The first two settings are governed by 5-type central extensions, while the horizontal case requires new arithmetic central extensions incorporating metrized determinant torsors, arithmetic adelic cohomology, and arithmetic intersection theory. Here location changes not only the summation set but also the form of the local symbol itself (Sugahara et al., 2016).
A third geometric manifestation is Pasten’s theory of arithmetic derivatives. For a coprime triple
6
the additive condition
7
defines a lattice hyperplane inside prime-indexed coordinate space, and non-degeneracy is the requirement that the arithmetic Wronskian
8
be nonzero. Geometry of Numbers is then used to locate small integral points 9 in that lattice. The paper proves the existence of linearly independent derivations 0 with
1
and shows that sufficiently small independent derivatives are equivalent to the 2-conjecture. This suggests a further sense of “location”: arithmetic is controlled by the position of an integral vector inside a constrained lattice, not by spatial adjacency in the usual computational sense (Pasten, 2021).
4. Token-, layer-, and feature-local arithmetic in neural networks
The most developed neural form of Location-Controlled Arithmetic is representational localization inside transformers. In Probing for Arithmetic Errors in LLMs, the key observation is that arithmetic information becomes strongly decodable from the residual stream at the equals-sign token, especially in late layers. On a near-exhaustive evaluation of 3 valid 3-digit additions with 4, Gemma 2 2B IT made 3,329 errors, and 3,328 of those errors had an incorrect hundreds digit. Probes trained independently at each layer decode both the model’s impending answer and the true arithmetic answer from the same localized hidden state 5. In pure 3-digit addition, circular, logistic, and MLP probes plateau around 6 in the final 4–5 layers for the model’s output digit, and true-answer decoding again exceeds 7 in deep layers; error detectors exceed 8 accuracy in later layers, with appendix best accuracies of 9 in 0-shot, 0 in 1-shot, and 1 in 2-shot. Transfer from simple addition to structured GSM8K chain-of-thought remains around 2, and selective re-prompting can correct up to 3 of flagged arithmetic errors while preserving 4 of flagged-but-correct steps for several prompt phrasings. The paper is explicit that this is strong localized readout and monitoring, but not direct causal hidden-state control (Sun et al., 16 Jul 2025).
Post-Routing Arithmetic in Llama-3 strengthens that picture from representational localization to causal localization. In Meta-Llama-3-8B (base), under a one-token three-digit-addition readout with baseline strict accuracy typically about 5, cross-sample residual patching yields a sharp boundary near layer 6. The reported summary is nearly binary: at layers 7–8, last-token strict transfer is 9 and non-last strict transfer is approximately 0; at layers 1–2, last-token strict transfer is 3 and non-last strict transfer is approximately 4. Cumulative attention ablation shows that ablating attention in layers 5–6 preserves at least 7 accuracy, whereas ablating attention in layers 8–9 collapses accuracy to approximately 0. In that post-routing regime, digit and digit-sum directions are context-conditioned, but low-rank Procrustes alignment reveals that dictionaries across contexts are nearly related by an orthogonal map. Causal edits at the last-token residual stream respect that geometry: direct within-context edits work, naive transfer fails, and rotated interventions restore strict counterfactual control; wrong-condition and random-1 controls do not recover (Yan, 22 Feb 2026).
The architectural bias introduced by the Neural Accumulator and Neural Arithmetic Logic Unit occupies a weaker but still relevant position. The NAC constrains a linear map to
2
while the NALU combines additive and multiplicative paths,
3
4
The paper does not introduce an explicit geometric notion of location, but it does state that if input dimensions correspond to positions, regions, channels, time steps, or object slots, then the NAC learns which such locations to include positively, negatively, or not at all, and the NALU’s gate decides which arithmetic operator family to apply. This supports an interpretation of controlled arithmetic through representational location rather than through explicit coordinates (Trask et al., 2018).
5. Memory-resident and layout-dependent arithmetic
In systems work, Location-Controlled Arithmetic becomes literal architecture. AritPIM formulates arithmetic as an in-memory computation whose feasibility and complexity depend on data placement in arrays, rows, columns, and partitions. The abstract model consists of 5 arrays, each an 6 binary matrix, with bitwise column operations executing in parallel across all rows and arrays in 7 latency. In bit-serial element-parallel mode, one row stores one arithmetic instance; in bit-parallel element-parallel mode, an array is divided into 8 partitions, with the paper assuming 9 for an 0-bit operand, so that partition 1 stores bit 2. Fixed-point addition then becomes a partitioned prefix computation with associative operator
3
yielding 4 latency instead of 5. Multiplication is expressed through broadcast, local AND, carry-save addition, and partition shifts, with total latency improved to
6
The paper’s most distinctive contribution is variable shift and normalization for floating-point arithmetic, implemented as mux-controlled power-of-two shifts,
7
and binary-search-like normalization,
8
This is exactly a form of arithmetic control by physical location: bit significance is mapped to partition index, and arithmetic complexity becomes a property of communication topology (Leitersdorf et al., 2022).
The RAM model of Which arithmetic operations can be performed in constant time in the RAM model with addition? gives a different architectural answer. Registers hold only 9-bounded integers, but larger integers 0 are represented across 1 registers in positional bases such as
2
or, for division,
3
After linear-time preprocessing on 4, the RAM stores tables such as
5
and then performs subtraction, multiplication, division, exponentiation, logarithm, fixed 6-th roots, bitwise operations, and, more generally, any operation computable in linear time on a cellular automaton, in constant time on fixed-degree polynomial integers. The paper’s general theorem states that for fixed 7, division of 8 with 9 can be computed in constant time 00 after 01 preprocessing, and that if an operation 02 is computable in linear time on a cellular automaton, then 03 is computable in constant time for 04 after preprocessing. Here arithmetic is controlled by where digits, lookup tables, and block encodings sit in memory, rather than by a rich primitive instruction set (Grandjean et al., 2022).
A plausible implication is that systems-oriented Location-Controlled Arithmetic replaces control flow with spatial dataflow. In both papers, arithmetic is accomplished by mapping dependence graphs onto memory layout: carries onto prefix structures, shifts onto offset addressing or inter-partition motion, and local subproblems onto precomputed addressable tables (Leitersdorf et al., 2022, Grandjean et al., 2022).
6. Support, ordering, and recurring limitations
Not every use of “location” produces monotone arithmetic behavior. In Ordering results between two finite arithmetic mixture models with multiple-outlier location-scale distributed components, location is a parameter of the distribution family,
05
and hence controls support. The proper mixture cdf is piecewise: 06 The paper’s central negative result is that, unlike scale vectors, location vectors generally do not admit usual stochastic comparison under weak majorization alone. Even if
07
cdfs can cross, so neither 08 nor the reverse need hold. The only generally safe route to usual stochastic order from location shifts is the stronger componentwise comparison
09
This is a support-based form of location control whose effect is strong but non-monotone (Bhakta et al., 2024).
Across the broader literature, several recurring limitations sharpen the term’s meaning. The arithmetic cellular automaton is local but not position-programmed: every site uses the same absolute-difference rule (Elnekiti, 2017). The probe-based transformer work provides localized monitoring and selective re-prompting, but does not establish that the decodable subspace is mechanistically responsible for arithmetic (Sun et al., 16 Jul 2025). NALU introduces learned gates over arithmetic modes, yet does not itself define a spatial-location arithmetic architecture (Trask et al., 2018). The Llama-3 intervention results are stronger, but only after a sharp post-routing boundary and only in a narrowly controlled one-token three-digit-addition setting (Yan, 22 Feb 2026). The mixture-model results show that location can obstruct order rather than induce it (Bhakta et al., 2024).
Taken together, these works suggest a useful editorial distinction between locality-controlled arithmetic dynamics and explicitly location-programmed arithmetic semantics. The former includes neighborhood rewriting, late-token answer writing, and memory-layout execution. The latter includes topographic arithmetic, arithmetic surface reciprocity at prescribed loci, and other settings where the location itself determines what arithmetic object exists there or what local invariant is being read off. The term “Location-Controlled Arithmetic” is therefore best treated as a family resemblance concept rather than a single standardized theory: arithmetic becomes legible, executable, or correctable because it is anchored to place.