Task complexity shapes internal representations and robustness in neural networks
Robert Jankowski, Filippo Radicchi, M. Ángeles Serrano, Marián Boguñá, Santo Fortunato · 2025
Read Task complexity shapes internal representations and robustness in neural networks by Robert Jankowski, Filippo Radicchi, M. Ángeles Serrano, Marián Boguñá, Santo Fortunato (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-05463.txt.
Introduction
Robert Jankowski and co-authors study how the difficulty of a task shapes what a neural network learns inside, in a research paper from 2025. Networks perform well on many tasks but stay hard to read. The team viewed a network's weights as a signed graph with two sides, so graph tools could probe its structure.
Five probes were applied to networks trained on easy and hard image tasks: pruning, rounding weights to two values, adding noise, flipping signs, and shuffling the graph. Hard-task networks collapsed to chance when their weights were rounded, while easy-task ones held up. Oddly, mild noise could raise accuracy in some cases. Keeping only the sign pattern of weights, not their size, often kept scores high. The authors propose the gap between full and cut-down scores as a measure of task difficulty.
Catalog record
| CREATOR | Robert Jankowski, Filippo Radicchi, M. Ángeles Serrano, Marián Boguñá, Santo Fortunato |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 35 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2508-05463
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Task complexity shapes internal representations and robustness in neural networks Robert Jankowski, Filippo Radicchi, M. Ángeles Serrano, Marián Boguñá, Santo Fortunato Abstract Neural networks excel across a wide range of tasks, yet remain “black boxes”. In particular, how their internal representations are shaped by the complexity of the input data and the problems they solve remains obscure. In this work, we introduce a suite of five data-agnostic probes—pruning, binarization, noise injection, sign flipping, and bipartite network randomization—to quantify how task difficulty influences the topology and robustness of representations in multilayer perceptrons (MLPs). MLPs are represented as signed, weighted bipartite graphs from a network science perspective. We contrast easy and hard classification tasks on the MNIST and Fashion-MNIST datasets. We show that binarizing weights in hard-task models collapses accuracy to chance, whereas easy-task models remain robust. We also find that pruning low-magnitude edges in binarized hard-task models reveals a sharp phase-transition in performance. Moreover, moderate noise injection can enhance accuracy, resembling a stochastic-resonance effect linked to optimal sign flips of small-magnitude weights. Finally, preserving only the sign structure—instead of precise weight magnitudes—through bipartite network randomizations suffices to maintain high accuracy. These phenomena define a model- and modality-agnostic measure of task complexity: the performance gap between full-precision and binarized or shuffled neural network performance. Our findings highlight the crucial role of signed bipartite topology in learned representations and suggest practical strategies for model compression and interpretability that align with task complexity. 1 Introduction Neural networks have achieved remarkable success across a wide range of applications and now underpin many aspects of our daily lives. However, their vast number of trainable parameters often renders them opaque “black boxes” that, despite their effectiveness, sacrifice interpretability [ 11 , 21 ] . To address this, the emerging field of mechanistic interpretability (MI) seeks to reverse-engineer the parameters and algorithms of trained networks in order to understand precisely how and why they produce their outputs [ 55 , 7 ] . A common first step in MI is to decompose a network into simpler, more analyzable components. In the case of one of the simplest architectures—the multilayer perceptron (MLP)—each layer can be viewed, from a network-science perspective, as a signed, weighted bipartite graph. Such graphs are a central object of study in network science, which analyzes complex systems ranging from telecommunications and computer networks to biological and social networks [ 48 , 46 , 45 , 20 ] . Many real-world networks exhibit characteristic topological features—power-law degree distributions, the small-world property, community structure, and high clustering coefficient—that reflect underlying organizational principles. By treating each MLP layer as a complex network, we can apply these same tools, such as network null models, laying the groundwork for a deeper understanding of how neural networks learn and generalize. Neural network performance depends not only on its architecture and training procedure but also on the complexity of the tasks it must solve [ 3 , 24 ] . Task difficulty shapes the representations a network learns-more challenging problems typically demand finer-grained or more abstract features [ 31 ] . For example, distinguishing between visually similar classes forces the network to encode subtle differences that are not required when classes are easily separable [ 36 ] . These differences should be observed by modeling each MLP layer as a signed bipartite graph—where positive and negative weights correspond to signed edges—and analyzing its structure. Understanding the difficulty of a task guides model selection, architecture design, and optimization strategy. Additionally, by understanding which parts of the task are more difficult to learn, we can gain insight into how the network processes information and identify potential biases or limitations. In this work, we investigate the internal representations learned by a fully connected multilayer perceptron (MLP) through the lens of network science, contrasting an “easy” task with a “hard” task on MNIST and Fashion-MNIST datasets. To this end, we design five complementary experimental probes: pruning (progressively removing edges with the smallest absolute weights), binarization (reducing all weights to \pm 1 ), noise injection (adding zero-mean noise of varying amplitude to the weights), flipping signs (changing the sign of the smallest-magnitude weights), and bipartite network randomization (shuffling connections while preserving given networks’ properties). Our key findings are as follows. • Binarizing an MLP trained on a hard task causes its accuracy to collapse to chance, whereas the easy-task model remains quite robust. • As we prune low-magnitude edges, a binarized model trained on the hard task exhibit a sharp performance transition at a characteristic sparsity level. • For the same model, injecting moderate noise can boost accuracy—a manifestation of stochastic resonance—while excessive noise degrades performance. • The performance peak in the noise experiment arises from flipping the sign of the weights with the smallest absolute values. • Randomizing the bipartite connectivity while preserving the sign of each weight leaves the network’s accuracy on the easy task nearly unchanged, demonstrating that the learned representations depend more critically on the sign structure than on precise weight magnitudes. These findings enable us to quantify task complexity in a data-agnostic manner. This means that our probes can be applied to any model and any modality as long as it contains an MLP layer. As a case study, we used these probes to evaluate the robustness of each layer in a DistilBERT model trained for Named Entity Recognition (NER). We discovered that the earliest layers are the least robust—but that simple pruning of the smallest-magnitude weights can improve their performance. In contrast, in the deeper layers, it is the sign of each weight that matters the most. Practically speaking, this means those deeper layers can be binarized at inference time without any loss in accuracy. 2 Related work Network pruning and binary neural networks. Model compression via pruning and quantization has been extensively explored to reduce inference cost while retaining accuracy [ 44 , 12 , 35 ] . Early work on Optimal Brain Surgeon (OBS) uses a second-order Taylor approximation of the training loss to identify and remove weights with minimal impact on performance [ 22 ] . First-order, data-driven methods such as Taylor pruning estimate the change in loss induced by removing individual filters or channels, achieving significant FLOP reductions on large CNNs with minimal retraining [ 42 , 23 ] . More recently, single-shot techniques like SNIP perform connection saliency scoring at initialization—eliminating the need for any gradient-based fine-tuning to attain high sparsity levels [ 33 ] . Parallel to pruning, Binary Neural Networks (BNNs) constrain weights and activations to \{-1,+1\} to enable extreme compression and ultra-fast bitwise operations. BinaryConnect and BinaryNet introduced stochastic and deterministic binarization schemes, demonstrating that end-to-end training of 1-bit networks can achieve competitive accuracy on small benchmarks [ 13 , 51 ] . Subsequent architectures such as MeliusNet employ dense feature propagation and learned scaling factors to close the gap to full-precision models even on ImageNet-scale data [ 8 ] . However, these methods typically focus on worst-case accuracy drops and rarely analyze how task difficulty modulates robustness to quantization. Similarity of neural network models. Advances in understanding how different networks or layers encode information have been driven by measures of representational and functional similarity [ 26 ] . Representational similarity measures assess