arXiv:2610.13896cs.CLOct 2026

Manuscript Offprint

arXiv:2610.13896

Structural Automata for Neural Semantic Parsing

Xiao Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Neural semantic parsers generate meaning representations token by token, yet well-formedness depends on references, scope, and graph relations that unfold during generation. Constrained decoding prevents locally invalid tokens but does not guarantee that a valid prefix can be completed within a fixed output-length limit. We investigate structural automata at three stages of DRS parsing (decoding, post hoc processing, and training) and additionally evaluate decoding on AMR. For decoding, we introduce accepting-path decoding (APD), which maintains a verified completion within the remaining length limit and follows the model's preferred token whenever that token can also be completed. APD guarantees an accepted output without retracting tokens. Under tight length limits, it improves Smatch++ over local masking by 5.1 and 2.4 points on DRS and by 6.4 and 3.2 points on AMR, comparable to rollback under the same limit, which retracts tokens. For post hoc processing, invalid outputs concentrate on the same inputs: eight unconstrained samples yield no valid output for 10.2% of inputs with limited training data, compared with 0.4% with full data, where filtering comes within 0.2 Smatch++ points of APD. For training, penalizing automaton-rejected tokens improves development Smatch++ by 3.6–11.0 points after 10% of training, but this advantage diminishes as cross-entropy alone reduces the probability assigned to rejected tokens from 14% to below 2% within the first sixth of training with limited data.

1 Introduction

Neural semantic parsers generate meaning representations token by token, but their token probabilities do not explicitly enforce the structural requirements of well-formed outputs. Symbolic constraints make these requirements explicit and have been used to guide learning (English et al., 2025; Ahmed et al., 2023), restrict decoding (Scholak et al., 2021; Geng et al., 2023), and validate or repair generated outputs (Liu, 2024; Ugare et al., 2025). These approaches act at different stages and target different failure modes, which raises a question: when and how should structural constraints act in neural semantic parsing?

Meaning representations such as AMR (Banarescu et al., 2013), Discourse Representation Structures (DRS; Abzianidze et al., 2017), and executable queries (Scholak et al., 2021) impose structural dependencies that extend beyond individual tokens: references must resolve, variables must be bound, and scope constraints must be respected. In DRS, a forward reference such as Patient +2 requires a target concept to be introduced later; a proposition requires a new box to be opened; and discourse referents must remain accessible. Such requirements may remain unresolved across many decoding steps, so local token validity is insufficient in two ways. Under a fixed maximum output length (the output budget), a valid token may lead to a prefix that cannot be completed within the remaining budget. Moreover, a sequence accepted by a context-free grammar may still violate graph-level constraints. A structural automaton makes these requirements executable: it tracks the evolving state, validates completed outputs, and checks whether a partial output can still be completed.

We use a single structural automaton at three stages of DRS parsing, each raising a distinct question. During decoding, the automaton constrains token choices, and the question is whether the prefix can still be completed within the budget. After generation, it validates and repairs outputs, and the question is whether every input receives a valid output. During training, it identifies structurally invalid next tokens, and the question is how much probability the model still assigns to them. These questions yield three measurable quantities: the distance to acceptance, the per-input failure tail, and the rejected-token mass.

For decoding, we introduce accepting-path decoding (APD), which maintains a verified completion of the current prefix within the remaining budget. At each step, APD follows the model's preferred token whenever that token also admits a verified completion; otherwise, it advances along the previously verified path. APD therefore always produces an automaton-accepted output within the budget, without retracting emitted tokens, even when the search for a new completion fails. APD requires only state transitions, an acceptance test, and a completion procedure, so it extends to other representations, as our AMR results confirm.

Our experiments address these questions in turn. Under two tight output budgets, APD improves Smatch++ over local masking by 5.05 and 2.44 points on DRS and by 6.44 and 3.20 points on AMR, by completing graphs that local masking leaves truncated. Same-budget rollback achieves comparable quality but retracts up to 27 emitted tokens. When we withhold a fraction of new completions during decoding, a decoder that recomputes viability at every step fails on 29–70% of DRS inputs, whereas APD completes every input by following its verified completion. For post hoc processing, invalid outputs concentrate on a persistent subset of inputs: with a 600-sentence training subset, eight unconstrained samples leave 10.2% of inputs without a valid output, 13 times the share expected if samples failed independently. For training, penalizing automaton-rejected tokens accelerates early optimization, but the advantage diminishes as cross-entropy alone reduces the rejected-token mass below 2% within the first sixth of training. Our contributions are:

• An incremental structural automaton for DRS that operates directly on subword tokens and supports state transitions, acceptance checking, and verified completion.

• Accepting-path decoding (APD), which guarantees an automaton-accepted output within a fixed length budget without retracting emitted tokens, evaluated on DRS and AMR against local masking, per-step viability, and same-budget rollback in a matched study.

• A unified analysis of the three stages through the distance to acceptance, the per-input failure tail, and the rejected-token mass, showing which quantity limits each stage.

References (30)