Learning with the $p$-adics
André F. T. Martins
TL;DR
The paper investigates learning in the $p$-adic world $\mathbb{Q}_p$ as an alternative to real-valued frameworks, highlighting the inherent hierarchies of $p$-adic balls and their suitability for classification, regression, and representation learning. It develops concrete learning rules: unidimensional and multidimensional $p$-adic classifiers correspond to enclosing balls and unions of balls, while regression becomes exemplar-based due to ultrametricity; it also demonstrates a small-scale semantic-network example using Quillian-like networks with compact $p$-adic embeddings. The work provides algorithmic approaches (e.g., $p$-adic beam search) and theoretical results about what $p$-adic models can and cannot compute (e.g., XOR solvability in low dimensions, congruence and counting). Open problems include native multi-class extensions, gradient-based $p$-adic optimization via Hensel lifting, deeper architectures, and adelic predictors across all primes, suggesting a rich future research program in non-Archimedean machine learning.
Abstract
Existing machine learning frameworks operate over the field of real numbers ($\mathbb{R}$) and learn representations in real (Euclidean or Hilbert) vector spaces (e.g., $\mathbb{R}^d$). Their underlying geometric properties align well with intuitive concepts such as linear separability, minimum enclosing balls, and subspace projection; and basic calculus provides a toolbox for learning through gradient-based optimization. But is this the only possible choice? In this paper, we study the suitability of a radically different field as an alternative to $\mathbb{R}$ -- the ultrametric and non-archimedean space of $p$-adic numbers, $\mathbb{Q}_p$. The hierarchical structure of the $p$-adics and their interpretation as infinite strings make them an appealing tool for code theory and hierarchical representation learning. Our exploratory theoretical work establishes the building blocks for classification, regression, and representation learning with the $p$-adics, providing learning models and algorithms. We illustrate how simple Quillian semantic networks can be represented as a compact $p$-adic linear network, a construction which is not possible with the field of reals. We finish by discussing open problems and opportunities for future research enabled by this new framework.
