RewriteNets: End-to-End Trainable String-Rewriting for Generative Sequence Modeling
Not on the map. Why?
Abstract (arXiv)
Dominant sequence models like the Transformer represent structure implicitly through dense attention weights, incurring quadratic complexity. We propose RewriteNets, a novel neural architecture built on an alternative paradigm: explicit, parallel string rewriting. Each layer in a RewriteNet contains a set of learnable rules. For each position in an input sequence, the layer performs four operations: (1) fuzzy matching of rule patterns, (2) conflict resolution via a differentiable assignment operator to select non-overlapping rewrites, (3) application of the chosen rules to replace input segments with output segments of potentially different lengths, and (4) propagation of untouched tokens. While the discrete assignment of rules is non-differentiable, we employ a straight-through Gumbel-Sinkhorn estimator, enabling stable end-to-end training. We evaluate RewriteNets on algorithmic, compositional, and string manipulation tasks, comparing them against strong LSTM and Transformer baselines. Results show that RewriteNets excel at tasks requiring systematic generalization (achieving 98.7% accuracy on the SCAN benchmark's length split) and are computationally more efficient than Transformers. We also provide an analysis of learned rules and an extensive ablation study, demonstrating that this architecture presents a promising direction for sequence modeling with explicit structural inductive biases.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 6 of its 17 references that are in the map. First posted on arXiv 10 Jan 2026.
Builds on
6 of 17 references.
References · 6
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2016Layer Normalizationcited by 5,669
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2014Neural Turing Machinescited by 644
- 2015Learning to Transduce with Unbounded Memorycited by 54
Built on by
Not cited yet.