Prime Convolutional Model: Breaking the Ground for Theoretical Explainability
Francesco Panelli, Doaa Almhaithawi, Tania Cerquitelli, Alessandro Bellini
TL;DR
This work addresses the challenge of explainable AI by deriving a mathematical model of neural network behavior from empirical data, demonstrated on a controlled case study called Prime Convolutional Model (p-Conv). The method combines a prime-grid input representation with a locality-aware convolutional architecture to identify congruence classes modulo $m$ over the first $10^6$ natural numbers, revealing precise, testable relationships between hyperparameters and solvability. Key contributions include a structured experimental analysis across prime, prime-power, and splitting moduli, and a theoretical explanation that reduces the model's behavior to concrete arithmetic criteria (involving $B$, primes, and exponents) that predict when the task is solvable and what error patterns arise. The work advances a principled, a priori explainability framework with potential to generalize beyond this case study toward a broader theory of explainability in neural networks.
Abstract
In this paper, we propose a new theoretical approach to Explainable AI. Following the Scientific Method, this approach consists in formulating on the basis of empirical evidence, a mathematical model to explain and predict the behaviors of Neural Networks. We apply the method to a case study created in a controlled environment, which we call Prime Convolutional Model (p-Conv for short). p-Conv operates on a dataset consisting of the first one million natural numbers and is trained to identify the congruence classes modulo a given integer $m$. Its architecture uses a convolutional-type neural network that contextually processes a sequence of $B$ consecutive numbers to each input. We take an empirical approach and exploit p-Conv to identify the congruence classes of numbers in a validation set using different values for $m$ and $B$. The results show that the different behaviors of p-Conv (i.e., whether it can perform the task or not) can be modeled mathematically in terms of $m$ and $B$. The inferred mathematical model reveals interesting patterns able to explain when and why p-Conv succeeds in performing task and, if not, which error pattern it follows.
