Continuous Optimization for p-adic Models
Summary
This paper introduces the first method for continuous gradient descent optimization in machine learning models with p-adic parameters, using the Berkovich affine line to enable effective learning on tasks like modular arithmetic.
View Cached Full Text
Cached at: 09/23/26, 09:31 AM
# Continuous Optimization for 𝑝-adic Models
Source: [https://arxiv.org/html/2609.25501](https://arxiv.org/html/2609.25501)
Dimitri KanevskyAffiliation:Google DeepMindEmail:[dkanevsky@google\.com](mailto:)Matt HarveyAffiliation:Google DeepMindEmail:[mattharvey@google\.com](mailto:)Pascal GetreuerAffiliation:Google DeepMindLucas DixonAffiliation:Google DeepMind
###### Abstract
We present the first method for native, continuous gradient descent for machine learning models withpp\-adic parameters\. Existing native optimizers are discrete, mostly combinatorial searches, as thepp\-adic numbersℚp\\mathbb\{Q\}\_\{p\}are totally disconnected, with standard losses that are flat away from their minima\. To enable continuous optimization, we propose working withℚp\\mathbb\{Q\}\_\{p\}via its Berkovich affine line: a canonical, path\-connected expansion ofℚp\\mathbb\{Q\}\_\{p\}that preserves its isometries and uniquely extends its analytic maps\. This hull is a metric tree with interpretable points and local derivatives, which we show enables effective optimizers and backpropagation\. We formulate gradient descent and show that its approximations efficiently learn linear models with coefficients inℚp\\mathbb\{Q\}\_\{p\}to do modular arithmetic, an XOR\-like task not expressible by linear models inℝ\\mathbb\{R\}\. We also demonstrate momentum and Adam variants, linear regression, and classification on binary\-encoded hierarchies \(Quillian semantic networks\), addressing open problems posed by[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33)\.
## 1Introduction
Most machine learning methods assume inputs and parameters in real Euclidean spaceℝn\\mathbb\{R\}^\{n\}\. The field ofpp\-adic numbersℚp\\mathbb\{Q\}\_\{p\}offers another geometry: its distancesd\(x,y\)d\(x,y\)depend on divisibility byppand areultrametric, satisfyingd\(x,z\)≤max\{d\(x,y\),d\(y,z\)\}d\(x,z\)\\leq\\max\\\{d\(x,y\),d\(y,z\)\\\}\([Section2](https://arxiv.org/html/2609.25501#S2)\)\. For example, there is no real linear classifier that separates even numbers from odd ones\. But inℚ2\\mathbb\{Q\}\_\{2\}, evens are closer to each other than to any odd number; thepp\-adic classifiervp\(wx\+b\)≥0v\_\{p\}\(wx\+b\)\\geq 0is perfect atp=2p=2,w=12w=\\frac\{1\}\{2\},b=0b=0\.
Such models may be useful for real\-world data with known ultrametric orpp\-adic structure \(e\.g\.,[Mantegna, 1999](https://arxiv.org/html/2609.25501#bib.bib32);[Dragovich and Dragovich, 2010](https://arxiv.org/html/2609.25501#bib.bib20);[Hua and Hovestadt, 2021](https://arxiv.org/html/2609.25501#bib.bib23)\), for hierarchies where properties correlate with subtrees \([Section6\.2](https://arxiv.org/html/2609.25501#S6.SS2.SSS0.Px2)\), and for approximating number\-theoretic algorithms \(such as[Satoh, 2000](https://arxiv.org/html/2609.25501#bib.bib43)or[Kedlaya, 2001](https://arxiv.org/html/2609.25501#bib.bib25)\)\. While hyperbolic embeddings\([Nickel and Kiela, 2017](https://arxiv.org/html/2609.25501#bib.bib39)\)and ultrametric fitting\([Chierchia and Perret, 2019](https://arxiv.org/html/2609.25501#bib.bib16)\)approximate such geometries, what they learn is real\-valued \(embedding coordinates or edge weights of a graph\); they do not learn models withpp\-adic parameters\. Anisometric embedding—a map preserving all pairwise distances—ofNNdistinct ultrametric points requires at leastN−1N\-1Euclidean dimensions\([Lemin, 1985](https://arxiv.org/html/2609.25501#bib.bib29)\)\.
However, direct optimization is difficult:ℚp\\mathbb\{Q\}\_\{p\}is totally disconnected, and natural losses have vanishing gradients \([Section2](https://arxiv.org/html/2609.25501#S2)\)\. Existing methods use discrete searches\([Khrennikov and Tirozzi, 2000](https://arxiv.org/html/2609.25501#bib.bib26);[Baker and Molla\-Aliod, 2022](https://arxiv.org/html/2609.25501#bib.bib3);[Baker et al\., 2025](https://arxiv.org/html/2609.25501#bib.bib4);[Zubarev, 2025](https://arxiv.org/html/2609.25501#bib.bib51);[Martins, 2025](https://arxiv.org/html/2609.25501#bib.bib33);[Mihara, 2026c](https://arxiv.org/html/2609.25501#bib.bib37)\)or real\-valued optimization\([Zúñiga\-Galindo, 2024](https://arxiv.org/html/2609.25501#bib.bib53);[N’guessan, 2025](https://arxiv.org/html/2609.25501#bib.bib38)\)\. Systematic searches can scale exponentially with dimension or depth; random walks and annealing avoid exhaustive enumeration but do not use gradients to guide their proposals\.
Instead, we exploit the analytic structure of machine learning models: affine maps composed with piecewiseanalytic functions, which admit local Taylor expansions\. Forpp\-adic models, analytic geometry provides a canonical path\-connected enlargement ofℚp\\mathbb\{Q\}\_\{p\}: the Berkovich affine line, to which analytic maps and thepp\-adic norm extend\([Tate, 1971](https://arxiv.org/html/2609.25501#bib.bib46);[Berkovich, 1990](https://arxiv.org/html/2609.25501#bib.bib9)\)\. Using these extensions, we construct continuous losses with informative directional derivatives and demonstrate nativecontinuous optimization of models withpp\-adic parameters for the first time\. Specifically:
- •We construct a canonical path\-connected space forpp\-adic numbers: the tight spanΓp\\Gamma\_\{p\}ofℚp\\mathbb\{Q\}\_\{p\}, which is its convex hull in the Berkovich affine line\. Model parameters live in the product spaceΓpd\\Gamma\_\{p\}^\{d\}\.
- •We develop the first continuous generalpp\-adic optimizers: joint gradient descent, Momentum, and Adam, approximated through grouped coordinate descent \([Section4\.2](https://arxiv.org/html/2609.25501#S4.SS2)\)\.
- •We define informative losses that continuously relaxpp\-adic regression and classification, and efficiently train linear models for modular arithmetic and binary\-encoded semantic hierarchies\.
- •
Our work resolves Open Problem 6\.1 \(linear multi\-class classifiers\) and addresses 6\.2 \(gradient\-based optimization\) of[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33), and opens a path to 6\.3 \(multi\-layer networks\)\.
## 2Background:pp\-adics and Related Work
Afieldis a set where addition, multiplication, and their inverses \(subtraction, division\) are well\-defined \(exceptx/0x/0\) and satisfy the usual arithmetic laws\. Thepp\-adic numbersℚp\\mathbb\{Q\}\_\{p\}form such a field\([Gouvêa, 2020](https://arxiv.org/html/2609.25501#bib.bib22)\)and can be defined as the set of formal series
x:=∑i≥kaipi,k∈ℤ,ai∈\{0,…,p−1\},withak≠0unless allai=0\.x:=\\sum\_\{i\\geq k\}a\_\{i\}p^\{i\},\\quad k\\in\\mathbb\{Z\},\\quad a\_\{i\}\\in\\\{0,\\dotsc,p\-1\\\},\\quad\\text\{with \}a\_\{k\}\\neq 0\\text\{ unless all \}a\_\{i\}=0\.The series with no negative powers ofppform thepp\-adic integersℤp\\mathbb\{Z\}\_\{p\}\. Written asdigits, the series extends infinitelyto the left:…a2a1a0\.a−1…ak\\dotsc a\_\{2\}a\_\{1\}a\_\{0\}\.a\_\{\-1\}\\dotsc a\_\{k\}\. Addition and multiplication are defined by adding and multiplying the series and carrying in basepp\. Subtractionx−yx\-yis the uniquezzsatisfyingy\+z=xy\+z=x; fory≠0y\\neq 0, divisionx/yx/yis the uniquezzsatisfyingyz=xyz=x\. For example,…6667=−1\\dotsc 666\_\{7\}=\-1, since adding11carries forever to give…0007\\dotsc 000\_\{7\}\.
Thevaluationvp\(x\)v\_\{p\}\(x\)iskk, the index of the rightmost nonzero digit, withvp\(0\):=\+∞v\_\{p\}\(0\):=\+\\infty\. Thepp\-adic absolute valueornormis\|x\|p:=p−vp\(x\)\|x\|\_\{p\}:=p^\{\-v\_\{p\}\(x\)\}, with\|0\|p:=0\|0\|\_\{p\}:=0\. For example,1\.25=1⋅20\+0⋅2−1\+1⋅2−21\.25=1\\cdot 2^\{0\}\+0\\cdot 2^\{\-1\}\+1\\cdot 2^\{\-2\}, sov2\(1\.25\)=−2v\_\{2\}\(1\.25\)=\-2and\|1\.25\|2=4\|1\.25\|\_\{2\}=4\. Thepp\-adic distanced\(x,y\)=\|x−y\|pd\(x,y\)=\|x\-y\|\_\{p\}isultrametric, i\.e\., non\-negative, symmetric, zero only whenx=yx=y, and satisfies thestrong triangle inequality:
\|x−z\|p≤max\(\|x−y\|p,\|y−z\|p\),with equality when\|x−y\|p≠\|y−z\|p\.\|x\-z\|\_\{p\}\\leq\\max\(\|x\-y\|\_\{p\},\|y\-z\|\_\{p\}\),\\quad\\text\{with equality when \}\|x\-y\|\_\{p\}\\neq\|y\-z\|\_\{p\}\.\(1\)This discretelyℝ\\mathbb\{R\}\-valued function has unintuitive behavior:d\(0,25\)=125d\(0,25\)=\\frac\{1\}\{25\}butd\(0,25\.1\)=5d\(0,25\.1\)=5\.
ℚp\\mathbb\{Q\}\_\{p\}is not anordered field: no total ordering is compatible with its addition and multiplication\. Unlikepp\-adic analysis, which studies mapsf:ℚpm→ℚpnf:\\mathbb\{Q\}\_\{p\}^\{m\}\\to\\mathbb\{Q\}\_\{p\}^\{n\}, optimization minimizes a loss, requiring values in an ordered field likeℝ\\mathbb\{R\}\.
ℚp\\mathbb\{Q\}\_\{p\}istotally path\-disconnected, i\.e\., allpaths\(continuous functionsγ:\[0,1\]→ℚp\\gamma:\[0,1\]\\to\\mathbb\{Q\}\_\{p\}\) are constant\. Hence functionsL:ℚpd→ℝL:\\mathbb\{Q\}\_\{p\}^\{d\}\\to\\mathbb\{R\}do not support the usual pathwise derivative\. Natural loss functions like absolute errorℓ1\(𝜽\):=\|f\(x,𝜽\)−y\|p\\ell\_\{1\}\(\\boldsymbol\{\\theta\}\):=\|f\(x;\\boldsymbol\{\\theta\}\)\-y\|\_\{p\}are locally constant \(i\.e\., “flat”\) away from their minima, which gives vanishing gradients\([Baker et al\., 2025](https://arxiv.org/html/2609.25501#bib.bib4);[Zubarev, 2025](https://arxiv.org/html/2609.25501#bib.bib51)\)\. Indeed, two predictions closer to each other than to the target have the same loss: if\|f\(x,𝜽\)−f\(x,𝜽′\)\|p<\|f\(x,𝜽\)−y\|p\|f\(x;\\boldsymbol\{\\theta\}\)\-f\(x;\\boldsymbol\{\\theta\}^\{\\prime\}\)\|\_\{p\}<\|f\(x;\\boldsymbol\{\\theta\}\)\-y\|\_\{p\}, then[eq\.1](https://arxiv.org/html/2609.25501#S2.E1)forcesℓ1\(𝜽′\)=ℓ1\(𝜽\)\\ell\_\{1\}\(\\boldsymbol\{\\theta\}^\{\\prime\}\)=\\ell\_\{1\}\(\\boldsymbol\{\\theta\}\)\. Absolute error is thus locally constant at parameters that are not exact fits\.
See[Figure1\(a\)](https://arxiv.org/html/2609.25501#S2.F1.sf1)for a depiction ofℚ3\\mathbb\{Q\}\_\{3\}\.
00272799112828222929\(a\)ℚ3\\mathbb\{Q\}\_\{3\}: disconnected; clusters are near w\.r\.t\.dpd\_\{p\}Vertices\(r∈pℤr\\in p^\{\\mathbb\{Z\}\}\)Edges\(r∉pℤr\\not\\in p^\{\\mathbb\{Z\}\}\)Leaves∈ℚ3\\in\\mathbb\{Q\}\_\{3\}\(r=0r=0\)ζ0,1\\zeta\_\{0,1\}ζ0,1/9\\zeta\_\{0,1/9\}ζ0,1/27\\zeta\_\{0,1/27\}00272799ζ1,1/27\\zeta\_\{1,1/27\}112828\(b\)Γ3\\Gamma\_\{3\}: thepp\-adic convex hull containingℚ3\\mathbb\{Q\}\_\{3\}
Figure 1:The33\-adics are disconnected \(left\), but path\-connected in thepp\-adic hull within the Berkovich affine line \(right\)\. Not shown are the infinite set of verticesζx,p−v\\zeta\_\{x,p^\{\-v\}\}from a leaf to e\.g\.ζ0,1\\zeta\_\{0,1\}\.#### Priorpp\-adic learning\.
Earlypp\-adic neural networks set weights digit by digit for a single example\([Albeverio et al\., 1999](https://arxiv.org/html/2609.25501#bib.bib1)\)or by random search over finite digit prefixes\([Khrennikov and Tirozzi, 2000](https://arxiv.org/html/2609.25501#bib.bib26)\)\.[Bradley \(2009\)](https://arxiv.org/html/2609.25501#bib.bib13)clusterspp\-adic data under a sum\-of\-norms loss, choosing each cluster center by descending into the most populated branch\. Recentpp\-adic optimizers still choose discrete moves: searching finite digit prefixes\([Martins, 2025](https://arxiv.org/html/2609.25501#bib.bib33)\), modifying coefficient residues\([Mihara, 2026c](https://arxiv.org/html/2609.25501#bib.bib37);[Mihara, 2026b](https://arxiv.org/html/2609.25501#bib.bib36)\), or drawing loss\-weighted random increments\([Zubarev, 2025](https://arxiv.org/html/2609.25501#bib.bib51)\)\.Mihara’s character\-network formulation likewise reduces training to polynomial feasibility over finite rings\([Mihara, 2026a](https://arxiv.org/html/2609.25501#bib.bib35)\)\. Other approaches obtain updates through real\-valued optimization: backpropagation in networks organized by non\-Archimedean trees\([Zúñiga\-Galindo, 2024](https://arxiv.org/html/2609.25501#bib.bib53)\), or perturbed or rounded real optimizer steps\([N’guessan, 2025](https://arxiv.org/html/2609.25501#bib.bib38)\)\.[AppendixB](https://arxiv.org/html/2609.25501#A2)describes the recent methods and compares costs in more detail\. In contrast, we operate in an intrinsically defined spaceΓp\\Gamma\_\{p\}\(the tight span ofℚp\\mathbb\{Q\}\_\{p\},[Section3](https://arxiv.org/html/2609.25501#S3)\) and show how to differentiate task losses with respect to its product space in[Section4](https://arxiv.org/html/2609.25501#S4)\.
#### Learning on hierarchies and trees\.
Related approaches include hyperbolic embeddings of hierarchies\([Nickel and Kiela, 2017](https://arxiv.org/html/2609.25501#bib.bib39);[Chami et al\., 2020](https://arxiv.org/html/2609.25501#bib.bib15)\)and ultrametric fitting through real edge weights\([Chierchia and Perret, 2019](https://arxiv.org/html/2609.25501#bib.bib16);[Yu et al\., 2025](https://arxiv.org/html/2609.25501#bib.bib48)\)\. Tropical geometry describes ReLU networks\([Zhang et al\., 2018](https://arxiv.org/html/2609.25501#bib.bib49)\)and admits steepest descent in the tropical norm\([Talbut and Monod, 2025](https://arxiv.org/html/2609.25501#bib.bib45)\);[Section3\.2](https://arxiv.org/html/2609.25501#S3.SS2)relates both to our radius propagation\. Metric gradient flows and minimizing movements\([Mayer, 1998](https://arxiv.org/html/2609.25501#bib.bib34);[Ambrosio et al\., 2008](https://arxiv.org/html/2609.25501#bib.bib2);[Jordan et al\., 1998](https://arxiv.org/html/2609.25501#bib.bib24)\), and subgradient methods on nonpositively curved spaces\([Goodwin et al\., 2026](https://arxiv.org/html/2609.25501#bib.bib21)\)have been used to optimize on tree\-like spaces likeΓp\\Gamma\_\{p\}; we discuss these and alternative descent rules in[Section4\.1](https://arxiv.org/html/2609.25501#S4.SS1)\.
## 3Analytic Maps on thepp\-adic HullΓp\\Gamma\_\{p\}
A real parameter can move continuously because any two real values are joined by an interval\. The fieldℚp\\mathbb\{Q\}\_\{p\}has no such paths \([Figure1\(a\)](https://arxiv.org/html/2609.25501#S2.F1.sf1)\)\. Hence, we work in the Berkovich affine line𝔸ℚp1,an\\mathbb\{A\}\_\{\\mathbb\{Q\}\_\{p\}\}^\{1,\\mathrm\{an\}\}: a canonical, path\-connected enlargement ofℚp\\mathbb\{Q\}\_\{p\}that gives generalized points over which analytic maps extend uniquely \(where convergent\) and remain compositional\. Appendix[C](https://arxiv.org/html/2609.25501#A3)describes its formal construction as a space of multiplicative seminorms, due to[Berkovich \(1990\)](https://arxiv.org/html/2609.25501#bib.bib9)\. Specifically, within𝔸ℚp1,an\\mathbb\{A\}\_\{\\mathbb\{Q\}\_\{p\}\}^\{1,\\mathrm\{an\}\}we define thepp\-adic hullΓp\\Gamma\_\{p\}and show it is the natural connected space for parameters inℚp\\mathbb\{Q\}\_\{p\}\.
### 3\.1Parameter Space
Geometrically, the Berkovich affine “line” is an infinite tree, which means every pair of valuesζ,ζ′∈𝔸ℚp1,an\\zeta,\\zeta^\{\\prime\}\\in\\mathbb\{A\}\_\{\\mathbb\{Q\}\_\{p\}\}^\{1,\\mathrm\{an\}\}is joined by a unique arc we denote\[ζ,ζ′\]\[\\zeta,\\zeta^\{\\prime\}\]\. For optimization, we restrict individual parameters to the convex hull ofℚp\\mathbb\{Q\}\_\{p\}within this tree\. For the canonical embeddingι:ℚp↪𝔸ℚp1,an\\iota:\\mathbb\{Q\}\_\{p\}\\hookrightarrow\\mathbb\{A\}\_\{\\mathbb\{Q\}\_\{p\}\}^\{1,\\mathrm\{an\}\}, this isΓp=⋃x,y∈ℚp\[ι\(x\),ι\(y\)\]\\Gamma\_\{p\}=\\bigcup\_\{x,y\\in\\mathbb\{Q\}\_\{p\}\}\[\\iota\(x\),\\iota\(y\)\]as a metric space; its infinite subtree is visualized in[Figure1\(b\)](https://arxiv.org/html/2609.25501#S2.F1.sf2)\.
#### Points onΓp\\Gamma\_\{p\}\.
As we establish in[PropositionC\.3](https://arxiv.org/html/2609.25501#A3.Thmtheorem3), we can writeΓp\\Gamma\_\{p\}’s elements asζx,r\\zeta\_\{x,r\}, indexed by pairs ofpp\-adic and non\-negative real numbers wheretwo tuples represent the same point iff they have the sameradiusrrand theirpp\-adic indexxxare within this distance:
Γp≅\(ℚp×ℝ≥0\)/\(ζx,r=ζx′,r′⇔r=r′and\|x−x′\|p≤r\)\.\\Gamma\_\{p\}\\cong\(\\mathbb\{Q\}\_\{p\}\\times\\mathbb\{R\}\_\{\\geq 0\}\)\\ /\\left\(\\zeta\_\{x,r\}=\\zeta\_\{x^\{\\prime\},r^\{\\prime\}\}\\iff r=r^\{\\prime\}\\ \\text\{ and \}\\ \|x\-x^\{\\prime\}\|\_\{p\}\\leq r\\right\)\.\(2\)The points inΓp\\Gamma\_\{p\}corresponding toℚp\\mathbb\{Q\}\_\{p\}proper are those with zero radius \(ζx,0\\zeta\_\{x,0\}\)\. The radius is the continuous variableℚp\\mathbb\{Q\}\_\{p\}lacks; a loss that is flat onxx\([Section2](https://arxiv.org/html/2609.25501#S2)\) can now vary continuously overrr\.
#### Arcs\.
The unique arc\[ζx,0,ζy,0\]⊂Γp\[\\zeta\_\{x,0\},\\zeta\_\{y,0\}\]\\subset\\Gamma\_\{p\}that connects the hull representatives ofx,y∈ℚpx,y\\in\\mathbb\{Q\}\_\{p\}is
ζx,0⟶radius increases⟶ζx,\|x−y\|p=ζy,\|x−y\|p⟶radius decreases⟶ζy,0\.\\zeta\_\{x,0\}\\longrightarrow\\text\{radius increases\}\\longrightarrow\\zeta\_\{x,\|x\-y\|\_\{p\}\}=\\zeta\_\{y,\|x\-y\|\_\{p\}\}\\longrightarrow\\text\{radius decreases\}\\longrightarrow\\zeta\_\{y,0\}\.\(3\)Fromζx,0\\zeta\_\{x,0\}, the radius increases while keepingxxfixed untilr=\|x−y\|pr=\|x\-y\|\_\{p\}, the smallest radius at whichxxandyyrepresent the same point via the equivalence in[eq\.2](https://arxiv.org/html/2609.25501#S3.E2)\. This point is theirleast common ancestor\(LCA\)\. Decreasing radius withyyfixed arrives atζy,0\\zeta\_\{y,0\}Although radii vary continuously, paths rising from distinctpp\-adic numbers must meet only at radii inpℤp^\{\\mathbb\{Z\}\}, because these are the possible nonzero distances output by\|x−y\|p\|x\-y\|\_\{p\}\([Section2](https://arxiv.org/html/2609.25501#S2)\)\. These imply an infinite tree \([Figure1\(b\)](https://arxiv.org/html/2609.25501#S2.F1.sf2)\):
- •leaves, orordinary points, correspond tor=0r=0, the ordinarypp\-adic numbers inℚp\\mathbb\{Q\}\_\{p\};
- •open edgescorrespond tor\>0r\>0,r∉pℤr\\not\\in p^\{\\mathbb\{Z\}\}\(i\.e\., the radius is notppto an integer exponent\);
- •inner verticescorrespond tor∈pℤr\\in p^\{\\mathbb\{Z\}\}\. It hasp\+1p\+1outgoing edges: one where the radius increases \(movingupthe tree\), andppwhere the radius decreasesdowntowards theℚp\\mathbb\{Q\}\_\{p\}points\.
Choosing one of theppdownward edges at an inner vertex commits to an additionalpp\-adic digit\. Forp=3p=3, three numbers sharing the two rightmost digits meet at radius3−23^\{\-2\}:
5=…0𝟎123,14=…0𝟏123,23=…0𝟐123,ζ5,3−2=ζ14,3−2=ζ23,3−2\.5=\\ldots 0\\mathbf\{0\}12\_\{3\},\\quad 14=\\ldots 0\\mathbf\{1\}12\_\{3\},\\quad 23=\\ldots 0\\mathbf\{2\}12\_\{3\},\\quad\\zeta\_\{5,3^\{\-2\}\}=\\zeta\_\{14,3^\{\-2\}\}=\\zeta\_\{23,3^\{\-2\}\}\.\(4\)Below this radius, their paths separate according to the next digit00,11, or22\. The upward edge reachesr=3−1r=3^\{\-1\}, where only the rightmost digit22remains fixed\.
#### Distances\.
Letζx,R=ζy,R\\zeta\_\{x,R\}=\\zeta\_\{y,R\}be the LCA ofζx,r,ζy,s∈Γp\\zeta\_\{x,r\},\\zeta\_\{y,s\}\\in\\Gamma\_\{p\}\. Its radiusRRequals\|x−y\|p\|x\-y\|\_\{p\}if they are on divergent branches of the tree \([eq\.3](https://arxiv.org/html/2609.25501#S3.E3)\), else one is above the other andRRequalsmax\(r,s\)\\max\(r,s\)\(the Hsia kernel;[Baker and Rumely, 2010](https://arxiv.org/html/2609.25501#bib.bib6)\)\. Therefore, thearc lengthof\[ζx,r,ζy,s\]\[\\zeta\_\{x,r\},\\zeta\_\{y,s\}\]is
darc\(ζx,r,ζy,s\)=\(R−r\)\+\(R−s\)=2max\(\|x−y\|p,r,s\)−r−s\.d\_\{\\text\{arc\}\}\(\\zeta\_\{x,r\},\\zeta\_\{y,s\}\)=\(R\-r\)\+\(R\-s\)=2\\max\(\|x\-y\|\_\{p\},r,s\)\-r\-s\.\(5\)By construction, the metricdarcd\_\{\\text\{arc\}\}onΓp\\Gamma\_\{p\}makes arcs\[ζx,r,ζy,s\]\[\\zeta\_\{x,r\},\\zeta\_\{y,s\}\]thegeodesicsofΓp\\Gamma\_\{p\}\. Restricted to ordinary pointsζx,0,ζy,0\\zeta\_\{x,0\},\\zeta\_\{y,0\}—those coming fromx,y∈ℚpx,y\\in\\mathbb\{Q\}\_\{p\}—this simplifies to2\|x−y\|p2\|x\-y\|\_\{p\}\. Hence,\(ℚp,\|⋅\|p\)↪\(Γp,12darc\)\(\\mathbb\{Q\}\_\{p\},\|\\cdot\|\_\{p\}\)\\hookrightarrow\(\\Gamma\_\{p\},\\frac\{1\}\{2\}d\_\{\\text\{arc\}\}\)is an isometric embedding of metric spaces\. In fact\(Γp,12darc\)\(\\Gamma\_\{p\},\\frac\{1\}\{2\}d\_\{\\text\{arc\}\}\)is, up to isometry, thetight span\(also called the injective or metric envelope\) of\(ℚp,\|⋅\|p\)\(\\mathbb\{Q\}\_\{p\},\|\\cdot\|\_\{p\}\), i\.e\., it is the “smallest” hyperconvex metric space containing\(ℚp,\|⋅\|p\)\(\\mathbb\{Q\}\_\{p\},\|\\cdot\|\_\{p\}\), making it a canonical choice forpp\-adic optimization\. To our knowledge this identification is new; we state and prove it in[TheoremC\.6](https://arxiv.org/html/2609.25501#A3.Thmtheorem6)\.
#### Multiple parameters\.
Our aggregate parameter space is the Cartesian productΓpd\\Gamma\_\{p\}^\{d\}withparameter states𝜽:=\(θ1,…,θd\)\\boldsymbol\{\\theta\}:=\(\\theta\_\{1\},\\dotsc,\\theta\_\{d\}\)\. The induced \(ℓ2\\ell\_\{2\}\) product metric over its components is therefore:
d2\(𝜽,𝜽′\):=∑i=1ddarc\(θi,θi′\)2\.d\_\{2\}\(\\boldsymbol\{\\theta\},\\boldsymbol\{\\theta\}^\{\\prime\}\):=\\sqrt\{\\sum\_\{i=1\}^\{d\}d\_\{\\text\{arc\}\}\(\\theta\_\{i\},\\theta\_\{i\}^\{\\prime\}\)^\{2\}\}\.\(6\)We take the defaultℓ2\\ell\_\{2\}so that on products of open edges, steepest descent is the usual negative\-gradient update in arc\-length coordinates\([Boyd and Vandenberghe, 2004](https://arxiv.org/html/2609.25501#bib.bib12)\), and it is understood how to maintain separate adaptive scales\([Bécigneul and Ganea, 2019](https://arxiv.org/html/2609.25501#bib.bib8)\)\. The productΓpd\\Gamma\_\{p\}^\{d\}contains all classical parameter values but omits mixed seminorms of the full Berkovich affine space, which may offer additional descent directions \([DefinitionC\.4](https://arxiv.org/html/2609.25501#A3.Thmtheorem4)\); whether they improve optimization remains open\.
### 3\.2Forward Propagation
We want to optimize parametric models𝒚^:=f\(𝒙,𝜽\)\\hat\{\\boldsymbol\{y\}\}:=f\(\\boldsymbol\{x\};\\boldsymbol\{\\theta\}\)with𝒙∈ℚpm\\boldsymbol\{x\}\\in\\mathbb\{Q\}\_\{p\}^\{m\},𝜽∈ℚpd\\boldsymbol\{\\theta\}\\in\\mathbb\{Q\}\_\{p\}^\{d\}, and𝒚^∈ℚpn\\hat\{\\boldsymbol\{y\}\}\\in\\mathbb\{Q\}\_\{p\}^\{n\}\. Fix an input𝒙\\boldsymbol\{x\}and writeF:=f\(𝒙,−\)F:=f\(\\boldsymbol\{x\};\-\), decomposed intostagesF=FK∘⋯∘F1F=F\_\{K\}\\circ\\cdots\\circ F\_\{1\}by the structure of the model, withFk:ℚpdk−1→ℚpdkF\_\{k\}:\\mathbb\{Q\}\_\{p\}^\{d\_\{k\-1\}\}\\to\\mathbb\{Q\}\_\{p\}^\{d\_\{k\}\}, whered0=dd\_\{0\}=danddK=nd\_\{K\}=n\. In this notation, a stage “uses up” some parameters and propagates intermediate outputs and the remaining parameters; at the end, only final outputs are left\. If eachFkF\_\{k\}is analytic—given locally by convergent Taylor expansions—then it has a unique analytification \([PropositionD\.3](https://arxiv.org/html/2609.25501#A4.Thmtheorem3)\), which induces a unique function we writeF~k:Γpdk−1→Γpdk\\tilde\{F\}\_\{k\}:\\Gamma\_\{p\}^\{d\_\{k\-1\}\}\\to\\Gamma\_\{p\}^\{d\_\{k\}\}that extendsFkF\_\{k\}and has the same Taylor series \([eq\.16](https://arxiv.org/html/2609.25501#A4.E16)\)\. Hence the stage\-by\-stage compositeF~K∘⋯∘F~1\\tilde\{F\}\_\{K\}\\circ\\cdots\\circ\\tilde\{F\}\_\{1\}also extendsFF, though it does not equalF~\\tilde\{F\}in general\. For𝒄∈ℚpdk−1\\boldsymbol\{c\}\\in\\mathbb\{Q\}\_\{p\}^\{d\_\{k\-1\}\}and𝒓∈ℝ≥0dk−1\\boldsymbol\{r\}\\in\\mathbb\{R\}\_\{\\geq 0\}^\{d\_\{k\-1\}\}, write𝜻𝒄,𝒓:=\(ζc1,r1,…,ζcdk−1,rdk−1\)∈Γpdk−1\\boldsymbol\{\\zeta\}\_\{\\boldsymbol\{c\},\\boldsymbol\{r\}\}:=\(\\zeta\_\{c\_\{1\},r\_\{1\}\},\\dotsc,\\zeta\_\{c\_\{d\_\{k\-1\}\},r\_\{d\_\{k\-1\}\}\}\)\\in\\Gamma\_\{p\}^\{d\_\{k\-1\}\}\. WriteFkF\_\{k\}as its coordinate functions\(Fk,1,…,Fk,dk\)\(F\_\{k,1\},\\dotsc,F\_\{k,d\_\{k\}\}\)\. Leta𝑰a\_\{\\boldsymbol\{I\}\}be the coefficient of∏j\(zj−cj\)Ij\\prod\_\{j\}\(z\_\{j\}\-c\_\{j\}\)^\{I\_\{j\}\}in the Taylor expansion ofFk,iF\_\{k,i\}at𝒄\\boldsymbol\{c\}, where𝑰=\(I1,…,Idk−1\)\\boldsymbol\{I\}=\(I\_\{1\},\\dotsc,I\_\{d\_\{k\-1\}\}\)lists nonnegative integer exponents and\|𝑰\|:=∑jIj\|\\boldsymbol\{I\}\|:=\\sum\_\{j\}I\_\{j\}\([eq\.16](https://arxiv.org/html/2609.25501#A4.E16)\)\. ThenF~k\(𝜻𝒄,𝒓\):=𝜻𝒄^,𝒓^∈Γpdk\\tilde\{F\}\_\{k\}\(\\boldsymbol\{\\zeta\}\_\{\\boldsymbol\{c\},\\boldsymbol\{r\}\}\):=\\boldsymbol\{\\zeta\}\_\{\\hat\{\\boldsymbol\{c\}\},\\hat\{\\boldsymbol\{r\}\}\}\\in\\Gamma\_\{p\}^\{d\_\{k\}\}, where𝒄^:=Fk\(𝒄\)\\hat\{\\boldsymbol\{c\}\}:=F\_\{k\}\(\\boldsymbol\{c\}\), and fori=1,…,dki=1,\\dotsc,d\_\{k\}:
r^i:=max\|𝑰\|≥1\|a𝑰\|p∏j=1dk−1rjIj,𝒜i:=argmax\|𝑰\|≥1\|a𝑰\|p∏j=1dk−1rjIj\.\\hat\{r\}\_\{i\}:=\\max\_\{\|\\boldsymbol\{I\}\|\\geq 1\}\|a\_\{\\boldsymbol\{I\}\}\|\_\{p\}\\prod\_\{j=1\}^\{d\_\{k\-1\}\}r\_\{j\}^\{\\,I\_\{j\}\},\\qquad\\mathcal\{A\}\_\{i\}:=\\argmax\_\{\|\\boldsymbol\{I\}\|\\geq 1\}\|a\_\{\\boldsymbol\{I\}\}\|\_\{p\}\\prod\_\{j=1\}^\{d\_\{k\-1\}\}r\_\{j\}^\{\\,I\_\{j\}\}\.\(7\)Hence the output radius is a maximum over coefficients scaled by input radius\. The multi\-indices \(equivalently, monomials\)𝒜i\\mathcal\{A\}\_\{i\}that attain this max are theactive termsat theii\-th output of input𝜻𝒄,𝒓\\boldsymbol\{\\zeta\}\_\{\\boldsymbol\{c\},\\boldsymbol\{r\}\}\. For example, ifp=2p=2andF\(θ1,θ2\)F\(\\theta\_\{1\},\\theta\_\{2\}\)expanded at\(0,0\)\(0,0\)is1\+θ1−12θ221\+\\theta\_\{1\}\-\\frac\{1\}\{2\}\\theta\_\{2\}^\{2\}, then the cases are
F~\(ζ0,r1,ζ0,r2\)=ζ1,r^=ζ1,max\(r1,2r22\),r^=r1\>2r22:𝒜=\{\(1,0\)\}=\{θ1\},r^=2r22\>r1:𝒜=\{\(0,2\)\}=\{θ22\},r^=r1=2r22:𝒜=\{\(1,0\),\(0,2\)\}=\{θ1,θ22\}\.\\tilde\{F\}\(\\zeta\_\{0,r\_\{1\}\},\\zeta\_\{0,r\_\{2\}\}\)=\\zeta\_\{1,\\hat\{r\}\}=\\zeta\_\{1,\\max\(r\_\{1\},2r\_\{2\}^\{2\}\)\},\\quad\\begin\{array\}\[\]\{@\{\}ll@\{\}\}\\hat\{r\}=r\_\{1\}\>2r\_\{2\}^\{2\}:&\\mathcal\{A\}=\\\{\(1,0\)\\\}=\\\{\\theta\_\{1\}\\\},\\\\\[1\.0pt\] \\hat\{r\}=2r\_\{2\}^\{2\}\>r\_\{1\}:&\\mathcal\{A\}=\\\{\(0,2\)\\\}=\\\{\\theta\_\{2\}^\{2\}\\\},\\\\\[1\.0pt\] \\hat\{r\}=r\_\{1\}=2r\_\{2\}^\{2\}:&\\mathcal\{A\}=\\\{\(1,0\),\(0,2\)\\\}=\\\{\\theta\_\{1\},\\theta\_\{2\}^\{2\}\\\}\.\\\\ \\end\{array\}\(8\)The output𝜻𝒄^,𝒓^\\boldsymbol\{\\zeta\}\_\{\\hat\{\\boldsymbol\{c\}\},\\hat\{\\boldsymbol\{r\}\}\}is well\-defined independent of the input representative𝒄\\boldsymbol\{c\}, and the expression forr^i\\hat\{r\}\_\{i\}comes from the Gauss seminorm ofFk,i−Fk,i\(𝒄\)F\_\{k,i\}\-F\_\{k,i\}\(\\boldsymbol\{c\}\), proved in[CorollaryD\.4](https://arxiv.org/html/2609.25501#A4.Thmtheorem4)\. For convergent analytic maps,𝒜i\\mathcal\{A\}\_\{i\}is finite wheneverr^i\>0\\hat\{r\}\_\{i\}\>0\.
Evaluation of[eq\.7](https://arxiv.org/html/2609.25501#S3.E7)can proceed stage by stage and is exact from𝒄→𝒄^\\boldsymbol\{c\}\\to\\hat\{\\boldsymbol\{c\}\}\. As Berkovich points however, this propagation throughΓpd0,Γpd1,…\\Gamma\_\{p\}^\{d\_\{0\}\},\\Gamma\_\{p\}^\{d\_\{1\}\},\\dotsccan be lossy if a parameter reaches a stage along two paths; then, the composed𝒓^\\hat\{\\boldsymbol\{r\}\}is only an upper bound \([ExampleC\.5](https://arxiv.org/html/2609.25501#A3.Thmtheorem5)\)—u−uu\-ushould propagate as radius zero, but as independent stage inputs it does not\. This is thedependency problemof interval arithmetic\([Dawood and Megahed, 2023](https://arxiv.org/html/2609.25501#bib.bib19)\)\. Given the computedpp\-adic coefficientsa𝑰a\_\{\\boldsymbol\{I\}\}, taking logarithms in[eq\.7](https://arxiv.org/html/2609.25501#S3.E7)gives a tropical max\-plus operation on log\-radii\. Propagation through this operation is classical: ReLU networks are tropical rational maps\([Zhang et al\., 2018](https://arxiv.org/html/2609.25501#bib.bib49)\), whose backward pass follows the attaining terms as Viterbi backtracking does\([Viterbi, 1967](https://arxiv.org/html/2609.25501#bib.bib47)\), and[Talbut and Monod \(2025\)](https://arxiv.org/html/2609.25501#bib.bib45)minimize tropical location problems overℝ\\mathbb\{R\}by steepest descent in the tropical norm\.
Merging stages can tighten the radius bound, at the cost of expanding larger analytic expressions\. Finally, a per\-example lossℓ\(y^,y\)\\ell\(\\hat\{y\},y\)comparing an outputy^∈ℚpdK\\hat\{y\}\\in\\mathbb\{Q\}\_\{p\}^\{d\_\{K\}\}with its targetyymust also be extended\. The scalar distanceℓ\(y^,y\)=\|y^−y\|p\\ell\(\\hat\{y\},y\)=\|\\hat\{y\}\-y\|\_\{p\}has a canonical extension12darc\\frac\{1\}\{2\}d\_\{\\text\{arc\}\}onΓp\\Gamma\_\{p\}\([eq\.5](https://arxiv.org/html/2609.25501#S3.E5);[TheoremC\.6](https://arxiv.org/html/2609.25501#A3.Thmtheorem6)\)\. Substitutingζy^,r^\\zeta\_\{\\hat\{y\},\\hat\{r\}\}for the prediction andζy,0\\zeta\_\{y,0\}for the reference gives what we call thedirect loss
ℓd\(ζy^,r^,y\):=12darc\(ζy^,r^,ζy,0\)=max\(\|y^−y\|p,r^\)−r^2,\\ell\_\{d\}\(\\zeta\_\{\\hat\{y\},\\hat\{r\}\},y\):=\\frac\{1\}\{2\}d\_\{\\text\{arc\}\}\(\\zeta\_\{\\hat\{y\},\\hat\{r\}\},\\zeta\_\{y,0\}\)=\\max\(\|\\hat\{y\}\-y\|\_\{p\},\\hat\{r\}\)\-\\frac\{\\hat\{r\}\}\{2\},\(9\)a canonical continuous relaxation whose−r^/2\-\\hat\{r\}/2term makes it fall as the radius grows even while the maximum is constant \([Figure2](https://arxiv.org/html/2609.25501#S4.F2)\)\.
## 4Continuous Optimization
### 4\.1Gradient Descent
Continuous gradient descent in a metric space involves proceeding down the steepest descent direction in the metric tangent coneT𝜽ΓpdT\_\{\\boldsymbol\{\\theta\}\}\\Gamma\_\{p\}^\{d\}at a parameter state𝜽∈Γpd\\boldsymbol\{\\theta\}\\in\\Gamma\_\{p\}^\{d\}for a real\-valued duration\. This cone consists of velocities𝒗:=\(𝒒,𝒔\)\\boldsymbol\{v\}:=\(\\boldsymbol\{q\},\\boldsymbol\{s\}\), with per\-coordinatedirectionsqi∈ΣθiΓpq\_\{i\}\\in\\Sigma\_\{\\theta\_\{i\}\}\\Gamma\_\{p\}and speedssi∈ℝ≥0s\_\{i\}\\in\\mathbb\{R\}\_\{\\geq 0\}\. The available directionsΣθiΓp\\Sigma\_\{\\theta\_\{i\}\}\\Gamma\_\{p\}atθi\\theta\_\{i\}areup\+\+,down−\-\(on open edges\), anddown via0,…,p−10,\\dotsc,p\-1\(at inner vertices\)\. An available directionqiq\_\{i\}atθi=ζc,r\\theta\_\{i\}=\\zeta\_\{c,r\}has a unit\-speed pathγi,qi:\[0,δi\]→Γp\\gamma\_\{i,q\_\{i\}\}:\[0,\\delta\_\{i\}\]\\to\\Gamma\_\{p\}:
γi,\+\(h\):=ζc,r\+h,γi,−\(h\):=ζc,r−h,γi,ρ\(h\):=ζc\+ρpn,r−hforρ∈\{0,…,p−1\},\\displaystyle\\gamma\_\{i,\+\}\(h\):=\\zeta\_\{c,r\+h\},\\quad\\gamma\_\{i,\-\}\(h\):=\\zeta\_\{c,r\-h\},\\quad\\gamma\_\{i,\\rho\}\(h\):=\\zeta\_\{c\+\\rho p^\{n\},\\,r\-h\}\\text\{ for \}\\rho\\in\\\{0,\\dotsc,p\-1\\\},\(10\)whereδi\\delta\_\{i\}is the earliesthhfrom which a unique geodesic is no longer determined, i\.e\., the next vertex: from an inner vertex,δi=r\(p−1\)\\delta\_\{i\}=r\(p\-1\)forγi,\+\\gamma\_\{i,\+\}andδi=r\(1−1/p\)\\delta\_\{i\}=r\(1\-1/p\)for eachγi,ρ\\gamma\_\{i,\\rho\}\. Theppdownward paths at inner vertices represent commitment to the digitan=ρa\_\{n\}=\\rho\([eq\.4](https://arxiv.org/html/2609.25501#S3.E4)\), wherer=p−nr=p^\{\-n\}andccis taken withan=0a\_\{n\}=0; a more formal treatment is in[DefinitionC\.7](https://arxiv.org/html/2609.25501#A3.Thmtheorem7)\.
Altogether, we can define a path𝜸𝒗\(h\):=\(γ1,q1\(s1h\),…,γd,qd\(sdh\)\)\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\}\(h\):=\(\\gamma\_\{1,q\_\{1\}\}\(s\_\{1\}h\),\\dotsc,\\gamma\_\{d,q\_\{d\}\}\(s\_\{d\}h\)\)which starts at𝜸𝒗\(0\)=𝜽\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\}\(0\)=\\boldsymbol\{\\theta\}\. Under our product metric \([eq\.6](https://arxiv.org/html/2609.25501#S3.E6)\), this path is unit\-speed when‖𝒗‖2:=∑si2=1\\\|\\boldsymbol\{v\}\\\|\_\{2\}:=\\sqrt\{\\sum s\_\{i\}^\{2\}\}=1\. Theone\-sided directional derivativeofL:Γpd→ℝL:\\Gamma\_\{p\}^\{d\}\\to\\mathbb\{R\}with respect to a velocity𝒗∈T𝜽Γpd\\boldsymbol\{v\}\\in T\_\{\\boldsymbol\{\\theta\}\}\\Gamma\_\{p\}^\{d\}is
D𝒗L\(𝜽\):=limh↓0L\(𝜸𝒗\(h\)\)−L\(𝜽\)h\.D\_\{\\boldsymbol\{v\}\}L\(\\boldsymbol\{\\theta\}\):=\\lim\_\{h\\downarrow 0\}\\frac\{L\(\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\}\(h\)\)\-L\(\\boldsymbol\{\\theta\}\)\}\{h\}\.\(11\)Write𝒆qi\\boldsymbol\{e\}\_\{q\_\{i\}\}for the unit velocity withsi=1s\_\{i\}=1andsj=0s\_\{j\}=0forj≠ij\\neq i; onlyθi\\theta\_\{i\}moves, and we callD𝒆qiLD\_\{\\boldsymbol\{e\}\_\{q\_\{i\}\}\}LtheslopeofLLatθi\\theta\_\{i\}in the directionqiq\_\{i\}\. To find the steepest joint direction, we take a unit velocity that minimizes this derivative, then take a step of that size times alearning rateαt\>0\\alpha\_\{t\}\>0:
𝒗∗∈argmin‖𝒗‖2=1D𝒗L\(𝜽t\),𝜽t\+1:=𝜸𝒗∗\(−αtD𝒗∗L\(𝜽t\)\)\.\\boldsymbol\{v\}^\{\*\}\\in\\text\{argmin\}\_\{\\\|\\boldsymbol\{v\}\\\|\_\{2\}=1\}D\_\{\\boldsymbol\{v\}\}L\(\\boldsymbol\{\\theta\}\_\{t\}\),\\qquad\\boldsymbol\{\\theta\}\_\{t\+1\}:=\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}^\{\*\}\}\\bigl\(\-\\alpha\_\{t\}D\_\{\\boldsymbol\{v\}^\{\*\}\}L\(\\boldsymbol\{\\theta\}\_\{t\}\)\\bigr\)\.\(12\)This is the metric space analogue of a Euclidean gradient update𝜽t\+1=𝜽t−αt∇L\(𝜽t\)\\boldsymbol\{\\theta\}\_\{t\+1\}=\\boldsymbol\{\\theta\}\_\{t\}\-\\alpha\_\{t\}\\nabla L\(\\boldsymbol\{\\theta\}\_\{t\}\)\.[Figure2](https://arxiv.org/html/2609.25501#S4.F2)follows one parameter through such updates\. We cap the step when the first coordinate reaches a vertex, where the tangent cone changes and slopes must be recomputed\. Thisvertex clippingextends𝜸𝒗∗\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}^\{\*\}\}constantly outside its domain\[0,mini:si\>0δi/si\]\[0,\\min\_\{i:s\_\{i\}\>0\}\\delta\_\{i\}/s\_\{i\}\]\([eq\.10](https://arxiv.org/html/2609.25501#S4.E10)\)\. When all directional derivatives are nonnegative,[eq\.12](https://arxiv.org/html/2609.25501#S4.E12)therefore gives𝜽t\+1=𝜽t\\boldsymbol\{\\theta\}\_\{t\+1\}=\\boldsymbol\{\\theta\}\_\{t\}\.
rr003−33^\{\-3\}2⋅3−32\\cdot 3^\{\-3\}3−23^\{\-2\}55…0𝟎123\\ldots 0\\mathbf\{0\}12\_\{3\}1414…0𝟏123\\ldots 0\\mathbf\{1\}12\_\{3\}y=23y=23…0𝟐123\\ldots 0\\mathbf\{2\}12\_\{3\}LCA of5,14,235,14,23digits…𝟏𝟐3\\ldots\\mathbf\{12\}\_\{3\}fixedstartABCDss3−33^\{\-3\}2⋅3−32\\cdot 3^\{\-3\}3−23^\{\-2\}3−33^\{\-3\}2⋅3−32\\cdot 3^\{\-3\}3−23^\{\-2\}4⋅3−34\\cdot 3^\{\-3\}distance travelledss\|c−y\|3\|c\-y\|\_\{3\}ℓd=max\(\|c−y\|3,r\)−r2\\ell\_\{d\}=\\max\(\|c\-y\|\_\{3\},r\)\-\\tfrac\{r\}\{2\}startABCDFigure 2:Left: one parameter learningy=23y=23onΓ3\\Gamma\_\{3\}fromζ14,2⋅3−3\\zeta\_\{14,\\,2\\cdot 3^\{\-3\}\}with learning rate8⋅3−48\\cdot 3^\{\-4\}; steps are clipped at vertices \([Section4\.1](https://arxiv.org/html/2609.25501#S4.SS1)\)\. The line towardy=23y=23represents infinitely many clipped updates, with radius tending to zero\. Right: along that path, the center’spp\-adic error\|c−y\|3\|c\-y\|\_\{3\}changes only when a digit is chosen, while the direct lossℓd\\ell\_\{d\}falls throughout\.Other conventions are possible\. A retraction\-based update\([Boumal et al\., 2019](https://arxiv.org/html/2609.25501#bib.bib11)\)specifies a continuation beyond the vertex\. Spending the step’s remainder after recomputing slopes at the vertex is a heuristic integration of the metric gradient flow, and still misses slope changes within an edge\. That flow can instead be discretized implicitly, minimizingL\(𝜽′\)\+darc\(𝜽′,𝜽t\)2/\(2τ\)L\(\\boldsymbol\{\\theta\}^\{\\prime\}\)\+d\_\{\\mathrm\{arc\}\}\(\\boldsymbol\{\\theta\}^\{\\prime\},\\boldsymbol\{\\theta\}\_\{t\}\)^\{2\}/\(2\\tau\)over𝜽′∈Γpd\\boldsymbol\{\\theta\}^\{\\prime\}\\in\\Gamma\_\{p\}^\{d\}with time stepτ\\tau\([Mayer, 1998](https://arxiv.org/html/2609.25501#bib.bib34);[Ambrosio et al\., 2008](https://arxiv.org/html/2609.25501#bib.bib2);[Jordan et al\., 1998](https://arxiv.org/html/2609.25501#bib.bib24)\); our analytic extensions give directional derivatives directly, so we take explicit steps\. The minimization in[eq\.12](https://arxiv.org/html/2609.25501#S4.E12)is not of this kind: it is over the tangent cone, whereD𝒗LD\_\{\\boldsymbol\{v\}\}Lis piecewise linear in the speeds \([Section4\.2](https://arxiv.org/html/2609.25501#S4.SS2)\)\. Subgradient methods on nonpositively curved spaces\([Goodwin et al\., 2026](https://arxiv.org/html/2609.25501#bib.bib21)\)assume geodesic convexity, which our regression loss lacks even for affine models \([ExampleF\.2](https://arxiv.org/html/2609.25501#A6.Thmtheorem2)\)\.
Momentumin Euclidean space averages past gradients,mt=βmt−1\+\(1−β\)∇L\(𝜽t\)m\_\{t\}=\\beta m\_\{t\-1\}\+\(1\-\\beta\)\\nabla L\(\\boldsymbol\{\\theta\}\_\{t\}\)and steps along−mt\-m\_\{t\}in place of−∇L\(𝜽t\)\-\\nabla L\(\\boldsymbol\{\\theta\}\_\{t\}\)\. OnΓp\\Gamma\_\{p\}a coordinate has one slope per available direction, the set of which changes at each vertex\. For a single coordinate write𝒆q\\boldsymbol\{e\}\_\{q\}for its unit velocity in directionqq\. We averageD𝒆\+L\(𝜽t\)D\_\{\\boldsymbol\{e\}\_\{\+\}\}L\(\\boldsymbol\{\\theta\}\_\{t\}\)andD𝒆−L\(𝜽t\)D\_\{\\boldsymbol\{e\}\_\{\-\}\}L\(\\boldsymbol\{\\theta\}\_\{t\}\)over every update of the coordinate; at a vertex, where direction−\-does not exist, we use the smallest child slopeminρD𝒆ρL\(𝜽t\)\\min\_\{\\rho\}D\_\{\\boldsymbol\{e\}\_\{\\rho\}\}L\(\\boldsymbol\{\\theta\}\_\{t\}\)in its place\. The amount by which childρ\\rhoexceeds it,Δt\(ρ\)=D𝒆ρL\(𝜽t\)−minρ′D𝒆ρ′L\(𝜽t\)≥0\\Delta\_\{t\}\(\\rho\)=D\_\{\\boldsymbol\{e\}\_\{\\rho\}\}L\(\\boldsymbol\{\\theta\}\_\{t\}\)\-\\min\_\{\\rho^\{\\prime\}\}D\_\{\\boldsymbol\{e\}\_\{\\rho^\{\\prime\}\}\}L\(\\boldsymbol\{\\theta\}\_\{t\}\)\\geq 0, is averaged only over the updates made at that vertex\. Writeut,dtu\_\{t\},d\_\{t\}for the upward and downward averages andΔ¯t\(ρ\)\\bar\{\\Delta\}\_\{t\}\(\\rho\)for the child’s average excess\. The momentum estimates aremt\(\+\)=utm\_\{t\}\(\+\)=u\_\{t\},mt\(−\)=dtm\_\{t\}\(\-\)=d\_\{t\}, andmt\(ρ\)=dt\+Δ¯t\(ρ\)m\_\{t\}\(\\rho\)=d\_\{t\}\+\\bar\{\\Delta\}\_\{t\}\(\\rho\)\.
The speedst\(q\)=max\(0,−mt\(q\)\)s\_\{t\}\(q\)=\\max\(0,\-m\_\{t\}\(q\)\)takes the place of−D𝒗∗L\-D\_\{\\boldsymbol\{v\}^\{\*\}\}Lin[eq\.12](https://arxiv.org/html/2609.25501#S4.E12)\. Setst\(ρ\)=0s\_\{t\}\(\\rho\)=0if the child’s directional derivative, averaged over updates at its vertex, is nonnegative\. On an edge whereLLis differentiable,D𝒆−L=−D𝒆\+LD\_\{\\boldsymbol\{e\}\_\{\-\}\}L=\-D\_\{\\boldsymbol\{e\}\_\{\+\}\}L\. If the incoming histories also satisfydt−1=−ut−1d\_\{t\-1\}=\-u\_\{t\-1\}, the recurrences preservedt=−utd\_\{t\}=\-u\_\{t\}and reduce to Euclidean momentum\.
Adamdivides speed by the root of a second\-moment average\. We keep one scalar second moment per parameter, so the division rescales every direction of a coordinate alike and cannot change which one is chosen, as separate scales would;[Cho and Lee \(2017\)](https://arxiv.org/html/2609.25501#bib.bib17)assign one adaptive rate per weight vector for the same reason\.
See[SectionG\.1](https://arxiv.org/html/2609.25501#A7.SS1)for all averaging, second\-moment, and bias correction equations\. Both extensions are equivariant in distribution under factorwise tree isometries and coordinate permutations \([PropositionC\.9](https://arxiv.org/html/2609.25501#A3.Thmtheorem9)\) and keeps unselected coordinates’ data fixed\.
### 4\.2Approximation via Parameter Groups
At an inner vertex a parameter hasp\+1p\+1branch choices, so naive joint selection overddparameters enumerates up to\(p\+1\)d\(p\+1\)^\{d\}combinations\. Two coordinates are*coupled*by an output when its contribution toD𝒗LD\_\{\\boldsymbol\{v\}\}Lcannot be written as a function of one plus a function of the other\. When several terms attain the maximum in[eq\.7](https://arxiv.org/html/2609.25501#S3.E7),\(\|𝒜i\|\>1\)\(\|\\mathcal\{A\}\_\{i\}\|\>1\), the rate in[eq\.13](https://arxiv.org/html/2609.25501#S4.E13)is a maximum over them and couples the input coordinates those terms involve, thejjwithIj\>0I\_\{j\}\>0\([ExampleE\.2](https://arxiv.org/html/2609.25501#A5.Thmtheorem2)\)\.
Even a single active term can couple parameters\. For example,θ1θ2\\theta\_\{1\}\\theta\_\{2\}has only one term when expanded at centers\(0,0\)\(0,0\)\. From the Gauss pointsθ1=θ2=ζ0,1\\theta\_\{1\}=\\theta\_\{2\}=\\zeta\_\{0,1\}, moving either parameter alone down toward digit11leaves their product unchanged, whereas moving both moves the product down toward digit11\. At the child centers\(1,1\)\(1,1\), the expansion becomes\(1\+u\)\(1\+v\)=1\+u\+v\+uv\(1\+u\)\(1\+v\)=1\+u\+v\+uv\. The output radius is thenmax\(r1,r2\)\\max\(r\_\{1\},r\_\{2\}\): its derivative is zero when either parameter moves alone, but negative when both move down together\.Hence, the joint radius derivative cannot in general be written as a sum of coordinate derivatives within a coupled group\.
Two parameters are in the same*coupled parameter group*when a chain of couplings, over any outputs and in\-batch examples, connects them\. Each contribution then depends on one group only, soD𝒗L=∑G∈𝒢ψG\(𝒗G\)D\_\{\\boldsymbol\{v\}\}L=\\sum\_\{G\\in\\mathcal\{G\}\}\\psi\_\{G\}\(\\boldsymbol\{v\}\_\{G\}\), with𝒗G\\boldsymbol\{v\}\_\{G\}the velocity restricted toGG\. Enumeration is linear in the number of groups𝒢\\mathcal\{G\}\. An output whose contribution is locally constant, such as a logit with\|c^k\|p\>r^k\|\\hat\{c\}\_\{k\}\|\_\{p\}\>\\hat\{r\}\_\{k\}\([Section6](https://arxiv.org/html/2609.25501#S6)\), contributes zero toD𝒗LD\_\{\\boldsymbol\{v\}\}L\. For affine models each term has one coordinate, so coupling comes only from ties, and the groups are read off the forward pass in linear time\. The affine implementation can further split these groups when contributions cancel exactly \([AppendicesC](https://arxiv.org/html/2609.25501#A3.SS0.SSS0.Px2)and[G](https://arxiv.org/html/2609.25501#A7)\)\.
Enumeration can still be exponential per group, so each update proceeds as follows:
1. 1\.Select one coordinate per group uniformly among those awaiting a turn \(§[G\.1](https://arxiv.org/html/2609.25501#A7.SS1)\)\.
2. 2\.On a common minibatch, compute each selected coordinate’s directional slopes\. For gradient descent, choose a minimizing direction with speedmax\(0,−μG\)\\max\(0,\-\\mu\_\{G\}\), whereμG\\mu\_\{G\}is its least unit\-direction slope\. This suffices because derivatives add across groups \(§[C\.1](https://arxiv.org/html/2609.25501#A3.SS1)\)\.
3. 3\.Move the selected coordinates together under the clipping rule\. A stationary selection still counts as a turn\.
With fixed groups this is a random\-permutation sweep\([Lee and Wright, 2019](https://arxiv.org/html/2609.25501#bib.bib28)\), as in parallel coordinate descent\([Liu et al\., 2015](https://arxiv.org/html/2609.25501#bib.bib31)\); a single group gives ordinary coordinate descent\.
### 4\.3Backpropagation
To choose a parameter direction we need its effect on the loss, which one can compute stagewise via backpropagation\([Linnainmaa, 1976](https://arxiv.org/html/2609.25501#bib.bib30)\)\. Since directional derivatives add over examples, fix one and writeL=ℓ∘FL=\\ell\\circ F, withF=FK∘⋯∘F1F=F\_\{K\}\\circ\\cdots\\circ F\_\{1\}as in[Section3\.2](https://arxiv.org/html/2609.25501#S3.SS2)andℓ\\ellreal\-valued\. Each stage maps the directions and speeds of its inputs to those of its results\. An input radius at stagekkmoves atD𝒗rj=±sjD\_\{\\boldsymbol\{v\}\}r\_\{j\}=\\pm s\_\{j\}\(\+\+up,−\-down or down via a digit\)\. For each selected child direction, form the expansion and active terms in[eq\.7](https://arxiv.org/html/2609.25501#S3.E7)using the centercj\+ρjpnjc\_\{j\}\+\\rho\_\{j\}p^\{n\_\{j\}\}of that child \([eq\.10](https://arxiv.org/html/2609.25501#S4.E10); any representative gives the same result,[CorollaryD\.1](https://arxiv.org/html/2609.25501#A4.Thmtheorem1)\)\. Differentiating with these representatives fixed gives the ratesD𝒗𝒓^D\_\{\\boldsymbol\{v\}\}\\hat\{\\boldsymbol\{r\}\}; working backwards from the loss head \([PropositionE\.1](https://arxiv.org/html/2609.25501#A5.Thmtheorem1)\), fork=K,…,1k=K,\\dotsc,1:
D𝒗\(ℓ∘F~K∘⋯∘F~k\)=D𝒗^\(ℓ∘F~K∘⋯∘F~k\+1\),D𝒗r^i=r^imax𝑰∈𝒜i∑jIjD𝒗rjrj,D\_\{\\boldsymbol\{v\}\}\\bigl\(\\ell\\circ\\tilde\{F\}\_\{K\}\\circ\\cdots\\circ\\tilde\{F\}\_\{k\}\\bigr\)=D\_\{\\hat\{\\boldsymbol\{v\}\}\}\\bigl\(\\ell\\circ\\tilde\{F\}\_\{K\}\\circ\\cdots\\circ\\tilde\{F\}\_\{k\+1\}\\bigr\),\\qquad D\_\{\\boldsymbol\{v\}\}\\hat\{r\}\_\{i\}=\\hat\{r\}\_\{i\}\\max\_\{\\boldsymbol\{I\}\\in\\mathcal\{A\}\_\{i\}\}\\sum\_\{j\}\\frac\{I\_\{j\}\\,D\_\{\\boldsymbol\{v\}\}r\_\{j\}\}\{r\_\{j\}\},\(13\)with𝒜i\\mathcal\{A\}\_\{i\}the active terms andr^i\\hat\{r\}\_\{i\}the output radius of[eq\.7](https://arxiv.org/html/2609.25501#S3.E7)\. For positive input radii, the radius\-rate formula only applies whenr^i\>0\\hat\{r\}\_\{i\}\>0; whenr^i=0\\hat\{r\}\_\{i\}=0, the radius derivative is zero\. The resulting velocity𝒗^=\(𝒒^,𝒔^\)\\hat\{\\boldsymbol\{v\}\}=\(\\hat\{\\boldsymbol\{q\}\},\\hat\{\\boldsymbol\{s\}\}\)has speedss^i=\|D𝒗r^i\|\\hat\{s\}\_\{i\}=\|D\_\{\\boldsymbol\{v\}\}\\hat\{r\}\_\{i\}\|\. A positive rate moves up, and a negative rate moves down towardFk,i\(𝒄′\)F\_\{k,i\}\(\\boldsymbol\{c\}^\{\\prime\}\), where𝒄′\\boldsymbol\{c\}^\{\\prime\}is𝒄\\boldsymbol\{c\}with the selected child centers substituted \([AppendixE](https://arxiv.org/html/2609.25501#A5)\)\. When each𝒜i\\mathcal\{A\}\_\{i\}has one term,[eq\.13](https://arxiv.org/html/2609.25501#S4.E13)is linear in the input rates, as in backpropagation through a linear layer; ties are treated in[Section4\.2](https://arxiv.org/html/2609.25501#S4.SS2)\. The stage\-by\-stage extension is exact in every center and a bound in every radius \([Section3\.2](https://arxiv.org/html/2609.25501#S3.SS2)\); the result equalsD𝒗\(ℓ∘F~\)D\_\{\\boldsymbol\{v\}\}\(\\ell\\circ\\tilde\{F\}\)when no parameter reaches a stage along two paths\. Weighted over examples, these are the derivatives[eq\.12](https://arxiv.org/html/2609.25501#S4.E12)requires for the loss evaluated on the stagewise output\.
#### Affine models\.
For affine models, the ordinary JacobianapproximationF\(𝒄\)\+JF\(𝒄\)\(u−𝒄\)F\(\\boldsymbol\{c\}\)\+J\_\{F\}\(\\boldsymbol\{c\}\)\(u\-\\boldsymbol\{c\}\)equalsFF, so the same disk extension and loss give the original directional derivatives for both linear regression and classification\. At a vertex, each output scalar has a common child derivative and at most one exception, so accumulating these with the signed loss\-derivative weights assembles theppchild slopes inO\(m\+p\)O\(m\+p\)rather thanO\(mp\)O\(mp\)work formmcontributing outputs\. We may view this as “Jacobian descent”: select the gradient step using the loss composed with the Jacobian approximation\. See Appendix[F](https://arxiv.org/html/2609.25501#A6)for the formulas and Appendix[G\.2](https://arxiv.org/html/2609.25501#A7.SS2.SSS0.Px3)for the cost analysis\.
## 5pp\-adic Regression
We minimize meanpp\-adic error, orL1L\_\{1\}loss, following[Baker and Molla\-Aliod \(2022\)](https://arxiv.org/html/2609.25501#bib.bib3);[Baker et al\. \(2025\)](https://arxiv.org/html/2609.25501#bib.bib4)and[Zubarev \(2025\)](https://arxiv.org/html/2609.25501#bib.bib51); exact minimization is NP\-hard forp=2p=2when the number of coefficients is part of the input\([Baker, 2026](https://arxiv.org/html/2609.25501#bib.bib5)\)\. TheL∞L\_\{\\infty\}loss instead minimizes worst\-case error, as in[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33)\. SquaredL2L\_\{2\}loss is also possible, but the usual least\-squares justification does not carry over: thepp\-adic norm is not induced by an inner product, so its square gives neither a quadratic objective nor a closed\-form solution and remains locally constant at nonzero residuals\. For training, we use themean direct lossLdL\_\{d\}, the continuous relaxation from[eq\.9](https://arxiv.org/html/2609.25501#S3.E9):
L1\(𝜽\)=1N∑i\|f\(𝒙\(i\),𝜽\)−y\(i\)\|p⟶Ld\(𝜽\)=1N∑iℓd\(f\(𝒙\(i\),𝜽\),y\(i\)\)\.L\_\{1\}\(\\boldsymbol\{\\theta\}\)=\\frac\{1\}\{N\}\\sum\_\{i\}\|f\(\\boldsymbol\{x\}^\{\(i\)\};\\boldsymbol\{\\theta\}\)\-y^\{\(i\)\}\|\_\{p\}\\quad\\longrightarrow\\quad L\_\{d\}\(\\boldsymbol\{\\theta\}\)=\\frac\{1\}\{N\}\\sum\_\{i\}\\ell\_\{d\}\(f\(\\boldsymbol\{x\}^\{\(i\)\};\\boldsymbol\{\\theta\}\),y^\{\(i\)\}\)\.\(14\)
Table 1:Affine and two\-layer regression under 3\-adicL1L\_\{1\}loss \(mean absolute error\), with training\-example equivalents needed for recovery at depths 4 and 5\. Entries are mean±\\pmSD over five coefficient instances; NR meansxx/5 recovered\. N/A: beam search always fixes digits from the coarsest downward\.Boldresults overlap SDs with the best\.#### Experiments\.
We evaluate on a 3\-dimensional linear regression task inℚ3\\mathbb\{Q\}\_\{3\}\. For each seed, we draw𝜽∗\\boldsymbol\{\\theta\}^\{\*\}and each input vector𝒙\(i\)\\boldsymbol\{x\}^\{\(i\)\}uniformly from\{0,…,38−1\}3\\\{0,\\ldots,3^\{8\}\-1\\\}^\{3\}and generate targets asy\(i\)=𝜽∗⊤𝒙\(i\)\+35η\(i\)y^\{\(i\)\}=\{\\boldsymbol\{\\theta\}^\{\*\\top\}\}\\boldsymbol\{x\}^\{\(i\)\}\+3^\{5\}\\eta^\{\(i\)\}\. Letη\(i\)\\eta^\{\(i\)\}be a uniform integer in\{1,…,99\}\\\{1,\\dots,99\\\}, representing noise at depth five\. We also train a two\-layer model on four\-input targets generated fromf\(𝒙\)=v1\(x1\+w1x2\)2\+v2\(x3\+w2x4\)2f\(\\boldsymbol\{x\}\)=v\_\{1\}\(x\_\{1\}\+w\_\{1\}x\_\{2\}\)^\{2\}\+v\_\{2\}\(x\_\{3\}\+w\_\{2\}x\_\{4\}\)^\{2\}with the same noise\. Both gradient training and beam search use this four\-coefficient model; all four gradient parameters start at the Gauss point \([SectionG\.4](https://arxiv.org/html/2609.25501#A7.SS4.SSS0.Px2)\)\. 512 train/dev/test examples are drawn, and training uses batches of 32\. At the true coefficients the expectedL1L\_\{1\}loss is−5\.26\-5\.26on thelog3\\log\_\{3\}scale\. We reportL1L\_\{1\}error using the representatives retained by training, with their radii set to zero \(L1L\_\{1\}is not representative\-invariant\)\.
We compare approximate gradient descent \(GD\), momentum, and Adam with[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33)’s classifier beam search \(their Algorithm 1\), adapted to regression with widths five and ten and batch\-32 scoring \([SectionsG\.3](https://arxiv.org/html/2609.25501#A7.SS3)and[G\.4](https://arxiv.org/html/2609.25501#A7.SS4.SSS0.Px3)\); their own regression method, which is forL∞L\_\{\\infty\}, is not run\. For each coefficient instance, learning rates and beam widths are selected by work to first depth\-five agreement on every independent validation observation of the same function \([SectionG\.3](https://arxiv.org/html/2609.25501#A7.SS3)\)\. Training work counts repeated uses of examples: each gradient update or beam\-candidate scoring on a batch ofbbexamples contributesb/512b/512, regardless of how many coordinates move\. Arithmetic costs are given in[SectionG\.2](https://arxiv.org/html/2609.25501#A7.SS2.SSS0.Px3)\.
For affine regression, our gradient methods place every coefficient at theGauss pointζ0,1\\zeta\_\{0,1\}, the disk of radius one around zero and the uninformed state of the tree; beam search starts with every coefficient at zero\. We also test an*adverse*start: a digitwise local minimum, at which no change of any single digit lowers the training loss, lifted to disks of radius3−83^\{\-8\}so that radius growth can revisit coarser digits \([SectionG\.4](https://arxiv.org/html/2609.25501#A7.SS4)\)\.
#### Results\.
See[Table1](https://arxiv.org/html/2609.25501#S5.T1)\. Recovery through depthqqmeans\|cj−θj∗\|p≤p−q\|c\_\{j\}\-\\theta\_\{j\}^\{\*\}\|\_\{p\}\\leq p^\{\-q\}for every coefficientjj\. With centers initialized at zero, beam search and the gradient descent methods all reach test losses close to the loss at the true coefficients\. With batches of 32, the gradient methods reach depth 5 after processing 0\.95–0\.98 training\-example equivalents on average, compared with 35\.5 for beam search of width five\. With the engineered adversarial start, gradient methods often \(but not always\) escaped the local minima\. Here, plain GD \(approx\.\) recovered on three of five seeds, while Momentum and Adam recovered on all five\.
For the two\-layer network, recovery is over the coefficients offfas a quadratic form\. In contrast, a bias\-free linear control trained by GD on the same data atκ=1\\kappa=1has test loss−0\.49±0\.16\-0\.49\\pm 0\.16, against−0\.36±0\.19\-0\.36\\pm 0\.19for predicting zero\. GD recovered on all five seeds in1\.45±0\.251\.45\\pm 0\.25training\-example equivalents, with test loss close to the loss at the true coefficients; Momentum and Adam also recovered all five\. Beam search recovers all five with the selected widths; width five alone misses one \([SectionG\.4](https://arxiv.org/html/2609.25501#A7.SS4.SSS0.Px2)\)\. On the missed seed the targetv1v\_\{1\}is divisible by nine, so a candidate matching it hasv1=0v\_\{1\}=0after two digits; its termv1\(x1\+w1x2\)2v\_\{1\}\(x\_\{1\}\+w\_\{1\}x\_\{2\}\)^\{2\}is then zero whatever itsw1w\_\{1\}, and nine candidates share one loss exactly\. At the next digit these nine separate and take the nine lowest losses, with the one matching the target last of them, so width five keeps only the first five\.
## 6pp\-adic Classification
In Euclidean machine learning, a linear binary classifier assigns a label by testing whetherf\(𝒙,𝒘\)=𝒘⊤𝒙\+b≥0f\(\\boldsymbol\{x\};\\boldsymbol\{w\}\)=\\boldsymbol\{w\}^\{\\top\}\\boldsymbol\{x\}\+b\\geq 0\. Overℚp\\mathbb\{Q\}\_\{p\}, the outputpp\-adic values have no coherent ordering[Section2](https://arxiv.org/html/2609.25501#S2)\. Hence,[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33)definedpp\-adic linear classifiersas\|𝒘⊤𝒙\+b\|p≤1\|\\boldsymbol\{w\}^\{\\top\}\\boldsymbol\{x\}\+b\|\_\{p\}\\leq 1—equivalently,vp\(𝒘⊤𝒙\+b\)≥0v\_\{p\}\(\\boldsymbol\{w\}^\{\\top\}\\boldsymbol\{x\}\+b\)\\geq 0\.[Martins](https://arxiv.org/html/2609.25501#bib.bib33)trained with beam search; a similar 2\-adic threshold unit, trained by random search, appears in[Khrennikov and Tirozzi \(2000\)](https://arxiv.org/html/2609.25501#bib.bib26)\. We extend this to multiclass classification by defining softmax which we optimize with gradient descent inΓpd\\Gamma\_\{p\}^\{d\}, resolving their Open Problem 6\.1 \(linear multiclasspp\-adic classifiers\) and addressing 6\.2 \(gradient\-based optimization\)\.
### 6\.1Logits, Softmax, and Loss
ForCCclasses, stack affine maps intof\(𝒙\)=𝑾𝒙\+𝒃∈ℚpCf\(\\boldsymbol\{x\}\)=\\boldsymbol\{W\}\\boldsymbol\{x\}\+\\boldsymbol\{b\}\\in\\mathbb\{Q\}\_\{p\}^\{C\}, where rowkkof𝑾\\boldsymbol\{W\}is𝒘k⊤\\boldsymbol\{w\}\_\{k\}^\{\\top\}andfk\(𝒙,𝒘k,bk\)=𝒘k⊤𝒙\+bkf\_\{k\}\(\\boldsymbol\{x\};\\boldsymbol\{w\}\_\{k\},b\_\{k\}\)=\\boldsymbol\{w\}\_\{k\}^\{\\top\}\\boldsymbol\{x\}\+b\_\{k\}\. Generalizing Martins’ binary classifier, our goal at inference is to have the real\-valuedzk=vp\(fk\(𝒙\)\)=−logp\|fk\(𝒙\)\|pz\_\{k\}=v\_\{p\}\(f\_\{k\}\(\\boldsymbol\{x\}\)\)=\-\\log\_\{p\}\|f\_\{k\}\(\\boldsymbol\{x\}\)\|\_\{p\}act as logit for a softmax on𝒛=\(z1,…,zC\)\\boldsymbol\{z\}=\(z\_\{1\},\\ldots,z\_\{C\}\)\.
During training, the map for classkkextends tof~k\(𝒙,𝒘k,bk\)\\tilde\{f\}\_\{k\}\(\\boldsymbol\{x\};\\boldsymbol\{w\}\_\{k\},b\_\{k\}\)whose aggregate parameter state is inΓpd/C\\Gamma\_\{p\}^\{d/C\}\. Writing its output asζc^k,r^k\\zeta\_\{\\hat\{c\}\_\{k\},\\hat\{r\}\_\{k\}\}, we take itslogitto be the negative base\-pplogarithm of the radius of its LCA with zero, an upper bound on\|u\|p\|u\|\_\{p\}over the representativesuuof the output \([eq\.2](https://arxiv.org/html/2609.25501#S3.E2)\):zk=−logpmax\{\|c^k\|p,r^k\}z\_\{k\}=\-\\log\_\{p\}\\max\\\{\|\\hat\{c\}\_\{k\}\|\_\{p\},\\hat\{r\}\_\{k\}\\\}\. When\|c^k\|p\>r^k\|\\hat\{c\}\_\{k\}\|\_\{p\}\>\\hat\{r\}\_\{k\}this isvp\(c^k\)v\_\{p\}\(\\hat\{c\}\_\{k\}\), unchanged by the radius; else it is−logpr^k\-\\log\_\{p\}\\hat\{r\}\_\{k\}\. The direct loss \([eq\.9](https://arxiv.org/html/2609.25501#S3.E9)\) is a generalization of distance; in contrast,\|fk\(𝒙\)\|p≤1\|f\_\{k\}\(\\boldsymbol\{x\}\)\|\_\{p\}\\leq 1is a condition onallrepresentatives, whichzk≥0z\_\{k\}\\geq 0guarantees all satisfy\.
Converting the valuation logits to natural\-log units, applying softmax, and simplifying gives the class probabilities and cross\-entropy loss per exampleiiand in aggregateLCEL\_\{\\text\{CE\}\}:
πk\(i\)=\(max\{\|c^k\(i\)\|p,r^k\(i\)\}\)−1/T∑k′\(max\{\|c^k′\(i\)\|p,r^k′\(i\)\}\)−1/T,ℓCE\(i\)=−lnπy\(i\)\(i\),LCE=1N∑iℓCE\(i\)\\pi\_\{k\}^\{\(i\)\}=\\frac\{\\bigl\(\\max\\\{\|\\hat\{c\}\_\{k\}^\{\(i\)\}\|\_\{p\},\\hat\{r\}\_\{k\}^\{\(i\)\}\\\}\\bigr\)^\{\-1/T\}\}\{\\sum\_\{k^\{\\prime\}\}\\bigl\(\\max\\\{\|\\hat\{c\}\_\{k^\{\\prime\}\}^\{\(i\)\}\|\_\{p\},\\hat\{r\}\_\{k^\{\\prime\}\}^\{\(i\)\}\\\}\\bigr\)^\{\-1/T\}\},\\qquad\\ell^\{\(i\)\}\_\{\\mathrm\{CE\}\}=\-\\ln\\pi^\{\(i\)\}\_\{y^\{\(i\)\}\},\\qquad L\_\{\\text\{CE\}\}=\\frac\{1\}\{N\}\\sum\_\{i\}\\ell^\{\(i\)\}\_\{\\text\{CE\}\}\(15\)whereTTis softmax temperature, giving probabilitiessoftmax\(\(lnp\)z\(i\)/T\)\\operatorname\{softmax\}\(\(\\ln p\)z^\{\(i\)\}/T\)\. We useT=1T=1throughout\. The binary formulation appears in[Section6\.2](https://arxiv.org/html/2609.25501#S6.SS2.SSS0.Px2)\. For[Tables2](https://arxiv.org/html/2609.25501#S6.T2)and[3](https://arxiv.org/html/2609.25501#S6.T3), we extractpp\-adic parameters from the learned parameter states using the convention in[SectionG\.3](https://arxiv.org/html/2609.25501#A7.SS3.SSS0.Px5)\. For a finitepp\-adically separable training set and a classifier with independent output biases,[TheoremH\.1](https://arxiv.org/html/2609.25501#A8.Thmtheorem1)constructs states with fixed separating centers, positive parameter radii, and any prescribed common output radiusρ∈\(0,1\]\\rho\\in\(0,1\]\. Every correct\-class logit then exceeds every other by at least11\.
### 6\.2Experiments
#### Modulo Classification\.
Forxmodpkx\\bmod p^\{k\}, inputs with the same remainder share a base\-ppprefix\. A closed\-form affine solution follows by applying[Martins \(2025, §3\.1, Proposition 2\)](https://arxiv.org/html/2609.25501#bib.bib33)to each residue class, but the task was not trained there\. Our initialization selects the weight’s depth from the training labels but is identical for every class, so it predicts at chance; we test whether training finds the class biases that complete such a solution, under our cross\-entropy objective with valuation logits; further setup in[SectionsG\.3](https://arxiv.org/html/2609.25501#A7.SS3)and[G\.5](https://arxiv.org/html/2609.25501#A7.SS5)\.
Table 2:Modulo classification test accuracy \(mean±\\pmSD over 5 seeds\)\. All models use Adam \(Euclidean, or ours forpp\-adic\) with batch size 32\.In Table[2](https://arxiv.org/html/2609.25501#S6.T2), matched\-prime classifiers attain perfect test accuracy across five seeds, while mismatched primes, permuted codes, and Euclidean linear classifiers on raw scalar inputs remain near chance\. These results show the importance of an encoding that linearly separates congruence classes, which forpp\-adics is prime\-dependent; one\-hot encodings do this \(at the cost of dimension\) and also fit\.
#### Quillian Semantic Network Benchmark\.
We evaluate on the 1,680\-proposition Quillian Semantic Network\([Quillian, 1968](https://arxiv.org/html/2609.25501#bib.bib41)\)as adapted by[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33)\. We use Martins’s hand\-designedℚ2\\mathbb\{Q\}\_\{2\}entity codes, fixed before optimization, in which semantically close entities share long base\-2 prefixes\. Each of the 28 properties is an independent binary task with a sigmoid head; only 8\.04% of labels are positive, so we report positive\-class F1 and average precision \(AP\), pooled across properties within each test split, and accuracy for comparison with Martins\.
Each head uses an affine map of the three entity\-code coordinates and four relation indicators; the active relation’s weight supplies the bias\. WritingS=max\{r^,\|c^\|p\}S=\\max\\\{\\hat\{r\},\|\\hat\{c\}\|\_\{p\}\\\}, the two valuation logitsz0=0z\_\{0\}=0andz1=−logpSz\_\{1\}=\-\\log\_\{p\}Sgiveπ1=1/\(1\+S1/T\)\\pi\_\{1\}=1/\(1\+S^\{1/T\}\)and binary cross\-entropy atT=1T=1\. An attribute is predicted present whenπ1≥1/2\\pi\_\{1\}\\geq 1/2, equivalentlyS≤1S\\leq 1, recovering Martins’s unit\-threshold rule at zero radius\. Beam search ranks and prunes candidates using training labels; we also use them to select an initial input coordinate and digit depthvv\. The selected coefficient starts at centerp−vp^\{\-v\}and the others at zero, fixing an initial representative among classifiers equivalent under multiplication by a scalar ofpp\-adic norm one\. All coefficients remain trainable \([SectionG\.3](https://arxiv.org/html/2609.25501#A7.SS3)\)\.
Table 3:Quillian benchmark test results, pooled across 28 binary properties within each split \(mean±\\pmSD over five random 80/20 splits\)\. \(full\) means no batching\.Boldmarks the highest mean per metric within each model family\.Italicsare our higher\-accuracy reproductions of[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33); see[SectionG\.6](https://arxiv.org/html/2609.25501#A7.SS6.SSS0.Px4)\.[Table3](https://arxiv.org/html/2609.25501#S6.T3)compares our training procedure with beam search on Martins’s architecture and with their roughly three\-times larger, two\-layer Euclidean MLP \([SectionG\.6](https://arxiv.org/html/2609.25501#A7.SS6)\)\.[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33)also give hand\-set weights that classify every proposition correctly, so test error here reflects learning from the training split, for every method\. Gradient descent approaches both beam baselines in accuracy\. As with modulo, the permuted control shows that giving Quillian data a22\-adic encoding that preserves its hierarchy provides a useful inductive bias for gradient descent\.
## 7Conclusion
The framework presented here trains affine models and one restricted two\-layer model withpp\-adic parameters by approximate joint gradient descent, using exact derivatives\. For affine models these derivatives can be accumulated sparsely \([AppendixF](https://arxiv.org/html/2609.25501#A6)\)\. Though we describe the theory for arbitrary\-depth models, the tradeoff between the radius bound versus the cost of collecting stages, and the ideal architecture and setup for deep models remain open questions\. As suggested by[Martins \(2025, §6\.4\)](https://arxiv.org/html/2609.25501#bib.bib33), we intend to develop adelic formulations of losses and descent, capturing the advantages of both real andpp\-adic norms\. Over Berkovich spaces, this would be Arakelov geometry\([Chambert\-Loir, 2006](https://arxiv.org/html/2609.25501#bib.bib14)\)\. Convergence guarantees remain open\. See[AppendixA](https://arxiv.org/html/2609.25501#A1)for our work’s limitations and use of AI\.
#### Acknowledgements\.
We thank Michaël Sander, Jessica Hoffmann, Maxime Guigon, and the anonymous reviewers and area chair for their helpful feedback\. We thank the AI co\-mathematician team at Google DeepMind for providing model access and support\. The first author thanks Clifton Cunningham for a guided reading ofA Course on Arithmeticin 2014\-15, and congratulates Jean\-Pierre Serre on his 100th birthday\.
## References
- Albeverio et al\. \[1999\]Sergio Albeverio, Andrei Khrennikov, and Brunello Tirozzi\.pp\-adic dynamical systems and neural networks\.*Mathematical models and methods in applied sciences*, 9\(09\):1417–1437, 1999\.
- Ambrosio et al\. \[2008\]Luigi Ambrosio, Nicola Gigli, and Giuseppe Savaré\.*Gradient Flows in Metric Spaces and in the Space of Probability Measures*\.Lectures in Mathematics ETH Zürich\. Birkhäuser, second edition, 2008\.
- Baker and Molla\-Aliod \[2022\]Gregory Baker and Diego Molla\-Aliod\.Number theory meets linguistics: Modelling noun pluralisation across 1497 languages using 2\-adic metrics\.In*Proceedings of the 2nd Conference of the Asia\-Pacific Chapter of the Association for Computational Linguistics and the 12th International Joint Conference on Natural Language Processing \(Volume 2: Short Papers\)*, pages 24–32, Online only, November 2022\. Association for Computational Linguistics\.URL[https://aclanthology\.org/2022\.aacl\-short\.4](https://aclanthology.org/2022.aacl-short.4)\.
- Baker et al\. \[2025\]Gregory Baker, Scott McCallum, and Dirk Pattinson\.Linear regression inpp\-adic metric spaces\.*p\-Adic Numbers, Ultrametric Analysis and Applications*, 17\(4\):333–347, 2025\.
- Baker \[2026\]Gregory D\. Baker\.NP\-hardness ofpp\-adic linear regression\.*CoRR*, abs/2602\.13278, 2026\.
- Baker and Rumely \[2010\]Matthew Baker and Robert S Rumely\.*Potential theory and dynamics on the Berkovich projective line*\.Number 159\. American Mathematical Soc\., 2010\.
- Basso and Sidler \[2023\]Giuliano Basso and Hubert Sidler\.Approximating spaces of Nagata dimension zero by weighted trees\.*Illinois Journal of Mathematics*, 67\(1\):45–72, 2023\.doi:10\.1215/00192082\-10414720\.
- Bécigneul and Ganea \[2019\]Gary Bécigneul and Octavian\-Eugen Ganea\.Riemannian adaptive optimization methods\.In*International Conference on Learning Representations \(ICLR\)*, 2019\.
- Berkovich \[1990\]Vladimir G Berkovich\.*Spectral theory and analytic geometry over non\-Archimedean fields*\.Number 33\. American Mathematical Soc\., 1990\.
- Bosch et al\. \[1984\]Siegfried Bosch, Ulrich Güntzer, and Reinhold Remmert\.Non\-archimedean analysis, volume 261 of grundlehren der mathematischen wissenschaften \[fundamental principles of mathematical sciences\], 1984\.
- Boumal et al\. \[2019\]Nicolas Boumal, P\.\-A\. Absil, and Coralia Cartis\.Global rates of convergence for nonconvex optimization on manifolds\.*IMA Journal of Numerical Analysis*, 39\(1\):1–33, 2019\.doi:10\.1093/imanum/drx080\.
- Boyd and Vandenberghe \[2004\]Stephen Boyd and Lieven Vandenberghe\.*Convex optimization*\.Cambridge University Press, 2004\.
- Bradley \[2009\]Patrick Erik Bradley\.Onpp\-adic classification\.*p\-Adic Numbers, Ultrametric Analysis and Applications*, 1\(4\):271–285, 2009\.doi:10\.1134/S2070046609040013\.
- Chambert\-Loir \[2006\]Antoine Chambert\-Loir\.Mesures et équidistribution sur des espaces de berkovich\.*Journal für die reine und angewandte Mathematik \(Crelle’s Journal\)*, 595:215–235, 2006\.
- Chami et al\. \[2020\]Ines Chami, Albert Gu, Vaggos Chatziafratis, and Christopher Ré\.From trees to continuous embeddings and back: Hyperbolic hierarchical clustering\.In*Advances in Neural Information Processing Systems*, volume 33, pages 15065–15076, 2020\.
- Chierchia and Perret \[2019\]Giovanni Chierchia and Benjamin Perret\.Ultrametric fitting by gradient descent\.In*Advances in Neural Information Processing Systems*, volume 32, pages 3181–3192, 2019\.
- Cho and Lee \[2017\]Minhyung Cho and Jaehyung Lee\.Riemannian approach to batch normalization\.In*Advances in Neural Information Processing Systems*, volume 30, 2017\.
- Comanici et al\. \[2025\]Gheorghe Comanici, Eric Bieber, Mike Schaekermann, Ice Pasupat, Noveen Sachdeva, Inderjit Dhillon, Marcel Blistein, Ori Ram, Dan Zhang, Evan Rosen, et al\.Gemini 2\.5: Pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities\.*arXiv preprint arXiv:2507\.06261*, 2025\.
- Dawood and Megahed \[2023\]Hend Dawood and Nefertiti Megahed\.Automatic differentiation of uncertainties: an interval computational differentiation for first and higher derivatives with implementation\.*PeerJ Comput\. Sci\.*, 9:e1301, 2023\.
- Dragovich and Dragovich \[2010\]Branko Dragovich and Alexandra Dragovich\.pp\-adic modelling of the genome and the genetic code\.*The Computer Journal*, 53\(4\):432–442, 2010\.doi:10\.1093/comjnl/bxm083\.
- Goodwin et al\. \[2026\]Ariel Goodwin, Adrian S\. Lewis, Genaro López\-Acedo, and Adriana Nicolae\.Stochastic and incremental subgradient methods for convex optimization on Hadamard spaces\.*Mathematical Programming*, 2026\.doi:10\.1007/s10107\-026\-02334\-4\.Earlier version:*A subgradient splitting algorithm for optimization on nonpositively curved metric spaces*, arXiv:2412\.06730 \(2024\)\.
- Gouvêa \[2020\]Fernando Q\. Gouvêa\.*Thepp\-adic Numbers: An Introduction*\.Springer, 2020\.
- Hua and Hovestadt \[2021\]Hao Hua and Ludger Hovestadt\.p\-adic numbers encode complex networks\.*Scientific Reports*, 11\(1\):17, 2021\.doi:10\.1038/s41598\-020\-79507\-4\.URL[https://doi\.org/10\.1038/s41598\-020\-79507\-4](https://doi.org/10.1038/s41598-020-79507-4)\.
- Jordan et al\. \[1998\]Richard Jordan, David Kinderlehrer, and Felix Otto\.The variational formulation of the Fokker–Planck equation\.*SIAM Journal on Mathematical Analysis*, 29\(1\):1–17, 1998\.doi:10\.1137/S0036141096303359\.
- Kedlaya \[2001\]Kiran S\. Kedlaya\.Counting points on hyperelliptic curves using Monsky–Washnitzer cohomology\.*Journal of the Ramanujan Mathematical Society*, 16:323–338, 2001\.
- Khrennikov and Tirozzi \[2000\]Andrei Khrennikov and Brunello Tirozzi\.Learning ofpp\-adic neural networks\.In*Stochastic Processes, Physics and Geometry: New Interplays\. II*, volume 29 of*CMS Conference Proceedings*, pages 395–401\. American Mathematical Society, 2000\.
- Lang et al\. \[2013\]Urs Lang, Maël Pavón, and Roger Züst\.Metric stability of trees and tight spans\.*Archiv der Mathematik*, 101:91–100, 2013\.doi:10\.1007/s00013\-013\-0535\-y\.
- Lee and Wright \[2019\]Ching\-Pei Lee and Stephen J\. Wright\.Random permutations fix a worst case for cyclic coordinate descent\.*IMA Journal of Numerical Analysis*, 39\(3\):1246–1275, 2019\.doi:10\.1093/imanum/dry040\.
- Lemin \[1985\]A Yu Lemin\.Isometric imbedding of isosceles \(non\-archimedean\) spaces into euclidean ones\.In*Doklady Akademii Nauk*, volume 285, pages 558–562\. Russian Academy of Sciences, 1985\.
- Linnainmaa \[1976\]Seppo Linnainmaa\.Taylor expansion of the accumulated rounding error\.*BIT*, 16\(2\):146–160, 1976\.doi:10\.1007/BF01931367\.
- Liu et al\. \[2015\]Ji Liu, Stephen J\. Wright, Christopher Ré, Victor Bittorf, and Srikrishna Sridhar\.An asynchronous parallel stochastic coordinate descent algorithm\.*Journal of Machine Learning Research*, 16\(10\):285–322, 2015\.URL[https://jmlr\.org/papers/v16/liu15a\.html](https://jmlr.org/papers/v16/liu15a.html)\.
- Mantegna \[1999\]Rosario N\. Mantegna\.Hierarchical structure in financial markets\.*The European Physical Journal B*, 11:193–197, 1999\.doi:10\.1007/s100510050929\.
- Martins \[2025\]André FT Martins\.Learning with thepp\-adics\.*arXiv preprint arXiv:2512\.22692*, 2025\.
- Mayer \[1998\]Uwe F\. Mayer\.Gradient flows on nonpositively curved metric spaces and harmonic maps\.*Communications in Analysis and Geometry*, 6\(2\):199–253, 1998\.
- Mihara \[2026a\]Tomoki Mihara\.pp\-adic character neural network\.*CoRR*, abs/2603\.29905, 2026a\.
- Mihara \[2026b\]Tomoki Mihara\.pp\-adic linear regression for random sampling with digitwise noise\.*CoRR*, abs/2604\.13137, 2026b\.
- Mihara \[2026c\]Tomoki Mihara\.pp\-adic polynomial regression detecting digitwise noise\.*p\-Adic Numbers, Ultrametric Analysis and Applications*, 18\(1\):33–47, 2026c\.doi:10\.1134/S2070046626010036\.
- N’guessan \[2025\]Gnankan Landry Regis N’guessan\.v\-punns: van der put neural networks for transparent ultrametric representation learning\.*CoRR*, abs/2508\.01010, 2025\.
- Nickel and Kiela \[2017\]Maximilian Nickel and Douwe Kiela\.Poincaré embeddings for learning hierarchical representations\.In*Advances in Neural Information Processing Systems*, volume 30, 2017\.
- Poineau and Turchetti \[2020\]Jérôme Poineau and Daniele Turchetti\.Berkovich curves and schottky uniformization i: The berkovich affine line\.In*Arithmetic and Geometry over Local Fields: VIASM 2018*, pages 179–223\. Springer, 2020\.
- Quillian \[1968\]M\. Ross Quillian\.Semantic memory\.In Marvin Minsky, editor,*Semantic Information Processing*, pages 227–270\. MIT Press, Cambridge, MA, 1968\.
- Rémy et al\. \[2014\]Bertrand Rémy, Amaury Thuillier, and Annette Werner\.Bruhat\-Tits buildings and analytic geometry\.In*Berkovich spaces and applications*, pages 141–202\. Springer, 2014\.
- Satoh \[2000\]Takakazu Satoh\.The canonical lift of an ordinary elliptic curve over a finite field and its point counting\.*Journal of the Ramanujan Mathematical Society*, 15\(4\):247–270, 2000\.
- Sun et al\. \[2019\]Tao Sun, Penghang Yin, Dongsheng Li, Chun Huang, Lei Guan, and Hao Jiang\.Non\-ergodic convergence analysis of heavy\-ball algorithms\.*Proceedings of the AAAI Conference on Artificial Intelligence*, 2019\.URL[https://ojs\.aaai\.org/index\.php/AAAI/article/view/4435](https://ojs.aaai.org/index.php/AAAI/article/view/4435)\.
- Talbut and Monod \[2025\]Roan Talbut and Anthea Monod\.Tropical gradient descent\.*Journal of Global Optimization*, 2025\.doi:10\.1007/s10898\-025\-01533\-1\.
- Tate \[1971\]John Tate\.Rigid analytic spaces\.*Inventiones mathematicae*, 12\(4\):257–289, 1971\.
- Viterbi \[1967\]Andrew J\. Viterbi\.Error bounds for convolutional codes and an asymptotically optimum decoding algorithm\.*IEEE Transactions on Information Theory*, 13\(2\):260–269, 1967\.doi:10\.1109/TIT\.1967\.1054010\.
- Yu et al\. \[2025\]Fangchen Yu, Yanzhen Chen, Jiaxing Wei, Jianfeng Mao, Wenye Li, and Qiang Sun\.UltraTWD: Optimizing ultrametric trees for tree\-Wasserstein distance\.In*Proceedings of the 42nd International Conference on Machine Learning*, volume 267 of*Proceedings of Machine Learning Research*, 2025\.
- Zhang et al\. \[2018\]Liwen Zhang, Gregory Naitzat, and Lek\-Heng Lim\.Tropical geometry of deep neural networks\.In*International Conference on Machine Learning*, pages 5824–5832\. PMLR, 2018\.
- Zheng et al\. \[2026\]Daniel Zheng, Ingrid von Glehn, Yori Zwols, Iuliya Beloshapka, Lars Buesing, Daniel M Roy, Martin Wattenberg, Bogdan Georgiev, Tatiana Schmidt, Andrew Cowie, et al\.Ai co\-mathematician: Accelerating mathematicians with agentic ai\.*arXiv preprint arXiv:2605\.06651*, 2026\.
- Zubarev \[2025\]Alexander P Zubarev\.pp\-adic polynomial regression as alternative to neural network for approximatingpp\-adic functions of many variables\.*p\-Adic Numbers, Ultrametric Analysis and Applications*, 17\(4\):413–420, 2025\.
- Zúñiga\-Galindo et al\. \[2023\]W\. A\. Zúñiga\-Galindo, C\. He, and B\. A\. Zambrano\-Luna\.pp\-adic statistical field theory and convolutional deep Boltzmann machines\.*Progress of Theoretical and Experimental Physics*, 2023\(6\):063A01, 2023\.doi:10\.1093/ptep/ptad061\.
- Zúñiga\-Galindo \[2024\]Wilson A Zúñiga\-Galindo\.Deep neural networks: A formulation via non\-archimedean analysis\.*arXiv preprint arXiv:2402\.00094*, 2024\.
## Appendix ADisclosures
#### Limitations\.
We do not yet present formal guarantees of convergence, and our nonlinear experiments cover only one two\-layer architecture\. Restricting participation to one coordinate per group can miss descent directions that require several coordinates in that group to move together\. Exact center arithmetic \([SectionG\.2](https://arxiv.org/html/2609.25501#A7.SS2.SSS0.Px1)\) restrictsℚp\\mathbb\{Q\}\_\{p\}values toℤ\[1/p\]\\mathbb\{Z\}\[1/p\]up to app\-dependent precision\. Our evaluation is small in scale\. Largerpp\-adic experiments exist for exactly solved one\-coefficient regression\([Baker and Molla\-Aliod, 2022](https://arxiv.org/html/2609.25501#bib.bib3)\)and for fitting fixed taxonomies\([N’guessan, 2025](https://arxiv.org/html/2609.25501#bib.bib38)\); evaluating our optimizers at that scale is future work\.
#### AI use\.
We used AI models, including Gemini 3\.x\([Comanici et al\., 2025](https://arxiv.org/html/2609.25501#bib.bib18)\)and the AI co\-mathematician\([Zheng et al\., 2026](https://arxiv.org/html/2609.25501#bib.bib50)\), in preparing this publication\. We drove the research direction, conceptual foundations, exposition, and experiment design\. AI drove the implementation, technical proofs, and formal presentation, which we revised\. We accept responsibility for the contents of this work\.
## Appendix BComparison withpp\-adic Optimization Methods
Table 4:Cost of choosing one update forpp\-adic optimizers, in evaluations of the loss or of one directional derivative on the examples used for that update\. More details per method in[AppendixB](https://arxiv.org/html/2609.25501#A2)\.dd: number of model parameters;EE:pp\-adic digits searched per parameter;WW: beam width;β\>0\\beta\>0: the random walk’s weighting parameter\.†Draws are uniform, so total work matches exhaustive search\.MethodUpdate choiceCost*Zeroth\-order, discrete: moves chosen by model evaluation at candidates*Exhaustive searchevery digit assignmentpEdp^\{Ed\}Beam search\([Martins, 2025](https://arxiv.org/html/2609.25501#bib.bib33)\)next digit of all parameters; keep bestWWO\(Wpd\)O\(Wp^\{d\}\)Greedy search\([Mihara, 2026c](https://arxiv.org/html/2609.25501#bib.bib37)\)best value per coefficientO\(pE\)O\(p^\{E\}\)Random digit search\([Khrennikov and Tirozzi, 2000](https://arxiv.org/html/2609.25501#bib.bib26)\)uniformly random digit vectorsO\(1\)O\(1\)Weighted random walk\([Zubarev, 2025](https://arxiv.org/html/2609.25501#bib.bib51)\)loss\-weighted random increments≤eβ\\leq e^\{\\beta\}expected†Simulated annealing\([Mihara, 2026c](https://arxiv.org/html/2609.25501#bib.bib37)\)annealed coefficient replacementO\(1\)O\(1\)*First\-order, continuous: moves chosen by local tangent information*Joint GD \(ours\)naive enumeration of branch tuples\(p\+1\)d\(p\+1\)^\{d\}tuples at verticesGD \(approx\.\) \(ours\)steepest direction of one coordinate per groupO\(pd\)O\(pd\)Coord\. GD \(ours\)steepest direction of one coordinateO\(p\)O\(p\)#### How costs are counted\.
A directional derivative costs one pass through the model, as a loss evaluation does \([AppendixE](https://arxiv.org/html/2609.25501#A5)\);[SectionG\.2](https://arxiv.org/html/2609.25501#A7.SS2.SSS0.Px3)gives the cost of a pass for our regression experiments, where the derivatives share the forward computation, so counting a separate pass for each gives upper bounds for coordinate and grouped GD\. Entries are per update and do not say how many updates an optimizer needs\.
The methods below, except those in the last paragraph, optimize classicalpp\-adic values or finite digit prefixes\. Gradient descent permits positive\-radius states in the Berkovich hull\.
#### Classifier beam search\.
[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33)’s Algorithm 1 trains a binary linear classifier by searching the base\-ppdigits of its weights\. A node at depthδ\\deltarepresents the firstδ\\deltadigits of allddcoefficients\. At the next depth, every retained node is expanded into itspdp^\{d\}possible next\-digit vectors, inadmissible candidates are pruned using the positive\-error constraint, and theWWcandidates with the fewest total mistakes are kept\. Martins reports runtimeO\(WEnpd\)O\(WEnp^\{d\}\)when each candidate is evaluated onnnexamples\. Counting each candidate’s loss value as one evaluation, one depth costsO\(Wpd\)O\(Wp^\{d\}\), the entry in[Table4](https://arxiv.org/html/2609.25501#A2.T4)\. A finite beam can discard the prefix of the best later solution, so the procedure is an approximate, depth\-limited prefix search rather than a local optimizer in the usual gradient sense\.
#### Hamming\-graph heuristics\.
[Mihara \(2026c\)](https://arxiv.org/html/2609.25501#bib.bib37)represents the polynomial coefficients in\(ℤ/pEℤ\)d\(\\mathbb\{Z\}/p^\{E\}\\mathbb\{Z\}\)^\{d\}and optimizes a lexicographic vector that first counts errors in the earliest digit, then the next, and so on\. A Hamming graph lets an update replace one coefficient residue while holding the others fixed: a greedy sweep tries allpEp^\{E\}values for each coefficient, fordpEdp^\{E\}loss updates plus data and modular\-arithmetic cost; hill climbing repeatedly proposes a coefficient and a replacement value; simulated annealing uses the same proposals but may accept a worsening move under its temperature schedule\.
#### Random digit search\.
[Khrennikov and Tirozzi \(2000\)](https://arxiv.org/html/2609.25501#bib.bib26)train one 2\-adic threshold unit, which outputs00when\|𝒘⊤𝒙\|2≤2−k\|\\boldsymbol\{w\}^\{\\top\}\\boldsymbol\{x\}\|\_\{2\}\\leq 2^\{\-k\}and11otherwise, and minimize the fraction of wrong outputs\. Weights are restricted tokkbinary digits, a grid of2kd2^\{kd\}vectors\. For each example they sample the grid uniformly until a vector gives the right output, then sample spheres of doubling 2\-adic radius around it to collect more such vectors\. They then sample from these sets and keep the vector that is right on the most sampled examples\. Each draw costs one evaluation on one example, theO\(1\)O\(1\)entry of[Table4](https://arxiv.org/html/2609.25501#A2.T4); when the grid is small they enumerate it instead\.
#### Weighted random walk\.
[Zubarev \(2025\)](https://arxiv.org/html/2609.25501#bib.bib51)studies a Mahler\-polynomial model with the arithmetic mean ofpp\-adic residual distances\. The update adds a whole\-vector incrementξ\\xiwhose conditional density relative to Haar measure onℤpd\\mathbb\{Z\}\_\{p\}^\{d\}is proportional toexp\{−β\[L\(w\+ξ\)−L\(w\)\]\}\\exp\\\{\-\\beta\[L\(w\+\\xi\)\-L\(w\)\]\\\}\. Under the assumption that improving increments have positive Haar measure, an appropriate range ofβ\\betagives strict expected one\-step descent\.[Zubarev \(2025\)](https://arxiv.org/html/2609.25501#bib.bib51)gives an update rule but no sampler\. Since the loss is nonnegative, rejection sampling from Haar measure with acceptance probabilityexp\(−βL\(w\+ξ\)\)\\exp\(\-\\beta L\(w\+\\xi\)\), in their notation, draws it exactly at one loss evaluation per proposal\. Since the loss is at most one for data and parameters inℤp\\mathbb\{Z\}\_\{p\}, the expected number of proposals per step is at mosteβe^\{\\beta\}\. For fixedβ\\beta, the random\-walk row of[Table4](https://arxiv.org/html/2609.25501#A2.T4)therefore lists an expected cost independent ofdd,EE, andpp; their expected\-descent result holds only for a range ofβ\\betathat depends on the current point\. Each proposal is a uniform draw fromℤpd\\mathbb\{Z\}\_\{p\}^\{d\}, so fixingEEdigits of every coefficient takes as many proposals in expectation as exhaustive search\.
#### Methods that optimize real numbers\.
Real\-parameter models appear in our experiments as the Euclidean rows of[Tables2](https://arxiv.org/html/2609.25501#S6.T2)and[3](https://arxiv.org/html/2609.25501#S6.T3); we do not claim thatpp\-adic models outperform them, and the one\-hot model also fits the modulo tasks\. We do not run the following published methods\.[Zúñiga\-Galindo \(2024\)](https://arxiv.org/html/2609.25501#bib.bib53)trains real weights by ordinary gradient descent; the group’s implemented example trains real\-valued weights on unlabeled MNIST by contrastive divergence and shows reconstructions\([Zúñiga\-Galindo et al\., 2023](https://arxiv.org/html/2609.25501#bib.bib52)\)\. Adam–VAPO\([N’guessan, 2025](https://arxiv.org/html/2609.25501#bib.bib38)\)runs Adam on one real latent per weight and rounds it to a base\-ppdigit; its gradient is given for v\-PuNN’s per\-digit heads, which map a parent digit to a child digit in a fixed hierarchy, and its greedy variant compares a digit with its two neighbors modulopp\. Hyperbolic embeddings\([Nickel and Kiela, 2017](https://arxiv.org/html/2609.25501#bib.bib39)\)and ultrametric fitting\([Chierchia and Perret, 2019](https://arxiv.org/html/2609.25501#bib.bib16)\)learn real coordinates or real edge weights for given data points and have no modelf\(𝒙,𝜽\)f\(\\boldsymbol\{x\};\\boldsymbol\{\\theta\}\)to train on our tasks\.
## Appendix CFormal Geometric Definitions
A Euclidean parameter inherits its possible directions and unit speed from its ambient vector space\. Gradient descent needs the corresponding data on the Berkovich hull\.
#### The Berkovich affine line\.
A multiplicative seminorm on a ringAAis a map\|⋅\|x:A→ℝ≥0\|\\cdot\|\_\{x\}:A\\to\\mathbb\{R\}\_\{\\geq 0\}satisfying\|0\|x=0\|0\|\_\{x\}=0,\|1\|x=1\|1\|\_\{x\}=1,\|f\+g\|x≤max\{\|f\|x,\|g\|x\}\|f\+g\|\_\{x\}\\leq\\max\\\{\|f\|\_\{x\},\|g\|\_\{x\}\\\}, and\|fg\|x=\|f\|x\|g\|x\|fg\|\_\{x\}=\|f\|\_\{x\}\|g\|\_\{x\}\. The Berkovich affine line overK=ℚpK=\\mathbb\{Q\}\_\{p\}is
𝔸K1,an=ℳ\(K\[T\]\),\\mathbb\{A\}^\{1,\\mathrm\{an\}\}\_\{K\}=\\mathcal\{M\}\(K\[T\]\),the set of all multiplicative seminorms onK\[T\]K\[T\]whose restriction to constants is the given absolute value,\|c\|x=\|c\|p\|c\|\_\{x\}=\|c\|\_\{p\}forc∈Kc\\in K\. It carries the coarsest topology for whichx↦\|P\|xx\\mapsto\|P\|\_\{x\}is continuous for everyP∈K\[T\]P\\in K\[T\]\. An ordinary pointa∈Ka\\in Kembeds by evaluation,\|P\|a:=\|P\(a\)\|p\|P\|\_\{a\}:=\|P\(a\)\|\_\{p\}\.
###### C\.1Disk points and representatives\.
Fora∈Ka\\in Kandr\>0r\>0, the disk pointζa,r\\zeta\_\{a,r\}is the multiplicative seminorm
\|∑n=0Ncn\(T−a\)n\|ζa,r:=maxn\|cn\|prn\.\\Bigl\|\\sum\_\{n=0\}^\{N\}c\_\{n\}\(T\-a\)^\{n\}\\Bigr\|\_\{\\zeta\_\{a,r\}\}:=\\max\_\{n\}\|c\_\{n\}\|\_\{p\}\\,r^\{n\}\.We also writeζa,0=a\\zeta\_\{a,0\}=afor evaluation at the ordinary pointaa\.
###### C\.2Representatives\.
Forr,s≥0r,s\\geq 0,ζa,r=ζb,s\\zeta\_\{a,r\}=\\zeta\_\{b,s\}if and only ifr=sr=sand\|a−b\|p≤r\|a\-b\|\_\{p\}\\leq r\.
###### Proof\.
If the two seminorms are equal, evaluatingT−aT\-aandT−bT\-bgivesr=max\{s,\|a−b\|p\}r=\\max\\\{s,\|a\-b\|\_\{p\}\\\}ands=max\{r,\|a−b\|p\}s=\\max\\\{r,\|a\-b\|\_\{p\}\\\}; hencer=sr=sand\|a−b\|p≤r\|a\-b\|\_\{p\}\\leq r\. Conversely, if\|a−b\|p≤r\|a\-b\|\_\{p\}\\leq r, expanding a polynomial about either center and using the ultrametric inequality gives the same Gauss seminorm\. ∎
###### C\.3The scalar hull and its arcs\.
The hullΓp\\Gamma\_\{p\}consists exactly of the pointsζa,r\\zeta\_\{a,r\}witha∈ℚpa\\in\\mathbb\{Q\}\_\{p\}andr≥0r\\geq 0\. Forx=ζa,rx=\\zeta\_\{a,r\}andy=ζb,sy=\\zeta\_\{b,s\}, setR=max\{r,s,\|a−b\|p\}R=\\max\\\{r,s,\|a\-b\|\_\{p\}\\\}\. Their arc in the Berkovich affine line is
\[x,y\]=\{ζa,t:r≤t≤R\}∪\{ζb,t:s≤t≤R\}\.\[x,y\]=\\\{\\zeta\_\{a,t\}:r\\leq t\\leq R\\\}\\cup\\\{\\zeta\_\{b,t\}:s\\leq t\\leq R\\\}\.The two radius segments meet only atζa,R=ζb,R\\zeta\_\{a,R\}=\\zeta\_\{b,R\}\.
###### Proof\.
Fixa∈ℚpa\\in\\mathbb\{Q\}\_\{p\}\. For each polynomialP\(T\)=∑n=0Ncn\(T−a\)nP\(T\)=\\sum\_\{n=0\}^\{N\}c\_\{n\}\(T\-a\)^\{n\}, the function
t⟼\|P\|ζa,t=max0≤n≤N\|cn\|ptnt\\longmapsto\|P\|\_\{\\zeta\_\{a,t\}\}=\\max\_\{0\\leq n\\leq N\}\|c\_\{n\}\|\_\{p\}t^\{n\}is continuous on\[0,∞\)\[0,\\infty\), with its value at zero interpreted as\|P\(a\)\|p\|P\(a\)\|\_\{p\}\. By the defining topology of the Berkovich line,t↦ζa,tt\\mapsto\\zeta\_\{a,t\}is continuous\. It is injective because evaluatingT−aT\-arecoverstt\.
Foru∈\[r,R\]u\\in\[r,R\]andv∈\[s,R\]v\\in\[s,R\],[LemmaC\.2](https://arxiv.org/html/2609.25501#A3.Thmtheorem2)givesζa,u=ζb,v\\zeta\_\{a,u\}=\\zeta\_\{b,v\}exactly whenu=v≥\|a−b\|pu=v\\geq\|a\-b\|\_\{p\}\. These bounds forceu=v=Ru=v=R\. Thus, unlessx=yx=y, the two segments concatenate to a continuous injective path fromxxtoyy\. The Berkovich line is Hausdorff since polynomial evaluations separate its points, so this compact path is homeomorphic to a closed interval\. By[Poineau and Turchetti \(2020, Proposition I\.6\.12\)](https://arxiv.org/html/2609.25501#bib.bib40), the Berkovich line overℚp\\mathbb\{Q\}\_\{p\}has a unique arc between any two distinct points\. Our constructed path is therefore\[x,y\]\[x,y\]\. Whenx=yx=y, both segments are the same singleton\.
Takingr=s=0r=s=0shows that every arc between ordinarypp\-adic points consists of points of the stated form\. Conversely, givenζa,r\\zeta\_\{a,r\}, choose an integernnwithpn≥rp^\{n\}\\geq rand putb=a\+p−nb=a\+p^\{\-n\}\. Since\|a−b\|p=pn\|a\-b\|\_\{p\}=p^\{n\}, the arc formula placesζa,r\\zeta\_\{a,r\}on\[a,b\]\[a,b\]\. Taking the union of these arcs proves the asserted description ofΓp\\Gamma\_\{p\}\. ∎
Forp=3p=3,ζ0,1\\zeta\_\{0,1\}is the Gauss point, andζ0,1=ζ1,1\\zeta\_\{0,1\}=\\zeta\_\{1,1\}since\|0−1\|3≤1\|0\-1\|\_\{3\}\\leq 1\.
The points of positive radius identify with the Bruhat–Tits tree ofPGL2\(ℚp\)\\mathrm\{PGL\}\_\{2\}\(\\mathbb\{Q\}\_\{p\}\), thepp\-adic counterpart of the hyperbolic plane\([Rémy et al\., 2014](https://arxiv.org/html/2609.25501#bib.bib42)\)\. However, this tree has its own metric, under which addingℚp\\mathbb\{Q\}\_\{p\}as leaves makes its numbers infinitely distant\.
###### C\.4Product states as seminorms\.
A product state\(ζc1,r1,…,ζcd,rd\)\(\\zeta\_\{c\_\{1\},r\_\{1\}\},\\ldots,\\zeta\_\{c\_\{d\},r\_\{d\}\}\)defines a multiplicative seminorm onℚp\[T1,…,Td\]\\mathbb\{Q\}\_\{p\}\[T\_\{1\},\\ldots,T\_\{d\}\]: writingf=∑IaI\(T−c\)If=\\sum\_\{I\}a\_\{I\}\(T\-c\)^\{I\}, set\|f\|=maxI\|aI\|pr1i1⋯rdid\|f\|=\\max\_\{I\}\|a\_\{I\}\|\_\{p\}\\,r\_\{1\}^\{i\_\{1\}\}\\cdots r\_\{d\}^\{i\_\{d\}\}—the several\-variable Gauss seminorm, multiplicative by the Gauss lemma\([Bosch et al\., 1984](https://arxiv.org/html/2609.25501#bib.bib10)\)\. Product states are therefore points of thedd\-dimensional analytification, and the forward rule of[Section3\.2](https://arxiv.org/html/2609.25501#S3.SS2)evaluates exactly this seminorm\.
###### C\.5Coordinate images do not determine the joint state\.
Scalar coordinate states do not, in general, determine a point of the higher\-dimensional analytification\. For example, letζ=ζ0,1\\zeta=\\zeta\_\{0,1\}, letξ\\xibe the product state\(ζ,ζ\)\(\\zeta,\\zeta\), and define\|f\|η:=\|f\(T,T\)\|ζ\|f\|\_\{\\eta\}:=\|f\(T,T\)\|\_\{\\zeta\}forf∈ℚp\[T1,T2\]f\\in\\mathbb\{Q\}\_\{p\}\[T\_\{1\},T\_\{2\}\]\. Both points restrict toζ\\zetaon each coordinate, but
\|T1−T2\|ξ=1,\|T1−T2\|η=0\.\|T\_\{1\}\-T\_\{2\}\|\_\{\\xi\}=1,\\qquad\|T\_\{1\}\-T\_\{2\}\|\_\{\\eta\}=0\.Atη\\eta, the parameters satisfyT1=T2T\_\{1\}=T\_\{2\}although both scalar radii equal one\. The product stateξ\\xihas the same scalar restrictions but does not encode this relation\.
The metricdarcd\_\{\\text\{arc\}\}of[eq\.5](https://arxiv.org/html/2609.25501#S3.E5)does not depend on the chosen center representatives \([LemmaC\.2](https://arxiv.org/html/2609.25501#A3.Thmtheorem2)\)\.
A metric space\(Y,dY\)\(Y,d\_\{Y\}\)is*hyperconvex*if every family of closed balls\{B¯Y\(yi,ri\)\}i∈I\\\{\\overline\{B\}\_\{Y\}\(y\_\{i\},r\_\{i\}\)\\\}\_\{i\\in I\}withri≥0r\_\{i\}\\geq 0satisfies
dY\(yi,yj\)≤ri\+rjfor alli,j∈I⟹⋂i∈IB¯Y\(yi,ri\)≠∅\.d\_\{Y\}\(y\_\{i\},y\_\{j\}\)\\leq r\_\{i\}\+r\_\{j\}\\ \\text\{ for all \}i,j\\in I\\quad\\Longrightarrow\\quad\\bigcap\_\{i\\in I\}\\overline\{B\}\_\{Y\}\(y\_\{i\},r\_\{i\}\)\\neq\\varnothing\.The*tight span*, or*metric envelope*,E\(X\)E\(X\)of a metric spaceXXis a hyperconvex space containing an isometric copy ofXX, with no proper hyperconvex subspace containing that copy\. It is also called the ordinary metric injective hull\([Lang et al\., 2013](https://arxiv.org/html/2609.25501#bib.bib27), Secs\. 2–3\)\.
###### C\.6Thepp\-adic metric envelope\.
For the scalar hullΓp\\Gamma\_\{p\}of[Section3\.1](https://arxiv.org/html/2609.25501#S3.SS1), equipped with the metricdarcd\_\{\\text\{arc\}\}of[Equation5](https://arxiv.org/html/2609.25501#S3.E5), the mapx↦ζx,0x\\mapsto\\zeta\_\{x,0\}realizes\(Γp,12darc\)\(\\Gamma\_\{p\},\\tfrac\{1\}\{2\}d\_\{\\text\{arc\}\}\)as the tight span, or metric envelope, of\(ℚp,dp\)\(\\mathbb\{Q\}\_\{p\},d\_\{p\}\)\. Thus
E\(ℚp,dp\)≅\(Γp,12darc\),E\(\\mathbb\{Q\}\_\{p\},d\_\{p\}\)\\cong\(\\Gamma\_\{p\},\\tfrac\{1\}\{2\}d\_\{\\text\{arc\}\}\),with a unique isometry identifying each ordinarypp\-adic point with its radius\-zero disk point\.
###### Proof\.
Use the disk points of[DefinitionC\.1](https://arxiv.org/html/2609.25501#A3.Thmtheorem1), with representatives identified by[LemmaC\.2](https://arxiv.org/html/2609.25501#A3.Thmtheorem2)\. The arc description in[Equation3](https://arxiv.org/html/2609.25501#S3.E3)and the length formula in[Equation5](https://arxiv.org/html/2609.25501#S3.E5)make\(Γp,12darc\)\(\\Gamma\_\{p\},\\tfrac\{1\}\{2\}d\_\{\\text\{arc\}\}\)anℝ\\mathbb\{R\}\-tree\. Indeed, finitely many upward radius segments can be extended to a common height; they merge and never separate, forming a finite tree whose edge lengths are half the radius increments\. Its distances agree with12darc\\tfrac\{1\}\{2\}d\_\{\\text\{arc\}\}, so all metric triangles are tripods\.[Equation5](https://arxiv.org/html/2609.25501#S3.E5)also gives12darc\(ζx,0,ζy,0\)=dp\(x,y\)\\tfrac\{1\}\{2\}d\_\{\\text\{arc\}\}\(\\zeta\_\{x,0\},\\zeta\_\{y,0\}\)=d\_\{p\}\(x,y\)\.
It remains to prove completeness\. LetCMC\_\{M\}be the closed ball of radiusM≥0M\\geq 0aboutζ0,0\\zeta\_\{0,0\}for12darc\\tfrac\{1\}\{2\}d\_\{\\text\{arc\}\}\. By[Equation5](https://arxiv.org/html/2609.25501#S3.E5),
ζx,r∈CM⟹max\{\|x\|p,r\}−r2≤M⟹r≤2M,\|x\|p≤2M\.\\zeta\_\{x,r\}\\in C\_\{M\}\\quad\\Longrightarrow\\quad\\max\\\{\|x\|\_\{p\},r\\\}\-\\frac\{r\}\{2\}\\leq M\\quad\\Longrightarrow\\quad r\\leq 2M,\\quad\|x\|\_\{p\}\\leq 2M\.ConsequentlyCMC\_\{M\}is contained in the image of the compact set
\{x∈ℚp:\|x\|p≤2M\}×\[0,2M\]\\\{x\\in\\mathbb\{Q\}\_\{p\}:\|x\|\_\{p\}\\leq 2M\\\}\\times\[0,2M\]underq\(x,r\)=ζx,rq\(x,r\)=\\zeta\_\{x,r\}\. The same metric formula gives
12darc\(q\(x,r\),q\(y,s\)\)≤dp\(x,y\)\+12\|r−s\|,\\frac\{1\}\{2\}d\_\{\\text\{arc\}\}\(q\(x,r\),q\(y,s\)\)\\leq d\_\{p\}\(x,y\)\+\\frac\{1\}\{2\}\|r\-s\|,soqqis continuous\. HenceCMC\_\{M\}, being a closed subset of that compact image, is compact\. Every Cauchy sequence lies in someCMC\_\{M\}, and therefore converges inΓp\\Gamma\_\{p\}\.
For a subset of a completeℝ\\mathbb\{R\}\-tree, the closure of the union of geodesics joining its points is its tight span\([Basso and Sidler, 2023](https://arxiv.org/html/2609.25501#bib.bib7), Lem\. 2\.3\)\. Apply this to the embeddedℚp\\mathbb\{Q\}\_\{p\}\. By the definition ofΓp\\Gamma\_\{p\}in[Section3\.1](https://arxiv.org/html/2609.25501#S3.SS1), this union is already all ofΓp\\Gamma\_\{p\}\. The required identification follows, and uniqueness fixing the embeddedℚp\\mathbb\{Q\}\_\{p\}is the standard uniqueness of tight spans\([Lang et al\., 2013](https://arxiv.org/html/2609.25501#bib.bib27), Sec\. 3\)\. ∎
Descent selects among the directions leaving a point\.
###### C\.7Directions and metric tangent cone\.
Forx∈Γpx\\in\\Gamma\_\{p\}, letΣxΓp:=π0\(Γp∖\{x\}\)\\Sigma\_\{x\}\\Gamma\_\{p\}:=\\pi\_\{0\}\(\\Gamma\_\{p\}\\setminus\\\{x\\\}\)be the set of incident tangent directions inΓp\\Gamma\_\{p\}, whereπ0\\pi\_\{0\}denotes connected components\. A direction is represented by a unit\-speed geodesic germγ:\[0,t0\)→Γp\\gamma:\[0,t\_\{0\}\)\\to\\Gamma\_\{p\}withγ\(0\)=x\\gamma\(0\)=x, which we identify with the ray it represents\. At a pointa∈Ka\\in K, this set has one member,γ\(t\)=ζa,t\\gamma\(t\)=\\zeta\_\{a,t\}\. At a vertex it hasp\+1p\+1members, the parent and theppchild directions\. Changing center or scale representatives may relabel the children but not the underlying ray;[eq\.10](https://arxiv.org/html/2609.25501#S4.E10)fixes them so that the label is a digit\.
Themetric tangent coneTxΓpT\_\{x\}\\Gamma\_\{p\}consists of velocities\(q,s\)\(q,s\)withq∈ΣxΓpq\\in\\Sigma\_\{x\}\\Gamma\_\{p\}ands≥0s\\geq 0, with all zero\-speed pairs identified\. Its metric is
dT\(\(q,s\),\(q′,t\)\)=\{\|s−t\|,q=q′,s\+t,q≠q′\.d\_\{T\}\\bigl\(\(q,s\),\(q^\{\\prime\},t\)\\bigr\)=\\begin\{cases\}\|s\-t\|,&q=q^\{\\prime\},\\\\ s\+t,&q\\neq q^\{\\prime\}\.\\end\{cases\}
Reparametrizing gives𝜸c𝒗\(h\)=𝜸𝒗\(ch\)\\boldsymbol\{\\gamma\}\_\{c\\boldsymbol\{v\}\}\(h\)=\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\}\(ch\)forc≥0c\\geq 0, soD𝒗LD\_\{\\boldsymbol\{v\}\}Lis positively homogeneous:Dc𝒗L=cD𝒗LD\_\{c\\boldsymbol\{v\}\}L=c\\,D\_\{\\boldsymbol\{v\}\}L\. Hence[eq\.12](https://arxiv.org/html/2609.25501#S4.E12)may be evaluated at any positive multiple of𝒗∗\\boldsymbol\{v\}^\{\*\}with the time rescaled accordingly\.
#### Coupled parameter groups for affine models\.
Fix the parameters and minibatch\. Index the scalar components of the model’s output on the minibatch examples bya∈ℛa\\in\\mathcal\{R\}\. WriteFa\(u\)=ba\+∑jaajujF\_\{a\}\(u\)=b\_\{a\}\+\\sum\_\{j\}a\_\{aj\}u\_\{j\}, combining repeated occurrences of each parameter exactly\. Forθj=ζcj,rj\\theta\_\{j\}=\\zeta\_\{c\_\{j\},r\_\{j\}\}, define
Ra=max\(\{Ra0\}∪\{\|aaj\|prj:j∈𝒥a\}\),Aa=\{j∈𝒥a:\|aaj\|prj=Ra\},R\_\{a\}=\\max\\\!\\left\(\\\{R\_\{a\}^\{0\}\\\}\\cup\\\{\|a\_\{aj\}\|\_\{p\}r\_\{j\}:j\\in\\mathcal\{J\}\_\{a\}\\\}\\right\),\\qquad A\_\{a\}=\\\{j\\in\\mathcal\{J\}\_\{a\}:\|a\_\{aj\}\|\_\{p\}r\_\{j\}=R\_\{a\}\\\},where𝒥a\\mathcal\{J\}\_\{a\}indexes the nonzero coefficients andRa0R\_\{a\}^\{0\}is a fixed radius contribution, zero when absent\. The active setAaA\_\{a\}retains every tie, including parameters that will remain stationary during the update\.
Let𝒛a=φa\(Fa\(𝜽\)\)\\boldsymbol\{z\}\_\{a\}=\\varphi\_\{a\}\(F\_\{a\}\(\\boldsymbol\{\\theta\}\)\)be the vector of real quantities computed from outputaafor use in the loss\. WriteL=ℓ\(\(𝒛a\)a∈ℛ\)L=\\ell\(\(\\boldsymbol\{z\}\_\{a\}\)\_\{a\\in\\mathcal\{R\}\}\), withℓ\\elldifferentiable at the current values, and suppose the directional derivatives of𝒛a\\boldsymbol\{z\}\_\{a\}exist\. The chain rule gives
D𝒗L=∑aca\(𝒗\),ca\(𝒗\)=⟨∇𝒛aℓ,D𝒗𝒛a⟩\.D\_\{\\boldsymbol\{v\}\}L=\\sum\_\{a\}c\_\{a\}\(\\boldsymbol\{v\}\),\\qquad c\_\{a\}\(\\boldsymbol\{v\}\)=\\left\\langle\\nabla\_\{\\boldsymbol\{z\}\_\{a\}\}\\ell,D\_\{\\boldsymbol\{v\}\}\\boldsymbol\{z\}\_\{a\}\\right\\rangle\.
A parameter outsideAaA\_\{a\}has a radius contribution strictly belowRaR\_\{a\}\. For sufficiently short motion with fixed finite speeds, that contribution remains below the maximum\. At a parameter vertex, its center shift also has norm belowRaR\_\{a\}, so the output germ is unchanged\. ThusD𝒗𝒛aD\_\{\\boldsymbol\{v\}\}\\boldsymbol\{z\}\_\{a\}, and henceca\(𝒗\)c\_\{a\}\(\\boldsymbol\{v\}\), depends only on the velocities of parameters inAaA\_\{a\}\.
In the affine implementation, collect identical functions to writeD𝒗L=∑hαhh\(𝒗\)D\_\{\\boldsymbol\{v\}\}L=\\sum\_\{h\}\\alpha\_\{h\}h\(\\boldsymbol\{v\}\)\. Functions are identical only if they agree for every allowed joint velocity, including every child direction at a vertex\. For eachαh≠0\\alpha\_\{h\}\\neq 0, group the parameters on whichhhdepends, merging overlapping groups\. Summing terms within each group gives the decomposition below\.
### C\.1Coordinate restriction
Fix the parameter state and minibatch\. Suppose a partition𝒢\\mathcal\{G\}satisfies
D𝒗L=∑G∈𝒢ψG\(𝒗G\)\.D\_\{\\boldsymbol\{v\}\}L=\\sum\_\{G\\in\\mathcal\{G\}\}\\psi\_\{G\}\(\\boldsymbol\{v\}\_\{G\}\)\.Let𝒱\\mathcal\{V\}be the product of the coordinate velocity sets allowed by the parameter domain\. Select one coordinate from each group, forming a setSS, and put𝒱S=\{𝒗∈𝒱:si=0fori∉S\}\\mathcal\{V\}\_\{S\}=\\\{\\boldsymbol\{v\}\\in\\mathcal\{V\}:s\_\{i\}=0\\text\{ for \}i\\notin S\\\}\. WriteμG\\mu\_\{G\}for the least slope over unit velocities supported on groupGG’s selected coordinate, a minimum over its incident directions\. For unit𝒗∈𝒱S\\boldsymbol\{v\}\\in\\mathcal\{V\}\_\{S\}, putwG=‖𝒗G‖2w\_\{G\}=\\\|\\boldsymbol\{v\}\_\{G\}\\\|\_\{2\}; homogeneity givesD𝒗L=∑G:wG\>0wGψG\(𝒗G/wG\)≥⟨w,μ⟩D\_\{\\boldsymbol\{v\}\}L=\\sum\_\{G:w\_\{G\}\>0\}w\_\{G\}\\,\\psi\_\{G\}\(\\boldsymbol\{v\}\_\{G\}/w\_\{G\}\)\\geq\\langle w,\\mu\\rangle\. If everyμG≥0\\mu\_\{G\}\\geq 0, every such derivative is nonnegative, so[eq\.12](https://arxiv.org/html/2609.25501#S4.E12)requests non\-positive time and no coordinate moves\. Otherwise, Cauchy–Schwarz over\{w≥0,‖w‖2=1\}\\\{w\\geq 0,\\\|w\\\|\_\{2\}=1\\\}gives the minimum atwG⋆∝max\(0,−μG\)w^\{\\star\}\_\{G\}\\propto\\max\(0,\-\\mu\_\{G\}\), attained by choosing a minimizing direction for each selected coordinate with positive weight\. These directions use the original coordinate derivatives, and a group withμG≥0\\mu\_\{G\}\\geq 0receives zero speed\.
#### Equivariance\.
Under an isometry, unit\-speed paths and their directional derivatives are preserved, provided the objective is transformed accordingly\. The following proposition concerns the unrestricted gradient rule\.
###### C\.8Isometric equivariance of gradient descent\.
Letggbe a surjective isometry of\(Γpd,darc\)\(\\Gamma\_\{p\}^\{d\},d\_\{\\text\{arc\}\}\)and defineLg=L∘g−1L^\{g\}=L\\circ g^\{\-1\}\. For every unit velocity𝐯\\boldsymbol\{v\}atxxfor whichD𝐯L\(x\)D\_\{\\boldsymbol\{v\}\}L\(x\)exists,Dg∗𝐯Lg\(gx\)=D𝐯L\(x\)D\_\{g\_\{\*\}\\boldsymbol\{v\}\}L^\{g\}\(gx\)=D\_\{\\boldsymbol\{v\}\}L\(x\)\. Thusggpreserves the minimizing directions and assigned speeds in[Equation12](https://arxiv.org/html/2609.25501#S4.E12)\.
###### Proof\.
The image underggof a unit\-speed geodesic germ is again a unit\-speed geodesic germ, andLg\(g𝜸\(t\)\)=L\(𝜸\(t\)\)L^\{g\}\(g\\boldsymbol\{\\gamma\}\(t\)\)=L\(\\boldsymbol\{\\gamma\}\(t\)\)\. The difference quotients, minimizing directional derivatives, and assigned speeds therefore agree\. ∎
For grouped descent, assume the transformation carries each group, each coordinate’s allowed directions, and its next vertices to their counterparts\. Each coordinate retains whether it is awaiting a turn\. Uniform selection among awaiting coordinates and among minimizing directions then gives corresponding velocities in distribution\. Isometries preserve distances to the next vertices, so the same requested time gives the same clipping time\. The scheduling rule updates the awaiting\-turn flags identically in the two runs\.
An isometry acts on the optimizer state by mapping stored directions and carrying each coordinate’s scalar moments and update counter with that coordinate\. We denote quantities for the transformed objectiveLg=L∘g−1L^\{g\}=L\\circ g^\{\-1\}by primes:xt′x^\{\\prime\}\_\{t\},mt′m^\{\\prime\}\_\{t\},vt′v^\{\\prime\}\_\{t\}, andst′s^\{\\prime\}\_\{t\}\.
###### C\.9Equivariance of Momentum and Adam\.
The coordinate Momentum and Adam update formulas of[Sections4\.1](https://arxiv.org/html/2609.25501#S4.SS1)and[G\.1](https://arxiv.org/html/2609.25501#A7.SS1)are equivariant in distribution under factorwise tree isometries and coordinate permutations, acting on the objective and optimizer state as above\.
###### Proof\.
Choose corresponding scheduled coordinates and tied directions in the two runs\. Their uniform distributions are preserved by the isometry and coordinate permutation\. Writegt\(γ\)g\_\{t\}\(\\gamma\)andgt′\(γ′\)g^\{\\prime\}\_\{t\}\(\\gamma^\{\\prime\}\)for the current directional derivatives of the coordinate loss in the two runs\. An isometry maps the upward direction to the upward direction and the children of a vertex to the children of its image\. Together with[PropositionC\.8](https://arxiv.org/html/2609.25501#A3.Thmtheorem8), this gives
gt′\(g∗γ\)=gt\(γ\),g^\{\\prime\}\_\{t\}\(g\_\{\*\}\\gamma\)=g\_\{t\}\(\\gamma\),so the downward derivatives and the children’s excesses correspond\. By induction on the updates, so doutu\_\{t\},dtd\_\{t\}, and the averages stored at corresponding vertices\. Thereforemt′\(g∗γ\)=mt\(γ\)m^\{\\prime\}\_\{t\}\(g\_\{\*\}\\gamma\)=m\_\{t\}\(\\gamma\), and the condition for moving into a child holds forγ\\gammaexactly when it holds forg∗γg\_\{\*\}\\gamma\. For Adam, the minimum current directional derivative, stored second moment, and update counter agree, sovt′=vtv^\{\\prime\}\_\{t\}=v\_\{t\}and the bias corrections agree\. Thus both methods satisfy
st′\(g∗γ\)=st\(γ\)\.s^\{\\prime\}\_\{t\}\(g\_\{\*\}\\gamma\)=s\_\{t\}\(\\gamma\)\.Corresponding tie choices select corresponding paths with equal requested distances\. Isometries preserve vertices and distances, so clipping givesxt\+1′=g\(xt\+1\)x^\{\\prime\}\_\{t\+1\}=g\(x\_\{t\+1\}\)\. The stored averages and counters continue to correspond after either a move or a stay\. ∎
The result extends to grouped Momentum and Adam under the group, direction, and boundary conditions above\. Select coordinates and tied directions in the original and transformed runs that map to each other under the transformation\. The preceding proof applies to each selected coordinate, while unselected coordinates retain their state\. With the same learning rateαt\\alpha\_\{t\}, equal speeds and distances to the next vertices give the same step size after clipping\.
Fordarcd\_\{\\text\{arc\}\}, this applies to translations, unit affine scalings, their factorwise product actions, and coordinate permutations\.
## Appendix DEvaluation and Extension on Product States
For analytic functions, we assume convergence of the centered series in the product Gauss seminorm: its weighted terms\|aα\|p∏jrjαj\|a\_\{\\alpha\}\|\_\{p\}\\prod\_\{j\}r\_\{j\}^\{\\alpha\_\{j\}\}tend to zero as\|α\|→∞\|\\alpha\|\\to\\infty\. Zero\-radius coordinates are first specialized to their centers\.
In the notation of[Section3\.2](https://arxiv.org/html/2609.25501#S3.SS2), the centered Taylor expansion is
Fk,i\(𝒛\)=Fk,i\(𝒄\)\+∑\|𝑰\|≥1a𝑰∏j=1dk−1\(zj−cj\)Ij=Fk,i\(𝒄\)\+a1,…,0\(z1−c1\)\+⋯\.F\_\{k,i\}\(\\boldsymbol\{z\}\)\\;=F\_\{k,i\}\(\\boldsymbol\{c\}\)\+\\sum\_\{\|\\boldsymbol\{I\}\|\\geq 1\}a\_\{\\boldsymbol\{I\}\}\\prod\_\{j=1\}^\{d\_\{k\-1\}\}\(z\_\{j\}\-c\_\{j\}\)^\{I\_\{j\}\}=F\_\{k,i\}\(\\boldsymbol\{c\}\)\+a\_\{1,\\dotsc,0\}\(z\_\{1\}\-c\_\{1\}\)\+\\dotsb\.\(16\)
The product Gauss seminorm of[DefinitionC\.4](https://arxiv.org/html/2609.25501#A3.Thmtheorem4)is independent of the chosen center representatives: apply[LemmaC\.2](https://arxiv.org/html/2609.25501#A3.Thmtheorem2)in each coordinate\. The weighted\-maximum formula is symmetric in the coordinates, so the order in which they are evaluated does not matter\.
###### D\.1Representative invariance of tangent data\.
Equivalent representatives give the same output state and the same loss derivative along each geometric ray\.
###### Proof\.
The preceding argument and[CorollaryD\.4](https://arxiv.org/html/2609.25501#A4.Thmtheorem4)give the same output state for equivalent representatives\. The loss along a fixed geometric ray is therefore unchanged, as is its directional derivative\. ∎
Changing representatives may relabel child directions\. The centered expansion, including its active\-term list, can change under recentering\.
###### D\.3Functoriality of affinoid spectra\.
LetKKbe a complete non\-Archimedean field, letAAandBBbeKK\-affinoid algebras, and letφ:B→A\\varphi:B\\to Abe a boundedKK\-algebra homomorphism\. Thenφ\\varphidetermines a unique morphism ofKK\-affinoid analytic spaces
ℳ\(A\)⟶ℳ\(B\),x⟼\(b↦\|φ\(b\)\|x\)\.\\mathcal\{M\}\(A\)\\longrightarrow\\mathcal\{M\}\(B\),\\qquad x\\longmapsto\\bigl\(b\\mapsto\|\\varphi\(b\)\|\_\{x\}\\bigr\)\.OnKK\-rational points, this morphism agrees with the map represented byφ\\varphi\.
###### Proof\.
Forx∈ℳ\(A\)x\\in\\mathcal\{M\}\(A\), the ruleb↦\|φ\(b\)\|xb\\mapsto\|\\varphi\(b\)\|\_\{x\}is a bounded multiplicative seminorm onBBthat extends the norm onKK, and hence defines a point ofℳ\(B\)\\mathcal\{M\}\(B\)\. Functoriality of the Berkovich spectrum makes this map analytic\. Whenxxis evaluation at aKK\-rational point, the same formula is evaluation after the original affinoid map\. Uniqueness follows because morphisms of affinoid spectra are contravariantly determined by their bounded algebra homomorphisms, not by density ofKK\-points \([RemarkD\.2](https://arxiv.org/html/2609.25501#A4.Thmtheorem2)\)\. ∎
###### D\.4Pushforward of a product state\.
Letx=\(ζcj,rj\)j=1dx=\(\\zeta\_\{c\_\{j\},r\_\{j\}\}\)\_\{j=1\}^\{d\}and letffhave centered expansionf\(T\)=f\(c\)\+∑\|α\|≥1aα\(T−c\)αf\(T\)=f\(c\)\+\\sum\_\{\|\\alpha\|\\geq 1\}a\_\{\\alpha\}\(T\-c\)^\{\\alpha\}, withR=max\|α\|≥1\|aα\|p∏jrjαjR=\\max\_\{\|\\alpha\|\\geq 1\}\|a\_\{\\alpha\}\|\_\{p\}\\prod\_\{j\}r\_\{j\}^\{\\alpha\_\{j\}\}\. The image ofxxunder the morphism of[PropositionD\.3](https://arxiv.org/html/2609.25501#A4.Thmtheorem3)induced byg↦g∘fg\\mapsto g\\circ fisζf\(c\),R\\zeta\_\{f\(c\),R\}; that is,\|g∘f\|x=\|g\|f\(c\),R\|g\\circ f\|\_\{x\}=\|g\|\_\{f\(c\),R\}for every polynomialggin one variable\. For vector\-valuedffthe statement applies to each output coordinate, which is the display[eq\.7](https://arxiv.org/html/2609.25501#S3.E7)that the forward evaluation computes output by output\.
###### Proof\.
Writeh=f−f\(c\)h=f\-f\(c\), so\|h\|x=R\|h\|\_\{x\}=R, and expandg\(S\)=∑n≥0qn\(S−f\(c\)\)ng\(S\)=\\sum\_\{n\\geq 0\}q\_\{n\}\(S\-f\(c\)\)^\{n\}, so thatg∘f=∑nqnhng\\circ f=\\sum\_\{n\}q\_\{n\}h^\{n\}and\|g\|f\(c\),R=maxn\|qn\|pRn=:M\|g\|\_\{f\(c\),R\}=\\max\_\{n\}\|q\_\{n\}\|\_\{p\}R^\{n\}=:M\. IfR=0R=0, then\|h\|x=0\|h\|\_\{x\}=0, so every positive power ofhhhas seminorm zero and both sides equal\|q0\|p\|q\_\{0\}\|\_\{p\}\. Now assumeR\>0R\>0andg≠0g\\neq 0\. The strong triangle inequality and\|hn\|x≤Rn\|h^\{n\}\|\_\{x\}\\leq R^\{n\}give\|g∘f\|x≤M\|g\\circ f\|\_\{x\}\\leq M\.
For the reverse bound, call\|t\|p∏jrjγj\|t\|\_\{p\}\\prod\_\{j\}r\_\{j\}^\{\\gamma\_\{j\}\}the weight of a termt\(T−c\)γt\\,\(T\-c\)^\{\\gamma\};\|⋅\|x\|\\cdot\|\_\{x\}is the largest weight among the terms of a collected expression\. Order exponents lexicographically; this order is total, compatible with addition, and has00as least element\. Letβ\\betabe the largest exponent whose term inhhhas weightRR; thenβ≠0\\beta\\neq 0\. Letn∗n^\{\\ast\}be the largestnnwith\|qn\|pRn=M\|q\_\{n\}\|\_\{p\}R^\{n\}=M\. Inhnh^\{n\}, the coefficient of\(T−c\)n∗β\(T\-c\)^\{n^\{\\ast\}\\beta\}is the sum of∏iaβi\\prod\_\{i\}a\_\{\\beta\_\{i\}\}overnn\-tuples with∑iβi=n∗β\\sum\_\{i\}\\beta\_\{i\}=n^\{\\ast\}\\beta\. Each summand has weight at mostRnR^\{n\}, with equality only when everyβi\\beta\_\{i\}has weightRR, henceβi⪯β\\beta\_\{i\}\\preceq\\betaand∑iβi⪯nβ\\sum\_\{i\}\\beta\_\{i\}\\preceq n\\beta, with equality only when everyβi=β\\beta\_\{i\}=\\beta\. Forn=n∗n=n^\{\\ast\}exactly one summand,aβn∗a\_\{\\beta\}^\{n^\{\\ast\}\}, has weightRn∗R^\{n^\{\\ast\}\}\. Forn<n∗n<n^\{\\ast\}none does, sincenβ≺n∗βn\\beta\\prec n^\{\\ast\}\\beta\. Forn\>n∗n\>n^\{\\ast\},\|qn\|pRn<M\|q\_\{n\}\|\_\{p\}R^\{n\}<M\. So in∑nqnhn\\sum\_\{n\}q\_\{n\}h^\{n\}the coefficient of\(T−c\)n∗β\(T\-c\)^\{n^\{\\ast\}\\beta\}is one term of weightMMplus terms of smaller weight, and therefore has weightMM\. Hence\|g∘f\|x≥M\|g\\circ f\|\_\{x\}\\geq M\. ∎
For vector\-valuedffthe coordinate images need not determine its full analytic image \([ExampleC\.5](https://arxiv.org/html/2609.25501#A3.Thmtheorem5)\)\.
## Appendix EAutomatic Differentiation on thepp\-adic Hull
For the chain rule in[Section4\.3](https://arxiv.org/html/2609.25501#S4.SS3), writeF=FK∘⋯∘F1F=F\_\{K\}\\circ\\cdots\\circ F\_\{1\}for the forward map at a fixed input, withFk:Xk−1→XkF\_\{k\}:X\_\{k\-1\}\\to X\_\{k\},Xk=ΓpdkX\_\{k\}=\\Gamma\_\{p\}^\{d\_\{k\}\}, and loss headℓ:XK→ℝ\\ell:X\_\{K\}\\to\\mathbb\{R\}\. Only the parameters are extended to the hull; the input stays inℚpm\\mathbb\{Q\}\_\{p\}^\{m\}\. We assume thatFK∘⋯∘F1F\_\{K\}\\circ\\cdots\\circ F\_\{1\}computes the forward map of[Section3\.2](https://arxiv.org/html/2609.25501#S3.SS2)exactly\. Intermediate outputs that depend on the same parameter cannot, in general, be replaced by independent coordinate disks: doing so can change subsequent evaluations \([ExampleC\.5](https://arxiv.org/html/2609.25501#A3.Thmtheorem5)\)\. Writex0=𝜽x\_\{0\}=\\boldsymbol\{\\theta\}andxk=Fk\(xk−1\)x\_\{k\}=F\_\{k\}\(x\_\{k\-1\}\)\. Equip eachXkX\_\{k\}with the product metricdarcd\_\{\\text\{arc\}\}of[Equation6](https://arxiv.org/html/2609.25501#S3.E6)\. When the output speed is positive, the tangent mapTk:=Txk−1FkT\_\{k\}:=T\_\{x\_\{k\-1\}\}F\_\{k\}sends the input unit velocity𝒗k−1\\boldsymbol\{v\}\_\{k\-1\}to𝒗k=Tk\(𝒗k−1\)\\boldsymbol\{v\}\_\{k\}=T\_\{k\}\(\\boldsymbol\{v\}\_\{k\-1\}\)\. Each𝜸𝒗k\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\_\{k\}\}is parametrized by product arclength and starts atxkx\_\{k\}\. The one\-sided metric speed ofFkF\_\{k\}along𝒗k−1\\boldsymbol\{v\}\_\{k\-1\}is
λkarc\(xk−1,𝒗k−1\)=limt↓0darc\(Fk\(𝜸𝒗k−1\(t\)\),Fk\(xk−1\)\)t\.\\lambda\_\{k\}^\{\\mathrm\{arc\}\}\(x\_\{k\-1\},\\boldsymbol\{v\}\_\{k\-1\}\)=\\lim\_\{t\\downarrow 0\}\\frac\{d\_\{\\text\{arc\}\}\\bigl\(F\_\{k\}\(\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\_\{k\-1\}\}\(t\)\),F\_\{k\}\(x\_\{k\-1\}\)\\bigr\)\}\{t\}\.LetHk=ℓ∘FK∘⋯∘Fk\+1H\_\{k\}=\\ell\\circ F\_\{K\}\\circ\\cdots\\circ F\_\{k\+1\}be the loss remaining afterFkF\_\{k\}, withHK=ℓH\_\{K\}=\\ellandH0=ℓ∘FH\_\{0\}=\\ell\\circ F\.
###### E\.1Directional chain rule\.
Fix an input velocity𝐯k−1\\boldsymbol\{v\}\_\{k\-1\}with finite speedλkarc\\lambda\_\{k\}^\{\\mathrm\{arc\}\}\. Ifλkarc\>0\\lambda\_\{k\}^\{\\mathrm\{arc\}\}\>0andD𝐯kHkD\_\{\\boldsymbol\{v\}\_\{k\}\}H\_\{k\}exists and is finite, the backward identityD𝐯k−1Hk−1=λkarcD𝐯kHkD\_\{\\boldsymbol\{v\}\_\{k\-1\}\}H\_\{k\-1\}=\\lambda\_\{k\}^\{\\mathrm\{arc\}\}D\_\{\\boldsymbol\{v\}\_\{k\}\}H\_\{k\}holds if and only if
Hk\(Fk\(𝜸𝒗k−1\(h\)\)\)−Hk\(𝜸𝒗k\(λkarch\)\)=o\(h\)\.H\_\{k\}\\\!\\left\(F\_\{k\}\(\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\_\{k\-1\}\}\(h\)\)\\right\)\-H\_\{k\}\\\!\\left\(\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\_\{k\}\}\(\\lambda\_\{k\}^\{\\mathrm\{arc\}\}h\)\\right\)=o\(h\)\.Whenλkarc=0\\lambda\_\{k\}^\{\\mathrm\{arc\}\}=0, the ruleD𝐯k−1Hk−1=0D\_\{\\boldsymbol\{v\}\_\{k\-1\}\}H\_\{k\-1\}=0holds if and only if
Hk\(Fk\(𝜸𝒗k−1\(h\)\)\)−Hk\(xk\)=o\(h\)\.H\_\{k\}\\\!\\left\(F\_\{k\}\(\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\_\{k\-1\}\}\(h\)\)\\right\)\-H\_\{k\}\(x\_\{k\}\)=o\(h\)\.
These conditions say that the tangent approximation preserves the first\-order change in the remaining loss\. These loss estimates hold ifHkH\_\{k\}is locally Lipschitz nearxkx\_\{k\}and, at positive speed,
darc\(Fk\(𝜸𝒗k−1\(h\)\),𝜸𝒗k\(λkarch\)\)=o\(h\)\.d\_\{\\text\{arc\}\}\\bigl\(F\_\{k\}\(\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\_\{k\-1\}\}\(h\)\),\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\_\{k\}\}\(\\lambda\_\{k\}^\{\\mathrm\{arc\}\}h\)\\bigr\)=o\(h\)\.Local Lipschitz continuity of the remaining maps andℓ\\ellensures that ofHkH\_\{k\}\. Applying the identities at each step gives the backward recurrence in[Section4\.3](https://arxiv.org/html/2609.25501#S4.SS3)\.
###### Proof\.
For positive speed, the directional derivative givesHk\(𝜸𝒗k\(λkarch\)\)−Hk\(xk\)=λkarchD𝒗kHk\+o\(h\)H\_\{k\}\(\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\_\{k\}\}\(\\lambda\_\{k\}^\{\\mathrm\{arc\}\}h\)\)\-H\_\{k\}\(x\_\{k\}\)=\\lambda\_\{k\}^\{\\mathrm\{arc\}\}hD\_\{\\boldsymbol\{v\}\_\{k\}\}H\_\{k\}\+o\(h\)\. UsingHk−1=Hk∘FkH\_\{k\-1\}=H\_\{k\}\\circ F\_\{k\}, subtracting this expansion and dividing byhhproves the first equivalence\. The second equivalence is the definition of a zero directional derivative\.
For the sufficient check, a local Lipschitz constantCkC\_\{k\}gives\|Hk\(u\)−Hk\(v\)\|≤Ckdarc\(u,v\)\|H\_\{k\}\(u\)\-H\_\{k\}\(v\)\|\\leq C\_\{k\}d\_\{\\text\{arc\}\}\(u,v\)\. At positive speed, applying this bound to the actual and approximating paths gives the first loss estimate\. At zero speed, the speed definition givesdarc\(Fk\(𝜸𝒗k−1\(h\)\),xk\)=o\(h\)d\_\{\\text\{arc\}\}\(F\_\{k\}\(\\boldsymbol\{\\gamma\}\_\{\\boldsymbol\{v\}\_\{k\-1\}\}\(h\)\),x\_\{k\}\)=o\(h\), so takingv=xkv=x\_\{k\}gives the second loss estimate\. The remaining maps andℓ\\ellform a finite composition, so their local Lipschitz bounds also give one forHkH\_\{k\}\.
If all speeds are positive, start fromgK\(𝒗K\)=D𝒗Kℓg\_\{K\}\(\\boldsymbol\{v\}\_\{K\}\)=D\_\{\\boldsymbol\{v\}\_\{K\}\}\\ell\. The identities givegk−1\(𝒗k−1\)=D𝒗k−1Hk−1g\_\{k\-1\}\(\\boldsymbol\{v\}\_\{k\-1\}\)=D\_\{\\boldsymbol\{v\}\_\{k\-1\}\}H\_\{k\-1\}by backward induction, ending atg0\(𝒗0\)=D𝒗0Lg\_\{0\}\(\\boldsymbol\{v\}\_\{0\}\)=D\_\{\\boldsymbol\{v\}\_\{0\}\}L\. A zero\-speed step supplies the derivative zero directly, and the same induction applies to the preceding steps\. ∎
In the stage notation of[Section4\.3](https://arxiv.org/html/2609.25501#S4.SS3), the resulting velocity𝒗^=\(𝒒^,𝒔^\)\\hat\{\\boldsymbol\{v\}\}=\(\\hat\{\\boldsymbol\{q\}\},\\hat\{\\boldsymbol\{s\}\}\)has speedss^i=\|D𝒗r^i\|\\hat\{s\}\_\{i\}=\|D\_\{\\boldsymbol\{v\}\}\\hat\{r\}\_\{i\}\|and directionsq^i\\hat\{q\}\_\{i\}: up ifD𝒗r^i\>0D\_\{\\boldsymbol\{v\}\}\\hat\{r\}\_\{i\}\>0, and down if at an edge andD𝒗r^i<0D\_\{\\boldsymbol\{v\}\}\\hat\{r\}\_\{i\}<0, or \(if at an inner vertex\) down via digitan^a\_\{\\hat\{n\}\}ofFk,i\(𝒄′\)F\_\{k,i\}\(\\boldsymbol\{c\}^\{\\prime\}\), wherer^i=p−n^\\hat\{r\}\_\{i\}=p^\{\-\\hat\{n\}\}and𝒄′\\boldsymbol\{c\}^\{\\prime\}is𝒄\\boldsymbol\{c\}withcjc\_\{j\}replaced bycj\+ρjpnjc\_\{j\}\+\\rho\_\{j\}p^\{n\_\{j\}\}in every coordinate moving down via a digitρj\\rho\_\{j\}\.
At an inner vertex, apply this derivative calculation to each incident input direction separately\.
For a velocity moving several coordinates, the rate is taken jointly \([eq\.13](https://arxiv.org/html/2609.25501#S4.E13)\)\.
###### E\.2A tie couples the coordinates\.
Takef\(𝜽\)=x1θ1\+x2θ2f\(\\boldsymbol\{\\theta\}\)=x\_\{1\}\\theta\_\{1\}\+x\_\{2\}\\theta\_\{2\}with\|x1\|p=\|x2\|p=1\|x\_\{1\}\|\_\{p\}=\|x\_\{2\}\|\_\{p\}=1and both parameters at radiusrr, soR=rR=rand both monomials attain the maximum\. Moving coordinate11up alone givesR˙=1\\dot\{R\}=1, but moving it down alone givesR˙=0\\dot\{R\}=0, since the second monomial then attains the maximum\. Moving both up at unit rate givesR˙=1\\dot\{R\}=1, not22: the single\-coordinate rates do not add\.
## Appendix FSparse Affine Backpropagation
###### F\.1Direct loss along a tree germ\.
LetTTbe anℝ\\mathbb\{R\}\-tree, lety∈Ty\\in T, and defineℓy\(x\)=dT\(x,y\)/2\\ell\_\{y\}\(x\)=d\_\{T\}\(x,y\)/2\. For a unit\-speed incident germγ\\gammaatxx,
Dγ\+ℓy\(x\)=\{−12,x≠yandγpoints towardy,\+12,otherwise\.D\_\{\\gamma\}^\{\+\}\\ell\_\{y\}\(x\)=\\begin\{cases\}\-\\frac\{1\}\{2\},&x\\neq y\\text\{ and \}\\gamma\\text\{ points toward \}y,\\\\\[3\.0pt\] \+\\frac\{1\}\{2\},&\\text\{otherwise\}\.\\end\{cases\}Atx=yx=y, every nonconstant germ has derivative\+1/2\+1/2\.
###### Proof\.
For sufficiently smallt\>0t\>0, motion towardyyshortens the unique path toyybytt, while every other germ lengthens it bytt\. ∎
For an affine output whose term inθj\\theta\_\{j\}strictly attains the output radius, theppchildren ofθj\\theta\_\{j\}map to theppdistinct children of the output, since multiplication by a unit permutes the residues; otherwise no child ofθj\\theta\_\{j\}moves the output\. By[LemmaF\.1](https://arxiv.org/html/2609.25501#A6.Thmtheorem1), at most one child per output then has a slope different from the rest\. The classification losses depend on each outputζc^,r^\\zeta\_\{\\hat\{c\},\\hat\{r\}\}only throughmax\{\|c^\|p,r^\}=darc\(ζc^,r^,0\)/2\+r^/2\\max\\\{\|\\hat\{c\}\|\_\{p\},\\hat\{r\}\\\}=d\_\{\\mathrm\{arc\}\}\(\\zeta\_\{\\hat\{c\},\\hat\{r\}\},0\)/2\+\\hat\{r\}/2\([Section6](https://arxiv.org/html/2609.25501#S6)\); the radius has the same derivative along every child, so the same holds with target00\.
Outputaatherefore contributes
sa,γ=ba\+ca𝟏\{γ=ρa\}s\_\{a,\\gamma\}=b\_\{a\}\+c\_\{a\}\\mathbf\{1\}\\\{\\gamma=\\rho\_\{a\}\\\}to the slope along childγ\\gamma, whereρa\\rho\_\{a\}is the child whose slope differs, andca=0c\_\{a\}=0when outputaacontributes the same slope along every child\. One pass over themmcontributing outputs accumulatesB=∑abaB=\\sum\_\{a\}b\_\{a\}andCρ=∑a:ρa=ρcaC\_\{\\rho\}=\\sum\_\{a:\\rho\_\{a\}=\\rho\}c\_\{a\}; the child slopes areB\+CγB\+C\_\{\\gamma\}, forO\(m\+p\)O\(m\+p\)operations in place ofO\(mp\)O\(mp\)\.
###### F\.2The affine direct loss need not be geodesically convex\.
Takep=3p=3,F\(θ1,θ2\)=θ1\+θ2F\(\\theta\_\{1\},\\theta\_\{2\}\)=\\theta\_\{1\}\+\\theta\_\{2\}, and target11\. The product path\(ζ0,1/2\+t,ζ0,1/2−t\)\(\\zeta\_\{0,1/2\+t\},\\zeta\_\{0,1/2\-t\}\),\|t\|≤1/12\|t\|\\leq 1/12, is a constant\-speed geodesic contained in a product of open edges\. Its output center is zero and its output radius is1/2\+\|t\|1/2\+\|t\|\. Hence its direct loss is3/4−\|t\|/23/4\-\|t\|/2, which has a strict maximum at the midpoint\.
## Appendix GImplementation and Experimental Details
### G\.1Optimizer updates
#### Momentum state\.
The upward and downward averages satisfy
ut\\displaystyle u\_\{t\}=βut−1\+\(1−β\)D𝒆\+L\(𝜽t\),\\displaystyle=\\beta\\,u\_\{t\-1\}\+\(1\-\\beta\)\\,D\_\{\\boldsymbol\{e\}\_\{\+\}\}L\(\\boldsymbol\{\\theta\}\_\{t\}\),dt\\displaystyle d\_\{t\}=βdt−1\+\(1−β\)minq≠\+D𝒆qL\(𝜽t\)\.\\displaystyle=\\beta\\,d\_\{t\-1\}\+\(1\-\\beta\)\\,\\min\_\{q\\neq\+\}D\_\{\\boldsymbol\{e\}\_\{q\}\}L\(\\boldsymbol\{\\theta\}\_\{t\}\)\.Each coordinate storesutu\_\{t\}anddtd\_\{t\}and, at every vertex it has visited, the average excessΔ¯t\(ρ\)\\bar\{\\Delta\}\_\{t\}\(\\rho\)and the average directional derivative along each childρ\\rho\. For a quantityxxobserved at some updatesτ≤t\\tau\\leq tof the coordinate,
x¯t=\(1−βnt\)∑τβnt−nτxτ∑τβnt−nτ,\\bar\{x\}\_\{t\}=\(1\-\\beta^\{\\,n\_\{t\}\}\)\\,\\frac\{\\sum\_\{\\tau\}\\beta^\{\\,n\_\{t\}\-n\_\{\\tau\}\}x\_\{\\tau\}\}\{\\sum\_\{\\tau\}\\beta^\{\\,n\_\{t\}\-n\_\{\\tau\}\}\},wherentn\_\{t\}is its update counter; a child’s averages use only the updates at its vertex\. Retaining each coordinate’s momentum between its selections follows the history convention in the cyclic coordinate heavy\-ball update of[Sun et al\. \(2019, eq\. \(23\)\)](https://arxiv.org/html/2609.25501#bib.bib44)\.
#### Adam\.
The second moment and speeds along the incident directions are
vt\\displaystyle v\_\{t\}=β2vt−1\+\(1−β2\)\(max\(0,−minqD𝒆qL\(𝜽t\)\)\)2,\\displaystyle=\\beta\_\{2\}v\_\{t\-1\}\+\(1\-\\beta\_\{2\}\)\\,\\bigl\(\\max\(0,\-\\min\_\{q\}D\_\{\\boldsymbol\{e\}\_\{q\}\}L\(\\boldsymbol\{\\theta\}\_\{t\}\)\)\\bigr\)^\{2\},st\(q\)\\displaystyle s\_\{t\}\(q\)=max\(0,−m^t\(q\)\)/\(v^t\+ε\),s∗t=maxqst\(q\)\.\\displaystyle=\\max\(0,\-\\hat\{m\}\_\{t\}\(q\)\)/\(\\sqrt\{\\hat\{v\}\_\{t\}\}\+\\varepsilon\),\\qquad s^\{\*\}\_\{t\}=\\max\_\{q\}s\_\{t\}\(q\)\.On an edge whereLLis differentiable, the squared term in thevtv\_\{t\}update is\(dL/dr\)2\(dL/dr\)^\{2\}\. The child\-selection condition of[Section4\.1](https://arxiv.org/html/2609.25501#S4.SS1)also applies\. The hats are the standard counter\-based bias corrections,m^t=mt/\(1−βnt\)\\widehat\{m\}\_\{t\}=m\_\{t\}/\(1\-\\beta^\{\\,n\_\{t\}\}\)andv^t=vt/\(1−β2nt\)\\widehat\{v\}\_\{t\}=v\_\{t\}/\(1\-\\beta\_\{2\}^\{\\,n\_\{t\}\}\), withntn\_\{t\}counting successful updates of this parameter, including those with zero speed\.
#### Ties\.
When several directions share the maximal speed, one is chosen uniformly\.
#### Coordinate queueing\.
Initially, every coordinate is marked as awaiting a turn\. Before each update, determine the groups from the current parameters and minibatch\. Splitting or merging groups leaves each coordinate’s mark unchanged\. Within each group, select uniformly among the coordinates awaiting a turn; if none await a turn, first mark every coordinate in that group as awaiting\. Draw independently for different groups, and complete all selections before changing any parameter\.
After successfully computing an update, mark each selected coordinate as no longer awaiting a turn, even if it did not move\. Leave all other marks unchanged\.
The random\-permutation guarantee assumes fixed groups; under changing groups, the rule does not guarantee that every coordinate receives repeated turns\.
### G\.2Numerical implementation and cost
#### Exact arithmetic and states\.
Every ordinary center, input, target, and internalpp\-adic constant used by a reported run lies inℤ\[1/p\]\\mathbb\{Z\}\[1/p\]\. Centers are stored exactly as a signed mantissa times a power ofpp, with1919significant digits in int32 forp=3p=3\(3131forp=2p=2;1313forp=5p=5\)\. A coordinate whose next digit would exceed this capacity stops descending; the coordinate can still move upward\.
The radius is stored aslogpr\\log\_\{p\}r, so vertices are integer\-valued and clipping lands on them exactly\. Disk scores are independent of the chosen center representative \([AppendixD](https://arxiv.org/html/2609.25501#A4)\); the point reduction need not be\.
#### Grouping cost\.
Withℛ\\mathcal\{R\}and𝒥a\\mathcal\{J\}\_\{a\}as in[AppendixC](https://arxiv.org/html/2609.25501#A3.SS0.SSS0.Px2), letM=\|ℛ\|M=\|\\mathcal\{R\}\|be the number of outputs across the minibatch,I=∑a\|𝒥a\|I=\\sum\_\{a\}\|\\mathcal\{J\}\_\{a\}\|the number of nonzero collected coefficients summed over outputs, andddthe number of parameters\. The bound below covers grouping after repeated coefficients have been combined and the outer loss derivatives computed\.
Assuming hash\-table lookups take constant time on average, forming the active sets, collecting contributions, and combining overlapping groups require
O\(M\+I\+d\)\+ZtO\(M\+I\+d\)\+Z\_\{t\}expected work, withO\(M\+I\+d\)O\(M\+I\+d\)graph storage, whereZtZ\_\{t\}denotes any additional work that the tests or comparisons require at updatett\. When the local tests have bounded cost, grouping takes expected linear time in these counts\. Each bound counts arithmetic operations on numbers stored with a fixed number of digits\.
#### Cost\.
Under the arithmetic and hash\-table assumptions of[SectionG\.2](https://arxiv.org/html/2609.25501#A7.SS2.SSS0.Px2), scalar affine regression withddcoefficients and a batch ofbbexamples usesO\(bd\)O\(bd\)expected work for the forward computation and grouping, shared by all selected coordinates\. With one coordinate selected per group, computing their child slopes separately gives an update cost of at mostO\(bd\+bp\|𝒢\|\)O\(bd\+bp\|\\mathcal\{G\}\|\)\. Sparse affine backpropagation \([AppendixF](https://arxiv.org/html/2609.25501#A6)\) reduces the slope computation for all optimizers toO\(\(b\+p\)\|𝒢\|\)O\(\(b\+p\)\|\\mathcal\{G\}\|\), givingO\(bd\+p\|𝒢\|\)O\(bd\+p\|\\mathcal\{G\}\|\)overall since\|𝒢\|≤d\|\\mathcal\{G\}\|\\leq d\. Scoring one beam candidate also costsO\(bd\)O\(bd\), so extending a beam of widthWWtoC=WpdC=Wp^\{d\}candidates costsO\(Cbd\)O\(Cbd\), plusO\(ClogC\)O\(C\\log C\)for our full sort\. For more general models, the costs of forward and backward propagation depend on how the model is computed and need not be linear in the number of parameters\.
### G\.3Experimental protocol
#### Tuning and budgets\.
All three tree optimizers useα=κRref\(1−1/p\)\\alpha=\\kappa R\_\{\\mathrm\{ref\}\}\(1\-1/p\), with reference radius11for regression,6464for Quillian, and the smallestps≥mp^\{s\}\\geq mfor modulomm\. The multiplierκ\\kappais searched over\{0\.01,0\.1,1,10,100\}\\\{0\.01,0\.1,1,10,100\\\}for regression and for classification Adam, and over\{0\.1,1,10,100,1000\}\\\{0\.1,1,10,100,1000\\\}for classification GD and Momentum\. Momentum uses decay0\.90\.9; Adam uses0\.90\.9,0\.9990\.999, andε=10−8\\varepsilon=10^\{\-8\}\. Every task trains at batch size 32, for 1,000 updates on regression and modulo and 2,000 on Quillian\. Regression uses 512 examples in each of its training, validation, and independent test streams; modulo uses 2,160, 720, and 720\. Quillian’s inner split holds 1,076 training and 268 validation propositions, and each selected configuration is trained again on the full 1,344\-proposition training portion before its 336\-proposition test portion is evaluated\.
#### Selection and reporting\.
For the p\-adic gradient methods, modulo selects the grid point with the highest mean validation accuracy over the specified splits, and Quillian selects one multiplier for the complete model, for each code assignment, by pooled validation average precision \([SectionG\.6](https://arxiv.org/html/2609.25501#A7.SS6)\); in both, ties go to the smaller multiplier\. Point results use the same selected fit\. Regression selects the multiplier separately for each coefficient instance, optimizer, and initialization by the work to first satisfymaxi\|f^\(𝒙val\(i\)\)−yval\(i\)\|3≤3−5\\max\_\{i\}\|\\hat\{f\}\(\\boldsymbol\{x\}\_\{\\mathrm\{val\}\}^\{\(i\)\}\)\-y\_\{\\mathrm\{val\}\}^\{\(i\)\}\|\_\{3\}\\leq 3^\{\-5\}on all 512 validation examples\. Exact ties go to the smaller multiplier; if no multiplier reaches this threshold, the same tie rule applies\. Beam width is selected from five and ten by the most validation\-recovered minibatch streams, then the least mean first\-recovery work among them, then the smaller width\. Learning rates and beam widths are tuned only on validation data\. Coefficient recovery is reported for the selected fits; final test losses include all five instances, including nonrecoveries\. Reported training work excludes the rate and width searches and validation monitoring\. Tables report the mean and sample standard deviation over the reporting seeds\. Regression validation uses 512 independent covariate and noise draws conditional on the same𝜽∗\\boldsymbol\{\\theta\}^\{\*\}as training\. Rates are selected separately for each optimizer, initialization and batch size\. The classification splits overlap, so some test observations enter shared rate selection through another split’s validation set\.
#### Euclidean optimization\.
The Quillian MLP uses full\-data Adam at Martins’s learning rate0\.10\.1for 1,000 updates\. Euclidean modulo models use Adam with batch size 32 for 6,750 updates, totaling 216,000 sampled training examples per fit, with repetitions counted separately\. Learning rates\{0\.003,0\.01,0\.03,0\.1,0\.3\}\\\{0\.003,0\.01,0\.03,0\.1,0\.3\\\}are selected by five\-seed validation accuracy\.
#### Setup and initialization\.
For each candidate input coordinate and depth through the supplied maximum, initialization tests whether the positive training examples in each relation context occupy one residue class\. Among compatible choices it minimizes the number of negative examples in those residue classes, then chooses the coarsest depth and the first coordinate in the fixed input ordering\. At selected residue depthvv, the chosen coefficient starts atζp−v,1\\zeta\_\{p^\{\-v\},1\}and the other coefficients atζ0,pv\\zeta\_\{0,p^\{v\}\}\. Quillian tests its three entity coordinates, grouped by relation, at depths zero through six\. For modulommwith model primeqq, the scalar input coordinate is tested at depths zero through the smallest integerD≥0D\\geq 0satisfyingqD≥mq^\{D\}\\geq m, separately for each class\. Euclidean modulo models use LeCun\-normal weights, zero biases and no weight decay\. The Quillian MLP instead initializes its embedding, hidden and output weight matrices with independent zero\-mean Gaussian entries of standard deviation0\.10\.1, and its output biases at zero\. The hidden layer’s bias is the weight of the constant input, so it is initialized like the other weights\. Beam search uses the same training labels to rank and prune candidates, without this initialization \([SectionG\.6](https://arxiv.org/html/2609.25501#A7.SS6.SSS0.Px4)\)\.
#### Extractingpp\-adic parameters\.
For classification point evaluation we selectc0\+pNc\_\{0\}\+p^\{N\}from each positive\-radius coefficient diskζc,r\\zeta\_\{c,r\}, whereN=−⌊logpr⌋N=\-\\lfloor\\log\_\{p\}r\\rfloorandc0c\_\{0\}retains only the base\-ppdigits ofccat exponents belowNN\. A zero binary seminorm gives probability one for presence; for multiclass scores, probability is distributed equally among exact\-zero scores when any occur\. Ties among maximizing classes are broken by the fixed class ordering\.
### G\.4Regression
#### Adverse initialization\.
Write coefficients in base33with the least significant digit last, as in[Section2](https://arxiv.org/html/2609.25501#S2)\. For the first seed the true coefficients are
𝜽∗=\(…0020120203,…0220012023,…0110001223\)=\(1599,5879,2933\)\.\\boldsymbol\{\\theta\}^\{\*\}=\(\\dotsc 002012020\_\{3\},\\ \\dotsc 022001202\_\{3\},\\ \\dotsc 011000122\_\{3\}\)=\(1599,\\ 5879,\\ 2933\)\.Setting the last digit of the first coefficient to11and holding it fixed, strict best\-improvement over the remaining2323digit positions stops at
\(…0220120213,…0222212013,…0110001023\)=\(5974,6526,2927\),\(\\dotsc 022012021\_\{3\},\\ \\dotsc 022221201\_\{3\},\\ \\dotsc 011000102\_\{3\}\)=\(5974,\\ 6526,\\ 2927\),where all4848single\-digit changes weakly increase the exact training loss, the smallest increase being1/25194241/2519424\. Datasets are redrawn until such a point exists; for this seed the first draw was rejected\. The accepted dataset is also used for the zero\-center runs, and its covariates and noise are reused in the two\-layer task\.
#### Two\-layer target\.
We draw the target coefficientsw1,w2,v1,v2w\_\{1\},w\_\{2\},v\_\{1\},v\_\{2\}uniformly from\{0,…,38−1\}\\\{0,\\ldots,3^\{8\}\-1\\\}, and draw the fourth input independently\. Gradient training and beam search usef\(𝒙\)=v1\(x1\+w1x2\)2\+v2\(x3\+w2x4\)2f\(\\boldsymbol\{x\}\)=v\_\{1\}\(x\_\{1\}\+w\_\{1\}x\_\{2\}\)^\{2\}\+v\_\{2\}\(x\_\{3\}\+w\_\{2\}x\_\{4\}\)^\{2\}, with all four gradient parameters initialized at the Gauss point\. Stagewise propagation is exact for this model because the two terms use disjoint parameter sets\. To check recovery, we expand the learned and target functions and compare the coefficients of everyxi2x\_\{i\}^\{2\}andxixjx\_\{i\}x\_\{j\},i<ji<j\.
We also tested the ten\-parameter modelF\(𝒙\)=∑k=12vk\(∑j=14akjxj\)2F\(\\boldsymbol\{x\}\)=\\sum\_\{k=1\}^\{2\}v\_\{k\}\(\\sum\_\{j=1\}^\{4\}a\_\{kj\}x\_\{j\}\)^\{2\}\. Multiplying a hidden unit byλ≠0\\lambda\\neq 0and dividing its output weight byλ2\\lambda^\{2\}leavesFFunchanged\. We initializeda11,a23a\_\{11\},a\_\{23\}atζ1,3−9\\zeta\_\{1,3^\{\-9\}\},a13,a14,a21,a22a\_\{13\},a\_\{14\},a\_\{21\},a\_\{22\}atζ0,3−9\\zeta\_\{0,3^\{\-9\}\}, and the remaining four parameters at the Gauss point, with all ten trainable\. Replacing either the two statesζ1,3−9\\zeta\_\{1,3^\{\-9\}\}or the four statesζ0,3−9\\zeta\_\{0,3^\{\-9\}\}by Gauss points reached depth\-five recovery on none of five seeds atκ∈\{1,10,100\}\\kappa\\in\\\{1,10,100\\\}within 1,000 GD updates\.
On the seed missed at width five, the targetv1v\_\{1\}is divisible by99\. After two digits, every candidate withv1=0v\_\{1\}=0gives the same loss whatever digitsw1w\_\{1\}has, so nine tie exactly and the beam keeps five\. At the third digit these nine take the nine lowest losses: they agree with the target modulo2727inw2w\_\{2\},v1v\_\{1\}andv2v\_\{2\}, and differ only inw1w\_\{1\}, with the candidate matching the target ninth\. Mean pointL1L\_\{1\}loss on the full data:
The tenth candidate is the first that differs from the target inv1v\_\{1\}andv2v\_\{2\}\. Full\-data scoring fails on the same seed as minibatch scoring and costs sixteen times as much\.
#### Regression beam search\.
We search depthsv=0,…,7v=0,\\ldots,7, indexed by the exponent inr=p−vr=p^\{\-v\}, using mean pointL1L\_\{1\}loss, with all candidates at a depth sharing one batch\. After scoring the complete depth, we retain the best distinct candidates up to the width, and the search returns the lowest\-loss candidate at the last depth\. We average recovery work andlog3\\log\_\{3\}test loss over five minibatch runs per data seed before computing the five\-seed mean and sample SD\.
### G\.5Modulo classification
#### Learned modulo\.
We stratify by residue modulo36=4⋅936=4\\cdot 9so that the same splits are balanced for both modulo tasks\. For each seed, we randomly partition the integers0,…,35990,\\ldots,3599, assigning 60, 20 and 20 members of each residue class to training, validation and test, respectively\. All methods in the modulo comparison share these splits\. For the permuted\-code control, a fixed random permutation reassigns the input integers while their labels remain unchanged\. We repeat the initialization procedure above using the permuted training data\. The Euclidean digit baseline concatenates one\-hot encodings of the eight least significant base\-ppdigits, withp=2p=2for modulo 4 andp=3p=3for modulo 9\. Every compared method is tuned independently by the shared selection rule of[SectionG\.3](https://arxiv.org/html/2609.25501#A7.SS3)\. At the selected multipliers, plain descent, Momentum, and Adam all reach test accuracy1\.0001\.000on the matched tasks, whether evaluating the learned parameter states or the points chosen by the fixed extraction rule\.
### G\.6Quillian benchmark
#### Euclidean MLP architecture\.
Figure 5 of[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33)shows a learned six\-dimensional embedding for each of the 15 entities\. We concatenate that embedding with the four relation indicators and a fixed11, feed the resulting 11 inputs to 15 sigmoid hidden units, and use an affine map to 28 sigmoid outputs\. Thus the conventional parameter count is
15⋅6\+\(6\+4\+1\)⋅15\+\(15\+1\)⋅28=703\.15\\cdot 6\+\(6\+4\+1\)\\cdot 15\+\(15\+1\)\\cdot 28=703\.Martins reports 690 parameters, but the count in the paper source adds 15, rather than 28, for the final\-layer bias\. The paper specifies Adam at learning rate0\.10\.1, but not the batch size or epoch budget\. Our reproduction uses the Adam protocol in[SectionG\.3](https://arxiv.org/html/2609.25501#A7.SS3.SSS0.Px3)\. Our five reported seeds vary both the random split and initialization; Martins instead holds one random split fixed across ten initializations\.
#### Metrics\.
Within each test split, we pool the 336 propositions across all 28 properties and report positive\-class F1, average precision \(AP\), and accuracy on the pooled counts, grouping equal scores at each threshold of the precision–recall curve\.
#### Quillian permutation control\.
We randomly reassign complete three\-dimensional code vectors among entities, keeping the code multiset, relation indicators and proposition labels fixed\. We repeat the initialization procedure above using the permuted training data\.
#### Quillian beam search\.
We use maximum depth 8 to cover the deepest levels of the encoded hierarchy\. Beam width 10 gives zero training error on two of our five splits, as[Martins \(2025\)](https://arxiv.org/html/2609.25501#bib.bib33)observed on their single split\. If the search reaches the depth limit or exhausts its admissible candidates before finding a classifier with zero training error, we return the candidate with the fewest training errors from its last nonempty beam\. Across the five splits and 28 properties, 137 of 140 fits attain zero training error\.
The batch\-32 beam variant uses the same width, depth limit, and splits, with a fresh uniform sample of up to 32 training propositions shared by all candidates at each depth\. Admissible candidates, those with no error on a positive training example, are ranked by batch errors; a candidate with no batch error is then checked on the remaining training negatives, in rank order and including candidates beyond the beam cutoff, and the search stops at the first with no full\-training error\. This variant attains zero training error in 133 of 140 fits\.
## Appendix HLogit Separation and Margins
Recall from[Section6](https://arxiv.org/html/2609.25501#S6)that the output for classkkisy^k=ζc^k,r^k\\hat\{y\}\_\{k\}=\\zeta\_\{\\hat\{c\}\_\{k\},\\hat\{r\}\_\{k\}\}, with logit
zk=−logpmax\{r^k,\|c^k\|p\}\.z\_\{k\}=\-\\log\_\{p\}\\max\\\{\\hat\{r\}\_\{k\},\|\\hat\{c\}\_\{k\}\|\_\{p\}\\\}\.
###### H\.1Logit margins at every radius\.
LetXXbe a finite training set and let the class maps have the formfk\(η,b,𝐱\)=Gk\(η,𝐱\)\+bkf\_\{k\}\(\\eta,b;\\boldsymbol\{x\}\)=G\_\{k\}\(\\eta;\\boldsymbol\{x\}\)\+b\_\{k\}, with independent additive biasesbkb\_\{k\}\. Suppose eachGk\(⋅,𝐱\)G\_\{k\}\(\\cdot;\\boldsymbol\{x\}\), for𝐱∈X\\boldsymbol\{x\}\\in X, is analytic near parameter centersη0\\eta\_\{0\}\. AssumeXXispp\-adically separable at centers\(η0,b0\)\(\\eta\_\{0\},b\_\{0\}\): every training exampleiiof classccsatisfies
\|c^c\(i\)\|p≤1,\|c^k\(i\)\|p≥pfor everyk≠c\.\|\\hat\{c\}\_\{c\}^\{\(i\)\}\|\_\{p\}\\leq 1,\\qquad\|\\hat\{c\}\_\{k\}^\{\(i\)\}\|\_\{p\}\\geq p\\quad\\text\{for every \}k\\neq c\.Then for everyρ∈\(0,1\]\\rho\\in\(0,1\]there is a parameter state with these centers and all parameter radii positive at which every output onXXhas radiusρ\\rho, and every correct\-class logit exceeds every incorrect\-class logit by at least11on every training example\.
###### Proof of[TheoremH\.1](https://arxiv.org/html/2609.25501#A8.Thmtheorem1)\.
Fixρ∈\(0,1\]\\rho\\in\(0,1\]and the separating centers\. EachGk\(⋅,𝒙\(i\)\)G\_\{k\}\(\\cdot;\\boldsymbol\{x\}^\{\(i\)\}\)has a centered power series that converges for sufficiently small positive parameter radii\. As there are finitely many such series, we can choose positive radiisjs\_\{j\}small enough that all the expansions
Gk\(η,𝒙\(i\)\)=Gk\(η0,𝒙\(i\)\)\+∑\|α\|≥1ak,i,α\(η−η0\)αG\_\{k\}\(\\eta;\\boldsymbol\{x\}^\{\(i\)\}\)=G\_\{k\}\(\\eta\_\{0\};\\boldsymbol\{x\}^\{\(i\)\}\)\+\\sum\_\{\|\\alpha\|\\geq 1\}a\_\{k,i,\\alpha\}\(\\eta\-\\eta\_\{0\}\)^\{\\alpha\}converge in the product Gauss seminorm of[AppendixD](https://arxiv.org/html/2609.25501#A4)\. The weighted coefficients\|ak,i,α\|p∏jsjαj\|a\_\{k,i,\\alpha\}\|\_\{p\}\\prod\_\{j\}s\_\{j\}^\{\\alpha\_\{j\}\}, for\|α\|≥1\|\\alpha\|\\geq 1, are bounded by someM\>0M\>0\. Choose0<t≤10<t\\leq 1withtM≤ρtM\\leq\\rhoand give coordinateηj\\eta\_\{j\}radiusrj=tsjr\_\{j\}=ts\_\{j\}\. By[CorollaryD\.4](https://arxiv.org/html/2609.25501#A4.Thmtheorem4), eachGkG\_\{k\}then has output radius
Rk\(i\)=max\|α\|≥1\|ak,i,α\|p∏jrjαj≤tM≤ρ\.R\_\{k\}^\{\(i\)\}=\\max\_\{\|\\alpha\|\\geq 1\}\|a\_\{k,i,\\alpha\}\|\_\{p\}\\prod\_\{j\}r\_\{j\}^\{\\alpha\_\{j\}\}\\leq tM\\leq\\rho\.Give each biasbkb\_\{k\}radiusρ\\rho\. SinceGkG\_\{k\}does not depend onbkb\_\{k\}, the centered bias term has coefficient11and cannot cancel with any term ofGkG\_\{k\}\. The Gauss formula therefore givesr^k\(i\)=max\{Rk\(i\),ρ\}=ρ\\hat\{r\}\_\{k\}^\{\(i\)\}=\\max\\\{R\_\{k\}^\{\(i\)\},\\rho\\\}=\\rho\. All parameter radii are positive, and the output centers are unchanged\. Sinceρ≤1\\rho\\leq 1, the separation inequalities givezc\(i\)≥0z\_\{c\}^\{\(i\)\}\\geq 0andzk′\(i\)≤−1z\_\{k^\{\\prime\}\}^\{\(i\)\}\\leq\-1for everyk′≠ck^\{\\prime\}\\neq c\. Thuszc\(i\)−zk′\(i\)≥1z\_\{c\}^\{\(i\)\}\-z\_\{k^\{\\prime\}\}^\{\(i\)\}\\geq 1on every training example\. ∎Similar Articles
Pseudospectral Bounds for Transient Amplification in Coupled Gradient Descent
This paper develops a sharp pseudospectral theory for block-triangular Jacobians in coupled gradient descent, proving Kreiss-constant bounds and establishing iteration complexity results. The work exposes non-asymptotic, instance-dependent transient amplification phenomena relevant to bilevel optimization, two-time-scale stochastic approximation, and GAN training.
Zero-order Parameter-free Optimization for LMO-based Methods: Novel Approach for Efficient Fine-tuning
This paper introduces AdaNAGED, a method that combines zero-order optimization, parameter-free adaptation, and non-Euclidean update geometry for memory-efficient fine-tuning of large language models, with theoretical convergence guarantees and validation on the OPT-1.3B model.
Learning from the Descent Direction: Adaptive Gradient Descent under One-Sided H\"older Regularity
This paper proposes an adaptive gradient descent method using one-sided Hölder regularity to control step sizes based on directional curvature rather than full gradient variation, providing convergence guarantees for nonconvex objectives and demonstrating empirical benefits.
Convergence of Steepest Descent and Adam under Non-Uniform Smoothness
This paper generalizes non-uniform smoothness assumptions to objectives whose curvature is affine in the objective value, proving convergence rates for steepest descent and diagonal variants of RMSProp and Adam, with applications to logistic regression and neural networks.
BayesPO: Bayesian Prompt Optimization via Parallel-Tempered Gradient-Guided Discrete MCMC
This paper presents BayesPO, a Bayesian prompt optimization framework using gradient-guided discrete MCMC with parallel tempering, achieving improved accuracy on instruction-induction tasks.