Learning Computational Structure for Sample‑Efficient Prediction

High-dimensional prediction problems often hide sparse computational structure. LeWi learns neural connectivity to exploit that structure and improve sample efficiency.

LeWi networks learning six targets in turn: a depth-4 tree, a reuse DAG, a sampled DAG, flat modules, a high-arity node and a depth-5 tree. Each point is a neuron at its learned 3-D position and each line an active connection; colors show which piece of the target each neuron is associated with.

Many functions are built from small pieces

Learning the small pieces takes far less data than learning the whole function at once.

100,000,000cells for one function of 8 inputs, at 10 levels each
700cells for 7 pieces of 2 inputs

Grid cells at 10 levels per input: an illustration of the effect of dimension, not a measured sample complexity.

CSFRBench: the pieces are known, but hidden

A benchmark of targets built from small pieces on a known graph. The learner sees only input–output examples. We keep the graph to build graph-informed reference networks and to evaluate the structure the learner finds.

TargetSmall pieces on a known graph, hidden from the learner.
ExamplesRandom inputs and the output. This is all the learner sees.
LearnerTrained on the examples, then tested on new inputs.

Standard networks miss most of the gain

A network given the target’s graph learns much faster. Dense and sparse baselines stay far behind. LeWi is not given the graph.

Let the neurons find their partners

  1. ei∈R3\mathbf{e}_i \in \mathbb{R}^3the learned position of neuron ii
  2. sij=R2−∥ei−ej∥2s_{ij} = R^2 - \lVert \mathbf{e}_i - \mathbf{e}_j \rVert^2positive when ii and jj are within RR
  3. W~ij=Wij σ(sij) 1[sij>0]\widetilde{W}_{ij} = W_{ij}\, \sigma(s_{ij})\, \mathbf{1}[s_{ij} > 0]soft gate times binary mask
  4. ei←ei−η ∇eiL\mathbf{e}_i \leftarrow \mathbf{e}_i - \eta\, \nabla_{\mathbf{e}_i} \mathcal{L}the loss pulls and pushes ei\mathbf{e}_i
  5. 1[sij>0]:  0↔1\mathbf{1}[s_{ij} > 0]:\; 0 \leftrightarrow 1crossing RR adds or removes a connection

Fewer samples when the target has structure

LeWi improves sample efficiency across hierarchical, reuse-based, and independent modular computations.

The learned wiring aligns with the target

Neurons tied to the same piece of the target end up close together. Colors are assigned after training.

Each piece can be read outlinear probe R², best hidden layer, depth-4 tree
The network uses the piecesintervention R², best hidden layer, depth-4 tree
The wiring matches the target graphedge F1 of the learned module graph

It also helps world-model prediction

Over 16-step rollouts, LeWi beats a dense network on 16 of 17 tasks.

BibTeX

@misc{zhou2026lewi,
  title = {Learning Computational Structure for Sample-Efficient Prediction},
  author = {Zhou, Hangyu and Dovrolis, Constantine and Mussmann, Stephen},
  year = {2026},
  eprint = {2610.28555},
  archivePrefix = {arXiv},
  primaryClass = {cs.LG},
  url = {https://arxiv.org/abs/2610.28555}
}