---
title: "A Probabilistic Forest-to-String Model for Language Generation"
description: "A forest-to-string method learns to turn typed logical expressions into sentences by keeping several ways to break the same meaning into parts."
canonical: "https://research.elamur.ai/free/en/papers/lu-2011-probabilistic-forest-string-model-language/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/lu-2011-probabilistic-forest-string-model-language/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2011](https://md.research.elamur.ai/free/en/papers/2011/) / A Probabilistic Forest-to-String Model for Language Generation from Typed Lambda Calculus Expressions

# A Probabilistic Forest-to-String Model for Language Generation from Typed Lambda Calculus Expressions

Paper · 2011 · Wei Lu and Hwee Tou Ng

**Authors:** [Wei Lu](https://md.research.elamur.ai/free/en/authors/wei-lu/) and [Hwee Tou Ng](https://md.research.elamur.ai/free/en/authors/hwee-tou-ng/) · **Year:** 2011 · **Venue:** Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing · **Licence:** [CC BY-NC-SA 3.0 (ACL Anthology, before 2016)](https://creativecommons.org/licenses/by-nc-sa/3.0/)

[**48** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2167247296) · [Cited by **27** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/lu-2011-probabilistic-forest-string-model-language/cited-by/) · [Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing](https://aclanthology.org/volumes/D11-1/) · [licence](https://creativecommons.org/licenses/by-nc-sa/3.0/)

- [Publisher's page](https://aclanthology.org/D11-1149/)
- [PDF](https://aclanthology.org/D11-1149.pdf)
- [OpenAlex](https://openalex.org/W2167247296)

Citations: OpenAlex, 2026-10-14.

## Summary

A logical expression can specify exactly what a question means without specifying how anyone would ask it. A geography query might identify a river by its length and by the states it passes through. To express that query in words, a system has to choose how to name those relationships, decide which information belongs together in a phrase, and put the phrases in an order a reader can follow. Wei Lu and Hwee Tou Ng study this form of [text generation](https://md.research.elamur.ai/free/en/topics/text-generation/) using typed lambda calculus, a notation that can express relationships among entities, describe sets, and keep track of which variables refer to the same thing. Their system learns both the vocabulary for expressing those meanings and the rules for assembling the vocabulary into sentences.

The authors start by asking how the input meaning can be split into parts. A single expression can often be broken down in several ways that yield the same expression when put back together. The system keeps those alternatives in a packed forest, a structure that lets alternative trees share pieces. During training, it looks for a tree whose pieces correspond well to words in a paired sentence. It then extracts rules that connect logical expressions to words and phrases. Some rules express a complete piece of meaning. Others leave typed slots that can be filled by further rules, including slots that interrupt a phrase on the sentence side.

At generation time, the system searches the forest for rule combinations that express the input. It ranks the resulting sentences using evidence about how frequently rule pairings occurred in training, how many words they contribute, and how well the words fit their neighbors. On the GeoQuery test set, the full system reaches 54.58 BLEU for English and 55.11 for Chinese. The strongest phrase-based or hierarchical translation baseline by BLEU reaches 51.40 for English and 48.32 for Chinese. Human evaluators also rate the forest-based outputs higher for fluency and semantic correctness in both languages.

Removing rules that span multiple levels of a training tree causes a particularly clear drop in the Chinese automatic scores. The authors also test inputs represented as trees without variables. Their system performs well there, though the comparison depends on the metric and the dataset. The clearest finding concerns typed geography queries. Keeping alternative decompositions available while learning and generating gives the system a way to connect the same formal meaning to different patterns of wording, and the resulting sentences compare favorably with those from translation systems that receive a fixed sequence of input tokens.

## Deep dive: A Probabilistic Forest-to-String Model for Language Generation from Typed Lambda Calculus Expressions

A forest-to-string method learns to turn typed logical expressions into sentences by keeping several ways to break the same meaning into parts. · about 37 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### The meaning is given, but its phrasing is open

The input in this study is a formal description of what a sentence should convey. The output for a geography query is a natural-language question or request corresponding to that description. If the input picks out the longest river meeting a geographic condition, the job is to express the question about that river. Retrieving its name would be a different task. The distinction matters because the experiment starts after the relevant content has already been specified. Its difficulty lies in realizing that content in a sentence.

That realization has a lexical side and a structural side. A system needs to learn, for example, that a location predicate involving a river can be expressed through wording about where the river flows. It also has to give that wording a place inside a larger construction. The river might appear in a clause modifying the name of a state, so its name, the words expressing the relation, and the phrase naming the state need to fit together. Learning a dictionary entry for the predicate addresses only part of that problem. The system also needs a reusable account of how the predicate's expression combines with the phrases for its arguments.

Typed lambda calculus makes the distinction between these problems especially visible. A type specifies what kind of expression can fill a position or what kind of value an expression produces. An individual river name can denote an entity. A description that holds of certain entities can be represented as a function from an entity to a truth value. Variables allow conditions in different parts of the expression to apply to the same entity. When a variable is bound by a lambda abstraction or a quantifier, the relationship between the binder and its occurrences helps determine the expression's meaning. The particular letter chosen for that bound variable is incidental.

So an expression has structure that a list of symbols only indirectly reveals. In the paper's geography examples, conditions about states, adjacency, and the course of a river can occur inside the same query. A sentence can package these conditions into phrases of very different sizes. A predicate and its arguments might be expressed with a compact phrase in one sentence and a clause interrupted by an entity name in another. A training procedure that starts with a fixed order for the logical symbols has to learn across whatever gaps that order creates. Even a procedure that starts with a tree has to contend with the possibility that a single decomposition places a useful unit of wording across a boundary.

#### Why translation was a natural starting point

The paper presents a history in which early approaches concentrated on realization with resources supplied by their designers. Wang's system generated from an extended form of predicate logic with handwritten rules. Shieber and colleagues organized realization around semantic heads and implemented their rules in Prolog. Shemtov studied how to produce paraphrases from ambiguous logical forms. Langkilde used a packed semantic forest and probabilistic scoring for sentence generation. The forest precedent is particularly relevant here. It showed how alternative structures could be made available to a generator, while the problem of learning their lexical correspondences remained outside its scope. [Semantic-Head-Driven Generation](https://md.research.elamur.ai/free/en/papers/shieber-1990-semantic-head-driven-generation/)

The authors also describe approaches that learned from a corpus. Wong and Mooney, and Chen and Mooney, used grammars that connect structures on the meaning side with structures on the sentence side. Their inputs were variable-free semantic trees. Lu and colleagues used a tree conditional random field on the same kind of representation. Angeli and colleagues worked from database records and addressed the additional question of which records and fields to express. These systems show that learned generation was already possible for structured inputs. The differences among those inputs matter, however. A procedure tied to a tree or to a record layout cannot be assumed to handle the dependencies and alternative decompositions of a variable-bearing expression. [A Simple Domain-Independent Probabilistic Approach to Generation](https://md.research.elamur.ai/free/en/papers/angeli-2010-simple-domain-independent-probabilistic-approach/)

Statistical [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/) supplied another starting point. A phrase-based system learns associations between groups of words, while the hierarchical approach discussed in the paper also allows phrases to contain slots for other phrases. The idea of combining smaller learned correspondences is useful for generation from logic as well. The difficulty is on the source side. Ordinary text supplies a sequence of words whose substrings can be compared with substrings of another text. In a lambda expression, punctuation, predicate names, variable binding, and function application belong to a formal notation. A logical unit worth aligning with a phrase can emerge by reorganizing that structure through a meaning-preserving operation. It may never appear as a conveniently delimited span of the original expression. [Statistical Phrase-Based Translation](https://md.research.elamur.ai/free/en/papers/koehn-2003-statistical-phrase-based-translation/)

#### What the authors take from parsing

[Semantic parsing](https://md.research.elamur.ai/free/en/topics/semantic-parsing/) goes in the opposite direction, from a sentence to a formal meaning. The paper draws on two strands of that work. The first is Lu and colleagues' earlier use of a hybrid tree, which puts elements of a meaning representation at internal nodes and natural-language words at the leaves. Learning the tree exposes relationships between components of the formal representation and the words used to express them. This makes the tree useful for learning lexical correspondences as well as for parsing. In the earlier method, each meaning already supplied a fixed tree. Here the training procedure has to infer which decomposition of the meaning should be paired with the sentence. [A Generative Model for Parsing Natural Language to Meaning Representations](https://md.research.elamur.ai/free/en/papers/lu-2008-generative-model-parsing-natural-language/)

The second strand is the use of restricted higher-order unification in grammar induction. The immediate purpose here is to find smaller well-typed expressions whose application reconstructs the input. The authors use the technique to build a collection of such decompositions before selecting grammar rules from training examples. Combining the two strands gives the forest a job on both sides of the learning problem. It describes which breakdowns of the meaning are available, and the hybrid-tree procedure uses the accompanying sentence to judge which of those breakdowns support a plausible alignment. [Inducing Probabilistic CCG Grammars from Logical Form with Higher-Order Unification](https://md.research.elamur.ai/free/en/papers/kwiatkowksi-2010-inducing-probabilistic-ccg-grammars-logical/)

### The method, step by step

#### From one logical expression to a forest

Consider the paper's example of a description that holds of states containing Boston. The whole expression tests whether an entity is a state and whether Boston is located in it. One decomposition separates the property of being a state from the rest of the description. The remaining expression takes a property as an argument and puts that property together with the Boston condition. Applying it to the state property returns the original description. The split makes the state property available as a separate unit without losing the information it shares with the location condition.

The underlying operation is function application. In ordinary use, one starts with a function and an argument and works out the result. The forest builder starts with the result and seeks suitable functions and arguments. The search is called higher-order because a function can itself be passed as an argument, as happens when the property of being a state is passed into the larger description. Many splits are possible, so the authors use a restricted version of the search. Their additional restriction is that the expression chosen as the functor may have at most one free variable. A free variable is an occurrence whose binder is outside the expression under consideration or absent from it. The restriction concerns the functor created by a split.

The paper expresses the acceptable splits in two forms.

```
(h f) ≡ e
```

Here `e` is the input expression being decomposed, `h` is a candidate functor, and `f` is its argument. Juxtaposition within parentheses means applying the functor to the argument. The sign `≡` says that the result, after the conversions used in the paper, is the same as `e` up to the naming of bound variables.

```
((h f) g) ≡ e
```

Here `e`, `h`, and `f` have the same roles, and `g` is a further argument. The inner parentheses indicate that `h` is applied to `f` first. That application produces a function to which `g` is applied. The same relation `≡` tests the resulting expression against the input.

The conversions are referred to as alpha and beta conversion. Alpha conversion changes a bound variable's name together with the occurrences it binds. Beta conversion applies a function by substituting its argument for the variable bound by the abstraction. To see how the two operations fit the example, the letters used for the entity in the larger description and in the state property can differ. Once the state property is applied to that entity, the resulting test concerns the same entity as the Boston condition. The resulting expression can then be written with the bound variable name used in the input.

```
[λf.λx.(f(x) ∧ loc(boston, x))] ▷ [λx.state(x)] ≡ λx.(state(x) ∧ loc(boston, x))
```

The sign `λ` introduces a function with the variable that follows it, and the dot separates that variable from the function body. Here `f` is a variable for an entity property, while `x` ranges over entities. The parentheses in `f(x)` indicate application to `x`. The predicate `loc` places the entity `boston` in the entity named by `x`, and `state` tests whether `x` is a state. The symbol `∧` requires both conditions to hold. The brackets group the expressions on either side of `▷`, the paper's shorthand for function application, and `≡` has the same reduction-based meaning as above.

Once a candidate split is found, the forest builder can split its arguments in turn. If the input permits several splits, it keeps them as alternatives. Each complete choice through the forest gives a tree that reconstructs the same logical expression. A packed representation can share subproblems among those trees. An argument with a forest of its own can participate in more than one larger decomposition. The authors describe a construction that can represent exponentially many trees, which gives a reason to keep them packed instead of handling each full tree as a separate object.

The alternatives concern how to build the meaning. They do not require the original expression to be ambiguous. For generation, this distinction allows different opportunities for attaching wording. A decomposition that isolates a state property may make a familiar expression for that property available. Another decomposition may package the property and a relation together in a unit better suited to a longer phrase. The forest leaves those possibilities open until there is evidence from training or a score for a sentence.

#### How words enter the structure

The units at internal nodes are called lambda productions. A production records a logical expression serving as a functor, the types of any children it accepts as arguments, and the type of the completed expression. A child type is a requirement on the expression that can fill a slot. The paper uses the basic types `e` for entities and `t` for truth values. A function of type `⟨e,t⟩` accepts an entity and returns a truth value. In a geography query, an entity can be Boston, while a function of type `⟨e,t⟩` can test whether a candidate state contains Boston. The symbol `e` in the decomposition equations stands for a whole input expression. In a type annotation it has the separate meaning of entity type.

```
τₐ : πₐ ▷ τᵦ
```

In this schematic production, `τₐ` is the type obtained when the expression is completed, and the colon separates it from the production's right-hand side. The symbol `πₐ` is the functor expression. The application sign `▷` precedes `τᵦ`, the type label for a child supplying an argument. The subscripts `a` and `b` distinguish the parent and child positions. With further children, application follows the nested order in the decomposition equations. The type label stands in for an expression that will be supplied by the child.

A lambda-hybrid tree combines these productions with words. At an internal node, a hybrid sequence can contain local words and places where child productions contribute their own words. A child can sit between stretches of local words. The completed subtree can therefore express a phrase in which the parent's contribution is interrupted by the expression of an argument. That is useful for learning a relation whose wording partly precedes an entity name and partly follows it.

The paper illustrates this with a location property involving the Mississippi. The parent contributes the wording that frames a river's passage through a place. The entity child supplies the river name, which belongs inside that framing. The completed phrase is a modifier about the place. The logical decomposition has a corresponding division of labor. The parent is a function that can accept a river entity and return a property of places. Its child contributes the Mississippi entity. Using this structure, the system can learn about the framing words and the name separately, while still observing them as parts of a single phrase.

The probability of a hybrid subtree is built from pattern probabilities, word-emission probabilities, and probabilities for child productions. A pattern specifies where word stretches and children occur. Emissions supply words for those stretches. The child-production probabilities describe which logical production occurs in an argument position under a given parent. Below is the paper's factorization for the Mississippi subtree, with the verbal parts represented by shorter symbols.

```
P(q, u) = φ(m → wYw | p₁) × ψ(v | p₁) × ρ(p₂ | p₁, arg₁) × φ(m → w | p₂) × ψ(z | p₂)
```

Here `P(q, u)` is the joint probability associated with the illustrated subtree, whose logical expression is `q`, the location property, and whose completed phrase is `u`. The sign `=` introduces the factorization and `×` multiplies the factors. The symbols `p₁` and `p₂` are the parent production and the Mississippi entity production. In the pattern notation, `m` is the pattern being expanded, `→` denotes its expansion, `w` is a word stretch, and `Y` marks the place taken by a child production. The vertical bar means that the probability is conditioned on what follows it. The function `φ` scores patterns. The function `ψ` scores emissions, with `v` standing for the parent's wording around the typed slot and `z` for the words naming the Mississippi. The function `ρ` scores the choice of `p₂` under `p₁` in `arg₁`, the parent's first argument position. At the entity node, the pattern has a word stretch and no child.

Together `φ`, `ψ`, and `ρ` make up the parameter collection the paper denotes by `θ̄`. The emissions can use unigrams, which consider words individually in this component, or bigrams, which let adjacent words inform the estimate. These are alternatives for learning the hybrid-tree correspondences. The sentence scoring during decoding uses a separate source of evidence about word sequences. [N-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/)

#### Finding alignments from paired examples

Training starts with examples that supply a logical expression and a matching sentence. They give the system the meaning and its wording at the level of the entire example. The internal alignments remain to be learned. For any training pair, the forest specifies possible meaning trees, and the observable sentence constrains where their word contributions can go. Several joint trees can meet those constraints. The system needs probabilities that favor useful correspondences across the collection of examples.

The authors estimate the hybrid-tree parameters with expectation maximization, abbreviated EM. In this setting, its role is to use the current parameters to assign weight to possible hidden structures and then use the weighted evidence to update the parameters. The inside-outside algorithm obtains the needed evidence over structures. An inside calculation accumulates contributions from expansions beneath a node. The outside calculation accounts for how that node can fit into the surrounding structure. Their combination lets the training procedure estimate how frequently a choice is used across compatible structures, without listing all complete hybrid trees separately.

The difference from the earlier, fixed-tree procedure is particularly clear for the child-production probabilities. With a fixed meaning tree, a parent and its observed children can supply counts directly. In the forest, even the choice of semantic children can vary across the allowable decompositions. The training procedure therefore estimates `ρ` along with the parameters for patterns and words. A strong alignment depends on how these decisions work together. A child can help explain a well-matched stretch of words, while the resulting structure also has to participate in a tree that reconstructs the paired expression.

For the typed GeoQuery experiments, the authors initialize the generative parameters from the output of IBM alignment model 1. For that initialization, natural-language word unigrams are treated as being generated from the logical items available to the aligner, including free symbols, quantifiers, and connectives. The hybrid-tree training then runs for 10 iterations with unigram emissions and another 10 with bigram emissions. After fitting the parameters, the procedure selects the most probable hybrid tree for each paired training instance. This is the Viterbi tree, the best complete hidden structure under the learned probabilities for that pair. Parameter estimation uses evidence from alternatives, while the subsequent extraction step works with the selected tree.

Learning rules and generating from a meaning forest The steps in order.

#### Turning a hybrid tree into grammar rules

The learned grammar pairs a logical construction with a piece of sentence structure. It is a weighted synchronous [context-free grammar](https://md.research.elamur.ai/free/en/concepts/context-free-grammar/). The term synchronous means that a rule expands corresponding parts of the two representations together. A nonterminal is a placeholder whose contents are supplied by another rule. In this grammar a nonterminal has a type, so the logical expression supplied by a child has to fit the relevant argument position. A linked placeholder on the sentence side receives the words produced by the same child. This allows the rule to state where those words belong, even if their order differs from the order of the arguments on the logic side.

```
τ → ⟨pλ, h𝑤, ∼⟩
```

Here `τ` is the type of the expression headed by the rule, and `→` denotes a grammar expansion. The angle brackets collect the components of the expansion. The symbol `pλ` is the logical production, with its result type already given by `τ`. The symbol `h𝑤` is the sentence-side hybrid sequence, which contains words and any typed slots. The symbol `∼` links each logical nonterminal occurrence with its matching occurrence on the sentence side. The links are between occurrences, so two slots of the same type can still have distinct correspondences. The authors allow a maximum of two nonterminals in a synchronous rule.

The first kind of extracted rule comes directly from a production in the selected hybrid tree and the sequence at that node. The Mississippi location construction illustrates the composition. The location production can supply a pattern for a clause with an entity slot, and another rule can supply the river constant and its name. On the logic side, the entity argument is substituted into the location expression. On the sentence side, the name goes into the linked slot. The reduction on the logic side is what allows the resulting derivation to be compared with the input expression. Both sides of the combination therefore have a definite operation, even though only the words are returned as the final output.

The second kind, called a subtree rule, treats a complete subtree as a single correspondence. The logic side is the expression obtained by combining and reducing the productions in that subtree. The sentence side is the contiguous stretch of words contributed by the subtree. A subtree rule can thus preserve wording observed for an entire expression, including wording that would otherwise have to be reconstructed by making several local rule choices. Because the rule covers the whole subtree, it also includes the particular arguments realized inside it.

The third kind sits between a local pattern and a complete subtree. A two-level lambda-hybrid sequence rule covers a larger fragment while leaving one grandchild subtree open as a typed slot. The paper's worked example combines the property of being a state with the location description for a river passing through it. A complete subtree could retain the particular river. The two-level rule instead retains the state wording and its relation to the framing clause, with an entity slot where the river belongs. It learns a larger construction while preserving one point at which another rule can vary what the construction says.

To build that third kind, the authors temporarily stand in for the omitted grandchild with a fresh variable of its type. They compose the included functions with their arguments and carry out the needed reductions. They then abstract over the fresh variable, turning the result into a function that can accept a replacement expression of the same type. The corresponding part of the sentence becomes a slot for the replacement's wording. Supplying the original grandchild recovers the original subtree's logical contribution. That recovery explains why the extended rule can be reusable and still have a well-defined meaning.

These kinds of rule preserve different amounts of a training example. A local rule is reusable through the children it already exposes. A subtree rule preserves a fully observed realization. A two-level rule can remember how wording at different depths fits around an argument without tying that wording to the particular entity that happened to occur in training. After visiting the selected trees, the training procedure collects the extracted rules into one grammar. The rules and their observed correspondences provide the evidence for the final sentence scores.

#### Ranking derivations and choosing a sentence

A derivation specifies which grammar rules are applied and how their slots are filled. The authors give it a score based on the rules it uses and the sentence it produces. The first rule feature measures the relative frequency of the sentence-side hybrid sequence among sequences paired with the logical production. The second looks in the reverse direction, using the sequence and type to estimate the relative frequency of the logical production. A sequence might be common for a production while also being shared by several other productions. The two directions give the scorer separate evidence about those possibilities.

The word-count feature accounts for the words introduced by a rule. Its base value decreases with the count, and the effect on ranking depends on the fitted weight.

```
exp(−wc(h𝑤))
```

Here `exp` is the exponential function, `−` negates the count, and `wc` counts words in `h𝑤`, the rule's sentence-side hybrid sequence. Typed placeholders are positions for child contributions, rather than words contributed by the rule itself.

The remaining feature is a probability for the assembled string. A rule can contribute locally plausible wording whose fit with neighboring phrases depends on what is placed in its slots. The [language model](https://md.research.elamur.ai/free/en/concepts/language-model/) supplies evidence about those connections. For the main experiments, the authors use a trigram estimate with modified Kneser-Ney smoothing, trained with SRILM on the training data. A trigram estimate uses a short window of successive words. Smoothing lets the estimate assign probability more sensibly when it has limited evidence for a particular sequence. [An Empirical Study of Smoothing Techniques for Language Modeling](https://md.research.elamur.ai/free/en/papers/chen-1996-empirical-study-smoothing-techniques-language/)

```
w(D) = (∏ᵣ∈ᴰ ∏ᵢ fᵢ(r)ʷⁱ) × pᴸᴹ(ŝ)ʷᴸᴹ
```

Here `w(D)` scores derivation `D`. The outer product `∏ᵣ∈ᴰ` ranges over rule applications `r` in that derivation, and the inner product `∏ᵢ` ranges over the rule features indexed by `i`. The symbol `∈` indicates membership. Each `fᵢ(r)` is a feature value for the rule, raised to its weight `wᵢ`. The symbol `×` multiplies those contributions by the sentence probability `pᴸᴹ(ŝ)` raised to its own weight `wᴸᴹ`. In this equation `ŝ` is the sentence associated with `D`, and `LM` denotes the word-sequence component. The resulting weighted product is the score used for comparing derivations.

The relative-frequency estimates and the word-count value can be computed before the search. The word-sequence score depends on how words meet when pieces are joined, so it is evaluated as the decoder combines candidates. The authors learn the feature weights with minimum error rate training, or MERT, using the Z-MERT implementation. This stage tunes the ranking for an automatic evaluation measure on held-out examples from the learning split. The main experiments tune for [BLEU](https://md.research.elamur.ai/free/en/concepts/bleu/). Learning the probabilities that expose lexical correspondences and tuning the final ranking thus solve different tasks. The former supports the choice of hybrid trees from which rules are extracted. The latter adjusts how the decoder trades off the evidence carried by those rules and the words they generate.

The decoding objective keeps the logical input fixed.

```
ŝ = s(arg max { w(D) | e(D) ≡ e })
```

Here `ŝ` is the output sentence. The operator `arg max` selects the derivation `D` with the highest score `w(D)` among the allowed derivations. The braces enclose the scores under consideration, and the vertical bar introduces the condition on them. The expression `e(D)` is the source meaning constructed by `D`, `e` is the input meaning, and `≡` is equivalence after the conversions used by the paper. The function `s` returns the sentence side of the winning derivation. The objective ranks derivations, so the displayed expression gives the sentence attached to the best derivation even if several derivations could produce the same sentence.

A conventional chart decoder for hierarchical phrase translation works over spans of a linear input. This decoder works upward through the forest. It uses a chart to keep candidates for forest nodes so that results for a child can be used by larger constructions. The best candidate for a child in isolation need not make the best combination with its siblings. The decoder therefore tracks a list of candidates and uses cube pruning, a search procedure that limits which combinations it explores while accounting for their scores. This makes the optimization objective a target for the search, rather than a guarantee that the search enumerates every derivation.

The rules covering larger fragments require one further adjustment. Their source productions may be absent from the original forest as individual nodes. The decoder creates the relevant productions through substitution and reduction and attaches them to the forest. That step connects an observed subtree rule or a two-level rule to a new input whenever its logical side fits. During search, the expanded forest can therefore offer both smaller compositions and direct applications of the larger fragments learned from training.

### Experiments and results

#### Data and comparison systems

The main experiments use GeoQuery, a collection of 880 requests about U.S. geography. The logical expressions came from earlier manual annotation of English queries. The authors added Chinese sentences for the entire dataset to study generation in another language. A native Chinese speaker with a linguistics background wrote the Chinese annotations with access to the English sentences and the typed expressions. The two language experiments consequently use the same underlying set of geography meanings, with references produced through different annotation procedures. [English](https://md.research.elamur.ai/free/en/topics/english/)

The split follows the earlier semantic-parsing work by Kwiatkowski and colleagues. The test set contains 280 instances. Of the learning instances, 500 are for grammar induction, estimation of feature values, and training the trigram word-sequence component. The other 100 are for tuning feature weights. This partition keeps a pair used to judge the ranking during tuning separate from the main grammar-induction set. The final scores concern the test queries.

Moses supplies the phrase-based translation comparison. The authors use its default settings and enable the default lexicalized reordering component, which gave better performance in their setup. Joshua supplies the hierarchical phrase-based comparison. Its ability to learn rules with slots makes it a particularly relevant comparator for a system that also composes pieces. The distinction is that Joshua receives the logical input as a string. For the translation comparisons, the authors construct word alignments with the Berkeley aligner using its default settings. The same trigram component is used across the systems for a given generation task. [Joshua](https://md.research.elamur.ai/free/en/papers/li-2009-joshua-open-source-toolkit-parsing/) · [Alignment by Agreement](https://md.research.elamur.ai/free/en/papers/liang-2006-alignment-agreement/)

The authors try several ways to prepare input for those baselines. In the plain-text condition, they remove bound variables and keep symbols such as predicate names, quantifiers, and connectives. The other conditions use a deterministic conversion of the expression to a binary tree. They then read the tree as a string. In preorder, a node is read before its descendants. In inorder, the node comes between its left and right subtrees. In postorder, it is read after its descendants. Each traversal gives the translation system a different sequence, even though the sequences come from the same underlying tree. Thus a comparison with the plain-text option alone would give only a partial account of how well a string-based method can use these inputs.

For MERT, all systems use candidate lists of size 100. For each automatic comparison, the authors average the scores from five runs, each starting with randomly initialized feature weights. They do this because tuning can arrive at different weights depending on where the search starts. The resulting comparison includes a shared tuning metric and word-sequence component, while preserving the differences in how the systems represent the logical input and learn their translation rules.

#### Automatic scores on typed GeoQuery

The original IBM BLEU used here measures overlap with the reference through 4-gram precision with a penalty for short outputs. Its score responds to how well words and local sequences match the reference wording. TER measures the amount of editing required to turn an output into the reference. Since lower TER ordinarily means fewer edits, the authors present its complement so that higher scores are better for both reported measures.

```
1 − TER
```

Here `TER` is the translation edit rate, `1` denotes the whole on the rate scale, and `−` takes the complement. The paper reports the complement and BLEU as percentage scores in the main automatic comparison.

English typed GeoQuery test generation by BLEU The forest-based system leads the English comparison, and preorder gives both translation baselines their strongest BLEU score.

**The numbers**

| System or setting | BLEU % |
| --- | --- |
| Moses plain text | 48.93 |
| Moses preorder | 51.13 |
| Moses inorder | 46.72 |
| Moses postorder | 44.30 |
| Joshua plain text | 37.40 |
| Joshua preorder | 51.40 |
| Joshua inorder | 40.31 |
| Joshua postorder | 31.10 |
| Forest-to-string (this paper) | 54.58 |

For English, preorder puts both translation baselines close to each other on BLEU. It also gives their best edit-based scores. On the English test set, Moses preorder reaches 63.73 on the reported TER complement and Joshua preorder reaches 64.69. The full forest system reaches 67.65. The English comparison also shows how much the baseline result depends on the form of the input. Joshua's English preorder score is stronger than its scores from the other traversals or from plain text. Moses also benefits from preorder, though its plain-text result is closer to its best result than Joshua's is to its own.

Chinese typed GeoQuery test generation by BLEU The forest-based system leads the Chinese comparison, and inorder gives both translation baselines their strongest BLEU score.

**The numbers**

| System or setting | BLEU % |
| --- | --- |
| Moses plain text | 43.23 |
| Moses preorder | 42.08 |
| Moses inorder | 48.03 |
| Moses postorder | 46.36 |
| Joshua plain text | 36.60 |
| Joshua preorder | 40.05 |
| Joshua inorder | 48.32 |
| Joshua postorder | 41.31 |
| Forest-to-string (this paper) | 55.11 |

On the Chinese test set, Moses inorder scores 55.29 on the TER complement, Joshua inorder scores 54.64, and the full forest system scores 63.77. This is a case in which the baseline that leads on BLEU and the baseline that leads on the edit-based score differ. The forest system leads on both. The authors suggest that the different traversal preferences in English and Chinese may reflect differences in syntax and word order. The traversal experiments demonstrate the preference on these datasets. They provide no direct analysis assigning it to specific constructions in either language.

The authors assess automatic-score differences with paired bootstrap resampling. The pairing keeps outputs for the same test examples together when resampling, so the comparison reflects how the systems differ on a shared set of queries. The paper reports `p < 0.01` for the automatic comparisons with the translation baselines, except against English Joshua preorder, for which it reports `p < 0.05` on both metrics. That exception is the strongest English baseline and the comparison with the closest reported results. [Statistical Significance Tests for Machine Translation Evaluation](https://md.research.elamur.ai/free/en/papers/koehn-2004-statistical-significance-tests-machine-translation/)

#### What people judged

The human study uses a random sample of 139 test instances, described in the paper as about 50% of the test set. There are 5 evaluators for English and 5 for Chinese. For each sampled example, the judges see the outputs of the forest system, Moses, and Joshua alongside the reference. The system outputs are shuffled and presented together so that a judge can assess all of them for the same query without being told which system produced each one. Based on the automatic comparison results, the baselines adopt preorder for English and inorder for Chinese.

The instructions treat fluency and semantic correctness as separate judgments. On the scale from 1 to 5, the bottom fluency category is unintelligible wording and the top category is flawless wording. Semantic correctness ranges from wholly incorrect to fully correct. A sentence can read smoothly while changing which entity the query asks for. Conversely, a reader may be able to recover the intended query from awkward prose. The separate ratings make both kinds of difference visible.

For English, the forest outputs average 4.66 for fluency and 4.57 for semantic correctness. Moses preorder averages 4.48 and 4.40, respectively. Joshua preorder averages 4.40 and 4.24. The paper's summary across judges gives the English forest system as 4.66 ± 0.10 for fluency and 4.57 ± 0.16 for correctness, with the terms after `±` reported as standard deviations.

For Chinese, the forest outputs average 4.59 for fluency and 4.42 for semantic correctness. Moses inorder averages 4.14 and 4.04, while Joshua inorder averages 4.00 and 3.90. The forest system's reported Chinese ratings are 4.59 ± 0.08 for fluency and 4.42 ± 0.10 for correctness. The authors report `p < 0.01` from paired t-tests against Moses and Joshua for both judgments in both languages. The agreement in ranking between people and the automatic scores gives evidence that the improvement was visible to readers as well as measurable through comparison of word sequences.

The paper's sample English outputs give a sense of what the ratings can capture. In a query about the longest river passing through a state that borders Indiana, a baseline output mixes up the river and states in its wording. The forest version retains the longest-river question and the condition about states bordering Indiana, although it expresses the route more loosely. When the example calls for the density of the state where U is greatest.S. river flows through, the baselines add a description of the smallest state. The forest output keeps the density question and the largest river, but phrases the state's relation to the river more generally. These examples illustrate both retained content and residual imprecision within the same output.

#### A second test with variable-free meanings

The paper also evaluates inputs already represented as trees without variables. One dataset is a variable-free version of GeoQuery. The other is RoboCup, which contains 300 English instructions for coaching soccer robots. The method can rewrite a tree node in function-and-argument form. The paper illustrates this with a midfield expression applied to the opponent. The corresponding lambda function takes an argument and inserts it into the midfield expression, so applying the function to the opponent recovers the starting form. Once the representation is written this way, the same kind of decomposition can be attempted.

The protocol also changes. The authors follow the earlier variable-free evaluations with 4 runs of 10-fold cross validation. Within a fold, the trigram component is trained on that fold's training data. A randomly selected 70% of the fold's training examples are used for initial grammar induction and the remaining 30% for tuning feature weights. The grammar is then induced on the full training portion of that fold, with the previously fitted weights used to generate the outputs for the held-out portion. This is a separate evaluation from the fixed-split experiments on typed GeoQuery.

On RoboCup, the forest system scores 62.45 BLEU and 7.0011 NIST. WASP−1++ scores 60.22 BLEU and 6.8976 NIST. The tree conditional random field system from Lu and colleagues scores 62.20 BLEU and 6.9845 NIST. NIST here is the other reported word-sequence comparison metric. The forest system has the highest reported score on both measures for this dataset.

On variable-free GeoQuery, the forest system reaches 57.62 BLEU and 6.6867 NIST. WASP−1++ reaches 53.70 BLEU and 6.4808 NIST. The tree conditional random field approach reaches 57.33 BLEU and 6.7459 NIST. Thus the forest system leads this comparison on BLEU, while the tree conditional random field approach leads on NIST. The authors report a significant improvement over WASP−1++ and characterize performance against the tree conditional random field approach as comparable or slightly better. The latter approach can account for dependencies across phrases on a meaning tree, but it is limited to tree-structured meanings in the comparison described in the paper.

### What the ablations show

#### What happens when larger rules are removed

The paper removes each of the additional rule families in turn and compares automatic scores with the full typed GeoQuery system. This tests the contribution of making those patterns available in generation. A comparison with a translation baseline changes several parts of the procedure at once. In the rule-removal experiments, the relevant change is the availability of a particular kind of extracted rule.

Without subtree rules, designated type 2, the English test scores are 53.77 BLEU and 66.43 on the TER complement. The corresponding Chinese scores are 54.30 and 62.49. All of those scores are below the full system's results. The comparison suggests that direct mappings for entire subtrees provide useful options alongside the more local compositions. For example, leaving such a mapping in the grammar gives the decoder the option of reusing a complete phrase that training paired with a particular expression. The reported scores do not identify which outputs used that option successfully.

Without the two-level rules, designated type 3, the English test scores are 53.68 BLEU and 66.17 on the TER complement. The Chinese scores are 50.96 and 60.13. Removing these rules has the more pronounced effect in Chinese. A two-level rule can connect words contributed by a parent and its descendants while still letting a selected argument vary. The experiment supports the value of giving the decoder access to those extended patterns, especially for the Chinese queries in this evaluation. The paper does not report an inventory of linguistic constructions responsible for the change.

The ablations address the usefulness of each family in the presence of the other rules. When a family is removed, remaining rules can still realize some of the same expressions and may even yield some of the same sentences. The result measures the effect on output ranking and coverage together. It cannot determine how the two families' contributions would combine if both were removed, and the paper gives no separate significance result for the differences in these ablation rows.

#### Training length and the choice of structure

The authors also test whether extending the bigram phase of EM training to 100 iterations changes generation performance. They report similar performance. That observation pertains to the final outputs, after selecting trees, extracting rules, and tuning generation. The paper does not give scores for the longer run or trace how the hidden alignments changed. The experiment establishes that the extra iterations did not produce a reported improvement worth distinguishing in this setup. It leaves convergence and the stability of particular correspondences open.

The traversal experiments offer another controlled comparison. Within the same string-based system, the authors change how the nodes of a deterministic meaning tree are read. Both translation systems favor preorder in English, and both favor inorder in Chinese. The agreement by target language shows that the choice of linearization matters beyond a single implementation. The forest system addresses that sensitivity by making alternative structural decompositions available during alignment and generation. Directly measuring the separate contribution of forest-based alignment and forest-based decoding would require changing those stages individually. The paper compares the full approach with the string-based alternatives and does not report that separation.

The variable-free experiment offers a further perspective on where alternatives may help. The authors expect those inputs to yield fewer alternative splits because the meanings already have a comparatively uniform tree structure. A forest built from such inputs has fewer places to choose among distinct decompositions. The results show that the approach still competes under that condition. Since the meaning representation, evaluation procedure, and comparison systems differ from the typed GeoQuery experiment, the variable-free scores do not quantify the benefit of forest ambiguity. The results instead show that the rule-induction and generation procedures remain usable when alternative decompositions are less readily available.

### Limitations

#### Limits the authors state

The forest is constructed by restricted higher-order unification. The authors note that the unrestricted problem is undecidable and add a limit on free variables in a candidate functor. The trees represented by a forest preserve the input's meaning under the paper's reductions. The range of trees is determined by the permitted decomposition procedure. Thus the equivalence claim concerns the trees the system constructs, while coverage of other legitimate ways to factor the expression depends on the restrictions.

The authors also expect the variable-free input form to limit the advantage of the forest. Rewriting such a tree as function applications makes it eligible for decomposition, but the original structure offers fewer alternative splits. The paper presents this as an explanation for why the packed representation's advantages may be harder to exploit on these inputs. It does not establish a relationship between the number of alternatives available for an instance and the quality of that instance's output.

Finally, the study assumes that the semantics to express are already specified. The authors distinguish their setting from work that also selects which database records or fields to discuss. They suggest that reduction-based rule induction might be useful in statistical machine translation and in learning phrasal synchronous grammars. Those directions appear as proposed applications, with the evidence in this paper coming from generation from formal meanings.

#### Limits visible in the evaluation

The typed-expression results concern U.S. geography requests under a shared data split. English and Chinese expand the range of surface realizations tested. Both still use the same formal query inventory, and the Chinese annotator had access to the English wording as well as the logic. The experiment therefore shows generation into two languages for these meanings and reference conditions. It leaves open how the method would handle independently collected requests that organize the same content differently, or meanings drawn from a domain with a different inventory of relations and constructions. RoboCup provides evidence from another domain under the variable-free representation, rather than another test of typed inputs with variable dependencies.

The baseline comparisons measure the full forest-based design against good phrase-based and hierarchical translation alternatives under a shared evaluation. Several aspects of the design change together. The forest gives the system different inputs, its latent-tree procedure learns different correspondences, its grammar changes what can be extracted, and its decoder searches a different structure. The rule removals narrow the attribution for the larger rule families. They leave the contribution of the forest itself intertwined with the procedure used to learn and apply it.

The metrics also delimit the claims. BLEU and TER compare an output with a reference realization, so a legitimate paraphrase can receive a different score from a sentence with closer wording. Both can also reward matching words in a sentence that changes a relationship. Human judges assess semantic correctness directly as a reading task, with the reference available, and supply evidence the automatic metrics alone could not provide. Their ratings cover the sampled test examples and express judgments about generated sentences. The study gives no independent procedure that parses each generated sentence back into logic and checks whether the recovered meaning matches the input.

That last distinction clarifies what the reduction constraint guarantees. The logical side of a legal derivation must reconstruct the input under the specified conversions. The human interpretation of the output depends on whether learned rule pairings express the logical side accurately in context. The sample density query illustrates the distinction. A river relation may be retained correctly on the logical side even when the wording offers only a broad description of how the river and state are related. The gap is a reason to keep the paper's two forms of evidence in view, formal derivations for controlling input coverage and reader judgments for checking the wording.

The search and scores likewise answer different questions. The decoding equation states which derivation would be preferred under the chosen features. Cube pruning limits the combinations considered in finding output. The study reports the quality achieved by the implemented search, without quantifying search errors or providing a comparison of runtime and memory use as forests grow. Packing explains how several possible trees can be represented with shared structure. It supplies no measurement by itself of how much work the complete system will need on longer or more complex inputs.

### What came after

#### Moving between sentences and formal structure

The paper's later citations reach both directions of the mapping between language and meaning. [Semantic Parsing as Machine Translation](https://md.research.elamur.ai/free/en/papers/andreas-2013-semantic-parsing-as-machine-translation/) takes the direction from language to a formal representation as its subject. This reverses the role of logic and text in the generation experiment. For Lu and Ng, the input meaning is available at test time and constrains which derivations may generate words. For semantic parsing, the structure has to be recovered from the words. The shared point is the translation framing, in which correspondences between components of different representations can support a larger mapping.

[Semantics-Based Machine Translation with Hyperedge Replacement Grammars](https://md.research.elamur.ai/free/en/papers/jones-2012-semantics-based-machine-translation-hyperedge/) places formal semantics within machine translation, using hyperedge replacement grammars. Its connection is the role of a grammar when a translation problem has meaningful structure beyond word order. Lu and Ng give that structure an explicit place on the source side of generation through typed expressions and reduction. The later work addresses semantics-based translation through a different grammar formalism. The citation connects the two questions without establishing that the forest-building or rule-extraction algorithm was carried over.

[Densely Connected Graph Convolutional Networks for Graph-to-Sequence Learning](https://md.research.elamur.ai/free/en/papers/guo-2019-densely-connected-graph-convolutional-networks/) concerns another setting where a structured input is mapped to a sequence. A graph and a forest of equivalent lambda decompositions represent different things. The forest holds alternative ways of composing a particular expression. The graph-to-sequence work names a graph as the input and uses graph convolution in the mapping. The relationship lies in taking input structure seriously before producing a linear output, with different mechanisms for representing and using that structure.

#### Separating what to say from how to express it

[Learning Distributions over Logical Forms for Referring Expression Generation](https://md.research.elamur.ai/free/en/papers/fitzgerald-2013-learning-distributions-over-logical-forms/) puts probability on logical forms in a generation setting. That shifts attention to which underlying description can be used for reference. In the earlier forest system, the expression of the query is given, and the alternatives in its forest reduce to that expression. The later paper's focus on distributions over logical forms brings the choice of description itself into view. Probabilities over candidate meanings and probabilities over ways of phrasing a fixed meaning address decisions at different stages of generation.

[What to talk about and how? Selective Generation using LSTMs with Coarse-to-Fine Alignment](https://md.research.elamur.ai/free/en/papers/mei-2016-what-talk-about-how-selective/) makes selection and realization part of the same generation problem. Coarse-to-fine alignment gives it a way to address the relationship between input content and output wording. Lu and Ng's hybrid-tree alignment connects a fully specified query with its wording, so there is no earlier decision about which input records to discuss. The connection between the papers is the need to establish correspondences between structured inputs and stretches of language, even as the later work also addresses what content to select.

[Neural Text Generation from Structured Data with Application to the Biography Domain](https://md.research.elamur.ai/free/en/papers/lebret-2016-neural-text-generation-structured-data/) takes structured-data generation into the biography domain with a neural approach. The task shares the need to turn information already represented in a structured form into readable prose. Its input setting differs from a typed geography query, where reductions determine which pieces can be composed and the target typically expresses a request. The biography work places the generation question in a domain whose organizing structure comes from data about a subject.

[Challenges in Data-to-Document Generation](https://md.research.elamur.ai/free/en/papers/wiseman-2017-challenges-data-document-generation/) shifts the unit of generation to documents. The earlier paper's comparisons are organized around individual questions or instructions. Document generation raises the problem at the scale of an extended text, where decisions about which content to express and how to organize it belong to the task. The later work's scope marks a boundary of the earlier evidence. A defensible correspondence between a logical subexpression and a phrase helps explain sentence realization without resolving how a longer text should be assembled.

#### GeoQuery in a different language setting

[GeoQuery-LSFB](https://md.research.elamur.ai/free/en/papers/vos-2026-geoquery-lsfb-french-belgian-sign/) brings GeoQuery into a French Belgian Sign Language corpus with procedural semantic annotations. Its direct connection is the geography-query setting and the pairing of language with an explicit semantic representation. Lu and Ng used English and Chinese to study the realization of typed expressions. The later corpus extends the GeoQuery setting to a sign language and names procedural semantics as its annotation approach. That is continuity at the level of a task and dataset family. The corpus description does not establish reuse of the earlier grammar or decoder.

Across these later works, the most direct continuities concern structured meaning, alignment between representations, and the realization of structured inputs as language. The works extend those questions to different input forms, generation decisions, and linguistic settings. The specific result of Lu and Ng's study remains tied to a narrower decision. When a complete logical query can be decomposed in several equivalent ways, retaining those decompositions can help a system learn how its parts are worded and produce a better sentence for that query.

## Cite

Cite as Wei Lu and Hwee Tou Ng. 2011. A Probabilistic Forest-to-String Model for Language Generation from Typed Lambda Calculus Expressions. Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{lu2011probabilistic,
  title = {{A Probabilistic Forest-to-String Model for Language Generation from Typed Lambda Calculus Expressions}},
  author = {Wei Lu and Hwee Tou Ng},
  booktitle = {Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing},
  year = {2011},
  url = {https://aclanthology.org/D11-1149/}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
