Abstract
Differentiable Neural Computers (DNCs) are powerful architectures for algorithmic reasoning, yet they often fail to generalize to larger problem instances. This failure frequently stems from a mismatch between the problem's computational complexity and the model's fixed processing budget. This paper introduces adaptive planning steps—allowing the model more "thinking time" as input size increases—and stochastic training to ensure state stability. Additionally, a memory temperature recalibration technique is proposed to maintain precision when expanding memory at inference time. Experimental results on graph and geometric tasks demonstrate that these interventions allow DNCs to generalize to problems significantly larger than those encountered during training.
Introduction
While Deep Neural Networks (DNNs) excel at pattern recognition, they struggle with algorithmic reasoning—the ability to solve problems (like finding the shortest path in a graph) in a way that generalizes to any input size.
The authors focus on the Differentiable Neural Computer (DNC), a recurrent architecture paired with an external memory matrix. Historically, DNCs are trained with a tiny, fixed "planning budget" (usually 0 or 10 steps) between receiving an input and providing an answer. The core issue is a violation of computational complexity: if a problem inherently requires $O(n)$ steps to solve, a model restricted to a constant 10 steps will inevitably fail as the input size $n$ grows. The model doesn't just need more memory; it needs more "clock cycles" to process that memory.
Methods
The authors propose three primary interventions to bridge the gap between fixed-budget training and open-ended generalization:
- Adaptive Planning Budgets ($p(n)$): Instead of a constant number of steps, the planning budget becomes a function of the input size $n$. For example, in graph tasks, the model is granted $p(n) = n$ steps.
- Stochastic Planning Budget: To prevent the model from "overfitting" to a specific number of steps, the authors introduce randomness during training. By sampling the number of planning steps from a geometric distribution, the model is forced to reach a steady state—it learns to find the answer and then "hold" it in memory until the answering phase begins.
- Memory Temperature Recalibration: When a DNC's memory is expanded at inference time to handle larger inputs, the content-based addressing becomes over-smoothed. The authors introduce a temperature parameter $\tau$ to sharpen these attention scores, maintaining the precision of memory reads/writes in larger address spaces.
Datasets
The models were evaluated using a curriculum-based approach on four classic algorithmic tasks:
- Graph Shortest Path: Finding the sequence of edges between two nodes.
- Convex Hull: Identifying the vertices of the smallest convex polygon containing all given 2D points.
- Associative Recall: Retrieving an item from a list based on a query ($O(1)$ complexity).
- Graph MinCut: Finding the minimum set of edges that bisects a graph, representing a high-complexity challenge.
Key Insights and Ideas
- The "Thinking Time" Bottleneck: Generalization isn't just about model capacity; it's about the alignment between the model's runtime and the problem's lower-bound complexity. You cannot solve an $O(n)$ problem in $O(1)$ time.
- Steady-State Learning: Successful algorithmic models must learn to be "patient." Without stochastic training, a model might only know how to output the answer exactly at a specific step. Stochasticity encourages the model to maintain the correct state indefinitely.
- Efficiency vs. Performance: Adaptive budgets allow the model to train quickly on small examples while still possessing the machinery to handle large ones.
Key Results
- Massive Generalization: On the Shortest Path task, models trained on graphs with at most 75 edges using a fixed $p=10$ budget failed immediately beyond that limit. In contrast, the adaptive $p(n)=n$ model generalized to graphs with over 400 edges with high accuracy.
- Stability via Stochasticity: Models that previously failed to generalize due to training instability were fixed by stochastic fine-tuning, making them robust to the exact duration of the planning phase.
- Memory Scaling: Using temperature recalibration ($\tau = 0.65$), the authors successfully extended the DNC memory by 5x at inference time, enabling it to handle much larger inputs without the typical performance drop.
Limitations and Future Work
For very hard problems like MinCut ($O(n^2)$), the required sequences become so long that the DNC struggles with vanishing gradients and training instability. While $p(n) = n^2$ budgets showed promise, they are computationally expensive to train.
The authors suggest these findings are highly relevant to Large Language Models (LLMs). Just as DNCs need planning steps, LLMs may require "Chain-of-Thought" or internal thinking steps to solve complex reasoning tasks that exceed their standard forward-pass complexity.
Summary updated