NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Differentiable Exact Learning of Algorithms

Hristo Papazov, Francesco D'Angelo, Nicolas Flammarion

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: Interpretability & Model Adaptation › Contractive Recurrent Learning · Type: new method · Keywords: differentiable learning, finite-state transducers, policy-trajectory observations, exact algorithm learning, log-parallel training

Summary

We present a differentiable exact learning framework that uses Differentiable Finite-State Transducers (DFSTs) to learn algorithms from policy-trajectory observations, achieving error-free generalization on arithmetic tasks far beyond the size of the training data.

Explained to a 5-year-old

We watch a smart person solve puzzles like adding numbers, but we only see the steps, not what they think. We give that information to a simple learning robot that can remember what happened before. The robot learns to solve new puzzles it has never seen, even really big ones, without making mistakes. After learning, we can make a tiny copy of the robot that works just as well. The robot comes with a promise that, under certain conditions, it will always be correct.

Explained to a 5-year-old, longer

Imagine you have a friend who can solve math problems like adding big numbers. Instead of looking inside their brain, you only watch the steps they write down. We built a special robot that can learn from those steps without needing to know what the friend is thinking. The robot remembers what happened before, like a little notebook. It uses a very simple way of learning that doesn't need complicated math. After seeing only a few examples, the robot can solve new problems it has never seen before. It can even handle problems that are thousands of times bigger than the ones it practiced on. The robot never makes mistakes on the problems it learns, which is pretty amazing. Once the robot is done learning, we can shrink it down to a tiny version that still works. This tiny version is like a compact copy that can be used easily. The whole system comes with a guarantee that, under some conditions, it will always be correct. This makes it possible to learn exact algorithms in a practical way without unrealistic assumptions.

For a technical reader

The paper presents a way to learn algorithms exactly by watching how an expert behaves, without needing access to the expert’s internal thoughts. It uses a neural controller that tracks the environment’s state and is trained on recorded trajectories of actions and outcomes. The controller is a multilinear Differentiable Finite-State Transducer (DFST) that can be trained efficiently via prefix scans. The system can generalize to much larger inputs and includes an extraction step to obtain a compact finite-state transducer with provable correctness.

Problem

Learning algorithms exactly from input-output examples is generally impossible due to Gold's incompleteness barrier, especially when the expert's internal state is unavailable. This paper addresses how to overcome this barrier while still guaranteeing exact generalization.

Method

The approach couples a state-tracking neural controller to an unbounded environment and trains on policy-trajectory observations that record the environment's evolution without exposing internal states. It uses a multilinear controller model and log-parallel training via prefix scans, and includes an extraction step to obtain compact finite-state transducers.

Results

The controllers achieve error-free generalization on binary and decimal addition and multiplication for operands thousands of times longer than the training examples. Under a geometric clustering assumption, the extracted finite-state transducer exactly replicates the expert policy on all valid inputs.

Contributions

A differentiable exact learning framework that learns algorithms from observable policy trajectories without internal state, a multilinear controller family enabling log-parallel training, and an extraction procedure that yields compact finite-state transducers with provable exactness.

Limitations and assumptions

The exactness guarantee relies on a geometric clustering assumption, and the approach is demonstrated on small synthetic datasets.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction