TL;DR
Symbolic Autoencoding ($\Sigma\text{AE}$) connects two sequence-to-sequence models through a discrete bottleneck, allowing them to translate between two symbolic systems using vast amounts of unpaired data and very few parallel examples. By propagating surrogate gradients through discrete tokens and introducing an expected-masking trick for sequence termination, $\Sigma\text{AE}$ acts as an online, differentiable back-translation loop that substantially outperforms supervised baselines, fine-tuned T5 models, and in-context learning.
What Problem Does This Paper Address?
Modern language models excel when given billions of parallel tokens or broad natural language data, but fail when tasked with translating between distinct symbolic systems—such as formal query languages, code, or biological sequences—where parallel data is scarce.
Historically, scholars deciphered Egyptian hieroglyphs from just 27 lines of parallel text on the Rosetta Stone alongside large corpora of monolingual texts. The authors tackle the modern machine learning equivalent: how can neural seq2seq models leverage abundant unparallel data in two symbolic domains ($X$ and $Z$) to learn a bidirectional mapping when only a tiny fraction of parallel pairs is available?
Methods
$\Sigma\text{AE}$ frames translation as a bidirectional autoencoding problem ($X \to Z \to X$ and $Z \to X \to Z$) tied together by two core innovations:
- Differentiable Discrete Bottleneck (DB): Two autoregressive models ($M_{xz}$ and $M_{zx}$) are chained together end-to-end. Rather than passing unconstrained continuous hidden states, the intermediate representations are quantized into discrete tokens via straight-through estimators. The authors unify three DB variants:
- Softmax DB: Uses argmax token selection in the forward pass and continuous soft-average embeddings in the backward pass.
- Gumbel DB: Employs categorical Gumbel-Softmax sampling.
- VQ DB: Selects nearest-neighbor codebook embeddings via vector quantization.
-
EOS Soft-Masking: Without ground-truth supervision, autoregressive encoders frequently suffer from hidden sequence collapse, prematurely emitting an
<EOS>token and cramming all information into the first token. The authors derive a differentiable surrogate mask based on the survival probability: $$\mathbb{E}[m[i]] = \prod_{k=1}^{i-1} (1 - P(O_k = \text{<EOS>}))$$ This passes gradient feedback into the decision to halt generation. -
Training Schedules: Models are jointly trained or sequentially fine-tuned on combinations of supervised negative log-likelihood (on scarce parallel data) and reconstruction losses (on unparallel data).
Datasets
The authors evaluated $\Sigma\text{AE}$ across four established compositional sequence transduction benchmarks:
- SCAN: Natural navigation commands mapped to primitive action sequences.
- PCFG SET: Synthetic string transformations generated by probabilistic context-free grammars.
- CFQ: Natural language questions mapped to SPARQL queries over Freebase.
- COGS: Natural language sentences mapped to semantic logic representations.
Rather than evaluating out-of-distribution compositional splits, the authors evaluated in-distribution bidirectional transduction under varying parallel data ratios ($\eta$, ranging from $1\%$ to $32\%$).
Key Insights and Ideas
- Discrete Latents Prevent Shortcut Learning: A continuous bottleneck often degenerates into an arbitrary shared latent space that ignores the syntax of the intermediate language. Forcing the bottleneck to be discrete and tokenized grounds the representation in the target vocabulary.
- Online Differentiable Back-Translation: Unlike standard back-translation, which periodically synthesizes and stores static pseudo-parallel datasets, $\Sigma\text{AE}$ passes gradients directly end-to-end through the discrete intermediate sequence in a continuous feedback loop.
- Solving Sequence Collapse via Expected Halting: Autoregressive models in unsupervised reconstruction loops tend to collapse because the non-differentiable hard stopping point yields zero gradient. Deriving straight-through gradients through the product of non-EOS probabilities fixes this failure mode.
Key Results
- Unsupervised Reconstruction: Without any paired supervision ($\eta = 0$), Softmax DB achieved over $98\%$ token accuracy on SCAN, CFQ, and COGS, proving that discrete autoencoding through straight-through estimators is highly viable.
- Weakly Supervised Gains: Across all tasks, $\Sigma\text{AE}$ consistently outperformed supervised-only training, GPT-3.5 in-context learning (ICL), and T5-large fine-tuning:
- On PCFG SET with only $8\%$ parallel data, $\Sigma\text{AE}$ boosted token accuracy from below $15\%$ (supervised baseline) to over $80\%$.
- On COGS with $2\%$ supervision, sentence accuracy rose from $48\%$ (supervised baseline) to $66\%$.
- On CFQ, $\Sigma\text{AE}$ achieved over $20\%$ higher token accuracy at $2\%$ supervision compared to baselines. Fine-tuned T5-large only surpassed $\Sigma\text{AE}$ at higher supervision ratios ($8\%$) on CFQ, which is expected given T5's pretraining on natural language questions.
Limitations and Future Work
- Bottleneck Instabilities: Vector-quantized (VQ) bottlenecks exhibited numerical instability during extended training (+500 epochs) on SCAN, requiring weight clipping.
- Tokenization Sensitivity: On PCFG SET, performance was hindered because standard tokenizers treated symbolically equivalent variables as distinct tokens, degrading unsupervised alignment.
- Hyperparameter Tuning & Scale: Hyperparameters were held constant across datasets without task-specific tuning; scaling this architecture to larger foundation models or noisier non-synthetic domains (e.g., biological sequence folding) remains unexplored.
Summary updated