Structural Automata for Neural Semantic Parsing
Organizations: University of Groningen
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.
Figures & tables
| W | WF | W+Roll. | APD | |
|---|---|---|---|---|
| 68 | 86.27 (93.5) | 91.26 (99.9) | 91.27 (100) | 91.33 (100) |
| 78 | 89.28 (96.8) | 91.61 (99.8) | 91.69 (100) | 91.72 (100) |
| Tom shook everybody’s hands. budget | |
|---|---|
| Gold | male.n.02 Name "Tom" NEGATION <1 person.n.01 NEGATION <1 shake.v.09 Agent -2 Time +1 Patient +2 time.n.08 TPR now hand.n.01 PartOf -3 |
| … shake.v.01 Agent -2 Patient -1 Time +1 time.n.08 TPR now CONTINUATION <0 person.n.01 hand.n.0 cut off | |
| Reserve | … shake.v.01 Agent -2 Patient -1 Time +1 time.n.08 TAB ? placeholder inserted |
| APD | … shake.v.01 Agent -2 Patient -1 Time +1 time.n.08 TPR now CONTINUATION <1 person.n.01 EQU -3 valid within budget |
| Method | 600 graphs | 1,256 | 9,057 |
|---|---|---|---|
| U | 61.23 (23.9) | 73.19 (13.4) | 88.86 (4.4) |
| W | 75.24 | 81.29 | 91.88 |
| APD | 76.46 | 81.68 | 91.97 |
| Close | 74.53 | 80.73 | 91.54 |
| Sample | 69.63 | 80.59 | 91.81 |
| Beam | 73.05 | 81.43 | 91.39 |
| First rejected token | 600 | 1,256 | 9,057 |
|---|---|---|---|
| lexical or syntactic | 116 | 51 | 9 |
| forward reference unresolved | 46 | 21 | 13 |
| graph cycle | 45 | 25 | 2 |
| reference out of range | 39 | 28 | 8 |
| accessibility (Referee) | 11 | 2 | 3 |
| proposition box missing | 10 | 7 | 0 |
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
| Wh. | Method | EOS | Fail | |||||
| 68 | 0 | W | 1,058 | 1,058 | 86.27 | 86.27 | 1,033 | 0 |
| 68 | 0 | W+Rollback | 1,132 | 1,131 | 91.27 | 91.20 | 1,132 | 0 |
| 68 | 0 | WF | 1,131 | 1,129 | 91.26 | 91.12 | 1,131 | 1 |
| 68 | 0 | APD | 1,132 | 1,130 | 91.33 | 91.19 | 1,132 | 0 |
| 78 | 0 | W | 1,096 | 1,096 | 89.28 | 89.28 | 1,082 | 0 |
| 78 | 0 | W+Rollback | 1,132 | 1,131 | 91.69 | 91.62 | 1,132 | 0 |
| Wh. | Baseline | Exact | [95% CI] | [95% CI] | |
|---|---|---|---|---|---|
| 68 | 0 | W | 1,033 | 5.053 [3.938, 6.233] | 4.912 [3.790, 6.106] |
| 68 | 0 | WF | 1,131 | 0.066 [0.000, 0.199] | 0.066 [0.000, 0.199] |
| 68 | 0 | W+Rollback | 1,058 | 0.057 [0.016, 0.104] | 0.016 [ 0.189, 0.092] |
| 78 | 0 | W | 1,082 | 2.445 [1.672, 3.293] | 2.320 [1.568, 3.140] |
| 78 | 0 | WF | 1,130 | 0.117 [0.000, 0.296] | 0.117 [0.000, 0.296] |
| 78 | 0 | W+Rollback | 1,101 | 0.039 [0.015, 0.067] | 0.018 [ 0.150, 0.060] |
| Wh. | Baseline | Policy | Counts | Common | Rescue | Lost | |
|---|---|---|---|---|---|---|---|
| 68 | 0 | W | 1058/74/0/0 | 0.065 | 5.119 | 0.000 | |
| 68 | 0 | W | 1057/73/1/1 | 0.062 | 5.050 | 0.077 | |
| 68 | 0 | WF | 1131/1/0/0 | 0.000 | 0.066 | 0.000 | |
| 68 | 0 | WF | 1129/1/0/2 | 0.000 | 0.066 | 0.000 | |
| 68 | 0 | W+Rollback | 1132/0/0/0 | 0.057 | 0.000 | 0.000 | |
| 68 | 0 | W+Rollback | 1130/0/1/1 | 0.057 | 0.000 | 0.073 |
| Wh. | Method | Requests | Withheld | Unknown | Construct | Carry | Replan | Proposal s | Gen. s | |
|---|---|---|---|---|---|---|---|---|---|---|
| 68 | 0 | WF | 99,607 | 0 | 50,298 | 100,739 | – | – | 119.7 | 3,633.2 |
| 68 | 0 | APD | 109,586 | 0 | 73,648 | 110,718 | 14,504 | 35,938 | 95.6 | 3,609.7 |
| 78 | 0 | WF | 88,264 | 0 | 38,220 | 89,396 | – | – | 166.8 | 3,704.5 |
| 78 | 0 | APD | 73,771 | 0 | 37,265 | 74,903 | 14,673 | 36,506 | 139.8 | 3,666.4 |
| 68 | .25 | WF | 8,504,965 | 2,126,385 | 8,453,636 | 6,379,712 | – | – | 11,523.6 | 19,784.1 |
| 68 | .25 | APD | 539,670 | 134,743 | 497,821 | 406,059 | 15,687 | 41,849 | 505.4 | 4,928.9 |
| Wh. | Returned | Median | p95 | Max | Changed/decisions | Slack ch./unch. | |
|---|---|---|---|---|---|---|---|
| 68 | 0 | 37,070 | 4 | 11 | 26 | 316/50,442 | 0/41 |
| 78 | 0 | 37,638 | 4 | 11 | 27 | 195/51,179 | 2/51 |
| 68 | .25 | 42,981 | 4 | 11 | 36 | 14,254/57,536 | 35/39 |
| 68 | .50 | 45,461 | 5 | 14 | 41 | 27,510/62,432 | 34/36 |
| 68 | .75 | 40,681 | 5 | 16 | 47 | 37,145/61,738 | 34/37 |
| Method | F1 | V% | F1 | V% |
|---|---|---|---|---|
| P (local mask) | 69.76 | 90.4 | 73.34 | 95.1 |
| 70.82 | 91.9 | 73.89 | 96.0 | |
| 74.57 | 97.6 | 75.67 | 98.7 | |
| 76.15 | 100 | 76.52 | 100 | |
| 76.06 | 100 | 76.49 | 100 | |
| Rate | WF | APD | [95% CI] | Fail |
|---|---|---|---|---|
| .25 | 20.35 | 23.14 | 2.79 [2.10, 3.47] | 19 |
| .50 | 4.60 | 6.82 | 2.22 [1.76, 2.70] | 17 |
| .75 | 0.66 | 1.65 | 0.99 [0.71, 1.29] | 41 |
| Baseline | |||
|---|---|---|---|
| 68 | |||
| 78 | |||
| Arm | F1 | V% | PH | F1 | V% | PH | F1 | V% | PH | F1 | V% | PH |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 80.44 | 86.9 | 2 | 86.44 | 93.6 | 2 | 89.47 | 97.0 | 2 | 91.37 | 99.1 | 2 | |
| 80.84 | 87.8 | 20 | 86.22 | 93.5 | 11 | 89.30 | 96.7 | 4 | 91.43 | 99.2 | 3 | |
| 84.47 | 92.4 | 76 | 87.80 | 95.5 | 37 | 90.08 | 97.7 | 18 | 91.61 | 99.5 | 3 | |
| 85.91 | 95.0 | 149 | 89.10 | 97.5 | 74 | 90.51 | 98.5 | 42 | 91.62 | 99.5 | 7 | |
| 86.58 | 98.9 | 322 | 89.91 | 99.7 | 162 | 91.05 | 99.7 | 81 | 91.82 | 99.8 | 20 | |
| Method | 600 graphs | 1,256 | 9,057 |
|---|---|---|---|
| U | 63.09 (23.6) | 76.10 (11.8) | 90.64 (3.1) |
| W | 77.86 | 83.68 | 92.56 |
| APD | 78.81 | 84.08 | 92.84 |
| Close | 77.32 | 83.28 | 92.54 |
| Sample | 72.22 | 82.87 | 92.62 |
| Beam | 74.81 | 83.08 | 92.54 |
| Graphs | Unresolved | Tail % [95% CI] | [95% CI] |
|---|---|---|---|
| 600 | 115 | 10.16 [8.53,12.06] | .273 [.250,.296] |
| 1,256 | 28 | 2.47 [1.72,3.55] | .261 [.236,.285] |
| 9,057 | 5 | 0.44 [0.19,1.03] | .278 [.238,.316] |
| State component | Condition tracked |
|---|---|
| lexical phase | concept and role syntax; constant and operator syntax |
| concept register | backward targets already exist |
| pending targets | forward targets are stored and must be resolved at EOS |
| box register | references are range-checked; required proposition boxes must exist at EOS |
| typed graph | cycles are rejected on insertion; connectedness is required at EOS |
| accessibility | Referee-style box-subordination closure remains loop-free |
| Graphs | Automaton | Type/struct | Signature | |
|---|---|---|---|---|
| Gold | 2,264 | 2,264 | 2,264 | 2,105 |
| 1,132 | 1,082 | 1,092 | 1,018 | |
| 1,132 | 1,130 | 1,130 | 1,052 | |
| WF | 1,132 | 1,132 | 1,131 | 1,053 |
| APD | 1,132 | 1,132 | 1,131 | 1,053 |