arXiv:2610.28555cs.LGOct 2026

Manuscript Offprint

arXiv:2610.28555

Learning Computational Structure for Sample-Efficient Prediction

Hangyu Zhou, Constantine Dovrolis, Stephen Mussmann

ABSTRACT

Statistical learning in high dimensions suffers from the curse of dimensionality. Fortunately, many functions of practical interest are compositionally sparse, meaning they admit a composition of local functions, each depending on only a few variables, allowing sample complexity to depend on local arity rather than ambient dimension. Yet realizing this benefit requires exploiting hidden compositional structure, which theory does not establish for practical gradient-based training. We study this gap with CSFRBench, a controlled benchmark that hides the target's compositional computation during training but retains it for diagnosis, and find that dense networks and sparsity-based baselines leave much of that benefit unrealized. Inspired by the spatial organization of biological neural circuits, we introduce Learned Wiring (LeWi): each neuron has a learned low-dimensional embedding, only nearby neurons connect, and embeddings and weights are trained jointly. LeWi improves sample efficiency on targets with hierarchical structure, intermediate reuse, or independent modules. Across 32 additional targets generated by independently sampled computation graphs, LeWi is the most sample-efficient method not given the target graph, with 27% lower mean learning-curve area than dense networks. Dense networks perform better on targets with a single high-arity function. LeWi's representations and connectivity align with the target computation. On 17 world-model prediction tasks spanning control, navigation, and manipulation, LeWi beats the dense baseline on 16 and wins 99/119 baseline comparisons. These results show that jointly learning connectivity and weights can exploit computational structure to improve sample efficiency.

Target

Input●→Layer 1 ■

Layer 1 ■→Layer 2 ▲

Layer 2 ▲ → Layer 3 ♦

Layer 3 ♦ → Layer 4 ▼

Layer 4 ▼ → Output ★

Figure

Figure 1: LeWi develops embedding geometry aligned with the target computation. Learned neuron embeddings across successive layers of LeWi trained on a depth-4 tree. Colors indicate post hoc associations with intermediate values in the target computation. Inputs unused by the target and hidden units without a target association are omitted. Watch the geometry emerge during training: https://zhou-hangyu.github.io/lewi/.

1 INTRODUCTION

Learning in high dimensions is statistically difficult: for general smooth functions, sample complexity grows exponentially with ambient dimension (Stone, 1982). Yet many real-world learning

Correspondence to hzhou411@gatech.edu problems are not arbitrary high-dimensional mappings. Their outputs arise from interactions among objects, mechanisms, subsystems, or latent variables, and may be expressed through reusable intermediate computations, each depending on only a few inputs (low arity). Such decompositions exhibit compositional sparsity (Poggio & Fraser, 2024). Under suitable smoothness assumptions, statistical theory shows that the sample complexity of regularized estimators grows exponentially with local arity rather than ambient input dimension (Schmidt-Hieber, 2020).

These statistical guarantees, however, assume global or near-global optimization and therefore do not establish comparable sample efficiency under practical gradient-based training. This raises our central question: can gradient-based training leverage hidden compositional structure to improve sample efficiency using only input–output examples?

We study this question through compositionally sparse function regression (CSFR), where the target is composed of low-arity local functions connected by a sparse computation graph. We introduce CSFRBench, a controlled benchmark that enables systematic evaluation of whether gradient-based learners can exploit hidden compositional structure from input–output examples. CSFRBench varies computation graphs and local-function families while retaining the target computation for diagnosis, allowing predictive sample efficiency to be studied alongside learned internal organization. Across its compositional settings, dense networks and sparsity-based baselines, including methods that adapt sparsity at the level of individual connections, remain substantially less sample-efficient than same-backbone references whose fixed sparsity patterns encode target connectivity. Existing gradient-based learners therefore leave much of the sample-efficiency benefit associated with compositional structure unrealized.

Biological neural circuits provide one source of inspiration. Their connectivity is strongly shaped by spatial organization, and a long-standing line of work on wiring economy studies how neural systems trade off communication efficiency with the cost of long-range connections, favoring structured local connectivity (Hiesinger, 2021; Cang & Feldheim, 2013; Chklovskii & Koulakov, 2004; Bullmore & Sporns, 2012). This suggests that connectivity may be more naturally parameterized through a shared spatial organization than by treating each connection independently.

Motivated by this principle, we introduce Learned Wiring (LeWi), which parameterizes network connectivity through learned neuron embeddings. Each neuron has a low-dimensional embedding, and adjacent-layer neurons connect when their embeddings lie within a fixed radius. The task loss jointly learns the embeddings and connection weights: embeddings determine where computation can flow, while weights determine what is computed. Because each neuron's embedding participates in many connections, a single embedding update coordinates multiple connectivity decisions.

LeWi improves sample efficiency on CSFRBench targets with hierarchical structure, intermediate reuse, or independent modules. Relative to dense networks, LeWi reduces mean learning-curve area by 20% on the depth-4 tree, 34% on the graph with reuse, and 56% on flat modules, and by 27% across 32 independently sampled depth-4 graphs. Dense networks perform better on the high-arity control, while LeWi's advantage increases across all settings when nuisance inputs are added. These predictive gains are accompanied by target-aligned internal organization. Target intermediates are more linearly decodable from LeWi's hidden activations than from dense networks, and counterfactual interventions show stronger agreement with the target computation. LeWi's learned connectivity also aligns with target dependencies, achieving more than three times the edge F1 of initialization and randomized controls on average across four structured settings.

Beyond CSFRBench, across 17 world-model prediction tasks, LeWi improves over the dense network baseline on 16 and wins 99 of 119 task–baseline comparisons, with broad gains across control and navigation and more variable performance on manipulation tasks. Together, these results show that learning connectivity through shared neuron embeddings can help gradient-based training exploit computational structure to improve sample efficiency.

References (98)