cs.LGNov 16, 2026

On the Applicability of pp-adic Numbers in Computational Modules for Neural Networks

Authors: Vladimir Evgrafov

Organizations: Vladimir Evgrafov, Lomonosov Moscow State University, Faculty of Computational Mathematics and Cybernetics (CMC), Moscow, Russia.

Abstract

The applicability of pp-adic arithmetic as an intermediate computational module in an otherwise unchanged machine-learning pipeline is investigated. A one-feature linear regression on the scikit-learn Diabetes dataset serves as the test model. The fitted coefficients are represented in Qp\mathbb{Q}_p, predictions are computed in that field, and rational reconstruction is applied to the outputs. In the pyAdic experiments, rational reconstruction either returns no result or produces values that differ from the baseline predictions; changing computational precision can change both the magnitude and sign of the reconstructed value. In SageMath, forward conversions succeed, but the reconstructed predictions differ from the baseline. An alternative representation based on digit reversal fails to preserve ordinary addition because of carry propagation. Under the tested settings, none of the test predictions is reconstructed correctly. These results show that the tested conversion and reconstruction procedures do not provide a compatible intermediate module even for linear regression. Models defined directly over pp-adic data and operations offer a direction for further investigation.

Figures & tables

Explore similar work

Sep 21, 2026

Continuous Optimization for p-adic Models

We present the first method for native, continuous gradient descent for machine learning models with pp-adic parameters. Existing native optimizers are discrete, mostly combinatorial searches, as the pp-adic numbers Qp\mathbb{Q}_p are totally disconnected, with standard losses that are flat away from their minima. To enable continuous optimization, we propose working with Qp\mathbb{Q}_p via its Berkovich affine line: a canonical, path-connected expansion of Qp\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 Qp\mathbb{Q}_p to do modular arithmetic, an XOR-like task not expressible by linear models in R\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). Library at https://github.com/google-deepmind/padic-ml
Mar 31, 2026

pp-adic Character Neural Network

We propose a new frame work of pp-adic neural network. Unlike the original pp-adic neural network by S.\ Albeverio, A.\ Khrennikov, and B.\ Tirrozi using a family of characteristic functions indexed by hyperparameters of precision as activation functions, we use a single injective pp-adic character on the topological Abelian group Zp\mathbb{Z}_p of pp-adic integers as an activation function. We prove the pp-adic universal approximation theorem for this formulation of pp-adic neural network, and reduce it to the feasibility problem of polynomial equations over the finite ring of integers modulo a power of pp.
Jun 12, 2026

Numbers Already Carry Their Own Embeddings

We introduce Adelic operation-preserved embeddings (AOE), a training-free representation that captures both a number's real value and its modular (p-adic) signatures. This construction preserves additive and multiplicative structure by design, turning numerical input into embeddings that "speak in the language of mathematics." Unlike prior approaches that rely on task-specific retraining, AOE is plug-and-play and drops seamlessly into existing architectures. On algebraic combinatorics benchmarks, it delivers consistent gains including the first-ever perfect accuracy on the Weaving Pattern task-while suggesting a principled path forward for overcoming the long-standing "number problem" in AI.