<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Framework for Automated Text Generation Benchmarking</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Steven Layne</string-name>
          <email>stevenlayne2017@u.northwestern.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sebastian Gehrmann</string-name>
          <email>gehrmann@seas.harvard.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Franck Dernoncourt</string-name>
          <email>franck.dernoncourt@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lidan Wang</string-name>
          <email>lidwang@adobe.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Trung Bui</string-name>
          <email>bui@adobe.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Walter Chang</string-name>
          <email>wachang@adobe.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>We propose TextGen-Benchmarch</institution>
          ,
          <addr-line>which simplifies</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Workshop Proce dings</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Researchers in areas such as translation and summarization need to compare their results to a wide range of published baselines that commonly use diferent evaluation methods. We aim to enable an easy comparison by presenting TextGen-Benchmarch, an open-sourced tool1 for streamlining the generation and evaluation of text. Text generation methods and evaluation metrics can easily be added to TextGen-Benchmarch, and its pipeline results in a more eficient comparison between methods as users can supply corpora, systems, and evaluation techniques and receive comparison reports in easy to analyze tabular and graphic formats.</p>
      </abstract>
      <kwd-group>
        <kwd>Summarization</kwd>
        <kwd>Text generation</kwd>
        <kwd>evaluation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        An in-depth evaluation and a fair comparison to the
current literature are crucial parts in the development of
Machine Learning (ML) systems. In addition to
modelspecific investigations, this evaluation process typically
includes automated metrics that allow predictions to be
compared to those of other approaches. However, subtle
diferences in output formatting or evaluation metrics
can lead to drastically diferent reported results [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. It is
thus of particular importance to ensure a homogeneous
evaluation environment that applies the same evaluation
to each system output.
      </p>
      <p>
        In the case of (conditional) text generation problems,
put and subject to constraints defined by the task, for
example, the length. Depending on the task, there are
various metrics that can be applied for the evaluation,
such as ROUGE [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ], METEOR [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], BLEU [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], NIST [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ],
or CIDEr [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. A commonality between these metrics is
that all of them compare a generated text against one or
many, typically human-generated, references. These
references are a demonstration of what an adequate result
LGOBE
0000-0002-8257-9516 (S. Gehrmann); 0000-0002-1119-1346
(F. Dernoncourt)
Moreover, TextGen-Benchmarch provides a simple API
to include additional models. During the evaluation, it
can use either cached or user-provided predictions or use
the model API to run inference on a given sample. We
demonstrate the efectiveness of the tool for the problem
of extractive summarization and show how it can make a
comparison between related approaches easier and more
well-rounded.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Related</title>
    </sec>
    <sec id="sec-3">
      <title>Work</title>
      <p>Some tools encapsulate diferent metrics into a single
library so that users can evaluate their hypotheses against
references using a shared interface.While these tools
suc</p>
      <sec id="sec-3-1">
        <title>User- or Model-Generated Text</title>
      </sec>
      <sec id="sec-3-2">
        <title>Framework</title>
      </sec>
      <sec id="sec-3-3">
        <title>Text-Generator</title>
      </sec>
      <sec id="sec-3-4">
        <title>Evaluator f(y, ŷ)</title>
      </sec>
      <sec id="sec-3-5">
        <title>Plots</title>
      </sec>
      <sec id="sec-3-6">
        <title>Scores</title>
        <p>gold folder contains files with line separated references. 2
Samples are read in using Python’s file-stream which
ensures minimal memory usage. The references can be
stored as either plain-text or as a JSON file to enable
multiple references. Here, each line should be formatted
as follows:
cessfully enable the evaluation of a specific system, they
are limited to a single system at a time. Therefore, each
user is required to develop their own comparison.</p>
        <p>
          Some libraries are also restricted in the compatible
input formats. For example, the COCO (Common Objects
in Context) Caption evaluation library [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] provides an
interface that was created to evaluate captioning results.
        </p>
        <p>
          It has support for BLEU, METEOR, ROUGE-L, CIDEr, and { ” r e f e r e n c e s ” :
SPICE. The evaluation library enables users of COCO [ ” r e f 1 ” , ” r e f 2 ” , ” r e f 3 ” ]
caption to streamline the evaluation of their results but is }
limited to COCO-compatible input objects as the library TextGen-Benchmarch loads samples from the datasets
was intended to be used in the context of the MS-COCO specified in the configuration file. It parses the files and
Evaluation Server [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. passes one document at a time to the Text-Generator.
        </p>
        <p>Other libraries can compare models with diferent in- The Text-Generator returns model-generated text, which
put formats, but only for limited tasks. For example, is then stored in the file system to be used during
evalSpark provides ML Pipelines 1, a high-level API for their uation. Users may provide their own generated text in
data handlers. At the end of a pipeline, users may pass conjunction with model-generated texts or skip text
gentheir results to evaluators which are designed for clas- eration entirely by turning of the generation in
consification and regression models, and do not serve text ifguration. Text generation is also skipped if
TextGengeneration models. Benchmarch infers that a given dataset has already been
processed with the model and is cached on the file system.
3. System Overview If the evaluation is enabled, the user and model-generated
text are evaluated against the reference texts.
TextGenBenchmarch currently supports ROUGE, METEOR, NIST,
and BLEU scores. We provide additional details on how
the library interfaces with data in Section 4.</p>
        <p>The TextGen-Benchmarch framework is built in Python
and provides a pipeline as illustrated in Figure 1. Before
starting, TextGen-Benchmarch parses a configuration file
that contains (1) the paths to datasets, (2) the systems,
and (3) the metrics to be used. It additionally allows for
descriptors for the text format. For example, if sentences
are surrounded by tags that should be ignored during
evaluation, it can be specified here. Any specified dataset
must contain two sub-folders samples and gold. The</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Extending the System</title>
      <p>TextGen-Benchmarch is designed to make it as easy as
possible for users to add and remove text generators
and metrics. TextGen-Benchmarch interfaces with two
1https://spark.apache.org/docs/latest/mllib-evaluationmetrics.html
2Python natively supports file-stream with line separated files
which is why it is a formatting requirement.</p>
      <p>CNN-DM
DUC-2004</p>
      <p>Arxiv</p>
      <p>METEOR Metric Score for each System Sorted by Corpus
smmrRE
sumyEdmundson
sumyEdmundsonLocation
sumyEdmundsonCue
sumyEdmundsonKey
sumyEdmundsonTitle
sumyTextRank
sumyLuhn
sumyLSA
sumyLexRank
sumySumBasic
sumyRandom
0.0
2.5
5.0
7.5
15.0
17.5
20.0
10.0 12.5
METEOR Score
library files – one for metrics and one for text generators.
Additions can be added to these two libraries.</p>
      <sec id="sec-4-1">
        <title>4.1. Adding text generators</title>
        <p>The text generator library provides a single public
method with two inputs: a targeted text generator and
text. The targeted text-generator is called and it returns
the resulting text. A user can add additional models by
adding a method for their model that takes in text as
input and returns a generated text as output.</p>
        <p>On load of the library class, information related to the
format of samples is saved. This information includes
separators for tokenized sentences and a Boolean that
indicates whether the text is tokenized. Custom methods
must use this information to decide how to preprocess
the input text before passing it into the flow of their
added model. Some text generators require sentences
to be pre-tokenized whereas other text generators have
custom tokenizers and expect raw text. For additional
convenience, we provide an interface for a tokenizer and
a detokenizer with the library.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Adding Metrics</title>
        <p>Adding metrics follows a similar process to to one
outlined for text generators. The metric library provides a
method with a single input: a custom Summary Reader
Object (SRO). The SRO has two public methods: r e a d O n e
and r e a d A l l . When r e a d O n e is called a tuple of the form
( p r e d i c t i o n , r e f e r e n c e s ) . When r e a d A l l is called, a list
of all  tuples is returned, where  corresponds to the
number of generated texts.</p>
        <p>The r e a d O n e and r e a d A l l methods are abstractions for
Python’s file-stream reader.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Report types</title>
      <p>TextGen-Benchmarch provides the following report
types.</p>
      <p>• CSV: Fixed Metric generates a separate CSV for
each metric. Each row is a diferent model. Each
column represents a corpus. To assist with
comparisons of the same evaluation metric and set of
summarizers but against diferent corpora.
• CSV: Fixed corpus generates a single report for one
corpus. Each row represents a model and each
column a metric. This assists with comparisons
on the same corpus with a single set of models
but against diferent metrics.
• Horizontal Barchart: Fixed Metric. Grouped by the
corpus, this shows scores on the X-axis, sorted by
average metric score across corpora. This
visualization helps draw comparisons between models
across diferent corpora.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Example Reports</title>
      <p>
        We demonstrate the usage of TextGen-Benchmarch
using the extractive summarization problem. An extractive
summary is defined as a subset of sentences from a
number of documents (either one or many) that efectively
summarizes the message of the input. Typical metrics
for this task include ROUGE and METEOR. We present a
comparison of popular non-parametric extractive
summarizers on the DUC 2004 [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], ArXiv [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] and
CNNDM [
        <xref ref-type="bibr" rid="ref12 ref13">12, 13</xref>
        ] datasets respectively. We are comparing
smmrRE, our re-implementation of SMMRY extractive
summarizer 3, and Python’s sumy summarizers 4.
      </p>
      <p>For ArXiv and CNN-DM, we used 1,000 samples of the
test-set for demonstration purposes. Thus, the results
should not be interpreted as oficial scores. They do,
however, highlight some interesting variation between the
performance of the summarizers in the diferent metrics.</p>
      <p>Figure 2 shows the METEOR scores. The order
corresponds, from top to bottom, to a summarizer’s rank when
comparing the average score across all corpora. Here,
smmrRE ranks first and sumyRandom comes in last.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S. A.</given-names>
            <surname>Ellafi</surname>
          </string-name>
          ,
          <article-title>Preprocessing and normalization for automatic evaluation of machine translation</article-title>
          ,
          <source>Association for Computational Linguistics</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>C.-Y.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Hovy</surname>
          </string-name>
          ,
          <article-title>Automatic evaluation of summaries using n-gram co-occurrence statistics</article-title>
          ,
          <source>in: Proceedings of the 2003 Conference of the North American Chapter of the Association for Computational Linguistics on Human Language TechnologyVolume 1</source>
          , Association for Computational Linguistics,
          <year>2003</year>
          , pp.
          <fpage>71</fpage>
          -
          <lpage>78</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>C.-Y.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <surname>ROUGE:</surname>
          </string-name>
          <article-title>A package for automatic evaluation of summaries, in: Text summarization branches out: Proceedings of the Association for Computational Linguistic workshop</article-title>
          , volume
          <volume>8</volume>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S.</given-names>
            <surname>Banerjee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lavie</surname>
          </string-name>
          ,
          <string-name>
            <surname>METEOR:</surname>
          </string-name>
          <article-title>An automatic metric for mt evaluation with improved correlation with human judgments, in: Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization</article-title>
          , volume
          <volume>29</volume>
          ,
          <year>2005</year>
          , pp.
          <fpage>65</fpage>
          -
          <lpage>72</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>K.</given-names>
            <surname>Papineni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Roukos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Ward</surname>
          </string-name>
          , W.-J. Zhu,
          <article-title>Bleu: a method for automatic evaluation of machine translation</article-title>
          ,
          <source>in: Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics</source>
          ,
          <year>2002</year>
          . URL: http://aclweb.org/anthology/P02-1040.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>G.</given-names>
            <surname>Doddington</surname>
          </string-name>
          ,
          <article-title>Automatic evaluation of machine translation quality using n-gram co-occurrence statistics</article-title>
          ,
          <year>2002</year>
          , pp.
          <fpage>138</fpage>
          -
          <lpage>145</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>R.</given-names>
            <surname>Vedantam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lawrence Zitnick</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Parikh</surname>
          </string-name>
          , Cider:
          <article-title>Consensus-based image description evaluation</article-title>
          ,
          <source>in: Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          ,
          <year>2015</year>
          , pp.
          <fpage>4566</fpage>
          -
          <lpage>4575</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>C.-Y.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <article-title>A brief introduction of the rouge summary evaluation package</article-title>
          ,
          <source>Univeristy of Southern California/Information Sciences Institute</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>X.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Fang</surname>
          </string-name>
          , T.-
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Vedantam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Gupta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Dollár</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. L.</given-names>
            <surname>Zitnick</surname>
          </string-name>
          ,
          <article-title>Microsoft coco captions: Data collection and evaluation server</article-title>
          ,
          <source>CoRR abs/1504</source>
          .00325 (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>P.</given-names>
            <surname>Over</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Yen</surname>
          </string-name>
          , Introduction to DUC-2004:
          <article-title>an intrinsic evaluation of generic news text summarization systems</article-title>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>A.</given-names>
            <surname>Cohan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Dernoncourt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Bui</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Goharian</surname>
          </string-name>
          ,
          <article-title>A discourse-aware attention model for abstractive summarization of long documents</article-title>
          ,
          <source>in: Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies</source>
          , Volume
          <volume>2</volume>
          (
          <string-name>
            <surname>Short</surname>
            <given-names>Papers)</given-names>
          </string-name>
          ,
          <source>Association for Computational Linguistics</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>615</fpage>
          -
          <lpage>621</lpage>
          . URL: http://aclweb.org/anthology/N18- 2097.
          <article-title>doi:1 0 . 1 8 6 5 3 / v 1 / N 1 8 - 2 0 9 7</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>K. M. Hermann</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Kocisky</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Grefenstette</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Espeholt</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          <string-name>
            <surname>Kay</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Suleyman</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Blunsom</surname>
          </string-name>
          ,
          <article-title>Teaching machines to read and comprehend</article-title>
          ,
          <source>in: Advances in Neural Information Processing Systems</source>
          ,
          <year>2015</year>
          , pp.
          <fpage>1693</fpage>
          -
          <lpage>1701</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>R.</given-names>
            <surname>Nallapati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Zhou</surname>
          </string-name>
          , C. dos
          <string-name>
            <surname>Santos</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Gulcehre</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Xiang</surname>
          </string-name>
          ,
          <article-title>Abstractive text summarization using sequence-to-sequence rnns and beyond</article-title>
          ,
          <source>in: Proceedings of The 20th SIGNLL Conference on Computational Natural Language Learning, Association for Computational Linguistics</source>
          ,
          <year>2016</year>
          , pp.
          <fpage>280</fpage>
          -
          <lpage>290</lpage>
          . URL: http://aclweb.org/anthology/K16- 1028.
          <source>doi:1 0 . 1 8</source>
          <volume>6 5 3</volume>
          / v 1 / K 1 6
          <article-title>- 1 0 2 8</article-title>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>