日本ソフトウェア科学会第 37 回大会 (2020 年度) 講演論文集

ErrorSpotter: A Visual Analytics System for Spotting
Errors in AI Generated Sports Summaries
Zhehao Yang, Ken Wakita
近年の自然言語生成技術の発展に伴い、ニューラルネットワークモデルを用いて事実を表すデータか
ら，叙述的内容を適切な順番で生成できるようになった．しかし，生成されたテキストは、事実に基づかない記述を含んだり，特筆すべき事実に触れないなどの課題がある．本論文は，AI が生成したスポーツの試合についての要約記事の誤りを発見するための視覚的分析システムを提案する．ニューラルネッ
トワークモデルに入力した試合のデータとそこから生成された記事内の語句を関連づけるため，文書にattention 値を組み合わせて表示することで，試合のデータとニューラルネットワークが生成した単語列の関係をわかりやすく提示する．このようなインタラクションを通じて，フィルタリング，誤りの検出，関連するデータについての調査を可能にし，記事の潜在的な誤りを指摘し，試合の事実に沿って検証できる．
Recent improvements in natural language generation have enabled neural network models to generate descriptive texts with modeling what to say and in what order. However, there are still erroneous texts
remaining and other remarkable data facts missing in the texts. In this paper, we present one erroneous
text spotting visualization system for AI generated sports summaries. We combine intuitive visualizations
for attention-augmented documents, which illustrates the connection between the input game data and theoutput words generated by neural network model. Through interactions, our system enables attention ﬁltering, error spotting, and data facts exploring that assist users in locating and verifying potential erroneous
texts.

imates where the models are paying attention to,

1 Introduction

hence assists in debugging common problems like

Over the past several years, neural text genera-

repetition and copying in black-box models [4]. Intion systems have shown impressive performancetext generation tasks, attention visualizations haveon tasks such as machine translation and text

eﬀectively helped researchers to verify alignments

generation. Meantime, more and more advanced

and explore attention correlation in displaying at-summary generation models were developed [9, 13]

tention distribution, amplifying tiny diﬀerences andwhere attention mechanism [1] has been widely

detecting potential erroneous output.

used in. Attention mechanism has been the mostDespite producing overall ﬂuent text, up-to-dateintuitive intermediate delivery from neural net-neural systems still have diﬃculty capturing all thework models: by exporting vectors of attention

key points and generating a perfect summary thatweights corresponding to the encoding units insatisﬁes everyone. In other words, there are still er-

encoder-decoder models [2, 11], attention approx-

roneous text remaining and mentionable data facts
missing in neural model generated text. Now that

ErrorSpotter: 自動生成されるスポーツ記事中の誤りを発見するための視覚的分析システム
楊 哲皓 脇田 建, 東京工業大学情報理工学院, Schoolof Computing, Tokyo Institute of Technology.

the machine is not smart enough to ﬁx this problem by itself, we can take advantage of attention
mechanism and visualization to ﬁx the text error

uate their results in NLG tasks. Text Heatmap

issue on our own.
Therefore, we design a visual analytics systempresents the overview of generated output text withfor spotting errors in NLG tasks. We extend text

each text token colored in terms of its attention

heatmap to intuitively display documents as wellvalue [6]. 2D Heatmap shows a correlation between

as potential erroneous text and utilize 2D heatmap

input and output tokens by mapping these tokens

to reveal the correlation between attention weightwith diﬀerent color weights in a tabular space [1]. It

and each generated token. Through interaction, we

is easy to cross-compare the relationships between

enable the users to explore reliable game data as

two tokens. However, a disadvantage with such 2D

reference to verify spotted erroneous text.

matrices is that they take too much space. Our

We conclude our study with discussions on how

work takes advantage of multiple conventional vi-

the visual design can be improved and extended forsualization methods to provide an interactive, intu-

other domains and analysis tasks.

itive, and easily interpretable visualizer of attention
model.

2 Related Work
2. 1 Natural Language Generation

2. 3 Error Spotting System

As the process of generating phrases and sen-In this section, we discuss common types of is-tences in the form of natural language, Natural

sue occurring in NLG texts and corresponding er-

Language Generation (NLG) attracts a growing in-ror spotting systems. Here are the three main issueterest with the rapid development of Artiﬁcial In-

types we classify :telligence. There are several types of tasks that

Grammatical Issues include, but are not lim-

NLG can contribute to, such as question answer-

ited to: spelling errors, unwanted words, miss-ing, summarizing [3], and even the computationaling words, prepositional errors, punctuation errors,

humor generating [10]. The ErrorSpotter is target-

and many of the grammatical errors. Grammat-

ing at the ﬁeld of generating a natural language text

ical Error Correction is typically formulated as athat describes and summarizes sports data. Re-

sentence correction task of ﬁxing such grammati-

cent achievements in sports game summary gener-

cal issues. Recent Grammatical Error Correction

ation [13] indicate the signiﬁcant impact of Natu-

Systems [8] are showing great performance on theral Language Generation on descriptive summary

test of CoNLL-2014 Shared Task which is the mostgeneration.

widely used database to benchmark Grammatical

Followed work [9] improved genera-tion quality by explicitly modeling content selection(what to say) and planning (in what order ) withina neural architecture.

Error Correction [7].
Artiﬁcial Issues represent the problem of
having the indistinguishable generated text fromhuman-written text to non-expert readers such as

2. 2 Attention

Visualization

for

NLG

Tasks

fake comments, false articles, and misleading reviews, which might cause the abuse of text genera-

Since attention mechanism was ﬁrst proposedtion system. One visual detection tool, GLTR [5],in the NLG ﬁeld [1], researchers never stop theirwas developed by applying a suite of baseline sta-

pace to improve and utilize this emphasis embed-

tistical methods to support humans in detecting

ded mechanism. Attention visualization plays an

generation artifacts which are the texts generated

essential role in helping analysts explore and eval-by a model.

Factual Issues refers to the problem of having

as s = {rj }Jj=1 . For each content plan item r ∈ s,unfaithful data facts within generated textural out-

there are four attributes, which are r.t, r.e, r.v andput which are inconsistent with the truth. Factual

r.s presenting a record’s type, entity, value, andissues might also occur along with grammatical is-side, respectively. For example, one content plansues and artiﬁcial issues. Besides, a minor erro-

might have a record r such that (r.t = PTS, r.e =neous data fact hidden in long sentence tends to

LeBron James, r.p = 25, r.s = AWAY) where thebe neglected without the corresponding check fromtype of record is Points, the entity is LeBron James,

source data set. These characteristics potentiallythe value is 25 and the side of this record belongs

increase the diﬃculty of detecting factual issue re-to away team. This innovative method enables thelated errors. The information extraction systemmodel to achieve great performance improvements

which can achieve the goal of distinguishing erro-both in terms of the number of relevant facts con-neous data facts through extracting entity, num-

tained in the output text, and the order according

ber, and types from NBA sports summaries wasto which these data facts are presented.

developed as the evaluation metrics to automatically evaluate output generation performance [13].

3. 2 Design Considerations

In this paper, we mainly focus on addressing fac-

To design a visual analytics system spotting er-tual issues in NLG task instead of grammatical is-rors with high ﬂexibility, explorability, and read-sues and artiﬁcial issues. In the next section, we

ability, we aim to achieve three primary goals:

will discuss our error spotting system with moredetails.

DC1 (Error Hint) Intuitive hints of automatically showing potential erroneous text are of great

3 Systemeﬃciency in error spotting system so that users

3. 1 Data and Model

could easily pay attention to the targeted word and

The data we used in this system is ROTOWIRE

make further analysis like model evaluation and er-[13], one dataset of NBA basketball game sum-roneous text revision.

maries, paired with the corresponding box-score ta-

DC2 (Exploration) As an error spotting sys-ble, which is a structured summary listing scoretem, the ability of visually displaying reliable data

as well as individual and team achievements in afacts is desired for users to do data exploration.

sports competition. The data set contains 3,398

This feature helps provide references to distinguishsummaries which are all professionally written by

between erroneous text and correct text.

sports editors with an average length of 337 words.

DC3 (Overview and Focus) The system

The proper summary amount and summary lengths

should oﬀer the overview of attention distribution.

make this data set ideally suited for natural lan-

Meanwhile, it is also possible to inspect detailed

guage generation.

information on focused word.

The model we used is Puduppully and others’
data-to-text generation model [9]. This model gen-

3. 3 System Overview

erates a content plan highlighting which informa-In this study, our system takes advantages oftion should be mentioned and in which order andthe strength of text heatmap and 2D heatmap -then generates the document while taking the con-both are commonly used in NLG tasks to lower thetent plan into account. The content plan is a set oflearning curve. As shown in Figure 1, AI-generated

game-related data record, which can be represented

図 1 Text Heatmap of AI generated summary with each word colored in terms of maximum
attention value and potential erroneous words wrapped in red box

図 2 2D Heatmap. The x-axis and y-axis of the plot correspond to the words in generated
summary and the content plan items, respectively. Each cell Ci,j shows the attention value of thei-th generated word for the j-th content plan item, in gradient scale from light blue to deep blue.

game summary is displayed where each word isvealing high possibility of being erroneous texts,

colored in terms of the maximum attention value

where users should pay more attention to.

among each content plan item. The color of eachaddress exploration issue (DC2), the ErrorSpotter

word is based on a gradient scale from white tooﬀers game-related statistics exploration function

black, with deeper color representing more signif-

where you can ﬁnd relevant data facts to verify theicant attention value. In dealing with error hinterroneous text hints.

(DC1), some words are wrapped by red boxes re-

To

In regard to overview and focus (DC3), an in-teractive 2D heatmap is designed as shown in

3. 5 Interactions

Figure 2, which provides an intuitive way to in-

Several types of interaction are attached for users

spect correlation between input data and output

to take advantage of the ErrorSpotter on exploring

generated summary by visualizing the attention

and investigating AI-generated summaries. The 2D

value between generated words {wi }Ii=1 and content plan records {rj }Jj=1 . Each column of a ma-heatmap oﬀers the interactions, namely, hover, ﬁl-trix in the plot indicates the generated word’s at-hover function enables users to check each cell’s in-tention weights associated with the content plan.

formation in detail, including related word and con-

From the color variation between each cell, wheretent plan record through the tooltip, as shown indeeper color indicates higher attention value, weFigure 2. Besides, through changing the attention

can see which positions in the source data input

value from 0 to 1, users can decide to ﬁlter out

were considered more important when generating

which part of the ﬁgure and pay more attention to

the target word.

their interested part. The ﬁltering feature will beter, save, zoom in, zoom out, and reset. The mouseof great help for users to ﬁnd the connection be3. 4 Error Spotting

tween the attention value and the distribution of

The error spotting function is designed based on

the potential erroneous text.

attention mechanism. The attention can be broadly

To implement statistics exploration function, one

interpreted as a vector of importance weights: inentity select pull-down list is attached to the sys-order to predict a word in a sentence, we estimate

tem. Through selecting a speciﬁc entity, relevant

using the attention vector how strongly it is corre-game statistics of the selected entity will be dis-lated with other elements and take the sum of theirplayed visually in tabular format, which can bevalues weighted by the attention vector as the ap-

taken as reference for error checking. Moreover,proximation of the target [12]. In other words, one

there is a game selecting panel at the top of thegenerated word with relatively low attention valueinterface where users could explore the data of dif-to all input elements, which are content plan items

ferent games. Once the target game is changed,

in our case, tents to have a high possibility of being

corresponding content of the text heatmap and thepredicted by vague references.

2D heatmap will also be changed simultaneously.

However, not every word with relatively low attention value will be regarded as errors by our system. We notice that, in sports summaries, factual

3. 6 Implementation Details

issue related erroneous texts tend to appear among

Visualizations of the ErrorSpotter are created using Bokeh†1 version 2.1.1, a Python library for in-

attribute-related words, entity-related words, andteractive visualization that targets web browsers fornumber-related words. Therefore, we mainly focus

representation. Running a Bokeh server, we canon these types of word and analyze its maximum

create an interactive web application that can con-attention value, which is the highest attention value

nect HTML-based front-end UI events to our visual

towards all content plan items. If a word has thesystem.

maximum attention value lower than the threshold

The system is not open to the public yet sincevalue we set, ErrorSpotter will regard this word as

we are still trying hard to improve some function-

potential erroneous text.
†1 Bokeh Documentation: https://docs.bokeh.org

alities. When it is ready, we will share the system

Currently, the ErrorSpotter oﬀers an error spotting function. However, we consider that it will

to public.

be more convenient and practical to enable users

4 Summaryto personally revise the generated text. Therefore,

Our study provides an interactive and intuitive

We would like to add editing function into our sys-visualizer for spotting erroneous text for sports

tem where human editors are able to recreate one

summary related NLG tasks. With the attention

comprehensive and precise game summary with themechanism integrated, we achieve potential error

support of the ErrorSpotter.

spotting function.

Through combining multiple

Besides, we are not satisﬁed with current gameheatmap visualizations and interactions, the Er-data exploration function.

Even though users

rorSpotter oﬀers in-depth explorations on targeted

are able to explore game related box-score data

tokens, which help analysts ﬂexibly explore and an-

through choosing the entity from pull-down list, thealyze the errors that occurred in generated text.

exploration function is not interactively linked with

Below, we discuss some limitations of our proposed

the generated text. Users are unable to do explo-

visualization, as well as some promising future ex-ration in terms of each word appeared in the gener-

tensions.

ated text. Therefore, we plan to make improvement
on data exploration part by adding interactive en-

4. 1 Limitations

tity choosing function in generated text panel.

As we mentioned in subsection 2. 3, in NLG

Finally, to demonstrate the usefulness of our vi-

tasks, there are three issue types we mainly focus

sualization design, the case study on evaluating

on. It is eﬃcient to use the ErrorSpotter to detect

the ErrorSpotter is desired. The precision and re-factual issue related errors. However, it is diﬃcult

call will be tested to verify the accuracy of poten-

to tackle the grammatical issues and the artiﬁcial

tial error spotting function. Proper adjustments toissues, only relying on our system. It is desired

our system are also being considered to apply Er-

to combine other eﬃcient techniques with the Er-

rorSpotter in other domains and analysis tasks.

rorSpotter to generate a comprehensive hybrid error spotting system.
Moreover, in order to use the ErrorSpotter,attention-based NLG model is necessary. On thatpremise, attention-augment visualizer is created tohelp users gain initial understandings about thecorrelation between input data and generated text.
Then, with the help of attention mechanism, thesystem can spot potential erroneous text. Therefore, the ErrorSpotter is unable to be used uponnon-attention based model generated text.

4. 2 Future WorkThe ErrorSpotter is still under development.
Some work is planned to be done in the future.

参 考 文 献[ 1 ] Bahdanau, D., Cho, K., and Bengio, Y.: Neural
Machine Translation by Jointly Learning to Alignand Translate, 2014.
[ 2 ] Cho, K., van Merrienboer, B., Gulcehre, C.,
Bahdanau, D., Bougares, F., Schwenk, H., andBengio, Y.: Learning Phrase Representations using RNN Encoder-Decoder for Statistical MachineTranslation, 2014.
[ 3 ] Dong, L., Yang, N., Wang, W., Wei, F., Liu,X., Wang, Y., Gao, J., Zhou, M., and Hon, H.-W.:
Uniﬁed Language Model Pre-training for Natural
Language Understanding and Generation, Advancesin Neural Information Processing Systems 32, Wallach, H., Larochelle, H., Beygelzimer, A., dAlchéBuc, F., Fox, E., and Garnett, R.(eds.), Curran Associates, Inc., 2019, pp. 13063–13075.
[ 4 ] Dong, Z., Wu, T., Song, S., and Zhang, M.:
Interactive Attention Model Explorer for Natural

Language Processing Tasks with Unbalanced Data
Sizes, 2020 IEEE Paciﬁc Visualization Symposium(PaciﬁcVis), IEEE, June 2020.
[ 5 ] Gehrmann, S., Strobelt, H., and Rush, A.:
GLTR: Statistical Detection and Visualization ofGenerated Text, Proceedings of the 57th Annual
Meeting of the Association for Computational Linguistics: System Demonstrations, Florence, Italy,
Association for Computational Linguistics, July
2019, pp. 111–116.
[ 6 ] Lin, Z., Feng, M., dos Santos, C. N., Yu, M.,
Xiang, B., Zhou, B., and Bengio, Y.: A Structured
Self-attentive Sentence Embedding, 2017.
[ 7 ] Ng, H. T., Wu, S. M., Briscoe, T., Hadiwinoto,
C., Susanto, R. H., and Bryant, C.: The CoNLL2014 Shared Task on Grammatical Error Correction, Proceedings of the Eighteenth Conference on
Computational Natural Language Learning: Shared
Task, Baltimore, Maryland, Association for Computational Linguistics, June 2014, pp. 1–14.
[ 8 ] Omelianchuk, K., Atrasevych, V., Chernodub,A., and Skurzhanskyi, O.: GECToR – Grammatical Error Correction: Tag, Not Rewrite, Proceedingsof the Fifteenth Workshop on Innovative Use of
NLP for Building Educational Applications, Seattle, WA, USA, Association for Computational Linguistics, July 2020, pp. 163–170.

[ 9 ] Puduppully, R., Dong, L., and Lapata, M.:
Data-to-Text Generation with Content Selection
and Planning, Proceedings of the AAAI Conferenceon Artiﬁcial Intelligence, Vol. 33(2019), pp. 6908–
6915.
[10] Ritschel, H. and André, E.: Shaping a social
robot’s humor with Natural Language Generationand socially-aware reinforcement learning, Proceedings of the Workshop on NLG for Human–Robot
Interaction, Tilburg, The Netherlands, Association for Computational Linguistics, November 2018,
pp. 12–16.
[11] Sutskever, I., Vinyals, O., and Le, Q. V.: Sequence to Sequence Learning with Neural Networks,
Advances in Neural Information Processing Systems 27, Ghahramani, Z., Welling, M., Cortes, C.,
Lawrence, N. D., and Weinberger, K. Q.(eds.), Curran Associates, Inc., 2014, pp. 3104–3112.
[12] Weng, L.:
Attention?
Attention!, 2018.
https://lilianweng.github.io/lil-log/2018/06/24/attentionattention.html.
[13] Wiseman, S., Shieber, S., and Rush, A.: Challenges in Data-to-Document Generation, Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, Copenhagen,Denmark, Association for Computational Linguistics, September 2017, pp. 2253–2263.