Reproduce “Visualisation and 'diagnostic classifiers' reveal how recurrent and recursive neural networks process hierarchical structure” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Dieuwke Hupkes, Sara Veldhoen, Willem Zuidema

This research investigates how recurrent and recursive neural networks process hierarchical, compositional structures using an arithmetic language task, revealing their internal computational strategies through visualization and a novel diagnostic classification method. It demonstrates that TreeRNNs implement a near-perfect recursive solution, while GRUs approximate a cumulative strategy with continuous state updates, highlighting a quantitative approach to understanding network internals.

Key insights

  • TreeRNNs learn an interpretable, geometrically structured composition function that applies recursively, demonstrating a principled solution for hierarchical processing.
  • GRUs, when processing hierarchical structures, primarily approximate a cumulative strategy rather than a recursive one, encoding intermediate results and operator modes in their hidden states.
  • Diagnostic classification provides a scalable, quantitative, and hypothesis-driven method for interpreting the internal workings of high-dimensional recurrent neural networks, moving beyond qualitative observations.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.