A weighted tree automaton is a small machine that assigns a number, such as a probability, to a tree by combining vector-valued states bottom-up from the leaves to the root. Probabilistic context-free grammars are a special case. These models can be compressed by keeping only the directions of the state space that matter most, found through a singular value decomposition (SVD) of a large matrix that pairs every "context" with every subtree. For string automata this compression has a clean guarantee: the squared error is at most the sum of the squared discarded singular values. For trees, the same method is known to break down on large inputs. On German parse trees, the compressed grammar parses long sentences badly, and a hand-tuned scaling knob is needed to recover competitive accuracy.
We propose to explain that failure and remove the knob. Because a tree splits cleanly at every node, the truncation error of a compressed tree automaton breaks down into a sum of local errors, one per node. Each local error is amplified by how strongly the automaton's combination maps push small state perturbations toward the root. This amplification is a quantitative cousin of synchronization in classical automata, where an input sequence makes the machine forget where it started. When the maps contract, errors are forgotten and depth does not matter. When they expand, errors compound with depth, and that is when long sentences fail. We turn this into a per-tree error bound, a measurable contraction diagnostic, and a truncation rule that picks the retained states for the tree-size distribution the model will actually see.
Background and What Is Missing
The string case supplies the method. Singular value automata and approximate minimization minimizes weighted string automata that represent square-summable functions. It computes the SVD of the infinite Hankel matrix (the context-by-suffix table of function values) through finite Gramian fixed points, and it proves $\|f-\hat f\|_2^2 \le \sum_{i>\hat n}\sigma_i^2$. Weighted Tree Automata Approximation by Singular Value Truncation and its conference version Low-Rank Approximation of Weighted Tree Automata lift this to trees with the ComputeSVTA algorithm and a canonical "singular value tree automaton" form. On the NEGRA treebank they report lower perplexity and $\ell_2$ error than tensor decomposition, with smooth error curves. They also note that the truncated model degrades on long sentences and introduce SVTA*, which applies a scaling parameter $\gamma$ to compensate. They leave open an explicit account of how error grows with tree depth or size. This is the gap we target.
We do not build a new canonical form, and we do not change the SVD machinery. What we contribute is an analysis of how truncation errors propagate through the tree, and a way to choose the retained subspace using that analysis. Our work differs from Residual Finite Tree Automata, which gives unique minimal nondeterministic tree automata for languages but has no weights and no approximation error. That paper constrains our scope: exact discrete minimization via determinization can blow up exponentially, so we stay in the weighted, approximate setting.
Synchronization theory motivates the central quantity. Work on slowly synchronizing automata (Slowly synchronizing automata and digraphs, Reset Thresholds of Automata with Two Cycle Lengths) shows that slow forgetting of the initial state comes from cyclic structure. Pin conjecture for matching automata shows that restricting how states merge shrinks worst-case reset lengths. We borrow the question "how fast does the machine forget a perturbation?" rather than any combinatorial theorem. In a tree input there are no input cycles, so forgetting is governed entirely by the per-node contraction of the combination maps along each root path.
Core Claim
Write the automaton's state for a subtree $t$ as $\phi(t)\in\mathbb{R}^n$. It is computed at a node labeled $\sigma$ with children $t_1,t_2$ as $\phi(\sigma(t_1,t_2)) = T_\sigma(\phi(t_1),\phi(t_2))$, where $T_\sigma$ is a bilinear map. The output is $f(t)=\alpha^\top\phi(t)$. Truncation to $\hat n$ states in the singular-value basis introduces a residual $\delta_v$ at each node $v$, namely the component of the true state discarded by the projection. Because each node's computation depends only on its own subtree, the root error telescopes:
$$|f(t)-\hat f(t)| \;\le\; \sum_{v\in t} \|\alpha\|\,\delta_v \prod_{u\in \mathrm{path}(v\to\mathrm{root})} L_u,$$
Here $L_u$ is the local sensitivity of the truncated map at node $u$ to a perturbation arriving from the child on the path, which is the norm of $T_\sigma$ with the sibling state held fixed.
When a typical $L_u$ is below one, the product decays with depth. The truncated automaton then "synchronizes away" deep errors, and the bound stays flat in tree size. When it exceeds one, errors grow geometrically with the depth of the node, which predicts the long-sentence failure of plain SVTA. On this reading, a single global scaling $\gamma$ is a one-parameter correction to that growth.
Two claims follow and can be tested. First, the empirical contraction profile, the distribution of $\prod L_u$ over root paths of a given length, should predict per-length error on held-out trees. It should do so better than the discarded singular values alone. Second, choosing the retained subspace with Gramians reweighted toward the target size distribution should match or beat tuned SVTA* without a free parameter. The Gramians are the matrices of inner products over contexts and over subtrees, and the reweighting counts large trees more heavily in both.
Research Program
The theoretical part has three steps. We first prove the bound above for strongly convergent weighted tree automata, the setting of Weighted Tree Automata Approximation by Singular Value Truncation. We then take its expectation under the tree distribution the automaton defines, which gives a size-stratified bound on the expected error for trees of size $s$. Finally, we identify conditions under which a spectral radius $\rho$ of the averaged sensitivity operator below one gives size-independent error. The last step follows from summing a geometric series over depths.
The algorithmic part replaces the $\ell^2$ Gramians with discounted Gramians. These are computed by the same Lyapunov-type fixed point, but each tree of size $s$ is weighted by $w(s)$, chosen to match the empirical size distribution of the target data. Under this weighting, SVTA* corresponds to a particular exponential $w$. We would therefore be generalizing $\gamma$ into a data-matched weighting rather than inventing a new knob.
We also test an optional third component. After truncation, we rescale the retained basis so that the measured $\rho$ stays below one. This is a small convex adjustment, and we test whether it helps or just trades bias for variance.
Baselines
The naive reference point is the untruncated 211-nonterminal grammar converted to a weighted tree automaton, together with plain truncation to the top $\hat n$ singular directions (SVTA). The full model fixes the accuracy ceiling. Plain SVTA shows the long-sentence degradation we claim to explain. Both are computed on the same NEGRA split: 18,602 training sentences and 1,000 each for development and test, as reported in Low-Rank Approximation of Weighted Tree Automata.
The strongest existing competitor is SVTA* with $\gamma$ tuned on the development set, from Weighted Tree Automata Approximation by Singular Value Truncation. It targets exactly the failure we address, and its authors report "competitive F-scores." No exact F-score or perplexity value for SVTA or SVTA* on NEGRA was found on Lacuna, so we will reproduce both ourselves. To keep the comparison fair, we give $\gamma$ a grid search on the development set with the same number of evaluations our method is allowed. That budget is zero for the size-matched weighting, which is estimated from training-tree sizes, and the same grid for any variant with a tunable exponent. Both methods use the same $\hat n$ values. Beating it means lower test perplexity or higher F-score in the longest sentence-length third at matched $\hat n$, with no loss on short sentences, averaged over several $\hat n$ values.
The tensor decomposition baselines "mu" (multiplicative updates) and "qn" (quasi-Newton), used in the same papers, are included with the same parameter counts and several random restarts. They were reported to have higher error and jittery curves. We keep them because they are the only non-spectral compression in the file.
The key ablation isolates each ingredient. It runs size-matched Gramians without contraction-aware rescaling, and rescaling applied to plain SVTA, so that each piece's contribution is visible.
Why not just…?
Why not just tune $\gamma$ in SVTA* and stop? This is the real threat. If tuned $\gamma$ matches our size-matched truncation on every length bucket, the algorithmic claim fails. The contribution then shrinks to the bound and the contraction diagnostic, which would still explain why $\gamma$ works and predict its value without tuning. We will report this honestly. We will also test whether $\gamma$ tuned on one length distribution transfers to another, for example tuned on short sentences and tested on long ones. Our weighting is re-estimated from data and should transfer better if the theory is right.
Why not just keep more states? Raising $\hat n$ reduces every $\delta_v$ and so shrinks error at all depths. But it does not change the amplification factor. The bound predicts that plain SVTA's error on long trees falls more slowly with $\hat n$ than its error on short trees. We will plot error against $\hat n$ separately per length bucket to check this. If extra states close the gap cheaply, the practical case for our method weakens, and we will say so.
Why not use tensor decomposition, which optimizes the parameters directly? The existing NEGRA comparison in Low-Rank Approximation of Weighted Tree Automata found these methods sensitive to initialization and sometimes orders of magnitude worse in $\ell_2$ error at equal parameter counts. We rerun them mainly to check whether they happen to be more robust on long trees, since their objective is not tied to the $\ell^2$ geometry that under-weights large trees.
Proposed Experiments
The first experiment is synthetic and tests the bound directly. We generate strongly convergent weighted tree automata with controlled sensitivity spectra, ranging from $\rho$ well below one to near one. We truncate them and measure the ratio of observed to bounded error as a function of tree depth. The decisive check is that error curves are flat in depth for contracting automata and grow roughly geometrically, at rate near $\rho$, for non-contracting ones.
The second experiment uses NEGRA. We compute the contraction profile of the truncated 211-nonterminal automaton, bucket test sentences by length, and ask whether the predicted amplification ranks the buckets by observed perplexity and F-score loss better than the discarded singular values do, measured by rank correlation.
The third experiment is the head-to-head comparison described in the Baselines section. We report $\ell_2$ error, perplexity, and labeled bracketing F-score per length bucket, across a sweep of $\hat n$. We also run the cross-length transfer test for $\gamma$.
Results can go against us in two ways. If amplification fails to predict per-length error, the theoretical story is wrong. If size-matched truncation fails to at least match tuned SVTA* on long sentences, the method adds nothing beyond a principled derivation of an existing heuristic.
References
- Singular value automata and approximate minimization
- Weighted Tree Automata Approximation by Singular Value Truncation
- Low-Rank Approximation of Weighted Tree Automata
- Residual Finite Tree Automata
- Slowly Synchronizing Automata and Digraphs
- Reset Thresholds of Automata with Two Cycle Lengths
- Pin conjecture for matching automata