Reversibility and Re-usability of Resources
in NLG and Natural Language Dialog Systems
Martin Klarner
3SOFT GmbH
Frauenweiherstr. 14, D-91058 Erlangen, Germany
martin.klarner@3soft.de
Abstract
Reversibility is a key to e–cient and maintain-
able NLG systems. In this paper, we present
a formal deflnition of reversible NLG systems
and develop a classiflcation of existing natural
language dialog systems in this framework.
1 Introduction
Reversibility is a key factor in building e–cient and
maintainable NLG and natural language dialog systems
(NLDSs). But previous formal descriptions of reversibil-
ity are still lacking in coverage and applicability to exist-
ing systems. In this paper, we extend former approaches
to this matter by formally deflning reversibility in NLDSs
and developing a proper classiflcation of such systems
in terms of reversibility. After that, existing NLG and
generic dialog systems are used as examples for the fea-
sibility and applicability of our classiflcation.
In our point of view, it is useless to consider reversibil-
ity for an NLG system alone, because parsing and dia-
log management are equally important for developing an
NLDS. Hence, our classiflcation applies to complete di-
alog systems and not only NLG systems.
2 A Formal Description of Reversibility
In this section, we will provide a formal deflnition of
reversibility which is based on previous work [Neumann
and van Noord, 1994]. To this end, we will flrst give
a short overview of the results obtained there in sect.
2.1. After that, we will present our extended deflnition
in sect. 2.2.
2.1 Previous deflnitions of Reversibility
In [Neumann and van Noord, 1994], a deflnition of re-
versibility for programs is provided. The authors start
with a deflnition for computing a relation r in both di-
rections (def. 1).
Deflnition 1. (Computing a relation in both directions
according to Neumann and van Noord)
A program P computes a relation r in both di-
rections, ifi for a given input hdir; ei it recursively enu-
merates the set
fx j (he; xi 2 r ^ dir = 0) _ (hx; ei 2 r ^ dir = 1)g.
In this deflnition, the parameter dir denotes the di-
rection in which the input is computed, and e represents
the content of the input for which the appropriate output
has to be obtained.
Let us state a simple corollary to def. 1 which relates
the notion of computing a relation in both directions to
the notion of inverse relations.
Corollary 1. A program P computes the relation r in
both directions, if P computes r and the inverse relation
of r, r¡1.
Proof. According to def. 1, P recursively enumerates the
set fx j he; xi 2 rg for dir = 0 and the set fx j hx; ei 2 rg
for dir = 1. Hence, it computes r for dir = 0 and
(using the standard deflnition of inverse relations) r¡1
for dir = 1.
Based on def. 1, the following deflnitions for r-
reversibility of programs and relations are provided in
[Neumann and van Noord, 1994] (def. 2).
Deflnition 2. (Reversibility of programs and relations
according to Neumann and van Noord)
1. A program P is r-reversible if it computes r in
both directions.
2. A relation r is reversible ifi an r-reversible pro-
gram exists.
The notion of reversible programs in def. 1 and 2 is
very general: In an extreme case, such a program can
consist of two completely independent parts tied to-
gether only by an initial conditional statement. This
statement decides, depending on the value of the direc-
tion parameter dir, whether the program part computing
relation r (for dir = 0) or the one computing r¡1 (for
dir = 1) is used. In our opinion, such a program should
not be called reversible any more. Hence, deflnitions 1
and 2 are too general.
On the other hand, they are too speciflc; this is due
to three reasons:
1. Program and data are not distinguished.
2. Thus, difierent resources and resource types1 are
also not addressed.
1such as linguistic and pragmatic resources
3. The availability time for a program or a resource2
is not considered.
Hence, in the next section we will replace these def-
initions by a more general description of reversibility
for generic program systems before we will describe re-
versibility in current NLDSs.
2.2 Extended deflnition of reversibility
In this section, we will present our deflnition of reversibil-
ity. We start with deflnitions of a generic program sys-
tem and of system and program relations (def. 3).
Deflnition 3. (Program system, system relations, and
program relations)
1. A program system S consists of a triplet
(COMPS; PROGS; RESS) of
(a) a set of preprocessing programs COMPS =
fC1; : : : ; Ckg which are executed before system
start,
(b) a set of runtime programs PROGS =
fP1; : : : ; Plg,
(c) and a set of resources RESS = fR1; : : : ; Rmg.
2. The set of relations RELS = fr1; : : : ; rng computed
by the programs of PROGS is called the set of sys-
tem relations of S.
3. The set of relations RELP = fr1; : : : ; rpg computed
by a single program Pi 2 PROGS is called the set
of program relations of P.
By resources we denote every data structure needed by
a runtime program for its execution3. More precisely, the
resource RPi;rk provides a necessary (but not su–cient)
condition for the runtime program Pi to compute one of
its program relations rk. All of these resources must be
available at system start, but they may be generated by
preprocessing programs.
Before we can state our deflnition of reversibility, we
have to give a formal description of inverse programs and
resources (def. 4).
Deflnition 4. (Inverse program and inverse resource)
Let S be a program system, R 2 RESS a system re-
source, and P 2 PROGS a program with a program re-
lation r 2 RELP . Let R be a resource needed by P for
computing r.
1. Then every program P¡1 computing the inverse re-
lation r¡1 is called an inverse program to P with
respect to r.
2. The transformation of a resource R needed by P¡1
to compute r¡1 is called inverse resource R¡1 to
R with respect to r.
A simple corollary relates self-inverse programs to r-
reversible programs.
2i.e. whether it is available only at runtime or already at
compile time
3contrary to the terminology used e.g. in operating sys-
tems programming
Corollary 2. If P · P¡1 holds, i.e. if P is self-inverse
with respect to r, then P is r-reversible.
Proof. If P computes r, P¡1 computes r¡1, and P ·
P¡1 holds, then P computes r¡1 as well. Then, accord-
ing to def. 1, P computes r in both directions, and with
def. 2 P is r-reversible.
Algorithmic reversibility
For any program system of def. 3, we deflne algorithmic
reversibility in the following way (def. 5).
Deflnition 5. (Algorithmic reversibility)
Let S be a program system, P 2 PROGS a program
in S, and r 2 RELP a program relation of P.
Then S is algorithmic-reversible in P and r if P
is r-reversible.
Hence, P (and no other program Q 2 PROGS with
Q 6= P)4 has to compute r and r¡1 as well.
Data reversibility
Data reversibility, the counterpart of algorithmic re-
versibility, can be deflned as follows (def. 6).
Deflnition 6. (Data reversibility)
Let S be a program system, R 2 RESS a system re-
source of S, and r 2 RELS a system relation of S.
Then S is data-reversible to R and r if two programs
P1; P2 2 PROGS exist which both need R to be executed
and for both of which r 2 RELP1 and r¡1 2 RELP2
holds.
Thus, P1 must compute r using R, and P2 must com-
pute the inverse relation r¡1 (also by using R). If
P1 · P2 · P holds, S is also algorithmic-reversible to P
and r.
Static and dynamic reversibility
A difierent dimension of reversibility dealing with the
availability time of a program or a resource can be de-
scribed as follows (def. 7).
Deflnition 7. (Static and dynamic reversibility)
Let S be a program system, R 2 RESS a system re-
source and r 2 RELS a system relation of S.
1. S is static-reversible with respect to R and r if
(a) a program P 2 PROGS with r 2 RELP exists
which needs R for its execution,
(b) also r¡1 2 RELS, P¡1 2 PROGS, and R¡1 2
RESS holds,
and additionally
(c) at least one preprocessing program C 2
COMPS is needed for the construction of R¡1
from R or of P¡1 from P.
2. If no such program C is needed, S is called
dynamic-reversible with respect to R and r.
4By Q 6= P we denote syntactic in-equivalence here. This
is easily decidable, whereas semantic equivalence of programs
is certainly not.
If, under the preconditions of def. 7, the inverse
program P¡1 is constructed, S is also algorithmic-
reversible with respect to P and r. However, if the in-
verse resource R¡1 is constructed, S is data-reversible
with respect to R and r. Obviously, both algorithmic
and data reversibility can occur simultaneously.
3 Reversibility in Dialog Systems
Consider the special relation sp!s between phonetic and
semantic structures. This is the relation computed by
the analysis part of a natural language dialog system
(NLDS). By applying our deflnitions of reversibility pre-
sented in sect. 2.2 on sp!s, we face an important ques-
tion of natural language processing: To what extent is
a given NLDS reversible? But before we consider this
question in more detail, we have to deflne our notion of
an NLDS flrst. Based on def. 3, we formally describe an
NLDS as follows (def. 8).
Deflnition 8. (NLDS)
Let rp!s be the relation between phonological and se-
mantic structures and r¡1p!s the inverse relation of rp!s.5
An NLDS is a program system S with rp!s 2 RELS
and r¡1p!s · rs!p 2 RELS.
Hence, an NLDS must contain both the relations rp!s
and rs!p as system relations. This is quite obvious, since
natural language dialog requires both natural language
understanding (NLU) and natural language generation
(NLG).
4 Classiflcation of Reversibility Types
As we have seen in the previous sections, generic pro-
gram systems and NLDSs in particular can be reversible
in two independent dimensions: On the one hand, they
can be static or6 dynamic, and on the other hand, al-
gorithms and/or data can be reversible. Given that a
system may also be not reversible at all in both dimen-
sions just mentioned, we obtain a classiflcation of nine
possible reversibility types.
[Neumann, 1994], however, describes just four types of
reversibility in dialog systems and takes only the gram-
mar as a linguistic resource into account: Type A has
static reversibility (in terms of data and algorithms),
while type B has dynamic data reversibility. Type C has
statistically reversible data and dynamically reversible
algorithms, while type D has dynamic data and algo-
rithmic reversibility.
By further exploring the notions of algorithmic and
data reversibility introduced above, both of which can be
realized in three difierent variants (none, static, and dy-
namic), we are able to extend the classiflcation in [Neu-
mann, 1994] by two more types: Type E is statically re-
versible in terms of data and algorithms, and type F has
dynamic data and static algorithmic reversibility. Our
5Henceforth, we will denote r¡1
p!s just rs!p for obvious
simplicity reasons.
6The \or" here must be read as an \exclusive or".
extended classiflcation of reversible dialog systems is de-
picted in flg. 1.
There are three more possible types in our classifl-
cation, all of them without data reversibility: Type G
has statically and type H dynamically reversible algo-
rithms, whereas type I does not have any reversibility
at all. While types G and H are just not desirable for
real-world NLDSs, type I is even unacceptable. Hence
we decided to exclude types G, H, and I from flg. 1 and
depict them separately in flg. 2. However, the legend
displayed there applies to flg. 1 as well.
It has to be pointed out here that any classiflcation of
reversible dialog systems must not be restricted to the
grammar, but has to be extended to the other resources
used in an NLDS as well. Apart from the grammar,
we distinguish flve additional system resources: Lexicon
and morphology component are linguistic resources (to-
gether with the grammar), whereas discourse memory,
domain model, and user model are pragmatic system
resources. Hence, the reversibility of an NLDS can be
classifled depending on (at least) six difierent resource
categories. Together with the six reversibility types in-
troduced above, these six resources form a 6-tuple which
enables us to describe the reversibility of an NLDS for-
mally and completely.
Let us take the Conald dialog system [Ludwig, 2003]
as an example. The system lexicon is precompiled into
an NLG lexicon at development time, hence we have
static reversibility of type E here. On the other hand, the
morphology component is used by both the parser and
the generator at runtime in a uniform way (cf. [Klarner
and Ludwig, 2004]), resulting in dynamic reversibility for
this component. Discourse memory and domain model
are used in the dialog manager for pragmatic integra-
tion and by the NLG component. The data structures
are identical, but the algorithms are difierent. Thus, we
have type B reversibility for these two resources. The
user model, however, is not used for parsing, only for
generation, hence the system is not reversible with re-
spect to the user model.
In table 1 the reversibility types of the difierent re-
sources are put together. They form a tuple (E, D, A, B,
B, none) completely describing reversibility in Conald.
Resource Type
Lexicon E
Morphology D
Grammar A
Discourse Memory B
Domain Model B
User Model none
Table 1: Reversibility of Conald.
The Amalia system [Gabrilovich et al., 1998] is a typ-
ical example for Prolog-based reversible NLG systems.
The system grammar is flrst inverted and then compiled
into two difierent versions, one for parsing and one for
generation. Thus, we have type C reversibility here. The
Parser
Parser
Uniform Source
Algorithm
Uniform
Algorithm
Parser
Parser
Uniform Source
Algorithm
Uniform
Algorithm
Generator
Generator
Generator
Generator
Parsing
Resource
Parsing
Resource
Parsing
Resource
System
Resource
System
Resource
System
Resource
Generation
Resource
Generation
Resource
Generation
Resource
System
Resource
System
Resource
System
Resource
Type A
data: static; algorithms: none
Type B
data: dynamic; algorithms: none
Type C
data: static; algorithms: dynamic
Type D
data: dynamic; algorithms: dynamic
Type E
data: static; algorithms: static
Type F
data: dynamic; algorithms: static
Figure 1: Reversible dialog systems.
Parser
Parser
Uniform
Algorithm
Uniform Source
Algorithm
Generator
Generator
A
A B
B
BA
Parsing
Resource
Parsing
Resource
Generation
Resource
Generation
Resource
Parsing
Resource
Generation
Resource
Legend
uses resource
is compiled into
Type G
data: none; algorithms: static
Type H
Type I
Resource
Program
is compiled into
Program
Figure 2: Not-so-reversible dialog systems.
same applies to the lexicon. As there are no pragmatic
resources and no morphology component, we can skip
their analysis here. Hence, Amalia can be characterized
by the reversibility tuple (C, n/a, C, n/a, n/a, n/a); cf.
table 2.
Resource Type
Lexicon C
Morphology n/a
Grammar C
Discourse Memory n/a
Domain Model n/a
User Model n/a
Table 2: Reversibility of Amalia.
Our third and flnal example is Trips [Ferguson and
Allen, 1998]. In this system, the Discourse Context and
the Reference component are shared between the Inter-
pretation Manager (which is used for parsing) and the
Generation Manager (cf. [Allen et al., 2001]). This re-
sults in type B for the discourse memory. The same
holds for the ontology of Trips (cf. [Stent, 2001], p.
139): Its domain model is of type B as well. As there
is no speciflc user model contained in the system, there
is also no degree of reversibility to be found there. For
various reasons, the Generation Manager uses its own
grammar and morphology component (cf. [Stent, 2001],
p. 180 & 182). The NLG lexicon of Trips is obtained
semi-automatically from various system resources and
ofi-line extraction (cf. [Stent, 2001], p. 180). Hence, we
have type A reversibility here. We therefore conclude
that Trips can be described by the reversibility tuple
(A, none, C, B, B, n/a); cf. table 3.
Resource Type
Lexicon A
Morphology none
Grammar none
Discourse Memory B
Domain Model B
User Model n/a
Table 3: Reversibility of Trips.
5 Re-usability as Static Reversibility of
Resources
Given our deflnitions of reversibility in sect. 2, we can
view re-using resources in an NLDS as static or dynamic
reversibility of the system for these resources. Compared
to the deflnition in [Neumann and van Noord, 1994] re-
ferred in sect. 2.1, this is a more general deflnition which
can be applied to a lot of existing NLDSs.
Let us again use the Conald system as an example,
this time only taking the data structures into account,
in order to search for possible re-use of resources. Two
core linguistic resources of its parsing branch are re-used
in its NLG component Hyperbug [Klarner and Ludwig,
2004]: The system lexicon and the morphology compo-
nent are both used by the parser and the generator, with
static reversibility for the system lexicon and dynamic re-
versibility for the morphology component. As mentioned
in sect. 4, re-use is also done for the pragmatic resources,
namely discourse memory and domain model.
Generally speaking, the more linguistic and pragmatic
resources are re-used in an NLDS, the higher its degree of
reversibility becomes, and the more e–cient the system
will be to develop and maintain.
6 Conclusion and Further Work
We have developed a formal description of reversibility
for NLDSs, using deflnitions for program systems, sys-
tem relations, and system resources. Based on these def-
initions, we have presented a classiflcation of reversible
NLDSs in general and NLG systems in particular. Our
classiflcation extends previous approaches in three di-
mensions: First, it covers static and dynamic reversibil-
ity, second, it considers algorithmic and data reversibil-
ity, and third, it takes the difierent resources of a dialog
system into account.
The 6-tuple used in our classiflcation can, of course,
be extended to incorporate difierent linguistic and prag-
matic resources, should they prove useful for an NLDS.
However, we identifled the set of resources mentioned
above by thorough investigation of existing systems
based on the results presented in [Maier, 1999] for text
planning; presently, we do not think we need additional
ones.
Unfortunately, our deflnition of reversibility does not
yet completely re ect all aspects of current NLDSs: For
example, it does not cover systems where preprocessing
and runtime programs cannot be clearly separated, be-
cause such systems allow a  exible choice for a given
resource and/or algorithm to be computed beforehand
(by preprocessing) or at runtime.7 This extended de-
gree of dynamic has yet to be taken into account in our
deflnitions.
The obvious practical application of our classiflcation
is twofold: First, using it in a descriptive way to analyze
existing systems. Second, and more practical, using it in
a normative way to further develop one’s one NLDS to
be as reversible as possible (i.e., to obtain a \D" in all
six positions of the 6-tuple of reversibility types). Both
applications are important, but the second is the one we
are going to pursue in the near future.
Acknowledgments
Most of the work described here was done while complet-
ing my PhD thesis [Klarner, 2005] at the Chair for Artifl-
cal Intelligence of the University of Erlangen-Nuremberg.
This is why I want to thank my former colleagues there,
7While such systems are certainly an attractive theoretical
possibility, we are not aware of real-world existing ones so far.
especially Bernd Ludwig and Peter Rei…, for their en-
during cooperation and support. Many thanks to the
anonymous reviewers as well for providing very helpful
comments to the initial version of this paper.

References
[Allen et al., 2001] J. Allen, G. Ferguson, and A. Stent.
An architecture for more realistic conversational sys-
tems. In Proc. 6th Int. Conf. on Intelligent User In-
terfaces (IUI-2001), pages 1{8, Santa Fe, 2001.
[Ferguson and Allen, 1998] George Ferguson and James
Allen. Trips: An intelligent integrated problem-
solving assistant. In Proc. AAAI-98, Madison, WI,
1998.
[Gabrilovich et al., 1998] Evgeniy Gabrilovich, Nissim
Francez, and Shuly Wintner. Natural language gen-
eration with abstract machine. In Proc. INLG-98,
Niagara-on-the-Lake, 1998.
[Klarner and Ludwig, 2004] Martin Klarner and Bernd
Ludwig. Hybrid natural language generation in a
spoken language dialog system. In Susanne Biundo,
Thom Fr˜uhwirth, and G˜unther Palm, editors, Proc.
KI-2004, pages 97{112, Ulm, 2004.
[Klarner, 2005] Martin Klarner. Hybride, pragma-
tisch eingebettete Realisierung mittels Bottom-Up-
Generierung in einem nat˜urlichsprachlichen Di-
alogsystem. PhD thesis, Erlangen-N˜urnberg, 2005.
[Ludwig, 2003] Bernd Ludwig. Ein konflgurierbares
Dialogsystem f˜ur Mensch-Maschine-Interaktion in
gesprochener Sprache. PhD thesis, Universit˜at
Erlangen-N˜urnberg, 2003.
[Maier, 1999] Elisabeth Maier. Entwurf und Implemen-
tierung von Wissensquellen f˜ur die Textplanung { eine
modulare Architektur. Berlin, 1999.
[Neumann and van Noord, 1994] G˜unther Neumann
and Gertjaan van Noord. Reversibility and self-
monitoring in natural language generation. In Tomek
Strzalkowski, editor, Reversible Grammars in Natural
Language Processing. Boston, Dordrecht, London,
1994.
[Neumann, 1994] G˜unter Neumann. A Uniform Compu-
tation Model for Natural Language Parsing and Gen-
eration. PhD thesis, Universit˜at des Saarlands, 1994.
[Stent, 2001] Amanda J. Stent. Dialogue Systems as
Conversational Partners: Applying Conversation Acts
Theory to Natural Language Generation for Task-
Oriented Mixed-Initiative Spoken Dialogue. PhD the-
sis, University of Massachusetts Amherst, 2001.
