NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Approximation capabilities of folding networks

Barbara HammerESANN 1999

Abstract

Folding networks extend the capabilities of recurrent neural networks to tree-structured data, which is prevalent in domains such as linguistics, chemistry, and logic. This paper provides a rigorous mathematical analysis of their approximation power. We demonstrate that while folding networks can approximate any measurable function "in probability" using a hidden dimension as small as two, they face a fundamental "height curse." Specifically, achieving universal approximation under the maximum norm requires a hidden state dimension that grows exponentially with the height of the input trees, revealing a significant topological bottleneck in recursive processing.

Introduction

While standard neural networks are designed for fixed-size vectors and recurrent neural networks (RNNs) for sequences, many complex data types are naturally represented as trees. Folding networks were introduced to handle such structures by recursively "folding" branches into fixed-length vectors. However, the theoretical limits of this architecture—specifically whether they are universal approximators—remained unproven. This study addresses these limits by examining approximation capabilities under different mathematical constraints: approximation in probability and approximation in the maximum norm.

Methods and Architecture

The analysis focuses on a folding network architecture comprising two functional components:

  1. The Encoding Function ($g$): A recursive component that computes a hidden vector (context) for a node based on its label and the representations of its children.
  2. The Output Function ($h$): A standard feedforward network that maps the root's final encoding to the target output.
Architecture of a folding network showing the recursive encoding function $g$ and the output function $h$.

The paper evaluates these networks using two standards of approximation. Approximation in probability asks if the network can correctly map the majority of inputs. Approximation in the maximum norm is a stricter criterion, requiring the error to remain below a specified threshold for every possible input within a given set. The proofs utilize the Universal Approximation Theorem for MLPs and topological tools like the Borsuk-Ulam theorem to identify structural bottlenecks.

Key Insights

The Power of Two

A surprising result of this work is that an encoding dimension of just 2 is sufficient for a folding network to approximate any measurable function in probability. This suggests that for most practical purposes, a very small hidden state can capture the essential information of a tree structure.

The "Height" Curse and Topological Bottlenecks

The efficiency of low-dimensional encodings vanishes when strict error bounds (maximum norm) are required for all inputs. To guarantee high precision across the entire input space, the encoding dimension must grow exponentially relative to the height $T$ of the input trees.

This requirement stems from a fundamental topological conflict: trees are discrete, high-dimensional structures, while the hidden state of a neural network is a continuous vector space. Squeezing a tall tree into a small continuous vector while maintaining a continuous mapping is mathematically impossible without losing critical information.

Comparison with Sequences

The paper notes that for sequences (where the branching factor $k=1$), the required encoding dimension only grows linear with length. This explains why standard RNNs are significantly more resource-efficient than tree-based folding networks when processing linear data.

Results and Limitations

The study formalizes these insights through several key theorems:

  • Theorem 2 confirms that folding networks are universal approximators in probability, even with restricted weights.
  • Theorem 4 establishes the exponential cost of precision for trees with branching factor $k \ge 2$. For a maximum height $T$, the encoding dimension must be at least exponential in $T$ to achieve universal approximation in the maximum norm.
  • Unlimited Height: For trees of arbitrary height, universal approximation in the maximum norm is generally impossible for folding networks.

The primary limitation is the efficiency gap. While folding networks are theoretically powerful, the exponential resource requirement for high-precision tasks on tall trees makes them computationally expensive. Future work may involve identifying specific classes of functions—such as those representing finite automata—that might be more efficiently approximated without such steep scaling costs.

Summary updated

BibTeX
@inproceedings{hammer1999approximation,
  author = {Barbara Hammer},
  title = {{Approximation capabilities of folding networks}},
  booktitle = {ESANN},
  year = {1999},
  url = {https://openreview.net/forum?id=-YzI9EGkx2s},
}

Loading related content...

Figure