paper_id
stringlengths
9
16
version
stringclasses
26 values
yymm
stringclasses
311 values
created
timestamp[s]
title
stringlengths
6
335
secondary_subfield
sequencelengths
1
8
abstract
stringlengths
25
3.93k
primary_subfield
stringclasses
124 values
field
stringclasses
20 values
fulltext
stringlengths
0
2.84M
1812.08044
1
1812
2018-12-19T15:59:31
FrameNet automatic analysis : a study on a French corpus of encyclopedic texts
[ "cs.CL" ]
This article presents an automatic frame analysis system evaluated on a corpus of French encyclopedic history texts annotated according to the FrameNet formalism. The chosen approach relies on an integrated sequence labeling model which jointly optimizes frame identification and semantic role segmentation and identification. The purpose of this study is to analyze the task complexity from several dimensions. Hence we provide detailed evaluations from a feature selection point of view and from the data point of view.
cs.CL
cs
Analyse automatique FrameNet : une étude sur un corpus français de textes encyclopédiques . (1) Orange Labs, Lannion, France (2) Aix-Marseille Université, Marseille, France [email protected] {gabriel.marzinotto,geraldine.damnati}@orange.com Gabriel Marzinotto1, 2 Géraldine Damnati1 Frédéric Béchet2 ] L C . s c [ RÉSUMÉ 1 Cet article présente un système d'analyse automatique en cadres sémantiques évalué sur un corpus v de textes encyclopédiques d'histoire annotés selon le formalisme FrameNet. L'approche choisie re- 4 pose sur un modèle intégré d'étiquetage de séquence qui optimise conjointement l'identification des 4 0 cadres, la segmentation et l'identification des rôles sémantiques associés. Nous cherchons dans cette 8 étude à analyser la complexité de la tâche selon plusieurs dimensions. Une analyse détaillée des 0 performances du système est ainsi proposée, à la fois selon l'angle des paramètres du modèle et de 2 la nature des données. 1 ABSTRACT 8 1 FrameNet automatic analysis : a study on a French corpus of encyclopedic texts : v This article presents an automatic frame analysis system evaluated on a corpus of French encyclope- i dic history texts annotated according to the FrameNet formalism. The chosen approach relies on an X integrated sequence labeling model which jointly optimizes frame identification and semantic role r a segmentation and identification. The purpose of this study is to analyze the task complexity from several dimensions. Hence we provide detailed evaluations from a feature selection point of view and from the data point of view. MOTS-CLÉS : Analyse en cadres sémantiques, étiquetage de séquence, textes encyclopédiques. KEYWORDS: Semantic frame analysis, sequence labeling, encyclopedic texts. 1 Introduction L'extraction d'informations structurées dans des textes est un préalable qui favorise l'accès aux connaissances qu'ils contiennent par des outils de Traitement Automatique du Langage. Dans cette étude, nous nous intéressons au cas particulier de textes encyclopédiques historiques et nous nous plaçons dans le contexte de la représentation sémantique FrameNet. Dans l'approche FrameNet ini- tiée par l'Institut ICSI de Berkeley (Baker et al., 1998), un cadre sémantique (Frame) peut être évo- qué par des unités lexicales (les triggers ou cibles). Par exemple, le cadre "Commitment" peut être évoqué par "promettre", "promesse", "s'engager" et le cadre "Becoming_aware" peut être déclenché par "découvrir" et "découverte". Les unités lexicales (UL) qui déclenchent un cadre peuvent être nominales ou verbales. Par ailleurs, un cadre englobe la définition des participants et des propriétés qui peuvent lui être attachés : ce sont les Frame Elements (FE). Ils sont spécifiques à chaque cadre et sont nommés par des labels explicites. Par exemple, dans la phrase suivante, l'agent de l'action de découvrir, est représenté par le FE "Cognizer" qui a deux instances : [le premier Européen]Cognizer à avoir [découvert]Becoming_aware [Mammoth Cave]Phenomenon était [John Houchin]Cognizer, [en 1797]Time. Les cadres peuvent être liés entre eux par des relations (Fillmore et al., 2004) (ex : inheritence, using, . . . ) auquel cas les FE peuvent être mis en correspondance. Dans cette étude, nous réalisons une analyse "à plat" sans mettre les cadres en relation. Si les ressources linguistiques décrivant ces cadres sont de plus en plus nombreuses pour la langue anglaise, leur constitution pour le français n'en est qu'au début avec les contributions du projet ASFALDA qui s'est attaché à produire des ressources sur la base de FrameNet pour le français (Djemaa et al., 2016). Pour notre part, nous avons constitué le corpus CALOR Béchet et al. (2017) annoté en cadres sémantiques sur des textes encyclopédiques issus de différentes sources, dans le domaine de l'histoire, décrit plus en détail à la section 3.1. L'analyse en cadres sémantiques a pour objectif de repérer dans des documents des instances de cadres avec l'ensemble des rôles permettant de les caractériser, et se fait classiquement en deux étapes. La première est une étape de désambiguïsation afin d'identifier un cadre étant donnée la pré- sence d'un déclencheur potentiel (UL) La seconde consiste à identifier les rôles sémantiques (FE) et est le plus souvent traitée de façon séquentielle comme l'enchaînement d'une étape de détection de segment et de classification de ce segment (Johansson et al., 2012; Lechelle & Langlais, 2014). Le système Semafor (Das et al., 2014) constitue à l'heure actuelle une référence dans le domaine. Dans Semafor, l'étape d'identification de cadre, étant donné un déclencheur, est réalisée à l'aide d'un classifieur probabiliste par Maximum d'Entropie. Ensuite, l'étape de labélisation des rôles sé- mantiques est réalisée à l'aide d'un modèle log-linéaire conditionnel qui catégorise des segments (labélisation des FE). Dans cette étape, les segments candidats sont obtenus à partir de l'analyse en dépendance et correspondent aux sous-arbres produits. De cette façon, le modèle arrive à gérer à la fois la classification et la segmentation. Dans cette étude, nous adoptons une approche plus intégrée où les étapes de désambiguïsation, de dé- tection des FE et de labélisation des FE se font de façon simultanée à l'aide de modèles d'étiquetage de séquences de type Conditional Random Fields (CRF). Notre modélisation du problème n'impose pas la contrainte que les FE soient toujours la projection d'une tête dans l'arbre de dépendances, ce qui rend le système robuste aux erreurs d'analyse en dépendance. Nous avons décidé de travailler avec les CRF car ce sont des modèles simples qui ne nécessitent pas de grandes puissances de cal- cul, ni de gros volumes de données en comparaison avec les méthodes neuronales, mais qui sont suffisamment performants pour nous permettre la mise en place de nos expériences contrastives. La section 2 présente en détail cette approche avec un focus sur le choix des paramètres des modèles. La section 3 présente un ensemble d'expériences visant à montrer l'influence du choix des para- mètres, l'impact de la complexité intrinsèque des textes, et l'influence des données d'apprentissage. 2 Analyse en cadres comme une tâche d'étiquetage de séquence Les CRF ont été utilisés dans de nombreuses tâches du TALN ainsi que les modèles neuronaux de type RNN ou LSTM (Hakkani-Tür et al., 2016; Tafforeau et al., 2016). Nous avons choisi dans cet article d'utiliser des modèles CRF en se focalisant sur des comparaisons entre différents systèmes de traits et différents corpus pour entraîner et tester nos systèmes. Nous nous intéressons également à évaluer les effets du choix du corpus d'apprentissage en considérant des textes de différents styles (encyclopédique, encyclopédique adressé aux enfants, etc.) et qui traitent de sujets différents (ar- chéologie, histoire, etc.). Vu que l'apprentissage se fait sur des corpus de taille moyenne et que notre objectif est de faire une étude comparative de la tâche, et non pas d'arriver aux meilleures perfor- mances possibles du système final, nous avons décidé de travailler avec les modèles CRF, car ils sont plus simples, plus rapides en apprentissage et présentent moins de paramètres à régler. Apprendre un seul CRF avec tous les exemples de phrases annotées résulterait en un très grand nombre d'étiquettes, ce qui peut être rédhibitoire lorsqu'on augmente le nombre de cadres. Une autre possibilité est de modéliser chaque cadre (sens) avec un CRF, mais cela nous obligerait à mettre en place un modèle de désambiguïsation en amont, de manière à savoir quel est le CRF qui doit être appliqué à chaque unité lexicale. Pour éviter ces problèmes nous avons décidé de modéliser chaque UL avec un CRF, cela permet de faire en même temps la désambiguïsation de cadres, la détection et la sélection des rôles sémantiques. Ce choix n'est pas nécessairement optimal dans le sens où il disperse les données d'apprentissage et ne permet pas le partage d'information entre des UL qui se ressemblent. Néanmoins il permet de passer à l'échelle lorsqu'on augmente le nombre de cadres. Ainsi, pour analyser en cadres une nouvelle phrase, nous allons d'abord extraire les UL de la phrase qui apparaissent dans notre liste de 145 UL possibles. Pour chaque phrase il y aura autant d'appli- cations de CRF qu'il y a d'UL, puis une étape de post-traitement permet de vérifier la cohérence des résultats d'étiquetages. Ici nous vérifions que les étiquettes mises sur les rôles sémantiques sont compatibles et rattachables aux types de cadres sémantiques prédits par les CRF. Il est possible en effet que le CRF prédise un rôle sémantique qui ne fasse pas partie des rôles possibles du cadre mais qui ferait partie des rôles d'un autre cadre qui pourrait être déclenché par la même UL. Dans notre modèle tous les rôles qui ne sont pas rattachables à leur cible sont systématiquement rejetés. Pour extraire des caractéristiques pertinentes à la tâche nous avons évalué plusieurs types de para- mètres et de codages inspirés de la littérature (Das et al., 2014; Michalon et al., 2016). Une sélection incrémentale a été faite pour ne retenir que les 5 paramètres les plus pertinents pour chaque token : -- son lemme, le lemme du mot parent, sa partie du discours (POS), la distance linéaire à la cible et les deux derniers niveaux du chemin de dépendances entre le mot et la cible. La distance linéaire à la cible est le nombre de tokens entre le token courant et l'UL qui déclenche le cadre (cible). Ce nombre est négatif si le token est avant la cible, ou positif s'il est après. Le chemin de dépendance vers la cible se construit comme la concaténation des dépendances entre le token courant et la cible. L'analyse syntaxique est réalisée à l'aide de l'analyseur MACAON (Nasr et al., 2010) qui construit des arbres syntaxiques avec un jeu de dépendances très similaire à celui du French TreeBank (Abeillé et al., 2003; Abeillé & Barrier, 2004). Dans le cas général la cible qui déclenche un cadre n'est pas nécessairement la racine de l'arbre de dépendance de la phrase, cela implique que le chemin de dépendances entre un token et une cible est composé des dépendances non pas seulement de fils à parent (relations ascendante), mais aussi de parent à fils (relations descendantes). Nous faisons cette distinction de manière explicite en codant les chemins ascendants et descendants avec des symboles différents. Par ailleurs, nous avons observé que les chemins syntaxiques très longs étaient difficiles à modéliser. Pour contourner ce problème nous avons étudié la simplification de ces chemins en limitant leur longueur maximale, c'est-à-dire, lorsque le chemin de dépendances d'un token vers la cible du cadre sémantique dépasse une certaine longueur, nous allons le représenter avec un chemin plus court qui garde la plus grand quantité d'information possible. Dans nos expériences, nous avons obtenu que la simplification qui produisait les meilleures performances consiste à garder les deux dépendances du chemin les plus proches de la cible, qui sont souvent les plus pertinents. 3 Evaluation 3.1 Protocole expérimental Nous avons réalisé toutes nos expériences sur le corpus CALOR. Il est constitué de documents issus de 4 sources différentes : le portail Wikipédia sur l'Archéologie (WA, 201 documents), le portail Wikipédia sur la Première Guerre Mondiale (WGM, 355 documents), des textes issus de Vikidia (VKH, 183 documents), l'encyclopédie en ligne pour enfants, à partir de deux portails (Préhistoire et Antiquité) et des textes historiques de ClioTexte (https ://clio-texte.clionautes.org/) sur la Première Guerre Mondiale (CTGM, 16 documents). Annoter un corpus en cadres sémantiques n'est pas une tâche facile à aborder car le nombre de cadres et d'unités lexicales (UL) porteuses de sens que l'on pourrait définir est énorme. Dans le cas de FrameNet (Baker et al., 1998), le dictionnaire des cadres sémantiques pour l'anglais, propose 1222 cadres possibles et 13615 UL à ce jour. Pour cette raison, un corpus annoté en cadres n'est souvent étiqueté que sur une sélection des cadres et UL les plus pertinents. Les UL en dehors de cette sélection restent sans annotation et une UL sélectionnée appa- raissant dans un texte avec un sens qui n'est pas prévu dans notre dictionnaire de cadres sémantiques simplifié, nous lui attribuons un cadre spécial « OTHER ». Sur le corpus CALOR, 21.398 occur- rences de cadres sémantiques ont été annotées, déclenchées par une des 145 UL présentes dans notre liste de UL traitables. Au total, 53 cadres sémantiques différents ont été annotés, auxquels s'ajoute le cadre OTHER. Lorsqu'une phrase est étiquetée en cadres sémantiques, il y a 4 sous-tâches qui se développent, par- fois de façon implicite. Nous les avons incluses dans notre protocole car elles permettent d'évaluer très précisément les systèmes d'analyse en cadres sémantiques. Ce sont les tâches de : détection de cibles (DC) qui revient à décider si une UL doit être associée à OTHER ou non ; sélection du bon cadre (SC) pour chaque cible détectée ; détection des segments qui constituent des rôles sémantiques (DR) ; sélection des types de rôles sémantiques (SR). Même si l'ensemble de ces tâches est réalisé par un seul modèle intégré nous présentons les différents niveaux d'évaluation, avec un accent plus particulier sur le SR, sous-tâche qui est, de façon générale, la plus difficile de l'analyse en cadres sémantiques. Le corpus a été divisé en cinq parties de sorte qu'aucun document ne soit jamais sous divisé et de sorte que la distribution des cadres soit la plus homogène possible entre chaque partie. Pour chaque expérience nous mesurons la précision, le rappel et la F-mesure moyennés entre les 5-Folds ainsi que l'écart type des mesures de performances sur les 5 folds. 3.2 Évaluation globale et influence des paramètres Dans le tableau 1 nous montrons les performances du meilleur système développé à partir des 5 ca- ractéristiques les plus pertinentes pour la tâche. Sur ce corpus les tâches DC et SC ont une complexité assez basse car nous traitons un nombre de cadres limité. Sur ces deux tâches, notre système CRF augmente la précision de 5 points par rapport à un système naïf qui choisirait la classe majoritaire. Comme ces sont des tâches simples dans notre corpus, nous arrivons à des performances élevées et assez proches car la proportion d'UL pouvant conduire à plusieurs cadres différents est assez faible (seulement 12 UL). La détermination de la catégorie OTHER demeure la principale difficulté à ce niveau. Par ailleurs, la tâche de SR qui est la plus complexe, présente un taux de précision acceptable (82.2%) étant donné le nombre de rôles possibles (150 au total), mais les performances en termes de rappel sont à peine de 51.2%. La performance élevée du système en termes de précision est due au fait d'avoir un modèle CRF pour chaque UL, car ceci diminue le nombre d'étiquettes (et le nombre de confusions) possibles au moment des prédictions. Détection de Cible (DC) Sélection de Cadre (SC) Détection des Roles (DR) Sélection des Roles (SR) Précision 96.4 ± 0.2 Rappel 96.4 ± 0.2 Fmesure 96.4 ± 0.1 95.3 ± 0.4 95.2 ± 0.2 95.3 ± 0.2 89.7 ± 0.5 55.9 ± 0.7 68.8 ± 0.5 82.2 ± 0.6 51.2 ± 0.7 63.1 ± 0.6 TABLE 1 -- évaluation par niveaux avec la meilleure configuration (CRF à 5 paramètres) S'il est difficile de comparer avec les résultats obtenus par le système SEMAFOR (données en an- glais en plus grande quantité, nombre de cadres modélisés supérieur,...), notons cependant que notre évaluation (SR) correspondrait à la tâche Argument Identification, avec la configuration full parsing car nous ne fixons pas de valeurs Oracle dans les étapes intermédiaires, et l'évaluation partial mat- ching car nous ne comptons pas les erreurs de frontière sur les rôles sémantiques. Dans ces conditions le meilleur système évalué dans (Das et al., 2014) conduit à une F-mesure de 50.24. Pour chaque cadre, ses rôles sémantiques peuvent être interprétés comme des réponses à certaines questions que l'on peut poser sur le cadre. Par exemple, pour le cadre Deciding nous avons : Cognizer (qui est l'agent ?) prend une Decision (quoi ?) parmi Possibilities (parmi quoi ?) parce que Explanation (pour quelle raison ?) à un Time (quand ?) et dans un Place (où ?). Ceci permet de regrouper les rôles sémantiques de différents cadres et de leur donner une interpré- tation simple qui aide à analyser quelles sont les questions génériques pour lesquelles notre système est capable de trouver le plus grand nombre de réponses correctes. En évaluant nos résultats de cette manière nous observons que les questions à quoi, de quand ont des performances excellentes, ceci est dû au fait que ces questions sont fortement reliées à une préposition. Les questions les plus fré- quentes sont qui est l'agent, quoi liées aux sujets et COD dans la syntaxe, avec des F-mesures avoisinant les 70% ensuite nous avons les quand, où, qui liées aux CCT, CCL et COD. Pour tous ceux-ci, nous avons des performances à peu près équivalentes, de l'ordre de 55%. Les sujets et COD sont plus faciles à détecter, car leurs chemins de dépendances sont souvent plus simples et le nombre d'exemples d'apprentissage est plus grand. Les questions pour lesquelles nous obtenons les perfor- mances les plus basses sont dans quelle circonstance, avec quelle conséquence, de quelle manière ce sont des questions qui ont une énorme variabilité au niveau syntaxique, sont moins fréquentes et ne sont pas ancrées à une préposition spécifique. Dans le tableau 2, nous cherchons à mesurer l'impact de chaque caractéristique sur les performances. L'analyse est faite sur la tâche de SR. Le chemin de dépendances simplifié et la partie du discours (POS) sont les caractéristiques les plus importantes pour améliorer les performances de notre sys- tème. Par ailleurs, nous voyons que la précision est plus affectée par les lemmes, alors que le rappel est affecté par les POS, le chemin de dépendances et la distance linéaire à la cible. Le lemme du mot parent dans l'analyse en dépendances permet aussi d'augmenter la précision de notre système. En effet lorsque deux compléments ont des chemins de dépendances similaires (par exemple « dans le journal » et « pendant la guerre »), ils sont faciles à classer grâce à leur tête syntaxique.La pertinence de ce paramètre est liée au fait que l'analyse en dépendances a été faite en suivant une conven- tion similaire à celle du French Treebank (Abeillé et al., 2003; Abeillé & Barrier, 2004) et donc en considérant les prépositions comme tête des sous-arbres. Pour la dernière ligne du tableau, seuls les paramètres Lemme, POS et distance linéaire sont utilisés, et nous pouvons constater une perte de 4.5 points de F-mesure par rapport au système qui se sert de l'analyse en dépendances. Paramètres Tous les paramètres Tous sauf Chemin Dépendance Tous sauf Partie du Discours (POS) Tous sauf Distance Linéaire Tous sauf Lemme Tous sauf Lemme Parent Tous sauf Analyse en Dépendance Précision 82.2 ± 0.6 Rappel 51.2 ± 0.7 82.5 ± 0.8 47.2 ± 0.7 83.0 ± 1.0 47.1 ± 1.0 82.2 ± 0.7 48.6 ± 0.7 F-mesure 63.1 ± 0.6 60.0 ± 0.6 60.1 ± 1.0 61.1 ± 0.7 80.2 ± 0.6 50.9 ± 0.7 62.2 ± 0.6 81.0 ± 0.9 51.0 ± 0.8 80.8 ± 1.2 45.9 ± 0.7 62.6 ± 0.8 58.6 ± 0.7 TABLE 2 -- Effets de l'élimination de chaque paramètre sur les performances 3.3 Influence de la complexité des textes Chaque phrase a une complexité inhérente, qui est due à divers facteurs. D'une façon très simpliste, une phrase plus longue est souvent plus complexe et difficile à traiter. Si nous n'observons pas d'influence sur la sélection des cadres (SC), la longueur des phrases s'avère très importante pour la tâche de SR. Nous avons observé en effet une perte de précision de plus de 7 points et une perte en rappel de plus de 22 points entre les phrases du premier décile (8 mots par phrase en moyenne) et les phrases du dernier décile (50 mots par phrase en moyenne), avec une décroissance monotone du rappel sur les 10 déciles. Ceci est dû au fait que les phrases très longues ont souvent plus de rôles sémantiques et des rôles sémantiques plus rares. De façon analogue, chaque UL a une complexité inhérente, qui dépend du fait que ce soit un verbe ou un substantif, et de la position qu'elle occupe dans l'arbre de dépendances de la phrase. Une cible est dite « racine » lorsqu'elle constitue la racine de l'arbre de dépendance de sa phrase, et « non racine » dans le cas contraire. En analysant le Type de Cible Verbe Racine Verbe non Racine Nom Racine Nom non Racine Total Nb Cibles Nb FE 13592 5389 19496 Précision 85.4 ± 0.3 83.0 ± 0.9 Rappel 68.2 ± 1.4 51.3 ± 1.2 Fmesure 75.9 ± 0.9 63.4 ± 0.8 8532 279 7198 252 72.2 ± 7.6 50.2 ± 6.9 59.0 ± 6.5 13538 75.4 ± 2.1 34.2 ± 0.8 47.0 ± 0.9 21398 46878 82.2 ± 0.6 51.2 ± 0.7 63.1 ± 0.6 TABLE 3 -- Résultats de la sélection de rôles par type de cible détail des performances par Unité Lexicale, on observe de grandes disparités dans les résultats, avec 8 UL qui produisent une F-mesure supérieure à 75%, et 8 qui conduisent à une F-mesure inférieure à 25%. La quantité de données d'apprentissage n'est pas le seul facteur explicatif. Parmi les UL qui ont plus de 1000 occurrences dans le corpus, 2 UL nominales ont des performances très moyennes autour de 40% ( combat et attaque) alors que les deux UL (provenir et contenir) qui produisent les meilleurs résultats (F-mesure supérieure à 80%) n'ont que 200 échantillons dans le corpus. Dans le tableau 3 nous montrons que la position de la cible dans l'arbre de dépendance a un impact important sur le rappel, avec une différence de plus de 15 points entre le cas des cibles « racine » et « non racine ». Les cibles « non racine » présentent des chemins plus compliqués et moins fiables vers leurs rôles sémantiques. Lorsqu'on compare les UL nominales avec les UL verbales, il y a une différence d'environ 10 points sur la précision et d'environ 17 points pour le rappel. Même si les cibles nominales ont moins de rôles sémantiques associés (2.3 rôles sémantiques par cadre verbal contre 1.8 par cadre nominal en moyenne) elles demeurent plus complexes à traiter, car les chemins de dépendance vers leurs rôles sémantiques sont très variables. Il faut aussi prendre en compte le fait que les UL nominales sont plus rares et ont moins de données d'apprentissage associées. 3.4 Influence des données d'apprentissage Vue la complexité de l'annotation manuelle des cadres sémantiques, la génération de nouvelles res- sources n'est pas toujours possible. Pour extraire ces cadres sur des documents d'un nouveau do- maine ou issus d'une nouvelle source, nous nous intéressons à évaluer les performances des mo- dèles appris sur des données d'autres sources annotées. Comme dans cette expérience nous nous intéressons à évaluer l'impact de la similarité thématique sur les performances du système, nous avons réduit notre jeux de données aux 54 UL qui étaient présentes dans nos 4 corpus. Pour cette 80% CTGM 80% WA 40% WGM 80% WGM 80% WGM + 80% WA + 80%VKH 80% WGM + 80% CTGM 80% ALL Taille App. 304 3264 2918 5836 9413 6140 9717 Précision 83.1 ± 9.7 Rappel 15.1 ± 2.0 Fmesure 25.5 ± 3.2 78.6 ± 8.1 26.1 ± 4.6 39.1 ± 5.9 77.1 ± 8.4 32.2 ± 5.4 45.2 ± 5.8 80.3 ± 7.1 37.8 ± 4.6 51.3 ± 4.8 78.6 ± 7.7 39.0 ± 5.2 52.0 ± 5.7 79.8 ± 5.4 39.9 ± 3.5 53.1 ± 3.6 79.3 ± 5.9 41.2 ± 2.3 54.1 ± 2.7 TABLE 4 -- Effets de la constitution du corpus d'apprentissage expérience nous considérons que nos documents issus de CTGM sont une nouvelle source. Cliotexte regroupe des textes historiques (discours, déclarations, ...) qui ne correspondent pas exactement à un style encyclopédique. Nous proposons diverses répartitions du corpus d'apprentissage et nous me- surons les performances des systèmes pour chaque configuration. Dans le tableau 4 nous montrons que pour une même taille de corpus d'apprentissage et un style fixe (données issues de Wikipedia, 80%WA vs. 40%WGM) les performances obtenues avec un corpus du même domaine thématique (40%WGM) sont supérieures par 6 points de F-mesure. Nous arrivons à des performances moyennes rien qu'avec un apprentissage fait avec un corpus du même domaine (80%WGM), sans avoir utilisé aucune données annotées de CTGM. De plus, à partir du moment où WGM est inclus dans le corpus d'apprentissage, l'ajout de 3500 exemples hors domaine n'a pas eu d'impact important alors que le simple ajout de 304 exemples de cadres issus du CTGM, augmente les performances de 2 points de F-mesure. Ceci met en évidence le fait qu'il est toujours utile d'annoter quelques exemples des phrases de la même source, pour franchir les différences de vocabulaire et de style. 4 Conclusion Dans cet article nous avons présenté la tâche d'analyse en cadres sémantiques comme un problème d'étiquetage de séquences que nous avons abordé à l'aide de modèles CRF. Nous avons effectué diverses expériences faites sur le corpus CALOR constitué de données encyclopédiques annotées en cadres sémantiques, montrant des performances encourageantes à partir de données d'apprentissage de taille moyenne. Les résultats obtenus révèlent une grande variabilité des performances en fonc- tion des types d'unité lexicale (verbales ou nominales), des types de rôles sémantiques (relations directes ou circonstancielles) mais également en fonction de la complexité intrinsèque des phrases considérées (longueur, structure de dépendance). Dans nos futurs travaux, nous allons explorer des modélisations par étiquetage de séquences à l'aide de modèles neuronaux RNN, LSTM ; et nous allons nous intéresser également au partage d'information entre les rôles des différents cadres sé- mantiques et UL, pour pouvoir mieux traiter les cas des cibles et cadres sémantiques peu fréquents. Références ABEILLÉ A. & BARRIER N. (2004). Enriching a french treebank. In LREC. ABEILLÉ A., CLÉMENT L. & TOUSSENEL F. (2003). Building a treebank for french. Treebanks, p. 165 -- 187. BAKER C. F., FILLMORE C. J. & LOWE J. B. (1998). The berkeley framenet project. In Pro- ceedings of the 36th Annual Meeting of the Association for Computational Linguistics and 17th International Conference on Computational Linguistics - Volume 1, ACL '98, p. 86 -- 90, Stroud- sburg, PA, USA : Association for Computational Linguistics. BÉCHET F., DAMNATI G., HEINECKE J., MARZINOTTO G. & NASR A. (2017). Calor-frame : un corpus de textes encyclopédiques annoté en cadres sémantiques. Atelier ACor4French - Les corpus annotés du français, TALN. DAS D., CHEN D., MARTINS A. F., SCHNEIDER N. & SMITH N. A. (2014). Frame-semantic parsing. Computational linguistics, 40(1), 9 -- 56. DJEMAA M., CANDITO M., MULLER P. & VIEU L. (2016). Corpus annotation within the french framenet : methodology and results. Proceedings of the Tenth International Conference on Lan- guage Resources and Evaluation (LREC), X, 3794 -- 3801. FILLMORE C. J., BAKER C. F. & SATO H. (2004). Framenet as a "net". In LREC. HAKKANI-TÜR D., TUR G., CELIKYILMAZ A., CHEN Y.-N., GAO J., DENG L. & WANG Y.-Y. (2016). Multi-domain joint semantic frame parsing using bi-directional rnn-lstm. In Proceedings of The 17th Annual Meeting of the International Speech Communication Association. JOHANSSON R., HEPPIN K. F. & KOKKINAKIS D. (2012). Semantic role labeling with the swe- dish framenet. In LREC, p. 3697 -- 3700. LECHELLE W. & LANGLAIS P. (2014). Utilisation de représentations de mots pour l'étiquetage de rôles sémantiques suivant framenet. In TALN. MICHALON O., RIBEYRE C., CANDITO M. & NASR A. (2016). Deeper syntax for better semantic parsing. In Coling 2016 - 26th International Conference on Computational Linguistics, Osaka, Japan. NASR A., BÉCHET F. & REY J.-F. (2010). Macaon : Une chaîne linguistique pour le traitement de graphes de mots. In Traitement Automatique des Langues Naturelles - session de démonstrations, Montréal. TAFFOREAU J., BECHET F., ARTIERE T. & FAVRE B. (2016). Joint syntactic and semantic ana- lysis with a multitask deep learning framework for spoken language understanding. Interspeech 2016, p. 3260 -- 3264. This figure "figure_1_perf_questions.png" is available in "png"(cid:10) format from: http://arxiv.org/ps/1812.08044v1 This figure "figure_percentils.png" is available in "png"(cid:10) format from: http://arxiv.org/ps/1812.08044v1
1810.06898
1
1810
2018-10-16T09:37:24
Creating a New Persian Poet Based on Machine Learning
[ "cs.CL" ]
In this article we describe an application of Machine Learning (ML) and Linguistic Modeling to generate persian poems. In fact we teach machine by reading and learning persian poems to generate fake poems in the same style of the original poems. As two well known poets we used Hafez (1310-1390) and Saadi (1210-1292) poems. First we feed the machine with Hafez poems to generate fake poems with the same style and then we feed the machine with the both Hafez and Saadi poems to generate a new style poems which is combination of these two poets styles with emotional (Hafez) and rational (Saadi) elements. This idea of combination of different styles with ML opens new gates for extending the treasure of past literature of different cultures. Results show with enough memory, processing power and time it is possible to generate reasonable good poems.
cs.CL
cs
Creating a New Persian Poet Based on Machine Learning Mehdi Hosseini Moghadam Bardia Panahbehagh Department of Mathematics, Faculty of Mathematics and Computer Science, Kharazmi University, Tehran, Iran 1 Oct 16, 2018 In this article we describe an application of Machine Learning (ML) and Linguistic Modeling to generate persian poems. In fact we teach machine by reading and learning persian poems to generate fake poems in the same style of the original poems. As two well known poets we used Hafez (1310-1390) and Saadi (1210-1292) poems. First we feed the machine with Hafez poems to generate fake poems with the same style and then we feed the machine with the both Hafez and Saadi poems to generate a new style poems which is combination of these two poets styles with emotional (Hafez) and rational (Saadi) elements. This idea of combination of different styles with ML opens new gates for extending the treasure of past literature of different cultures. Results show with enough memory, processing power and time it is possible to generate reasonable good poems. Keywords and phrases: Machine learning; Deep learning; Text generation; Persian poem; Hafez; Saadi 1 Introduction Have a moment and think how we use our brain and intelligence to make words and sentences that have meaning and can express our ideas and insights. For example as pointed by McKeown (1992): " in the process of producing discourse, speakers and writers must decide what it is that they want to say and how to present it effectively. They are capable of disregarding information in their large body of knowledge about the world which is not specific to the task at hand and they manage to integrate pertinent information into a coherent unit. They determine how to appropriately start the discourse, how to order its elements, and how to close it. These decisions are all part of the process of deciding what to say and when to say it. Speakers and writers must also determine what words to use and how to group them into sentences. In order for a system to generate text, it, too, must be able to make these kinds of decisions." Now imagine how hard that would be to teach such ability to a computer. Recently there have been many attempts to generate texts that are both syntactically and semantically correct by computers (Misztal-Radecka and Indurkhya, 2016; Wang et al., 2017; Vinyals and Le, 2015; Leopold, 2014). With the help of artificial intelligence, computers are now able to do such difficult tasks. Also with the help of deep learning (recurrent neural network), computers can generate words and sentences that make sense (Xie et al., 2017; Sutskever et al., 2011; Graves, 2014). But first lets have a historical example of text generation. George Philipp Harsdörffer was a German poet in the 1600s who belonged to a literary society. He created the Fünffacher Denckring der Teutschen Sprache in 1651 (Figure 1). This contraption (which translates as "The Five-fold Thought-ring of the German Language") was a set of five concentric circles with letters and word 1 [email protected] ; [email protected] fragments written on them: prefixes on one ring, starting letters on another, then middle letters, ending letters and finally suffixes. The idea was that you stacked the circles together and twisted them around independently to generate different words to act as poetic inspiration. You could leave the end-word rings in place while twisting around the start-word rings, so it acts as a kind of rhyming dictionary. You could make an existing word and then change a syllable or two to see what happened. Or you could just twist all the circles round to make new words and look at them and think about what they would mean if they were real.2 Figure 1: Fünffacher Denckring der Teutschen Sprache; set of five concentric circles with letters and word fragments written on them: prefixes on one ring, starting letters on another, then middle letters, ending letters and finally suffixes. In the field of literature, text generation can be used as a tool for reproducing historical texts and literary legacy. As we know in the history of every culture there exist many famous and well known poets and writers with brilliant works, so the ability to generating poem and text almost based on their styles can be of a great interest. Here our purposes are: • By feeding our text generator model the poems of Hafez, make machine able to compose Hafez style poems. • By feeding our text generator model the poems of Hafez and Saadi, make machine able to compose combined style poems. For the models we use the data set of Ghazaliat-e-Hafez and Ghazaliat-e-Saadi3. 2 Initial concepts We define some concepts which may be useful for understanding the process of ML text 2 http://mathesonmarcault.com/index.php/2015/12/15/randomly-generated-title-goes-here/ 3 the Mohammad Qazvini/Ghāsem Ghani 1941 edition generation: Sequential data: Is a type of data which stores in a chronological order. Long term dependency: Consider this phrase 'Clouds are in the __', in order to fill in the the blank we have enough information. Just 4 words before the blank is enough to predict the blank, so we need a little information, this little dependency is called short term dependency. Now consider 'John was born in London and has passed first 5 years of his life in London … and his mother toung is__'. Now in order to fill in the blank we need more information in comparison to the first example, may be even pages of information. This long dependency to the previous words is called long term dependency. Artificial neural network (ANN): Artificial neural networks (ANNs) are computing systems vaguely inspired by the biological neural networks that constitute animal brains such systems "learn" to perform tasks by considering examples, generally without being programmed with any task-specific rules. Recurrent neural network (RNN): Is a class of artificial neural network where connections between nodes form a directed graph along a sequence. This allows it to exhibit dynamic temporal behavior for a time sequence. Unlike feedforward neural networks, RNNs can use their internal state (memory) to process sequences of inputs. Word cloud: An image composed of words used in a particular text or subject, in which the size of each word indicates its frequency or importance. 3 Model and its mechanism In this section we describe our model. The model is an improvement of model which is presented By Jason Brownlee on August 4, 2016 in Natural Language Processing 4, with some major changes5. The original model had three layers including: LSTM, Dropout, Dense; which can be run on both CPU and GPU (Figure2). The model has seven layers including: CuDNNGRU-1, Dropout, CuDNNGRU-2, Dropout, Dense-1, Dense-2, Dense-3 (Figure 3). CuDNNGRU is a Fast GRU implementation backed by CuDNN which 4 https://machinelearningmastery.com/text-generation-lstm-recurrent-neural-networks-python-keras/ 5 Please contact with the writers for receiving the complete code can only be run on GPU, with the TensorFlow backend. The model how ever is deeper than the original model with five times more number of parmeters but faster than the original one. Figure 2: The original model with three layers including: LSTM, Dropout, Dense. The numbers show the shape of data which we feed in to the model. Figure 3: New model with seven layers including: CuDNNGRU-1, Dropout, CuDNNGRU-2, Dropout, Dense-1, Dense- 2, Dense-3. The numbers show the shape of data which we feed in to the model. Given any textual data to the model (in our case the poems of Hafez), after encoding, it works in three steps as follows: • First it selects a predetermined size of characters called the first pattern. Then the second pattern is obtained by shifting the first pattern to the right with one character. For instance consider the first four patterns of the following poem6: لد ام ار " اراخب ار و درا دنقرمس هب تسد مشخب If we choose length of each pattern 20, we have the following patterns: کرت رگا یزاریش نا هب لاخ شیودنه " لد ام ار " درا هب تسد " " لد ام ر درا ی هب تسد " لد ام " درا یز هب تسد " P1: P2: P3: P4: If we present the patterns in a list shape we would have the following: " لد ام درا هب تسد یزا " P1: -- ا ر ا م -- ل د -- د ر ا -- ت س د -- ه ب -- ا ا -- د ر ل م -- د -- P2: ر -- د The character " -- " means blank space. Then all these patterns will be added into a list "list of patterns". Next, the first character which comes exactly after each pattern will be added into another list "list of characters"(Figure4). ه ب -- ی -- ت س • Next, data (consisting "list of patterns" and "list of characters") feed into the model (deep network). By observing each pattern and also based on long term dependency and frequency of characters, the model memories (learns) what word come next after each pattern. For example by observing P1 and P2 it memories the words "ی" or "ز" respectively (Figure 5). Then the model uses this information (learned from whole text and all the patterns) to predict each next word and arrange them to compose a poem or any textual data. 6 Note that, Persian is written from right to left, but computer reads and processes the words from left to right. Figure 4: Textual data will be divided into patterns, then all these patterns will be added into a list ("list of patterns") and the first character which comes exactly after each pattern will be added into another list ("list of characters"). Figure 5: Deep Network; by observing each pattern and also based on long term dependency and frequency of characters, the model memories (learns) what word come next after each pattern. Assume P1 and also S1 from where: S1: -- ا ر ار " امعم نیا هب تمکح دیاشگن دوشگن و هک سک " ا م ع م -- ن ی ا -- ت م ک ح -- ه ب -- ", and then the first case leads to predict next word as "ی" and " it will uses all the information of epochs Both of S1 and P1 end with" -- ب ه in the second, "د". Now if the machine face to " -- ب ه (long term dependency) and frequencies to predict the best characters. • Based on our time and processing power the machine reads and processes the whole data several times, each called one epoch. Learning machines use iterative algorithms often need many epochs during their learning phase. In this step, after each epoch, the machine becomes better in predicting the characters. After processing, we give it a starting sentence (called Seed) and with the use of information stored in saved weights we can generate fake poems (Figure 6). Figure 6: Once the data has been processed, we can give the model a starting sentence (called Seed) and with the use of information stored in saved weights we can generate fake poems. 4 Results In this section we present the results of our model to generate poems in Hafez style and also a new style result of combination of Hafez and Saadi. Because of limitation of processing power, the generated text needs a little manipulation to make better sense. According to Oxford Advanced Learner's Dictionary, 8th edition, a poem is: "a piece of writing in which the words are chosen for their sound and the images they suggest, not just for their obvious meanings. The words are arranged in separate lines, usually with a repeated rhythm, and often the lines rhyme at the end." Our generated poems have some differencesses and similarities with this definition, as follows: Similarities: • In both cases The words are arranged in separate lines. • Often the lines rhyme at the end. Differencesses: • Not all lines suggest obvious meanings. • Not all lines are connected in meaning, so they don't necessarily tell a coherent story. In addition, in our generated poems not all lines necessarily obey a particular Poetry style, however majority of them do. Also with this model we can generate as many couplets as we wish, even millions of them. Firstly we give the seed, secondly we set a limit number for example 200, finally model generates a poem with 200 characters as follows. Seed: 200 characters generated poem: اه اهلوان لکشم داتفا و يلو ردا اساک يقاسلا اهیا لاا ای لوا ناسآ هک قشع دومن رخاک هب یوب هفان یا ابص تسب هناخیم زا رد نم دربب لایخ ام ار ار ات دسرب وت رد بآ تسا تاباسخ وک نیلعم هاقناخ تسین هب نم تشماد رد راک ام هب رد نیا هاش ز دهاس يم و فلز درد وت ات هب هب هناخیم هک اب ز نم دابآ هب رد ت لد رب هب کاخ 4.1 A poet like Hafez Our model, first trained on poems of Hafez. Relation between epoch and accuracy of the model to make syntactically and semantically better words is presented in (Figure 7). As mentioned before if our model observes and analyses the whole Ghazaliat-e-Hafez, it has passed one epoch. It is notable that in the first epoch, the machine starts without any background about the text, but for the second epoch the machine proceed with information of the first epoch about the whole text and so on. Also accuracy is defined as the percentage of correct prediction of characters. The results of accuracy over epochs are interesting. As we can see in (Figure 7), in initial epochs the learning rate (improving accuracy) is fast and substantial but as the time passes this rate decreases significantly. For understanding the process better, consider a new born baby. From the first day the baby begins the process of learning to speak and putting words next to each other. Consider each epoch as a week, in the first weeks, the baby learns many words and sentences since they are all new, but as the time passes the learning process gets slower because now the baby has learned a lot of sentence and there are a few words which are new for it. In the same way our model born in the first pattern in epoch 1. In the initial epochs our model is exactly like a new born baby (learns faster) but at the end of training (epoch 150) we have a baby of 3 years old! Our model on hafez style model contains the data (text) of whole Ghazaliat-e-hafez and it has been trained over 500 epochs. Word clouds of the real and generated texts are in (Figure 8) and (Figure 9) which again show that frequencies of the used words in the both real and generated text are similar. Now please look at some of results with different number of epochs: 50 epochs: With small number of epochs as we can see below, the machine has learned very little and it has repeated a hemistich four times: هب داب هب داب هب ناود هب ناود دود دود هب هب دود دود هب هب هب يم هب يم هب دود هب دود 160 epochs: In this number of epochs, the results is better but there is no rhyme: اب يم دنک لد زا تسد هب ناود هب ناود نم مریزون زا رس نیوک هب داب هب داب دود دود دیشک هب هب يم رگنب هک زا رس نم زا وت رس یوم وت 500 epochs: With 500 epochs, the results are better both in meaning and rhyme: ينکی يناد تسیچ اب نم هب نوخ لد هک رب نم هب يم هب يم هک وت زا يم ناج تسا تسا نیا راک و ناشن رس هک نم یراب نیا هک اب وت درذگب بشعم نابایب و لزنم هب داب لد هک وت لد نم یا نیا ردنا زا کاخ وچ راک هک نیا نورب راهب 4.2 A new created poet داب Now it is easy to feed our model a certain type of data and generate text in the same style. For instance if we feed our model the poems of hafez the model can generate hafez style poems and if we feed the model saadi style poems then we get those of like saadi's. Now if we feed our model both hafez and saadi poems, we can generate poems in the style of both. In other words, we can create a new poet with both hafez and saadi perspective. It can lead us to era of new poets. In order to create such new poems we feed our model both Ghazaliat-e- hafez and Ghazaliat-e-saadi. Word clouds of the real and generated texts are in (Figure 10) and (Figure 11) which again show that frequencies of the used words in the both real and generated text are similar. Some results were as following: يسک زا تیلاخ ار رد يسک و تسد ينک اب وت رد دنب رب دوخ داهن داهن دوخ رد رد زاب هب بادرد نم هک رب هک رد زاب هک اب شوه هب تسد هب رد راب As we can see, these poems are neither like Hafez, nor saadi, but their styles are very similar to the both which is very interesting. دیما ار رب يسک رب دیما نمدود زا وت رد داب 5 Conclusion Using machine learning, an idea to create a new poet based on poets that have passed away, is presented. For this purpose, we let the machine to read and process the text based on machine learning algorithms to find some probabilistic patterns for arranging the characters of the original texts. Then with giving some characters in the form of words to machine as the seed, the machine based on the probabilistic patterns can generate as many characters as we want. With this method, style of the generated text will be similar to the original one. With this idea of combination of the styles of poets, we will give our poets a new life and also our culture and history a new chance to have some new poets with some new styles not previously exist. Two of the challenges of this method are limitation of processing power and limitation of the text size. More powerful computers in processing power and the greater size of the original text leads to generating better text in terms of rhyme and concept. For future works, it would be interesting if we combine the style of writers instead of poets. Also it would be interesting if we feed the machine with poems of some old poets and some new born words in our literature to see if our previous poets want to compose poem using new born words, what they would compose. References [1] Bahdanau, D., Cho, K., and Bengio, Y., 2014, Neural machine translation by jointly learning to align and translate. arXiv:1409.0473. [2] Bengio, Y., Ducharme, R., Vincent, P., and Janvin, C., 2003, A neural probabilistic language model. The Journal of Machine Learning Research, 3:1137 -- 1155. [3] Bengio, Y., Simard, P., and Frasconi, P., 1994, Learning long-term dependencies with gradient descent is difficult. IEEE Transactions on Neural Networks, 5(2):157 -- 166. [4] Buduma, N. and Lacascio, N., 2017, Fundamentals of Deep Learning, O'Reilly. [5] Deng, L., and Liu, Y., 2018, Deep Learning in Natural Language Processing, Springer Singapore. [6] Goyal, P., Pandey, S., and Jain, K., 2018, Deep Learning for Natural Language Processing, Apress. Graves, A., 2014, Generating Sequences With Recurrent Neural Networks, [7] arXiv:1308.0850v5. [8] Goodfellow, I., Bengio, Y., and Courville, A., 2016, Deep Learning, MIT press. [9] Leopold, H., Mendling, J., and Polyvyanyy, A., 2012, Generating natural language texts from business process models, in Proc. 24th Int. Conf. Adv. Inf. Syst. Eng., 64 -- 79. [10] Leopold, H., Mendling, J., and Polyvyanyy, A., 2014, Supporting Process Model Validation through Natural Language Generation, IEEE Transaction On Software Enginieering, 40(8):818- 840. [11] McKeown, K.R., 1992, Text Generation, Cambridge University Press. [12] Misztal-Radecka, J. and Indurkhya, B., 2016, A Black Board System For Generating Poetry, Computer Science, 17(2):265 -- 294. [13] Liu, Q., Zou, L., Che, H., Wang, H., Jin, Y. and Yang, H., 2017, A Creative Computing Based Inspiration Assistant to Poem Generation," 2017 14th International Symposium on Pervasive Systems, Algorithms and Networks 2017 11th International Conference on Frontier of Computer Science and Technology 2017 Third International Symposium of Creative Computing , 469-476. [14] Sutskever, I., Martens, J., and Hinton, G., 2011, Generating Text with Recurrent Neural Networks, ICML'11 Proceedings of the 28th International Conference on International Conference on Machine Learning, 1017-1024. [15] Vinyals, O. and V. Le, Q., 2015, A Neural Conversational Model arXiv:1506.05869v3. [16] Wang, Z., He, W., Wu, Hau, Wu, Haiyang, Li, W., Wang, H., Chen, E., 2016, Chinese Poetry Generation with Planning based Neural Network arXiv:1610.09889v2. Figure 7: Relation between epoch and accuracy of the model to make syntactically and semantically better words. In initial epochs the learning rate (improving accuracy) is fast and substantial but as the time passes this rate decreases significantly. Figure 8: Word cloud of the real hafez poems. Figure 9: Word cloud of the fake generated poems of hafez. Figure 10: Word cloud of the real hafez and saadi poems. Figure 11: Word cloud of the fake hafez and saadi generated poems.
1909.08859
1
1909
2019-09-19T08:39:00
Procedural Reasoning Networks for Understanding Multimodal Procedures
[ "cs.CL", "cs.CV" ]
This paper addresses the problem of comprehending procedural commonsense knowledge. This is a challenging task as it requires identifying key entities, keeping track of their state changes, and understanding temporal and causal relations. Contrary to most of the previous work, in this study, we do not rely on strong inductive bias and explore the question of how multimodality can be exploited to provide a complementary semantic signal. Towards this end, we introduce a new entity-aware neural comprehension model augmented with external relational memory units. Our model learns to dynamically update entity states in relation to each other while reading the text instructions. Our experimental analysis on the visual reasoning tasks in the recently proposed RecipeQA dataset reveals that our approach improves the accuracy of the previously reported models by a large margin. Moreover, we find that our model learns effective dynamic representations of entities even though we do not use any supervision at the level of entity states.
cs.CL
cs
Procedural Reasoning Networks for Understanding Multimodal Procedures Mustafa Sercan Amac Semih Yagcioglu Aykut Erdem Erkut Erdem Hacettepe University Computer Vision Lab Dept. of Computer Engineering, Hacettepe University, Ankara, TURKEY {b21626915,n13242994,aykut,erkut}@cs.hacettepe.edu.tr 9 1 0 2 p e S 9 1 ] L C . s c [ 1 v 9 5 8 8 0 . 9 0 9 1 : v i X r a Abstract This paper addresses the problem of com- prehending procedural commonsense knowl- edge. This is a challenging task as it re- quires identifying key entities, keeping track of their state changes, and understanding tem- poral and causal relations. Contrary to most of the previous work, in this study, we do not rely on strong inductive bias and explore the question of how multimodality can be ex- ploited to provide a complementary semantic signal. Towards this end, we introduce a new entity-aware neural comprehension model aug- mented with external relational memory units. Our model learns to dynamically update en- tity states in relation to each other while read- ing the text instructions. Our experimental analysis on the visual reasoning tasks in the recently proposed RecipeQA dataset reveals that our approach improves the accuracy of the previously reported models by a large margin. Moreover, we find that our model learns effec- tive dynamic representations of entities even though we do not use any supervision at the level of entity states.1 Introduction 1 A great deal of commonsense knowledge about the world we live is procedural in nature and involves steps that show ways to achieve specific goals. Un- derstanding and reasoning about procedural texts (e.g. cooking recipes, how-to guides, scientific pro- cesses) are very hard for machines as it demands modeling the intrinsic dynamics of the procedures (Bosselut et al., 2018; Dalvi et al., 2018; Yagcioglu et al., 2018). That is, one must be aware of the entities present in the text, infer relations among them and even anticipate changes in the states of the entities after each action. For example, consider the cheeseburger recipe presented in Fig. 1. The 1The project website with code and demo is available at https://hucvl.github.io/prn/ instruction "salt and pepper each patty and cook for 2 to 3 minutes on the first side" in Step 5 entails mixing three basic ingredients, the ground beef, salt and pepper, together and then applying heat to the mix, which in turn causes chemical changes that alter both the appearance and the taste. From a natural language understanding perspective, the main difficulty arises when a model sees the word patty again at a later stage of the recipe. It still cor- responds to the same entity, but its form is totally different. Over the past few years, many new datasets and approaches have been proposed that address this in- herently hard problem (Bosselut et al., 2018; Dalvi et al., 2018; Tandon et al., 2018; Du et al., 2019). To mitigate the aforementioned challenges, the ex- isting works rely mostly on heavy supervision and focus on predicting the individual state changes of entities at each step. Although these models can accurately learn to make local predictions, they may lack global consistency (Tandon et al., 2018; Du et al., 2019), not to mention that building such annotated corpora is very labor-intensive. In this work, we take a different direction and explore the problem from a multimodal standpoint. Our basic motivation, as illustrated in Fig. 1, is that accompa- nying images provide complementary cues about causal effects and state changes. For instance, it is quite easy to distinguish raw meat from cooked one in visual domain. In particular, we take advantage of recently pro- posed RecipeQA dataset (Yagcioglu et al., 2018), a dataset for multimodal comprehension of cooking recipes, and ask whether it is possible to have a model which employs dynamic representations of entities in answering questions that require multi- modal understanding of procedures. To this end, in- spired from (Santoro et al., 2018), we propose Pro- cedural Reasoning Networks (PRN) that incorpo- rates entities into the comprehension process and al- Figure 1: A recipe for preparing a cheeseburger (adapted from the cooking instructions available at https: //www.instructables.com/id/In-N-Out-Double-Double-Cheeseburger-Copycat). Each basic in- gredient (entity) is highlighted by a different color in the text and with bounding boxes on the accompanying images. Over the course of the recipe instructions, ingredients interact with each other, change their states by each cooking action (underlined in the text), which in turn alter the visual and physical properties of entities. For instance, the tomato changes it form by being sliced up and then stacked on a hamburger bun. lows to keep track of entities, understand their inter- actions and accordingly update their states across time. We report that our proposed approach signifi- cantly improves upon previously published results on visual reasoning tasks in RecipeQA, which test understanding causal and temporal relations from images and text. We further show that the dynamic entity representations can capture semantics of the state information in the corresponding steps. 2 Visual Reasoning in RecipeQA In our study, we particularly focus on the visual reasoning tasks of RecipeQA, namely visual cloze, visual coherence, and visual ordering tasks, each of which examines a different reasoning skill2. We briefly describe these tasks below. Visual Cloze. In the visual cloze task, the question is formed by a sequence of four images from consecutive steps of a recipe where one of them is replaced by a placeholder. A model should select the correct one from a multiple-choice list of four answer candidates to fill in the missing piece. In that regard, the task inherently requires aligning visual and textual information and understanding 2We intentionally leave the textual cloze task out from our experiments as the questions in this task does not necessarily need multimodality. temporal relationships between the cooking actions and the entities. Visual Coherence. The visual coherence task tests the ability to identify the image within a sequence of four images that is inconsistent with the text instructions of a cooking recipe. To succeed in this task, a model should have a clear understanding of the procedure described in the recipe and at the same time connect language and vision. Visual Ordering. The visual ordering task is about grasping the temporal flow of visual events with the help of the given recipe text. The questions show a set of four images from the recipe and the task is to sort jumbled images into the correct order. Here, a model needs to infer the temporal relations between the images and align them with the recipe steps. 3 Procedural Reasoning Networks In the following, we explain our Procedural Reason- ing Networks model. Its architecture is based on a bi-directional attention flow (BiDAF) model (Gard- ner et al., 2018)3, but also equipped with an explicit reasoning module that acts on entity-specific rela- 3Our implementation is based on the implementation pub- licly available in AllenNLP (Gardner et al., 2018). dressingStep 1: Ingredients and ToolsStep 2: Form PattiesStep 3: SeasonStep 4: Toast BunsLightly toast the both halves of the hamburgerbun, face down in the pan. Set aside.Step 5: CookStep 6: Chop Onions & TomatoesFor the "authentic" feel you want to get a largeonion and a large tomato, then slice a large slicefrom the middle to use on the hamburger.Step 7: Chop Onions & TomatoesStep 8: EnjoyAll that's left to do is enjoy this copycat doubledouble! To be honest, this was impressively closeto the real taste. I would definitely make this oneagain.ground beeflettuce leafonionsaltpepperdressinghamburger bunAmerican cheesetomatoground beefground beefground beefground beefground beefground beefground beefground beefground beefground beefground beefground beefground beefground beefhamburger bunhamburger bunhamburger bunhamburger bunhamburger bunhamburger bunhamburger bunhamburger bunsaltsaltsaltpepperpeppertomatolettuce leaflettuce leafoniononiononiononiontomatotomatodressingdressingSalt and pepper one side of the patty now, the otherhalf will be done when grilling.Set the patty seasoned side down on the skillet, salt and peppereach patty and cook for 2 to 3 minutes on the first side. Flip thepatties over and season with salt and pepper and immediatelyplace one slice of cheese on each one. Cook for 2-3 minutes onthe other side.1 hamburger bun, 4 oz. ground beef (25-30% fatif available) (2 ounce per patty), salt andpepper, Thousand Island dressing (or In-N-Outofficial spread), 1 large tomato, 1 large lettuceleaf, 1 whole onion, 2 slices real AmericancheeseAssemble the burger in the following stacking order from thebottom up: bottom bun, thousand island dressing, tomato, lettuce,beef patty with cheese, onion slice, beef patty with cheese, topbunBegin by preheating a cast iron skillet over medium heat. Make four patties byrolling 2-ounce portions of beef into balls and weigh it out on the kitchen scale.In-N-Out uses a 25-30% fat beef patty which is not easily available at a localgrocery store, in many cases it would have to be ground by hand. Forming themslightly larger than buns. I do this by placing the 2 ounce beef in between 2pieces of parchment paper then taking my large cast iron skillet and applying alittle force to smash the beef into a patty. You will want to form them into aperfect circle with your hand if they do not come out right after the initial smash. Figure 2: An illustration of our Procedural Reasoning Networks (PRN). For a sample question from visual coher- ence task in RecipeQA, while reading the cooking recipe, the model constantly performs updates on the representa- tions of the entities (ingredients) after each step and makes use of their representations along with the whole recipe when it scores a candidate answer. Please refer to the main text for more details. tional memory units. Fig. 2 shows an overview of the network architecture. It consists of five main modules: An input module, an attention module, a reasoning module, a modeling module, and an out- put module. Note that the question answering tasks we consider here are multimodal in that while the context is a procedural text, the question and the multiple choice answers are composed of images. 1. Input Module extracts vector representations of inputs at different levels of granularity by using several different encoders. 2. Reasoning Module scans the procedural text and tracks the states of the entities and their re- lations through a recurrent relational memory core unit (Santoro et al., 2018). 3. Attention Module computes context-aware query vectors and query-aware context vectors as well as query-aware memory vectors. 4. Modeling Module employs two multi- layered RNNs to encode previous layers out- puts. 5. Output Module scores a candidate answer from the given multiple-choice list. At a high level, as the model is reading the cooking recipe, it continually updates the internal memory representations of the entities (ingredients) based on the content of each step -- it keeps track of changes in the states of the entities, providing an entity-centric summary of the recipe. The response to a question and a possible answer depends on the representation of the recipe text as well as the last states of the entities. All this happens in a series of implicit relational reasoning steps and there is no need for explicitly encoding the state in terms of a predefined vocabulary. Input Module 3.1 Let the triple (R, Q, A) be a sample input. Here, R denotes the input recipe which contains textual instructions composed of N words in total. Q represents the question that consists of a sequence of M images. A denotes an answer that is either a single image or a series of L images depending on the reasoning task. In particular, for the visual cloze and the visual coherence type questions, the answer contains a single image (L = 1) and for the visual ordering task, it includes a sequence. We encode the input recipe R at character, word, and step levels. Character-level embedding layer uses a convolutional neural network, namely Char- CNN model by Kim (2014), which outputs charac- ter level embeddings for each word and alleviates the issue of out-of-vocabulary (OOV) words. In word embedding layer, we use a pretrained GloVe model (Pennington et al., 2014) and extract word- level embeddings4. The concatenation of the char- acter and the word embeddings are then fed to a two-layer highway network (Srivastava et al., 2015) to obtain a contextual embedding for each word in the recipe. This results in the matrix R(cid:48) ∈ R2d×N . On top of these layers, we have another layer that encodes the steps of the recipe in an individual manner. Specifically, we obtain a step-level con- 4We also consider pretrained ELMo embeddings (Peters et al., 2018) in our experiments but found out that the perfor- mance gain does not justify the computational overhead. CNNCNNCNNLSTMLSTMLSTMStep 1: Ingredients8-12 oz (225-350g) gingersnap cookies (depending onhow much crust you like!) 1/4 cup (57g) butter, melted(or slightly more if you're going full-hog on the crust) 24oz.. (680g) cream cheese, softened 15 oz. (425g)pumpkin puree 2/3 cup (75g) sugar 4 eggs 1 teaspoonvanilla 1/4 cup (30g) flour Pinch of salt Freshly groundcinnamon, ginger and nutmeg to taste (I use 1/2teaspoon each!) Optional: fresh ground pepper - I knowit sounds weird, but it adds depth to the spice profile!In a mixer or food processor,combine the softened creamcheese, pumpkin puree, sugar,and vanilla extract until wellblended. Add the eggs, one at atime, mixing after each until justincorporated. Combine flour andspices and slowly add to the liquidmixture. Pour mixture into crust.Step 3: The FillingBake the pumpkin cheesecake for 80-90minutes, until the center is almost set., andbarely jiggles in the middle. Use a knife to gentlyloosen the crust from the edge of the pan. Allowcheesecake to cool before removing the rim ofthe pan. Refrigerate for at least 4 hours and upto overnight. If you are traveling with thecheesecake, leave the pan in tact until ready toeat! You're gonna love this one, I just know it!Step 4: BakeStep 2: The CrustCNNLSTMChar EmbedEmbedCNNConcatBiLSTMEmbedCNNConcatBiLSTMChar Embedfresh ground peppergingersnap cookiesground cinnamonpumpkin pureecream cheesenutmegvanillagingerbuttersugareggsfloursaltEmbedPreheat your oven to 350F (180C). Using a food processor (ora mallet and a baggie - go for it!), turn your gingersnaps intocrumbs! Add butter to crumbs and process until wellincorporated. (If you're using the mallet method, you can use afork for this part!) I like to line just the bottom of a 9" springformpan with parchment, but that is optional. Pat the crust mixtureinto your pan, covering just the bottom, or going up the sides asfar as you dare! If you're going full-crust, it's a good idea to par-bake your crust (meaning bake it before filling) for 5-10 mins. EmbedCNNConcatBiLSTMChar EmbedChar EmbedEmbedCNNConcatBiLSTMBi-AttentionBi-AttentionEntities (Ingredients)R-RNNR-RNNR-RNNR-RNNQuestion (Visual Coherence Task)AnswerCandidateConcatBiLSTMBiLSTMSimilarityChar EmbedCNNConcatBiLSTMEmbedRecipe (4 Steps)MLPCNNMLP textual embedding of the input recipe containing T steps as S = (s1, s2, . . . , sT ) where si repre- sents the final state of a BiLSTM encoding the i-th step of the recipe obtained from the character and word-level embeddings of the tokens exist in the corresponding step. We represent both the question Q and the answer A in terms of visual embeddings. Here, we employ a pretrained ResNet-50 model (He et al., 2016) trained on ImageNet dataset (Deng et al., 2009) and represent each image as a real-valued 2048-d vector using features from the penultimate average- pool layer. Then these embeddings are passed first to a multilayer perceptron (MLP) and then its out- puts are fed to a BiLSTM. We then form a matrix Q(cid:48) ∈ R2d×M for the question by concatenating the cell states of the BiLSTM. For the visual ordering task, to represent the sequence of images in the answer with a single vector, we additionally use a BiLSTM and define the answering embedding by the summation of the cell states of the BiLSTM. Finally, for all tasks, these computations produce answer embeddings denoted by a ∈ R2d×1. 3.2 Reasoning Module As mentioned before, comprehending a cooking recipe is mostly about entities (basic ingredients) and actions (cooking activities) described in the recipe instructions. Each action leads to changes in the states of the entities, which usually affects their visual characteristics. A change rarely oc- curs in isolation; in most cases, the action affects multiple entities at once. Hence, in our reasoning module, we have an explicit memory component implemented with relational memory units (San- toro et al., 2018). This helps us to keep track of the entities, their state changes and their relations in relation to each other over the course of the recipe (see Fig. 3). As we will examine in more detail in Section 4, it also greatly improves the interpretabil- ity of model outputs. Specifically, we set up the memory with a mem- ory matrix E ∈ RdE×K by extracting K entities (ingredients) from the first step of the recipe5. We initialize each memory cell ei representing a spe- cific entity by its CharCNN and pre-trained GloVe embeddings6. From now on, we will use the terms 5The first steps of the recipes in RecipeQA commonly contain a list of ingredients. 6Multi-word entities (e.g. minced garlic) are represented by the average embedding vector of the words that they con- tain, and OOV words are expressed with the average word memory cells and entities interchangeably through- out the paper. Since the input recipe is given in the form of a procedural text decomposed into a number of steps, we update the memory cells after each step, reflecting the state changes happened on the entities. This update procedure is modelled via a relational recurrent neural network (R-RNN), re- cently proposed by Santoro et al. (2018). It is built on a 2-dimensional LSTM model whose matrix of cell states represent our memory matrix E. Here, each row i of the matrix E refers to a specific entity ei and is updated after each recipe step t as follows: φi,t = R-RNN(φi,t−1, st) (1) where st denotes the embedding of recipe step t and φi,t = (hi,t, ei,t) is the cell state of the R-RNN at step t with hi,t and ei,t being the i-th row of the hidden state of the R-RNN and the dynamic representation of entity ei at the step t, respectively. The R-RNN model exploits a multi-headed self- attention mechanism (Vaswani et al., 2017) that allows memory cells to interact with each other and attend multiple locations simultaneously during the update phase. In Fig. 3, we illustrate how this interaction takes place in our relational memory module by consider- ing a sample cooking recipe and by presenting how the attention matrix changes throughout the recipe. In particular, the attention matrix at a specific time shows the attention flow from one entity (memory cell) to another along with the attention weights to the corresponding recipe step (offset column). The color intensity shows the magnitude of the at- tention weights. As can be seen from the figure, the internal representations of the entities are ac- tively updated at each step. Moreover, as argued in (Santoro et al., 2018), this can be interpreted as a form of relational reasoning as each update on a specific memory cell is operated in relation to oth- ers. Here, we should note that it is often difficult to make sense of these attention weights. However, we observe that the attention matrix changes very gradually near the completion of the recipe. 3.3 Attention Module Attention module is in charge of linking the ques- tion with the recipe text and the entities present in the recipe. It takes the matrices Q(cid:48) and R(cid:48) from the input module, and E from the reasoning module vector of all the words. Figure 3: Sample visualizations of the self-attention weights demonstrating both the interactions among the ingre- dients and between the ingredients and the textual instructions throughout the steps of a sample cooking recipe from RecipeQA (darker colors imply higher attention weights). The attention maps do not change much after the third step as the steps after that mostly provide some redundant information about the completed recipe. and constructs the question-aware recipe represen- tation G and the question-aware entity representa- tion Y. Following the attention flow mechanism described in (Seo et al., 2017a), we specifically calculate attentions in four different directions: (1) from question to recipe, (2) from recipe to question, (3) from question to entities, and (4) from entities to question. The first two of these attentions require comput- ing a shared affinity matrix SR ∈ RN×M with SR i,j indicating the similarity between i-th recipe word and j-th image in the question estimated by i; Q(cid:48) j; R(cid:48) R[R(cid:48) i ◦ Q(cid:48) j] i,j = w(cid:62) SR (2) R is a trainable weight vector, ◦ and [; ] de- where w(cid:62) note elementwise multiplication and concatenation operations, respectively. its i-th column being given by Qi = (cid:80) Recipe-to-question attention determines the im- ages within the question that is most relevant to each word of the recipe. Let Q ∈ R2d×N repre- sent the recipe-to-question attention matrix with j aijQ(cid:48) j where the attention weight is computed by ai = softmax(SR i ) ∈ RM . attended recipe vector given by r = (cid:80) Question-to-recipe attention signifies the words within the recipe that have the closest similarity to each image in the question, and construct an i biR(cid:48) i with the attention weight is calculated by b = softmax(maxcol (SR)) ∈ RN where maxcol de- notes the maximum function across the column. The question-to-recipe matrix is then obtained by replicating r N times across the column, giving R ∈ R2d×N . Then, we construct the question aware represen- tation of the input recipe, G, with its i-th column Gi ∈ R8d×N denoting the final embedding of i-th word given by Gi = [R(cid:48) i ◦ Ri; ] . i ◦ Qi; R(cid:48) i; Qi; R(cid:48) (3) Attentions from question to entities, and from entities to question are computed in a way similar to the ones described above. The only difference is that it uses a different shared affinity matrix to be computed between the memory encoding entities E and the question Q(cid:48). These attentions are then used to construct the question aware representation of entities, denoted by Y, that links and integrates the images in the question and the entities in the input recipe. 3.4 Modeling Module Modeling module takes the question-aware repre- sentations of the recipe G and the entities Y, and forms their combined vector representation. For this purpose, we first use a two-layer BiLSTM to read the question-aware recipe G and to encode the interactions among the words conditioned on the question. For each direction of BiLSTM , we use its hidden state after reading the last token as its output. In the end, we obtain a vector embedding c ∈ R2d×1. Similarly, we employ a second BiL- STM, this time, over the entities Y, which results in another vector embedding f ∈ R2dE×1. Finally, these vector representations are concatenated and then projected to a fixed size representation using o = ϕo([c; f ]) ∈ R2d×1 where ϕo is a multilayer perceptron with tanh activation function. We'll start with a nice piece ofroast, mine was 1 kilo and ahalf, but you can do less if youwant.We'll have to cut thepieces so that it eventually fit inthe bottle. This dependsentirely from the size of thebottle itself, that said rememberthe meat will shrink in the oven.Step 1: Slicin', Dicin'...saltoilpotatoesrosemarythymecrushed garlicpork tenderloinblackpepperThen comes the phase that isknown in italian as "Pillottare".Using a mortar, grind togetherthe spices, the salt, thecrushed garlic and add a dropor two of olive oil so that themixture sticks together Afterthat, take a knife, stab the meatand start filling the cavities withthe spices. When you'refinished it should look like yourmeat had grown a beard.Quickly clean the potatoes andthe onion and chop them inmedium sized pieces. Put halfan inch of Olive oil in the panand put everything in it. Addthe remaining spices and, ifyou like, add some more.Preheat the oven to 180C(356F) and then put this babyto roast. Turn it from time totime so that both sides cookevenly. I kept it one hour andten, but it depends really fromthe size of your roast. You canalways go old school andcheck with a toothpic from timeto time.Bottle has to be clean, so afterwashing and drying it, and rightbefore putting the meat in it,boil some water and pour it infor a quick rinse off. To avoidbreaking the bottle pour somecold water in it and pour theboiling water into the coldwater. You do not need much ofit, just a cup or so, quickly rinsethe bottle and throw the wateraway. Wait till the meat is cold, thenput it into the freshly sterilizedbottle and cover in olive oil.The meat has to rest for atleast two days, then you canstart eating it.Step 2: ... and Spicin'Step 3: Bring Company!Step 4: Burn Baby Burn!Step 5: Ready the Bottle.Step 6: Put the Piggies to Sleep.step 1step 2step 3step 4step 5step 6saltoilpotatoesrosemarythymecrushed garlicpork tenderloinblackpepperTimeRecipe: OilBottled PorkTenderloinattendingfromattendingto0.00.20.40.60.81.0 3.5 Output Module The output module takes the output of the mod- eling module, encoding vector embeddings of the question-aware recipe and the entities Y, and the embedding of the answer A, and returns a simi- larity score which is used while determining the correct answer. Among all the candidate answer, the one having the highest similarity score is cho- sen as the correct answer. To train our proposed procedural reasoning network, we employ a hinge ranking loss (Collobert et al., 2011), similar to the one used in (Yagcioglu et al., 2018), given below. L = max{0, γ − cos(o, a+) + cos(o, a−)} (4) where γ is the margin parameter, a+ and a− are the correct and the incorrect answers, respectively. 4 Experiments In this section, we describe our experimental setup and then analyze the results of the proposed Proce- dural Reasoning Networks (PRN) model. 4.1 Entity Extraction Given a recipe, we automatically extract the entities from the initial step of a recipe by using a dictionary of ingredients. While determining the ingredients, we exploit Recipe1M (Marin et al., 2018) and Kaggle Whats Cooking Recipes (Yummly, 2015) datasets, and form our dictionary using the most commonly used ingredients in the training set of RecipeQA. For the cases when no entity can be extracted from the recipe automatically (20 recipes in total), we manually annotate those recipes with the related entities. 4.2 Training Details In our experiments, we separately trained models on each task, as well as we investigated multi-task learning where a single model is trained to solve all these tasks at once. In total, the PRN architecture consists of ∼12M trainable parameters. We imple- mented our models in PyTorch (Paszke et al., 2017) using AllenNLP library (Gardner et al., 2018). We used Adam optimizer with a learning rate of 1e-4 with an early stopping criteria with the patience set to 10 indicating that the training procedure ends after 10 iterations if the performance would not improve. We considered a batch size of 32 due to our hardware constraints. In the multi-task setting, batches are sampled round-robin from all tasks, where each batch is solely composed of examples from one task. We performed our experiments on a system containing four NVIDIA GTX-1080Ti GPUs, and training a single model took around 2 hours. We employed the same hyperparameters for all the baseline systems. We plan to share our code and model implementation after the review process. 4.3 Baselines We compare our model with several baseline models as described below. We note that the results of the first two are previously reported in (Yagcioglu et al., 2018). Hasty Student (Yagcioglu et al., 2018) is a heuristics-based simple model which ignores the recipe and gives an answer by examining only the question and the answer set using distances in the visual feature space. Impatient Reader (Hermann et al., 2015) is a simple neural model that takes its name from the fact that it repeatedly computes attention over the recipe after observing each image in the query. BiDAF (Seo et al., 2017a) is a strong reading comprehension model that employs a bi-directional attention flow mechanism to obtain a question- aware representation and bases its predictions on this representation. Originally, it is a span-selection model from the input context. Here, we adapt it to work in a multimodal setting and answer multiple choice questions instead. BiDAF w/ static memory is an extended version of the BiDAF model which resembles our proposed PRN model in that it includes a memory unit for the entities. However, it does not make any updates on the memory cells. That is, it uses the static entity embeeddings initialized with GloVe word vectors. We propose this baseline to test the significance of the use of relational memory updates. 4.4 Results Table 1 presents the quantitative results for the vi- sual reasoning tasks in RecipeQA. In single-task training setting, PRN gives state-of-the-art results compared to other neural models. Moreover, it achieves the best performance on average. These results demonstrate the importance of having a dy- namic memory and keeping track of entities ex- tracted from the recipe. In multi-task training set- Figure 4: t-SNE visualizations of learned embeddings from each memory snapshot mapping to each entity and their corresponding states from each step for visual cloze task. Single-task Training Multi-task Training Model Human∗ Hasty Student Impatient Reader BIDAF BIDAF w/ static memory PRN ∗ Taken from the RecipeQA project website, based on 100 questions sampled randomly from the validation set. Cloze Coherence Ordering Average 74.40 77.60 44.68 27.35 27.36 27.39 55.06 53.95 52.87 51.82 56.31 57.57 81.60 65.80 28.08 48.82 45.88 53.64 64.00 40.88 26.74 62.42 60.90 62.77 44.62 47.81 46.45 Cloze Coherence Ordering All -- -- -- -- -- -- -- -- -- -- -- -- 36.00 40.23 40.58 63.93 62.94 62.67 48.67 50.59 50.17 Table 1: Quantitative comparison of the proposed PRN model against the baselines. ting where a single model is trained to solve all the tasks at once, PRN and BIDAF w/ static memory perform comparably and give much better results than BIDAF. Note that the model performances in the multi-task training setting are worse than single-task performances. We believe that this is due to the nature of the tasks that some are more difficult than the others. We think that the perfor- mance could be improved by employing a carefully selected curriculum strategy (McCann et al., 2018). In Fig. 4, we illustrate the entity embeddings space by projecting the learned embeddings from the step-by-step memory snapshots through time with t-SNE to 3-d space from 200-d vector space. Color codes denote the categories of the cook- ing recipes. As can be seen, these step-aware embeddings show clear clustering of these cate- gories. Moreover, within each cluster, the entities are grouped together in terms of their state charac- teristics. For instance, in the zoomed parts of the figure, chopped and sliced, or stirred and whisked entities are placed close to each other. Fig. 5 demonstrates the entity arithmetics us- ing the learned embeddings from each entity step. Here, we show that the learned embedding from the memory snapshots can effectively capture the con- textual information about the entities at each time point in the corresponding step while taking into account of the recipe data. This basic arithmetic operation suggests that the proposed model can successfully capture the semantics of each entity's state in the corresponding step7. 5 Related Work In recent years, tracking entities and their state changes have been explored in the literature from a variety of perspectives. In an early work, Henaff et al. (2017) proposed a dynamic memory based network which updates entity states using a gat- ing mechanism while reading the text. Bansal et al. (2017) presented a more structured memory augmented model which employs memory slots for representing both entities and their relations. Pavez et al. (2018) suggested a conceptually simi- lar model in which the pairwise relations between attended memories are utilized to encode the world 7We used Gensim for calculating entity arithmetics using cosine distances between entity embeddings. Vanilla-Apricot Shortbread CookiesAdd to the whipped butter 1 cup of baker's sugar. Stir until the sugar and butter mix thoroughly. Add the whole egg and the egg yolk and stir well.Toffee Bottomed BrowniesCut the brownie into small squares, cleaning your knife after each cut.The topload of cocoa powder makes this dessert so very rich that you don't need much, and there will be ...Cherry Almond Torrone (Italian Nougat)I used a knife, spatula, and pizza roller. Use what you've got. Corn starch and butter will help to prevent sticking....Apple Pie...the apple pie filling should not have the skins on them, BUT... I made this one for a friend of mine who is a health conscious women and she insisted on me leaving the skins on for all the nutritional values....Henderson's SauceAfter it has been simmering for around 5 minutes, it is time to add some other ingredients. Add all these being; Add around 1 soup-spoon of sugar (1 soup spoon brown or 2 soup spoons white)....Absolutely Amazing Cream of Celery SoupAdd cream, lemon juice, hot sauce, salt and pepper. Reheat and simmer for about five minutes. ...Miniature Doughnut Coconut CreaturesChill a can of coconut milk or cream in the fridge overnight. When you're ready to make the whipped cream, open the can and scoop out the hardened coconut. ...Mango Mint Ice TeaTake the measured amount of water and heat it till hot. I used the microwave here. You can heat the water even on the stove top. To the hot water add the Black tea powder or the Black tea bags.Creme Brulee RecipePlace the ramekins into a pan with high sides and carefully fill the pan with hot water until half way up the sides of the ramekins. Make sure not to splash any water into the custard.breadStep: 4Entity: waterStep: 3Entity: waterStep: 1Entity: creamStep: 6Entity: creamStep: 2Entity: sugarStep: 6Entity: sugarStep: 5Entity: butterStep: 6Entity: butterStep: 3Entity: sugarFood Categoriesvegetarian-and-vegansnacks-and-appetizerssaladcocktails-and-mocktailssandwichespizzasoups-and-stewspiecoffeecanning-and-preservesbbq-and-grillingdessertbaconhomebrewcupcakescakebreakfastpastamain-coursebeveragescookiesrecipescandyStep: 4Entity: sugar(perfect) Lemon Meringue Pie...Add half the sugar (150g) and whisk again... Figure 5: Step-aware entity representations can be used to discover the changes occurred in the states of the ingredients between two different recipe steps. The difference vector between two entities can then be added to other entities to find their next states. For instance, in the first example, the difference vector encodes the chopping action done on onions. In the second example, it encodes the pouring action done on the water. When these vectors are added to the representations of raw tomatoes and milk, the three most likely next states capture the semantics of state changes in an accurate manner. state. The main difference between our approach and these works is that by utilizing relational mem- ory core units we also allow memories to interact with each other during each update. Perez and Liu (2017) showed that similar ideas can be used to compile supporting memories in tracking dialogue state. Wang et al. (2017) has shown the importance of coreference signals for reading comprehension task. More recently, Dhin- gra et al. (2018) introduced a specialized recur- rent layer which uses coreference annotations for improving reading comprehension tasks. On lan- guage modeling task, Ji et al. (2017) proposed a language model which can explicitly incorporate entities while dynamically updating their represen- tations for a variety of tasks such as language mod- eling, coreference resolution, and entity prediction. Our work builds upon and contributes to the growing literature on tracking states changes in procedural text. Bosselut et al. (2018) presented a neural model that can learn to explicitly predict state changes of ingredients at different points in a cooking recipe. Dalvi et al. (2018) proposed an- other entity-aware model to track entity states in scientific processes. Tandon et al. (2018) demon- strated that the prediction quality can be boosted by including hard and soft constraints to eliminate un- likely or favor probable state changes. In a follow- up work, Du et al. (2019) exploited the notion of label consistency in training to enforce similar pre- dictions in similar procedural contexts. Das et al. (2019) proposed a model that dynamically con- structs a knowledge graph while reading the proce- dural text to track the ever-changing entities states. As discussed in the introduction, however, these previous methods use a strong inductive bias and assume that state labels are present during training. In our study, we deliberately focus on unlabeled procedural data and ask the question: Can multi- modality help to identify and provide insights to understanding state changes. 6 Conclusion We have presented a new neural architecture called Procedural Reasoning Networks (PRN) for multi- modal understanding of step-by-step instructions. Our proposed model is based on the successful BiDAF framework but also equipped with an ex- plicit memory unit that provides an implicit mecha- Step 1: This is a cheap and easy method of an ancientcooking technique known as clay pot cookingusing a common terra cotta flowerpot and saucer.You can spend over $100 on a clay cooker at agourmet kitchen gadget store, or about $20 at agarden supply. You choose. Some of you mayalready have the pot lying in your yard, garage orshed. Once you try this you will probably becooking all kinds of things in it! onions (Flowerpot Chicken)Step 3: Prepare Vegetables.Chop your vegetables while the pot is soaking.You can use whatever you like for this, rootvegetables mixed with onions are always a nicebase. This time I used leeks, bell peppers, garlicand red onions.:onions (Flowerpot Chicken)::Step 1: This is a cheap and easy method of an ancientcooking technique known as clay pot cookingusing a common terra cotta flowerpot and saucer.You can spend over $100 on a clay cooker at agourmet kitchen gadget store, or about $20 at agarden supply. You choose. Some of you mayalready have the pot lying in your yard, garage orshed. Once you try this you will probably becooking all kinds of things in it! tomatoes (Flowerpot Chicken)?:Step 1: Prepping the Vegetables.The first step is to have all the Vegetables prepped and ready to go in thepan, so finely dice the Garlic, onions and Peppers. Don't worry about mixingthem up in the bowl, all of these items are going to be sauteed in a smallamount of oil at the next stage. Picture 1. Finely dice up the Garlic, you wantit to be almost puree consistency. Picture 2. Finely dice up the Onions, thisdoesn't need to be as fine as the garlic but you should ensure that they areall roughly the same size. Picture 3. Lastly dice up the bell pepper, I showyou how i cut this in the video, but i will go over it quickly. Firstly i take off thefour walls of the pepper, flatten them then cut them in to strips, then simplycut the other way so i have them diced.tomatoes (Chilli Con Carne)Step 1: Ingredients...pepperoni (I used what was left in a package which was enough for onelayer) 1/2 onion 2 roma tomatoes dried rosemary shredded mozarella andparmesan fresh savory, basil, tarragon, and thyme 2 or 3 cloves of garlic salt (sea or kosher salt are best) and pepper Slice the tomatoes and onion as thin as is reasonable, slice the garlic as thinas possible. Thoroughly wash the fresh herbs and pull the leaves from thestems. Discard the stems.tomatoes (Seven Layer Seven Grain Bread)Step 1: Gather Your Ingredients......1 teaspoon dried oregano, 1/8 teaspoon red pepper flakes (see step five fora bit of humor on this note), 3/4 to 1 cup wine - Honestly, folks, don't be tooparticular about the wine. Red or white is fine. (you may substitute chickenbroth, or even add broth in addition to the wine. Be creative!)(you maysubstitute chicken broth, or even add broth in addition to the wine. Becreative!) 1 - 28 ounce can diced tomatoes (save the juice!)1/2 teaspoon dried Porcino mushrooms (Optional, see step #2)tomatoes (How to Make Chicken Cacciatore)Step 1: This is absolutely mind-blowingly good. Goatbasically tastes like lamb, but is far leaner. (Lambis the fattiest of the red meats.) It's very popular ina variety of different countries' cuisines, but forsome reason has yet to gain a real following in theUS. This recipe is inspired by the curried goat rotifrom Penny's Caribbean Cafe. While Pennydoesn't share her secrets, this tastes awfullysimilar. Go get yourself some goat (or lamb if youmust) and try it out!water (Caribbean Curried Goat)Step 4: Add Everything Else.Add the rest of the curry powder and stir thingsabout. When it starts to stick again add the waterand deglaze again. Pour in just enough water tocover the meat, and leave a cup full of water nearthe pot to refill as it boils off. You want the meat tostay wet during the entire cooking process. In the picture below I've dropped in anotherboullion cube because they didn't all make it inwith the onions. The details really don't matter toomuch in this dish - it cooks long enough thatyou've got LOTS of leeway to taste and modify..:water (Caribbean Curried Goat)::Step 1: All that sounded logic to me, and instead oflooking on the net how others did it I startedthinking how Bricobart would build such a device -I mean a bbq, not an anti-troll gun. And since Ididn't want to spend any money I decided to buildit from scratch.The project failed in the first trial,but ran like a small dog chased by a beeswarm inthe second. Enjoy my poor men's verticalbirdcage-based bbq!milk (Birdcage-BQ)?:Step 3: Cooking.Melt the butter and add 1/3 cup chopped onions. When the onions arecooked add the bacon bits. Now add the potatoes back to the pot and mashthe potato mixture. I use a potato masher or you can just use a fork. You stillwant it lumpy but the potatoes will help thicken the soup. Pour the milk andmix well. Add salt and pepper and heat until it is a slow boil. Remove fromthe stove and add the cheese and stir until melted. If you add the cheese tooearly it will go to the bottom and burnmilk (Potato Soup for One)Step 2: Meat SaucePreheat oven to 180 degrees celsius. Brown off the mince in a large pan,depending on the fat content of the meat, you may or may not need a littleoil. Drain the mince onto some paper towel to remove any oil and then placeback in the pan. Add 4 slices of chopped prosciutto (or bacon/pancetta) andfry for a few minutes. Add beef stock, tomato sauce, nutmeg, bayleaf andoregano. Simmer for at least 30 minutes.milk (Family Size Lasagne)Step 1: Potato Prep + SeasoningsMake sure all potatoes are peeled and cut into chunks.In a saucepan over medium heat, drop in the tablespoon of butter, the redpepper flakes and Italian seasoning. Let the butter melt and stir theseasonings around until they start smelling nice. :)milk (Potato Soup) nism to keep track of the changes in the states of the entities over the course of the procedure. Our experimental analysis on visual reasoning tasks in the RecipeQA dataset shows that the model signifi- cantly improves the results of the previous models, indicating that it better understands the procedural text and the accompanying images. Additionally, we carefully analyze our results and find that our approach learns meaningful dynamic representa- tions of entities without any entity-level supervi- sion. Although we achieve state-of-the-art results on RecipeQA, clearly there is still room for im- provement compared to human performance. We also believe that the PRN architecture will be of value to other visual and textual sequential reason- ing tasks. Acknowledgements We thank the anonymous reviewers and area chairs for their invaluable feedback. This work was sup- ported by TUBA GEBIP fellowship awarded to E. Erdem; and by the MMVC project via an Institu- tional Links grant (Project No. 217E054) under the Newton-Katip C¸ elebi Fund partnership funded by the Scientific and Technological Research Council of Turkey (TUBITAK) and the British Council. We also thank NVIDIA Corporation for the donation of GPUs used in this research. References Trapit Bansal, Arvind Neelakantan, and Andrew Mc- Callum. 2017. RelNet: End-to-End Modeling of En- In NeurIPS Workshop on Auto- tities & Relations. mated Knowledge Base Construction (AKBC). in procedural text: a challenge dataset and models for process paragraph comprehension. In Proceed- ings of the Conference of the North American Chap- ter of the Association for Computational Linguistics: Human Language Technologies. Rajarshi Das, Tsendsuren Munkhdalai, Xingdi Yuan, Adam Trischler, and Andrew McCallum. 2019. Building Dynamic Knowledge Graphs from Text us- ing Machine Reading Comprehension. In Proceed- ings of the International Conference on Learning Representations (ICLR). Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. 2009. ImageNet: A Large-Scale Hierarchical Image Database. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 248 -- 255. Bhuwan Dhingra, Qiao Jin, Zhilin Yang, William W Cohen, and Ruslan Salakhutdinov. 2018. Neural Models for Reasoning over Multiple Mentions using In Proceedings of the Conference of Coreference. the North American Chapter of the Association for Computational Linguistics: Human Language Tech- nologies (NAACL-HLT). Xinya Du, Bhavana Dalvi Mishra, Niket Tandon, An- toine Bosselut, Wen-tau Yih, Peter Clark, and Claire Cardie. 2019. Be consistent! improving procedural text comprehension using label consistency. In Pro- ceedings of the Conference of the North American Chapter of the Association for Computational Lin- guistics: Human Language Technologies (NAACL- HLT). Matt Gardner, Joel Grus, Mark Neumann, Oyvind Tafjord, Pradeep Dasigi, Nelson F. Liu, Matthew Pe- ters, Michael Schmitz, and Luke Zettlemoyer. 2018. AllenNLP: A deep semantic natural language pro- In Proceedings of Workshop for cessing platform. NLP Open Source Software (NLP-OSS), pages 1 -- 6, Melbourne, Australia. Association for Computa- tional Linguistics. Antoine Bosselut, Corin Ennis, Omer Levy, Ari Holtz- man, Dieter Fox, and Yejin Choi. 2018. Simulat- ing Action Dynamics with Neural Process Networks. In Proceedings of the International Conference on Learning Representations (ICLR). Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep Residual Rearning for Image In Proceedings of the IEEE Confer- Recognition. ence on Computer Vision and Pattern Recognition, pages 770 -- 778. Danqi Chen, Jason Bolton, and Christopher D Man- ning. 2016. A Thorough examination of the CNN/Daily Mail Reading Comprehension Task. In Proceedings of the Annual Meeting of the Associ- ation for Computational Linguistics (ACL), pages 2358 -- 2367. Ronan Collobert, Jason Weston, L´eon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel Kuksa. 2011. Natural Language Processing (Almost) from Journal of Machine Learning Research, Scratch. 12:2493 -- 2537. Mikael Henaff, Jason Weston, Arthur Szlam, Antoine Bordes, and Yann LeCun. 2017. Tracking The World State with Recurrent Entity Networks. In Pro- ceedings of the International Conference on Learn- ing Representations (ICLR). Karl Moritz Hermann, Tomas Kocisky, Edward Grefen- stette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. 2015. Teaching Machines to In Proceedings of the Ad- Read and Comprehend. vances in Neural Information Processing Systems (NeurIPS), pages 1693 -- 1701. Bhavana Dalvi, Lifu Huang, Niket Tandon, Wen-tau Yih, and Peter Clark. 2018. Tracking state changes Schmidhuber J. Hochreiter, S. 1997. Long Short-Term Memory. Neural computation, 9(8):1735 -- 1780. Mohit Iyyer, Varun Manjunatha, Anupam Guha, Yoga- rshi Vyas, Jordan Boyd-Graber, Hal Daum´e III, and Larry Davis. 2017. The amazing mysteries of the gutter: Drawing inferences between panels in comic book narratives. In Proceedings of the IEEE Confer- ence on Computer Vision and Pattern Recognition (CVPR). Yangfeng Ji, Chenhao Tan, Sebastian Martschat, Yejin Choi, and Noah A Smith. 2017. Dynamic Entity Representations in Neural Language Models. In Proceedings of the Conference on Empirical Meth- ods in Natural Language Processing (EMNLP). Robin Jia and Percy Liang. 2017. Adversarial Ex- amples for Evaluating Reading Comprehension Sys- In Proceedings of the Conference on Em- tems. pirical Methods in Natural Language Processing (EMNLP). Samira Ebrahimi Kahou, Adam Atkinson, Vincent Michalski, Akos Kadar, Adam Trischler, and Yoshua FigureQA: An Annotated Figure Bengio. 2017. In Proceedings of Dataset for Visual Reasoning. the International Conference on Learning Represen- tations Workshop (ICLR Workshop). Aniruddha Kembhavi, Minjoon Seo, Dustin Schwenk, Jonghyun Choi, Ali Farhadi, and Hannaneh Ha- jishirzi. 2017. Are You Smarter Than A Sixth Grader? Textbook Question Answering for Multi- modal Machine Comprehension. In Proceedings of the IEEE Conference on Computer Vision and Pat- tern Recognition (CVPR). Yoon Kim. 2014. Convolutional Neural Networks for Sentence Classification. In Proceedings of the Con- ference on Empirical Methods in Natural Language Processing (EMNLP). Javier Marin, Aritro Biswas, Ferda Ofli, Nicholas Hynes, Amaia Salvador, Yusuf Aytar, Ingmar We- ber, and Antonio Torralba. 2018. Recipe1M: A Dataset for Learning Cross-Modal Embeddings for Cooking Recipes and Food Images. arXiv preprint arXiv:1810.06553. Bryan McCann, Nitish Shirish Keskar, Caiming Xiong, and Richard Socher. 2018. The natural language de- cathlon: Multitask learning as question answering. arXiv preprint arXiv:1806.08730. Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. 2017. Automatic Differentiation in pytorch. In NIPS-W. Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global Vectors for Word In Proceedings of the Conference Representation. on Empirical Methods in Natural Language Process- ing (EMNLP), pages 1532 -- 1543. Julien Perez and Fei Liu. 2017. Dialog state tracking, a machine reading approach using memory network. In Proceedings of the 15th Conference of the Euro- pean Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pages 305 -- 314. Matthew Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word rep- In Proceedings of the Conference of resentations. the North American Chapter of the Association for Computational Linguistics: Human Language Tech- nologies (NAACL-HLT), pages 2227 -- 2237. Adam Santoro, Ryan Faulkner, David Raposo, Jack Rae, Mike Chrzanowski, Theophane Weber, Daan Wierstra, Oriol Vinyals, Razvan Pascanu, and Tim- othy Lillicrap. 2018. Relational Recurrent Neural Networks. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), pages 7299 -- 7310. M. Schuster and K. K. Paliwal. 1997. Bidirectional re- current neural networks. IEEE Transactions on Sig- nal Processing, 45(11):2673 -- 2681. Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. 2017a. Bidirectional Atten- tion Flow for Machine Comprehension. In Proceed- ings of the International Conference on Learning Representations (ICLR). Minjoon Seo, Sewon Min, Ali Farhadi, and Hannaneh Hajishirzi. 2017b. Query-Reduction Networks for In Proceedings of the Inter- Question Answering. national Conference on Learning Representations (ICLR). R. K. Srivastava, K. Greff, and J. Schmidhuber. 2015. Highway networks. In Proceedings of the Interna- tional Conference on Machine Learning (ICML). Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. 2015. End-To-End Memory Networks. In Proceed- ings of the Advances in Neural Information Process- ing Systems (NeurIPS), pages 2440 -- 2448. Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. 2016. Rethink- ing the Inception Architecture for Computer Vision. In Proceedings of the IEEE Conference on Com- puter Vision and Pattern Recognition (CVPR), pages 2818 -- 2826. Juan Pavez, Hector Allende, and Hector Allende-Cid. 2018. Working memory networks: Augmenting memory networks with a relational reasoning mod- In Proceedings of the Annual Meeting of the ule. Association for Computational Linguistics (ACL), pages 1000 -- 1009. Niket Tandon, Bhavana Dalvi, Joel Grus, Wen-tau Yih, Antoine Bosselut, and Peter Clark. 2018. Reasoning about actions and state changes by injecting com- In Proceedings of the Con- monsense knowledge. ference on Empirical Methods in Natural Language Processing (EMNLP). Makarand Tapaswi, Yukun Zhu, Rainer Stiefelhagen, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. 2016. MovieQA: Understanding Stories in Movies In Proceedings of Through Question-Answering. the IEEE Conference on Computer Vision and Pat- tern Recognition (CVPR), pages 4631 -- 4640. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), pages 5998 -- 6008. Hai Wang, Takeshi Onishi, Kevin Gimpel, and David McAllester. 2017. Emergent predication structure in hidden state vectors of neural readers. In Proceed- ings of the 2nd Workshop on Representation Learn- ing for NLP, pages 26 -- 36, Vancouver, Canada. As- sociation for Computational Linguistics. Jason Weston, Antoine Bordes, Sumit Chopra, Alexan- der M Rush, Bart van Merrienboer, Armand Joulin, and Tomas Mikolov. 2016. Towards AI-Complete Question Answering: A Set of Prerequisite Toy Tasks. In Proceedings of the International Confer- ence on Learning Representations (ICLR). Jason Weston, Sumit Chopra, and Antoine Bordes. In Proceedings of the 2015. Memory Networks. International Conference on Learning Representa- tions (ICLR). Semih Yagcioglu, Aykut Erdem, Erkut Erdem, and Na- zli Ikizler-Cinbis. 2018. RecipeQA: A Challenge Dataset for Multimodal Comprehension of Cook- In Proceedings of the Conference on ing Recipes. Empirical Methods in Natural Language Processing (EMNLP). Yummly. 2015. Kaggle Whats Cooking? https: //www.kaggle.com/c/whats-cooking/data. [Accessed: 2018-05-31].
1906.03293
1
1906
2019-06-07T18:45:51
Assessing incrementality in sequence-to-sequence models
[ "cs.CL", "cs.LG" ]
Since their inception, encoder-decoder models have successfully been applied to a wide array of problems in computational linguistics. The most recent successes are predominantly due to the use of different variations of attention mechanisms, but their cognitive plausibility is questionable. In particular, because past representations can be revisited at any point in time, attention-centric methods seem to lack an incentive to build up incrementally more informative representations of incoming sentences. This way of processing stands in stark contrast with the way in which humans are believed to process language: continuously and rapidly integrating new information as it is encountered. In this work, we propose three novel metrics to assess the behavior of RNNs with and without an attention mechanism and identify key differences in the way the different model types process sentences.
cs.CL
cs
Assessing incrementality in sequence-to-sequence models Dennis Ulmer University of Amsterdam Dieuwke Hupkes ILLC, University of Amsterdam Elia Bruni Universitat Pompeu Fabra [email protected] [email protected] [email protected] 9 1 0 2 n u J 7 ] L C . s c [ 1 v 3 9 2 3 0 . 6 0 9 1 : v i X r a Abstract Since their inception, encoder-decoder models have successfully been applied to a wide array of problems in computational linguistics. The most recent successes are predominantly due to the use of different variations of attention mechanisms, but their cognitive plausibility is questionable. In particular, because past repre- sentations can be revisited at any point in time, attention-centric methods seem to lack an in- centive to build up incrementally more infor- mative representations of incoming sentences. This way of processing stands in stark contrast with the way in which humans are believed to process language: continuously and rapidly in- tegrating new information as it is encountered. In this work, we propose three novel metrics to assess the behavior of RNNs with and without an attention mechanism and identify key dif- ferences in the way the different model types process sentences. Introduction 1 Incrementality -- that is, building up representa- tions "as rapidly as possible as the input is encoun- tered" (Christiansen and Chater, 2016) -- is con- sidered one of the key ingredients for humans to process language efficiently and effectively. Christiansen and Chater (2016) conjecture how this trait is realized in human cognition by iden- tifying several components which either make up or are implications of their hypothesized Now- or-Never bottleneck, a set of fundamental con- straints on human language processing, which in- clude a limited amount of available memory and time pressure. First of all, one of the implications of the now-or-never bottleneck is anticipation, im- plemented by a mechanism called predictive pro- cessing. As humans have to process sequences of inputs fast, they already try to anticipate the next element before it is being uttered. This is hypoth- esized to be the reason why people struggle with so-called garden path sentences like "The horse race past the barn fell", where the last word en- countered, "fell", goes against the representation of the sentence built up until this point. Secondly, another strategy being employed by humans in processing language seems to be eager process- ing: the cognitive system encodes new input into "rich" representations as fast as possible. These are build up in chunks and then processed into more and more abstract representations, an oper- ation Christiansen and Chater (2016) call Chunk- and-pass processing. In this paper, we aim to gain a better insight into the inner workings of recurrent models with respect to incrementality while taking inspiration from and drawing parallels to this psycholinguis- tic perspective. To ensure a successful processing of language, the human brain seems to be forced to employ an encoding scheme that seems highly reminiscent of the encoder in today's encoder- decoder architectures. Here, we look at differ- ences between a recurrent-based encoder-decoder model with and without attention. We analyze the two model variants when tasked with a navigation instruction dataset designed to assess the compo- sitional abilities of sequence-to-sequence models (Lake and Baroni, 2018). The key contributions of this work can be sum- marized as follows: • We introduce three new metrics for incre- mentality that help to understand the way that recurrent-based encoder-decoder models en- code information; • We conduct an in-depth analysis of how in- crementally recurrent-based encoder-decoder models with and without attention encode se- quential information; • We confirm existing intuitions about attention-based recurrent models but also highlight some new aspects that explain their superiority over most attention-less recurrent models. 2 Related Work Sequence-to-Sequence models that rely partly or fully on attention have gained much popularity in recent years (Bahdanau et al. (2015), Vaswani et al. (2017)). Although this concept can be re- lated to the prioritisation of information in the hu- man visual cortex (Hassabis et al., 2017), it seems contrary to the incremental processing of informa- tion in a language context, as for instance recently shown empirically for the understanding of con- junctive generic sentences (Tessler et al., 2019). In machine learning, the idea of incremental- ity has already played a role in several problem statements, such as inferring the tree structure of a sentence (Jacob et al., 2018), parsing (Kohn and Menzel, 2014), or in other problems that are nat- urally equipped with time constraints like real- time neural machine translation (Neubig et al., 2017; Dalvi et al., 2018a), and speech recogni- tion (Baumann et al., 2009; Jaitly et al., 2016; Graves, 2012). Other approaches try to encourage incremental behavior implictly by modifying the model architecture or the training objective: Guan et al. (2018) introduce an encoder with an incre- mental self-attention scheme for story generation. Wang (2019) try to encourage a more incremental attention behaviour through masking for text-to- speech, while Hupkes et al. (2019) guide attention by penalizing deviation from a target pattern. The significance of the encoding process in sequence-to-sequence models has also been stud- ied extensively by Conneau et al. (2018). Pro- posals exploring how to improve the resulting approaches include adding additional loss terms (Serdyuk et al., 2018) or a second decoder (Jiang and Bansal, 2018; Korrel et al., 2019). 3 Metrics In this section, we present three novel met- rics called Diagnostic Classifier Accuracy (Sec- tion 3.1), Integration Ratio (Section 3.2) and Rep- resentational Similarity (Section 3.3) to assess the ability of models to process information incremen- tally. These metrics are later evaluated themselves in Section 5.2 and differ from traditional ones used to assess the incrementality of models, e.g. as the ones summarized by Kohn and Menzel (2014), as they focus on the role of the encoder in sequence- to-sequence models. It further should be noted that the "optimal" score of these measures with re- spect to downstream applications cannot defined explicity; they rather serve as a mean to uncover insights about the ways that attention changes a model's behavior, which might aid the develop- ment of new architectures. 3.1 Diagnostic Classifier Accuracy Several works have utilized linear classifiers to predict the existence of certain features in the hid- den activations1 of deep neural networks (Hupkes et al., 2018; Dalvi et al., 2018b; Conneau et al., 2018). Here we follow the nomenclature of Hup- kes et al. (2018) and call these models Diagnostic Classifiers (DCs). in(cid:80)T We hypothesize that the hidden activations of an incremental model contain more information about previous tokens inside the sequence. This is based on the assumption that attention-based models have no incentive to encode inputs re- currently, as previous representations can always be revisited. To test this assumption, we train a DC on every time step t > 1 in a sequence t ∈ [1, . . . T ] to predict the k most frequently oc- curing input tokens for all time steps t(cid:48) < t (see Figure 1). For a sentence of length T , this results t(cid:48)=t−1 k trained DCs. To then gener- ate the corresponding training set for one of these classifiers, all activations from the network on a test set are extracted and the corresponding tokens recorded. Next, all activations from time step t are used as the training samples and all tokens to generate binary labels based on whether the target token xk occured on target time step t(cid:48). As these data sets are highly unbalanced, class weights are also computed and used during training. (cid:80)t t=2 Applying this metric to a model, the accuracies of all classifiers after training are averaged on a given test set, which we call Diagnostic Classi- fier Accuracy (DC Accuracy). We can test this way how much information about specific inputs is lost and whether that even matters for success- ful model performance, should it employ an en- coding procedure of increasing abstraction like in Chunk-and-pass processing. On the other hand, one might assume that a more powerful model 1In this work, the terms hidden representation and hidden activations are used synonymously. In a more realistic setting, we can exploit this thought experiment to quantify the amount of new information that is integrated into the current hid- den representation by subtracting this hypothetical value from the actual value at timestep t: ∆xt = ht − fθ(xt,(cid:126)0)2, (1) where . . .2 denotes the l2-norm. Conversely, we can quantify the amount of information that was lost from previous hidden states with: ∆ht = ht − fθ((cid:126)0, ht−1)2. (2) In the case of the extreme attention-based model, we would expect ∆xt = 0, as no information from ht−1 has been used in the transformation of xt by fθ. Likewise, the "ignorant" model would produce a value of ∆ht = 0, as any new hidden represen- tation completely originates from a transformation of the previous one. Using these two quanitities, we can formulate a metric expressing the average ratio between them throughout a sequence which we call Integration Ratio: φint = 1 T − 1 ∆xt ∆ht (3) This metric provides an intuitive insight into the (average) model behavior during the encoding process: For φint < 1 it holds that ∆xt < ∆ht, signifying that the model prefers to integrate new information into the hidden state. Vice versa, φint > 1 and therefore ∆xt > ∆ht implies a pref- erence to maintain a representation of preceding inputs, possibly at the cost of encoding the current token xt in an incomplete manner. To account for the fact that integrating new in- formation is more important at the beginning of a sequence -- as no inputs have been processed yet -- and maintaining a representation of the sen- tence is more plausile towards the end of a sen- tence, we introduce two linear weighing terms with α∆xt = T−t T for ∆xt and ∆ht, respectively, which simplify to a single term αt: and α∆ht = t T T(cid:88) t=2 T(cid:88) T − t ∆xt ∆ht , (4) ∆xt ∆ht = 1 Z t t=2 φint = T(cid:88) such that Z =(cid:80)T 1 Z αt t=2 where Z corresponds to a new normalizing factor . It should be noted that T−t t t=2 Figure 1: For the Diagnostic Classifier Accuracy, DCs are trained on the hidden activations to predict previ- ously occuring tokens. The accuracies are averaged and potentially weighed by the distance between the hidden activations used for training the occurrence of the token to predict. Figure 2: Illustration of a thought experiment about (Left) The two types of extreme recurrent models. model completely ignores the current token and bases its new hidden state entirely on the previous one. (Right) The model forgets the whole history and just encodes the current input. might require to retain information about an input even if the same occured several time steps ago. To account for this fact, we introduce a modified version of this metric called Weighed Diagnos- tic Classifier Accuracy (Weighed DC Accuracy), where we weigh the accuracy of a classifier based on the distance t − t(cid:48). Integration Ratio 3.2 Imagine an extreme attention-based model that does not encode information recurrently but whose hidden state ht is solely based on the current token xt (see right half of Figure 2). If we formalize an LSTM as a recurrent function fθ : Rn, Rm (cid:55)→ Rm parameterized by weights θ that maps two con- tinuous vector representations, in our case the n- dimensional representation of the current token xt ∈ Rn and the m-dimensional previous hidden state representation ht−1 ∈ Rm to a new hidden state ht ∈ Rm, we can formalize the mentioned scenario as a recurrent function that completely ig- nores the pevious hidden state, which we can de- note using a zero-vector (cid:126)0 ∈ Rm: ht = fθ(xt,(cid:126)0). the ideal score for this metric is unknown. The motivation for this score merely lies in gaining in- side into a model's behaviour, showing us whether it engages in a similar kind of eager processing while having to handle memory constraints (in this case realized in the constant dimensionality of hid- den representations) like in human cognition. 3.3 Representational Similarity The sentences "I saw a cat" and "I saw a feline" only differ in terms of word choice, but essen- tially encode the same information. An incremen- tal model, based on the Chunk-and-Pass process- ing described by Christiansen and Chater (2016), should arrive at the same or at least a similar, ab- stract encoding of these phrases.2 While the exact wording might be lost in the process, the infor- mation encoded should still describe an encounter with a feline creature. We therefore hypothesize that an incremental model should map the hid- den activations of similar sequences of tokens into similar regions of the hidden activation space. To test this assumption, we compare the representa- tions produced by a model after encoding the same sequence of tokens - or history - using their aver- age pairwise distance based on a distance measure like the l2 norm or cosine similarity. We call the length of the history the order of the Representa- tional Similarity. To avoid models to score high on this model metric by substituting most or all of a hidden rep- resentation with an encoding of the current token,3 we only gather the hidden states for comparison after encoding another, arbitrary token (see Fig- ure 3). We can therefore interpret the score as the ability to "remember" the same sequence of tokens in the past through the encoding. The procedure is repeated for the n most com- mon histories of a specified order occuring in the test corpus over all time steps and, to obtain the final score, results are averaged. 4 Setup We test our metric on two different architectures, trained on the SCAN dataset proposed by Lake and Baroni (2018). We explain both below. 2In fact, given that humans built up sentence representa- tions in a compositional manner, the same should hold for sentence pairs like "I saw a cat" and "A feline was observed by me", which is beyond the limits of the metric proposed here. 3∆xt = 0 in the framework introduced in the previous Section 3.2. Figure 3: Representational Similarity measures the av- erage pair-wise distance of hidden representations after encoding the same subsquence of tokens (in this case the history is only of first order, i.e. x2) as well as one arbitrary token x3. It (2018): 4.1 Data We use the SCAN data set proposed by Lake and Baroni is a simplified ver- sion of the CommAI Navigation task, where the objective is to translate an order in natu- ral language into a sequence of machine-readable commands, e.g. "jump thrice and look" into I_JUMP I_JUMP I_JUMP I_LOOK. We fo- cus on the add_prim_jump_split (Loula et al., 2018), where the model has to learn to generalize from seeing a command like jump only in primitive forms (i.e. by itself) to see- ing it in composite forms during test time (e.g. jump twice), where the remainder of the com- posite forms has been encountered in the context of other primitive commands during training. The SCAN dataset has been proposed to assess the compositional abilities of a model, which we believe to be deeply related with the concept of incrementality, which is the target of our research. 4.2 Models two seasoned architectures used in We test sequence processing, namely a Long-Short Term Memory (LSTM) network (Hochreiter and Schmidhuber, 1997) and an LSTM network with attention (Bahdanau et al., 2015). The attention mechanism creates a time-dependent context vector ci for every decoder time step i that is used together with the previous decoder hidden state. This vector is a weighted average of the output of the encoder, where the weights are calculated based on some sort of similarity measure. More specifically, we first calculate the energy eit between the last decoder hidden state si−1 and any encoder hidden state ht using some function a(·) eit = a(si−1, ht) (5) We then normalize the energies using the softmax function and use the normalised attention weights αit to create the context vector ct: T(cid:88) ci = αitht (6) t=1 In this work, we use a simple attention function, namely a dot product adot: adot(si−1, ht) = sT i−1ht, (7) matching the setup originally introduced by Bah- danau et al. (2015). 4.3 Training For both architectures, we train 15 single-layer uni-directional models, with an embedding and hidden layer size of 128. We use the same hyper- parameters for both architectures, to ensure com- patibility. More specifically, both models were trained for 50 epochs using the Adam optimizer (Kingma and Ba, 2015) with the AMSgrad cor- rection (Reddi et al., 2018) and a learning rate of 0.001 and a batch size of 128. 5 Results We compute metric values for all 30 models (15 per architecture) that resulted from the training procedure described above.4 We plot the metric values, averaged over all runs for both models, in Figure 4. For the representational similarity score, we use all instances of the n = 5 most frequently occuring histories of length 2 at all available time steps. The unweighted DC accuracies are not de- picted, as they do not differ substantially from their weighted counter part, for which we also try to detect the k = 5 most frequently occuring in- puts at every time step. 5.1 Metric scores As expected, the standard attention model signif- icantly outperforms the vanilla model in terms of 4The code used in this work is available online un- https://github.com/i-machine-think/ der incremental_encoding. Figure 4: Results on SCAN add prim left with n = 15. Abbreviations stand for sequence accuracy, weighed diagnostic classifier accuracy, integration ratio and representational similarity, respectively. All differ- ences are statistically significant (using a Student's t- test with p = 0.05). sequence accuracy. Surprisingly, both models per- form very similarly in terms of weighed DC accu- racy. While one possible conclusion is that both models display a similar ability to store informa- tion about past tokens, we instead hypothesize that this can be explained by the fact that all sequences in our test set are fairly short (6.8 tokens on aver- age). Therefore, it is easy for both models to store information about tokens over the entire length of the input even under the constrained capacity of the hidden representations. Bigger differences might be observed on corpora that contain longer sequences. From the integration ratio scores (last column in Figure 4), it seems that, while both models pre- fer to maintain a history of previous tokens, the attention-based model contains a certain bias to add new information about the current input to- ken. This supports our suspicion that this model is less incentivized to build up expressive repre- sentations over entire sequences, as the encoder representation can always be revisited later via the attention mechanism. Counterintuitively and perhaps surprisingly, it appears that the attention model produces representations that are more sim- ilar than the vanilla model, judging from the rep- resentational similarity score. To decode success- fully, the vanilla model has to include information about the entire input sequence in the last encoder hidden state, making the encodings of similar sub- sequences more distinct because of their different prefixes.5 In contrast, the representations of the at- 5Remember that to obtain these scores, identical subse- quences of only length 2 were considered. vious tokens and the weighed DC accuracy suf- fers. Therefore, as the attention model performs better in terms of sequence accuracy, a negative correlation score is observed. The same trend can be observed for the sequence accuracy - integra- tion ratio pair, where the better performance of the attention model creates a significant negative cor- relation. The last noteworthy observation can be found looking at the high positive correlation between the weighed DC accuracy and representational similarity, which follows from the line of thought in Section 5.1: As the vanilla model has to squeeze information about the whole history into the hid- den representation at every time step, encodings for a shorter subsequence become more distinct, while the attention model only encodes the few most recent inputs and are therefore able to pro- duce more homogenous representations. 5.3 Qualitative Analysis We scrutinize the models' behavior when process- ing the same sequence by recording the integration ratio per time step and contrasting them in plots, which are shown in Figure 6. Figure 6a and 6b are thereby indicative of a trend which further reinforces our hypothesis about the behavior of attention-based models: As the orange curve lies below the vanilla model's blue curve in the major- ity of cases, we can even infer on a case by case ba- sis that these models tend to integrate more infor- mation at every time step than a vanilla LSTM. In- terestingly, these distinct behaviors when process- ing information do not always lead to the models finding different solutions. In Figure 6 however, we present three error cases in which the models' results do diverge. In Figure 6a, we can see that the vanilla model decodes a second and redundant TURN-LEFT in the beginning of the sequence. Although this hap- pens right at the start, the corresponding part in the input sequence is actually encountered right at the end of the encoding process in the form of "turn left", where "after" in front of it constitutes an inversion of the sequence of operations. There- fore, when the vanilla model starts decoding based on the last encoder hidden state, "left" is actually the most recently encoded token. We might as- sume that, due to this reason, the vanilla model might contain some sort of recency bias, which seems to corrupt some count information and leads Figure 5: Correlations between metrics as heatmap of Pearson's rho values. 1 indicates a strong positive cor- relation, −1 a negative one. Abbreviations correspond to the same metrics as in Figure 4. Best viewed in color. tention model is able to only contain information about the most recent tokens, exclusively encoding the current input at a given time step in the extreme case, as the attention mechanism can select the re- quired representations on demand. These results will be revisited in more detail in section 5.3. 5.2 Metrics Comparison To further understand the salience of our new met- rics, we use Pearson's correlation coefficient to show their correlation with each other and with se- quence accuracy. A heat map showing Pearson's ρ values between all metric pairs is given in Fig- ure 5. We can observe that representational similar- ity and weighed DC accuracy display a substan- tial negative correlation with sequence accuracy. In the first case, this implies that the more simi- lar representations of the same subsequences pro- duced by the model's encoder are, the better the model itself performs later.6 Surprisingly, we can infer from the latter case that storing more infor- mation about the previous inputs does not lead to better performance. At this point we should dis- entangle correlation from causation, as it is to be assumed that our hypothesis about the attention mechanism applies here as well: The attention is always able to revisit the encodings later during the decoding process, thus a hidden representation does not need to contain information about all pre- 6The representational similarity score actually expresses a degree of dissimilarity, i.e. a lower score results from more similar representations, therefore we identify a negative cor- relation here. to a duplicate in the output sequence. The atten- tion model seems to be able to avoid this issue by erasing a lot of its prior encoded information when processing "after", as signified by the drop in the graph. Afterwards, only very little informa- tion seems to be integrated by the model. The vanilla model commits a slightly different error in Figure 6b: After both models decode three TURN-LEFT correctly, it choses to decode "oppo- site" as TURN-LEFT TURN-RIGHT in contrast to the corect TURN-RIGHT TURN-RIGHT supplied by the attention model. It is to be assumed here that the last half of the input, "turn left thrice" had the vanilla model overwrite some critical informa- tion about the initial command. Again, the atten- tion model is able to evade this problem by eras- ing a lot of its representation when encoding "af- ter" and can achieve a correct decoding this critical part by attending to the representation produced at "right" later. "turn left thrice" can followingly be encoded without having to loose any past informa- tion. Lastly, we want to shed some light on one of the rare failure cases of the attention model, as given in Figure 6c. Both models display very sim- ilar behavior when encoding this trivial sequence, yet only the vanilla model is able to decode it cor- rectly. A possible reason for this could be found in the model's energy function: When deciding which encoded input to attend to for the next de- coding step, the model scores potential candidates based on the last decoder hidden state (see eq. 7), which was decoded as TURN-LEFT. Therefore the most similar inputs token might appear to be TURN-LEFT as well. Notwithstanding this expla- nation, it falls short of giving a conclusive reason why the model does not err in similar ways in other examples. Looking at all three examples, it should further- more be noted that the encoder of the attention model seems to anticipate the mechanism's behav- ior and learns to erase much of its representation after encoding one contiguous chunk of informa- tion, as exemplified by the low integration ratio after finishing the first block of commands in an input sequence. This freedom seems to enable the encoder to come up with more homogenous rep- resentations, i.e. that no information has to be overwritten and possibly being corrupted to pro- cess later, less related inputs, which also explains the lower representational similarity score in 5.1. (a) The vanilla model adds a redundant TURN-LEFT in the beginning. (b) The vanilla model confuses left and right when decoding opposite. (c) The attention model fails on a trivial sequence. Figure 6: Qualitative analysis about the models' en- coding behavior. Bounds show the standard deviation of integration ratio scores per time step. Decoded sen- tences are produced by having each model decode the sequence individually and then consolidating the solu- tion via a majority vote. Resulting sequences have been slightly simplified for readability. Best viewed in color. 6 Conclusion In this work, we introduced three novel metrics that try to shine a light on the incremental abilities of the encoder in a sequence-to-sequence model and tested them on a LSTM-RNN with and with- out an attention mechanism. We showed how these metrics relate to each other and how they can be employed to better understand the encod- ing behavior of models and how these difference lead to performance improvements in the case of the attention-based model. We confirm the general intuition that using an attention mechanism, due to its ability to oper- ate on the whole encoded input sequence, prefers to integrate new information about the current to- ken and is less pressured to maintain a represen- tation for the whole input sequence, which seems to lead to some corruptions of the encoded infor- mation in case of the vanilla model. Moreover, our qualitative analysis suggests that the encoder of the attention model learns to chunk parts of the input sequence into salient blocks, a behavior that is reminiscent of the Chunk-and-Pass processing described by Christiansen and Chater (2016) and one component that is hypothesized to enable in- cremental processing in humans. In this way, the attention model most surprisingly seems to dis- play a more incremental way of processing than the vanilla model. These results open up several lines of future re- search: Although we tried to assess incremental- ity in sequence-to-sequence models in a quantita- tive manner, the notion of incremental processing lacks a formal definition within this framework. Thus, such definition could help to confirm our findings and aid in developing more incremental architectures. It furthermore appears consequen- tial to extend this methodology to deeper models and other RNN-variants as well as other data sets in order to confirm this work's findings. Although we were possibly able to identify one of the components that build the foundation of human language processing (as defined by Chris- tiansen and Chater, 2016) in attention models, more work needs to be done to understand how these dynamics play out in models that solely rely on attention like the Transformer (Vaswani et al., 2017) and how the remaining components could be realized in future models. Based on these reflections, future work should attack this problem from a solid foundation: A formalization of incrementality in the context of sequence-to-sequence modelling could help to de- velop more expressive metrics. These metrics in turn could then be used to assess possible incre- mental models in a more unbiased way. Further thought should also be given to a fairer compari- son of candidate models to existing baselines: The attention mechanism by Bahdanau et al. (2015) and models like the Transformer operate without the temporal and memory pressure that is claimed to fundamentally shape human cognition Chris- tiansen and Chater (2016). Controlling for this factor, it can be better judged whether incremental processing has a positive impact on the model's performance. We hope that these steps will lead to encoders that create richer representations that can followingly be used back in regular sequence- to-sequence modelling tasks. Acknowledgements DH is funded by the Netherlands Organization for Scientific Research (NWO), through a Gravi- tation Grant 024.001.006 to the Language in In- teraction Consortium. EB is funded by the Euro- pean Union's Horizon 2020 research and innova- tion program under the Marie Sklodowska-Curie grant agreement No 790369 (MAGIC). References Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- gio. 2015. Neural machine translation by jointly In 3rd Inter- learning to align and translate. national Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings. Timo Baumann, Michaela Atterer, and David Schlangen. 2009. Assessing and improving the performance of speech recognition for incremental In Proceedings of Human Language systems. Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 380 -- 388. Association for Computational Linguistics. Morten H Christiansen and Nick Chater. 2016. The now-or-never bottleneck: A fundamental constraint on language. Behavioral and Brain Sciences, 39. Alexis Conneau, Germ´an Kruszewski, Guillaume Lample, Loıc Barrault, and Marco Baroni. 2018. What you can cram into a single \$&!#* vector: Probing sentence embeddings for linguistic proper- ties. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Vol- ume 1: Long Papers, pages 2126 -- 2136. Fahim Dalvi, Nadir Durrani, Hassan Sajjad, and Stephan Vogel. 2018a. Incremental decoding and training methods for simultaneous translation in In Proceedings of the neural machine translation. 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Hu- man Language Technologies, NAACL-HLT, New Or- leans, Louisiana, USA, June 1-6, 2018, Volume 2 (Short Papers), pages 493 -- 499. Fahim Dalvi, Nadir Durrani, Hassan Sajjad, and Stephan Vogel. 2018b. Incremental decoding and training methods for simultaneous translation in In Proceedings of the neural machine translation. 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Hu- man Language Technologies, NAACL-HLT, New Or- leans, Louisiana, USA, June 1-6, 2018, Volume 2 (Short Papers), pages 493 -- 499. Alex Graves. 2012. Sequence transduction with recur- rent neural networks. CoRR, abs/1211.3711. Jian Guan, Yansen Wang, and Minlie Huang. 2018. Story ending generation with incremental en- CoRR, coding and commonsense knowledge. abs/1808.10113. Demis Hassabis, Dharshan Kumaran, Christopher Summerfield, and Matthew Botvinick. 2017. Neuroscience-inspired artificial intelligence. Neu- ron, 95(2):245 -- 258. Sepp Hochreiter and Jurgen Schmidhuber. 1997. Neural computation, Long short-term memory. 9(8):1735 -- 1780. Dieuwke Hupkes, Anand Singh, Kris Korrel, Germ´an Kruszewski, and Elia Bruni. 2019. Learning com- In CI- positionally through attentive guidance. CLing: International Conference on Computational Linguistics and Intelligent Text Processing. Dieuwke Hupkes, Sara Veldhoen, and Willem Zuidema. 2018. Visualisation and'diagnostic classi- fiers' reveal how recurrent and recursive neural net- works process hierarchical structure. Journal of Ar- tificial Intelligence Research, 61:907 -- 926. Athul Paul Jacob, Zhouhan Lin, Alessandro Sordoni, and Yoshua Bengio. 2018. Learning hierarchi- cal structures on-the-fly with a recurrent-recursive model for sequences. In Proceedings of The Third Workshop on Representation Learning for NLP, pages 154 -- 158. Navdeep Jaitly, Quoc V Le, Oriol Vinyals, Ilya Sutskever, David Sussillo, and Samy Bengio. 2016. An online sequence-to-sequence model using partial In Advances in Neural Information conditioning. Processing Systems, pages 5067 -- 5075. Yichen Jiang and Mohit Bansal. 2018. Closed-book training to improve summarization encoder mem- ory. In Proceedings of the 2018 Conference on Em- pirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 4067 -- 4077. Diederik P. Kingma and Jimmy Ba. 2015. Adam: A In 3rd Inter- method for stochastic optimization. national Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings. Arne Kohn and Wolfgang Menzel. 2014. Incremen- tal predictive parsing with turboparser. In Proceed- ings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Pa- pers), volume 2, pages 803 -- 808. Kris Korrel, Dieuwke Hupkes, Verna Dankers, and Elia Bruni. 2019. Transcoding compositionally: us- ing attention to find more generalizable solutions. BlackboxNLP 2019, ACL. Brenden Lake and Marco Baroni. 2018. Generalization without systematicity: On the compositional skills of sequence-to-sequence recurrent networks. In In- ternational Conference on Machine Learning, pages 2879 -- 2888. Joao Loula, Marco Baroni, and Brenden M Lake. 2018. Rearranging the familiar: Testing composi- tional generalization in recurrent networks. arXiv preprint arXiv:1807.07545. Graham Neubig, Kyunghyun Cho, Jiatao Gu, and Vic- tor O. K. Li. 2017. Learning to translate in real- In Proceed- time with neural machine translation. ings of the 15th Conference of the European Chap- ter of the Association for Computational Linguistics, EACL 2017, Valencia, Spain, April 3-7, 2017, Vol- ume 1: Long Papers, pages 1053 -- 1062. Sashank J Reddi, Satyen Kale, and Sanjiv Kumar. 2018. On the convergence of adam and beyond. Dmitriy Serdyuk, Nan Rosemary Ke, Alessandro Sor- doni, Adam Trischler, Chris Pal, and Yoshua Ben- gio. 2018. Twin networks: Matching the future for In 6th International Confer- sequence generation. ence on Learning Representations, ICLR 2018, Van- couver, BC, Canada, April 30 - May 3, 2018, Con- ference Track Proceedings. Michael Henry Tessler, Karen Gu, and Roger Philip Levy. 2019. Incremental understanding of conjunc- tive generic sentences. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Pro- cessing Systems, pages 5998 -- 6008. Gary Wang. 2019. Deep text-to-speech system with seq2seq model. CoRR, abs/1903.07398.
1912.01111
1
1912
2019-11-22T16:07:02
Use of Artificial Intelligence to Analyse Risk in Legal Documents for a Better Decision Support
[ "cs.CL", "cs.AI", "cs.IR", "cs.LG", "cs.NE" ]
Assessing risk for voluminous legal documents such as request for proposal; contracts is tedious and error prone. We have developed "risk-o-meter", a framework, based on machine learning and natural language processing to review and assess risks of any legal document. Our framework uses Paragraph Vector, an unsupervised model to generate vector representation of text. This enables the framework to learn contextual relations of legal terms and generate sensible context aware embedding. The framework then feeds the vector space into a supervised classification algorithm to predict whether a paragraph belongs to a per-defined risk category or not. The framework thus extracts risk prone paragraphs. This technique efficiently overcomes the limitations of keyword-based search. We have achieved an accuracy of 91% for the risk category having the largest training dataset. This framework will help organizations optimize effort to identify risk from large document base with minimal human intervention and thus will help to have risk mitigated sustainable growth. Its machine learning capability makes it scalable to uncover relevant information from any type of document apart from legal documents, provided the library is per-populated and rich.
cs.CL
cs
Use of Artificial Intelligence to Analyse Risk in Legal Documents for a Better Decision Support Dipankar Chakrabarti Senior Member, IEEE PricewaterhouseCoopers Pvt Ltd. Kolkata, India [email protected] Indranil Mitra PricewaterhouseCoopers Pvt Ltd. Kolkata, India [email protected] Nandini Roy PricewaterhouseCoopers Pvt Ltd. Kolkata, India [email protected] Neelam Patodia PricewaterhouseCoopers Pvt Ltd. Kolkata, India [email protected] Satyaki Roy PricewaterhouseCoopers Pvt Ltd. Kolkata, India [email protected] Prasun Nandy PricewaterhouseCoopers Pvt Ltd. Kolkata, India [email protected] Udayan Bhattacharya PricewaterhouseCoopers Pvt Ltd. Kolkata, India [email protected] Jayanta Mandi PricewaterhouseCoopers Pvt Ltd. Kolkata, India [email protected] Abstract -- Assessing risk for voluminous legal documents such as request for proposal, contracts is tedious and error prone. We have developed "risk-o-meter", a framework, based on machine learning and natural language processing to review and assess risks of any legal document. Our framework uses Paragraph Vector, an unsupervised model to generate vector representation of text. This enables the framework to learn contextual relations of legal terms and generate sensible context aware embedding. The framework then feeds the vector space into a supervised classification algorithm to predict whether a paragraph belongs to a pre-defined risk category or not. The framework thus extracts risk prone paragraphs. This technique efficiently overcomes the limitations of keyword based search. We have achieved an accuracy of 91% for the risk category having the largest training dataset. This framework will help organizations optimize effort to identify risk from large document base with minimal human intervention and thus will help to have risk mitigated sustainable growth. Its machine learning capability makes it scalable to uncover relevant information from any type of document apart from legal documents, provided the library is pre-populated and rich. Keywords -- Machine Learning, Natural Language Processing, Text Representation, Paragraph Vectors, Text Classification, Support Vector Machines, Naïve Bayes, Contextual Relation, Contract Analysis, Risk-o-Meter I. INTRODUCTION A contract between two parties defines the scope of work and commercial business terms for performing such activities. It is very important for any business organization to review the contract and analyze risks, such as liability, indemnity, risk purchase and other such commercial risks. Early identification of risks help either to mitigate the risks or to take a decision of entering ratio. Organizations traditionally rely upon manual reading by legal professionals to assess risks emanating out of the documents. The continued influx of legal paperwork demands more of the into contract understanding risk-reward lawyer's time and knowledge/experience for review. This time consuming, cost intensive and person dependent activity is riddled with inefficiencies. Even after investing 11.2 hours per week [1] in document creation and management, chances of error still persist because of unidentified or misinterpreted risk aspects, which could interfere with an organization's performance while increasing financial risk. Thus there is an increased demand for intelligently automating analysis of contracts and other legal documents and to provide correct interpretation with minimum intervention of human beings. This is far beyond a "contract management system" which files and indexes electronic contracts/legal documents. The focus of this paper is to propose a contract analysis system efficient at identifying and highlighting embedded risks in contracts or other legal documents. Traditional keyword driven approach for contract risk analysis does not capture the contextual understanding of different clauses which limits its performance in the following two ways: (1) identifying paragraphs which contain any of the library keywords as risk prone, thus raising false alarms, (2) understanding the risk significance of a keyword in context of another keyword. We have developed an effective and intelligent framework named "risk-o-meter" based on machine learning (ML) and natural language processing (NLP). Our framework dramatically changes the way contractual risks are assessed by identifying risk prone paragraphs and associating them to their predefined risk categories like liability, indemnity, confidentiality and other such commercial risks. It reduces manual effort and operational time; increases consistency of outcomes; enhances precision in risk identification and reduces chances of overlooking critical information through manual fatigue or inexperience of reviewer. It would thus help in creating a risk-aware environment for sustainable growth of organizations. Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)0683978-1-5386-5457-6/18/$31.00 ©2018 IEEE The paper is organized as follows: work done in the field of word embeddings is given in Section II. We then present the building blocks of our "risk-o-meter" in Section III, and particularly focus on the algorithms used for risk identification in Section IV. Following that we present an experimental comparison to assess most effective model for our task in Section V. We provide future possibilities in Section VI and conclusion in Section VII. II. RELATED WORK Vector space models have been used in distributional semantics for quite some time. The term word embeddings was coined by Bengio et al. [17]. Colbert and Weston et al. [16] showed the utility of word embeddings and their usefulness for downstream tasks such as parsing, tagging, named entity recognition etc. Socher et.al [18] focused on distributed representation of phrases and sentences by implementing parsing techniques. Their method was supervised and required labelled data. The unsupervised word vector model proposed by Mikolov et.al, 2013 [20] is an efficient method for learning high-quality distributed vector representations that capture a large number of precise syntactic and semantic word relationships. This model was extended beyond word-level to achieve paragraph-level representation. The framework proposed by Quoc Le and Tomas Mikolov, 2014 [2] for text representation applies () in learning vector representations from variable length pieces of text. III. BUILDING BLOCKS OF RISK-O-METER The objective of our framework "risk-o-meter" is to identify risk prone paragraphs from legal documents that belong to a predefined risk category. Risk categories are defined as liability, confidentiality, termination and others. The categories can be modified/updated/added as needed. The framework consists of four key blocks: (1) Training Data, (2) Text Representation, (3) Text Classification, (4) Continuous Learning (see Figure. 1). indemnity, A. Training Data The training dataset is created by tagging such paragraphs collated from contractual/legal documents to their respective risk categories. The categories are generated by human annotators. In case a paragraph belonged to more than one category, it is recorded separately for all these categories. In our training dataset, we consider all the risk prone paragraphs and their associated categories uniformly. The quality and quantity of the training data collated, has a significant impact on the performance of our framework. The specifics of this impact is described in detail in Section V. B. Text Representation Text representation is used to convert text into a machine readable format. In order to represent risk prone paragraphs, it is essential to understand and capture the context in which the legal terms are used i.e. their meaning. E.g. "The agency shall indemnify the department against all third-party claims of infringement of copyright, patent, trademark or industrial design rights arising from use of the Goods or any part thereof in India". In this example, indemnify used in the context of agency, department, third party and infringement essentially qualifies as risk. The commonly used bag-of-words (BoW) model [2] and its extension, term frequency-inverse document frequency model (TF-IDF) [15], though quite simple and efficient cannot be used in our case. It suffers from two main disadvantages: (1) it loses the ordering of the words, as a result sentences having the same words are represented in an identical manner, (2) it also ignores the semantics of the words, meaning it does not take into consideration the distance between words. In our framework, we use Paragraph vectors proposed in [2] for learning high quality, continuous distributed vector representations that capture a large number of precise syntactic and semantic relationship between words and the topic of the paragraph. This n-dimensional vector space is created for each paragraph in the training dataset. After the training converges, these feature vectors are used for calculating paragraph vectors for the unseen documents. The specifics of this model is described in detail in Section IV-A. C. Text Classification Vector representations from text representation module are then fed to the text classification module to predict whether a paragraph belongs to a particular risk category or not. While cosine similarity measures are helpful in predicting the categories; in this paper, we implement supervised learning techniques, namely: Support Vector Machines and Naïve Bayes, to further train the system to predict better. The probability values generated post classification for unseen documents depict the likelihood of the paragraph being associated with the concerned risk category. Both these models are effective in handling high dimensional vector spaces and have been detailed in Section IV-B. Fig.1. Process flow diagram for our AI enabled framework, "risk-o-meter" D. Continuous Learning Our framework has an integrated feedback loop which records review responses in the form of acceptance or rejection for all the identified paragraphs for a given risk category and appends them to the training data. Unidentified clauses can be manually added to the training data. This updated training data is later used to retrain the models. This way the machine learns continuously and performs better. IV. SPECIFICATIONS OF RISK IDENTIFICATION In this section we will detail the algorithm behind Paragraph Vectors and classification techniques: Support Vector Machines Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)0684 and Naïve Bayes, as well as define their corresponding performance metrics. A. Paragraph Vectors Paragraph vector, an unsupervised neural network model generates sensible context aware word embedding for input sentences of variable length [2]. It has only one hidden layer. It does not rely upon parse trees. It is an extension of the word vector model [20]. In the word vector model, only words are considered as input nodes. However, in Paragraph vector, each paragraph id also acts as an input node and is mapped to a unique vector. We have assigned a unique label or paragraph id for each paragraph as the meaning of the paragraphs vary even if they belong to the same category. The paragraph vector (D) along with word vector (W) is considered as a member of the context set. The context is sampled from a sliding window of fixed length over the paragraph. The context window considers words to the left and right of the target word. While the paragraph vector is shared only across the context from the same paragraph, the word vectors are universally shared across all paragraphs [2]. The concatenation or sum of the vectors (W and D) is then used to predict the next word in the context. task learning 1) Hyperparameter selection: Building this network for a given involves selecting optimal hyper- parameters. Hyper-parameter choice is also crucial for an improved performance (both accuracy and speed). These are as follows: a) Choosing between the two neural networks based models: Distributed memory (PV-DM) and Distributed bag of words (PV-DBOW). Given a window of words {(cid:1875)(cid:2869), (cid:1875)(cid:2870), (cid:1875)(cid:2871), (cid:1875)(cid:2872), (cid:1875)(cid:2873)}, the DM model predicts (cid:1875)(cid:2871) given the rest, while the DBOW model predicts (cid:1875)(cid:2869), (cid:1875)(cid:2870), (cid:1875)(cid:2872), (cid:1875)(cid:2873) given (cid:1875)(cid:2871). b) Choosing the algorithm for training the selected model: hierarchical softmax (HS) and negative sampling (NEG). c) Dimensionality of the feature vectors. d) Window size which determines the maximum distance between the current and predicted word within a paragraph. e) Minimum frequency so that all words lower than this threshold is ignored. f) Concatenation vs sum/average of context vectors. g) Sample threshold so that high frequency words are randomly down-sampled. 2) Training Procedure: The first task in building paragraph vectors is determining the efficacy of the base architecture against the training algorithms for the given dataset. We evaluated the performance of both the models: PV-DM and PV- DBOW as shown in Table 1. DM trained using negative sampling outperforms the other combinations DBOW-HS, DBOW-NEG and DM-HS at the task of identifying the risk prone paragraphs. We thus opted for the DM model using negative sampling to generate vector representations. Risk Method Category Termination DM-NEG DM-HS DBOW- HS DBOW- NEG Accuracy Precision Recall 74% 86% 96% 96% 84% 43% 59% 59% F1- score 79% 58% 73% 73% 87% 81% 87% 87% TABLE I. END-TO-END PERFORMANCE COMPARISON AMONGST TRAINING ARCHITECTURE AND ALGORITHM TO PREDICT THE RISK CATEGORY (TERMINATION-HAVING MAXIMUM EXAMPLES IN THE TRAINING DATA). INITIAL MODEL PARAMETERS: NEGATIVE SAMPLE (K) OF 5, SUBSAMPLING (T) OF 10-6, CONTEXT WINDOW=5, VECTOR SIZE=300, SUPPORT VECTOR MACHINES (SVM) LINEAR CLASSIFIER WITH C VALUE OF 1 average log probability, given by: V ( T ⊂ V) whose size is V. The objective of the PV-DM model is to maximize the 1(cid:1846)(cid:3533)log(cid:1868)((cid:1875)(cid:3047)(cid:1875)(cid:3047)(cid:2879)(cid:3041),…,(cid:1875)(cid:3047)(cid:2878)(cid:3041) (cid:3021)(cid:2879)(cid:3041) (cid:3047)(cid:2880)(cid:3041) ) (1) where, (cid:1875)(cid:3047) represents the target word and (cid:1875)(cid:3047)(cid:2879)(cid:3041) to (cid:1875)(cid:3047)(cid:2878)(cid:3041) represents the input context words ((cid:1875)(cid:3016)) with a window of n words at each time step t. T represents the sequence of words (cid:1875)(cid:2869), (cid:1875)(cid:2870),…, (cid:1875)(cid:3021) in the given training set that belong to a vocabulary (cid:1868)((cid:1875)(cid:3010)(cid:1875)(cid:3016))= (2) where, (cid:1874)(cid:3050) and (cid:1874)(cid:4593)(cid:3050) are the input and output vector representations of word w; (cid:1875)(cid:3010) represents the ith target word. between (cid:1874)(cid:3050) and the output embedding (cid:1874)(cid:4593)(cid:3050) of every word (cid:1875)(cid:3036) in (cid:1857)(cid:1876)(cid:1868)(cid:3435)(cid:1874)(cid:4593)(cid:3050)(cid:3258)(cid:3021)(cid:1874)(cid:3050)(cid:3264)(cid:3439) (cid:1857)(cid:1876)(cid:1868)(cid:3435)(cid:1874)(cid:4593)(cid:3050)(cid:3284)(cid:3021)(cid:1874)(cid:3050)(cid:3264)(cid:3439) (cid:3023)(cid:3050)(cid:3284)(cid:2880)(cid:2869) Computing the softmax is expensive as the inner product The softmax layer calculates this probability as: the vocabulary V needs to be computed as part of the sum in the denominator in order to obtain the normalized probability of the target word given its context. ∑ (K) of them and Negative sampling on the other hand, is similar to stochastic gradient descent: instead of changing all of the weights each time with taking into account all of the thousands of observations, we're using only sample increasing computational efficiency dramatically too [6]. The objective of negative sampling for one observation is as follows: (cid:1864)(cid:1867)(cid:1859)(cid:1868)((cid:1875)(cid:3010)(cid:1875)(cid:3016))=(cid:1864)(cid:1867)(cid:1859)(cid:2026)((cid:1874)(cid:4593)(cid:3050)(cid:3258)(cid:3021)(cid:1874)(cid:3050)(cid:3264)) +(cid:3533)(cid:1831)(cid:3050)(cid:3284)~(cid:3017)(cid:3289)((cid:3050)) [ (cid:1864)(cid:1867)(cid:1859) (cid:2026)(−(cid:1874)(cid:4593)(cid:3050)(cid:3284)(cid:3021)(cid:1874)(cid:3050)(cid:3264))] (3) (cid:3012) (cid:3036)(cid:2880)(cid:2869) The noise distribution (cid:1842)(cid:3041)(w) is defined as the Unigram (cid:1858)((cid:1875)(cid:3036))(cid:2871)(cid:2872) (cid:1842)((cid:1875)(cid:3036))= (4) ∑ (cid:3436)(cid:1858)((cid:1875)(cid:3036))(cid:2871)(cid:2872)(cid:3440) (cid:3041)(cid:3037)(cid:2880)(cid:2868) distribution raised to the power of ¾. Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)0685 TABLE IV. END-TO-END PERFORMANCE COMPARISON OF PREDICTING THE RISK CATEGORY (TERMINATION) FOR VARYING CONTEXT WINDOW SIZE. THE ADDITIONAL MODEL PARAMETERS: K=10, T=10-6, VECTOR SIZE=300, SVM LINEAR CLASSIFIER C-VALUE=1 Risk Category and Method Window Size Accuracy Precision Recall Termination with DM-NEG 5 8 10 88% 88% 90% 76% 77% 82% 86% 84% 84% F1- score 81% 80% 83% TABLE V. END-TO-END PERFORMANCE COMPARISON OF PREDICTING THE RISK CATEGORY (TERMINATION) FOR VARYING VECTOR SIZE. THE ADDITIONAL MODEL PARAMETERS: K=10, T=10-6, CONTEXT SIZE=10, SVM LINEAR CLASSIFIER C-VALUE=1 Vector Size Accuracy Precision Recall F1- score Risk Category and Method Termination with DM- NEG 100 200 300 92% 91% 90% 90% 89% 82% 82% 77% 84% 86% 83% 83% This neural network based vector model is trained using stochastic gradient descent where the gradient is obtained via backpropagation. TABLE VI. 5 MOST SIMILAR WORDS ASSOCIATED WITH THE TARGET WORD where, 3/4 is the empirical value suggested in [2]; f(w) is the frequency of the word in the corpus. TABLE II. END-TO-END PERFORMANCE COMPARISON OF PREDICTING THE RISK CATEGORY (TERMINATION) FOR VARYING VALUES OF K. THE ADDITIONAL MODEL PARAMETERS: SUBSAMPLING OF 10-6, CONTEXT WINDOW=5, VECTOR SIZE=300, SVM LINEAR CLASSIFIER WITH C VALUE OF 1 Accuracy Precision Recall Risk Category and Method Termination with DM-NEG No. of samples K 5 10 15 20 87% 88% 86% 85% 74% 76% 72% 70% 84% 86% 86% 86% F1- score 79% 81% 78% 78% Our experimental results (Table II) indicate that while Negative Sampling achieves a respectable accuracy even with K = 5, using K = 10 achieves considerably better performance with an accuracy of 88% and F1-score of 81%. TABLE III. END-TO-END PERFORMANCE COMPARISON OF PREDICTING THE RISK CATEGORY (TERMINATION) FOR VARYING SUBSAMPLING THRESHOLDS. THE ADDITIONAL MODEL PARAMETERS: CONTEXT WINDOW=5, VECTOR SIZE=300, SVM LINEAR CLASSIFIER WITH C VALUE OF 1 Risk Category and Method Termination with DM- NEG (k=10) Subsampling Threshold (T) 0 10-5 10-6 Accuracy Precision Recall F1- score 71% 89% 88% - 86% 76% 0% 73% - 79% 86% 81% Subsampling has also been used to counter the balance between rare and frequent words. Words like "is", "an", "the" and such similar stop words occur innumerable times in the dataset and do not provide valuable information as compared to the rare words. The vector representations of frequent words remain almost constant after training on several examples. E.g. Co-occurrences of "Limitation" and "Liability" hold much more significance than "The" and "Liability", as mostly all words in a paragraph co-occur with such words. Thus words whose frequency, (cid:1858)((cid:1875)(cid:3036)) is greater than the threshold, T, is (cid:1842)((cid:1875)(cid:3036))=1−(cid:3496) (cid:1846)(cid:1858)((cid:1875)(cid:3036)) (5) subsampled using the given equation: As depicted in Table III, subsampling significantly improves the performance of our framework and a threshold value of 10-6 is optimal for our case. It also improves the training speed by nearly 8 times (for our training dataset). The context window and vector size also play a significant role in the model's performance. Context window of 10 (Table IV) and vector size of 100 (Table V) are optimal for our case. We ignored all words from the corpus which had a frequency lesser than 5. In our paper, we have used concatenation to combine the two vectors as it keeps the ordering information intact. Target Word Lower Case Termination Indemnity Insurance notice contract order date than infringements damages alleged losses claims agrees secure contribution employee's place Without Case Conversions contract prejudice written notice whole Trademark alleged attorney's nature suits coverage taken commencing policies place Once the optimal hyper-parameters are selected, we also qualitatively evaluate these word embeddings by inspecting manually the five most similar words (by cosine similarity) [19] to a given set of target words. We compare the results across two cases: converting all words to lower cases and without making any case conversions. It is evident from Table VI that PV-DM model finds words that associate with the target word (domain aspect). It also depicts that paragraph vector model draws out almost similar logical associations for the both the cases. We also compared their end to end results and found that they were similar to Table V for vector size 100. We prefer to adopt the lower case model as it is more robust. 3) Inference: After the training converges, these feature vectors are used for calculating paragraph vectors for the unseen documents, where-in all weights are fixed. We retrain the model with words present in the unseen documents, but it does not impact the members in the context set. Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)0686 B. Classification techniques We opted for implementing both Support Vector Machines (SVM) and Naïve Bayes (NB) to classify the vector space based on their risk categories. As discussed earlier, these two techniques are chosen as they are efficient in handling high dimensions. We built individual classifiers for each of the predefined risk categories and compared their performance across both the classifier algorithms. The feature vectors are normalized before implementing classification algorithms to enable better projection. We built four types of classifier models: (1) SVM with Linear kernel, (2) SVM with Radial Basis Function (RBF) kernel, (3) Gaussian NB, (4) Bernoulli NB. Our results show that Support Vector Machines with linear kernel outperformed all other classifier models across all parameters (Table VII). The details of both the algorithms are as follows (for further details, refer [9, 13]): TABLE VII. COMPARING THE PERFORMANCE OF VARIOUS CLASSIFIERS TO PREDICT THE RISK CATEGORY (TERMINATION) WHOSE VECTOR SPACE IS BUILT USING DM-NEG WITH K=10, T=10-6, CONTEXT WINDOW=10 AND VECTOR SIZE=100 Classifier Method SVM-Linear SVM-Radial Basis Function NB-Gaussian NB-Bernoulli AUC Accuracy Precision Recall 0.96 0.96 0.75 0.94 92% 71% 75% 89% - 90% 65% 83% 82% 0% 34% 80% F1- score 86% - 45% 81% 1) Support Vector Machines: SVM are based on the concept of decision planes that define decision boundaries. In the case of n dimensional space of input variables, a hyperplane splits positive and negative sets of examples, with maximal margin. C-value, a regularization parameter affects the number of instances that fall within the margin and influences the number of support vectors used by the model [9]. A large value of C permits more violations of the hyper plane and results in lesser sensitivity and higher bias. We cross-validated our model at different C-values as depicted in Table VIII. Category Termination TABLE VIII. COMPARING THE PERFORMANCE OF SVM-LINEAR CLASSIFIER TO PREDICT THE RISK CATEGORIES BY ADJUSTING DIFFERENT C VALUES F1- score Precision Recall AUC Accuracy Risk C value 0.1 1 10 100 0.1 1 10 100 0.1 1 10 100 Indemnity 0.96 0.96 0.96 0.96 0.93 0.93 0.95 0.96 0.91 0.89 0.9 0.91 31% 86% 83% 82% - 69% 68% 67% - - - - ** The classifier for the risk category "Insurance", could not be optimized due to insufficient data. 100% 90% 82% 78% - 91% 61% 56% - - - - 76% 92% 90% 89% 88% 94% 91% 90% 90% 90% 90% 90% 18% 82% 84% 86% 0% 56% 78% 83% 0% 0% 0% 0% Insurance** 2) Naïve Bayes : NB Classifier is a linear classifier built on the Bayesian theorem. It is based on the assumption that features in a dataset are mutually independent and are identically distributed. An additional assumption the conditional independence of features. is The classifier's performance is evaluated in terms of area under the curve (AUC), accuracy, precision, recall and F1-score. A random classifier has an AUC of 0.5 while a perfect classifier has an AUC of 1. TABLE IX. TEST RESULTS FOR THE FINAL MODEL PARAMETERS: DM-NEG, K=10, T=10-6, CONTEXT WINDOW=10, VECTOR SIZE=100, SVM LINEAR CLASSIFIERS WITH OPTIMAL C VALUES Risk Category Termination Indemnity Accuracy Precision Recall F-score 91% 93% 89% 83% 77% 56% 83% 67% V. RESULTS The dataset on which this experimentation was performed consisted of three sets: 1,382 paragraphs for training, 151 paragraphs for validation and 75 paragraphs for test. These paragraphs were collated from request for proposal (RFP) documents of various risk categories. The risk categories with maximum number of paragraphs in the training dataset are: "Termination" with 499, "Indemnity" with 117 and "Insurance" with 89. In the validation dataset, Termination accounted for 44 paragraphs, Indemnity accounted for 18 paragraphs and Insurance accounted for 15 paragraphs. In the test dataset the count of paragraphs was 22, 9 and 7 for Termination, Indemnity and Insurance respectively. The hyper-parameter choice for paragraph vectors and classifier models are cross validated by comparing end to end performance of predicting the categories. Vector representation built using Distributed memory architecture; trained using negative sampling (Table I) with number of samples to be updated (K)=10 (Table II), subsampling threshold=10-6 (Table III), context window=10 (Table IV), vector size=100 (Table V); and classified using linear SVM (Table VII) outperforms all other combinations. All words are converted to lower case. We have a vocabulary of 1,442 words. Special characters are treated as normal words. The performance of individual risk category classifier model is further tuned by updating the C-values. C value of 1 works best for both Indemnity and Termination (Table VIII). Thus by parameter tuning, the performance of the overall model has increased by 5% points (Table I, Table VIII) in terms of accuracy, for the risk category "Termination". The higher values of precision, recall and F1-score for "Termination" and "Indemnity" as compared to "Insurance" (Table VIII) are driven by a larger training data. The poor performance of the risk category, "Insurance" (trained on <100 paragraphs) suggests training on a larger dataset to produce reliable results. Also contextualization of "Insurance" with associated words to assess risk was not clear, as we found out by manual review of dictionary and training set. Thus performance of this framework is largely dependent on the size of the training data and propriety of pre-defined risk category and association. Using these selections, the test results for Indemnity and Termination are displayed in Table IX. Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)0687 The varied functionalities of our framework is detailed in Table X with a sample screen-shot in Figure 2. TABLE X. FRAMEWORK FUNCTIONALITY DESCRIPTION Framework Functionalities 1 2 3 4 5 6 7 8 9 Description Document Upload Document Repository Selection of Risk Tokens Extracted risk prone paragraphs for the risk category selected Probability Values Reviewing and Commenting Feedback to decline an identified paragraph Original legal document Export reports Fig.2."Risk-o-Meter" framework: Document Upload and Document Repository VI. FUTURE WORK The current framework considers all risk prone paragraphs and their associated categories with equal importance. E.g. Statement 1 for Indemnity: "The Consultant shall at all times indemnify and keep indemnified the Company against all claims/damages etc. for any infringement of any Intellectual Property Rights (IPR) while providing its services under the Project." Statement 2 for Termination: "If the firm stands dissolved /reconstituted and the name/ style of the firm is changed." The current framework would identify both the paragraphs as risky but would not differentiate between their severities. To further aid legal professionals in the task of analyzing risk reward ratio, we propose to incorporate a module which considers the severity and impact of different risk paragraphs; and superimpose with risk emanating from associated categories. We will also ascertain the distance of association to weight the risk quotient as necessary. Thus they could be classified as High, Medium or Low; or their impact rated on a scale of 1-5, with 5 being the highest. Based on the severity and impact of the identified risk category, the framework could also be trained for suggesting probable mitigation options. VII. CONCLUSION The time and cost involved in manual assessment of legal documents clearly indicate the need for developing an AI-based system that makes risk analysis of contracts fast, error free and person independent; so that the decision to accept/reject/mitigate to tolerable limit is made easy. In this paper, we presented our framework, "risk-o-meter" which has reduced the average time taken by our legal professionals in reviewing and assessing the Documents", 2014 [3] Back to Basic: Contract Automation 101, https://www.ontask.io/resources/back-basics-contract-automation-101/ Shperber, "A gentle introduction to Doc2vec", [4] Gidi https://medium.com/scaleabout/a-gentle-introduction-to-doc2vec- db3e8c0cce5e, July 26, 2017 [5] "Uncover relevant information from contracts with Kira", https://www.kirasystems.com/how-it-works/contract-analysis/ [6] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, Jeffrey Dean. their "Distributed Representations of Words and Phrases and Compositionality" [7] Mingyong Liu and Jiangang Yang. "An improvement of TFIDF weighting in text categorization. International Conference on Computer Technology and Science", 2012 [8] A. Ben-Hur and J. Weston, "A User's Guide to Support Vector Machine". [9] Jason Brownlee,"Support Vector Machines for Machine Learning", https://machinelearningmastery.com/support-vector-machines-for- machine-learning/, April 20, 2016 [10] Savan Patel,"Chapter 2: SVM (Support Vector Machine)-Theory", https://medium.com/machine-learning-101/chapter-2-svm-support- vector-machine-theory-f0812effc72, May 3, 2017 [11] "Naïve Bayes and Text Classification-Introduction and Theory", http://sebastianraschka.com/Articles/2014_naive_bayes_1.html [12] "NLP 05: From Word2vec to Doce2vec: a simple example with Gensim", risk in legal documents. It thus fosters a risk-aware environment for sustainable growth and knowledgeable decision making for the organization. The framework can be tailored for uncovering relevant information from multiple kinds of documents by optimizing the hyper-parameters based on the quality and quantity of the available data. Another potential application of the framework could be for processing claims documents wherein accident descriptions could be used for better understanding of the accident scenario and accordingly predicting the accident types such as bodily damage, property damage and others. Our framework, thus provides a scalable, efficient and reliable solution for reviewing and assessing all kinds of documents. REFERENCES [1] "Lawyers Waste As Much As Six Hours a Week on Document Issues", http://metajure.com/lawyers-waste-six-hours-a- Management week-on-document-management-issues-2/, January 28,2016 [2] Quoc Le, Tomas Mikolov. "Distributed Representations of Sentences and https://ireneli.eu/2016/07/27/nlp-05-from-word2vec-to-doc2vec-a- simple-example-with-gensim/ [13] Chai, K.; H. T. Hn, H. L. Chieu; "Bayesian Online Classifiers for Text Classification and Filtering", Proceedings of the 25th annual international ACM SIGIR conference on Research and Development in Information Retrieval, August 2002, pp 97-104 [14] Data Mining Concepts and Techniques, Jiawei Han, Micheline Kamber Morgan Kaufman Publishers, 2003 [15] Julia Silge and David Robinson, "Term Frequency and Inverse Document Frequency (tf-idf) using Tidy Data Principles", https://cran.r- project.org/web/packages/tidytext/vignettes/tf_idf.html, March 21, 2018 [16] Collobert, Ronan andWeston, Jason. "A unified architecture for natural language processing: Deep neural networks with multitask learning" In Proceedings of the 25th International Conference on Machine Learning, pp. 160 -- 167. ACM, 2008. [17] Bengio, Yoshua, Schwenk, Holger, Senecal, Jean-Sebastien, Morin, Frederic, and Gauvain, Jean-Luc; "Neural probabilistic language models. In Innovations in Machine Learning", pp. 137 -- 186. Springer, 2006. [18] Socher, Richard, Huang, Eric H., Pennington, Jeffrey, Manning, Chris D., and Ng, Andrew Y. Dynamic pooling and unfolding recursive autoencoders for paraphrase detection. In Advances in Neural Information Processing Systems, 2011a. [19] Omer Levy and Yoav Goldberg, "Dependency-Based Word Embeddings" [20] Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean, "Efficient estimation of word representations in vector space" arXiv preprint arXiv:1301.3781, 2013a. Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)0688
1808.02171
1
1808
2018-08-07T01:04:39
Dialog-context aware end-to-end speech recognition
[ "cs.CL" ]
Existing speech recognition systems are typically built at the sentence level, although it is known that dialog context, e.g. higher-level knowledge that spans across sentences or speakers, can help the processing of long conversations. The recent progress in end-to-end speech recognition systems promises to integrate all available information (e.g. acoustic, language resources) into a single model, which is then jointly optimized. It seems natural that such dialog context information should thus also be integrated into the end-to-end models to improve further recognition accuracy. In this work, we present a dialog-context aware speech recognition model, which explicitly uses context information beyond sentence-level information, in an end-to-end fashion. Our dialog-context model captures a history of sentence-level context so that the whole system can be trained with dialog-context information in an end-to-end manner. We evaluate our proposed approach on the Switchboard conversational speech corpus and show that our system outperforms a comparable sentence-level end-to-end speech recognition system.
cs.CL
cs
DIALOG-CONTEXT AWARE END-TO-END SPEECH RECOGNITION Suyoun Kim1 and Florian Metze2 1Electrical & Computer Engineering 2Language Technologies Institute, School of Computer Science Carnegie Mellon University {suyoung1fmetze}@andrew.cmu.edu 8 1 0 2 g u A 7 ] L C . s c [ 1 v 1 7 1 2 0 . 8 0 8 1 : v i X r a ABSTRACT Existing speech recognition systems are typically built at the sentence level, although it is known that dialog context, e.g. higher-level knowledge that spans across sentences or speakers, can help the processing of long conversations. The recent progress in end-to-end speech recognition systems promises to integrate all available information (e.g. acous- tic, language resources) into a single model, which is then jointly optimized. It seems natural that such dialog context information should thus also be integrated into the end-to- end models to improve further recognition accuracy. In this work, we present a dialog-context aware speech recognition model, which explicitly uses context information beyond sentence-level information, in an end-to-end fashion. Our dialog-context model captures a history of sentence-level contexts, so that the whole system can be trained with dialog- context information in an end-to-end manner. We evaluate our proposed approach on the Switchboard conversational speech corpus, and show that our system outperforms a comparable sentence-level end-to-end speech recognition system. Index Terms -- end-to-end speech recognition 1. INTRODUCTION As voice-driven interfaces to devices become mainstream, spoken dialog systems that can recognize and understand long dialogs are becoming increasingly important. Dialog context, dynamic contextual flow across multiple sentences, provides important information that can improve speech recognition. To build speech recognition models, the long dialogs typically split into short utterance-level audio clips to make training the speech recognition models computation- ally feasible. Thus, such speech recognition models built on sentence-level speech data may lose important dialog-context information. In language model trained only on text data, several recent studies have attempted to use document-level or dialog-level context information to improve language model performance. Recurrent neural network (RNN) based language models [1] have shown success in outperforming conventional n-gram based models due to their ability to capture long-term in- formation. Based on the success of RNN based language models, recent research has developed a variety of ways to incorporate document-level or dialog-level context informa- tion [2 -- 5]. Mikolov et al. proposed a context-dependent RNN language model [2] using a context vector which is produced by applying latent Dirichelt allocation [6] on the preceding text. Wang et al. proposed using a bag-of-words to repre- sent the context vector [3], and Ji et al. proposed using the last RNN hidden states from the previous sentence to rep- resent the context vector [4]. Liu et al. proposed using an external RNN to model dialog context between speakers [5]. All of these models have been developed and optimized on text data, and therefore must still be combined with conven- tional acoustic models, which are optimized separately with- out any context information beyond sentence-level. The re- cent study [7] attempted to integrated such dialog session- aware language model with acoustic models, however, it re- quires disjoint training procedure. There have been no studies of speech recognition mod- els that incorporate dialog-context information in end-to-end training approach on both speech and text data. The recently proposed end-to-end speech recognition models, a neural net- work is trained to convert a sequence of acoustic feature vec- tors into a sequence of graphemes (characters) rather than senones. Unlike sequences of senone predictions, which need to be decoded using a pronunciation lexicon and a language model, the grapheme sequences can be directly converted to word sequences without any additional models. The end-to- end models proposed in the literature to use a Connection- ist Temporal Classification framework [8 -- 12], an attention- based encoder-decoder framework [13 -- 16], or both [17, 18]. Our goal is to build speech recognition model that explic- itly use a dialog-level context information beyond sentence- level information especially in an end-to-end manner so that the whole system can be trained with the long context infor- mation. In this paper, we present a dialog-context aware end- to-end speech recognition model that can capture a history of sentence-level contexts within an end-to-end speech recogni- tion models. We also present a method to serialize datasets for Fig. 1: The architecture of our dialog-context end-to-end speech recognition model. The red curved line represents the context information flow. LAttention (cid:44) −(cid:88) ln p(y∗ ux, y∗ 1:u−1) (3) u where π is the label sequence allowing the presence of the blank symbol, Φ is the set of all possible π given u-length y, and y∗ 1:u−1 is all the previous labels. In this section, we present our DialogAttentionDecoder sub- network. We extend the AttentionDecoder which is a subnet- work of standard end-to-end models in order to employ con- text information. The core modeling idea of this work is to integrate the context information from the previous sentence into that of the current sentence. Let we have a dataset consists of N-number of dialogs, D = {d1,··· , dN} and each dialog di = (s1,··· , sK) has K utterances. k-th utterance sk is represented as a sequence of U-length output characters (y) and T -length input acoustic features (x). Given the high-level representation (h) of input acoustic features (x) generated from Encoder, both the stan- dard AttentionDecoder and our proposed DialogAttentionDe- coder generates the probability distribution over characters ( yu), conditioned on (h), and all the characters seen previ- ously (y1:u−1). Our proposed DialogAttentionDecoder ad- ditionally conditioning on dialog context vector (ck), which represents the information of the preceding utterance in the same dialog as: h = Encoder(x) standard decoder network: yu ∼ AttentionDecoder(h, y1:u−1) proposed decoder network:  DialogAttentionDecoder(h, y1:u−1, ck) (4) (5) (6) 2. DIALOG-CONTEXT END-TO-END ASR 2.2. Dialog-context models training and decoding based on their onset times to learn dia- log flow. We evaluate our proposed approach on the Switch- board conversational speech corpus [19, 20], and show that our model outperforms the sentence-level end-to-end speech recognition model. 2.1. End-to-end models We perform end-to-end speech recognition using a joint CTC/Attention-based approach with graphemes as the output symbols [17,18]. The key advantage of the joint CTC/Attention framework is that it can address the weaknesses of the two main end-to-end models, Connectionist Temporal Classifi- cation (CTC) [8] and attention-based encoder-decoder (At- tention) [21], by combining the strengths of the two. With CTC, the neural network is trained according to a maximum- likelihood training criterion computed over all possible seg- mentations of the utterance's sequence of feature vectors to its sequence of labels while preserving left-right order between input and output. With attention-based encoder-decoder mod- els, the decoder network can learn the language model jointly without relying on the conditional independent assumption. Given a sequence of acoustic feature vectors, x, and the corresponding graphemic label sequence, y, the joint CTC/Attention objective is represented as follows by combin- ing two objectives with a tunable parameter λ : 0 ≤ λ ≤ 1: (1) L = λLCTC + (1 − λ)LAttention. Each loss to be minimized is defined as the negative log likeli- hood of the ground truth character sequence y∗, is computed from: LCTC (cid:44) − ln p(πx) (2) (cid:88) π∈Φ(y) tion error: dk ∼DialogContextGenerator(y∗) LDialog (cid:44) − ln p(d∗ (8) (9) The additional loss LDialog is added to the L in Eq. (1) so that the whole model is optimized jointly. Once the context vector of previous sentence is generated by either proposed method (a) or (b), it is stored for the next sentence prediction. ky∗) (a) (b) Fig. 2: Two different types of our dialog-context Attention- Decoder network. At each output step (u), the character dis- tribution (yu), is generated conditioning on 1) the dialog con- text vector (ck) from the previous sentence, in addition to 2) the attended inputs (Hu) from Encoder network, 3) the de- coder state (su−1), and 4) the history of character yu−1. The red curved line represents the context information flow. We represent the context vector, ck, in two different ways as illustrated in Figure 2. In method (a), the last decoder state of the previous sentence represents the context vector, ck. The context vector ck is propagated to the initial decoder state of current sentence. In method (b), every output information is integrated with additional attention mechanism and represents the context vector, ck, then is propagated to every decoder state for each output time step of current sentence. Motivated by prior work [4], we produce the context vector for the (a)- type of our decoder from the final hidden representation of the previous sentence sk−1: ck = ssk−1 U . (7) For the (b)-type of our decoder, we embed a subnetwork (Di- alogContextGenerator) with an additional attention mecha- nism to incorporate every previous context into a single con- text vector ck. We use the character distributions of previous sentence (y ∗1 ··· y∗U ) as input to generate (ck). This subnet- work is optimized towards minimizing the dialog classifica- The following equation represents how to update the hid- den states of DialogAttentionDecoder with high-level input features (hu) generated from Encoder, 2) the previous char- acter (yu−1), and 3) the context vector (ck) from previous sen- tence: su−1 = f (su−1, ck) (10) (11) (12) where f (·) is a function that combines the two inputs, su−1, and ck: su = RN N (su−1, hu, yu−1)) yu ∼ softmax(su) f (su−1, ck) = tanh(W su−1 + V ck + b) (13) where W, V, b are trainable parameters. In this work, we use tanh for the non-linear activation function. 2.3. Dataset serialization In order to learn and use the dialog context during training and decoding, we serialized the sentences based on their onset times and their dialogs rather than random shuffling of data. We first grouped the sentences based on their dialogs, then ordered the sentences according to their onset times. Instead of generating a minibatch set in a typical way that randomly chooses sentences, we created a minibatch to contain the sen- tences from each one of different dialogs. For example, a size-30 minibatch had 30 sentences from d1 d30. We did not shuffle the minibatch sets for training or decoding, so that the context information generated from the previous minibatch that contains preceding sentences can propagate to the next minibatch. Since the number of sentences varies across the dialogs, some dialogs may not have enough sentences to construct the minibatches. In this case, we included dummy input/output data for the dialogs that have fewer sentences to maintain the minibatch size and not to lose context information of the other dialogs that have more sentences. We then masked out the loss from the dummy data for the objective function. Once every sentence in d1 d30 was processed, then the sentences from the other dialogs d31 − d60 would be processed. Figure 3 illustrates the example minibatches that are se- rialized according to their onset times and their dialogs. The size of minibatch is 3 and the sentences are from dialogs, dA, dB, and dC. In second and third minibatches, the dummy in- put/output data is included in the position for the dB and dC, which have fewer sentences. persand, noise, vocalized-noise, laughter, unknown, space, start-of-speech/end-of-speech, and blank tokens. Note that no pronunciation lexicon was used in any of the experiments. 3.2. Training and decoding We used joint CTC/Attention end-to-end speech recognition architecture [17, 18] with ESPnet toolkit [24]. We used a CNN-BLSTM encoder as suggested in [25, 26]. We followed the same six-layer CNN architecture as the prior study, ex- cept we used one input channel instead of three, since we did not use delta or delta delta features. Input speech fea- tures were downsampled to (1/4 x 1/4) along with the time- frequency axis. Then, the 4-layer BLSTM with 320 cells was followed by the CNN. We used a location-based atten- tion mechanism [15], where 10 centered convolution filters of width 100 were used to extract the convolutional features. The decoder network of both our proposed models and the baseline models was a one-layer LSTM with 300 cells. Our dialog-context aware models additionally requires one- layer with 300 hidden units for incorporating the context vector with decoder states, and attention network with 2402- dimensional output layer to generate the context vector. We also built a character-level RNNLM (Char-RNNLM) on the the same Switchboard text dataset. The Char-RNNLM net- work was a two-layer LSTM with 650 cells, trained sepa- rately only on the training transcription. This network was used only for decoding. Note that we did not use any extra text data other than the training transcription. The AdaDelta algorithm [27] with gradient clipping [28] was used for optimization. We used λ = 0.5 for joint CTC/Attention training. We bootstrap the training our pro- posed dialog-context aware end-to-end models from the base- line end-to-end models. For decoding of the models, we used joint decoder which combines the output label scores from the AttentionDecoder, CTC, and Char-RNNLM [26] . The scaling factor of CTC, and RNNLM scores were α = 0.3, and β = 0.3, respectively. We used a beam search algorithm similar to [29] with the beam size 20 to reduce the computa- tion cost. We adjusted the score by adding a length penalty, since the model has a small bias for shorter utterances. The final score s(yx) is normalized with a length penalty 0.1. The models were implemented by using the Chainer deep learning library [30], and ESPnet toolkit [17, 18, 24]. 4. RESULTS We evaluated both the end-to-end speech recognition model which was built on sentence-level data (sentence-level end2end) and our proposed dialog-context aware end-to-end speech recognition model which leveraged dialog-context informa- tion within and beyond the sentence (dialog-context aware Fig. 3: A method to make the minibatch set for training and evaluating our models. The example minibatches are serial- ized according to their onset times and their dialogs. The size of example minibatch is 3 and the sentences are from three dialogs, dA, dB, and dC. In second and third minibatches, the dummy input/output data is included in the position for the dB and dC, which have fewer sentences. Table 1: Experimental dataset description. We used the Switchboard dataset which has a 300 hours training set. Note that any pronunciation lexicon or external text data was not used. # dialog # sentences Train nodup Train dev 34 4,000 2,402 192,656 CH SWB 20 20 1,831 2,627 3. EXPERIMENTS 3.1. Experimental corpora We investigated the performance of the proposed dialog- context aware model on the Switchboard LDC corpus (97S62) which has a 300 hours training set. Note that we did not use the Fisher dataset. We split the Switchboard data into two groups, then used 285 hours of data (192 thousand sentences) for model training and 5 hours of data (4 thousand sen- tences) for hyper-parameter tuning. Evaluation was carried out on the HUB5 Eval 2000LDC corpora (LDC2002S09, LDC2002T43), which have 3.8 hours of data (4.4 thousand sentences), and we show separate results for the Callhome English (CH) and Switchboard (SWB) evaluation sets. We denote train nodup, train dev, SWB, and CH as our training, development, and two evaluation datasets for CH and SWB, respectively. Table 1 shows the number of dialogs per each dataset. We sampled all audio data at 16kHz, and extracted 80- dimensional log-mel filterbank coefficients with 3-dimensional pitch features, from 25 ms frames with a 10ms frame shift. We used 83-dimensional feature vectors to input to the net- work in total. We used 49 distinct labels: 26 characters, 10 digits, apostrophe, period, dash, underscore, slash, am- Table 2: Comparison of hypothesis between baseline and our proposed model. Three examples of two consecutive sentences are manually chosen from evaluation dataset. They show that our model correctly predicted the word bolded in current sentence, while the baseline incorrectly predicted it. The preceding sentence includes the context information related to the word, and our model seems to be benefit this information. model previous sentence REF well claire's kindergarten but she is already past the Baseline well clears in the garden but she is already past Ours well clears kindergarten but she is already past the REF Baseline Ours REF Baseline Ours yes it is so hot in the building have you ever been in it yeah if when he said that is like just so hot in the belly have ever been but yeah if when he is in this like it is so hot in the belief I have never been but if we go we like check into a to a to a hotel but if we go we like check until the law that you know to do if we go we like check into a law if it does a job hotel current sentence kindergarten i mean in a garden i mean kindergarten i mean it is like a sauna it is like i saw it is like a sauna i know but it is much more comfortable i know that is much more comes of one i know that is much more comfortable Table 3: Word Error Rate (WER) on the Switchboard dataset. None of our experiments used any lexicon information or ex- ternal text data other than the training transcription. The mod- els were trained on 300 hours of Switchboard data only. Train (∼ 300hrs) CH SWB Models WER WER sentence-level end2end Seq2Seq A2C [22] CTC A2C [10] CTC A2C [12] CTC A2W(Phone/external-LM init.) [23] sentence-level end2end Our baseline (CTC/Seq2Seq) dialog-context aware end2end Our proposed model(a) Our proposed model(b) 40.6 31.8 32.1 23.6 34.4 34.1 33.2 28.1 20.0 19.8 14.6 19.0 18.2 18.6 end2end). Table 3 shows the WER of our baseline, proposed models, and several other published results those were only trained on 300 hours Switchboard training data. Note that CTC A2W(Phone/external-LM init.) [23] was initialized from Phone CTC model and use external word embeddings. As shown in Table 3, we obtained a performance gain over our baseline sentence-level end2end by using the dialog-context information. Our proposed model (a) performed best on SWB evaluation set showing 4.2% relative improvement over our baseline. Our proposed model (b) performed best on CH evaluation set showing 3.4% relative improvement over our baseline. Table 4 shows the insertion, deletion, and substitution rates. We observed that the largest factor of WER improve- ment was from the substitution rates rather than deletion or insertion. Table 2 shows three example utterances with each previous sentence to show that our context information beyond the sentence-level improves word accuracy. Table 4: Substitution rate (Sub), Deletion rate (Del), and In- sertion rate (Ins) for the baseline and our proposed model. Model Baseline Proposed model(a) Proposed model(b) Baseline Proposed model(a) Proposed model(b) Test CH 23.9 CH 23.9 CH 22.8 SWB 13.1 SWB 12.5 SWB 12.6 Sub Del 5.8 5.9 6.3 3.4 3.4 3.6 Ins WER 34.4 4.7 4.3 34.1 33.2 4.1 19.0 2.5 18.2 2.2 2.4 18.6 5. CONCLUSION We proposed a dialog-context aware end-to-end speech recognition model which explicitly uses context informa- tion beyond sentence-level information. A key aspect of this model is that the whole system can be trained with dialog- level context information in an end-to-end manner. Our model was shown to outperform previous end-to-end models trained on sentence-level data. Moving forward, we plan to explore additional methods to represent the context in- formation and evaluate performance improvements that can be obtained by addressing overfitting and data sparsity us- ing larger conversational datasets, e.g., 2,000 hours of fisher dataset. 6. ACKNOWLEDGEMENTS We gratefully acknowledge the support of NVIDIA Corpora- tion with the donation of the Titan X Pascal GPU used for this research. This research was supported by a fellowship from the Center for Machine Learning and Health (CMLH) at Carnegie Mellon University. 7. REFERENCES [1] Tom´as Mikolov, Martin Karafi´at, Luk´as Burget, Jan Cernock`y, and Sanjeev Khudanpur, "Recurrent neural network based language model," in Eleventh Annual Conference of the International Speech Communication Association, 2010. [2] Tomas Mikolov and Geoffrey Zweig, "Context depen- dent recurrent neural network language model.," SLT, vol. 12, pp. 234 -- 239, 2012. [3] Tian Wang and Kyunghyun Cho, "Larger-context lan- guage modelling," arXiv preprint arXiv:1511.03729, 2015. [4] Yangfeng Ji, Trevor Cohn, Lingpeng Kong, Chris Dyer, "Document context language and Jacob Eisenstein, models," arXiv preprint arXiv:1511.03962, 2015. [5] Bing Liu and Ian Lane, "Dialog context language mod- in Acoustics, eling with recurrent neural networks," Speech and Signal Processing (ICASSP), 2017 IEEE In- ternational Conference on. IEEE, 2017, pp. 5715 -- 5719. [6] David M Blei, Andrew Y Ng, and Michael I Jordan, "Latent dirichlet allocation," Journal of machine Learn- ing research, vol. 3, no. Jan, pp. 993 -- 1022, 2003. [7] Wayne Xiong, Jasha Droppo, Xuedong Huang, Frank Seide, Mike Seltzer, Andreas Stolcke, Dong Yu, and Geoffrey Zweig, "The microsoft 2016 conversational speech recognition system," in Acoustics, Speech and Signal Processing (ICASSP), 2017 IEEE International Conference on. IEEE, 2017, pp. 5255 -- 5259. [8] Alex Graves, Santiago Fern´andez, Faustino Gomez, and Jurgen Schmidhuber, "Connectionist temporal classifi- cation: labelling unsegmented sequence data with recur- rent neural networks," in Proceedings of the 23rd inter- national conference on Machine learning. ACM, 2006, pp. 369 -- 376. [9] Alex Graves and Navdeep Jaitly, "Towards end-to-end speech recognition with recurrent neural networks," in Proceedings of the 31st International Conference on Machine Learning (ICML-14), 2014, pp. 1764 -- 1772. [10] Awni Hannun, Carl Case, Jared Casper, Bryan Catan- zaro, Greg Diamos, Erich Elsen, Ryan Prenger, San- jeev Satheesh, Shubho Sengupta, Adam Coates, et al., "Deep speech: Scaling up end-to-end speech recogni- tion," arXiv preprint arXiv:1412.5567, 2014. [11] Yajie Miao, Mohammad Gowayyed, and Florian Metze, "EESEN: End-to-end speech recognition using deep in 2015 RNN models and WFST-based decoding," IEEE Workshop on Automatic Speech Recognition and Understanding (ASRU). IEEE, 2015, pp. 167 -- 174. [12] Geoffrey Zweig, Chengzhu Yu, Jasha Droppo, and An- dreas Stolcke, "Advances in all-neural speech recog- in Acoustics, Speech and Signal Process- nition," ing (ICASSP), 2017 IEEE International Conference on. IEEE, 2017, pp. 4805 -- 4809. [13] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- gio, "Neural machine translation by jointly learning to align and translate," arXiv preprint arXiv:1409.0473, 2014. [14] Jan Chorowski, Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio, "End-to-end continuous speech recognition using attention-based recurrent NN: First re- sults," arXiv preprint arXiv:1412.1602, 2014. [15] Jan K Chorowski, Dzmitry Bahdanau, Dmitriy Serdyuk, Kyunghyun Cho, and Yoshua Bengio, "Attention-based models for speech recognition," in Advances in Neural Information Processing Systems, 2015, pp. 577 -- 585. [16] William Chan, Navdeep Jaitly, Quoc V Le, and Oriol arXiv preprint "Listen, attend and spell," Vinyals, arXiv:1508.01211, 2015. [17] Suyoun Kim, Takaaki Hori, and Shinji Watanabe, "Joint ctc-attention based end-to-end speech recognition using multi-task learning," in Acoustics, Speech and Signal Processing (ICASSP), 2017 IEEE International Confer- ence on. IEEE, 2017, pp. 4835 -- 4839. [18] Shinji Watanabe, Takaaki Hori, Suyoun Kim, John R Hershey, and Tomoki Hayashi, "Hybrid ctc/attention architecture for end-to-end speech recognition," IEEE Journal of Selected Topics in Signal Processing, vol. 11, no. 8, pp. 1240 -- 1253, 2017. [19] John J Godfrey, Edward C Holliman, and Jane Mc- Daniel, "Switchboard: Telephone speech corpus for re- search and development," Acoustics, Speech, and Sig- nal Processing, 1992. ICASSP-92., 1992 IEEE Interna- tional Conference on, 1992. [20] John J Godfrey, Edward C Holliman, and Jane Mc- Daniel, "Switchboard: Telephone speech corpus for research and development," in Acoustics, Speech, and Signal Processing, 1992. ICASSP-92., 1992 IEEE Inter- national Conference on. IEEE, 1992, vol. 1, pp. 517 -- 520. [21] Dzmitry Bahdanau, Jan Chorowski, Dmitriy Serdyuk, Philemon Brakel, and Yoshua Bengio, "End-to-end attention-based large vocabulary speech recognition," arXiv preprint arXiv:1508.04395, 2015. [22] Thomas Zenkel, Ramon Sanabria, Florian Metze, Jan Niehues, Matthias Sperber, Sebastian Stuker, and Alex Waibel, "Comparison of decoding strategies for ctc acoustic models," 2017. arXiv preprint arXiv:1708.04469, [23] Kartik Audhkhasi, Brian Kingsbury, Bhuvana Ramab- hadran, George Saon, and Michael Picheny, "Build- ing competitive direct acoustics-to-word models for en- glish conversational speech recognition," arXiv preprint arXiv:1712.03133, 2017. [24] Shinji Watanabe, Takaaki Hori, Shigeki Karita, Tomoki Hayashi, Jiro Nishitoba, Yuya Unno, Nelson En- rique Yalta Soplin, Jahn Heymann, Matthew Wiesner, Nanxin Chen, et al., "Espnet: End-to-end speech processing toolkit," arXiv preprint arXiv:1804.00015, 2018. [25] Yu Zhang, William Chan, and Navdeep Jaitly, "Very deep convolutional networks for end-to-end speech recognition," in Acoustics, Speech and Signal Process- ing (ICASSP), 2017 IEEE International Conference on. IEEE, 2017, pp. 4845 -- 4849. [26] Takaaki Hori, Shinji Watanabe, Yu Zhang, and William Chan, "Advances in joint ctc-attention based end-to-end speech recognition with a deep cnn encoder and rnn- lm," arXiv preprint arXiv:1706.02737, 2017. [27] Matthew D Zeiler, "Adadelta: an adaptive learning rate method," arXiv preprint arXiv:1212.5701, 2012. [28] Razvan Pascanu, Tomas Mikolov, and Yoshua Ben- gio, "On the difficulty of training recurrent neural net- works," in International Conference on Machine Learn- ing, 2013, pp. 1310 -- 1318. [29] Ilya Sutskever, Oriol Vinyals, and Quoc VV Le, "Se- quence to sequence learning with neural networks," in Advances in neural information processing systems, 2014, pp. 3104 -- 3112. [30] Seiya Tokui, Kenta Oono, Shohei Hido, and Justin Clay- ton, "Chainer: a next-generation open source frame- work for deep learning," in Proceedings of Workshop on Machine Learning Systems (LearningSys) in The Twenty-ninth Annual Conference on Neural Information Processing Systems (NIPS), 2015.
1711.05680
2
1711
2017-11-20T14:40:29
An Unsupervised Approach for Mapping between Vector Spaces
[ "cs.CL" ]
We present a language independent, unsupervised approach for transforming word embeddings from source language to target language using a transformation matrix. Our model handles the problem of data scarcity which is faced by many languages in the world and yields improved word embeddings for words in the target language by relying on transformed embeddings of words of the source language. We initially evaluate our approach via word similarity tasks on a similar language pair - Hindi as source and Urdu as the target language, while we also evaluate our method on French and German as target languages and English as source language. Our approach improves the current state of the art results - by 13% for French and 19% for German. For Urdu, we saw an increment of 16% over our initial baseline score. We further explore the prospects of our approach by applying it on multiple models of the same language and transferring words between the two models, thus solving the problem of missing words in a model. We evaluate this on word similarity and word analogy tasks.
cs.CL
cs
An Unsupervised Approach for Mapping between Vector Spaces Syed Sarfaraz Akhtar* Arjit Srivastava Avijit Vajpayee* Manish Shrivastava {syed.akhtar, arihant.gupta, arjit.srivastava, madangopal.jhanwar}@research.iiit.ac.in, Arihant Gupta* Madan Gopal Jhanwar [email protected], [email protected] 7 1 0 2 v o N 0 2 ] L C . s c [ 2 v 0 8 6 5 0 . 1 1 7 1 : v i X r a Language Technologies Research Center(LTRC) Kohli Center On Intelligent Systems (KCIS) International Institute of Information Technology Hyderabad (IIITH), 500032 Abstract. We present a language independent, unsupervised approach for trans- forming word embeddings from source language to target language using a trans- formation matrix. Our model handles the problem of data scarcity which is faced by many languages in the world and yields improved word embeddings for words in the target language by relying on transformed embeddings of words of the source language. We initially evaluate our approach via word similarity tasks on a similar language pair - Hindi as source and Urdu as the target language, while we also evaluate our method on French and German as target languages and English as source language. Our approach improves the current state of the art results - by 13% for French and 19% for German. For Urdu, we saw an increment of 16% over our initial baseline score. We further explore the prospects of our approach by applying it on multiple models of the same language and transferring words between the two models, thus solving the problem of missing words in a model. We evaluate this on word similarity and word analogy tasks. 1 Introduction Word representations are being widely used to solve problems of various areas of natu- ral language processing. These include but are not limited to dependency parsing [11], named entity recognition [18] and parsing [16]. In this paper, we try to exploit similarities in linguistically similar languages by transforming word embeddings of source language - which is highly resource rich and hence well trained, to a corresponding model of target language - which is relatively resource deficient. This technique is similar to that used by Mikolov et. al. [21] for machine translation. We further extend our approach by applying it to different models trained for one particular language. This enables us to incorporate the best of various models. * These authors contributed equally to this work. 2 Akhtar et al. Given a source of structured connections between words, Faruqui et.al [9] proposed a technique to combine embeddings learned from distributional semantics of unstruc- tured text, known as "retrofitting". Speer and Chin [17] extended this technique to pro- duce state of the art word embeddings for English. The method proposed by them re- sulted in a 16% increase on the Stanford English Rare-Word (RW) dataset [10]. In this paper, we propose a method to transform words from one vector space to another. We use this technique to transform word embeddings between languages and also within the same language. Some languages are richer in resources than others. For example, Hindi is richer in resources than Urdu. We also evaluate our approach on dissimilar language pairs like English - French and English - German. Our aim is to use resource rich techniques like ConceptNet Ensemble [17] for languages poor in resources, for which we need to learn a mapping between their vector spaces. Using this technique, we are also able to get embeddings of words which are un- known for one embedding space by importing the transformed embedding of the same word from another model of the same language. This method proved to be faster than training a combined embedding space from scratch, while giving high quality word embeddings. The basis of our approach lies in having a sufficient number of frequent word pairs in both source and target languages to successfully train our transformation matrix. Each word pair is of form <word from source language, translated word of target language>. In this paper, we present a method for transforming word representations which, for training, take word representations of these word pairs to create a single transformation matrix, which when applied on any word representation of source word, will give us word representation of corresponding word in target language. We em- phasize on highly frequent words, because we believe that highly frequent words have better trained word embeddings and thus result in better results for our approach. We rely on a bi-lingual dictionary of the language pair for training and evaluating our transformation matrix. For training our matrix, we generate a bi-lingual dictionary from parallel corpus of source and target language in an unsupervised way. But for evaluation, the bi-lingual dictionary was missing most of the word pairs present in our test dataset because the parallel corpus for all the language pairs that we worked on in this paper were not large enough. Hence, only for evaluating our transformation matrix, we manually created a bilingual dictionary from the test sets - which was not used for training our transformation matrix because transformation matrix tends to completely remember the word representations it was generated from. We show that our method performs well on both French and German with state of the art results on both languages. Since there is no prior work done on Urdu, we test our approach against baseline scores of SkipGram embeddings. Our approach showed improvement of 16% over baseline scores. We further test our approach on multiple models of English. Our evaluations show that this is a fast and efficient approach to transform word embeddings from one vector space to another. An Unsupervised Approach for Mapping between Vector Spaces 3 2 Datasets For some experiments, we are using word embeddings trained on Google News cor- pus [21]. For all the models trained in this paper, we have used the Skip-gram [20] algorithm. The dimensionality has been fixed at 300 with a minimum count of 5 along with negative sampling. As training set for English, we use the Wikipedia data [5] (SG/en-SG). Soricut and Och [15] and Luong et. al. [10] had used the same training corpus for their models. The corpus contains about 1 billion tokens. For German and French, we use News Crawl (Articles from 2010) released as a part of ACL 2014 Ninth Workshop on Statistical Machine Translation (de-SG and fr-SG respectively). For Urdu, we use the untagged corpus released by Jawaid et. al. [1]. For Hindi, we use a monolingual corpus containing 31 million tokens, for training. As a parallel corpus for Urdu, we use the Hindi-Urdu parallel corpus released by Durrani et. al. [12]. We have used the Europarl parallel corpus version 7 [14] for parallel sentences of English-French and English-German. We use standard word-similarity datasets for testing. For English, we use Stanford English Rare-Word (RW) dataset [10] and the RG65 dataset [7]. The Stanford Rare- Word dataset contains comparatively more rare words and morphological complexity than other datasets and is central to our experiments. For German, we use the German RG65 [23] dataset. For French we use the French RG65 [4] dataset. In case of Urdu, we are using the word similarity dataset WS-UR-100 [19]. For testing analogical regularities, we have used the MSR word analogy dataset [22]. It contains 8000 analogy question. This dataset has been used by us for testing our model. The relations portrayed by these questions are morpho-syntactic, and can be categorized according to parts of speech - adjectives, nouns and verbs. Adjective rela- tions include comparative and superlative (good is to best as smart is to smartest). Noun relations include singular and plural, possessive and non-possessive (dog is to dog's as cat is to cat's). Verb relations are tense modifications (work is to worked as accept is to accepted). For rest of the paper, we have calculated the Spearman ρ (multiplied by 100) be- tween human assigned similarity and cosine similarity of our word embeddings for the word-pairs. All the thresholds mentioned have been decided after empirical fine tuning. Even though our experiments were computationally optimized, time and space complexities also played a part in deciding our thresholds. In order to learn initial representations of the words, we train word embeddings (word2vec) using the parameters described above on the training set. This model is referred to as SG (Skip-gram). 3 Cross-Lingual Transformation Matrix Since we are generating our transformation matrix from parallel word pairs of two different languages, we first need a list of highly frequent word pairs. For generating this list, we have parallel corpus of two different languages - in our case, Hindi and 4 Akhtar et al. Urdu, and English and French/German. This parallel corpus contains aligned sentences, from which we generate a one-to-one mapping between words. First we obtain word alignments using fast align [3] which gives us many to many word mapping, which we further use to construct our confidence matrix. This confi- dence matrix is generated using the frequency count of each individual mapping. For each word of the source language in the confidence matrix, we find out the word in the target language that it has been matched with most frequently and its fraction among all matches. After this, we proceed in decreasing order of count of matches while building a one-to-one matching above a threshold of match count and fraction of matches (25 and 0.5 respectively). For this word pair list, we have a frequency threshold, which decides the word pairs that will be chosen for generating our transformation matrix (see Table 1). For our experiments, this threshold has been set at 500 (to ensure that they are well trained). Fig. 1. Generating Cross-Lingual Word Pairs Figure 1 gives a high level overview of how we generate highly frequent word pairs from parallel corpus of source and target language in an unsupervised way. Suppose we get "N" highly frequent word pairs. Dimensions of word embedding of a word in our model is "D". Using first word of our "N" chosen word pairs, we create a matrix "A" of dimensions N*D, where each row is vector representation of the first An Unsupervised Approach for Mapping between Vector Spaces 5 Table 1. Example of word pairs for training transformation matrix of English-French from the confidence matrix. "E. Word" is the word in English, "F. Word" is the word in French, Count is the number of times "E. Word" was aligned with "F. Word" and Fraction is the fraction of the count over all the times "E. Word" was aligned with any word. E. Word F. Word Count Fraction and of that we not We Mr - 1.1M 0.87 0.51 1M 0.51 422K 0.65 319K 229K 0.55 0.63 108K Monsieur 99K 0.5 0.79 98K et de que nous pas Nous - Fig. 2. Computing similarity scores via transformation matrix. word. Similarly, we create another matrix B, of similar dimensions as A, using second word of our chosen word pairs. We now propose that a matrix "X" (our transformation matrix) will exist such that A*X = B, i.e. X = A−1*B. Our matrix "X" will be of dimensions "D*D" and when applied to a word embedding (matrix of dimensions 1*D, it gives a matrix of dimensions 1*D as output), it results in the word embedding of the transformed form of the word. Due to inverse property of a matrix, it accurately remembers the word pairs used for computing it. The matrix also appears to align itself with the word embedding of other 6 Akhtar et al. words (not used for its training) to transform them according to the patterns that the matrix follows. 3.1 Transformation between Similar Language Pairs We tried our approach on a very similar language pair - "Hindi-Urdu" with Hindi as the source language and Urdu as the target language. Durrnai et. al. [12] observed that 62% of the Hindi vocabulary are also a part of the Urdu vocabulary after transliteration. The approach smoothly maps embeddings between pairs of linguistically similar or deriva- tive languages, as well as between languages of diverse linguistic properties. Similarity between languages further improves the performance as is evident from results shown in table 2. Table 2. WS-UR-100 is the Urdu version of en-RG-65 and en-WS353 test sets. Note that hi- SG-T denotes the scores of transformed word embeddings of hi-SG. We see that there is a large increase in the scores of the transformed embeddings of hi-SG-T, considerably greater than en- SG-T or de-SG-T over en-SG . System WS-UR-100 Vocab ur-SG 130K hi-SG-T 34.50 50.08 - 3.2 Transformation between Diverse Language Pairs Table 3. This table denotes the results of various systems on en-RG-65 test set. SO denotes the scores of Soricut and Och [15]. ConceptNet denotes the results of ensemble approach by Speer and Chin [17] and en-SG denotes the scores of the model trained by us. This table is for comparison between en-SG and ConceptNet and how this difference is reflected when these models are transformed to other languages. System SO [15] SO w/ Morph [15] en-SG ConceptNet en-RG-65 Vocab 1.2M 1.2M 2.4M 0.4M 75.1 75.1 74.12 90.16 We have used English RG-65 test set as a translation table for French RG-65 and German RG-65 with minor corrections. It is to be noted that the French and German versions of RG-65 were constructed by translating and re-annotating English RG-65. We use word similarity task as our evaluation criteria. Given a word pair (French or German), we find its translation in English using English RG-65 test as a translation An Unsupervised Approach for Mapping between Vector Spaces 7 Table 4. fr-RG-65 is the French version of en-RG-65 test set. Note that en-SG-T and ConceptNet-T denote the scores of transformed word embeddings of en-SG and ConceptNet. We can see that en-SG gave a score of 74.12 on en-RG-65 and 68.62 on fr-RG-65 after transfor- mation, whereas for ConceptNet, the scores are 90.16 and 80.13 respectively. System SO [15] SO w/ Morph [15] fr-SG en-SG-T ConceptNet-T fr-RG-65 Vocab 1.2M 1.2M 0.5M 63.6 67.3 62.48 68.62 80.13 - - table. We then find the corresponding word embedding of the word (English) in Con- ceptNet/SG, and apply our transformation matrix on the word embedding, to generate word embedding for the word in the vector space of target language (French or German) which is further used to generate word similarity score. The scores are shown in Tables 3, 4 and 5. Table 5. de-RG-65 is the German version of en-RG-65 test set. Note that en-SG-T and ConceptNet-T denote the scores of transformed word embeddings of en-SG and ConceptNet. We see that there is a proportional increase in the scores of the transformed embeddings of en-SG-T and ConceptNet-T (as we saw in case of French). System SO [15] SO w/ Morph [15] de-SG en-SG-T ConceptNet-T de-RG-65 Vocab 2.9M 2.9M 1.8M 62.4 64.1 64.96 67.3 83.17 - - We see that the approach performs better in the case of Hindi-Urdu as compared to English-German and English-French, owing to similarity between the two languages. Please note that the comparison is not made between ConceptNet-T and hi-SG-T but between en-SG-T (of both French and German) and hi-SG-T because anything of sim- ilar nature to ConceptNet does not exist for Hindi. 4 Transformation between Different Models of Same Language While evaluating and testing our approach, we realized that it might be possible to port and use multiple models as and when needed, for a single language. We often encounter models trained for different types of data, for different purposes, but for the same lan- guage. Our approach enables us to generate word embeddings for words that are miss- ing in one model but are present in another model. This enables us to reduce number 8 Akhtar et al. Table 6. Scores on Stanford Rare word test set. GN denotes the scores of embeddings trained in Google-News word embeddings. SG denotes the scores of the embeddings trained by us. GN+SG denotes the system in which we import the embeddings of any word missing in GN from SG. System RW Unseen Words GN 45.27 SG 40.08 GN+SG 48.56 173 88 58 Table 7. This table denotes the scores on MSR word analogy test set. GN denotes the word embeddings trained on Google-News corpus. SG denotes the embeddings trained by us. GN+SG denotes the system in which we import the embeddings of the words missing in GN from SG. CosSum and CosMul denotes two different techniques for solving word analogy [13]. Unseen words is the number of words missing from the model out of 16000. System CosSum CosMul Unseen Words 0.646 GN SG 0.484 GN+SG 0.674 0.67 0.533 0.701 2000 0 0 of unseen words encountered, and after careful evaluation, we found that this approach indeed helps us. We tested this approach using word similarity and word analogy tasks and it showed significant improvement in results. For creating transformation matrix for two different models of same language, we initially require two different models trained on two different datasets - so that there are certain set of words which are not present in both the models. Then we take a small corpus, for determining the frequent words of the language (above a frequency threshold of 500 and also present in both the models). Using these frequent words, we create our transformation matrix, procedure for which is similar to what we did earlier in section 3. After creating this matrix, now whenever we encounter a word which is not present in our first model, we look for the word in our second model, and if found, we apply our transformation matrix to its embedding in our second model. This results in a rep- resentation of the word, which proved to be good enough, when we ran word similarity and word analogy tasks on it. Figure 3 gives a high level overview of how we try to in- corporate different models of the same language via transformation matrix. The scores are shown in tables 6 and 7. 5 Results and Analysis The method seems to perform well not only for the same language but also for cross lingual vector space transformation. Cross-lingual vector space transformation results in state of the art results on word similarity test sets of French and German - an increase of 13% in case of French and 19% for German (See tables 4 and 5). An Unsupervised Approach for Mapping between Vector Spaces 9 Fig. 3. Porting multiple models of same language. We see in table 8 that for the language pair Hindi-Urdu, there was considerably greater increase than en-SG-T for both English-French and English-German. This may be because Hindi-Urdu are very much more similar than either English-French and English-German. For transformation within the same language we saw a significant improvement on both word similarity and word analogy test sets for English (See tables 6 and 7). ConceptNet proved to be state of the art model for English, with significant improve- ment in quality of word embeddings. However, its not possible to apply techniques like ConceptNet on other languages because of their relative data scarcity. Our approach allows us to overcome this hurdle with encouraging results for languages that are lin- guistically similar to English. 6 Future Work While we were able to significantly improve on baseline scores of Urdu and beat previ- ous state of the art systems for German and French, and also improve scores by porting two models to generate word embeddings for missing words, we could further extend this approach by creating transformation matrix for not only two, but for all possible 10 Akhtar et al. Table 8. Inter-Language comparison of results. "Increase on SG" denotes the difference between the mentioned systems and the scores of SkipGram embeddings trained on the target languages - fr-SG, de-SG and ur-SG respectively. We are not using ConceptNet-T for this comparison because any equivalent embedding is not available for Hindi. System Language Pair Increase on SG hi-SG-T en-SG-T English-French en-SG-T English-German 15.58 6.14 2.34 Hindi-Urdu combinations of models available. This way, when ever a particular model is being used for a particular task, we can look for a missing word in other models and use its transformed representation accordingly. Significant improvement in training word em- beddings by mapping from a source language to a linguistically similar target language, gives us the hypothesis that similar improvement can be achieved for training between different dialects of the same language and we would like to test the approach further on such pairs. What we could also do is choosing best available word representation of a word in two or more models. For example, even though we have a word present in our model, but its representation is not reliable because of its low frequency in the corpus it was trained on or we are able to detect somehow that it is not well trained. We could then use a more reliable word embedding from other models, transform it for our model, and then use it. We would still need to run various evaluation tasks on this approach to see its impact and usage in future. We will also try to see if it can be modified to retain its character in one model, and import characteristics from its other word representations in other models, which are relatively more reliable. We could define a heuristic for the same, and evaluate on various different values of parameters in the heuristics. References 1. Bushra Jawaid, Amir Kamran, and Ondrej Bojar.: A Tagged Corpus and a Tagger for Urdu. LREC 2014. 2. Camacho-Collados, Jos, Mohammad Taher Pilehvar, and Roberto Navigli.: A Framework for the Construction of Monolingual and Cross-lingual Word Similarity Datasets. In ACL (2) (pp. 1-7). 3. Chris Dyer, Victor Chahuneau, and Noah A. Smith.: A Simple, Fast, and Effective Reparam- eterization of IBM Model 2. In proceedings of NAACL. 4. Colette Joubarne and Diana Inkpen.: A Comparison of semantic similarity for different lan- guages using the Google n-gram corpus and second-order co-occurrence measures. In Ad- vances in Artificial Intelligence - 24th Canadian Conference on Artificial Intelligence, pages 216-221. 5. Cyrus Shaoul and Chris Westbury.: The Westbury lab Wikipedia corpus. In Edmonton, AB: University of Alberta. 6. David Jurgens, Mohammad Taher Pilehvar, and Roberto Navigli.: Semeval-2014 task 3: Cross-level semantic similarity. Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval 2014) in conjunction with COLING. 2014. An Unsupervised Approach for Mapping between Vector Spaces 11 7. Herbert Rubenstein and John B. Goodenough.: Contextual correlates of synonym. Communi- cations of the ACM, volume 8, number 10, pages 627-633. 8. Lev Finkelstein, Evgeniy Gabrilovich, Yossi Matias, Ehud Rivlin, Zach Solan, Gadi Wolfman and Eytan Ruppin.: Placing search in context. Proceedings of the 10th international conference on World Wide Web, pages 406-414. 9. Manaal Faruqui, Jesse Dodge, Sujay K. Jauhar, Chris Dyer, Eduard Hovy.: Retrofitting word vectors to semantic lexicons. In proceedings of NAACL. 10. Minh-Thang Luong, Richard Socher and Christopher D. Manning.: Minh-Thang Luong, Richard Socher and Christopher D. Manning. In CoNLL. Pages 104-113. 11. Mohit Bansal, Kevin Gimpel, and Karen Livescu. :Tailoring continuous word representations for dependency parsing. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics, ACL 2014, June 22-27, Baltimore, MD, USA, Volume 2: Short Papers, pages 809-815. 12. Nadir Durrani, Hassan Sajjad, Alexander Fraser, and Helmut Schmid. 2010. Hindi-to-Urdu machine translation through transliteration. in Proceedings of the 48th Annual meeting of the Association for Computational Linguistics, pp. 465-474. Association for Computational Linguistics, 2010. 13. Omer Levy, Yoav Goldberg, and Ido Dagan. 2002. Improving distributional similarity with lessons learned from word embeddings. Transactions of the Association for Computational Linguistics 3 (2015): 211-225 14. Philipp Koehn. 2002. Europarl: A multilingual corpus for evaluation of machine transla- tion. Proceedings of the 43rd Annual Meeting on Association for Computational Linguistics. Association for Computational Linguistics, 2005. 15. Radu Soricut and Franz Och. 2015. Unsupervised Morphology Induction using Word Em- beddings. In Proceedings of NAACL. 16. Richard Socher, John Bauer, Christopher D. Manning, and Andrew Y. Ng. 2013. Parsing With Compositional Vector Grammars. In ACL, pages 455-465. 17. Robert Speer 2016. Ensemble Method to Produce High-Quality Word Embeddings. arXiv preprint arXiv:1604.01692 (2016). 18. Scott Miller, Jethran Guinness, and Alex Zamanian. 2004. Name tagging with word clusters and discriminative training. In Proceedings of HLT-NAACL, volume 4, pages 337-342. 19. Syed Sarfaraz Akhtar, Arihant Gupta, Avijit Vajpayee, Arjit Srivastava, Manish Shrivastava 2017. Word Similarity Datasets for Indian Languages: Annotation and Baseline Systems. Proceedings of the 11th Linguistic Annotation Workshop, pages 91-94. 20. Tomas Mikolov, Kai Chen, Greg Corrado, and Jeff Dean. 2013. Efficient estimation of word representations in vector space. In In arXiv preprint arXiv:1301.3781 21. Tomas Mikolov, Quoc V. Le, and Ilya Sutskever. 2013. Exploiting similarities among lan- guages for machine translation. arXiv preprint arXiv:1309.4168 (2013). 22. Tomas Mikolov, Wen-tau Yih, and Geoffrey Zweig. 2013. Linguistic regularities in continu- ous space word representations. In Proceedings of HLT-NAACL, volume 13, pages 746-751. 23. Torsten Zesch and Iryna Gurevych. 2006. Automatically creating datasets for measures of semantic relatedness. In Proceedings of the Workshop on Linguistic Distances, pages 16-24.
1904.09537
1
1904
2019-04-21T03:49:09
PullNet: Open Domain Question Answering with Iterative Retrieval on Knowledge Bases and Text
[ "cs.CL", "cs.LG" ]
We consider open-domain queston answering (QA) where answers are drawn from either a corpus, a knowledge base (KB), or a combination of both of these. We focus on a setting in which a corpus is supplemented with a large but incomplete KB, and on questions that require non-trivial (e.g., ``multi-hop'') reasoning. We describe PullNet, an integrated framework for (1) learning what to retrieve (from the KB and/or corpus) and (2) reasoning with this heterogeneous information to find the best answer. PullNet uses an {iterative} process to construct a question-specific subgraph that contains information relevant to the question. In each iteration, a graph convolutional network (graph CNN) is used to identify subgraph nodes that should be expanded using retrieval (or ``pull'') operations on the corpus and/or KB. After the subgraph is complete, a similar graph CNN is used to extract the answer from the subgraph. This retrieve-and-reason process allows us to answer multi-hop questions using large KBs and corpora. PullNet is weakly supervised, requiring question-answer pairs but not gold inference paths. Experimentally PullNet improves over the prior state-of-the art, and in the setting where a corpus is used with incomplete KB these improvements are often dramatic. PullNet is also often superior to prior systems in a KB-only setting or a text-only setting.
cs.CL
cs
PullNet: Open Domain Question Answering with Iterative Retrieval on Knowledge Bases and Text Haitian Sun Tania Bedrax-Weiss William W. Cohen {haitiansun,tbedrax,wcohen}@google.com Google AI Language 9 1 0 2 r p A 1 2 ] L C . s c [ 1 v 7 3 5 9 0 . 4 0 9 1 : v i X r a Abstract We consider open-domain queston answering (QA) where answers are drawn from either a corpus, a knowledge base (KB), or a combi- nation of both of these. We focus on a set- ting in which a corpus is supplemented with a large but incomplete KB, and on questions that require non-trivial (e.g., "multi-hop") rea- soning. We describe PullNet, an integrated framework for (1) learning what to retrieve (from the KB and/or corpus) and (2) reasoning with this heterogeneous information to find the best answer. PullNet uses an iterative process to construct a question-specific subgraph that contains information relevant to the question. In each iteration, a graph convolutional net- work (graph CNN) is used to identify subgraph nodes that should be expanded using retrieval (or "pull") operations on the corpus and/or KB. After the subgraph is complete, a simi- lar graph CNN is used to extract the answer from the subgraph. This retrieve-and-reason process allows us to answer multi-hop ques- tions using large KBs and corpora. PullNet is weakly supervised, requiring question-answer pairs but not gold inference paths. Experimen- tally PullNet improves over the prior state-of- the art, and in the setting where a corpus is used with incomplete KB these improvements are often dramatic. PullNet is also often supe- rior to prior systems in a KB-only setting or a text-only setting. Introduction 1 Open domain Question Answering (QA) is the task of finding answers to questions posed in nat- ural language, usually using text from a corpus (Dhingra et al., 2017; Joshi et al., 2017; Dunn et al., 2017), or triples from a knowledge base (KB) (Zelle and Mooney, 1996; Zettlemoyer and Collins, 2005; Yih et al., 2015). Both of these ap- proaches have limitations. Even the largest KBs are incomplete (Min et al., 2013), which limits recall of a KB-based QA system. On the other hand, while a large corpus may contain more an- swers than a KB, the diversity of natural language makes corpus-based QA difficult (Chen et al., 2017; Welbl et al., 2018; Kwiatkowski et al., 2019; Yang et al., 2018). In this paper we follow previous research (Sawant et al., 2019; Sun et al., 2018) in deriving answers using both a corpus and a KB. We focus on tasks in which questions require compositional (sometimes called "multi-hop") reasoning, and a setting in which the KB is incomplete, and hence must be supplemented with information extracted from text. We also restrict ourselves in this paper to answers which correspond to KB entities. For this setting, we propose an integrated framework for (1) learning what to retrieve, from either a cor- pus, a KB, or a combination, and (2) combining this heterogeneous information into a single data structure that allows the system to reason and find the best answer. In prior work, this approach was termed an early fusion approach, and shown to im- prove over late fusion methods, in which two QA systems, one corpus-based and one KB-based, are combined in an ensemble. The system we describe, PullNet, builds on the GRAFT-Net1 early fusion system. GRAFT-Net uses heuristics to build a question-specific sub- graph which contains sentences from the corpus, entities from the KB, and facts from the KB. A graph CNN (Kipf and Welling, 2016; Li et al., 2016; Schlichtkrull et al., 2017) variant is then used to reason over this graph and select an an- swer. However, as we will show experimentally, GRAFT-Net's heuristics often produce subgraphs that far from optimal: they are generally much larger than necessary, and often do not contain the answer at all. 1Graphs of Relations Among Facts and Text Networks. PullNet also uses a reasoning process based on a graph CNN to find answers. However, PullNet learns how to construct the subgraph, rather than using an ad hoc subgraph-building strategy. More specifically, PullNet relies on a small set of re- trieval operations, each of which takes a node in an existing subgraph, and then expand the node by retrieving new information from the KB or the cor- pus. PullNet learns when and where to apply these "pull" operations with another graph CNN classi- fier. The "pull" classifier is weakly supervised , using question-answer pairs for supervision. The end result is a learned iterative process for subgraph construction, which begins with a small subgraph containing only the question text and the entities which it contains, and gradually expands the subgraph to contain information from the KB and corpus that are likely to be useful. The in- cremental question-guided subgraph construction process results in high-recall subgraphs that are much smaller than the ones created heuristically, making the final answer extraction process easier. The process is especially effective for multi-hop questions, which naively would require expand- ing the subgraph to include all corpus and KB ele- ments that are k hops away from the question. PullNet improves over the current state-of- the-art for KB-only QA on several benchmark datasets, and is superior to, or competitive with, corpus-only QA on several others. For multi-hop questions, this improvement is often dramatic: for instance, MetaQA (Zhang et al., 2018) contains multi-hop questions based on a small movie KB, originally associated with the WikiMovies dataset (Miller et al., 2016). In a KB-only setting, Pull- Net improves hits-at-one performance for 3-hop MetaQA questions from 62.5% to 91.4%. Perhaps more interestingly, PullNet obtains performance of 85.2% hits-at-one with a KB from which half of the triples have been removed, if that KB is supplemented with a corpus. We note that this re- sult improves by 7% (absolute improvement) over a pure corpus-based QA system, and by more than 25% over a pure KB-based QA system. In a simi- lar incomplete-KB setting, PullNet improves over GRAFTNet by 6.8% on the ComplexWebQues- tions dataset (Talmor and Berant, 2018). 2 Related Work This paper has focused on QA for multi-hop ques- tions using large KBs and text corpora as the information sources from which answers can be drawn. The main technical contribution is an it- erative question-guided retrieval mechanism that retrieves information from KBs, corpora, or com- binations of both. The iterative retrieval makes it possible to follow long paths of reasoning on large KBs, and as we show below, this leads to new state-of-the art results on two datasets of this sort. The hybrid KB/text retrieval, and the ability to reason over combinations of text and KBs, lets us extend these results to settings where only text is available, and to settings where text and an in- complete KB is available. These contributions are based on much prior work. A long line of QA models have been developed which answer questions based on a single passage of text (Dhingra et al., 2016; Yu et al., 2018; Seo et al., 2016; Gao et al., 2018; Liu et al., 2017; De- vlin et al., 2018). Generally, these "reading com- prehension" systems operate by encoding the pas- sage and question into an embedding space, and due to memory limitations cannot be applied to a large corpus instead of a short passage. To address this limitation a number of systems have been de- signed which use a "retrieve and read" pipeline (Chen et al., 2017; Dhingra et al., 2017; Joshi et al., 2017; Dunn et al., 2017; Wang et al., 2018, 2017), in which a retrieval system with high re- call is piped into a reading comprehension system that can find the answer. An alternative approach is "phrase-indexed" QA (Seo et al., 2018), where embedded phrases in a document are indexed and searched over. Such systems differ from PullNet in that only a single round of retrieval is used; however, for questions that requires multi-hop rea- soning, we believe is difficult for a single retrieval step to find the relevant information. These sys- tems are also not able to use both KB and text for QA. SplitQA (Talmor and Berant, 2018) is a text- based QA system that cam decompose complex questions (e.g. conjunction, composition) into simple subquestions, and perform retrieval on them sequentially. Although it uses iterative re- trieval for multi-hop questions, unlike PullNet, SplitQA does not also use a KB as an information source. Also, since SplitQA has been applied only to the Complex WebQuestions dataset, it is unclear how general its question decomposition methods are. There has also been much work on QA from KBs alone, often using methods based on mem- ory networks (Sukhbaatar et al., 2015), seman- tic parsing (Zelle and Mooney, 1996; Zettlemoyer and Collins, 2005) or reinforcement learning Das et al. (2017a). Extending such KB-based work to also use text, however, is non-trivial. In (Das et al., 2017b) one approach for a hybrid text-based and KB-based QA system is described, where key- value memory networks are used to store text as well as KB facts encoded with a universal schema representation (Riedel et al., 2013). We use a similar method as one of our baselines, follow- ing (Sun et al., 2018). Another line of QA work from text and KBs is exemplified by AQQU (Bast and Haussmann, 2015) and its successors (Sawant et al., 2019). These systems focus on questions that, like the questions in the SimpleWebQues- tions dataset, can be interpreted as identifying an entity based on a relationship and related entity, plus (potentially) additional restrictions described in text, and it is unclear how to extend such ap- proaches to multi-hop questions. GRAFT-Net (Sun et al., 2018) supports multi- hop reasoning on both KBs and text by introduc- ing a question subgraph built with facts and text, and uses a learned graph representation (Kipf and Welling, 2016; Li et al., 2016; Schlichtkrull et al., 2017; Scarselli et al., 2009) to perform the "rea- soning" required to select the answer. We use the same representation and reasoning scheme as GRAFT-Net, but do not require that the entire graph be retrieved in a single step. In our experi- mental comparisons, this gives significant perfor- mance gains for multi-hop reasoning tasks. Combinations of KBs and text have also been used for relation extraction and Knowledge Base Completion (KBC) (Lao et al., 2012; Toutanova et al., 2015; Das et al., 2017a). The QA task dif- fers from KBC in that in QA, the inference process must be conditioned on a natural-language ques- tion, which leads to different constraints on which methods can be used. 3 The PullNet Model PullNet retrieves from two "knowledge sources", a text corpus and a KB. Given a question, PullNet will use these to construct a question subgraph that can be used to answer the question. The question subgraph is constructed iteratively. Initially the subgraph depends only on the question. PullNet then iteratively expands the subgraph by choos- ing nodes from which to "pull" information about, from the KB or corpus as appropriate. The ques- tion subgraph is heterogeneous, and contains both entities, KB triples, and entity-linked text. In this section, we will first introduce notation defining the heterogeneous graph structure we use. Then we will introduce the general iterative re- trieval process. Finally, we will discuss the re- trieval operations used on the corpus and KB, and the classification operations on the graph which determine where to perform the retrievals. 3.1 The Question Subgraph A question subgraph for question q, denoted Gq = {V,E}, is a hetogeneous graph that contains infor- mation from both the text corpus and the KB rele- vant to q. Let V denote the set of vertices, which we also call nodes. Following GRAFT-Net (Sun et al., 2018), there are three types of nodes: entity nodes Ve, text nodes Vd, and fact nodes Vf , with V = Ve∪Vd∪Vf . A entity node ve ∈ Ve represents an entity from the knowledge base. A text node vd ∈ Vd represents a document from the corpus, with a sequence of tokens denoted (w1, . . . , wd). In this paper, a document is always a single sen- tence, to which an entity linker (Ji et al., 2014) has been applied to detect and ground entity mentions. A fact node vf ∈ Vf represents a triplet (vs, r, vo) from the KB, with subject and objects vs, vo ∈ Ve and relation r. We let E denote the set of edges between nodes. An edge connects a fact node vf and an entity node ve exists iff fact vf has ve as its subject or object. An edge connects a text node vd with entity node ve iff the entity is mentioned in the text. 3.2 Iterative subgraph expansion and classification 3.2.1 Overview We start with a question subgraph G0 q = {V 0,E 0} where V 0 = {eqi} is the list of entities mentioned in the question and E 0 is an empty set. We iter- atively expand the question subgraph G0 q until it contains the information required to answer the question. The algorithm is shown in Alg 1. Briefly, we expand the graph in T iterations. In each iteration, we choose k entities to expand, and then for each selected entity, we retrieve a set of related docu- ments, and also a set of related facts. The new doc- uments are then passed through an entity-linking system to identify entities that occur in them, and the head and tail entities of each fact will also be extracted. The last stage in the iteration is to up- date the question graph by adding all these new edges. After the t-th iteration of expansion, an ad- ditional classification step is applied to the final question subgraph which predicts the answer en- tity. Algorithm 1 PullNet 1: Initialize question graph G0 2: for t = 1,··· , T do 3: entities, with V 0 = {eqi} and E 0 = ∅. q with question q and question Classify and select the entity nodes in the graph with probability larger than  {vei} = classify pullnodes(Gt q, k) for all ve in {vei} do Perform pull operation on selected entity nodes {vdi} = pull docs(ve, q) {vfi} = pull facts(ve, q) for all vd in {vdi} do Extracted entities in new document nodes {ve(d)i} = pull entities(vd) for all vf in {vfi} do Extract head and tail of new fact nodes {ve(f )i} = pull headtail(vf ) Add new nodes and edges to question graph 4: 5: 6: 7: 8: 9: 10: Gt+1 q = update(Gt q) 11: Select entity node in final graph that is the best answer vans = classify answer(GT q ) We will now describe the operations used in Alg 1. 3.2.2 Pull Operations Pull operations either retrieve information from a knowledge source, or extract entities from a fact or document. The two extraction operations are relatively simple. The pull entities(vd) operation in- puts a document node vd, calls an entity linker and returns all entities mentioned in vd. The pull headtail(vf ) operation inputs a fact node vf and returns the subject and object entity of fact vf . The retrieval operations are more complex. The pull docs(ve, q)) operation retrieves relevant documents from the corpus. We use an IDF-based retrieval system, Lucene (McCandless et al., 2010) and assume that all sentences have been entity- linked prior to being indexed. The retrieved docu- ments are constrained to link to entity ve, and are ranked by their IDF similarity to the question q. Only the top Nd documents in this ranking are re- turned. The pull facts(ve, q) operation retrieves the top Nf facts from the KB about entity ve. The retrieved facts are constrained to have ve as their subject or object, and are ranked based on the sim- ilarity S(r, q) between the fact's relation r and the question q. Since it is not obvious how to as- sess relevance of a fact to a question q, we learn a S(r, q) as follows. Let hr be an embedding of re- lation r, which is looked up from an embedding ta- ble, and let q = (w1, . . . , wq) be the sequence of words for question q. Similarity is defined as the dot-product of the last-state LSTM representation for q with the embedding for r. This dot-product is then passed through a sigmoid function to bring it into a range of [0, 1]: as we explain below, we will train this similarity function as a classifier which predicts which retrieved facts are relevant to the question q. The final ranking method for facts is thus hq = LSTM(w1, . . . , wq) ∈ Rn S(r, q) = sigmoid(hT r hq) During subgraph 3.2.3 Classify Operations Two types of classify operations are applied to q. These operations are the nodes in a subgraph Gt applied only to the entity nodes in the graph, but they are based on node representations computed by the graph CNN, so the non-entity nodes and edges also affect the classification results. construction, q) operation the re- classify pullnodes(Gt turns a probability an entity node ve should be expanded in the next iteration. In subgraph con- struction, we choose the k nodes with the highest probability in each iteration. After the subgraph is q) operation predicts whether an entity node answers the question. The highest-scoring entity node is returned as the final answer. the classify answer(Gt complete, We use the same CNN architecture used by GRAFT-Net (Sun et al., 2018) for classification. GRAFT-Net's source is open-domain and it sup- ports node classification on heterogeneous graphs containing facts, entities, and documents. Graft- Net differs from other graph CNN implementa- tions, in using special mechanisms to distribute representations across different types of nodes and edges: notably, document nodes are represented with LSTM encodings, extended by mechanisms that allow the representations for entity nodes ve to be passed into a document vd that mentions ve, and mechanisms that allow the LSTM hidden states as- sociated with an entity mention to be passed out of vd to the associated entity node ve. 3.2.4 The Update Operation The update operation takes the question sub- graph Gt−1 from the previous iteration and up- dates it by adding the newly retrieved entity nodes {ve(f )i} ∪ {ve(d)i}, the text nodes {vdi}, and the fact nodes {vfi}. It also updates the set of edges E based on the definitions of Section 3.1. Note that some new edges are derived when pull operations are performed on text nodes and fact node, but other new edges may connect newly-added nodes with nodes that already exist in the previous sub- graph. q 3.3 Training To train PullNet, we assume that we only observe question and answer pairs, i.e., the actual infer- ence chain required to answer the question is la- tent. We thus need to use weak supervision to train the classifiers and similarity scores described above. To train these models, we form an approxima- tion of the ideal question subgraph for question q as follows. Note that in training, the answer enti- ties are available. We use these to find all shortest paths in the KB between the question entities and answer entities. Each entity e that appears in such a shortest path will be marked as a candidate inter- mediate entities. For each candidate intermediate entity e we record its minimal distance te from the question nodes. When we train the classify pullnodes classifier in iteration t, we treat as positive ex- amples only those entities e(cid:48) that are connected to a candidate intermediate entity e with distance et = t+1. Likewise in training the similarity func- tion S(hr, q) we treat as positive relations lead- ing to candidate intermediate entities e at distance et = t + 1. This encourages the retrieval to focus on nodes that lie on shortest paths to an answer. In training we use a variant of teacher forcing. When training, we pull from all entity nodes with a predicted score larger than some threshold , rather than only the top k nodes. If, during train- ing, a candidate intermediate entity is not retrieved in iteration te, we add it to the graph anyway. The values T and  are hyperparameters, but here we always pick for T , the number of retrieval steps, maximum length of the inference chain needed to ensure full coverage of the answers. We use the same classifier on the graph in the retrieval step as in answer selection, except that we change last fully-connected layer. The classi- fiers used for retrieval in the different iterations are identical. The learned parts of the model are implemented in PyTorch, using an ADAM optimizer (Kingma and Ba, 2014), and the full retrieval process of Alg 1 is performed on each minibatch. 4 Experiments and Results 4.1 Datasets MetaQA (Zhang et al., 2018) consists of more than 400k single and multi-hop (up to 3-hop) ques- tions in the domain of movies. The questions were constructed using the knowledge base provided by the WikiMovies (Miller et al., 2016) dataset. We use the "vanilla" version of the queries: for this version, the 1-hop questions in MetaQA are ex- actly the same as WikiMovies. We use the KB and text corpus that are supplied with the WikiMovies dataset (Miller et al., 2016), and run use a sim- ple exact match on surface forms to perform entity linking. The KB used here is relatively small, with about 43k entities and 135k triples. WebQuestionsSP (Yih et al., 2015) contains 4737 natural language questions that are answerable us- ing Freebase2. The questions require up to 2-hop reasoning from knowledge base, and 1-hop rea- soning using the corpus. We use Freebase as our knowledge base but for ease of experimentation restrict it to a subset of Freebase which contains all facts that are within 2-hops of any entity men- tioned in the questions of WebQuestionsSP. This smaller KB contains 164.6 million facts and 24.9 million entities. We use Wikipedia as our text corpus and again use a simple entity-linker: we link entities by exact matching to any surface form annotated in FACC1 project (Gabrilovich et al., 2013).3 Complex WebQuestions 1.1 (Complex WebQ) (Talmor and Berant, 2018) is generated from Web- QuestionsSP by extending the question entities or adding constraints to answers, in order to construct 2We use the same train/dev/test splits as GRAFT-Net (Sun 3If two overlapping spans are possible matches, we match et al., 2018). only the longer of them. more complex multi-hop questions4. There are four types of question: composition (45%), con- junction (45%), comparative (5%), and superlative (5%). The questions require up to 4-hops of rea- soning on knowledge base and 2-hops on the cor- pus. We use the same KB and corpus as used for WebQuestionsSP. MetaQA 1-hop MetaQA 2-hop MetaQA 3-hop WebQuestionsSP Complex WebQ Train 96,106 118,980 114,196 2,848 27,623 Dev 9,992 14,872 14,274 250 3,518 Test 9,947 14,872 14,274 1,639 3,531 Table 1: Statistics of all datasets. 4.2 Tasks We explored several different QA settings: KB only (complete), corpus only, incomplete KB only, and incomplete KB paired with the corpus. In the KB only complete setting, the answer al- ways exists in knowledge base: for all of these datasets, this is true because the questions were crowd-sourced to enforce this conditions. This is the easiest setting for QA, but arguably unrealistic, since with a more natural distribution of questions, a KB is likely to be incomplete. Note that PullNet can be used in this setting by simply removing the pull docs operation. In the text only setting we use only the corpus. Again, PullNet can operate in this setting by re- moving the pull facts operation. In the incomplete KB setting, we simulate KB- based QA on anincomplete KB by randomly dis- carding some of the triples in the KB: specifically, we randomly drop a fact from the knowledge base with probability p = 50%. In the incomplete KB plus text setting, we pair the same incomplete knowledge base with the cor- pus. In principle this allows a learned QA sys- tem to adopt many different hybrid strategies. For simple 1-hop queries, a model might use the KB when the required fact exists, and "back off" to text when the KB is missing information. In mul- tihop or conjunctive queries, the reasoning done in answering the question might involve combin- ing inferences done with text and inferences done with KB triples. 4We use Complex WebQuestions v1.1, where the author re-partition the train/dev/test data to prevent the leakage of information. Comment. One point to note is that our train- ing procedure is based on finding shortest paths in a complete KB, and we use this same procedure on the incomplete KB setting as well. Thus the weak training that we use should, in the incomplete- KB settings, be viewed as a form of weak su- pervision, with labels that are intermediate in in- formativeness between pure distant training (with only question-answer pairs) and gold inference paths (a setting that has been extensively investi- gated on some of these datasets, in particular Web- QuestionsSP). 4.3 Baselines We choose Key-Value Memory Network (Miller et al., 2016) and GRAFT-Net (Sun et al., 2018) as our baseline models: to the best of our knowledge, these are the only ones that can use both text and KBs for question answering. However, both mod- els are limited in the number of facts and text that can fit into memory. Thus, we create a separate re- trieval process as a pre-processing step, which will be discussed below. Key-Value Memory Network (KVMem) (Miller et al., 2016) maintains a memory table which stores KB facts and text encoded into key-value pairs. The encoding of KB facts is the same as is presented in Miller et al. (2016). For text, we use an bi-directional LSTM to encode the text for the key and take the entities mentioned in the text as values. Our implementation shows comparable performance on the WikiMovies (MetaQA 1-hop) datasets as reported previously, as shown in Table 2. For GRAFT-Net (Sun et al., 2018), we use the implementation published by the author5; how- ever, we run it on somewhat different data as de- scribed in Section 4.4. 4.4 Subgraph Retrieval for Baseline Models Text was retrieved (non-iteratively) using the IDF- based similarity to the question. It is less obvi- ous how to perform KB retrieval: we would like to retrieve as many facts as possible to maximize the recall of answers, but it is infeasible to take all facts that are within k-hop away from question entities since the number grows exponentially, and there is no widely-used heuristic, corresponding to IDF-based text retrieval, for extracting subsets of 5https://github.com/OceanskySun/ GraftNet 50% KB 63.6 64 65.1 MetaQA (1-hop) / wikimovies 50% KB KB + Text 75.7 96.2 91.5 97.0 92.4 97.0 -- 93.9 92.6 96.8 97.5 -- Text 75.4 82.5 84.4 76.2 86.6 -- -- 68.0 -- KB 82.7 94.8 99.9 -- -- 89.9 KV-Mem* GraftNet* PullNet (Ours) KV-Mem GraftNet VRN 50% KB 41.8 52.6 52.1 MetaQA (2-hop) Text 7.0 36.2 81.0 -- -- -- -- -- -- 50%KB + Text 48.4 69.5 90.4 -- -- -- MetaQA (3-hop) Text 19.5 40.2 78.2 -- -- -- 50% KB 37.6 59.2 59.7 -- -- -- 50% KB + Text 35.2 66.4 85.2 -- -- -- KB 48.9 77.7 91.4 -- -- 62.5 Table 2: Hits@1 on MetaQA compared to baseline models. Number below the double line are from original papers: KV-Mem (KB) (Miller et al., 2016), KV-Mem (Text) (Watanabe et al., 2017), GraftNet (Sun et al., 2018), and VRN (Zhang et al., 2018). * Reimplemented or different data. a KB. We elected to first run the PageRank-Nibble algorithm (Andersen et al., 2006) with  = 1e−6 and pick the top m entities. PageRank-Nibble ef- ficiently approximates a personalized PageRank (aka random walk with reset) seeded from the questions (not the answers, which are of course not available at test time). We then find all entities from these top m entities that are within k-hops of the question entities. Finally, we collect all facts from the knowledge base that connect any pair of the retrieved entities. This allows us to easily vary the number of KB facts that are retrieved. The retrieval results are shown in Table 3 and 4. For the smaller MetaQA KB, the proposed re- trieval method finds high-coverage graphs. For ComplexWebQuestions, the recall is only 64%, even with a graph with nearly 2000 nodes: this is expected, since retrieving the relevant entities for a multi-hop question from a KB with millions of entities is a difficult task. wikimovies-KB wikimovies-KB (50%) 1-hop 2-hop 3-hop 0.995 / 9.17 0.983 / 47.3 0.923 / 459.2 0.544 / 4.58 0.344 / 28.6 0.522 / 316.6 Table 3: Retrieval performance for baseline retrieval model on MetaQA with 500 PageRank-Nibble entities (recall / # entities in graph) WebQuestionsSP Complex WebQ Freebase 0.927 / 1876.9 0.644 / 1948.7 Freebase (50%) 0.485 / 1212.5 0.542 / 1849.2 Table 4: Retrieval performance for baseline retrieval model on WebQuestionsSP and Complex WebQues- tions with 2000 PageRank-Nibble entities (recall / # entities in graph) 4.5 Main Results 4.5.1 MetaQA The experimental results for MetaQA are shown in Table 2. For 1-hop questions in MetaQA (which is identical to WikiMovies), our model is compara- ble to the state-of-the-art6. For the other three set- tings, the performance of our re-implementation is slightly worse than the results reported in by orig- inal GRAFT-Net paper (Sun et al., 2018); this is likely because we use a simpler retrieval module. In the KB-only setting, PullNet shows a large improvement over the baseline models on 2-hop and 3-hop questions. For the text only setting, PullNet also improves on the baselines, and other prior models, by a large margin. Finally, PullNet also shows significant improvements over base- lines in the text and incomplete-KB-plus-text set- tings. We also see that PullNet is able to effec- tively combine KB and text information, as this setting also greatly outperforms the incomplete KB alone or the text alone.7 4.5.2 WebQuestionsSP Table 5 presents the results on the WebQuestion- sSP dataset. PullNet is comparable with GRAFT- Net on the complete KB only setting and slightly worse on the text only setting, but is consis- tently better than GRAFT-Net on the incomplete KB setting or the incomplete KB plus text set- ting. It is also significantly better than the re- implemented GRAFT-Net, which uses the less highly-engineered retrieval module. 4.5.3 Complex WebQuestions Complex WebQuestions contains multi-hop ques- tions against FreeBase: intuitively, one would ex- pect that single-shot retrieval of facts and text would not be able to always find efficient infor- mation to answer such questions. Table 6 shows 66.7% questions in Wikimovies are ambiguous, e.g. ques- tions about movies with remakes without specifying years. 7Another way to perform QA in the incomplete KB plus text setting would be to ensemble two QA systems, one which uses the incomplete KB, and one which uses the text. Al- though we do not make that comparison here, prior work (Sun et al., 2018) did show that GRAFT-Net outperforms such "late fusion" approaches. WebQuestionsSP KV-Mem* GraftNet* PullNet (Ours) GraftNet NSM KB 46.7 66.4 68.1 67.8 69.0 (F1) Text 23.2 24.9 24.8 25.3 -- 50% KB 32.7 48.2 50.3 47.7 -- 50% KB + Text 31.6 49.7 51.9 49.9 -- Table 5: Hits@1 on WebQuestionsSP compared to baseline models. Number below the double line are from original papers: GraftNet (Sun et al., 2018), and NSM (Liang et al., 2017) (which only reports F1 in their paper). * Reimplemented or different data. our results for Complex WebQuestions on the de- velopment set. An expected, PullNet shows sig- nificant improvement over GRAFT-Net and KV- Mem on all four settings. Once again we see some improvement when pairing the incomplete knowl- edge base with text, compared to using the incom- plete knowledge base only or the text only. Complex WebQuestions (dev) 50% KB KB + Text 15.2 21.1 32.8 26.9 33.7 47.2 50% KB 14.8 26.1 31.5 Text 7.4 10.6 13.1 KV-Mem* GraftNet* PullNet (Ours) Table 6: Hits@1 on Complex WebQuestions (dev) compared to baseline models. * Reimplemented or dif- ferent data. Complex WebQuestions (test) GoogleSnippet Wikipedia Freebase SplitQA PullNet 34.2 29.7 -- 13.8 -- 45.9 Table 7: Hits@1 on Complex WebQuestions (test). Researchers are only allowed limited submis- sions on the Complex WebQuestions test set, how- ever, some results for the test set are shown in Ta- ble 7. Results with the text-only (Wikipedia) set- ting are comparable to the dev set results (13.8% instead of 13.1%) as are results with the KB-only setting (45.9% instead of 47.2%). For completeness, we also compare to SplitQA (Talmor and Berant, 2018). SplitQA takes a multi- hop question and decomposes it into several sim- ple sub-questions, and sends each of these to sub- questions to the Google search engine. After that, it applies a reading comprehension model to gather information from the web snippets returned by Google to find answers. Using this same collec- tion of Google snippets as the corpus, our model has 4.5% lower hists-at-one than SplitQA. How- ever, the snippet corpus is arguably biased toward the SplitQA model, since it was collected specif- ically to support it. We also note unlike SplitQA, PullNet relies only on open-source components and corpora. 4.6 Further Results 4.6.1 Retrieval Performance of PullNet We compare the retrieval performance of PullNet and PageRank-Nibble on multi-hop questions with a complete KB, varying the number of entities re- trieved by PageRank-Nibble. The results in Figure 1 show that PullNet retrieves far fewer entities but obtains higher recall. Figure 1: Recall of graphs retrieved by PageRank- Nibble compared with PullNet. Left: MetaQA (3-hop). Right: Complex WebQuestions. We also further explored the effectiveness of it- erative retrieval for multi-hop questions on a text corpus. The results are shown in Figure 2. Again, PullNet with multiple iterations of retrieval, ob- tains higher recall than a single iteration of IDF- based retrieval on both the MetaQA (3-hop) and the Complex WebQuestions dataset. Figure 2: Recall of a single round of retrieval with Apache Lucene compared with PullNet. Left: MetaQA (3-hop). Right: Complex WebQuestions. Figure 3 shows the recall of question subgraphs on MetaQA (3-hop) questions as training pro- ceeds. Performance of the retrieval components of PullNet converges relatively quickly, with re- call saturating after 10-20,000 examples (about 10-20% of a single epoch). about 3 epochs for PullNet. Figure 3: Recall of question subgraph on MetaQA 3- hop questions. 4.6.2 Training Efficiency We also analyze the training efficiency of PullNet. PullNet's algorithm is quite different from prior systems, since learning and retrieval are inter- leaved: in most prior systems, including GRAFT- Net, retrieval is performed only once, before learn- ing. Intuitively, interleaving learning with the rel- atively slow operation of retrieval is potentially slower; on the other hand, PullNet's final ques- tion subgraph is smaller than GRAFT-Net, which makes learning potentially faster. To study these issues, we plot the Hits@1 per- formance of learned model versus wall clock time in Figure 4. This experiment is run on Complex WebQuestions in the KB-only setting, using one high-end GPU. To be fair to GRAFT-Net, we used a fast in-memory implementation of PageRank- Nibble (based on SciPy sparse matrices), which takes about 40 minutes to complete. GRAFT-Net takes an average of 31.9 minutes per epoch, while PullNet is around four times slower, taking an av- erage of 114 minutes per epoch. As the graph shows, initially PullNet's perfor- mance is better, since GRAFT-Net cannot start learning until the preprocessing finishes. GRAFT- Net's faster learning speed then allows it to domi- nates for some time. GRAFT-Net reaches its peak performance in about 3.6 hours. PullNet passes GRAFT-Net in hits-at-one after around 6 hours, or Figure 4: Performance of PullNet and GRAFT-Net un- der wall clock training time. 5 Conclusions PullNet is a novel integrated QA framework for (1) learning what to retrieve from a KB and/or corpus and (2) reasoning with this heterogeneous to find the best answer. Unlike prior work, PullNet uses an iterative process to construct a question-specific subgraph that contains information relevant to the question. In each iteration, a graph-CNN is used to identify subgraph nodes that should be expanded using retrieval (or "pull") operations on the corpus and/or KB. This iterative process makes it possible to retrieve a small graph that contains just the in- formation relevant to a multi-hop question -- a task that is in general difficult. Experimentally PullNet improves over the prior state-of-the art for the setting in which questions are answered with a corpus plus an incomplete KB, or in settings in which questions need com- plex "multi-hop" reasoning. Sometimes the per- formance improvements are dramatic: e.g., an im- provement from 62.5% hits-at-one to 91.4% hits- at-one for 3-hop MetaQa with a KB, or improve- ments from 32.8% to 47.2% for Complex Web- Questions with a KB. References Reid Andersen, Fan Chung, and Kevin Lang. 2006. Local graph partitioning using pagerank vectors. In 2006 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS'06), pages 475 -- 486. IEEE. Hannah Bast and Elmar Haussmann. 2015. More ac- curate question answering on freebase. In Proceed- ings of the 24th ACM International on Conference on Information and Knowledge Management, pages 1431 -- 1440. ACM. Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. 2017. Reading Wikipedia to answer open- In Association for Computa- domain questions. tional Linguistics (ACL). Rajarshi Das, Shehzaad Dhuliawala, Manzil Za- heer, Luke Vilnis, Ishan Durugkar, Akshay Kr- ishnamurthy, Alex Smola, and Andrew McCal- lum. 2017a. Go for a walk and arrive at the an- swer: Reasoning over paths in knowledge bases arXiv preprint using reinforcement arXiv:1711.05851. learning. Rajarshi Das, Manzil Zaheer, Siva Reddy, and An- drew McCallum. 2017b. Question answering on knowledge bases and text using universal schema and memory networks. CoRR, abs/1704.08384. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understand- ing. arXiv preprint arXiv:1810.04805. Bhuwan Dhingra, Hanxiao Liu, Zhilin Yang, William W Cohen, and Ruslan Salakhutdinov. 2016. Gated-attention readers for text comprehen- sion. arXiv preprint arXiv:1606.01549. Bhuwan Dhingra, Kathryn Mazaitis, and William W Cohen. 2017. Quasar: Datasets for question an- arXiv preprint swering by search and reading. arXiv:1707.03904. Matthew Dunn, Levent Sagun, Mike Higgins, V Ugur Guney, Volkan Cirik, and Kyunghyun Cho. 2017. Searchqa: A new q&a dataset augmented with arXiv preprint context from a search engine. arXiv:1704.05179. Evgeniy Gabrilovich, Michael Ringgaard, and Amar- nag Subramanya. 2013. Facc1: Freebase annotation of clueweb corpora, version 1 (release date 2013-06- 26, format version 1, correction level 0). Mingfei Gao, Ruichi Yu, Ang Li, Vlad I Morariu, and Larry S Davis. 2018. Dynamic zoom-in network for In Proceed- fast object detection in large images. ings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6926 -- 6935. Heng Ji, Joel Nothman, Ben Hachey, et al. 2014. Overview of tac-kbp2014 entity discovery and link- In Proc. Text Analysis Conference ing tasks. (TAC2014), pages 1333 -- 1339. Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. Thomas N Kipf and Max Welling. 2016. Semi- supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907. Tom Kwiatkowski, Jennimaria Palomaki, Olivia Red- field, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Matthew Kelcey, Jacob Devlin, Kenton Lee, Kristina N. Toutanova, Llion Jones, Ming-Wei Chang, Andrew Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natu- ral questions: a benchmark for question answering research. Transactions of the Association of Com- putational Linguistics. Ni Lao, Amarnag Subramanya, Fernando Pereira, and William W Cohen. 2012. Reading the web with learned syntactic-semantic inference rules. In Pro- ceedings of the 2012 Joint Conference on Empiri- cal Methods in Natural Language Processing and Computational Natural Language Learning, pages 1017 -- 1026. Association for Computational Linguis- tics. Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. 2016. Gated graph sequence neu- ral networks. ICLR. Chen Liang, Jonathan Berant, Quoc Le, Kenneth D Forbus, and Ni Lao. 2017. Neural symbolic ma- chines: Learning semantic parsers on freebase with weak supervision. ACL. Rui Liu, Wei Wei, Weiguang Mao, and Maria Chik- ina. 2017. Phase conductor on multi-layered atten- tions for machine comprehension. arXiv preprint arXiv:1710.10504. Michael McCandless, Erik Hatcher, and Otis Gospod- Lucene in action: covers Apache netic. 2010. Lucene 3.0. Manning Publications Co. Alexander Miller, Adam Fisch, Jesse Dodge, Amir- Hossein Karimi, Antoine Bordes, and Jason We- ston. 2016. Key-value memory networks for directly reading documents. EMNLP. Bonan Min, Ralph Grishman, Li Wan, Chang Wang, and David Gondek. 2013. Distant supervision for relation extraction with an incomplete knowledge In NAACL HLT 2013 - 2013 Conference base. of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Proceedings of the Main Conference, pages 777 -- 782. Association for Computational Lin- guistics (ACL). Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. 2017. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehen- sion. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, Van- couver, Canada. Association for Computational Lin- guistics. Sebastian Riedel, Limin Yao, Andrew McCallum, and Benjamin M Marlin. 2013. Relation extraction with matrix factorization and universal schemas. In Pro- ceedings of the 2013 Conference of the North Amer- ican Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 74 -- 84. Uma Sawant, Saurabh Garg, Soumen Chakrabarti, and Ganesh Ramakrishnan. 2019. Neural architecture for question answering using a knowledge graph and Information Retrieval Journal, pages web corpus. 1 -- 26. Johannes Welbl, Pontus Stenetorp, and Sebastian Riedel. 2018. Constructing datasets for multi-hop reading comprehension across documents. Transac- tions of the Association of Computational Linguis- tics, 6:287 -- 302. Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Ben- gio, William Cohen, Ruslan Salakhutdinov, and Christopher D Manning. 2018. Hotpotqa: A dataset for diverse, explainable multi-hop question answer- ing. In Proceedings of the 2018 Conference on Em- pirical Methods in Natural Language Processing, pages 2369 -- 2380. Wen-tau Yih, Ming-Wei Chang, Xiaodong He, and Jianfeng Gao. 2015. Semantic parsing via staged query graph generation: Question answering with knowledge base. In Proceedings of the 53rd Annual Meeting of the Association for Computational Lin- guistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1321 -- 1331, Beijing, China. Associ- ation for Computational Linguistics. Adams Wei Yu, David Dohan, Minh-Thang Luong, Rui Zhao, Kai Chen, Mohammad Norouzi, and Quoc V Le. 2018. Qanet: Combining local convolution with global self-attention for reading comprehen- sion. arXiv preprint arXiv:1804.09541. John M Zelle and Raymond J Mooney. 1996. Learn- ing to parse database queries using inductive logic programming. In Proceedings of the Thirteenth Na- tional conference on Artificial intelligence-Volume 2, pages 1050 -- 1055. AAAI Press. Luke S Zettlemoyer and Michael Collins. 2005. Learn- ing to map sentences to logical form: structured classification with probabilistic categorial gram- In Proceedings of the Twenty-First Confer- mars. ence on Uncertainty in Artificial Intelligence, pages 658 -- 666. AUAI Press. Yuyu Zhang, Hanjun Dai, Zornitsa Kozareva, Alexan- der J Smola, and Le Song. 2018. Variational reason- ing for question answering with knowledge graph. In AAAI. Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. 2009. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61 -- 80. Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. 2017. Modeling relational data with graph convolu- tional networks. arXiv preprint arXiv:1703.06103. Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. 2016. Bidirectional attention flow for machine comprehension. arXiv preprint arXiv:1611.01603. Minjoon Seo, Tom Kwiatkowski, Ankur Parikh, Ali Farhadi, and Hannaneh Hajishirzi. 2018. Phrase- indexed question answering: A new challenge for scalable document comprehension. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 559 -- 564. Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. 2015. End-to-end memory net- works. In NIPS. Haitian Sun, Bhuwan Dhingra, Manzil Zaheer, Kathryn Mazaitis, Ruslan Salakhutdinov, and William W Co- hen. 2018. Open domain question answering using early fusion of knowledge bases and text. EMNLP. A. Talmor and J. Berant. 2018. The web as a knowledge-base for answering complex questions. In North American Association for Computational Linguistics (NAACL). Kristina Toutanova, Danqi Chen, Patrick Pantel, Hoi- fung Poon, Pallavi Choudhury, and Michael Gamon. 2015. Representing text for joint embedding of text In Proceedings of the 2015 and knowledge bases. Conference on Empirical Methods in Natural Lan- guage Processing, pages 1499 -- 1509. Shuohang Wang, Mo Yu, Xiaoxiao Guo, Zhiguo Wang, Tim Klinger, Wei Zhang, Shiyu Chang, Gerry Tesauro, Bowen Zhou, and Jing Jiang. 2018. R 3: Reinforced ranker-reader for open-domain question In Thirty-Second AAAI Conference on answering. Artificial Intelligence. Shuohang Wang, Mo Yu, Jing Jiang, Wei Zhang, Xiaoxiao Guo, Shiyu Chang, Zhiguo Wang, Tim Klinger, Gerald Tesauro, and Murray Campbell. 2017. re- ranking in open-domain question answering. CoRR, abs/1711.05116. Evidence aggregation for answer Yusuke Watanabe, Bhuwan Dhingra, and Ruslan Salakhutdinov. 2017. Question answering from unstructured text by retrieval and comprehension. arXiv preprint arXiv:1703.08885.
1910.11491
1
1910
2019-10-25T02:14:17
Attention Optimization for Abstractive Document Summarization
[ "cs.CL" ]
Attention plays a key role in the improvement of sequence-to-sequence-based document summarization models. To obtain a powerful attention helping with reproducing the most salient information and avoiding repetitions, we augment the vanilla attention model from both local and global aspects. We propose an attention refinement unit paired with local variance loss to impose supervision on the attention model at each decoding step, and a global variance loss to optimize the attention distributions of all decoding steps from the global perspective. The performances on the CNN/Daily Mail dataset verify the effectiveness of our methods.
cs.CL
cs
Attention Optimization for Abstractive Document Summarization Min Gui1, Junfeng Tian1, Rui Wang1, Zhenglu Yang2 1 Alibaba Group, China 2 School of Computer Science, Nankai University, China {guimin.gm, tjf141457, masi.wr}@alibaba-inc.com 9 1 0 2 t c O 5 2 ] L C . s c [ 1 v 1 9 4 1 1 . 0 1 9 1 : v i X r a [email protected] Abstract Attention plays a key role in the improve- ment of sequence-to-sequence-based docu- ment summarization models. To obtain a pow- erful attention helping with reproducing the most salient information and avoiding repeti- tions, we augment the vanilla attention model from both local and global aspects. We pro- pose an attention refinement unit paired with local variance loss to impose supervision on the attention model at each decoding step, and a global variance loss to optimize the atten- tion distributions of all decoding steps from the global perspective. The performances on the CNN/Daily Mail dataset verify the effec- tiveness of our methods. Introduction 1 Abstractive document summarization (Rush et al., 2015; Nallapati et al., 2016; Tan et al., 2017; Chen and Bansal, 2018; Celikyilmaz et al., 2018) at- tempts to produce a condensed representation of the most salient information of the document, as- pects of which may not appear as parts of the original input text. One popular framework used in abstractive summarization is the sequence-to- sequence model introduced by Sutskever et al. The attention mechanism (Bahdanau (2014). et al., 2014) is proposed to enhance the sequence- to-sequence model by allowing salient features to dynamically come to the forefront as needed to make up for the incapability of memorizing the long input source. However, when it comes to longer documents, basic attention mechanism may lead to distraction and fail to attend to the relatively salient parts. Therefore, some works focus on designing vari- ous attentions to tackle this issue (Tan et al., 2017; Gehrmann et al., 2018). We follow this line of re- search and propose an effective attention refine- ment unit (ARU). Consider the following case. Even with a preliminary idea of which parts of source document should be focused on (attention), sometimes people may still have trouble in decid- ing which exact part should be emphasized for the next word (the output of the decoder). To make a more correct decision on what to write next, people always adjust the concentrated content by reconsidering the current state of what has been summarized already. Thus, ARU is designed as an update unit based on current decoding state, aiming to retain the attention on salient parts but weaken the attention on irrelevant parts of input. The de facto standard attention mechanism is a soft attention that assigns attention weights to all input encoder states, while according to previ- ous work (Xu et al., 2015; Shankar et al., 2018), a well-trained hard attention on exact one input state is conducive to more accurate results compared to the soft attention. To maintain good performance of hard attention as well as the advantage of end- to-end trainability of soft attention, we introduce a local variance loss to encourage the model to put most of the attention on just a few parts of input states at each decoding step. Additionally, we propose a global variance loss to directly opti- mize the attention from the global perspective by preventing assigning high weights to the same lo- cations multiple times. The global variance loss is somewhat similar with the coverage mechanism (Tu et al., 2016; See et al., 2017), which is also designed for solving the repetition problem. The coverage mechanism introduces a coverage vec- tor to keep track of previous decisions at each decoding step and adds it into the attention cal- culation. However, when the high attention on certain position is wrongly assigned during pre- vious timesteps, the coverage mechanism hinders the correct assignment of attention in later steps. We conduct our experiments on the CNN/Daily Mail dataset and achieve comparable results on ROUGE (Lin, 2004) and METEOR (Denkowski and Lavie, 2014) with the state-of-the-art models. Our model surpasses the strong pointer-generator baseline (w/o coverage) (See et al., 2017) on all ROUGE metrics by a large margin. As far as we know, we are the first to introduce explicit loss functions to optimize the attention. More importantly, the idea behind our model is simple but effective. Our proposal could be applied to improve other attention-based models, which we leave these explorations for the future work. 2 Proposed model 2.1 Model Architecture We adopt the Pointer-Generator Network (PGN) (See et al., 2017) as our baseline model, which augments the standard attention-based seq2seq model with a hybrid pointer network (Vinyals et al., 2015). An input document is firstly fed into a Bi-LSTM encoder, then an uni-directional LSTM is used as the decoder to generate the sum- mary word by word. At each decoding step, the attention distribution at and the context vector ct are calculated as follows: Figure 1: The process of attention optimization (better view in color). The original attention distribution (red bar on the left) is updated by the refinement gate rt and attention on some irrelevant parts are lowered. Then the updated attention distribution (blue bar in the middle) is further supervised by a local variance loss and get a final distribution (green bar on the right). be updated. Small value of rti indicates that the content of i-th position is not much relevant to cur- rent decoding state st, and the attention on i-th po- sition should be weakened to avoid confusing the model. The attention distribution is updated as fol- lows (the symbol (cid:12) means element-wise product): t = rt (cid:12) at ar (5) eti = vT tanh(Whhi + Wsst + battn) at = softmax(et) (cid:88) ct = atihi (1) (2) (3) i=1 where hi and st are the hidden states of the en- coder and decoder, respectively. Then, the token- generation softmax layer reads the context vector ct and current hidden state st as inputs to compute the vocabulary distribution. To handle OOVs, we inherit the pointer mechanism to copy rare or un- seen words from the input document (refer to See et al. (2017) for more details). To augment the vanilla attention model, we pro- pose the Attention Refinement Unit (ARU) mod- ule to retain the attention on the salient parts while weakening the attention on the irrelevant parts of input. As illustrated in Figure 1, the attention weight distribution at at timestep t (the first red histogram) is fed through the ARU module. In the ARU module, current decoding state st and atten- tion distribution at are combined to calculate a re- finement gate rt: 2.2 Local Variance Loss As discussed in section 1, the attention model putting most of attention weight on just a few parts of the input tends to achieve good perfor- mance. Mathematically, when only a small num- ber of values are large, the shape of the distribu- tion is sharp and the variance of the attention dis- tribution is large. Drawing on the concept of vari- ance in mathematics, local variance loss is defined as the reciprocal of its variance expecting the at- tention model to be able to focus on more salient parts. The standard variance calculation is based on the mean of the distribution. However, as pre- vious work (Huang et al., 1979; Jung et al., 2018) mentioned that the median value is more robust to outliers than the mean value, we use the median value to calculate the variance of the attention dis- tribution. Thus, local variance loss can be calcu- lated as: var(ar t ) = ti − ar t )2 (ar D(cid:88) T(cid:88) i=1 1 D (6) (7) rt = σ(W r s st + W r a at + br) (4) LL = 1 T 1 var(ar t ) +  t where σ is the sigmoid activation function, W r s , a and br are learnable parameters. rt represents W r how much degree of the current attention should where · is a median operator and  is utilized to avoid zero in the denominator. 2.3 Global Variance Loss To avoid the model attending to the same parts of the input states repeatedly, we propose another variance loss to adjust the attention distribution globally. Ideally, the same locations should be assigned a relatively high attention weight once at most. Different from the coverage mechanism (See et al., 2017; Tu et al., 2016) tracking attention distributions of previous timesteps, we maintain the sum of attention distributions over all decoder timesteps, denoted as A. The i-th value of A repre- sents the accumulated attention that the input state at i-th position has received throughout the whole decoding process. Without repeated high atten- tion being paid to the same location, the difference between the sum of attention weight and maxi- mum attention weight of i-th input state among all timesteps should be small. Moreover, the whole distribution of the difference over all input posi- tions should have a flat shape. Similar to the def- inition of local variance loss, the global variance loss is formulated as: (cid:88) t 1 D gi = LG = (ar ti) t ti) − max (ar D(cid:88) (gi − g)2 i=1 (8) (9) where gi represents the difference between the ac- cumulated attention weight and maximum atten- tion weight at i-th position. 2.4 Model Training The model is firstly pre-trained to minimize the maximum-likelihood loss, which is widely used in sequence generation tasks. We define y∗ = {y∗ T} as the ground-truth output sequence for a given input sequence x, then the loss function is formulated as: 1,··· , y∗ LM LE = − 1 T log(p(y∗ t x) (10) After converging, the model is further optimized with local variance loss and global variance loss. The mix of loss functions is: L = LM LE + λ1LL + λ2LG (11) where λ1 and λ2 are hyper-parameters. T(cid:88) t=1 3 Experiments 3.1 Preliminaries Dataset and Metrics. We conduct our model on the large-scale dataset CNN/Daily Mail (Hermann et al., 2015; Nallapati et al., 2016), which is widely used in the task of abstractive document summa- rization with multi-sentences summaries. We use the scripts provided by See et al. (2017) to obtain the non-anonymized version of the dataset with- out preprocessing to replace named entities. The dataset contains 287,226 training pairs, 13,368 validation pairs and 11,490 test pairs in total. We use the full-length ROUGE F11 and METEOR2 as our main evaluation metrics. Implementation Details. The data preprocess- ing is the same as PGN (See et al., 2017), and we randomly initialize the word embeddings. The hidden states of the encoder and the decoder are both 256-dimensional and the embedding size is also 256. Adagrad with learning rate 0.15 and an accumulator with initial value 0.1 are used to train the model. We conduct experiments on a single Tesla P100 GPU with a batch size of 64 and it takes about 50000 iterations for pre-training and 10000 iterations for fine-tuning. Beam search size is set to 4 and trigram avoidance (Paulus et al., 2018) is used to avoid trigram-level repetition. Tuned on validation set, λ1 and λ2 in the loss func- tion (Equation. 11) is set to 0.3 and 0.1, respec- tively. 3.2 Automatic Evaluation Result As shown in Table 1 (the performance of other models is collected from their papers), our model exceeds the PGN baseline by 3.85, 2.1 and 3.37 in terms of R-1, R-2 and R-L respectively and receives over 3.23 point boost on METEOR. FastAbs (Chen and Bansal, 2018) regards ROUGE scores as reward signals with reinforcement learn- ing, which brings a great performance gain. DCA (Celikyilmaz et al., 2018) proposes deep com- municating agents with reinforcement setting and achieves the best results on CNN/Daily Mail. Al- though our experimental results have not outper- formed the state-of-the-art models, our model has a much simpler structure with fewer parameters. Besides, these simple methods do yield a boost 1We use the official package pyrouge https://pypi. org/project/pyrouge/ 2http://www.cs.cmu.edu/alavie/METEOR/ Models ROUGE-1 ROUGE-2 ROUGE-L METEOR PREVIOUS WORKS PGN (See et al., 2017) PGN+Coverage (See et al., 2017) Intra-att.+RL (Paulus et al., 2018) FastAbs+RL (Chen and Bansal, 2018) DCA+RL (Shi et al., 2018) 36.44 39.53 39.87 40.88 41.69 PGN (ours) PGN+Coverage (ours) PGN+ARU +Local variance loss +Global variance loss OUR MODELS 36.72 39.75 37.41 39.45 40.29 15.66 17.28 15.82 17.80 19.47 15.76 17.42 16.01 17.26 17.76 33.41 36.38 36.90 38.54 37.92 33.40 36.36 34.05 35.99 36.78 16.65 18.72 - 20.38 - 17.19 19.73 18.03 19.02 19.88 Table 1: Performance on CNN/Daily Mail test dataset. in performance compared with PGN baseline and may be applied on other models with attention mechanism. We further evaluate how these optimization ap- proaches work. The results at the bottom of Ta- ble 1 verify the effectiveness of our proposed methods. The ARU module has achieved a gain of 0.97 ROUGE-1, 0.35 ROUGE-2, and 0.64 ROUGE-L points; the local variance loss boosts the model by 3.01 ROUGE-1, 1.6 ROUGE-2, and 2.58 ROUGE-L. As shown in Figure 2, the global variance loss helps with eliminating n-gram repe- titions, which verifies its effectiveness. 3.3 Human Evaluation and Case Study We also conduct human evaluation on the gen- erated summaries. Similar to the previous work (Chen and Bansal, 2018; Nallapati et al., 2017), we randomly select 100 samples from the test set of CNN/Daily Mail dataset and ask 3 human testers to measure relevance and readability of each summary. Relevance is based on how much salient information does the summary contain, and readability is based on how fluent and grammat- ical the summary is. Given an article, different people may have different understandings of the main content of the article, the ideal situation is that more than one reference is paired with the ar- ticles. However, most of summarization datasets contain the pairs of article with a single refer- ence summary due to the cost of annotating multi- references. Since we use the reference summaries as target sequences to train the model and assume that they are the gold standard, we give both arti- cles and reference summaries to the annotator to score the generated summaries. In other words, Models Reference PGN PGN+Coverage Our model Relevance Readability 5.00 2.27 2.46 2.74 5.00 4.30 4.88 4.92 Table 2: Human Evaluation: pairwise comparison be- tween our final model and PGN model. we compare the generated summaries against the reference ones and the original article to obtain the (relative) scores in Table 3. Each perspective is as- sessed with a score from 1 (worst) to 5 (best). The result in Table 2 demonstrate that our model per- forms better under both criteria w.r.t. See et al. (2017). Additionally, we show the example of summaries generated by our model and baseline model in Table 3. As can be seen from the table, PGN suffers from repetition and fails to obtain the salient information. Though with coverage mech- anism solving saliency and repetition problem, it generates many trivial facts. With ARU, the model successfully concentrates on the salient informa- tion, however, it also suffers from serious repeti- tion problem. Further optimized by the variance loss, our model can avoid repetition and gener- ate summary with salient information. Besides, our generated summary contains fewer trivial facts compared to the PGN+Coverage model. 4 Related Work The exploration on document summarization can be broadly divided into extractive and abstractive summarization. The extractive methods (Nalla- pati et al., 2017; Jadhav and Rajan, 2018; Shi Article: poundland has been been forced to pull decorative plastic easter eggs from their shelves over fears children may choke - because they look like cadbury mini eggs . trading standards officials in buckinghamshire and surrey raised the alarm over the chinese made decorations , as they were ' likely to contravene food imitation safety rules ' . the eggs have now been withdrawn nationwide ahead of the easter break . scroll down for video . poundland has been been forced to pull decorative plastic easter eggs from their shelves over fears they may choke - because they look like cadbury mini eggs -lrb- pictured is the poundland version -rrb- . the eggs bear a striking similarity to the sugar-coated chocolate treats with a brown ' speckle ' designed to make it look like a quail 's egg -lrb- cadbury mini eggs are pictured -rrb- . . . . ' parents should also be wary of similar products being offered for sale over the easter period at other stores or online . ' Reference Summary: Trading standards officials in buckinghamshire and surrey raised alarm. Officers said they were 'likely to contravene food imitation safety rules'. The eggs bear a striking similarity to the sugar-coated chocolate treats. PGN: Poundland has been forced to pull decorative plastic easter eggs from their shelves over fears children may choke - because they look like cadbury mini eggs. The eggs have now been withdrawn nationwide ahead of the easter break. The eggs have now been withdrawn nationwide ahead of the easter break. PGN+Coverage: Trading standards officials in buckinghamshire and surrey raised the alarm over the chinese made decorations , as they were ' likely to contravene food imitation safety rules ' the eggs have now been withdrawn nation- wide ahead of the easter break . the eggs bear a striking similarity to the sugar-coated chocolate treats with a brown ' speckle ' designed to make it look like a quail 's egg . + ARU: Eggs bear a striking similarity to the sugar-coated chocolate treats with a brown 'speckle' designed to make it look like a quail's egg. The eggs bear a striking similarity to the sugar-coated chocolate treats with a brown 'speckle' designed to make it look like a quail's egg. + Variance loss: Trading standards officials in buckinghamshire and surrey raised the alarm over the chinese made decorations, as they were 'likely to contravene food imitation safety rules'. The eggs have now been withdrawn nation- wide ahead of the easter break. The eggs bear a striking similarity to the sugar-coated chocolate treats with a brown 'speckle'. Table 3: The bold words in article are salient parts contained in reference summary. The blue words in generated summaries are salient information and the red words are repetition. formation, Chen et al. (2016) proposes a new at- tention mechanism to distract them in the decod- ing step to better grasp the overall meaning of in- put documents. We optimize attention using an attention refinement unit under the novel variance loss supervision. As far as we know, we are the first to propose explicit losses to refine the atten- tion model in abstractive document summarization tasks. Recently many models (Paulus et al., 2018; Celikyilmaz et al., 2018; Chen and Bansal, 2018; Zhou et al., 2018; Jiang and Bansal, 2018) have emerged taking advantage of reinforcement learn- ing (RL) to solve the discrepancy issue in seq2seq model and have yielded the state-of-the-art perfor- mance. 5 Conclusion In this paper, we propose simple but effective methods to optimize the vanilla attention mecha- nism in abstarctive document summarization. The results on CNN/Daily Mail dataset demonstrate the effectiveness of our methods. We argue that these simple methods are also adaptable to other summarization models with attention. Further ex- ploration on this and combination with other ap- proaches like RL remains as our future explo- ration. Besides, we will also conduct experiments on several other current summarization datasets like New York Times (NYT) (Paulus et al., 2018) and Newsroom (Grusky et al., 2018). Figure 2: With global variance loss, our model (green bar) can avoid repetitions and achieve comparable per- centage of duplicates with reference summaries. et al., 2018) select salient sentences from origi- nal document as a summary. In contrast, abstrac- tive summarization (Rush et al., 2015; Nallapati et al., 2016; See et al., 2017; Chen and Bansal, 2018) generates summaries word-by-word after digesting the main content of the document. Out- of-vocabulary(OOV), repetition, and saliency are three conspicuous problems need to be well solved in abstractive document summarization. Some works (Nallapati et al., 2016; See et al., 2017; Paulus et al., 2018) handle the OOV problem by introducing the pointer network. See et al. (2017) introduces a coverage mechanism, which is a vari- ant of the coverage vector (Tu et al., 2016) from Neural Machine Translation, to eliminate repeti- tions. However, there are just a few studies on saliency problem (Tan et al., 2017; Shi et al., 2018; Gehrmann et al., 2018). To obtain more salient in- References Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Neural machine translation by CoRR, Bengio. 2014. jointly learning to align and translate. abs/1409.0473. Asli Celikyilmaz, Antoine Bosselut, Xiaodong He, and Yejin Choi. 2018. Deep communicating agents for In Proceedings of the abstractive summarization. 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Hu- man Language Technologies, Volume 1 (Long Pa- pers), pages 1662 -- 1675. Association for Computa- tional Linguistics. Qian Chen, Xiaodan Zhu, Zhenhua Ling, Si Wei, and Hui Jiang. 2016. Distraction-based neural networks In Proceedings of the for modeling documents. Twenty-Fifth International Joint Conference on Ar- tificial Intelligence, IJCAI'16, pages 2754 -- 2760. AAAI Press. Yen-Chun Chen and Mohit Bansal. 2018. Fast abstrac- tive summarization with reinforce-selected sentence rewriting. In Proceedings of the 56th Annual Meet- ing of the Association for Computational Linguistics (Volume 1: Long Papers), pages 675 -- 686. Associa- tion for Computational Linguistics. Michael Denkowski and Alon Lavie. 2014. Meteor universal: Language specific translation evaluation for any target language. In Proceedings of the Ninth Workshop on Statistical Machine Translation, pages 376 -- 380. Association for Computational Linguis- tics. Sebastian Gehrmann, Yuntian Deng, and Alexander Rush. 2018. Bottom-up abstractive summarization. In Proceedings of the 2018 Conference on Empiri- cal Methods in Natural Language Processing, pages 4098 -- 4109. Association for Computational Linguis- tics. Max Grusky, Mor Naaman, and Yoav Artzi. 2018. Newsroom: A dataset of 1.3 million summaries with diverse extractive strategies. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Vol- ume 1 (Long Papers), pages 708 -- 719. Karl Moritz Hermann, Tom´as Kocisk´y, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Su- leyman, and Phil Blunsom. 2015. Teaching ma- In Advances in chines to read and comprehend. Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Sys- tems 2015, December 7-12, 2015, Montreal, Que- bec, Canada, pages 1693 -- 1701. T. Huang, G. Yang, and G. Tang. 1979. A fast two-dimensional median filtering algorithm. IEEE Transactions on Acoustics, Speech, and Signal Pro- cessing, 27(1):13 -- 18. Aishwarya Jadhav and Vaibhav Rajan. 2018. Extrac- tive summarization with swap-net: Sentences and In Pro- words from alternating pointer networks. ceedings of the 56th Annual Meeting of the Associa- tion for Computational Linguistics (Volume 1: Long Papers), pages 142 -- 151. Association for Computa- tional Linguistics. Yichen Jiang and Mohit Bansal. 2018. Closed-book training to improve summarization encoder mem- ory. In Proceedings of the 2018 Conference on Em- pirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 4067 -- 4077. Yunjae Jung, Donghyeon Cho, Dahun Kim, Sanghyun Woo, and In So Kweon. 2018. Discriminative fea- ture learning for unsupervised video summarization. CoRR, abs/1811.09791. Chin-Yew Lin. 2004. Rouge: A package for automatic In Text Summarization evaluation of summaries. Branches Out. Ramesh Nallapati, Feifei Zhai, and Bowen Zhou. 2017. Summarunner: A recurrent neural network based se- quence model for extractive summarization of doc- In Proceedings of the Thirty-First AAAI uments. Conference on Artificial Intelligence, February 4-9, 2017, San Francisco, California, USA., pages 3075 -- 3081. Ramesh Nallapati, Bowen Zhou, Cicero dos Santos, Caglar Gulcehre, and Bing Xiang. 2016. Ab- stractive text summarization using sequence-to- sequence rnns and beyond. In Proceedings of The 20th SIGNLL Conference on Computational Natural Language Learning, pages 280 -- 290. Association for Computational Linguistics. Romain Paulus, Caiming Xiong, and Richard Socher. 2018. A deep reinforced model for abstractive sum- marization. In International Conference on Learn- ing Representations. Alexander M. Rush, Sumit Chopra, and Jason Weston. 2015. A neural attention model for abstractive sen- In Proceedings of the 2015 tence summarization. Conference on Empirical Methods in Natural Lan- guage Processing, pages 379 -- 389. Association for Computational Linguistics. Abigail See, Peter J. Liu, and Christopher D. Manning. 2017. Get to the point: Summarization with pointer- generator networks. In Proceedings of the 55th An- nual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1073 -- 1083. Association for Computational Linguistics. Shiv Shankar, Siddhant Garg, and Sunita Sarawagi. 2018. Surprisingly easy hard-attention for sequence In Proceedings of the 2018 to sequence learning. Conference on Empirical Methods in Natural Lan- guage Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 640 -- 645. Jiaxin Shi, Chen Liang, Lei Hou, Juanzi Li, Zhiyuan Liu, and Hanwang Zhang. 2018. Deepchan- nel: Salience estimation by contrastive learning for extractive document summarization. CoRR, abs/1811.02394. Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural net- In Proceedings of the 27th International works. Conference on Neural Information Processing Sys- tems - Volume 2, NIPS'14, pages 3104 -- 3112, Cam- bridge, MA, USA. MIT Press. Jiwei Tan, Xiaojun Wan, and Jianguo Xiao. 2017. Abstractive document summarization with a graph- In Proceedings of based attentional neural model. the 55th Annual Meeting of the Association for Com- putational Linguistics (Volume 1: Long Papers), pages 1171 -- 1181. Association for Computational Linguistics. Zhaopeng Tu, Zhengdong Lu, Yang Liu, Xiaohua Liu, and Hang Li. 2016. Modeling coverage for neural machine translation. In Proceedings of the 54th An- nual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. In Advances in Neural 2015. Pointer networks. Information Processing Systems 28: Annual Con- ference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 2692 -- 2700. Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C. Courville, Ruslan Salakhutdinov, Richard S. Zemel, and Yoshua Bengio. 2015. Show, attend and tell: Neural image caption generation with visual attention. In Proceedings of the 32nd In- ternational Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pages 2048 -- 2057. Qingyu Zhou, Nan Yang, Furu Wei, Shaohan Huang, Ming Zhou, and Tiejun Zhao. 2018. Neural docu- ment summarization by jointly learning to score and select sentences. In Proceedings of the 56th Annual Meeting of the Association for Computational Lin- guistics (Volume 1: Long Papers), pages 654 -- 663. Association for Computational Linguistics.
1907.01968
1
1907
2019-07-03T14:31:45
Depth Growing for Neural Machine Translation
[ "cs.CL" ]
While very deep neural networks have shown effectiveness for computer vision and text classification applications, how to increase the network depth of neural machine translation (NMT) models for better translation quality remains a challenging problem. Directly stacking more blocks to the NMT model results in no improvement and even reduces performance. In this work, we propose an effective two-stage approach with three specially designed components to construct deeper NMT models, which result in significant improvements over the strong Transformer baselines on WMT$14$ English$\to$German and English$\to$French translation tasks\footnote{Our code is available at \url{https://github.com/apeterswu/Depth_Growing_NMT}}.
cs.CL
cs
Depth Growing for Neural Machine Translation Lijun Wu1,∗, Yiren Wang2,∗, Yingce Xia3,†, Fei Tian3, Fei Gao3, Tao Qin3, Jianhuang Lai1, Tie-Yan Liu3 1School of Data and Computer Science, Sun Yat-sen University; 2 University of Illinois at Urbana-Champaign; 3 Microsoft Research Asia; 1{wulijun3, stsljh}@mail2.sysu.edu.cn, [email protected], 3{Yingce.Xia, fetia, feiga, taoqin, tyliu}@microsoft.com Abstract While very deep neural networks have shown effectiveness for computer vision and text classification applications, how to increase the network depth of neural machine translation (NMT) models for better translation quality re- mains a challenging problem. Directly stack- ing more blocks to the NMT model results in no improvement and even reduces perfor- mance. In this work, we propose an effec- tive two-stage approach with three specially designed components to construct deeper NMT models, which results in significant improvements over the strong Transformer baselines on WMT14 English→German and English→French translation tasks1. 1 Introduction Neural machine translation (briefly, NMT), which is built upon deep neural networks, has gained rapid progress in recent years (Bahdanau et al., 2015; Sutskever et al., 2014; Sennrich et al., 2016b; He et al., 2016a; Sennrich et al., 2016a; Xia et al., 2017; Wang et al., 2019) and achieved sig- nificant improvement in translation quality (Has- san et al., 2018). Variants of network structures have been applied in NMT such as LSTM (Wu et al., 2016), CNN (Gehring et al., 2017) and Transformer (Vaswani et al., 2017). 9 1 0 2 l u J 3 ] L C . s c [ 1 v 8 6 9 1 0 . 7 0 9 1 : v i X r a Training deep networks has always been a chal- lenging problem, mainly due to the difficulties in optimization for deep architecture. Breakthroughs have been made in computer vision to enable deeper model construction via advanced initializa- tion schemes (He et al., 2015), multi-stage train- ing strategy (Simonyan and Zisserman, 2015), and ∗The first two authors contributed equally to this work. †Corresponding author. 1Our code is available at https://github.com/ This work is conducted at Microsoft Research Asia. apeterswu/Depth_Growing_NMT Figure 1: Performances of Transformer models with different number of encoder/decoder blocks (recorded on x-axis) on WMT14 En→De translation task. † de- notes the result reported in (Vaswani et al., 2017). novel model architectures (Srivastava et al., 2015; He et al., 2016b). While constructing very deep neural networks with tens and even more than a hundred blocks have shown effectiveness in im- age recognition (He et al., 2016b), question an- swering and text classification (Devlin et al., 2018; Radford et al., 2019), scaling up model capac- ity with very deep network remains challenging for NMT. The NMT models are generally con- structed with up to 6 encoder and decoder blocks in both state-of-the-art research work and cham- pion systems of machine translation competition. For example, the LSTM-based models are usually stacked for 4 (Stahlberg et al., 2018) or 6 (Chen et al., 2018) blocks, and the state-of-the-art Trans- former models are equipped with a 6-block en- coder and decoder (Vaswani et al., 2017; Junczys- Dowmunt, 2018; Edunov et al., 2018). Increasing the NMT model depth by directly stacking more blocks results in no improvement or performance drop (Figure 1), and even leads to optimization failure (Bapna et al., 2018). There have been a few attempts in previous works on constructing deeper NMT models. Zhou et al. (2016) and Wang et al. (2017) propose in- creasing the depth of LSTM-based models by introducing linear units between internal hidden states to eliminate the problem of gradient van- ishing. However, their methods are specially de- signed for the recurrent architecture which has been significantly outperformed by the state-of- the-art transformer model. Bapna et al. (2018) propose an enhancement to the attention mech- anism to ease the optimization of models with deeper encoders. While gains have been re- ported over different model architectures includ- ing LSTM and Transformer, their improvements are not made over the best performed baseline model configuration. How to construct and train deep NMT models to push forward the state-of- the-art translation performance with larger model capacity remains a challenging and open problem. In this work, we explore the potential of lever- aging deep neural networks for NMT and propose a new approach to construct and train deeper NMT models. As aforementioned, constructing deeper models is not as straightforward as directly stack- ing more blocks, but requires new mechanisms to boost the training and utilize the larger capacity with minimal increase in complexity. Our solu- tion is a new two-stage training strategy, which "grows" a well-trained NMT model into a deeper network with three components specially designed to overcome the optimization difficulty and best leverage the capability of both shallow and deep architecture. Our approach can effectively con- struct a deeper model with significantly better performance, and is generally applicable to any model architecture. We evaluate our approach on two large-scale benchmark datasets, WMT14 English→German and English→French translations. Empirical stud- ies show that our approach can significantly im- prove in translation quality with an increased model depth. Specifically, we achieve 1.0 and 0.6 BLEU score improvement over the strong Transformer baseline in English→German and English→French translations. 2 Approach We introduce the details of our proposed approach in this section. The overall framework is illus- trated in Figure 2. Figure 2: The overall framework of our proposed deep model architecture. N and M are the numbers of blocks in the bottom module (i.e., grey parts) and top module (i.e., blue and green parts). Parameters of the bottom module are fixed during the top module training. The dashed parts denote the original train- ing/decoding of the bottom module. The weights of the two linear operators before softmax are shared. Our model consists of a bottom module with N blocks of encoder and decoder (the grey com- ponents in Figure 2), and a top module with M blocks (the blue and green components). We de- note the encoder and decoder of the bottom mod- ule as enc1 and dec1, and the corresponding two parts of the top module as enc2 and dec2. An encoder-decoder attention mechanism is used in the decoder blocks of the NMT models, and here we use attn1 and attn2 to represent such atten- tion in the bottom and top modules respectively. The model is constructed via a two-stage train- ing strategy: in Stage 1, the bottom module (i.e., enc1 and dec1) is trained and subsequently holds constant; in Stage 2, only the top module (i.e., enc2 and dec2) is optimized. Let x and y denote the embedding of source and target sequence. Let ly denote the number of words in y, and y<t denote the elements before time step t. Our proposed model works in the fol- lowing way: h1 = enc1(x); h2 = enc2(x + h1); s1,t = dec1(y<t, attn1(h1)), ∀t ∈ [ly]; s2,t = dec2(y<t + s1,<t, attn2(h2)), (1) (2) (3) which contains three key components specially de- signed for deeper model construction, including: Input EmbeddingInputsN×Output EmbeddingOutputs×NLinearSoftmaxOutputProbabilityPositional EncodingPositional EncodingEncoderBlockDecoderBlockLinearSoftmaxOutputProbability×MM×EncoderBlockDecoderBlock (1) Cross-module residual connections: As shown in Eqn.(1), the encoder enc1 of the bot- tom module encodes the input x to a hidden repre- sentation h1, then a cross-module residual connec- tion is introduced to the top module and the repre- sentation h2 is eventually produced. The decoders work in a similar way as shown in Eqn.(2) and (3). This enables the top module to have direct access to both the low-level input signals from the word embedding and high-level information generated by the bottom module. Similar principles can be found in Wang et al. (2017); Wu et al. (2018). (2) Hierarchical encoder-decoder attention: We introduce a hierarchical encoder-decoder attention calculated with different contextual representa- tions as shown in Eqn.(2) and (3), where h1 is used as key and value for attn1 in the bottom module, and h2 for attn2 in the top module. Hidden states from the corresponding previous decoder block are used as queries for both attn1 and attn2 (omitted for readability). In this way, the strong capability of the well trained bottom module can be best preserved regardless of the influence from top module, while the newly stacked top module can leverage the higher-level contextual represen- tations. More details can be found from source code in the supplementary materials. (3) Deep-shallow decoding: At the decoding phase, enc1 and dec1 work together accord- ing to Eqn.(1) and Eqn.(2) as a shallow net- work netS, integrate both bottom and top mod- ule works as a deep network netD according to Eqn.(1)∼Eqn.(3). netS and netD generate the final translation results through reranking. Discussion • Training complexity: As aforementioned, the bottom module is trained in Stage 1 and only pa- rameters of the top module are optimized in Stage 2. This significantly eases optimization difficulty and reduces training complexity. Jointly training the two modules with minimal training complex- ity is left for future work. • Ensemble learning: What we propose in this pa- per is a single deeper model with hierarchical con- textual information, although the deep-shallow de- coding is similar to the ensemble methods in terms of inference complexity (Zhou, 2012). While training multiple diverse models for good ensem- ble performance introduces high additional com- plexity, our approach, as discussed above, "grows" a well-trained model into a deeper one with mini- mal increase in training complexity. Detailed em- pirical analysis is presented in Section 3.3. 3 Experiments We evaluate our proposed approach on two large- scale benchmark datasets. We compare our ap- proach with multiple baseline models, and analyze the effectiveness of our deep training strategy. 3.1 Experiment Design Datasets We conduct experiments to evaluate the effectiveness of our proposed method on two widely adopted benchmark datasets: the WMT142 English→German translation (En→De) and the WMT14 English→French translation (En→Fr). We use 4.5M parallel sentence pairs for En→De and 36M pairs for En→Fr as our training data3. We use the concatenation of Newstest2012 and Newstest2013 as the validation set, and New- stest2014 as the test set. All words are seg- mented into sub-word units using byte pair encod- ing (BPE)4 (Sennrich et al., 2016b), forming a vo- cabulary shared by the source and target languages with 32k and 45k tokens for En→De and En→Fr respectively. Architecture The basic encoder-decoder frame- work we use is the strong Transformer model. We adopt the big transformer configuration follow- ing Vaswani et al. (2017), with the dimension of word embeddings, hidden states and non-linear layer set as 1024, 1024 and 4096 respectively. The dropout rate is 0.3 for En→De and 0.1 for En→Fr. We set the number of encoder/decoder blocks for the bottom module as N = 6 following the com- mon practice, and set the number of additionally stacked blocks of the top module as M = 2. Our models are implemented based on the PyTorch im- plementation of Transformer5 and the code can be found in the supplementary materials. Training We use Adam (Kingma and Ba, 2015) optimizer following the optimization settings and default learning rate schedule in Vaswani et al. (2017) for model training. All models are trained on 8 M40 GPUs. 2http://www.statmt.org/wmt14/ translation-task.html 3Training data are constructed with filtration rules fol- lowing https://github.com/pytorch/fairseq/ tree/master/examples/translation 4https://github.com/rsennrich/ subword-nmt 5https://github.com/pytorch/fairseq Table 1: The test set performances of WMT14 En→De and En→Fr translation tasks. '†' denotes the perfor- mance figures reported in the previous works. Model Transformer (6B)† Transformer (6B) Transformer (8B) Transformer (10B) Transparent Attn (16B)† Ours (8B) En→De En→Fr 41.80 28.40 42.69 28.91 42.63 28.75 28.63 42.73 − 28.04 43.27 29.92 Evaluation We evaluate the model perfor- mances with tokenized case-sensitive BLEU6 score (Papineni et al., 2002) for the two transla- tion tasks. We use beam search with a beam size of 5 and with no length penalty. 3.2 Overall Results We compare our method (Ours) with the Trans- former baselines of 6 blocks (6B) and 8 blocks (8B), and a 16-block Transformer with transparent attention (Transparent Attn (16B))7 (Bapna et al., 2018). We also reproduce a 6-block Transformer baseline, which has better performance than what is reported in (Vaswani et al., 2017) and we use it to initialize the bottom module in our model. From the results in Table 1, we see that our proposed approach enables effective training for deeper network and achieves significantly better performances compared to baselines. With our method, the performance of a well-optimized 6- block model can be further boosted by adding two additional blocks, while simply using Transformer (8B) will lead to a performance drop. Specifi- cally, we achieve a 29.92 BLEU score on En→De translation with 1.0 BLEU improvement over the strong baselines, and achieve a 0.6 BLEU im- provement for En→Fr. The improvements are sta- tistically significant with p < 0.01 in paired boot- strap sampling (Koehn, 2004). We further make an attempt to train a deeper model with additional M = 4 blocks, which has 10 blocks in total for En→De translation. The bot- 6https://github.com/moses-smt/ mosesdecoder/blob/master/scripts/ generic/multi-bleu.perl 7We directly use the performance figure from (Bapna et al., 2018), which uses the base Transformer configura- tion. We run the method of our own implementation with the widely adopted and state-of-the-art big setting, but no improvement has been observed. Figure 3: The test performances of WMT14 En→De translation task. tom module is also initialized from our reproduced 6-block transformer baseline. This model achieves a 30.07 BLEU score on En→De translation and it surpasses the performance of our 8-block model, which further demonstrates that our approach is effective for training deeper NMT models. 3.3 Analysis To further study the effectiveness of our proposed framework, we present additional comparisons in En→De translation with two groups of baseline approaches in Figure 3: (1) Direct stacking (DS): we extend the 6-block baseline to 8-block by directly stacking 2 addi- tional blocks. We can see that both training from scratch (DS scratch) and "growing" from a well- trained 6-block model (DS grow) fails to improve performance in spite of larger model capacity. The comparison with this group of models shows that directly stacking more blocks is not a good strat- egy for increasing network depth, and demon- strates the effectiveness and necessity of our pro- posed mechanisms for training deep networks. (2) Ensemble learning (Ensemble): we present the two-model ensemble results for fair comparison with our approach that involves a two-pass deep- shallow decoding. Specifically, we present the en- semble performances of two independently trained 6-block models (Ensemble 6B/6B), and ensemble of one 6-block and one 8-block model indepen- dently trained from scratch (Ensemble 6B/8B). As expected, the ensemble method improves transla- tion quality over the single model baselines by a large margin (over 0.8 BLEU improvement). Re- garding training complexity, it takes 40 GPU days (5 days on 8 GPU) to train a single 6-block model Baseline(6B)DS (8B)scratchDS (8B)growEnsemble(6B/6B)Ensemble(6B/8B)Ours(8B)28.628.829.029.229.429.629.830.030.2BLEU Score28.9128.7528.8129.629.5729.92BaselineDirect StackingEnsembleOurs from scratch, 48 GPU days for a 8-block model , and 8 GPU days to "grow" a 6-block model into 8-block with our approach. Therefore, our model is better than the two-model ensemble in terms of both translation quality (more than 0.3 BLEU im- provement over the ensemble baseline) and train- ing complexity. 4 Conclusion In this paper, we proposed a new training strategy with three specially designed components, includ- ing cross-module residual connection, hierarchical encoder-decoder attention and deep-shallow de- coding, to construct and train deep NMT mod- els. We showed that our approach can effec- tively construct deeper model with significantly better performance over the state-of-the-art trans- former baseline. Although only empirical studies on the transformer are presented in this paper, our proposed strategy is a general approach that can be universally applicable to other model architec- tures, including LSTM and CNN. In future work, we will further explore efficient strategies that can jointly train all modules of the deep model with minimal increase in training complexity. References Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- gio. 2015. Neural machine translation by jointly In Third Interna- learning to align and translate. tional Conference on Learning Representations. Ankur Bapna, Mia Chen, Orhan Firat, Yuan Cao, and Yonghui Wu. 2018. Training deeper neural ma- chine translation models with transparent attention. In Proceedings of the 2018 Conference on Empiri- cal Methods in Natural Language Processing, pages 3028 -- 3033. Mia Xu Chen, Orhan Firat, Ankur Bapna, Melvin Johnson, Wolfgang Macherey, George Foster, Llion Jones, Mike Schuster, Noam Shazeer, Niki Parmar, et al. 2018. The best of both worlds: Combining recent advances in neural machine translation. In Proceedings of the 56th Annual Meeting of the As- sociation for Computational Linguistics (Volume 1: Long Papers), pages 76 -- 86. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understand- ing. arXiv preprint arXiv:1810.04805. Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018. Understanding back-translation at In Proceedings of the 2018 Conference on scale. Empirical Methods in Natural Language Process- ing, pages 489 -- 500. Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. 2017. Convolutional In Proceedings sequence to sequence learning. of the 34th International Conference on Machine Learning-Volume 70, pages 1243 -- 1252. JMLR. org. Hany Hassan, Anthony Aue, Chang Chen, Vishal Jonathan Clark, Christian Feder- Chowdhary, mann, Xuedong Huang, Marcin Junczys-Dowmunt, William Lewis, Mu Li, et al. 2018. Achieving hu- man parity on automatic chinese to english news translation. arXiv preprint arXiv:1803.05567. Di He, Yingce Xia, Tao Qin, Liwei Wang, Nenghai Yu, Tie-Yan Liu, and Wei-Ying Ma. 2016a. Dual learn- ing for machine translation. In Advances in Neural Information Processing Systems, pages 820 -- 828. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2015. Delving deep into rectifiers: Surpass- ing human-level performance on imagenet classifi- In Proceedings of the IEEE international cation. conference on computer vision, pages 1026 -- 1034. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016b. Deep residual learning for image recog- In Proceedings of the IEEE conference on nition. computer vision and pattern recognition, pages 770 -- 778. Marcin Junczys-Dowmunt. 2018. Microsoft's submis- sion to the wmt2018 news translation task: How i learned to stop worrying and love the data. In Pro- ceedings of the Third Conference on Machine Trans- lation: Shared Task Papers, pages 425 -- 430. Diederik P Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In Third Inter- national Conference on Learning Representations. Philipp Koehn. 2004. Statistical significance tests for In Proceedings of machine translation evaluation. the 2004 conference on empirical methods in natural language processing. Kishore Papineni, Salim Roukos, Todd Ward, and Wei- Jing Zhu. 2002. Bleu: a method for automatic eval- In Proceedings of uation of machine translation. the 40th annual meeting on association for compu- tational linguistics, pages 311 -- 318. Association for Computational Linguistics. Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016a. Improving neural machine translation mod- In Proceedings of the els with monolingual data. 54th Annual Meeting of the Association for Compu- tational Linguistics (Volume 1: Long Papers), vol- ume 1, pages 86 -- 96. Jie Zhou, Ying Cao, Xuguang Wang, Peng Li, and Wei Xu. 2016. Deep recurrent models with fast-forward connections for neural machine translation. Trans- actions of the Association for Computational Lin- guistics, 4:371 -- 383. Zhi-Hua Zhou. 2012. Ensemble methods: foundations and algorithms. Chapman and Hall/CRC. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016b. Neural machine translation of rare words with subword units. In Proceedings of the 54th An- nual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pages 1715 -- 1725. Karen Simonyan and Andrew Zisserman. 2015. Very deep convolutional networks for large-scale image In Third International Conference on recognition. Learning Representations. Rupesh Kumar Srivastava, Klaus Greff, and Jurgen arXiv Schmidhuber. 2015. Highway networks. preprint arXiv:1505.00387. Felix Stahlberg, Adri`a de Gispert, and Bill Byrne. 2018. The university of cambridges machine trans- In Proceedings of the lation systems for wmt18. Third Conference on Machine Translation: Shared Task Papers, pages 504 -- 512. Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural net- works. In Advances in neural information process- ing systems, pages 3104 -- 3112. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Pro- cessing Systems, pages 5998 -- 6008. Mingxuan Wang, Zhengdong Lu, Jie Zhou, and Qun Liu. 2017. Deep neural machine translation with lin- ear associative unit. In Proceedings of the 55th An- nual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pages 136 -- 145. Yiren Wang, Yingce Xia, Tianyu He, Fei Tian, Tao Qin, ChengXiang Zhai, and Tie-Yan Liu. 2019. Multi- agent dual learning. In Seventh International Con- ference on Learning Representations. Lijun Wu, Fei Tian, Li Zhao, Jianhuang Lai, and Tie- Yan Liu. 2018. Word attention for sequence to se- quence text understanding. In Thirty-Second AAAI Conference on Artificial Intelligence. Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. 2016. Google's neural ma- chine translation system: Bridging the gap between arXiv preprint human and machine translation. arXiv:1609.08144. Yingce Xia, Fei Tian, Lijun Wu, Jianxin Lin, Tao Qin, Nenghai Yu, and Tie-Yan Liu. 2017. Deliberation networks: Sequence generation beyond one-pass de- coding. In Advances in Neural Information Process- ing Systems, pages 1784 -- 1794.
1808.04943
1
1808
2018-08-15T01:50:56
Folksonomication: Predicting Tags for Movies from Plot Synopses Using Emotion Flow Encoded Neural Network
[ "cs.CL" ]
Folksonomy of movies covers a wide range of heterogeneous information about movies, like the genre, plot structure, visual experiences, soundtracks, metadata, and emotional experiences from watching a movie. Being able to automatically generate or predict tags for movies can help recommendation engines improve retrieval of similar movies, and help viewers know what to expect from a movie in advance. In this work, we explore the problem of creating tags for movies from plot synopses. We propose a novel neural network model that merges information from synopses and emotion flows throughout the plots to predict a set of tags for movies. We compare our system with multiple baselines and found that the addition of emotion flows boosts the performance of the network by learning ~18\% more tags than a traditional machine learning system.
cs.CL
cs
Folksonomication: Predicting Tags for Movies from Plot Synopses Using Emotion Flow Encoded Neural Network Sudipta Kar Suraj Maharjan Thamar Solorio Department of Computer Science University of Houston Houston, TX 77204-3010 {skar3, smaharjan2, tsolorio}@uh.edu 8 1 0 2 g u A 5 1 ] L C . s c [ 1 v 3 4 9 4 0 . 8 0 8 1 : v i X r a Abstract Folksonomy of movies covers a wide range of heterogeneous information about movies, like the genre, plot structure, visual experiences, soundtracks, metadata, and emotional experiences from watching a movie. Being able to automatically generate or predict tags for movies can help recommendation engines improve retrieval of similar movies, and help viewers know what to expect from a movie in advance. In this work, we explore the problem of creating tags for movies from plot synopses. We propose a novel neural network model that merges information from synopses and emotion flows throughout the plots to predict a set of tags for movies. We compare our system with multiple baselines and found that the addition of emotion flows boosts the performance of the network by learning ≈18% more tags than a traditional machine learning system. Introduction 1 User generated tags for online items are beneficial for both of the users and content providers in modern web technologies. For instance, the capability of tags in providing a quick glimpse of items can assist users to pick items precisely based on their taste and mood. On the other hand, such strength of tags enables them to act as strong search keywords and efficient features for recommendation engines (Lam- biotte and Ausloos, 2006; Szomszor et al., 2007; Li et al., 2008; Borne, 2013). As a result, websites for different medias like photography1, literature2, film3, and music4 have adopted this system to make information retrieval easier. Such systems are often referred as Folksonomy (Vander Wal, 2005), social tagging, or collaborative tagging. In movie review websites, it is very common that people assign tags to movies after watching them. Tags for movies often represent summarized characteristics of the movies such as emotional experiences, events, genre, character types, and psychological impacts. As a consequence, tags for movies became re- markably convenient for recommending movies to potential viewers based on their personal preferences and user profiles. However, this situation is not the same for all of the movies. Popular movies usually have a lot of tags as they tend to reach a higher number of users in these sites. On the other hand, low profile movies that fail to reach such an audience have very small or empty tagsets. In an investigation, we found that ≈34% of the movies among the top ≈130K movies of 22 genres5 in IMDB do not have any tag at all. It is very likely that lack of descriptive tags negatively affects chances of movies being discovered. An automatic process to create tags for movies by analyzing the written plot synopses or scripts could help solve this problem. Such a process would reduce the dependency on humans to accumulate tags This work is licensed under a Creative Commons Attribution 4.0 International License. creativecommons.org/licenses/by/4.0/ 1http://www.flickr.com 2http://www.goodreads.com 3http://www.imdb.com 4http://www.last.fm 5http://www.imdb.com/genre/ License details: http:// for movies. Additionally, learning the characteristics of a movie plot and possible emotional experiences from the written synopsis is also an interesting problem by itself from the perspective of computational linguistics. As the attributes of movies are multi-dimensional, a tag prediction system for movies has to generate multiple tags for a movie. The application of predicting multiple tags from textual description is not necessarily limited to the domain of movie recommendation but also appropriate in other domains, such as video games and books, where storytelling is relevant. In this paper, we explore the problem of analyzing plot synopses to generate multiple plot-related tags for movies. Our key contributions in this paper are as follows: • We create a neural system for predicting tags from narrative texts and provide a robust comparison against traditional machine learning systems. Table 1 shows examples of predicted tags by our system for four movies. • We propose a neural network model that encodes flow of emotions in movie plot synopses. This emotion • We release our source code and a live demo of the tag prediction system at flow helps the model to learn more attributes of movie plots. http://ritual.uh.edu/folksonomication-2018. IMDB ID tt0133093 tt0233298 tt0309820 tt0163651 Batman Beyond: Return of the Joker Movie Title The Matrix Luther American Pie Predicted Tags though-provoking, action, sci-fi, suspenseful, mystery action, good versus evil, suspenseful, humor, thought-provoking murder, melodrama, intrigue, historical fiction, christian film adult comedy, cute, feel-good, prank, entertaining Table 1: Example of predicted tags from the plot synopses of four movies. Blue and red labels indicate true positives and false positives respectively. 2 Related Work Automatic tag generation from content-based analysis has drawn attention in different domains like mu- sic and images. For example, creating tags for music has been approached by utilizing lyrics (van Zaanen and Kanters, 2010; Hu et al., 2009), acoustic features from the tracks (Eck et al., 2008; Dieleman and Schrauwen, 2013), categorical emotion models (Kim et al., 2011), and deep neural models (Choi et al., 2017). AutoTag (Mishne, 2006) and TagAssist (Sood et al., 2007), which utilize the text content to generate tags, aggregate information from similar blog posts to compile a list of ranked tags to present to the authors of new blog posts. Similar works (Katakis et al., 2008; Lipczak, 2008; Tatu et al., 2008) focused on recommending tags to users of BibSonomy6 upon posting a new web page or publication as proposed systems in the ECML PKDD Discovery Challenge 2008 (Hotho et al., 2008) shared task. These systems made use of some kind of out of content resources like user metadata, and tags assigned to similar re- sources to generate tags. Computational narrative studies deal with representing natural language stories by computational mod- els that can be useful to understand, represent, and generate stories computationally. Current works attempt to model narratives using the character's personas and roles (Valls-Vargas et al., 2014; Bamman et al., 2013), interaction information between the characters (Iyyer et al., 2016; Chaturvedi et al., 2016; Chaturvedi et al., 2017) and events taking place throughout the stories (Goyal et al., 2010; Finlayson, 2012; McIntyre and Lapata, 2010). Other works try to build social networks of the characters (Agar- wal et al., 2013a; Agarwal et al., 2013b; Agarwal et al., 2014; Krishnan and Eisenstein, 2015). Only a few works explored the possible type of impressions narrative texts can create on their consumers. For instance, different types of linguistic features have been used for success prediction for books (Ganji- gunte Ashok et al., 2013; Maharjan et al., 2017) and tag prediction of movies from plot synopses (Kar et al., 2018). The tag prediction system predicts a fixed number of tags for each movie. But the tag space created by the system for the test data covers only 73% tags of the actual tagset as the system could capture a small portion of the multi-dimensional attributes of movie plots. 6https://www.bibsonomy.org 3 Dataset We conduct our experiments on the Movie Plot Synopses with Tags (MPST) corpus (Kar et al., 2018), which is a collection of plot synopses for 14,828 movies collected from IMDb and Wikipedia. Most im- portantly, the corpus provides one or more fine-grained tags for each movie. The reason behind selecting this particular dataset is two-fold. First, the tagset is comprised of manually curated tags. These tags express only plot-related attributes of movies (e.g. suspenseful, violence, and melodrama) and are free of any tags foreign to the plots, such as metadata. Furthermore, grouping semantically similar tags and representing them by generalized tags helped to reduce the noise created by redundancy in tag space. Second, the corpus provides adequate amount of texts in the plot synopses as all the synopses have at least ten sentences. We follow the same split provided with the corpus, using 80% for training and 20% for test set. Table 2 gives statistics of the dataset. Split Train Test #Plot Synopses #Tags #Tags per Movie #Sentence per Synopsis #Words per Synopsis 11862 2966 71 71 2.97 3.04 42.36 42.61 893.39 907.96 Table 2: Statistics of the MPST corpus. 4 Encoding Emotion Flow with a Neural Network Our proposed model simultaneously takes the emotion flow throughout the storyline and the text-based representation of the synopsis to retrieve relevant tags for a movie. Figure 1 shows the proposed ar- chitecture. The proposed neural architecture has three modules. The first module uses a convolutional neural network (CNN) to learn plot representations from synopses. The second module models the flow of emotions via a bidirectional long short-term memory (Bi-LSTM) network. And the last module con- tains hidden dense layers that operate on the combined representations generated by the first and second modules to predict the most likely tags for movies. (a) Convolutional Neural Network (CNN): Recent successes in different text classification problems motivated us to extract important word level features using convolutional neural networks (CNNs) (dos Santos and Gatti, 2014; Kim, 2014; Zhang et al., 2015; Kar et al., 2017; Shrestha et al., 2017). We design a model that takes word sequences as input, where each word is represented by a 300-dimensional word embedding vector. We use randomly initialized word embeddings but also experiment with the FastText7 word embeddings trained on Wikipedia using subword information. We stack 4 sets of one-dimensional convolution modules with 1024 filters each for filter sizes 2, 3, 4, and 5 to extract word-level n-gram features (Kim, 2014; Zhang et al., 2015). Each filter of size c is applied from window t to window t + c − 1 on a word sequence x1, x2, . . . , xn. Convolution units of filter size c calculate a convolution output using a weight map Wc, bias bc, and the ReLU activation function (Nair and Hinton, 2010). The output of this operation is defined by: The ReLU activation function is defined by: hc,t = ReLU (Wcxt:t+c−1 + bc) ReLU (x) = max(0, x) (1) (2) Finally, each convolution unit produces a high-level feature map hc. hc = [hc,1, hc,2, ..., hc,T−c+1, ] (3) On those feature maps, we apply max-over-time pooling operation and take the maximum value as the feature produced a particular filter. We concatenate the outputs of the pooling operation for four filter sets that represent the feature representations for each plot synopsis. (b) CNN with Flow of Emotions (CNN-FE): Stories can be described in terms of emotional shapes (Vonnegut, 1981), and it has been shown that the emotional arcs of stories are dominated by six 7https://fasttext.cc/docs/en/english-vectors.html Figure 1: Convolutional Neural Network with Emotion Flow. The entire model is a combination of three modules. Module (a) learns feature representations from synopses using convolutional neural network. Module (b) incorporates emotion flows with module (a) to generate a combined representation of synopses. Module (c) uses these representations to predict the likelihood of each tag. different shapes (Reagan et al., 2016). We believe that capturing the emotional ups and downs through- out the plots can help better understand how the story unfolds. This will enable us to predict relevant tags more accurately. So we design a neural network architecture that tries to learn representations of plots using the vector space model of words combined with the emotional ups and downs of plots. Human emotion is a complex phenomenon to define computationally. The Hourglass of Emotions model (Cambria et al., 2012) categorized human emotions into four affective dimensions (attention, sensitivity, aptitude, and pleasantness), which started from the study of human emotions by Plutchik (2001). Each of these affective dimensions is represented by six different activation levels that make up to 24 distinct labels called 'elementary emotions' that represent the total emotional state of the human mind. NRC8 emotion lexicons (Mohammad and Turney, 2013) is a list of 14,182 words9 and their binary associations with eight types of elementary emotions from the Hourglass of Emotions model (anger, anticipation, joy, trust, disgust, sadness, surprise, and fear) with polarity. These lexicons have been used effectively in tracking the emotions in literary texts (Mohammad, 2011) and predicting success of books (Maharjan et al., 2018). To model the flow of emotions throughout the plots, we divide each synopsis into N equally-sized segments based on words. For each segment, we compute the percentage of words corresponding to each emotion and polarity type (positive and negative) using the NRC emotion lexicons. More precisely, for a synopsis xX, where X denotes the entire collection of plot synopses, we create N sequences of emotion vectors using the NRC emotion lexicons as shown below: x → s1:N = [s1, s2, ..., sN ] (4) 8National Research Council Canada 9Version 0.92 where si is the emotion vector for segment i. We experiment with different values of N, and N = 20 works better on the validation data. As recurrent neural networks are good at encoding sequential data, we feed the sequence of emotion vectors into a bidirectional LSTM (Hochreiter and Schmidhuber, 1997) with 16 units as shown in Figure 1. This bidirectional LSTM layer tries to summarize the contextual flow of emotions from both directions of the plots. The forward LSTMs read the sequence from s1 to sN , while the backward LSTMs read the −→ sequence in reverse from sN to s1. These operations will compute the forward hidden states ( ←− hN ) and backward hidden states ( hN ). For input sequence s, the hidden states ht are computed using the following intermediate calculations: −→ h1, . . . , ←− h1, . . . , it = σ(Wsist + Whiht−1 + Wcict−1 + bi) ft = σ(Wsf st + Whf ht−1 + Wcf ct−1 + bf ) ct = ftct−1 + it tanh(Wscst + Whcht−1 + bc) ot = σ(Wscst + Whcht−1 + bc) ht = ot tanh(ct) ←− hi, i.e. hi=[ where, W and b denote the weight matrices and bias, respectively. σ is the sigmoid activation function, and i, f, o, and c are input gate, forget gate, output gate, and cell activation vectors, respectively. The −→ annotation for each segment si is obtained by concatenating its forward hidden states hi and backward ←− hidden states hi ]. We then apply attention mechanism on this representation to get a unified representation of the emotion flow. Attention models have been used effectively in many problems related to computer vision (Mnih et al., 2014; Ba et al., 2014) and have been successfully adopted in problems related to natural language processing (Bahdanau et al., 2014; Seo et al., 2016). An attention layer applied on top of a feature map hi computes the weighted sum r as follows: −→ hi ; (cid:88) i r = αihi and the weight αi is defined as where, score(.) is computed as follows: αi = (cid:80) exp(score(hi)) i(cid:48) exp(score(hi(cid:48))) , (5) (6) score(hi) = vT tanh(Wahi + ba) (7) where, W , b, v, and u are model parameters. Finally, we concatenate the representation of the emotion flow produced by the attention operation and the output vector with the vector representation generated from the CNN module. The concatenated vector is then fed into two hidden dense layers with 500 and 200 neurons. To improve generalization of the model, we use dropout with a rate of 0.4 after each hidden layer. Finally, we add the output layer y with 71 neurons to compute predictions for 71 tags. To overcome the imbalance of the tags, we weight the posterior probabilities for each tag using different weight values. Weight value CWt for tag tT is defined by, (8) where, D is the size of the training set, T is the number of classes, and Mt is the number of movies having tag t in the training set. We normalize the output layer by applying a softmax function defined by, T × Mt CWt = D sof tmax(y) = (cid:80)70 exp(y) k=0 exp( yk) (9) Based on the ranking for each tag, we then select top N (3/5/10) tags for a movie. 5 Experimental Setup Data Processing and Training: As a preprocessing step, we lowercase the synopses, remove stop-words and also limit the vocabulary to top 5K words to reduce noise and data sparsity. Then we convert each synopsis into a sequence of 1500 integers where each integer represents the index of the corresponding word in the vocabulary. For the sequences longer than 1500 words, we truncate them from the left based on experiments on the development set. Shorter sequences are left padded with zeros. During training, we use 20% of the training data as validation data. We tune various deep model pa- rameters (dropouts, learning rate, weight initialization schemes, and batch size) using early stopping technique on the validation data. We use the Kullback-Leibler (KL) divergence (Kullback and Leibler, 1951) to compute the loss between the true and predicted tag distributions and train the network using the RMSprop optimization algorithm (Tieleman and Hinton, 2012) with a learning rate of 0.0001. We implemented our neural network using the PyTorch deep learning framework10. Baselines: We compare the model performance against three baselines: majority baseline, random base- line, and traditional machine learning system. The majority baseline method assigns the most frequent three or five or ten tags in the training set to all the movies. Similarly, the random baseline assigns ran- domly selected three or five or ten tags to each movie. Finally, we compare our results with the bench- mark system reported in Kar et al. (2018). This benchmark system used different types of hand-crafted lexical, semantic, and sentiment features to train a OneVsRest approach model with logistic regression as the base classifier. Evaluation Measures: We try to follow the same evaluation methodology as described in Kar et al. (2018). We create two sets of tags for each movie by choosing the most likely three and five tags by the system. Additionally, we report our results on a wider range of tags, where we select top ten predictions. We evaluate the performance using the number of unique tags learned by the system (TL), micro aver- aged F1, and tag recall (TL). Tags learned (TL) computes how many unique tags are being predicted by the system for the test data (size of the tag space created by the model for test data). Tag recall represents the average recall per tag and it is defined by the following equation: (cid:80)T i=1 Ri T T R = Here, T is the total number of tags in the corpus, and Ri is the recall for the ith tag. (10) 6 Results and Discussions Methods Baseline: Most Frequent Baseline: Random Baseline: Kar et al. (2018) CNN without class weights CNN with class weights CNN-FE CNN-FE + FastText TL 3 71 47 24 49 58 53 Top 3 F1 29.7 4.2 37.3 36.8 34.9 36.9 37.3 TR TL 5 4.23 71 4.21 10.52 52 7.99 26 55 9.85 65 9.40 10.00 59 Top 5 F1 28.4 6.4 37.3 36.7 35.7 36.7 36.8 TR TL 10 14.08 15.04 71 16.77 -- 12.62 27 67 14.94 70 14.11 15.47 63 Top 10 F1 28.4 6.6 -- 31.3 30.8 31.1 30.6 TR 13.73 14.36 -- 24.52 26.86 24.76 26.45 Table 3: Performance of tag prediction systems on the test data. We report results of two setups using three matrices (TL: Tags learned, F1: Micro f1, TR: Tag recall). Table 3 shows our results for Top 3, Top 5, and Top 10 settings. We will mainly discuss the results achieved by selecting top five tags as it allows us to compare with all the baseline systems and more tags to discuss about. As the most frequent baseline system assigns a fixed set of tags to all the movies, it fails to exhibit diversity in the created tag space. Still it manages to achieve a micro-F1 score around 28%. On the other hand, the random baseline system creates the most diverse tag space by using all of the possible tags. However its lower micro-F1 score of 6.30% makes it impractical to be used in real world scenario. 10https://pytorch.org At this point, we find an interesting trade-off between accuracy and diversity. It is expected that a good movie tagger will be able to capture the multi-dimensional attributes of the plots that allows to generalize a diverse tag space. Tagging a large collection of movies with a very small and fixed set of tags (e.g. majority baseline system) is not useful for either a recommendation system or users. Equally important is the relevance between the movies and the tags created for those movies. The hand-crafted features based approach (Kar et al., 2018) achieves a micro-F1 around 37%, which outperforms the majority and random baselines. But the system was able to learn only 52 tags, which makes 73% of the total tags. Our approach achieves a lower micro-F1 score than the traditional machine learning one, but it performs better in terms of learning more tags. We observe that the micro-F1 of the CNN model with only word sequences is very close (36.7%) to the hand-crafted features based system. However, it is able to learn only around 37% of the tags. By utilizing class weights in this model (see Eq. 8), we improve the learning for under-represented tags yielding an increase in tag recall (TR) and tags learned (TL). But the micro-f1 drops to 35.7%. With the addition of emotion flows to CNN, the CNN-FE model learns significantly more tags while micro-F1 and tag recall do not change much. Initializing the embedding layer with pre-trained embeddings made a small improvement in micro-F1 but the model learns com- paratively lesser tags. If we compare the CNN-FE model with the hand-crafted feature based system, micro-F1 using CNN-FE is slightly lower (≈ 1%) than the feature based system. But it provides a strong improvement in terms of the number of tags it learns (TL). CNN-FE learns around 91% tags of the tagset compared to 73% with the feature based system. It is an interesting improvement, because model is learning more tags and it is better at assigning relevant tags to movies. We observe similar pattern for the rest of the two sets of tags where we select top three and ten tags. For all the sets, CNN-FE model learns the highest number of tags compared to the other models. In terms of micro-F1 and tag recall, it does not achieve the highest numbers but performs very closely. Incompleteness in Tag Spaces: One of the limitations of folksonomies is the incompleteness in tag spaces. The fact that users have not tagged an item with a specific label does not imply that that label does not apply to the item. Incompleteness makes learning challenging for computational models as the training and evaluation process penalizes the model for predicting a tag that is not present in the ground truth tags, even though in some cases it may be a suitable tag. For example, ground truth tags for the movie Luther (2003)11 are murder, romantic, and violence (Table 1). And the predicted tags from our proposed model are murder, melodrama, intrigue, historical fiction, and christian film. The film is indeed a Christian film12 portraying the biography of Martin Luther, who led the Christian reformation during the 16th century. According to the Wikipedia, "Luther is a 2003 American-German epic historical drama film loosely based on the life of Martin Luther"13. Similarly, Edtv14 (Table 6) has tags romantic and satire in the dataset. Our system predicted adult comedy and this tag is appropriate for this movie. In these two cases, the system will get lower micro-F1 since the relevant tags are not part of the ground truth. Perhaps a different evaluation scheme could be better suited for this task. We plan to work on this issue in our future work. Significance of the Flow of Emotions: The results suggest that incorporating the flow of emotions helps to achieve better results by learning more tags. Figure 2 shows some tags with significant improvements in recall after incorporating the flow of emotions. We notice such improvements for around 30 tags. We argue that for these tags (e.g. absurd, cruelty, thought-provoking, claustrophobic) the changes in specific sentiments are adding new information helpful for identifying relevant tags. But we also notice negative changes in recall for around 10 tags, which are mostly related to the theme of the story (e.g. blaxploita- tion, alternate history, historical fiction, sci-fi). It will be an interesting direction of future work to add a mechanism that can also learn to discern when emotion flow should contribute more to the prediction task. In Figure 3, we inspect how the flow of emotions looks like in different types of plots. Emotions like joy and trust are continuously dominant over disgust and anger in the plot of Arthur (1981), which is 11http://www.imdb.com/title/tt0309820 12https://www.christianfilmdatabase.com/review/luther-2 13https://en.wikipedia.org/wiki/Luther (2003 film) 14http://www.imdb.com/title/tt0131369/ Figure 2: Tags with higher change of recall after adding the flow of emotions in CNN. Figure 3: The flow of emotions in the plots of 2 different types of movies. Each synopsis was divided into 20 segments based on the words, and percentage of the emotions for each segment was calculated using the NRC emotion lexicons. The y axis represents the percentage of emotions in each segment; whereas, the x axis represents the segments. a comedy film. We can observe sudden spikes in sadness and fear at segment 14, which is the possi- ble reason for triggering the tag depressing. We observe a different pattern in the flow of emotions in Messiah of Evil (1973), which is a horror film. Here the dominant emotions are sadness and fear. Such characteristics of emotions are helpful to determine the type and possible experiences from a movie. Our model seems to be able to leverage this information that is allowing it to learn more tags; specifically tags that are related to feelings. Learning or Copying? We found that only 11.8% of the 14,830 predicted tags for the ∼3K movies in the test data were found in the synopses themselves. 12.7% of the total 9,022 ground truth tags appear in the plot synopses. These numbers suggest that the model is not dependent on the occurrences of the tags in the synopses to make predictions, rather it seems it is trying to understand the plots and assign tags based on that. We also found that all the tags that were present in the synopses of the test data are also present in the synopses of the training data. Then we investigate what type of tags appear in the synopses and which ones do not. Tags present in the synopses are mostly genre or event related tags like horror, violence, historical. On the other hand, most of the tags that do not appear in the synopses are the tags that require a more sophisticated analysis of the plots synopses (e.g. thought-provoking, feel-good, suspenseful). It is not necessarily bad to predict tags that are in the synopses, since they are still useful for recommender systems. However, if this was the only ability of the proposed models, their value would be limited. Luckily this analysis, and the results presented earlier show that the model is able to infer relevant tags, even if they have not been observed in the synopses. This is a much more interesting finding. Learning Stories from Different Representations: Movie scripts represent the detailed story of a movie, whereas the plot synopses are summaries of the movie. The problem with movie scripts is that they are not as readily available as plot synopses. However, it is still interesting to evaluate our approach to predict tags from movie scripts. For this purpose, we collected movie scripts from our test set. We Top 3 TR TL 28 8.04 5.16 19 F1 29.3 29.8 F1 38.7 37.0 Plot Synopses Scripts Top 5 TR TL 35 26 15.70 9.27 Table 4: Evaluation of predictions using plot synopses and scripts were able to find 80 movie scripts using the ScriptBase corpus (Gorinski and Lapata, 2015). In table 4, we show the evaluation of tags generated using plot synopses and scripts. Despite having similar micro-f1 scores, tag recall and tags learned are lower when we use the scripts. A possible expla- nation for this is the train/test mismatch since the model was trained using summarized versions of the movie, while the test data contained full movies scripts. Additional sources of error could come from the external info included in scripts (such as descriptions of actions from the characters or settings). Percentage of Match >=80% >=40% & <80% >=20% & <40% Percentage of Movies 40% 47.5% 11.25% Table 5: Percentage of the match between the sets of top five tags generated from the scripts and plot synopses. Table 5 shows that for most of the movies we generate very similar tags using the scripts and plot syn- opses. For 40% movies, at least 80% tags are the same. While the predictions are not identical, these results show a consistency in the learned tags from our system. An interesting direction for future work would be to study what aspects in a full movie script are relevant to predict tags. Title: A Nightmare on Elm Street 5: The Dream Child Ground Truths: cult, good versus evil, insanity, murder, sadist, violence Synopsis: cult, murder, paranormal, revenge, violence Script: murder, violence, flashback, cult, suspenseful Title: EDtv Ground Truths: romantic, satire Synopsis: adult comedy, comedy, entertaining, prank, satire Script: comedy, satire, prank, entertaining, adult comedy Title: Toy Story Ground Truths: clever, comedy, cult, cute, entertaining, fantasy, humor, violence Synopsis: comedy, cult, entertaining, humor, psychedelic Script: psychedelic, comedy, entertaining, cult, absurd Title: Margot at the Wedding Ground Truths: romantic, storytelling, violence Synopsis: depressing, dramatic, melodrama, queer, romantic Script: psychological, murder, mystery, flashback, insanity Table 6: Example of ground truth tags of movies from the test set and the generated tags for them using plot synopses and scripts. Challenging Tags: We found that these seven tags: stupid, grindhouse film, blaxploitation, magical re- alism, brainwashing, plot twist, and allegory, were not assigned to any movies in the test set. One reason might be that these are very infrequent (around 0.06% of movies have them assigned as their tags). This will obviously make them difficult to learn. Again, these are subjective as well. We believe that tagging a plot as stupid or brainwashing is complicated and depends on perspectives of a tagger. We plan to investigate such type of tags in the future. 7 Conclusions and Future Work In this paper we explore the problem of automatically creating tags for movies using plot synopses. We propose a model that learns word level feature representations from the synopses using CNNs and models sentiment flow throughout the plots using a bidirectional LSTM. We evaluated our model on a corpus that contains plot synopses and tags of 14K movies. We compared our model against a majority and random baselines, and a system that uses traditional hand-crafted linguistic features. We found that incorporating emotion flows boosts prediction performance by improving the learning of tags related to feelings as well as increasing the overall number of tags learned. Predicting tags for movies is an interesting and complicated problem at the same time. To further improve our results, we plan to investigate more sophisticated architectures and explore ways to tackle the problem of incompleteness in the tag space. We also plan to evaluate the quality of predicted tags using a human study evaluation and experiment on predicting tags in other storytelling related domains. Acknowledgements This work was partially supported by the National Science Foundation under grant number 1462141 and by the U.S. Department of Defense under grant W911NF-16-1-0422. References [Agarwal et al.2013a] Apoorv Agarwal, Anup Kotalwar, and Owen Rambow. 2013a. Automatic extraction of social networks from literary text: A case study on alice in wonderland. In Proceedings of the Sixth Interna- tional Joint Conference on Natural Language Processing, pages 1202 -- 1208, Nagoya, Japan, October. Asian Federation of Natural Language Processing. [Agarwal et al.2013b] Apoorv Agarwal, Anup Kotalwar, Jiehan Zheng, and Owen Rambow. 2013b. Sinnet: Social interaction network extractor from text. In The Companion Volume of the Proceedings of IJCNLP 2013: System Demonstrations, pages 33 -- 36, Nagoya, Japan, October. Asian Federation of Natural Language Processing. [Agarwal et al.2014] Apoorv Agarwal, Sriramkumar Balasubramanian, Anup Kotalwar, Jiehan Zheng, and Owen Rambow. 2014. Frame semantic tree kernels for social network extraction from text. In Proceedings of the 14th Conference of the European Chapter of the Association for Computational Linguistics, pages 211 -- 219, Gothenburg, Sweden, April. Association for Computational Linguistics. [Ba et al.2014] Jimmy Ba, Volodymyr Mnih, and Koray Kavukcuoglu. 2014. Multiple object recognition with visual attention. CoRR, abs/1412.7755. [Bahdanau et al.2014] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. CoRR, abs/1409.0473. [Bamman et al.2013] David Bamman, Brendan O'Connor, and Noah A. Smith. 2013. Learning latent personas of film characters. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 352 -- 361, Sofia, Bulgaria, August. Association for Computational Linguistics. [Borne2013] Kirk Borne. 2013. Collaborative annotation for scientific data discovery and reuse. Bulletin of the American Society for Information Science and Technology, 39(4):44 -- 45. [Cambria et al.2012] Erik Cambria, Andrew Livingstone, and Amir Hussain. 2012. The hourglass of emotions. In Proceedings of the 2011 International Conference on Cognitive Behavioural Systems, COST'11, pages 144 -- 157, Berlin, Heidelberg. Springer-Verlag. [Chaturvedi et al.2016] Snigdha Chaturvedi, Shashank Srivastava, Hal Daum´e III, and Chris Dyer. 2016. Modeling In Dale Schuurmans and Michael P. Wellman, evolving relationships between characters in literary novels. editors, AAAI, pages 2704 -- 2710. AAAI Press. [Chaturvedi et al.2017] Snigdha Chaturvedi, Mohit Iyyer, and Hal Daum´e III. 2017. Unsupervised learning of evolving relationships between literary characters. [Choi et al.2017] K. Choi, G. Fazekas, M. Sandler, and K. Cho. 2017. Convolutional recurrent neural networks for music classification. In 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 2392 -- 2396, March. [Dieleman and Schrauwen2013] Sander Dieleman and Benjamin Schrauwen. 2013. Multiscale approaches to mu- sic audio feature learning. In Proceedings of the 14th International Society for Music Information Retrieval Conference, November 4-8. http://www.ppgia.pucpr.br/ismir2013/wp-content/uploads/ 2013/09/69 Paper.pdf. [dos Santos and Gatti2014] Cicero dos Santos and Maira Gatti. 2014. Deep convolutional neural networks for In Proceedings of COLING 2014, the 25th International Conference on sentiment analysis of short texts. Computational Linguistics: Technical Papers, pages 69 -- 78, Dublin, Ireland, August. Dublin City University and Association for Computational Linguistics. [Eck et al.2008] Douglas Eck, Paul Lamere, Thierry Bertin-mahieux, and Stephen Green. 2008. Automatic gen- eration of social tags for music recommendation. In J. C. Platt, D. Koller, Y. Singer, and S. T. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 385 -- 392. Curran Associates, Inc. [Finlayson2012] Mark Alan Finlayson. 2012. Learning narrative structure from annotated folktales. Ph.D. thesis, Massachusetts Institute of Technology. [Ganjigunte Ashok et al.2013] Vikas Ganjigunte Ashok, Song Feng, and Yejin Choi. 2013. Success with style: In Proceedings of the 2013 Conference on Empirical Using writing style to predict the success of novels. Methods in Natural Language Processing, pages 1753 -- 1764, Seattle, Washington, USA, October. Association for Computational Linguistics. [Gorinski and Lapata2015] Philip John Gorinski and Mirella Lapata. 2015. Movie script summarization as graph- based scene extraction. In Proceedings of the 2015 Conference of the North American Chapter of the Asso- ciation for Computational Linguistics: Human Language Technologies, pages 1066 -- 1076, Denver, Colorado, May -- June. Association for Computational Linguistics. [Goyal et al.2010] Amit Goyal, Ellen Riloff, and Hal Daum´e, III. 2010. Automatically producing plot unit repre- sentations for narrative text. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, EMNLP '10, pages 77 -- 86, Stroudsburg, PA, USA. Association for Computational Linguistics. [Hochreiter and Schmidhuber1997] Sepp Hochreiter and Jurgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735 -- 1780. [Hotho et al.2008] Andreas Hotho, Dominik Benz, Robert J´aschke, and Beate Krause. 2008. Ecml pkdd discovery In Workshop at 18th Europ. Conf. on Machine Learning (ECML'08)/11th Europ. challenge 2008 (rsdc'08). Conf. on Principles and Practice of Knowledge Discovery in Databases (PKDD'08), volume 32. [Hu et al.2009] Xiao Hu, J. Stephen Downie, and Andreas F. Ehmann. 2009. Lyric text mining in music mood classification. In Proceedings of the 10th International Society for Music Information Retrieval Conference, ISMIR 2009, pages 411 -- 416. [Iyyer et al.2016] Mohit Iyyer, Anupam Guha, Snigdha Chaturvedi, Jordan Boyd-Graber, and Hal Daum´e III. 2016. Feuding families and former friends: Unsupervised learning for dynamic fictional relationships. In Proceed- ings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1534 -- 1544. Association for Computational Linguistics. [Kar et al.2017] Sudipta Kar, Suraj Maharjan, and Thamar Solorio. 2017. RiTUAL-UH at semeval-2017 task 5: Sentiment analysis on financial data using neural networks. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 877 -- 882. [Kar et al.2018] Sudipta Kar, Suraj Maharjan, A. Pastor L´opez-Monroy, and Thamar Solorio. 2018. MPST: A In Proceedings of the Eleventh International Conference on Lan- corpus of movie plot synopses with tags. guage Resources and Evaluation (LREC 2018), Paris, France, May. European Language Resources Association (ELRA). [Katakis et al.2008] Ioannis Katakis, Grigorios Tsoumakas, and Ioannis Vlahavas. 2008. Multilabel text classifi- cation for automated tag suggestion. In Proceedings of the ECML/PKDD 2008 Discovery Challenge. [Kim et al.2011] JungHyun Kim, Seungjae Lee, SungMin Kim, and Won Young Yoo. 2011. Music mood classi- fication model based on arousal-valence values. In Advanced Communication Technology (ICACT), 2011 13th International Conference on, pages 292 -- 295. IEEE. [Kim2014] Yoon Kim. 2014. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1746 -- 1751, Doha, Qatar, October. Association for Computational Linguistics. [Krishnan and Eisenstein2015] Vinodh Krishnan and Jacob Eisenstein. 2015. "You're Mr. Lebowski, I'm the Dude": Inducing address term formality in signed social networks. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1616 -- 1626, Denver, Colorado, May -- June. Association for Computational Linguistics. [Kullback and Leibler1951] S. Kullback and R. A. Leibler. 1951. On Information and Sufficiency. Ann. Math. Statist., 22(1):79 -- 86, 03. [Lambiotte and Ausloos2006] Renaud Lambiotte and Marcel Ausloos, 2006. Collaborative Tagging as a Tripartite Network, pages 1114 -- 1117. Springer Berlin Heidelberg, Berlin, Heidelberg. [Li et al.2008] Xin Li, Lei Guo, and Yihong Eric Zhao. 2008. Tag-based social interest discovery. In Proceedings of the 17th International Conference on World Wide Web, WWW '08, pages 675 -- 684, New York, NY, USA. ACM. [Lipczak2008] Marek Lipczak. 2008. Tag recommendation for folksonomies oriented towards individual users. In In: Proc. of the ECML PKDD Discovery Challenge. [Maharjan et al.2017] Suraj Maharjan, John Arevalo, Manuel Montes, Fabio A Gonz´alez, and Thamar Solorio. In Proceedings of the 15th Conference of the 2017. A multi-task approach to predict likability of books. European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, volume 1, pages 1217 -- 1227. [Maharjan et al.2018] Suraj Maharjan, Sudipta Kar, Manuel Montes, Fabio A. Gonzalez, and Thamar Solorio. 2018. Letting emotions flow: Success prediction by modeling the flow of emotions in books. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 259 -- 265, New Orleans, Louisiana, June. Association for Computational Linguistics. [McIntyre and Lapata2010] Neil McIntyre and Mirella Lapata. 2010. Plot induction and evolutionary search for story generation. In Proceedings of the 48th Annual Meeting of the Association for Computational Linguistics, pages 1562 -- 1572, Uppsala, Sweden, July. Association for Computational Linguistics. [Mishne2006] Gilad Mishne. 2006. Autotag: A collaborative approach to automated tag assignment for weblog posts. In Proceedings of the 15th International Conference on World Wide Web, WWW '06, pages 953 -- 954, New York, NY, USA. ACM. [Mnih et al.2014] Volodymyr Mnih, Nicolas Heess, Alex Graves, and Koray Kavukcuoglu. 2014. Recurrent mod- els of visual attention. CoRR, abs/1406.6247. [Mohammad and Turney2013] Saif M. Mohammad and Peter D. Turney. 2013. Crowdsourcing a word-emotion association lexicon. 29(3):436 -- 465. [Mohammad2011] Saif Mohammad. 2011. From once upon a time to happily ever after: Tracking emotions in novels and fairy tales. In Proceedings of the 5th ACL-HLT Workshop on Language Technology for Cultural Heritage, Social Sciences, and Humanities, LaTeCH '11, pages 105 -- 114, Stroudsburg, PA, USA. Association for Computational Linguistics. [Nair and Hinton2010] Vinod Nair and Geoffrey E. Hinton. 2010. Rectified linear units improve restricted boltz- mann machines. In Proceedings of the 27th International Conference on International Conference on Machine Learning, ICML'10, pages 807 -- 814, USA. Omnipress. [Plutchik2001] Robert Plutchik. 2001. The nature of emotions human emotions have deep evolutionary roots, a fact that may explain their complexity and provide tools for clinical practice. American scientist, 89(4):344 -- 350. [Reagan et al.2016] Andrew J. Reagan, Lewis Mitchell, Dilan Kiley, Christopher M. Danforth, and Peter Sheridan Dodds. 2016. The emotional arcs of stories are dominated by six basic shapes. CoRR, abs/1606.07772. [Seo et al.2016] Paul Hongsuck Seo, Zhe Lin, Scott Cohen, Xiaohui Shen, and Bohyung Han. 2016. Hierarchical attention networks. CoRR, abs/1606.02393. [Shrestha et al.2017] Prasha Shrestha, Sebastian Sierra, Fabio Gonzalez, Manuel Montes, Paolo Rosso, and Thamar Solorio. 2017. Convolutional neural networks for authorship attribution of short texts. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 669 -- 674, Valencia, Spain. Association for Computational Linguistics. [Sood et al.2007] Sanjay C. Sood, Kristian J. Hammond, Sara H. Owsley, and Larry Birnbaum, 2007. TagAssist: Automatic tag suggestion for blog posts. [Szomszor et al.2007] Martin Szomszor, Ciro Cattuto, Harith Alani, Kieron O'Hara, Andrea Baldassarri, Vittorio Loreto, and Vito D.P. Servedio. 2007. Folksonomies, the semantic web, and movie recommendation. [Tatu et al.2008] M. Tatu, M. Srikanth, and T. D'Silva. 2008. RSDC'08: Tag Recommendations using Bookmark Content. Workshop at 18th Europ. Conf. on Machine Learning (ECML'08) / 11th Europ. Conf. on Principles and Practice of Knowledge Discovery in Databases (PKDD'08). [Tieleman and Hinton2012] Tijmen Tieleman and Geoffrey Hinton. 2012. Lecture 6.5-rmsprop: Divide the gradi- ent by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2):26 -- 31. [Valls-Vargas et al.2014] Josep Valls-Vargas, Jichen Zhu, and Santiago Ontan´on. 2014. Toward automatic role identification in unannotated folk tales. In Proceedings of the Tenth AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment, pages 188 -- 194. AAAI Press. [van Zaanen and Kanters2010] Menno van Zaanen and Pieter Kanters. 2010. Automatic mood classification us- ing tf*idf based on lyrics. In Proceedings of the 11th International Society for Music Information Retrieval Conference, ISMIR 2010, Utrecht, Netherlands, August 9-13, 2010, pages 75 -- 80. [Vander Wal2005] Thomas Vander Wal. 2005. Folksonomy definition and wikipedia. vanderwal. net. [Vonnegut1981] Kurt Vonnegut. 1981. Palm sunday: An autobiographical collage. [Zhang et al.2015] Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In Advances in Neural Information Processing Systems, pages 649 -- 657.
1308.2696
1
1308
2013-08-12T20:57:02
B(eo)W(u)LF: Facilitating recurrence analysis on multi-level language
[ "cs.CL" ]
Discourse analysis may seek to characterize not only the overall composition of a given text but also the dynamic patterns within the data. This technical report introduces a data format intended to facilitate multi-level investigations, which we call the by-word long-form or B(eo)W(u)LF. Inspired by the long-form data format required for mixed-effects modeling, B(eo)W(u)LF structures linguistic data into an expanded matrix encoding any number of researchers-specified markers, making it ideal for recurrence-based analyses. While we do not necessarily claim to be the first to use methods along these lines, we have created a series of tools utilizing Python and MATLAB to enable such discourse analyses and demonstrate them using 319 lines of the Old English epic poem, Beowulf, translated into modern English.
cs.CL
cs
B(eo)W(u)LF:     Facilitating  Recurrence  Analysis  on  Multi-­‐Level  Language   Alexandra  Paxton  and  Rick  Dale   Version  1.0     Released  August  12,  2013   Cognitive  and  Information  Sciences   University  of  California,  Merced   Merced,  CA  95340   [email protected],  http://www.alexandrapaxton.com     Discourse  analysis  may  seek  to  characterize  not  only  the  overall  composition  of  a   given  text  or  corpora  but  also  the  dynamic  patterns  within  the  data.    Patterns  of   interest  may  occur  at  multiple  levels,  from  character  to  sentence  to  corpus.     Researchers  may  be  interested  in  the  way  that  sentence  structures  recur  between   participants  or  how  affect  words  cluster  in  a  single  text.    Recurrence  analyses  are  an   ideal  tool  for  such  investigations,  but  linguistic  data  must  often  be  transformed  prior   to  being  analyzed.    This  technical  report  introduces  a  data  format  called  the  by-­‐word  long-­‐form  or   B(eo)W(u)LF.    Inspired  by  the  long-­‐form  data  format  required  for  mixed-­‐effects   modeling,  B(eo)W(u)LF  structures  linguistic  data  into  an  expanded  matrix  encoding   any  number  of  researchers-­‐specified  markers.    While  we  do  not  necessarily  claim  to   be  the  first  to  use  methods  along  these  lines,  we  have  created  a  series  of  tools   utilizing  Python  and  MATLAB  to  enable  such  discourse  analyses.      We  demonstrate  this  analysis  on  319  lines  of  the  Old  English  epic  poem,  Beowulf,   translated  into  modern  English  (Appendix  1).    At  the  end  of  this  report,  we  provide   the  original  text,  scripts  adapted  to  the  text,  and  (for  brevity’s  sake)  a  portion  of  the   final  result.  The  sample  text  is  a  single  file,  but  if  a  corpus  is  saved  in  multiple   individual  files,  these  scripts  can  be  modified  with  “if”  statements  to  streamline  the   process.     Text  Preparation    These  scripts  require  that  text  data  be  stored  in  a  plain  text  file  (.txt  or  .csv).    If  the   corpus  comprises  separate  text  files,  it’s  highly  recommended  that  each  file  be   transcribed  or  formatted  identically.    The  data  will  be  run  through  with  a  series  of   regular  expressions  in  Python  to  quickly  and  automatically  reformat  the  text   (Appendix  2).    Therefore,  if  individual  files  are  formatted  differently,  the  cleanup   script  will  have  to  be  tweaked  for  each  format  type.    The  analyses  to  be  performed  will  dictate  the  cleanup  choices.    In  our  example,  we   remove  commas,  colons,  and  semicolons,  but  we  are  interested  in  keeping  the  end-­‐ of-­‐sentence  punctuations  (e.g.,  periods,  question  marks).    We  may  choose  to  do   some  analyses  on  the  separate  cantos  or  lines  of  the  poem,  so  we  created  indicators   of  each  that  will  be  utilized  in  the  MATLAB  script  in  the  next  section.    After  cleaning   up  the  original  text,  the  cleaned  file  is  saved  in  a  new  file.    The  cleaned  file  is  then  split  by  spaces,  saving  each  word  in  a  separate  cell,  and   saved  again.    We  format  the  data  into  a  CSV  format,  but  if  the  analyses  require  that   commas  remain  in  place,  we  recommend  changing  the  Python  script  to  save  the   output  in  a  tab-­‐delimited  format.    This  file  will  then  be  read  into  the  MATLAB  script   in  the  next  phase.     Initial  Text  Analysis    The  next  phase  uses  MATLAB  to  automatically  calculate  a  number  of  target   variables  from  the  text  (Appendix  3).    These  variables  can  be  shaped  according  to   researcher  needs.    For  this  example,  we  have  chosen  to  create  variables  indicating   canto  number,  poem  line  number,  speech  events,  number  of  characters  per  word,   and  end-­‐of-­‐sentence  markers.    Of  course,  we  could  imagine  a  host  of  other  variables   that  could  also  be  chosen,  like  indicating  when  certain  word(s)  are  used  (e.g.,  name,   location,  experiment  materials),  exploring  types  of  sentences  (e.g.,  question  marks,   exclamation  points),  or  tracking  sentence  length.    The  code  reads  in  the  text  produced  by  Python  in  the  earlier  phase  and  tracks  canto   and  line  number  (using  the  indicators  created  earlier).    We  transform  these   indicators  into  separate  variables  and  remove  the  indicators  from  the  text.    Once  we   also  create  the  end-­‐of-­‐sentence,  character  number,  and  speech  event  variables,  we   save  the  data  into  a  matrix  (Appendix  4).    Each  line  reports  the  values  of  each   variable  for  a  single  word  in  the  original  text.      In  anticipation  of  further  linguistic  analysis,  we  also  save  the  text  data  in  a  .txt   format  with  one  word  per  line.    In  the  following  section,  we  model  how  to  use  the   BWLF  in  conjunction  with  LIWC  (Linguistic  Inquiry  and  Word  Count;  Pennebaker,   Booth,  &  Francis,  2007).    However,  these  methods  can  be  modified  for  other  forms   linguistic  analyses  as  desired.     Linguistic  Analysis  and  Integration  into  BWLF  Matrix    LIWC  is  a  highly  flexible  and  powerful  tool  that  has  been  fairly  widely  used  both  in   transcript-­‐  and  text-­‐based  linguistic  analyses  (e.g.,  Niederhoffer  &  Pennebaker,   2002).    In  addition  to  providing  pre-­‐defined  linguistic  categories  of  both  content  and   structure,  LIWC  allows  researchers  to  specify  their  own  categories  of  interest  (e.g.,  a   set  of  proper  names).    The  text-­‐only  file  that  was  produced  in  the  previous  section   can  be  uploaded  and  analyzed  by  the  LIWC  program,  using  1  newline  as  the   delimiting  option.    Once  the  LIWC  output  has  been  saved,  it  can  be  integrated  with   the  BLWF  matrix  we  created  earlier,  again  using  MATLAB  (Appendices  5-­‐6).         Concluding  Remarks    B(eo)W(u)LF  provides  researchers  interested  in  language  with  a  data  format  that  is   well-­‐suited  for  dynamic  language  analyses  (e.g.,  recurrence  analysis).  Again,   although  we  do  not  necessarily  claim  to  be  the  first  to  have  used  data  formats  like   this,  we  have  here  outlined  a  package  of  scripts  for  Python  and  MATLAB  that  can  be   easily  modified  to  fit  the  specific  needs  of  the  project  at  hand.    We  believe  that   B(eo)W(u)LF  provides  an  intuitively  simple  but  analytically  powerful  data  format   particularly  suited  to  analyzing  language  as  it  occurs  and  changes  over  a  number  of   time  scales.       References    Niederhoffer,  K.  G.,  &  Pennebaker,  J.  W.  (2002).  Linguistic  style  matching  in  social   interaction.  Journal  of  Language  and  Social  Psychology,  21(4),  337–360.   Pennebaker,  J.  W.,  Booth,  R.  J.,  &  Francis,  M.  E.  (2007).  Linguistic  Inquiry  and  Word   Count  (LIWC):  A  computerized  text  analysis  program.  Austin,  TX:  LIWC.net.       Modern  English  translation  of  Beowulf.    Taken  from  an  e-­‐text  version  by  Robin   Appendix  1:   Katsuya-­‐Corbet  (released  into  the  public  domain  July  1993).   Beowulf  Sample  Text    LO,  praise  of  the  prowess  of  people-­‐kings     who  in  former  time  forth  had  sent  him   of  spear-­‐armed  Danes,  in  days  long  sped,   sole  on  the  seas,  a  suckling  child.   we  have  heard,  and  what  honor  the  athelings   High  o'er  his  head  they  hoist  the  standard,   a  gold-­‐wove  banner;  let  billows  take  him,   won!   Oft  Scyld  the  Scefing  from  squadroned  foes,   gave  him  to  ocean.  Grave  were  their  spirits,   from  many  a  tribe,  the  mead-­‐bench  tore,   mournful  their  mood.  No  man  is  able   awing  the  earls.  Since  erst  he  lay   to  say  in  sooth,  no  son  of  the  halls,   no  hero  'neath  heaven,  -­‐  who  harbored  that   friendless,  a  foundling,  fate  repaid  him:   for  he  waxed  under  welkin,  in  wealth  he   freight!   throve,   Now  Beowulf  bode  in  the  burg  of  the   till  before  him  the  folk,  both  far  and  near,   Scyldings,   leader  beloved,  and  long  he  ruled   who  house  by  the  whale-­‐path,  heard  his   mandate,   in  fame  with  all  folk,  since  his  father  had  gone   gave  him  gifts:  a  good  king  he!   away  from  the  world,  till  awoke  an  heir,   To  him  an  heir  was  afterward  born,   haughty  Healfdene,  who  held  through  life,   sage  and  sturdy,  the  Scyldings  glad.   a  son  in  his  halls,  whom  heaven  sent   to  favor  the  folk,  feeling  their  woe   Then,  one  after  one,  there  woke  to  him,   that  erst  they  had  lacked  an  earl  for  leader   to  the  chieftain  of  clansmen,  children  four:   so  long  a  while;  the  Lord  endowed  him,   Heorogar,  then  Hrothgar,  then  Halga  brave;   the  Wielder  of  Wonder,  with  world's  renown.   and  I  heard  that  -­‐  was  -­‐'s  queen,   the  Heathoscylfing's  helpmate  dear.   Famed  was  this  Beowulf:  far  flew  the  boast  of   him,   To  Hrothgar  was  given  such  glory  of  war,   son  of  Scyld,  in  the  Scandian  lands.   such  honor  of  combat,  that  all  his  kin   So  becomes  it  a  youth  to  quit  him  well   obeyed  him  gladly  till  great  grew  his  band   of  youthful  comrades.  It  came  in  his  mind   with  his  father's  friends,  by  fee  and  gift,   that  to  aid  him,  aged,  in  after  days,   to  bid  his  henchmen  a  hall  uprear,   come  warriors  willing,  should  war  draw  nigh,   a  master  mead-­‐house,  mightier  far   liegemen  loyal:  by  lauded  deeds   than  ever  was  seen  by  the  sons  of  earth,   and  within  it,  then,  to  old  and  young   shall  an  earl  have  honor  in  every  clan.   Forth  he  fared  at  the  fated  moment,   he  would  all  allot  that  the  Lord  had  sent  him,   sturdy  Scyld  to  the  shelter  of  God.   save  only  the  land  and  the  lives  of  his  men.   Then  they  bore  him  over  to  ocean's  billow,   Wide,  I  heard,  was  the  work  commanded,   for  many  a  tribe  this  mid-­‐earth  round,   loving  clansmen,  as  late  he  charged  them,   while  wielded  words  the  winsome  Scyld,   to  fashion  the  folkstead.  It  fell,  as  he  ordered,   the  leader  beloved  who  long  had  ruled....   in  rapid  achievement  that  ready  it  stood  there,   In  the  roadstead  rocked  a  ring-­‐dight  vessel,   of  halls  the  noblest:  Heorot  he  named  it   ice-­‐flecked,  outbound,  atheling's  barge:   whose  message  had  might  in  many  a  land.   Not  reckless  of  promise,  the  rings  he  dealt,   there  laid  they  down  their  darling  lord   on  the  breast  of  the  boat,  the  breaker-­‐of-­‐rings,     treasure  at  banquet:  there  towered  the  hall,   by  the  mast  the  mighty  one.  Many  a  treasure   high,  gabled  wide,  the  hot  surge  waiting   fetched  from  far  was  freighted  with  him.   of  furious  flame.  Nor  far  was  that  day   when  father  and  son-­‐in-­‐law  stood  in  feud   No  ship  have  I  known  so  nobly  dight   with  weapons  of  war  and  weeds  of  battle,   for  warfare  and  hatred  that  woke  again.     with  breastplate  and  blade:  on  his  bosom  lay   With  envy  and  anger  an  evil  spirit   a  heaped  hoard  that  hence  should  go   endured  the  dole  in  his  dark  abode,   that  he  heard  each  day  the  din  of  revel   far  o'er  the  flood  with  him  floating  away.   No  less  these  loaded  the  lordly  gifts,   high  in  the  hall:  there  harps  rang  out,   thanes'  huge  treasure,  than  those  had  done   clear  song  of  the  singer.  He  sang  who  knew   tales  of  the  early  time  of  man,   how  the  Almighty  made  the  earth,   fairest  fields  enfolded  by  water,   set,  triumphant,  sun  and  moon   for  a  light  to  lighten  the  land-­‐dwellers,   and  braided  bright  the  breast  of  earth   with  limbs  and  leaves,  made  life  for  all   of  mortal  beings  that  breathe  and  move.   So  lived  the  clansmen  in  cheer  and  revel   a  winsome  life,  till  one  began   to  fashion  evils,  that  field  of  hell.   Grendel  this  monster  grim  was  called,   march-­‐riever  mighty,  in  moorland  living,   in  fen  and  fastness;  fief  of  the  giants   the  hapless  wight  a  while  had  kept   since  the  Creator  his  exile  doomed.   On  kin  of  Cain  was  the  killing  avenged   by  sovran  God  for  slaughtered  Abel.   Ill  fared  his  feud,  and  far  was  he  driven,   for  the  slaughter's  sake,  from  sight  of  men.   Of  Cain  awoke  all  that  woful  breed,   Etins  and  elves  and  evil-­‐spirits,   as  well  as  the  giants  that  warred  with  God   weary  while:  but  their  wage  was  paid  them!   WENT  he  forth  to  find  at  fall  of  night   that  haughty  house,  and  heed  wherever   the  Ring-­‐Danes,  outrevelled,  to  rest  had  gone.   Found  within  it  the  atheling  band   asleep  after  feasting  and  fearless  of  sorrow,   of  human  hardship.  Unhallowed  wight,   grim  and  greedy,  he  grasped  betimes,   wrathful,  reckless,  from  resting-­‐places,   thirty  of  the  thanes,  and  thence  he  rushed   fain  of  his  fell  spoil,  faring  homeward,   laden  with  slaughter,  his  lair  to  seek.   Then  at  the  dawning,  as  day  was  breaking,   the  might  of  Grendel  to  men  was  known;   then  after  wassail  was  wail  uplifted,   loud  moan  in  the  morn.  The  mighty  chief,   atheling  excellent,  unblithe  sat,   labored  in  woe  for  the  loss  of  his  thanes,   when  once  had  been  traced  the  trail  of  the   fiend,   spirit  accurst:  too  cruel  that  sorrow,   too  long,  too  loathsome.  Not  late  the  respite;   with  night  returning,  anew  began   ruthless  murder;  he  recked  no  whit,   firm  in  his  guilt,  of  the  feud  and  crime.   They  were  easy  to  find  who  elsewhere  sought   in  room  remote  their  rest  at  night,   bed  in  the  bowers,  when  that  bale  was  shown,   was  seen  in  sooth,  with  surest  token,  -­‐   the  hall-­‐thane's  hate.  Such  held  themselves   far  and  fast  who  the  fiend  outran!   Thus  ruled  unrighteous  and  raged  his  fill   one  against  all;  until  empty  stood   that  lordly  building,  and  long  it  bode  so.   Twelve  years'  tide  the  trouble  he  bore,   sovran  of  Scyldings,  sorrows  in  plenty,   boundless  cares.  There  came  unhidden   tidings  true  to  the  tribes  of  men,   in  sorrowful  songs,  how  ceaselessly  Grendel   harassed  Hrothgar,  what  hate  he  bore  him,   what  murder  and  massacre,  many  a  year,   feud  unfading,  -­‐  refused  consent   to  deal  with  any  of  Daneland's  earls,   make  pact  of  peace,  or  compound  for  gold:   still  less  did  the  wise  men  ween  to  get   great  fee  for  the  feud  from  his  fiendish  hands.   But  the  evil  one  ambushed  old  and  young   death-­‐shadow  dark,  and  dogged  them  still,   lured,  or  lurked  in  the  livelong  night   of  misty  moorlands:  men  may  say  not   where  the  haunts  of  these  Hell-­‐Runes  be.   Such  heaping  of  horrors  the  hater  of  men,   lonely  roamer,  wrought  unceasing,   harassings  heavy.  O'er  Heorot  he  lorded,   gold-­‐bright  hall,  in  gloomy  nights;   and  ne'er  could  the  prince  approach  his   throne,   -­‐  'twas  judgment  of  God,  -­‐  or  have  joy  in  his   hall.   Sore  was  the  sorrow  to  Scyldings'-­‐friend,   heart-­‐rending  misery.  Many  nobles   sat  assembled,  and  searched  out  counsel   how  it  were  best  for  bold-­‐hearted  men   against  harassing  terror  to  try  their  hand.   Whiles  they  vowed  in  their  heathen  fanes   altar-­‐offerings,  asked  with  words     that  the  slayer-­‐of-­‐souls  would  succor  give   them   for  the  pain  of  their  people.  Their  practice   this,   their  heathen  hope;  'twas  Hell  they  thought  of   in  mood  of  their  mind.  Almighty  they  knew   not,  Doomsman  of  Deeds  and  dreadful  Lord,   nor  Heaven's-­‐Helmet  heeded  they  ever,   Wielder-­‐of-­‐Wonder.  -­‐  Woe  for  that  man   who  in  harm  and  hatred  hales  his  soul   to  fiery  embraces;  -­‐  nor  favor  nor  change   awaits  he  ever.  But  well  for  him   that  after  death-­‐day  may  draw  to  his  Lord,   and  friendship  find  in  the  Father's  arms!   THUS  seethed  unceasing  the  son  of  Healfdene   with  the  woe  of  these  days;  not  wisest  men   assuaged  his  sorrow;  too  sore  the  anguish,   loathly  and  long,  that  lay  on  his  folk,   most  baneful  of  burdens  and  bales  of  the   night.   This  heard  in  his  home  Hygelac's  thane,   great  among  Geats,  of  Grendel's  doings.   He  was  the  mightiest  man  of  valor   in  that  same  day  of  this  our  life,   stalwart  and  stately.  A  stout  wave-­‐walker   he  bade  make  ready.  Yon  battle-­‐king,  said  he,   far  o'er  the  swan-­‐road  he  fain  would  seek,   the  noble  monarch  who  needed  men!   The  prince's  journey  by  prudent  folk   was  little  blamed,  though  they  loved  him  dear;   they  whetted  the  hero,  and  hailed  good   omens.   And  now  the  bold  one  from  bands  of  Geats   comrades  chose,  the  keenest  of  warriors   e'er  he  could  find;  with  fourteen  men   the  sea-­‐wood  he  sought,  and,  sailor  proved,   led  them  on  to  the  land's  confines.   Time  had  now  flown;  afloat  was  the  ship,   boat  under  bluff.  On  board  they  climbed,   warriors  ready;  waves  were  churning   sea  with  sand;  the  sailors  bore   on  the  breast  of  the  bark  their  bright  array,   their  mail  and  weapons:  the  men  pushed  off,   on  its  willing  way,  the  well-­‐braced  craft.   Then  moved  o'er  the  waters  by  might  of  the   wind   that  bark  like  a  bird  with  breast  of  foam,   till  in  season  due,  on  the  second  day,   the  curved  prow  such  course  had  run   that  sailors  now  could  see  the  land,   sea-­‐cliffs  shining,  steep  high  hills,   headlands  broad.  Their  haven  was  found,   their  journey  ended.  Up  then  quickly   the  Weders'  clansmen  climbed  ashore,   anchored  their  sea-­‐wood,  with  armor  clashing   and  gear  of  battle:  God  they  thanked   for  passing  in  peace  o'er  the  paths  of  the  sea.   Now  saw  from  the  cliff  a  Scylding  clansman,   a  warden  that  watched  the  water-­‐side,   how  they  bore  o'er  the  gangway  glittering   shields,   war-­‐gear  in  readiness;  wonder  seized  him   to  know  what  manner  of  men  they  were.   Straight  to  the  strand  his  steed  he  rode,   Hrothgar's  henchman;  with  hand  of  might   he  shook  his  spear,  and  spake  in  parley.   "Who  are  ye,  then,  ye  armed  men,   mailed  folk,  that  yon  mighty  vessel   have  urged  thus  over  the  ocean  ways,   here  o'er  the  waters?  A  warden  I,   sentinel  set  o'er  the  sea-­‐march  here,   lest  any  foe  to  the  folk  of  Danes   with  harrying  fleet  should  harm  the  land.   No  aliens  ever  at  ease  thus  bore  them,   linden-­‐wielders:  yet  word-­‐of-­‐leave   clearly  ye  lack  from  clansmen  here,   my  folk's  agreement.  -­‐  A  greater  ne'er  saw  I   of  warriors  in  world  than  is  one  of  you,  -­‐     yon  hero  in  harness!  No  henchman  he   worthied  by  weapons,  if  witness  his  features,   his  peerless  presence!  I  pray  you,  though,  tell   your  folk  and  home,  lest  hence  ye  fare   suspect  to  wander  your  way  as  spies   in  Danish  land.  Now,  dwellers  afar,   ocean-­‐travellers,  take  from  me   simple  advice:  the  sooner  the  better   I  hear  of  the  country  whence  ye  came."   To  him  the  stateliest  spake  in  answer;   the  warriors'  leader  his  word-­‐hoard   unlocked:-­‐   "We  are  by  kin  of  the  clan  of  Geats,   and  Hygelac's  own  hearth-­‐fellows  we.   To  folk  afar  was  my  father  known,   noble  atheling,  Ecgtheow  named.   Full  of  winters,  he  fared  away   aged  from  earth;  he  is  honored  still   through  width  of  the  world  by  wise  men  all.   To  thy  lord  and  liege  in  loyal  mood   we  hasten  hither,  to  Healfdene's  son,   people-­‐protector:  be  pleased  to  advise  us!   To  that  mighty-­‐one  come  we  on  mickle   errand,   to  the  lord  of  the  Danes;  nor  deem  I  right   that  aught  be  hidden.  We  hear  -­‐  thou  knowest   if  sooth  it  is  -­‐  the  saying  of  men,   that  amid  the  Scyldings  a  scathing  monster,   dark  ill-­‐doer,  in  dusky  nights   shows  terrific  his  rage  unmatched,   hatred  and  murder.  To  Hrothgar  I   in  greatness  of  soul  would  succor  bring,   so  the  Wise-­‐and-­‐Brave  may  worst  his  foes,  -­‐   if  ever  the  end  of  ills  is  fated,   of  cruel  contest,  if  cure  shall  follow,   and  the  boiling  care-­‐waves  cooler  grow;   else  ever  afterward  anguish-­‐days   he  shall  suffer  in  sorrow  while  stands  in  place   high  on  its  hill  that  house  unpeered!"   Astride  his  steed,  the  strand-­‐ward  answered,   clansman  unquailing:  "The  keen-­‐souled  thane   must  be  skilled  to  sever  and  sunder  duly   words  and  works,  if  he  well  intends.   I  gather,  this  band  is  graciously  bent   to  the  Scyldings'  master.  March,  then,  bearing   weapons  and  weeds  the  way  I  show  you.   I  will  bid  my  men  your  boat  meanwhile   to  guard  for  fear  lest  foemen  come,  -­‐   your  new-­‐tarred  ship  by  shore  of  ocean   faithfully  watching  till  once  again   it  waft  o'er  the  waters  those  well-­‐loved   thanes,   -­‐  winding-­‐neck'd  wood,  -­‐  to  Weders'  bounds,   heroes  such  as  the  hest  of  fate   shall  succor  and  save  from  the  shock  of  war."   They  bent  them  to  march,  -­‐  the  boat  lay  still,   fettered  by  cable  and  fast  at  anchor,   broad-­‐bosomed  ship.  -­‐  Then  shone  the  boars     over  the  cheek-­‐guard;  chased  with  gold,   keen  and  gleaming,  guard  it  kept   o'er  the  man  of  war,  as  marched  along   heroes  in  haste,  till  the  hall  they  saw,   broad  of  gable  and  bright  with  gold:   that  was  the  fairest,  'mid  folk  of  earth,       of  houses  'neath  heaven,  where  Hrothgar   lived,   and  the  gleam  of  it  lightened  o'er  lands  afar.   The  sturdy  shieldsman  showed  that  bright   burg-­‐of-­‐the-­‐boldest;  bade  them  go   straightway  thither;  his  steed  then  turned,   hardy  hero,  and  hailed  them  thus:-­‐   "Tis  time  that  I  fare  from  you.  Father  Almighty   in  grace  and  mercy  guard  you  well,   safe  in  your  seekings.  Seaward  I  go,   'gainst  hostile  warriors  hold  my  watch."   Python  Source  Code  for  Data  Preparation    This  code  is  also  available  for  upon  request.   Appendix  2:   ############### # B(eo)W(u)LF Code: By-Word Long-Form Data Preparation # This code reads in a sample text file, reformats it, and exports it # to a new file before further formatting and analysis. # Written by: Alexandra Paxton, University of California, Merced # Date last modified: June 16, 2013 ############### # coding:utf-8 import os,re,unicodedata,shlex,glob # read in text file os.chdir('~/bwlfTechReport/') beowulfText = open('beowulfTextSnippet.txt','r') # open file beowulf = beowulfText.read() # read in text # start the cleanup (change according to text) beowulf = re.sub('\r','\n',beowulf) # ensure all newlines are identical beowulf = re.sub('(^\n)([A-Z]{2,}( ,))','\n\n[canto]\n\\2',beowulf) # create canto indicator beowulf = re.sub(':;(\-),',' ',beowulf) # remove non-target punctuation beowulf = re.sub('(\.){3,}','.',beowulf) beowulf = re.sub(' {1,}',' ',beowulf) # remove redundant spaces # convert all text to lower case beowulf = beowulf.lower() # split by spaces beowulf = re.sub('\n(?=([A-Z][a-z]\"))',' [line] ',beowulf) # create line indicator beowulf = re.sub('\n',' ',beowulf) # convert newline to space beowulf = re.split(' +',beowulf) # split file by space beowulf = str(beowulf) # convert to a string beowulf = re.sub('((\')("))\, ((\')("))',',',beowulf) # remove extraneous quotations beowulf = re.sub('\,{2}',',',beowulf) # remove empty cells beowulf = re.sub('(\[\'(,)?)(\'\])','',beowulf) # remove extraneous brackets # close file and print new file beowulfText.close() cleaned = file('beowulfCleaned.csv','w') cleaned.write(beowulf) cleaned.close() MATLAB  Source  Code  for  Initial  Text  Analysis    This  code  is  also  available  for  upon  request.   Appendix  3:   %% B(eo)W(u)LF Code: By-Word Long-Form Initial Text Analysis % This code reads in the cleaned file produced by the Python script, % computes a series of automatic variables from the texts, then outputs % two files: a matrix with the automatic variables and a text file % suitable for other linguistic analyses (e.g., LIWC). % Written by: Alexandra Paxton, University of California, Merced % Date last modified: June 17, 2013 %% % preliminaries clear cd('./bwlfTechReport'); % read in cleaned text file bText = fopen('beowulfCleaned.csv'); bRead = textscan(bText,'%s','EndOfLine','\n','delimiter',','); bRead = bRead{1,1}; disp('Cleaned Text File Loaded.') % separate and renumber cantos canto = regexp(bRead,'\[canto\]'); cantoCount = 0; trashLines = []; for cantos = 1:length(bRead) if cellfun(@isempty,canto(cantos))==0 cantoCount = cantoCount + 1; trashLines = [trashLines cantos]; else cantoTrack(cantos,1) = cantoCount; end end disp('Cantos Numbered.') % separate and renumber lines pLine = regexp(bRead,'\[line\]'); pLineCount = 0; for pLines = 1:length(bRead) if cellfun(@isempty,pLine(pLines))==0 pLineCount = pLineCount + 1; trashLines = [trashLines pLines]; else pLineTrack(pLines,1) = pLineCount; end end disp('Poem Lines Numbered.') % remove indicator lines from text and indicator matrices bRead(trashLines) = []; cantoTrack(trashLines) = []; pLineTrack(trashLines) = []; % find end-of-sentence lines ends = regexp(bRead,'.*[\.?\!]'); endsNone = cellfun(@isempty,ends); disp('Sentences Isolated.') % track speech lines speech = regexp(bRead,'.*\"'); speechTrack = []; tempStore = []; speechEvent = 1; for speaking = 1:length(bRead) if cellfun(@isempty,speech(speaking))==0 tempStore = [tempStore speaking]; if length(tempStore)==2 speechTrack(speechEvent,1:2) = tempStore; tempStore = []; speechEvent = speechEvent + 1; end end end sTrack = 1; for speechMark = 1:length(bRead) if speechTrack(sTrack,1) <= speechMark && speechMark<= speechTrack(sTrack,2) speech{speechMark} = 1; if speechMark == speechTrack(sTrack,2) sTrack = sTrack + 1; end end end speechNone = cellfun(@isempty,speech); disp('Speech Isolated.') % create initial by-word long-form matrix for i = 1:length(bRead) % track sentence ends if endsNone(i) == 0 eos = 1; % indicates end of sentence charNum = length(char(bRead{i}))-1; % tracks current word length, minus the punctuation else eos = 0; % indicates not end of sentence charNum = length(char(bRead{i})); % tracks current word length, minus the punctuation end % track speech events if speechNone(i) == 0 sp = 1; % indicates speech event if regexp(bRead{i},'.*\"')==1 charNum = charNum - 1; % subtrack quotation mark from character count end else sp = 0; % indicates no speech event end % store everything in matrix beowulfMat(i,:) = {int2str(cantoTrack(i)),int2str(pLineTrack(i)),bRead{i},int2str(charNum ),int2str(sp),int2str(eos)}; if mod(i,500)==0; disp(['Line ' int2str(i) ' of ' int2str(length(bRead)) ' Recorded.']) end end % save workspace save beowulfBWLF.mat disp('MATLAB Workspace Saved.') % print transcript for LIWC textFileName = ('bwlfTextAnalysisPrep.txt'); textLine = beowulfMat(:,3); textFile = fopen(textFileName,'w'); for word = 1:length(textLine) fprintf(textFile,'%s\n',textLine{word}); end % print matrix matrixFile = ('beowulfBWLFMatrix.csv'); matOut = fopen(matrixFile,'w'); header_names = {'canto';'line';'word';'charnum';'speech';'eos'}; fprintf(matOut,'%s,%s,%s,%s,%s,%s\n',header_names{:}); for beoLine = 1:size(beowulfMat,1) fprintf(matOut,'%s,%s,%s,%s,%s,%s\n',beowulfMat{beoLine,:}); end disp('Matrix Output Complete.') save beowulfBLWF.mat % close file fclose(matOut); disp('Processing Complete.') canto 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 line 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 Appendix  4:   39  Lines  of  BWLF  Output   charnum word lo 2 6 praise 2 of 3 the prowess 7 2 of 6 people kings 5 2 of 5 spear armed 5 5 danes 2 in days 4 4 long 4 sped we 2 4 have 5 heard 3 and what 4 5 honor 3 the athelings 9 3 won! 3 oft scyld 5 3 the 7 scefing from 4 10 squadroned 4 foes 4 from many 4 1 a 5 tribe the 3 4 mead   speech 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 eos 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0  This  code  is  also  available  for  upon  request.   Appendix  5:     MATLAB  Source  Code  for  Data  Integration   %% B(eo)W(u)LF Code: By-Word Long-Form Data Integration % This code combines the BWLF matrix created with the previous % MATLAB script with LIWC output to create a single file. % Written by: Alexandra Paxton, University of California, Merced % Date last modified: June 17, 2013 %% % preliminaries clear cd('./bwlfTechReport'); % import LIWC data liwcData = importdata('beowulfLIWC.txt'); disp('LIWC Data Imported.') % create variables named for each header headers = liwcData.textdata(1,:); Filename = liwcData.textdata(2:end,1); for i = 2:(length(headers)) eval([headers{i} ' = liwcData.data(:,' int2str(i-1) ');']); end disp('LIWC Category Variable Headers Created.') % import workspace load beowulfBWLF.mat % create output file for integrated matrx matrixFile = ('beowulfBwlfLiwc.csv'); matOut = fopen(matrixFile,'w'); % print headers fprintf(matOut,'%s,',header_names{:}); fprintf(matOut,'%s,',headers{1:length(headers)-1}); fprintf(matOut,'%s\n',headers{length(headers)}); % print to file for thisLine = 1:length(bRead) fprintf(matOut,'%s,',beowulfMat{thisLine,1:6}); fprintf(matOut,'%s,',Filename{thisLine}); fprintf(matOut,'%d,',liwcData.data(thisLine,1:(length(headers)- 2))); fprintf(matOut,'%d\n',liwcData.data(thisLine,length(headers)-1)); if mod(thisLine,500)==0; disp(['Line ' int2str(thisLine) ' Recorded.']) end end fclose(matOut); disp('Processing Complete.') Appendix  6:   39  Lines  of  BWLF  Output  with  (Partial)  Integrated  LIWC  Analyses   charnum speech eos Seg WC WPS Sixltr Dic canto line word 1 1 lo 2 0 0 1 1 1 0 0 100 0 1 1 2 0 0 6 praise 1 1 100 0 1 1 3 0 0 2 of 1 1 100 0 1 1 4 0 0 3 the 1 1 1 1 prowess 7 0 0 5 1 1 100 0 100 0 1 1 6 0 0 2 of 1 1 100 0 1 1 7 0 0 6 people 1 1 1 1 kings 5 0 0 8 1 1 0 100 100 0 1 1 9 0 0 2 of 2 1 0 0 1 1 10 0 0 5 spear 2 1 1 2 armed 5 0 0 11 1 1 0 0 0 0 1 1 12 0 0 5 danes 2 1 100 0 1 1 13 0 0 2 in 2 1 1 2 days 4 0 0 14 1 1 0 100 100 0 1 1 15 0 0 4 long 2 1 100 0 1 1 16 0 0 4 sped 2 1 100 0 1 1 17 0 0 2 we 3 1 1 3 have 4 0 0 18 1 1 0 100 100 0 1 1 19 0 0 5 heard 3 1 100 0 1 1 20 0 0 3 and 3 1 1 3 what 4 0 0 21 1 1 0 100 100 0 1 1 22 0 0 5 honor 3 1 100 0 1 1 23 0 0 3 the 3 1 1 3 athelings 9 0 0 24 1 1 100 0 100 0 1 1 25 1 0 3 won! 3 1 0 0 1 1 26 0 0 3 oft 4 1 1 4 scyld 5 0 0 27 1 1 0 0 100 0 1 1 28 0 0 3 the 4 1 0 100 1 1 29 0 0 7 scefing 4 1 1 4 from 4 0 0 30 1 1 0 100 0 100 1 1 31 0 0 squadroned 10 4 1 100 0 1 1 32 0 0 4 foes 4 1 100 0 1 1 33 0 0 4 from 5 1 1 5 many 4 0 0 34 1 1 0 100 100 0 1 1 35 0 0 1 a 5 1 0 0 1 1 36 0 0 5 tribe 5 1 1 5 the 3 0 0 37 1 1 0 100 1 0 0 1 1 38 0 0 4 mead 5
1911.12569
1
1911
2019-11-28T07:43:04
Emotion helps Sentiment: A Multi-task Model for Sentiment and Emotion Analysis
[ "cs.CL" ]
In this paper, we propose a two-layered multi-task attention based neural network that performs sentiment analysis through emotion analysis. The proposed approach is based on Bidirectional Long Short-Term Memory and uses Distributional Thesaurus as a source of external knowledge to improve the sentiment and emotion prediction. The proposed system has two levels of attention to hierarchically build a meaningful representation. We evaluate our system on the benchmark dataset of SemEval 2016 Task 6 and also compare it with the state-of-the-art systems on Stance Sentiment Emotion Corpus. Experimental results show that the proposed system improves the performance of sentiment analysis by 3.2 F-score points on SemEval 2016 Task 6 dataset. Our network also boosts the performance of emotion analysis by 5 F-score points on Stance Sentiment Emotion Corpus.
cs.CL
cs
Emotion helps Sentiment: A Multi-task Model for Sentiment and Emotion Analysis Abhishek Kumar Asif Ekbal Department of Computer Science and Engineering Indian Institute of Technology Patna, India Department of Computer Science and Engineering Indian Institute of Technology Patna, India [email protected] [email protected] Daisuke Kawahra Sadao Kurohashi Department of Intelligence Science and Technology Department of Intelligence Science and Technology Kyoto University, Japan [email protected] Kyoto University, Japan [email protected] Abstract -- In this paper, we propose a two-layered multi-task attention based neural network that performs sentiment analysis through emotion analysis. The proposed approach is based on Bidirectional Long Short-Term Memory and uses Distributional Thesaurus as a source of external knowledge to improve the sentiment and emotion prediction. The proposed system has two levels of attention to hierarchically build a meaningful representation. We evaluate our system on the benchmark dataset of SemEval 2016 Task 6 and also compare it with the state-of-the- art systems on Stance Sentiment Emotion Corpus. Experimental results show that the proposed system improves the performance of sentiment analysis by 3.2 F-score points on SemEval 2016 Task 6 dataset. Our network also boosts the performance of emotion analysis by 5 F-score points on Stance Sentiment Emotion Corpus. I. INTRODUCTION The emergence of social media sites with limited character constraint has ushered in a new style of communication. Twit- ter users within 280 characters per tweet share meaningful and informative messages. These short messages have a powerful impact on how we perceive and interact with other human beings. Their compact nature allows them to be transmitted efficiently and assimilated easily. These short messages can shape people's thought and opinion. This makes them an interesting and important area of study. Tweets are not only important for an individual but also for the companies, political parties or any organization. Companies can use tweets to gauge the performance of their products and predict market trends [1]. The public opinion is particularly interesting for political parties as it gives them an idea of voter's inclination and their support. Sentiment and emotion analysis can help to gauge product perception, predict stock prices and model public opinions [2]. Sentiment analysis [3] is an important area of research in natural language processing (NLP) where we automatically determine the sentiments (positive, negative, neutral). Emotion analysis focuses on the extraction of predefined emotion from documents. Discrete emotions [4], [5] are often classified into anger, anticipation, disgust, fear, joy, sadness, surprise and trust. Sentiments and emotions are subjective and hence they are understood similarly and often used interchangeably. This is also mostly because both emotions and sentiments refer to experiences that result from the combined influences of the biological, the cognitive, and the social [6]. However, emotions are brief episodes and are shorter in length [7], whereas senti- ments are formed and retained for a longer period. Moreover, emotions are not always target-centric whereas sentiments are directed. Another difference between emotion and sentiment is that a sentence or a document may contain multiple emotions but a single overall sentiment. Prior studies show that sentiment and emotion are generally tackled as two separate problems. Although sentiment and emotion are not exactly the same, they are closely related. Emotions, like joy and trust, intrinsically have an association with a positive sentiment. Similarly, anger, disgust, fear and sadness have a negative tone. Moreover, sentiment analysis alone is insufficient at times in imparting complete informa- tion. A negative sentiment can arise due to anger, disgust, fear, sadness or a combination of these. Information about emotion along with sentiment helps to better understand the state of the person or object. The close association of emotion with sentiment motivates us to build a system for sentiment analysis using the information obtained from emotion analysis. In this paper, we put forward a robust two-layered multi- task attention based neural network which performs sentiment analysis and emotion analysis simultaneously. The model uses two levels of attention - the first primary attention builds the best representation for each word using Distributional Thesaurus and the secondary attention mechanism creates the final sentence level representation. The system builds the representation hierarchically which gives it a good intuitive working insight. We perform several experiments to evaluate the usefulness of primary attention mechanism. Experimental results show that the two-layered multi-task system for senti- ment analysis which uses emotion analysis as an auxiliary task improves over the existing state-of-the-art system of SemEval 2016 Task 6 [8]. The main contributions of the current work are two-fold: a) We propose a novel two-layered multi-task attention based system for joint sentiment and emotion analysis. This system has two levels of attention which builds a hierarchical repre- sentation. This provides an intuitive explanation of its working; b) We empirically show that emotion analysis is relevant and useful in sentiment analysis. The multi-task system utilizing fine-grained information of emotion analysis performs better than the single task system of sentiment analysis. II. RELATED WORK A survey of related literature reveals the use of both classical and deep-learning approaches for sentiment and emotion anal- ysis. The system proposed in [9] relied on supervised statistical text classification which leveraged a variety of surface form, semantic, and sentiment features for short informal texts. A Support Vector Machine (SVM) based system for sentiment analysis was used in [10], whereas an ensemble of four different sub-systems for sentiment analysis was proposed in [11]. It comprised of Long Short-Term Memory (LSTM) [12], Gated Recurrent Unit (GRU) [13], Convolutional Neural Network (CNN) [14] and Support Vector Regression (SVR) [15]. [16] reported the results for emotion analysis using SVR, LSTM, CNN and Bi-directional LSTM (Bi-LSTM) [17]. [18] proposed a lexicon based feature extraction for emotion text classification. A rule-based approach was adopted by [19] to extract emotion-specific semantics. [20] used a high-order Hidden Markov Model (HMM) for emotion detection. [21] ex- plored deep learning techniques for end-to-end trainable emo- tion recognition. [22] proposed a multi-task learning model for fine-grained sentiment analysis. They used ternary sentiment classification (negative, neutral, positive) as an auxiliary task for fine-grained sentiment analysis (very-negative, negative, neutral, positive, very-positive). A CNN based system was proposed by [23] for three phase joint multi-task training. [24] presented a multi-task learning based model for joint sentiment analysis and semantic embedding learning tasks. [25] proposed a multi-task setting for emotion analysis based on a vector- valued Gaussian Process (GP) approach known as coregion- alisation [26]. A hierarchical document classification system based on sentence and document representation was proposed by [27]. An attention framework for sentiment regression is described in [28]. [29] proposed a DeepEmoji system based on transfer learning for sentiment, emotion and sarcasm detection through emoji prediction. However, the DeepEmoji system treats these independently, one at a time. Our proposed system differs from the above works in the sense that none of these works addresses the problem of sentiment and emotion analysis concurrently. Our empirical analysis shows that performance of sentiment analysis is boosted significantly when this is jointly performed with emotion analysis. This may be because of the fine-grained characteristics of emotion analysis that provides useful evi- dences for sentiment analysis. III. PROPOSED METHODOLOGY We propose a novel two-layered multi-task attention based neural network for sentiment analysis where emotion analysis is utilized to improve its efficiency. Figure 1 illustrates the overall architecture of the proposed multi-task system. The proposed system consists of a Bi-directional Long Short-Term Memory (BiLSTM) [17], a two-level attention mechanism [30], [31] and a shared representation for emotion and sen- timent analysis tasks. The BiLSTM encodes the word repre- sentation of each word. This representation is shared between the subsystems of sentiment and emotion analysis. Each of the shared representations is then fed to the primary attention mechanism of both the subsystems. The primary attention mechanism finds the best representation for each word for each task. The secondary attention mechanism acts on top of the primary attention to extract the best sentence representation by focusing on the suitable context for each task. Finally, the representations of both the tasks are fed to two different feed-forward neural networks to produce two outputs - one for sentiment analysis and one for emotion analysis. Each component is explained in the subsequent subsections. A. Two-Layered Multi-Task Attention Model 1) BiLSTM based word encoder: Recurrent Neural Net- works (RNN) are a class of networks which take sequential input and computes a hidden state vector for each time step. The current hidden state vector depends on the current input and the previous hidden state vector. This makes them good for handling sequential data. However, they suffer from a vanishing or exploding gradient problem when presented with long sequences. The gradient for back-propagating error either reduces to a very small number or increases to a very high value which hinders the learning process. Long Short Term Memory (LSTM) [12], a variant of RNN solves this problem by the gating mechanisms. The input, forget and output gates control the information flow. BiLSTM is a special type of LSTM which takes into account the output of two LSTMs - one working in the forward direction and one working in the backward direction. The presence of contextual information for both past and future helps the BiLSTM to make an informed decision. The −→ ←− concatenation of a hidden state vectors ht of the forward ht of the backward LSTM at any time step t LSTM and provides the complete information. Therefore, the output of ←− the BiLSTM at any time step t is ht = [ ht]. The output of the BiLSTM is shared between the main task (Sentiment Analysis) and the auxiliary task (Emotion Analysis). −→ ht, 2) Word Attention: The word level attention (primary at- tention) mechanism gives the model a flexibility to represent each word for each task differently. This improves the word representation as the model chooses the best representation for each word for each task. A Distributional Thesaurus (DT) identifies words that are semantically similar, based on whether they tend to occur in a similar context. It provides a word expansion list for words based on their contextual Fig. 1. Two-layered multi-task attention based network similarity. We use the top-4 words for each word as their candidate terms. We only use the top-4 words for each word as we observed that the expansion list with more words started to contain the antonyms of the current word which empirically reduced the system performance. Word embeddings of these four candidate terms and the hidden state vector ht of the input word are fed to the primary attention mechanism. The primary attention mechanism finds the best attention coeffi- cient for each candidate term. At each time step t we get V(xt) candidate terms for each input xt with vi being the embedding for each term (Distributional Thesaurus and word embeddings are described in the next section). The primary attention mechanism assigns an attention coefficient to each of the candidate terms having the index i ∈ V(xt): αti ∝ exp((hT t Ww + bw)vi) where Ww and bw are jointly learned parameters. (cid:88) mt = αtivi i∈V (xt) (1) (2) Each embedding of the candidate term is weighted with the attention score αti and then summed up. This produces mt, the representation for the current input xt obtained from the Distributional Thesaurus using the candidate terms. (cid:98)ht = mt + ht Finally, mt and ht are concatenated to get (cid:98)ht, the final output (3) of the primary attention mechanism. 3) Sentence Attention: The sentence attention (secondary attention) part focuses on each word of the sentence and assigns the attention coefficients. The attention coefficients are assigned on the basis of words' importance and their contextual relevance. This helps the model to build the over- all sentence representation by capturing the context while weighing different word representations individually. The final sentence representation is obtained by multiplying each word vector representation with their attention coefficient and sum- ming them over. The attention coefficient αt for each word vector representation and the sentence representation (cid:98)H are calculated as: where Ws and bs are parameters to be learned. t Ws + bs)) αt ∝ exp(tanh((cid:99)hT (cid:88) αt(cid:98)ht (cid:98)H = (4) (5) t (cid:98)H denotes the sentence representation for sentiment analy- sis. Similarly, we calculate ¯H which represents the sentence for emotion classification. The system has the flexibility to compute different representations for sentiment and emotion analysis both. emotion analysis are computed by feeding (cid:98)H and ¯H to two 4) Final Output: The final outputs for both sentiment and different one-layer feed forward neural networks. For our task, the feed forward network for sentiment analysis has two output units, whereas the feed forward network for emotion analysis has eight output nodes performing multi-label classification. B. Distributional Thesaurus Distributional Thesaurus (DT) [32] ranks words according to their semantic similarity. It is a resource which produces a list of words in decreasing order of their similarity for each word. We use the DT to expand each word of the sentence. The top-4 words serve as the candidate terms for each word. For example, the candidate terms for the word good are: great, nice awesome and superb. DT offers the primary attention mechanism external knowledge in the form of candidate terms. It assists the system to perform better when presented with unseen words during testing as the unseen words could have been a part of the DT expansion list. For example, the system may not come across the word superb during training but it can appear in the test set. Since the system has already seen the word superb in the DT expansion list of the word good, it can handle this case efficiently. This fact is established by our evaluation results as the model performs better when the DT expansion and primary attentions are a part of the final multi-task system. C. Word Embeddings Word embeddings represent words in a low-dimensional nu- merical form. They are useful for solving many NLP problems. We use the pre-trained 300 dimensional Google Word2Vec [33] embeddings. The word embedding for each word in the sentence is fed to the BiLSTM network to get the current hidden state. Moreover, the primary attention mechanism is also applied to the word embeddings of the candidate terms for the current word. IV. DATASETS, EXPERIMENTS AND ANALYSIS In this section we present the details of the datasets used for the experiments, results that we obtain and the necessary analysis. A. Datasets We evaluate our proposed approach for joint sentiment and emotion analysis on the benchmark dataset of SemEval 2016 Task 6 [8] and Stance Sentiment Emotion Corpus (SSEC) [16]. The SSEC corpus is an annotation of the SemEval 2016 Task 6 corpus with emotion labels. The re-annotation of the SemEval 2016 Task 6 corpus helps to bridge the gap between the unavailability of a corpus with sentiment and emotion labels. The SemEval 2016 corpus contains tweets which are classified into positive, negative or other. It contains 2,914 training and 1,956 test instances. The SSEC corpus is annotated with anger, anticipation, disgust, fear, joy, sadness, surprise and trust labels. Each tweet could belong to one or more emotion classes and one sentiment class. Table I shows the data statistics of SemEval 2016 task 6 and SSEC which are used for sentiment and emotion analysis, respectively. B. Preprocessing The SemEval 2016 task 6 corpus contains tweets from Twitter. Since the tweets are derived from an environment with the constraint on the number of characters, there is an inherent problem of word concatenation, contractions and use of hashtags. Example: #BeautifulDay, we've, etc. Usernames and URLs do not impart any sentiment and emotion infor- mation (e.g. @John). We use the Python package ekphrasis [34] for handling these situations. Ekphrasis helps to split the concatenated words into individual words and expand the contractions. For example, #BeautifulDay to # Beautiful Day and we've to we have. We replace usernames with <user>, number with < number > and URLs with <url> token. C. Implementation Details We implement our model in Python using Tensorflow on a single GPU. We experiment with six different BiLSTM based architectures. The three architectures correspond to BiLSTM based systems without primary attention i.e. only with secondary attention for sentiment analysis (S1), emotion analysis (E1) and the multi-task system (M1) for joint senti- ment and emotion analysis. The remaining three architectures correspond to the systems for sentiment analysis (S2), emotion analysis (E2) and multi-task system (M2), with both primary and secondary attention. The weight matrices were initialized randomly using numbers form a truncated normal distribution. The batch size was 64 and the dropout [35] was 0.6 with the Adam optimizer [36]. The hidden state vectors of both the forward and backward LSTM were 300-dimensional, whereas the context vector was 150-dimensional. Relu [37] was used as the activation for the hidden layers, whereas in the output layer we used sigmoid as the activation function. Sigmoid cross-entropy was used as the loss function. F1-score was reported for the sentiment analysis [8] and precision, recall and F1-score were used as the evaluation metric for emotion analysis [16]. Therefore, we report the F1-score for sentiment and precision, recall and F1-score for emotion analysis. D. Results and Analysis We compare the performance of our proposed system with the state-of-the-art systems of SemEval 2016 Task 6 and the systems of [16]. Experimental results show that the proposed system improves the existing state-of-the-art systems for sen- timent and emotion analysis. We summarize the results of evaluation in Table II. The primary attention mechanism plays a key role in the overall system as it improves the score of both sentiment and emotion analysis in both single task as well as multi- task systems. The use of primary attention improves the performance of single task systems for sentiment and emotion analysis by 2.21 and 1.72 points, respectively.Similarly, when sentiment and emotion analysis are jointly performed the primary attention mechanism improves the score by 0.93 and 2.42 points for sentiment and emotion task, respectively. To further measure the usefulness of the primary attention mechanism and the Distributional Thesaurus, we remove it from the systems S2, E2, and M2 to get the systems S1, E1, and M1. In all the cases, with the removal of primary attention mechanism, the performance drops. This is clearly illustrated in Figure 2. These observations indicate that the Data Train Test Sentiment Dataset (SemEval 2016 task 6) other pos 963 189 123 561 neg 1762 1272 anger 1657 1245 anticipation 1495 1205 Emotion Dataset (Stance Sentiment Emotion Corpus) disgust 1271 912 fear 1040 800 joy 1310 757 sadness 1583 1061 surprise 581 527 trust 1032 681 DATASET STATISTICS OF SEMEVAL 2016 TASK 6 AND SSEC USED FOR SENTIMENT AND EMOTION ANALYSIS, RESPECTIVELY. TABLE I Models Sentiment Emotion only secondary attention primary + secondary attention Single task system for Sentiment Analysis S1 S2 Single task system for Emotion Analysis E1 E2 Multi-task system M1 M2 only secondary attention primary + secondary attention only secondary attention primary + secondary attention TABLE II 75.37 77.58 - - 81.17 82.10 - - 64.94 66.66 63.02 65.44 F-SCORE OF VARIOUS MODELS ON SENTIMENT AND EMOTION TEST DATASET. Models UWB [38] INF-UFRGS-OPINION-MINING [39] LitisMind pkudblab [40] SVM + n-grams + sentiment [8] M2 (proposed) Sentiment (F-score) 42.02 42.32 44.66 56.28 78.90 82.10 COMPARISON WITH THE STATE-OF-THE-ART SYSTEMS OF SEMEVAL 2016 TASK 6 ON SENTIMENT DATASET. TABLE III primary attention mechanism is an important component of the two-layered multi-task attention based network for sentiment analysis. We also perform t-test [41] for computing statistical significance of the obtained results from the final two-layered multi-task system M2 for sentiment analysis by calculating the p-values and observe that the performance gain over M1 is significant with p-value = 0.001495. Similarly, we perform the statistical significance test for each emotion class. The p-values for anger, anticipation, fear, disgust, joy, sadness, surprise and trust are 0.000002, 0.000143, 0.00403, 0.000015, 0.004607, 0.069, 0.000001 and 0.000001, respectively. These results provide a good indication of statistical significance. Table III shows the comparison of our proposed system with the existing state-of-the-art system of SemEval 2016 Task 6 for the sentiment dataset. [8] used feature-based SVM, [40] used keyword rules, LitisMind relied on hashtag rules on external data, [39] utilized a combination of sentiment classifiers and rules, whereas [38] used a maximum entropy classifier with domain-specific features. Our system comfortably surpasses the existing best system at SemEval. Our system manages to improve the existing best system of SemEval 2016 task 6 by 3.2 F-score points for sentiment analysis. We also compare our system with the state-of-the-art sys- tems proposed by [16] on the emotion dataset. The comparison is demonstrated in Table IV. Maximum entropy, SVM, LSTM, Bi-LSTM, and CNN were the five individual systems used by [16]. Overall, our proposed system achieves an improvement of 5 F-Score points over the existing state-of-the-art system for emotion analysis. Individually, the proposed system improves the existing F-scores for all the emotions except surprise. The findings of [16] also support this behavior (i.e. worst result for the surprise class). This could be attributed to the data scarcity and a very low agreement between the annotators for the emotion surprise. Experimental results indicate that the multi-task system which uses fine-grained information of emotion analysis helps to boost the performance of sentiment analysis. The system M1 comprises of the system S1 performing the main task (sentiment analysis) with E1 undertaking the auxiliary task (emotion analysis). Similarly, the system M2 is made up of S2 and E2 where S2 performs the main task (sentiment analysis) and E2 commits to the auxiliary task (emotion analysis). We observe that in both the situations, the auxiliary task, i.e. emotional information increases the performance of the main task, i.e. sentiment analysis when these two are jointly performed. Experimental results help us to establish the fact that emotion analysis benefits sentiment analysis. The implicit sentiment attached to the emotion words assists the multi-task system. Emotion such as joy and trust are inherently associated with a positive sentiment whereas, anger, disgust, fear and sadness bear a negative sentiment. Figure 2 illustrates the performance of various models for sentiment analysis. Fig. 2. Comparison of various models (S1, S2, M1, M2) w.r.t different hidden state vector sizes of BiLSTM for sentiment analysis. Y-axis denotes the F- scores. As a concrete example which justifies the utility of emotion analysis in sentiment analysis is shown below. @realMessi he is a real sportsman and deserves to be the Models Metric Anger Anticipation MaxEnt SVM LSTM BiLSTM CNN E2 (proposed) P R F P R F P R F P R F P R F P R F 76 72 74 76 69 72 76 77 76 77 77 77 77 77 77 81 83 82 72 61 66 70 60 64 68 68 67 70 66 68 68 60 64 74 62 68 Disgust 62 47 54 59 53 56 64 68 65 61 64 63 62 61 62 70 74 72 Fear 57 31 40 55 40 46 51 48 49 58 43 49 53 46 49 66 42 51 TABLE IV Joy 55 50 52 52 52 52 56 41 46 54 59 56 54 56 55 64 59 62 Emotion Sadness Surprise 62 15 24 46 22 30 40 17 21 42 20 27 36 24 28 68 13 22 Trust Micro-Avg 62 38 47 57 45 50 57 49 51 59 44 50 53 49 50 68 49 57 66 52 58 63 53 58 62 60 61 64 60 62 62 59 60 71 63 67 65 65 65 64 60 62 60 77 67 62 72 67 63 72 67 67 81 73 COMPARISON WITH THE STATE-OF-THE-ART SYSTEMS PROPOSED BY [16] ON EMOTION DATASET. THE METRICS P, R AND F STAND FOR PRECISION, RECALL AND F1-SCORE. skipper. The gold labels for the example are anticipation, joy and trust emotion with a positive sentiment. Our system S2 (single task system for sentiment analysis with primary and secondary attention) had incorrectly labeled this example with a negative sentiment and the E2 system (single task system with both primary and secondary attention for emotion analysis) had tagged it with anticipation and joy only. However, M2 i.e. the multi-task system for joint sentiment and emotion analysis had correctly classified the sentiment as positive and assigned all the correct emotion tags. It predicted the trust emotion tag, in addition to anticipation and joy (which were predicted earlier by E2). This helped M2 to correctly identify the positive sentiment of the example. The presence of emotional information helped the system to alter its sentiment decision (negative by S2) as it had better understanding of the text. A sentiment directly does not invoke a particular emotion always and a sentiment can be associated with more than one emotion. However, emotions like joy and trust are associated with positive sentiment mostly whereas, anger, disgust and sadness are associated with negative sentiment particularly. This might be the reason of the extra sentiment information not helping the multi-task system for emotion analysis and hence, a decreased performance for emotion analysis in the multi-task setting. E. Error Analysis We perform quantitative error analysis for both sentiment and emotion for the M2 model. Table V shows the confusion matrix for sentiment analysis. Tables VI to XIII consist of the confusion matrices for anger, anticipation, fear, disgust, joy, sadness, surprise and trust. We observe from Table XII that the system fails to label many instances with the emotion surprise. This may be due to the reason that this particular class is the most underrepresented in the training set. A similar trend can also be observed for the emotion fear and trust in Table IX and Table XIII, respectively. These three emotions have the least share of training instances, making the system less confident towards these emotions. Moreover, we closely analyze the outputs to understand the kind of errors that our proposed model faces. We observe that the system faces difficulties at times and wrongly predicts the sentiment class in the following scenarios: • Often real-world phrases/sentences have emotions of con- flicting nature. These conflicting nature of emotions are di- rectly not evident from the surface form and are left unsaid as these are implicitly understood by humans. The system gets confused when presented with such instances. Text: When you become a father you realize that you are not the most important person in the room anymore... Your child is! Actual Sentiment: positive Actual Emotion: anticipation, joy, surprise, trust Predicted Sentiment: negative Predicted Emotion: anger, anticipation, sadness The realization of not being the most important person in a room invokes anger, anticipation and sadness emotions, and a negative sentiment. However, it is a natural feeling of overwhelmingly positive sentiment when you understand that your own child is the most significant part of your life. • Occasionally, the system focuses on the less significant part of the sentences. Due to this the system might miss crucial information which can influence and even change the final sentiment or emotion. This sometimes lead to the incorrect Actual negative positive Predicted negative positive 1184 236 TABLE V 88 325 CONFUSION MATRIX FOR sentiment analysis Actual NO YES Predicted YES NO 665 277 656 235 TABLE VIII CONFUSION MATRIX FOR disgust Actual NO YES Predicted NO YES 405 413 191 824 TABLE XI CONFUSION MATRIX FOR sadness Actual NO YES Predicted YES NO 242 388 201 1002 TABLE VI CONFUSION MATRIX FOR anger Actual NO YES Predicted YES NO 911 160 317 445 TABLE IX CONFUSION MATRIX FOR fear Actual NO YES Predicted NO 1312 426 YES 30 65 TABLE XII CONFUSION MATRIX FOR surprise Actual NO YES Predicted YES NO 249 445 433 706 TABLE VII CONFUSION MATRIX FOR anticipation Actual NO YES Predicted YES NO 886 236 420 291 TABLE X CONFUSION MATRIX FOR joy Actual NO YES Predicted NO 1032 335 YES 150 316 TABLE XIII CONFUSION MATRIX FOR trust prediction of the overall sentiment and emotion. Text: I've been called many things, quitter is not one of them... Actual Sentiment: positive Actual Emotion: anticipation, joy, trust Predicted Sentiment: negative Predicted Emotion: anticipation, sadness Here, the system focuses on the first part of the sentence where the speaker was called many things which denotes a negative sentiment. Hence, the system predicts a negative sentiment and, anticipation and sadness emotions. However, the speaker in the second part uplifts the overall tone by justifying that s/he has never been called a quitter. This changes the negative sentiment to a positive sentiment and the overall emotion. V. CONCLUSION In this paper, we have presented a novel two-layered multi- task attention based neural network which performs senti- ment analysis through emotion analysis. The primary attention mechanism of the two-layered multi-task system relies on Distributional Thesaurus which acts as a source of external knowledge. The system hierarchically builds the final represen- tation from the word level to the sentence level. This provides a working insight to the system and its ability to handle the unseen words. Evaluation on the benchmark dataset suggests an improvement of 3.2 F-score point for sentiment analysis and an overall performance boost of 5 F-score points for emotion analysis over the existing state-of-the-art systems. The system empirically establishes the fact that emotion analysis is both useful and relevant to sentiment analysis. The proposed system does not rely on any language dependent features or lexicons. This makes it extensible to other languages as well. In future, we would like to extend the two-layered multi-task attention based neural network to other languages. VI. ACKNOWLEDGEMENTS Asif Ekbal acknowledges the Young Faculty Research Fel- lowship (YFRF), supported by Visvesvaraya PhD scheme for Electronics and IT, Ministry of Electronics and Information Technology (MeitY), Government of India, being implemented by Digital India Corporation (formerly Media Lab Asia). REFERENCES [1] R. Goonatilake and S. Herath, "The Volatility of the Stock Market and News," International Research Journal of Finance and Economics, vol. 3, no. 11, pp. 53 -- 65, 2007. the 51st Annual Meeting of [2] J. Si, A. Mukherjee, B. Liu, Q. Li, H. Li, and X. Deng, "Exploiting topic based twitter sentiment for stock prediction," in Proceedings of the Association for Computational Linguistics (Volume 2: Short Papers). Sofia, Bulgaria: Association for Computational Linguistics, August 2013, pp. 24 -- 29. [Online]. Available: http://www.aclweb.org/anthology/P13-2005 [3] B. Pang and L. Lee, "Opinion mining and sentiment analysis," Foun- dations and trends in information retrieval, vol. 2, no. 1-2, pp. 1 -- 135, 2008. [4] T. Dalgleish and M. Power, Handbook of cognition and emotion. John Wiley & Sons, 2000. [5] R. Plutchik, "The nature of emotions: Human emotions have deep evolutionary roots, a fact that may explain their complexity and provide tools for clinical practice," American scientist, vol. 89, no. 4, pp. 344 -- 350, 2001. [6] J. D. DeLamater and A. Ward, Handbook of social psychology. Springer, 2006. [7] M. D. Munezero, C. S. Montero, E. Sutinen, and J. Pajunen, "Are they different? affect, feeling, emotion, sentiment, and opinion detection in text," IEEE transactions on affective computing, vol. 5, no. 2, pp. 101 -- 111, 2014. [8] S. M. Mohammad, P. Sobhani, and S. Kiritchenko, "Stance and sen- timent in tweets," ACM Transactions on Internet Technology (TOIT), vol. 17, no. 3, p. 26, 2017. [9] S. Kiritchenko, X. Zhu, and S. M. Mohammad, "Sentiment analysis of short informal texts," Journal of Artificial Intelligence Research, vol. 50, pp. 723 -- 762, 2014. [10] A. Kumar, A. Sethi, M. S. Akhtar, A. Ekbal, C. Biemann, and P. Bhat- tacharyya, "IITPB at SemEval-2017 Task 5: Sentiment Prediction in Financial Text," in Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), 2017, pp. 894 -- 898. [11] M. S. Akhtar, A. Kumar, D. Ghosal, A. Ekbal, and P. Bhattacharyya, "A Multilayer Perceptron based Ensemble Technique for Fine-grained Financial Sentiment Analysis," in Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, 2017, pp. 551 -- 557. [12] S. Hochreiter and J. Schmidhuber, "Long short-term memory," Neural Comput., vol. 9, no. 8, pp. 1735 -- 1780, Nov. 1997. [Online]. Available: http://dx.doi.org/10.1162/neco.1997.9.8.1735 [31] M.-T. Luong, H. Pham, ap- proaches to attention-based neural machine translation," arXiv preprint arXiv:1508.04025, 2015. and C. D. Manning, "Effective [32] C. Biemann and M. Riedl, "Text: now in 2D! A framework J. Language [Online]. Available: for Modelling, vol. 1, no. 1, pp. 55 -- 95, 2013. http://dx.doi.org/10.15398/jlm.v1i1.60 expansion with contextual similarity," lexical [33] T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean, "Distributed representations of words and phrases and their composi- tionality," in Advances in neural information processing systems, Lake Tahoe, NV, USA, 2013, pp. 3111 -- 3119. [34] C. Baziotis, N. Pelekis, and C. Doulkeridis, "Datastories at semeval-2017 task 4: Deep lstm with attention for message-level and topic-based sen- timent analysis," in Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017). Vancouver, Canada: Association for Computational Linguistics, August 2017, pp. 747 -- 754. [35] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhut- dinov, "Dropout: A simple way to prevent neural networks from overfit- ting," Journal of Machine Learning Research, vol. 15, pp. 1929 -- 1958, 2014. [36] D. P. Kingma and J. Ba, "Adam: A Method for Stochastic Optimization," CoRR, vol. abs/1412.6980, 2014. [Online]. Available: http://dblp.uni-trier.de/db/journals/corr/corr1412.html [37] X. Glorot, A. Bordes, and Y. Bengio, "Deep Sparse Rectifier Neural Networks," in Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics (AISTATS-11), G. J. Gordon and D. B. Dunson, Eds., vol. 15. Journal of Machine Learning Research - Workshop and Conference Proceedings, 2011, pp. 315 -- 323. [38] P. Krejzl and J. Steinberger, "Uwb at semeval-2016 task 6: stance detec- tion," in Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016), 2016, pp. 408 -- 412. [39] M. Dias and K. Becker, "Inf-ufrgs-opinion-mining at semeval-2016 task 6: Automatic generation of a training corpus for unsupervised identi- fication of stance in tweets," in Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016), 2016, pp. 378 -- 383. [40] W. Wei, X. Zhang, X. Liu, W. Chen, and T. Wang, "pkudblab at semeval- 2016 task 6: A specific convolutional neural network system for effective stance detection," in Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016), 2016, pp. 384 -- 388. [41] K. Church, W. Gale, P. Hanks, and D. Hindle, "Using statistics in lexical analysis," Lexical acquisition: exploiting on-line resources to build a lexicon, vol. 115, p. 164, 1991. [13] K. Cho, B. van Merrienboer, D. Bahdanau, and Y. Bengio, "On the Properties of Neural Machine Translation: Encoder-Decoder Approaches," CoRR, vol. abs/1409.1259, 2014. [Online]. Available: http://arxiv.org/abs/1409.1259 [14] Y. Kim, "Convolutional Neural Networks for Sentence Classification," in Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014, October 25-29, 2014, Doha, Qatar, A meeting of SIGDAT, a Special Interest Group of the ACL, 2014, pp. 1746 -- 1751. [15] A. J. Smola and B. Scholkopf, "A Tutorial on Support Vector Regres- sion," Statistics and Computing, vol. 14, no. 3, pp. 199 -- 222, Aug. 2004. [16] H. Schuff, J. Barnes, J. Mohme, S. Pad´o, and R. Klinger, "Annotation, modelling and analysis of fine-grained emotions on a stance and sentiment detection corpus," in Proceedings of the 8th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, 2017, pp. 13 -- 23. [17] A. Graves, S. Fern´andez, and J. Schmidhuber, "Bidirectional lstm networks for improved phoneme classification and recognition," in Proceedings of the 15th International Conference on Artificial Neural Networks: Formal Models and Their Applications - Volume Part II, ser. ICANN'05. Berlin, Heidelberg: Springer-Verlag, 2005, pp. 799 -- 804. [Online]. Available: http://dl.acm.org/citation.cfm?id=1986079.1986220 [18] A. Bandhakavi, N. Wiratunga, D. Padmanabhan, and S. Massie, "Lex- icon based feature extraction for emotion text classification," Pattern recognition letters, vol. 93, pp. 133 -- 142, 2017. [19] C.-H. Wu, Z.-J. Chuang, and Y.-C. Lin, "Emotion recognition from text using semantic labels and separable mixture models," vol. 5, no. 2, pp. 165 -- 183, [Online]. Available: http://doi.acm.org/10.1145/1165255.1165259 Jun. 2006. [20] D. T. Ho and T. H. Cao, "A high-order hidden markov model for emotion detection from textual data," in Pacific Rim Knowledge Acquisition Workshop. Springer, 2012, pp. 94 -- 105. [21] S. E. Kahou, "Emotion recognition with deep neural networks," Ph.D. dissertation, Ecole Polytechnique, Montreal (Canada), 2016. [22] G. Balikas, S. Moura, and M.-R. Amini, "Multitask learning in Proceedings of for fine-grained twitter the 40th International ACM SIGIR Conference on Research and Development New York, NY, USA: ACM, 2017, pp. 1005 -- 1008. [Online]. Available: http://doi.acm.org/10.1145/3077136.3080702 in Information Retrieval, ser. SIGIR '17. sentiment analysis," [23] J. M. Deriu and M. Cieliebak, "Sentiment analysis using convolutional neural networks with multi-task training and distant supervision on italian tweets," in Fifth Evaluation Campaign of Natural Language Processing and Speech Tools for Italian, Napoli, Italy, December 5-7, 2016. Italian Journal of Computational Linguistics, 2016. [24] Q. You, "Sentiment and emotion analysis for social multimedia: the 2016 Methodologies and applications," ACM on Multimedia Conference, New York, NY, USA: ACM, 2016, pp. 1445 -- 1449. [Online]. Available: http: //doi.acm.org/10.1145/2964284.2971475 in Proceedings of ser. MM '16. [25] D. Beck, T. Cohn, and L. Specia, "Joint emotion analysis via multi- task gaussian processes," in Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP). ACL, 2014, pp. 1798 -- 1803. [26] M. A. Alvarez, L. Rosasco, N. D. Lawrence et al., "Kernels for vector- valued functions: A review," Foundations and Trends® in Machine Learning, vol. 4, no. 3, pp. 195 -- 266, 2012. [27] Z. Yang, D. Yang, C. Dyer, X. He, A. Smola, and E. Hovy, "Hierarchical attention networks for document classification," in Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2016, pp. 1480 -- 1489. [28] A. Kumar, D. Kawahara, and S. Kurohashi, "Knowledge-Enriched Two- Layered Attention Network for Sentiment Analysis," in Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), vol. 2, 2018, pp. 253 -- 258. [29] B. Felbo, A. Mislove, A. Søgaard, I. Rahwan, and S. Lehmann, "Using millions of emoji occurrences to learn any-domain represen- tations for detecting sentiment, emotion and sarcasm," arXiv preprint arXiv:1708.00524, 2017. [30] D. Bahdanau, K. Cho, and Y. Bengio, "Neural machine translation by jointly learning to align and translate," arXiv preprint arXiv:1409.0473, 2014.
1605.04569
2
1605
2016-05-19T08:52:37
Syntactically Guided Neural Machine Translation
[ "cs.CL" ]
We investigate the use of hierarchical phrase-based SMT lattices in end-to-end neural machine translation (NMT). Weight pushing transforms the Hiero scores for complete translation hypotheses, with the full translation grammar score and full n-gram language model score, into posteriors compatible with NMT predictive probabilities. With a slightly modified NMT beam-search decoder we find gains over both Hiero and NMT decoding alone, with practical advantages in extending NMT to very large input and output vocabularies.
cs.CL
cs
Syntactically Guided Neural Machine Translation Felix Stahlberg† and Eva Hasler† and Aurelien Waite‡ and Bill Byrne‡† †Department of Engineering, University of Cambridge, UK ‡SDL Research, Cambridge, UK 6 1 0 2 y a M 9 1 ] L C . s c [ 2 v 9 6 5 4 0 . 5 0 6 1 : v i X r a Abstract We investigate the use of hierarchical phrase-based SMT lattices in end-to-end neural machine translation (NMT). Weight pushing transforms the Hiero scores for complete translation hypotheses, with the full translation grammar score and full n- gram language model score, into posteri- ors compatible with NMT predictive prob- abilities. With a slightly modified NMT beam-search decoder we find gains over both Hiero and NMT decoding alone, with practical advantages in extending NMT to very large input and output vocabularies. Introduction 1 We report on investigations motivated by the idea that the structured search spaces defined by syn- tactic machine translation approaches such as Hi- ero (Chiang, 2007) can be used to guide Neural Machine Translation (NMT) (Kalchbrenner and Blunsom, 2013; Sutskever et al., 2014; Cho et al., 2014; Bahdanau et al., 2015). NMT and Hiero have complementary strengths and weaknesses and differ markedly in how they define probabil- ity distributions over translations and what search procedures they use. The NMT encoder-decoder formalism provides a probability distribution over translations y = yT 1 of a source sentence x as (Bahdanau et al., 2015) P (yT 1 x) = P (ytyt−1 1 , x) = g(yt−1, st, ct) (1) where st = f (st−1, yt−1, ct) is a decoder state variable and ct is a context vector depending on the source sentence and the attention mechanism. This posterior distribution is potentially very powerful, however it does not easily lend itself T(cid:89) t=1 T(cid:89) t=1 to sophisticated search procedures. Decoding is done by 'beam search to find a translation that ap- proximately maximizes the conditional probabil- ity' (Bahdanau et al., 2015). Search looks only one word ahead and no deeper than the beam. Hiero defines a synchronous context-free gram- mar (SCFG) with rules: X → (cid:104)α, γ(cid:105), where α and γ are strings of terminals and non-terminals in the source and target languages. A target language sentence y can be a translation of a source lan- guage sentence x if there is a derivation D in the grammar which yields both y and x: y = y(D), x = x(D). This defines a regular language Y over strings in the target language via a projection of the sentence to be translated: Y = {y(D) : x(D) = x} (Iglesias et al., 2011; Allauzen et al., 2014). Scores are defined over derivations via a log-linear model with features {φi} and weights λ. The decoder searches for the translation y(D) in Y with the highest derivation score S(D) (Chi- ang, 2007, Eq. 24) : PG(D)PLM (y(D))λLM  (2) (cid:125) y = y  argmax PG(D) ∝(cid:81) D:x(D)=x (cid:124) (cid:123)(cid:122) S(D) (cid:81) (X→(cid:104)γ,α(cid:105))∈D Hiero decoders attempt where PLM is an n-gram language model and i φi(X → (cid:104)γ, α(cid:105))λi. to avoid search er- rors when combining the translation and lan- guage model for the translation hypotheses (Chi- ang, 2007; Iglesias et al., 2009). These procedures search over a vast space of translations, much larger than is considered by the NMT beam search. However the Hiero context-free grammars that make efficient search possible are weak models of translation. The basic Hiero formalism can be ex- tended through 'soft syntactic constraints' (Venu- gopal et al., 2009; Marton and Resnik, 2008) or by adding very high dimensional features (Chiang et al., 2009), however the translation score assigned by the grammar is still only the product of prob- abilities of individual rules. From the modelling perspective, this is an overly strong conditional in- dependence assumption. NMT clearly has the po- tential advantage in incorporating long-term con- text into translation scores. NMT and Hiero differ in how they 'consume' source words. Hiero applies the translation rules to the source sentence via the CYK algorithm, with each derivation yielding a complete and unam- biguous translation of the source words. The NMT beam decoder does not have an explicit mecha- nism for tracking source coverage, and there is ev- idence that may lead to both 'over-translation' and 'under-translation' (Tu et al., 2016). NMT and Hiero also differ in their internal rep- resentations. The NMT continuous representa- tion captures morphological, syntactic and seman- tic similarity (Collobert and Weston, 2008) across words and phrases. However, extending these rep- resentations to the large vocabularies needed for open-domain MT is an open area of research (Jean et al., 2015a; Luong et al., 2015; Sennrich et al., 2015; Chitnis and DeNero, 2015). By contrast, Hiero (and other symbolic systems) can easily use translation grammars and language models with very large vocabularies (Heafield et al., 2013; Lin and Dyer, 2010). Moreover, words and phrases can be easily added to a fully-trained symbolic MT system. This is an important consideration for commercial MT, as customers often wish to customise and personalise SMT systems for their own application domain. Adding new words and phrases to an NMT system is not as straightfor- ward, and it is not clear that the advantages of the continuous representation can be extended to the new additions to the vocabularies. NMT has the advantage of including long-range context in modelling individual translation hy- potheses. Hiero considers a much bigger search space, and can incorporate n-gram language mod- els, but a much weaker translation model. In this paper we try to exploit the strengths of each ap- proach. We propose to guide NMT decoding using Hiero. We show that restricting the search space of the NMT decoder to a subset of Y spanned by Hi- ero effectively counteracts NMT modelling errors. This can be implemented by generating translation lattices with Hiero, which are then rescored by the NMT decoder. Our approach addresses the lim- ited vocabulary issue in NMT as we replace NMT OOVs with lattice words from the much larger Hi- ero vocabulary. We also find good gains from neu- ral and Kneser-Ney n-gram language models. 2 Syntactically Guided NMT (SGNMT) 2.1 Hiero Predictive Posteriors The Hiero decoder generates translation hypothe- ses as weighted finite state acceptors (WFSAs), or lattices, with weights in the tropical semiring. For a translation hypothesis y(D) arising from the Hi- ero derivation D, the path weight in the WFSA is − log S(D), after Eq. 2. While this representa- tion is correct with respect to the Hiero translation grammar and language model scores, having Hi- ero scores at the path level is not convenient for working with the NMT system. What we need are predictive probabilities in the form of Eq. 1. The Hiero WFSAs are determinised and min- imised with epsilon removal under the tropical semiring, and weights are pushed towards the ini- tial state under the log semiring (Mohri and Riley, 2001). The resulting transducer is stochastic in the log semiring, i.e. the log sum of the arc log prob- abilities leaving a state is 0 (= log 1). In addi- tion, because the WFSA is deterministic, there is a unique path leading to every state, which corre- sponds to a unique Hiero translation prefix. Sup- pose a path to a state accepts the translation prefix yt−1 . An outgoing arc from that state with symbol 1 y has a weight that corresponds to the (negative log of the) conditional probability PHiero(yt = yyt−1 , x). (3) 1 This conditional probability is such that for a Hi- ero translation yT 1 = y(D) accepted by the WFSA T(cid:89) PHiero(yT 1 ) = PHiero(ytyt−1 1 , x) ∝ S(D). t=1 (4) The Hiero WFSAs have been transformed so that their arc weights have the negative log of the con- ditional probabilities defined in Eq. 3. All the probability mass of this distribution is concen- trated on the Hiero translation hypotheses. The complete translation and language model scores computed over the entire Hiero translations are pushed as far forward in the WFSAs as possible. This is commonly done for left-to-right decoding in speech recognition (Mohri et al., 2002). 2.2 NMT–Hiero Decoding As above, suppose a path to a state in the WFSA accepts a Hiero translation prefix yt−1 , and let yt be a symbol on an outgoing arc from that state. We define the joint NMT+Hiero score as 1 log P (ytyt−1 , x) = 1 (cid:26)log PN M T (ytyt−1 λHiero log PHiero(ytyt−1 , x) + 1 yt ∈ ΣN M T , x) log PN M T (unkyt−1 , x) yt (cid:54)∈ ΣN M T 1 1 λN M T (5) Note that the NMT-HIERO decoder only con- siders hypotheses in the Hiero lattice. As dis- cussed earlier, the Hiero vocabulary can be much larger than the NMT output vocabulary ΣN M T . If a Hiero translation contains a word not in the NMT vocabulary, the NMT model provides a score and updates its decoder state as for an unknown word. Our decoding algorithm is a natural extension of beam search decoding for NMT. Due to the form of Eq. 5 we can build up hypotheses from left-to- right on the target side. Thus, we can represent 1, hs) by a transla- a partial hypothesis h = (yt 1 and an accumulated score hs. At tion prefix yt each iteration we extend the current hypotheses by one target token, until the best scoring hypothesis reaches a final state of the Hiero lattice. We re- fer to this step as node expansion, and in Sec. 3.1 we report the number of node expansions per sen- tence, as an indication of computational cost. We can think of the decoding algorithm as breath-first search through the translation lattices with a limited number of active hypotheses (a beam). Rescoring is done on-the-fly: as the de- coder traverses an edge in the WFSA, we update its weight by Eq. 5. The output-synchronous char- Train set en 4.2M de Dev set en de 6k Test set en de 2.7k # sentences # word tokens # unique words OOV (Hiero) OOV (NMT) 59k 106M 102M 138k 138k 647k 1.5M 13k 13k 20k 0.0% 0.0% 0.8% 1.6% 1.0% 2.0% 1.6% 5.5% 2.5% 7.5% 3.1% 8.8% fr 62k 9k en en fr fr en 12.1M # sentences # word tokens # unique words 1.6M 1.7M 14k OOV (Hiero) OOV (NMT) 81k 11k 0.0% 0.0% 0.6% 0.6% 0.4% 0.4% 3.5% 3.8% 4.5% 5.3% 5.0% 5.3% 305M 348M 138k 155k 17k 71k 10k 6k 3k Table 1: Parallel texts and vocabulary coverage on news-test2014. acteristic of beam search enables us to compute the NMT posteriors only once for each history based on previous calculations. Alternatively, we can think of the algorithm as NMT decoding with revised posterior probabil- ities: instead of selecting the most likely sym- bol yt according the NMT model, we adjust the NMT posterior with the Hiero posterior scores and delete NMT entries that are not allowed by the lat- tice. This may result in NMT choosing a different symbol, which is then fed back to the neural net- work for the next decoding step. 3 Experimental Evaluation We evaluate SGNMT on the WMT news-test2014 test sets (the filtered version) for English-German (En-De) and English-French (En-Fr). We also re- port results on WMT news-test2015 En-De. The En-De training set includes Europarl v7, Common Crawl, and News Commentary v10. Sen- tence pairs with sentences longer than 80 words or length ratios exceeding 2.4:1 were deleted, as were Common Crawl sentences from other lan- guages (Shuyo, 2010). The En-Fr NMT system was trained on preprocessed data (Schwenk, 2014) used by previous work (Sutskever et al., 2014; Bahdanau et al., 2015; Jean et al., 2015a), but with truecasing like our Hiero baseline. Follow- ing (Jean et al., 2015a), we use news-test2012 and news-test2013 as a development set. The NMT vo- cabulary size is 50k for En-De and 30k for En-Fr, taken as the most frequent words in training (Jean et al., 2015a). Tab. 1 provides statistics and shows the severity of the OOV problem for NMT. The BASIC NMT system is built using the Blocks framework (van Merrienboer et al., 2015) based on the Theano library (Bastien et al., 2012) with standard hyper-parameters (Bahdanau et al., 2015): the encoder and decoder networks consist of 1000 gated recurrent units (Cho et al., 2014). The decoder uses a single maxout (Goodfellow et al., 2013) output layer with the feed-forward at- tention model (Bahdanau et al., 2015). The En-De Hiero system uses rules which en- courage verb movement (de Gispert et al., 2010). The rules for En-Fr were extracted from the full data set available at the WMT'15 website using a shallow-1 grammar (de Gispert et al., 2010). 5- gram Kneser-Ney language models (KN-LM) for the Hiero systems were trained on WMT'15 par- allel and monolingual data (Heafield et al., 2013). SGNMT (Jean et al., 2015a, Tab. 2) Setup BASIC NMT NMT-LV + UNK Replace – + Reshuffle + Ensemble – 19.40 21.59 BLEU Setup 16.46 16.95 HIERO 18.89 NMT-HIERO BASIC NMT + Tuning + Reshuffle BLEU 16.31 19.44 20.69 21.43 21.87 SGNMT (Jean et al., 2015a, Tab. 2) Setup BASIC NMT NMT-LV + UNK Replace – + Reshuffle + Ensemble – 34.60 37.19 BLEU Setup 29.97 33.36 HIERO 34.11 NMT-HIERO BASIC NMT + Tuning + Reshuffle BLEU 30.42 32.86 35.37 36.29 36.61 (a) English-German (b) English-French Table 2: BLEU scores on news-test2014 calculated with multi-bleu.perl. NMT-LV refers to the RNNSEARCH-LV model from (Jean et al., 2015a) for large output vocabularies. Vocab. NMT Grammar KN-LM NPLM scores scores scores scores Search space Lattice Lattice (cid:88) (cid:88) (cid:88) (cid:88) 1 2 3 Unrestricted 4 5 6 7 8 9 10 11 12 13 14 15 16 Neural MT – UMontreal-MILA (Jean et al., 2015b) 100-best 100-best 100-best 1000-best 1000-best 1000-best Lattice Lattice Lattice Lattice Lattice Lattice Hiero Hiero NMT Hiero Hiero Hiero Hiero Hiero Hiero NMT Hiero Hiero Hiero Hiero Hiero (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) # of node exp- ansions per sen. – – 254.8 2,233.6 (DFS: 832.1) 21,686.2 (DFS: 6,221.8) 243.3 243.3 243.3 240.5 243.9 244.3 (cid:88) (cid:88) (cid:88) (cid:88) BLEU (single) BLEU (ensemble) 21.1 (Hiero) 21.7 (Hiero) 19.5 22.8 22.9 22.9 23.3 23.4 23.5 20.3 23.0 23.0 23.4 23.4 24.0 22.8 21.8 23.3 23.4 23.3 23.8 23.9 24.0 21.4 24.2 24.2 24.5 24.4 24.4 25.2 Table 3: BLEU English-German news-test2015 scores calculated with mteval-v13a.pl. Our SGNMT system1 is built with the Pyfst inter- face 2 to OpenFst (Allauzen et al., 2007). 3.1 SGNMT Performance Tab. 2 compares our combined NMT+Hiero de- coding with NMT results in the literature. We use a beam size of 12. In En-De and in En-Fr, we find that our BASIC NMT system performs similarly (within 0.5 BLEU) to previously published results (16.31 vs. 16.46 and 30.42 vs. 29.97). In NMT-HIERO, decoding is as described in Sec. 2.2, but with λHiero = 0. The decoder searches through the Hiero lattice, ignoring the Hiero scores, but using Hiero word hypotheses in place of any UNKs that might have been produced by NMT. The results show that NMT-HIERO is much more effective in fixing NMT OOVs than the 'UNK Replace' technique (Luong et al., 2015); this holds in both En-De and En-Fr. For the NMT-HIERO+TUNING systems, lattice MERT (Macherey et al., 2008) is used to optimise λHiero and λN M T on the tuning sets. This yields further gains in both En-Fr and En-De, suggesting 1http://ucam-smt.github.io/sgnmt/html/ 2https://pyfst.github.io/ that in addition to fixing UNKs, the Hiero predic- tive posteriors can be used to improve the NMT translation model scores. Tab. 3 reports results of our En-De system with reshuffling and tuning on news-test2015. BLEU scores are directly comparable to WMT'15 re- sults 3. By comparing row 3 to row 10, we see that constraining NMT to the search space defined by the Hiero lattices yields an improvement of +0.8 BLEU for single NMT. If we allow Hiero to fix NMT UNKs, we see a further +2.7 BLEU gain (row 11). The majority of gains come from fix- ing UNKs, but there is still improvement from the constrained search space for single NMT. We next investigate the contribution of the Hi- ero system scores. We see that, once lattices are generated, the KN-LM contributes more to rescoring than the Hiero grammar scores (rows 12- 14). Further gains can be achieved by adding a feed-forward neural language model with NPLM (Vaswani et al., 2013) (row 15). We observe that n-best list rescoring with NMT (Neubig et al., 2015) also outperforms both the Hiero and NMT 3http://matrix.statmt.org/matrix/systems list/1774 Figure 1: Performance with NPLM over beam size on English-German news-test2015. A beam of 12 corresponds to row 15 in Tab. 3. Determini- Minimi- Weight pushing sation (cid:88) (cid:88) (cid:88) sation (cid:88) (cid:88) (cid:88) Sentences per second 2.51 1.57 1.47 Table 4: Time for lattice preprocessing operations on English-German news-test2015. baselines, although lattice rescoring gives the best results (row 9 vs. row 15). Lattice rescoring with SGNMT also uses far fewer node expansions per sentence. We report n-best rescoring speeds for rescoring each hypothesis separately, and a depth- first (DFS) scheme that efficiently traverses the n- best lists. Both these techniques are very slow compared to lattice rescoring. Fig. 1 shows that we can reduce the beam size from 12 to 5 with only a minor drop in BLEU. This is nearly 100 times faster than DFS over the 1000-best list. Cost of Lattice Preprocessing As described in Sec. 2.1, we applied determinisation, minimisa- tion, and weight pushing to the Hiero lattices in order to work with probabilities. Tab. 4 shows that those operations are generally fast4. Lattice Size For previous experiments we set the Hiero pruning parameters such that lattices had 8,510 nodes on average. Fig. 2 plots the BLEU score over the lattice size. We find that SGNMT works well on lattices of moderate or large size, but pruning lattices too heavily has a negative ef- fect as they are then too similar to Hiero first best hypotheses. We note that lattice rescoring involves nearly as many node expansions as unconstrained NMT decoding. This confirms that the lattices at 8,510 nodes are already large enough for SGNMT. 4Testing environment: Ubuntu 14.04, Linux 3.13.0, single Intel R(cid:13) Xeon R(cid:13) X5650 CPU at 2.67 GHz Figure 2: SGNMT performance over lattice size on English-German news-test2015. 8,510 nodes per lattice corresponds to row 14 in Tab. 3. Local Softmax In SGNMT decoding we have the option of normalising the NMT translation probabilities over the words on outgoing words from each state rather than over the full 50,000 words translation vocabulary. There are ∼4.5 arcs per state in our En-De'14 lattices, and so avoiding the full softmax could cause significant computa- tional savings. We find this leads to only a modest 0.5 BLEU degradation: 21.45 BLEU in En-De'14, compared to 21.87 BLEU using NMT probabili- ties computed over the full vocabulary. Modelling Errors vs. Search Errors In our En- De'14 experiments with λHiero = 0 we find that constraining the NMT decoder to the Hiero lattices yields translation hypotheses with much lower NMT probabilities than unconstrained BA- SIC NMT decoding: under the NMT model, NMT hypotheses are 8,300 times more likely (median) than NMT-HIERO hypotheses. We conclude (ten- tatively) that BASIC NMT is not suffering only from search errors, but rather that NMT-HIERO discards some hypotheses ranked highly by the NMT model but lower in the evaluation metric. 4 Conclusion We have demonstrated a viable approach to Syn- tactically Guided Neural Machine Translation for- mulated to exploit the rich, structured search space generated by Hiero and the long-context transla- tion scores of NMT. SGNMT does not suffer from the severe limitation in vocabulary size of basic NMT and avoids any difficulty of extending dis- tributed word representations to new vocabulary items not seen in training data. Acknowledgements This work was supported in part by the U.K. En- gineering and Physical Sciences Research Council (EPSRC grant EP/L027623/1). References Cyril Allauzen, Michael Riley, Johan Schalkwyk, Wo- jciech Skut, and Mehryar Mohri. 2007. OpenFst: A general and efficient weighted finite-state transducer In Implementation and Application of Au- library. tomata, pages 11–23. Springer. Cyril Allauzen, Bill Byrne, de Adri`a Gispert, Gonzalo Iglesias, and Michael Riley. 2014. Pushdown au- tomata in statistical machine translation. Volume 40, Issue 3 - September 2014, pages 687–723. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- gio. 2015. Neural machine translation by jointly learning to align and translate. In ICLR. Fr´ed´eric Bastien, Pascal Lamblin, Razvan Pascanu, James Bergstra, Ian Goodfellow, Arnaud Bergeron, Nicolas Bouchard, David Warde-Farley, and Yoshua Bengio. 2012. Theano: new features and speed im- In Deep Learning and Unsupervised provements. Feature Learning NIPS 2012 Workshop. David Chiang, Kevin Knight, and Wei Wang. 2009. 11,001 new features for statistical machine transla- tion. In ACL, pages 218–226. David Chiang. 2007. Hierarchical phrase-based trans- lation. Computational Linguistics, 33(2):201–228. Rohan Chitnis and John DeNero. 2015. Variable- length word encodings for neural translation models. In EMNLP, pages 2088–2093. Kyunghyun Cho, Bart van Merrienboer, Caglar Gul- cehre, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In EMNLP. Ronan Collobert and Jason Weston. 2008. A unified architecture for natural language processing: Deep In Pro- neural networks with multitask learning. ceedings of the 25th International Conference on Machine Learning, pages 160–167. ACM. Adri`a de Gispert, Gonzalo Iglesias, Graeme Black- wood, Eduardo R Banga, and William Byrne. 2010. Hierarchical phrase-based translation with weighted finite-state transducers and shallow-n grammars. Computational Linguistics, 36(3):505–533. Ian Goodfellow, David Warde-farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. 2013. Max- out networks. In ICML, pages 1319–1327. Kenneth Heafield, Ivan Pouzyrevsky, Jonathan H. Clark, and Philipp Koehn. 2013. Scalable modified In ACL, Kneser-Ney language model estimation. pages 690–696. Gonzalo Iglesias, Adri`a de Gispert, Eduardo R Banga, and William Byrne. 2009. Hierarchical phrase- based translation with weighted finite state transduc- ers. In NAACL-HLT, pages 433–441. Gonzalo Iglesias, Cyril Allauzen, William Byrne, Adri`a de Gispert, and Michael Riley. 2011. Hier- archical phrase-based translation representations. In EMNLP, pages 1373–1383. S´ebastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. 2015a. On using very large target vocabulary for neural machine translation. In ACL, pages 1–10. S´ebastien Jean, Orhan Firat, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. 2015b. Montreal neural machine translation systems for WMT15. In Proceedings of the Tenth Workshop on Statistical Machine Translation, pages 134–140. Nal Kalchbrenner and Phil Blunsom. 2013. Recurrent In EMNLP, page continuous translation models. 413. Jimmy Lin and Chris Dyer. 2010. Data-intensive text processing with MapReduce. Morgan &Claypool. Minh-Thang Luong, Ilya Sutskever, Quoc V Le, Oriol Vinyals, and Wojciech Zaremba. 2015. Addressing the rare word problem in neural machine translation. In ACL. Wolfgang Macherey, Franz Josef Och, Ignacio Thayer, and Jakob Uszkoreit. 2008. Lattice-based minimum error rate training for statistical machine translation. In EMNLP, pages 725–734. Yuval Marton and Philip Resnik. 2008. Soft syntac- tic constraints for hierarchical phrased-based trans- lation. In ACL, pages 1003–1011. Mehryar Mohri and Michael Riley. 2001. A weight large vocabulary speech pushing algorithm for recognition. In Interspeech, pages 1603–1606. Mehryar Mohri, Fernando Pereira, and Michael Ri- 2002. Weighted finite-state transducers in ley. speech recognition. Computer Speech and Lan- guage, 16(1). Graham Neubig, Makoto Morishita, and Satoshi Naka- mura. 2015. Neural reranking improves subjective quality of machine translation: NAIST at WAT2015. In Workshop on Asian Translation, pages 35–41. Holger Schwenk. 2014. Universit du Maine. http://www-lium.univ-lemans.fr/ schwenk/nnmt-shared-task/. accessed 1-March-2016]. [Online; Rico Sennrich, Barry Haddow, and Alexandra Birch. 2015. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909. 2010. Nakatani Shuyo. Language detection li- brary for Java. http://code.google.com/ p/language-detection/. [Online; accessed 1-March-2016]. Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural net- works. In Advances in Neural Information Process- ing Systems, pages 3104–3112. Zhaopeng Tu, Zhengdong Lu, Yang Liu, Xiaohua Liu, and Hang Li. 2016. Coverage-based neural machine translation. arXiv preprint arXiv:1601.04811. Bart van Merrienboer, Dzmitry Bahdanau, Vincent Du- moulin, Dmitriy Serdyuk, David Warde-Farley, Jan Chorowski, and Yoshua Bengio. 2015. Blocks and fuel: Frameworks for deep learning. arXiv preprint arXiv:1506.00619. Ashish Vaswani, Yinggong Zhao, Victoria Fossum, and David Chiang. 2013. Decoding with large-scale neural language models improves translation. In EMNLP, pages 1387–1392. Ashish Venugopal, Andreas Zollmann, Noah A. Smith, and Stephan Vogel. 2009. Preference grammars: Softening syntactic constraints to improve statistical In NAACL-HLT, pages 236– machine translation. 244.
1512.04419
2
1512
2018-10-09T10:49:35
Sentence Entailment in Compositional Distributional Semantics
[ "cs.CL", "cs.AI", "math.CT" ]
Distributional semantic models provide vector representations for words by gathering co-occurrence frequencies from corpora of text. Compositional distributional models extend these from words to phrases and sentences. In categorical compositional distributional semantics, phrase and sentence representations are functions of their grammatical structure and representations of the words therein. In this setting, grammatical structures are formalised by morphisms of a compact closed category and meanings of words are formalised by objects of the same category. These can be instantiated in the form of vectors or density matrices. This paper concerns the applications of this model to phrase and sentence level entailment. We argue that entropy-based distances of vectors and density matrices provide a good candidate to measure word-level entailment, show the advantage of density matrices over vectors for word level entailments, and prove that these distances extend compositionally from words to phrases and sentences. We exemplify our theoretical constructions on real data and a toy entailment dataset and provide preliminary experimental evidence.
cs.CL
cs
Sentence Entailment in Compositional Distributional Semantics Mehrnoosh Sadrzadeh, Dimitri Kartsaklis, Esma Balkır {m.sadrzadeh,d.kartsaklis}@qmul.ac.uk, [email protected] School of Electronic Engineering and Computer Science Queen Mary University of London Mile End Road, London E1 4NS, United Kingdom Abstract. Distributional semantic models provide vector representations for words by gathering co-occurrence frequencies from corpora of text. Compositional dis- tributional models extend these from words to phrases and sentences. In categori- cal compositional distributional semantics, phrase and sentence representations are functions of their grammatical structure and representations of the words therein. In this setting, grammatical structures are formalised by morphisms of a compact closed category and meanings of words are formalised by objects of the same category. These can be instantiated in the form of vectors or density ma- trices. This paper concerns the applications of this model to phrase and sentence level entailment. We argue that entropy-based distances of vectors and density matrices provide a good candidate to measure word-level entailment, show the advantage of density matrices over vectors for word level entailments, and prove that these distances extend compositionally from words to phrases and sentences. We exemplify our theoretical constructions on real data and a toy entailment dataset and provide preliminary experimental evidence. Distributional models of meaning, otherwise known as distributional semantics, are based on the philosophy of Firth and Harris who argued that meanings of words can be derived from their patterns of use and that words that have similar meanings often occur in the same contexts [14,17]. For example, words like "butterfly" and "bee" have similar meanings, since they often occur in the context of "flower", whereas "butter- fly" and "door" do not have similar meanings, since one often occurs close to "flower" and one does not. This hypothesis has been employed to develop semantic vector mod- els where meanings of words are represented by vectors, built from the frequency of co-occurrences of words with each other [40,42]. Compositional distributional models extend these vector representations from words to phrases and sentences. They work alongside a principle of compositionality, which states that the meaning of a phrase or sentence is a function of the meanings of the words therein. Thus, the vector meaning of "yellow butterfly was chased by our cat", is obtained by acting via a function, whose form is yet to be decided, on the vector meanings of "yellow", "butterfly", "chase" and "cat". Based on how this function is implemented, these models come in differ- ent forms. There are the ones that use simple point wise vector operations [34]; these just add or multiply vectors of the words. We have the ones that are based on tensors of grammatical types with vectors of words [7]; these take the tensor product of the vectors 2 of the words with a vectorial representation of their grammatical types. There are ones where tensors are used to represent meanings of functional words, such as adjectives adverbs, and verbs. Here, the functional word gets a tensor meaning and composition becomes tensor contraction [4,10]. Finally, we have the ones that use neural word em- beddings, where the function is learnt from data [45,20]. The work of this paper is based on the categorical compositional distributional se- mantics framework [10], from now on CCDS, where vectorial meanings of phrases and sentences are built from the vectors and tensors of the words therein and the grammati- cal structures of the phrases and sentences. These models are based on a general math- ematical setting, where the meaning of any phrase or sentence, no matter how complex and long they are, can in principle be assigned a vectorial representation. Fragments of the model have been instantiated on concrete data and have been applied to word and phrase/sentence disambiguation, classification, similarity, and paraphrasing tasks. Some of the instantiations of CCDS in these tasks have outperformed other composi- tional distributional models, where for instance, simple operations were used and the grammar was not taken into account, see [15,25,23,33,16]. In distributional semantics, entailment is modelled via the distributional inclusion hypothesis. This hypothesis says that word v entails word w when the contexts of v are included in the contexts of w. This means that whenever word v is used, word w can be used retaining a valid meaning. The hypothesis makes intuitive sense, it stands a good chance for entailment, and indeed there has been an extensive amount of work on it, e.g. see [12,47,27]. However, existing work is mostly done at the word level and not much has been explored when it comes to phrases and sentences. The work on en- tailment between quantified noun phrases [5] is an exception, but it does not take into account composition and thus does not extend to sentences and longer phrases. Compo- sition is what is needed for a modular approach to entailment and the challenges faced based on it, e.g. see the work described in [11]. In this and other similar challenges, categorised under the general heading of RTE (Recognising Textual Entailment), one is to decide about the entailment between complex sentences of language, for example "yellow butterfly was chased by our cat" and "someone's cat chased a butterfly". In a compositional model of meaning, which is the one we work with, the goal is to try and derive the entailment relation between the sentences from the entailment relations between the words and the grammatical structures of the sentences. Two points should be noted here. First is that entailment is a directional measure, that is if v entails w, it is most of the time not the case that w entails v. This is in con- trast to the notion of similarity, which is computed using symmetric distance measures between vectors, e.g. cosine of the angle, and is the most common operation in distri- butional semantics and its applications, for example see the tasks described in [43,46]. The second point is that, although the distributional inclusion hypothesis can be read in a binary fashion and indeed the notion of entailment in classical logics has a binary truth value semantics (i.e. either it holds or not), in a distributional setting it would make more sense to work with degrees of entailment. Conceptually, this is because we are in a quantitative setting that represents meanings of words by vectors of numbers rather than in the qualitative setting of classical logic, designed to reason about truth valued predicates. Concretely and when it comes to working with data, it is rarely the case that 3 one gets 0's in the coordinates of vectors. Some coordinates might have low numbers; these should be used in a lesser extent in the entailment decision. Some coordinates have large numbers; these should affect the entailment decision to a larger extent. In summary, in order to model entailment in a distributional semantics one is after an op- eration between the vectors that is asymmetric (similar to the logical entailment) and has degrees (contrary to the logical entailment). This is exactly what previous work on word-level entailment [12,47,27] has done and what we are going to do in this paper for phrase/sentence-level entailment. In this paper we show how CCDS can be used to reason about entailment in a com- positional fashion. In particular, we prove how the general compositional procedures of this model give rise to an entailment relation at the word level which is extendible to the phrase and sentence level. At the word level, we work with the distributional inclusion hypothesis. Previous work on word level entailment in these models shows that entropy-based notions such as KL-divergence provide a good notion of degrees of entailment based on the distributional inclusion hypothesis [12,19,39]. In this paper, we prove that in CCDS this notion extends from word vectors to phrase and sentence vectors and thus also provides a good notion of phrase/sentence entailment: one that is similar to that of Natural Logic [31]. We also show that in the presence of correlations between contexts, the notion of KL-divergence naturally lifts from vectors to density matrices via von Neumann's entropy, and that this notion of entropy also lifts compo- sitionally from words to phrases and sentences, in the same way as KL-divergence did for vectors. The density matrix results of this paper build on the developments of [1,2] and are related to [36,35,22], where the use of density matrices in CCDS were initiated. More recently, the work of [3] focuses on the density matrices of CCDS to develop a theoretical notion for a graded entailment operator. Prior to that, density matrices were used in [6] to assist in parsing. In contrast to these works, here (and in the conference version of this paper [13]), we do not start right away with density matrices, neither do we treat density matrices as our only or first-class citizens. The main contribution of our work is that we develop a more general notion of entailment that is applicable to both vectors and density matrices. This notion is compositional and extends modularly from words to phrases and sentences. The reason for the fact that our results hold for both vectors and density matrices is that they are both instances of the same higher order categorical structure: the category of vector spaces and linear maps and the category of density matrices and completely positive maps are both compact closed. The outline of our contribution is as follows. We start with vectors and vector- based notions of entropy, pointing out a shortcoming of vector-level entropy when it comes to measuring a certain form of entailment, motivate how this problem can be solved using density matrices, and then move on to show how one can incorporate in the CCDS setting an entailment based on density matrices. In short, we develop a distributional notion of entailment that extends compositionally from words to phrase and sentences and which works for both vectors and density matrices. We argue, in theoretical, in concrete, and in experimental terms, that the notion of relative entropy on density matrices gives rise to a richer notion of word and sentence level entailment than the notion of KL-divergence on vectors. 4 On the concrete side, we provide two small scale experiments on data collected from a text corpus, build vectors and density matrices, and apply the results to a toy word level entailment task and a short phrase and sentence entailment task. This involves implementing a concrete way of building vectors and density matrices for words and composing them to obtain vectors and density matrices for our short sentences. We elaborate on all of these in the corresponding sections of the paper. As will be pointed out below, some of the concrete constructions we present are novel. This paper is the journal version of the work presented in the 14th International Symposium in Artificial Intelligence and Mathematics [13]. The novel contributions of the current paper, in relation to its conference version, are as follows: 1. We prove a more general version of the main result of the previous paper, i.e. The- orem 1. In the new version, this theorem is not restricted to sentences that satisfy Lambek's switching lemma, which says that the grammatical structures of sen- tences are only epsilon maps (i.e. applications of functions) and identities. Here, we show that the grammatical structures of phrases/sentences can be any morphism of a base category of finite dimensional vector spaces (for the vectorial entailments) and a base category of density matrices and completely positive maps (for the den- sity matrix entailments). 2. We develop and implement a new way of building concrete density matrices for words, thus work with two different concrete implementations, as opposed to the only one presented in the conference version. In the previous method, a density matrix was created as a convex combination of vectors representing contexts, fol- lowing the quantum-mechanical intuition. The new method, on the other hand, is based on the philosophy that there might exist correlations between the contexts, and it directly implements the reasoning presented in Section 1. The examples of that section argue in favour of density matrices over vectors for basis correlation cases, and our new density matrices are built in the same way as prescribed by the general pattern present in such cases. 3. We present additional analysis based on a new toy example for cases where there is a correlation between the contexts (in other words basis vectors/words), and show that density matrices built using the method described above do respect the entail- ment relations in these cases and do so better than vectors. 4. Finally, we take advantage of the space provided in the journal version and provide more background on the categorical constructions used in CCDS. Categorical Preliminaries and Examples Categorical Compositional Distributional Semantic (CCDS) relies on the theory of cat- egories, originated in the work of MacLane [32]. It is based on a special type of cate- gories, known as compact closed categories, developed in [26]. We will briefly recall a few of the major notions that are important to our work from these theories and refer the reader for the complete list of definitions and properties to [32,26]. An introduction to the subject with a focus on compact closed categories is presented in [9]. The main inhabitants of a category C are its objects and morphisms. The objects are denoted by A, B, C and the morphisms by f, g. If f is a morphism from A to B, we 5 denote it by f : A → B, similarly g : B → C denotes a morphism from B to C. Each object A has an identity morphism, denoted by 1A : A → A. The morphisms are closed under composition, that is, given f : A → B and g : B → C, there is a morphism g ◦ f : A → C from A to C. Composition is associative, that is: f ◦ (g ◦ h) = (f ◦ g) ◦ h with identity morphisms its units, that is: f ◦ 1A = f and 1B ◦ f = f A monoidal category has a binary operation defined on its objects and morphisms, re- ferred to as tensor and denoted by A ⊗ B on objects and similarly by f ⊗ g on mor- phisms. This operation is associative and has a unit I, which is an object of the category. Associativity of tensor and it having a unit means that we have: A ⊗ (B ⊗ C) = (A ⊗ B) ⊗ C A ⊗ I = I ⊗ A = A On a pair of morphisms (f : A → C, g : B → D), the tensor operation is defined as follows: f ⊗ g : A ⊗ B → C ⊗ D It satisfies a bifunctoriality property, that is, the following equation holds: (g1 ⊗ g2) ◦ (f1 ⊗ f2) = (g1 ◦ f1) ⊗ (g2 ◦ f2) . for f1, f2 : A → C and g1, g2 : B → D. A compact closed category is a monoidal category, where each of its objects has two contravariant functors defined on them; these are referred to as left and right adjoints and they are to satisfy an adjunction property. Given an object A, its adjoints are denoted by Ar and Al and are referred to as right and left adjoints. Part of the property they satisfy says that they are equipped with the following morphisms: A ⊗ Ar r A−→ I ηr A−→ Ar ⊗ A Al ⊗ A l A−→ I ηl A−→ A ⊗ Al In other words, for each object A, there exists in a compact closed category an object Ar, an object Al and the above four morphisms. These morphisms satisfy the following equalities, sometimes referred to by the term yanking: A) ◦ (ηl (1A ⊗ l A ⊗ 1Al ) ◦ (1Al ⊗ ηl (l A ⊗ 1A) = 1A A) = 1Al A ⊗ 1A) ◦ (1A ⊗ ηr (r (1Ar ⊗ r A) ◦ (ηr A) = 1A A ⊗ 1Ar ) = 1Ar A self adjoint compact closed category is one in which the objects and their adjoints are the same, that is for every object A we have Al = Ar = A A strongly monoidal functor F between a monoidal category C and another monoidal category D is a map F : C → D, which assigns to each object A of C an object F (A) 6 of D and to each morphism f : A → B of C, a morphism F (f ) : F (A) → F (B) of D. It preserves the identities and the compositions of C. That is, we have F (1A) = 1F (A) F (g ◦ f ) = F (g) ◦ F (f ) Moreover, we have the following equations: F (A ⊗ B) = F (A) ⊗ F (B) F (I) = I These mean that F preserves the tensor and its unit in both directions. A strongly monoidal functor on two compact closed categories C and D preserves the adjoints, that is we have: F (Al) = F (A)l F (Ar) = F (A)r The above definitions are given in a strict monoidal sense. In a non-strict setting, the equalities of the monoidal properties are replaced with isomorphisms. We work with three examples of compact closed categories: pregroup algebras, the category of finite dimensional vector spaces and linear maps, and the completely positive maps over them. Below we show how each of these is a compact closed category. Pregroup algebras PRG. A pregroup algebra is a partially ordered monoid where each element has a left and a right adjoint; it is denoted by PRG = (P,≤,·, 1, (−)r, (−)l). The notion of adjunction here means that for each p ∈ P , we have a pr and a pl in P such that: p · pr ≤ 1 ≤ pr · p pl · p ≤ 1 ≤ p · pl A pregroup algebra is a compact closed category in the following way: the elements of the partial order p ∈ P are the objects of the category. The partial orderings between the elements are the morphisms of the category, that is for p, q ∈ P we have: p → q iff p ≤ q The monoid multiplication of the pregroup algebra is a monoidal tensor; this is because we can form the monoid multiplication of elements of the partial ordering p ⊗ q and that this multiplication preserves the ordering, that is we have: p ≤ q and p(cid:48) ≤ q(cid:48) =⇒ p ⊗ p(cid:48) ≤ q ⊗ q(cid:48) The unit of this multiplication is 1, since we have: p · 1 = 1 · p = p The multiplication is associative as well, as denoted via the following inequality which holds in PRG: p · (q · r) = (p · q) · r Each element of the pregroup algebra has a left and a right adjoint and the adjunction inequalities expressed above mean that the adjunction morphisms exist, that is we have the following: p ⊗ pr r p→ 1 ηr p→ pr ⊗ p pl ⊗ p l p→ 1 ηl p→ p ⊗ pl In order to see that the above satisfy the yanking equalities, consider the first yanking case, which is as follows: 7 (1A ⊗ l A ⊗ 1A) = 1A In a pregroup algebra setting, this will look like as follows: p ⊗ 1p) = 1p A) ◦ (ηl (1p ⊗ l p) ◦ (ηl We form (ηl p ⊗ 1p) by multiplying both sides of the ηl p inequality by p: 1 ≤ p · pl =⇒ 1 · p ≤ p · pl · p Similarly, we form (1p ⊗ l p) by multiplying both sides of the l pl · p ≤ 1 =⇒ p · pl · p ≤ p · 1 p inequality by p: Then we compose these two morphisms, which in partial order terms amounts to ap- plying the transitivity of the partial order to them, as follows 1 · p ≤ p · pl · p ≤ p · 1 Thus we obtain the following inequality: 1 · p ≤ 1 · p which is true since the partial order is reflexive. The other three yanking equalities are proven in the same way. Finite-dimensional vector spaces with fixed orthonormal basis and linear maps. Finite dimensional vector spaces over reals R and the linear maps between the spaces form a compact closed category, denoted by FVectR. The objects of this category are the vector spaces, while its morphisms are the linear maps between them. The monoidal tensor of the category is the tensor product of vector spaces which can be extended to f→ W and V (cid:48) g→ W (cid:48), their tensor is linear maps as follows: For two linear maps V denoted by f ⊗ g and is defined to be the following map: V ⊗ V (cid:48) f⊗g−→ W ⊗ W (cid:48) The unit of the monoidal tensor is the unit of the tensor product of the vector spaces, which is the scalar field, since we have the following for every vector space V : V ⊗ R ∼= R ⊗ V ∼= V For each vector space V , its dual space V ∗ is its left and right adjoint, that is: V l = V r := V ∗ In the presence of a fixed orthonormal basis, which is the case here and for vector spaces of a distributional semantics, we have a way of transforming V ∗ to V and V to V ∗. 8 Such categories, denoted by FdVectR, are thus self adjoint compact closed categories. Moreover, their tensor (and the tensor of of FVectR more generally) is symmetric, that is we have: V ⊗ W ∼= W ⊗ V As a result, the two r and l maps become the same map and similarly so for the η maps. That is we have:  := r ∼= l η := ηr ∼= ηl Thus the  and η maps of this category will acquire the following forms: Given(cid:80) ij Cij defined as follows: V : V ⊗ V → R ηV : R → V ⊗ V −→vi ⊗ −→vj ∈ V ⊗ V and a basis {−→v i}i for V , the above are concretely (cid:88) V Cij (cid:88) ij Cij(cid:104)−→vi−→vj(cid:105)  := −→vi ⊗ −→vj (cid:88) η(1) := −→vi ⊗ −→vi ij for the  map and as follows: i for the η map. In order to see that the above satisfy the yanking equalities, again consider the first yanking equality; in its vectorial form, for one side of the equality we have to build the following morphism: (1V ⊗ V ) ◦ (ηV ⊗ 1V ) which is obtained by the following composition of morphisms: ηV ⊗1V−→ V ⊗ V ⊗ V 1V ⊗V−→ V ⊗ R R ⊗ V This is equal to the identity morphism on V , since we have: R ⊗ V ∼= V ⊗ R ∼= V due to the fact that R is the unit of tensor in FVect. Finite-dimensional vector spaces and completely positive maps CPM(FVectR). The category CPM(FVectR) over finite dimensional vector spaces and linear maps is also compact closed. The CPM construction was originally defined over Hilbert spaces [44]. In previous work, we show how it also applies to the simpler case of vector spaces over reals [2]. The corresponding construction yields a category whose objects are of the form V ⊗ V ∗, elements of which represent density operators. This property is re- ferred to by the Choi-Jamiolkowski correspondence, for more on this see [9]. Recall 9 that these are self-adjoint, semi-definite positive, and have trace 1. The general form of a density matrice v ∈ V ⊗ V ∗ is as follows: (1) where pi's define a probability distribution over the set of −→c i vectors, thus we have: v := pi (cid:88) i −→c i ⊗ −→c i (cid:88) 0 ≤ pi ≤ 1 pi = 1 i The −→c i vectors are referred to by pure states and the v is referred to by a mixed state, in quantum mechanic terminology. Morphisms of CPM(FVectR) are linear maps which are moreover completely pos- itive. Again, recall that a completely positive map between two density matrices pre- serves the structure of a density matrix. In category theoretic terms, these maps are morphisms of the following form: f : V ⊗ V ∗ → W ⊗ W ∗ for which there exist a vector space X and a linear map g : V → X ⊗ W such that the following map exists in FVectR: f = (g ⊗ g) ◦ (1W⊗W ⊗ ηX ) The category CPM(FVectR) inherits the symmetry property of FVectR, that is we have: (V ⊗ V ∗) ⊗ (W ⊗ W ∗) ∼= (W ⊗ W ∗) ⊗ (V ⊗ V ∗) Also, similar to FVectR, its left and right adjoints become equal and reduce to the ten- sor product of dual spaces. This is easily shown as follows for the left adjoint and by recalling that (−)∗ is involutive and that the compact closure is self adjoint: (V ⊗ V ∗)l = (V ∗)l(⊗)∗V ∗ ∼= (V ∗)∗ ⊗ V ∗ ∼= V ⊗ V ∗ The case of right adjoint is similar. Also, similar to FVectR, in the presence of a fixed basis, the category becomes self adjoint, that is we have: (V ⊗ V ∗)∗ ∼= V ⊗ V ∗ The  and η maps of CPM(FVectR) are obtained by tensoring the  and η maps in FVectR. In the presence of a fix basis, these will have the following forms:  : V ⊗ V ⊗ V ⊗ V → R η : R → V ⊗ V ⊗ V ⊗ V Concretely, these maps are given as follows for the  case: (cid:88) V  := (cid:88) −→vi ⊗ −→vj ⊗ −→vk ⊗ −→vl Cijkl Cijkl(cid:104)−→vi−→vj(cid:105)(cid:104)−→vk−→vl(cid:105) ijkl ijkl 10 and as follows for the η case: η(1) := (cid:88) i −→vi ⊗ −→vi ⊗ −→vi ⊗ −→vi Finally, we leave it to the reader to verify that the yanking equalities are also satisfied in a very similar way they are satisfied in FVectR. Categorical Compositional Distributional Semantics (CCDS) In its most abstract form, a CCDS is denoted as follows: (CSyn,CSem, F, [[ ]]) It consists of a compact closed category for syntax CSyn, a compact closed category for semantics CSem, a strongly monoidal functor F : CSyn → CSem between the two, and a semantic map [[ ]] : Σ∗ → CSem from the set of strings of a language Σ∗ to the compact closed category of semantics. Meanings of phrases and sentences of a language are related to the meanings of words of that language via a principle known to the formal semanticist as the principle of lexical substitution. In a CCDS, this principle takes the following form: [[w1w2 ··· wn]] := F (α)([[w1]] ⊗ [[w2]] ⊗ ··· [[wn]]) (2) for w1w2 ··· wn ∈ Σ∗ a string of words, i.e. we have wi ∈ Σ for each wi in the string, and where α denotes the grammatical structure of w1w2 ··· wn, i.e. a morphism in the compact closed category of syntax CSyn. On the left-hand side of the above equation, [[w1w2 ··· wn]] is the semantics of a string of words and on the right-hand side, each [[wi]] is the semantics of a word in that string. In practice, the abstract model is instantiated to concrete settings. One needs a con- crete setting to represent the syntax, a concrete setting to represent the semantics, a concrete way of relating the words of a language, i.e. elements of Σ, to semantic rep- resentations in CSem, and a concrete way of relating the syntactic elements to their se- mantic counterparts, that is a concrete way of representing the functor F on atomic elements of syntax and semantics. Below, we show how one can do such a many-fold instantiation for the cases of PRG for syntax and FVectR for vector semantics, and for the cases of PRG as syntax and CPM(FVectR) for density matrix semantics. Instantiation to (PRG, FVectR, F, [[ ]]) In this instantiation, on the syntactic side, we work with a pregroup grammar; this is a pregroup algebra applied to reasoning about syntax and grammatical structures and has been developed by Lambek [28]. We provide an overview below. A pregroup grammar is a pregroup algebra denoted by T (B); this notation is to ex- press the fact that the pregroup algebra is generated over the set B of basic grammatical types of a language. We assume B to be the set {n, s}, where n denotes the type of a noun phrase and s the type of a sentence. The pregroup grammar comes equipped with a relation R ⊆ T (B) × Σ that assigns grammatical types from T (B) to the vocabulary Σ of a language. Some examples from the English language are as follows: Grammatical Relation Pregroup Type adjectives intransitive verbs transitive verbs adverbs n · nl nr · s nr · s · nl sr · s 11 Examples red, big, round sleep, sneeze, snooze gave, hold, own yesterday, quickly, slowly In a pregroup grammar, the grammatical structure of a string of words w1w2 ··· wn, for wi ∈ Σ, is the following morphism of category PRG: t1 · t2 · ··· · tn α→ t where we are taking PRG to be the compact closed categorical form of our pregroup algebra T (B). Each ti is a grammatical type assigned to the word wi. Formally, this means that we have ti ∈ R[wi]. By means of examples, each ti lives in the middle column of the exemplary table above. For example, for a word w5 = 'red', we have that t5 = n · nl, for w18 = 'sleep', we have that t18 = nr · s, and so on. On the semantic side, we work with FVectR, as previously introduced, that is the compact closed category of finite dimensional vector spaces and linear maps. Thus, our syntax-semantics map is a strongly monoidal functor with the following form: F : PRG → FVectR The concrete form of the functor we are interested in acts as follows on the basic types of PRG: F (n) := N F (s) = S where N and S are two vector spaces in FVectR. The strong monoidality of F results in certain equalities on the non-atomic elements of PRG, examples of which are as follows: F (p · q) = F (p) ⊗ F (q) F (1) = R F (pr) = F (pl) = F (p)∗ These extend to the morphisms, for example we have the following morphism inequal- ities: F (p ≤ q) = F (p) → F (q) F (p · pr ≤ 1) = F (p) as well as the following similar ones for the left adjoints: F (1 ≤ pr · p) = ηF (p) F (pl · p ≤ 1) = F (p) F (1 ≤ p · pl) = ηF (p) In this setting, the meaning representations of words are vectors; that is, [[v]], for v a word or a string of words, is a vector −→v , hence the principle of lexical substitution instantiates as follows: −−−−−−−−→ w1w2 ··· wn := F (α)(−→w 1 ⊗ −→w 2 ⊗ ··· ⊗ −→w n) (3) w1w2 ··· wn the vector representation of the string w1w2 ··· wn and −→wi the vector for −−−−−−−−→ representation of word wi in the string. 12 Instantiation to (PRG, CPM(FVectR), F, [[ ]]) The syntactic side is as in the previous case. On the semantic side, we work in the compact closed category CPM(FVectR). The passage from FVectR to CPM(FVectR) is functorial. Thus, the categorical compositional distributional semantics works along the following functor: F : PRG → FVectR → CPM(FVectR) Here, the meaning representations of words are density matrices, that is [[v]] is v, for v a word or a string of words, hence the principle of lexical substitution instantiates as follows: (cid:92)w1 ··· wn := F (α)( w1 ⊗ ··· ⊗ wn) (4) for (cid:92)w1 ··· wn the density matrix representation of the string w1w2 ··· wn and wi the density matrix representation of word wi, for each word of the string. KL-Divergence and Relative Entropy (cid:80) For a vector space V with a chosen orthonormal basis {−→vi}i, a normalized vector −→v = −→vi can be seen as a probability distribution over the basis. In this case one can i pi define a notion of entropy for −→v as follows: S(−→v ) = −(cid:88) which is the same as the entropy of the probability distribution P = (cid:80) i pi over the For two vectors −→v ,−→w with probability distributions P and Q, the distance between pi ln pi basis. i their entropies, referred to by Kullback-Leibler divergence, is defined as: (cid:88) KL(−→v (cid:107)−→w ) = pj(ln pj − ln qj) This is a measure of distinguishability. One can define a degree of representativeness based on this measure: j RKL(−→v ,−→w ) = 1 1 + KL(−→v (cid:107)−→w ) This is a real number in the unit interval. When there are non zero weights on the basis elements of −→v that are zero in −→w , then ln 0 = ∞ (by convention 0 ln 0 = 0) and so RKL(−→v ,−→w ) = 0. So when the support of P is not included in the support of Q then RKL = 0, and when P = Q then RKL = 1. Both KL-divergence and representativeness are asymmetric measures. The follow- ing measure, referred to by Jensen-Shannon divergence, provides a symmetric version: (cid:19)(cid:21) (cid:20) (cid:18) (cid:19) (cid:18) JS(−→v ,−→w ) = 1 2 KL P(cid:107) P + Q 2 + KL Q(cid:107) P + Q 2 13 thonormal basis as v =(cid:80) If there are correlations between the basis of V , these can be represented by a pos- itive semi-definite symmetric matrix. Suppose we write this matrix in the chosen or- −→vi ⊗ −→vj . The diagonal entries of v are probabilities over ij pij the basis, so we have: (cid:88) pii = 1 ii The non-diagonal entries denote the correlations between the basis. The correlation between −→vi and −→vj is the same as the correlation between −→vj and −→vi . The matrix v given in the form above is the matrix form of a density operator in the chosen basis {−→vi}i. follows: Density matrices have a notion of entropy, called von Neumann entropy, defined as N (v) = −Tr(v ln v) They also have a notion of KL-divergence: N (v w) = Tr v(ln v − ln w) The representativeness between two density matrices is defined in a similar way as for vectors. It is a real number in the unit interval, with 0 and 1 values as described before: RN (v, w) = 1 1 + N (PQ) The density matrix version of the Jensen-Shannon divergence is obtained by replacing S with N. A vector can be represented as a diagonal density matrix on the chosen basis {−→vi}i. In this case, entropy and von Neumann entropy are the same, since the density matrix has no information on its non-diagonal elements, denoting a zero correlation between the chosen basis. Distributional Inclusion Hypothesis for Vectors and Density Matrices According to the distributional inclusion hypothesis (DIH) if word v entails word w then the set of contexts of v are included in the set of contexts of w. This makes sense since it means that whenever word v is used in a context, it can be replaced with word w, in a way such that the meaning of w subsumes the meaning of v. For example, 'cat' entails 'animal', hence in the sentence 'A cat is drinking milk', one can replace 'cat' with 'animal' and the meaning of the resulting sentence subsumes that of the original sentence. On the other hand, 'cat' does not entail 'goldfish', evident from the fact that the sentence 'A goldfish is drinking milk' is very unlikely to appear in a real corpus. Different asymmetric measures on probability distributions have been used to model and empirically evaluate the DIH. Entropy-based measures such as KL-divergence is among successful such measures. Take the orthonormal basis of a distributional space to be the context lemmas of a corpus and this measure becomes zero if there are con- texts with zero weights in −→v that do not have zero weights in −→w . In other words, 14 RKL(−→v ,−→w ) = 0 when v does not entail w. The contrapositive of this provides a de- gree of entailment: −→v (cid:96) −→w ⇒ RKL(−→v ,−→w ) (cid:54)= 0 (5) The α-skew divergence of Lee [29] and a symmetric version of it based on JS [12] are variations on the above. Similarly, for density matrices one can use the degree of representativeness of two density matrices RN to check for inclusion of contexts. v (cid:96) w ⇒ RN (v, w) (cid:54)= 0 (6) Here contexts can be single context lemmas for the diagonal elements where the basis are reflexive pairs (pi, pi); contexts can also be pairs of two context lemmas for the non-diagonal elements where the basis are pairs (pi, qj) with pi (cid:54)= qj. Hence, not only we are checking inclusion over single contexts, but also over correlated contexts. The following example shows why this notion leads to a richer notion of entailment. Example 1. For the sake of simplicity suppose we do not care about the frequencies per se, but whether the bases occurred with the target word at all. So the entries are always either 1 or 0. Consider a distributional space with basis {aquarium, pet, fish} and two target words: 'cat' and 'goldfish' therein. Assume that we have seen 'cat' in the context of 'fish', and also independently, in the context of 'pet'. Assume further that we have seen the word 'goldfish' in the context of 'aquarium', and also in the contexts of 'pet' and 'fish', but whenever it was in the context of 'pet', 'fish' was also around: for example they always occurred in the same sentence. Hence, we have never seen 'goldfish' with 'pet' or 'fish' separately. This signifies a correlation between 'pet' and 'fish' for the target word 'goldfish'. This correlation is not representable in the vector case and as a result, whereas 'cat' does not normally entail 'goldfish', its vector representation does, as the set of contexts of 'cat' is included in the set of contexts of 'goldfish': aquarium pet fish 1 1 1 1 1 0 goldfish cat By moving to a matrix setting, we are able to represent this correlation and get the cor- rect entailment relation between the two words. In this case, the basis are pairs of the original basis elements. Abbreviating them to their first letters, the matrix representa- tions of 'cat' and 'goldfish' become: goldfish a p f 1 0 0 0 0 1 0 1 0 a p f cat a p f a 0 0 0 p 0 1 0 f 0 0 1 It is easy to see that in this case the inclusion between the basis vectors, which now come in pairs, fails and as a result neither word entails the other. So we get a correct relationship. 15 Fig. 1. Inclusion of subspaces in the 'goldfish' example. The above are not density matrices, we make them into such by using Equation 1, goldfish = −→a ⊗ −→a + (−→p + as a result of which we obtain the following: −→ f ) ⊗ (−→p + cat = (−→p ⊗ −→p ) + ( −→ f ) −→ f ⊗ −→ f ) The explicit denotations of the basis vectors are as follows: −→ f = (0, 0, 1) −→a = (1, 0, 0) −→p = (0, 1, 0) The resulting density matrices have the following tabular form: goldfish a p f 1 0 0 0 1 1 0 1 1 a p f cat a p f a 0 0 0 p 0 1 0 f 0 0 1 The lack of inclusion between these representations becomes apparent from Figure 1, where it is shown that the subspaces spanned by the basis vectors of the density matrices do not have an overlap. Without taking correlations of the basis into account, DIH has been strengthened from another perspective and by the realization that contexts should not be all treated equally. Various measures were introduced to weight the contexts based on their promi- nence, for example by taking into account their rank [47,8,27]. From the machine learn- ing side, classifiers have been trained to learn the entailment relation at the word level [5]. All of these improvements are applicable to the above density matrix setting. petfishaquariumpetfishaquarium(b) goldfish(a) catpetfishaquarium(c) orthogonality of subspaces 16 Categorical Compositional Distributional Entailment The distributional co-occurrence hypothesis does not naturally extend from the level of words to the level of sentences. One cannot mimic the basic insights of the setting and say that sentences that have similar contexts have similar meanings, or that meaning of a sentence can be derived from the meanings of the words or sentences around it. The same fact holds about the distributional inclusion hypothesis and entailment, which does not naturally extend from words to phrases/sentences. One cannot say that a sentence s1 entails a sentence s2 when the contexts of s1 are included in the contexts of s2. In the same lines, one cannot say that two sentences entail each other if their meanings subsume each other. In this case, and similar to the case of co-occurrence distributions and similarity, entailment should be computed compositionally. In this section, we define a compositional distributional notion of entailment based on the (vector and density matrix) representations of the words therein, the entailment relations between them, and the grammatical structures of the sentences. This notion is similar to the entailment-as-monotonicity notion of entailment in Natural Logic, which is based on an upward/downward monotonicity relationship between the meanings of words [31]. Whereas in Natural Logic grammatical structures of sentences are treated on a case by case phrase-structure basis, in our setting the strongly monoidal F functor works in a modular and uniform fashion. Given a CCDS, in either of its vectors or density matrices instantiations, we define a compositional notion of entailment, as follows: Definition 1. Categorical compositional distributional entailment (CCDE). For two strings v1v2 ··· vn and w1w2 ··· wk, and X either KL or N, we have v1v2 ··· vn (cid:96) w1w2 ··· wk whenever RX ([[v1 ··· vn]], [[w1 ··· wk]]) (cid:54)= 0. We show that this entailment can be made compositional for phrases and sentences that have the same number of words and the same grammatical structure and wherein the words entail each other point-wisely. We make this precise below. Theorem 1. For all i, 1 ≤ i ≤ n and vi, wi words, we have vi (cid:96) wi ⇒ v1v2 ··· vn (cid:96) w1w2 ··· wn whenever the v1v2 ··· vn and w1w2 ··· wn have the same grammatical structure. Proof. Consider the case of density matrices. By Eq. 6 and CCDE, it suffices to show: ∀vi, wi RN (vi, wi) (cid:54)= 0 =⇒ RN ( (cid:92)v1 ··· vn, (cid:92)w1 ··· wn) (cid:54)= 0 (7) By definition, R(vi, wi) (cid:54)= 0 is equivalent to the existence of ri ∈ R and a positive operator v(cid:48) i. Thus to prove the implication in 7 one can equivalently prove that there exist ri, q ∈ R and positive operators v(cid:48) i such that wi = ri vi + v(cid:48) i, π(cid:48) such that: ∀vi, wi wi = ri vi + v(cid:48) i =⇒ (cid:92)w1 ··· wn = q · (cid:92)v1 ··· vn + π(cid:48) According to the principle of lexical substitution with density matrices (Eq. 4) we have: (cid:92)v1 ··· vn := F (α)( v1 ⊗ ··· ⊗ vn) + π(cid:48) (cid:92)w1 ··· wn := F (β)( w1 ⊗ ··· ⊗ wn) 17 for α the grammatical structure of (cid:92)v1 ··· vn and β the grammatical structure of (cid:92)w1 ··· wn. Thus what we want to prove becomes equivalent to the following: ∀vi, wi i =⇒ F (β)( w1 ⊗ ··· ⊗ wn) = qF (α)( v1 ⊗ ··· ⊗ vn) + π(cid:48) In order to prove the above, we assume the antecedent and prove the consequence. That is, we assume that for all vi and wi there exist real numbers ri ∈ R and positive opera- tors v(cid:48) i and prove the consequence. To prove the consequence, we proceed as follow. Start from the assumption, that is for all 1 ≤ i ≤ n we have i, such that wi = ri vi + v(cid:48) wi = ri vi + v(cid:48) This is equivalent to: equivalent to: equivalent to: vi (cid:96) wi v1 (cid:96) w1,··· , vn (cid:96) wn RN (v1, w1) (cid:54)= 0,··· , RN (vn, wn) (cid:54)= 0 w1 = r1 vi + v(cid:48) 1,··· , wn = rnvn + v(cid:48) n for ri and v(cid:48) i as defined previously. Using this, for the tensor of w1 to wn we obtain: w1 ⊗ ··· ⊗ wn = (r1 vi + v(cid:48) 1) ⊗ ··· ⊗ (rnvn + v(cid:48) n) which by bilinearity of tensor is equivalent to: r1 ··· rn( v1 ⊗ ··· ⊗ vn) + Π 1 ⊗ v2 ⊗ ··· ⊗ vn) + (r2v1 ⊗ v(cid:48) where Π is an expression of the following form: 2 ⊗ ··· ⊗ v(cid:48) (r1 v(cid:48) Since the vi's are density matrices (hence positive), the v(cid:48) i's are positive operators, and summation and taking tensors preserves positivity, Π is also a positive operator. Recall that (cid:92)v1 ··· vn and (cid:92)w1 ··· wn had the same grammatical structures, hence we have that F (α) = F (β). Denote this same structure with f. We have: n) + ··· + (rnv1 ⊗ v2 ⊗ ··· ⊗ v(cid:48) n) f ( w1 ⊗ ··· ⊗ wn) = f (r1 ··· rn( v1 ⊗ ··· ⊗ vn) + Π) Since f is a completely positive map, it is also linear, thus we have: f (r1 ··· rn( v1 ⊗ ··· ⊗ vn) + Π) = r1 ··· rnf ( v1 ⊗ ··· ⊗ vn) + f (Π) Since f is completely positive f (Π) is also positive. So we have shown: qF (α)( v1 ⊗ ··· ⊗ vn) + π(cid:48) for q = r1 ··· rn and π(cid:48) := f (Π). 18 −→ v(cid:48) −→ v(cid:48) −→v i + i such that −→w i = ri The proof for the case of vectors follows the same steps and it is simpler. In this case, −→v i (cid:96) −→w i is equivalent to RKL(−→v i,−→w i) (cid:54)= 0, which is equivalent to the existence of ri ∈ R and another vector i. Thus we drop the requirement about the existence of positive operators and wherever it is used in the above, replace it with just a vector. In this case, the fact that f is a linear map, i.e. a morphism in FVectR rather than CPM(FVectR), would suffice to get the required result. End of proof. (cid:3) The above proposition means if w1 represents v1 and w2 represents v2 and so on until wn and vn, then the string w1w2 ··· wn represents the string v1v2 ··· vn composi- tionally, from meanings of phrases/sentences. That is, the degree of representativeness of words -- either based on KL-divergence or von Neumann entropy -- extends to the degree of representativeness of phrases and sentences. Working with Real Data The purpose of this section is twofold. First, we elaborate on the motivation of the 'goldfish-cat' example (i.e. Example 1) of Section 1 and present five other cases of word pairs and their co-occurrence counts from real data. Here our goal is to show that the correlation between the basis words, i.e. words corresponding to basis vectors, helps avoid unwanted entailments. Then, we present a linguistic application of the proposed vector and density matrix models in a small-scale phrase/sentence entailment task based on data collected from a text corpus. Correlation of Basis Words Our goal in this section is to ground the 'goldfish-cat' example of Section 1 in real data. That is, we find pairs of words that would wrongly entail each other in the vector view of the distributional hypothesis. Then, we find basis words for these words in a way that these basis words correlate with each other. Finally, we show that the corresponding density matrix representations of the words do not entail each other, or do so to a much lesser degree than the vector case. We chose the word pairs, the basis words, and the co-occurrence counts from real data. In the first part of the experiment we are verifying two things. First is that whether data reflects the fact that whenever the first word in the pair occurred in the context of one of the basis words, was the other basis word also present in the context window or not. Second, we want to show that the second word of the pair did occur with one of the basis words without the other one being around. The word pairs and their correlated basis vectors are as follows: word pair base 1 (evidence, cigarette) smoking base 2 gun crossing owl fish gun pool zebra night pet toy (car, animal) (bird, dancing) (goldfish, cat) (BB, rifle) (chlorine, fish) swimming 19 In order to ensure a correlation between the basis words, we chose these in a way to form two-word non-compositional compound nouns, a list of some of which is provided in [38]. After choosing the basis words, we pick some target words. These word pairs were chosen such that one of the words in the pair would be related to the meaning of the compound as a whole and the other word of the pair would be related to the meaning of only one of the words in the compound. For instance, in the first word pair, the word 'evidence' is related to the meaning of the full compound, 'smoking gun', whereas the word "cigarette' is related only to one of the nouns in the compound, in this case to 'smoking'. Similarly, in the second pair, 'car' is related to 'zebra crossing' and 'animal' just to 'zebra'. By means of example, what we aim to verify is that whenever 'evidence' occurred in the same context with 'smoking', 'gun' was also around, but it was also the case that 'cigarette' was present close to 'smoking' without 'gun' being around. Similarly for the other case, we want to verify that whenever 'car' occurred in the same context with 'zebra', the word 'crossing' was around, but 'animal' did occur with 'zebra' without 'crossing' being around. We collected co-occurrence counts for the pairs and the basis words. In all the ex- ample word pairs, the vectors of the words have non-zero weights on both of the basis words, leading to inclusions of their contexts, indicating a wrong entailment relation between the two words of the pair. As an example, for the (evidence, cigarette) and (car, animal) pairs, the vector representations are as follows: smoking gun evidence cigarette 1390 4429 468 121 zebra 81 animal 389 car crossing 332 44 The matrix versions of these words were indeed more indicative of the lack of an entailment relation within the pair. In this case, one of the words had a small number on its off diagonal entries and the other word had a larger number there. For example, the matrix representations of the words of the (evidence, cigarette) word pair are as follows: evidence smoking smoking 1390 67 gun gun 67 468 cigarette smoking smoking 4429 gun 0 gun 0 121 The off diagonal counts are the counts for the basis pair (smoking,gun), i.e. 'evidence' was close to both 'gun' and 'smoking' for 67 times, whereas the cases where 'cigarette' was close to both 'smoking' and 'gun' was 0. This pattern is similar for the (car, animal) pair, but with less extreme non-zero off diagonal weights: zebra car zebra 81 crossing 11 crossing 11 332 animal zebra 389 zebra crossing 1 crossing 1 44 In this case, 'car' was close to both 'zebra' and 'crossing' for 11 times, whereas this number for 'animal' was only 1. We observed a similar pattern for the other word pairs. In order to compare them, we normalised the off diagonal weights by dividing them by 20 their sum and obtained a number between 0 and 1 for all the cases. These numbers are presented in the table below in decreasing order: word pair (evidence, cigarette) (car, animal) (bird, dancing) (goldfish, cat) (BB, rifle) (chlorine, fish) off diagonal word 1 1.00 0.91 0.85 0.71 0.69 0.56 off diagonal word 2 0.00 0.09 0.15 0.29 0.31 0.44 In all the cases, the off diagonal ratios are more than 50% apart from each other, which indicates a less than 50% overlap in their density matrix subspaces. Although real data is noisy, we do have a perfect separation: in the (evidence, cigarette) case, the off diagonal ratios are 100% apart. This number decreases to about 90% for (car,animal), to 85% for (bird, dancing) and to 0.71% for (goldfish, cat). The ratio of the last two word pairs is lower than the rest, but still above 50%. This is because the compounds from which we derived the basis words for these pairs are not as non-compositional as the other compounds. In other words, the word 'pool' occurs many times on its own when it means 'swimming pool' and the word 'toy' is often dropped from the compound 'toy gun' when talking about BB. Here, we have only considered and provided data for modelling correlations be- tween pairs of basis. This can in theory be extended to correlations between n-tuples of basis, for any n ≥ 3. In order to do so, one has to apply the CPM construction n times, resulting in semantic categories CPM(CPM(··· (CPM))) (FVectR) and work with higher order density operators that embed in the extended spaces. Providing real data for these general settings can be difficult due to sparsity problems, as one has to gather information about co-occurrences of n + 1 words at the same time (the target word and the n-tuples of basis). A possible solution to this problem is to take the limit of these co-occurrences as n grows and only work until n's that allow for gathering reasonable quantities of co-occurrence data. Choosing the number to which n tends to is related to the existence of n-word non-compositional compounds in language. In principle, this number can grow arbitrarily large, as for any n-word such compound, one is able to create a larger one with n + 1 words. In practice, however, text corpora contain data for n's that are small (usually not greater than 2 or 3). (cid:124) (cid:123)(cid:122) n (cid:125) Toy Entailment Application Dataset. In order to create our dataset, we first randomly selected 300 verbs from the most frequent 5000 words in the British National Corpus,1 and randomly picked either a hyponym or a hyponym from WordNet, provided that these also occurred more than 1 BNC is a 100 million word collection (around 2 million sentences) of samples of writ- ten and spoken language from a wide range of sources, available at http://www. natcorp.ox.ac.uk/ 21 500 times in the BNC. Next, each entailing verb was paired with one of its subject or object nouns, which had again occurred more than 500 times. The corresponding entailed verb was paired with an appropriate hypernym of this noun chosen from the set described above. Recall that one has the following entailment between the hyponyms and the hypernyms: hyponym (cid:96) hypernym This procedure created 300 phrase/sentence entailments of the form (cid:96) entry 2 entry 1 subject1 verb1 (cid:96) subject2 verb2 verb1 object1 (cid:96) verb2 object2. Many of these 300 pairs did not reflect an easily recognisable entailment. As our goal was to collect human judgements for the degrees of entailments, we had to have pairs in which the entailment or lack thereof was obvious for humans. Thus, from these 300 entries, we selected 23 pairs to reflect three ranges of entailment degrees, classified as follows: 1. Both the subjects (or objects) and the verbs entail each other respectively, that is: subject1 (cid:96) subject2 object1 (cid:96) object2 and and verb1 (cid:96) verb2 verb1 (cid:96) verb2 2. Either the subjects (or objects) entail each other or the verbs do, that is subject1 (cid:96) subject2 object1 (cid:96) object2 or or verb1 (cid:96) verb2 verb1 (cid:96) verb2 3. Neither the subjects (or objects) nor the verbs entail each other (or at least they did not do so in a clear way), that is subject1 (cid:48) subject2 object1 (cid:48) object2 and and verb1 (cid:48) verb2 verb1 (cid:48) verb2 Whereas the pairs created by the above procedure cover entailments between short two-word phrases and sentences, we were also interested in providing results for full transitive sentences. In order to do that, we used the 23 pairs to form subject-verb-object entailments by following the procedure below: -- pairing the subject of an intransitive sentence and its hypernym with a verb phrase and its hypernym, for example 'people' in 'people strike' was paired with 'group' in 'group attacks' and 'clarify rule' was paired with 'explain process', -- pairing the object of a verb phrase and its hypernym with an intransitive sentence and its hypernym, for example 'task' in 'arrange task' was paired with 'work' in 'organise work' and 'notice advertise' was paired with 'sign announce'. 22 Similar to the intransitive sentence and verb phrase case, we went through the re- sulting sentences and chose 12 of them that had either easily recognisable entailments for humans or were obviously not entailing each other, again relative to the human eye. These reflected three ranges of entailment degrees classified as follows: 1. Both the subjects (or objects) and the verb phrases (or the intransitive sentences) entailed each other, that is: subject1 (cid:96) subject2 object1 (cid:96) object2 and and verb phrase1 (cid:96) verb phrase2 intr. sentence1 (cid:96) intr. sentence2 2. Either the subjects (or objects) or the verb phrases (or the intransitive sentences) 3. Neither the subjects (or objects) nor the verb phrases (or the intransitive sentences) entailed each other, that is: subject1 (cid:96) subject2 object1 (cid:96) object2 entailed each other, that is: subject1 (cid:48) subject2 object1 (cid:48) object2 or or verb phrase1 (cid:96) verb phrase2 intr. sentence1 (cid:96) intr. sentence2 and and verb phrase1 (cid:48) verb phrase2 intr. sentence1 (cid:48) intr. sentence2 The degree of entailment between the produced phrases and sentences were evalu- ated by 16 annotators. These were either logic or computational linguistics profession- als. They provided their scores in a scale from 1 (no entailment) to 7 (full entailment). The 1-7 scale was chosen following common practice in the empirical computational linguistics literature, for example see [34]. Each entailment was scored by the average across all annotators. The human judgements agreed with the three classes of entail- ments, described above. That is, we had three clear bands of judgements: 1. The entries in which both subjects/objects and verbs/verb phrases/intransitive sen- tences entailed each other, got an average annotation above 4. For example we had: Entry intr. sentence verb phrase trans. sentence entry 1 (cid:96) entry 2 people strike (cid:96) group attacks notice advertises (cid:96) sign announces clarify rule (cid:96) explain process recommend development (cid:96) suggest improvement people clarify rule (cid:96) group explain process office arrange task (cid:96) staff organize work Avg. judgement 4.313 5.375 5.000 5.375 5.000 5.500 2. The entries in which either only subjects/objects entailed each other or only verbs/verb phrases/intransitive sentences did, got an average annotation between 1 and 4. For example: Entry intr. sentence verb phrase trans. sentence entry 1 (cid:96) entry 2 corporation appoints (cid:96) firm founds boy recognizes (cid:96) man remembers confidence restores (cid:96) friendship renews corporation appoint people (cid:96) firm found group people read letter (cid:96) corporation anticipate document 23 Avg. judg. 3.313 2.938 2.625 2.937 2.062 In the first case, 'corporation' clearly entails 'firm', but the entailment relationship between 'appoints' and 'founds' is unclear. In the second case, clearly 'boy' en- tails 'man', but it is not so obvious if 'recognise' entails 'remember'. In the third case, again 'restores' clearly entails 'renews', but the relationship between 'con- fidence' and 'friendship' is less evident. In the fourth case, 'corporation' clearly entails 'firm', but the relationship between 'appoint people' and 'found group' is not very obvious. 3. The entries which were non-entailing, i.e. it was not clear if we had an entailment relationship between the subjects/objects and it was not clear if we had an en- tailment relationship between the verbs/verb phrases/intransitive sentences, got an average annotation below 2. For example: Entry intr. sentence verb phrase trans. sentence entry 1 (cid:96) entry 2 editor threatens (cid:96) application predicts, progress reduces (cid:96) development replaces confirm number (cid:96) approve performance man recall time (cid:96) firm cancel term editor threatens man (cid:96) application predicts number Avg. judgement 1.125 1.225 1.813 1.125 1.625 Consider for example the fourth entry: it is clear that neither 'editor' entails 'appli- cation', nor 'threatens man' entails 'predicts number'. Similarly, in the third entry, 'confirm' does not entail 'approve' and 'number' does not entail 'performance'. Also similarly in the first case, it is clear that 'editor' does not entail 'application' and neither does 'threatens' entail 'predicts'. Basic vector space. The distributional space where the vectors of the words live is a 300-dimensional space produced by non-negative matrix factorization (NMF). The original vectors were 2,000-dimensional vectors weighted by local mutual information (LMI), for which the contexts counts had been collected from a 5-word window around each target word. The vectors were trained on the concatenation of ukWaC and Wack- ypedia corpora.2 Entailment via KL-divergence in FVectR. For degrees of entailment obtained via KL-divergence, we work on the instantiation of CCDS to FVectR for the three types of phrases/sentences in our dataset: 1. verb phrases, which we will refer to by "verb noun", 2. intransitive sentences, which we will refer to by "noun verb", 2 Around 132 million sentences of English text, available at http://wacky.sslmit. unibo.it/doku.php?id=corpora/ 24 3. transitive sentences, which we will refer to by "noun verb noun(cid:48)". The vector representations of these are obtained by applying Equation 2, which result in the following expressions: −−−−−−→ verb noun := F (α)(−→v ⊗ −→n ) = (1S ⊗ N )(−→v ⊗ −→n ) −−−−−−→ noun verb := F (α)(−→n ⊗ −→v ) = (N ⊗ 1S)(−→n ⊗ −→v ) (8) (9) −−−−−−−−−−→ noun verb noun(cid:48) := F (α)(−→n ⊗ −→v ⊗ −→ The first two of the above items simplify to the matrix multiplications between the matrix of the verb and the vector of the noun, as follows, for −→n T the transpose of the vector of the noun: n(cid:48) ) = (N ⊗ 1S ⊗ N )(−→n ⊗ −→v ⊗ −→ n(cid:48) ) (10) −→v × −→n −→n T × −→v (11) (12) The vector representation of a "noun verb noun(cid:48)'" sentence simplifies to the tensor contraction between the cube of the verb and the vector of noun(cid:48), and then the matrix multiplication between the matrix of the result and the vector of the noun, as follows: −→n T × −→v × −→ n(cid:48) (13) For details of these computations, we refer the reader to our previous work [10,15,25], where these and other forms of sentences have been worked out for a variety of different nouns and verbs, as well as adjectives (for sentences with adjectival modifiers). Matrices and Cubes of Verbs. Vectors of nouns −→n are created using the usual dis- tributional method. For producing the verb matrices for verbs taking a single argument (either at the subject or the object position), we work with a variation of the method suggested in [15], referred to by relational. Specifically, we define the verb matrix as follows: −→v matrix = −→v (cid:12)(cid:88) (−→n i ⊗ −→n i) i (14) In the above, −→ni enumerates all the nouns that the verb has modified across the cor- pus in various phrases and sentences. −→v is the distributional vector of the verb, built in the same way as the noun vectors. The original relational method computed the ma- trix of the verb by encoding in it the information about the noun arguments of the verb across the corpus, the same as we do above. The above formulation enriches this encod- ing, via the use of the point-wise multiplication operation (cid:12), by also taking into account the distributional vector of the verb −→v , hence encoding directly information about the distributions of the verb. Substituting this in the matrix multiplication of the expression in Eq. 11 and simplifying it, provides us with the following vector representation for "verb-noun" and "noun-verb" expressions: −−−−−−→ verb noun = −→v (cid:12)(cid:88) −−−−−−→ noun verb = (cid:104)−→n −→n i(cid:105)−→n i (15) i 25 Roughly speaking, the above says that the vector meaning of any such phrase/sentence represents the contextual properties of the verb of the phrase together with the common contextual properties of the nouns of the phrase/sentence and the nouns that the verb has modified across the corpus. In order to represent the meaning of transitive verbs, the matrices of Equation 14 are embedded into cubes Cijk by copying either their i'th or their j'th dimension into the extra k'th dimension of the cube. Thus obtaining the following two cubes: Ciij and Cijj This operation is formally referred to as a Frobenius algebra copying operation and is extensively discussed and applied in previous work, e.g. [25,22,36,23,33,21]. The first embedding (providing us with the cube Ciij) is referred to as copy subject and the second one (providing us with the cube Cijj) as copy object. The sentence vectors produced by the two methods when we substitute such cubes in Equation 13 take the following form: Copy Subject: (−→v matrix × −→n object) (cid:12) −→n subject Copy Object: (−→v matrix × −→n subject) (cid:12) −→n object (16) (17) where −→n subject, −→n object are the distributional vectors for the subject and the object of the transitive sentence, and −→v matrix the matrix of the verb, in our case created as in Eq. 14. Since each one of the above embeddings puts emphasis on a different argument of the transitive verb, it is reasonable for one to represent the meaning of the transitive sentence by further combining both of them into a single representation, for example as below: −→v CopySubject + −→v CopyObject −→v CopySubject (cid:12) −→v CopyObject (18) Entailment via relative entropy in CPM(FVectR). In the case of degrees of entail- ment using relative entropy, we work with the instantiation of CCDS to CPM(FVectR), where Equation 2 results in a density matrix, computed as follows for a "verb noun" phrase, a "noun verb" and a "noun verb noun(cid:48)" sentence, respectively: noun verb noun(cid:48) := F (α)(n ⊗ v ⊗ n(cid:48)) = (N ⊗ 1S ⊗ N )(n ⊗ v ⊗ n(cid:48)) verb noun := F (α)(v ⊗ n) = (1S ⊗ N )(v ⊗ n) noun verb := F (α)(n ⊗ v) = (N ⊗ 1S)(n ⊗ v) (19) (20) (21) where v, n and n(cid:48) are the density matrices of the verb and the nouns, respectively, and ⊗ is the tensor product in CPM(FVectR). These simplify to the following formulae: (22) (23) (24) TrN (v ◦ (n ⊗ 1S)) TrN ((n ⊗ 1S) ◦ v) TrN,N (v ◦ (n ⊗ 1S ⊗ n(cid:48))) 26 For details of the computations and examples with different nouns and verbs and sen- tence forms, see Piedeleu et al. [36] and Kartsaklis [22]. The above formulae and equations of density matrices for words, phrases and sen- tences are theoretical. In what follows, we implement two concrete ways of creating density matrices, one directly based on the correlations between the bases and another by algebraically operating on the vectors. Density matrices by direct correlation. We describe a generic process for creat- ing density matrices based on correlations between the basis vectors, similar to those demonstrated in the 'goldfish' example of Section 1 and depicted graphically in Fig- ure 1. Co-occurrence counts are collected for a target word w and every pair of words (wi, wj) (not necessarily in sequence) that occur in the same context with wt. By using these statistics and treating the pairs of words as a single basis, one can build an upper- or lower-triangular matrix, let us denote it by M. Since the statistics were correlated re- gardless of the order of the words wi and wj, we can expand M to a symmetric matrix. This is a routine procedure and is done by copying the upper or the lower triangle into the other half of the matrix. Formally speaking, we have: Mij = Mji In order for the matrices to be density matrices, they have to be positive semi- definite. This can be enforced in different ways, one of which is by turning M to a row diagonally dominant matrix. This is a matrix for every i-th row of which we have: Mii ≥(cid:88) i(cid:54)=j Mij That is, in all of the rows of this matrix, the magnitude of the diagonal entry is greater than or equal to the sum of the magnitudes of the non-diagonal entries. In our case, since the non-diagonal entries are counts, they are positive, and thus the entries and their magnitudes are equal. We then normalise this matrix by its trace and obtain a density matrix. Density matrices from distributional vectors. In contrast with the previous section, the construction we present here follows directly the quantum-mechanical intuition ex- pressed in Equation 1 that a density matrix is a probability distribution over a set of vectors. For a target word w, we define this set {−→ci}i to consist of vectorial representa- tions of the various contexts in which w occurs: for example, −→ci can be the average of the distributional vectors for all other words in the same sentence with w. In symbols, the density matrix corresponding to a word w is defined as follows: (cid:88) w = −→ci ⊗ −→ci pi (25) where i iterates through all contexts of word w. i 27 Density matrices for transitive verbs. The Frobenius embeddings (briefly discussed for the case of standard verb matrices above) can be also applied on the density matrix formulation, producing the following representations for transitive sentences: Copy Subject: subj (cid:12) TrN,N (v ◦ (1N ⊗ obj)) Copy Object: TrN,N (v ◦ ( subj ⊗ 1N )) (cid:12) obj (26) (27) subj, and obj are density matrices created using one of the two methods (by where v, direct correlation or from distributional vectors) presented above. Note that merging the two representations into one as in Equation 18 is also possible, since both element-wise addition and element-wise multiplication of two density matrices preserve the underly- ing structure. From word to phrase and sentence density matrices. Substituting a word density matrix in Equations 22 to 24 and simplifying, results in the following density matrix representations for each phrase/sentence: noun verb = verb noun = vT × n × v noun verb noun(cid:48) = vT × (n ⊗ n(cid:48)) × v (28) (29) Again, the formulation is the same for a "verb noun" and a "noun verb" phrase. In simple terms, the above result in density matrices that take into account the contextual properties of the verb, the contextual properties of the nouns of the phrase/sentence, and those of the nouns that the verb has modified across the corpus, with the added value that these properties now reflect correlations between the various contexts through the use of density matrices. Entailment for simple vector composition. Finally, as a comparison, we also work with degrees of entailment obtained by computing KL-divergence on a simple compo- sitional model achieved via element-wise addition and element-wise multiplication of the vectors of the words in the phrase: −−−−−−→ −−−−−−→ verb noun+ = −→v + −→n noun verb+ = −→ n(cid:48) −−−−−−−−−−→ noun verb noun(cid:48) −→ n(cid:48) denote the distributional vectors of the verb and the nouns, respec- −−−−−−→ −−−−−−→ verb noun(cid:12) = −→v (cid:12) −→n noun verb(cid:12) = −−−−−−−−−−→ noun verb noun(cid:48)(cid:12) = −→n (cid:12) −→v (cid:12) −→ n(cid:48) + = −→n + −→v + where −→v and −→n , tively. The experiment proceeds as follows: We firstly produce phrase/sentence vectors and density matrices by composing the vectors or the density matrices of the individual words in each phrase, and then we compute an entailment value for each pair of phrases; in the case of vectors, this value is given by the representativeness on the KL-divergence between the phrase vectors, while for the density matrix case it is the representativeness on the von Neumann entropy between the density matrices of the phrases/sentences. The performance of each model is expressed as the Spearman's correlation of the model predictions with the human judgements. 28 The results for the verb phrase/intransitive sentence entailment are presented in Ta- ble 1. A non-compositional baseline is also included: we computed RKL for the lexical vectors of the heads of the sentences, that is their verbs. The upper bound is the inter- annotator agreement. Model Baseline (vector of verb) Categorical ρ Inf F1 Acc 0.24 0.37 0.57 0.74 0.66 0.56 0.74 0.78 RKL (vectors) RN (density matrices by direct correlation) 0.42 0.67 0.80 0.87 RN (density matrices from vectors) 0.48 0.60 0.76 0.78 Simple KL (e.w. addition) R+ (cid:12) KL (e.w. multiplication) R Upper bound 0.52 0.52 0.71 0.78 0.41 0.32 0.64 0.61 0.66 Table 1. Results for the verb phrase/intransitive sentence entailment experiment. We also present informedness, F1-score and accuracy for a binarised variation of the task, in which a phrase/sentence pair is classified as "entailment" or "non-entailment" depending on whether its average human score was above or below the mean of the annotation range. Informedness is an information-theoretic measure that takes into ac- count the true negatives count (something that is not the case for F1-score, for exam- ple) and thus it is more appropriate for small and relatively balanced datasets such as ours. The numbers we present for the binary task are based on selecting an appropriate threshold for each model, above of which entailment scores are classified as positive. This threshold was selected in order to optimize informedness. The results show that all the compositional models (for both vectors and density matrices) outperformed the non-compositional baseline. In the correlation task, the categorical vector model RKL was better, achieving a score that matches the inter- annotator agreement; in the classification task, the categorical density matrix models RN are ahead in every measure. From the two density models we implemented, the one based on distributional vectors (Equation 1) has a better degree of correlation with human judgements, but the one that directly reflects basis correlation presents the best binary performance, with accuracy 0.87 and informedness 0.67. A snapshot of the results including the highest and lowest pairs according to human judgements are shown in Table 2. We see that although each model returns values in a slightly different range, all of them follow to some extent the general pattern of human annotations. From all three models, the predictions of the model based on element-wise multiplication of vectors are quite marginal. The categorical models and addition of vectors return more balanced results, without avoiding small mistakes. Table 3 presents the results for a transitive entailment experiment, based on the 12 subject-verb-object entailments created as described earlier in this section. We have not a similar table to Table 2 for transitive cases, since we have many more models for the Humans Entailment arrange task (cid:96) organize work 5.50 (0.785) - T recommend development (cid:96) suggest improvement 5.38 (0.768) - T advertise notice (cid:96) announce sign 5.38 (0.768) - T confirm number (cid:96) approve performance 1.81 (0.258) - F recall time (cid:96) cancel term 1.63 (0.232) - F editor threathen (cid:96) application predict 1.13 (0.161) - F Categorical RKL(0.12) RN (0.17) R+ 0.164 - T 0.146 - T 0.114 - F 0.111 - F 0.070 - F 0.082 - F 0.371 - T 0.250 - T 0.187 - T 0.140 - F 0.169 - F 0.184 - T 29 Simple (cid:12) KL (0.13) R KL (0.08) 0.192 - T 0.142 - T 0.084 - T 0.182 - T 0.090 - T 0.100 - F 0.084 - T 0.087 - F 0.072 - F 0.126 - F 0.092 - F 0.080 - F Table 2. A snapshot of the phrase entailment experiment. The human judgements are between 1 and 7, with their values normalised between 0 and 1 in brackets. The model predictions are between 0 and 1. T and F indicate classification of each phrase pair as entailment or non-entailment according to each model. The numbers that appear in brackets at the headers are the classification thresholds optimizing informedness for the various models. RN refers to the density matrix model based on word vectors. transitive case and most of these models acquired the same score (0.83/0.92) due to the small size of the dataset. For the categorical compositional models we apply the Frobe- nius embeddings as described earlier, and combinations of these. For the density matrix formulation we use density matrices created from vectors, since this method showed better correlation with human judgements for the intransitive sentence entailment task. The results follow a pattern very similar to that of the intransitive sentence/verb phrase entailment experiment: For the correlation task, the highest performance comes from a categorical model using standard matrices and vectors, specifically the Frobenius ad- ditive model (copy subject + copy model); this model presents a correlation 0.72, very close to the inter-annotator agreement (0.75). However, the highest performance in the classification task comes once more from density matrix models, exactly as in the pre- vious experiment. On the other hand, this time some of the other models scored lower than the non-compositional baseline, possibly demonstrating an amount of correlation between sentence length and effectiveness of the model. Conclusion and Future Directions We reviewed the categorical compositional distributional semantic (CCDS) model, which extends the distributional hypothesis from words to strings of words. We showed that the model can also extend the distributional inclusion hypothesis (DIH) from words to phrases and sentences. In this case, one is able to derive entailment results over strings of words, from the entailments that hold between their constituent words. We recalled how the vector-based CCDS, which normally works with the category of finite- dimensional vector spaces and linear maps FbVectR, can be extended to include density matrices and completely positive maps, by moving to the category CPM(FVectR). We reviewed the existing notion of KL-divergence and its application to word level entail- ment on vector representations of words. We then argued for and showed that moving from vectors to density matrices strengthens the DIH. As contributions, on the theoretical side we proved that strings of words whose words point-wisely entail each other and where the strings have the same grammatical 30 Model Baseline (vector of verb) Categorical ρ Inf F1 Acc 0.40 0.62 0.75 0.83 0.43 0.12 0.33 0.67 RKL Copy-subject 0.42 0.62 0.75 0.83 RKL Copy-object 0.72 0.62 0.75 0.83 RKL Copy-subject + Copy-object RKL Copy-subject (cid:12) Copy-object 0.70 0.62 0.75 0.83 0.38 0.75 0.86 0.92 RN (density matrices from vectors, Copy Subject) RN (density matrices from vectors, Copy Object) 0.26 0.62 0.75 0.83 RN (density matrices from vectors, Copy Subject + Copy Object) 0.34 0.75 0.86 0.92 RN (density matrices from vectors, Copy Subject (cid:12) Copy Object) 0.06 0.62 0.75 0.83 Simple KL (e.w. addition) R+ (cid:12) KL (e.w. multiplication) R Upper bound 0.68 0.62 0.75 0.83 0.14 0.38 0.57 0.75 0.75 Table 3. Results for the transitive sentence entailment experiment. structure, admit a compositional notion of entailment. This is an extension of the result of the conference version of this paper [13], where a similar proof was presented for phrases and sentences which had grammatical structures that only consisted of epsilon- maps and identities. The previous result naturally excluded the cases where Frobenius or bialgberas are needed, e.g. for relative pronouns, as shown in [41,30], for coordination and intonation as shown in [21,24], and for quantification, as shown in [18]. The general version of the theorem proved in this paper is applicable to all these cases. On the experimental side, we presented two small scale tasks, both performed on real data. First, we presented evidence that density matrices do indeed give rise to a richer notion of entailment at the word level. This evidence consisted of pairs of words whose vector representations, built from real data, indicated a false entailment between the words, but where their density matrices, also built from real data, cor- rected the problem. Second, we built vector and density matrix representations for short phrase/sentences, computed the KL divergence and entropy between pairs of them and applied the results to a phrase/sentence entailment task. Our dataset consisted of pairs of intransitive sentences, object-verb phrases, and transitive sentences. The theoretical argument of the paper favours categorical composition over simple element-wise op- erators between vectors, and our results were supportive of this. The density matrices formulation worked better on the classification task. For correlation between the degrees of entailment as predicted by the model and as judged by humans, the composition over standard matrices and vectors performed better. For the intransitive/verb-phrase entail- ment task, the concrete CCDS instantiations on vectors and density matrices performed clearly above the baseline, while for the transitive sentence entailment task, some mod- els scored lower than the baseline due to the increased complexity and the greater sen- tence lengths. A large scale experiment to confirm these predictions constitutes work in progress. 31 Theorem 1 showed a relationship between the CCDS meanings of words (repre- sented by vectors or density matrices), the corresponding word-level entailments thereof, and the grammatical structures of sentences. The proven relationship is, however, re- strictive. It only holds for sentences that have the same grammatical structure. Study- ing this restriction and extending the theorem to a general form is work in progress. We aim to prove a similar relationship between sentences that do not necessarily have the same grammatical structure, but that a possibly weaker relationship holds between their grammatical structures. Note however that we can still compute the degree of entailment between any two sentences in the current setting. Sentence representations of our setting are either vectors (in the FbVectR instantiation) or density matrices (in the CPM(FVectR) instantiation); in each case one can calculate the representativeness of Shannon's entropy or the KL divergence between them and compare the results in a case by case basis. What remains unproved is that under which conditions these degrees remain nonzero, which is what is proved in Theorem 1 for a special case. KL-divergence and quantum relative entropy give rise to an ordering on vectors and density matrices, respectively, which represents the difference in the information contents of the underlying words as given by vectors and density matrices. Exploring this order and the notion of logic that may arise from it is work in progress. The work of Widdows [48] and Preller [37] might be relevant to this task. Acknowledgements Sadrzadeh is supported by EPSRC CAF grant EP/J002607/1 and Kartsaklis by AFOSR grant FA9550-14-1-0079. Balkır was supported by a Queen Mary Vice Principal schol- arship, when contributing to this project. References 1. Balkır, E.: Using Density Matrices in a Compositional Distributional Model of Meaning. Master's thesis, University of Oxford (2014) 2. Balkır, E., Sadrzadeh, M., Coecke, B.: Distributional sentence entailment using density ma- trices. In: FTP-ENTC Proceedings of the First International Conference on Theoretical Top- ics in Computer Science (TTCS). vol. 9541, pp. 1 -- 22 (2015) 3. Bankova, D., Coecke, B., Lewis, M., Marsden, D.: Graded entailment for compositional distributional semantics (2016), http://arxiv.org/abs/1601.04908 4. Baroni, M., Zamparelli, R.: Nouns are vectors, adjectives are matrices: Representing adjective-noun constructions in semantic space. In: Conference on Empirical Methods in Natural Language Processing (EMNLP-10). Cambridge, MA (2010) 5. Baroni, M., Bernardi, R., Do, N.Q., Shan, C.c.: Entailment above the word level in distri- butional semantics. In: Proceedings of the 13th Conference of the European Chapter of the Association for Computational Linguistics. pp. 23 -- 32. Association for Computational Lin- guistics (2012) 6. Blacoe, W., Kashefi, E., Lapata, M.: A quantum-theoretic approach to distributional seman- tics. In: Proceedings of the 2013 Conference of the North American Chapter of the Associa- tion for Computational Linguistics: Human Language Technologies. pp. 847 -- 857 (2013) 7. Clark, S., Pulman, S.: Combining symbolic and distributional models of meaning. In: Pro- ceedings of the AAAI Spring Symposium on Quantum Interaction. pp. 52 -- 55 (2007) 32 8. Clarke, D.: Context-theoretic semantics for natural language: an overview. In: Proceedings of the workshop on geometrical models of natural language semantics. pp. 112 -- 119. Asso- ciation for Computational Linguistics (2009) 9. Coecke, B., Paquette, E.O.: Categories for the practising physicist. Springer (2010) 10. Coecke, B., Sadrzadeh, M., Clark, S.: Mathematical foundations for a compositional distri- butional model of meaning. Linguistic Analysis 36 (2010) 11. Dagan, I., Glickman, O., Magnini, B.: The pascal recognising textual entailment challenge. In: Machine learning challenges. evaluating predictive uncertainty, visual object classifica- tion, and recognising tectual entailment, pp. 177 -- 190. Springer (2006) 12. Dagan, I., Lee, L., Pereira, F.C.N.: Similarity-based models of word cooccurrence probabil- ities. Mach. Learn. 34(1-3), 43 -- 69 (1999) 13. Esma Balkir, Dimitri Kartsaklis, M.S.: Sentence entailment in compositional distributional semantics. In: Fourteenth International Symposium on Artificial Intelligence and Mathemat- ics (2016), http://arxiv.org/abs/1512.04419 14. Firth, J.R.: A Synopsis of Linguistic Theory, 1930-1955. Studies in Linguistic Analysis pp. 1 -- 32 (1957) 15. Grefenstette, E., Sadrzadeh, M.: Experimental support for a categorical compositional dis- tributional model of meaning. In: Proceedings of the Conference on Empirical Methods in Natural Language Processing. pp. 1394 -- 1404. Association for Computational Linguistics (2011) 16. Grefenstette, E., Sadrzadeh, M.: Concrete models and empirical evaluations for the categor- ical compositional distributional model of meaning. Computational Linguistics 41, 71 -- 118 (2015) 17. Harris, Z.: Distributional structure. Word (1954) 18. Hedges, J., Sadrzadeh, M.: A generalised quantifier theory of natural language in categorical compositional distributional semantics with bialgebras. In: EPTCS Proceedings of the 13th International Conference on Quantum Physics and Logic, to appear (June 2016) 19. Herbelot, A., Ganesalingam, M.: Measuring semantic content in distributional vectors. In: Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics. vol. 2, pp. 440 -- 445. Association for Computational Linguistics (2013) 20. Kalchbrenner, N., Grefenstette, E., Blunsom, P.: A convolutional neural network for mod- elling sentences. In: Proceedings of the 52nd Annual Meeting of the Association for Com- putational Linguistics (Volume 1: Long Papers). pp. 655 -- 665. Association for Computational Linguistics (2014) 21. Kartsaklis, D.: Coordination in categorical compositional distributional semantics. In: EPTCS Proceedings of the Workshop on Semantic Spaces at the Intersection of NLP, Physics and Cognitive Science, to appear (June 2016) 22. Kartsaklis, D.: Compositional Distributional Semantics with Compact Closed Categories and Frobenius Algebras. Ph.D. thesis, University of Oxford (2015) 23. Kartsaklis, D., Sadrzadeh, M.: Prior disambiguation of word tensors for constructing sen- tence vectors. In: Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing (EMNL). pp. 1590 -- 1601 (2013) 24. Kartsaklis, D., Sadrzadeh, M.: A Frobenius model of information structure in categorical compositional distributional semantics. In: Proceedings of the 14th Meeting on Mathematics of Language (2015) 25. Kartsaklis, D., Sadrzadeh, M., Pulman, S.: A unified sentence space for categorical distributional-compositional semantics: Theory and experiments. In: COLING 2012, 24th International Conference on Computational Linguistics, Proceedings of the Conference: Posters, 8-15 December 2012, Mumbai, India. pp. 549 -- 558 (2012) 33 26. Kelly, G., Laplaza, M.: Coherence for compact closed categories. Journal of Pure and Applied Algebra 19(0), 193 -- 213 (1980), http://www.sciencedirect.com/ science/article/pii/0022404980901012 27. Kotlerman, L., Dagan, I., Szpektor, I., Zhitomirsky-Geffet, M.: Directional distributional similarity for lexical inference. Natural Language Engineering 16(04), 359 -- 389 (2010) 28. Lambek, J.: Type grammars as pregroups. Grammars 4(1), 21 -- 39 (2001) 29. Lee, L.: Measures of distributional similarity. In: Proceedings of the 37th Annual Meeting of the Association for Computational Linguistics on Computational Linguistics. pp. 25 -- 32 (1999) 30. M. Sadrzadeh, S. Clark, C.C.: Frobenius anatomy of word meanings 2: possessive relative pronouns. Journal of Logic and Computation 26, 785 -- 815 (2016) 31. MacCartney, B., Manning, C.D.: Natural logic for textual inference. In: ACL Workshop on Textual Entailment and Paraphrasing. Association for Computational Linguistics (2007) 32. MacLane, S.: Categories for the Working Mathematician. Springer (1971) 33. Milajevs, D., Kartsaklis, D., Sadrzadeh, M., Purver, M.: Evaluating neural word representa- tions in tensor-based compositional settings. In: Proceedings of the 2014 Conference on Em- pirical Methods in Natural Language Processing (EMNLP). pp. 708 -- 719. Association for Computational Linguistics, Doha, Qatar (October 2014), http://www.aclweb.org/ anthology/D14-1079 34. Mitchell, J., Lapata, M.: Composition in distributional models of semantics. Cognitive Sci- ence 34(8), 1388 -- 1439 (2010) 35. Piedeleu, R.: Ambiguity in Categorical Models of Meaning. Master's thesis, University of Oxford (2014) 36. Piedeleu, R., Kartsaklis, D., Coecke, B., Sadrzadeh, M.: Open system categorical quantum semantics in natural language processing. In: Proceedings of the 6th Conference on Algebra and Coalgebra in Computer Science. Nijmegen, Netherlands (2015) 37. Preller, A.: From Sentence to Concept, a Linguistic Quantum Logic. Tech. Rep. RR-11019, LIRMM (Jun 2011), http://hal-lirmm.ccsd.cnrs.fr/lirmm-00600428 38. Reddy, S., McCarthy, D., Manandhar, S.: An empirical study on compositionality in com- pound nouns. In: Proceedings of the 5th International Joint Conference on Natural Language Processing (IJCNLP-11) (2011) 39. Rimell, L.: Distributional lexical entailment by topic coherence. In: Proceedings of the 14th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2014, April 26-30, 2014, Gothenburg, Sweden. pp. 511 -- 519 (2014) 40. Rubenstein, H., Goodenough, J.: Contextual Correlates of Synonymy. Communications of the ACM 8(10), 627 -- 633 (1965) 41. Sadrzadeh, M., Clark, S., Coecke, B.: Frobenius anatomy of word meanings i: subject and object relative pronouns. Journal of Logic and Computation 23, 1293 -- 1317 (2013) 42. Salton, G., Wong, A., Yang, C.S.: A vector space model for automatic indexing. Commun. ACM 18, 613 -- 620 (1975) 43. Schutze, H.: Automatic Word Sense Discrimination. Computational Linguistics 24, 97 -- 123 (1998) 44. Selinger, P.: Dagger compact closed categories and completely positive maps. Electronic Notes in Theoretical Computer Science 170, 139 -- 163 (2007) 45. Socher, R., Huval, B., Manning, C., A., N.: Semantic compositionality through recursive matrix-vector spaces. In: Conference on Empirical Methods in Natural Language Processing 2012 (2012) 46. Turney, P.D.: Similarity of semantic relations. Computational Linguistics 32(3), 379 -- 416 (2006) 34 47. Weeds, J., Weir, D., McCarthy, D.: Characterising measures of lexical distributional similar- ity. In: Proceedings of the 20th international conference on Computational Linguistics. No. 1015, Association for Computational Linguistics (2004) 48. Widdows, D.: Geometry and Meaning. Center for the Study of Language and Informa- tion/SRI (2004)
1611.08813
1
1611
2016-11-27T09:53:36
Semi Supervised Preposition-Sense Disambiguation using Multilingual Data
[ "cs.CL" ]
Prepositions are very common and very ambiguous, and understanding their sense is critical for understanding the meaning of the sentence. Supervised corpora for the preposition-sense disambiguation task are small, suggesting a semi-supervised approach to the task. We show that signals from unannotated multilingual data can be used to improve supervised preposition-sense disambiguation. Our approach pre-trains an LSTM encoder for predicting the translation of a preposition, and then incorporates the pre-trained encoder as a component in a supervised classification system, and fine-tunes it for the task. The multilingual signals consistently improve results on two preposition-sense datasets.
cs.CL
cs
Semi Supervised Preposition-Sense Disambiguation using Multilingual Data Department of Computer Science Department of Computer Science Yoav Goldberg Bar-Ilan University Hila Gonen Bar-Ilan University 6 1 0 2 v o N 7 2 ] L C . s c [ 1 v 3 1 8 8 0 . 1 1 6 1 : v i X r a [email protected] [email protected] Abstract Prepositions are very common and very ambiguous, and understanding their sense is critical for understanding the meaning of the sentence. Supervised corpora for the preposition-sense disambiguation task are small, suggesting a semi-supervised approach to the task. We show that signals from unannotated multilingual data can be used to improve supervised preposition- sense disambiguation. Our approach pre-trains an LSTM encoder for predicting the translation of a preposition, and then incorporates the pre-trained encoder as a component in a supervised classification system, and fine-tunes it for the task. The multilingual signals consistently improve results on two preposition-sense datasets. 1 Introduction Preposition-sense disambiguation (Litkowski and Hargraves, 2005; Litkowski and Hargraves, 2007; Schneider et al., 2015; Schneider et al., 2016), is the task of assigning a category to a preposition in context (see Section 2.1). Choosing the correct sense of a preposition is crucial for understanding the meaning of the text. This important semantic task is especially challenging from a learning perspective as only little amounts of annotated training data are available for it. Indeed, previous systems (see Sec- tions 2.1.1 and 5.4) make extensive use of the vast and human-curated WordNet lexicon (Miller, 1995) in order to compensate for the small size of the annotated data and obtain good accuracies. Instead, we propose to deal with the scarcity of annotated data by taking a semi-supervised approach. We rely on the intuition that word ambiguity tends to differ between languages (Dagan et al., 1991), and show that multilingual corpora can provide a good signal for the preposition sense disambiguation task. Multilingual corpora are vast and relatively easy to obtain (Resnik and Smith, 2003; Koehn, 2005; Steinberger et al., 2006), making them appealing candidates for use in a semi-supervised setting. Our approach (Section 4) is based on representation learning (Bengio et al., 2013), and can also be seen as an instance of multi-task (Caruana, 1997), or transfer learning (Pan and Yang, 2010). First, we train an LSTM-based neural network (Hochreiter and Schmidhuber, 1997) to predict a foreign (say, French) preposition given the context of an English preposition. This trains the network to map con- texts of English prepositions to representations that are predictive of corresponding foreign prepositions, which are in turn correlated with preposition senses. The learned mapper, which takes into account large amounts of parallel text, is then incorporated into a monolingual preposition-sense disambiguation sys- tem (Section 3) and is fine-tuned based on the small amounts of available supervised data. We show that the multilingual signal is effective for the preposition-sense disambiguation task on two different datasets (Section 5). This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. License details: http://creativecommons.org/licenses/by-sa/4.0/ 2 Background 2.1 Preposition Sense Disambiguation Prepositions are very common, very ambiguous and tend to carry different meanings in different contexts. Consider the following 3 sentences: "You should book a room for 2 nights", "For some reason, he is not here yet" and "I went there to get a present for my mother". The preposition "for" has 3 different readings in these sentences: in the first sentence it indicates DURATION, in the second it indicates an EXPLANATION, and in the third a BENEFICIARY. The preposition-sense disambiguation task is defined as follows: given a preposition within a sentential context, decide which category it belongs to, or what its role in the sentence is. Choosing the right sense of a preposition is central to understanding the meaning of an utterance (Baldwin et al., 2009). 2.1.1 Previous Work and Available Corpora The preposition-sense disambiguation task was the focus of the SemEval 2007 shared task (Litkowski and Hargraves, 2007), based on the set of senses defined in The Preposition Project (TPP) (Litkowski and Hargraves, 2005), with three participating systems (Ye and Baldwin, 2007; Yuret, 2007; Popescu et al., 2007). Since then, it was tackled in several additional works (Dahlmeier et al., 2009; Tratz and Hovy, 2009; Hovy et al., 2010; Tratz, 2011; Srikumar and Roth, 2013b), some of which used different preposition sense inventories and corpora, based on subsets of the TPP dictionary. Srikumar and Roth (2013b) modeled semantic relations expressed by prepositions. For this task, they presented a variation of the TPP inventory, by collapsing related preposition senses, so that all senses are shared between all prepositions (Srikumar and Roth, 2013a). Schneider et al (2015) further improve this inventory and define a new annotation scheme. There are two main datasets for this task: the corpus of the SemEval 2007 shared task (Litkowski and Hargraves, 2007), and the Web-reviews corpus (Schneider et al., 2016): SemEval 2007 Corpus This corpus covers 34 prepositions with 16,557 training and 8096 test sen- tences, each containing a single preposition example. The sentences were extracted from the FrameNet database,1 based mostly on the British National Corpus (with 75%/25% of informative-writings/literary). Each preposition has a different set of possible senses, with a range of 2 to 25 possible senses for a given preposition. We use the original split to train and test sets. Web-reviews Corpus Schneider et al (2015) introduce a new, unified and improved sense inventory and corpus (Schneider et al., 2016) in which all prepositions share the same set of senses (senses from a unified inventory are often referred to as supersenses). This corpus contains text in the online re- views genre. It is much smaller than the SemEval corpus, with 4,250 preposition mentions covering 114 different prepositions which are annotated into 63 fine-grained senses. The senses are grouped in a hierarchy, from which we chose a coarse-grained subset of 12 senses for this work: AFFECTOR, ATTRIBUTE, CIRCUMSTANCE, CO-PARTICIPANT, CONFIGURATION, EXPERIENCER, EXPLANATION, MANNER, PLACE, STIMULUS, TEMPORAL, UNDERGOER. We find the Web-reviews corpus more ap- pealing than the SemEval one: the unified sense inventory makes the sense-predictions more suitable for use in downstream applications. While our focus in this work is the Web-reviews corpus, we are the first to report results on this dataset. For the sake of comparison to previous work, we also evaluate our models on the SemEval corpus. 2.2 Neural Networks and Notation We use w1:n to indicate a list of vectors, and wn:1 to indicate the reversed list. We use ◦ for vector concatenation, and x[j] for selecting the jth element in a vector x. A multi-layer perceptron (MLP) is a non linear classifier. In this work, we focus on MLPs with a single hidden layer and a softmax output transformation, and define the function M LP (x) as: 1http://framenet.icsi.berkeley.edu/ M LP (x) = softmax(U (g(W x + b1)) + b2) where g is a non-linear activation function such as ReLU or tanh, W and U are input-to-hidden and hidden-to-output transformation matrices, and b1 and b2 are optional bias terms. We use subscripts (M LPf 1, M LPf 2) to denote MLPs with different parameters. Recurrent Neural Networks (RNNs) (Elman, 1990) allow the representation of arbitrary sized se- quences, without limiting the length of the history. RNN models have been proven to effectively model sequence-related phenomena such as line lengths, brackets and quotes (Karpathy et al., 2015). In our implementation we use the long short-term memory network (LSTM), a subtype of the RNN (Hochreiter and Schmidhuber, 1997). LST M (w1:i) is the output vector resulting from inputing the items w1, ..., wi into the LSTM in order. 3 Monolingual Preposition Sense Classification We start by describing an MLP-based model for classifying prepositions to their senses. For an English sentence s = w1, ..., wn and a preposition position i,2 we classify to the sense y as: y = argmax j M LPsense(φ(s, i))[j] where φ(s, i) is a feature vector composed of 19 features. The features are based on the features of Tratz and Hovy (2009), and are similar in spirit to those used in previous attempts at preposition sense disambiguation. We deliberately do not include WordNet based features, as we want to focus on features that do not require extensive human-curated resources. This makes our model applicable for use in other languages with minimal change. We use the following features: (1) The embedding of the preposition. (2) The embeddings of the lemmas of the two words before and after the preposition, of the head of the preposition in the dependency tree, and of the first modifier of the preposition. (3) The embeddings of the POS tags of these words, of the preposition, and of the head's head. (4) The embeddings of the labels of the edges to the head of the preposition, to the head's head and to the first modifier of the preposition. (5) A boolean that indicates whether one of the two words that follow the preposition is capitalized. The English sentences were parsed using the spaCy parser.3 The network (including the embedding vectors) is trained using cross entropy loss. This model per- forms relatively well, achieving an accuracy of 73.34 on the Web-reviews corpus, way above the most- frequent-sense baseline of 62.37. On the SemEval corpus, it achieves an accuracy of 74.8, outperforming all participants in the original shared task (Section 5). However, these results are limited by the small size of both training sets. In what follows, we will improve the model using unannotated data. 4 Semi-Supervised Learning Using Multilingual Data Our goal is to derive a representation from unannotated data that is predictive of preposition-senses. We suggest using multilingual data, following the intuition that preposition ambiguity usually differs between languages (Dagan et al., 1991). For example, consider the following two sentences, taken from the Europarl parallel corpus (Koehn, 2005): "What action will it take to defuse the crisis and tension in the region?", and "These are only available in English, which is totally unacceptable". In the first sentence, the preposition "in" is translated into the French preposition "dans", whereas in the second one, it is translated into the French preposition "en". Thus, a representation that is predictive of the preposition's translation is likely to be predictive also of its sense. Learning a representation from a multilingual corpus We train a neural network model to encode the context of an English preposition as a vector, and predict the foreign preposition based on the context vector. The resulting context encodings will then be predictive of the foreign prepositions, and hopefully also of the preposition senses. We derive a training set of roughly 7.4M instances from the Europarl corpus (Koehn, 2005). Europoarl contains sentence-aligned data in 21 languages. We started by using several ones, and ended up with a 2We also support multi-word prepositions in this work. The extension is trivial. 3https://spacy.io/ subset of 12 languages4 that together constitute a good representation of the different language families available in the corpus. Though adding the other languages is possible, we did not experiment with them. To extract the training set, we first word-align5 the sentence-aligned data, and then create a dataset of English sentences where each preposition is matched to its translation in a foreign language. Since the alignment of prepositions is noisier than that of content words, we use a heuristic to improve precision: given a candidate foreign-preposition, we verify that the two words surrounding it are aligned to the two words surrounding the English preposition. Additionally, we filter out, for each English preposition, all foreign prepositions that were aligned to it in less than 5% of the cases. We then train the context representations according to the following model. For an English sentence s = w1, ..., wn, a preposition position i and a target preposition p in language L, we encode the context as a concatenation of two LSTMs, one reading the sentence from the beginning up to but not including the preposition, and the other in reverse: ctx(s, i) = LST Mf (w1:i−1) ◦ LST Mb(wn:i+1) This is similar to a BiLSTM encoder, with the difference that the encoding does not include the prepo- sition wi but only its context. By ignoring the preposition, we force the model to focus on the context, and help it share information between different prepositions. Indeed, including the preposition in the en- coder resulted in better performance in foreign preposition classification, but the resulting representation was not as effective when used for the sense disambiguation task. The context vector is then fed into a language specific MLP for predicting the target preposition: p = argmax j M LPL(ctx(s, i))[j] The context-encoder and the word embeddings are shared across languages, but the MLP classifiers that follow are language specific. By using multiple languages, we learn more robust representations. The English word embeddings can be initialized randomly, or using pre-trained embedding vectors, as we explore in Section 5.1. The network is trained using cross entropy loss, and the error is back- propagated through the context-encoder and the word embeddings. Using the representation for sense classification Once the encoder is trained over the multilingual data, we incorporate it in the supervised sense-disambiguation model by concatenating the representation obtained from the context encoder to the feature vector. Concretely, the supervised model now becomes: y = argmax j M LPsense(ctx(s, i) ◦ φ(s, i))[j] where ctx(s, i) is the output vector of the context-encoder and φ(s, i) is the feature vector as before. The network is trained using cross entropy loss, and the error back-propagates also to the context- encoder and to the word embeddings to maximize the model's ability to adapt to the preposition-sense disambiguation task. The complete model is depicted in Figure 1. 5 Empirical results Implementation details The models were implemented using PyCNN.6 All models were trained using SGD, shuffling the examples before each of the 5 epochs. When training a sense prediction model, we use early stopping and choose the best performing model on the development set. The sense-prediction MLP uses ReLU activation, and foreign preposition MLPs use tanh, with no bias terms. Unless noted otherwise, we use randomly initialized embedding vectors. For each experiment, we chose the param- eters that maximized the accuracy on the dev set.7 The accuracies we report are the average accuracies over 5 different seeds. 4Bulgarian, Czech, Danish, German, Greek, Spanish, French, Hungarian, Italian, Polish, Romanian and Swedish. 5Word-alignment is done using the cdec aligner (Dyer et al., 2010). 6https://github.com/clab/cnn 7In most of the experiments, the best results are achieved when the hidden-layer of the sense-prediction MLPs is of the size 500, and the preposition embedding is of size 200. In some cases, the best results are achieved with different dimensions. French prepositions German prepositions Spanish prepositions Prepositions supersenses dans, en, sur, ..., par mit, vor, zu, ..., gegen sobre, con, para, ..., a Temporal, Place, Manner, ..., Explanation M LPF R M LPGE M LPSP M LPsense φ(he booked a ... ,5) context representation he booked a room for two nights Figure 1: The suggested model for incorporating multilingual data in classifying prepositions to senses. First, a context- encoder (at the bottom, the green and red squares are LSTM cells) is trained on the Europarl corpus, with a different MLP for each language (left dashed frame). Then, the representation obtained from the context-encoder is added to the feature vector when classifying a preposition to senses (right dashed frame). 5.1 Evaluation on the Web-reviews corpus Using multilingual data Our main motivation in this work was to train a representation which is useful for the preposition-sense disambiguation task. Thus, we compare the performance of our model using the representation obtained from the context-encoder (multilingual model) with the model that does not use this representation (base model). We use the train/test split provided with the corpus. We further split the train set into train and dev sets, by assigning every fourth example of each sense to the dev set, yielding 2552/845/853 instances of train/dev/test. The results are presented in Table 1. We see an improvement of 2.86 points when using the pre-trained context representations, improving the average result from 73.34 to 76.20. To verify that the improvement stems from pre-training the context-encoder on multilingual data and not from adding the context-encoder as is, we also evaluated the performance of a model identical to the multilingual model, but with no pre-training on the multilingual data (context model, middle row of Table 1). The context model achieved a very similar result to that of the base model – 73.76, indicating that adding the context-encoder to the base model is not the source of the improvement. Model base +context +context(multilingual) Accuracy 73.34 (71.63-73.97) 73.76 (71.86-75.38) 76.20 (74.91-77.26) Table 1: The average accuracies on the test set of the Web-reviews corpus on 5 different seeds. Numbers in brackets indicate the min and max accuracy across seeds. Using monolingual or bilingual data only In order to verify the contribution of incorporating infor- mation from 12 languages, we also experiment with monolingual and bilingual models. For the mono- lingual model we train a model similar to our multilingual one, but when trying to predict the English preposition itself, rather than the foreign one, ignoring the multilingual signal altogether. For the bilin- gual models we train 12 separate models similar to our multilingual model, where each one is trained only on the training examples of a single language. As shown in Table 2, both the monolingual and the bilingual models improve over the base model (with the exception of Czech), but no improvement is as significant as that of the multilingual model. In addition, we see that the strength of the model does not depend solely on the number of training examples. Adding external word embeddings Another way of incorporating semi-supervised data into a model is using pre-trained word embeddings. We evaluate our model when using external word embeddings These two parameters were tuned on the dev set. The embeddings of the features are of dimension 4, with the exception of the lemmas, which are of dimension 50. The dimension of the input to the LSTMs (word embeddings) is 128. Both LSTMs have a single layer with 100 nodes, thus, the representation of the context obtained from the context-encoder is of dimension 200. The hidden-layer of the foreign-preposition MLP is of size 32. Language None (base model) Czech Polish Italian Romanian Hungarian Bulgarian Spanish German Danish Greek French English (monolingual) Swedish All 12 languages Accuracy Improvement Num. of training examples 73.34 (71.63-73.97) 73.06 (72.57-73.86) 73.93 (73.15-74.79) 73.97 (72.22-75.26) 74.09 (73.15-74.56) 74.42 (73.27-75.15) 74.44 (73.27-74.91) 74.65 (73.51-75.73) 74.73 (73.74-75.62) 75.08 (74.21-77.49) 75.12 (74.09-76.20) 75.43 (74.21-77.02) 75.68 (74.79-76.55) 75.87 (74.68-77.49) 76.20 (74.91-77.26) – -0.28 +0.59 +0.63 +0.75 +1.08 +1.10 +1.31 +1.39 +1.74 +1.78 +2.09 +2.34 +2.53 +2.86 – 190,850 166,101 810,589 205,520 40,302 292,908 1,267,400 603,861 1,131,915 586,494 1,033,267 7,483,206 1,153,999 7,483,206 Table 2: The average accuracies on the test set of the Web-reviews corpus on 5 different seeds, using monolingual and bilingual models, along with the improvement over the base model and the number of training examples in each language. Numbers in brackets indicate the min and max accuracy across seeds. instead of randomly initialized word embeddings. We perform three experiments: 1. using external word embeddings only for the words that are fed into the context-encoder. 2. using external word embeddings only for the lemmas of the features. 3. using external word embeddings for both. We use two sets of word embeddings: 5-window-bag-of-words-based and dependency-based, both trained by Levy and Goldberg (2014) on English Wikipedia.8 As shown in Table 3, both pre-trained embeddings improve the performance of all models in most cases. In all cases, the multilingual model outperforms the base model and the context model, both achieving similar results. Using external word embeddings for both the features and the context-encoder helps the most. The best result of 78.55 is achieved by the multilingual model, improving the result of the base model under the same conditions by 1.71 points. Model Context-encoder embeddings only Bow Deps Feature embeddings only Bow Deps Embeddings for both Bow Deps 73.34 (71.63-73.97) base 76.84 (76.32-77.26) +context 74.07 (72.10-75.15) 77.73 (77.14-78.43) 78.55 (77.37-79.37) +context(multilingual) 75.57 (73.51-77.84) Table 3: The average accuracies on the test set of the Web-reviews corpus with different pre-trained embeddings on 5 different seeds. Numbers in brackets indicate the min and max accuracy across seeds. Bow: 5-words window; Deps: dependency-based. 76.95 (75.85-77.96) 77.14 (76.79-78.08) 78.45 (77.49-79.48) 76.84 (76.32-77.26) 77.47 (75.85-78.55) 77.58 (77.14-78.66) 73.34 (71.63-73.97) 74.42 (73.62-75.03) 75.90 (75.03-76.55) 76.95 (75.85-77.96) 76.72 (75.85-77.96) 77.58 (77.02-78.08) 5.2 Evaluation on the SemEval corpus Adaptations to the SemEval corpus In the SemEval corpus each preposition has a different set of senses, and the natural approach is to learn a different model for each one. We call this the disjoint approach. However, we found this approach a bit wasteful in terms of exploiting the annotated data, and we propose a model that uses the information from all prepositions simultaneously (unified). In the unified approach, we create an MLP classifier for each preposition, but all of them share a single input- to-hidden transformation matrix and a single bias term. Formally, for a preposition p, we define its MLP as follows: M LPp(x) = softmax(Up(g(W x + b1)) + b2p) where W is the shared input-to-hidden transformation matrix, b1 is the shared bias term, and Up and b2p are preposition-specific hidden-to-output transformation matrix and bias term, respectively. This unified model is trained over the training examples of all prepositions together. The SemEval corpus sometimes provides multiple senses for a given preposition instance. In both the disjoint and the unified approaches we treat these cases by generalizing the cross entropy loss for multiple correct classes. In the common case, where each training example has a single correct class, the 8https://levyomer.wordpress.com/2014/04/25/dependency-based-word-embeddings/ cross entropy loss is defined as − log pi, where pi is the probability that the model assigns to the correct class. Here, instead of using − log pi, we use − log((cid:80) i∈C pi), where C is the set of correct classes. Results The model performs well also on the SemEval corpus, achieving an accuracy of 76.9. Note that we use the exact same parameters that were tuned on the dev set of the Web-reviews corpus, with no additional tuning on this corpus. As shown in Table 4, the unified model, which trains on all prepositions simultaneously, performs better than a separate model for each preposition (disjoint model), and achieves an improvement of 1.3 points when using the multilingual model. In addition, in both cases we get a significant improvement over the base model when using the pre-trained context-representation. In the unified model, adding the pre-trained context-representation improves the result by 2.1 points. As in the case of the Web-reviews corpus, we can see that this improvement does not stem from adding the context representation as is. Pre-training the representation is essential for achieving these improved results. Model base +context +context(multilingual) Disjoint 73.7 (73.3-74.1) 73.8 (73.6-74.0) 75.6 (75.4-75.8) Unified 74.8 (74.4-75.4) 75.4 (74.8-75.8) 76.9 (76.4-77.7) Table 4: The average accuracies on the test set of the SemEval corpus on 5 different seeds, with both the disjoint and the unified models. Numbers in brackets indicate the min and max accuracy across seeds. Similar to the results on the Web-reviews Corpus, when using external word embeddings both for the words that are fed into the context-encoder and for the features, we get an improvement in all models, with an average improvement of 3 points when using the 5-words-window based embeddings. The best result amongst the three models is of 79.6 and is achieved by the multilingual model, improving over the base model by 2.5 points. The results are shown in Table 5. Note that unlike previous experiments, adding external word embeddings improves the context model over the base model significantly, approaching the results of the multilingual model. For this reason, we also evaluated a model in which we concatenate both contexts: that of the context model (no pre- training), and that of the multilingual model (pre-trained on the multilingual data). In the case where both models achieve similar results, combining both contexts further improves the result, which indicates that they are complementary. The best result of 80.0 is achieved when using both contexts with the 5-window- bag-of-words-based embeddings. We also evaluated this combined model on the Web-reviews corpus, but got no improvement in most cases. This was predictable since in all experiments on that corpus we had a large difference between the results of the context model and of the multilingual model. The only case where we saw an improvement with both contexts was when using dependency-based embeddings for both the features and the context-encoder. The difference between the two datasets can be explained by the much larger size of the SemEval dataset, which allows the context encoder to learn from more data, even without pre-training on multilingual data. Model base +context +context(multilingual) +both contexts Bow 77.1 (76.9-77.2) 79.5 (78.8-79.9) 79.6 (79.3-79.9) 80.0 (79.8-80.2) Deps 76.6 (76.3-76.9) 78.5 (78.0-78.8) 79.3 (78.8-79.6) 79.2 (78.6-79.5) None 74.8 (74.4-75.4) 75.4 (74.8-75.8) 76.9 (76.4-77.7) 77.3 (77.2-77.5) Table 5: The average accuracies on the test set of the SemEval corpus on 5 different seeds, with the unified model, when using external word embeddings for both the context-encoder and the features. Numbers in brackets indicate the min and max accuracy across seeds. Bow: 5-words window; Deps: dependency-based; None: no external word embeddings. 5.3 Using Ensembles We create an ensemble by training 5 different models (each with a different random seed), and predict test instances using a majority vote over the models. The results are presented in Table 6. As expected, results in all models further improve when using the ensemble. Using the multilingual context helps also when using the ensemble. We see an improvements of 1.99 points on the web-reviews corpus, improving the result to 80.54. The performance on the SemEval corpus improves by 1.7 points, and reaches an accuracy of 81.7. These results are higher than those of the base model by 2.93 and 2.2 points, respectively. Model Web-reviews Corpus Average Ensemble base +context +context(multilingual) +both contexts 76.84 (76.32-77.26) 77.73 (77.14-78.43) 78.55 (77.37-79.37) 79.34 (78.43-80.19) 77.61 78.90 80.54 79.84 SemEval Corpus Average 77.1 (76.9-77.2) 79.5 (78.8-79.9) 79.6 (79.3-79.9) 80.0 (79.8-80.2) Ensemble 79.5 81.1 81.2 81.7 Table 6: The results on both datasets on 5 different seeds as reported in Tables 3 and 5 in comparison to the results using the ensemble. Numbers in brackets indicate the min and max accuracy across seeds. 5.4 Comparison to previous systems Table 7 compares our SemEval results with those of previous systems. The system of Ye and Baldwin (2007) got the highest result out of the three participating systems in the SemEval 2007 shared task. They extracted features such as POS tags and WordNet-based features, and also high level features (e.g semantic role tags), using a word window of up to seven words, in a Maximum Entropy classifier. Tratz and Hovy (2009) got a higher result with similar features by using a set of positions that are syntactically related to the preposition instead of a fixed window size. The best performing systems are of Hovy et al (2010) and of Srikumar and Roth (2013b). Both systems rely on vast and thoroughly-engineered feature sets, including many WordNet based features. Hovy et al (2010) explored different word choices (i.e, a fixed window vs. syntactically related words) and different methods of extracting them, while Srikumar and Roth (2013b) improved performance by jointly predicting preposition senses and relations. In contrast, our models do not include any WordNet based features, making them applicable also for languages lacking such resources. Our models achieve competitive results, outperforming most previ- ous systems, despite using relatively few features and performing hyper-parameter tuning only on the different domain Web-reviews corpus. Model base +context +context(multilingual) +context(multilingual) + embeddings +both contexts + embeddings +both contexts + embeddings + ensemble Hovy et al (2010) – using WordNet features Srikumar and Roth (2013b) – using WordNet features Tratz and Hovy (2009) – using WordNet features MELB-YB (Ye and Baldwin, 2007) – using WordNet features KU (Yuret, 2007) IRST-BP (Popescu et al., 2007) Most Frequent Sense Accuracy 74.8 75.4 76.9 79.6 80.0 81.7 84.8 84.78 76.4 69.3 54.7 49.6 39.6 Table 7: The accuracies on the test set of the SemEval corpus, in comparison to previous systems. 5.5 Error Analysis Figure 2 depicts the percentage of correct assignments of the base model, in comparison to the multi- lingual model, per sense and per preposition (only the 10 most common prepositions are shown). Both models use pre-trained word embeddings and ensembles. Clearly, there is a systematic improvement across most prepositions and senses. 6 Related work Transfer learning and representation learning Transfer learning is a methodology that aims to re- duce annotation efforts by first learning a model on a different domain or a closely related task, and then transfer the gained knowledge to the main task (Pan and Yang, 2010). Multi-task learning (MTL) is an approach of transfer learning in which several tasks are trained in parallel while using a shared represen- tation. The different tasks can benefit from each other through this representation (Caruana, 1997). In (a) prepositions (b) senses Figure 2: Assignments on the dev set of the Web-reviews corpus per preposition (a) and per sense (b). Left bars stand for the base model, right bars stand for the multilingual model. In blue are correct assignments, and in red incorrect ones. this work we use MTL to improve preposition-sense disambiguation, by using an auxiliary multilingual task – predicting translations of prepositions. A simple method for sharing information in transfer learning as well as in MTL, is using represen- tations that are shared between related tasks. Representation learning (Bengio et al., 2013) is a closely related field that aims to establish techniques for learning robust and expressive data representations. A well-known effort in this field is that of learning word embeddings for use in a wide range of NLP tasks (Mikolov et al., 2013; Al-Rfou et al., 2013; Levy and Goldberg, 2014; Pennington et al., 2014). While those representations are highly effective in many cases, other scenarios require representations of a full sentence, or of a context around a target word, rather than representations of single words. Contexts are often represented by some manipulation over the embeddings of their words. Such representations have been successfully used for tasks such as context-sensitive similarity (Huang et al., 2012), word sense dis- ambiguation (Chen et al., 2014) and lexical substitution (Melamud et al., 2015). An alternative approach for context representation is encoding a context of arbitrary length into a single vector using LSTMs. This approach has been proven to outperform the previous attempts in a variety of tasks such as Seman- tic Role Labeling (Zhou and Xu, 2015), Natural Language Inference (Bowman et al., 2015) and Sentence Completion (Melamud et al., 2016). We follow the LSTM-based approach for context representation. Learning from multilingual data The use of multilingual data for improving monolingual tasks has a long tradition in NLP, and has been used for target word selection (Dagan et al., 1991); word sense disambiguation (Diab and Resnik, 2002); and syntactic parsing and named entity recognition (Burkett et al., 2010), to name a few examples. A dominant approach for exploiting multilingual data is that of cross- lingual projection. This approach assumes a good model exists in one language, and uses annotations in that language in order to constrain possible annotations in another. Projections were successfully used for dependency grammar induction (Ganchev et al., 2009), and for transferring tools such as morphological analyzers and part-of-speech taggers from English to languages with fewer resources (Yarowsky et al., 2001; Yarowsky and Ngai, 2001). A different approach is applying multilingual constraints on existing monolingual models, as done for parsing (Smith and Smith, 2004; Burkett and Klein, 2008) and for morphological segmentation (Snyder and Barzilay, 2008). Of much relevance to this work are also previous attempts to improve monolingual representations using bilingual data (Faruqui and Dyer, 2014). Previous works focus on creating sense-specific word embeddings instead of the common word-form specific embeddings (Ettinger et al., 2016; Suster et al., 2016), and also on representing words using their context (Kawakami and Dyer, 2015; Hermann and Blunsom, 2013). While we rely on the assumption most of these works have in common, according to which translations may serve as a strong signal for different senses of words, the novelty of our work is in focusing on prepositions rather than content words, and in jointly representing a context for both a multilingual and a monolingual tasks, which results in an improvement of the monolingual model. 7 Conclusions and Future Work We show that multilingual data can be used to improve the accuracy of preposition-sense disambiguation. The key idea is to train a context-encoder on vast amounts of parallel data, and by that, to obtain a context representation that is predictive of the sense. We show an improvement of the accuracy in all experiments upon using this representation. Our model achieves an accuracy of 80.54 on the Web-reviews corpus, and an accuracy of 81.7 on the SemEval corpus, with significant improvements over models that do not use the multilingual signals. Our result on the SemEval corpus outperforms most previous works, without using any manually curated lexicons. Acknowledgements The work is supported by The Israeli Science Foundation (grant number 1555/15). References [Al-Rfou et al.2013] Rami Al-Rfou, Bryan Perozzi, and Steven Skiena. 2013. Polyglot: Distributed word repre- sentations for multilingual nlp. In Proceedings of CoNLL 2013. [Baldwin et al.2009] Timothy Baldwin, Valia Kordoni, and Aline Villavicencio. 2009. Prepositions in applications: A survey and introduction to the special issue. Computational Linguistics, 35(2):119–149. [Bengio et al.2013] Yoshua Bengio, Aaron Courville, and Pascal Vincent. 2013. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828. [Bowman et al.2015] Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. 2015. A large annotated corpus for learning natural language inference. In Proceedings of EMNLP. [Burkett and Klein2008] David Burkett and Dan Klein. 2008. Two languages are better than one (for syntactic parsing). In Proceedings of EMNLP, pages 877–886. [Burkett et al.2010] David Burkett, Slav Petrov, John Blitzer, and Dan Klein. 2010. Learning better monolingual models with unannotated bilingual text. In Proceedings of CoNLL, pages 46–54. [Caruana1997] Rich Caruana. 1997. Multitask learning. Machine Learning, 28:41–75. [Chen et al.2014] Xinxiong Chen, Zhiyuan Liu, and Maosong Sun. 2014. A unified model for word sense repre- sentation and disambiguation. In Proceedings of EMNLP, pages 1025–1035. [Dagan et al.1991] Ido Dagan, Alon Itai, and Ulrike Schwall. 1991. Two languages are more informative than one. In Proceedings of ACL, pages 130–137. [Dahlmeier et al.2009] Daniel Dahlmeier, Hwee Tou Ng, and Tanja Schultz. 2009. Joint learning of preposition senses and semantic roles of prepositional phrases. In Proceedings of EMNLP, pages 450–458. [Diab and Resnik2002] Mona Diab and Philip Resnik. 2002. An unsupervised method for word sense tagging using parallel corpora. In Proceedings of ACL, pages 255–262. [Dyer et al.2010] Chris Dyer, Adam Lopez, Juri Ganitkevitch, Johnathan Weese, Ferhan Ture, Phil Blunsom, Hen- dra Setiawan, Vladimir Eidelman, and Philip Resnik. 2010. cdec: A decoder, alignment, and learning frame- work for finite-state and context-free translation models. In Proceedings of ACL. [Elman1990] Jeffrey L. Elman. 1990. Finding structure in time. Cognitive science, 14(2):179–211. [Ettinger et al.2016] Allyson Ettinger, Philip Resnik, and Marine Carpuat. 2016. Retrofitting sense-specific word vectors using parallel text. In Proceedings of NAACL-HLT, pages 1378–1383. [Faruqui and Dyer2014] Manaal Faruqui and Chris Dyer. 2014. using multilingual correlation. In Proceedings of EACL. Improving vector space word representations [Ganchev et al.2009] Kuzman Ganchev, Jennifer Gillenwater, and Ben Taskar. 2009. Dependency grammar induc- tion via bitext projection constraints. In Proceedings of ACL-IJCNLP, pages 369–377. [Hermann and Blunsom2013] Karl Moritz Hermann and Phil Blunsom. 2013. Multilingual distributed representa- tions without word alignment. In Proceedings of ICLR. [Hochreiter and Schmidhuber1997] Sepp Hochreiter and Jurgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735–1780. [Hovy et al.2010] Dirk Hovy, Stephen Tratz, and Eduard Hovy. 2010. What's in a preposition? dimensions of sense disambiguation for an interesting word class. In Proceedings of COLING. [Huang et al.2012] Eric H Huang, Richard Socher, Christopher D Manning, and Andrew Y Ng. 2012. Improving word representations via global context and multiple word prototypes. In Proceedings of ACL, pages 873–882. [Karpathy et al.2015] Andrej Karpathy, Justin Johnson, and Fei-Fei Li. 2015. Visualizing and understanding re- current networks. arXiv:1506.02078. [Kawakami and Dyer2015] Kazuya Kawakami and Chris Dyer. 2015. Learning to represent words in context with multilingual supervision. arXiv:1511.04623. [Koehn2005] Philipp Koehn. 2005. Europarl: A parallel corpus for statistical machine translation. In Proceedings of MT summit, volume 5, pages 79–86. [Levy and Goldberg2014] Omer Levy and Yoav Goldberg. 2014. Dependency-based word embeddings. In Pro- ceedings of ACL. [Litkowski and Hargraves2005] Ken Litkowski and Orin Hargraves. 2005. The preposition project. In Proceed- ings of the Second ACL-SIGSEM Workshop on the Linguistic Dimensions of Prepositions and their Use in Computational Linguistics Formalisms and Applications, pages 171–179. [Litkowski and Hargraves2007] Ken Litkowski and Orin Hargraves. 2007. Semeval-2007 task 06: Word-sense disambiguation of prepositions. In Proceedings of the 4th International Workshop on Semantic Evaluations, pages 24–29. [Melamud et al.2015] Oren Melamud, Omer Levy, and Ido Dagan. 2015. A simple word embedding model for In Proceedings of the 1st Workshop on Vector Space Modeling for Natural Language lexical substitution. Processing, pages 1–7. [Melamud et al.2016] Oren Melamud, Jacob Goldberger, and Ido Dagan. 2016. context2vec: Learning generic context embedding with bidirectional lstm. In Proceedings of CoNLL. [Mikolov et al.2013] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. 2013. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems. [Miller1995] George A Miller. 1995. Wordnet: a lexical database for English. Communications of the ACM, 38(11):39–41. [Pan and Yang2010] Sinno Jialin Pan and Qiang Yang. 2010. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345–1359. [Pennington et al.2014] Jeffrey Pennington, Richard Socher, and Christopher D Manning. 2014. Glove: Global vectors for word representation. In Proceedings of EMNLP 2014. [Popescu et al.2007] Octavian Popescu, Sara Tonelli, and Emanuele Pianta. 2007. IRST-BP: Preposition disam- biguation based on chain clarifying relationships contexts. In Proceedings of the 4th International Workshop on Semantic Evaluations. [Resnik and Smith2003] Philip Resnik and Noah A Smith. 2003. The web as a parallel corpus. Computational Linguistics, 29(3):349–380. [Schneider et al.2015] Nathan Schneider, Vivek Srikumar, Jena D. Hwang, and Martha Palmer. 2015. A hierarchy In Proceedings of the 9th Linguistic Annotation Workshop, pages with, of, and for preposition supersenses. 112–123. [Schneider et al.2016] Nathan Schneider, Jena D. Hwang, Vivek Srikumar, Meredith Green, Abhijit Suresh, In Pro- Kathryn Conger, Tim O'Gorman, and Martha Palmer. 2016. A corpus of preposition supersenses. ceedings of the 10th Linguistic Annotation Workshop. [Smith and Smith2004] David A Smith and Noah A Smith. 2004. Bilingual parsing with factored estimation: Using english to parse korean. In Proceedings of EMNLP. [Snyder and Barzilay2008] Benjamin Snyder and Regina Barzilay. 2008. Cross-lingual propagation for morpho- logical analysis. In Proceedings of AAAI. [Srikumar and Roth2013a] Vivek Srikumar and Dan Roth. arXiv:1305.5785. 2013a. An inventory of preposition relations. [Srikumar and Roth2013b] Vivek Srikumar and Dan Roth. 2013b. Modeling semantic relations expressed by prepositions. Transactions of the Association for Computational Linguistics, 1:231–242. [Steinberger et al.2006] Ralf Steinberger, Bruno Pouliquen, Anna Widiger, Camelia Ignat, Tomaz Erjavec, Dan Tufis, and D´aniel Varga. 2006. The jrc-acquis: A multilingual aligned parallel corpus with 20+ languages. In Proceedings of LREC. [Suster et al.2016] Simon Suster, Ivan Titov, and Gertjan van Noord. 2016. Bilingual learning of multi-sense embeddings with discrete autoencoders. arXiv:1603.09128. [Tratz and Hovy2009] Stephen Tratz and Dirk Hovy. 2009. Disambiguation of preposition sense using linguisti- cally motivated features. In Proceedings of NAACL-HLT Student Research Workshop and Doctoral Consortium, pages 96–100. [Tratz2011] Stephen Tratz. 2011. Semantically-enriched parsing for natural language understanding. Ph.D. thesis, University of Southern California. [Yarowsky and Ngai2001] David Yarowsky and Grace Ngai. 2001. Inducing multilingual pos taggers and np bracketers via robust projection across aligned corpora. In Proceedings of NAACL. [Yarowsky et al.2001] David Yarowsky, Grace Ngai, and Richard Wicentowski. 2001. Inducing multilingual text analysis tools via robust projection across aligned corpora. In Proceedings of HLT. [Ye and Baldwin2007] Patrick Ye and Timothy Baldwin. 2007. MELB-YB: Preposition sense disambiguation using rich semantic features. In Proceedings of the 4th International Workshop on Semantic Evaluations, pages 241–244. [Yuret2007] Deniz Yuret. 2007. KU: Word sense disambiguation by substitution. International Workshop on Semantic Evaluations, pages 207–213. In Proceedings of the 4th [Zhou and Xu2015] Jie Zhou and Wei Xu. 2015. End-to-end learning of semantic role labeling using recurrent neural networks. In Proceedings of ACL.
1909.02265
1
1909
2019-09-05T08:47:49
Towards Task-Oriented Dialogue in Mixed Domains
[ "cs.CL" ]
This work investigates the task-oriented dialogue problem in mixed-domain settings. We study the effect of alternating between different domains in sequences of dialogue turns using two related state-of-the-art dialogue systems. We first show that a specialized state tracking component in multiple domains plays an important role and gives better results than an end-to-end task-oriented dialogue system. We then propose a hybrid system which is able to improve the belief tracking accuracy of about 28% of average absolute point on a standard multi-domain dialogue dataset. These experimental results give some useful insights for improving our commercial chatbot platform FPT.AI, which is currently deployed for many practical chatbot applications.
cs.CL
cs
Towards Task-Oriented Dialogue in Mixed Domains Tho Luong Chi FPT Technology Research Institute FPT University, Hanoi, Vietnam [email protected] Phuong Le-Hong FPT Technology Research Institute Vietnam National University, Hanoi, Vietnam [email protected] 9 1 0 2 p e S 5 ] L C . s c [ 1 v 5 6 2 2 0 . 9 0 9 1 : v i X r a Abstract -- This work investigates the task-oriented dialogue problem in mixed-domain settings. We study the effect of alter- nating between different domains in sequences of dialogue turns using two related state-of-the-art dialogue systems. We first show that a specialized state tracking component in multiple domains plays an important role and gives better results than an end- to-end task-oriented dialogue system. We then propose a hybrid system which is able to improve the belief tracking accuracy of about 28% of average absolute point on a standard multi- domain dialogue dataset. These experimental results give some useful insights for improving our commercial chatbot platform FPT.AI, which is currently deployed for many practical chatbot applications. Index Terms -- task-oriented dialogue; multi-domain belief tracking; mixed-domain belief tracking; natural language pro- cessing I. INTRODUCTION In this work, we investigate the problem of task-oriented dialogue in mixed-domain settings. Our work is related to two lines of research in Spoken Dialogue System (SDS), namely task-oriented dialogue system and multi-domain dialogue sys- tem. We briefly review the recent literature related to these topics as follows. Task-oriented dialogue systems are computer programs which can assist users to complete tasks in specific domains by understanding user requests and generating appropriate re- sponses within several dialogue turns. Such systems are useful in domain-specific chatbot applications which help users find a restaurant or book a hotel. Conventional approach for building a task-oriented dialogue system is concerned with building a quite complex pipeline of many connected components. These components are usually independently developed which include at language understanding module, a dialogue state tracking module, a dialogue policy learning module, and a answer generation module. Since these systems components are usually trained independently, their optimization targets may not fully align with the overall system evaluation criteria [1]. In addition, such a pipeline system often suffers from error propagation where error made by upstream modules are accumuated and got amplified to the downstream ones. least four crucial modules: a natural To overcome the above limitations of pipeline task-oriented dialogue systems, much research has focused recently in designing end-to-end learning systems with neural network- based models. One key property of task-oriented dialogue model is that it is required to reason and plan over multiple di- alogue turns by aggregating useful information during the con- versation. Therefore, sequence-to-sequence models such as the encoder-decoder based neural network models are proven to be suitable for both task-oriented and non-task-oriented systems. Serban et al. proposed to build end-to-end dialogue systems using generative hierarchical recurrent encoder-decoder neural network [2]. Li et al. presented persona-based models which incorporate background information and speaking style of in- terlocutors into LSTM-based seq2seq network so as to improve the modeling of human-like behavior [3]. Wen et al. designed an end-to-end trainable neural dialogue model with modularly connected components [4]. Bordes et al. [5] proposed a task- oriented dialogue model using end-to-end memory networks. At the same time, many works explored different kinds of networks to model the dialogue state, such as copy-augmented networks [6], gated memory networks [7], query-regression networks [8]. These systems do not perform slot-filling or user goal tracking; they rank and select a response from a set of response candidates which are conditioned on the dialogue history. One of the significant effort in developing end-to-end task- oriented systems is the recent Sequicity framework [9]. This framework also relies on the sequence-to-sequence model and can be optimized with supervised or reinforcement learning. The Sequicity framework introduces the concept of belief span (bspan), which is a text span that tracks the dialogue states at each turn. In this framework, the task-oriented dialogue problem is decomposed into two stages: bspan generation and response generation. This framework has been shown to sig- nificantly outperform state-of-the-art pipeline-based methods. The second line of work in SDS that is related to this work is concerned with multi-domain dialogue systems. As presented above, one of the key components of a dialogue system is dialogue state tracking, or belief tracking, which maintains the states of conversation. A state is usually composed of user's goals, evidences and information which is accumulated along the sequence of dialogue turns. While the user's goal and evidences are extracted from user's utterances, the useful information is usually aggregated from external resources such as knowledge bases or dialogue ontologies. Such knowledge bases contain slot type and slot value entries in one or several predefined domains. Most approaches have difficulty scaling up with multiple domains due to the dependency of their model parameters on the underlying knowledge bases. Recently, Ramadan et al. [10] has introduced a novel approach which Fig. 1. Sequicity architecture. utilizes semantic similarity between dialogue utterances and knowledge base terms, allowing the information to be shared across domains. This method has been shown not only to scale well to multi-domain dialogues, but also outperform existing state-of-the-art models in single-domain tracking tasks. The problem that we are interested in this work is task- oriented dialogue in mixed-domain settings. This is different from the multi-domain dialogue problem above in several aspects, as follows: • First, we investigate the phenomenon of alternating be- tween different dialogue domains in subsequent dialogue turns, where each turn is defined as a pair of user question and machine answer. That is, the domains are mixed between turns. For example, in the first turn, the user requests some information of a restaurant; then in the second turn, he switches to the a different domain, for example, he asks about the weather at a specific location. In a next turn, he would either switch to a new domain or come back to ask about some other property of the suggested restaurant. This is a realistic scenario which usually happens in practical chatbot applications in our observations. We prefer calling this problem mixed- domain dialogue rather than multiple-domain dialogue. • Second, we study the effect of the mixed-domain setting in the context of multi-domain dialogue approaches to see how they perform in different experimental scenarios. The main findings of this work include: • A specialized state tracking component in multiple do- mains still plays an important role and gives better results than a state-of-the-art end-to-end task-oriented dialogue system. • A combination of specialized state tracking system and an end-to-end task-oriented dialogue system is beneficial in mix-domain dialogue systems. Our hybrid system is able to improve the belief tracking accuracy of about 28% of average absolute point on a standard multi-domain dialogue dataset. • These experimental results give some useful insights on data preparation and acquisition in the development of the chatbot platform FPT.AI1, which is currently deployed for many practical chatbot applications. The remainder of this paper is structured as follows. First, Section II discusses briefly the two methods in building dialogue systems that our method relies on. Next, Section III presents experimental settings and results. Finally, Section IV concludes the paper and gives some directions for future work. II. METHODOLOGY In this section, we present briefly two methods that we use in our experiments which have been mentioned in the previous section. The first method is the Sequicity framework and the second one is the state-of-the-art multi-domain dialogue state tracking approach. A. Sequicity Figure 1 shows the architecture of the Sequicity framework as described in [9]. In essence, in each turn, the Sequicity model first takes a bspan (B1) and a response (R1) which are determined in the previous step, and the current human question (U2) to generate the current bspan. This bspan is then used together with a knowledge base to generate the corresponding machine answer (R2), as shown in the right part of Figure 1. The left part of that figure shows an example dialogue in a mixed-domain setting (which will be explained in Section III). 1http://fpt.ai/ Fig. 2. Multi-domain belief tracking with knowledge sharing. B. Multi-domain Dialogue State Tracking Figure 2 shows the architecture of the multi-domain belief tracking with knowledge sharing as described in [10]. This is the state-of-the-art belief tracker for multi-domain dialogue. This system encodes system responses with 3 bidirectional LSTM network and encodes user utterances with 3+1 bidirec- tional LSTM network. There are in total 7 independent LSTMs. For tracking domain, slot and value, it uses 3 corresponding LSTMs, either for system response or user utterance. There is one special LSTM to track the user affirmation. The semantic similarity between the utterances and ontology terms are learned and shared between domains through their embeddings in the same semantic space. III. EXPERIMENTS In this section, we present experimental settings, different then scenarios and results. We first present implementation settings, and finally obtained results. the datasets, A. Datasets We use the publicly available dataset KVRET [6] in our is created by the Wizard-of-Oz experiments. This dataset method [11] on Amazon Mechanical Turk platform. This dataset includes dialogues in 3 domains: calendar, weather, navigation (POI) which is suitable for our mix-domain dia- logue experiments. There are 2,425 dialogues for training, 302 for validation and 302 for testing, as shown in the upper half of Table I. In this original dataset, each dialogue is of a single domain where all of its turns are on that domain. Each turn is composed of a sentence pair, one sentence is a user utterance, the other sentence is the corresponding machine response. A dialogue is a sequence of turns. To create mix-domain dialogues for our experiments, we make some changes in this dataset as follows: • We keep the dialogues in the calendar domain as they are. • We take a half of dialogues in the weather domain and a half of dialogues in the POI domain and mix their turns together, resulting in a dataset of mixed weather- POI dialogues. In this mixed-domain dialogue, there is a turn in the weather domain, followed by a turn in POI domain or vice versa. We call this dataset the sequential turn dataset. Since the start turn of a dialogue has a special role in triggering the learning systems, we decide to create another and different mixed-domain dataset with the following mixing method: • The first turn and the last turn of each dialogue are kept as in their original. • The internal turns are mixed randomly. We call this dataset the random turn dataset. Some statistics of these mixed-domain datasets are shown in the lower half of the Table I. B. Experimental Settings For the task-oriented Sequicity model, we keep the best parameter settings as reported in the original framework, on the same KVRET dataset [9]. In particular, the hidden size of GRU unit is set to 50; the learning rate of Adam optimizer is 0.003. In addition to the original GRU unit, we also re-run this framework with simple RNN unit to compare the performance of different recurrent network types. The Sequicity tool is freely available for download.2 2https://github.com/WING-NUS/sequicity SOME STATISTICS OF THE DATASETS USED IN OUR EXPERIMENTS. THE ORIGINAL KVRET DATASET IS SHOWN IN THE UPPER HALF OF THE TABLE. THE MIXED DATASET IS SHOWN IN THE LOWER HALF OF THE TABLE. TABLE I Dataset Dialogues Domains Dataset Domains Train Test Dev. KVRET Train: 2,425 ; Test: 302 ; Dev.: 302 calendar weather POI MIXED DOMAINS calendar weather 828 102 102 398 50 50 POI 400 50 50 Mixed weather -- POI 400 50 50 For the multi-domain belief tracker model, we set the hidden size of LSTM units to 50 as in the original model; word embedding size is 300 and number of training epochs is 100. The corresponding tool is also freely available for download.3 about 75.62% of Success F1 in comparison to about 81.1% (as reported in the Sequicity paper, not shown in our table). Appendix A shows some example dialogues generated auto- matically by our implemented system. C. Results Our experimental results are shown in Table II. The first half of the table contains results for task-oriented dialogue with the Sequicity framework with two scenarios for training data preparation. For each experiment, we run our models for 3 times and their scores are averaged as the final score. The mixed training scenario performs the mixing of both the training data, development data and the test data as described in the previous subsection. The non-mixed training scenario performs the mixing only on the development and test data, keeps the training data unmixed as in the original KVRET dataset. As in the Sequicity framework, we report entity match rate, BLEU score and Success F1 score. Entity match rate evaluates task completion, it determines if a system can generate all correct constraints to search the indicated entities of the user. BLEU score evaluates the language quality of generated responses. Success F1 balances the recall and precision rates of slot answers. For further details on these metrics, please refer to [9]. the GRU unit In the first series of experiments, we evaluate the Sequicity framework on different mixing scenarios and different recur- rent units (GRU or RNN), on two mixing methods (sequential turn or random turn), as described previously. We see that when the training data is kept unmixed, the match rates are better than those of the mixed training data. It is interesting to note that is much more sensitive with mixed data than the simple RNN unit with the corresponding absolute point drop of about 10%, compared to about 3.5%. However, the entity match rate is less important than the Success F1 score, where the GRU unit outperforms RNN in both sequential turn and random turn by a large margin. It is logical that if the test data are mixed but the training data are unmixed, we get lower scores than when both the training data and test data are mixed. The GRU unit is also better than the RNN unit on response generation in terms of BLEU scores. We also see that the task-oriented dialogue system has difficulty running on mixed-domain dataset; it achieves only 3https://github.com/osmanio2/multi-domain-belief-tracking In the second series of experiments, we evaluate the belief tracking components of two systems, the specialized multi- domain belief tracker and the Sequicity bspan component. As shown in the lower half of the Table II, Sequicity capability of belief tracking is much worse than that of the multi-domain belief tracker. The slot accuracy gap between the tools is about 21.6%, the value accuracy gap is about 34.4%; that is a large average gap of 28% of accuracy. This result suggests a future work on combining a specialized belief tracking module with an end-to-end task-oriented dialogue system to improve further the performance of the overall dialogue system. D. Error Analysis In this subsection, we present an example of erroneous mixed dialogue with multple turns. Table III shows a dialogue in the test set where wrong generated responses of the Sequic- ity system are marked in bold font. In the first turn, the system predicts incorrectly the bspan, thus generates wrong slot values (heavy traffic and Pizza Hut). The word Pizza Hut is an arbitrary value selected by the system when it cannot capture the correct value home in the bspan. In the second turn, the machine is not able to capture the value this_week. This failure does not manifest immediately at this turn but it is accumulated to make a wrong answer at the third turn (monday instead of this_week). The third turn is of domain weather and the fourth turn is switched to domain POI. The bspan value cleveland is retained through cross domain, resulting in an error in the fourth turn, where cleveland is shown instead of home. This example demonstrates a weakness of the system when being trained on a mixed-domain dataset. In the fifth turn, since the system does not recognize the value fastest in the bspan, it generates a random and wrong value moderate traffic. Note that the generated answer of the sixth turn is correct despite of the wrong predicted bspan; however, it is likely that if the dialogue continues, this wrong bspan may re- sult in more answer mistakes. In such situations, multi-domain belief tracker usually performs better at bspan prediction. OUR EXPERIMENTAL RESULTS. MATCH. AND SUCC. F1 ARE ENTITY MATCH RATE AND SUCCESS F1. THE UPPER HALF OF THE TABLE SHOWS RESULTS OF TASK-ORIENTED DIALOGUE WITH THE SEQUICITY FRAMEWORK. THE LOWER HALF OF THE TABLE SHOWS RESULTS OF MULTI-DOMAIN BELIEF TABLE II TRACKER. Case 1 - sequential turn Match. Sequicity mixed training non-mixed training GRU RNN GRU RNN Belief tracker Multi-domain Sequicity 0.6367 0.7354 0.7399 0.7706 Domain - accuracy 0.8253 BLEU 0.1930 0.1847 0.1709 0.1453 Slot - accuracy 0.9329 0.7171 Case 2 - random turn BLEU 0.1862 0.1729 0.1820 0.1580 Succ. F1 0.7562 0.7105 0.7173 0.6633 Succ. F1 Match. 0.7358 0.6860 0.6591 0.7129 0.7488 0.7055 0.6156 0.6995 Value - accuracy 0.9081 0.5644 A MIXED DIALOGUE EXAMPLE IN THE TEST SET WITH ERRONEOUS GENERATED RESPONSES. THE LAST TWO COLUMNS SHOW RESPECTIVELY THE SYSTEM'S GENERATED BSPAN AND THE GOLD BSPAN OR BELIEF TRACKER. TABLE III Turn 1.Human 1.Machine 2.Human 2.Machine 3.Human 3.Machine 4.Human 4.Machine 5.Human 5.Machine 6.Human 6.Machine Dialogue car please send me the fastest route to go back home there is heavy traffic on the way to Pizza Hut. what is the weather like this week what city are you interested in ? Cleveland . it will be clear sky on monday what is the address ? cleveland is located at 5672 barringer street please send me the fastest route on screen and let 's go there , thank you ! there is moderate traffic on our way but i sent the route to your screen , drive carefully ! thank . you are welcome . Domain POI POI Weather info Weather info Weather info Weather info POI POI POI POI Generated bspan EOS_Z1 Gold bspan home fastest EOS_Z1 EOS_Z1 this_week EOS_Z1 cleveland EOS_Z1 cleveland EOS_Z1 cleveland EOS_Z1 home fastest EOS_Z1 cleveland EOS_Z1 home fastest EOS_Z1 cleveland EOS_Z1 EOS_Z1 [4] Tsung-Hsien Wen, David Vandyke, Nikola Mrksic, Milica Gasic, Lina M. Rojas-Barahona, Pei-Hao Su, Stefan Ultes, and Steve Young. A network-based end-to-end trainable task-oriented dialogue system. In Proceedings of EACL, 2017. [5] Antoine Bordes, Y-Lan Boureau, and Jason Weston. Learning end-to- end goal-oriented dialogue. In Proceedings of ICLR, 2017. [6] Mihail Eric and Christopher D. Manning. A copy-augmented sequence- to-sequence architecture gives good performance on task-oriented dia- logue. In Proceedings of EACL, 2017. [7] Fei Liu and Julien Perez. Gated end-to-end memory networks. In Proceedings of EACL, 2017. [8] Min Joon Seo, Hannaneh Hajishirzi, and Ali Farhadi. Query-regression networks for machine comprehension. In Preprint ArXiv, 2016. [9] Wenqiang Lei, Xisen Jin, Zhaochun Ren, Xiangnan He, Min-Yen Kan, and Dawei Yin. Sequicity: Simplifying task-oriented dialogue systems with single sequence-to-sequence architectures. In Proceedings of ACL, 2018. [10] Milica Gasic Osman Ramadan, Paweł Budzianowski. Large-scale multi- domain belief tracking with knowledge sharing. In Proceedings of ACL, 2018. [11] John F Kelley. iterative design methodology for user-friendly natural language office information applications. ACM Transactions on Infor- mation Systems, 2(1):26 -- 41, 1984. IV. CONCLUSION We have presented the problem of mixed-domain task- oriented dialogue and its empirical results on two datasets. We employ two state-of-the-art, publicly available tools, one is the Sequicity framework for task-oriented dialogue, and another is the multi-domain belief tracking system. The belief tracking capability of the specialized system is much better than that of the end-to-end system. We also show the difficulty of task-oriented dialogue systems on mixed-domain datasets through two series of experiments. These results give some useful insights in combining the approaches to improve the performance of a commercial chatbot platform which is under active development in our company. We plan to extend this current research and integrate its fruitful results into a future version of the platform. REFERENCES [1] Bing Liu, Gokhan Tur, Dilek Hakkani-Tur, Pararth Shah, and Larry Heck. Dialogue learning with human teaching and feedback in end-to- end trainable task-oriented dialogue systems. In Proceedings of NAACL, 2018. [2] Iulian Serban, Alessandro Sordoni, Yoshua Bengio, Aaron C. Courville, and Joelle Pineau. Building end-to-end dialogue systems using genera- tive hierarchical neural network models. In Proceedings of AAAI, 2016. [3] Jiwei Li, Michel Galley, Chris Brockett, Georgios P. Spithourakis, Jianfeng Gao, and Bill Dolan. A persona-based neural conversation model. In Proceedings of ACL, 2016. APPENDIX The following is three example dialogues generated by our system. The first dialogue is in single-domain. Dialogue 1 Domain Calendar Calendar Turn Human What time is my next din- ner event and who will be attending? your dinner is on MONDAY at 5 PM . That will do, thanks. you are welcome Human Machine Machine The next two dialogues are in mixed-domains. Turn Human Dialogue 2 ad- Please give me dress and directions to home within 5 miles of here, avoiding all heavy traffic. the Domain POI Machine HOME is located at 5671 POI Human BARRINGER STREET what is the forecast for the next 7 days? weather info Machine what city are you interested weather info Human Machine Human Machine Turn Human Machine Human in ? Cleveland, will it be windy? weather info it will not be windy in weather info Cleveland this week . Thank you. you're welcome. Dialogue 3 are there any chinese restau- rants nearby? the closest is TAI PAN restaurant , and TAI PAN is 5 miles away with NO TRAFFIC what's the weather like to- day? Domain POI POI weather info Machine what city are you wanting to weather info Human know the weather for ? for please?weather info Newyork city Machine Today is CLEAR SKIES, weather info Human Machine Human Machine and WARM. ok, good, set the direction to there the address is 830 Almanor Ln , i sent it on your screen ok thanks you're welcome ! POI POI
1907.11983
1
1907
2019-07-27T21:51:52
A Hybrid Neural Network Model for Commonsense Reasoning
[ "cs.CL" ]
This paper proposes a hybrid neural network (HNN) model for commonsense reasoning. An HNN consists of two component models, a masked language model and a semantic similarity model, which share a BERT-based contextual encoder but use different model-specific input and output layers. HNN obtains new state-of-the-art results on three classic commonsense reasoning tasks, pushing the WNLI benchmark to 89%, the Winograd Schema Challenge (WSC) benchmark to 75.1%, and the PDP60 benchmark to 90.0%. An ablation study shows that language models and semantic similarity models are complementary approaches to commonsense reasoning, and HNN effectively combines the strengths of both. The code and pre-trained models will be publicly available at https://github.com/namisan/mt-dnn.
cs.CL
cs
A Hybrid Neural Network Model for Commonsense Reasoning Pengcheng He1, Xiaodong Liu2, Weizhu Chen1, Jianfeng Gao2 1 Microsoft Dynamics 365 AI 2 Microsoft Research {penhe,xiaodl,wzchen,jfgao}@microsoft.com 9 1 0 2 l u J 7 2 ] L C . s c [ 1 v 3 8 9 1 1 . 7 0 9 1 : v i X r a Abstract This paper proposes a hybrid neural network (HNN) model for commonsense reasoning. An HNN consists of two component mod- els, a masked language model and a seman- tic similarity model, which share a BERT- based contextual encoder but use different model-specific input and output layers. HNN obtains new state-of-the-art results on three classic commonsense reasoning tasks, push- ing the WNLI benchmark to 89%, the Wino- grad Schema Challenge (WSC) benchmark to 75.1%, and the PDP60 benchmark to 90.0%. An ablation study shows that language mod- els and semantic similarity models are com- plementary approaches to commonsense rea- soning, and HNN effectively combines the strengths of both. The code and pre-trained models will be publicly available at https: //github.com/namisan/mt-dnn. 1. The city councilmen refused the demonstra- tors a permit because they feared violence. Who feared violence? A. The city councilmen B. The demon- strators 2. The city councilmen refused the demonstra- tors a permit because they advocated vio- lence. Who advocated violence? A. The city councilmen B. The demon- strators 3. The trophy doesn't fit in the brown suitcase because it is too big. What is too big? A. The trophy B. The suitcase 4. The trophy doesn't fit in the brown suitcase because it is too small. What is too small? A. The trophy B. The suitcase 1 Introduction Commonsense reasoning is fundamental to natural language understanding (NLU). As shown in the examples in Table 1, in order to infer what the pro- noun "they" refers to in the first two statements, one has to leverage the commonsense knowledge that "demonstrators usually cause violence and city councilmen usually fear violence." Similarly, it is obvious to humans what the pronoun "it" refers to in the third and fourth statements due to the commonsense knowledge that "An object can- not fit in a container because either the object (tro- phy) is too big or the container (suitcase) is too small." In this paper, we study two classic common- sense reasoning tasks: the Winograd Schema Challenge (WSC) and Pronoun Disambiguation Problem (PDP) (Levesque et al., 2011; Davis and Marcus, 2015). Both tasks are formulated as an anaphora resolution problem, which is a form Table 1: Examples from Winograd Schema Challenge (WSC). The task is to identify the reference of the pro- noun in bold. of co-reference resolution, where a machine (AI agent) must identify the antecedent of an ambigu- ous pronoun in a statement. WSC and PDP dif- fer from other co-reference resolution tasks (Soon et al., 2001; Ng and Cardie, 2002; Peng et al., 2016) in that commonsense knowledge, which cannot be explicitly decoded from the given text, is needed to solve the problem, as illustrated in the examples in Table 1. Comparing with other commonsense reason- ing tasks, such as COPA (Roemmele et al., 2011), Story Cloze Test (Mostafazadeh et al., 2016), Event2Mind (Rashkin et al., 2018), SWAG (Zellers et al., 2018), ReCoRD (Zhang et al., 2018), and so on, WSC and PDP better approxi- mate real human reasoning, can be easily solved by native English-speaker (Levesque et al., 2011), and yet are challenging for machines. For exam- ple, the WNLI task, which is derived from WSC, is considered the most challenging NLU task in the General Language Understanding Evaluation (GLUE) benchmark (Wang et al., 2018). Most ma- chine learning models can hardly outperform the naive baseline of majority voting (scored at 65.1) 1, including BERT (Devlin et al., 2018a) and Dis- tilled MT-DNN (Liu et al., 2019a). While traditional methods of commonsense rea- soning rely heavily on human-crafted features and knowledge bases (Rahman and Ng, 2012a; Sharma et al., 2015; Schuller, 2014; Bailey et al., 2015; Liu et al., 2017), we explore in this study machine learning approaches using deep neural networks (DNN). Our method is inspired by two categories of DNN models proposed recently. The first are neural language models trained on large amounts of text data. Trinh and Le (2018) proposed to use a neural language model trained on raw text from books and news to calculate the probabilities of the natural language sentences which are constructed from a statement by replac- ing the to-be-resolved pronoun in the statement with each of its candidate references (antecedent), and then pick the candidate with the highest prob- ability as the answer. Kocijan et al. (2019) showed that a significant improvement can be achieved by fine-tuning a pre-trained masked language model (BERT in their case) on a small amount of WSC labeled data. The second category of models are seman- tic similarity models. Wang et al. (2019) for- mulated WSC and PDP as a semantic matching problem, and proposed to use two variations of the Deep Structured Similarity Model (DSSM) (Huang et al., 2013) to compute the semantic sim- ilarity score between each candidate antecedent and the pronoun by (1) mapping the candidate and the pronoun and their context into two vectors, respectively, in a hidden space using deep neu- ral networks, and (2) computing cosine similarity between the two vectors. The candidate with the highest score is selected as the result. The two categories of models use different in- ductive biases when predicting outputs given in- puts, and thus capture different views of the data. While language models measure the semantic co- 1See the GLUE leaderboard at https:// gluebenchmark.com/leaderboard herence and wholeness of a statement where the pronoun to be resolved is replaced with its candi- date antecedent, DSSMs measure the semantic re- latedness of the pronoun and its candidate in their context. Therefore, inspired by multi-task learning (Caruana, 1997; Liu et al., 2015, 2019b), we pro- pose a hybrid neural network (HNN) model that combines the strengths of both neural language models and a semantic similarity model. As shown in Figure 1, HNN consists of two com- ponent models, a masked language model and a deep semantic similarity model. The two compo- nent models share the same text encoder (BERT), but use different model-specific input and output layers. The final output score is the combina- tion of the two model scores. The architecture of HNN bears a strong resemblance to that of Multi- Task Deep Neural Network (MT-DNN) (Liu et al., 2019b), which consists of a BERT-based text en- coder that is shared across all tasks (models) and a set of task (model) specific output layers. Follow- ing (Liu et al., 2019b; Kocijan et al., 2019), the training procedure of HNN consists of two steps: (1) pretraining the text encoder on raw text 2, and (2) multi-task learning of HNN on WSCR which is the most popular WSC dataset, as suggested by Kocijan et al. (2019). HNN obtains new state-of-the-art results with significant improvements on three classic com- monsense reasoning tasks, pushing the WNLI benchmark in GLUE to 89%, the WSC benchmark 3 (Levesque et al., 2011) to 75.1%, and the PDP-60 benchmark 4 to 90.0%. We also conduct an abla- tion study which shows that language models and semantic similarity models provide complemen- tary approaches to commonsense reasoning, and HNN effectively combines the strengths of both. 2 The Proposed HNN Model The architecture of the proposed hybrid model is shown in Figure 1. The input includes a sentence S, which contains the pronoun to be resolved, and a candidate antecedent C. The two component models, masked language model (MLM) and se- 2In this study we use the pre-trained BERT large models released by the authors. 3https://cs.nyu.edu/faculty/davise/ papers/WinogradSchemas/WS.html 4https://cs.nyu.edu/faculty/davise/ papers/WinogradSchemas/PDPChallenge2016. xml Figure 1: Architecture of the hybrid model for commonsense reasoning. The model consists of two component models, a masked language model (MLM) and a semantic similarity model (SSM). The input includes the sentence S, which contains a pronoun to be resolve, and a candidate antecedent C. The two component models share the BERT-based contextual encoder, but use different model-specific input and output layers. The final output score is the combination of the two component model scores. mantic similarity model (SSM), share the BERT- based contextual encoder, but use different model- specific input and output layers. The final output score, which indicates whether C is the correct candidate of the pronoun in S, is the combination of the two component model scores. 2.1 Masked Language Model (MLM) This component model follows Kocijan et al. (2019). In the input layer, a masked sentence is constructed using S by replacing the to-be- resolved pronoun in S with a sequence of N [MASK] tokens, where N is the number of tokens in candidate C. In the output layer, the likelihood of C being re- ferred to by the pronoun in S is scored using the BERT-based masked language model Pmlm(CS). If C = {c1...cN} consists of multiple tokens, log Pmlm(CS) is computed as the average of log- probabilities of each composing token: Pmlm(CS) = exp (cid:88) (cid:32) (cid:33) 1 N k=1...N log Pmlm(ckS) (1) . 2.2 Semantic Similarity Model (SSM) In the input layer, we treat sentence S and candi- date C as a pair (S, C) that is packed together as a word sequence, where we add the [CLS] token as the first token and the [SEP] token between S and C. After applying the shared embedding layers, we obtain the semantic representations of S and C, denoted as s ∈ Rd and c ∈ Rd, respectively. We use the contextual embedding of [CLS] as s. Suppose C consists of N tokens, whose contex- tual embeddings are h1, ..., hN , respectively. The semantic representation of the candidate C, c, is computed via attention as follows: s(cid:62)W1hk√ αk = softmax( (2) ), d (cid:88) c = αk · hk. (3) k=1...N where W1 is a learnable parameter matrix, and α is the attention score. We use the contextual embedding of the first to- ken of the pronoun in S as the semantic represen- tation of the pronoun, denoted as p ∈ Rd. In the output layer, the semantic similarity between the pronoun and the context is computed using a bi- linear model: Sim(C, S) = p(cid:62)W2c, (4) where W2 is a learnable parameter matrix. Then, SSM predicts whether C is a correct candidate (i.e., (C, S) is a positive pair, labeled as y = 1) using the logistic function: Pssm(y = 1C, S) = . (5) The final output score of pair (S, C) is a linear combination of the MLM score of Eqn. 1 and the SSM score of Eqn. 5: 1 + exp (−Sim(C, S)) 1 Score(C, S) = 1 2 [Pmlm(CS)+Pssm(y = 1C, S)]. (6) 2.3 The Training Procedure We train our model of Figure 1 on the WSCR dataset, which consists of 1886 sentences, each being paired with a positive candidate antecedent and a negative candidate. The shared BERT encoder is initialized using the published BERT uncased large model (Devlin et al., 2018a). We then finetune the model on the WSCR dataset by optimizing the combined objec- tives: Lmlm + Lssm + Lrank, (7) where Lmlm is the negative log-likelihood based on the masked language model of Eqn. 1, and Lssm is the cross-entropy loss based on semantic similarity model of Eqn. 5. Lrank is the pair-wise rank loss. Consider a sentence S which contains a pronoun to be re- solved, and two candidates C+ and C−, where C+ is correct and C− is not. We want to maxi- mize ∆ = Score(S, C+) − Score(S, C−), where Score(.) is defined by Eqn. 6. We achieve this via optimizing a smoothed rank loss: Lrank = log(1 + exp (−γ(∆ + β))), (8) where γ ∈ [1, 10] is the smoothing factor and β ∈ [0, 1] the margin hyperparameter. In our experiments, the default setting is γ = 10, and β = 0.6. 3 Experiments We evaluate the proposed HNN on three common- sense benchmarks: WSC (Levesque et al., 2012), PDP605 and WNLI. WNLI is derived from WSC, and is considered the most challenging NLU task in the GLUE benchmark (Wang et al., 2018). 5https://cs.nyu.edu/faculty/davise/ papers/WinogradSchemas/PDPChallenge2016. xml 3.1 Datasets Corpus WNLI PDP60 WSC WSCR #Train #Dev - - - 1322 634 + 71 - - 564 #Test 146 60 285 - Table 2: Summary of the three benchmark datasets: WSC, PDP60 and WNLI, and the additional dataset WSCR. Note that we only use WSCR for training. For WNLI, we merge its official training set containing 634 instances and dev set containing 71 instances as its final dev set. Table 2 summarizes the datasets which are used in our experiments. Since the WSC and PDP60 datasets do not contain any training instances, fol- lowing (Kocijan et al., 2019), we adopt the WSCR dataset (Rahman and Ng, 2012b) for model train- ing and selection. WSCR contains 1886 instances (1322 for training and the rest as dev set). Each instance is presented using the same structure as that in WSC. For the WNLI instances, we convert them to the format of WSC as illustrated in Table 3: we first detect pronouns in the premise using spaCy6; then given the detected pronoun, we search its left of the premise in hypothesis to find the longest common substring (LCS) ignoring character case. Similarly, we search its right part to the LCS; by comparing the indexes of the extracted LSCs, we extract the candidate. A detailed example of the conversion process is provided in Table 3. Implementation Detail 3.2 Our implementation of HNN is based on the Py- Torch implementation of BERT7. All the models are trained with hyper-parameters depicted as fol- lows unless stated otherwise. The shared layer is initialized by the BERT uncased large model. Adam (Kingma and Ba, 2014) is used as our opti- mizer with a learning rate of 1e-5 and a batch size of 32 or 16. The learning rate is linearly decayed during training with 100 warm up steps. We select models based on the dev set by greedily searching epochs between 8 and 10. The trainable parame- ters, e.g., W1 and W2, are initialized by a trun- cated normal distribution with a mean of 0 and a 6https://spacy.io 7https://github.com/huggingface/ pytorch-pretrained-BERT 1. Premise: The cookstove was warming the kitchen, and the lamplight made it seem even warmer. Hypothesis: The lamplight made the cook- stove seem even warmer. Index of LCS in the hypothesis: left[0, 2], right[5, 7] Candidate: [3, 4] (the cookstove) 2. Premise: The cookstove was warming the kitchen, and the lamplight made it seem even warmer. Hypothesis: The lamplight made the kitchen seem even warmer. Index of LCS in the hypothesis: left[0, 2], right[5, 7] Candidate: [3, 4] (the kitchen) 3. Premise: The cookstove was warming the kitchen, and the lamplight made it seem even warmer. Hypothesis: The lamplight made the lamp- light seem even warmer. Index of LCS in the hypothesis: left[0, 2], right[5, 7] Candidate: [3, 4] (the lamplight) 4. Converted: The cookstove was warming the kitchen, and the lamplight made it seem even warmer. A. the cookstove B. the kitchen C. the lamplight Table 3: Examples of transforming WNLI to WSC for- mat. Note that the text highlighted by brown is the longest common substring from the left part of pronoun it, and the text highlighted by violet is the longest com- mon substring from its right. standard deviation of 0.01. The margin hyperpa- rameter, β in Eqn. 8, is set to 0.6 for MLM and 0.5 for SSM, and γ is set to 10 for all tasks. We also apply SWA (Izmailov et al., 2018) to improve the generalization of models. All the texts are tokenized using WordPieces, and are chopped to spans containing 512 tokens at most. 3.3 Results We compare our HNN with a list of state-of-the-art models in the literature, including BERT (Devlin et al., 2018b), GPT-2 (Radford et al., 2019) and DSSM (Wang et al., 2019). The brief description of each baseline is introduced as follows. 1. BERTLARGE-LM (Devlin et al., 2018b): This is the large BERT model, and we use MLM to predict a score for each candidate following Eq 1. 2. GPT-2 (Radford et al., 2019): During predic- tion, We first replace the pronoun in a given sentence with its candidates one by one. We use the GPT-2 model to compute a score for each new sentence after the replacement, and select the candidate with the highest score as the final prediction. 3. BERTWiki-WSCR and BERTWSCR (Kocijan et al., 2019): These two models use the same approach as BERTLARGE-LM, but are trained with different additional training data. For example, BERTWiki-WSCR is firstly fine-tuned on the constructed Wikipedia data and then on WSCR. BERTWSCR is directly fine-tuned on WSCR. 4. DSSM (Wang et al., 2019): It is the unsu- pervised semantic matching model trained on the dataset generated with heuristic rules. 5. HNN: It is the proposed hybrid neural net- work model. The main results are reported in Table 4. Compared with all the baselines, HNN obtains much better performance across three bench- marks. This clearly demonstrates the advantage of the HNN over existing models. For exam- ple, HNN outperforms the previous state-of-the- art BERTWiki-WSCR model with a 11.7% abso- lute improvement (83.6% vs 71.9%) on WNLI and a 2.8% absolute improvement (75.1% vs 72.2%) on WSC in terms of accuracy. Mean- while, it achieves a 11.7% absolute improvement over the previous state-of-the-art BERTLARGE-LM model on PDP60 in accuracy. Note that both BERTWiki-WSCR and BERTLARGE-LM are using lan- guage model-based approaches to solve the pro- noun resolution problem. On the other hand, We observe that DSSM without pre-training is com- parable to BERTLARGE-LM which is pre-trained on the large scale text corpus (63.0% vs 62.0% on WSC and 75.0% vs 78.3% on PDP60). Our results show that HNN, combining the strengths of both DSSM and BERTWSCR, has consistently achieved new state-of-the-art results on all three tasks. WNLI WSC PDP60 75.0 78.3 65.1 - DSSM (Wang et al., 2019) BERTLARGE-LM (Devlin et al., 2018a) GPT-2 (Radford et al., 2019) BERTWiki-WSCR (Kocijan et al., 2019) BERTWSCR (Kocijan et al., 2019) HNN HNNensemble - 71.9 70.5 83.6 89.0 63.0 62.0 70.7 72.2 70.3 75.1 - - - - 90.0 - Table 4: Test results Figure 2: Comparison with SSM and MLM on WNLI examples. WNLI WSCR WSC PDP60 77.1 90.0 HNN 86.7 -SSM 74.5 -MLM 75.1 88.3 75.1 72.6 72.3 85.6 82.4 83.7 Table 5: Ablation study of the two component model in HNN. Note that WNLI and WSCR are reported on dev sets while WSC and PDP60 are reported on test sets. To further boost the WNLI accuracy on the GLUE benchmark leaderboard, we record the model prediction at each epoch, and then produce the final prediction based on the majority voting from the last six model predictions. We refer to the ensemble of six models as HNNensemble in Table 4. HNNensemble brings a 5.4% absolute improvement (89.0% vs 83.6%) on WNLI in terms of accuracy. 3.4 Ablation study In this section, we study the importance of each component in HNN by answering following ques- tions: How important are the two component models: MLM and SSM? To answer this question, we first remove each component model, either SSM or MLM, and then report the performance impact of these compo- nent models. Table 5 summarizes the experimen- tal results. It is expected that the removal of ei- ther component model results in a significant per- formance drop. For example, with the removal of SSM, the performance of HNN is downgraded from 77.1% to 74.5% on WNLI. Similarly, with the removal of MLM, HNN only obtains 75.1%, which amounts to a 2% drop. All these observa- tions clearly demonstrate that SSM and MLM are complementary to each other and the HNN model benefits from the combination of both. Figure 2 gives several examples showing how SSM and MLM complement each other on WNLI. We see that in the first pair of examples, MLM correctly predicts the label while SSM does not. This is due to the fact that "the roof repaired" ap- pears more frequently than "the tree repaired" in the text corpora used for model pre-training. How- ever, in the second pair, since both "the demonstra- tors" and "the city councilment" could advocate violence and neither occurs significantly more of- ten than the other, SSM is more effective in dis- tinguishing the difference based on their context. The proposed HNN, which combines the strengths of these two models, can obtain the correct results in both cases. Does the additional ranking loss help? As in Eqn. 7, the training objective of HNN model contains three losses. The first two are based on the two component models, respectively, and the third one, as defined in Eqn. 8, is a ranking loss based on the score function in Eqn. 6. At first glance, the ranking loss seems redundant. Thus, we compare two versions of HNN trained with and without the ranking loss. Experimental results are shown in Table 6. We see that without the rank- ing loss, the performance of HNN drops on three datasets: WNLI, WSCR and WSC. On the PDP60 dataset, without the ranking loss, the model per- forms slightly better. However, since the test set of PDP60 includes only 60 samples, the difference is not statistically significant. Thus, we decide to always include the ranking loss in the training ob- jective of HNN. HNN HNN-Rank WNLI WSCR WSC PDP60 77.1 90.0 91.7 74.8 75.1 71.9 85.6 85.1 Table 6: Ablation study of the ranking loss. Note that WNLI and WSCR are reported on dev sets while WSC and PDP60 are reported on test sets. Is the WNLI task a ranking or classification task? Figure 3: Comparison of different task formulation on WNLI. The WNLI task can be formulated as either a ranking task or a classification task. To study the difference in problem formulation, we conduct ex- periments to compare the performance of a model used as a classifier or a ranker. For example, given a trained HNN, when it is used as a classifier we set a threshold to decide label (0/1) for each input. When it is used as a ranker, we simply pick the top-ranked candidate as the correct answer. We run the comparison using all three models HNN, MLM and SSM. As shown in Figure 3, the rank- ing formulation is consistently better than the clas- sification formulation for this task. For example, the difference in the HNN model is about absolute 2.5% (74.6% vs 77.1%) in terms of accuracy. 4 Conclusion We propose a hybrid neural network (HNN) model for commonsense reasoning. HNN consists of two component models, a masked language model and a deep semantic similarity model, which share a BERT-based contextual encoder but use different model-specific input and output layers. HNN obtains new state-of-the-art results on three classic commonsense reasoning tasks, push- ing the WNLI benchmark to 89%, the WSC benchmark to 75.1%, and the PDP60 benchmark to 90.0%. We also justify the design of HNN via a series of ablation experiments. In future work, we plan to extend HNN to more sophisticated reasoning tasks, especially those where large-scale language models like BERT and GPT do not perform well, as discussed in (Gao et al., 2019; Niven and Kao, 2019). Acknowledgments We would like to thank Michael Patterson from Microsoft for his help on the paper. References Daniel Bailey, Amelia Harrison, Yuliya Lierler, Vladimir Lifschitz, and Julian Michael. 2015. The winograd schema challenge and reasoning about In Knowledge Representation; Coref- correlation. erence Resolution; Reasoning. Rich Caruana. 1997. Multitask learning. Machine learning, 28(1):41 -- 75. Ernest Davis and Gary Marcus. 2015. Commonsense reasoning and commonsense knowledge in artificial intelligence. Communications of the ACM. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018a. Bert: Pre-training of deep bidirectional transformers for language under- standing. arXiv preprint arXiv:1810.04805. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018b. Bert: Pre-training of deep bidirectional transformers for language under- standing. arXiv preprint arXiv:1810.04805. Jianfeng Gao, Michel Galley, and Lihong Li. 2019. Neural approaches to conversational ai. Founda- tions and Trends R(cid:13) in Information Retrieval, 13(2- 3):127 -- 298. Po-Sen Huang, Xiaodong He, Jianfeng Gao, Li Deng, Alex Acero, and Larry Heck. 2013. Learning deep structured semantic models for web search using clickthrough data. In Proceedings of the 22nd ACM international conference on Conference on informa- tion & knowledge management, pages 2333 -- 2338. ACM. Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry Vetrov, and Andrew Gordon Wilson. 2018. Averaging weights leads to wider optima and better generalization. arXiv preprint arXiv:1803.05407. Diederik Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. Vid Kocijan, Ana-Maria Cretu, Oana-Maria Camburu, Yordan Yordanov, and Thomas Lukasiewicz. 2019. A surprisingly robust trick for winograd schema challenge. arXiv preprint arXiv:1905.06290. Hector Levesque, Ernest Davis, and Leora Morgen- stern. 2012. The winograd schema challenge. In Thirteenth International Conference on the Princi- ples of Knowledge Representation and Reasoning. Hector J Levesque, Ernest Davis, and Leora Morgen- stern. 2011. The winograd schema challenge. In AAAI spring symposium: Logical formalizations of commonsense reasoning. Quan Liu, Hui Jiang, Zhen-Hua Ling, Xiaodan Zhu, Si Wei, and Yu Hu. 2017. Combing context and commonsense knowledge through neural networks In AAAI for solving winograd schema problems. Spring Symposium Series. Xiaodong Liu, Jianfeng Gao, Xiaodong He, Li Deng, Kevin Duh, and Ye-Yi Wang. 2015. Representa- tion learning using multi-task deep neural networks for semantic classification and information retrieval. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computa- tional Linguistics: Human Language Technologies, pages 912 -- 921. Xiaodong Liu, Pengcheng He, Weizhu Chen, and Improving multi-task deep Jianfeng Gao. 2019a. neural networks via knowledge distillation for arXiv preprint natural arXiv:1904.09482. language understanding. Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jian- feng Gao. 2019b. Multi-task deep neural networks for natural language understanding. arXiv preprint arXiv:1901.11504. Nasrin Mostafazadeh, Nathanael Chambers, Xiaodong He, Devi Parikh, Dhruv Batra, Lucy Vanderwende, Pushmeet Kohli, and James Allen. 2016. A cor- pus and cloze evaluation for deeper understanding of commonsense stories. In Proceedings of the Con- ference of the North American Chapter of the Asso- ciation for Computational Linguistics: Human Lan- guage Technologies. Vincent Ng and Claire Cardie. 2002. Improving ma- chine learning approaches to coreference resolution. In Proceedings of the Association for Computational Linguistics. Association for Computational Linguis- tics. Timothy Niven and Hung-Yu Kao. 2019. Probing neu- ral network comprehension of natural language ar- guments. arXiv preprint arXiv:1907.07355. Haoruo Peng, Yangqiu Song, and Dan Roth. 2016. Event detection and co-reference with minimal su- pervision. In Proceedings of the conference on em- pirical methods in natural language processing. Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. Altaf Rahman and Vincent Ng. 2012a. Resolving complex cases of definite pronouns: The winograd schema challenge. In Proceedings of the Joint Con- ference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning. Altaf Rahman and Vincent Ng. 2012b. Resolving complex cases of definite pronouns: the winograd schema challenge. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Lan- guage Processing and Computational Natural Lan- guage Learning, pages 777 -- 789. Association for Computational Linguistics. Hannah Rashkin, Maarten Sap, Emily Allaway, Noah A. Smith, and Yejin Choi. 2018. Event2mind: Commonsense inference on events, intents, and re- actions. In Proceedings of the Association for Com- putational Linguistics. Melissa Roemmele, Cosmin Adrian Bejan, and An- drew S Gordon. 2011. Choice of plausible alterna- tives: An evaluation of commonsense causal reason- ing. In AAAI Spring Symposium: Logical Formal- izations of Commonsense Reasoning. Peter Schuller. 2014. Tackling winograd schemas by formalizing relevance theory in knowledge graphs. In Knowledge Representation and Reasoning Con- ference. Arpit Sharma, Nguyen H. Vo, Somak Aditya, and Chitta Baral. 2015. Towards addressing the wino- grad schema challenge: Building and using a se- mantic parser and a knowledge hunting module. In Proceedings of the International Conference on Ar- tificial Intelligence. Wee Meng Soon, Hwee Tou Ng, and Daniel Chung Yong Lim. 2001. A machine learning ap- proach to coreference resolution of noun phrases. Computational linguistics. Trieu H Trinh and Quoc V Le. 2018. A simple method for commonsense reasoning. arXiv preprint arXiv:1806.02847. Alex Wang, Amapreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. 2018. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461. Shuohang Wang, Sheng Zhang, Yelong Shen, Xi- aodong Liu, Jingjing Liu, Jianfeng Gao, and Jing Jiang. 2019. Unsupervised deep structured seman- tic models for commonsense reasoning. In Proceed- ings of the 2019 Conference of the North American Chapter of the Association for Computational Lin- guistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 882 -- 891, Min- neapolis, Minnesota. Association for Computational Linguistics. Rowan Zellers, Yonatan Bisk, Roy Schwartz, and Yejin Choi. 2018. Swag: A large-scale adversarial dataset for grounded commonsense inference. In Proceed- ings of the Conference on Empirical Methods in Nat- ural Language Processing. Sheng Zhang, Xiaodong Liu, Jingjing Liu, Jianfeng Gao, Kevin Duh, and Benjamin Van Durme. 2018. ReCoRD: Bridging the Gap between Human and Machine Commonsense Reading Comprehension. arXiv preprint arXiv:1810.12885.
1806.03692
1
1806
2018-06-10T17:05:31
Deconvolution-Based Global Decoding for Neural Machine Translation
[ "cs.CL", "cs.AI", "cs.LG" ]
A great proportion of sequence-to-sequence (Seq2Seq) models for Neural Machine Translation (NMT) adopt Recurrent Neural Network (RNN) to generate translation word by word following a sequential order. As the studies of linguistics have proved that language is not linear word sequence but sequence of complex structure, translation at each step should be conditioned on the whole target-side context. To tackle the problem, we propose a new NMT model that decodes the sequence with the guidance of its structural prediction of the context of the target sequence. Our model generates translation based on the structural prediction of the target-side context so that the translation can be freed from the bind of sequential order. Experimental results demonstrate that our model is more competitive compared with the state-of-the-art methods, and the analysis reflects that our model is also robust to translating sentences of different lengths and it also reduces repetition with the instruction from the target-side context for decoding.
cs.CL
cs
Deconvolution-Based Global Decoding for Neural Machine Translation Junyang Lin1,2, Xu Sun2, Xuancheng Ren2, Shuming Ma2, Jinsong Su3, Qi Su1 1School of Foreign Languages, Peking University 2MOE Key Lab of Computational Linguistics, School of EECS, Peking University 3School of Software, Xiamen University {linjunyang, xusun, renxc, shumingma, sukia}@pku.edu.cn [email protected] Abstract A great proportion of sequence-to-sequence (Seq2Seq) models for Neural Machine Translation (NMT) adopt Recurrent Neural Network (RNN) to generate translation word by word following a sequential order. As the studies of linguistics have proved that language is not linear word sequence but sequence of complex structure, translation at each step should be conditioned on the whole target-side context. To tackle the problem, we propose a new NMT model that decodes the sequence with the guidance of its structural prediction of the context of the target sequence. Our model generates translation based on the structural prediction of the target-side context so that the translation can be freed from the bind of sequential order. Experimental results demonstrate that our model is more competitive compared with the state-of-the-art methods, and the analysis reflects that our model is also robust to translating sentences of different lengths and it also reduces repetition with the instruction from the target-side context for decoding. 1 Introduction Deep learning has achieved tremendous success in machine translation, outperforming the traditional linguistic-rule-based and statistical methods. In recent studies of Neural Machine Translation (NMT), most models are based on the sequence-to-sequence (Seq2Seq) model based on the encoder-decoder framework (Kalchbrenner and Blunsom, 2013; Sutskever et al., 2014; Cho et al., 2014) with the attention mechanism (Bahdanau et al., 2014; Luong et al., 2015). While traditional linguistic-rule-based and sta- tistical methods of machine translation require much work of feature engineering, NMT can be trained in the end-to-end fashion. Besides, the attention mechanism can model the alignment relationship between the source text and translation (Bahdanau et al., 2014; Luong et al., 2015), and some recent improved versions of attention have proved successful in this task (Tu et al., 2016; Mi et al., 2016; Meng et al., 2016; Xiong et al., 2017; Vaswani et al., 2017). However, the decoding pattern of the recent Seq2Seq models is inconsistent with the linguistic analy- sis. As the conventional decoder translates words in a sequential order, the current generation is highly dependent on the previous generation and it is short of the knowledge about future generation. Nida (1969) pointed out that translation goes through a process of analysis, transfer and reconstruction, involv- ing the deep syntactic and semantic structure of the source and target languages. Language generation involves complex syntactic analysis and semantic integration, instead of a step-by step word generation (Frazier, 1987). Moreover, from the perspective of semantics and pragmatics, the syntactic analysis of ut- terance can be guided by the global lexical-semantic and discourse information (Altmann and Steedman, 1988; Trueswell et al., 1994, 1993; Tyler and Marslen-Wilson, 1977). In brief, the process of transla- tion is in need of the global information from the target-side context, but the decoding pattern of the conventional Seq2Seq model in NMT does not meet the requirement. Recent researches in NMT have taken this issue into consideration by the implementation of bidi- rectional decoding. Some methods of bidirectional decoding (Liu et al., 2016; Cong et al., 2017) rerank the candidate translations with the scores from the bidirectional decoding. However, these bidirectional This work is licensed under a Creative Commons Attribution 4.0 International License. License details: http://creativecommons.org/licenses/by/4.0/ decoding methods cannot provide effective complementary information due to the limited search space of beam search. In this article, we extend the conventional attention-based Seq2Seq model by introducing the deconvolution-based decoder, which is a Convolutional Neural Network (CNN) to perform deconvo- lution. Recently, deconvolution has been applied to the studies of natural language (Zhang et al., 2017; Shen et al., 2017), which can be regarded as the transposition of the convolution (Long et al., 2015; Noh et al., 2015). Zhang et al. (2017) applied this method to natural language by modeling sentences with a convolution-deconvolution autoencoder. The study of Zhang et al. (2017) showed that the decon- volution solves the problems by reconstructing a representation of high quality irrespective to the order or length. It can be found that deconvolution owns the potential to provide global information for guidance of decoding. Therefore, we follow this idea and propose a new model with deconvolution for NMT. To be specific, the conventional RNN encoder encodes the source sentences to new representations and sends the final state to the decoder, and the conventional RNN decoder decodes it to the target sentences with the attention to the encoder outputs. In our model, our designed deconvolution-based decoder decodes the final state of the encoder to a matrix representing the global information of the target-side contexts. Each column of the matrix is learned to be close to the word embedding of the target words. The conventional RNN decoder can attend to the columns for the information of the target-side context to perform global decoding in the translation. Our contributions in this study are illustrated in the following: • We propose a new model for NMT, which contains a deconvolution-based decoder to provide global information of the target-side contexts to the RNN decoder, so that the model is able to perform global decoding1. • Experimental results demonstrate that our model outperforms the baseline models in both the Chinese-to-English translation and the English-to-Vietnamese translation, outperforming the Seq2Seq model in the BLEU score evaluation with the advantages of BLEU score 2.82 and 1.54 respectively. • The analysis shows that our model that performs global decoding is more capable of reducing repetition and more robust to the translation of sentences of different lengths, and the case study reflects that it is able to capture the syntactic structure for the translation and has a better reflection of the semantic meaning of the source text. 2 Model In the following, we introduce the details of our model, including the encoder, the deconvolution-based decoder and the conventional RNN-based decoder. The functions of each decoder are illustrated below to show how they collaborate to improve the quality of the translation. 2.1 Encoder In our model, the encoder reads the embeddings of the input text sequence x = {x1, ..., xn} and encodes a sequence of encoder outputs h = {h1, ..., hn}. The final hidden state hn is sent to the decoder as the initial state for it to decode a sequence of output text. The encoder outputs provide the information of the source-side contexts to our RNN-Based decoder through the attention mechanism. The encoder in our model is a bidirectional LSTM (Hochreiter and Schmidhuber, 1997), which reads −→ hn} and the input in two directions to generate two sequences of hidden states ←− h = { ←− hn}, where: −→ h = { −→ h1, −→ h3, ..., −→ h2, ←− h1, ←− h2, ←− h3, ..., −→ hi = LST M(xi, ←− hi = LST M(xi, −−→ hi−1, Ci−1) ←−− hi−1, Ci−1) (1) (2) The encoder outputs corresponding to each time step are concatenated as hi = [ −→ hi ; ←− hi]. 1The code is released in https://github.com/lancopku/DeconvDec Figure 1: Model architecture. There are three components in the proposed model, i.e., the LSTM encoder, the deconvolution-based decoder, and the conventional LSTM decoder. The encoder distills the input sentence into a state hn, which is then used in the deconvolution-based decoder to obtain the global information of the target-side contexts. Based on the target-side contexts and the input-side contexts, the conventional LSTM decoder generates the output from the state hn. 2.2 Deconvolution-Based Decoder In our model, there are two decoders, which perform different tasks for the whole decoding process. While the RNN-based decoder is similar to the conventional decoder, which decodes the output text sequence in a sequential order and attends to the annotations of the encoder via the attention mechanism, our proposed deconvolution-based decoder does not decode the text but provide global information of the target-side contexts to the RNN-based decoder so that it can decode structurally instead of sequentially. To be specific, the deconvolution-based decoder learns to generate the word embedding matrix of the target text sequence. In order to provide global information of the target-side contexts to the RNN decoder, we implement a multilayer CNN as the deconvolution-based decoder to perform deconvolution. With deconvolution, it is available for a vector or a small matrix to be transformed to a large matrix. In our model, the decon- volution is implemented on the final states in both directions from the encoder. As words in our model are represented with word embedding vectors, sentences can be formed as word embedding matrices. In our model, the deconvolution-based decoder is designed to learn word embedding matrices of the target sequences with the representation matrix from the encoder. As the conjugate operation of con- volution, deconvolution expands the dimension of the input representation to a matrix of our designed size. There are L layers in the deconvolution, each of which has fl filters of kernel size kl. The ith filter l and padding pi W i l performs deconvolution on the input representation matrix I ∈ Rm×dim (m × dim refers to the size of the input representation matrix), the final hidden state of the encoder. The computation of convolution is illustrated as below: l ∈ Rk×dim (dim refers to the size of the input representation vector) with stride si l = g(W i ci l ∗ X + b) (3) where X refers to the convolved matrix and g refers to non-linear activation function, which is ReLU (Nair and Hinton, 2010) following Zhang et al. (2017), and deconvolution is its transposed operation. With the input I, our objective of the deconvolution operation is to generate a word embedding matrix E ∈ RT ×dim where T refers to the sentence length designed for the output text sequence, which is a hyper-parameter. At the lth layer, deconvolution generates a matrix El ∈ RTl×dim where Tl = Tl−1 × sl + kl − 2 × pl. With the control of stride and kernel size, the height of the matrix can be assigned, and with the control of the number of filters, the width of the matrix can also be assigned, which are the length of the output sequence and the dimension of the word embedding respectively. The deconvolution-based decoder can generate meaningful representation with information different from that in the conventional RNN decoder. The conventional RNN decoder generates sequence in a way similar to Markov Decision Process, which is highly dependent on the previous generation and follows (a) Deconvolution-based decoder. (b) Deconvolution. Figure 2: Deconvolution-based decoder. On the right shows an example of a 1d deconvolution on a input of size 2 with a kernel of size 4, a padding of 1 and, a stride of 2. The depth means the dimension of the channel, which is dim in our case. a strict sequential order, so it contains high sequential dependency. On the contrary, the deconvolution- based decoder generates a word embedding matrix depending on the representation from the encoder without considering the order, which does not have the problem of long-term dependency. Moreover, although it is not capable as the RNN encoder to generate coherent text, it reveals the information of the text from a global perspective, including syntactic and semantic features. 2.3 RNN-Based Decoder Different from the deconvolution-based decoder, the RNN-based decoder is responsible for decoding the representation hn to generate the translation y = {y1, ..., ym}. With the final encoder state as the initial state, the decoder is initialized to decode in sequential order, until it generates the token representing the end of sentence. During decoding, the attention mechanism is applied for the decoder to extract the information from the source-side contexts, which are the annotations of the encoder, as well as the information from the target-side contexts, which are the outputs of the deconvolution-based decoder. For the RNN-based decoder, we implement a unidirectional LSTM. The output of the RNN-based decoder at each time step is sent into a feed-forward neural network to be projected into the space of the target vocabulary Y ∈ RY ×dim for the prediction of the translated word. At each time step, the decoder generates a word yt by sampling from a conditional probability distribution of the target vocabulary Pvocab, where: Pvocab = sof tmax(Wovt) vt = g(st, ct, ct) st = LST M (yt−1, st−1, Ct−1) (4) (5) (6) where g(·) refers to non-linear activation function, and ct and ct are the outputs of the attention mecha- nism, which are illustrated in the following. The attention mechanism in our model is the global attention mechanism (Luong et al., 2015). Dif- ferent from the conventional attention mechanism, which only computes the attention scores on the source-side contexts, the attention mechanism in our model consists of two parts. The first one is similar to the conventional one, attending to the source-side contexts from the encoder, but the second one is original, which attends to the target-side contexts, which is the word embedding matrix generated by the deconvolution-based decoder. By attending to the encoder annotations, the model computes the attention αt,i of the RNN-based decoder output st on the annotations of the encoder hi and generates the context vector ct. Similarly, by attending to the outputs of the deconvolution-based decoder, the RNN-based de- coder computes the attentions of st on each column Ei of its matrix E and generates the context vector ct: ct = ct = n Xi=1 Xi=1 n αt,ihi αt,iEi (7) (8) where αt,i and αt,i are defined as below (as they are computed in the same way, they are both represented by αt,i and the annotations are represented by xi): exp(et,i) j=1exp(et,j) Pn αt,i = et,i = s⊤ t−1Waxi (9) (10) 2.4 Training The training for the Seq2Seq model is usually based on maximum likelihood estimation. Given the parameters θ and source text x, the model generates a sequence y. The learning process is to minimize the negative log-likelihood between the generated text y and reference y, which in our context is the sequence in target language for machine translation: L = − 1 N N T Xi=1 Xt=1 log P (y (i) t y (i) <t, x(i), θ) (11) where the loss function is equivalent to maximizing the conditional probability of sequence y given parameters θ and source sequence x. However, as there are two decoders in our model, the loss function should also be designed for the deconvolution-based decoder. In our model, we compute the smooth L1 loss between the generated ma- trix of the deconvolution-based decoder E and the word embedding matrix E (which both contain M elements), which is more robust to outliers (Girshick, 2015), as well as the cross-entropy loss between the prediction of the deconvolution-based decoder y and reference y given the parameters of the encoder and the deconvolution-based decoder θ . Therefore, the generated matrix E can be closer to the word embedding matrix E, and it contains information beneficial to the prediction of the target words. More- over, for the cross entropy loss of the deconvolution-based decoder, we apply the method of Ma et al. (2018a) as it increases no parameter for the prediction by computing the cosine similarity between the output and the word embeddings. To sum up, the loss function is defined as below: ′ L = − 1 N N T Xi=1 ( Xt=1 log P (y (i) t y (i) <t, x(i), θ) + M Xm=1 smoothL1(Em − Em) + T Xt=1 log P (y (i) t ′ x(i), θ )) (12) where smooth L1 loss is defined below: smoothL1(x, y) = (cid:26) 0.5 x − y 2 if x − y < 1 x − y 1 −0.5 if x − y ≥ 1 2 (13) We have tested L1 loss, L2 loss as well as smooth L1 loss in our experiments and found that smooth L1 loss encourages the model to reach the best performance. 3 Experiment 3.1 Datasets We evaluate our proposed model on the NIST translation task for the Chinese-to-English translation and provide the analysis on the same task. Moreover, in order to evaluate the performance of our model on the low-resource translation, we also evaluate our model on the IWLST 2015 (Cettolo et al., 2015) for the English-to-Vietnamese translation task. Chinese-to-English Translation For the NIST translation task, we train our model on 1.25M sentence pairs extracted from LDC2002E18, LDC2003E07, LDC2003E14, Hansards portion of LDC2004T07, LDC2004T08 and LDC2005T06, with 27.9M Chinese words and 34.5M English words. Following Wang et al. (2016), we validate our model on the dataset for the NIST 2002 translation task and tested our model on that for the NIST 2003, 2004, 2005, 2006 translation tasks. We use the most frequent 30K words for both the Chinese vocabulary and the English vocabulary, which includes around 97.4% and 99.5% of the Chinese and English words in the training data. The sentence pairs longer than 50 words are filtered. The evaluation metric is BLEU (Papineni et al., 2002). English-to-Vietnamese Translation The data is from the translated TED talks, containing around 133K training sentence pairs provided by the IWSLT 2015 Evaluation Campaign (Cettolo et al., 2015). We follow the studies of Huang et al. (2017), and use the same preprocessing methods as well as the same validation and the test set. The validation set is the TED tst2012 with 1553 sentences and the test set is the TED tst2013 with 1268 sentences. The English vocabulary is 17.7K words and the Vietnamese vocabulary is 7K words. The evaluation metric is also BLEU score. 3.2 Setting We implement the models on PyTorch2, and the experiments are conducted on an NVIDIA 1080Ti GPU. Both the size of word embedding and the number of units in the hidden layers are 512, and the batch size is 64. We use Adam optimizer (Kingma and Ba, 2014) to train the model with the setting β1 = 0.9, β2 = 0.98 and ǫ = 1 × 10−9 following Vaswani et al. (2017), and we initialize the learning rate to 0.0003. Gradient clipping is applied so that the norm of the gradients cannot be larger than a constant, which is 10 in our experiments. Dropout is used with the dropout rate set to 0.3 for the Chinese-to-English translation and 0.4 for the English-to-Vietnamese translation, based on the performance on the validation set. Based on the performance on the validation set, we use beam search with a beam width of 10 to generate translation for the evaluation and test, and we normalize the log-likelihood scores by sentence length. 3.3 Baselines For the Chinese-to-English translation, we compare our model with the state-of-the-art NMT systems for the task. • Moses An open source phrase-based translation system with default configurations and a 4-gram language model trained on the training data for the target language; • RNNsearch An attention-based Seq2Seq with fine-tuned hyperparameters (Bahdanau et al., 2014); • Coverage The method extends RNNSearch with a coverage model for the attention mechanism that tackles the problem of over-translation and under-translation (Tu et al., 2016); • Lattice The Seq2Seq model with a word-lattice-based RNN encoder that tackles the problem of tokenization in NMT (Su et al., 2016); • InterAtten The Seq2Seq model that records the interactive history of decoding (Meng et al., 2016); • MemDec Based on the RNNSearch, it is equipped with external memory that the model reads and writes during decoding (Wang et al., 2016). For the English-to-Vietnamese translation, we compare our model with the recent NMT models for this task, and we present the results of the baselines reported in their articles. 2http://pytorch.org Model Moses RNNSearch Lattice Coverage InterAtten MemDec Seq2Seq+Attention +DeconvDec MT-03 MT-04 MT-05 MT-06 Ave. 32.43 33.08 34.32 34.49 35.09 36.16 35.32 38.04 34.14 35.32 36.50 38.34 37.73 39.81 37.25 39.75 31.47 31.42 32.40 34.91 35.53 35.91 33.52 36.77 30.81 31.61 32.77 34.25 34.32 35.98 33.54 36.32 32.21 32.86 34.00 35.49 35.67 36.97 34.91 37.73 Table 1: Results of our model and the baselines (the results are those reported in the referred articles, and the models are trained on the identical training data or larger training data) on the Chinese-to-English translation, tested on the NIST Machine Translation tasks in 2003, 2004, 2005, 2006 by BLEU score evaluation. Model RNNSearch-1 RNNSearch-2 LabelEmb NPMT Seq2Seq+Attention +DeconvDec BLEU 23.30 26.10 26.80 27.69 26.93 28.47 Table 2: Results of our model and the baselines (directly reported in the referred articles) on the English- to-Vietnamese translation, tested on the TED tst2013 with the BLEU score evaluation. • RNNsearch-1 The attention-based Seq2Seq model by Luong and Manning (2015); • RNNsearch-2 The implementation of the attention-based Seq2Seq by Huang et al. (2017); • LabelEmb Extending RNNSearch with soft target representation (Sun et al., 2017); • NPMT The Neural Phrased-based Machine Translation model by Huang et al. (2017); 4 Results and Analysis 4.1 Results Table 1 shows the overall results of the models on the Chinese-to-English translation task. Beside our reimplementation of the attention-based Seq2Seq model, we report the results of the recent NMT models, which are results in their original articles or improved results of the reimplementation. To facilitate fair comparison, we compare with the baselines that are trained on the same training data. The results have shown that for the NIST 2003, 2004, 2005 and 2006 translation tasks, our model with the deconvolution- based decoder outperforms the baselines, and the advantage of BLEU score over the attention-based Seq2Seq model is 2.82 on average compared with our reimplementation of the attention-based Seq2Seq model. From the results mentioned above, it can be inferred that the global information of the target-side contexts retrieved from the deconvolution-based decoder is contributive to the translation. Our analysis and case study in the following can further demonstrate how the deconvolution-based decoder improves the attention-based Seq2Seq model. Table 2 presents the results of the models on the English-to-Vietnamese translation. Compared with the attention-based Seq2Seq model, including the implementation with the strongest performance, our model with the deconvolution-based decoder can outperform it with the advantage of BLEU score 1.54. We also display the most recent model NPMT (Huang et al., 2017) trained and tested on the dataset. w/o DeconvDec DeconvDec s e t a c i l p u d e h t f o % 20 15 10 5 0 1-gram 2-gram 3-gram 4-gram ) % ( U E L B 38 36 34 32 30 28 26 24 22 w/o DeconvDec DeconvDec 0 10 20 30 40 50 60 (a) Percentage of the duplicates at the sentence level. (b) BLEU scores on sentences of different lengths Figure 3: Percentage of the duplicates at sentence level and the BLEU scores on sentences of dif- ferent lengths Tested on the NIST 2003 dataset. The red bar and line indicate the performance of our model, and the blue bar and line indicate that of the attention-based SeqSeq model. Compared with NPMT, our model has an advantage of BLEU score 0.78. It can be indicated that for the low-resource translation, the information from the deconvolution-based decoder is important, which brings significant improvement to the conventional attention-based Seq2Seq model. 4.2 Analysis As our model generates translation with global information from the deconvolution-based decoder, it should learn to reduce repetition as it can learn to avoid generating same contents according to the conjecture by the deconvolution-based decoder about the target-side contexts. In order to test whether our model can mitigate the problem of repetition in translation, we test the repetition on the NIST 2003 dataset, following See et al. (2017). The proportions of the duplicates of 1-gram, 2-gram, 3-gram and 4-gram in each sentence are calculated. Results on Figure 3(a) show that our model generates less repetitive translation. In particular, the proportion of duplicates of our model is less than half of that of the conventional Seq2Seq model. Moreover, to validate its robustness on different sentence-length levels, we test the BLEU scores on sentences of length no shorter than 10 to 60 of the NIST 2003 dataset. According to the results on Figure 3(b), though with the increase in length, the performance of our model is always stronger than the Seq2Seq model. However, with the increase of length, the advantage of our model becomes smaller. This is consistent with our hypothesis. Since the length of generation of the deconvolution-based decoder is assigned a particular value (30 words in Chinese-to-English translation) due to the limited computation resources, there is not enough global target-side information for translating long sentences (say, longer than 30 words). In our future work, we will delve into this problem and conduct further research to reduce computation cost. Figure 4 presents the attention heatmaps of the RNN-based decoder on the generated matrix of the deconvolution-based decoder in the English-to-Vietnamese translation. They reflect that the RNN-based decoder has diverse local focuses on the self-contained target-side contexts at different time steps. Con- trary to the conventional attention on the source-side contexts which captures the corresponding an- notations, it focuses on groups of the columns of the generated matrix from the deconvolution-based decoder. With the guidance of the information of global decoding, the model generates translation of higher accuracy and higher coherence. However, as the deconvolution-based decoder is not responsible for generating translation, it is hard to interpret what each column of the generated matrix represents. Moreover, as it does not capture alignment relationship as the conventional attention mechanism does, it is our future work to improve the attention on the outputs of the deconvolution-based decoder and explain the group focuses as shown in the heatmaps. Figure 4: Attention heatmaps of the RNN-based decoder on the deconvolution-based decoder Words on the left refer to the translation of the RNN-based decoder. The heatmaps show that the RNN- based decoder can focus on certain parts of the outputs from the deconvolution-based decoder. 4.3 Case Study Table 3 demonstrates three examples of the translation of our model in comparison with the Seq2Seq model and the golden translation. In Table 3(a), while the Seq2Seq model cannot recognize the objects of the main clause and the infinitive, causing inaccuracy and repetition, our model better captures the syntactic structure of the sentence and translates the main idea of the source text, though leaving the information "that causes disease". In Table 3(b), the source sentence is more complicated. With a tem- poral adverbial clause, its syntactic structure is more complex than simple sentence. The translation of the conventional Seq2Seq model cannot capture the syntactic information in the source text and regards the "parliament members" as the argument of the predicate "talk". Moreover, it is confused by the word "中期", meaning "middle", and translates "mid - autumn festival". In comparison, our model can recog- nize the adverbial clause and the main clause as well as their syntactic structures. In Table 3(c), it can be shown that when translating the long and relatively complex text, the baseline model makes a series of mistake of repetition. In contrast, the translation generated by our model though repeats the word "dis- aster", it is much more coherent and more semantically consistent with the source text as it successfully presents "sent 250,000 yuan" corresponding to the source text "调拨25万元人民币", while the baseline cannot translate the content. 5 Related Work In the following, we review the studies in NMT and the application of deconvolution in NLP. Kalchbrenner and Blunsom (2013); Cho et al. (2014); Sutskever et al. (2014) studied the application of the encoder-decoder framework on the machine translation task, which launched the development of NMT. Another significant innovation in this field is the attention mechanism, which builds connection between the translated contents and the source text (Bahdanau et al., 2014; Luong et al., 2015). To im- prove the quality of NMT, researchers have focused on improving the attention mechanism. Tu et al. (2016) and Mi et al. (2016) modeled coverage in the NMT, Meng et al. (2016) and Xiong et al. (2017) incorporated the external memory to the attention, and Xia et al. (2017) as well as Lin et al. (2018a) utilized the information from the previous generation by target-side attention and memory for attention history respectively. For more target-side information, Ma et al. (2018b) incorporated bag of words as target. A breakthrough of NMT in recent years is that Vaswani et al. (2017) invented a model only with the attention mechanism that reached the state-of-the-art performance. Although many researches in NLP focused on the application of RNN, CNN is also an important type of network for the study of language (Kim, 2014; Kalchbrenner et al., 2014; Zhang et al., 2015; Lin et al., 2018b). Also, its application in NMT has been successful (Gehring et al., 2017). Recently, deconvolution was applied to modeling text (Zhang et al., 2017; Shen et al., 2017), which is able to construct a representation of high quality with the self-contained information. Text: 基因 科学家 的 目标 是 , 提供 诊断 工具 以 发现 致病 的 缺陷 基因 Gold: the goal of geneticists is to provide diagnostic tools to identify defective genes that cause diseases Seq2Seq: the objective of genetic scientists is to provide genes to detect genetic genetic genes DeconvDec: the objective of the gene scientist is to provide diagnostic tools to detect the defective genes (a) Text: 叛军 暗杀 两位 菲 国 国会 议员 后, 菲律宾 总统 雅罗育 在 二零零一 年 中期 停止 与 共 党 谈判 。 Gold: after the rebels assassinated two philippine legislators , philippine president arroyo ceased negotiations with the communist party in mid 2001 . Seq2Seq: philippine president gloria arroyo stopped the two philippine parliament members in the mid - autumn festival . DeconvDec: philippine president gloria arroyo stopped holding talks with the communist party after the rebels assassinated two philippine parliament members . (b) Text: 中国 红十字会 已 在 24日 地震 发生 后 紧急 向 新疆 灾区 调拨 25万 元 人民币 , 又 于 25日 向 灾区 派出 救灾 工作组 。 Gold: china red cross has released 250 thousand renminbi for the xinjiang disaster area immediately after the earthquake on the 24th . a disaster relief team was dispatched to the area on the 25th . Seq2Seq: , emergency relief team sent an emergency team to xinjiang for disaster relief in the disaster areas the red cross society of china ( red cross ) , the china red cross society ( red cross ) after the earthquake on 24 june . DeconvDec: the china red cross society has sent 250,000 yuan to the disaster areas in xinjiang after the earthquake occurred on the 24 th, and sent a relief team to disaster disaster areas on the 25 th. (c) Table 3: Two examples of the translation of our model in comparison with the conventional attention- based Seq2Seq model on the NIST 2003 Chinese-to-English translation task. The errors in the translation are colored in red and the successful translation of some particular contents are colored in yellow (e.g., the contents that the model successfully translates but the other does not). 6 Conclusion and Future Work In this paper, we propose a new model with the global decoding mechanism. With our deconvolution- based decoder, which provides global information of the target-side contexts, the model can effectively exploit the information for the inference of syntactic structure and semantic meaning in the transla- tion. Experimental results on the Chinese-to-English translation and English-to-Vietnamese translation demonstrate that our model outperforms the baseline models, and the analysis shows that our model gen- erates less repetitive translation and demonstrates higher robustness to the sentences of different lengths. Furthermore, the case study shows that the translation of our model better observes the syntactic and semantic requirements for the translation and generates coherent and accurate translation with fewer irrelevant contents. In the future, we will further develop analysis of the mechanism of deconvolution in NMT and try to figure out its generalized patterns for the construction of the target-side contexts. Acknowledgements This work was supported in part by National Natural Science Foundation of China (No. 61673028) and the National Thousand Young Talents Program. Xu Sun is the corresponding author of this paper. References G Altmann and M Steedman. 1988. Interaction with context during human sentence processing. Cogni- tion, 30(3):191. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. CoRR, abs/1409.0473. Mauro Cettolo, Jan Niehues, Sebastian Stuker, Luisa Bentivogli, Roldano Cattoni, and Marcello Fed- erico. 2015. The iwslt 2015 evaluation campaign. Proc. of IWSLT, Da Nang, Vietnam. Kyunghyun Cho, Bart van Merrienboer, C¸ aglar G ulc¸ehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In EMNLP 2014, pages 1724–1734. Duy Vu Hoang Cong, Gholamreza Haffari, and Trevor Cohn. 2017. Towards decoding as continuous optimisation in neural machine translation. In EMNLP 2017, pages 146–156. Lyn Frazier. 1987. Sentence Processing: A Tutorial Review. Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N. Dauphin. 2017. Convolutional sequence to sequence learning. In ICML 2017, pages 1243–1252. Ross Girshick. 2015. Fast r-cnn. Computer Science. Sepp Hochreiter and Jurgen Schmidhuber. 1997. Long short-term memory. Neural Computation, 9(8):1735–1780. Po-Sen Huang, Chong Wang, Dengyong Zhou, and Li Deng. 2017. Neural phrase-based machine trans- lation. CoRR, abs/1706.05565. Nal Kalchbrenner and Phil Blunsom. 2013. Recurrent continuous translation models. In EMNLP 2013, pages 1700–1709. Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. 2014. A convolutional neural network for modelling sentences. In ACL 2014, pages 655–665. Yoon Kim. 2014. Convolutional neural networks for sentence classification. In EMNLP 2014, pages 1746–1751. Diederik P. Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. CoRR, abs/1412.6980. Junyang Lin, Shuming Ma, Qi Su, and Xu Sun. 2018a. Decoding-history-based adaptive control of attention for neural machine translation. CoRR, abs/1802.01812. Junyang Lin, Xu Sun, Shuming Ma, and Qi Su. 2018b. Global encoding for abstractive summarization. CoRR, abs/1805.03989. Lemao Liu, Masao Utiyama, Andrew Finch, and Eiichiro Sumita. 2016. Agreement on target- bidirectional neural machine translation. In NAACL HLT 2016, pages 411–416. Jonathan Long, Evan Shelhamer, and Trevor Darrell. 2015. Fully convolutional networks for semantic segmentation. In CVPR 2015, pages 3431–3440. Minh-Thang Luong and Christopher D Manning. 2015. Stanford neural machine translation systems In Proceedings of the International Workshop on Spoken Language for spoken language domains. Translation. Thang Luong, Hieu Pham, and Christopher D. Manning. 2015. Effective approaches to attention-based neural machine translation. In EMNLP 2015, pages 1412–1421. Shuming Ma, Xu Sun, Wei Li, Sujian Li, Wenjie Li, and Xuancheng Ren. 2018a. Query and output: Generating words by querying distributed word representations for paraphrase generation. In NAACL- HLT 2018, pages 196–206. Shuming Ma, Xu Sun, Yizhong Wang, and Junyang Lin. 2018b. Bag-of-words as target for neural machine translation. CoRR, abs/1805.04871. Fandong Meng, Zhengdong Lu, Hang Li, and Qun Liu. 2016. Interactive attention for neural machine translation. In COLING 2016, pages 2174–2185. Haitao Mi, Baskaran Sankaran, Zhiguo Wang, and Abe Ittycheriah. 2016. Coverage embedding models for neural machine translation. In EMNLP 2016, pages 955–960. Vinod Nair and Geoffrey E. Hinton. 2010. Rectified linear units improve restricted boltzmann machines. In ICML 2010, pages 807–814. Eugene A Nida. 1969. Science of translation. Language, pages 483–498. Hyeonwoo Noh, Seunghoon Hong, and Bohyung Han. 2015. Learning deconvolution network for se- mantic segmentation. In ICCV 2015, pages 1520–1528. Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In ACL, 2002, pages 311–318. Abigail See, Peter J. Liu, and Christopher D. Manning. 2017. Get to the point: Summarization with pointer-generator networks. In ACL 2017, pages 1073–1083. Dinghan Shen, Yizhe Zhang, Ricardo Henao, Qinliang Su, and Lawrence Carin. 2017. Deconvolutional latent-variable model for text sequence matching. CoRR, abs/1709.07109. Jinsong Su, Zhixing Tan, Deyi Xiong, and Yang Liu. 2016. Lattice-based recurrent neural network encoders for neural machine translation. CoRR, abs/1609.07730. Xu Sun, Bingzhen Wei, Xuancheng Ren, and Shuming Ma. 2017. Label embedding network: Learning label representation for soft training of deep networks. CoRR, abs/1710.10393. Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural net- works. In NIPS, 2014, pages 3104–3112. J. C. Trueswell, M. K. Tanenhaus, and S. M. Garnsey. 1994. Semantic influences on parsing: Use of thematic role information in syntactic ambiguity resolution. Journal of Memory and Language, 33(3):285–318. J. C. Trueswell, M. K. Tanenhaus, and C Kello. 1993. Verb-specific constraints in sentence process- ing: separating effects of lexical preference from garden-paths. Journal of Experimental Psychology Learning Memory and Cognition, 19(3):528–553. Zhaopeng Tu, Zhengdong Lu, Yang Liu, Xiaohua Liu, and Hang Li. 2016. Modeling coverage for neural machine translation. In ACL 2016. Lorraine K. Tyler and William D. Marslen-Wilson. 1977. The on-line effects of semantic context on syntactic processing. Journal of Verbal Learning and Verbal Behavior, 16(6):683–692. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. CoRR, abs/1706.03762. Mingxuan Wang, Zhengdong Lu, Hang Li, and Qun Liu. 2016. Memory-enhanced decoder for neural machine translation. In EMNLP 2016, pages 278–286. Yingce Xia, Fei Tian, Tao Qin, Nenghai Yu, and Tie-Yan Liu. 2017. Sequence generation with target attention. In Machine Learning and Knowledge Discovery in Databases - European Conference, ECML PKDD 2017, Skopje, Macedonia, September 18-22, 2017, Proceedings, Part I, pages 816–831. Hao Xiong, Zhongjun He, Xiaoguang Hu, and Hua Wu. 2017. Multi-channel encoder for neural machine translation. CoRR, abs/1712.02109. Xiang Zhang, Junbo Jake Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In NIPS, 2015, pages 649–657. Yizhe Zhang, Dinghan Shen, Guoyin Wang, Zhe Gan, Ricardo Henao, and Lawrence Carin. 2017. De- convolutional paragraph representation learning. In NIPS 2017, pages 4172–4182.
1706.03762
5
1706
2017-12-06T03:30:32
Attention Is All You Need
[ "cs.CL", "cs.LG" ]
The dominant sequence transduction models are based on complex recurrent or convolutional neural networks in an encoder-decoder configuration. The best performing models also connect the encoder and decoder through an attention mechanism. We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely. Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train. Our model achieves 28.4 BLEU on the WMT 2014 English-to-German translation task, improving over the existing best results, including ensembles by over 2 BLEU. On the WMT 2014 English-to-French translation task, our model establishes a new single-model state-of-the-art BLEU score of 41.8 after training for 3.5 days on eight GPUs, a small fraction of the training costs of the best models from the literature. We show that the Transformer generalizes well to other tasks by applying it successfully to English constituency parsing both with large and limited training data.
cs.CL
cs
Attention Is All You Need Ashish Vaswani∗ Google Brain [email protected] Noam Shazeer∗ Google Brain [email protected] Niki Parmar∗ Google Research [email protected] Jakob Uszkoreit∗ Google Research [email protected] Llion Jones∗ Google Research [email protected] Aidan N. Gomez∗ † University of Toronto [email protected] Łukasz Kaiser∗ Google Brain [email protected] Illia Polosukhin∗ ‡ [email protected] Abstract The dominant sequence transduction models are based on complex recurrent or convolutional neural networks that include an encoder and a decoder. The best performing models also connect the encoder and decoder through an attention mechanism. We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely. Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train. Our model achieves 28.4 BLEU on the WMT 2014 English- to-German translation task, improving over the existing best results, including ensembles, by over 2 BLEU. On the WMT 2014 English-to-French translation task, our model establishes a new single-model state-of-the-art BLEU score of 41.8 after training for 3.5 days on eight GPUs, a small fraction of the training costs of the best models from the literature. We show that the Transformer generalizes well to other tasks by applying it successfully to English constituency parsing both with large and limited training data. 1 Introduction Recurrent neural networks, long short-term memory [13] and gated recurrent [7] neural networks in particular, have been firmly established as state of the art approaches in sequence modeling and ∗Equal contribution. Listing order is random. Jakob proposed replacing RNNs with self-attention and started the effort to evaluate this idea. Ashish, with Illia, designed and implemented the first Transformer models and has been crucially involved in every aspect of this work. Noam proposed scaled dot-product attention, multi-head attention and the parameter-free position representation and became the other person involved in nearly every detail. Niki designed, implemented, tuned and evaluated countless model variants in our original codebase and tensor2tensor. Llion also experimented with novel model variants, was responsible for our initial codebase, and efficient inference and visualizations. Lukasz and Aidan spent countless long days designing various parts of and implementing tensor2tensor, replacing our earlier codebase, greatly improving results and massively accelerating our research. †Work performed while at Google Brain. ‡Work performed while at Google Research. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. transduction problems such as language modeling and machine translation [35, 2, 5]. Numerous efforts have since continued to push the boundaries of recurrent language models and encoder-decoder architectures [38, 24, 15]. Recurrent models typically factor computation along the symbol positions of the input and output sequences. Aligning the positions to steps in computation time, they generate a sequence of hidden states ht, as a function of the previous hidden state ht−1 and the input for position t. This inherently sequential nature precludes parallelization within training examples, which becomes critical at longer sequence lengths, as memory constraints limit batching across examples. Recent work has achieved significant improvements in computational efficiency through factorization tricks [21] and conditional computation [32], while also improving model performance in case of the latter. The fundamental constraint of sequential computation, however, remains. Attention mechanisms have become an integral part of compelling sequence modeling and transduc- tion models in various tasks, allowing modeling of dependencies without regard to their distance in the input or output sequences [2, 19]. In all but a few cases [27], however, such attention mechanisms are used in conjunction with a recurrent network. In this work we propose the Transformer, a model architecture eschewing recurrence and instead relying entirely on an attention mechanism to draw global dependencies between input and output. The Transformer allows for significantly more parallelization and can reach a new state of the art in translation quality after being trained for as little as twelve hours on eight P100 GPUs. 2 Background The goal of reducing sequential computation also forms the foundation of the Extended Neural GPU [16], ByteNet [18] and ConvS2S [9], all of which use convolutional neural networks as basic building block, computing hidden representations in parallel for all input and output positions. In these models, the number of operations required to relate signals from two arbitrary input or output positions grows in the distance between positions, linearly for ConvS2S and logarithmically for ByteNet. This makes it more difficult to learn dependencies between distant positions [12]. In the Transformer this is reduced to a constant number of operations, albeit at the cost of reduced effective resolution due to averaging attention-weighted positions, an effect we counteract with Multi-Head Attention as described in section 3.2. Self-attention, sometimes called intra-attention is an attention mechanism relating different positions of a single sequence in order to compute a representation of the sequence. Self-attention has been used successfully in a variety of tasks including reading comprehension, abstractive summarization, textual entailment and learning task-independent sentence representations [4, 27, 28, 22]. End-to-end memory networks are based on a recurrent attention mechanism instead of sequence- aligned recurrence and have been shown to perform well on simple-language question answering and language modeling tasks [34]. To the best of our knowledge, however, the Transformer is the first transduction model relying entirely on self-attention to compute representations of its input and output without using sequence- aligned RNNs or convolution. In the following sections, we will describe the Transformer, motivate self-attention and discuss its advantages over models such as [17, 18] and [9]. 3 Model Architecture Most competitive neural sequence transduction models have an encoder-decoder structure [5, 2, 35]. Here, the encoder maps an input sequence of symbol representations (x1, ..., xn) to a sequence of continuous representations z = (z1, ..., zn). Given z, the decoder then generates an output sequence (y1, ..., ym) of symbols one element at a time. At each step the model is auto-regressive [10], consuming the previously generated symbols as additional input when generating the next. The Transformer follows this overall architecture using stacked self-attention and point-wise, fully connected layers for both the encoder and decoder, shown in the left and right halves of Figure 1, respectively. 2 Figure 1: The Transformer - model architecture. 3.1 Encoder and Decoder Stacks Encoder: The encoder is composed of a stack of N = 6 identical layers. Each layer has two sub-layers. The first is a multi-head self-attention mechanism, and the second is a simple, position- wise fully connected feed-forward network. We employ a residual connection [11] around each of the two sub-layers, followed by layer normalization [1]. That is, the output of each sub-layer is LayerNorm(x + Sublayer(x)), where Sublayer(x) is the function implemented by the sub-layer itself. To facilitate these residual connections, all sub-layers in the model, as well as the embedding layers, produce outputs of dimension dmodel = 512. Decoder: The decoder is also composed of a stack of N = 6 identical layers. In addition to the two sub-layers in each encoder layer, the decoder inserts a third sub-layer, which performs multi-head attention over the output of the encoder stack. Similar to the encoder, we employ residual connections around each of the sub-layers, followed by layer normalization. We also modify the self-attention sub-layer in the decoder stack to prevent positions from attending to subsequent positions. This masking, combined with fact that the output embeddings are offset by one position, ensures that the predictions for position i can depend only on the known outputs at positions less than i. 3.2 Attention An attention function can be described as mapping a query and a set of key-value pairs to an output, where the query, keys, values, and output are all vectors. The output is computed as a weighted sum of the values, where the weight assigned to each value is computed by a compatibility function of the query with the corresponding key. 3 Scaled Dot-Product Attention Multi-Head Attention Figure 2: (left) Scaled Dot-Product Attention. (right) Multi-Head Attention consists of several attention layers running in parallel. 3.2.1 Scaled Dot-Product Attention √ We call our particular attention "Scaled Dot-Product Attention" (Figure 2). The input consists of queries and keys of dimension dk, and values of dimension dv. We compute the dot products of the query with all keys, divide each by dk, and apply a softmax function to obtain the weights on the values. In practice, we compute the attention function on a set of queries simultaneously, packed together into a matrix Q. The keys and values are also packed together into matrices K and V . We compute the matrix of outputs as: Attention(Q, K, V ) = softmax( QK T√ dk )V (1) 1√ dk The two most commonly used attention functions are additive attention [2], and dot-product (multi- plicative) attention. Dot-product attention is identical to our algorithm, except for the scaling factor of . Additive attention computes the compatibility function using a feed-forward network with a single hidden layer. While the two are similar in theoretical complexity, dot-product attention is much faster and more space-efficient in practice, since it can be implemented using highly optimized matrix multiplication code. While for small values of dk the two mechanisms perform similarly, additive attention outperforms dot product attention without scaling for larger values of dk [3]. We suspect that for large values of dk, the dot products grow large in magnitude, pushing the softmax function into regions where it has extremely small gradients 4. To counteract this effect, we scale the dot products by 1√ dk . 3.2.2 Multi-Head Attention Instead of performing a single attention function with dmodel-dimensional keys, values and queries, we found it beneficial to linearly project the queries, keys and values h times with different, learned linear projections to dk, dk and dv dimensions, respectively. On each of these projected versions of queries, keys and values we then perform the attention function in parallel, yielding dv-dimensional output values. These are concatenated and once again projected, resulting in the final values, as depicted in Figure 2. variables with mean 0 and variance 1. Then their dot product, q · k =(cid:80)dk 4To illustrate why the dot products get large, assume that the components of q and k are independent random i=1 qiki, has mean 0 and variance dk. 4 Multi-head attention allows the model to jointly attend to information from different representation subspaces at different positions. With a single attention head, averaging inhibits this. MultiHead(Q, K, V ) = Concat(head1, ..., headh)W O where headi = Attention(QW Q i , KW K i , V W V i ) Where the projections are parameter matrices W Q and W O ∈ Rhdv×dmodel. In this work we employ h = 8 parallel attention layers, or heads. For each of these we use dk = dv = dmodel/h = 64. Due to the reduced dimension of each head, the total computational cost is similar to that of single-head attention with full dimensionality. i ∈ Rdmodel×dv i ∈ Rdmodel×dk, W K i ∈ Rdmodel×dk, W V 3.2.3 Applications of Attention in our Model The Transformer uses multi-head attention in three different ways: • In "encoder-decoder attention" layers, the queries come from the previous decoder layer, and the memory keys and values come from the output of the encoder. This allows every position in the decoder to attend over all positions in the input sequence. This mimics the typical encoder-decoder attention mechanisms in sequence-to-sequence models such as [38, 2, 9]. • The encoder contains self-attention layers. In a self-attention layer all of the keys, values and queries come from the same place, in this case, the output of the previous layer in the encoder. Each position in the encoder can attend to all positions in the previous layer of the encoder. • Similarly, self-attention layers in the decoder allow each position in the decoder to attend to all positions in the decoder up to and including that position. We need to prevent leftward information flow in the decoder to preserve the auto-regressive property. We implement this inside of scaled dot-product attention by masking out (setting to −∞) all values in the input of the softmax which correspond to illegal connections. See Figure 2. 3.3 Position-wise Feed-Forward Networks In addition to attention sub-layers, each of the layers in our encoder and decoder contains a fully connected feed-forward network, which is applied to each position separately and identically. This consists of two linear transformations with a ReLU activation in between. FFN(x) = max(0, xW1 + b1)W2 + b2 (2) While the linear transformations are the same across different positions, they use different parameters from layer to layer. Another way of describing this is as two convolutions with kernel size 1. The dimensionality of input and output is dmodel = 512, and the inner-layer has dimensionality df f = 2048. 3.4 Embeddings and Softmax Similarly to other sequence transduction models, we use learned embeddings to convert the input tokens and output tokens to vectors of dimension dmodel. We also use the usual learned linear transfor- mation and softmax function to convert the decoder output to predicted next-token probabilities. In our model, we share the same weight matrix between the two embedding layers and the pre-softmax linear transformation, similar to [30]. In the embedding layers, we multiply those weights by dmodel. √ 3.5 Positional Encoding Since our model contains no recurrence and no convolution, in order for the model to make use of the order of the sequence, we must inject some information about the relative or absolute position of the 5 Table 1: Maximum path lengths, per-layer complexity and minimum number of sequential operations for different layer types. n is the sequence length, d is the representation dimension, k is the kernel size of convolutions and r the size of the neighborhood in restricted self-attention. Layer Type Complexity per Layer Self-Attention Recurrent Convolutional Self-Attention (restricted) O(n2 · d) O(n · d2) O(k · n · d2) O(r · n · d) Sequential Maximum Path Length Operations O(1) O(n) O(1) O(1) O(1) O(n) O(logk(n)) O(n/r) tokens in the sequence. To this end, we add "positional encodings" to the input embeddings at the bottoms of the encoder and decoder stacks. The positional encodings have the same dimension dmodel as the embeddings, so that the two can be summed. There are many choices of positional encodings, learned and fixed [9]. In this work, we use sine and cosine functions of different frequencies: P E(pos,2i) = sin(pos/100002i/dmodel) P E(pos,2i+1) = cos(pos/100002i/dmodel) where pos is the position and i is the dimension. That is, each dimension of the positional encoding corresponds to a sinusoid. The wavelengths form a geometric progression from 2π to 10000 · 2π. We chose this function because we hypothesized it would allow the model to easily learn to attend by relative positions, since for any fixed offset k, P Epos+k can be represented as a linear function of P Epos. We also experimented with using learned positional embeddings [9] instead, and found that the two versions produced nearly identical results (see Table 3 row (E)). We chose the sinusoidal version because it may allow the model to extrapolate to sequence lengths longer than the ones encountered during training. 4 Why Self-Attention In this section we compare various aspects of self-attention layers to the recurrent and convolu- tional layers commonly used for mapping one variable-length sequence of symbol representations (x1, ..., xn) to another sequence of equal length (z1, ..., zn), with xi, zi ∈ Rd, such as a hidden layer in a typical sequence transduction encoder or decoder. Motivating our use of self-attention we consider three desiderata. One is the total computational complexity per layer. Another is the amount of computation that can be parallelized, as measured by the minimum number of sequential operations required. The third is the path length between long-range dependencies in the network. Learning long-range dependencies is a key challenge in many sequence transduction tasks. One key factor affecting the ability to learn such dependencies is the length of the paths forward and backward signals have to traverse in the network. The shorter these paths between any combination of positions in the input and output sequences, the easier it is to learn long-range dependencies [12]. Hence we also compare the maximum path length between any two input and output positions in networks composed of the different layer types. As noted in Table 1, a self-attention layer connects all positions with a constant number of sequentially executed operations, whereas a recurrent layer requires O(n) sequential operations. In terms of computational complexity, self-attention layers are faster than recurrent layers when the sequence length n is smaller than the representation dimensionality d, which is most often the case with sentence representations used by state-of-the-art models in machine translations, such as word-piece [38] and byte-pair [31] representations. To improve computational performance for tasks involving very long sequences, self-attention could be restricted to considering only a neighborhood of size r in 6 the input sequence centered around the respective output position. This would increase the maximum path length to O(n/r). We plan to investigate this approach further in future work. A single convolutional layer with kernel width k < n does not connect all pairs of input and output positions. Doing so requires a stack of O(n/k) convolutional layers in the case of contiguous kernels, or O(logk(n)) in the case of dilated convolutions [18], increasing the length of the longest paths between any two positions in the network. Convolutional layers are generally more expensive than recurrent layers, by a factor of k. Separable convolutions [6], however, decrease the complexity considerably, to O(k · n · d + n · d2). Even with k = n, however, the complexity of a separable convolution is equal to the combination of a self-attention layer and a point-wise feed-forward layer, the approach we take in our model. As side benefit, self-attention could yield more interpretable models. We inspect attention distributions from our models and present and discuss examples in the appendix. Not only do individual attention heads clearly learn to perform different tasks, many appear to exhibit behavior related to the syntactic and semantic structure of the sentences. 5 Training This section describes the training regime for our models. 5.1 Training Data and Batching We trained on the standard WMT 2014 English-German dataset consisting of about 4.5 million sentence pairs. Sentences were encoded using byte-pair encoding [3], which has a shared source- target vocabulary of about 37000 tokens. For English-French, we used the significantly larger WMT 2014 English-French dataset consisting of 36M sentences and split tokens into a 32000 word-piece vocabulary [38]. Sentence pairs were batched together by approximate sequence length. Each training batch contained a set of sentence pairs containing approximately 25000 source tokens and 25000 target tokens. 5.2 Hardware and Schedule We trained our models on one machine with 8 NVIDIA P100 GPUs. For our base models using the hyperparameters described throughout the paper, each training step took about 0.4 seconds. We trained the base models for a total of 100,000 steps or 12 hours. For our big models,(described on the bottom line of table 3), step time was 1.0 seconds. The big models were trained for 300,000 steps (3.5 days). 5.3 Optimizer We used the Adam optimizer [20] with β1 = 0.9, β2 = 0.98 and  = 10−9. We varied the learning rate over the course of training, according to the formula: lrate = d−0.5 model · min(step_num−0.5, step_num · warmup_steps−1.5) (3) This corresponds to increasing the learning rate linearly for the first warmup_steps training steps, and decreasing it thereafter proportionally to the inverse square root of the step number. We used warmup_steps = 4000. 5.4 Regularization We employ three types of regularization during training: Residual Dropout We apply dropout [33] to the output of each sub-layer, before it is added to the sub-layer input and normalized. In addition, we apply dropout to the sums of the embeddings and the positional encodings in both the encoder and decoder stacks. For the base model, we use a rate of Pdrop = 0.1. 7 Table 2: The Transformer achieves better BLEU scores than previous state-of-the-art models on the English-to-German and English-to-French newstest2014 tests at a fraction of the training cost. Model ByteNet [18] Deep-Att + PosUnk [39] GNMT + RL [38] ConvS2S [9] MoE [32] Deep-Att + PosUnk Ensemble [39] GNMT + RL Ensemble [38] ConvS2S Ensemble [9] Transformer (base model) Transformer (big) BLEU EN-DE EN-FR 23.75 24.6 25.16 26.03 26.30 26.36 27.3 28.4 39.2 39.92 40.46 40.56 40.4 41.16 41.29 38.1 41.8 EN-FR 1.0 · 1020 1.4 · 1020 1.5 · 1020 1.2 · 1020 8.0 · 1020 1.1 · 1021 1.2 · 1021 2.3 · 1019 9.6 · 1018 2.0 · 1019 1.8 · 1020 7.7 · 1019 Training Cost (FLOPs) EN-DE 3.3 · 1018 2.3 · 1019 Label Smoothing During training, we employed label smoothing of value ls = 0.1 [36]. This hurts perplexity, as the model learns to be more unsure, but improves accuracy and BLEU score. 6 Results 6.1 Machine Translation On the WMT 2014 English-to-German translation task, the big transformer model (Transformer (big) in Table 2) outperforms the best previously reported models (including ensembles) by more than 2.0 BLEU, establishing a new state-of-the-art BLEU score of 28.4. The configuration of this model is listed in the bottom line of Table 3. Training took 3.5 days on 8 P100 GPUs. Even our base model surpasses all previously published models and ensembles, at a fraction of the training cost of any of the competitive models. On the WMT 2014 English-to-French translation task, our big model achieves a BLEU score of 41.0, outperforming all of the previously published single models, at less than 1/4 the training cost of the previous state-of-the-art model. The Transformer (big) model trained for English-to-French used dropout rate Pdrop = 0.1, instead of 0.3. For the base models, we used a single model obtained by averaging the last 5 checkpoints, which were written at 10-minute intervals. For the big models, we averaged the last 20 checkpoints. We used beam search with a beam size of 4 and length penalty α = 0.6 [38]. These hyperparameters were chosen after experimentation on the development set. We set the maximum output length during inference to input length + 50, but terminate early when possible [38]. Table 2 summarizes our results and compares our translation quality and training costs to other model architectures from the literature. We estimate the number of floating point operations used to train a model by multiplying the training time, the number of GPUs used, and an estimate of the sustained single-precision floating-point capacity of each GPU 5. 6.2 Model Variations To evaluate the importance of different components of the Transformer, we varied our base model in different ways, measuring the change in performance on English-to-German translation on the development set, newstest2013. We used beam search as described in the previous section, but no checkpoint averaging. We present these results in Table 3. In Table 3 rows (A), we vary the number of attention heads and the attention key and value dimensions, keeping the amount of computation constant, as described in Section 3.2.2. While single-head attention is 0.9 BLEU worse than the best setting, quality also drops off with too many heads. 5We used values of 2.8, 3.7, 6.0 and 9.5 TFLOPS for K80, K40, M40 and P100, respectively. 8 Table 3: Variations on the Transformer architecture. Unlisted values are identical to those of the base model. All metrics are on the English-to-German translation development set, newstest2013. Listed perplexities are per-wordpiece, according to our byte-pair encoding, and should not be compared to per-word perplexities. N dmodel 6 512 dff 2048 Pdrop 0.1 ls 0.1 dv 64 512 128 32 16 h 8 1 4 16 32 dk 64 512 128 32 16 16 32 2 4 8 256 1024 1024 4096 32 128 32 128 0.0 0.2 0.0 0.2 positional embedding instead of sinusoids 6 1024 4096 16 0.3 base (A) (B) (C) (D) (E) big PPL train steps (dev) 100K 4.92 5.29 5.00 4.91 5.01 5.16 5.01 6.11 5.19 4.88 5.75 4.66 5.12 4.75 5.77 4.95 4.67 5.47 4.92 300K 4.33 BLEU params ×106 (dev) 25.8 65 24.9 25.5 25.8 25.4 25.1 25.4 23.7 25.3 25.5 24.5 26.0 25.4 26.2 24.6 25.5 25.3 25.7 25.7 26.4 58 60 36 50 80 28 168 53 90 213 Table 4: The Transformer generalizes well to English constituency parsing (Results are on Section 23 of WSJ) Parser Training WSJ 23 F1 Vinyals & Kaiser el al. (2014) [37] WSJ only, discriminative WSJ only, discriminative WSJ only, discriminative WSJ only, discriminative WSJ only, discriminative Petrov et al. (2006) [29] Zhu et al. (2013) [40] Dyer et al. (2016) [8] Transformer (4 layers) Zhu et al. (2013) [40] Huang & Harper (2009) [14] McClosky et al. (2006) [26] Vinyals & Kaiser el al. (2014) [37] Transformer (4 layers) Luong et al. (2015) [23] Dyer et al. (2016) [8] semi-supervised semi-supervised semi-supervised semi-supervised semi-supervised multi-task generative 88.3 90.4 90.4 91.7 91.3 91.3 91.3 92.1 92.1 92.7 93.0 93.3 In Table 3 rows (B), we observe that reducing the attention key size dk hurts model quality. This suggests that determining compatibility is not easy and that a more sophisticated compatibility function than dot product may be beneficial. We further observe in rows (C) and (D) that, as expected, bigger models are better, and dropout is very helpful in avoiding over-fitting. In row (E) we replace our sinusoidal positional encoding with learned positional embeddings [9], and observe nearly identical results to the base model. 6.3 English Constituency Parsing To evaluate if the Transformer can generalize to other tasks we performed experiments on English constituency parsing. This task presents specific challenges: the output is subject to strong structural 9 constraints and is significantly longer than the input. Furthermore, RNN sequence-to-sequence models have not been able to attain state-of-the-art results in small-data regimes [37]. We trained a 4-layer transformer with dmodel = 1024 on the Wall Street Journal (WSJ) portion of the Penn Treebank [25], about 40K training sentences. We also trained it in a semi-supervised setting, using the larger high-confidence and BerkleyParser corpora from with approximately 17M sentences [37]. We used a vocabulary of 16K tokens for the WSJ only setting and a vocabulary of 32K tokens for the semi-supervised setting. We performed only a small number of experiments to select the dropout, both attention and residual (section 5.4), learning rates and beam size on the Section 22 development set, all other parameters remained unchanged from the English-to-German base translation model. During inference, we increased the maximum output length to input length + 300. We used a beam size of 21 and α = 0.3 for both WSJ only and the semi-supervised setting. Our results in Table 4 show that despite the lack of task-specific tuning our model performs sur- prisingly well, yielding better results than all previously reported models with the exception of the Recurrent Neural Network Grammar [8]. In contrast to RNN sequence-to-sequence models [37], the Transformer outperforms the Berkeley- Parser [29] even when training only on the WSJ training set of 40K sentences. 7 Conclusion In this work, we presented the Transformer, the first sequence transduction model based entirely on attention, replacing the recurrent layers most commonly used in encoder-decoder architectures with multi-headed self-attention. For translation tasks, the Transformer can be trained significantly faster than architectures based on recurrent or convolutional layers. On both WMT 2014 English-to-German and WMT 2014 English-to-French translation tasks, we achieve a new state of the art. In the former task our best model outperforms even all previously reported ensembles. We are excited about the future of attention-based models and plan to apply them to other tasks. We plan to extend the Transformer to problems involving input and output modalities other than text and to investigate local, restricted attention mechanisms to efficiently handle large inputs and outputs such as images, audio and video. Making generation less sequential is another research goals of ours. The code we used to train and evaluate our models is available at https://github.com/ tensorflow/tensor2tensor. Acknowledgements We are grateful to Nal Kalchbrenner and Stephan Gouws for their fruitful comments, corrections and inspiration. References [1] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. [2] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. CoRR, abs/1409.0473, 2014. [3] Denny Britz, Anna Goldie, Minh-Thang Luong, and Quoc V. Le. Massive exploration of neural machine translation architectures. CoRR, abs/1703.03906, 2017. [4] Jianpeng Cheng, Li Dong, and Mirella Lapata. Long short-term memory-networks for machine reading. arXiv preprint arXiv:1601.06733, 2016. [5] Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. CoRR, abs/1406.1078, 2014. [6] Francois Chollet. Xception: Deep learning with depthwise separable convolutions. arXiv preprint arXiv:1610.02357, 2016. 10 [7] Junyoung Chung, Çaglar Gülçehre, Kyunghyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. CoRR, abs/1412.3555, 2014. [8] Chris Dyer, Adhiguna Kuncoro, Miguel Ballesteros, and Noah A. Smith. Recurrent neural network grammars. In Proc. of NAACL, 2016. [9] Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N. Dauphin. Convolu- tional sequence to sequence learning. arXiv preprint arXiv:1705.03122v2, 2017. [10] Alex Graves. Generating sequences with recurrent neural networks. arXiv:1308.0850, 2013. arXiv preprint [11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for im- age recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. [12] Sepp Hochreiter, Yoshua Bengio, Paolo Frasconi, and Jürgen Schmidhuber. Gradient flow in recurrent nets: the difficulty of learning long-term dependencies, 2001. [13] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [14] Zhongqiang Huang and Mary Harper. Self-training PCFG grammars with latent annotations across languages. In Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing, pages 832–841. ACL, August 2009. [15] Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016. [16] Łukasz Kaiser and Samy Bengio. Can active memory replace attention? In Advances in Neural Information Processing Systems, (NIPS), 2016. [17] Łukasz Kaiser and Ilya Sutskever. Neural GPUs learn algorithms. In International Conference on Learning Representations (ICLR), 2016. [18] Nal Kalchbrenner, Lasse Espeholt, Karen Simonyan, Aaron van den Oord, Alex Graves, and Ko- ray Kavukcuoglu. Neural machine translation in linear time. arXiv preprint arXiv:1610.10099v2, 2017. [19] Yoon Kim, Carl Denton, Luong Hoang, and Alexander M. Rush. Structured attention networks. In International Conference on Learning Representations, 2017. [20] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. [21] Oleksii Kuchaiev and Boris Ginsburg. Factorization tricks for LSTM networks. arXiv preprint arXiv:1703.10722, 2017. [22] Zhouhan Lin, Minwei Feng, Cicero Nogueira dos Santos, Mo Yu, Bing Xiang, Bowen Zhou, and Yoshua Bengio. A structured self-attentive sentence embedding. arXiv preprint arXiv:1703.03130, 2017. [23] Minh-Thang Luong, Quoc V. Le, Ilya Sutskever, Oriol Vinyals, and Lukasz Kaiser. Multi-task sequence to sequence learning. arXiv preprint arXiv:1511.06114, 2015. [24] Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attention- based neural machine translation. arXiv preprint arXiv:1508.04025, 2015. [25] Mitchell P Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 19(2):313–330, 1993. [26] David McClosky, Eugene Charniak, and Mark Johnson. Effective self-training for parsing. In Proceedings of the Human Language Technology Conference of the NAACL, Main Conference, pages 152–159. ACL, June 2006. 11 [27] Ankur Parikh, Oscar Täckström, Dipanjan Das, and Jakob Uszkoreit. A decomposable attention model. In Empirical Methods in Natural Language Processing, 2016. [28] Romain Paulus, Caiming Xiong, and Richard Socher. A deep reinforced model for abstractive summarization. arXiv preprint arXiv:1705.04304, 2017. [29] Slav Petrov, Leon Barrett, Romain Thibaux, and Dan Klein. Learning accurate, compact, and interpretable tree annotation. In Proceedings of the 21st International Conference on Computational Linguistics and 44th Annual Meeting of the ACL, pages 433–440. ACL, July 2006. [30] Ofir Press and Lior Wolf. Using the output embedding to improve language models. arXiv preprint arXiv:1608.05859, 2016. [31] Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909, 2015. [32] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017. [33] Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdi- nov. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929–1958, 2014. [34] Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 2440–2448. Curran Associates, Inc., 2015. [35] Ilya Sutskever, Oriol Vinyals, and Quoc VV Le. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems, pages 3104–3112, 2014. [36] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. CoRR, abs/1512.00567, 2015. [37] Vinyals & Kaiser, Koo, Petrov, Sutskever, and Hinton. Grammar as a foreign language. In Advances in Neural Information Processing Systems, 2015. [38] Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google's neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. [39] Jie Zhou, Ying Cao, Xuguang Wang, Peng Li, and Wei Xu. Deep recurrent models with fast-forward connections for neural machine translation. CoRR, abs/1606.04199, 2016. [40] Muhua Zhu, Yue Zhang, Wenliang Chen, Min Zhang, and Jingbo Zhu. Fast and accurate shift-reduce constituent parsing. In Proceedings of the 51st Annual Meeting of the ACL (Volume 1: Long Papers), pages 434–443. ACL, August 2013. 12 Attention Visualizations Figure 3: An example of the attention mechanism following long-distance dependencies in the encoder self-attention in layer 5 of 6. Many of the attention heads attend to a distant dependency of the verb 'making', completing the phrase 'making...more difficult'. Attentions here shown only for the word 'making'. Different colors represent different heads. Best viewed in color. 13 Input-Input Layer5ItisinthisspiritthatamajorityofAmericangovernmentshavepassednewlawssince2009makingtheregistrationorvotingprocessmoredifficult.<EOS><pad><pad><pad><pad><pad><pad>ItisinthisspiritthatamajorityofAmericangovernmentshavepassednewlawssince2009makingtheregistrationorvotingprocessmoredifficult.<EOS><pad><pad><pad><pad><pad><pad> Figure 4: Two attention heads, also in layer 5 of 6, apparently involved in anaphora resolution. Top: Full attentions for head 5. Bottom: Isolated attentions from just the word 'its' for attention heads 5 and 6. Note that the attentions are very sharp for this word. 14 Input-Input Layer5TheLawwillneverbeperfect,butitsapplicationshouldbejust-thisiswhatwearemissing,inmyopinion.<EOS><pad>TheLawwillneverbeperfect,butitsapplicationshouldbejust-thisiswhatwearemissing,inmyopinion.<EOS><pad>Input-Input Layer5TheLawwillneverbeperfect,butitsapplicationshouldbejust-thisiswhatwearemissing,inmyopinion.<EOS><pad>TheLawwillneverbeperfect,butitsapplicationshouldbejust-thisiswhatwearemissing,inmyopinion.<EOS><pad> Figure 5: Many of the attention heads exhibit behaviour that seems related to the structure of the sentence. We give two such examples above, from two different heads from the encoder self-attention at layer 5 of 6. The heads clearly learned to perform different tasks. 15 Input-Input Layer5TheLawwillneverbeperfect,butitsapplicationshouldbejust-thisiswhatwearemissing,inmyopinion.<EOS><pad>TheLawwillneverbeperfect,butitsapplicationshouldbejust-thisiswhatwearemissing,inmyopinion.<EOS><pad>Input-Input Layer5TheLawwillneverbeperfect,butitsapplicationshouldbejust-thisiswhatwearemissing,inmyopinion.<EOS><pad>TheLawwillneverbeperfect,butitsapplicationshouldbejust-thisiswhatwearemissing,inmyopinion.<EOS><pad>
1709.01058
2
1709
2018-08-28T14:04:39
A Unified Query-based Generative Model for Question Generation and Question Answering
[ "cs.CL" ]
We propose a query-based generative model for solving both tasks of question generation (QG) and question an- swering (QA). The model follows the classic encoder- decoder framework. The encoder takes a passage and a query as input then performs query understanding by matching the query with the passage from multiple per- spectives. The decoder is an attention-based Long Short Term Memory (LSTM) model with copy and coverage mechanisms. In the QG task, a question is generated from the system given the passage and the target answer, whereas in the QA task, the answer is generated given the question and the passage. During the training stage, we leverage a policy-gradient reinforcement learning algorithm to overcome exposure bias, a major prob- lem resulted from sequence learning with cross-entropy loss. For the QG task, our experiments show higher per- formances than the state-of-the-art results. When used as additional training data, the automatically generated questions even improve the performance of a strong ex- tractive QA system. In addition, our model shows bet- ter performance than the state-of-the-art baselines of the generative QA task.
cs.CL
cs
A Unified Query-based Generative Model for Question Generation and Question Answering Linfeng Song1, Zhiguo Wang2 and Wael Hamza2 1Department of Computer Science, University of Rochester, Rochester, NY 14627 2IBM T.J. Watson Research Center, Yorktown Heights, NY 10598 8 1 0 2 g u A 8 2 ] L C . s c [ 2 v 8 5 0 1 0 . 9 0 7 1 : v i X r a Abstract We propose a query-based generative model for solving both tasks of question generation (QG) and question an- swering (QA). The model follows the classic encoder- decoder framework. The encoder takes a passage and a query as input then performs query understanding by matching the query with the passage from multiple per- spectives. The decoder is an attention-based Long Short Term Memory (LSTM) model with copy and coverage mechanisms. In the QG task, a question is generated from the system given the passage and the target answer, whereas in the QA task, the answer is generated given the question and the passage. During the training stage, we leverage a policy-gradient reinforcement learning algorithm to overcome exposure bias, a major prob- lem resulted from sequence learning with cross-entropy loss. For the QG task, our experiments show higher per- formances than the state-of-the-art results. When used as additional training data, the automatically generated questions even improve the performance of a strong ex- tractive QA system. In addition, our model shows bet- ter performance than the state-of-the-art baselines of the generative QA task. Introduction Recently both question generation and question answering tasks are receiving increasing attention from both the indus- trial and academic communities. The task of question gen- eration (QG) is to generate a fluent and relevant question given a passage and a target answer, while the task of ques- tion answering (QA) is to generate a correct answer given a passage and a question. Both tasks have massive indus- trial values: QA has been used in industrial products such as search engines, while QG is helpful for improving QA systems by automatically increasing the training data. It can also be used to generate questions for educational purposes such as language learning. For the QG task, existing work either entirely ignores the target answer (Du, Shao, and Cardie, 2017) while generat- ing the corresponding question, or directly hard-codes the answer positions into the passage (Zhou et al., 2017; Yang et al., 2017; Subramanian et al., 2017; Tang et al., 2017; Copyright c(cid:13) 2018, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. Wang, Yuan, and Trischler, 2017; Yuan et al., 2017), so that sequence-to-sequence model (Sutskever, Vinyals, and Le, 2014) can be simply utilized. These methods only highlight the answer positions, but neglect other potential interactions between the passage and the target answer. In addition, this kind of methods will shrivel when the target answer does not occur in the passage verbatim. For the QA task, most of the existing literatures (Wang and Jiang, 2016; Wang et al., 2016; Shen et al., 2016; Wang et al., 2017; Chen et al., 2017; Xiong, Zhong, and Socher, 2016; Seo et al., 2016; Lee et al., 2016; Yu et al., 2016; Dhingra et al., 2017) focus on the extractive QA scenario, where they assume that the tar- get answer occurs in the passage verbatim. The task then is to extract a span of consecutive words from the passage as the final answer. However, these methods may not work well on the generative QA scenario, where the correct answer is not a span in the given passage. In this paper, we cast both the QG and QA tasks into one process by firstly matching the input passage against the query, then generating the output according to the match- ing results. Our model follows the classic encoder-decoder framework, where the encoder takes a passage and a query as input, then performs query understanding by matching the query with the passage from multiple perspectives, and the decoder is an attention-based LSTM model with copy (Gul- cehre et al., 2016; Gu et al., 2016; See, Liu, and Manning, 2017) and coverage (Tu et al., 2016; Mi et al., 2016) mecha- nisms. Here a perspective is a way of matching the query and the passage. In the QG task, the input query is the target an- swer, and the decoder generates a question for the target an- swer, whereas in the QA task, the input query is a question, and the decoder generates the corresponding answer. To the best of our knowledge, there is no existing work dealing with both tasks using the same framework. In the QG task, we are the first to investigate query understanding before generating questions. By matching the target answer against the passage from multiple perspectives, our model captures more inter- actions between the answer and the passage, so that it can generate more precise question for the answer. Moreover, our model does not require that the answer literally occurs in the passage. In the QA task, our model generates answers word by word, and it has the capacity to generate answers that do not literally occur in the passage. Therefore, it natu- rally works for the generative QA scenario. Figure 1: Model overview. We first pretrain the model with the cross-entropy loss, then fine tune with policy-gradient reinforcement learning to alleviate the exposure bias problem, resulting from sequence learning with the cross-entropy loss. In our policy-gradient reinforcement learning algorithm, we adopt a similar sam- pling strategy as the scheduled sampling strategy (Bengio et al., 2015) for generating the sampled output. We per- form experiments on the SQuAD dataset (Rajpurkar et al., 2016) for the QG task, and on the "description" subset of the MS-MARCO (Nguyen et al., 2016) dataset for the gen- erative QA task. Experimental results on the QG task show that our model outperforms previous state-of-the-art meth- ods, and the automatically generated questions can even im- prove an extractive QA system. For the generative QA task, our model shows better performance than other generative systems. Model Figure 1 shows the architecture of our model. The model takes two components as input: a passage P = (p1, ..., pj, ..., pN ) of length N, and a query Q = (q1, ..., qi, ..., qM ) of length M, then generates the output sequence X = (x1, ..., xL) word by word. Specifically, the model follows the encoder-decoder framework. The encoder matches each time-step of the passage against all time-steps of the query from multiple perspectives, and encodes the matching result into a "Multi-perspective Memory". In ad- dition, the decoder generates the output sequence one word at a time based on the "Multi-perspective Memory". Multi-Perspective Matching Encoder The left-hand side of Figure 1 depicts the architecture of our encoder. Its goal is to perform comprehensive understanding of the query and the passage. The encoder first represents all words within the passage and the query with word embed- dings (Mikolov et al., 2013). In order to incorporate contex- tual information into the representation of each time-step of the passage or the query, we utilize a bi-directional LSTM (BiLSTM) (Hochreiter and Schmidhuber, 1997) layer to en- code the passage and the query individually: ←− hq i = LSTM( −→ hq i = LSTM( ←− hp j = LSTM( −→ hp j = LSTM( ←−− hq i+1, qi) −−→ hq i−1, qi) ←−− hp j+1, pj) −−→ hp j−1, pj), ←− hq i ; i = [ j = [ ←− hp j ; −→ hp j ]. where qi and pj are embedding of the i-th word in the query and the j-th word in the passage. Then, the contextual vec- tors for each time-step of the query and the passage are constructed by concatenating the outputs from the BiLSTM layer: hq −→ hq i ] and hp We utilize a matching layer on top of the contextual vectors to match each time-step of the passage with all time-steps of the query. Apparently, this is the most crucial layer in our encoder. Inspired by Wang, Hamza, and Florian (2017), we adopt the multi-perspective matching method for the matching layer. We define four matching strategies, as shown in Figure 2, to match the passage with the query from multiple granularities. (1) Full-Matching. As shown in Figure 2 (a), each for- ward (or backward) contextual vector of the passage is com- pared with the last time-step of the forward (or backward) representation of the query. (2) Maxpooling-Matching. As shown in Figure 2 (b), each forward (or backward) contextual vector of the passage is compared with every forward (or backward) contextual &'&(&)…………,',(,-………….'.(.)…………0"0/Multi-perspectiveMatching Layer…1'1(0………AttentionDistributionVocabularyDistributionFinalDistributionMulti-perspectiveMemoryDecoder231−23Encoder similarity according to that perspective is defined as: mk = cos(Wk ◦ v1, Wk ◦ v2), where ◦ is the element-wise multiplication operation. So fm(v1, v2; W) represents the matching results between v1 and v2 from all perspectives. Intuitively, each perspective calculates the cosine similarity between two input vectors, and it is associated with a weight vector trained to highlight different dimensions of the input vectors. This can be re- garded as considering different part of the semantics cap- tured in the vector. The final matching vector mj for each time-step of the passage is the concatenation of the matching results of all four strategies. We also employ another BiLSTM layer on top of the matching layer to smooth the matching results. We concatenate the contextual vectors, hp j , of the passage and matching vectors to be the Multi-perspective Memory H, which contains both the passage information and the match- ing information. LSTM Decoder The right-hand side of Figure 1 is our decoder. Basically, it is an attention-based LSTM model (Bahdanau, Cho, and Bengio, 2014) with copy and coverage mechanisms. The de- coder takes the "Multi-perspective Memory" as the attention memory, and generates the output one word at a time. Concretely, while generating the t-th word xt, the de- coder considers five factors as the input: (1) the "Multi- perspective Memory" H = {h0, ..., hi, ..., hN}, where each vector hi ∈ H aligns to the i-th word in the passage; (2) the previous hidden state of the LSTM model st−1; (3) the em- bedding of previously generated word xt−1; (4) the previous context vector ct−1, which is calculated from the attention mechanism with H being the attentional memory; and (5) the previous coverage vector ut−1, which is the accumula- tion of all attention distributions so far. When t = 0, we initialize s−1, c−1 and u−1 as zero vectors, and fix x−1 to be the embedding of the sentence start token "<s>". For each time-step t, the decoder first feeds the concate- nation of the previous word embedding xt−1 and context vector ct−1 into the LSTM model to update the hidden state: st = LSTM(st−1, [xt−1, ct−1]) Second, the attention distribution αt,i for each time-step of the "Multi-perspective Memory" hi ∈ H is calculated with the following equations: et,i = vT e tanh(Whhi + Wsst + Wuut−1 + be) (cid:80)N exp(et,i) j=1 exp(et,j) αt,i = where Wh, Ws, Wv, be and ve are learnable parameters. The coverage vector ut is then updated by ut = ut−1 + αt. And the new context vector ct is calculated via: N(cid:88) i=1 ct = αt,ihi Figure 2: Diagrams for different matching strategies, where fm is a matching function between two vectors. The inputs include the contextual vector of one time-step of the passage (left orange block) and the contextual vectors of all time- steps of the query (right blue blocks). The output is a vector of matching values (top green block) calculated via fm. vectors of the query, and only the maximum value of each dimension is retained. (3) Attentive-Matching. As shown in Figure 2 (c), we first calculate the cosine similarities between each forward (or backward) contextual vector of the passage and every forward (or backward) contextual vector of the question. Then, we take the cosine similarities as the weights, and cal- culate an attention vector for the entire query by computing a weighted sum of all the contextual vectors of the query. Finally, we match each forward (or backward) contextual vector of the passage with its corresponding attentive vector. (4) Max-Attentive-Matching. As shown in Figure 2 (d), this strategy is similar to the Attentive-Matching strategy. However, instead of taking the weighed sum of all the con- textual vectors as the attentive vector, we pick the contextual vector with the highest cosine similarity as the attentive vec- tor. Then, we match each contextual vector of the passage with its new attentive vector. These four match strategies require a function fm to match two vectors. Theoretically, any functions for match- ing two vectors would work here. Inspired by Wang et al. (2016), we adopt the multi-perspective cosine matching function defined as: m = fm(v1, v2; W), where v1 and v2 are d-dimensional input vectors, W ∈ Rl×d is the learnable parameter of multi-perspective weight, and l is the number of perspectives. Each row Wk ∈ W repre- sents the weights associated with one perspective, and the ......𝑓4......𝑓4𝑓4𝑓4𝑓4............element-wise maximum(a) Full-Matching(b) Maxpooling-Matching......weighted-sum𝑓4(c) Attentive-Matching......max𝑓4(d) Max-Attentive-Matching Then, the output probability distribution over a vocabulary of words at the current state is calculated by: Pvocab = softmax(V2(V1[st, ct] + b1) + b2), where V1, V2, b1 and b2 are learnable parameters. The num- ber of rows in V2 represents the number of words in the vo- cabulary. On top of the LSTM decoder, we adopt the copy mecha- nism (Gulcehre et al., 2016; Gu et al., 2016; See, Liu, and Manning, 2017) to integrate the attention distribution into the final vocabulary distribution. The probability distribu- tion is defined as the interpolation between two probability distributions: Pf inal = gtPvocab + (1 − gt)Pattn, where gt is the switch for controlling generating a word from the vocabulary or directly copying it from the passage. Pvocab is the generating probability distribution as defined above, and Pattn is calculated based on the attention dis- tribution αt by merging probabilities of duplicated words. Intuitively, gt is relevant to the current decoder state, the at- tention results and the input. Therefore, inspired by See, Liu, and Manning (2017), we define it as: s st + wT x xt−1 + bg), gt = σ(wT c ct + wT where vectors wc, ws, wx and scalar bg are learnable param- eters. Policy Gradient Reinforcement Learning via Scheduled Sampling A common way of training a sequence generation model is to optimize the log-likelihood of the gold-standard out- put sequence Y ∗ = y∗ T with the cross-entropy loss: 0, ..., y∗ t , ..., y∗ lce = − T(cid:88) log p(y∗ t y∗ t−1, ..., y∗ 0, X; θ), t=1 where X is the model input, and θ represents the trainable model parameters. However, this method suffers from two main issues. First, during the training stage, the ground-truth of the previous word y∗ t−1 is taken as the input to predict the probabilities of the next word yt. But, in the testing stage, the ground- truth y∗ t−1 is not available, and the model has to rely on the previously generated word yt−1. If the model selected a dif- ferent yt−1 than the ground-truth y∗ t−1, then the following generated sequence could deviate from the gold-standard se- quence. This issue is known as the "exposure bias problem". Second, models trained with the cross-entropy loss are opti- mized for the log-likelihood of a sequence which is different from the evaluation metrics. In this work, we utilize a reinforcement learning method to address the exposure bias problem and directly optimize the evaluation metrics. Concretely, we adopt the "REIN- FORCE with a baseline" algorithm (Williams, 1992), a well- known policy-gradient reinforcement learning algorithm, to train our model, because it has shown the effectiveness for several sequence generation tasks (Paulus, Xiong, and if random.random() < pf lip then Data: gold-standard sequence Y ∗ Data: greedy search sequence Y Result: sampled sequence Y s if i < len( Y ) then 1 S ← []; 2 for i in range(len(Y ∗)) do 3 4 5 6 7 8 9 10 11 12 end end S.append(Y ∗[i]) ; end else else S.append( Y [i]) ; S.append(Y ∗[i]) ; Algorithm 1: Scheduled Sampling Strategy T(cid:88) Socher, 2017; Rennie et al., 2016). Formally, the loss func- tion is defined as: lrl = (r( Y ) − r(Y s)) log p(ys tys t−1, ..., ys 0, x; θ), t=1 0, ..., ys T is the sampled sequence, Y is the where Y s = ys sequence generated from a baseline, and the function r(Y ) is the reward calculated based on the evaluation metric. In- tuitively, the loss function lrl enlarges the log-probability of the sampled sequence Y s, if Y s is better than the baseline Y in terms of the evaluation metric r(Y ), or vice versa. In this work, for the QG task, we use the BLEU score (Papineni et al., 2002) as the reward, and for the QA task, we use the ROUGE score (Lin, 2004) as the reward. tys t−1, ..., ys 1, x; θ). However, Following Rennie et al. (2016), we take the greedy search result from the current model as the baseline se- quence Y . Rennie et al. (2016) generated the sampled sequence Y s according to the probability distribution of this sampling strategy p(ys doesn't work well for our tasks. One possible reason is that our tasks have much larger search space. Inspired by Ben- gio et al. (2015), we designed a new "Scheduled Sampling" strategy to construct the sampled sequence Y s from both the gold-standard sequence Y ∗ and the greedy search se- quence Y . As shown in Algorithm 1, it goes through the gold-standard sequence Y ∗ word by word (Line 2), and re- places with the corresponding word from the greedy search sequence Y with probability pf lip (Line 4-8). If the greedy search sequence is shorter than the gold-standard sequence, the ground-truth word is used after exceeding the end of the greedy search sequence (Line 10). Our experiments show that sampling the sequence according to the model distribu- tion, as Rennie et al. (2016) does, usually produces outputs worse than the greedy search sequence, so it does not help very much. On the other hand, our sampling strategy usually generates better outputs than the greedy search sequence. Experimental Setup We conduct experiments on two tasks: question generation (QG) and generative question answering (QA). Models Du, Shao, and Cardie (2017) Zhou et al. (2017) w/o rich feature (baseline) MPQG MPQG+R -- -- 12.84 13.98 -- -- 18.02 18.77 Split 1 Split 2 BLEU-4 METEOR ROUGE-L BLEU-4 12.28 39.75 16.62 -- -- 41.39 42.72 -- 13.29 12.59(*) 13.39 13.91 Table 1: Results on question generation. *There is no published scores for Zhou et al. (2017) without the rich features, so we re-implemented their system and show the result. Question Generation For the QG task, we evaluate the quality of generated questions with some automatic eval- uation metrics such as BLEU (Papineni et al., 2002) and ROUGE (Lin, 2004), as well as their effectiveness in im- proving an extractive QA system. We conduct experiments on the SQuAD dataset (Rajpurkar et al., 2016) by comparing our model with Du, Shao, and Cardie (2017) and Zhou et al. (2017) in terms of BLEU, METEOR (Banerjee and Lavie, 2005) and ROUGE. The dataset contains 536 articles and over 100k questions related to the articles. Here, we follow Du, Shao, and Cardie (2017) and Zhou et al. (2017) to con- duct experiments on the accessible part as our entire dataset. Since Du, Shao, and Cardie (2017) and Zhou et al. (2017) conducted their experiments using different training/dev/test split, we conduct experiments on both splits, and compare with their reported performance. In addition, we also evaluate our model from a more prac- tical aspect by examining whether the automatically gener- ated questions are helpful for improving an extractive QA system. We use the data split of Du, Shao, and Cardie (2017), and conduct experiments on low-resource settings, where only (10%, 20%, or 50%) of the human-labeled ques- tions in the training data are available. For example, in the 10% setting, we first train our QG model with the 10% avail- able training data, then generate questions for the remaining 90% instances in the training data, where the human-labeled questions are abandoned.1 Finally, we train an extractive QA system with the 10% human-labeled questions and the 90% automatically generated questions. The extractive QA sys- tem we choose is Wang et al. (2016), but our framework does not make any assumptions about the extractive QA systems being used. Generative QA For this task, we conduct experiments on the MS MARCO dataset (Nguyen et al., 2016), which con- tains around 100k queries and 1M passages. The design pur- pose of this dataset is to generate the answer given the top 10 returned documents from a search engine, where the an- swer is not necessary in the documents. Even though the answers in this dataset are human generated rather than ex- tracted from candidate documents, we found that the an- swers of around 66% questions can be exactly matched in the passage, and a large number of the remaining answers 1We assume the gold answers are available when generating questions for the remaining 90% instances, and leave automatic answer selection as future work, since the primary goal here is to evaluate the quality of automatically generated questions. just have a small difference with the content in the passages.2 Among all types of questions ("numeric", "entity", "loca- tion", "person" and "description"), the "description" subset has the most percentage of answers that can not be exactly matched in the passage. Therefore, for the generative QA ex- periments, we follow Nguyen et al. (2016) to conduct exper- iments on the "description" subset, and compare with their reported results. For both tasks, our model is first trained for 15 epochs with the cross-entropy loss, then fine-tuned for 15 epochs using our policy gradient algorithm. Adam (Kingma and Ba, 2014) is used for parameter optimization, and the learning rate is set to 0.005 and 0.0001 for cross entropy and pol- icy gradient phases respectively. The encoder and decoder share the same pre-trained word embeddings, which are the 300-dimensional GloVe (Pennington, Socher, and Man- ning, 2014) word vectors pre-trained from the 840B com- mon crawl corpus, and the embeddings are not updated dur- ing training. For all experiments, the flip probability pf lip is set to 0.1, the number of perspectives l is set to 5, and the weight for the coverage loss η is set to 0.1. For all experi- ments, the model yielding the best performance on the dev set is picked for evaluation on the test set. Experimental Results Question Generation We compare our model with Du, Shao, and Cardie (2017) and Zhou et al. (2017) on the question generation task, and show the results in Table 1. Since Zhou et al. (2017) adopts rich features (such as named entity tags and part-of-speech tags), we re-implement a version without these rich features (w/o rich feature) for fair comparison. We also implement two versions of our model: (1) MPQG is our model only trained with the cross-entropy loss, and (2) MPQG+R is our model fine-tuned with the policy gradient reinforcement learning algorithm after pretraining. First, our MPQG model outperforms the comparing sys- tems on both data splits, which shows the effectiveness of our multi-perspective matching encoder. Our MPQG model, which only takes word features, shows even better perfor- mance than the feature-rich (with POS and NE tags) system of Zhou et al. (2017). Du, Shao, and Cardie (2017) utilized the sequence-to-sequence (Peng et al., 2016) model to take the passage as input and then generated the questions, where 2They are generated by dropping or paraphrasing one span from the supporting sentence (containing answer) in the passage. Passage: nikola tesla -lrb- serbian cyrillic : Nikola Tesla ; 10 july [1856] -- 7 january 1943 -rrb- was a serbian american inventor , electrical engineer , mechanical engineer , physicist , and futur- ist best known for his contributions to the design of the modern alternating current -lrb- ac -rrb- electricity supply system . Target Answer: 1856 Reference: when was nikola tesla born ? Baseline: when was nikola tesla 's inventor ? MPQG: when was nikola tesla born ? MPQG+R: when was nikola tesla born ? Passage: zhéng -lrb- chinese : 正 -rrb- meaning " [right] " , " just " , or " true " , would have received the mongolian adjectival modifiers , creating " jenggis " , which in medieval romanization would be written " genghis " . Target Answer: right Reference: what does zhéng mean ? Baseline: what are the names of the " jenggis " ? MPQG: what does zhéng UNK mean ? MPQG+R: what does zhéng mean ? Passage: kenya is known for its [safaris , diverse climate and ge- ography , and expansive wildlife reserves] and national parks such as the east and west tsavo national park , the maasai mara , lake nakuru national park , and aberdares national park . Target Answer: safaris , diverse climate and geography , and ex- pansive wildlife reserves Reference: what is kenya known for ? Baseline: what are the two major rivers that are known for the east and west tsavo national park ? MPQG: what is kenya known for ? MPQG+R: what is kenya known for ? Table 2: Examples of generated questions. In each passage, the target answer is italic and is within brackets. The baseline is our implementation of Zhou et al. (2017) without rich features. they entirely ignored the target answer. Therefore, the gen- erated questions are independent of the target answer. Zhou et al. (2017) hard-coded the target answer positions into the passage, and employed the sequence-to-sequence model to consume the position-encoded passages, then generated the questions. This method only considered the target answer positions, but neglected the relations between the target an- swer and other parts of the passage. If the target answer does not literally occur in the passage, this method will shrivel. Conversely, our MPQG model matches the target answer against the passage from multiple perspectives. Therefore, it can capture more interactions between the target answer and the passage, and result in a more suitable question for the target answer. Second, our MPQG+R model works better than the MPQG model on both splits, showing the effectiveness of our policy gradient training algorithm. To better illustrate the advantage of our model, we show some comparative results of different models in Table 2, where the Baseline system is our implementation of Zhou et al. (2017) without rich features. Generally, our MPQG model generates better questions than Zhou et al. (2017). Taking the first case as an example, the baseline fails to rec- ognize that "1856" is the year when "nikola tesla" is born, while our MPQG learns that from the pattern "day month year - day month year", which frequently occurs in the train- ing data. For the third case, the baseline fails to generate the correct output as the query is very long and complicated. On the other hand, our MPQG model is able to capture that, because it performs comprehensive matching between the target answer and the passages. In addition, our MPQG+R model fixes some small mistakes of MPQG by directly op- timizing the evaluation metrics, such as the second case in Table 2. Question Generation for Extractive QA Table 3 shows the results on improving an extractive QA system with automatically generated questions. Here F1 measures the overlap between the prediction and the refer- ence in terms of bags of tokens, and exact match (EM) mea- sures the percentage where the prediction is identical to the reference (Rajpurkar et al., 2016). The baseline is trained only on the part where gold questions are available, while the others are trained on the combination of the gold ques- tions and the automatically generated questions, but with different methods of generating questions: (1) w/ window, a strong baseline from Yang et al. (2017), uses the previous and the following 5 tokens of the target answer as the pseudo question, and (2) w/ MPQG+R generates questions with our MPQG+R model. First, we can see that w/ MPQG+R outperforms the base- line under all settings in terms of both F1 and EM scores, especially under the 10% setting, where we observe 3 and 5 points gains in terms of F1 and EM scores. This shows the effectiveness of our model. Second, the comparing re- sults between w/ MPQG+R and w/ window show that the improvements of w/ MPQG+R are not due to simply enlarg- ing the training data, but because of the higher quality of the generated questions. Yang et al. (2017) showed that w/ win- dow can significantly improve their baseline, while it is not true in our experiment. One reason could be that our base- line is much stronger than theirs. For example, our system achieves 50.54% EM score under 10% setting, while theirs only got an EM score of 24.92%. Generative QA For the generative QA experiment, we compare our model with the generative models in Nguyen et al. (2016) on the "description" subset of MS-MARCO dataset. Table 4 shows the corresponding performance. Among all the com- paring methods, Best Passage selects the best passage in terms of the ROUGE-L score, and obviously it accesses the reference. Passage Ranking ranks the passage by a deep structured semantic model of Huang et al. (2013). Se- quence to Sequence is a vanilla sequence-to-sequence model (Sutskever, Vinyals, and Le, 2014). Memory Network adopts the end-to-end memory network (Sukhbaatar et al., 2015) as the encoder, and a vanilla RNN model as the decoder. We also implement a baseline system "vanilla-cosine", which only apply the vanilla cosine similarity for the matching function fm in our encoder, and is only trained with the cross-entropy loss. First, we can see that our MPQG+R model outperforms all other systems by a large margin, and is close to Best Passage, even though Best Passage accesses the reference. Methods 10% 20% 50% 10% 20% 50% 61.61 64.13 baseline w/ window 61.23 64.00 w/ MPQG+R 64.52 65.30 73.67 73.35 74.50 50.54 50.48 55.44 F1 68.38 66.80 69.28 Exact Match (EM) 57.63 56.31 59.66 Table 3: Results on improving extractive QA with automatically generated questions. Models Best Passage Passage Ranking Sequence to Sequence Memory Network vanilla-cosine MPQG MPQG+R ROUGE-L 35.1 17.7 8.9 11.9 19.9 31.5 32.9 Table 4: Results on the "description" subset of MS-MARCO. Besides, our MPQG model outperforms the vanilla-cosine model showing the effectiveness of our multi-perspective matching encoder. Finally, MPQG+R outperforms MPQG by around 1.4 ROUGE-L points, showing the effectiveness of our policy-gradient learning strategy. Related Work For question generation (QG), our work extends previous work (Du, Shao, and Cardie, 2017; Zhou et al., 2017; Yang et al., 2017; Subramanian et al., 2017; Tang et al., 2017; Wang, Yuan, and Trischler, 2017; Yuan et al., 2017) by per- forming query understanding. Tang et al. (2017); Yang et al. (2017) joins the QG task with the QA task, but they still con- duct the QG task. The only difference is that they directly optimize the QA performance rather than a general metric (such as BLEU). On the other hand, our model can conduct both tasks of QG and QA. For question answering (QA), most previous works (Wang and Jiang, 2016; Wang et al., 2016; Shen et al., 2016; Wang et al., 2017; Chen et al., 2017; Xiong, Zhong, and Socher, 2016; Seo et al., 2016; Lee et al., 2016; Yu et al., 2016; Dhingra et al., 2017) focus on the extractive QA scenario, which predicts a continuous span in the passage as the answer. Obviously, they rely on the assumption that the answer can be exactly matched in the passage. On the other hand, our model performs generative QA, which gen- erates the answer word-by-word, and does not rely on this assumption. The generative QA is valuable for studying, as we can not guarantee the assumption being true for all sce- narios. Tan et al. (2017) claims to perform generative QA, but it still relies on an extractive QA system by generating answers from the extractive results. One notable exclusion is Yin et al. (2015), which generate factoid answers from a knowledge base (KB). One significant difference is that their method matches the query against a KB, whereas ours performs matching against unstructured texts. Besides, we leverage policy gradient learning to alleviate the exposure bias problem, which they also suffer from. Conclusion In this paper, we introduced a query-based generative model, which can be used on both question generation and ques- tion answering. Following the encoder-decoder framework, a multi-perspective matching encoder is designed to perform query and passage understanding, and an LSTM model with coverage and copy mechanisms is leveraged as the decoder to generate the target sequence. In addition, we leverage a policy gradient learning algorithm to alleviate the exposure bias problem, which generative models suffer from when training with the cross-entropy loss. Experiments on both question generation and question answering tasks show su- perior performances of our model, which outperforms the state-of-the-art models. From the results we conclude that query understanding is important for question generation, and that policy gradient is effective on tackling the expo- sure bias problem resulted by sequence learning with cross- entropy loss. For the future work, we will consider adding adversarial data, which has been shown successful on plenty of areas(Peng et al., 2018). References Bahdanau, D.; Cho, K.; and Bengio, Y. 2014. Neural ma- chine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473. Banerjee, S., and Lavie, A. 2005. METEOR: An auto- matic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the ACL work- shop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization. Bengio, S.; Vinyals, O.; Jaitly, N.; and Shazeer, N. 2015. Scheduled sampling for sequence prediction with recur- rent neural networks. In NIPS 2015, 1171 -- 1179. Chen, D.; Fisch, A.; Weston, J.; and Bordes, A. 2017. Read- ing wikipedia to answer open-domain questions. In Pro- ceedings of ACL 2017. Dhingra, B.; Liu, H.; Yang, Z.; Cohen, W.; and Salakhutdi- nov, R. 2017. Gated-attention readers for text compre- hension. In Proceedings of ACL 2017. Du, X.; Shao, J.; and Cardie, C. 2017. Learning to ask: Neu- ral question generation for reading comprehension. arXiv preprint arXiv:1705.00106. Gu, J.; Lu, Z.; Li, H.; and Li, V. O. 2016. Incorporating copying mechanism in sequence-to-sequence learning. In Proceedings of ACL 2017. Gulcehre, C.; Ahn, S.; Nallapati, R.; Zhou, B.; and Bengio, Y. 2016. Pointing the unknown words. In Proceedings of ACL 2017. Hochreiter, S., and Schmidhuber, J. 1997. Long short-term memory. Neural computation 9(8):1735 -- 1780. Huang, P.-S.; He, X.; Gao, J.; Deng, L.; Acero, A.; and Heck, L. 2013. Learning deep structured semantic models for In Proceedings of web search using clickthrough data. CIKM 2013, 2333 -- 2338. Kingma, D., and Ba, J. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. Lee, K.; Salant, S.; Kwiatkowski, T.; Parikh, A.; Das, D.; and Berant, J. 2016. Learning recurrent span represen- tations for extractive question answering. arXiv preprint arXiv:1611.01436. Lin, C.-Y. 2004. Rouge: A package for automatic evalua- tion of summaries. In Text summarization branches out: Proceedings of the ACL-04 workshop. Barcelona, Spain. Mi, H.; Sankaran, B.; Wang, Z.; and Ittycheriah, A. 2016. A coverage embedding model for neural machine transla- tion. In EMNLP 2016. Mikolov, T.; Chen, K.; Corrado, G.; and Dean, J. 2013. Ef- ficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781. Nguyen, T.; Rosenberg, M.; Song, X.; Gao, J.; Tiwary, S.; Majumder, R.; and Deng, L. 2016. MS MARCO: A hu- man generated machine reading comprehension dataset. arXiv preprint arXiv:1611.09268. Papineni, K.; Roukos, S.; Ward, T.; and Zhu, W.-J. 2002. BLEU: a method for automatic evaluation of machine translation. In Proceedings of ACL 2002. Paulus, R.; Xiong, C.; and Socher, R. 2017. A deep reinforced model for abstractive summarization. arXiv preprint arXiv:1705.04304. Peng, X.; Feris, R. S.; Wang, X.; and Metaxas, D. N. 2016. A recurrent encoder-decoder network for sequential face alignment. In European conference on computer vision, 38 -- 56. Springer, Cham. Peng, X.; Tang, Z.; Yang, F.; Feris, R. S.; and Metaxas, D. 2018. Jointly optimize data augmentation and network training: Adversarial data augmentation in human pose In Proceedings of the IEEE Conference on estimation. Computer Vision and Pattern Recognition, 2226 -- 2234. Pennington, J.; Socher, R.; and Manning, C. 2014. Glove: Global vectors for word representation. In Proceedings of EMNLP 2014, 1532 -- 1543. Rajpurkar, P.; Zhang, J.; Lopyrev, K.; and Liang, P. 2016. SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of EMNLP 2016, 2383 -- 2392. Rennie, S. J.; Marcheret, E.; Mroueh, Y.; Ross, J.; and Goel, V. 2016. Self-critical sequence training for image cap- tioning. arXiv preprint arXiv:1612.00563. See, A.; Liu, P. J.; and Manning, C. D. 2017. Get to the point: Summarization with pointer-generator networks. arXiv preprint arXiv:1704.04368. Seo, M.; Kembhavi, A.; Farhadi, A.; and Hajishirzi, H. 2016. Bidirectional attention flow for machine comprehension. arXiv preprint arXiv:1611.01603. Shen, Y.; Huang, P.-S.; Gao, J.; and Chen, W. 2016. Rea- sonet: Learning to stop reading in machine comprehen- sion. arXiv preprint arXiv:1609.05284. Subramanian, S.; Wang, T.; Yuan, X.; and Trischler, A. 2017. Neural models for key phrase detection and ques- tion generation. arXiv preprint arXiv:1706.04560. Sukhbaatar, S.; Weston, J.; Fergus, R.; et al. 2015. End-to- end memory networks. In NIPS 2015, 2440 -- 2448. Sutskever, I.; Vinyals, O.; and Le, Q. V. 2014. Sequence to sequence learning with neural networks. In NIPS 2014, 3104 -- 3112. Tan, C.; Wei, F.; Yang, N.; Lv, W.; and Zhou, M. 2017. S-net: From answer extraction to answer generation arXiv preprint for machine reading comprehension. arXiv:1706.04815. Tang, D.; Duan, N.; Qin, T.; and Zhou, M. 2017. Question answering and question generation as dual tasks. arXiv preprint arXiv:1706.02027. Tu, Z.; Lu, Z.; Liu, Y.; Liu, X.; and Li, H. 2016. Modeling coverage for neural machine translation. arXiv preprint arXiv:1601.04811. Wang, S., and Jiang, J. 2016. Machine comprehension arXiv preprint using match-lstm and answer pointer. arXiv:1608.07905. Wang, Z.; Mi, H.; Hamza, W.; and Florian, R. 2016. Multi- perspective context matching for machine comprehen- sion. arXiv preprint arXiv:1612.04211. Wang, W.; Yang, N.; Wei, F.; Chang, B.; and Zhou, M. 2017. Gated self-matching networks for reading comprehension and question answering. In Proceedings of ACL 2017. Wang, Z.; Hamza, W.; and Florian, R. 2017. Bilateral multi- perspective matching for natural language sentences. In IJCAI 2017. Wang, T.; Yuan, X.; and Trischler, A. 2017. A joint model for question answering and question generation. arXiv preprint arXiv:1706.01450. Williams, R. J. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Ma- chine learning 8(3-4):229 -- 256. Xiong, C.; Zhong, V.; and Socher, R. 2016. Dynamic coat- tention networks for question answering. arXiv preprint arXiv:1611.01604. Yang, Z.; Hu, J.; Salakhutdinov, R.; and Cohen, W. W. Semi-supervised qa with generative domain- 2017. adaptive nets. arXiv preprint arXiv:1702.02206. Yin, J.; Jiang, X.; Lu, Z.; Shang, L.; Li, H.; and Li, X. 2015. arXiv preprint Neural generative question answering. arXiv:1512.01337. Yu, Y.; Zhang, W.; Hasan, K.; Yu, M.; Xiang, B.; and Zhou, B. 2016. End-to-end answer chunk extraction and ranking for reading comprehension. arXiv preprint arXiv:1610.09996. Yuan, X.; Wang, T.; Gulcehre, C.; Sordoni, A.; Bachman, P.; Subramanian, S.; Zhang, S.; and Trischler, A. 2017. Ma- chine comprehension by text-to-text neural question gen- eration. arXiv preprint arXiv:1705.02012. Zhou, Q.; Yang, N.; Wei, F.; Tan, C.; Bao, H.; and Zhou, M. 2017. Neural question generation from text: A prelimi- nary study. arXiv preprint arXiv:1704.01792.
1612.04426
1
1612
2016-12-13T23:09:49
Improving Neural Language Models with a Continuous Cache
[ "cs.CL", "cs.LG" ]
We propose an extension to neural network language models to adapt their prediction to the recent history. Our model is a simplified version of memory augmented networks, which stores past hidden activations as memory and accesses them through a dot product with the current hidden activation. This mechanism is very efficient and scales to very large memory sizes. We also draw a link between the use of external memory in neural network and cache models used with count based language models. We demonstrate on several language model datasets that our approach performs significantly better than recent memory augmented networks.
cs.CL
cs
Under review as a conference paper at ICLR 2017 IMPROVING NEURAL LANGUAGE MODELS WITH A CONTINUOUS CACHE Edouard Grave, Armand Joulin, Nicolas Usunier Facebook AI Research {egrave,ajoulin,usunier}@fb.com ABSTRACT We propose an extension to neural network language models to adapt their pre- diction to the recent history. Our model is a simplified version of memory aug- mented networks, which stores past hidden activations as memory and accesses them through a dot product with the current hidden activation. This mechanism is very efficient and scales to very large memory sizes. We also draw a link between the use of external memory in neural network and cache models used with count based language models. We demonstrate on several language model datasets that our approach performs significantly better than recent memory augmented net- works. 1 INTRODUCTION Language modeling is a core problem in natural language processing, with many applications such as machine translation (Brown et al., 1993), speech recognition (Bahl et al., 1983) or dialogue agents (Stolcke et al., 2000). While traditional neural networks language models have obtained state- of-the-art performance in this domain (Jozefowicz et al., 2016; Mikolov et al., 2010), they lack the capacity to adapt to their recent history, limiting their application to dynamic environments (Dodge et al., 2015). A recent approach to solve this problem is to augment these networks with an external memory (Graves et al., 2014; Grefenstette et al., 2015; Joulin & Mikolov, 2015; Sukhbaatar et al., 2015). These models can potentially use their external memory to store new information and adapt to a changing environment. While these networks have obtained promising results on language modeling datasets (Sukhbaatar et al., 2015), they are quite computationally expensive. Typically, they have to learn a parametrizable mechanism to read or write to memory cells (Graves et al., 2014; Joulin & Mikolov, 2015). This may limit both the size of their usable memory as well as the quantity of data they can be trained on. In this work, we propose a very light-weight alternative that shares some of the properties of memory augmented networks, notably the capability to dynamically adapt over time. By minimizing the computation burden of the memory, we are able to use larger memory and scale to bigger datasets. We observe in practice that this allows us to surpass the perfomance of memory augmented networks on different language modeling tasks. Our model share some similarities with a model proposed by Kuhn (1988), called the cache model. A cache model stores a simple representation of the recent past, often in the form of unigrams, and uses them for prediction (Kuhn & De Mori, 1990). This contextual information is quite cheap to store and can be accessed efficiently. It also does not need any training and can be appplied on top of any model. This makes this model particularly interesting for domain adaptation (Kneser & Steinbiss, 1993). Our main contribution is to propose a continuous version of the cache model, called Neural Cache Model, that can be adapted to any neural network language model. We store recent hidden activations and use them as representation for the context. Using simply a dot-product with the current hidden activations, they turn out to be extremely informative for prediction. Our model requires no training and can be used on any pre-trained neural networks. It also scales effortlessly to thousands of memory cells. We demonstrate the quality of the Neural Cache models on several language model tasks and the LAMBADA dataset (Paperno et al., 2016). 1 Under review as a conference paper at ICLR 2017 2 LANGUAGE MODELING A language model is a probability distribution over sequences of words. Let V be the size of the vocabulary; each word is represented by a one-hot encoding vector x in RV = V, corresponding to its index in the vocabulary. Using the chain rule, the probability assigned to a sequence of words x1, . . . , xT can be factorized as T(cid:89) p(x1, ..., xT ) = p(xt xt−1, ..., x1). t=1 Language modeling is often framed as learning the conditional probability over words, given the history (Bahl et al., 1983). This conditional probability is traditionally approximated with non-parameteric models based on counting statistics (Goodman, 2001). In particular, smoothed N-gram models (Katz, 1987; Kneser & Ney, 1995) achieve good performance in practice (Mikolov et al., 2011). Parametrized alternatives are either maximum entropy language models (Rosenfeld, 1996), feedforward networks (Bengio et al., 2003) or recurrent networks (Mikolov et al., 2010). In particular, recurrent networks are currently the best solution to approximate this conditional probability, achieving state-of-the-arts performance on standard language modeling benchmarks (Jozefowicz et al., 2016; Zilly et al., 2016). Recurrent networks. Assuming that we have a vector ht ∈ Rd encoding the history xt, ..., x1, the conditional probability of a word w can be parametrized as pvocab(w xt, ..., x1) ∝ exp(h(cid:62) t ow). The history vector ht is computed by a recurrent network by recursively applying an equation of the form ht = Φ (xt, ht−1) , where Φ is a function depending on the architecture of the network. Several architecture for recur- rent networks have been proposed, such as the Elman network (Elman, 1990), the long short-term memory (LSTM) (Hochreiter & Schmidhuber, 1997) or the gated recurrent unit (GRU) (Chung et al., 2014). One of the simplest recurrent networks is the Elman network (Elman, 1990), where ht = σ (Lxt + Rht−1) , where σ is a non-linearity such as the logistic or tanh functions, L ∈ Rd×V is a word embedding matrix and R ∈ Rd×d is the recurrent matrix. The LSTM architecture is particularly interesting in the context of language modelling (Jozefowicz et al., 2016) and we refer the reader to Graves et al. (2013) for details on this architecture. The parameters of recurrent neural network language models are learned by minimizing the nega- tive log-likelihood of the training data. This objective function is usually minimized by using the stochastic gradient descent algorithm, or variants such as Adagrad (Duchi et al., 2011). The gradient is computed using the truncated backpropagation through time algorithm (Werbos, 1990; Williams & Peng, 1990). Cache model. After a word appears once in a document, it is much more likely to appear again. As an example, the frequency of the word tiger on the Wikipedia page of the same name is 2.8%, compared to 0.0037% over the whole Wikipedia. Cache models exploit this simple observation to improve n-gram language models by capturing long-range dependencies in documents. More precisely, these models have a cache component, which contains the words that appeared in the recent history (either the document or a fixed number of words). A simple language model, such as a unigram or smoothed bigram model, is fitted on the words of the cache and interpolated with the static language model (trained over a larger dataset). This technique has many advantages. First, this is a very efficient way to adapt a language model to a new domain. Second, such models can predict out-of-vocabulary words (OOV words), after seeing them once. Finally, this helps capture long-range dependencies in documents, in order to generate more coherent text. 2 Under review as a conference paper at ICLR 2017 Id R (h1, x2) (h2, x3) (h3, x4) Id Id R R h1 L x1 h2 L x2 Id h3 L x3 x5 O h4 L x4 3 NEURAL CACHE MODEL Figure 1: The neural cache stores the previous hidden states in memory cells. They are then used as keys to re- trieve their corresponding word, that is the next word. There is no transfor- mation applied to the storage during writing and reading. The Neural Cache Model adds a cache-like memory to neural network language models. It exploits the hidden representations ht to define a probability distribution over the words in the cache. As illustrated Figure 1, the cache stores pairs (hi, xi+1) of a hidden representation, and the word which was generated based on this representation (we remind the reader that the vector hi encodes the history xi, ..., x1). At time t, we then define a probability distribution over words stored in the cache based on the stored hidden representations and the current one ht as pcache(w h1..t, x1..t) ∝ t−1(cid:88) 1{w=xi+1} exp(θh(cid:62) t hi) i=1 of point view of memory-augmented where the scalar θ is a parameter which controls the flatness of the distribution. When θ is equal to zero, the probability distribution over the history is uniform, and our model is equivalent to a unigram cache model (Kuhn & De Mori, 1990). From the probability pcache(w h1..t, x1..t) given by the neural cache model can be interpreted as the probability to retrieve the word w from the memory given the query ht, where the desired answer is the next word xt+1. Using previous hidden states as keys for the words in the memory, the memory lookup operator can be implemented with simple dot products between the keys and the query. In contrast to existing memory-augmented neural networks, the neural cache model avoids the need to learn the memory lookup operator. Such a cache can thus be added to a pre-trained recurrent neural language model without fine tuning of the parameters, and large cache size can be used with negligible impact on the computational cost of a prediction. neural networks, the Neural cache language model. Following the standard practice in n-gram cache-based language models, the final probability of a word is given by the linear interpolation of the cache language model with the regular language model, obtaining: p(w h1..t, x1..t) = (1 − λ)pvocab(w ht) + λpcache(w h1..t, x1..t) . Instead of taking a linear interpolation between the two distribution with a fixed λ, we also consider a global normalization over the two distribution: p(w h1..t, x1..t) ∝ exp(h(cid:62) t ow) + 1{w=xi+1} exp(θh(cid:62) t hi + α) . i=1 This corresponds to taking a softmax over the vocabulary and the words in the cache. The parameter α controls the weight of the cache component, and is the counterpart of the λ parameter for linear interpolation. The addition of the neural cache to a recurrent neural language model inherits the advantages of n- gram caches in usual cache-based models: The probability distribution over words is updated online depending on the context, and out-of-vocabulary words can be predicted as soon as they have been seen at least once in the recent history. The neural cache also inherits the ability of the hidden states of recurrent neural networks to model longer-term contexts than small n-grams, and thus allows for a finer modeling of the current context than e.g., unigram caches. 3 (cid:32) t−1(cid:88) (cid:33) Under review as a conference paper at ICLR 2017 Figure 2: Perplexity on the validation set of Penn Tree Bank for linear interpolation (left) and global normalization (right), for various values of hyperparameters θ, λ and α. We use a cache model of size 500. The base model has a validation perplexity of 86.9. The best linear interpolation has a perplexity of 74.6, while the best global normalization has a perplexity of 74.9. Model RNN+LSA+KN5+cache (Mikolov & Zweig, 2012) LSTM (Zaremba et al., 2014) Variational LSTM (Gal & Ghahramani, 2015) Recurrent Highway Network (Zilly et al., 2016) Pointer Sentinel LSTM (Merity et al., 2016) LSTM (our implem.) Neural cache model Test PPL 90.3 78.4 73.4 66.0 70.9 82.3 72.1 Table 1: Test perplexity on the Penn Tree Bank. Training procedure. For now, we first train the (recurrent) neural network language model, with- out the cache component. We only apply the cache model at test time, and choose the hyperparam- eters θ and λ (or α) on the validation set. A big advantage of our method is that it is very easy and cheap to apply, with already trained neural models. There is no need to perform backpropaga- tion over large contexts, and we can thus apply our method with large cache sizes (larger than one thousand). 4 RELATED WORK Cache model. Adding a cache to a language model was intoducted in the context of speech recog- nition(Kuhn, 1988; Kupiec, 1989; Kuhn & De Mori, 1990). These models were further extended by Jelinek et al. (1991) into a smoothed trigram language model, reporting reduction in both perplexity and word error rates. Della Pietra et al. (1992) adapt the cache to a general n-gram model such that it satisfies marginal constraints obtained from the current document. Adaptive language models. Other adaptive language models have been proposed in the past: Kneser & Steinbiss (1993) and Iyer & Ostendorf (1999) dynamically adapt the parameters of their model to the recent history using different weight interpolation schemes. Bellegarda (2000) and Coccaro & Jurafsky (1998) use latent semantic analysis to adapt their models to the current context. Similarly, topic features have been used with either maximum entropy models (Khudanpur & Wu, 2000) or recurrent networks (Mikolov & Zweig, 2012; Wang & Cho, 2015). Finally, Lau et al. (1993) proposes to use pairs of distant of words to capture long-range dependencies. Memory augmented neural networks. In the context of sequence prediction, several memory augmented neural networks have obtained promising results (Sukhbaatar et al., 2015; Graves et al., 2014; Grefenstette et al., 2015; Joulin & Mikolov, 2015). In particular, Sukhbaatar et al. (2015) stores a representation of the recent past and accesses it using an attention mechanism Bahdanau et al. (2014). Sukhbaatar et al. (2015) shows that this reduces the perplexity for language modeling. 4 0.00.20.40.60.81.0theta0.050.10.150.20.250.30.350.4lambdaLinear interpolation (ptb)788490960.00.080.160.240.320.4theta0.00.51.01.52.02.53.03.5alphaGlobal normalization (ptb)78849096 Under review as a conference paper at ICLR 2017 Figure 3: Perplexity on the validation set of wikitext2 for linear interpolation (left) and global normalization (right), for various values of hyperparameters θ, λ and α. We use a cache model of size 2000. The base model has a validation perplexity of 104.2. The best linear interpolation has a perplexity of 72.1, while the best global normalization has a perplexity of 73.5. Model Zoneout + Variational LSTM (Merity et al., 2016) Pointer Sentinel LSTM (Merity et al., 2016) LSTM (our implementation) Neural cache model (size = 100) Neural cache model (size = 2,000) wikitext2 wikitext103 100.9 80.8 99.3 81.6 68.9 - - 48.7 44.8 40.8 Table 2: Test perplexity on the wikitext datasets. The two datasets share the same validation and test sets, making all the results comparable. This approach has been successfully applied to question answering, when the answer is contained in a given paragraph (Chen et al., 2016; Hermann et al., 2015; Kadlec et al., 2016; Sukhbaatar et al., 2015). Similarly, Vinyals et al. (2015) explores the use of this mechanism to reorder sequences of tokens. Their network uses an attention (or "pointer") over the input sequence to predict which element should be selected as the next output. Gulcehre et al. (2016) have shown that a similar mechanism called pointer softmax could be used in the context of machine translation, to decide which word to copy from the source to target. Independently of our work, Merity et al. (2016) apply the same mechanism to recurrent network. Unlike our work, they uses the current hidden activation as a representation of the current input (while we use it to represent the output). This requires additional learning of a transformation between the current representation and those in the past. The advantage of our approach is that we can scale to very large caches effortlessly. 5 EXPERIMENTS In this section, we evaluate our method on various language modeling datasets, which have different sizes and characteristics. On all datasets, we train a static recurrent neural network language model with LSTM units. We then use the hidden representations from this model to obtain our cache, which is interpolated with the static LSTM model. We also evaluate a unigram cache model interpolated with the static model as another baseline. 5.1 SMALL SCALE EXPERIMENTS Datasets. In this section, we describe experiments performed on two small datasets: the Penn Tree Bank (Marcus et al., 1993) and the wikitext2 (Merity et al., 2016) datasets. The Penn Tree Bank dataset is made of articles from the Wall Street Journal, contains 929k training tokens and has a vocabulary size of 10k. The wikitext2 dataset is derived from Wikipedia articles, contains 2M training tokens and has a vocabulary size of 33k. These datasets contain non-shuffled documents, therefore requiring models to capture inter-sentences dependencies to perform well. 5 0.00.20.40.60.81.0theta0.050.10.150.20.250.30.350.4lambdaLinear interpolation (wikitext2)728088961040.00.080.160.240.320.4theta0.00.51.01.52.02.53.03.5alphaGlobal normalization (wikitext2)72808896104 Under review as a conference paper at ICLR 2017 Figure 4: Test perplexity as a function of the number of words in the cache, for our method and a unigram cache baseline. We observe that our approach can uses larger caches than the baseline. Implementation details. We train recurrent neural network language models with 1024 LSTM units, regularized with dropout (probability of dropping out units equals to 0.65). We use the Ada- grad algorithm, with a learning rate of 0.2, a batchsize of 20 and initial weight uniformly sampled in the range [−0.05, 0.05]. We clip the norm of the gradient to 0.1 and unroll the network for 30 steps. We consider cache sizes on a logarithmic scale, from 50 to 10, 000, and fit the cache hyperparameters on the validation set. Results. We report the perplexity on the validation sets in Figures 2 and 3, for various values of hyperparameters, for linear interpolation and global normalization. First, we observe that on both datasets, the linear interpolation method performs slightly better than the global normalization approach. It is also easier to apply in practice, and we thus use this method in the remainder of this paper. In Tables 1 and 2, we report the test perplexity of our approach and state-of-the-art models. Our approach is competitive with previous models, in particular with the pointer sentinel LSTM model of Merity et al. (2016). On Penn Tree Bank, we note that the improvement over the base model is similar for both methods. On the wikitext2 dataset, both methods obtain similar results when using the same cache size (100 words). Since our method is computationally cheap, it is easy to increase the cache to larger values (2, 000 words), leading to dramatic improvements (30% over the baseline, 12% over a small cache of 100 words). 5.2 MEDIUM SCALE EXPERIMENTS Datasets and implementation details. In this section, we describe experiments performed over two medium scale datasets: text8 and wikitext103. Both datasets are derived from Wikipedia, but different pre-processing were applied. The text8 dataset contains 17M training tokens and has a vocabulary size of 44k words, while the wikitext103 dataset has a training set of size 103M, and a vocabulary size of 267k words. We use the same setting as in the previous section, except for the batchsize (we use 128) and dropout parameters (we use 0.45 for text8 and 0.25 for wikitext103). Since both datasets have large vocabularies, we use the adaptive softmax (Grave et al., 2016) for faster training. Results. We report the test perplexity as a function of the cache size in Figure 4, for the neural cache model and a unigram cache baseline. We observe that our approach can exploits larger cache sizes, compared to the baseline. In Table 2, we observe that the improvement in perplexity of our method over the LSTM baseline on wikitext103 is smaller than for wikitext2 (approx. 16% v.s. 30%). The fact that improvements obtained with more advanced techniques decrease when the size of training data increases has already been observed by Goodman (2001). Both wikitext datasets sharing the same test set, we also observe that the LSTM baseline, trained on 103M tokens (wikitext103), strongly outperforms more sophisticated methods, trained on 2M tokens (wikitext2). For these two reasons, we believe that it is important to evaluate and compare methods on relatively large datasets. 6 102103104cache size (log scale)95100105110115120125perplexitytext8baselineunigramneural102103104cache size (log scale)40414243444546474849perplexitywikitext103baselineunigramneural Under review as a conference paper at ICLR 2017 Model LSTM-500 (Mikolov et al., 2014) SCRNN (Mikolov et al., 2014) MemNN (Sukhbaatar et al., 2015) LSTM-1024 (our implem.) Neural cache model Test 156 161 147 121.8 99.9 Model WB5 (Paperno et al., 2016) WB5+cache (Paperno et al., 2016) LSTM-512 (Paperno et al., 2016) LSTM-1024 (our implem.) Neural cache model Dev 3125 768 5357 4088 138 Ctrl 285 270 149 94 129 (a) text8 (b) lambada Table 3: Perplexity on the text8 and lambada datasets. WB5 stands for 5-gram language model with Witten-Bell smoothing. Figure 5: Perplexity on the development and control sets of lambada, as a function of the interpo- lation parameters λ. 5.3 EXPERIMENTS ON THE LAMBADA DATASET Finally, we report experiments carried on the lambada dataset, introduced by Paperno et al. (2016). This is a dataset of short passages extracted from novels. The goal is to predict the last word of the excerpt. This dataset was built so that human subjects solve the task perfectly when given the full context (approx. 4.6 sentences), but fail to do so when only given the sentence with the target word. Thus, most state-of-the-art language models fail on this dataset. The lambada training set contains approximately 200M tokens and has a vocabulary size of 93, 215. We report results for our method in Table 3, as well the performance of baselines from Paperno et al. (2016). Adding a neural cache model to the LSTM baseline strongly improves the performance on the lambada dataset. We also observe in Figure 5 that the best interpolation parameter between the static model and the cache is not the same for the development and control sets. This is due to the fact that more than 83% of passages of the development set include the target word, while this is true for only 14% of the control set. Ideally, a model should have strong results on both sets. One possible generalization of our model would be to adapt the interpolation parameter based on the current vector representation of the history ht. 6 CONCLUSION We presented the neural cache model to augment neural language models with a longer-term mem- ory that dynamically updates the word probablilities based on the long-term context. A neural cache can be added on top of a pre-trained language model at negligible cost. Our experiments on both lan- guage modeling tasks and the challenging LAMBADA dataset shows that significant performance gains can be expected by adding this external memory component. Technically, the neural cache models is similar to some recent memory-augmented neural networks such as pointer networks. However, its specific design makes it possible to avoid learning the mem- ory lookup component. This makes the neural cache appealing since it can use larger cache sizes than memory-augment networks and can be applied as easily as traditional count-based caches. 7 0.00.20.40.60.81.0lambda0100200300400500600700perplexitylambadaControlDevelopment Under review as a conference paper at ICLR 2017 REFERENCES Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. Lalit R Bahl, Frederick Jelinek, and Robert L Mercer. A maximum likelihood approach to continuous speech recognition. PAMI, 1983. Jerome R Bellegarda. Exploiting latent semantic information in statistical language modeling. Proceedings of the IEEE, 2000. Yoshua Bengio, Réjean Ducharme, Pascal Vincent, and Christian Jauvin. A neural probabilistic language model. JMLR, 2003. Peter F Brown, Vincent J Della Pietra, Stephen A Della Pietra, and Robert L Mercer. The mathematics of statistical machine translation: Parameter estimation. Computational linguistics, 1993. Danqi Chen, Jason Bolton, and Christopher D Manning. A thorough examination of the cnn/daily mail reading comprehension task. arXiv preprint arXiv:1606.02858, 2016. Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated re- current neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. Noah Coccaro and Daniel Jurafsky. Towards better integration of semantic predictors in statistical language modeling. In ICSLP. Citeseer, 1998. Stephen Della Pietra, Vincent Della Pietra, Robert L Mercer, and Salim Roukos. Adaptive language modeling using minimum discriminant estimation. In Proceedings of the workshop on Speech and Natural Language, 1992. Jesse Dodge, Andreea Gane, Xiang Zhang, Antoine Bordes, Sumit Chopra, Alexander Miller, Arthur Szlam, and Jason Weston. Evaluating prerequisite qualities for learning end-to-end dialog systems. arXiv preprint arXiv:1511.06931, 2015. John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. JMLR, 2011. Jeffrey L Elman. Finding structure in time. Cognitive science, 1990. Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural net- works. arXiv preprint arXiv:1512.05287, 2015. Joshua T Goodman. A bit of progress in language modeling. Computer Speech & Language, 2001. Edouard Grave, Armand Joulin, Moustapha Cissé, David Grangier, and Hervé Jégou. Efficient softmax ap- proximation for gpus. arXiv preprint arXiv:1609.04309, 2016. A. Graves, A. Mohamed, and G. Hinton. Speech recognition with deep recurrent neural networks. In ICASSP, 2013. Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems, pp. 1828–1836, 2015. Caglar Gulcehre, Sungjin Ahn, Ramesh Nallapati, Bowen Zhou, and Yoshua Bengio. Pointing the unknown words. arXiv preprint arXiv:1603.08148, 2016. Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In NIPS, 2015. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 1997. Rukmini M Iyer and Mari Ostendorf. Modeling long distance dependence in language: Topic mixtures versus dynamic cache models. IEEE Transactions on speech and audio processing, 1999. Frederick Jelinek, Bernard Merialdo, Salim Roukos, and Martin Strauss. A dynamic language model for speech recognition. In HLT, 1991. Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Advances in Neural Information Processing Systems, pp. 190–198, 2015. 8 Under review as a conference paper at ICLR 2017 Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016. Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text understanding with the attention sum reader network. arXiv preprint arXiv:1603.01547, 2016. Slava M Katz. Estimation of probabilities from sparse data for the language model component of a speech recognizer. ICASSP, 1987. Sanjeev Khudanpur and Jun Wu. Maximum entropy techniques for exploiting syntactic, semantic and colloca- tional dependencies in language modeling. Computer Speech & Language, 2000. Reinhard Kneser and Hermann Ney. Improved backing-off for m-gram language modeling. In ICASSP, 1995. Reinhard Kneser and Volker Steinbiss. On the dynamic adaptation of stochastic language models. In ICASSP, 1993. Roland Kuhn. Speech recognition and the frequency of recently used words: A modified markov model for natural language. In Proceedings of the 12th conference on Computational linguistics-Volume 1, 1988. Roland Kuhn and Renato De Mori. A cache-based natural language model for speech recognition. PAMI, 1990. Julien Kupiec. Probabilistic models of short and long distance word dependencies in running text. In Proceed- ings of the workshop on Speech and Natural Language, 1989. Raymond Lau, Ronald Rosenfeld, and Salim Roukos. Trigger-based language models: A maximum entropy approach. In ICASSP, 1993. Mitchell P Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 1993. Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016. Tomas Mikolov and Geoffrey Zweig. Context dependent recurrent neural network language model. In SLT, 2012. Tomas Mikolov, Martin Karafiát, Lukas Burget, Jan Cernock`y, and Sanjeev Khudanpur. Recurrent neural network based language model. In INTERSPEECH, 2010. Tomas Mikolov, Anoop Deoras, Stefan Kombrink, Lukas Burget, and Jan Cernock`y. Empirical evaluation and combination of advanced language modeling techniques. In INTERSPEECH, 2011. Tomas Mikolov, Armand Joulin, Sumit Chopra, Michael Mathieu, and Marc'Aurelio Ranzato. Learning longer memory in recurrent neural networks. arXiv preprint arXiv:1412.7753, 2014. Denis Paperno, Germán Kruszewski, Angeliki Lazaridou, Quan Ngoc Pham, Raffaella Bernardi, Sandro Pezzelle, Marco Baroni, Gemma Boleda, and Raquel Fernández. The lambada dataset: Word prediction requiring a broad discourse context. arXiv preprint arXiv:1606.06031, 2016. Ronald Rosenfeld. A maximum entropy approach to adaptive statistical language modeling. Computer, Speech and Language, 1996. Andreas Stolcke, Noah Coccaro, Rebecca Bates, Paul Taylor, Carol Van Ess-Dykema, Klaus Ries, Elizabeth Shriberg, Daniel Jurafsky, Rachel Martin, and Marie Meteer. Dialogue act modeling for automatic tagging and recognition of conversational speech. Computational linguistics, 2000. Sainbayar Sukhbaatar, Szlam Arthur, Jason Weston, and Rob Fergus. End-to-end memory networks. In NIPS, 2015. Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In NIPS, 2015. Tian Wang and Kyunghyun Cho. Larger-context language modelling. arXiv preprint arXiv:1511.03729, 2015. Paul J Werbos. Backpropagation through time: what it does and how to do it. 1990. Ronald J Williams and Jing Peng. An efficient gradient-based algorithm for on-line training of recurrent net- work trajectories. Neural computation, 1990. Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. Julian Georg Zilly, Rupesh Kumar Srivastava, Jan Koutník, and Jürgen Schmidhuber. Recurrent highway networks. arXiv preprint arXiv:1607.03474, 2016. 9
1907.11065
2
1907
2019-07-26T01:49:33
DropAttention: A Regularization Method for Fully-Connected Self-Attention Networks
[ "cs.CL" ]
Variants dropout methods have been designed for the fully-connected layer, convolutional layer and recurrent layer in neural networks, and shown to be effective to avoid overfitting. As an appealing alternative to recurrent and convolutional layers, the fully-connected self-attention layer surprisingly lacks a specific dropout method. This paper explores the possibility of regularizing the attention weights in Transformers to prevent different contextualized feature vectors from co-adaption. Experiments on a wide range of tasks show that DropAttention can improve performance and reduce overfitting.
cs.CL
cs
DropAttention: A Regularization Method for Fully-Connected Self-Attention Networks Lin Zehui Fudan University [email protected] Pengfei Liu ∗ Fudan University [email protected] Luyao Huang Fudan University [email protected] Junkun Chen Fudan University [email protected] Xipeng Qiu † Fudan University [email protected] Xuanjing Huang Fudan University [email protected] Abstract Variants dropout methods have been designed for the fully-connected layer, con- volutional layer and recurrent layer in neural networks, and shown to be effective to avoid overfitting. As an appealing alternative to recurrent and convolutional layers, the fully-connected self-attention layer surprisingly lacks a specific dropout method. This paper explores the possibility of regularizing the attention weights in Transformers to prevent different contextualized feature vectors from co-adaption. Experiments on a wide range of tasks show that DropAttention can improve perfor- mance and reduce overfitting. 1 Introduction As an effective and easy-to-implement regularization method, Dropout has been first designed for fully-connected layers in neural models Srivastava et al. [2014]. Over the past few years, a host of variants of dropout have been introduced. For recurrent neural networks (RNNs), dropout is only applied to the input layers before the successful attempt in Krueger et al. [2016]; Semeniuta et al. [2016]; Gal and Ghahramani [2016]. Also, a dozen of dropout methods for convolutional neural networks (CNNs) have been proposed in Tompson et al. [2015]; Huang et al. [2016]; Larsson et al. [2016]; Gastaldi [2017]; Ghiasi et al. [2018]; Zoph et al. [2018]; Yamada et al. [2018]. On the other hand, fully-connected self-attention neural networks, such as Transformers Vaswani et al. [2017], have emerged as a very appealing alternative to RNNs and CNNs when dealing with sequence modelling tasks. Although Transformers incorporate dropout operators in their architecture, the regularization effect of dropout in the self-attention has not been thoroughly analyzed in the literature. The success of the adaption of dropout for fully-connected, convolutional and recurrent layers gives us a tantalizing hint that a more specific dropout for self-attentional operators might be needed. ∗Co-mentoring †Corresponding author Preprint. Under review. Methods Dropout Srivastava et al. [2014] DropConnect Wan et al. [2013] SpatialDropout Kalchbrenner et al. [2014] Cutout DeVries and Taylor [2017] DropEmb Gal and Ghahramani [2016] Variational Dropout [Gal and Ghahramani, 2016] Unit Zoneout Krueger et al. [2016] Unit DropBlock Ghiasi et al. [2018] Region of Units DropAttention Region of Weights Dropped Objects Unit Weight Unit Unit Weight Spaces Hidden Hidden Hidden Input Input Hidden Hidden Hidden Input& Hidden Layers FCN FCN CNN CNN Lookup RNN RNN CNN Self-Attention Table 1: A comparison of published methods for dropout. "Unit" denotes the neuron of a hidden vector while "Weight" represents the learnable parameter or attention score. "FCN" refers to the fully-connected layer. Additionally, the original publicly code3 of Transformer Vaswani et al. [2017] with Dropout trick also provides the evidence for this work, although it's less understood why it works and how it might be extended. In this paper, we demonstrate the benefit of dropout in self-attention layers (DropAttention) with two key distinctions compared with the dropout used in fully-connected layers and recurrent layers. The first is that DropAttention randomly sets attention weights to zero, which can be interpreted as dropping a set of neurons along different dimensions. Specifically, DropAttention aims to encourage the model to utilize the full context of the input sequences rather than relying solely on a small piece of features. For example, for sentiment classification, the prediction is usually dominated by one or several emotional words, ignoring other informative patterns. This can make the model overfit some specific patterns. In fully-connected and recurrent layers, dropout discourages the complex co-adaptation of different units in the same layer, while DropAttention prevents different contextualized feature vectors from co-adapting, learning features which are generally helpful for task-specific prediction. Secondly, in addition to dropping out individual attentional units, we also explore the possibility of operating in contiguous regions. It is inspired by DropBlock Ghiasi et al. [2018] where units in a contiguous region of a convolutional feature map are discarded together. It is a more effective way of dropping for attention layers, since a semantic unit are usually composed of several spatially consecutive words. Experiments on a wide range of tasks with different-scale datasets show that DropAttention can improve performance and reduce overfitting. 2 Related Work We present a summary of existing models by highlighting differences among dropped object, spaces and layers as shown in Table 1. The original idea of Dropout is proposed by Srivastava et al. [2014] for fully-connected networks, which is regarded as an effective regularization method. After that, many dropout techniques for specific network architectures, such as CNNs and RNNs, have been proposed. For CNNs, most successful methods require the noise to be structured Tompson et al. [2015]; Huang et al. [2016]; Larsson et al. [2016]; Gastaldi [2017]; Ghiasi et al. [2018]; Zoph et al. [2018]; Yamada et al. [2018]. For example, SpatialDropoutKalchbrenner et al. [2014] is used to address the spatial correlation problem. DropConnect Wan et al. [2013] sets a randomly selected subset of weights within the network to zero. For RNNs, Variational Dropout Gal and Ghahramani [2016] and ZoneOut Krueger et al. [2016] are most widely used methods. In Variational Dropout, dropout rate is learned and the same neurons are dropped at every timestep. In ZoneOut, it stochastically forces some hidden units to maintain their previous values instead of dropping. Different from these methods, in this paper, we explore how to drop information on self-attention layers. 3https://github.com/tensorflow/tensor2tensor 2 3 Background 3.1 Transformer Architecture The typical fully-connected self-attention architecture is the Transformer Vaswani et al. [2017], which uses the scaled dot-product attention to model the intra-interactions of a sequence. Given a sequence of vectors H ∈ Rl×d, where l and d represent the length of and the dimension of the input sequence, the self-attention projects H into three different matrices: the query matrix Q, the key matrix K and the value matrix vector V , and uses scaled dot-product attention to get the output representation. Q, K, V = HW Q, HW K, HW V QK T√ dk Attn(Q, K, V ) = softmax( )V, (1) (2) where W Q, W K, W V ∈ Rd×dk are learnable parameters and softmax() is performed row-wise. To enhance the ability of self-attention, multi-head self-attention is introduced as an extension of the single head self-attention, which jointly model the multiple interactions from different representation spaces, MultiHead(H) = [head1; ...; headk]W O, (3) (4) where i (i ∈ [1, h]) are learnable parameters. Transformer consists of several where W O, W Q stacked multi-head self-attention layers and fully-connected layers. Assuming the input of the self-attention layer is H, its output H is calculated by headi = Attn(HW Q i , HW K i , HW V i ), i , W K i , W V Z =H + MultiHead(layer-norm(H)), H =Z + MLP(layer-norm(Z)), (5) (6) where layer − norm(·) represents the layer normalization Ba et al. [2016] . Besides, since the self-attention ignores the order information of a sequence, a positional embedding P E is used to represent the positional information. 3.2 Dropout Dropout Srivastava et al. [2014] is a popular regularization form for fully-connected neural network. It breaks up co-adaptation between units, therefore it can significantly reduce overfitting and improve test performance. Each unit of a hidden layer h(l) ∈ Rd is dropped with probability p by setting it to 0. h(l+1) = f (W m (cid:12) h(l)), (7) where m ∈ {0, 1}d is a binary mask vector with each element j drawn independently from mj ∼ Bernoulli(p), and (cid:12) denotes element-wise production. DropConnect Wan et al. [2013] is a generalization of Dropout. It randomly drops hidden layers weights instead of units. Assume M is a binary mask matrix drawn from Mij ∼ Bernoulli(p), W is the hidden layer weights. Then DropConnect can be formulated as, h(l+1) = f ((W (cid:12) M )h(l)) (8) Dropout essentially drops the entire column of the weight matrix. Therefore, Dropout can be regarded as a special case of DropConnect, where a whole column weight is dropped. Since Dropout and DropConnect achieve great success on fully-connected layer, a natural motivation is whether a specific dropout method is needed for the fully-connected self-attention networks. Experiments conducted shows that a new dropout method designed for fully-connected self-attention networks can also reduce overfitting and obtain improvements. 3 (a) DropAttention(c) (b) DropAttention(e) Figure 1: Illustration of DropAttentions over a 5 × 5 attention weight matrix. The "yellow" elements are dropped. The size of drop window is w = 2 and drop rate is p = 0.4. 4 DropAttention In this section, we will introduce our attention regularization method: DropAttention. Given a sequence of vectors H ∈ Rl×d, the fully-connected self-attention layer can be reformulated into where Λ = softmax( QKT√ dk calculated by Eq. (1). The output of i-th position is (9) ), f (·) is a residual nonlinear function defined by Eq. (6) and Q, K, V is H = f (ΛV ), l(cid:88) hi = f ( j=1 λijvj), (10) where hi is the i-th row vector of H and vj is the j-th row vector of V . λij is the entry of Λ. With this formulation, we can connect the self-attention layer to the fully-connected layer with two differences. The first difference is the weight matrix Λ is dynamically generated. The second difference is that the basic unit is a vector rather than a neuron. Due to the similarity between fully-connected layer and self-attention layer, we can introduce the popular dropout methods for FCN to self-attention mechanism. In detail, we propose two dropout methods for the fully-connected self-attention layer: DropAttention(c) and DropAttention(e). 1) DropAttention(c) means to randomly drop "column" in attention weight matrix, which is a simple method similar to the standard Dropout Srivastava et al. [2014]. We randomly drop the unit vj, 1 ≤ j ≤ l. Note that vj here is a vector instead of a single neuron. 2) DropAttention(e) means to randomly drop "element" in attention weight matrix, which is a more generalized method of the DropAttention(c). Similar to DropConnect Wan et al. [2013], DropAttention(e) randomly drops elements in attention weights matrix Λ. DropAttention(c) can be regarded as a special case of DropAttention(e) in which a whole column of Λ is dropped. Besides the basic dropping strategies, we also augment the DropAttentions with two functions. 4.1 Dropping Contiguous Region Inspired by DropBlock Ghiasi et al. [2018], we drop contiguous region of the attention weights matrix instead of independent random units. The behind motivation is based on distributional hypothesis Harris [1954]: words that are used and occur in the same contexts tend to purport similar meanings. In Transformer Vaswani et al. [2017] where multi-layer structure is used, when dropping independent random units, information correlated with the dropped input can still be restored in the next layer through surrounding words, which may cause the networks overfitting. Dropping the whole semantic unit consisting of several words can be a more effective way of dropping out. Therefore, there are two hyperparameters in DropAttention: window size w and drop rate p. The window size w is the length of contiguous region to be dropped, while p controls how many units to 4 Algorithm 1 DropAttention(e) Require: Attention weight matrix Λ, window size w, drop rate p 1: if Inference then 2: 3: end if 4: γ = p/w; 5: Sample mask matrix M randomly, where Mij ∼ Bernoulli(γ); 6: For each zero position Mij, expand the mask with the span length of w, Mi,j : Mi,j+w−1, and 7: Apply mask: Λ = M (cid:12) Λ; 8: for all row vector of Λ: λj do 9: 10: end for Normalized rescale: λj = λj/sum(λj) return Λ set all the values in the window to be 0; Table 2: Classification dataset statistics, #classes denotes the number of classes, and #documents represents the number of documents. Dataset #classes #documents CR QC SUBJ MR AG's News Yelp2013 2 6 2 2 4 5 3,993 5,052 10,000 10,661 127,600 335,018 drop. In standard Dropout Srivastava et al. [2014], the binary mask is sampled from the Bernoulli distribution with the probability of p. Since DropAttention will expand every zero entry in the binary mask to be window with size w. Therefore, we just require to drop p/w windows. 4.2 Normalized Rescaling To ensure that the sum of attention weights to remain 1 after applying DropAttention, we re-normalize the attention weights after dropout operations. While traditional Dropout also has rescaling operation where neuron weights are divided by 1 − p, there is no guarantee that the sum of attention weights after rescaling remains 1. Experiments on classification task (see sec. 5.1) show that DropAttention with normalized rescaling outperforms traditional dropout rescaling. And in practice with normalized rescale, training process can be more steady compared to traditional rescaling. Figure 1 shows two proposed DropAttention methods. The Pseudocode of DropAttention(e) is described in Algorithm 1. DropAttention(c) is adopted in the similar way to DropAttention(e). 5 Experiment We evaluate the effectiveness of DropAttentions on 4 different tasks: Text Classification, Sequence La- beling, Textual Entailment and Machine Translation. We also conduct a set of analytical experiments to validate properties of the networks. 5.1 Text Classification We first evaluate the effectiveness of DropAttention on a couple of classification datasets ranging from small, medium and large scale. Statistics of datasets are listed in Table 2. All datasets are split into training, development and testing sets. Yelp13 reviews: collected from the Yelp Dataset Challenge in 2013, which have 5 levels of ratings from 1 to 5. We use the same Yelp datasets slitted and tokenized in Tang et al. [2015]. MR: Movie 5 Table 3: Text classification, in percentage. p represents dropout rate, w represents window size. The column of "Norm?" indicates the results of normalized rescaling or traditional rescaling 1 − p. We only represents the best results in the table and their corresponding hyperparameters. Model w/o DropAttention Norm? CR 80.00 SUBJ 93.30 MR 76.92 QC 88.40 AG's News 88.13 Yelp13 61.49 DropAttention(c) DropAttention(e) p=0.4,w=2 p=0.2,w=3 p=0.3,w=2 p=0.3 w=1 p=0.4 w=1 p=0.4 w=1 82.75 78.25 94.10 93.10 78.80 77.30 90.80 89.60 88.87 88.49 62.34 62.27 p=0.2,w=3 p=0.3,w=2 p=0.3,w=2 p=0.3,w=2 p=0.2,w=2 p=0.2 w=1 81.25 81.25 93.50 93.50 78.51 75.33 89.60 88.80 88.66 88.47 61.79 61.46 Y N Y N Table 4: The sizes of the sequence labeling datasets in our experiments, in terms of the number of tokens. Train Dev. Task Dataset CoNLL 2000 Chunking 211,727 - CoNLL 2003 NER POS PTB Test 47,377 46,666 204,567 51,578 912,344 131,768 129,654 reviews with two classes Pang and Lee [2005]. SUBJ: Subjectivity dataset containing subjective and objective instance. It is also a 2 classes dataset Pang and Lee [2004]. CR: Customer reviews of various products with positive and negative sentiments. AG's News: A news topic classification with 4 classes created by Zhang et al. [2015]. QC: The TREC questions dataset involves six different question types Li and Roth [2002]. Detail model configurations are given in Appendix. We use accuracy as evaluation metrics. Results of all datasets are listed in Table 3. It shows that DropAttentions can significantly improve performance on a wide range of datasets of small, medium and large scale. Besides, note that when comparing normalized rescaling with traditional rescaling under the same DropAttention hyperparameters, Table 3 shows that normalized rescaling can generally obtain better performance. For classification tasks, we find that larger dropout rate and smaller window size are preferred for DropAttention(c) while smaller dropout rate and larger window size are preferred for DropAtten- tion(e). And DropAttention(c) can generally obtain higher performances than DropAttention(e) in classification tasks. 5.2 Sequence Labeling We also evaluate the effectiveness of DropAttention on sequence labeling. We conducted experiments by following the same settings as Yang et al. [2016]. We use the following benchmark datasets in our experiments: Penn Treebank (PTB) POS tagging, CoNLL 2000 chunking, CoNLL 2003 English NER. The statistics of the datasets are described in Table 4. We process sentences with Transformer encoder. After encoding, we feed the output vector into a fully-connected layer. Detail model hyperparameters are given in Appendix. Results are shown in Table 5. In Table 5, all best results are under the hyperparameters of p = 0.3, w = 3 except for DropAttention(e) in POS task with p = 0.2, w = 2. It shows that both DropAttention(c) and DropAttention(e) can obtain significant improvements. Our model achieve 0.29 accuracy, 0.40 F1 score, 1.76 F1 score improvements in POS, NER and Chunking respectively. And we find that larger dropout rate and larger window size are generally preferred. 6 Table 5: Sequence labeling results. p means dropout rate, w means window size. NER and Chunking are evaluated by F1 score while POS is evaluated by accuracy. Table shows the best results and their corresponding hyperparameters. Transformer w/o DropAttention POS 95.92 NER 87.23 Chunking 89.09 p=0.3 w=3 p=0.3 w=3 p=0.3 w=3 DropAttention(c) 96.21 88.51 90.56 p=0.2,w=2 p=0.3,w=3 p=0.3,w=3 DropAttention(e) 96.17 88.63 90.85 Table 6: Machine Translation performances of our models under different dropping set- tings. p stands for drop rate and w represents window size. Model HyperParam BLEU p w/o DropAttention 0 w 0 0.1 1 0.1 2 0.1 3 0.2 1 0.2 2 0.2 3 0.1 1 0.1 2 0.1 3 0.2 1 0.2 2 0.2 3 27.30 27.96 27.87 27.98 27.87 28.04 27.95 28.16 28.03 28.07 27.92 28.32 27.87 DropAttention(c) DropAttention(e) 5.3 Textual Entailment We use the biggest textual entailment dataset, SNLI Bowman et al. [2015] corpus to evaluate the effectiveness of DropAttention on this task. SNLI is a collection of sentence pairs labeled for entailment, contradiction, and semantic independence. A pair of sentences called premise and hypothesis will be fed to the model, and the model will be asked to tell the relation of two sentences. It is also a classification task, and we measure the performance by accuracy. We process the hypothesis and premise with the same Transformer encoder, which means that the hypothesis encoder and the premise encoder share the same parameters. We use max pooling to create a simple vector representation from the output of transformer encoder. After processing two sentences respectively, we use the two outputs to construct the final feature vector, which consisting of the concatenation of two sentence vectors, their difference, and their elementwise product Bowman et al. [2016]. We then feed the final feature vector into a 2-layer ReLU MLP to map the hidden representation into classification result. Detail model hyperparameters are given in Appendix. Results are listed in Table 7. For full results with different hyperparameters please refer to Ap- pendix. Experiments show that DropAttention(c) and DropAttention(e) can significantly improve performances. 5.4 Machine Translation We further demonstrate the effectiveness of DropAttention on translation tasks. We conduct exper- iments on WMT' 16 En-De dataset which consists of 4.5M sentence pairs. We follow Ott et al. [2018] by reusing the preprocessed data, where Ott et al. [2018] validates on newstest13 and tests on newstest14, and uses a vocabulary of 32K symbols based on a joint source and target byte pair encoding (BPE; Sennrich et al. [2015]). We measure case-sensitive tokenized BLEU. We use the fairseq-py toolkit 4 re-implementation of Transformer Vaswani et al. [2017] model. We follow the configuration of original Transformer base model Vaswani et al. [2017]. See detail configuration in Appendix. DropAttention with different hyperparameters is applied to attention weights. Table 6 shows the BLEU score for DropAttention with different hyperparameters. The results show that DropAttention can generally obtain higher performance compared with baseline without DropAttention. With DropAttention(e) of p = 0.2, w = 2, the model can outperform the baseline by a large margin, reaching a BLEU score of 28.32. For DropAttention(c), the model also reaches the best BLEU score with p = 0.2, w = 2. 4https://github.com/pytorch/fairseq 7 Table 7: SNLI best results and the corresponding hyperparameters. Transformer w/o DropAttention SNLI 83.36 p=0.2 w=3 DropAttention(c) 84.38 DropAttention(e) p=0.5,w=1 84.48 Table 8: Classification and Machine Translation perfor- mances. Classification performances are evaluated by ac- curacy while Machine Translation by BLEU. Baseline is the model without any Dropout techniques. Transformer baseline + Standard Dropout + DropAttention + Dropout+DropAttention Classification MT 25.42 27.3 26.3 28.32 88.13 88.43 88.50 88.70 y p o r t n E 1.82 1.82 1.81 t n e m e e r g a s i D 0.75 0.75 0.75 0.74 ·10−2 v i D 3.34 3.33 3.33 3.32 p=0.3 w=2 p=0.3 w=3 p=0.3 w=1 p=0.2 w=2 p=0.2 w=1 p=0.2 w=3 w/o p=0.3 w=2 p=0.3 w=3 p=0.3 w=1 p=0.2 w=2 p=0.2 w=1 p=0.2 w=3 w/o p=0.3 w=2 p=0.3 w=3 p=0.3 w=1 p=0.2 w=2 p=0.2 w=1 p=0.2 w=3 w/o (a) Entropy (b) Disagreement (c) Div Figure 2: The histogram Disagreement, and Div. With the drop rate and window size increasing, both metrics increase accordingly. Note that if the value of Div and Disagreement gets large, it means that the difference of attention weights between heads is small. There are two insights from this experiment. The first is that a regularization of self-attention works to improve the generalization ability even for the large-scale data. The second is that the DropAttention is complementary to the standard dropout. 5.5 Complementarity to stardard Dropout We also explore the effect of DropAttention combining with standard Dropout. We conduct experi- ments on classification tasks and machine translation tasks. We choose AG's News as classification dataset and WMT' 16 En-De as Machine Translation dataset. Same hyperparameters as 5.1 and 5.4 are used. Table 8 shows that when combining DropAttention with Dropout, models can obtain higher performances compared to implementing Dropout or DropAttention alone. It implys that DropAttention is complementary to stardard Dropout. 6 Analysis In this section, we study the impact of DropAttention on the behavior of model quantitatively. We use three metrics to evaluate the model based on the attention weights: Div, Disagreement and Entropy. Div Suppose A is the attention weights matrix, where every row i corresponds to the attention weights vector produced by the ith attention head. Div is defined as, (11) where (cid:107) · (cid:107)F represents the Frobenius norm of a matrix and I stands for identity matrix. It was first introduced by Lin et al. [2017] as a penalization term which encourages the diversity of weight vectors across different heads of attention. If Div gets large, it means multi-heads attention weights distributions have large overlap. F , Div =(cid:13)(cid:13)(cid:0)AAT − I(cid:1)(cid:13)(cid:13)2 8 Disagreement We use the same notations above. Ai stands for the ith row of the attention matrix, then the Disagreement is expressed as, h(cid:88) h(cid:88) Ai · Aj (cid:107)Ai(cid:107)(cid:107)Aj(cid:107) , (12) Disagreement = 1 h2 i=1 j=1 Ei = −(cid:88) where h denotes the number of heads. It was proposed by Li et al. [2018], which also expects to encourage the diversity of the model. The Disagreement is defined as calculating the cosine similarity cos(·) between the attention weights vector pair produced by two different heads. The smaller score is, the more diverse different attention heads are. Entropy is used to evaluate the diversity within one head. Ai weights vector produced by ith head. Entropy of attention weights is defined as, j is the jth element of the attention Ai j log Ai j. (13) If entropy gets small, it represents that the head focus on a small fraction of words. j 6.1 Effect on Intra-Diversity We first observe the impact of DropAttention on intra-diversity, namely attention distribution within one head. Figure 2a shows the multi-head entropy of models for classification task. When the drop rate and window size increasing, the entropy increase accordingly. This suggests DropAttention can effectively smoothen the attention distribution, making the model utilize more context. This can subsequently increase robustness of the model. 6.2 Effect on Inter-Diversity We further study the impact of DropAttention on inter-diversity, namely the difference between multi heads. Figure 2b and 2c show the Disagreement and Diveristy of multi heads, respectively. It shows that with larger drop rate and window size, Div and Disagreement are larger accordingly. Note that large Diversity and Disagreement means that the difference of attention distribution between heads is small. This is due to the smoother attention distribution within one head. With less sharply different multi-heads, the model does not have to rely on a single head to make predictions, which means that all heads have a smoother contribution to the final predictions. This can increase robustness of the model. 6.3 Effect on Sparsity Similar to Srivastava et al. [2014], we also observe the effect of DropAttention on sparsity. Since the attention weights are summed up to 1, we only collect the largest attention weights of all heads. To eliminate the effect of sentence length, attention weights are multiplied by the sentence length. Figure 3 shows the distribution of largest attention weights, where model with DropAttention has smaller attention weights compared to model without DropAttention. This phenomenon is consistent with Srivastava et al. [2014] where model with dropout tends to allocate smaller activation weights compared to model without dropout. 7 Conclusion and Discussion In this paper, we introduce DropAttention, a variant of Dropout designed for fully-connected self- attention network. Experiments on a wide range of tasks demonstrate that DropAttention is an effective technique for improving generalization and reducing overfitting of self-attention networks. Several analytical statistics give the intuitive impacts of DropAttention, which show that applying DropAttention can help model utilize more context, subsequently increasing robustness. References Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. 9 Figure 3: The histogram of largest attention weights distribution. x-axis represents the attention weights value multiplied by the sentence length, y-axis represents the number of corresponding attention weights. Model with DropAttention tends to allocate smaller attention weights compared to model without DropAttention. Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. A large annotated corpus for learning natural language inference. arXiv preprint arXiv:1508.05326, 2015. Samuel R Bowman, Jon Gauthier, Abhinav Rastogi, Raghav Gupta, Christopher D Manning, and Christopher Potts. A fast unified model for parsing and sentence understanding. arXiv preprint arXiv:1603.06021, 2016. Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017. Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In Advances in neural information processing systems, pages 1019 -- 1027, 2016. Xavier Gastaldi. Shake-shake regularization. arXiv preprint arXiv:1705.07485, 2017. Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V Le. Dropblock: A regularization method for convolutional networks. In Advances in Neural Information Processing Systems, pages 10750 -- 10760, 2018. Zellig S Harris. Distributional structure. Word, 10(2-3):146 -- 162, 1954. Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In European conference on computer vision, pages 646 -- 661. Springer, 2016. Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A convolutional neural network for modelling sentences. In Proceedings of ACL, 2014. David Krueger, Tegan Maharaj, János Kramár, Mohammad Pezeshki, Nicolas Ballas, Nan Rosemary Ke, Anirudh Goyal, Yoshua Bengio, Aaron Courville, and Chris Pal. Zoneout: Regularizing rnns by randomly preserving hidden activations. arXiv preprint arXiv:1606.01305, 2016. Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Fractalnet: Ultra-deep neural networks without residuals. arXiv preprint arXiv:1605.07648, 2016. Xin Li and Dan Roth. Learning question classifiers. In Proceedings of the 19th international conference on Computational linguistics-Volume 1, pages 1 -- 7. Association for Computational Linguistics, 2002. Jian Li, Zhaopeng Tu, Baosong Yang, Michael R Lyu, and Tong Zhang. Multi-head attention with disagreement regularization. arXiv preprint arXiv:1810.10183, 2018. Zhouhan Lin, Mo Feng, Yu, Bing Xiang, Bowen Zhou, and Yoshua Bengio. A structured self-attentive sentence embedding. arXiv preprint arXiv:1703.03130, 2017. Myle Ott, Sergey Edunov, David Grangier, and Michael Auli. Scaling neural machine translation. CoRR, abs/1806.00187, 2018. Bo Pang and Lillian Lee. A sentimental education: Sentiment analysis using subjectivity summa- rization based on minimum cuts. In Proceedings of the 42nd annual meeting on Association for Computational Linguistics, page 271. Association for Computational Linguistics, 2004. 10 Bo Pang and Lillian Lee. Seeing stars: Exploiting class relationships for sentiment categorization In Proceedings of the 43rd annual meeting on association for with respect to rating scales. computational linguistics, pages 115 -- 124. Association for Computational Linguistics, 2005. Stanislau Semeniuta, Aliaksei Severyn, and Erhardt Barth. Recurrent dropout without memory loss. arXiv preprint arXiv:1603.05118, 2016. Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909, 2015. Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929 -- 1958, 2014. Duyu Tang, Bing Qin, and Ting Liu. Document modeling with gated recurrent neural network for sentiment classification. In Proceedings of the 2015 conference on empirical methods in natural language processing, pages 1422 -- 1432, 2015. Jonathan Tompson, Ross Goroshin, Arjun Jain, Yann LeCun, and Christoph Bregler. Efficient object localization using convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 648 -- 656, 2015. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz In Advances in Neural Information Kaiser, and Illia Polosukhin. Attention is all you need. Processing Systems, pages 6000 -- 6010, 2017. Li Wan, Matthew Zeiler, Sixin Zhang, Yann Le Cun, and Rob Fergus. Regularization of neural networks using dropconnect. In International Conference on Machine Learning, pages 1058 -- 1066, 2013. Yoshihiro Yamada, Masakazu Iwamura, Takuya Akiba, and Koichi Kise. Shakedrop regularization for deep residual learning. arXiv preprint arXiv:1802.02375, 2018. Zhilin Yang, Ruslan Salakhutdinov, and William Cohen. Multi-task cross-lingual sequence tagging from scratch. arXiv preprint arXiv:1603.06270, 2016. Xiang Zhang, Junbo Zhao, and Yann LeCun. Character-level convolutional networks for text classification. In Advances in neural information processing systems, pages 649 -- 657, 2015. Barret Zoph, Vijay VasudSentiment analysis using subjectivity summarizationevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8697 -- 8710, 2018. 11
1902.07248
1
1902
2019-02-13T05:43:00
Sentence Compression via DC Programming Approach
[ "cs.CL", "math.OC" ]
Sentence compression is an important problem in natural language processing. In this paper, we firstly establish a new sentence compression model based on the probability model and the parse tree model. Our sentence compression model is equivalent to an integer linear program (ILP) which can both guarantee the syntax correctness of the compression and save the main meaning. We propose using a DC (Difference of convex) programming approach (DCA) for finding local optimal solution of our model. Combing DCA with a parallel-branch-and-bound framework, we can find global optimal solution. Numerical results demonstrate the good quality of our sentence compression model and the excellent performance of our proposed solution algorithm.
cs.CL
cs
Sentence Compression via DC Programming Approach(cid:63) Yi-Shuai Niu1,2[0000−0002−9993−3681], Xi-Wei Hu2, Yu You1 Faouzi Mohamed Benammour1, and Hu Zhang1 1 School of Mathematical Sciences, Shanghai Jiao Tong University, Shanghai, China 2 SJTU-Paristech Elite Institute of Technology, Shanghai Jiao Tong University, [email protected] Shanghai, China Abstract. Sentence compression is an important problem in natural language processing. In this paper, we firstly establish a new sentence compression model based on the probability model and the parse tree model. Our sentence compression model is equivalent to an integer lin- ear program (ILP) which can both guarantee the syntax correctness of the compression and save the main meaning. We propose using a DC (Difference of convex) programming approach (DCA) for finding local optimal solution of our model. Combing DCA with a parallel-branch- and-bound framework, we can find global optimal solution. Numerical results demonstrate the good quality of our sentence compression model and the excellent performance of our proposed solution algorithm. Keywords: Sentence Compression · Probability Model · Parse Tree Model · DCA · Parallel-Branch-and-Bound 1 Introduction The recent years have been known by the quick evolution of the artificial intel- ligence (AI) technologies, and the sentence compression problems attracted the attention of researchers due to the necessity of dealing with a huge amount of natural language information in a very short response time. The general idea of sentence compression is to make a summary with shorter sentences containing the most important information while maintaining grammatical rules. Nowadays, there are various technologies involving sentence compression as: text summa- rization, search engine and question answering etc. Sentence compression will be a key technology in future human-AI interaction systems. There are various models proposed for sentence compression. The paper of Jing [3] could be one of the first works addressed on this topic with many rewrit- ing operations as deletion, reordering, substitution, and insertion. This approach (cid:63) The research is partially funded by the Natural Science Foundation of China (Grant No: 11601327) and by the Key Construction National "985" Program of China (Grant No: WF220426001). 2 Y.S. Niu et al. is realized based on multiple knowledge resources (such as WordNet and parallel corpora) to find the pats that can not be removed if they are detected to be grammatically necessary by using some simple rules. Later, Knight and Marcu investigated discriminative models[4]. They proposed a decision-tree model to find the intended words through a tree rewriting process, and a noisy-channel model to construct a compressed sentence from some scrambled words based on the probability of mistakes. MacDonald [12] presented a sentence compression model using a discriminative large margin algorithm. He ranks each candidate compression using a scoring function based on the Ziff-Davis corpus using a Viterbi-like algorithm. The model has a rich feature set defined over compres- sion bigrams including parts of speech, parse trees, and dependency information, without using a synchronous grammar. Clarke and Lapata [1] reformulated Mc- Donald's model in the context of integer linear programming (ILP) and extended with constraints ensuring that the compressed output is grammatically and se- mantically well formed. The corresponding ILP model is solving in using the branch-and-bound algorithm. In this paper, we will propose a new sentence compression model to both guarantee the grammatical rules and preserve main meaning. The main contri- butions in this work are: (1) Taking advantages of Parse tree model and Proba- bility model, we hybridize them to build a new model that can be formulated as an ILP. Using the Parse tree model, we can extract the sentence truck, then fix the corresponding integer variables in the Probability model to derive a simpli- fied ILP with improved quality of the compressed result. (2) We propose to use a DC programming approach called PDCABB (an hybrid algorithm combing DCA with a parallel branch-and-bound framework) developed by Niu in [17] for solving our sentence compression model. This approach can often provide a high quality optimal solution in a very short time. The paper is organized as follows: The Section 2 is dedicated to establish hybrid sentence compression model. In Section 3, we will present DC program- ming approach for solving ILP. The numerical simulations and the experimental setup will be reported in Section 4. Some conclusions and future works will be discussed in the last section. 2 Hybrid Sentence Compression Model Our sentence compression model is based on an Integer Linear Programming (ILP) probability model [1], and a parsing tree model. In this section, we will give a brief introduction of the two models, and propose our new hybrid model. 2.1 ILP Probability Model Let x = {x1, x2, . . . , xn} be a sentence with n ≥ 2 words.3 We add x0='start' as the start token and xn+1='end' as the end token. 3 Punctuation is also deemed as word. Sentence Compression via DC Programming Approach 3 The sentence compression is to choose a subset of words in x for maximizing its probability to be a sentence under some restrictions to the allowable trigram combinations. This probability model can be described as an ILP as follows: Decision variables: We introduce the binary decision variables δi, i ∈ [[1, n]]4 for each word xi as: δi = 1 if xi is in a compression and 0 otherwise. In order to take context information into consideration, we introduce the context variables (α, β, γ) such that: ∀i ∈ [[1, n]], we set αi = 1 if xi starts a compression and 0 otherwise; ∀i ∈ [[0, n − 1]] , j ∈ [[i + 1, n]], we set βij = 1 if the sequence xi, xj ends a compression and 0 otherwise; and ∀i ∈ [[0, n − 2]] , j ∈ [[i + 1, n − 1]] , k ∈ [[j + 1, n]], we set γijk = 1 if sequence xi, xj, xk is in a compression and 0 otherwise. There are totally n3+3n2+14n Objective function: The objective function is to maximize the probability of the compression computed by: binary variables for (δ, α, β, γ). 6 f (α, β, γ) = αiP (xistart) + γijkP (xkxi, xj) n(cid:88) n−1(cid:88) i=1 + n(cid:88) i=0 j=i+1 n−2(cid:88) n−1(cid:88) n(cid:88) i=1 j=i+1 k=j+1 βijP (endxi, xj) where P (xistart) stands for the probability of a sentence starting with xi, P (xkxi, xj) denotes the probability that xi, xj, xk successively occurs in a sen- tence, and P (endxi, xj) means the probability that xi, xj ends a sentence. The probability P (xistart) is computed by bigram model, and the others are com- puted by trigram model based on some corpora. Constraints: The following sequential constraints will be introduced to restrict the possible trigram combinations: Constraint 1 Exactly one word can begin a sentence. αi = 1. (1) n(cid:88) i=1 δk − αk − k−2(cid:88) k−1(cid:88) i=0 j=1 Constraint 2 If a word is included in a compression, it must either start the sentence, or be preceded by two other words, or be preceded by the 'start' token and one other word. γijk = 0,∀k ∈ [[1, n]] . (2) Constraint 3 If a word is included in a compression, it must either be preceded by one word and followed by another, or be preceded by one word and end the sentence. δj − j−1(cid:88) n(cid:88) γijk − j−1(cid:88) βij = 0,∀j ∈ [[1, n]] . (3) 4 [[m, n]] with m ≤ n stands for the set of integers between m and n. i=0 k=j+1 i=0 4 Y.S. Niu et al. Constraint 4 If a word is in a compression, it must either be followed by two words, or be followed by one word and end the sentence. (4) (5) (6) δi − n−1(cid:88) n(cid:88) j=i+1 k=j+1 γijk − n(cid:88) βij − i−1(cid:88) n−1(cid:88) n(cid:88) j=i+1 h=0 βij = 1. βhi = 0,∀i ∈ [[1, n]] . Constraint 5 Exactly one word pair can end the sentence. Constraint 6 The length of a compression should be bounded. i=1 j=i+1 l ≤ n(cid:88) i=1 δi ≤ ¯l. with given lower and upper bounds of the compression l and ¯l. Constraint 7 The introducing term for preposition phrase (PP) or subordinate clause (SBAR) must be included in the compression if any word of the phrase is included. Otherwise, the phrase should be entirely removed. Let us denote Ii = {j : xj ∈ PP/SBAR, j (cid:54)= i} the index set of the words included in PP/SBAR leading by the introducing term xi, then δj ≥ δi, δi ≥ δj,∀j ∈ Ii. (7) (cid:88) j∈Ii ILP probability model: The optimization model for sentence compression is summarized as a binary linear program as: max{f (α, β, γ) : (1) − (7), (α, β, γ, δ) ∈ {0, 1} n3+3n2+14n 6 }. (8) with O(n3) binary variables and O(n) linear constraints. The advantage of this model is that its solution will provide a compression with maximal probability based on the trigram model. However, there is no information about syntactic structures of the target sentence, so it is possible to generate ungrammatical sentences. In order to overcome this disadvantage, we propose to combine it with the parse tree model presented below. 2.2 Parse Tree Model A parse tree is an ordered, rooted tree which reflects the syntax of the input lan- guage based on some grammar rules (e.g. using CFG syntax-free grammar). For constructing a parse tree in practice, we can use a nature language processing toolkit NLTK [18] in Python. Based on NLTK, we have developed a CFG gram- mar generator which helps to generate automatically a CFG grammar based on a target sentence. A recursive descent parser can help to build a parse tree. Sentence Compression via DC Programming Approach 5 For example, the sentence "The man saw the dog with the telescope." can be parsed as in Figure 1. It is observed that a higher level node in the parse tree indicates more important sentence components (e.g., the sentence S consists of a noun phrase NP, a verb phrase VP, and a symbol SYM), whereas a lower node tends to carry more semantic contents (e.g., the proposition phrase PP is consists of a preposition 'with', and a noun phrase 'the telescope'). Therefore, a parse tree presents the clear structure of a sentence in a logical way. Fig. 1. Parse tree example Sentence compression can be also considered as finding a subtree which re- mains grammatically correct and containing main meaning of the original sen- tence. Therefore, we can propose a procedure to delete some nodes in the parse tree. For instance, the sentence above can be compressed as "The man saw the dog." by deleting the node PP. 2.3 New Hybrid Model: ILP-Parse Tree Model Our proposed model for sentence compression, called ILP-Parse Tree Model (ILP-PT), is based on the combination of the two models described above. The ILP model will provide some candidates for compression with maximal proba- bility, while the parse tree model helps to guarantee the grammar rules and keep the main meaning of the sentence. This combination is described as follows: Step 1 (Build ILP probability model): Building the ILP model as in for- mulation (8) for the target sentence. Step 2 (Parse Sentence): Building a parse tree as described in subsection 2.2. Step 3 (Fix variables for sentence trunk): Identifying the sentence trunk in the parse tree and fixing the corresponding integer variables to be 1 in ILP model. This step helps to extract the sentence trunk by keeping the main meaning of the original sentence while reducing the number of binary decision variables. More precisely, we will introduce for each node Ni of the parse tree a label sNi taking the values in {0, 1, 2}. A value 0 represents the deletion of the node; 1 represents the reservation of the node; whereas 2 indicates that the node can either be deleted or be reserved. We set these labels as compression rules for each CFG grammar to support any sentence type of any language. For the word xi, we go through all its parent nodes till the root S. If the traversal path contains 0, then δi = 0; else if the traversal path contains only 1, 6 Y.S. Niu et al. then δi = 1; otherwise δi will be further determined by solving the ILP model. The sentence truck is composed by the words xi whose δi are fixed to 1. Using this method, we can extract the sentence trunk and reduce the number of binary variables in ILP model. Step 4 (Solve ILP): Applying an ILP solution algorithm to solve the simplified ILP model derived in Step 3 and generate a compression. In the next section, we will introduce a DC programming approach for solving ILP. 3 DC Programming approach for solving ILP Solving an ILP is in general NP-hard. A classical and most frequently used method is branch-and-bound algorithm as in [1]. Gurobi [2] is currently one of the best ILP solvers, which is an efficient implementation of branch-and- bound combing various techniques such as presolve, cutting planes, heuristics and parallelism etc. In this section, we will present a Difference of Convex (DC) programming approach, called DCA-Branch-and-Bound (DCABB), for solving this model. DCABB is initially designed for solving mixed-integer linear programming (MILP) proposed in [13], and extended for solving mixed-integer nonlinear programming [14,15] with various applications including scheduling [8], network optimization [20], cryptography [10] and finance [9,19] etc. This algorithm is based on con- tinuous representation techniques for integer set, exact penalty theorem, DCA and Branch-and-Bound algorithms. Recently, the author developed a parallel branch-and-bound framework (called PDCABB) [17] in order to use the power of multiple CPU and GPU for improving the performance of DCABB. The ILP model can be stated in standard matrix form as: min{f (x) := c(cid:62)x : x ∈ S} (P ) where S = {x ∈ {0, 1}n : Ax = b}, c ∈ Rn, b ∈ Rm and A ∈ Rm×n. Let us denote K the linear relaxation of S defined by K = {x ∈ [0, 1]n : Ax = b}. Thus, we have the relationship between S and K as S = K ∩ {0, 1}n. The linear relaxation of (P ) denoted by R(P ) is min{f (x) : x ∈ K}, The continuous representation technique for integer set {0, 1}n consists of whose optimal value denoted by l(P ) is a lower bound of (P ). finding a continuous DC function5 p : Rn → R such that {0, 1}n ≡ {x : p(x) ≤ 0}. We often use the following functions for p with their DC components: function type piecewise linear(cid:80)n (cid:80)n expression of p i=1 min{xi, 1 − xi} trigonometric (cid:80)n i=1 xi(1 − xi) i=1 sin2(πxi) quadratic DC components of p g(x) = 0, h(x) = −p(x) g(x) = π2(cid:107)x(cid:107)2, h(x) = g(x) − p(x) 5 A function f : Rn → R is called DC if there exist two convex functions g and h (called DC components) such that f = g − h. Sentence Compression via DC Programming Approach 7 Based on the exact penalty theorem [6,11], there exists a large enough pa- rameter t ≥ 0 such that the problem (P ) is equivalent to the problem (P t): min{Ft(x) := f (x) + tp(x) : x ∈ K}. (P t) The objective function Ft : Rn → R in (P t) is also DC with DC components gt and ht defined as gt(x) = tg(x), ht(x) = th(x) − f (x) where g and h are DC components of p. Thus the problem (P t) is a DC program which can be solved by DCA described in Algorithm 1. Algorithm 1: DCA for (P t) Input: Initial point x0 ∈ Rn; large enough penalty parameter t > 0; Output: Optimal solution x∗ and optimal value f∗; tolerance ε1, ε2 > 0. 1 Initialization: Set i = 0. 2 Step 1: Compute yi ∈ ∂h(xi); 3 Step 2: Solve xi+1 ∈ arg min{g(x) − (cid:104)x, yi(cid:105) : x ∈ K}; 4 Step 3: Stopping check: 5 if (cid:107)xi+1 − xi(cid:107) ≤ ε1 or Ft(xi+1) − Ft(xi) ≤ ε2 then x∗ ← xi+1; f∗ ← Ft(xi+1); return; i ← i + 1; Goto Step 1. 6 7 else 8 9 end The symbol ∂h(xi) denotes the subdifferential of h at xi which is fundamental in convex analysis. The subdifferential generalizes the derivative in the sense that h is differentiable at xi if and only if ∂h(xi) reduces to the singleton {∇h(xi)}. Concerning on the choice of the penalty parameter t, we suggest using the following two methods: the first method is to take arbitrarily a large value for t; the second one is to increase t by some ways in iterations of DCA (e.g., [14,19]). Note that a smaller parameter t yields a better DC decomposition [16]. Concerning on the numerical results given by DCA, it is often observed that DCA provides an integer solution which is also an upper bound solution for the problem (P ). Therefore, DCA is often proposed for upper bound algorithm in nonconvex optimization. More details about DCA and its convergence theorem can be found in [7,5]. Combing DCA with a parallel-branch-and-bound algorithm (PDCABB) proposed in [17], we can globally solve ILP. The PDCABB algorithm is described in Algorithm 2. More details about this algorithm as the convergence theorem, branching strategies, parallel node selection strategies will be discussed in full-length paper. 4 Experimental Results In this section, we present our experimental results for assessing the performance of the sentence compression model described above. 8 Y.S. Niu et al. Algorithm 2: PDCABB Input: Problem (P ); number of parallel workers s; tolerance ε > 0; Output: Optimal solution xopt and optimal value fopt; 1 Initialization: xopt = null; fopt = +∞. 2 Step 1: Root Operations 3 Solve R(P ) to obtain its optimal solution x∗ and set LB ← l(P ); 4 if R(P ) is infeasible then 5 6 else if x∗ ∈ S then return; xopt ← x∗; fopt ← LB; return; 7 8 end 9 Run DCA for (P t) from x∗ to get ¯x∗; 10 if ¯x∗ ∈ S then fopt ← f (¯x∗); L ← {P}; 11 12 else 13 14 end 15 Step 2: Node Operations (Parallel B&B) 16 while L (cid:54)= ∅ do 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Select a sublist Ls of L with at most s nodes in Ls; Update L ← L \ Ls; parallelfor Pi ∈ Ls do Solve R(Pi) and get its solution x∗ and lower bound l(Pi); if R(Pi) is feasible and l(Pi) < fopt then if x∗ ∈ S then xopt ← x∗; fopt ← l(Pi); if fopt − l(Pi) > ε then else i ) from x∗ to get its solution x∗; Run DCA for (P t if x∗ ∈ S and fopt > f (x∗) then xopt ← x∗; fopt ← f (x∗); else Branch Pi into two new problems P u Update L ← {P u i }; i , P d i and P d i ; end end 32 33 34 35 end end Our sentence compression model is implemented in Python as a Natural Language Processing package, called 'NLPTOOL' (actually supporting multi- language tokenization, tagging, parsing, automatic CFG grammar generation, and sentence compression), which implants NLTK 3.2.5[18] for creating parsing trees and Gurobi 7.5.2[2] for solving the linear relaxation problems R(Pi) and the convex optimization subproblems in Step 2 of DCA. The PDCABB algorithm is implemented in C++ and invoked in python. The parallel computing part in PDCABB is realized by OpenMP. 4.1 F-score evaluation Sentence Compression via DC Programming Approach 9 We use a statistical approach called F-score to evaluate the similarity between the compression computed by our algorithm and a standard compression pro- vided by human. F-score is defined by : Fµ = (µ2 + 1) × P × R µ2 × P + R where P and R represent for precision rate and recall rate as: P = A A + C , R = A A + B in which A denotes for the number of words both in the compressed result and the standard result; B is the number of words in the standard result but not in the compressed result; and C counts the number of words in the compressed result but not in the standard result. The parameter µ, called preference parameter, stands for the preference between precision rate and recall rate for evaluating the quality of the results. Fµ is a strictly monotonic function defined on [0, +∞[ with lim µ→+∞ Fµ = R. In our tests, we will use F1 as F-score. µ→0 Fµ = P and lim Clearly, a bigger F-score indicates a better compression. 4.2 Numerical Results Table 1 illustrates the compression result of 100 sentences obtained by two ILP compression models: our new hybrid model (H) v.s. the probability model (P). Penn Treebank corpus (Treebank) provided in NLTK and CLwritten corpus (Clarke) provided in [1] are used for sentence compression. We applied Kneser- Ney Smoothing for computing trigram probabilities. The compression rates 6 are given by 50%, 70% and 90%. We compare the average solution time and the average F-score for these models solved by Gurobi and PDCABB. The experi- ments are performed on a laptop equipped with 2 Intel i5-6200U 2.30GHz CPU (4 cores) and 8 GB RAM. Table 1. Compression results Corpus+Model Solver 50% compression rate 70% compression rate 90% compression rate F-score (%) Time (s) F-score (%) Time (s) F-score (%) Time (s) Treebank+P Treebank+H Clarke+P Clarke+H Gurobi PDCABB Gurobi PDCABB Gurobi PDCABB Gurobi PDCABB 56.5 59.1 79.0 79.9 70.6 81.4 77.8 79.9 0.099 0.194 0.064 0.096 0.087 0.132 0.046 0.081 72.1 76.2 82.6 82.7 80.2 80.0 85.5 85.2 0.099 0.152 0.070 0.171 0.087 0.128 0.052 0.116 79.4 80.0 81.3 82.1 80.0 81.2 82.4 82.3 0.081 0.122 0.065 0.121 0.071 0.087 0.041 0.082 It can be observed that our hybrid model often provides better F-scores in average for all compression rates, while the computing time for both Gurobi and 6 The compression rate is computed by the length of compression over the length of original sentence. 10 Y.S. Niu et al. PDCABB are all very short within less than 0.2 seconds. We can also see that Gurobi and PDCABB provided different solutions since F-scores are different. This is due to the fact that branch-and-bound algorithm find only approximate global solutions when the gap between upper and lower bounds is small enough. Even both of the solvers provide global optimal solutions, these solutions could be also different since the global optimal solution for ILP could be not unique. However, the reliability of our judgment can be still guaranteed since these two algorithms provided very similar F-score results. The box-plots given in Figure 2 demonstrates the variations of F-scores for different models with different corpora. We observed that our hybrid model (Treebank+H and Clarke+H) provided better F-scores in average and is more stable in variation, while the quality of the compressions given by probability model is worse and varies a lot. Moreover, the choice of corpora will affect the compression quality since the trigram probability depends on corpora. Therefore, in order to provide more reliable compressions, we have to choose the most related corpora to compute the trigram probabilities. Fig. 2. Box-plots for different models v.s. F-scores 5 Conclusion and Perspectives We have proposed a hybrid sentence compression model ILP-PT based on the probability model and the parse tree model to guarantee the syntax correctness of the compressed sentence and save the main meaning. We use a DC program- ming approach PDCABB to solve our sentence compression model. Experimental results show that our new model and the solution algorithm can produce high quality compressed results within a short compression time. Concerning on future works, we are very interested in designing a suitable recurrent neural network for sentence compression. With deep learning method, it is possible to classify automatically the sentence types and fundamental struc- tures, it is also possible to distinguish the fixed collocation in a sentence and make these variables be remained or be deleted together. Researches in these directions will be reported subsequently. Sentence Compression via DC Programming Approach 11 References 1. Clarke J, Lapata M.: Global inference for sentence compression: An integer lin- ear programming approach. Journal of Artificial Intelligence Research 31:399 -- 429 (2008). 2. Gurobi 7.5.2. http://www.gurobi.com. 3. Jing.: Sentence reduction for automatic text summarization. In Proceedings of the 6th Applied Natural Language Processing Conference, pp. 310 -- 315 (2000). 4. Knight K, Marcu D.: Summarization beyond sentence extraction : A probalistic approach to sentence compression. Artificial Intelligence 139:91 -- 107 (2002). 5. Le Thi H.A.: https://www.lita.univ-lorraine.fr/~lethi/ 6. Le Thi H.A., Pham D.T., and Muu L.D.: Exact penalty in dc programming. Vietnam J. Math. 27(2) (1999). 7. Le Thi H.A., Pham D.T.: The dc (difference of convex functions) programming and dca revisited with dc models of real world nonconvex optimization problems. Ann. Oper. Res. 133: 23 -- 46 (2005). 8. Le Thi H.A., Nguyen Q.T., Nguyen H.T., Pham D.T.: Solving the earliness tardiness scheduling problem by DC programming and DCA. Math. Balk. 23(3 -- 4), 271 -- 288 (2009) 9. Le Thi H.A., Moeini M., Pham D.T.: Portfolio selection under downside risk mea- sures and cardinality constraints based on DC programming and DCA. Comput. Manag. Sci. 6(4), 459 -- 475 (2009) 10. Le Thi H.A., Le, H.M., Pham D.T., Bouvry P.: Solving the perceptron problem by deterministic optimization approach based on DC programming and DCA. Pro- ceeding in INDIN 2009, Cardiff. IEEE (2009) 11. Le Thi H.A., Pham D.T., and Huynh V.N.: Exact penalty and error bounds in dc programming. J. Global Optim 52(3) (2012). 12. MacDonald D.: Discriminative sentence compression with soft syntactic con- straints. In Proceedings of EACL, pp. 297 -- 304 (2006). 13. Niu Y.S, Pham D.T.: A DC Programming Approach for Mixed-Integer Linear Pro- grams. Modelling, Computation and Optimization in Information Systems and Man- agement Sciences, Communications in Computer and Information Science. 14:244 -- 253 (2008). 14. Niu Y.S: Programmation DC & DCA en Optimisation Combinatoire et Optimi- sation Polynomiale via les Techniques de SDP -- Codes et Simulations Num´eriques. Ph.D. thesis, INSA-Rouen, France (2010). 15. Niu Y.S., Pham D.T.: Efficient DC programming approaches for mixed-integer quadratic convex programs. Proceedings of the International Conference on Indus- trial Engineering and Systems Management (IESM2011). pp. 222 -- 231 (2011). 16. Niu Y.S.: On Difference-of-SOS and Difference-of-Convex-SOS Decompositions for Polynomials. (2018) arXiv:1803.09900. 17. Niu Y.S.: A Parallel Branch and Bound with DC Algorithm for Mixed Integer Optimization, The 23rd International Symposium in Mathematical Programming (ISMP2018), Bordeaux, France. (2018). 18. NLTK 3.2.5: The Natural Language Toolkit. http://www.nltk.org. 19. Pham D.T, Hoai An L.T, Pham V.N, Niu Y.S.: DC programming approaches for discrete portfolio optimization under concave transaction costs. Optimization letters 10(2):261 -- 282 (2016). 20. Schleich J., Le Thi H.A., Bouvry P.: Solving the minimum m-dominating set prob- lem by a continuous optimization approach based on DC programming and DCA. J. Comb. Optim. 24(4), 397 -- 412 (2012)
1904.11610
1
1904
2019-04-25T22:12:43
Look Who's Talking: Inferring Speaker Attributes from Personal Longitudinal Dialog
[ "cs.CL", "cs.AI" ]
We examine a large dialog corpus obtained from the conversation history of a single individual with 104 conversation partners. The corpus consists of half a million instant messages, across several messaging platforms. We focus our analyses on seven speaker attributes, each of which partitions the set of speakers, namely: gender; relative age; family member; romantic partner; classmate; co-worker; and native to the same country. In addition to the content of the messages, we examine conversational aspects such as the time messages are sent, messaging frequency, psycholinguistic word categories, linguistic mirroring, and graph-based features reflecting how people in the corpus mention each other. We present two sets of experiments predicting each attribute using (1) short context windows; and (2) a larger set of messages. We find that using all features leads to gains of 9-14% over using message text only.
cs.CL
cs
Look Who's Talking: Inferring Speaker Attributes from Personal Longitudinal Dialog Charles Welch, Ver´onica P´erez-Rosas, Jonathan K. Kummerfeld, and Rada Mihalcea {cfwelch,vrncapr,jkummerf,mihalcea}@umich.edu University of Michigan Abstract. We examine a large dialog corpus obtained from the conver- sation history of a single individual with 104 conversation partners. The corpus consists of half a million instant messages, across several messag- ing platforms. We focus our analyses on seven speaker attributes, each of which partitions the set of speakers, namely: gender; relative age; family member; romantic partner; classmate; co-worker; and native to the same country. In addition to the content of the messages, we examine conversa- tional aspects such as the time messages are sent, messaging frequency, psycholinguistic word categories, linguistic mirroring, and graph-based features reflecting how people in the corpus mention each other. We present two sets of experiments predicting each attribute using (1) short context windows; and (2) a larger set of messages. We find that using all features leads to gains of 9-14% over using message text only. Keywords: longitudinal dialog analysis, natural language processing 1 Introduction People spend a significant amount of time using social media services such as instant messaging to communicate and keep in touch with others. Over time, conversation history can grow quickly, thus becoming an abundant source of per- sonal data that provides the opportunity to study an individual's communication patterns and social preferences. Analyzing conversations from a single individ- ual rather than conversations from multiple individuals can enable identification of social behaviors that are specific to that individual. Moreover, longitudinal analyses can help us better understand an individual's social interactions and how they develop over time. In this work we look at a collection of personal conversations of one of this paper authors' over a five-year span, consisting of nearly half a million messages shared with 104 conversation partners. To address data privacy issues, during the experiments and analyses presented in this paper, the actual message content is only accessible to its owner. We focus our analyses on seven speaker attributes: a ternary attribute for relative age (younger, older, or same age); and six binary attributes reflecting whether somebody is the same gender; a family member; a romantic partner; a classmate; a co-worker; and a native of the same country. We explore the classification of speaker attributes, i.e, the group(s) the speaker belongs to, using a variety of linguistic features, message and time frequency features, stylistic and psycholinguistic features, and graph-based features. In ad- dition, we examine the performance increase gained by using six of the attributes as features to try to classify the seventh. We analyze linguistic variation in messages exchanged between the author and the other speakers. We also conduct analyses that look at speaker interaction behaviors, considering aspects such as time, messaging frequency, turn-taking, and linguistic mirroring. Next, we apply graph-based methods to model how people interact with each other by representing people as nodes and speaker mentioning each other as directed edges. We then apply clustering methods to identify groups that naturally occur in the graph. Finally, we conduct several classification experiments to quantify the impact of features derived from these analyses on our ability to determine who a speaker is. Identifying speaker attributes has important applications within the areas of personalization and recommendation [14,4]. While a large number of conver- sations that occur online are short, such as interactions on Twitter, there are also many social media platforms where personal dialog may span thousands of utterances. For this reason, we conduct evaluations at the level of small context windows, as well as at the speaker level using a large set of messages from each speaker. To the best of our knowledge, this is the first study on speaker attribute prediction using personal longitudinal dialog data that focuses on one person's dialog interactions with many other speakers. 2 Related Work Our work is related to three main directions of research: authorship attribution, discourse analysis, and speaker attribute classification from social media. On authorship attribution, there have been several studies focusing on in- ferring author's characteristics from their writing, including their gender, age, educational, cultural background, and native language [6,10]. This work has considered linguistic features to capture lexical, syntactic, structural, and style differences between individuals [10]. A recent study in this area analyzed lan- guage use in social media to identify aspects such as gender, age, and personality by looking at group differences on language usage in words, phrases, and topics discussed by Facebook users [15]. Discourse analysis approaches have been used to examine language to re- veal social behavior patterns. Holmer [7] applied discourse structure analysis to chat communication to identify and visualize message content and interaction structures. He focused on visualizing aspects such as conversation complexity, overlapping turns, distance between messages, turn changes, patterns in message production and references. In addition, he also proposed graph-based methods for showing coherence and thread patterns during the messaging interaction. Tu- ulos [17] inferred social structures in chat-room conversations, using heuristics based on participants' references, message response time and dialog sequences and represented social structure using graph-based methods. Similarly, Jing [9] looked at extracting networks of biographical facts from speech transcripts that characterize the relationships between people and organizations. Work in classifying user attributes has used both message content and other meta-features. Rao [14] looked at classifying gender, age (older or younger than 30), political leaning, and region of origin (north or south India) as binary vari- ables using a few hundred or a few thousand tweets from each user. They used the number of followers and following users as network information to look at frequency of tweets, replies, and retweets as communication-based features but found no differences between classes. Hutto [8] analyzed sentiment, topic focus, and network structure in tweeting behavior to understand aspects such as so- cial behavior, message content and following behavior. Other work has derived useful information from Twitter profiles, such as Bergsma [2] who focused on gender classification using features derived from usernames, and Argamon [1] who found differences in part of speech and style when examining gender in the British National Corpus. 3 Conversation Dataset We use a corpus of text messages from one author's personal conversations on Google Hangouts, Facebook Messenger, and SMS text messages. The message set contains nearly half a million messages from conversations held between the author and 104 individuals. Aggregate statistics describing the corpus are shown in Table 1. Table 1. Distribution of messages and tokens (words, punctuation, emoticons) in the conversations between the author and other individuals. Author Others All Total Messages Unique Messages Total Tokens Unique Tokens Average Tokens / Message 237,300 165,536 1,370,916 38,937 5.78 216,766 168,041 1,602,607 48,005 7.39 454,066 326,243 2,973,523 68,985 6.55 We use seven attributes that describe the relationship between the author and their conversation partner. Table 2 shows the distribution of people and messages for each attribute in the dataset. They were annotated by the author and interpreted as follows: Family: This person is related to the author. Romantic Relationship (Rom. Rel.): This person's relationship with the author was at some point not platonic. Table 2. Distribution of speakers and messages in the corpus by speaker attributes (% of corpus). The values for Age represent 'younger', 'older', and 'same age', while the values for the other attributes represent 'yes' and 'no'. Family Y/N 6/94 8/92 Rom. Rel. Rel. Age Child. Co. Gender School Work Y/N Y/O/S Y/N Y/N Y/N Y/N 9/91 22/78 26/30/44 24/24/52 78/20 88/11 51/49 53/47 62/38 75/25 33/67 54/46 %Speakers %Messages Relative Age (Rel. Age): This person the same age (±1.5 years), is older, or is younger than the author. Childhood Country (Child. Co.): This person grew up in the same country as the author. Gender: This person has the same gender as the author. School: This person and the author met attending school. Work: This person and the author know each other because they worked to- gether. 4 Message Content We start by exploring linguistic differences in the messages exchanged between the author and each of the groups defined by the seven attributes described above. We obtain the most dominant semantic word classes [13] in messages exchanged with people sharing each attribute using the LIWC [16] lexicon, which contains psycholinguistic categories of words. The top ten dominant classes for each attribute-value pair are shown in Table 3. Not surprisingly, the 'Family=Yes' group talks more about family and home than the 'Family=No' group. Interestingly, people who are not family members seem to use more emotion related words. Word categories related to feelings are also very dominant for the 'Romantic Relationship=Yes', 'Relative Age=Same', 'Childhood Country=Same' and 'Gender=No' groups; however they seem to fo- cus on negative emotions such as anxiety and sadness. In fact, those two are in the top three classes for conversations with romantic partners 'Romantic Rela- tionship=Yes', which also includes death words (words related to death are often used in hyperbole, e.g. "I didn't eat lunch and I'm dying"). This suggests that more serious conversations occur between the author and this group as compared to the 'Romantic Relationship=No' group. Several of the attributes clearly separate the set of speakers into those who speak about work and those who do not. People who talk the most about work are those who grew up in other countries ('Childhood Country=Other'), people from work ('Work=Yes'), people older than the author ('Relative Age=Older'), people with the same gender ('Gender=Yes') and people from school ('School=Yes'). Table 3. Dominant LIWC word classes for each attribute/value pair. The top ten classes are listed for each attribute in decreasing order. Attribute Top Classes Family Romantic Relationship Yes: Family, Money, Home, Swear, Death, Leisure, Filler, Anger, Female, Health No: Anxious, Insight, Feel, Risk, Sad, Positive Emotion, Non- fluencies, Causality, Affect, Work Yes: Anxious, Death, Sad, Feel, Body, Filler, You, Family, Percep- tion, Health No: Swear, Female, Money, Friend, Anger, She-He, Work, Leisure, Informal, Male Relative Age Younger: Netspeak, Ingest, Swear, Friend, Biological, Home, Anger, Informal, Body, Leisure Same: Female, Swear, Anger, She-He, Anxious, Negative Emotion, Friend, Sad, Negate, Money Older: See, We, Work, Number, Article, Home, Perception, Space, Motion, Relativity Same: Death, Family, Anger, Swear, Feel, Female, Negative Emo- tion, Body, Anxious, Health Other: We, Work, You, Male, Focus Future, Social, Affiliation, Friend, Assent, Time Yes: Money, Female, Swear, Work, Friend, Netspeak, She-He, Ar- ticle, Power No: Sad, Anxious, Family, Health, Death, Body, Biological, Nega- tive Emotion, Ingest, Home Yes: Work, Non-fluencies, Insight, Risk, Anxious, Quantify, Focus Past, Causality, Tentative, Compare No: Family, Money, Health, Home, Netspeak, Death, Swear, Leisure, Biological, Anger Yes: Work, Article, Number, We, Non-fluencies, Quantify, Com- pare, Insight, Achievement, Assent No: Family, Health, Money, Death, Anger, Swear, Anxious, Home, Biological, Sad Childhood Country Gender School Work However, there are some differences between these groups which can be seen mostly in the family, health, time, and gender specific words they use. People from school use more words referring to the past, while people from other countries focus more on the future. Interestingly, people not from work ('Work=No') and the people not from school ('School=No') are very similar, and both use a lot of family, health, and money words. The similarity of these two attributes is also interesting in that people from work ('Work=Yes') and/or school ('School=Yes') use more quantifying words (e.g. sampling, percent, aver- age) and disfluencies (e.g. umm, hmm, sigh). We also see that those who grew up in other countries use more male words, while speakers that are the same age, from the same country, or of the same gender use more female words. 5 Groups Over Time To understand the role that time has in the author's interactions with different groups we look at patterns in message volume over different intervals. Most notably, we find interaction differences given the day of the week, and the hour of the day. In Figure 1 we plot the attribute/value pairs that differ the most from the trend over all people, marked 'All'. The difference was calculated as the sum of differences on each of the seven days of the week and each of the 24 hours of the day. 0.16 0.14 0.12 8 6 4 2 0 s e g a s s e M f o e g a t n e c r e P All Family=Yes Work=No Child Country=No M ·10−2 Tu W Th F Sa Su All Family=Yes Child Country=No Romantic=Yes 3 6 9 12 15 18 21 24 Fig. 1. Distribution of messages over time. The top shows the distribution over the day of the week and the bottom shows hour of the day. The groups shown are those that vary the most from the aggregate trend over all speakers. We see that the overall trend for the day-of-week plot (top) is that there are more conversations during the first days of the week. The number of con- versations drops until Sunday where it jumps back up and peaks on Monday. Throughout the week, most of the conversations occur between family members and people that grew up in other countries (co-workers mainly). In contrast, there are many more conversations with people outside of work on the weekend. The hour-of-day plot (bottom) indicates that most of the interactions happen between 9AM and 6PM. Though this is a trend aggregated over all days in the corpus it shows that the author is least likely to be talking to people in the 7-8AM range. The author tends to speak more to people later in the day, with a peak at midnight. People who grew up in other countries converse more with the author during the day. The dominant 'Work' category for 'Childhood Country=Other' in Table 3 shows this trend, as this group may converse with the author more about work during work hours. We also find that family members speak to the author more during the day and romantic partners speak to the author more after midnight but before noon. 6 Conversation Interaction Linguistic mirroring is a behavior in which one person subconsciously imitates the linguistic patterns of their conversation partner. Increased linguistic mirror- ing can be an indicator of an individual building rapport with others and thus forming better interpersonal relationships. We study linguistic mirroring in our dataset to analyze how relationships change over time. We calculate linguistic style matching (LSM) as the similarity of the normalized counts of nine types of function words [5], as the main metric for our analyses. In Figure 2 we show style matching over the first 5,000 messages with people in five specific groups. We see that although the general trend is to match language style more over time, this trend levels off after 3k messages, potentially because at this point relationships start to consolidate. g n i h c t a M e l y t S c i t s i u g n L i 90 88 86 84 82 80 78 Relative Age=Same School=Yes Childhood Country=Same Family=Yes Romantic=Yes 0 1,000 2,000 3,000 4,000 5,000 Number of Messages Fig. 2. Language mirroring as a function of the number of messages exchanged within groups. Mirroring is shown over the first 5,000 messages averaged over people in each of the listed groups. Next, we examine interactions between groups of people by constructing a graph where nodes represent speakers and edges between nodes represent speak- ers mentioning each other. Speakers who mention each other also tend to know each other. They might mention another person when planning to meet up with others or when talking about an interaction they had with this person in the past. We clustered the graph of people using Louvain clustering [3] to maximize Cluster 2 Cluster 1 Cluster 3 Fig. 3. Speaker references for the top 20 conversation partners. The graph shows inter- actions with people from different groups: high school (rectangles), college (triangles), graduate school (rounded rectangles), family members (circles), and other people (el- lipses). Shading is proportional to how long ago the author met the person. Edges below a threshold of 25 mentions are removed. Note that the clustering uses all 104 people, but only 20 are shown here. the modularity of the network. This gave four clusters, one of which only con- tained two people. The remaining clusters roughly evenly split the set of people. The top twenty most frequent conversation partners are shown in Figure 3. In- terestingly, the clusters resemble groups of speakers that the author spoke most to at three periods of time contained in the corpus i.e, conversations before at- tending graduate school (Cluster 3), the beginning of graduate school (Cluster 2), and later in graduate school (Cluster 1). We also see that people who spoke to the author more at a particular time were also more likely to know each other. Table 4. Two examples of five-message context windows (ctx1 and ctx2) taken from the data. Message Number Time Message ctx1msg0 ctx1msg1 ctx1msg2 ctx1msg3 ctx1msg4 ctx2msg0 ctx2msg1 ctx2msg2 ctx2msg3 ctx2msg4 15:45:06 Participant: Wanna grab coffee? 15:45:20 Author: yeah 15:45:25 Participant: Sweet!!!! 15:45:29 Participant: Meet in the lobby? 15:45:52 Author: okay 12:21:00 Participant: Perfect!! 15:56:22 Participant: Wanna go to get Thai? 16:01:18 Participant: I'll take it you're sleeping lol 16:19:59 Author: Yeah 16:20:08 Author: I mean yeah I was sleeping 7 Model Using the messages in a conversation between two speakers, we wish to be able to identify the value of each of the speaker attributes of whom the author is conversing with. In order to do this, we can encode part of the conversation and additional features and output the value of an attribute. In text messaging, it is often not clear what a conversation is about by just examining individual mes- sages. Thus, we decide to conduct our analysis on small sequences of message exchanges between speakers. Throughout the rest of the paper, we will refer to each of these sequences as a context window, which consists of five messages ex- changed between the author and another speaker1. Two sample context windows are shown in Table 4. During our experiments, we use a bidirectional long-short term memory net- work (BiLSTM) as our baseline model. The input for this model is a dialog context window, in which all utterances are concatenated but one token is used to represent the beginning of an author utterance and another token is used to represent the beginning of any other speaker's utterance. We use the same implementation to incorporate additional features. The model architecture is shown in Figure 4. As shown, the context encoder takes the concatenated window of length n and generates the encoding ρ1. In the baseline case the feature encoders are not used and the context encoding is passed directly to an attribute decoder. A separate attribute decoder is used for each speaker attribute and has k outputs, where k is two for every case except 'relative age', which has three possible values. When using additional features, we take the BiLSTM output, representing the encoded context window, and append it to a normalized vector representation of each additional feature set, ρi. A feed-forward layer is then used to encode each feature set separately. The hidden size s for both the feature encoders and attribute decoders were manually tuned in preliminary experiments. We use a hidden size of 64 for experiments in this paper. In our models that use one or more feature encoders, the concatenated ρ vector is used for decoding. The feature encoder sizes t will vary depending on which feature set is being encoded. The word embedding inputs to the context encoder are 300 dimensional. 8 Features Word Embeddings: We obtain word vector representations for each message using the GloVe Common Crawl pre-trained model [12]. We chose GloVe over other frequently used embeddings because its training data is more similar to our data and we observed a higher token coverage rate than embeddings such as word2vec trained on GoogleNews [11]. 1 Context window size is fixed in our experiments but future work could explore pre- diction accuracy as a function of this variable. Context Encoder w1 w2 ... wn B1 B2 ... Bn F1 F2 ... Fn ρ1 Feature Encoders f1 ... ft h1 h2 ... hs ρiρi ρi Attribute Decoders c1 c2 ... cs a1 ... ak Fig. 4. The model architecture encodes a context window as a sequence of tokens w1 to wn using a BiLSTM which is represented with forward and backward cells. The encoding is then used in combination with our other feature sets for decoding. A separate decoder is used for each speaker attribute. LIWC: To calculate these features, we obtain the normalized counts of 73 LIWC categories. The feature set includes the vectors obtained from messages of individual conversation participants, the cosine similarity between them, and the vector sum of both speakers. Time: These features include the time elapsed during the context window, the number of seconds between each of the messages, and the day, month, year, season (winter, fall, summer, spring), and hour of the day of the last message. Messaging frequency: This set of features includes the number of messages exchanged between conversation participants in the past day, week, month, and from all time. The vector also includes a list of binary values representing the turn change sequence in the context window. Style Matching: Looks at the similarity of the ratios of function word usage between the two speakers. This set of features includes the LSM score for the last hundred messages exchanged by the conversation participants, as well as the change in style matching over the context window by subtracting the final and initial LSM scores. Graph-based: Uses the training set of messages to generate a graph where nodes represent people and weighted, directed edges represent how often that person mentions another person when speaking to the author. This graph is used to generate features by finding the shortest path between users where edge weights are smaller when they have more mentions. We then use the adjacency matrix to find the shortest paths between nodes and use each row as a feature set, representing a speaker i conversing with this person. Given a graph of mentions, where Mi,j represents how often person i mentions person j, we compute weights using the following equation: Wi,j = 1 − wmax − Mi,j wmax − wmin Speaker Attributes: When we are predicting one of the seven speaker at- tributes this feature set represents the values of the other six attributes. Note that we cannot use this feature when training joint models. 9 Experiments Using the features described in Section 8 we run experiments using leave-one- speaker-out cross validation. We take the 104 speakers in our dataset and hold out all context windows containing dialog with one of the speakers as a test set and use the rest for training and validation with a 90% and 10% split. This means that we train and tune parameters on context windows from all 103 other speakers and update the model based on its predictions on each individual context window. During test time we examine the context-level and speaker-level accuracy. Context-level accuracy is calculated by macro-averaging the context window accuracy over all speakers. To calculate accuracy at speaker level, we first obtain the attribute prediction at context-window level for the held-out speaker and assign the attribute value most frequently predicted by the classifier. We run experiments using a baseline model which only uses word embeddings and compare it to a model that uses all of our features. Additionally, we perform an ablation to examine the effectiveness of each feature set for predicting each speaker attribute by running the model using the word embeddings plus one of the other feature sets at a time. While we vary the number of feature encoders we use (see Figure 4), each model always uses one attribute decoder. The loss for each model is calculated as the cross-entropy loss for that model's attribute decoder. Since this evaluation is computationally expensive we run our experiments on a subset of the original corpus. Thus, we obtain a sample of 27,316 context windows, distributed as evenly as possible, from each speaker in the dataset to ensure that all people and attributes are represented. Experiments using this dataset took 3-4 days to run on a cluster with 12 NVIDIA GeForce GTX TITAN X GPUs. During our experiments we consider single attribute models, which use only one attribute decoder, and joint models, which learn to predict all attributes at the same time using all decoders. In the single attribute setting we train a separate model for each attribute and calculate the cross-entropy loss for the decoder, while in the joint case we take the sum of the losses for all decoders. 10 Results The results obtained for each attribute, when using different combinations of fea- tures are shown in Table 5 and Table 6. The first table shows accuracies at the person-level while the latter shows performance macro-averaged over context- windows. Overall, the combination of all features improves the prediction per- formance for all the attributes over a baseline model that only uses word embed- dings, with the exception of the gender attribute. The largest context-window Table 5. Results are shown for the accuracy per person using leave-one-speaker-out cross validation. Individual models learn to classify each attribute in all cases except for the two 'Joint' rows, which jointly classify attributes. Feature ablations are shown for each of the single feature types, and compared to the model that uses all features, as well as the baselines obtained using the majority class or message embeddings (Emb) only. Additional improvements are shown when training single attribute classifiers and using the other six attributes as features. Family Rom. Rel. Rel. Age Child. Co. Gender School Work Baselines Majority Class Emb 94.2 94.2 91.3 91.3 44.2 45.2 77.9 79.8 51.0 86.5 Single Attribute Decoder Ablation Emb + Time Emb + LIWC Emb + Style Emb + Frequency Emb + Graph 94.2 94.2 94.2 94.2 93.3 91.3 91.3 91.3 91.3 91.3 44.2 46.2 49.0 44.2 43.3 79.8 80.8 78.8 80.8 77.9 85.6 82.7 86.5 83.7 80.8 61.5 73.1 76.0 73.1 76.0 75.0 76.0 Single Attribute Decoder All Features vs Joint Decoder Models All Features Joint + Emb Joint + All 92.3 94.2 92.3 91.3 91.3 91.3 45.2 48.1 51.9 81.7 78.8 84.6 76.0 85.6 77.9 76.9 71.2 75.0 67.3 80.8 85.6 84.6 85.6 86.5 87.5 83.7 83.7 84.6 Single Attribute Decoder with Attribute Features Emb + Attributes All + Attributes 94.2 93.3 91.3 91.3 48.1 50.0 87.5 88.5 83.7 78.8 73.1 78.8 84.6 85.6 level improvements are obtained for the Relative age, Childhood country, Gender and Work attributes. The largest speaker-level improvements are similar with the addition of School and without Gender. Although in some cases the accuracy of attribute prediction at speaker-level is not improved by the different set of features, we still observe an improvement on the prediction accuracy at the context window level. For instance, the Family and Romantic attributes improve by 2.1% and 6% respectively. We also see that the Gender attribute improves up to 6.8% by this metric. Using the other six speaker attributes as features to classify the seventh proved to be beneficial in all cases. The graph features also proved useful for all attributes showing gains of up to 6.7% in speaker-level performance and up to 7% in context-window level performance. The frequency features gave the biggest performance increase to the Romantic, Childhood country, and Work attributes. Time features improve performance most on Romantic, Gender, School, Work. The overall trend we found in Section 6 showed that the most distinct groups when looking at language mirroring were 'Family=Yes' and 'Romantic=Yes'. Table 6. Accuracy on context windows macro-averaged over speakers. The individual, joint, single attribute, and baseline models are defined the same way as in Table 5. Family Rom. Rel. Rel. Age Child. Co. Gender School Work Baselines Majority Class Emb 94.2 92.0 91.3 86.0 44.2 39.2 77.9 75.7 51.0 63.7 Single Attribute Decoder Ablation Emb + Time Emb + LIWC Emb + Style Emb + Frequency Emb + Graph 91.7 91.9 92.0 91.3 92.1 86.8 86.4 86.0 87.9 86.2 40.5 39.6 38.9 39.2 41.7 77.4 76.7 76.2 76.0 76.9 63.4 62.6 62.8 62.4 61.4 61.5 64.6 64.4 63.8 65.1 65.5 67.2 67.3 69.5 73.1 69.4 69.2 71.3 73.3 Single Attribute Decoder All Features vs Joint Decoder Models All Features Joint + Emb Joint + All 92.0 93.9 92.1 88.1 90.9 90.2 42.7 43.4 47.2 78.9 78.0 80.8 61.2 64.2 61.8 67.0 65.5 68.7 76.0 69.3 78.4 Single Attribute Decoder with Attribute Features Emb + Attributes All + Attributes 92.6 92.0 86.4 88.2 41.5 44.3 84.1 85.7 68.6 67.1 72.7 74.3 78.4 83.4 However, we found that the language mirroring features that we used, which use a sliding window, were most useful for Relative age, School, and Work. Similarly, LIWC features help for Relative age and Work, but they also improve prediction performance for Childhood country and Gender. At the speaker level, classification is more difficult and we do not see im- provement for all attributes when using the additional features or joint decoders. However, at the context-window level we found that joint decoders improved over single attribute decoders in all cases, though using the additional features did not help for Romantic, Family, and Gender. When using single attribute decod- ing with the other attributes as features we found even higher performance for four of the attributes. Interestingly, Gender still does not benefit from using ex- tra features and simply knowing the values of the other speaker attributes gives the best result. The lowest accuracy overall is obtained for relative age, this can be partly explained by the lower baseline as compared to the other attributes, which is influenced by the fact that it has three possible values instead of two. 11 Conclusion In this paper, we addressed the task of classifying the attributes of an individ- ual based on their conversations in a longitudinal dataset. We conducted anal- yses of several interaction aspects, including message content, speaker groups over time, and interaction during the conversation. We developed a bidirectional LSTM architecture that, in addition to message content, includes a variety of features derived from our analyses, covering the time-stamp of the messages, messaging frequency, psycholinguistic word categories, linguistic mirroring, and graph-based representations of interactions between people. Additionally, to ac- count for scenarios where some attributes are known, we present experiments that evaluate the use of the other six speaker attributes when classifying the seventh. Our experiments evaluate the accuracy of predictions at the context-window level, which uses only a sequence of five messages for message content, as well as at the speaker level using a larger set of context windows from each speaker. We observed improvements in speaker level accuracy up to 8.7% and up to 13.9% accuracy on context windows. We explore the usefulness of each feature with an ablative study and compare two different methods of decoding. For the case of predicting someone's relative age or whether or not they are a co-worker, classmate, or native from the same country, we see improvement at both levels. Our evaluations show improvement over a system that only uses one of these features at a time, as well as over a baseline system that relies exclusively on message content. To the best of our knowledge, this is the first study on speaker attribute prediction using personal longitudinal dialog data that focuses on one persons' interactions with many users. The code used to extract the conversations from social media, to interactively annotate speakers, and to perform the experiments presented in this paper is publicly available2, so others can conduct analyses on their own data. Acknowledgments This material is based in part upon work supported by the Michigan Insti- tute for Data Science, by the National Science Foundation (grant #1815291), by the John Templeton Foundation (grant #61156), and by DARPA (grant #HR001117S0026-AIDA-FP-045). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author and do not necessarily reflect the views of the Michigan Institute for Data Science, the Na- tional Science Foundation, the John Templeton Foundation, or DARPA. References 1. Argamon, S., Koppel, M., Fine, J., Shimoni, A.R.: Gender, genre, and writing style in formal written texts. Text-Interdisciplinary Journal for the Study of Discourse 23(3), 321 -- 346 (2003) 2. Bergsma, S., Dredze, M., Van Durme, B., Wilson, T., Yarowsky, D.: Broadly im- proving user classification via communication-based name and location clustering 2 https://github.com/cfwelch/longitudinal_dialog on twitter. In: Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. pp. 1010 -- 1019 (2013) 3. Blondel, V.D., Guillaume, J.L., Lambiotte, R., Lefebvre, E.: Fast unfolding of com- munities in large networks. Journal of statistical mechanics: theory and experiment 2008(10), P10008 (2008) 4. Garera, N., Yarowsky, D.: Modeling latent biographic attributes in conversational genres. In: Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP: Volume 2-Volume 2. pp. 710 -- 718. Association for Computational Linguistics (2009) 5. Gonzales, A.L., Hancock, J.T., Pennebaker, J.W.: Language style matching as a predictor of social dynamics in small groups. Communication Research (2009) 6. Hirst, G., Feiguina, O.: Bigrams of syntactic labels for authorship discrimination of short texts. Literary and Linguistic Computing 22(4), 405 -- 417 (2007) 7. Holmer, T.: Discourse structure analysis of chat communication. Language@ In- ternet 5(10) (2008) 8. Hutto, C.J., Yardi, S., Gilbert, E.: A longitudinal study of follow predictors on twitter. In: Proceedings of the SIGCHI conference on human factors in computing systems. pp. 821 -- 830. ACM (2013) 9. Jing, H., Kambhatla, N., Roukos, S.: Extracting social networks and biographical facts from conversational speech transcripts. In: Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics. pp. 1040 -- 1047 (2007) 10. Koppel, M., Schler, J., Argamon, S.: Computational methods in authorship attri- bution. Journal of the Association for Information Science and Technology 60(1), 9 -- 26 (2009) 11. Mikolov, T., Sutskever, I., Chen, K., Corrado, G.S., Dean, J.: Distributed repre- sentations of words and phrases and their compositionality. In: Advances in neural information processing systems. pp. 3111 -- 3119 (2013) 12. Pennington, J., Socher, R., Manning, C.D.: Glove: Global vectors for word repre- sentation. In: Empirical Methods in Natural Language Processing (EMNLP). pp. 1532 -- 1543 (2014), http://www.aclweb.org/anthology/D14-1162 13. Pulman, S., Mihalcea, R.: Linguistic ethnography: Identifying dominant word classes in text pp. 595 -- 602 (2009) 14. Rao, D., Yarowsky, D., Shreevats, A., Gupta, M.: Classifying latent user attributes in twitter. In: Proceedings of the 2nd international workshop on Search and mining user-generated contents. pp. 37 -- 44. ACM (2010) 15. Schwartz, H.A., Eichstaedt, J.C., Kern, M.L., Dziurzynski, L., Ramones, S.M., Agrawal, M., Shah, A., Kosinski, M., Stillwell, D., Seligman, M.E., et al.: Per- sonality, gender, and age in the language of social media: The open-vocabulary approach. PloS one 8(9), e73791 (2013) 16. Tausczik, Y.R., Pennebaker, J.W.: The psychological meaning of words: Liwc and computerized text analysis methods. Journal of language and social psychology 29(1), 24 -- 54 (2010) 17. Tuulos, V.H., Tirri, H.: Combining topic models and social networks for chat data mining. In: Proceedings of the 2004 IEEE/WIC/ACM international Conference on Web intelligence. pp. 206 -- 213. IEEE Computer Society (2004)
1809.08927
1
1809
2018-09-21T08:27:01
Adversarial Training in Affective Computing and Sentiment Analysis: Recent Advances and Perspectives
[ "cs.CL", "cs.AI", "cs.HC" ]
Over the past few years, adversarial training has become an extremely active research topic and has been successfully applied to various Artificial Intelligence (AI) domains. As a potentially crucial technique for the development of the next generation of emotional AI systems, we herein provide a comprehensive overview of the application of adversarial training to affective computing and sentiment analysis. Various representative adversarial training algorithms are explained and discussed accordingly, aimed at tackling diverse challenges associated with emotional AI systems. Further, we highlight a range of potential future research directions. We expect that this overview will help facilitate the development of adversarial training for affective computing and sentiment analysis in both the academic and industrial communities.
cs.CL
cs
Adversarial Training in Affective Computing and Sentiment Analysis: Recent Advances and Perspectives Jing Han, Zixing Zhang, Nicholas Cummins, and Bjorn Schuller 1 8 1 0 2 p e S 1 2 ] L C . s c [ 1 v 7 2 9 8 0 . 9 0 8 1 : v i X r a Abstract -- Over the past few years, adversarial training has become an extremely active research topic and has been suc- cessfully applied to various Artificial Intelligence (AI) domains. As a potentially crucial technique for the development of the next generation of emotional AI systems, we herein provide a comprehensive overview of the application of adversarial training to affective computing and sentiment analysis. Various represen- tative adversarial training algorithms are explained and discussed accordingly, aimed at tackling diverse challenges associated with emotional AI systems. Further, we highlight a range of potential future research directions. We expect that this overview will help facilitate the development of adversarial training for affective computing and sentiment analysis in both the academic and industrial communities. Index Terms -- overview, adversarial training, sentiment anal- ysis, affective computing, emotion synthesis, emotion conversion, emotion perception and understanding I. INTRODUCTION Affective computing and sentiment analysis currently play a vital role in transforming current Artificial Intelligent (AI) systems into the next generation of emotional AI devices [1], [2]. It is a highly interdisciplinary research field spanning psychology, cognitive, and computer science. Its motivations include endowing machines with the ability to detect and understand the emotional states of humans and, in turn, re- spond accordingly [1]. Both the terms affective computing and sentiment analysis relate to the computational interpretation and generation of human emotion or affect. Whereas the former mainly relates to instantaneous emotional expressions and is more commonly associated with speech or image/video processing, the later mainly relates to longer-term opinions or attitudes and is more commonly associated with natural language processing. A plethora of applications can benefit from the development of affective computing and sentiment analysis [3] -- [8]; exam- ples include natural and friendly human -- machine interaction systems, intelligent business and customer service systems, and remote health care systems. Thus, affective computing and sentiment analysis attract considerable research attention in both the academic and industrial communities. J. Han and N. Cummins are with the ZD.B Chair of Embedded Intelligence for Health Care and Wellbeing, University of Augsburg, Germany. Z. Zhang is with GLAM -- Group on Language, Audio & Mu- Imperial College London, UK (corresponding author, email: zix- sic, [email protected]). B. Schuller is with the ZD.B Chair of Embedded Intelligence for Health Care and Wellbeing, University of Augsburg, Germany, and also with GLAM -- Group on Language, Audio & Music, Imperial College London, UK. From a technical point of view, affective computing and sentiment analysis are associated with a wide range of ad- vancements in machine learning, especially in relation to deep learning technologies. For example, deep Convolutional Neural Networks (CNNs) have been reported to considerably outperform conventional models and non-deep neural networks on two benchmark databases for sentiment analysis [9]. Fur- ther, an end-to-end deep learning framework which automat- ically learns high-level representations from raw audio and video signals has been shown to be effective for emotion recognition [10]. However, when deployed in real-life applications, affective computing and sentiment analysis systems face many chal- lenges. These include the sparsity and unbalance problems of the training data [11], the instability of the emotion recognition models [12], [13], and the poor quality of the generated emotional samples [14], [15]. Despite promising research efforts and advances in leveraging techniques, such as semi- supervised learning and transfer learning [11], finding robust solutions to these challenges is an open and ongoing research challenge. In 2014, a novel learning algorithm called adversarial train- ing (or adversarial learning) was proposed by Goodfellow et al. [16], and has attracted widespread research interests across a range of machine learning domains [17], [18], including affective computing and sentiment analysis [19] -- [21]. The initial adversarial training framework, Generative Adversarial Networks (GANs), consists of two neural networks -- a gen- erator and a discriminator, which contest with each other in a two-player zero-sum game. The generator aims to capture the potential distribution of real samples and generates new samples to 'cheat' the discriminator as far as possible, whereas the discriminator, often a binary classifier, distinguishes the sources (i. e., real samples or generated samples) of the inputs as accurately as possible. Since its inception, adversarial training has been frequently demonstrated to be effective in improving the robustness of recognition models and the quality of the simulated samples [16] -- [18]. Thus, adversarial training is emerging as an efficient tool to help overcome the aforementioned challenges when building affective computing and sentiment analysis systems. More specifically, on the one hand, GANs have the potential to produce an unlimited amount of realistic emotional samples; on the other hand, various GAN variants have been proposed to learn robust high-level representations. Both of the aspects can improve the performance of emotion recognition systems. Accordingly, over the past three years, the number of related papers has grown exponentially. Motived by the pronounced improvement achieved by these works and by the belief that adversarial training can further advance more works in the community, we thus feel that, there is a necessity to summarise recent studies, and draw attention to the emerging research trends and directions of adversarial training in affective com- puting and sentiment analysis. A plethora of surveys can be found in the relevant lit- erature either focusing on conventional approaches or (non- adversarial) deep-learning approaches for both affective com- puting [11], [22] -- [25] and sentiment analysis [6], [26] -- [32], or offering more generic overviews of generative adversarial networks [17], [18]. Differing from these surveys, the present article: • provides, for the first time, a comprehensive overview of the adversarial training techniques developed for affective computing and sentiment analysis applications; • summarises the adversarial training technologies suitable, not only for the emotion recognition and understanding tasks, but more importantly, for the emotion synthesis and conversion tasks, which are arguably far from being regarded as mature; • reviews a wide array of adversarial training technologies covering the text, speech, image and video modalities; • highlights an abundance of future research directions for the application of adversarial training in affective computing and sentiment analysis. The remainder of this article is organised as follows. In Section II, we first introduce the background of this overview, which is then followed by a short description of adversarial training in Section III. We then comprehensively summarise the representative adversarial training approaches for emotion synthesis in Section IV, the approaches for emotion conversion in Section V, and the approaches for emotion perception and understanding in Section VI, respectively. We further highlight some promising research trends in Section VII, before drawing the conclusions in Section VIII. II. BACKGROUND In this section, we first briefly describe three of the main challenges associated with affective computing and sentiment analysis, i. e., the naturalness of generated emotions, the spar- sity of collected data, and the robustness of trained models. Concurrently, we analyse the drawbacks and limitations of conventional deep learning approaches, and introduce oppor- tunities for the application of adversarial training. Then, we give a short discussion about the challenge of performance evaluation when generating or converting emotional data. A typical emotional AI framework consists of two core com- ponents: an emotion perception and understanding unit, and an emotion synthesis and conversion unit (cf. Figure 1). The first component (aka a recognition model) interprets human emo- tions; whereas the second component (aka a generation model) can generate emotionally nuanced linguistics cues, speech, facial expressions, and even gestures. For the remainder of this article, the term emotion synthesis refers to the artificial 2 emotion perception and understanding emotion synthesis and conversion Fig. 1: The broad framework of a typical emotional artificial intelligence system. generation of an emotional entity from scratch, whereas the term emotion conversion refers to the transformation of an entity from one emotional depiction to another. To build a robust and stable emotional AI system, several challenges have to be overcome as discussed in the following sub-sections. A. Naturalness of Generated Emotions Emotion synthesis and conversion go beyond the conventional constructs of Natural Language Generation (NLP), Text-To- Speech (TTS), and image/video transformation techniques. This is due in part to the instinct complexity and uncertainty of the emotions, thereby generating an emotional entity remains an ongoing challenge. Recently, research has shown the potential of deep-learning based generative models for addressing this challenge. For example, the WaveNet network developed by Oord et al. [33] efficiently synthesises speech signals, and Pixel Recurrent Neural Networks (PixelRNN) and Variational AutoEncoder (VAE), proposed by Oord et al. [34] and Kingma et al. [35] respectively, have been shown to be effective for generating images. To date, the majority of these studies have not considered emotional information. A small handful of works have been undertaken in this direction [36], [37], however, the generated emotions are far from being considered natural. This is due in part to the highly non-linear nature of emotional expression changes and the variance of individuals [38], [39]. Generative modelling with adversarial training, on the other hand, has frequently been shown to be powerful in regard to generating samples, which are more understandable to humans than the examples simulated by other approaches [17], [18] (see Section IV and Section V for more details). B. Sparsity of Collected Data Despite having the possibility to collect massive amounts of unlabelled data through pervasive smart devices and social media, reliably annotated data resources required for emotion analysis are still comparatively scarce [11]. For example, most of the databases currently available for speech emotion recog- nition contain, at most 10 h of labelled data [25], [40], which is insufficient for building highly robust models. This issue has become even more pressing in the era of deep learning. The data-sparsity problem mainly lies in the annotation process which is prohibitively expensive and time-consuming [11]. This is especially true in relation to the subjective nature of emotions which dictates the need for several annotators to label the same samples in order to diminish the effect of personal biases [41]. In tackling this challenge, Kim et al. [42] proposed an unsupervised learning approach to learn the representations across audiovisual modalities for emotion recognition without any labelled data. Similarly, Cummins et al. [43] utilised CNNs pre-trained on large amounts of image data to extract robust feature representations for speech-based emotion recognition. More recently, neural-network-based semi-supervised learn- ing has been introduced to leverage large-scale unlabelled data [13], [44]. Despite the effectiveness of such approaches that distil shared high-level representations between labelled and unla- belled samples, the limited number of labelled data samples means that there is a lack of sufficient resources to extract meaningful and salient representations specific to emotions. In contrast, a generative model with adversarial training has the potential to synthesise an infinite amount of labelled sam- ples to overcome the shortage of conventional deep learning approaches (see Section VI for more details). C. Robustness of Trained Models In many scenarios, samples from a target domain are not sufficient or reliable enough to train a robust emotion recog- nition model. This challenge has motivated researchers to explore transfer learning solutions which leverage related domain (source) samples to aid the target emotion recognition task. This is a highly non-trivial task, the source and target domains are often highly mismatched with respect to the domains in which the data are collected [45], such as different recording environments or websites. For example, in sentiment analysis, the word 'long' for evaluating battery life has a positive connotation, whereas when assessing pain it tends to be negative. Moreover, for speech emotion recognition, the source and target samples might have been recorded in dis- tinctive acoustic environments and by different speakers [11]. These mismatches have been shown to lead to a performance degradation of models analysed in real-life settings [27], [45], [46]. In addressing this challenge, Glorot et al. [46] presented a deep neural network based approach to learn the robust representations across different domains for sentiment anal- ysis. Similar approaches have also been proposed by Deng et al. [47] for emotion recognition from speech. Moreover, You et al. [48] successfully transferred the sentiment knowledge from text to predict the sentiment of images. However, it is still un- clear if their learnt representations are truly domain-invariant or not. On the other hand, the discriminator of an adversarial training framework has the potential to distinguish from which domain the so-called 'shared' representations come from. By doing so, it can help alleviate the robustness problem of an emotion recognition model (see Section VI for more details). 3 D real fake latent random vector z G x real data x Fig. 2: Framework of Generative Adversarial Network (GAN). affective computing and sentiment analysis. Currently, many of the related works directly demonstrate a few appealing samples and evaluate the performance by human judgement [38], [49], [50]. Additionally, a range of metric-based approaches have been proposed to quantitatively evaluate the adversarial train- ing frameworks. For example, the authors in [51] compared the intra-set and inter-set average Euclidean distances between different sets of the generated faces. Similarly, to quantitatively evaluate models for emotion conversion, other evaluation measurements raised in the liter- ature include BiLingual Evaluation Understudy (BLEU) [52] and Recall-Oriented Understudy for Gisting Evaluation (ROUGE) [53] for text, and a signal-to-noise ratio test for speech [15]. However, the quantitative performance evaluation for emotion perception and understanding is more straight- forward. In general, the improvement by implementing ad- versarial training can be reported using evaluation metrics such as unweighted accuracy, unweighted average recall, and concordance correlation coefficient [12], [54], [55]. III. PRINCIPLE OF ADVERSARIAL TRAINING In this section, we introduce the basic concepts of adversarial training, so that the interested reader can better understand the design and selection of adversarial networks for a specific task in affective computing and sentiment analysis. A. Terminology and Notation With the aim of generating realistic 'fake' samples from a complex and high-dimensional true data distribution, the 'clas- sical' GAN, consists of two deep neural nets (as two players in a game): a generator (denoted as G) and a discriminator (denoted as D) (cf. Figure 2). During this two-player game, the generator tries to turn input noises from a simple distribution into realistic samples to fool the discriminator, while the discriminator tries to distinguish between true (or 'real') and generated (or 'fake') data. Normally, G and D are trained jointly in a minimax fashion. Mathematically, the minimax objective function can be formulated as: min θg max θd V (D, G) =Ex∼pdata(x)[log Dθd (x)]+ Ez∼pz(z)[log(1 − Dθd (Gθg (z)))], (1) D. Performance Evaluation Evaluating the performance of the generated or converted emotional samples is essential but challenging in aspects of where θg and θd denote the parameters of G and D, re- spectively; x is a real data instance following the true data distribution pdata(x); whilst z is a vector randomly sampled following a simple distribution (e. g., Gaussian); Gθg (z) de- notes a generated data given z as the input; and Dθd (·) outputs the likelihood of real data given either x or Gθg (z) as the input. Note that, the likelihood is in the range of (0,1), indicating to what extent the input is probably a real data instance. Consequently, during training, θg is updated to minimise the objective function such that Dθd (Gθg (z)) is close to 1; conversely, θd is optimised to maximise the objective such that log Dθd (x) is close to 1 and Dθd (Gθg (z)) is close to 0. In other words, G and D are trying to optimise a different and opposing objective function, thus pushing against each other in a zero-sum game. Hence, the strategy is named as adversarial training. Generally, the training of G and D is done in an iterative manner, i. e., the corresponding neural weights θd, θg are up- dated in turns. Once training is completed, the generator G is able to generate more realistic samples, while the discriminator D can distinguish authentic data from fake data. More details of the basic GAN training process can be found in [16]. B. Category of Adversarial Networks Since the first GAN paradigm was introduced in 2014, nu- merous variants of the original GAN have been proposed and successfully exploited in many real-life applications. It is roughly estimated that to date, more than 350 variants of GANs have been presented in the literature over the last four years1, infiltrating into various domains including image, music, speech, and text. For a comprehensive list and other resources of all currently named GANs, interested readers are referred to [56], [57]. Herein, we group these variants into four main categories: optimisation-based, structure-based, network- type-based, and task-oriented. Optimisation-based: GANs in this category aim to opti- mise the minimax objective function to improve the stability and the speed of the adversarial training process. For instance, in the original GAN, the Jensen-Shannon (JS) divergence of the objective function can be a constant, particularly at the start of the training procedure where there is no overlap between the sampled real data and the generated data. To smooth the training of GANs, the Wasserstein GAN (WGAN) has been proposed by replacing the JS divergence with the earth-mover distance to evaluate the distribution distance between the real and generated data [58]. Other GAN variants in this direction include the Energy- Based GAN (EBGAN) [59], the Least Squares GAN (LS- GAN) [60], the Loss-Sensitive GAN (LS-GAN) [61], the Cor- relational GAN (CorrGAN) [62], and the Mode Regularized GAN (MDGAN) [63], to name but a few. Structure-based: these GAN variants have been proposed and developed to improve the structure of conventional GAN. For example, the conditional GAN (cGAN) adds auxiliary information to both the generator and discriminator to control the modes of the data being generated [64], while the semi- supervised cGAN (sc-GAN) exploits the labels of real data to guide the learning procedure [65]. Other GAN variants in this 1https://github.com/hindupuravinash/the-gan-zoo/blob/master/gans.tsv 4 category include the BiGAN [66], the CycleGAN [67], the DiscoGAN [68], the InfoGAN [69], and the Triple-GAN [70]. Network-type-based: in addition, several GAN variants have been named after the network topology used in the GAN configuration, such as the DCGAN based on deep convolutional neural networks [19], the AEGAN based on autoencoders [71], the C-RNN-GAN based on continuous re- current neural networks [72], the AttnGAN based on attention mechanisms [73], and the CapsuleGAN based on capsule networks [74]. Task-oriented: lastly, there are also a large number of GAN variants that have been designed for a given task, thus serve their own specific interests. Examples, to name just a few, include the Sketch-GAN proposed for sketch retrieval [75], the ArtGAN for artwork synthesis [76], the SEGAN for speech enhancement [77], the WaveGAN for raw audio synthesis [78], and the VoiceGAN for voice impersonation [15]. IV. EMOTION SYNTHESIS As discussed in Section II-A, the most promising generative models, for synthesis, currently include PixelRNN/CNN [34], [79], VAE [35], and GANs [16]. Works undertaken with these models highlight their potential for creating realistic emotional samples. The PixelRNN/CNN approach, for example, can explicitly estimate the likelihood of real data with a tractable density function in order to generate realistic samples. How- ever, the generating procedure is quite slow, as it must be processed sequentially. On the other hand, VAE defines an intractable density function and optimises a lower bound of the likelihood instead, resulting in a faster generating speed compared with PixelRNN/CNN. However, it suffers from the generation of low-quality samples. In contrast to other generative models, GANs directly learn to generate new samples through a two-player game without estimating any explicit density function, and have been shown to obtain state-of-the-art performance for a range of tasks no- tably in image generation [16], [17], [80]. In particular, GAN- based frameworks can help generate, in theory, an infinite amount of realistic emotional data, including samples with subtle changes which depict more nuanced emotional states. A. Conditional-GAN-based Approaches in Image/Video To synthesise emotions, the most frequently used GAN relates to the conditional GAN (cGAN). In the original cGAN frame- work, both the generator and discriminator are conditioned on certain extra information c. This extra information can be any kind of auxiliary information, such as the labels or data from other modalities [64]. More specifically, the latent input noise z is concatenated with the condition c as a joint hidden representation for the generator G, in the meanwhile c is combined with either the generated sample x or real data x to be fed into the discriminator D, as demonstrated in Figure 3. In this circumstance, the minimax objective function given in Equation (1) is reformulated: min θg max θd V (D, G) =Ex∼pdata(x)[log Dθd (xc)]+ Ez∼pz(z)[log(1 − Dθd (Gθg (zc)))]. (2) condition latent random vector c z G x real data x D real fake Fig. 3: Framework of conditional Generative Adversarial Net- work (cGAN). Recently, a collection of works have begun to explore which facial expressions and representations can best be produced via cGAN. The frameworks proposed within these works are either conditioned on attribute vectors including emotion states to generate an image for a given identity [49], or conditioned on various emotions represented by values of features such as facial action unit coefficients to produce dynamic video from a static image [81], or conditioned on arbitrary speech clips to create talking faces synchronised with the given audio sequence [82]. While these approaches can produce faces with convincing realism, they do not fully consider the interpersonal behaviours that are common in social interactions such as mimicry. In tackling this problem, one novel application was pro- posed in [51], in which the authors presented a cGAN-based framework to generate valid facial expressions for a virtual agent. The proposed framework consists of two stages: firstly, a person's facial expressions (in eight emotion classes) are ap- plied as conditions to generate expressive face sketches, then, the generated sketches are leveraged as conditions to synthe- sise complete face images of a virtual dyad partner. However, this framework does not consider the temporal dependency on faces across various frames, can yield non-smooth facial expressions over time. In light of this, researchers in [50] proposed Conditional Long Short-Term Memory networks (C- LSTMs) to synthesise contextually smooth sequences of video frames in dyadic interactions. Experimental results in [50] demonstrate that the facial expressions in the generated virtual faces reflect appropriate emotional reactions to a person's behaviours. B. Other GAN-based Approaches in Image/Video In addition to the cGAN-based framework, other GAN variants such as DCGAN [19] and InfoGAN [69] have been investi- gated for emotional face synthesis. In [19], it is shown that, vector arithmetic operations in the input latent space can yield semantic changes to the image generations. For example, per- forming vector arithmetic on mean vectors "smiling woman" - "neutral woman" + "neutral man" can create a new image with the visual concept of "smiling man". The InfoGAN framework, on the other hand, aims to maximise the mutual information between a small subset of the latent variables and the observation, to learn interpretable latent representations 5 TABLE I: Generated samples on IMDB [21] Positive: Follow the Good Earth movie linked Vacation is a comedy that credited against the modern day era yarns which has helpful something to the modern day s best It is an interesting drama based on a story of the famed Negative: I really can t understand what this movie falls like I was seeing it I m sorry to say that the only reason I watched it was because of the casting of the Emperor I was not expecting anything as Negative: That s about so much time in time a film that persevered to become cast in a very good way I didn t realize that the book was made during the 70s The story was Manhattan the Allies were to which reflect the structured semantic data distribution [69]. For instance, it has been demonstrated that by varying one latent code, the emotions of the generated faces can change from stern to happy [69]. C. Approaches in Other Modalities As well as the generation of expressive human faces, adver- sarial training has also been exploited to generate emotional samples in a range of other modalities. For example, in [83] modern artwork images have been automatically generated from an emotion-conditioned GAN. Interestingly, it has been observed that various features, such as colours and shapes, within the artworks are commonly correlated with the emo- tions which they are conditioned on. Similarly, in [84] plau- sible motion sequences conditioned by a variety of contextual information (e. g., activity, emotion), have been synthesised by a so-called sequential adversarial autoencoder. More recently, poems conditioned by various sentiment labels (estimated from images) have been created via a multi-adversarial training approach [85]. Correspondingly, adversarial training has also been inves- tigated for both text generation [86], [87] and speech syn- thesis [78]. In particular, sentence generation conditioned on sentiment (either positive or negative) has been conducted in [14] and [21], but both only on fixed-length sequences (11 words in [14] and 40 words in [21]). One example can be the three generated samples with a fixed length (40 words) found in [21] (also shown in Table I). Despite the promising nature of these initial works, the performance of such networks are far off when comparing with the quality and naturalness of image generation. To the best of our knowledge, emotion-integrated synthesis frameworks based on adversarial training has yet to be imple- mented in speech. Compared with image generation, one main issue we confront in both speech and text is the varied length to generate, which, however, could also be a learnt feature in the future. V. EMOTION CONVERSION Emotion conversion is a specific style transformation task. In computer vision and speech processing domains, it targets at transforming a source emotion into a target emotion without affecting the identity properties of the subject. Whereas for NLP, sentiment transformation aims to alter the sentiment expressed in the original text while preserving its content. In 6 Fig. 5: Framework of VoiceGAN. Source: [15] perform the facial expression transformations appropriately even for unseen facial expression characteristics. Another related work is [91], in which the authors focused on voice conversion in natural speech and proposed a varia- tional autoencoding WGAN. Note that, data utilised in [91] are not frame aligned, but still are in pairs. Emotion conversion has not been considered in this work, however, this model could be applied to emotion conversion. B. Non-Paired-Data-based Approaches The methods discussed in the previous section all require pair- wise data of the same subjects in different facial expressions during training. In contrast, Invertible conditional GAN (Ic- GAN), which consists of a cGAN and two encoders, does not have this constraint [92]. In the IcGAN framework, the en- coders compress a real face image into a latent representation z and a conditional representation c independently. Then, c can be explicitly manipulated to modify the original face with deterministic complex modifications. Additionally, the ExprGAN framework is a more recent advancement for expression transformation [88], in which the expression intensity can be controlled in a continuous manner from weak to strong. Furthermore, the identity and expression representation learning are disentangled and there is no rigid requirement of paired samples for training [88]. Finally, the authors develop a three-stage incremental learning algorithm to train the model on small datasets [88]. Figure 4 illustrates some results obtained with ExprGAN [88]. Recently, inspired by the success of the DiscoGAN for style transformation in images, Gao et al. [15] proposed a speech- based style-transfer adversarial training framework, namely VoiceGAN (cf. Figure 5). The VoiceGAN framework consists of two generators/transformers (GAB and GBA) and three dis- criminators (DA, DB, and Dstyle). Importantly, the linguistic information in the speech signals is retained by considering the reconstruction losses of the generated data, and parallel data are not required. To contend with the varied lengths of speech signals, the authors applied a channel-wise pooling to convert variable-sized feature map into a vector of fixed size [15]. Experimental results demonstrate that VoiceGAN is able to transfer the gender of a speaker's voice, and this technique could be easily extended to other stylistic features such as different emotions [15]. More recently, a cycleGAN-based model was proposed to learn sentiment transformation from non-parallel text, with Fig. 4: Face images transformed into new images with different expression intensity levels. Source: [88] conventional approaches, paired data are normally required to learn a pairwise transformation function. In this case, the data need to be perfectly time aligned to learn an effective model, which is generally achieved by time-warping. Adversarial training, on the other hand, does away with the need to prepare the paired data as a precondition, as the emotion transformation function can be estimated in an indirect manner. In light of this, adversarial training reshapes conventional emotion conversion procedures and makes the conversion systems simpler to be implemented and used, as time-alignment is not needed. Moreover, leveraging adversarial training makes the emotion conversion procedure more robust and accurate through the associated game-theoretic approach. A. Paired-Data-based Approaches Several adversarial training approaches based on paired train- ing data have been investigated for emotion conversion. For example, in [89], the authors proposed a conditional difference adversarial autoencoder, to learn the difference between the source and target facial expressions of one same person. In this approach, a source face goes through an encoder to generate a latent vector representation, which is then concatenated with the target label to generate the target face through a decoder. Concurrently, two discriminators (trained simultaneously) are used to regularise the latent vector distribution and to help improve the quality of generated faces through an adversarial process. Moreover, approaches based on facial geometry information have been proposed to guide facial expression conversion [38], [90]. In [90], a geometry guided GAN for facial expression transformation was proposed, which is conditioned on facial geometry rather than expression labels. In this way, the facial geometry is directly manipulated, and thus the network ensures a fine-grain control in face editing, which, in general, is not so straightforward in other approaches. In [38], the researchers further disentangled the face encoding and facial geometry (in landmarks) encoding process, which allows the model to DisgustWeakAngryDisgustFearHappySadSurpriseNeutralAngry Disgust Fear Happy Sad Surprise NeutralStrong condition c latent random vector z G x real data x D · · · class-1 class-n fake Fig. 6: Framework of semi-supervised conditional Generative Adversarial Network (scGAN). an ultimate goal to automatically adjust the sentiment of a chatbot response [93]. By combining seq2seq model with cycleGAN, the authors developed a chatbot whose response can be transformed from negative to positive. Compared with the works of adversarial-training-based emotion conversion in image, it is noticeable that to date, there are only a few related works in video and speech, and only one in text. We believe that the difficulty of applying adversarial training in these domains is threefold: 1) the variable length of corresponding sequential data; 2) the linguistic and language content needed to be maintained during the conversion; and 3) the lack of reliable measurement metrics to rapidly evaluate the performance of such a transformation. VI. EMOTION PERCEPTION AND UNDERSTANDING This section summarises works which tackle the data-sparsity challenge (see Section VI-A) and the robustness-of-the- emotion-recogniser challenge (see Sections VI-B and VI-C). A. Data Augmentation As already discussed, the lack of large amounts of reliable training data is a major issue in the fields of affective com- puting and sentiment analysis. In this regard, it has been shown that emotion recognition performance can be improved with various data augmentation paradigms [94], [95]. Data augmentation is a family of techniques which artificially generate more data to train a more efficient (deep) learning model for a given task. Conventional data augmentation methods focus on generat- ing data through a series of transformations, such as scaling and rotating an image, or adding noise to speech [95]. How- ever, such perturbations directly on original data are still, to some extent, not efficient to improve overall data distribution estimation. In contrast, as GANs generate realistic data which estimate the distribution of the real data, it is instinctive to apply them to expand the training data required for emotion recognition models. In this regard, some adversarial training based data augmentation frameworks have been proposed in the literature, which aim to supplement the data manifold to approximate the true distribution [96]. For speech emotion recognition, researchers in [97] imple- mented an adversarial autoencoder model. In this work, high- dimensional feature vectors of real data are encoded into 2- D dimensional representations, and a discriminator is learnt 7 to distinguish real 2-D vectors from generated 2-D vectors. The experiments indicate that the 2-D representations of real data can yield suitable margins between different emotion categories. Additionally, when adding the generated data to the original data for training, performance can be marginally increased [97]. Similarly, a cycleGAN has been utilised for face-based emotion recognition [96]. To tackle the data inadequacy and unbalance problems, faces in different emotions have been generated from non-emotion ones, particularly for emotions like disgust and sad, which seemingly have less available samples. Experimental results have demonstrated that, by generating auxiliary data of minority classes for training, not only did the recognition performance of the rare class improve, the average performance over all classes also increased [96]. One ongoing research issue relating to GANs is how best to label the generated data. In [97], they adopted a Gaussian mixture model which is built on the original data, whereas the authors in [96] took a set of class-specific GANs to generate images, respectively, which requires no additional annotation process. In addition to these two approaches, cGAN in a semi- supervised manner (scGAN) can be an interesting alternative worthy of future investigations. The scGAN is an extension of cGAN by forcing the discriminator D to output class labels as well as distinguishing real data from fake data. In this scenario, D acts as both a discriminator and a classifier. More specifically, D classifies the real samples into the first n classes and the generated samples into the n + 1-th class (fake), while G tries to generate the conditioned samples and 'cheat' the discriminator to be correctly classified into the first n classes, as illustrated in Figure 6. By taking the class distribution into the objective function, an overall improvement in the quality of the generated samples was observed [65]. Hence, scGAN can be easily adapted for data augmentation in emotion perception and understanding tasks, which to date has yet to be reported in the literature. Finally, the quality of the generated data is largely over- looked in the works discussed in this section. It is possible that the generated data might be unreliable, and thus become a form of noise in the training data. In this regard, data filtering approaches should be considered. B. Domain Adversarial Training For emotion perception and understanding, numerous do- main adaptation approaches have been proposed to date (cf. Section II-C). These approaches seek to extract the most representative features from the mismatched data between the training phase and the test phase, in order to improve the robustness of recognition models (cf. Section II-C). However, it is unclear if the learnt representations are truly domain- generative or still domain-specific. In [98], Ganin et al. first introduced domain adversarial training to tackle this problem. Typically, a feature extractor Gf (:, θf ) projects data from two separate domains into high- level representations, which are discriminative for a label predictor Gy(:, θy) and indistinguishable for a domain clas- 8 (a) before DANN (b) after DANN Fig. 8: Illustration of data distributions from source and target before (a) and after (b) the DANN training. Source: [55] Generally speaking, adversarial examples are the exam- ples that are created by making small, but intentionally, perturbations to the input to incur large and significant per- turbations in outputs (e. g., incorrect predictions with high confidence) [104]. Adversarial training, however, addresses this vulnerability in recognition models by introducing mech- anisms to correctly handle the adversarial examples. In this way, it improves not only robustness to adversarial examples, but also overall generalisation for the original examples [104]. Mathematically, adversarial training adds the following term as regularisation loss to the original loss function: − log p(yx + radv; θ), (3) in which x denotes the input, θ denotes the parameters of a classifier, and radv denotes a worst-case perturbation against the current model p(yx; θ), which can be calculated with radv = arg max r,(cid:107)r(cid:107)≤ log p(yx + r; θ). (4) In the context of affective computing and sentiment analysis, the authors in [105] utilised DCGAN and multi-task learning strategies to leverage a large number of unlabelled samples, where the unlabelled samples are considered as adversarial examples. More specifically, the model explores unlabelled data by feeding it through a vanilla DCGAN, in which a discriminator only learns to classify the input as either real or fake. Hence, no label information is demanded. Note that, the discriminator shares layers with another two classifiers to predict valence and activation simultaneously. This method has been shown to improve generalisability across corpora [105]. A similar approach was conducted in [54] to learn robust rep- resentations from emotional speech data for autism detection. More recently, a cGAN-based framework was proposed for continuous speech emotion recognition in [20], where a pre- dictor and a discriminator are conditioned by acoustic features. In particular, the discriminator is employed to distinguish the joint probability distributions for acoustic features and their corresponding predictions or real annotations. In this way, the predictor is guided to modify the original predictions to achieve a better performance level. Rather than the above mentioned adversarial training schemes that explicitly rely on the presence of a discriminator network, adversarial training can also be executed in an implicit manner, namely, virtual adversarial training. Virtual adversarial training is conducted by straightforwardly adding an additional regularisation term, which is sensitive to the adversarial examples, as a penalty in a loss function. Fig. 7: Framework of Domain-Adversarial Neural Network (DANN). Source: [98] sifier Gd(:, θd). A typical Domain-Adversarial Neural Net- work (DANN) is illustrated in Figure 7. Particular to the DANN architecture, a gradient reversal layer is introduced between the domain classifier and the feature extractor, which during backward prop- inverts the sign of the gradient ∂Ld ∂θd agation. Moreover, a hype-parameter λ is utilised to tune the trade-off between the two branches during the learning process. In this manner, the network attempts to learn domain- invariant feature representations. By this training strategy, the representations learnt from different domains cannot be easily distinguished, as demonstrated in Figure 8. Further details on how to train DANN are given in [98]. Using a DANN, a common representation between data from the source and target domains can potentially be learnt. This is of relevance in the data mismatch scenario as knowl- edge learnt from the source domain can be applied directly to the target domain [55]. Accordingly, the original DANN paradigm has been adapted to learn domain-invariant represen- tations for sentiment classification. For example, in [95], [99], attention mechanisms were introduced to give more attention to relevant text when extracting features. In [12], [100], the Wasserstein distance was estimated to guide the optimisa- tion of the domain classifier. Moreover, instead of learning common representations between two domains, other research has broadened this concept to tackle the data mismatch issue among multiple probability distributions. In this regard, DANN variants have been proposed for multiple source domain adaptation [101], multi-task learning [102], and multinomial adversarial nets [103]. Finally, DANN has recently been utilised in speech emotion recognition [55]. These experiments demonstrate that, by aligning the data distributions of the source and target domains (illustrated in Figure 8), an adversarial training approach can yield a large performance gain in the target domain [55]. C. (Virtual) Adversarial Training Beside factors relating to the quality of the training data, the performance of an emotional AI system is also heavily depen- dent on its robustness to unseen data. A trivial disturbance on the sample (adversarial examples) might result in an opposite prediction [104], which naturally has to be avoided for a robust recognition model. Input xfeatures ffeature extractor Gf∂ Ly∂ θf∂ Ld∂ θf-λ∂ Ly∂ θylabel predictor Gydomain predictor Gdgradient reversallayerclass label ydomain label d∂ Ld∂ θdloss Lyloss Ld∂ Ly∂ θfforwardprop backprop Source TargetxSource Targetx In virtual adversarial training, first proposed in [106], the regularisation loss term of Equation (3) is reformulated without the label y as follows: KL[p(·x; θ)(cid:107)p(·x + radv; θ)], (5) where KL[·(cid:107)·] denotes the KL divergence between two distri- butions and a worst-case perturbation radv can be computed by radv = arg max r,(cid:107)r(cid:107)≤ KL[p(·x; θ)(cid:107)p(·x + r; θ)]. (6) Inspired by these works, authors in [107] reported that, state-of-the-art sentiment classification results can be achieved when adopting (virtual) adversarial training approaches in the text domain. In particular, the authors applied perturbations to word embeddings in a recurrent neural network structure, rather than to the original input itself [107]. Following this success, (virtual) adversarial training has also been applied to speech emotion recognition in [108]. Results in [108] demonstrate that, the classification accuracy as well as the system's overall generalisation capability can be improved. VII. THE ROAD AHEAD Considerable progress has been made in alleviating some of the challenges related to affective computing and sentiment analysis through the use of adversarial training, for example, synthesising and transforming image-based emotions through cycleGAN, augmenting data by artificially generating sam- ples, extracting robust representations via domain adversarial training. A detailed summary of these works can be found in Table II. However, large scale breakthroughs are still required in both the theorem of adversarial training and its applications to fully realise the potential of this paradigm in affective computing and sentiment analysis. A. Limitations of Adversarial Training Arguably, the two major open research challenges relating to adversarial training are training instability and mode collapse. Solving these fundamental concerns will help facilitate its application to affective computing and sentiment analysis. 1) Training Instability: In the adversarial training process, ensuring that there is balance and synchronization between the two adversarial networks plays an important role in obtaining reliable results [16]. That is, the goal optimisation of adver- sarial training lies in finding a saddle point of, rather than a local minimum between, the two adversarial components. The inherent difficulty in controlling the synchronisation of the two adversarial networks increases the risk of instability in the training process. To date, researchers have made several attempts to address this problem. For example, the implementation of Wasserstein distance rather than the conventional JS divergence partially solves the vanishing gradient problem associated with im- provements in the ability of the discriminator to separate the real and generated samples [58]. Furthermore, the convergence of the model and the existence of the equilibrium point have yet to be theoretically proven [109]. Therefore, it remains an open research direction to further optimise the training process. 9 2) Mode Collapse: Mode collapse occurs when the the generator exhibits very limited diversity among generated samples, thus reducing the usefulness of the learnt GANs. This effect can be observed as the generated samples can be integrated into a small subset of similar samples (partial collapse), or even a single sample (complete collapse). Novel approaches dedicated to solving the mode collapse problem are continually emerging. For example, the loss function of the generator can be modified to factor in the diversity of generated samples in batches [110]. Alternatively, the unroll-GAN allows the generator to 'unroll' the updates of the discriminator in a manner which is fully differen- tiable [111], and the AdaGAN combines an ensemble of GANs in a boosting framework to ensure diversity [112]. B. Other Ongoing Breakthroughs In most conditional GAN frameworks, the emotional entity is generated by utilising discrete emotional categories as the condition controller. However, emotions are more than these basic categories (e. g., Ekman's Six Basic Emotions), and to date, more subtle emotional expressions have been largely overlooked in the literature. While some studies have started addressing this issue in image processing studies (cf. Sec- tion IV), it is still one of the major research white spots in speech and text processing. Therefore, using a more soft condition to replace the controller remains an open research direction. To the best of our knowledge, GAN-based emotional speech synthesis has yet to be addressed in the relevant literature. This could be due in part to Speech Emotion Recognition (SER) being a less mature field of research, which leads to a limited capability to distinguish the emotions using speech and thus provides deductible contributions to optimise the generator. However, with the ongoing development of SER and the already discussed success of GANs in conventional speech synthesis [113] and image/video and text generation (cf. Section IV), we strongly believe that major breakthroughs will be made in this area sometime in the near future. Similarly, current state-of-the-art emotion conversion sys- tems are based on the transformation of static images. How- ever, transforming emotions in the dynamic sequential signals, such as speech, video, and text, remains challenging. This most likely relates to the difficulties associated with sequence-based discriminator and sequence generation. However, the state-of- the-art performance achieved with generative models, such as WaveGAN, indicate that adversarial training can play a key role in helping to break through these barriers. Additionally, when comparing the performance of different GAN-based models, a fair comparison is vital but not straight- forward. In [85], the authors demonstrated that their proposed I2P-GAN outperforms SeqGAN when generating poetry from given images, reporting higher scores on evaluation metrics including BLEU, novelty, and relevance. Also, it has been claimed that InfoGAN converges faster than a conventional GAN framework [69]. However, it should be noted that, a fair experimental comparison of various generative adver- training models associated with affective computing sarial TABLE II: A summary of adversarial training studies in affective computing and sentiment analysis. These studies are listed by their applied tasks (SYN: synthesis, CVS: conversion, DA: data augmentation, DAT: domain adversarial training, AT: adversarial training, VAT: virtual adversarial training), modalities, and published years. GATH: generative adversarial talking head, ASPD: adversarial shared-private model. 10 modality image model DCGAN paper Radfod et al. [19] Chen et al. [69] Huang & Khan [51] Melis & Amores [83] Bao et al. [49] Pham et al. [81] Song et al. [82] Nojavansghari et al. [50] year 2016 2016 2017 2017 2018 2018 2018 2018 task SYN SYN SYN SYN SYN SYN SYN SYN image image/video Image (art) image image/video image/video image infoGAN DyadGAN cGAN identity GAN GATH cGAN DyadGAN RNN) cGAN preserving (with Wang & Arit`eres [84] 2018 SYN motion Rajeswar et al. [14] Liu et al. [85] Fedus et al. [21] Perarnau et al. [92] Zhou & Shi [89] Song et al. [90] Qiao et al. [38] Ding et al. [88] Lee et al. [93] Gao et al. [15] Zhu et al. [96] Sahu et al. [97] Ganin et al. [98] Chen et al. [12] Zhang et al. [95] Li et al. [99] Zhao et al. [101] Shen et al. [100] Liu et al. [102] Chen & Cardie [103] Mohammed & Busso [55] Chang & Scherer [105] Deng et al. [54] Han et al. [20] Miyato et al. [107] Sahu et al. [108] 2017 2018 2018 2016 2017 2017 2018 2018 2018 2018 2018 SYN SYN SYN CVS CVS CVS CVS CVS CVS CVS DA 2017 DA 2016 2017 2017 2017 2018 2018 2018 2018 2018 2017 2017 2018 2017 2018 DAT DAT DAT DAT DAT DAT DAT DAT DAT AT AT AT VAT/AT VAT/AT text text (poetry) text (W)GAN-GP I2P-GAN maskGAN image image image image image text speech image speech text text text text text text text text speech speech speech speech text speech IcGAN cGAN G2-GAN GC-GAN exprGAN cycleGAN voiceGAN cycleGAN adversarial AE DANN DANN DANN DANN multisource DANN DANN ASPD multinomial ASPD DANN DCGAN GAN cGAN / DNN note vector arithmetic can be done in latent vector space, e. g., smiling woman - neutral woman + neutral man = smiling man latent code can be interpreted; support gradual transformation interaction scenario; identity + attribute from the interviewee generate emotional artwork the identity and attributes of faces are separated conditioned by AU; from static image to dynamic video static image to dynamic video, conditioned by audio sequences interaction scenario; smooth the video synthesis with context information to simulate a latent vector with seq2seq AE; controlled by emotion gradient penalty; generate sequences with fixed length multi-adversarial training; generate poetry from images based on actor-critic cGAN; generate sequences with fixed length interpretable latent code; support gradual transformation learn the difference between the source and target emotions by adversarial autoencoder geometry-guided, similar to cycleGAN geometry-contrastive learning; the attribute and identity fea- tures are separated in the learning process intensity can be controlled no need of paired data; emotion scalable no need of paired data transfer data from A to B; require no further labelling process on the transferred data use GMM built on the original data to label generated data ->noisy data; sensitive to mode collapse first work in domain adversarial training semi-supervised supported; Wasserstein distance used for smoothing training process attention scoring network is added for document embedding with attention mechanisms extended for multiple sources Wasserstein distance guided to optimise domain discriminator for multi-task; semi-supervised friendly multinomial discriminator for multi-domain adapted for speech emotion recognition spectrograms with fixed width are randomly selected and chopped from a varied length of audio files use hidden-layer representations from discriminator regularisation: joint distribution first work on virtual adversarial training first work for speech emotion recognition to be reported, to answer and sentiment analysis has yet questions such as which model is faster, more accurate, or easier to implement. This absence is mainly due to the lack of benchmark datasets and thoughtfully designed metrics for each specific application (i. e., emotion generation, emotion conversion, and emotion perception and understanding). Finally, we envisage that, GAN-based end-to-end emotional dialogue systems can succeed the speech-to-text (i. e., ASR) and the text-to-speech (i. e., TTS) processes currently used in conventional dialogue systems. This is motivated by the construct that humans generally do not consciously convert speech into text during conversations [114]. The advantage of this approach is that it avoids the risk of the possible information loss during this internal process. Such an end- to-end emotional framework would further facilitate the next generation of more human-like dialogue systems. VIII. CONCLUSION Motivated by the ongoing success and achievements associated with adversarial training in artificial intelligence, this article summarised the most recent advances of adversarial training in affective computing and sentiment analysis. Covering the audio, image/video, and text modalities, this overview included technologies and paradigms relating to both emotion synthesis and conversion as well as emotion perception and understand- ing. Generally speaking, not only have adversarial training techniques made great contributions to the development of corresponding generative models, but they are also helpful and instructive for related discriminative models. We have also drawn attention to further research efforts aimed at leveraging the highlighted advantages of adversarial training. If successfully implemented, such techniques will inspire and foster the new generation of robust affective computing and sentiment analysis technologies that are capable of widespread in-the-wild deployment. ACKNOWLEDGMENT This work has been supported by the EU's Horizon 2020 Pro- gramme through the Innovation Action No. 645094 (SEWA), the EU's Horizon 2020 / EFPIA Innovative Medicines Initia- tive through GA No. 115902 (RADAR-CNS), and the UK's Economic & Social Research Council through the research Grant No. HJ-253479 (ACLEW). REFERENCES [1] R. Picard, Affective computing. Cambridge, MA: MIT Press, 1997. [2] M. Minsky, The emotion machine: Commonsense thinking, artificial intelligence, and the future of the human mind. New York, NY: Simon and Schuster, 2007. [3] M. Pantic, N. Sebe, J. F. Cohn, and T. Huang, "Affective multimodal human -- computer interaction," in Proc. 13th ACM International Con- ference on Multimedia (MM), Singapore, 2005, pp. 669 -- 676. [4] S. Poria, E. Cambria, A. Gelbukh, F. Bisio, and A. Hussain, "Sentiment data flow analysis by means of dynamic linguistic patterns," IEEE Computational Intelligence Magazine, vol. 10, no. 4, pp. 26 -- 36, Nov. 2015. [5] S. Poria, E. Cambria, A. Hussain, and G.-B. Huang, "Towards an intelligent framework for multimodal affective data analysis," Neural Networks, vol. 63, pp. 104 -- 116, Mar. 2015. [6] E. Cambria, "Affective computing and sentiment analysis," IEEE Intelligent Systems, vol. 31, no. 2, pp. 102 -- 107, Mar. 2016. [7] T. Chen, R. Xu, Y. He, Y. Xia, and X. Wang, "Learning user and prod- uct distributed representations using a sequence model for sentiment analysis," IEEE Computational Intelligence Magazine, vol. 11, no. 3, pp. 34 -- 44, Aug. 2016. [8] J. Han, Z. Zhang, N. Cummins, F. Ringeval, and B. Schuller, "Strength modelling for real-world automatic continuous affect recognition from audiovisual signals," Image and Vision Computing, vol. 65, pp. 76 -- 86, Sep. 2017. [9] C. N. dos Santos and M. Gatti, "Deep convolutional neural networks texts," in Proc. 25th International for sentiment analysis of short Conference on Computational Linguistics (COLING), Dublin, Ireland, 2014, pp. 69 -- 78. [10] P. Tzirakis, G. Trigeorgis, M. A. Nicolaou, B. Schuller, and S. Zafeiriou, "End-to-end multimodal emotion recognition using deep neural networks," IEEE Journal of Selected Topics in Signal Process- ing, Special Issue on End-to-End Speech and Language Processing, vol. 11, no. 8, pp. 1301 -- 1309, Dec. 2017. [11] Z. Zhang, N. Cummins, and B. Schuller, "Advanced data exploitation for speech analysis -- an overview," IEEE Signal Processing Magazine, vol. 34, no. 4, pp. 107 -- 129, July 2017. [12] X. Chen, Y. Sun, B. Athiwaratkun, C. Cardie, and K. Weinberger, "Adversarial deep averaging networks for cross-lingual sentiment clas- sification," arXiv preprint arXiv:1606.01614, Apr. 2017. [13] J. Deng, X. Xu, Z. Zhang, S. Fruhholz, and B. Schuller, "Semisu- pervised autoencoders for speech emotion recognition," IEEE/ACM Transactions on Audio, Speech, and Language Processing, vol. 26, no. 1, pp. 31 -- 43, Jan. 2018. [14] S. Subramanian, S. Rajeswar, F. Dutil, C. Pal, and A. C. Courville, "Adversarial generation of natural language," in Proc. 2nd Workshop on Representation Learning for NLP (Rep4NLP@ACL), Vancouver, Canada, 2017, pp. 241 -- 251. [15] Y. Gao, R. Singh, and B. Raj, "Voice impersonation using generative adversarial networks," in Proc. IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Calgary, Canada, 2018, pp. 2506 -- 2510. 11 [16] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio, "Generative adversarial nets," in Proc. Advances in Neural Information Processing Systems (NIPS), Montreal, Canada, 2014, pp. 2672 -- 2680. [17] K. Wang, C. Gou, Y. Duan, Y. Lin, X. Zheng, and F.-Y. Wang, "Gen- erative adversarial networks: Introduction and outlook," IEEE/CAA Journal of Automatica Sinica, vol. 4, no. 4, pp. 588 -- 598, Sep. 2017. [18] A. Creswell, T. White, V. Dumoulin, K. Arulkumaran, B. Sengupta, and A. A. Bharath, "Generative adversarial networks: An overview," IEEE Signal Processing Magazine, vol. 35, no. 1, pp. 53 -- 65, Jan. 2018. [19] A. Radford, L. Metz, and S. Chintala, "Unsupervised representation learning with deep convolutional generative adversarial networks," San Juan, PR, 2016. [20] J. Han, Z. Zhang, Z. Ren, F. Ringeval, and B. Schuller, "Towards conditional adversarial training for predicting emotions from speech," in Proc. IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Calgary, Canada, 2018, pp. 6822 -- 6826. [21] W. Fedus, I. Goodfellow, and A. M. Dai, "MaskGAN: Better text generation via filling in the ," in Proc. 6th International Conference on Learning Representations (ICLR), Vancouver, Canada, 2018. [22] Z. Zeng, M. Pantic, G. I. Roisman, and T. S. Huang, "A survey of affect recognition methods: Audio, visual, and spontaneous expressions," IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 31, no. 1, pp. 39 -- 58, Jan. 2009. [23] R. A. Calvo and S. D'Mello, "Affect detection: An interdisciplinary review of models, methods, and their applications," IEEE Transactions on Affective Computing, vol. 1, no. 1, pp. 18 -- 37, Jan. 2010. [24] H. Gunes, B. Schuller, M. Pantic, and R. Cowie, "Emotion repre- sentation, analysis and synthesis in continuous space: A survey," in Proc. IEEE International Conference on Automatic Face & Gesture Recognition and Workshops (FG), Santa Barbara, CA, 2011, pp. 827 -- 834. [25] B. Schuller, "Speech emotion recognition: Two decades in a nut- shell, benchmarks, and ongoing trends," Communications of the ACM, vol. 61, no. 5, pp. 90 -- 99, Apr. 2018. [26] B. Liu, Sentiment analysis and opinion mining. San Rafael, CA: Morgan & Claypool Publishers, 2012. [27] W. Medhat, A. Hassan, and H. Korashy, "Sentiment analysis algorithms and applications: A survey," Ain Shams Engineering Journal, vol. 5, no. 4, pp. 1093 -- 1113, Dec. 2014. [28] B. Liu, Sentiment analysis: Mining opinions, sentiments, and emotions. Cambridge, United Kingdom: Cambridge University Press, June 2015. [29] E. Cambria, S. Poria, A. Gelbukh, and M. Thelwall, "Sentiment analysis is a big suitcase," IEEE Intelligent Systems, vol. 32, no. 6, pp. 74 -- 80, Dec. 2017. [30] S. Poria, E. Cambria, R. Bajpai, and A. Hussain, "A review of affective computing: From unimodal analysis to multimodal fusion," Information Fusion, vol. 37, pp. 98 -- 125, Sep. 2017. [31] M. Soleymani, D. Garcia, B. Jou, B. Schuller, S.-F. Chang, and M. Pantic, "A Survey of Multimodal Sentiment Analysis," Image and Vision Computing, vol. 65, pp. 3 -- 14, Sep. 2017. [32] L. Zhang, S. Wang, and B. Liu, "Deep learning for sentiment analysis: A survey," Wiley Interdisciplinary Reviews: Data Mining and Knowl- edge Discovery, Mar. 2018, 25 pages. [33] A. van den Oord, S. Dieleman, H. Zen, K. Simonyan, O. Vinyals, A. Graves, N. Kalchbrenner, A. W. Senior, and K. Kavukcuoglu, raw audio," arXiv preprint "WaveNet: A generative model arXiv:1609.03499, Sep. 2016. [34] A. van den Oord, N. Kalchbrenner, and K. Kavukcuoglu, "Pixel recurrent neural networks," in Proc. 33rd International Conference on Machine Learning (ICML), New York City, NY, 2016, pp. 1747 -- 1756. [35] D. P. Kingma and M. Welling, "Auto-encoding variational Bayes," for arXiv preprint arXiv:1312.6114, Dec. 2013. [36] Y. Lee, A. Rabiee, and S.-Y. Lee, "Emotional end-to-end neural speech synthesizer," arXiv preprint arXiv:1711.05447, Nov. 2017. [37] K. Akuzawa, Y. Iwasawa, and Y. Matsuo, "Expressive speech synthe- sis via modeling expressions with variational autoencoder," in Proc. Annual Conference of the International Speech Communication Asso- ciation (INTERSPEECH), Hyderabad, India. [38] F. Qiao, N. Yao, Z. Jiao, Z. Li, H. Chen, and H. Wang, "Geometry- contrastive generative adversarial network for facial expression synthe- sis," arXiv preprint arXiv:1802.01822, Feb. 2018. [39] H. Zhou, M. Huang, T. Zhang, X. Zhu, and B. Liu, "Emotional chatting machine: Emotional conversation generation with internal and external memory," in Proc. 32nd Conference on Association for the Advancement of Artificial Intelligence (AAAI), New Orleans, LA, 2018, pp. 730 -- 738. [40] B. Schuller, B. Vlasenko, F. Eyben, M. Wollmer, A. Stuhlsatz, A. Wen- demuth, and G. Rigoll, "Cross-corpus acoustic emotion recognition: Variances and strategies," IEEE Transactions on Affective Computing, vol. 1, no. 2, pp. 119 -- 131, July 2010. [41] J. Han, Z. Zhang, M. Schmitt, M. Pantic, and B. Schuller, "From hard to soft: Towards more human-like emotion recognition by modelling the perception uncertainty," in Proc. 25th ACM International Conference on Multimedia (MM), Mountain View, CA, 2017, pp. 890 -- 897. [42] Y. Kim, H. Lee, and E. M. Provost, "Deep learning for robust feature generation in audiovisual emotion recognition," in Proc. IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Vancouver, Canada, 2013, pp. 3687 -- 3691. [43] N. Cummins, S. Amiriparian, G. Hagerer, A. Batliner, S. Steidl, and B. Schuller, "An image-based deep spectrum feature representation for the recognition of emotional speech," in Proc. 25th ACM International Conference on Multimedia (MM), Mountain View, CA, 2017, pp. 478 -- 484. [44] Z. Zhang, J. Han, J. Deng, X. Xu, F. Ringeval, and B. Schuller, "Leveraging unlabelled data for emotion recognition with enhanced collaborative semi-supervised learning," IEEE Access, vol. 6, pp. 22 196 -- 22 209, Apr. 2018. [45] S. J. Pan and Q. Yang, "A survey on transfer learning," IEEE Transac- tions on Knowledge and Data Engineering, vol. 22, no. 10, pp. 1345 -- 1359, Oct. 2010. [46] X. Glorot, A. Bordes, and Y. Bengio, "Domain adaptation for large- scale sentiment classification: A deep learning approach," in Proc. 28th International Conference on Machine Learning (ICML), Bellevue, WA, 2011, pp. 513 -- 520. [47] J. Deng, R. Xia, Z. Zhang, Y. Liu, and B. Schuller, "Introducing shared- hidden-layer autoencoders for transfer learning and their application in acoustic emotion recognition," in Proc. IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Florence, Italy, 2014, pp. 4818 -- 4822. [48] Q. You, J. Luo, H. Jin, and J. Yang, "Robust image sentiment analysis using progressively trained and domain transferred deep networks," in Proc. 29th Conference on Association for the Advancement of Artificial Intelligence (AAAI), Austin, TX, 2015, pp. 381 -- 388. [49] J. Bao, D. Chen, F. Wen, H. Li, and G. Hua, "Towards open-set identity preserving face synthesis," in Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, 2018, pp. 6713 -- 6722. [50] B. Nojavanasghari, Y. Huang, and S. Khan, "Interactive generative adversarial networks for facial expression generation in dyadic inter- actions," arXiv preprint arXiv:1801.09092, Jan. 2018. [51] Y. Huang and S. M. Khan, "DyadGAN: Generating facial expressions in dyadic interactions," in Proc. IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Honolulu, HI, 2017, pp. 2259 -- 2266. [52] K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu, "BLEU: A method for automatic evaluation of machine translation," in Proc. 40th Annual Meeting of the Association for Computational Linguistics (ACL), Stroudsburg, PA, 2002, pp. 311 -- 318. [53] C.-Y. LIN, "ROUGE: A package for automatic evaluation of sum- maries," in Proc. Text Summarization Branches Out Workshop in ACL, Barcelona, Spain, 2004, 8 pages. [54] J. Deng, N. Cummins, M. Schmitt, K. Qian, F. Ringeval, and B. Schuller, "Speech-based diagnosis of autism spectrum condition by generative adversarial network representations," in Proc. International Conference on Digital Health (DH), London, UK, 2017, pp. 53 -- 57. [55] M. Abdelwahab and C. Busso, "Domain adversarial for acoustic emotion recognition," IEEE/ACM Transactions on Audio, Speech, and Language Processing, vol. 26, no. 12, pp. 2423 -- 2435, Dec. 2018. [56] H. Caesar, "Really-awesome-gan," https://github.com/nightrome/ [58] M. Arjovsky, S. Chintala, and L. Bottou, "Wasserstein GAN," arXiv preprint arXiv:1701.07875, Mar. 2017. [59] J. Zhao, M. Mathieu, and Y. LeCun, "Energy-based generative adver- sarial network," in Proc. 5th International Conference on Learning Representations (ICLR), Toulon, France, 2017. [60] X. Mao, Q. Li, H. Xie, R. Y. Lau, Z. Wang, and S. Paul Smolley, "Least squares generative adversarial networks," in Proc. IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 2017, pp. 2794 -- 2802. [61] G.-J. Qi, "Loss-sensitive generative adversarial networks on Lipschitz densities," arXiv preprint arXiv:1701.06264, Jan. 2017. [57] A. Hindupur, "The-gan-zoo," https://github.com/hindupuravinash/ really-awesome-gan, 2017. the-gan-zoo, 2018. 12 [62] S. Patel, A. Kakadiya, M. Mehta, R. Derasari, R. Patel, and R. Gandhi, "Correlated discrete data generation using adversarial training," arXiv preprint arXiv:1804.00925, 2018. [63] T. Che, Y. Li, A. P. Jacob, Y. Bengio, and W. Li, "Mode regularized generative adversarial networks," in Proc. 5th International Conference on Learning Representations (ICLR), Toulon, France, 2017. [64] M. Mirza and S. Osindero, "Conditional generative adversarial nets," arXiv preprint arXiv:1411.1784, June 2014. [65] A. Odena, "Semi-supervised learning with generative adversarial net- works," in Proc. Data-Efficient Machine Learning Workshop in ICML, New York, NY, 2016. [66] J. Donahue, P. Krahenbuhl, and T. Darrell, "Adversarial feature learn- ing," in Proc. 5th International Conference on Learning Representa- tions (ICLR), Toulon, France, 2017. [67] J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros, "Unpaired image-to- image translation using cycle-consistent adversarial networks," in Proc. IEEE Conference on Computer Vision and Pattern Recognition (ICCV), Venice, Italy, 2017, pp. 2223 -- 2232. [68] T. Kim, M. Cha, H. Kim, J. K. Lee, and J. Kim, "Learning to discover cross-domain relations with generative adversarial networks," in Proc. 34th International Conference on Machine Learning (ICML), Sydney, Australia, 2017, pp. 1857 -- 1865. [69] X. Chen, Y. Duan, R. Houthooft, J. Schulman, I. Sutskever, and P. Abbeel, "InfoGAN: Interpretable representation learning by infor- mation maximizing generative adversarial nets," in Proc. Advances in Neural Information Processing Systems (NIPS), Barcelona, Spain, 2016, pp. 2172 -- 2180. [70] L. Chongxuan, T. Xu, J. Zhu, and B. Zhang, "Triple generative adversarial nets," in Proc. Advances in Neural Information Processing Systems (NIPS), Long Beach, CA, 2017, pp. 4091 -- 4101. [71] J. Luo, Y. Xu, C. Tang, and J. Lv, "Learning inverse mapping by autoencoder based generative adversarial nets," in Proc. International Conference on Neural Information Processing (ICONIP), Guangzhou, China, 2017, pp. 207 -- 216. [72] O. Mogren, "C-RNN-GAN: Continuous recurrent neural networks with adversarial training," in Proc. Constructive Machine Learning Workshop in NIPS, Barcelona, Spain, 2016, 6 pages. [73] T. Xu, P. Zhang, Q. Huang, H. Zhang, Z. Gan, X. Huang, and X. He, "AttnGAN: Fine-grained text to image generation with attentional gen- erative adversarial networks," in Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, 2018, pp. 1316 -- 1324. [74] A. Jaiswal, W. AbdAlmageed, and P. Natarajan, "CapsuleGAN: Gen- erative adversarial capsule network," arXiv preprint arXiv:1802.06167, Feb. 2018. [75] A. Creswell and A. A. Bharath, "Adversarial training for sketch retrieval," in Proc. European Conference on Computer Vision (ECCV), Amsterdam, Netherlands, 2016, pp. 798 -- 809. [76] W. R. Tan, C. S. Chan, H. E. Aguirre, and K. Tanaka, "ArtGAN: Artwork synthesis with conditional categorical GANs," in Proc. IEEE International Conference on Image Processing (ICIP), Beijing, China, 2017, pp. 3760 -- 3764. [77] S. Pascual, A. Bonafonte, and J. Serr`a, "SEGAN: Speech enhancement generative adversarial network," in Proc. 18th Annual Conference of the International Speech Communication Association (INTERSPEECH), Stockholm, Sweden, 2017, pp. 3642 -- 3646. [78] C. Donahue, J. McAuley, and M. Puckette, "Synthesizing audio with generative adversarial networks," in Proc. Workshop in 6th Interna- tional Conference on Learning Representations (ICLR), Vancouver, Canada, 2018. [79] A. van den Oord, N. Kalchbrenner, L. Espeholt, O. Vinyals, A. Graves, and K. Kavukcuoglu, "Conditional image generation with PixelCNN decoders," in Proc. Advances in Neural Information Processing Systems (NIPS), Barcelona, Spain, 2016, pp. 4790 -- 4798. [80] I. Caswell, O. Sen, and A. Nie, "Exploring adversarial learning on neural network models for text classification," 2015. [81] H. X. Pham, Y. Wang, and V. Pavlovic, "Generative adversarial talking head: Bringing portraits to life with a weakly supervised neural network," arXiv preprint arXiv:1803.07716, Mar. 2018. [82] Y. Song, J. Zhu, X. Wang, and H. Qi, "Talking face genera- tion by conditional recurrent adversarial network," arXiv preprint arXiv:1804.04786, Apr. 2018. [83] D. Alvarez-Melis and J. Amores, "The emotional GAN: Priming adversarial generation of art with emotion," in Proc. Advances in Neural Information Processing Systems (NIPS), Long Beach, CA, 2017, 4 pages. [84] Q. Wang and T. Arti`eres, "Motion capture synthesis with adversarial learning," in Proc. 17th International Conference on Intelligent Virtual Agents (IVA), Stockholm, Sweden, 2017, pp. 467 -- 470. [85] B. Liu, J. Fu, M. P. Kato, and M. Yoshikawa, "Beyond narrative description: Generating poetry from images by multi-adversarial train- ing," arXiv preprint arXiv:1804.08473, Apr. 2018. [86] L. Yu, W. Zhang, J. Wang, and Y. Yu, "SeqGAN: Sequence generative adversarial nets with policy gradient." in Proc. 31st Conference on Association for the Advancement of Artificial Intelligence (AAAI), San Francisco, CA, 2017, pp. 2852 -- 2858. [87] J. Li, W. Monroe, T. Shi, S. Jean, A. Ritter, and D. Jurafsky, "Adver- sarial learning for neural dialogue generation," in Proc. Conference on Empirical Methods in Natural Language Processing (EMNLP), Copenhagen, Denmark, 2017, pp. 2157 -- 2169. [88] H. Ding, K. Sricharan, and R. Chellappa, "ExprGAN: Facial expression editing with controllable expression intensity," in Proc. 32nd Con- ference on Association for the Advancement of Artificial Intelligence (AAAI), New Orleans, LA, 2018, pp. 6781 -- 6788. [89] Y. Zhou and B. E. Shi, "Photorealistic facial expression synthesis by the conditional difference adversarial autoencoder," in Proc. 7th Inter- national Conference on Affective Computing and Intelligent Interaction (ACII), San Antonio, TX, 2017, pp. 370 -- 376. [90] L. Song, Z. Lu, R. He, Z. Sun, and T. Tan, "Geometry guided adversar- ial facial expression synthesis," arXiv preprint arXiv:1712.03474, Dec. 2017. [91] C. Hsu, H. Hwang, Y. Wu, Y. Tsao, and H. Wang, "Voice conversion from unaligned corpora using variational autoencoding Wasserstein generative adversarial networks," in Proc. 18th Annual Conference of the International Speech Communication Association (INTER- SPEECH), Stockholm, Sweden, 2017, pp. 3364 -- 3368. [92] G. Perarnau, J. van de Weijer, B. Raducanu, and J. M. ´Alvarez, "Invertible conditional gans for image editing," in Proc. Adversarial Training Workshop in NIPS, Barcelona, Spain, 2016. [93] C. Lee, Y. Wang, T. Hsu, K. Chen, H. Lee, and L. Lee, "Scalable sentiment for sequence-to-sequence chatbot response with performance analysis," in Proc. IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Calgary, Canada, 2018, pp. 6164 -- 6168. [94] B. Schuller, Z. Zhang, F. Weninger, and F. Burkhardt, "Synthesized speech for model training in cross-corpus recognition of human emo- tion," International Journal of Speech Technology, Special Issue on New and Improved Advances in Speaker Recognition Technologies, vol. 15, no. 3, pp. 313 -- 323, Sep. 2012. [95] Y. Zhang, R. Barzilay, and T. S. Jaakkola, "Aspect-augmented adver- sarial networks for domain adaptation," Transactions of the Association for Computational Linguistics, vol. 5, pp. 515 -- 528, Dec. 2017. [96] X. Zhu, Y. Liu, J. Li, T. Wan, and Z. Qin, "Emotion classification with data augmentation using generative adversarial networks," in Proc. Pacific-Asia Conference on Knowledge Discovery and Data Mining (PAKDD), Melbourne, Australia, 2018, pp. 349 -- 360. [97] S. Sahu, R. Gupta, G. Sivaraman, W. AbdAlmageed, and C. Y. Espy- Wilson, "Adversarial auto-encoders for speech based emotion recogni- tion," in Proc. 18th Annual Conference of the International Speech Communication Association (INTERSPEECH), Stockholm, Sweden, 2017, pp. 1243 -- 1247. [98] Y. Ganin, E. Ustinova, H. Ajakan, P. Germain, H. Larochelle, F. Lavio- lette, M. Marchand, and V. S. Lempitsky, "Domain-adversarial training of neural networks," Journal of Machine Learning Research, vol. 17, no. 1, pp. 2096 -- 2030, Jan. 2016. 13 [99] Z. Li, Y. Zhang, Y. Wei, Y. Wu, and Q. Yang, "End-to-end adversarial memory network for cross-domain sentiment classification," in Proc. 26th International Joint Conference on Artificial Intelligence (IJCAI), Melbourne, Australia, 2017, pp. 2237 -- 2243. [100] J. Shen, Y. Qu, W. Zhang, and Y. Yu, "Wasserstein distance guided rep- resentation learning for domain adaptation," in Proc. 32nd Conference on Association for the Advancement of Artificial Intelligence (AAAI), New Orleans, LA, 2018, pp. 4058 -- 4065. [101] H. Zhao, S. Zhang, G. Wu, J. Costeira, J. Moura, and G. Gordon, "Multiple source domain adaptation with adversarial learning," in Proc. Workshop in 6th International Conference on Learning Representations (ICLR), Vancouver, Canada, 2018. [102] P. Liu, X. Qiu, and X. Huang, "Adversarial multi-task learning for text classification," in Proc. 55th Annual Meeting of the Association for Computational Linguistics (ACL), Vancouver, Canada, 2017, pp. 1 -- 10. [103] X. Chen and C. Cardie, "Multinomial adversarial networks for multi- domain text classification," in Proc. 16th Annual Conference of the North American Chapter of the Association for Computational Lin- guistics (NAACL), New Orleans, LA, 2018, pp. 1226 -- 1240. [104] I. Goodfellow, J. Shlens, and C. Szegedy, "Explaining and harness- ing adversarial examples," in Proc. 3rd International Conference on Learning Representations (ICLR), Vancouver, Canada, 2015. [105] J. Chang and S. Scherer, "Learning representations of emotional speech with deep convolutional generative adversarial networks," in Proc. IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), New Orleans, LA, 2017, pp. 2746 -- 2750. [106] T. Miyato, S.-i. Maeda, M. Koyama, K. Nakae, and S. Ishii, "Dis- tributional smoothing with virtual adversarial training," in Proc. 4th International Conference on Learning Representations (ICLR), San Juan, PR, 2016. [107] T. Miyato, A. M. Dai, and I. Goodfellow, "Adversarial training methods for semi-supervised text classification," in Proc. 5th International Conference on Learning Representations (ICLR), Toulon, France, 2017. [108] S. Sahu, R. Gupta, G. Sivaraman, and C. Espy-Wilson, "Smoothing model predictions using adversarial training procedures for speech based emotion recognition," in Proc. IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Calgary, Canada, 2018, pp. 4934 -- 4938. [109] S. Arora, R. Ge, Y. Liang, T. Ma, and Y. Zhang, "Generalization and equilibrium in Generative Adversarial Nets (GANs)," in Proc. 34th International Conference on Machine Learning (ICML), Sydney, Australia, 2017, pp. 224 -- 232. [110] T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen, "Improved techniques for training GANs," in Proc. Advances in Neural Information Processing Systems (NIPS), Barcelona, Spain, 2016, pp. 2226 -- 2234. [111] L. Metz, B. Poole, D. Pfau, and J. Sohl-Dickstein, "Unrolled gener- ative adversarial networks," in Proc. 5th International Conference on Learning Representations (ICLR), Toulon, France, 2017. [112] I. O. Tolstikhin, S. Gelly, O. Bousquet, C. Simon-Gabriel, and B. Scholkopf, "AdaGAN: Boosting generative models," in Proc. Ad- vances in Neural Information Processing Systems (NIPS), Long Beach, CA, 2017, pp. 5430 -- 5439. [113] S. Yang, L. Xie, X. Chen, X. Lou, X. Zhu, D. Huang, and H. Li, "Statistical parametric speech synthesis using generative adversarial networks under a multi-task learning framework," in Proc. IEEE Automatic Speech Recognition and Understanding Workshop (ASRU), Okinawa, Japan, 2017, pp. 685 -- 691. [114] R. I. Dunbar, A. Marriott, and N. D. Duncan, "Human conversational behavior," Human Nature, vol. 8, no. 3, pp. 231 -- 246, Sep. 1997.
1907.05084
1
1907
2019-07-11T10:06:20
MeetUp! A Corpus of Joint Activity Dialogues in a Visual Environment
[ "cs.CL", "cs.CV" ]
Building computer systems that can converse about their visual environment is one of the oldest concerns of research in Artificial Intelligence and Computational Linguistics (see, for example, Winograd's 1972 SHRDLU system). Only recently, however, have methods from computer vision and natural language processing become powerful enough to make this vision seem more attainable. Pushed especially by developments in computer vision, many data sets and collection environments have recently been published that bring together verbal interaction and visual processing. Here, we argue that these datasets tend to oversimplify the dialogue part, and we propose a task---MeetUp!---that requires both visual and conversational grounding, and that makes stronger demands on representations of the discourse. MeetUp! is a two-player coordination game where players move in a visual environment, with the objective of finding each other. To do so, they must talk about what they see, and achieve mutual understanding. We describe a data collection and show that the resulting dialogues indeed exhibit the dialogue phenomena of interest, while also challenging the language & vision aspect.
cs.CL
cs
Meet Up! A Corpus of Joint Activity Dialogues in a Visual Environment Nikolai Ilinykh Sina Zarriess David Schlangen(cid:63) Dialogue Systems Group, Bielefeld University (cid:63)Computational Linguistics, University of Potsdam first.last@uni-{bielefeldpotsdam}.de 9 1 0 2 l u J 1 1 ] L C . s c [ 1 v 4 8 0 5 0 . 7 0 9 1 : v i X r a Abstract Building computer systems that can converse about their visual environment is one of the oldest concerns of research in Artificial Intelli- gence and Computational Linguistics (see, for example, Winograd's 1972 SHRDLU system). Only recently, however, have methods from computer vision and natural language process- ing become powerful enough to make this vi- sion seem more attainable. Pushed especially by developments in computer vision, many data sets and collection environments have re- cently been published that bring together ver- bal interaction and visual processing. Here, we argue that these datasets tend to oversimplify the dialogue part, and we propose a task -- MeetUp! -- that requires both visual and con- versational grounding, and that makes stronger demands on representations of the discourse. MeetUp! is a two-player coordination game where players move in a visual environment, with the objective of finding each other. To do so, they must talk about what they see, and achieve mutual understanding. We describe a data collection and show that the resulting di- alogues indeed exhibit the dialogue phenom- ena of interest, while also challenging the lan- guage & vision aspect. Introduction 1 In recent years, there has been an explosion of in- terest in language & vision in the NLP commu- nity, leading to systems and models able to ground the meaning of words and sentences in visual rep- resentations of their corresponding referents, e.g. work in object recognition (Szegedy et al., 2015), image captioning (Fang et al., 2015; Devlin et al., 2015; Chen and Lawrence Zitnick, 2015; Vinyals et al., 2015; Bernardi et al., 2016), referring ex- pression resolution and generation (Kazemzadeh et al., 2014; Mao et al., 2015; Yu et al., 2016; Schlangen et al., 2016), multi-modal distributional semantics (Kiela and Bottou, 2014; Silberer and Lapata, 2014; Lazaridou et al., 2015), and many others. While these approaches focus entirely on visual grounding in a static setup, a range of recent ini- tiatives have extended exisiting data sets and mod- els to more interactive settings. Here, speakers do not only describe a single image or object in an isolated utterance, but engage in some type of multi-turn interaction to solve a given task (Das et al., 2017b; De Vries et al., 2017). In theory, these data sets should allow for more dynamic ap- proaches to grounding in natural language interac- tion, where words or phrases do not simply have a static multi-modal meaning (as in existing mod- els for distributional semantics, for instance), but, instead, where the meaning of an utterance is ne- gotiated and established during interaction. Thus, ideally, these data sets should lead to models that combine visual grounding in the sense of Harnard (1990) and conversational grounding in the sense of Clark et al. (1991). In practice, however, it turns out to be surpris- ingly difficult to come up with data collection set- ups that lead to interesting studies of both these aspects of grounding. Existing tasks still adopt a very rigid interaction protocol, where e.g. an asymmetric interaction between a question asker and a question answerer produces uniform se- quences of question-answer pairs (as in the "Vi- sual Dialogue" setting of Das et al. (2017b) for in- stance). Here, it is impossible to model e.g. turn- taking, clarification, collaborative utterance con- struction, which are typical phenomena of conver- sational grounding in interaction (Clark, 1996b). Others tasks follow the traditional idea of the re- ference game (Rosenberg and Cohen, 1964; Clark and Wilkes-Gibbs, 1986) in some way, but try to set up the game such that the referent can only be established in a sequence of turns (e.g. De Vries et al., 2017). While this approach leads to goal- oriented dialogue, the goal is still directly related to reference and visual grounding. However, re- alistic, every-day communication between human speakers rarely centers entirely around establish- ing reference. It has been argued in the litera- ture that reference production radically changes if it is the primary goal of an interactive game, rather than embedded in a dialogue that tries to achieve a more high-level communicative goal (Stent, 2011). Another strand of recent work extends the en- vironments about which the language can talk to (simulated) 3D environments (Savva et al. (2019, 2017); see Byron et al. (2007) for an early precur- sor). On the language side, however, the tasks that have been proposed in these environments allow only limited interactivity (navigation, e.g. Ander- son et al. (2018); Ma et al. (2019); question an- swering, Das et al. (2017a)). Figure 1: The game interface What is lacking in these tasks is a real sense of the interaction being a joint task for which both participants are equally responsible, and, phrased more technically, any need for the participants to jointly attempt to track the dialogue state. In this paper, we propose a new task, MeetUp!, for visu- ally grounded interaction, which is aimed at col- lecting conversations about and within a visual world, in a collaborative setting. (Figure 1 gives a view of the game interface and an excerpt of an ongoing interaction.) Our setup extends recent efforts along three main dimensions: 1) the task's main goal can be defined independently of reference, in high-level communicative terms (namely "try to meet up in an unknown environment"), 2) the task is sym- metric and does not need a rigid interaction proto- col (there is no instruction giver/follower), 3) the requirement to agree on the game state (see be- low) ensures that the task is a true joint activity (Clark, 1996a), which in turn brings out opportu- nity for meta-semantic interaction and negotiation about perceptual classifications ("there is a mir- ror" -- "hm, could it be a picture?". This is an im- portant phenomenon absent from all major current language & vision datasets. This brings our dataset closer to those of un- restricted natural situated dialogue, e.g. (Ander- son et al., 1991; Fern´andez and Schlangen, 2007; Tokunaga et al., 2012; Zarriess et al., 2016), while still affording us some control over the expected range of phenomena, following our design goal of creating a challenging, but not too challenging modelling resource. The crowd-sourced nature of the collection also allows us to create a resource that is an order of magnitude larger than those just mentioned.1 We present our data collection of over 400 di- alogues in this domain, providing an overview of the characteristics and an analysis of some occuring phenomena. Results indicate that the task leads to rich, natural and varied di- alogue where speakers use a range of strate- gies to achieve communicative grounding. The data is available from https://github.com/ clp-research/meetup . 2 The Meet Up Game MeetUp! is a two-player coordination game. In the discrete version described here, it is played on a gameboard that can be formalised as a connected subgraph of a two-dimensional grid graph.2 See Figure 2 for an example. Players are located at vertices in the graph, which we call "rooms". Players never see a rep- 1Haber et al. (2019) present a concurrently collected dataset that followed very similar aims (and is even larger); their setting however does not include any navigational as- pects and concentrates on reaching agreement of whether im- ages are shared between the participants or not. 2The game could also be realised in an environment that allows for continuous movement and possibly interaction with objects, for example as provided by the simulators dis- cussed above. This would complicate the navigation and vi- sual grounding aspects (bringing those more in line with the "vision-and-language navigation task"; (e.g. Anderson et al., 2018; Ma et al., 2019)), but not the coordination aspect. As our focus for now is on the latter, we begin with the discrete variant. resentation of the whole gameboard, they only see their current room (as an image). They also do not see each other's location. The images rep- resenting rooms are of different types; here, dif- ferent types of real-world scenes, such as "bath- room", "garage", etc., taken from the ADE20k corpus collected by Zhou et al. (2017). Players can move from room to room, if there is a con- necting edge on the gameboard. On entering a room, the player is (privately) informed about the available exit directions as cardinal directions, e.g. "north", "south", etc., and (privately) shown the image that represents the room. Players move by issuing commands to the game; these are not shown to the other player. Figure 2: An abstract layout with room types (left), and a full gameboard with assigned images (right). The goal of the players is to be in the same lo- cation, which means they also have to be aware of that fact. In the variant explored here, the goal is constrained in advance in that the meetup room has to be of a certain type previously announced to the players; e.g., a kitchen. The players can communicate via text messages. As they do not see each other's location, they have to describe the images they see to ascertain whether or not they are currently in the same room, and move to a dif- ferent room if they decide that they aren't. If they have reached the conclusion that they are, they can decide to end the game, which they do via a spe- cial command. If they are then indeed in the the same room, and it is of the target type, the game is counted as a success, of which they are informed. The gameboard can be arranged such that there is type-level ambiguity; for example, there may be more than one room of type "bedroom" (as in Fig- ure 2). The game as implemented does not impose strict turn taking on the players; however, mes- sages are only shown to the other player once they are sent via pressing the return key, as is usual in chat tools. There is thus no possibility for perceiv- ably overlapping actions, but it may happen that both players have been typing at the same time and the message that is received second is not a response to the first. To make this more concrete, and to explain our expectations with respect to phenomena and re- quired capabilities, we show a realistic, but com- pressed and constructed example of an interaction in this domain in the following. We will discuss attested examples from our data collection further below. (1) a. Game Master: You have to meet in a room of type utility room. A: Hi. I'm in a bedroom with pink walls. B: I seem to be in a kitchen. A: I'll go look for a utility room. A (privately): north A (privately): west B (privately): east A: Found a room with a washing machine. Is that a utility room? B: Was wondering as well. Probably that's what it is. B: I'm in the pink bedroom now. I'll come to you. B (privately): north B (privately): west B: Poster above washing machine? A: Mine has a mirror on the wall. B: yeah, could be mirror. Plastic chair? A: And laundry basket. A: done B: Same B: done b. c. d. e. f. g. h. i. j. k. l. m. n. o. p. q. r. s. In (1-a), the Game Master (realised as a soft- ware bot in the chat software) gives the type con- straint for the meetup room, which sets up a clas- sification task for the players, namely to identify rooms of this type. (1-b) and (1-c) illustrate a common strategy (as we will see below), which is to start the interaction by providing state informa- tion that potentially synchronises the mutual rep- resentations. This is done through the production of high-level descriptions of the current room; for which the agents must be capable of provid- ing scene categorisations. (1-d) and (1-j) show, among other things, the coordination of strat- egy, by announcing plans for action. In (1-e) -- (1-g), private navigation actions are performed, which here are both epistemic actions (chang- ing the environment to change perceptual state) as well as pragmatic actions (task level actions that potentially advance towards the goal), in the sense of Kirsh and Maglio (1994). (1-h) and (1-i), kids' roomhallbedroom 1bathroombedroom 2homeofficegarageliving roomkitchenappartmentbuilding 2appartmentbuilding 1bedroom 1bathroombedroom 2 where the classification decision itself and its ba- sis is discussed ("what is a utility room?"); and (1-m) -- (1-o), where a classification decision is re- vised (poster to mirror), illustrate the potential for meta-semantic interaction. This is an im- portant type of dialogue move (Schlangen, 2016), which is entirely absent from most other language and vision datasets and hence outside of the scope of models trained on them. (1-j), also illustrates the need for discourse memory, through the co- reference to the earlier mentioned room where A was at the start. Finally, (1-p) as reply to (1-o) shows how in conversational language, dialogue acts can be performed indirectly. As we have illustrated with this constructed ex- ample, the expectation is that this domain chal- lenges a wide range of capabilities; capabilities which so far have been captured separately (e.g., visual question answering, scene categorisation, navigation based on natural language commands, discourse co-reference), or not at all (discussion and revision of categorisation decisions). We will see in the next section whether this is borne out by the data. 3 Data Collection To test our assumptions, and to later derive models for these phenomena, we collected a larger num- ber of dialogues in this domain (430, to be pre- cise). We realised the MeetUp game within the slurk chat-tool (Schlangen et al., 2018), deployed via the Amazon Mechanical Turk platform. We constructed maps for the game in three steps. First, we create a graph through a random walk over a grid graph, constrained to creating 10 nodes. The nodes are then assigned room types, to form what we call a layout. We identified 48 cat- egories from the ADE20k corpus that we deemed plausible to appear in a residential house setting, from which we designated 20 categories as possi- ble (easy to name) target types and the remaining 28 as distractor types. Additionally, we identified 24 plausible outdoor scene types, from which we sampled for the leaf nodes. The full set is given in the Appendix. We designate one type per layout to be the target type; this type will be assigned to 4 nodes in the graph, to achieve type ambi- guity and potentially trigger clarification phases. We then sample actual images from the appropri- ate ADE20k categories, to create the gameboards. In a final step, we randomly draw separate start- ing positions for the players, such that both of the players start in rooms not of the target type. For each run of the game, we randomly create a new gameboard following this recipe. We deployed the game as a web application, en- listing workers via the Mechanical Turk platform. After reading a short description of the game (sim- ilar to that at the beginning of Section 2, but ex- plaining the interface in more detail), workers who accepted the task were transferred to a waiting area in our chat tool. If no other worker appeared within a set amount of time, they were dismissed (and payed for their waiting time). Otherwise, the pair of users was moved to another room in the chat tool and the game begun. Player were payed an amount of $0.15 per minute (for a maximum of 5 minutes per game), with a bonus of $0.10 for successfully finishing the game (as was explained from the start in the instruction, to provide an ad- ditional incentive).3 4 Results 4.1 Descriptive Statistics Over a period of 4 weeks, we collected 547 plays of the game. Of these, 117 (21%) had to be discarded because one player left prematurely or technical problems occurred, which left us with 430 completed dialogues. Of these, 87% ended successfully (players indeed ending up in the same room, of the correct type), 10% ended with the players being in different rooms of the correct type; the remaining 3% ended with at least one player not even being in a room of the target type. Overall, we spent around $700 on the data collec- tion. Figure 3: Histogram of number of turns per dialogue The average length of a dialogue was 13.2 turns 3By the time of the conference, we will publish the code required to run this environment, as well as the data that we collected. 0510152025303540010203040 (66.9 tokens), taking 165 seconds to produce. (The distribution of lengths is shown in Figure 3.) Altogether, we collected 5,695 turns, of an av- erage length of 5.1 tokens. Over all dialogues, 2,983 word form types were introduced, leading to a type/token ratio of 0.10. The overlap of the vocabularies of the two players (intersection over union) ranged from none to 0.5, with a mean of 0.11. On average, in each dialogue 28.3 naviga- tion actions were performed. (Resulting in a MOVE/SAY ratio of a little over 2 to 1). The me- dian time spent in a room was 12.2 secs. On aver- age, each player visited 5.9 rooms without saying anything; when a player said something while in a room, they produced on average 3.5 turns. It hence seems that, as expected, players moved through some rooms without commenting on them, while spending more time in others. We calculated the contribution ratio between the more talkative player and the less talkative one in each dialogue, which came out as 2.4 in terms of tokens, and 1.7 in terms of turns. This indicates that there was a tendency for one of the players to take a more active role. To provide a comparison, we calculated the same for the (role-asymmetric) MapTask dialogues (Anderson et al., 1991),4 find- ing a 2.8 token ratio and a 1.3 turn ratio. Figure 4: Histogram of number of tokens per turn Figure 5: Number of Games Played, by Worker 4Using the transcripts provided at http://groups. inf.ed.ac.uk/maptask/maptasknxt.html. Crosstalk occurs: On average, there are 1.4 in- stances of one turn coming within two seconds or less than the previous one (which we arbitrarily set as the threshold for when a turn is likely not to be a reaction to the previous one, but rather has been concurrently prepared). The mean pause duration between turns of different speakers is 11.2 secs -- with a high standard deviation of 9.46, however. This is due to the structure of the dialogues with phases of intense communicative activity, when a matching decision is made, and phases of individ- ual silent navigation. If we only take transition times within the first 3 quartiles, the average tran- sition time is 5.04 secs. As Figure 4 indicates, most turns are rather short, but there is a substantial amount of turns that contain 4 or more tokens. Figure 5 shows a frequency distribution of num- ber of games played, by crowdworker. Overall, we had 126 distinct participants (as indicated by AMT ID). Our most prolific worker participated in 49 games, and the majority of workers played in more than one game. In only 22 games, two novices played with each other. In 81 games, there was one novice, and in 305 games, both players had played before. (For a few games we could not reconstruct the workerIDs for technical reasons, so this does not sum up to 430.) 4.2 Examples Figure 6 shows a full interaction from the cor- pus. The public actions are represented in bold font, private actions are marked with "privately", and responses by the Game Master are shown in italics. This example has many of the features il- lustrated with the constructed example (1) shown earlier. In lines 20 and 22, the players begin the game by providing high-level categorisations of their current positions, in effect synchronising their mutual game representations. Lines 22 and 23 then show coordination of game playing strat- egy. After separately moving around, individually solving the categorisation task -- by moving through rooms that are not of the right type -- the players resume interaction in lines 50ff. (with 50/51 show- ing crosstalk). Line 54 provides a justification for the negative conclusion from line 53, by provid- ing information that contradicts l. 52. After more coordination of strategy in l.s 55 & 56, player B explicitly queries for more information. In line 75, player A justifies their positive verdict by confirm- 05101520253035400200400600800100002040608010012001020304050 Figure 6: One Example Dialogue (mux36), with Images Overlayed ing details previously given by B, extending it with even more details. B confirms explicitly in 78, be- fore also chosing SOLVE. The excerpt from another dialogue in (2) shows an example of classification uncertainty being ne- gotiated and dealt with. (2) (Excerpt from mux39) A: i think i am in a basement B: i think i might be too. A: maybe not though A: wood panel? A: two doors? B: there's a tan couch, and a tan 6500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599ACL2019Submission***.ConfidentialReviewCopy.DONOTDISTRIBUTE.timemain1000:03GM(toA):url:/b/bathroom/ADE-train-00002739.jpg1200:03GM(toA):Youcango:[/s]outh[/n]orth[/w]est1400:03GM(toA):Youhavetomeetin:b/basement1500:03GM(toB):url:/a/apartment-building/outdoor/ADE-train-00001414.jpg1700:04GM(toB):Youcango:[/s]outh1900:04GM(toB):Youhavetomeetin:b/basement2000:18A:iaminthebathroom2100:29A:whereareyouat?2200:33B:I'moutside.Let'smovearoundabit.2300:38A:k2400:40B(privately):n2500:41GM(toB):Nothinghappened.Youcango:[/s]outh2600:43A(privately):s2700:44GM(toA):url:/b/bedroom/ADE-train-00003553.jpg2900:44GM(toA):Youcango:[/s]outh[/n]orth[/w]est3000:45B(privately):s3100:45GM(toB):url:/b/basement/ADE-train-00002497.jpg3300:45GM(toB):Youcango:[/s]outh[/n]orth[/e]ast3400:50A(privately):s3500:50GM(toA):url:/c/corridor/ADE-train-00006285.jpg3700:51GM(toA):Youcango:[/n]orth[/e]ast3800:52B(privately):s3900:52GM(toB):url:/l/living-room/ADE-train-00000774.jpg4100:53GM(toB):Youcango:[/s]outh[/n]orth[/e]ast4200:57B(privately):s4300:57GM(toB):url:/b/basement/ADE-train-00002482.jpg4500:57GM(toB):Youcango:[/n]orth[/e]ast4601:01A(privately):e4701:01GM(toA):url:/b/basement/ADE-train-00002494.jpg4901:01GM(toA):Youcango:[/e]ast[/w]est5001:11A:Iaminthebasement5101:11B:I'minabasement.5201:23B:Minehasawhitestaircase5301:28A:no5401:37A:minehaswoodenstaircase5501:55B:Okay.ShouldItrytomovetowardsyou?5602:09A:Sure5702:11B:Wooden?Whatelse?5802:16B(privately):e5902:17GM(toB):url:/b/bedroom/ADE-train-00003553.jpg6102:17GM(toB):Youcango:[/s]outh[/n]orth[/w]est6202:25B(privately):s6302:25GM(toB):url:/c/corridor/ADE-train-00006285.jpg6502:25GM(toB):Youcango:[/n]orth[/e]ast6602:27A:waterheaterandwasheranddryer6702:35B(privately):s6802:35GM(toB):Nothinghappened.Youcango:[/n]orth[/e]ast6902:40B(privately):e7002:40GM(toB):url:/b/basement/ADE-train-00002494.jpg7202:41GM(toB):Youcango:[/e]ast[/w]est7302:42A:aplasticchairandascreendoor7403:01GM:Attention:youareinthegamefor3minutes!7503:18B:I'mthere!Iseethewaterheater,washeranddryer,sink,chairlayingontopofthescreendoor7603:26B(privately):done7703:27GM:The'/done'commandhasbeenissuedbyyouoryourpartner.Toendthegame,bothplayersneedtoenter'/done'7803:27A:yep7903:32A(privately):done8003:34GM:Welldone!Bothofyouareindeedinthesameroomoftype:b/basement!Figure5:OneExampleDialogue(mux36)AntonvandenHengel.2018.Vision-and-LanguageNavi-gation:Interpretingvisually-groundednavigationinstruc-tionsinrealenvironments.InCVPR2018.RaffaellaBernardi,RuketCakici,DesmondElliott,AykutErdem,ErkutErdem,NazliIkizler-Cinbis,FrankKeller,AdrianMuscat,andBarbaraPlank.2016.Automaticdescriptiongenerationfromimages:Asurveyofmod-els,datasets,andevaluationmeasures.J.Artif.Int.Res.,55(1):409 -- 442.SimonBrodeur,EthanPerez,AnkeshAnand,Florian table. brown coffee loveseat/chair. bar. tv B: nope, different room A: ok i am not there B: want me to meet you, or do you want to meet me? A: i think mine is more basement like B: okay. i'll try to find it. 4.3 Phases and Phenomena Figure 8: Prefixes of final turns (before done) there a"). Using the presence of a question mark at the end of the turn as a very rough proxy, we find 615 questions over all dialogues, which works out as 1.43 on average per dialogue. Taking only the successfull dialogues into account, the number is slightly higher, at 1.48. Figure 10 shows the be- ginnings of these turns. 5 Modelling the Game The main task of an agent playing this game can be modelled in the usual way of modelling agents in dynamic environments (Sutton and Barto, 1998), that is, as computing the best possible next action, given what has been experienced so far. The ques- tions then are what the range of possible actions is, what the agent needs to remember about its expe- rience, and what the criteria might be for selecting the best action. In the action space, the clearest division is be- tween actions that are directly observable by the other player -- actions of type SAY -- and actions that are targeted at changing the observable game state for the agent itself: actions of type MOVE and the END action. Since we did not restrict what the players could say, there is an infinite number of SAY actions (see Cot´e et al. (2018) for a formali- sation of such an action space). Figure 7: Prefixes of first turns Figure 7 shows the most frequent beginnings of the very first turn in each dialogue. As this in- dicates, when not opening with a greeting, players naturally start by locating themselves (as in the ex- ample we showed in full). Figure 8 gives a similar view of the final turn, before the first done was issued. This shows that the game typically ends with an explicit mutual confirmation that the goal condition was reached, before this was indicated to the game. What happens inbetween? Figure 9 shows the most frequent overall turn beginnings. As this illustrates, besides the frequent positive replies ("yes", "ok"; indicating a substantial involvement of VQA-like interactions), the most frequent con- structions seem to locate the speaker ("I'm in a") or talk about objects ("I found a", "there is a", "is 020406080100i f o u n d o n e .wh e y ! i ' m i ni ' m i n o n eh i t h e r e , i ' mh e l l o t h e r e : )i ' v e f o u n d ai ' v e f o u n d o n e .i t h i n k i. wni a m o u t s i d eo ki a m a ti s e e ah i t h e r ei ' m a t ah e l l o t h e r ei t h i n k i ' mh e yf o u n d o n e w i t hi ' m i n t h ei m i n ai f o u n d ao k i a mo k a y i ' m i ni ' m i n ai a m i nh ih e l l o020406080100o k f o u n d i tg r e a t !a w e s o m ea w e s o m e : )i f o u n d i ti a m i nt h e r e i s at h a t s i ti ' m h e r ey e s !kg r e a tw e a r e d o n eo k i a mi s t h e r e ai t h i n k iy e s .f o u n d i t !o k a yh e r ed o n ei a m h e r ey e a hg o t i tc o o li m t h e r ef o u n d i ty e po ky e s Figure 9: Most frequent turn beginnings Figure 10: Prefixes of questions (utt.s ending in "?") The total game state consists of the positions of the players on the gameboard. Of this, however, only a part is directly accessible for either agent, which is their own current position. The topology of the network must be remembered from expe- rience, if deemed to be relevant. (From observ- ing the actions of the players in the recorded di- alogues, it seems unlikely that they attempted to learn the map; they are however able to purpose- fully return to earlier visited rooms.) More impor- tantly, the current position of the other player is only indirectly observable, through what they re- port about it. Finally, as we have seen in the exam- ples above, the players often negotiate and agree on a current strategy (e.g., "I find you", "you find me", "we walk around"). As this guides mutual expectations of the players, this is also something that needs to be tracked. On the representation side, we can then assume that an agent will need to track a) their own history of walking through the map (raising interesting questions of how de- tailed such a representation needs to be or should be made; an artificial agent could help itself by storing the full image for later reference, which would presumably be not enitirely plausible cog- nitively); b) what has been publicly said and hence could be antecedent to later co-references; c) what they infer about the other player's position; and d) what they assume the current agreed upon strategy is. This clearly is a challenging task; we will in future work first explore hybrid approaches that combine techniques from task-oriented dialogue modelling (Williams and Young, 2007; Buss and Schlangen, 2010) with more recent end-to-end ap- proaches (Cot´e et al., 2018; Urbanek et al., 2019). 6 Conclusions We have presented a novel situated dialogue task that brings together visual grounding (talking about objects in a scene), conversational ground- ing (reaching common ground), and discourse rep- resentation (talking about objects that were intro- duced into the discourse, but aren't currently visi- ble). An agent mastering this task will thus have to combine dialogue processing skills as well as lan- guage and vision skills. We hence hope that this task will lead to the further development of tech- niques that combine both. Our next step is to scale up the collection, to a size where modern machine learning methods can be brought to the task. Be- sides use in modelling, however, we also think that the corpus can be a valuable resource for linguistic investigations into the phenomenon of negotiating situational grounding. 0255075100125150175ok let meeyeahi think i'mi think iheydoes it havedonei'm hereim therecoolfound iti see ayepkokay i'm indo you wantis there ait has aim in ai found athere is anookayi'm in thehellohioki'm in ayes0510152025w o o d f l o o r ?d o e s i t l o o kw h e r e a b o u t s a r e y o u ?i s t h i s t h ey o u w a n t t oi t h a s ad o y o u s e ei a m i nw h i c h d i r e c t i o n d i dc a n y o u d e s c r i b ew h a t d o e s y o u r si s i t as h o u l d i t r ya r e y o u s t i l ld i d y o u f i n dw h e r e a r e y o ud o y o u k n o wi t l o o k s l i k ew h a t c o l o r i ss h o u l d i m o v ea r e y o u t h e r e ?w h a t d o e s i tw h e r e a r e y o u ?w a n t m e t oa r e y o u i ny o u t h e r e ?d o e s i t h a v e?d o y o u w a n ti s t h e r e a living room, jacuzzi/indoor, doorway/indoor, Distractor room types: home theater, storage room, hotel room, tearoom, art studio, kinder- veranda, patio, restroom/indoor, workroom, corridor, game room, pool- car- A Room Types 1. Target room types: bathroom, bedroom, kitchen, basement, nurs- ery, attic, childs room, playroom, dining room, home office, staircase, utility room, locker room, wine cellar/bottle storage, reading room, waiting room, balcony/interior 2. music studio, computer room, street, yard, garden classroom, shower, garage/indoor, room/home, port/indoor, hunting lodge/indoor 3. Outdoor room types (nodes with a single entry point): garage/outdoor, apartment building/outdoor, re- stroom/outdoor, kiosk/outdoor, apse/outdoor, carport/outdoor, flea market/outdoor, chicken farm/outdoor, kennel/outdoor, washhouse/outdoor, park- hunting lodge/outdoor, ing garage/outdoor, convenience store/outdoor, bistro/outdoor, inn/outdoor, library/outdoor swimming pool/outdoor, cloakroom/room, closet, parlor, hallway, reception, cloister/outdoor, diner/outdoor, cathedral/outdoor, newsstand/outdoor, sewing room, breakroom, jacuzzi/outdoor, doorway/outdoor, casino/outdoor, References Anne H Anderson, Miles Bader, Ellen Gurman Bard, Eliza- beth Boyle, Gwyneth Doherty, Simon Garrod, Stephen Is- ard, Jacqueline Kowtko, Jan McAllister, Jim Miller, et al. 1991. The hcrc map task corpus. Language and speech, 34(4):351 -- 366. Peter Anderson, Qi Wu, Damien Teney, Jake Bruce, Mark Johnson, Niko Sunderhauf, Ian Reid, Stephen Gould, and Anton van den Hengel. 2018. Vision-and-Language Navi- gation: Interpreting visually-grounded navigation instruc- tions in real environments. In CVPR 2018. Raffaella Bernardi, Ruket Cakici, Desmond Elliott, Aykut Erdem, Erkut Erdem, Nazli Ikizler-Cinbis, Frank Keller, Adrian Muscat, and Barbara Plank. 2016. Automatic description generation from images: A survey of mod- els, datasets, and evaluation measures. J. Artif. Int. Res., 55(1):409 -- 442. Okko Buss and David Schlangen. 2010. Modelling sub- utterance phenomena in spoken dialogue systems. In Proceedings of the 14th International Workshop on the Semantics and Pragmatics of Dialogue (Pozdial 2010), pages 33 -- 41, Poznan, Poland. Donna Byron, Alexander Koller, Jon Oberlander, Laura Stoia, and Kristina Striegnitz. 2007. Generating instruc- tions in virtual environments (give): A challenge and an evaluation testbed for nlg. Position Papers, page 3. Xinlei Chen and C Lawrence Zitnick. 2015. Mind's eye: A recurrent visual representation for image caption genera- tion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2422 -- 2431. Herbert H. Clark. 1996a. Using Language. Cambridge Uni- versity Press, Cambridge. Herbert H Clark. 1996b. Using language. 1996. Cambridge University Press: Cambridge, pages 274 -- 296. Herbert H Clark, Susan E Brennan, et al. 1991. Grounding in communication. Perspectives on socially shared cogni- tion, 13(1991):127 -- 149. Herbert H. Clark and Deanna Wilkes-Gibbs. 1986. Referring as a collaborative process. Cognition, 22:1 -- 39. Marc-Alexandre Cot´e, ´Akos K´ad´ar, Xingdi Yuan, Ben Kybar- tas, Tavian Barnes, Emery Fine, James Moore, Matthew Hausknecht, Layla El Asri, Mahmoud Adada, Wendy Tay, and Adam Trischler. 2018. TextWorld: A Learning Envi- ronment for Text-based Games. ArXiv. Abhishek Das, Samyak Datta, Georgia Gkioxari, Stefan Lee, Devi Parikh, and Dhruv Batra. 2017a. Embodied question answering. CoRR, abs/1711.11543. Abhishek Das, Satwik Kottur, Khushi Gupta, Avi Singh, Deshraj Yadav, Jos´e MF Moura, Devi Parikh, and Dhruv Batra. 2017b. Visual dialog. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, volume 2. Harm De Vries, Florian Strub, Sarath Chandar, Olivier Pietquin, Hugo Larochelle, and Aaron Courville. 2017. Guesswhat?! visual object discovery through multi-modal dialogue. In Proc. of CVPR. Jacob Devlin, Hao Cheng, Hao Fang, Saurabh Gupta, Li Deng, Xiaodong He, Geoffrey Zweig, and Margaret Mitchell. 2015. Language models for image captioning: The quirks and what works. In Proceedings of the 53rd Annual Meeting of the Association for Computational Lin- guistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 100 -- 105, Beijing, China. Association for Computa- tional Linguistics. Hao Fang, Saurabh Gupta, Forrest Iandola, Rupesh Srivas- tava, Li Deng, Piotr Dollar, Jianfeng Gao, Xiaodong He, Margaret Mitchell, John Platt, Lawrence Zitnick, and Ge- offrey Zweig. 2015. From captions to visual concepts and back. In Proceedings of CVPR, Boston, MA, USA. IEEE. Raquel Fern´andez and David Schlangen. 2007. Referring under restricted interactivity conditions. In Proceedings of the 8th SIGdial Workshop on Discourse and Dialogue, pages 136 -- 139, Antwerp, Belgium. Janosch Haber, Tim Baumgartner, Ece Takmaz, Lieke Gelderloos, Elia Bruni, and Raquel Fern´andez. 2019. The PhotoBook Dataset: Building Common Ground through Visually-Grounded Dialogue. In Proceedings of the 2019 meeting of the Association for Computational Linguistics, Florence, Italy. Stevan Harnard. 1990. The symbol grounding problem. Physica D, 42:335 -- 346. Sahar Kazemzadeh, Vicente Ordonez, Mark Matten, and Tamara L Berg. 2014. ReferItGame: Referring to Objects in Photographs of Natural Scenes. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP 2014), pages 787 -- 798, Doha, Qatar. Douwe Kiela and L´eon Bottou. 2014. Learning image em- beddings using convolutional neural networks for im- proved multi-modal semantics. In Proceedings of the 2014 Conference on Empirical Methods in Natural Lan- guage Processing (EMNLP), pages 36 -- 45, Doha, Qatar. Association for Computational Linguistics. David Kirsh and Paul Maglio. 1994. On Distinguishing Epistemic from Pragmatic Action. Cognitive Science, 18(4):513 -- 549. Angeliki Lazaridou, Nghia The Pham, and Marco Baroni. 2015. Combining language and vision with a multimodal skip-gram model. In Proceedings of the 2015 Confer- ence of the North American Chapter of the Association for Computational Linguistics: Human Language Tech- nologies, pages 153 -- 163, Denver, Colorado. Association for Computational Linguistics. Chih-Yao Ma, Jiasen Lu, Zuxuan Wu, Ghassan AlRegib, Zsolt Kira, Richard Socher, and Caiming Xiong. 2019. Self-Monitoring Navigation Agent via Auxiliary Progress Estimation. ArXiv, pages 1 -- 18. Junhua Mao, Jonathan Huang, Alexander Toshev, Oana Cam- buru, Alan L. Yuille, and Kevin Murphy. 2015. Genera- Sina Zarriess, Julian Hough, Casey Kennington, Ramesh Manuvinakurike, David DeVault, Raquel Fernandez, and David Schlangen. 2016. Pentoref: A corpus of spoken ref- erences in task-oriented dialogues. In 10th edition of the Language Resources and Evaluation Conference. Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. 2017. Scene parsing through ade20k dataset. In Proceedings of the IEEE Con- ference on Computer Vision and Pattern Recognition. tion and comprehension of unambiguous object descrip- tions. CoRR, abs/1511.02283. Seymour Rosenberg and Bertram D. Cohen. 1964. Speakers' and Listeners' Processes in a Word-Communication Task. Science, 145(3637):1201 -- 1204. Manolis Savva, Angel X. Chang, Alexey Dosovitskiy, Thomas Funkhouser, and Vladlen Koltun. 2017. MINOS: Multimodal indoor simulator for navigation in complex environments. arXiv:1712.03931. Manolis Savva, Abhishek Kadian, Oleksandr Maksymets, Yili Zhao, Erik Wijmans, Bhavana Jain, Julian Straub, Jia Liu, Vladlen Koltun, Jitendra Malik, Devi Parikh, and Dhruv Batra. 2019. Habitat: A Platform for Embodied AI Research. ArXiv. David Schlangen. 2016. Grounding, Justification, Adapta- tion: Towards Machines That Mean What They Say. In Proceedings of the 20th Workshop on the Semantics and Pragmatics of Dialogue (JerSem). David Schlangen, Tim Diekmann, Nikolai Ilinykh, and Sina Zarriess. 2018. slurk -- A Lightweight Interaction Server For Dialogue Experiments and Data Collection. In Short Paper Proceedings of the 22nd Workshop on the Semantics and Pragmatics of Dialogue (AixDial / semdial 2018). David Schlangen, Sina Zarriess, and Casey Kennington. 2016. Resolving references to objects in photographs using the words-as-classifiers model. In Proceedings of the 54rd Annual Meeting of the Association for Computa- tional Linguistics (ACL 2016). Carina Silberer and Mirella Lapata. 2014. Learning grounded meaning representations with autoencoders. In Pro- ceedings of the 52nd Annual Meeting of the Associa- tion for Computational Linguistics (Volume 1: Long Pa- pers), pages 721 -- 732, Baltimore, Maryland. Association for Computational Linguistics. Amanda J Stent. 2011. Computational approaches to the pro- duction of referring expressions: Dialog changes (almost) everything. In PRE-CogSci Workshop. Richard S. Sutton and Andrew G. Barto. 1998. Reinforce- ment Learning. MIT Press, Cambridge, USA. Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. 2015. Going deeper with convolutions. In CVPR 2015, Boston, MA, USA. Takenobu Tokunaga, Ryu Iida, Asuka Terai, and Naoko Kuriyama. 2012. The rex corpora: A collection of mul- timodal corpora of referring expressions in collabora- tive problem solving dialogues. In Proceedings of the Eighth International Conference on Language Resources and Evaluation (LREC 2012). Jack Urbanek, Angela Fan, Siddharth Karamcheti, Saachi Jain, Samuel Humeau, Emily Dinan, Tim Rocktaschel, Douwe Kiela, Arthur Szlam, and Jason Weston. 2019. Learning to Speak and Act in a Fantasy Text Adventure Game. ArXiv. Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. 2015. Show and tell: A neural image caption gen- erator. In Computer Vision and Pattern Recognition. Jason Williams and Steve Young. 2007. Partially observ- able Markov decision processes for spoken dialog sys- tems. Computer Speech and Language, 21(2):231 -- 422. Licheng Yu, Patrick Poirson, Shan Yang, Alexander C. Berg, and Tamara L. Berg. 2016. Modeling Context in Referring Expressions, pages 69 -- 85. Springer International Publish- ing, Cham.
1701.00066
1
1701
2016-12-31T07:09:52
A POS Tagger for Code Mixed Indian Social Media Text - ICON-2016 NLP Tools Contest Entry from Surukam
[ "cs.CL" ]
Building Part-of-Speech (POS) taggers for code-mixed Indian languages is a particularly challenging problem in computational linguistics due to a dearth of accurately annotated training corpora. ICON, as part of its NLP tools contest has organized this challenge as a shared task for the second consecutive year to improve the state-of-the-art. This paper describes the POS tagger built at Surukam to predict the coarse-grained and fine-grained POS tags for three language pairs - Bengali-English, Telugu-English and Hindi-English, with the text spanning three popular social media platforms - Facebook, WhatsApp and Twitter. We employed Conditional Random Fields as the sequence tagging algorithm and used a library called sklearn-crfsuite - a thin wrapper around CRFsuite for training our model. Among the features we used include - character n-grams, language information and patterns for emoji, number, punctuation and web-address. Our submissions in the constrained environment,i.e., without making any use of monolingual POS taggers or the like, obtained an overall average F1-score of 76.45%, which is comparable to the 2015 winning score of 76.79%.
cs.CL
cs
A POS Tagger for Code Mixed Indian Social Media Text - ICON-2016 NLP Tools Contest Entry from Surukam Sree Harsha Ramesh and Raveena R Kumar Surukam Analytics, Chennai {harsha,raveena}@surukam.com 6 1 0 2 c e D 1 3 ] L C . s c [ 1 v 6 6 0 0 0 . 1 0 7 1 : v i X r a Abstract Building Part-of-Speech (POS) taggers for code-mixed Indian languages is a partic- ularly challenging problem in computa- tional linguistics due to a dearth of accu- rately annotated training corpora. ICON, as part of its NLP tools contest has or- ganized this challenge as a shared task for the second consecutive year to im- prove the state-of-the-art. This paper describes the POS tagger built at Su- rukam to predict the coarse-grained and fine-grained POS tags for three language pairs - Bengali-English, Telugu-English and Hindi-English, with the text spanning three popular social media platforms - Facebook, WhatsApp and Twitter. We employed Conditional Random Fields as the sequence tagging algorithm and used a library called sklearn-crfsuite - a thin wrapper around CRFsuite for training our model. Among the features we used in- clude - character n-grams, language in- formation and patterns for emoji, number, punctuation and web-address. Our sub- missions in the constrained environment, i.e., without making any use of mono- lingual POS taggers or the like, obtained an overall average F1-score of 76.45%, which is comparable to the 2015 winning score of 76.79%. 1 Introduction The burgeoning popularity of social media in In- dia has produced enormous amounts of user gen- erated text content. India's rich linguistic diver- sity coupled with its affinity towards English - India has the largest number of speakers of En- glish as a Second Language (ESL) in the world - has led to the online conversations being rife with Code Switching (CS) and Code Mix- ing (CM). Code Switching is the practice of al- ternating between two or more languages or vari- eties of a language in the course of a single utter- ance (Gumperz, 1982). In Code Switching, unlike Code Mixing where one or more linguistic units of a language such as phrases, words and mor- phemes are embedded into an utterance of another language (Myers-Scotton, 1997), there is a distinct boundary separating the chunks corresponding to each language used in the discourse. So, a combi- nation of language identification and monolingual language taggers could be used for Code Switched utterances. Solorio and Liu (2008) used a Span- ish POS tagger and Vyas et al. (2014) used a Hindi POS tagger in conjunction with English monolin- gual taggers to handle Spanish-English and Hindi- English code-switched discourses respectively. tagging, and Part-of-speech (POS) the process of assigning each word its proper part of is one of the most fundamental parts speech, of any natural language processing pipeline and it is also an integral part of any syntactic analysis. There are highly accurate monolin- resource-rich gual POS taggers available for languages like English and French, the state- of-the-art being 97.6% (Choi, 2016) and 97.8% (Denis and Sagot, 2009), in large part due to extensively annotated million word corpora such as PennTreeBank (Santorini, 1990) and French TreeBank respectively. Annotated data for code-mixed data is extremely scarce and the efforts to build a POS tagger for it have mostly advanced through the shared tasks organized at FIRE (Choudhury et al., 2014), EMNLP(Barman et al., 2014; ICON(Soman, 2015; Solorio et al., 2014) Pimpale and Patel, 2016) in the past 2 years. In this paper, we describe our POS tagger for three widely spoken Indian languages (Hindi, Bengali, and Telugu), mixed with English, which was sub- (Abeill´e et al., 2003) Language (English+) Telugu Hindi Bengali CMI all 31.94 11.78 23.76 mixed 39.10 20.06 24.77 Num utt. 989 882 762 Mixed (%) 81.70 58.73 95.93 Language (English+) Telugu Hindi Bengali CMI all 36.55 5.88 0.31 mixed 36.88 27.60 30.05 Num utt. 690 981 1052 Mixed (%) 99.13 21.30 1.05 Table 1: Code-Mixing-Index: Facebook Corpus Table 3: Code-Mixing Index: WhatsApp Corpus Language (English+) Telugu Hindi Bengali CMI all 34.94 25.66 29.45 mixed 35.37 28.13 29.50 Num utt. 991 1206 585 Mixed (%) 98.79 91.21 99.83 Language (English+) Telugu Hindi Bengali CMI all 11.62 18.76 3.71 mixed 32.60 23.37 24.72 Num utt. 617 728 3718 Mixed (%) 35.66 80.22 15.01 Table 2: Code-Mixing Index: Twitter Corpus Table 4: Code-Mixing Index: ICON 2015 mitted to the shared task organized at ICON 2016. The POS tagger was trained using Conditional Random Fields (Lafferty et al., 2001), which is known to perform particularly well for this task (Toutanova et al., 2003) among many other applications in biomedical named entity recog- nition (Settles, 2004) and information extraction (Ramesh et al., 2016). 2 Dataset The contest task was to predict the POS tags at the word level for code-mixed utterances, col- lected from WhatsApp, Facebook and Twitter ac- cross three language pairs, English-Hindi (En-Hi), English-Bengali (En-Bn) and English-Telugu (En- Te). The words were also annotated with certain lan- guage tags - en for English, hi/bn/te for Hindi, Bengali and Telugu respectively, univ for punctua- tions, emoticons, symbols, @ mentions, hashtags, mixed for intra-word language mixing for e.g., ju- gaading 1, acro for acronyms like lol, rofl, ne for named entities, and undef for undefined. Our submission included models to predict the coarse-grained (Petrov et al., 2011) and fine- grained POS tags (Jamatia et al., 2015) and was trained in a constrained environment, thus pre- cluding any use of external POS taggers. 2.1 Code-Mixing Index In order gers necessary to have a measure of to compare code-mixed POS tag- is the code- data-sets, it trained on different 1The Hindi noun jugaad which means frugal innovation is transformed into an English verb by adding the suffix ing. mixing complexity. Code-Mixing Index(CMI) (Gamback and Das, 2014) is one such metric that describes the complexity of code-switched cor- pora and it amounts to finding the most frequent language in the utterance and then counting the frequency of the words belonging to all other languages present. Thus utterances that have only a single language, have a CMI of 0. Tables 1, 2, 3, and 4, show the following CMI metrics that were calculated for Facebook, Twitter, WhatsApp data of 2016 and the training data of ICON 2015 respectively. 1. CMI all: average CMI for all sentences in a corpus 2. CMI mixed: average CMI for the sentences with non-zero CMI. 3. Mixed %: percentage of code-mixed sen- tences in the corpus 4. Num utt.: total number of utterances in the corpus. We observed that the WhatsApp corpus for Ben- gali has a very low fraction of code-mixed sen- tences i.e., there are an extremely low number of words tagged as en in the data-set. On closer in- spection of the dataset, there were exactly 13 in- stances of words that were tagged en and these were actually words such as Kolkata and San An- tonio, that should have been annotated as ne in- stead. Effectively, CMI for WhatsApp-Bengali corpus is 0. 3 Model and Results POS tagging is considered to be a sequence la- belling task, where each token of the sentence needs to be assigned a label. These labels are usu- ally interdependent, because the sentence follows grammar rules inherent to the language. We have used the CRF implementation of is particularly well sklearn-crfuite2 because it suited for sequence labelling tasks. 3.1 Features The feature-set consisted of character-case infor- mation, character n-grams of gram size upto 3, which would thereby also encompass all prefixes and suffixes, patterns for email and web-site urls, punctuations, emoticons, numbers, social media specific characters like @,# and also the language tag information. We chose a CRF window size of two and per- formed grid-search to choose the best optimization algorithm and L1/L2 regularization parameters3. There were a total of 18 models trained using this pipeline, one for each case in the cross-product: {bn-en, hi-en, te-en} X {WhatsApp, Twitter, Facebook} X {Fine-Grained, Coarse-Grained} 3.2 Results The F1 measure of our model against the social networks is depicted in Table 5 and the results with respect to the POS granularity is shown in Table 6. These results were calculated on the private test data-set shared by the organizers. With the system described in the paper, we achieved an overall av- erage score of 76.45%, across all 18 models. This is only marginally lesser than 76.79%, which was the the score of winning entry of ICON 2015, and we are awaiting the results of ICON 2016. 4 Conclusion & Future Work In this paper, we presented a CRF based POS tagger for code-mixed social media text in the constrained environment, without making use of any external corpora or monolingual POS tag- gers. We achieved an overall F1- Score of 76.45%. 2http://sklearn-crfsuite.readthedocs.io/en/latest 3Our available code scientifique/code-mixing-social-media is at https://github.com/le- Language (English +) Telugu Hindi Bengali WhatsApp Twitter Facebook 74.43 75.68 76.71 79.15 86.80 69.64 74.10 77.44 74.1 Table 5: Model Performance (F1-Score) w.r.t So- cial Networks Language (English +) Telugu Hindi Bengali Fine- Grained 73.50 83.40 73.28 Coarse- Grained 78.30 76.60 76.39 Table 6: Model Performance (F1-Score) w.r.t POS Granularity We would like to evaluate the performance im- provement or lack thereof upon training a POS tagger in an unconstrained environment by uti- lizing monolingual taggers trained on Indic lan- guages. Multilingual tools are still a ways off from matching the state-of-the-art of the tools avail- able for monolingual linguistic analysis. There is promising research in the field of developing tools for resource poor languages by applying Trans- fer Learning (Zoph et al., 2016), which could also be evaluated in the future. Upon inspecting the dataset, we observed a few inaccuracies in anno- tation, which could be addressed by leveraging crowd-sourcing platforms that can execute Human Intelligence Tasks. References Anne Abeill´e, Lionel Cl´ement, and Franc¸ois Toussenel. Building a treebank for French. Treebanks. Springer Netherlands, 2003. 165-187. Anupam Jamatia and Amitava Das TASK REPORT: TOOL CONTEST ON POS TAGGING FOR CODE- MIXED INDIAN SOCIAL MEDIA (FACEBOOK, TWITTER, AND WHATSAPP) TEXT @ ICON 2016 In: Proceedings of ICON 2016. 2016 Anupam Jamatia, Bjorn Gamback, and Amitava Das. Part-of-Speech Tagging for CodeMixed English- Hindi Twitter and Facebook Chat Messages In: Pro- ceedings of Recent Advances in Natural Language Processing. 2015, pp. 239248 Arnav Sharma and Raveesh Motlani POS Tagging For Code-Mixed Indian Social Media Text : Systems from IIIT-H for ICON NLP Tools Contest 12th Inter- Monojit Choudhury, Gokul Chittaranjan, Parth Gupta, and Amitava Das Overview of FIRE 2014 Track on Transliterated Search. FIRE (2014). Slav Petrov, Dipanjan Das, and Ryan McDonald. A In: The Interna- Universal Part-of-Speech Tagset. tional Conference on Language Resources and Eval- uation. 2011 Sree Harsha Ramesh, Arnab Dhar, Raveena R. Kumar, V. Anjaly, K. S. Sarath, Jason Pearce, and Krishna R. Sundaresan. Automatically identify and label sec- tions in scientific journals using conditional random fields. In Semantic Web Evaluation Challenge, pp. 269-280. Springer International Publishing, 2016. Thamar Solorio, Elizabeth Blair, Suraj Mahar- jan, Steven Bethard, Mona Diab, Mahmoud Ghoneim, Abdelati Hawwari, Fahad AlGhamdi, Ju- lia Hirschberg, Alison Chang and Pascale Fung. Overview for the First Shared Task on Language Identification in Code-Switched Data. Proceedings of EMNLP'14 Workshop on Code Switching, 2014. Thamar Solorio and Yang Liu. In Proceedings of the Conference on Empirical Methods in Natural Lan- guage Processing, pp. 1051-1060. Association for Computational Linguistics, 2008. Utsab Barman, Amitava Das, Joachim Wagner, and Jennifer Foster. Code mixing: A challenge for lan- guage identification in the language of social media. The 1st Workshop on Computational Approaches to Code Switching, EMNLP 2014 , pages 1323, Octo- ber, 2014, Doha, Qatar. Yogarshi Vyas, Spandana Gella, Jatin Sharma, Ka- lika Bali, and Monojit Choudhury. POS Tagging of English-Hindi Code-Mixed Social Media Content. In EMNLP, vol. 14, pp. 974-979. 2014. national Conference on Natural Language Process- ing Barret Zoph, Deniz Yuret, Jonathan May, and Kevin Knight. Transfer Learning for Low-Resource Neu- In: Proceedings of the ral Machine Translation. 2016 Conference on Empirical Methods in Natu- ral Language Processing, pages 15681575, arXiv preprint arXiv:1604.02201 (2016). Beatrice Santorini Part-of-speech tagging guidelines for the Penn Treebank Project (3rd revision). 1990 Bjorn Gamback, and Amitava Das. On Measuring the Complexity of Code-Mixing. In Proceedings of the 11th International Conference on Natural Language Processing, Goa, India, pp. 1-7. 2014. Burr Settles Biomedical named entity recognition us- ing conditional random fields and rich feature sets. In Proceedings of the International Joint Workshop on Natural Language Processing in Biomedicine and its Applications, pp. 104-107. Association for Com- putational Linguistics, 2004. Carol Myers-Scotton Duelling languages: Grammat- ical structure in codeswitching. Oxford University Press, 1997. Jinho D. Choi Dynamic feature induction: The last gist to the state-of-the-art. Proceedings of NAACL- HLT. 2016. John J. Gumperz Discourse strategies. Vol. 1. Cam- bridge University Press, 1982. John Lafferty, Andrew McCallum, and Fernando Pereira Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proceedings of the eighteenth international con- ference on machine learning, ICML, vol. 1, pp. 282- 289. 2001. K. P. Soman AMRITA CEN @ ICON-2015: Part-of- Speech Tagging on Indian Language Mixed Scripts in Social Media. 12th International Conference on Natural Language Processing Kristina Toutanova, Dan Klein, Christopher D. Man- ning, and Yoram Singer Feature-rich part-of-speech In tagging with a cyclic dependency network. Proceedings of the 2003 Conference of the North American Chapter of the Association for Computa- tional Linguistics on Human Language Technology- Volume 1, pp. 173-180. Association for Computa- tional Linguistics, 2003. Pascal Denis, and Benot Sagot. Coupling an Anno- tated Corpus and a Morphosyntactic Lexicon for State-of-the-Art POS Tagging with Less Human Ef- fort. PACLIC. 2009. Prakash B. Pimpale, and Raj Nath Patel. Experiments with POS Tagging Code-mixed Indian Social Media Text. 12th International Conference on Natural Lan- guage Processing arXiv preprint arXiv:1610.09799 (2016).
1702.02640
1
1702
2017-02-08T22:24:14
Character-level Deep Conflation for Business Data Analytics
[ "cs.CL", "cs.LG" ]
Connecting different text attributes associated with the same entity (conflation) is important in business data analytics since it could help merge two different tables in a database to provide a more comprehensive profile of an entity. However, the conflation task is challenging because two text strings that describe the same entity could be quite different from each other for reasons such as misspelling. It is therefore critical to develop a conflation model that is able to truly understand the semantic meaning of the strings and match them at the semantic level. To this end, we develop a character-level deep conflation model that encodes the input text strings from character level into finite dimension feature vectors, which are then used to compute the cosine similarity between the text strings. The model is trained in an end-to-end manner using back propagation and stochastic gradient descent to maximize the likelihood of the correct association. Specifically, we propose two variants of the deep conflation model, based on long-short-term memory (LSTM) recurrent neural network (RNN) and convolutional neural network (CNN), respectively. Both models perform well on a real-world business analytics dataset and significantly outperform the baseline bag-of-character (BoC) model.
cs.CL
cs
CHARACTER-LEVEL DEEP CONFLATION FOR BUSINESS DATA ANALYTICS Zhe Gan†, P. D. Singh∗, Ameet Joshi(cid:63), Xiaodong He∗, Jianshu Chen∗, Jianfeng Gao∗, and Li Deng∗ †Department of Electrical and Computer Engineering, Duke University, Durham, NC ∗Microsoft Research, Redmond, WA (cid:63)Microsoft Corporation, Redmond, WA ABSTRACT Table 1: Example text string pairs in the dataset. Connecting different text attributes associated with the same en- tity (conflation) is important in business data analytics since it could help merge two different tables in a database to provide a more com- prehensive profile of an entity. However, the conflation task is chal- lenging because two text strings that describe the same entity could be quite different from each other for reasons such as misspelling. It is therefore critical to develop a conflation model that is able to truly understand the semantic meaning of the strings and match them at the semantic level. To this end, we develop a character-level deep conflation model that encodes the input text strings from character level into finite dimension feature vectors, which are then used to compute the cosine similarity between the text strings. The model is trained in an end-to-end manner using back propagation and stochas- tic gradient descent to maximize the likelihood of the correct asso- ciation. Specifically, we propose two variants of the deep conflation model, based on long-short-term memory (LSTM) recurrent neural network (RNN) and convolutional neural network (CNN), respec- tively. Both models perform well on a real-world business analytics dataset and significantly outperform the baseline bag-of-character (BoC) model. Index Terms- Deep conflation, character-level model, convo- lutional neural network, long-short-term memory 1. INTRODUCTION In business data analytics, different fields and attributes related to the same entities (e.g., same person) are stored in different tables in a database or across different databases. It is important to connect these attributes so that we can get a more comprehensive and richer profile of the entity. This is important because exploiting a more comprehensive profile could lead to better prediction in business data analytics. Specifically, the conflation of data aims to connect two rows from the same or different datasets that contain one or more com- mon fields, when the values of the common fields match within a predefined threshold. For example, in the business data considered in this paper, we aim to detect whether two names refer to the same person or not - see the example in Table 1. Row A and row B rep- resent two name fields from different tables in a database, which is a text string consisting of characters. The strings in the same column of Table 1 represent the names of a same person. There are sev- eral reasons for the strings in A and B being different: (i) possible mis-spelling typos; (ii) the lack of suffix; (iii) the reverse of family names and given names. Due to these variations and imperfection in Emails: [email protected], {prabhs, ameetj, xiaohe, jianshuc, jfgao, deng}@microsoft.com A emilio yentsch B ydntsch emilip Mr. halner exrique enrique hafner javier creswell Prof. crrxwell javzfr data entries, plain keyword matching does not work well [1, 2], and we need a data conflation model in the semantic level; that is, the model should be able to identify two different character strings to be associated with a same entity. To address the aforementioned challenges, we propose character- level deep conflation models that take the raw text strings as the input and predict whether two data entries refer to the same entity. The proposed model consists of two parts: (i) a deep feature extractor, and (ii) a ranker. The feature extractor takes the raw text string at the character level and produce a finite dimension representation of the text. In particular, we constructed two different deep archi- tectures of feature extractors: (i) long-short-term-memory (LSTM) recurrent neural network (RNN) [3, 4] and (ii) deep convolutional neural network (CNN) [5, 6]. Both deep architectures are able to retain the order information in the input text and extract high-level features from raw data, as shown their great success in different machine learning tasks, including text classification [5, 7], machine translation [8, 9, 10, 11] and information retrieval [12, 13, 14]. Fur- thermore, extracting the features from the character-level is critical in many of the recent success in applying deep learning to natural language processing [15, 16, 17, 18, 19]. As we will show later, our proposed deep conflation model achieves high prediction accu- racy in the conflation task for business data, and greatly outperform strong baselines. 2. CHARACTER-LEVEL DEEP CONFLATION MODELS We formulate the deep conflation problem as a ranking problem. That is, given a query string from field A, we rank all the target strings in field B, with the hope that the most similar string in B is ranked on the top of the list. The proposed deep conflation model consists of two parts: (i) a deep feature extractor; (ii) a ranker. Fig. 1 shows the architecture of the deep conflation model. The deep fea- ture extractors transform the input text strings from character-level into finite dimension feature vectors. Then, the cosine similarity is computed between the query string from field A and all the target strings from field B. The cosine similarity value for each pair of text strings measures the semantic relevance between each pair of the text strings, according to which the target strings are ranked. The entire model will be trained in an end-to-end manner so that the deep feature extractors are encouraged to learn the proper feature vectors Fig. 1: Character-level deep conflation model. Fig. 3: CNN based deep feature extractor. ot. The hidden units ht are updated as follows: Fig. 2: LSTM based deep feature extractor. that are measurable by cosine similarity. In the rest of this section, we will explain these two components of the deep conflation model with detail. 2.1. Deep Feature Extractors The inputs into the system are text strings, which are sequences of characters. Note that the order of the input characters and words is critical to understand the text correctly. For this reason, we propose to use two deep learning models that are able to retain the order in- formation to extract features from the raw input character sequences. The two deep models we use are: (i) Recurrent Neural Networks (RNNs); (ii) Convolutional Neural Networks (CNNs). RNN is a nonlinear dynamic system that can be used for se- quence modeling. However, during the training of a regular RNN, the components of the gradient vector can grow or decay exponen- tially over long sequences. This problem with exploding or vanish- ing gradients makes it difficult for the regular RNN model to learn long-range dependencies in a sequence [20]. A useful architecture of RNN that overcomes this problem is the Long Short-Term Mem- ory (LSTM) structure. On the other hand, CNN is a deep feedfor- ward neural network that first uses convolutional and max-pooling layers to capture the local and global contextual information of the input sequence, and then uses a fully-connected layer to produce a fixed-length encoding of the sequence. In sequel, we first introduce LSTM, and then CNN. 2.1.1. LSTM feature extractor The LSTM architecture [3] addresses the problem of learning long- term dependencies by introducing a memory cell, that is able to pre- serve the state over long periods of time. Specifically, each LSTM unit has a cell containing a state ct at time t. This cell can be viewed as a memory unit. Reading or writing the memory unit is controlled through sigmoid gates: input gate it, forget gate f t, and output gate it = σ(Wixt + Uiht−1 + bi) , f t = σ(Wf xt + Uf ht−1 + bf ) , ot = σ(Woxt + Uoht−1 + bo) , ct = tanh(Wcxt + Ucht−1 + bc) , ct = f t (cid:12) ct−1 + it (cid:12) ct , ht = ot (cid:12) tanh(ct) , (1) (2) (3) (4) (5) (6) where σ(·) denotes the logistic sigmoid function, and (cid:12) represents the element-wise multiply operator. Wi Wf , Wo, Wc, Ui, Uf , Uo, Uc, bi, bf , bo and bc are the free model parameters to be learned from training data. Given the text string q = [q1, . . . , qT ], where qt is the one-hot vector representation of character at position t and T is the number of characters, we first embed the characters into a vector space via a linear transform xt = Weqt, where We is the embedding matrix. Then for every time step, we feed the embedding vector of characters in the text string to LSTM: xt = Weqt, t ∈ {1, . . . , T} , ht = LSTM(xt), t ∈ {1, . . . , T} , (7) (8) where the operator LSTM(·) denotes the operations defined in (1)- (6). For example, in Fig. 2, the string emilio yentsch is fed into the LSTM. The final hidden vector is taken as the feature vector for the string, i.e., y = hT . We repeat this process for the query text and all the target texts so that we will have yQ and yDj (j = 1, . . . J + 1), which will be fed into the ranker to compute cosine similarity (see Sec. 2.2). In the experiments, we use a bidirectional LSTM to extract se- quence features, which consists of two LSTMs that are run in par- allel: one on the input sequence and the other on the reverse of the input sequence. At each time step, the hidden state of the bidirec- tional LSTM is the concatenation of the forward and backward hid- den states. 2.1.2. CNN feature extractor Next, we consider the CNN for string feature extraction. Similar to the LSTM-based model, we first embed characters to vectors xt = Weqt and then concatenating these vectors: x1:T = [x1, . . . , xT ] . (9) Deep Feature Extractor Deep Feature Extractor Deep Feature Extractor …… Query string Target string 1 Target string J+1 Strings Deep features …… Cosine similarity LSTMLSTMLSTMWe…WeWe…em…hString:bigramtrigram4-gramembeddingconvolutionmax poolingover timeem il io … h String: Then we apply convolution operation on the character embedding vectors. We use three different convolution filters, which have the size of two (bigram), three (trigram) and four (4-gram), respectively. These different convolution filters capture the context information of different lengths. The t-th convolution output using window size c is given by cosine similarity between query Q and each j-th target string Dj. More formally, it is defined as R(Q, Dj) = y(cid:62) QyDj yQ · yDj , (13) hc,t = tanh(Wcxt:t+c−1 + bc) , (10) where Dj denotes the j-th target string. At test time, given a query, the candidates are ranked by this relevance scores. where the notation xt:t+c−1 denotes the vector that is constructed by concatenating xt to xt+c−1. That is, the filter is applied only to window t : t + c − 1 of size c. Wc is the convolution weight and bc is the bias. The feature map of the filter with convolution size c is defined as hc = [hc,1, hc,2, . . . , hc,T−c+1] . (11) 2.3. Training of the deep conflation model We now explain how the deep conflation model could be trained in an end-to-end manner. Given that we have the relevance scores between the query string and each of the target string Dj: R(Q, Dj), we define the posterior probability of the correct candidate given the query by the following softmax function We apply max-pooling over the feature maps of the convolution size c and denote it as P (D+Q) = hc = max{hc,1, hc,2, . . . , hc,T−c+1} , (12) where the max is a coordinate-wise max operation. For convolu- tion feature maps of different sizes c = 2, 3, 4, we concatenate them to form the feature representation vector of the whole character se- quence: h = [h2, h3, h4] . Observe that the convolution opera- tions explicitly capture the local (short-term) context information in the character strings, while the max-pooling operation aggregates the information from different local filters into a global representa- tion of the input sequence. These local and global operations enable the model to encode different levels of dependency in the input se- quence. The above vector h is the final feature vector extracted by CNN and will be fed into the ranker, i.e., y = h. We repeat this process for the query text and all the target texts so that we will have yQ and (j = 1, . . . J + 1). The above feature extraction process using yDj CNN is illustrated in Fig. 3. There exist other CNN architectures in the literature [6, 21, 22]. We adopt the CNN model in [5, 23] due to its simplicity and excel- lent performance on classification. Empirically, we found that it can extract high-quality text string representations for ranking. 2.1.3. Comparison between the two deep feature extractors Compared with the LSTM feature extractor, a CNN feature extrac- tor may have the following advantages [24]. First, the sparse con- nectivity of a CNN, which indicates fewer parameters are required, typically improves its statistical efficiency as well as reduces mem- ory requirements. Second, a CNN is able to encode regional (n- gram) information containing rich linguistic patterns. Furthermore, an LSTM encoder might be disproportionately influenced by char- acters appearing later in the sequence, while the CNN gives largely uniform importance to the signal coming from each of the charac- ters in the sequence. This makes the LSTM excellent at language modeling, but potentially suboptimal at encoding n-gram informa- tion placed further back into the sequence. 2.2. Ranker Now that we have extracted deep feature vectors yQ, yD1,..., yDJ+1 from the query and candidate strings, we can proceed to compute their semantic relevance scores by computing their corresponding (cid:80) exp(γR(Q, D+)) D(cid:48)∈D exp(γR(Q, D(cid:48))) , (14) (cid:89) where D+ denotes the correct target string (the positive sign denotes that it is a positive sample), γ is a tuning hyper-parameter in the soft- max function (to be tuned empirically on a validation set). D denotes the set of candidate strings to be ranked, which includes the positive sample D+ and J randomly selected incorrect (negative) candidates {D j ; j = 1, . . . , J}. The model parameters are learned to maxi- − mize the likelihood of the correct candidates given the queries across the training set. That is, we minimize the following loss function L(θ) = − log P (D+Q) , (15) (Q,D+) where the product is over all training samples, and θ denotes the parameters (to be learned), including all the model parameters in the deep feature extractors. The above cost function is minimized by back propagation and (mini-batch) stochastic gradient descent. 3. EXPERIMENTAL RESULTS 3.1. Dataset We evaluate the performance of our proposed deep conflation model on a corporate proprietary business dataset. Since each string can be considered as a sequence of characters, the vocabulary size is 32 (in- cluding one period symbol and one space symbol), which includes the following elements: DMPSabcdefghijklmnopqrstuvwxyz. Specifically, the dataset contains 10, 000 pairs of query and the asso- ciated correct target string (manually annotated). The average length of the string is 14.47 with standard deviation 2.89. The maximum length of the strings is 26 and the minimum length is 6. 3.2. Setup We provide the deep conflation results using LSTM and CNN for feature extraction, respectively. Furthermore, we also implement a baseline using Bag-of-Characters (BoC) representation of input text string. This BoC vector is then sent into a two-hidden-layer (fully- connected) feed-forward neural networks. In our experiment, we implement 10-fold cross validation, and in each fold, we randomly select 80% of the samples as training, 10% as validation, and the Table 2: 10-fold cross validation results using BoC, LSTM and CNN model, respectively. R@K denotes Recall@K (higher is better). Med r, Mean r and Harmonic Mean r is the median rank, mean rank and harmonic mean rank, respectively (lower is better). R@1 R@3 Model R@10 Using correct names to query mis-spelled names 82.09± 1.59 BoC LSTM 86.66± 0.90 98.90± 0.18 CNN Using mis-spelled names to query correct names 83.56± 1.42 BoC LSTM 87.63± 0.92 99.25± 0.43 CNN 92.30± 0.76 95.38± 0.53 99.97± 0.05 93.06± 0.80 95.50± 0.45 99.98± 0.06 96.83± 0.36 98.54± 0.20 100.00± 0.00 Med r Mean r Harmonic Mean r 1.0± 0.0 1.0± 0.0 1.0± 0.0 2.380± 0.218 1.609± 0.092 1.012± 0.003 1.0± 0.0 1.0± 0.0 1.0± 0.0 2.158± 0.128 1.584± 0.055 1.008± 0.005 1.138± 0.009 1.095± 0.007 1.006± 0.001 1.131± 0.011 1.088± 0.007 1.004± 0.002 97.35± 0.27 98.67± 0.21 100.00± 0.00 Table 3: Average scores for each of the top four retrieved items. Table 4: An example of the mistakenly retrieved cases. top 1 top 2 top 3 top 4 0.792± 0.086 0.448± 0.072 0.397±0.050 0.371±0.042 rest 10% as testing dataset. No specific hyper-parameter tuning is implemented, other than early stopping on the validation set. For the feed-forward neural network encoder based on the BoC representation, we use two hidden layers, each layer contains 300 hidden units, hence each string is embedded as a 300-dimensional vector. For LSTM and CNN encoder, we first embed each character into a 128-dimensional vector. Based on this, for the bidirectional LSTM encoder, we further use one hidden layer of 128 units for sequence embedding, hence each text string is represented as a 256- dimensional vector. For the CNN encoder, we employ filter windows of sizes {2,3,4} with 100 feature maps each, hence each text string is represented as a 300-dimensional vector. For training, all weights in the CNN and non-recurrent weights in the LSTM are initialized from a uniform distribution in [- 0.01,0.01]. Orthogonal initialization is employed on the recurrent matrices in the LSTM [25]. All bias terms are initialized to zero. It is observed that setting a high initial forget gate bias for LSTMs can give slightly better results [26]. Hence, the initial forget gate bias is set to 3 throughout the experiments. Gradients are clipped if the norm of the parameter vector exceeds 5 [10]. The Adam algo- rithm [27] with learning rate 2 × 10−4 is utilized for optimization. For both the LSTM and CNN models, we use mini-batches of size 100. The hyper-parameter γ is set to 10. The number of negative candidates J is set to 50, which are randomly sampled from the rest of the candidate strings excluding the correct one. All experiments are implemented in Theano [28] on a NVIDIA Tesla K40 GPU. For reference, the training of a CNN model takes around 45 minutes to go through the dataset 20 times. 3.3. Results Performance is evaluated using Recall@K, which measures the av- erage times a correct item is found within the top-K retrieved re- sults. Results are summarized in Table 2. As can be seen, both of the proposed deep conflation models with LSTM and CNN fea- ture extractors achieve superior performance compared to the BoC baseline. This is not surprising, since sequential order information is utilized in LSTM and CNN. Furthermore, we observe that CNN significantly outperforms LSTM on this task. We hypothesize that palmer mehaffey query string ground truth Mr mehaffep paleer 1st result 2nd result 3rd result 4th result paleer mehaffep Mr mehaffep paleer fendlasyn pdlmer zalwzar sharley score 0.882 0.877 0.427 0.420 this observation is due to the fact that the local (regional) sequen- tial order information (captured by CNN) is more important than the gloabl sequential order information (captured by LSTM) in match- ing two names. For example, if we reverse the family name and given name of a given query name, LSTM might be more prone to mistakenly classifying these two names to be different, while in fact they refer to the same person. For further analysis, we checked the CNN results on one prede- fined train/validation/test splits of the dataset. When CNN is used, for Recall@1, out of 1,000 test samples, only 5 samples are mis- takenly retrieved. In Table 4, we show an example of the mistaken case. We can see that the mistakenly retrieved case is quite reason- able. Even humans will make mistakes on these cases. Other four mistakenly retrieved cases are similar and are omitted due to space limit. The average scores for each of the top four retrieved items are given in Table 3. This suggests that, when judging whether two text strings have the same meaning, we can empirically set the thresh- old to be (0.792 + 0.448)/2 = 0.62. That is, when the similarity score between two strings is higher than 0.62, we can safely con- clude that they refer to the same entity, and we can then conflate the corresponding two rows accordingly. 4. CONCLUSION We have proposed a deep conflation model for matching two text fields in business data analytics, with two different variants of fea- ture extractors, namely, long-short-term memory (LSTM) and con- volutional neural networks (CNN). The model encodes the input text from raw character-level into finite dimensional feature vectors, which are used for computing the corresponding relevance scores. The model is learned in an end-to-end manner by back propagation and stochastic gradient descent. Since both LSTM and CNN feature extractors retain the order information in the text, the deep confla- tion model achieve superior performance compared to the bag-of- character (BoC) baseline. [19] Junyoung Chung, Kyunghyun Cho, and Yoshua Bengio, "A character-level decoder without explicit segmentation for neu- ral machine translation," arXiv:1603.06147, 2016. [20] Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio, "On the difficulty of training recurrent neural networks.," in ICML, 2013. [21] B. Hu, Z. Lu, H. Li, and Q. Chen, "Convolutional neural net- work architectures for matching natural language sentences," in NIPS, 2014. [22] R. Johnson and T. Zhang, "Effective use of word order for text categorization with convolutional neural networks," in NAACL HLT, 2015. [23] R. Collobert, J. Weston, K. Kavukcuoglu, and P. Kuksa, cessing (almost) from scratch," in JMLR, 2011. L. Bottou, M. Karlen, "Natural language pro- [24] Zhe Gan, Yunchen Pu, Ricardo Henao, Chunyuan Li, Xi- aodong He, and Lawrence Carin, "Unsupervised learning of sentence representations using convolutional neural networks," arXiv:1611.07897, 2016. [25] A. M. Saxe, J. L. McClelland, and S. Ganguli, "Exact solutions to the nonlinear dynamics of learning in deep linear neural net- works," in ICLR, 2014. [26] Q. V. Le, N. Jaitly, and G. E. Hinton, "A simple way to initialize recurrent networks of rectified linear units," arXiv:1504.00941, 2015. [27] Diederik Kingma and Jimmy Ba, "Adam: A method for stochastic optimization," in ICLR, 2015. [28] F. Bastien, P. Lamblin, R. Pascanu, J. Bergstra, I. Good- fellow, A. Bergeron, N. Bouchard, D. Warde-Farley, and Y. Bengio, "Theano: new features and speed improvements," arXiv:1211.5590, 2012. 5. REFERENCES [1] Vetle I Torvik and Neil R Smalheiser, "Author name disam- biguation in medline," TKDD, 2009. [2] Stasa Milojevi´c, "Accuracy of simple, initials-based meth- ods for author name disambiguation," Journal of Informetrics, 2013. [3] S. Hochreiter and J. Schmidhuber, "Long short-term memory," in Neural computation, 1997. [4] T. Mikolov, M. Karafi´at, L. Burget, J. Cernock`y, and S. Khu- danpur, "Recurrent neural network based language model," in INTERSPEECH, 2010. [5] Y. Kim, "Convolutional neural networks for sentence classifi- cation," in EMNLP, 2014. [6] N. Kalchbrenner, E. Grefenstette, and P. Blunsom, "A con- volutional neural network for modelling sentences," in ACL, 2014. [7] Andrew M Dai and Quoc V Le, "Semi-supervised sequence learning," in Advances in Neural Information Processing Sys- tems, 2015. [8] N. Kalchbrenner and P. Blunsom, "Recurrent continuous trans- lation models.," in EMNLP, 2013. [9] K. Cho, B. Van Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, "Learning phrase representations using rnn encoder-decoder for statistical ma- chine translation," in EMNLP, 2014. [10] I. Sutskever, O. Vinyals, and Q. Le, "Sequence to sequence learning with neural networks," in NIPS, 2014. [11] F. Meng, Z. Lu, M. Wang, H. Li, W. Jiang, and Q. Liu, "En- coding source language with convolutional neural network for machine translation," in ACL, 2015. [12] Po-Sen Huang, Xiaodong He, Jianfeng Gao, Li Deng, Alex Acero, and Larry Heck, "Learning deep structured semantic models for web search using clickthrough data," in CIKM, 2013. [13] Yelong Shen, Xiaodong He, Jianfeng Gao, Li Deng, and Gr´egoire Mesnil, "A latent semantic model with convolutional- pooling structure for information retrieval," in CIKM, 2014. [14] Hamid Palangi, Li Deng, Yelong Shen, Jianfeng Gao, Xi- aodong He, Jianshu Chen, Xinying Song, and Rabab Ward, "Deep sentence embedding using long short-term memory networks: Analysis and application to information retrieval," IEEE/ACM Transactions on Audio, Speech, and Language Processing, 2016. [15] Yoon Kim, Yacine Jernite, David Sontag, and Alexander M Rush, "Character-aware neural language models," AAAI, 2016. [16] Wang Ling, Tiago Lu´ıs, Lu´ıs Marujo, Ram´on Fernandez As- tudillo, Silvio Amir, Chris Dyer, Alan W Black, and Is- abel Trancoso, "Finding function in form: Compositional character models for open vocabulary word representation," arXiv:1508.02096, 2015. [17] Xiang Zhang, Junbo Zhao, and Yann LeCun, "Character-level convolutional networks for text classification," in NIPS, 2015. [18] David Golub and Xiaodong He, "Character-level question an- swering with attention," EMNLP, 2016.
1606.00577
3
1606
2017-05-17T21:03:06
Source-LDA: Enhancing probabilistic topic models using prior knowledge sources
[ "cs.CL", "cs.IR", "cs.LG" ]
A popular approach to topic modeling involves extracting co-occurring n-grams of a corpus into semantic themes. The set of n-grams in a theme represents an underlying topic, but most topic modeling approaches are not able to label these sets of words with a single n-gram. Such labels are useful for topic identification in summarization systems. This paper introduces a novel approach to labeling a group of n-grams comprising an individual topic. The approach taken is to complement the existing topic distributions over words with a known distribution based on a predefined set of topics. This is done by integrating existing labeled knowledge sources representing known potential topics into the probabilistic topic model. These knowledge sources are translated into a distribution and used to set the hyperparameters of the Dirichlet generated distribution over words. In the inference these modified distributions guide the convergence of the latent topics to conform with the complementary distributions. This approach ensures that the topic inference process is consistent with existing knowledge. The label assignment from the complementary knowledge sources are then transferred to the latent topics of the corpus. The results show both accurate label assignment to topics as well as improved topic generation than those obtained using various labeling approaches based off Latent Dirichlet allocation (LDA).
cs.CL
cs
Source-LDA: Enhancing probabilistic topic models using prior knowledge sources Justin Wood1,2, Patrick Tan1, Wei Wang1, Corey Arnold2 2Medical Imaging Informatics Group, University of California, Los Angeles, CA 90095, USA 1Department of Computer Science, University of California Los Angeles, CA 90095, USA {juwood03, patrickptt, cwarnold}@ucla.edu, [email protected] 7 1 0 2 y a M 7 1 ] L C . s c [ 3 v 7 7 5 0 0 . 6 0 6 1 : v i X r a Abstract-Topic modeling has increasingly attracted interests from researchers. Common methods of topic modeling usually produce a collection of unlabeled topics where each topic is depicted by a distribution of words. Associating semantic meaning with these word distributions is not always straightforward. Traditionally, this task is left to human interpretation. Manually labeling the topics is unfortunately not always easy, as topics generated by unsupervised learning methods do not necessarily align well with our prior knowledge in the subject domains. Currently, two approaches to solve this issue exist. The first is a post-processing procedure that assigns each topic with a label from the prior knowledge base that is semantically closest to the word distribution of the topic. The second is a supervised topic modeling approach that restricts the topics to a predefined set whose word distributions are provided beforehand. Neither approach is ideal, as the former may produce labels that do not accurately describe the word distributions, and the latter lacks the ability to detect unknown topics that are crucial to enrich our knowledge base. Our goal in this paper is to introduce a semi- supervised Latent Dirichlet allocation (LDA) model, Source-LDA, which incorporates prior knowledge to guide the topic modeling process to improve both the quality of the resulting topics and of the topic labeling. We accomplish this by integrating existing labeled knowledge sources representing known potential topics into a probabilistic topic model. These knowledge sources are translated into a distribution and used to set the hyperparameters of the Dirichlet generated distribution over words. This approach ensures that the topic inference process is consistent with existing knowledge, and simultaneously, allows for discovery of new topics. The results show improved topic generation and increased accuracy in topic labeling when compared to those obtained using various labeling approaches based off LDA. I. INTRODUCTION Existing topic modeling is often based off Latent Dirichlet allocation (LDA) [1] and involves analyzing a given corpus to produce a distribution over words for each latent topic and a distribution over latent topics for each document. The distributions representing topics are often useful and generally representative of a linguistic topic. Unfortunately, assigning labels to these topics is often left to manual interpretation. Identifying topic labels is useful in summarizing a set of words with a single label. For example, words such as pencil, laptop, ruler, eraser, and book can be mapped to the label "School Supplies." Adding descriptive semantics to each topic can help people, especially those without domain knowledge, to understand topics obtained by topic modeling. A motivating application of accurate topic labeling is to develop summarization systems for primary care physicians, who are faced with the challenges of being inundated with too much data for a patient and too little time to comprehend it all [2]. The labels can be used to more appropriately and quickly give an overview, or a summary, of patient's medical history, leading to better outcomes for the patient. This added information can bring significant value to the field of clinical informatics which already utilizes topic modeling without labeling [3]–[5]. Existing approaches in labeling topics usually do their fitting of labels to topics after completion of the unsupervised topic modeling process. A topic produced by this approach may not always match well with any semantic concepts and would therefore be difficult to categorize with a single label. These problems are best illustrated via a simple case study. 1) Case Study: Suppose a corpus of a news source that consists of two articles is given by documents d1 and d2 each with three words: d1 - pencil, pencil, umpire d2 - ruler, ruler, baseball LDA (with the traditionally used collapsed Gibbs sampler, standard hyperparameters and the number of topics (K) set as two) would output different results for different runs due to the inherent stochastic nature. It is very possible to obtain the following result of topic assignments: d1 - pencil1, pencil1, umpire2 d2 - ruler2, ruler2, baseball1 But these assignments to topics differs from the ideal solution that involves knowing the context of the topics in which these words come from. If the topic modeling was to incorporate prior knowledge about the topics "School Supplies" and "Base- ball", then a topic modeling process will more likely generate the ideal topic assignments of: d1 - pencil2, pencil2, umpire1 d2 - ruler2, ruler2, baseball1 and assign a label of "School Supplies" to topic 1 and "Baseball" to topic 2. Furthermore it is advantageous to incor- porate this prior knowledge during the topic modeling process. Consider the following table displaying four different mapping techniques of the first result using the Wikipedia articles of "School Supplies" and "Baseball" as the prior knowledge: Topic 1 Technique Topic 2 JS Divergence Baseball Baseball TF-IDF/CS Counting PMI (same) Baseball Baseball (same) (same) (same) Applying this labeling post topic modeling can lead to prob- lems dealing with the topic themselves. This is not so much a problem of the mapping techniques but of the topics used as input. By separating the topics during inference this problem of combining different semantic topics can be avoided. To overcome this problem, one may take a supervised approach that incorporates such prior knowledge into the topic modeling process to improve the quality of topic assignments and more effectively label topics. However, existing supervised approaches [6]–[8] are either too lenient or too strict. For example, in the Concept-topic model (CTM) [6], a multinomial distribution is placed over known concepts with associated word sets. This pioneering approach does integrate prior knowledge, but does not take into account word distributions. For example if a document is generated about the topic "School Supplies" it is much more probable to see the word "pencil" than the word "compass" even though both words may be as- sociated with the topic "School Supplies". This technique also requires some supervision which requires manually inputting preexisting concepts and their bags of words. Another approach given by Hansen et al. as explicit Dirichlet allocation [7] incorporates a preexisting distribution based off Wikipedia but does not allow for variance from the Wikipedia distribution. This approach fulfills the goal of incorporating prior knowledge with their distributions but requires the topic in the generated corpus to strictly follow the Wikipedia word distributions. To address these limitations, we propose the Source-LDA model which is a balance between these two approaches. The goal is to allow for simultaneous discovery of both known and unknown topics. Given a collection of known topics and their word distributions, Source-LDA is able to identify the subset of these topics that appear in a given corpus. It allows some variance in word distributions to the extent that it optimizes the topic modeling. A summary of the contributions of this work are: 1) We propose a novel technique to topic modeling in a semi-supervised fashion that takes into account preexisting topic distributions. 2) We show how to find the appropriate topics in a corpus given an input set that contains a subset of the topics used to generate a corpus. 3) We explain how to make use of prior knowledge sources. In particular, we show how to use Wikipedia articles to form word distributions. 4) We introduce an approach that allows for variance from an input topic to the latent topic discovered during the topic modeling process. The parameters are given as a vector denoted by α. The probability density function for a given probability mass function (PMF) θ and parameter vector α of length J is defined as: J(cid:89) i θαi−1 i Γ((cid:80)J (cid:81)J i αi) i Γ(αi) f (θ, α) = A sample from the Dirichlet distribution produces a PMF that is parameterized by α. The choice of a particular set of α values influences the outcome of the generated PMF. If all α values are the same (symmetric parameter), as α approaches 0, the probability will be concentrated on a smaller set of atoms. As α approaches infinity, the PMF will become the uniform distribution. If all αi are natural numbers then each individual αi can be thought of as the "virtual" count for the ith value [9]. B. Latent Dirichlet Allocation Latent Dirichlet Allocation (LDA) is the basis for many existing probabilistic topic models, and the framework for the approach presented by this paper. Since we enhance the LDA model in our proposed approach it is worth giving a brief overview of the algorithm and model of LDA. LDA is a hierarchical Bayes model which utilizes Dirichlet priors to estimate the intractable latent variables of the model. At a high level, LDA is based on a generative model in which each word of an input document from a corpus is chosen by first selecting a topic that corresponds to that word and then selecting the word from a topic-to-word distribution. Each topic-to-word distribution and word-to-topic distribution is drawn from its respective Dirichlet distribution. The formal definition of the generative algorithm over a corpus is: 1. 2. 3. 4. 5. 6. 7. 8. For each of the K topics φk: For each of the D documents d: Choose φk ∼ Dir(β) Choose Nd ∼ Poisson(ξ) Choose θd ∼ Dir(α) For each of the Nd words wn,d: Choose zn,d ∼ Multinomial(θ) Choose wn,d ∼ Multinomial(φzn,d) The rest of this paper is organized as follows: In Section 2, we give a brief introduction to the LDA algorithm and the Dirichlet distribution. A more detailed description of the Source-LDA algorithm is presented in Section 3. In Section 4, the algorithm is used and evaluated under various metrics. Related literature is highlighted in Section 5. Section 6 gives the conclusions of this paper. For reproducible research, we make all of our code avail- able online.1 II. PRELIMINARIES A. Dirichlet Distribution The Dirichlet distribution is a distribution over probability mass functions with a specific number of atoms and is com- monly used in Bayesian models. A property of the Dirichlet that is often used in inference of Bayesian models is conjugacy to the multinomial distribution. This allows for the posterior of a random variable with a multinomial likelihood and a Dirichlet prior to also be a Dirichlet distribution. 1https://github.com/ucla-scai/Source-LDA From the generative algorithm the resultant Bayes model is shown by Figure 1(a). Bayes' law is used to infer the latent θ distribution, φ distribution, and z P (θ, φ, zw, α, β) = p(θ, φ, z, wα, β) p(wα, β) Unfortunately the exact computation of this equation is in- tractable. Hence, it must be approximated with techniques such as expectation-maximization [1], Gibbs sampling or collapsed Gibbs sampling [10]. III. PROPOSED APPROACH Source-LDA is an extension of the LDA generative model. In Source-LDA, after a known set of topics are determined, an initial word-to-topic distribution is generated from correspond- ing Wikipedia articles. The desiderata is to enhance existing LDA topic modeling by integrating prior knowledge into the topic modeling process. The relevant terms and concepts used in the following discussion are defined below. α φ K θ z w Nd D (a) LDA µ KS X σ λ β δ φm B θ z w Nd D (b) Source-LDA α β φk K Fig. 1: Plate notation for LDA (a), and the proposed Source-LDA (b). Definition 1 (Knowledge source): A knowledge source is a collection of documents that are focused on describing a set of concepts. For example the knowledge source used in our experiments are Wikipedia articles that describe the categories we select from the Reuters dataset. 2. 3. δk ← (Xk,1, Xk,2, . . . , Xk,V ) Choose φk ∼ Dir(δk) Definition 2 (Source Distribution): The source distribu- tion is a discrete probability distribution over the words of a document describing a topic. The probability mass function is given by ∀wi ∈ W, f (wi) = nwi(cid:80)G j nwj where W is the set of all words in the document, G = W, and nwi is the number of times word wi appears in the document. Definition 3 (Source Hyperparameters): For a given doc- ument in a knowledge source the knowledge source hyper- parameters are defined by the vector (X1, X2, . . . , XV ) where Xi = nwi + and  is a very small positive number that allows for non-zero probability draws from the Dirichlet distribution. V is the size of the vocabulary of the corpus for which we are topic modeling, and nwi is the number of times the word wi from the corpus vocabulary appears in the knowledge source document. We detail three approaches to capture the intent of Source- LDA. The first approach is a simple enhancement to the LDA model that allows for the influencing of topic distributions, but suffers from needing more user intervention. The second approach allows for the mixing of unknown topics, and the third approach combines the previous two approaches. It moves toward a complete solution to topic modeling based off prior knowledge sources. A. Bijective Mapping In the simplest approach, the Source-LDA model assumes that there exists a 1-to-1 mapping between a known set of topics and the topics used to generate a corpus. The generative model then assumes that, instead of selecting topic-to-word distributions from sampling from the Dirichlet distribution, a set of K distributions are given as input and sampled from after each topic assignment is sampled for a given token position. The generative process for a corpus adapted from the traditional LDA generative model during the construction of the φ distributions is as follows (for brevity only the relevant parts of the existing LDA algorithm are shown): 1. For each of the K topics φk: represents Where (Xk,1, Xk,2, . . . , Xk,V ) the knowledge source hyperparameters for the kth knowledge source docu- ment. The generative model only differs from the traditional LDA model in how each φ is built. Therefore the derivation for inference is a simple factor as well. To approximate the distributions for θ and φ, a collapsed Gibbs sampler can approximate the z assignments as follows: P (wizi=j, z-i, wi) ∝ P (wizi=j, z-i, w-i)P (zi=jz-i) From the Bayesian Model the following equations can be easily be generated P (wizi=j, z-i, w-i) = P (wizi=j, φj)P (φjz-i, w-i)dφj (cid:90) with P (φjz-i, w-i) ∝ P (w-iφj, z-i)P (φj) P (φjz-i, w-i) = Dir(δi,j + nw-i,j ) (cid:90) P (wizi=j, φj) = φwi,j P (wizi=j, z-i, w-i) = Dir(δi,j + nw-i,j ) φwi,j dφj P (wizi=j, z-i, w-i) = nwi -i,j + δi,j -i,j +(cid:80)V n(·) a δa,j nw and nd in this and the following equations represent a count matrix for the number of times a word is assigned to a topic and the number of times a topic is assigned to a document respectively. For brevity since the prior probability is unchanged in the "Bijective Mapping" model we will skip the derivation which is well defined in other articles [10]–[12]. P (zi=jz-i) = ndi -i,j + α n(di) -i + Kα Putting the two equations together gives the final Gibbs sam- pling equation: P (zi=jz-i, w) ∝ nwi n(·) -i,j + δi,j -i,j +(cid:80)V a δa,j ndi -i,j + α n(di) -i + Kα prior can be used to guide a topic toward being a general unknown topic or a known topic. The model changes as shown below with a minor change to the generative algorithm and the collapsed Gibbs sampling. 1. 2. 3. 4. 5. 6. For each of the K topics φk: Choose φk ∼ Dir(β) δk ← (Xk,1, Xk,2, . . . , Xk,V ) Choose φk ∼ Dir(δk) if k ≤ T then else Where T is the total number of non-source topics. The change required to the collapsed Gibbs sampling is then: P (zi=jz-i, w) ∝ nwi -i,j + β n(·) -i,j + W β ndi -i,j + α n(di) -i + Kα , ∀i ≤ T and P (zi=jz-i, w) ∝ nwi n(·) -i,j +(cid:80)V -i,j + δi,j ndi -i,j + α n(di) -i + Kα , ∀i > T (2) a δa,j This approach gives the benefit of allowing a mixture of known topics and unknown topics, but problems still arise in that the Dirichlet distributions for the source distribution may be too restricting. C. Source-LDA By using the counts as hyperparameters, the resultant φ distribution will take on the shape of the word distribution derived from the knowledge source. However, this might be at odds with the aim of enhancing existing topic modeling. With the goal to influence the φ distribution, it is entirely plausible to have divergence between the two distributions. In other words, φ may not need to strictly follow the corresponding knowledge source distribution. 1) Variance from the source distribution: To allow for this relaxation, another parameter λ is introduced into the model which is used to allow for a higher deviance from the source distribution. To obtain this variance each source hyperparameter will be raised to a power of λ. Thus as λ approaches 0 each hyperparameter will approach 1 and the subsequent Dirichlet draw will allow all discrete distributions with equal probability. As λ approaches 1 the Dirichlet draw will be tightly conformed to the source distribution. The addition of λ changes the existing generative model only slightly and allows for a variance for each individual δi, which frees us from an overly restrictive binding to the associated knowledge source distribution. The λ parameter acts as a measure of how much divergence is allowed for a given modeled topic from the knowledge source distribution. Figure 3 shows how the JS Divergence changes with changes to the λ parameter. 5. δk ← [(Xk,1)λ, (Xk,2)λ, . . . , (Xk,V )λ] With the introduction of λ as an input parameter, the new topic model has the advantage of allowing variance and also leaves the collapsed Gibbs sampling equation unchanged. However this also requires a uniform variance from the knowledge base distribution for all latent topics. This can be a problem if the corpus was generated with some topics influenced strongly while others less so. To solve this we can introduce λ as a hidden parameter of the model. Fig. 2: Box plots [13] showing the Jensen-Shannon divergence (the JS divergence measures the distance or similarity between probability distributions) of 1000 Dirichlet samples parame- terized by source hyperparameters for a subset of knowledge source topics. The topics were taken from Wikipedia pages. Given the approximation to the topic assignments, the θ and φ distributions are calculated as: nt +(cid:80)V nw,t + δw,t a δa,t φw,t = θt,d = nd,t + α nd + Kα (1) In the case when all topics are known, this model has the advantage of conforming the φ distributions to the source distributions, but has three drawbacks. First, even though there is some variability between the φ distribution and source distribution, as illustrated by Figure 2, there may be cases in which this constraint should be relaxed even further. This is because it is entirely possible to generate a corpus about a known topic without exactly following the frequencies at which the topic is discussed in its respective article. This model also requires the user to input the known topics, and other possible supervised approaches may be better suited to the task [14]–[16]. The third drawback is that we are not allowing the possibility that the corpus was generated from a mixture of known topics and unknown topics, which is a more realistic scenario for an arbitrary document. The next model aims to resolve this last deficiency. B. Known Mixture of Topics The next model assumes that in the topic model it is given how many topics are known topics (as well as their word distributions) and how many are unknown topics. The previous approach works quite well in this situation in that an unknown topic will have a symmetric beta parameter which will capture assignments which were unallocated due to a low probability in matching any known topic. The resulting model helps to solve the existing problems of the bijective model and only requires a minor input to the existing generative model. The resulting model works quite well with the bijective model in that the symmetric Dirichlet lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllMoney SupplyUnemploymentBalance of PaymentsConsumer Price IndexCanadian DollarHong Kong DollarInventoriesJapanese YenAustralian DollarInterest RatesSwiss FrancSingapore DollarWholesale Price IndexNew Zealand DollarRetail SalesCapacity UtilisationTradeIndustrial Production IndexHousing StartsPersonal Income0.000.050.100.15Jensen−Shannon Divergence Unfortunately closed form expressions for these integrals are hard to obtain and so they must be approximated numerically during sampling. Another problem arises in that the change of λ is not in par with the change of the Gaussian distribution, as can be seen in Figure 3. To make the changes of λ more in line with that expected from the Gaussian PDF, we must map each individual λ value in the range 0 to 1 with a value which produces a change in the JS divergence in a linear fashion. We approximate a function, g(x) with a linear derivative, shown in Figure 4. The approach taken to approximate g(x) is by linear interpolation of an aggregated large number of samples for each point taken in the range 0 to 1. Our collapsed Gibbs sampling equations then becomes: P (zi=jz-i, w) ∝ nwi -i,j + (δi,j)g(λ) N (µ, σ)dλ (3) (cid:90) n(·) nw,t + β nt + V β -i,j +(cid:80)V (cid:90) nw,t + (δw,t)g(λ) nt +(cid:80)V φw,t = a (δa,t)g(λ) a (δa,j)g(λ) , ∀t ≤ T N (µ, σ)dλ, ∀t > T (4) and φw,t = 3) Superset Topic Reduction: A third problem involves knowing the right mixture of known topics and unknown topics. It is also entirely possible that many known topics may not be used by the generative model. Our desire to leave the model as unsupervised as possible calls for input that is a superset of the actual generative topic selection in order to avoid manual topic selection. In the case of modeling only a specific number of topics over the corpus, the problem then becomes how to choose which knowledge source latent topics to allow in the model vs. how many unlabeled topics to allow. The goal then is to allow for a superset of knowledge source topics as input and then during the inference to select the best subset of these with a mixture of unknown topics where the total number of unlabeled topics is given as input K. The approach given is to use a mixture of K unlabeled topics alongside the labeled knowledge source topics. The total number of topics then becomes T . During the inference we eliminate topics which are not assigned to any documents. At the end of the sampling phase we then can use a clustering algorithm (such as k-means, JS divergence) to further reduce the modeled topics and give a total of K topics. As described more in the experimental section, with the goal of capturing topics that were frequently occurring in the corpus, topics not appearing in a frequent enough of documents were eliminated. The complete generative process is shown in Figure 1(b) and described below: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. else if t ≤ K then For each of the T topics φt: Choose φt ∼ Dir(β) Choose λt ∼ N (µ, σ) δt ← [(Xt,1)g(λt), (Xt,2)g(λt), . . . , (Xt,V )g(λt)] Choose φt ∼ Dir(δt) Choose Nd ∼ Poisson(ξ) Choose θd ∼ Dir(α) For each of the Nd words wn,d: For each of the D documents d: Fig. 3: Box plots showing how the JS divergence between a source distribution and a Dirichlet sample parameterized by source hyperparameters raised to λ changes with changes to λ without smoothing. Fig. 4: The JS divergence between a source distribution and a Dirichlet sample parameterized by source hyperparameters raised to λ with λ mapped to a linear smoothing function g. 2) Approximating λ: In the ideal situation λ will be as close to 1 for most knowledge based latent topics, with the flexibility to deviate as required by the data. For this we assume a Gaussian prior over λ with mean set to µ. The variance then becomes a modeled parameter that conceptually can be thought of as how much variance from the knowledge source distribution we wish to allow in our topic model. In assuming a Gaussian prior for λ, we must integrate λ out of the collapsed Gibbs sampling equations (only the probability of wi under topic j is shown, the probability of topic j in document d is unchanged and omitted). P (zi=jz-i, w) ∝ nwi -i,j + (δi,j)λ N (µ, σ)dλ n(·) (cid:90) -i,j +(cid:80)V (cid:90) nw,t + (δw,t)λ nt +(cid:80)V a (δa,t)λ a (δa,j)λ N (µ, σ)dλ φ then becomes φw,t = Jensen−Shannon Divergence00.10.20.30.40.50.60.70.80.910.10.20.30.40.50.6lJensen−Shannon Divergenceg(0)g(0.2)g(0.4)g(0.6)g(0.8)g(1)0.10.20.30.40.50.6l Algorithm 1 Collapsed Gibbs Input: Dirichlet hyperparameters α, β, a corpus C, vocabulary V , unlabeled topic count K, total topic count T , a set of source topics S, mean µ, variance σ, and iteration count I. Output: θ, φ procedure COLLAPSED GIBBS(α, β, C, V , T ) for t = K + 1 to T do Calculate gt end for Initialize Ctopics to random topic assignments Update nw and nd from Ctopics for iter = 1 to I do for i = 1 to C do for j = 1 to Ci do Ctopicsi,j ← Sample(i, j) end for end for end for Calculate θ according to Equation 1 Calculate φ according to Equation 4 return θ, φ end procedure procedure SAMPLE(i, j) Decrement nw and nd accordingly for t = 1 to K do Calculate pt according to Equation 2 end for for t = K + 1 to T do Calculate pt according to Equation 3 end for topic ∼ Multinomial(p) Increment nw and nd accordingly return topic end procedure 12. 13. Choose zn,d ∼ Multinomial(θ) Choose wn,d ∼ Multinomial(φzn,d) The full collapsed Gibbs sampling algorithm is given in algorithm 1. 4) Analysis: By using a clustering algorithm or thresh- olding the topic document frequency, the collapsed Gibbs algorithm is guaranteed to produce K topics. The running time is a function of the number of iterations I, average words per document Davg, number of documents D, number of topics T and number of approximation steps A, and is O(I×Davg×D×T ×A). This differs only from the traditional collapsed Gibbs sampling in LDA by an increase of (T −K)A. But since we have built the approach to potentially have a large T −K this difference can have a significant impact on running times. Approaches exist that can parallelize the sampling proce- dure, but these are often approximations or can potentially have slower than baseline running times [17]–[19]. We present two modifications to the original algorithm that allow for inference while guaranteeing the exactness of the results to the original Gibbs sampling. The first one makes use of prefix sums rules [20] and guarantees a running time of: O(I × Davg × D × A × M ax[T /P, P ]) with P being the number of parallel units. This algorithm is given by Algorithm 2. This algorithm is practical in situations where T − K is large, but suffers from the limitations of the number of context switches required for the threads to wait at their respective barriers. A simpler implementation approach that reduces the number of context switches is to add the sums for each thread then wait for a barrier. When the barrier is released we add the end values together and then in parallel we add the remaining Algorithm 2 Prefix Sums Parallel Sampling procedure SAMPLE(i, j) Decrement nw and nd accordingly for i from 0 to T − 1 in parallel do if i ≤ K then else Calculate pi according to Equation 2 Calculate pi according to Equation 3 end if pi ← pi−1 + pi end for for d from 0 to (ln T ) − 1 do for i from 0 to T − 1 by 2d+1 in parallel do p(i+2d+1−1) ← p(i+2d−1) + p(i+2d+1−1) end for end for p(T −1) ← 0 for d from (ln T ) − 1 down to 0 do for i from 0 to T − 1 by 2d+1 in parallel do h ← p(i+2d−1) p(i+2d+1−1) ← p(i+2d+1−1) p(i+2d+1−1) ← h + p(i+2d+1−1) end for end for topic ← Binary Search(p) Increment nw and nd accordingly return topic end procedure Algorithm 3 Simple Parallel Sampling procedure SAMPLE(i, j) Decrement nw and nd accordingly for i from 0 to T − 1 in parallel do if i ≤ K then else Calculate pi according to Equation 2 Calculate pi according to Equation 3 end if pi ← pi−1 + pi end for for i from 0 to T − 1 by T /P do pi ← p(i−T /P ) + pi endsi ← pi end for for i from 0 to T − 1 in parallel do dif f ← pend − endsi pi ← dif f + pi end for topic ← Binary Search(p) Increment nw and nd accordingly return topic end procedure necessary items. This approach is given in Algorithm 3. The running time is then: O(I × Davg × D × A × M ax[T /P, P ]) These two algorithms allow for mitigation of the increase in the number of topics and should approach times very similar to those of standard LDA runs. They are also very extensible and can be used in other optimization algorithms. 5) Input determination: Determining the necessary param- eters and inputs into LDA is an established research area [21], but since the proposed model input requirements a brief overview will be given about how to best set the parameters and determine the knowledge source. introduces additional a) Parameter selection: To determine the appropriate parameters, techniques utilizing log likelihood have previously been established [10]. Since these approaches generally require held out data and are a function of the φ, θ, and α variables the introduction of λ and σ will not differentiate from their original equations. For example the perplexity calculations used for Source-LDA are based off of importance sampling [22], or (a) (b) Fig. 5: A graphical representation of topics containing 1 word for the cell locations of row and column vectors in a 5 x 5 picture (a) and their augmented topics after swapping a random assigned word (pixel) with a random topic's assigned word (b). latent variable estimation via Gibbs sampling [23]. Importance sampling is only a function of φ given by Equation 4, and estimation via Gibbs sampling can made using Equation 4 and by the following equation (z, w, and n represent the corresponding variables in the test document set): P ( zi=jz-i, w) ∝ nwi j + nwi n(·) j + n(·) ndi -i,j + α n(di) -i + Kα -i,j + β -i,j + W β , ∀i ≤ T and P ( zi=jz-i, w) ∝ nwi j + nwi n(·) j + n(·) -i,j + -i,j + δi,j V(cid:80) a δa,j ndi -i,j + α n(di) -i +Kα ,∀i > T It is recommended to set the parameters so as to maximize the log likelihood. Further analysis such as whether or not the parameters can be learned a priori from the data are not the focus of this paper and are thus left as an open research area. b) Knowledge source selection: Source-LDA is de- signed to be used only with a corpus which has a known super set of topics which comprise a large portion of the tokens. An example of such a case is that of a corpus consisting of clinical patient notes. Since there are extensive knowledge sources comprising essentially all medical topics, Source-LDA can be useful in discovering and labeling these existing topics. In cases where it is not so easy to collect a superset of topics traditional approaches may be more useful. To test the results of the Source-LDA algorithm we set up experiments to test against competing models. The most similar models to our proposed approach were used in com- parison. These are: latent Dirichlet allocation (LDA) [1], explicit Dirichlet allocation (EDA) [7], and the Concept- topic model (CTM) [6]. Other approaches such as supervised latent Dirichlet allocation (sLDA) [14], discriminative LDA (DiscLDA) [15], and labeled LDA (L-LDA) [16] are not used since a main desiderata of Source-LDA is to require much less supervision than what is needed by these methods. Likewise hierarchical methods [24] are omitted because there is no established hierarchy in the knowledge source data for this model. We describe in more detail below the experimental setups and metrics used to compare results. A. A Graphical Example Following a previously established experiment [10], we show the utility of Source-LDA by visualizing topics created with words that correspond to the pixel locations in a 5 × 5 picture; but we add a key difference. The original topics are IV. EVALUATION Ti = Fig. 6: Results from running Source-LDA for a corpus gen- erated from topics in Figure 5(b) using a knowledge source of topics corresponding to Figure 5(a). Four separate runs are plotted to show the similarity of the log-likelihood relation to the iteration between the runs. The topics are shown visually at iteration 1, 20, 50, 100, 150, 200, 300 and 500 for a single run. augmented, used to generate a corpus, and then hidden. Only the non augmented topics are given as input with the goal of discovering the augmented topics using the corpus and their original topics. 1) Experimental Setup: We start by creating ten topics with the vocabulary being the set of pixel locations in a 5×5 picture. The vocabulary (V ) and bag of words representation of a topic (Ti) are defined as: V = {xy 0 ≤ x < 5 ∧ 0 ≤ y < 5} (cid:26)xy y = i ∧ 0 ≤ x < 5, yx y = i ∧ 0 ≤ x < 5, otherwise if 0 ≤ i < 5 The topics are shown by Figure 5(a) with the intensity (I) of a pixel corresponding to word w in topic t equal to: I(w, t) = M ax[5 × P (wt), 1] The representation of topics in this manner leads to a total of 10 topics. These original topics are then augmented by pairing each topic with a random different topic and swapping a random word (pixel) that is assigned to each topic given that the swapped words do not belong to their original assignments. Figure 5(b) shows the augmented topics which represent a 20% augmentation rate between the original topics. From the set of augmented topics we generate a 2,000 document corpus using the generative model of LDA. Each document consists of 25 words with topic assignments drawn from a distribution sampled from the Dirichlet distribution parameterized by α = 1. With the knowledge source consisting solely of the original non augmented topics we run Source- LDA on the corpus hoping to discover and properly label the augmented topics. For comparative analysis we also run EDA and CTM against the same data set. allowing λ to deviate, the model can make up for incorrect parameter assignments due to a misleading perplexity value. As shown in Figure 7, classification accuracy is not perfectly correlated with perplexity. This is shown by the baseline method reporting a higher perplexity value than the fixed λ = 1 value while maintaining a higher classification accuracy. Even though we still recommend perplexity or other log-likelihood maximization approaches to set the parameters in any unknown data set, maximizing log-likelihood has been shown to be a less than perfect metric for evaluating topic models [25], [26]. In this experiment and the remaining experiments we take classification accuracy to be a more appropriate measurement for evaluating topic models. C. Reuters Newswire Analysis To show the type of topics discovered from Source-LDA we run the model on an existing dataset. This collection contains documents from the Reuters newswire from 1987. The dataset contains 21,578 articles, among a large set of categories. One important feature of the dataset are a set of given categories that we can use for our topic labeling. These include broad categories such as shipping, interest rates, and trade, as well as more refined categories such as rubber, zinc, and coffee. Our choice to apply our topic labeling method to this dataset is due to the fact that the Reuters dataset is widely used for information retrieval and text categorization applications. Due to its widespread use, it can considerably aid us in comparing our results to other studies. Additionally, because it contains distinct categories that we can use as our known set of topics, we can easily demonstrate the viability of our model. 1) Experimental Setup: Source-LDA, LDA, and CTM were run against the Reuters-21578 newswire collection. Since EDA does not discover new topics, nor does it update the word distributions of the input topics, we do not include EDA in this experiment. From the original 21,578 document corpus we select a subset of 2,000 documents. The Source-LDA and CTM supplementary distributions were generated by first obtaining a list of topics from the Reuters-21578 dataset. Next, for each topic, the corresponding Wikipedia article was crawled and the words in the topic were counted, forming their respective distributions. Querying Wikipedia resulted in 80 distinct topics as our superset for the knowledge source. Out of the 80 crawled available topics, only 49 topics appear in the 2,000 document corpus. This represents the ideal conditions in which Source-LDA is to be applied; that of a corpus which a significant portion of tokens are generated from a subset of a larger and relatively easy to obtain topic set. For all models, a symmetric Dirichlet parameter of 50/T (where T is the number of topics) and 200/V (where V is the size of the vocabulary) was used for α and β respectively. For Source-LDA, µ and σ were determined by experimentally finding a local minimum value of perplexity which resulted from the parameter values of 0.7 for µ and 0.3 for σ. The bag of words used in the CTM were taken from the top 10,000 words by frequency for each topic. The models showed good convergence after 1,000 iterations. After sampling was complete for LDA, the resulting topic-to-word distribution was mapped using an information retrieval (IR) approach. The IR approach was to use cosine similarity of documents mapped to term frequency-inverse document frequency (TF-IDF) vec- tors with TF-IDF weighted query vectors formed from the top 10 words per topic. 2) Experimental Results: After the LDA model converged, we label the topics using the IR approach described above (we referred to this topic labeling method as IR-LDA). Given similar labels from the models it is an intuitive approach to compare the word assignments to each topic model. Example Fig. 7: Classification accuracy and perplexity values for fixed values of λ compared against the baseline values generated from a dynamic λ with a normal prior. The baseline values shown as lines represent the classification percentage of 25.7 and perplexity value of 1119.9 2) Experimental Results: As shown in Figure 6, Source- LDA discovers the augmented topics given the set of original topics. Not only is Source-LDA able to find the topics correctly to the augmented distributions used in the generation of the corpus, but it is also able to match them to their respective non augmented source distributions. This simple experiment highlights a big advantage of Source-LDA; which is the ability to discover topics that differ from their respective supervised input set. Other models such as EDA and CTM are unable to label the augmented topics correctly due to the topics containing a word (pixel) not in the original distribution. The comparative average JS divergence was 0.012, 0.138, and 0.43 for Source-LDA, EDA, and CTM respectively. B. Integrating λ A reasonable assumption to a corpus in which some topics are generated from a knowledge source is that the topics used in the corpus are going to deviate (more or less similar) from their respect source distributions and that each individual topic is going to deviate at a different rate than other topics. The introduction of λ to Source-LDA as a parameter to be learned by the data allows the flexibility of different topics to be influenced differently by λ, but comes at an increase in computation cost. To show that in certain cases this flexibility is needed to obtain more accurate results we derive an exper- iment consisting of topics with different deviations from their respective source distributions. 1) Experimental Setup: A synthetic 500 document corpus is generated from a knowledge source of 100 randomly se- lected Wikipedia topics. The corpus is generated using the bijective model of Source-LDA as outlined in Section 3(A), consisting of 100 topics, an average word count per document of 100 words, µ = 0.5, σ = 1.0 and α = 0.5. Furthermore even though for each topic λ was drawn from N (µ, σ2) we bound the value drawn to the interval [0, 1] for comparative analysis. We then run Source-LDA under the bijective model for a baseline of µ = 0.5, σ = 1.0 against 10 runs of Source- LDA with λ fixed. After each run we compare the classification accuracy and perplexity values. 2) Experimental Results: For all fixed λ runs the base- line approach of varying λ in accordance with the normal distribution results in a higher classification accuracy. By 0.10.30.50.70.915101520251136.41209.31282.2Classification %PerplexitylClassification %Perplexity SRC-LDA inventory cost stock accounting goods management time costs financial process Inventories IR-LDA systems products said information technology company data network kodak available CTM sales year sold retail given place marketing improved passed addition SRC-LDA gas natural used water oil carbon cubic energy fuel million Natural Gas IR-LDA corp contract company services unit subsidiary completed work dlr received CTM gas said total value near natural properties california wells future SRC-LDA IR-LDA account surplus deficit current balance currency trade exchange capital foreign said public state private planned reduce local added make did Balance of Payments CTM said june april beginning great later remain reserve equivalent imported TABLE I: Topics and their most probable word lists for Source-LDA, IR-LDA, and CTM. comparisons are shown in Table I. The label assignments generated from Source-LDA show a more accurate assignment of labels to topics than both IR-LDA and CTM. IR-LDA appears to suffer from mixing of different concepts into a single topic, for example with the topic "Inventories," the topic assignments could possibly be the combination of "Invento- ries" and "Information Technology". The CTM seems to assign more weight to less important words. One approach to rectify this problem for CTM is to use a smaller number of words for the bag of words, but this leads to significant dropout and no labeled topics are passed through. Out of the total 100 returned topics, CTM only discovered 6 labeled topics, with Source- LDA discovering 15. Since the IR approach forces all topics to a label regardless of the quality of the label, LDA required all topics to be matched to a label. Out of the 6 labeled CTM topics only 3 were overlapping with Source-LDA and IR-LDA and are shown in Table I. The remaining 3 CTM topics were bad matches for the label with an average of 86% of words not appropriate for the label as determined by human judgment (we acknowledge the potential for bias). Meanwhile Source-LDA mismatched at a rate of 36%, with IR-LDA at a rate of 77%. Source-LDA is more consistent with the meaning of the topic as opposed to what words you may find when talking about this topic, which can be generally applied to many concepts. D. Wikipedia Corpus A comparison of Source-LDA against EDA, and CTM is made using a corpus generated using a known knowledge source corresponding to medical topics extracted from Med- linePlus (a consumer-friendly medical dictionary) [27]. We evaluate the strength of Source-LDA under different models proposed in Section 3 using the metrics of classification accuracy, JS divergence and Pointwise mutual information (PMI). PMI is an established evaluation of learned topics which takes as input a subset of the most popular tokens comprising a topic and determines the frequency of all pairs in the subset occurring at a given input distance from each other in the corpus. The more that these pairs occur close to each other then the better the learned topics. PMI differs from the JS divergence evaluation for this experiment in that PMI will tell us how good our topics are where as the JS divergence will tell us how good our distribution over topics for each document is. 1) Experimental Setup: A corpus of Wikipedia vocabulary articles was generated by following the steps of the generative model for Source-LDA, where the chosen K topics are a subset of a larger collection of Wikipedia topics. The topics consisted of 578 Wikipedia articles representing the collection of topic labels from MedlinePlus. The number of topics (K) was given as 100, chosen from an entire collection of 578 topics (B), the number of documents (D) was given as 2000 and the average document word count (Davg) as 500, µ and σ were set to 5.0 and 2.0 for the bijective evaluation 0.7 and 0.3 for the Source-LDA model respectively. After these 2000 documents were generated the topic assignments were recorded and used as the ground truth measurement. The word assignments were used as the corpus and the different topic models were applied to these documents. The first round of topic models consisted of comparing Source-LDA, EDA, and CTM. For Source- LDA µ and σ were set to match that of the generative model. For all models, a symmetric Dirichlet parameter of 50/T and 200/V was used for α and β respectively. After convergence of the models they were evaluated against the ground truth measurement. In the second round of experiments each topic model was run under the bijective model, that is they only considered topics which were used in the ground truth assignments. To compare Source-LDA against LDA using PMI, 5 cor- pora were generated under the bijective model with the number of topics K ranging from 100 to 200. B, D, Davg, µ, and σ were set to 100, 578, 200, 300, 1.0 and 0.0 respectively. The parameters for Source-LDA followed the generative model and all other parameters are the same as the previous experiments. After 1000 iterations the top 10 words given for each topic were used in the PMI assessment. 2) Experimental Results: The topic assignments for each token in the corpus were recorded for all models and the results compared against each other. Since we know a priori the correct topic assignment for each token we use the number of correct topic assignments to be an appropriate measure of classification accuracy. Note that in evaluations where the ground truth is known, classification accuracy is a much better determination of the goodness of a model than log likelihood maximizations such as perplexity and therefore we do not evaluate the model using perplexity. In Figure 8, all topic models run under the full Source-LDA model are tagged with an "Unk" label, and likewise topic models run under the bijective model are tagged with "Exact". The overall number of correct topic assignments for each model are shown in Figure 8(a) for the mixed model and Figure 8(b) for the bijective model. Since the LDA model has unknown topics, JS divergence was used to map each LDA topic to its best matching Wikipedia topic. As expected the Source-LDA model (SRC-Unk and SRC-Exact) had the best results amongst all other topic models for classification accuracy. In the second analysis the topic to document distributions were analyzed using sorted JS Divergence, and is irrespective to any unknown mapping. The results again show the Source- LDA model to be effective in accurately mapping topics to (a) (d) (b) (e) (c) (f) Fig. 8: Results showing the number of correct topic assignments in the mixed model (a) and bijective model (b) and sum total of the JS divergences of θ in the mixed (d) and bijective models (e). Sorted PMI analysis for a Wikipedia generated corpus inferred by the exact bijective model and mixed model is shown by (c). Performance benchmarking is given in (f). documents whether or not the topics used in the generative model are unknown (Figure 8(d)) or a known set of topics as shown in Figure 8(e). Even though an accurate alignment of θ by itself does not lend much weight to any one model being superior, we do find it important to demonstrate how θ is being affected by the different algorithms. The PMI analysis detailed by Figure 8(c) show that by PMI, Source-LDA provides a better mapping of labels to topics over the input corpora. This is an encouraging result, even though the differences are not large, since LDA is a function of topic proximity in a document and word frequency in a topic, whereas Source-LDA is a function of the same plus the likelihood of a word being in an augmented source distribution. E. Performance Benchmarking To show the performance gains used by the parallel sam- pling algorithm and experiment was set up to generate topics randomly from a given vocabulary. The corpus was generated using the same parameters as in Section 4(B) but with B ranging from 100 to 10000. The benchmarking is visualized by Figure 8(d). It clearly demonstrates that Source-LDA is linearly scalable and easily parallelized. V. RELATED WORK Much existing literature exists related to the proposed approach in this paper. These methods are mainly extensions of LDA, and add to the original model by introducing en- hancements such as topic labeling, integration with contextual information and hierarchical modeling. A. Topic Labeling In the early research stage, labels were often generated by hand [28]–[31]. Though manual labeling may generate more understandable and accurate semantics of a topic, it costs a lot of human effort and it is prone to subjectivity [32]. For example, in the most conventional LDA model, topics are in- terpreted by selecting the top words in the distribution [1], [28], [32], [33]. The Topics over Time (TOT) model implements continuous time stamps with each topic [32]. The model has been applied in three kinds of datasets, and results show more accurate topics and better timestamp predictions. However, the interpretation of topics is manual and post-hoc labeling can be time-consuming and subjective. Mei et al. proposed probabilistic approaches to automati- cally interpreting multinomial topic models objectively. The intuition of this algorithm was to minimize the semantic distance between the topic model and the label. To this end, they extracted candidate labels from noun phrases chunked by an NLP Chunker and most significant 2-grams. Then they ranked labels to minimize Kullback-Leibler divergence and maximize mutual information between a topic model and a label. The approach achieved the automatic interpretation of topics, but available candidate labels were limited to phrases inside documents. Lau et al came up with an automatic topic label generation method which obtains candidate labels from Wikipedia articles containing the top-ranking topic terms, top-ranked document titles, and sub-phrases. To rank those candidates topic labels, they used different lexical measurements, such as point-wise mutual information, Student's t-test, Dice's coefficient and the log likelihood ratio [34]. Supervised methods like support vec- tor regression were also applied in the ranking process. Results Correct assignmentsSRC−UnkEDA−UnkCTM−UnkLDA−Unk233k466k700kCorrect assignmentsSRC−ExactEDA−ExactCTM−ExactLDA−Exact233k466k700klllll0.100.150.200.25100125150175200TopicsPointwise mutual informationlSRC−ExactSRC−UnkLDAJensen−Shannon divergenceSRC−UnkEDA−UnkCTM−UnkLDA81624Jensen−Shannon divergenceSRC−ExactEDA−ExactCTM−ExactLDA5.310.616llllllll050100150025005000750010000TopicsAverage iteration time (s)l1 thread3 threads6 threads showed that supervised algorithm outperforms unsupervised baseline in all four corpora. In previous approaches, topics were treated individually and relation among topics was not considered. Mao et al created hierarchical descriptor for topics, and results proved that inner-topic relation could increase the accuracy of topic labels [35]. Hulpus et al proposed a graph-based approach for topic labeling [36]. In Yashar Mehdad's work, they built an entailment graph over phrases. Based on that, they then aggre- gated relevant phrases by generalization and merging [37]. Conceptual labeling is an approach to generate a minimum sized set of labels that best describe a bag of words which includes topics generated from topic modeling [38]. Concepts used in the topic labeling are taken from a semantic network and deemed appropriate using the metric Minimum Descrip- tion Length. This approach is applied after topic modeling and represents an effective way of labeling topics over existing approaches. B. Supervised Labeling Supervised Latent Dirichlet Allocation (sLDA) is a super- vised approach to labeling topics [14]. The approach includes a response variable into the LDA model to obtain latent topics that potentially provide an optimal prediction for the response variable of a new unlabeled document. This approach requires, during training, the manual input of individual topic labels and is constrained to permitting one label per topic. Similar to sLDA is Discriminative LDA (DiscLDA) which attempts to solve the same problem as sLDA, but differs in the approach [15]. The differing approach was centered around introducing a class-dependent linear transformation on the topic mixture proportions. This transformation matrix was learned through a conditional likelihood criterion. This method has the benefit of both reducing the dimension of documents in the corpus and labeling the lower dimension documents. Both sLDA and DiscLDA only allow for a supervised input set that label a single topic. An approach that allows for multiple labels in a topic is given by Labeled LDA (L- LDA) [16]. This model differs in the generation of multinomial distribution theta over the topics in the model. The scaling parameter is then modified by a label projection matrix to restrict the distribution to those topics considered most relevant to the document. C. Contextual Integration An existing approach that takes into account concepts supplied by prior sources requires a manual input set of relevant terms [39]. In the topic model then these concepts are applied to the assignment of topics to a token in a document. Alongside this concept topic modeling a hierarchical method can also be used to incorporate concepts into a hierarchical structure. This work shows the utility of bringing in prior knowledge into topic modeling. An approach that integrates Wikipedia information into the topic modeling differs than the supervised approach by only requiring an existing Wikipedia article [7]. The assumption in this work is that in the generative process the topics are selected from the Wikipedia word distributions. The results show that Wikipedia articles can be used as effective topics in topic modeling. Wikipedia again was shown as a basis for topic modeling, albeit for a tangential approach, entity disambiguation [7]. The approach involved topic modeling as a way of annotating entities in text. This involved the use of a large dataset of topics so efficient methods were introduced. Experiments against a public dataset resulted in a state of the art performance. VI. CONCLUSION We have described in this paper a novel methodology for semi-supervised topic modeling with meaningful labels, as well as provided parallel algorithms to speed up the inference process. This methodology uses prior knowledge sources to influence a topic model in order to allow the labels from these external sources to be used for topics generated over a corpus of interest. In addition, this approach results in more mean- ingful topics generated based on the quality of the external knowledge source. We have tested our methodology against the Reuters-21578 newswire collection corpus for labeling and Wikipedia as external knowledge sources. The analysis of the quality of topic models using PMI show the ability of Source- LDA to enhance existing topic models. ACKNOWLEDGMENTS This work was supported by NIH-NCI National Cancer Institute T32CA201160 to JW, the NIH-National Library of Medicine R21LM011937 to CA, and NIH U01HG008488, NIH R01GM115833, NIH U54GM114833, and NSF IIS- 1313606 to WW. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health. We would also like to thank Tianran Zhang, Jiayun Li, Karthik Sarma, Mahati Kumar, Sara Melvin, Jie Yu, Nicholas Matiasz, Ariyam Das and all the reviewers for their thoughtful input into different aspects of this paper. REFERENCES [1] D. M. Blei et al., "Latent dirichlet allocation," Journal of Machine Learning Research, vol. 3, pp. 993–1022, 2003. [2] R. S. Margalit et al., "Electronic medical record use and physician- patient communication: an observational study of Israeli primary care encounters," Patient Education and Counseling, vol. 1, pp. 131–141, 2006. [3] C. W. Arnold et al., "Clinical case-based retrieval using latent topic analysis," AMIA Annual Symposium Proceedings, vol. 2010, p. 26, 2010. [4] H. Bisgin et al., "Mining FDA drug labels using an unsupervised learning technique - topic modeling," BMC Bioinformatics, vol. 12, no. S-10, p. S11, 2011. [5] W. Speier, M. K. Ong, and C. W. Arnold, "Using phrases and document metadata to improve topic modeling of clinical reports," Journal of Biomedical Informatics, vol. 61, pp. 260–266, 2016. [Online]. Available: http://dx.doi.org/10.1016/j.jbi.2016.04.005 [6] C. C. others, "Text modeling using unsupervised topic models and [7] [8] concept hierarchies," CoRR, vol. abs/0808.0973, 2008. J. A. Hansen et al., "Probabilistic explicit topic modeling using wikipedia," in Language Processing and Knowledge in the Web - 25th International Conference, GSCL 2013, Darmstadt, Germany, September 25-27, 2013. Proceedings, ser. Lecture Notes in Computer Science, I. Gurevych, C. Biemann, and T. Zesch, Eds., vol. 8105. Springer, 2013, pp. 69–82. [Online]. Available: http://dx.doi.org/10. 1007/978-3-642-40722-2 J. Jagarlamudi et al., "Incorporating lexical priors into topic models," in EACL 2012, 13th Conference of the Association for Computational Linguistics, Avignon, France, April 23-27, 2012, W. Daelemans, M. Lapata, and L. M`arquez, Eds. The Association for Computer Linguistics, 2012, pp. 204–213. [Online]. Available: http://aclweb.org/anthology-new/E/E12/ the European Chapter of [9] T. P. Minka, "Bayesian inference, entropy, and the multinomial distri- bution," 2000. [10] T. L. Griffiths and M. Steyvers, "Finding scientific topics," Proceedings of the National Academy of Sciences, vol. 101, no. Suppl. 1, pp. 5228– 5235, Apr. 2004. [11] W. M. Darling, "A theoretical and practical implementation tutorial on topic modeling and gibbs sampling," in Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies, 2011, pp. 642–647. [12] T. Griffiths, "Gibbs sampling in the generative model of latent dirichlet allocation," 2002. [13] M. W. Beck, "Average dissertation and thesis length," https://github. com/fawda123/diss proc, 2014. in Neural [14] D. M. Blei and J. D. McAuliffe, "Supervised topic models," 20, the Twenty-First Annual Conference on Neural Systems, Vancouver, British Columbia, Platt, D. Koller, Inc., [Online]. Available: http://papers.nips.cc/book/ in Advances Proceedings of Information Processing Canada, December Y. Singer, and S. T. Roweis, Eds. 2007, pp. 121–128. advances-in-neural-information-processing-systems-20-2007 Information Processing Curran Associates, Systems 3-6, 2007, J. C. [15] S. Lacoste-Julien et al., "Disclda: Discriminative learning for dimensionality reduction and classification," in Advances in Neural Information Processing Systems 21, Proceedings of the Twenty- Second Annual Conference on Neural Information Processing Systems, Vancouver, British Columbia, Canada, December 8-11, 2008, D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, Eds. Curran Associates, Inc., 2008, pp. 897–904. [Online]. Available: http://papers.nips.cc/ book/advances-in-neural-information-processing-systems-21-2008 [16] D. Ramage et al., "Labeled LDA: A supervised topic model for credit attribution in multi-labeled corpora," in Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing, EMNLP 2009, 6-7 August 2009, Singapore, A meeting of SIGDAT, a Special Interest Group of the ACL. ACL, 2009, pp. 248–256. [17] Y. Wang et al., "PLDA: parallel latent dirichlet allocation for large-scale applications," in Algorithmic Aspects in Information and Management, 5th International Conference, AAIM 2009, San Francisco, CA, USA, June 15-17, 2009. Proceedings, ser. Lecture Notes in Computer Science, A. V. Goldberg and Y. Zhou, Eds., vol. 5564. [Online]. Available: http://dx.doi.org/10.1007/978-3-642-02158-9 Springer, 2009, pp. 301–314. [18] D. Newman et al., "Distributed inference for in Advances latent dirichlet in Neural Information Processing allocation," the Twenty-First Annual Conference Systems 20, Proceedings of on Neural Information Processing Systems, Vancouver, British Columbia, Canada, December 3-6, 2007, J. C. Platt, D. Koller, Y. Singer, and S. T. Roweis, Eds. Inc., 2007, pp. 1081–1088. [Online]. Available: http://papers.nips.cc/book/ advances-in-neural-information-processing-systems-20-2007 I. Porteous et al., "Fast collapsed gibbs sampling for latent dirichlet allocation," in Proceedings of the 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Las Vegas, Nevada, USA, August 24-27, 2008, Y. Li, B. Liu, and S. Sarawagi, Eds. ACM, 2008, pp. 569–577. Curran Associates, [19] [20] G. E. Blelloch, "Prefix sums and their applications," Synthesis of Parallel Algorithms, Tech. Rep., 1990. [21] H. M. Wallach et al., "Rethinking LDA: why priors matter," in Advances in Neural Information Processing Systems 22: 23rd Annual Conference on Neural Information Processing Systems 2009. Proceedings of a meeting held 7-10 December 2009, Vancouver, British Columbia, Canada., Y. Bengio, D. Schuurmans, J. D. Lafferty, C. K. Curran Associates, [Online]. Available: http: //papers.nips.cc/paper/3854-rethinking-lda-why-priors-matter Inc., 2009, pp. 1973–1981. and A. Culotta, Eds. I. Williams, [22] H. M. Wallach et al., "Evaluation methods for topic models," in Proceedings of the 26th Annual International Conference on Machine Learning, ICML 2009, Montreal, Quebec, Canada, June 14-18, 2009, ser. ACM International Conference Proceeding Series, A. P. Danyluk, L. Bottou, and M. L. Littman, Eds., vol. 382. ACM, 2009, pp. 1105– 1112. [Online]. Available: http://doi.acm.org/10.1145/1553374.1553515 [23] G. Heinrich, "Parameter estimation for text analysis," University of [24] [25] Leipzig, Tech. Rep, 2008. J. Kang et al., "Transfer topic modeling with ease and scalability," in Proceedings of the Twelfth SIAM International Conference on Data Mining, Anaheim, California, USA, April 26-28, 2012. SIAM / Omnipress, 2012, pp. 564–575. [Online]. Available: http://dx.doi.org/10.1137/1.9781611972825.49 J. Chang et al., "Reading tea leaves: How humans interpret topic models," in Advances in Neural Information Processing Systems 22: 23rd Annual Conference on Neural Information Processing Systems 2009. Proceedings of a meeting held 7-10 December 2009, Vancouver, British Columbia, Canada., Y. Bengio, D. Schuurmans, J. D. Lafferty, C. K. I. Williams, and A. Culotta, Eds. Curran Associates, Inc., 2009, pp. 288–296. [Online]. Available: http://papers.nips.cc/paper/ 3700-reading-tea-leaves-how-humans-interpret-topic-models [26] C. W. Arnold, A. Oh, S. Chen, and W. Speier, "Evaluating topic model interpretability from a primary care physician perspective," Computer Methods and Programs in Biomedicine, vol. 124, pp. 67–75, 2016. [Online]. Available: http://dx.doi.org/10.1016/j.cmpb.2015.10.014 "Medlineplus [internet]," https://www.nlm.nih.gov/medlineplus/. [27] [28] Q. Mei et al., "Automatic labeling of multinomial topic models," in Proceedings of the 13th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Jose, California, USA, August 12-15, 2007, P. Berkhin, R. Caruana, and X. Wu, Eds. ACM, 2007, pp. 490–499. [29] Q. Mei et al., "A probabilistic approach to spatiotemporal theme pattern mining on weblogs," in Proceedings of the 15th international conference on World Wide Web, WWW 2006, Edinburgh, Scotland, UK, May 23-26, 2006, L. Carr, D. D. Roure, A. Iyengar, C. A. Goble, and M. Dahlin, Eds. ACM, 2006, pp. 533–542. [30] Q. Mei and C. Zhai, "Discovering evolutionary theme patterns from text: an exploration of temporal text mining," in Proceedings of the Eleventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Chicago, Illinois, USA, August 21-24, 2005, R. Grossman, R. J. Bayardo, and K. P. Bennett, Eds. ACM, 2005, pp. 198–207. [31] Q. Mei and C. Zhai, "A mixture model for contextual text mining," in Proceedings of the Twelfth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Philadelphia, PA, USA, August 20-23, 2006, T. Eliassi-Rad, L. H. Ungar, M. Craven, and D. Gunopulos, Eds. ACM, 2006, pp. 649–655. [32] X. Wang and A. McCallum, "Topics over time: a non-Markov continuous-time model of topical trends," in Proceedings of the Twelfth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Philadelphia, PA, USA, August 20-23, 2006, T. Eliassi- Rad, L. H. Ungar, M. Craven, and D. Gunopulos, Eds. ACM, 2006, pp. 424–433. J. H. Lau et al., "Automatic labelling of topic models," in The 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, Proceedings of the Conference, 19- 24 June, 2011, Portland, Oregon, USA, D. Lin, Y. Matsumoto, and R. Mihalcea, Eds. The Association for Computer Linguistics, 2011, pp. 1536–1545. [33] [34] P. Pecina, "Lexical association measures and collocation extraction," Language Resources and Evaluation, vol. 44, no. 1-2, pp. 137–158, 2010. [35] X. Mao et al., "Automatic labeling hierarchical topics," in 21st ACM International Conference on Information and Knowledge Management, CIKM'12, Maui, HI, USA, October 29 - November 02, 2012, X. Chen, G. Lebanon, H. Wang, and M. J. Zaki, Eds. ACM, 2012, pp. 2383– 2386. [Online]. Available: http://dl.acm.org/citation.cfm?id=2396761 I. Hulpus et al., "Unsupervised graph-based topic labelling using dbpedia," in Sixth ACM International Conference on Web Search and Data Mining, WSDM 2013, Rome, Italy, February 4-8, 2013, S. Leonardi, A. Panconesi, P. Ferragina, and A. Gionis, Eds. ACM, 2013, pp. 465–474. [Online]. Available: http://dl.acm.org/citation.cfm? id=2433396 [36] [37] Y. Mehdad et al., "Towards topic labeling with phrase entailment and aggregation," in Human Language Technologies: Conference of the North American Chapter of the Association of Computational Lin- guistics, Proceedings, June 9-14, 2013, Westin Peachtree Plaza Hotel, Atlanta, Georgia, USA, L. Vanderwende, H. D. III, and K. Kirchhoff, Eds. The Association for Computational Linguistics, 2013, pp. 179– 189. [38] X. Sun et al., "On conceptual labeling of a bag of words," in Proceedings of the Twenty-Fourth International Joint Conference on Artificial IJCAI 2015, Buenos Aires, Argentina, July 25-31, 2015, Q. Yang and M. Wooldridge, Eds. AAAI Press, 2015, pp. 1326–1332. [Online]. Available: http://ijcai.org/Abstract/15/191 Intelligence, [39] M. Steyvers et al., "Combining background knowledge and learned topics," topiCS, vol. 3, no. 1, pp. 18–47, 2011. [40] Y. Bengio, D. Schuurmans, J. D. Lafferty, C. K. I. Williams, and A. Culotta, Eds., Advances in Neural Information Processing Systems 22: 23rd Annual Conference on Neural Information Processing Systems 2009. Proceedings of a meeting held 7-10 December 2009, Vancouver, British Columbia, Canada. Curran Associates, Inc., 2009. [Online]. Available: http://papers.nips.cc/book/ advances-in-neural-information-processing-systems-22-2009 J. C. Platt, D. Koller, Y. Singer, and S. T. Roweis, Eds., Advances in Neural Information Processing Systems 20, Proceedings of the Twenty-First Annual Conference on Neural Information Processing Systems, Vancouver, British Columbia, Canada, December 3-6, 2007. Curran Associates, Inc., 2008. [Online]. Available: http://papers.nips. cc/book/advances-in-neural-information-processing-systems-20-2007 [41] [42] T. Eliassi-Rad, L. H. Ungar, M. Craven, and D. Gunopulos, Eds., Proceedings of the Twelfth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Philadelphia, PA, USA, August 20-23, 2006. ACM, 2006.
1303.2449
1
1303
2013-03-11T08:21:48
Using qualia information to identify lexical semantic classes in an unsupervised clustering task
[ "cs.CL" ]
Acquiring lexical information is a complex problem, typically approached by relying on a number of contexts to contribute information for classification. One of the first issues to address in this domain is the determination of such contexts. The work presented here proposes the use of automatically obtained FORMAL role descriptors as features used to draw nouns from the same lexical semantic class together in an unsupervised clustering task. We have dealt with three lexical semantic classes (HUMAN, LOCATION and EVENT) in English. The results obtained show that it is possible to discriminate between elements from different lexical semantic classes using only FORMAL role information, hence validating our initial hypothesis. Also, iterating our method accurately accounts for fine-grained distinctions within lexical classes, namely distinctions involving ambiguous expressions. Moreover, a filtering and bootstrapping strategy employed in extracting FORMAL role descriptors proved to minimize effects of sparse data and noise in our task.
cs.CL
cs
Using qualia information to identify lexical semantic classes in an unsupervised clustering task Lauren ROMEO1 Sara MENDES1,2 Núria BEL1 (1) Universitat Pompeu Fabra Roc Boronat, 138, Barcelona, Spain (2) Centro de Lingu ística da Universidade de Lisboa Avenida Professor Gama Pinto, 2, Lisboa, Portugal {lauren.romeo,sara.mendes,nuria.bel}@upf.edu ABSTRACT Acquiring lexical information is a complex problem, typically approached by relying on a number of contexts to contribute information for classification. One of the first issues to address in this domain is the determination of such contexts. The work presented here proposes the use of automatically obtained FORMAL role descriptors as features used to draw nouns from the same lexical semantic class together in an unsupervised clustering task. We have dealt with three lexical semantic classes (HUMAN, LOCATION and EVENT) in English. The results obtained show that it is possible to discriminate between elements from different lexical semantic classes using only FORMAL role information, hence validating our initial hypothesis. Also, iterating our method accurately accounts for fine-grained distinctions within lexical classes, namely distinctions involving ambiguous expressions. Moreover, a filtering and bootstrapping strategy employed in extracting FORMAL role descriptors proved to minimize effects of sparse data and noise in our task. KEYWORDS : lexical semantic classes, qualia roles, unsupervised clustering, automatic extraction of lexical information 1 Introduction Acquiring lexical information is a complex problem, typically approached by relying on a number of contexts to contribute information for classification, following the Distributional Hypothesis (Harris, 1954) and the idea of distributional similarity. In this domain it is crucial to determine which distributional information is significant to characterize lexical items. In line with Pustejovsky and Ježek (2008), we will make apparent how focusing on occurrences indicative of the FORMAL role of the Generative Lexicon (GL) theory (Pustejovsky, 1995) allows for identifying lexical semantic classes. Lexical classes are linguistic generalizations regarding characteristics of meaning that correspond to sets of properties shared by groups of words. Bybee and Hopper (2001) and Bybee (2010) state that words are organized in lexical-semantic classes defined as emergent properties of words that recurrently occur in a set of particular contexts. Though many NLP tasks rely on rich lexica annotated with lexical semantic classes, reliable lexical resources including this type of lexical information are mostly manually developed, which is unsustainable, costly and time-consuming, and makes conceiving methods to automatically acquire such information crucial. An approach for acquiring lexical semantic classes proposes to classify words according to their occurrences in contexts where other lexical items belonging to a known class also occur. Yet, this approach has some limitations, such as data sparseness and noise (see Section 2), which underline the importance of developing new strategies to improve its effectiveness. Authors such as Pustejovsky and Ježe k (2008) have shown how distributional analysis and theoretical modeling interact to account for rich variation in linguistic meaning. In line with this proposal, we evaluate the significance of specific co-occurrences whose selection was motivated by aspects of GL. This work attempts to evaluate whether information provided by qualia roles, in specific the FORMAL role, is sufficient to discriminate lexical semantic classes of English nouns. With the experiments depicted in this paper, we aim to empirically demonstrate to which extent these features draw together nouns from the same lexical semantic class in an unsupervised clustering task. In this paper, Section 2 depicts background and motivation of this work. Section 3 presents relevant information on the GL and dot-objects. Section 4 describes the methodology to automatically obtain and cluster FORMAL role descriptors of nouns. Section 5 and 6, respectively, describe and discuss results. Section 7 reflects upon lexical classes and logical polysemy and is followed by final remarks. 2 Background and Motivation Mainstream approaches to lexical semantic class acquisition classify words according to occurrences, i.e. they use the entire set of occurrences of a word to determine class membership. Yet, this approach has some limitations. Blind-theory distributional approaches have been shown to fail to account for the wide range of linguistic behavior displayed by words in language data (see Pustejovsky and Ježek (2008)), while authors such as Bel et al. (2010) reported problems caused by sparse data, or lack of evidence, and noise, or information obtained though not aimed at. Concerning sparse data in classification tasks, nouns that appear only once or twice in a corpus, and not in sought contexts, can render ineffective any classifier or clustering algorithm by not providing sufficient information for classification. We aim to soften effects of sparse data in the context of a clustering task by using a bootstrapping technique reliant on natural language inference properties (see Section 4.1). Noise, another pervasive issue in lexical semantic class acquisition, can be due to different factors: the occurrence of very general nominal expressions (e.g. “kind of”), which do not provide distinguishing lexical information; misleading corpus features; and the use of low-level tools (see Bel et al. (2012)). We assume noise resulting from errors generated by NLP tools to be typically characterized by unique occurrences and we employ a filtering strategy to overcome its possible effects (see Section 4.1). Concerning misleading corpus features, these are often caused by ambiguity of lexical items, resulting in nouns occurring in contexts not corresponding to their assumed lexical class. This presents challenging problems in classification tasks, as most authors do not distinguish among related senses of the same word, i.e. they either consider it as part of the class or not (Hindle, 1990; Bullinaria, 2008; Bel et al., 2012). This is particularly problematic when words allow for multiple selection, i.e. when different senses of the same lexical item can be simultaneously selected for in one sentence (see (1)). Known as logical polysemy, this type of ambiguity has been shown to have well-defined properties (see Pustejovsky (1995) and Buitelaar (1998)) and has been consistently reported as a factor in lexical semantic acquisition tasks. The newly constructed (LOCATION) bank offers special conditions (ORGANIZATION) to new clients. (1) Approaches in this domain have usually tried to distinguish and isolate each word sense. We address this phenomenon differently, considering polysemous nouns as members of a given ambiguity class (within a wider lexical semantic class) and making apparent the relation between members of different classes by identifying shared properties beyond class limits. Given these considerations, we assume lexical units are complex objects that display rich variations of meaning in language use, placing ourselves within a theoretical framework that provides us the tools to account for this fact. Using the levels of representation and generative mechanisms in GL, we attempt to soften the effects of the aforementioned limitations in the automatic acquisition of lexical information. 3 Generative Lexicon theory GL models the internal structure of lexical items in a computational perspective (Pustejovsky, 1995), proposing various levels of representation to semantically represent words, while allowing for the computation of meaning in context. Qualia Structure (QS) is one of these levels, consisting of 4 roles (FORMAL: what an object is; CONSTITUTIVE: what it is composed of; TELIC: its purpose; AGENTIVE: its origin), which model the predicative potential of lexical items. Here, we focus on the FORMAL role, defined as the role that distinguishes a lexical object within a larger domain (Pustejovsky, 1991). QS also models phenomena such as polysemy of lexical items inherently complex in their meaning. These instances, dot objects, are the logical pairing of senses denoted by individual types in a complex type (Pustejovsky, 1995), which can pick up distinct aspects of the object, as well as properties of more than one class (Pustejovsky and Ježek, 2008), typic ally allowing for multiple selection (see (1)). Being able to represent lexical items as complex objects is useful in the context of our work as it provides a formal explanation for words belonging to more than one type, and essentially to more than one class. Our experiment uses FORMAL role information as features for identifying lexical class membership. However, as there are no lexica available annotated with such information, we needed to obtain it automatically. Automatically extracting qualia roles with lexico-syntactic patterns has been receiving considerable attention for its success: Hearst (1992) identified lexico-syntactic patterns to acquire noun hyponyms, corresponding to the FORMAL role, whereas Cimiano and Wenderoth (2007) identified lexico-syntactic patterns to obtain information regarding semantic relations that correspond to each qualia role. As we needed information regarding the FORMAL role, not full lexical entries, in order for clusters to emerge, following Celli and Nissim (2009), we bypassed the representation of the entire QS, assuming semantic relations can be induced by matching lexico-syntactic patterns that convey a relation of interest. 4 Methodology Given the unavailability of lexica annotated with FORMAL role information, and considering our basic goal of evaluating whether this information is enough to cluster together nouns of the same class, we extracted it from a corpus using lexico-syntactic patterns, following Cimiano and Wenderoth (2007), and then used it as features for a clustering task. In the experiment performed, we employed two steps: the extraction of FORMAL role descriptors from corpus data; and the clustering of this information. To obtain FORMAL role descriptors for our unsupervised clustering task, we used a part of the UkWaC Corpus (Baroni et al., 2009), consisting of 150 million tokens. We employed 60 seed nouns pertaining to three lexical semantic classes: HUMAN, LOCATION, and EVENT. The seed nouns were said to belong to a class if they contained a sense in WordNet (Miller et al., 1990) corresponding to one of the three classes. Seed nouns were not contrasted with actual occurrences in the corpus. 4.1 Extraction of FORMAL role descriptors using lexico-syntactic patterns Firstly, seed nouns were used in handcrafted lexico-syntactic patterns, adapted from Hearst (1992) patterns and the list proposed by Cimiano and Wenderoth (2007), to extract FORMAL role descriptors. These patterns were specified through regular expressions with PoS tags given after each token. x_(or/and)_other_y x_such_as_y x_(is/are)_(a/an/the)_(kind(s)/type(s))_of_y x_(is/are)_also_known_as_y TABLE 1 – Clues on which patterns used to detect FORMAL role information in corpus data were built The information obtained was stored in vectors representing co-occurrences with seed nouns in relevant contexts (patterns), where each element corresponds to occurrences of a particular seed noun (x) with a possible FORMAL role descriptor (y), following Katrenko and Adriaans (2008). Using the clues in Table 1, we obtained 185 FORMAL role descriptors for 55 of the 60 seed nouns in 353 occurrences. Considering this, and given the properties of the clustering algorithm used (see Section 4.2) a random value would be provided to nouns not sharing feature information with any other noun in our data set. To avoid random cluster assignations and provide more significant information to the system, we filtered out the features not shared between at least two seed nouns, without controlling which class the shared features belonged to, thus maintaining an unsupervised environment. Though we employed a large set of data, there were not enough shared FORMAL role descriptors for an important part of our data set, leading us to devise a strategy to increase the information available to the clustering algorithm. a. A mammal is a [type of] animal. b. A zebra is a [type of] mammal. c. Therefore, a zebra is a [type of] animal. (2) To increase the amount of FORMAL role descriptors, we employed a bootstrapping technique (Hearst, 1998) relying on monotonic patterns for natural language inference (Hoeksema, 1986; van Behthem, 1991; Valencia, 1991), illustrated in (2). This strategy is consistent with GL lexical inheritance structure (Pustejovsky, 1995; 2001), which assumes lexical items obtain their semantic representation by accessing a hierarchy of types and inheriting information according to their QS, meaning qualia elements are viewed as categories hierarchically organized. To illustrate how this applies in our case, the HUMAN noun treasurer obtained officer as a FORMAL role descriptor, whereas officer extracted person and employee as its own FORMAL role descriptors. Assuming this lexical organization, we consider FORMAL role descriptors extracted for officer to also be features of treasurer. Thus, we gathered additional information regarding the nouns to cluster, using originally obtained FORMAL role descriptors as “seed nouns” to extract more element s in an attempt to overcome biases due to sparse data (see Section 6), as well as to reinforce information already obtained. Employing the original patterns and original extractions as seeds, we obtained information that was added to the vectors. We conducted one iteration of the bootstrapping technique, going up one level of generalization to obtain the final distribution of information below. Newly obtained information was unified with previously extracted features, filtering out any additional noise attained. Table 2 presents the final distribution of this information. Class Elements Occurrences HUMAN 61 elements 841 occurrences LOCATION 43 elements 225 occurrences EVENT 36 elements 216 occurrences TABLE 2 – Distribution of FORMAL role descriptors extracted (after filtering and bootstrapping) per class of seed noun 4.1.1 Error Analysis Basing our clustering experiment on automatically extracted FORMAL role descriptors, the accuracy of the information obtained was a concern. To assess the accuracy of the information obtained, the FORMAL role descriptors extracted were revised manually. Extractions were considered erroneous if they provided information not in accordance with the class that the seed nouns pertained to. Table 3 presents the results of this analysis. Erroneous extractions were due to faults of the extraction mechanism (i.e. problems handling phenomena such as PP attachment), PoS tagging errors, lexical ambiguity or erroneous statements in text (Katrenko and Adriaans, 2008), as well as errors due to logical polysemy (see Section 6). Note that although errors were identified, they were not filtered for the clustering task, i.e. all information (erroneous or not) was included (on the impact of errors in results see Section 6). Class HUMAN LOCATION EVENT % of accurate FORMAL role descriptors extracted 87.60% 63.54% 75.96% TABLE 3 – Percentage (%) of accurate FORMAL role descriptors obtained per class 4.2 Clustering nouns using FORMAL role information The second step of our experiment consisted in clustering nouns using the FORMAL role descriptors extracted. Given the nature of our data, we selected the sIB clustering algorithm (see Slonim et al. (2002) for a formal definition) for the manner it manages large data sets. This algorithm calculates similarity between two vectors using the Jensen-Shannon divergence, which measures similarity between probability distributions, rather than the Euclidean distance, which can bias the results when the number of attributes representing the factors is unequal (Davidson, 2002). This was our case as our feature spaces depend on the number of FORMAL role descriptors each seed noun occurred with in the corpus. To empirically demonstrate to which extent FORMAL role descriptors draw together nouns from the same class, we designed an experiment using the sIB algorithm in WEKA (Witten and Frank, 2005) to cluster seed nouns into lexical semantic classes, based only on the FORMAL role information obtained. 5 Results As mentioned, our goal was to cluster together nouns from the same lexical semantic class using only FORMAL role descriptors. As the evaluation of unsupervised distributional clustering algorithms is usually done by comparing results to manually constructed resources (see Rumshsiky et al. (2007), among others), we employed our list of pre-classified seed-words to determine if nouns of the same class clustered together. Tables 4 and 5 present clustering results. The distribution of nouns across each cluster is given by the percentage of nouns pertaining to each lexical class included in it. The total number of seed nouns in each cluster is also given. Cluster 0 Cluster 1 Cluster 2 Class 0.5714 0.9285 HUMAN 0 LOCATION 0.1429 0.3913 0.0769 0.6087 EVENT 0.2857 0 23 14 7 TOTAL NUMBER OF SEED NOUNS PER CLUSTER TABLE 4 – Distribution of nouns in a 3-way clustering so lution We experimented with a 3-way and a 4-way clustering solution. In the first, the number of clusters was defined by the number of known classes, and resulted in the clustering of HUMAN nouns (Cluster 0). LOCATION and EVENT nouns grouped together in Cluster 1, the remaining cluster being composed of nouns from all classes with very few features available (less than three), i.e. insufficient information for classification. Considering this, we employed a 4-way solution to see whether LOCATION and EVENT nouns could be discriminated. This solution distinguished between the three classes (Cluster 0, 1 and 3 in Table 5) with a fourth cluster containing the “s parse data” nouns also affecting the 3-way solution . Cluster 0 Cluster 1 Cluster 2 Cluster 3 Class 0.9286 0.5714 HUMAN 0 0 0.9 0 0.1429 0.0769 LOCATION 1 EVENT 0 0.2857 0.1 13 10 7 14 TOTAL NUMBER OF SEED NOUNS PER CLUSTER TABLE 5 – Distribution of nouns in a 4-way clustering so lution The results show that even after filtering and bootstrapping the features extracted, sparse data still affected the results. However, nouns whose most salient common trait was the lack of sufficient information were consistently grouped together. Thus, the clustering is able to both discriminate between lexical semantic classes and act as a filter to detect those nouns for which there is not sufficient information using only FORMAL role information extracted from corpus data. 6 Discussion As shown, the clustering algorithm discriminated between the three classes considered, using only the FORMAL role descriptors extracted from corpora data as features. Leaving aside the nouns for which there was not enough information available (12.7% of our data set), EVENT, HUMAN and LOCATION nouns were discriminated in the 4-way clustering solution (Clusters 0, 1 and 3 in Table 5, respectively). In this section we analyze misclassified nouns, to understand the reasons behind their misclassification, aiming to evaluate to which extent they correspond to recurring phenomena in language, which can possibly be accounted for by additional strategies. Although their impact is not significant, noisy extractions (see Section 4.1.1) play a role in misclassification. In the 4-way clustering results, for instance, an EVENT noun is included in the cluster dominated by LOCATION nouns due to errors in extraction, specifically the incorrect identification as a FORMAL role descriptor of the noun in a PP modifying the head noun of an NP, which should be the one extracted. This type of noise is mostly generated by the use of low-level NLP tools. Overall, however, the existence of some noise in the data did not significantly affect the clustering, as demonstrated by the accuracy of the results presented in the previous section. Concurrently, although general patterns can be identified in language use, one of the main characteristics of language data is its heterogeneity, which means that elements of a given lexical class do not necessarily share all their features or show perfectly matching linguistic behavior. Moreover, considering lexical items are complex objects with different semantic dimensions, they may share properties with elements of more than one lexical class. This type of phenomenon is behind some of the misclassifications in our data, such as the inclusion of factory, whose expected lexical class was LOCATION, in the HUMAN nouns cluster. This misclassification seems to be related to the fact that a part of HUMAN class members tended to obtain FORMAL role descriptors typical of HUMAN nouns, as well as of ORGANIZATION nouns, making apparent that nouns do not always occur in the sense considered in our pre-classified list of seed nouns. 7 Lexical classes and logical polysemy As aforementioned, some HUMAN nouns in our list of seed nouns obtain FORMAL role descriptors typical of ORGANIZATION nouns. This is a type of polysemy that occurred in our data only with plural HUMAN nouns, alluding to the work of Copestake (1995) and Caudal (1998), according to whom some HUMAN nouns show a specific type of polysemy when heading definite plural NPs: the polysemy between the individual HUMAN sense and the collection of HUMANs sense, which in turn is polysemous between the HUMANGROUP and ORGANIZATION senses. In (3) we see how the definite plural NP the doctors can select for the two senses typically denoted by collective nouns, while having also the possibility to denote individual entities, which is not possible with collectives (see (4a)) that cannot occur in contexts that force a distinct individual entity reading. (3) a. The doctors lay in the sun. (several individual HUMAN entities) b. The doctors protested in front of the hospital. (HUMANGROUP) c. The administration negotiated with the doctors. (ORGANIZATION) a. # The staff lay in the sun. (several individual HUMAN entities) b. The employees lay in the sun. (several individual HUMAN entities) c. The staff protested in front of the hospital. (HUMANGROUP) d. The administration negotiated with the staff. (ORGANIZATION) (4) As both collectives and definite plural NPs denote collections, Caudal (1998) states that it is desirable to account for the polysemy of such items morpho-syntactically. This analysis is further strengthened by the observation that, unlike pairs such as employee and staff, for nouns like doctor there is no lexicalization for “group of doctors” in English, the same being true for collective nouns like audience or committee, whose individual members are not lexicalized. Given such lexical gaps, morpho-syntax is the strategy available. However, though logically polysemous, plural definite NPs like the doctors do not allow for multiple selection as is typical of complex types: once the individual HUMAN sense has been selected for there is no access to the HUMANGROUP·ORGANIZATION sense, as suggested by (5) (see Buitelaar (1998) and Rumshisky et al. (2007)). The administration negotiated with the doctors, which later lay in the sun. (several individual HUMAN entities) (5) Pustejovsky (1995:155) claims these patterns of linguistic behavior are due to the information in the QS. In the case of expressions like the doctors, the dot element denoting the individual HUMAN entity and the complex type HUMANGROUP·ORGANIZATION correspond to different qualia roles, as represented in (6). Hence, the different senses of the expression cannot be selected at the same time. Going back to the case of factory, which was clustered with HUMAN nouns (see Section 6), we will see how the polysemy described above partially applies to this noun. Among the descriptors obtained for factory we found, alongside descriptors typical of LOCATION nouns, nouns such as sector, organization and profession, also extracted for HUMAN nouns showing the HUMANGROUP·ORGANIZATION logical polysemy, indicating that nouns like factory are also complex objects, as illustrated below by (7): (6) a. The factory on the corner of Main Street is big and brown. (LOCATION) b. The factory summoned a protest against the new government sanctions. (ORGANIZATION) c. There was a protest organized (ORGANIZATION) by the factory that burned down (LOCATION) last week. (7) In our data, factory shared features both with definite plural NPs headed by HUMAN nouns like teacher and employee and LOCATION nouns such as kitchen and resort. The linguistic behavior of factory can, therefore, be assumed to reflect the logical polysemy of ORGANIZATION·LOCATION·HUMANGROUP dot types identified by Rumshisky et al. (2007), and represented as follows:   factory       ganization or:y       human ] [     z·y·x QUALIA FORMAL For our work, the most relevant aspect of the behavior displayed by nouns like factory is that it makes apparent how our strategy to extract FORMAL role descriptors reflects the ambiguity of nouns to be ARGSTR location = = =     ARG3 ARG1 :x :z = ARG2 = = (8) clustered, which is often difficult to handle in NLP, particularly in classification tasks. The clustering solutions we obtained (see Section 5) grouped together HUMAN nouns, both those that display the ambiguity discussed in this section and those that do not, the same being true for LOCATION nouns. And yet, polysemous nouns display features that clearly point towards the existence of finer-grained distinctions, i.e. sub-classes within lexical semantic classes. This way, particularly given that these fine- grained distinctions are mirrored in FORMAL role descriptors, we assume it should also be possible to automatically recognize groups of nouns within the same ambiguity class, i.e. dot objects. Hence, we expected the clustering algorithm to identify polysemous lexical items and distinguish them from other members of the same class. To validate this hypothesis we performed an additional iteration of the clustering using the same features and algorithm over previously identified clusters. The iteration was run individually over Clusters 1 and 3 (LOCATION and HUMAN noun clusters, respectively) from our 4-way clustering solution, as both clusters contained logically polysemous nouns. We obtained a 2-way clustering solution for each class, aiming to discriminate nouns strictly containing the LOCATION sense and those reflecting the polysemy described above for factory, on one hand, and nouns in the HUMAN·HUMANGROUP·ORGANIZATION ambiguity class from those strictly denoting human individuals on the other. Cluster 1 split into 2 clusters distinguishing between polysemous LOCATION nouns and those that are not, whereas for Cluster 3 the clustering algorithm arrived at a near perfect distinction of dot object nouns and non-ambiguous HUMAN nouns. The noun factory clustered with polysemous HUMAN nouns, once more confirming its semantic proximity with nouns of the HUMAN·HUMANGROUP·ORGANIZATION type. Hence, a second iteration of the same clustering algorithm over the same feature vectors was able to identify finer-grained distinctions within lexical classes, automatically recognizing groups of nouns in the same ambiguity class. In doing this, we validate our analysis regarding the role of logical polysemy and dot object types in the clustering solutions obtained, and further strengthen our original hypothesis. Final remarks In this paper, we proposed using automatically obtained FORMAL role descriptors as features to draw together nouns from the same lexical semantic class in an unsupervised clustering task. As there were no available lexica annotated with such information, we obtained it automatically and carried out clustering experiments. In line with the results, our initial hypothesis was supported: in an unsupervised clustering task using FORMAL role descriptors automatically extracted from corpora data as features, we showed it was possible to discriminate between elements of different lexical semantic classes. The filtering and bootstrapping strategy employed proved to minimize effects of sparse data and noise in our task. As shown in the 4-way clustering solution (see Table 5), the clustering exercise, as we designed it, also discriminated the nouns for which there was not sufficient information for a decision to be made on their membership to a cluster corresponding to one of the classes considered. Finally, we explained misclassifications through logical polysemy and showed how the method outlined in this paper allows for making finer-grained distinctions within lexical classes, recognizing lexical items in the same ambiguity class. The results depicted in this paper demonstrate the validity of our hypothesis, while simultaneously showing that it is possible to incorporate the polysemous behavior of nouns in classification tasks (Hindle, 1990; Bullinaria, 2008) by using an approach that minimizes the effects of sparse data and noise (Bel et al., 2010; 2012). Considering these promising results, in future work we will address the possibility of extending our experiments to other qualia roles, as well as to other lexical semantic classes. At a more applied level, a further step consists in evaluating the feasibility of this approach to automatically extract lexical semantic classes in the automatic acquisition of rich language resources. Acknowledgments This work was funded by the EU 7FP project 248064 PANACEA and the UPF-IULA PhD grant program, with the support of DURSI, and by FCT post-doctoral fellowship SFRH/BPD/79900/2011. References Baroni, M., Bernardini, S., Ferraresi, A. and Zanchetta, E. (2009). The WaCky Wide Web: A Collection of Very Large Linguistically Processed Web-Crawled Corpora. Language Resources and Evaluation, 43(3), 209-226. Bel, N., Coll, M. and Resnik, G. (2010). Automatic detection of non-deverbal event nouns for quick lexicon production. In Proceedings of the 23rd International Conference on Computational Linguistics, (COLING 2010), Beijing, China (pp. 46-52). Bel, N., Romeo, L. and Padró, M. (2012). Automatic Lexical Semantic Classification of Nouns. In Proceedings of the Language Resources and Evaluation Conference (LREC 2012), Istanbul, Turkey. Buitelaar, (1998). CoreLex: P. Doctoral dissertation, Brandeis University. Systematic Polysemy and Underspecification. Bullinaria, J.A. (2008). Semantic Categorization Using Simple Word Co-occurrence Statistics. In M. Baroni, S. Evert and A. Lenci (Eds.), Proceedings of the ESSLLI Workshop on Distributional Lexical Semantics, 1-8. Hamburg, Germany. Bybee, J. L. and Hopper, P. (2001). Frequency and the emergence of language structure. Amsterdam: John Benjamins. Bybee, J. (2010). Language, usage and cognition. Cambridge: Cambridge University Press. Caudal, P. (1998). Using complex lexical types to model the polysemy of collective nouns within the Generative Lexicon. In Proceedings of the Ninth International Workshop on Database and Expert Systems Applications, Viena, Austria (pp.154-159). Celli, F., Nissim, M., (2009) Automatic Identification of semantic relation in Italian complex nominals, In Proceedings of the 8th International Conference on Computational Semantics (IWCS- 8), Tilburg, Netherlands. Cimiano, P. and Wenderoth, J. (2007). Automatic Acquisition of Ranked Qualia Structures from the Web. In Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics, Prague, Czech Republic (pp.888-895). Copestake, A. (1995). The representation of group denoting nouns in a lexical knowledge base. In P. Saint Dizier and E. Viegas (Eds.) Computation Lexical Semantics (pp. 207-230). Cambridge: Cambridge University Press. Davidson, I. (2002). Understanding K-means non-hierarchical clustering. (Tech. Rep. 02-2). Albany: State University of New York. Harris, Z. (1954). Structural Linguistics. Chicago: Chicago University Press. Hearst, M. (1992). Automatic acquisition of hyponyms from large text data. In Proceedings of the 14th International Conference on Computational Linguistics (COLING 92), Nantes, France (pp. 539-545). Hearst, M. (1998). Automated Discovery of Word-Net relations. In C. Fellbaum (Ed.), An Electronic Lexical Database and Some of Its Applications (pp. 131-153). Cambridge: The MIT Press. Hindle, D. (1990). Noun classification from predicate-argument structures. In Proceedings of the 28th Annual Meeting of the Association for Computational Linguistics, Pittsburgh. Pennsylvania (pp. 268-275). Hoeksema J. (1986). Monotonicity Phenomena in Natural Language. Linguistic Analysis, 16, 25-40. Katrenko, S. and Adriaans, P. (2008). Qualia Structures and their Impact on the Concrete Noun Categorization Task. In Proceedings of the "Bridging the gap between semantic theory and computational simulations" workshop ( ESSLLI 2008), Hamburg, Germany. Miller, G.A., Beckwith, R., Fellbaum, C., Gross, D. and Miller, K.J. (1990). Introduction to WordNet: An online lexical database. International Journal of Lexicography, 3(4), 235-44. Pustejovsky, J. (1991). The Generative Lexicon. Computational Linguistics. 17(4), 409–41. Pustejovsky, J. (1995). Generative Lexicon. Cambridge: The MIT Press. Pustejovsky, J. (2001). Type Construction and the Logic of Concepts. In P. Bouillon and F. Busa (Eds.), The Language of Word Meaning (pp. 91-123). Cambridge: Cambridge University Press. Pustejovsky, J. and Ježek, E. (2008). Semantic coer cion in language. beyond distributional analysis. Italian Journal of Linguistics, 20(1), 175-208. Rumshisky, A., Grinberg, V. and Pustejovsky, J. (2007). Detecting Selectional Behavior of Complex Types in Text. In 4th International Workshop on Generative Lexicon, Paris, France. Slonim, N., Friedman, N. and Tishby, N. (2002). Unsupervised document classification using sequential information maximization. In Proceedings of the 25th International ACM SIGIR Conference on Research and Development in Information Retrieval, Tampere, Finland (pp.129- 136). Valencia, V. (1991). Studies on Natural Logic and Categorial Grammar. Doctoral dissertation, University of Amsterdam. van Benthem, J. (1991). Language in Action: Categories Lambdas and Dynamic Logic. North Holland: Elsevier Science Publishers. Witten, I.H. and Frank, E. (2005). Data Mining: Practical machine learning tools and techniques (2nd ed.). San Francisco: Morgan Kaufmann.
1803.00902
1
1803
2018-03-02T15:41:33
DEMorphy, German Language Morphological Analyzer
[ "cs.CL" ]
DEMorphy is a morphological analyzer for German. It is built onto large, compactified lexicons from German Morphological Dictionary. A guesser based on German declension suffixed is also provided. For German, we provided a state-of-art morphological analyzer. DEMorphy is implemented in Python with ease of usability and accompanying documentation. The package is suitable for both academic and commercial purposes wit a permissive licence.
cs.CL
cs
DEMorphy, German Language Morphological Analyzer Duygu Altinok Berlin, Germany Abstract. DEMorphy is a morphological analyzer for German. It is built onto large, compactified lexicons from German Morphological Dictionary. A guesser based on German declension suffixes is also provided. For German, we provided a state-of-art morphological analyzer. DEMorphy is implemented in Python with ease of usability and accompanying documentation. The package is suitable for both academic and commercial purposes with a permissive licence. Keywords: morphological analyzer, lemmatizer, German, German language, demorphy, DEMorphy, German Morphological Dictionary, gmd 1. INTRODUCTION Morphological analysis is analysis of structure of the word forms. For morphologically complex languages such as Turkish, Finnish, German; a full morphological analysis provides information about word category (noun, verb, adjective etc.), word lemma, number, gender, person etc. In these languages morphology derives syntax, word analysis also provides information about possible POS tags (or vice versa, syntax determines feasible morphological forms. Here, morphology↔syntax implication is always two-sided). Morphological analysis units, either rule-based or unsupervised statistical, is an important step of modern NLP pipelines. From statistical machine translation to sentiment analysis, training morphology aware NNs to semantic search; morphological analysis keeps its importance in modern NLP pipelines. Morphological generation is the process of creating word forms as appear in the language from a base form and analysis. Roughly, given the lemma(s) and a list of inflections and derivations, finding the correct word form is called generation. DEMorphy is a morphological analyzer for German language. The package is available under MIT Licence and itself uses another open source library. DEMorphy is an efficient, DAFSA based Python implementation. Unlike other similar freely available German analyzers SMOR and Morphisto , DEMorphy is implemented in native Python and does not require any extra Python bindings or extra system calls at runtime. DEMorphy is production-ready, brings predictable runtime quality and provides predictable concurrency behaviour (following well-understood Python concurrency model). Rest of the paper is organized as follows: Section 2 explains details about the German Morphological Dictionary . In section 3, software architecture and implementation details will be given. Section 4 contains details of the morphological analysis process. Section 5 outlines a roadmap for future improvements and new features. 4 1 2 3 1 ​https://github.com/DuyguA/DEMorphy 2 ​http://www.cis.uni-muenchen.de/~schmid/tools/SMOR/ 3 ​http://www1.ids-mannheim.de/lexik/home/lexikprojekte/lexiktextgrid/morphisto.html 4 ​https://github.com/DuyguA/german-morph-dictionaries 2. GERMAN MORPHOLOGICAL DICTIONARY 6 5 gmd is a German lexicon and analysis dictionary, it contains lexicon words and list of their all possible analysis. gmd is generated by running our in-house morphological analyzer on Wikidumps corpus. Interjections, modular verbs, auxiliary verbs, particles, conjunctions, determiners and articles (i.e. closed grammatical categories of the German language) is processed with extra care and appears at the beginning of the text file. Dictionary format is plain text, which is suitable for converting to other formats such as XML, for different purposes. gmd consists of (a) Word forms as they appear in written language, inflected, derived forms and compounds included. Each word form is followed by list of its possible analysis. (b) Experimental analysis dictionary (c) List of all lemmas that occur in (a) (d) List of all paradigms that occurs in (a) A typical entry looks like: gegangen gegangen ADJ,pos,<pred> gegangen ADJ,pos,<adv> gehen V,ppast Analysis lines are of the form (lemma, paradigm). A paradigm is a list of - Grammatical category as first entry, always - Gender, number, person, positive/comparative/superlative etc. list of inflections separated by commas. Our in-house analyzer can - - - - split compounds i.e. list all possible splits of a compound, show bounding morphemes between compound elements, analyze derivation, analyze inflection. Also, our in-house analyzer is - - - FST based and compiled from marked lexicon, compiled with OpenFST, efficient, can be processed by Python via PyFST directly without needing external Python binders; fully Python compatible and reliable for software production. 5 ​https://github.com/DuyguA/german-morph-dictionaries 6 ​https://dumps.wikimedia.org/dewiki/latest/ However, DEMorphy does not include all capabilities of our in-house analyzer. We currently provide only the inflection analysis. Derivational analysis and compound splitting is not included. Hence a typical compound analysis looks like: Rohrohrzucker Rohrohrzucker NN,masc,acc,plu Rohrohrzucker NN,masc,acc,sing Rohrohrzucker NN,masc,nom,sing Rohrohrzucker NN,masc,gen,plu Rohrohrzucker NN,masc,dat,sing Rohrohrzucker NN,masc,nom,plu whereas output of our in-house tool is: Roh<#>rohr<#>zucker NN,masc,acc,plu Roh<#>rohr<#>zucker NN,masc,acc,sing Roh<#>rohr<#>zucker NN,masc,nom,sing Roh<#>rohr<#>zucker NN,masc,gen,plu Roh<#>rohr<#>zucker NN,masc,dat,sing Roh<#>rohr<#>zucker NN,masc,nom,plu. While preparing analysis of the compounds, first we took all possible splits, then filtered by (1) feasible POS tag combinations (2) with a language model to eliminate "nonsense" analyses. For instance, in the above example analysis rohr<#>ohr<#>zucker (​pipe ear sugar​) is eliminated by (2). The experimental word forms is the list of word analysis that is produced by our "guesser". Basically we separated analysis that developers should use at their "own risk" into a separate list. The dictionary size is 340MB, experimental forms dictionary is sized 15MB. An encoded form is also available, lemma and paradigm strings are encoded to numbers pointing to the lemmas list and the paradigms list. The encoded dictionary size is 135MB, list of all lemmas is 18MB and paradigms list is 20KB. Number of all inflectional paradigms is 643 with a total number of 1.187.013 possible lemmas. Together with the experimental forms the morphological dictionary contains 12.066.971 entries with a lexicon size 2.168.203 word forms. 3. SOFTWARE ARCHITECTURE 7 DEMorphy is implemented as a Python library. Both Python 2.x and Python 3.x are supported. Documentation is available online. The average parsing speed is around 15 000 - 20 000 words per second. Memory consumption of the compacted dictionaries is about 100 MB, together with the Python interpreter 120 MB. Users are provided with library code for obtaining word analysis, word lemma, possible POS tags in both Stuttgart (STTS) and Penn Tree Bank (PTB) tags as well as iterators over the all lexicon. All possible analysis of a given word is provided, choosing which one to use is to be determined the user. Cache implementations are also provided within the package. An LRU cache implementation provides users obtaining analysis with cache lookup. The LRU cache proves efficiency on average length German text, conjunctions, pronouns, auxiliary verbs, modal verbs, articles, determiners and context words appear over and over again. Instead of computing same word's analysis over and over, user can cache the analysis result. An unlimited cache implementation is also provided, however not recommended; LRU cache would be enough and well-performing. 8 4. ANALYSIS DEMorphy relies on a compacted form of German Morphological Dictionary as we remarked before. End users do not have to compile the compacted dictionary themselves, we will deliver precompiled dictionaries on updates. Morphological analysis indeed is just dictionary lookup in DAFSA. Given a word, we fetch all possible analysis strings. From the plain text dictionary file, one can build a Python dictionary (a hashmap) and query the input words. However, this approach might have some problems: - Memory-killer: Words belong to same paradigms usually have same endings, for instance imfendem​, ​informierendem​, ​gehendem​, ​abgehendem​, ​umgehendem;​ especially declensions. Also, inflections of the same lemma share long prefixes, for instance kurieren​, ​kurierend​, ​kurierende​, ​kurierender​, ​kurierendes​,​ kurierst​. Common prefixes such as ​um​, ​ab​ also occurs frequently e.g. ​melden​, ​anmelden​, ​abmelden​, ​nachmelden​, ummelden​, ​vermelden​, ​weitermelden​, ​zurückmelden​. It is not very storage friendly to store the same substrings again and again. (1)Θ lookup, however hash function needs to go - Time efficiency: Hashmap provides over all characters of the input string 1-by-1. If one is interested in fuzzy lookup, then all options need to be generated and looked up 1-by-1. For instance, if "u" can be both "u" and "ü", then we need 2 lookups. This situation happens quite a lot with the German umlauts. 7 ​http://www.ims.uni-stuttgart.de/forschung/ressourcen/lexika/TagSets/stts-table.html 8 ​https://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html To compactify the common substrings and enable fast access together with fast fuzzy lookup; DEMorphy stores the words in a DAFSA using DAWG library. DAWG is a Cython based, low-level, efficient, unicode supporting Python library. Information about lemma and paradigm string is encoded as positive integers, pointing to real strings in lemma list and paradigm list. DAFSA​ Directed acyclic graphs are widely used in NLP, computational morphology and IR tasks. DEMorphy stores word forms in DAFSA as well, due to 9 - Memory efficiency - - - Fast lookup Fast fuzzy lookup Flexible iteration support Here is an example how common endings are stored: Figure 1: Common Endings Storage DAFSA for German lexicon of 12.066.971 entries is about 100MB, whereas the plain text file is 135MB. Fuzziness caused by the German umlaut characters are handled efficiently by DAFSA as well. Take the example "grün". It is quite possible that it is written as "grun" by a non-German keyboard. We provide DAFSA a character mapping, in which characters might represent more than one character, a character set. DAWG allows 1-to-1 character mappings, hence we provided u → ü, o → ö, a → ä mappings. While scanning the input string "grun", at the second state, DAFSA permits possible u → ü replacement and correctly reaches the acceptance state. DAWG allows only 1-to-1 mappings, hence we dealt with ue → ü , oe → ö, ae → ä, ss → ß, ß → ss with another method. 9 ​https://pypi.python.org/pypi/DAWG Figure 2: Input String "grun" scanning left to right OOV​ ​OOV is handled by prefix and suffix analogies. Currently we support obvious verb endings such as ​test​, ​tet​, ​tem​, ​ten​ etc. by a suffix-prefix-infix analyzer. In the future, we plan to expand recognition by a character level language model. Compound Words​ As we remarked before, DEMorphy does not carry all capabilities of our in-house analyzer. Our in-house analyzer analyzes compounds completely, exhibiting component word boundaries, linking morphemes and then the derivations and the inflections. DEMorphy does not provide a full analysis, rather provides the lemma and the inflections; just as rest of the lexicon words. However, compound words processed carefully before shipped to the morphological dictionary. Our in-house tool generated all possible splits, then we filtered by impossible POS tag combinations (e.g. beiden is not bei<#>den) and a language model. We already gave the example "Rohrohrzucker", has 2 possible splits rohr<#>ohr<#>zucker ​(pipe ear sugar​) and roh<#>rohr<#>zucker (​raw cane sugar​). The language model eliminated the first form because "it does not make sense", i.e. it admits a very low probability. In general, we used the heuristic that "less split is better than more splits". If a compound admits a 2 words split and a 3 words split, we preferred the former. Words with a Hyphen​ is processed by STTS notation, ​TRUNC​. We included them into lemma, rather than the analysis. For instance, lemma of "U-Bahn" is ​U-(TRUNC)Bahn​ and lemma of "U-Bahn-Station" is ​U-(TRUNC)Bahn-(TRUNC)Station​. Other Types of Tokens​ For the tokens that are part of the written language but not German language lexicon, for instance e-mails, date strings, url strings etc. DEMorphy contains a special processing unit. This unit first evaluates if word belongs to one of these classes, if so do not ask the analyzer and directly provide the token type as a result. 5. FUTURE WORK New versions will include - Better analogy analyzer - Character level language model support - Detailed support on the geographical names, proper nouns (first names, last names, company names, brand names), abbreviations - More work on the experimental dictionary Though DEMorphy is fast enough, there is always room for further time efficiency improvements. 6. REFERENCES Python Software Foundation. Python Language Reference, version 2.7. Available at http://www.python.org Escart ın, C. P. (2014). Chasing the Perfect Splitter: A Comparison of Different Compound Splitting Tools. In Proceedings of the Ninth International Conference on Language Resources and Evaluation, pages 3340–3347, Reykjavik Fabienne Fritzinger , Alexander Fraser, How to avoid burning ducks: combining linguistic analysis and corpus statistics for German compound processing, Proceedings of the Joint Fifth Workshop on Statistical Machine Translation and MetricsMATR, p.224-234, July 15-16, 2010, Uppsala, Sweden Helmut Schmid, Arne Fitschen and Ulrich Heid: SMOR: A German Computational Morphology Covering Derivation, Composition, and Inflection, ​Proceedings of the IVth International Conference on Language Resources and Evaluation (LREC 2004)​, p. 1263-1266, Lisbon, Portuga​l Koehn, P., Knight, K.: Empirical Methods for Compound Splitting. Proc. 10th Conf. of the European Chapter of the Association for Computational Linguistics (EACL). Budapest, Hungary (2003) 347–35 Korobov, Mikhail: Morphological Analyzer and Generator for Russian and Ukranian Languages, CoRR, abs/1503.07283, 2015 Zielinski A., Simon C., Wittl T. (2009) Morphisto: Service-Oriented Open Source Morphology for German. In: Mahlow C., Piotrowski M. (eds) State of the Art in Computational Morphology. SFCM 2009. Communications in Computer and Information Science, vol 41. Springer, Berlin, Heidelberg
1907.08948
1
1907
2019-07-21T10:00:28
Hindi Visual Genome: A Dataset for Multimodal English-to-Hindi Machine Translation
[ "cs.CL" ]
Visual Genome is a dataset connecting structured image information with English language. We present ``Hindi Visual Genome'', a multimodal dataset consisting of text and images suitable for English-Hindi multimodal machine translation task and multimodal research. We have selected short English segments (captions) from Visual Genome along with associated images and automatically translated them to Hindi with manual post-editing which took the associated images into account. We prepared a set of 31525 segments, accompanied by a challenge test set of 1400 segments. This challenge test set was created by searching for (particularly) ambiguous English words based on the embedding similarity and manually selecting those where the image helps to resolve the ambiguity. Our dataset is the first for multimodal English-Hindi machine translation, freely available for non-commercial research purposes. Our Hindi version of Visual Genome also allows to create Hindi image labelers or other practical tools. Hindi Visual Genome also serves in Workshop on Asian Translation (WAT) 2019 Multi-Modal Translation Task.
cs.CL
cs
HINDI VISUAL GENOME: A DATASET FOR MULTIMODAL ENGLISH-TO-HINDI MACHINE TRANSLATION A PREPRINT Shantipriya Parida Ondrej Bojar∗ Charles University, Faculty of Mathematics and Physics, Institute of Formal and Applied Linguistics, Malostranské namestí 25, 118 00 Prague, Czech Republic {parida,bojar}@ufal.mff.cuni.cz Satya Ranjan Dash School of Compter Application, KIIT University, Bhubaneswar-24, Odisha, India [email protected] July 23, 2019 ABSTRACT Visual Genome is a dataset connecting structured image information with English language. We present "Hindi Visual Genome", a multimodal dataset consisting of text and images suitable for English-Hindi multimodal machine translation task and multimodal research. We have selected short English segments (captions) from Visual Genome along with associated images and automatically translated them to Hindi with manual post-editing which took the associated images into account. We prepared a set of 31525 segments, accompanied by a challenge test set of 1400 segments. This challenge test set was created by searching for (particularly) ambiguous English words based on the embedding similarity and manually selecting those where the image helps to resolve the ambiguity. Our dataset is the first for multimodal English-Hindi machine translation, freely available for non- commercial research purposes. Our Hindi version of Visual Genome also allows to create Hindi image labelers or other practical tools. Hindi Visual Genome also serves in Workshop on Asian Translation (WAT) 2019 Multi-Modal Translation Task. Keywords Visual Genome · Multimodal Corpus · Parallel Corpus · Word Embedding · Neural Machine Translation (NMT) · Image Captioning 1 Introduction Multimodal content is gaining popularity in machine translation (MT) community due to its appealing chances to improve translation quality and its usage in commercial applications such as image caption translation for online news articles or machine translation for e-commerce product listings [1, 2, 3, 4]. Although the general performance of neural machine translation (NMT) models is very good given large amounts of parallel texts, some inputs can remain genuinely ambiguous, especially if the input context is limited. One example is the word "mouse" in English (source) which can be translated into different forms in Hindi based on the context (e.g. either a computer mouse or a small rodent). There is a limited number of multimodal datasets available and even fewer of them are also multilingual. Our aim is to extend the set of languages available for multimodal experiments by adding a Hindi variant of a subset of Visual Genome. Visual Genome (http://visualgenome.org/, [5]) is a large set of real-world images, each equipped with annotations of various regions in the image. The annotations include a plain text description of the region (usually sentence parts or short sentences, e.g. "a red ball in the air") and also several other formally captured types of information (objects, ∗Corresponding author Table 1: Hindi Visual Genome corpus details. One item consists of an English source segment, its Hindi translation, the image and a rectangular region in the image. A PREPRINT - JULY 23, 2019 Data Set Training Set Development Test Set (D-Test) Evaluation Test Set (E-Test) Challenge Test Set (C-Test) Items 28,932 998 1595 1,400 attributes, relationships, region graphs, scene graphs, and question-answer pairs). We focus only on the textual descriptions of image regions and provide their translations into Hindi. The main portion of our Hindi Visual Genome is intended for training purposes of tools like multimodal translation systems or Hindi image labelers. Every item consists of an image, a rectangular region in the image, the original English caption from Visual Genome and finally our Hindi translation. Additionally, we create a challenge test set with the same structure but a different sampling that promotes the presence of ambiguous words in the English captions with respect to their meaning and thus their Hindi translation. The final corpus statistics of the "Hindi Visual Genome" are in Table 1. The paper is organized as follows: In Section 2, we survey related multimodal multilingual datasets. Section 3 describes the way we selected and prepared the training set. Section 4 is devoted to the challenge test set: the method to find ambiguous words and the steps taken when constructing the test set, its final statistics and a brief discussion of our observations. We conclude in Section 5. Creating such a dataset enables multimodal experimenting with Hindi for various applications and it can also facilitate the exploration of how the language is grounded in vision. 2 Related Work Multimodal neural machine translation is an emerging area where translation takes more than text as input. It also uses features from image or sound for generating the translated text. Combining visual features with language modeling has shown better result for image captioning and question answering [6, 7, 8]. Many experiments were carried out considering images to improve machine translation, i.a. for resolving ambiguity due to different senses of words in different contexts. One of the starting points is "Flickr30k" [9], a multilingual (English-German, English-French, and English-Czech) shared task based on multimodal translation was part of WMT 2018 [10]. [11] proposed a multimodal NMT system using image feature for Hindi-English language pair. Due to the lack of English-Hindi multimodal data, they used a synthetic training dataset and manually curated development and test sets for Hindi derived from the English part of Flickr30k corpus [12]. [13] proposed a probabilistic method using pictures for word prediction constrained to a narrow set of choices, such as possible word senses. Their results suggest that images can help word sense disambiguation. Different techniques then followed, using various neural network architectures for extracting and using the contextual information. One of the approaches was proposed by [1] for multimodal translation by replacing image embedding with an estimated posterior probability prediction for image categories. 3 Training Set Preparations To produce the main part of our corpus, we have automatically translated and manually post-edited the English captions of "Visual Genome" corpus into Hindi. The starting point were 31525 randomly selected images from Visual Genome. Of all the English-captioned regions available for each of the images, we randomly select one. To obtain the Hindi translation, we have followed these steps: 1. We translated all 31525 captions into Hindi using the NMT model (Tensor-to-Tensor, [14]) specifically trained for this purpose as described in [15]. 2. We uploaded the image, the source English caption and its Hindi machine translation into a "Translation Validation Website",2 which we designed as a simple interface for post-editing the translations. One important 2http://ufallab.ms.mff.cuni.cz/~parida/index.html 2 A PREPRINT - JULY 23, 2019 Figure 1: Overall pipeline for ambiguous word finding from input corpus. feature was the use of a Hindi on-screen keyboard3 to enable proper text input even for users with limited operating systems. 3. Our volunteers post-edited all the Hindi translations. The volunteers were selected based on their Hindi language proficiency. 4. We manually verified and finalized the post-edited files to obtain the training and test data. The split of the 31525 items into the training, development and test sets as listed in Table 1 was again random. 4 Challenge Test Set Preparations In addition to the randomly selected 31525 items described above, we prepared a challenge test set of 1400 segments which need images for word sense disambiguation. To achieve this targeted selection, we first found the most ambiguous words from the whole "Visual Genome" corpus and then extracted segments containing the most ambiguous words. The overall steps for obtaining the ambiguous words are shown in Figure 1. The detailed sequence of processing steps was as follows: 1. Translate all English captions from the Visual Genome dataset (3.15 millions unique strings) using a baseline machine translation systems into Hindi, obtaining a synthetic parallel corpus. In this step, we used Google Translate. 2. Apply word alignment on the synthetic parallel corpus using GIZA++ [16], in a wrapper4 that automatically symmetrizes two bidirectional alignments; we used the intersection alignment. 3. Extract all pairs of aligned words in the form of a "translation dictionary". The dictionary contains key/value pairs of the English word (E) and all its Hindi translations (H1, H2, . . . Hn), i.e. it has the form of the mapping E (cid:55)→ {H1, ..., Hn}. 4. Train Hindi word2vec (W2V) [17] word embeddings. We used the gensim5 [18] implementation and trained it on IITB Hindi Monolingual Corpus6 which contains about 45 million Hindi sentences. Using such a large collection of Hindi text improves the quality of the obtained embeddings. 5. For each English word from the translation dictionary (see Step 3), get all Hindi translation words and their embeddings (Step 4). 6. Apply K-means clustering algorithm to the embedded Hindi words to organize them according to their word similarity. If we followed a solid definition of word senses and if we knew how many there are for a given source English word and how they match the meanings of the Hindi words, the K would correspond to the number of Hindi 3https://hinkhoj.com/api/ 4https://github.com/ufal/qtleap/blob/master/cuni_train/bin/gizawrapper.pl 5https://radimrehurek.com/gensim/tut1.html 6http://www.cfilt.iitb.ac.in/iitb_parallel/iitb_corpus_download/ 3 Table 2: Challenge test set: distribution of the ambiguous words. A PREPRINT - JULY 23, 2019 Word Stand 1 Court 2 Players 3 Cross 4 Second 5 Block 6 Fast 7 Date 8 Characters 9 10 Stamp 11 English Fair 12 Fine 13 Press 14 Forms 15 16 Springs 17 Models Forces 18 Penalty 19 Total Segment Count 180 179 137 137 117 116 73 56 70 60 42 41 45 35 44 30 25 9 4 1400 senses that the original English word expresses. We take the pragmatic approach and apply K-means for a range of values (K from 2 to 6). 7. Evaluate the obtained clusters with the Silhouette Score, Davies-Bouldin Index (DBI), and Calinski-Harabaz Index (CHI) [19, 20]. Each of the selected scores reflects in one way or another the cleanliness of the clusters, their separation. For the final sorting (Step 8), we mix these scores using a simple average function. The rationale behind using these scores is that if the word embeddings of the Hindi translations can be clearly clustered into 2 or more senses, then the meaning distinctions are big enough to indicate that the original English word was ambiguous. The exact number of different meanings is not too important for our purpose. 8. Sort the list in descending order to get the most ambiguous words (as approximated by the mean of clustering measures) at the top of the list. 9. Manually check the list to validate that the selected ambiguous words indeed potentially need an image to disambiguate them. Select a cutoff and extract the most ambiguous English words. The result of this semi-automatic search and manual validation of most ambiguous words was a list of 19 English words. For each of these words, we selected and extracted a number of items available in the original Visual Genome and provided the same manual validation of the Hindi translation as for the training and regular test sets. Incidentally, 7 images and English captions occur in both the training set and the challenge test set.7 The overlap in images (but using different regions) is larger: 359. Table 2 lists the selected most ambiguous English words and the number of items in the final challenge test set with the given word in the English side. We tried to make a balance and the frequencies of the ambiguous words in the challenge test set roughly correspond to the original frequencies in Visual Genome. Figure 2 illustrates two sample items selected for the word "penalty" (Hindi translation omitted here). We see that for humans, the images are clearly disambiguating the meaning of the word: the fine to be paid for honking vs. the kick in a soccer match. Arguably, the surrounding English words in the source segments (e.g. "street" vs. "white lined") can be used by machine translation systems to pick the correct translation even without access to the image. The size of the original dataset of images with captions however did not allow us to further limit the selection to segments where the text alone is not sufficient for the disambiguation. 7The English segments appearing in both the training data and the challenge test set are: A round concert block, Man stand in crane, Street sign on a pole in english and chinese, a fast moving train, a professional tennis court, bird characters on top of a brown cake, players name on his shirt. 4 A PREPRINT - JULY 23, 2019 (a) Street sign advising of penalty. (b) The penalty box is white lined. Figure 2: An illustration of two meanings of the word "penalty" exemplified with two images. 5 Conclusion and Future Work We presented a multimodal English-to-Hindi dataset. To the best of our knowledge, this is the first such dataset that includes an Indian language. The dataset can serve e.g. in Hindi image captioning but our primary intended use case was research into the employment of images as additional input to improve machine translation quality. To this end, we created also a dedicated challenge test set with text segments containing ambiguous words where the image can help with the disambiguation. With this goal, the dataset also serves in WAT 20198 shared task on multi-modal translation.9 We illustrated that the text-only information in the surrounding words could be sufficient for the disambiguation. One interesting research direction would be thus to ignore all the surrounding words and simply ask: given the image, what is the correct Hindi translation of this ambiguous English word. Another option we would like to pursue is to search larger datasets for cases where even the whole segment does not give a clear indication of the meaning of an ambiguous word. Our "Hindi Visual Genome" is available for research and non-commercial use under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 License10 at http://hdl.handle.net/11234/1-2997. 6 Acknowledgments We are grateful to Vighnesh Chenthil Kumar, a summer intern from IIIT Hyderabad at Charles University for his help with the semi-automatic search for the most ambiguous words. The work was carried out during Shantipriya Parida's post-doc funded by Charles University. This work has been supported by the grants 19-26934X (NEUREM3) of the Czech Science Foundation and "Progress" Q18+Q48 of Charles University, and using language resources distributed by the LINDAT/CLARIN project of the Ministry of Education, Youth and Sports of the Czech Republic (projects LM2015071 and OP VVV VI CZ.02.1.01/0.0/0.0/16013/0001781). References [1] Chiraag Lala, Pranava Madhyastha, Josiah Wang, and Lucia Specia. Unraveling the contribution of image caption- ing and neural machine translation for multimodal machine translation. The Prague Bulletin of Mathematical Linguistics, 108(1):197 -- 208, 2017. [2] Anya Belz, Erkut Erdem, Katerina Pastra, and Krystian Mikolajczyk, editors. Proceedings of the Sixth Workshop on Vision and Language, VL@EACL 2017, Valencia, Spain, April 4, 2017. Association for Computational Linguistics, 2017. 8http://lotus.kuee.kyoto-u.ac.jp/WAT/WAT2019/index.html 9https://ufal.mff.cuni.cz/hindi-visual-genome/wat-2019-multimodal-task 10https://creativecommons.org/licenses/by-nc-sa/4.0/ 5 A PREPRINT - JULY 23, 2019 [3] Desmond Elliott and Ákos Kádár. Imagination improves multimodal translation. CoRR, abs/1705.04350, 2017. [4] Mingyang Zhou, Runxiang Cheng, Yong Jae Lee, and Zhou Yu. A visual attention grounding neural model for multimodal machine translation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3643 -- 3653, 2018. [5] Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. International Journal of Computer Vision, 123(1):32 -- 73, 2017. [6] Nasrin Mostafazadeh, Chris Brockett, Bill Dolan, Michel Galley, Jianfeng Gao, Georgios P. Spithourakis, and Lucy Vanderwende. Image-grounded conversations: Multimodal context for natural question and response generation. CoRR, abs/1701.08251, 2017. [7] Linjie Yang, Kevin D. Tang, Jianchao Yang, and Li-Jia Li. Dense captioning with joint inference and visual context. CoRR, abs/1611.06949, 2016. [8] Chang Liu, Fuchun Sun, Changhu Wang, Feng Wang, and Alan L. Yuille. MAT: A multimodal attentive translator for image captioning. CoRR, abs/1702.05658, 2017. [9] Desmond Elliott, Stella Frank, Khalil Sima'an, and Lucia Specia. Multi30k: Multilingual english-german image descriptions. arXiv preprint arXiv:1605.00459, 2016. [10] Loïc Barrault, Fethi Bougares, Lucia Specia, Chiraag Lala, Desmond Elliott, and Stella Frank. Findings of the third shared task on multimodal machine translation. In Proceedings of the Third Conference on Machine Translation: Shared Task Papers, pages 304 -- 323, 2018. [11] Koel Dutta Chowdhury, Mohammed Hasanuzzaman, and Qun Liu. Multimodal neural machine translation for low-resource language pairs using synthetic data. ACL 2018, page 33, 2018. [12] Bryan A Plummer, Liwei Wang, Chris M Cervantes, Juan C Caicedo, Julia Hockenmaier, and Svetlana Lazeb- nik. Flickr30k entities: Collecting region-to-phrase correspondences for richer image-to-sentence models. In Proceedings of the IEEE international conference on computer vision, pages 2641 -- 2649, 2015. [13] Kobus Barnard and Matthew Johnson. Word sense disambiguation with pictures. Artificial Intelligence, 167(1- 2):13 -- 30, 2005. [14] Ashish Vaswani, Samy Bengio, Eugene Brevdo, Francois Chollet, Aidan N. Gomez, Stephan Gouws, Llion Jones, Łukasz Kaiser, Nal Kalchbrenner, Niki Parmar, Ryan Sepassi, Noam Shazeer, and Jakob Uszkoreit. Tensor2tensor for neural machine translation. CoRR, abs/1803.07416, 2018. [15] Shantipriya Parida and Ondrej Bojar. Translating Short Segments with NMT: A Case Study in English-to-Hindi. In Proceedings of EAMT 2018, 2018. [16] Franz Josef Och and Hermann Ney. A systematic comparison of various statistical alignment models. Computa- tional Linguistics, 29(1):19 -- 51, 2003. [17] Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. CoRR, abs/1301.3781, 2013. [18] Radim Rehurek and Petr Sojka. Software Framework for Topic Modelling with Large Corpora. In Proceedings of the LREC 2010 Workshop on New Challenges for NLP Frameworks, pages 45 -- 50, Valletta, Malta, May 2010. ELRA. http://is.muni.cz/publication/884893/en. [19] Renato Cordeiro de Amorim and Christian Hennig. Recovering the number of clusters in data sets with noise features using feature rescaling factors. Information Sciences, 324:126 -- 145, 2015. [20] D. L. Davies and D. W. Bouldin. A cluster separation measure. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-1(2):224 -- 227, April 1979. 6
1811.07550
1
1811
2018-11-19T08:23:34
Switch-based Active Deep Dyna-Q: Efficient Adaptive Planning for Task-Completion Dialogue Policy Learning
[ "cs.CL", "cs.AI", "cs.LG", "cs.NE" ]
Training task-completion dialogue agents with reinforcement learning usually requires a large number of real user experiences. The Dyna-Q algorithm extends Q-learning by integrating a world model, and thus can effectively boost training efficiency using simulated experiences generated by the world model. The effectiveness of Dyna-Q, however, depends on the quality of the world model - or implicitly, the pre-specified ratio of real vs. simulated experiences used for Q-learning. To this end, we extend the recently proposed Deep Dyna-Q (DDQ) framework by integrating a switcher that automatically determines whether to use a real or simulated experience for Q-learning. Furthermore, we explore the use of active learning for improving sample efficiency, by encouraging the world model to generate simulated experiences in the state-action space where the agent has not (fully) explored. Our results show that by combining switcher and active learning, the new framework named as Switch-based Active Deep Dyna-Q (Switch-DDQ), leads to significant improvement over DDQ and Q-learning baselines in both simulation and human evaluations.
cs.CL
cs
Switch-based Active Deep Dyna-Q: Efficient Adaptive Planning for Task-Completion Dialogue Policy Learning Yuexin Wu(cid:63) Xiujun Li†‡ Jingjing Liu† Jianfeng Gao† Yiming Yang(cid:63) †Microsoft Research (cid:63)Carnegie Mellon University ‡Paul G. Allen School of Computer Science & Engineering, University of Washington (cid:63){yuexinw,yiming}@cs.cmu.edu †{xiul,jingjl,jfgao}@microsoft.com 8 1 0 2 v o N 9 1 ] L C . s c [ 1 v 0 5 5 7 0 . 1 1 8 1 : v i X r a Abstract Training task-completion dialogue agents with reinforcement learning usually requires a large number of real user experi- ences. The Dyna-Q algorithm extends Q-learning by integrat- ing a world model, and thus can effectively boost training ef- ficiency using simulated experiences generated by the world model. The effectiveness of Dyna-Q, however, depends on the quality of the world model - or implicitly, the pre-specified ratio of real vs. simulated experiences used for Q-learning. To this end, we extend the recently proposed Deep Dyna-Q (DDQ) framework by integrating a switcher that automati- cally determines whether to use a real or simulated experience for Q-learning. Furthermore, we explore the use of active learning for improving sample efficiency, by encouraging the world model to generate simulated experiences in the state- action space where the agent has not (fully) explored. Our re- sults show that by combining switcher and active learning, the new framework named as Switch-based Active Deep Dyna-Q (Switch-DDQ), leads to significant improvement over DDQ and Q-learning baselines in both simulation and human eval- uations.1 Introduction Thanks to the increasing popularity of virtual assistants such as Apple's Siri and Microsoft's Cortana, there has been a growing interest in both industry and research community in developing task-completion dialogue systems (Gao, Gal- ley, and Li 2018). Dialogue policies in task-completion dia- logue agents, which control how agents respond to user in- put, are typically trained in a reinforcement learning (RL) setting (Young et al. 2013; Levin, Pieraccini, and Eckert 1997). RL, however, usually requires collecting experiences via direct interaction with real users, which is a costly data acquisition procedure, as real user experiences are much more expensive to obtain in the dialogue setting than that in simulation-based game settings (such as Go or Atari games) (Mnih et al. 2015; Silver et al. 2016). One common strategy is to train policies with user simu- lators that are developed from pre-collected human-human conversational data (Schatzmann et al. 2007; Li et al. 2016). Dialogue agents interacting with such user simulators do not Copyright c(cid:13) 2019, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. 1Source code is at https://github.com/CrickWu/Switch-DDQ. incur any real-world cost, and can in theory generate un- limited amount of simulated experiences for policy train- ing. The learned policy can then be further fine-tuned using small amount of real user experiences (Dhingra et al. 2016; Su et al. 2016; Lipton et al. 2016; Li et al. 2017). Although simulated users provide an affordable alterna- tive, they may not be a sufficiently truthful approximation to human users. The discrepancy between simulated and real experiences inevitably leads to strong bias. In addition, it is very challenging to develop a high-quality user simula- tor, because there is no widely accepted metric to assess the quality of user simulators (Pietquin and Hastie 2013). It re- mains a controversial research topic whether training agents through user simulators is an effective solution to building dialogue systems. Recently, Peng et al. (2018) proposed Deep Dyna-Q (DDQ), an extension of the Dyna-Q framework (Sut- ton 1990), which integrates planning into RL for task- completion dialogue policy learning. As illustrated in Fig- ure 1a, DDQ incorporates a trainable user simulator, referred to as the world model, which can mimic real user behav- iors and generate simulated experience. The policy of the dialogue agent can be improved through either (1) real user experiences via direct RL; or (2) simulated experiences via indirect RL or planning. DDQ is proved to be sample-efficient in that a reasonable policy can be obtained using a small number of real expe- riences, an affordable training process thanks to the integra- tion of planning into RL. However, the effectiveness of DDQ depends, to a large degree, upon the way we control the ra- tio of real vs. simulated experiences used in different stages of training. For example, Peng et al. (2018) pointed out that although aggressive planning (i.e., policy learning using a large number of simulated experiences) often helps improve the performance in the beginning stage of training when the agent is not sensitive to the low-quality experiences, such aggressive planning might hurt the performance in the later stage when the agent is more susceptible to noise, as illus- trated in Figure 2. Carefully designed heuristics are essen- tial to set the ratio properly. For example, we might decrease the number of simulated experiences during the course of training. However, such heuristics can vary with different settings, and thus significantly limits the wide application of DDQ in developing real-world dialogue agents. (a) DDQ framework (b) Proposed Switch-DDQ framework Figure 1: Designs of RL agents for dialogue policy learning in task-completion dialogue systems improve DDQ's sample efficiency. As illustrated in Fig- ure 1b, we incorporate a switcher to automatically determine whether to use real or simulated experiences at different stages of dialogue training, eliminating the dependency on heuristics. The switcher is implemented based on an LSTM model, and is jointly trained with the dialogue policy and the world model. Moreover, instead of randomly sampling sim- ulated experiences, the world model adopts an active sam- pling strategy that generates simulated experiences from the state-action space that has not been (fully) explored by the dialogue agent. Experiments show that this active sampling strategy can achieve a performance that is comparable to the original DDQ method but by using a much smaller amount of real experiences. The work present in this paper contributes to the growing family of model-based RL methods, and can potentially be applied to other RL problems. To the best of our knowledge, Switch-DDQ is the first learning framework that conducts active learning in a task-completion dialogue setting. The contributions of this work are two-fold: • We propose a Switch-based Active Deep Dyna-Q frame- work to incorporate active learning into the Dyna-Q framework for dialogue policy learning, providing a mechanism of automatically balancing the use of simu- lated and real user experiences. • We validate the superior performance of Switch-DDQ by building dialogue agents for the movie-ticket booking task. The effectiveness of active learning and switcher is verified by simulation and human evaluations. Model Architecture We depict our Switch-DDQ pipeline in Figure 3. The agent consists of six modules: (1) an LSTM-based natural lan- guage understanding (NLU) module (Hakkani-Tur et al. 2016) for extracting user intents/goals and calculated their associated slots; (2) a state tracker (Mrksi´c et al. 2016) for tracking dialogue states; (3) a dialogue policy that makes choice of the next action by using the information of the current dialogue state; (4) a model-based natural language generation (NLG) module which outputs natural language Figure 2: The learning curves of DDQ(K) without heuristics where (K − 1) denotes the number of planning steps. The curves are sensitive to K values and may deteriorate in the later phase due to the low-quality simulated experiences. Another limitation of DDQ is that the world model gen- erates simulated experiences by uniformly sampling user goals. However, training samples in the state-action space unexplored or less explored by the dialogue agent are usu- ally more desirable in order to avoid bias. This is the prob- lem that many active learning methods try to address. In this paper, we present a new variant of DDQ that addresses these two issues. Our method is inspired by the recent study of Su et al. (2018), which tries to balance the use of simulated and real experience by measuring the quality of simulated ex- periences using a machine-learned discriminator. The more simulated experiences are used if their quality is higher. Their approach demonstrates some limited success, and suf- fers from two shortcomings. First, it does not take into ac- count the fact that the agent in different training stages might require simulated experiences of different qualities. Second, it still uniformly samples user goals and is not as sample- efficient as it should be (e.g., by using active learning). In this paper, we propose a new framework, called Switch- based Active Deep Dyna-Q (Switch-DDQ), to significantly (s, a, r, au, s(cid:48)) is then stored into the user experience buffer Bu or simulator experience buffer Bs respectively. Func- tion Q(·) can be improved using experiences stored in the buffers. In the implementation, we optimize the parameter θQ w.r.t. the mean-squared loss: y = r + γ max L(θQ) = E(s,a,r,s(cid:48))∼Bs∪Bu [(y − Q(s, a; θQ))] (1) (2) where Q(cid:48)(·) is a copy of the previous version of Q(·) and is only updated periodically and γ ∈ [0, 1] is the discount fac- tor. Q(·) is updated using back-propagation and mini-batch gradient descent. a(cid:48) Q(cid:48)(s(cid:48), a(cid:48); θQ(cid:48)) Algorithm 1 Switch-based Active Deep Dyna-Q 1: procedure SWITCH-DDQ TRAININGPIPELINE 2: 3: 4: user randomly picks a user goal gu Generate real experience eu from user based on for i ← 1 : max epoch do gu into Bu repeat Actively select a user goal gs based on the validation results # see Algorithm 2 Generate simulated experience es from sim- ulator based on gs into Bs Evaluate quality of es through switcher until quality < threshold Train simulator on Bu Train switcher on Bu, Bs Train agent on Bu, Bs Evaluate simulator on validation set 5: 6: 7: 8: 9: 10: 11: 12: 13: Figure 3: Switch-DDQ for dialogue policy learning. responses (Wen et al. 2015); (5) a world model for generat- ing simulated user actions and simulated rewards based on active user goal selection; and (6) an RNN-based switcher for selecting the source of data (simulated or real experi- ences) for dialogue policy training. The solid lines in the figure illustrate the iterative dialogue policy training loop, while the dashed lines show the flow of data in training the world model and switcher. The optimization of Switch-DDQ comprises four steps: (1) direct reinforcement learning: the agent conducts direct interactions with a real user, where the generated real ex- periences are directly used to improve the dialogue policy; (2) active planning: the agent interacts with the simulator and improves the policy using the simulated experiences; (3) world model learning: the world model receives real ex- periences and updates itself; and (4) switcher training: the switcher is learned and refined using both real and simulated experiences. Each step is detailed in the subsections below. The iterative Switch-DDQ algorithm, described in pseudo- code, is shown in Algorithm 1. Direct Reinforcement Learning and Planning Typically, dialogue policy learning can be formulated as a Markov Decision Process in the RL setting, a task- completion dialogue could be viewed as a sequence of (state, action, reward) tuples. We employ the Deep Q-network (DQN) (Mnih et al. 2015) for training the dialogue pol- icy (line 12 in Algorithm 1). Both the direct reinforcement learning and planning are accomplished using the same Q- learning algorithm using the simulated and real experiences, respectively. Specifically, at each step, the agent receives the state s and selects an action a to carry into the next dialogue turn. The action a is chosen using the exploration policy based on -greedy, where there is probability  a random action being executed or otherwise the action that maximizes the Q(s, a; θQ) function. The function Q(·) is parameterized by a Multi-Layer Perceptron (MLP) parameterized by θQ. Afterwards, the agent observes a reward r from the envi- ronment, and a corresponding response au from either a real user or the simulator, updating the dialogue state to s(cid:48) until reaching the end of a dialogue. The experience Active Planning based on World Model In a typical task-completion dialogue (Schatzmann et al. 2007), a user begins a conversation with a particular goal in mind G which consists of multiple constraints. For ex- ample, in the movie-ticket-booking scenario, the constraints can be the place of the theater, the number of tickets to buy, and the name of the movie. An example of a user is request(theater;numberofpeople=2, goal moviename=mission impossible), which is presented in its natural language form as "in which theater can I buy two tickets for mission impossible". Although there is no explicit restriction for the range of user goals in real experiences, in the stage of planning, the world model can selectively generate the simulated experiences in the state-action space that are not (fully) explored by the dialogue agent, based on a specific set of user goals, to improve sample efficiency. We call our planning active planning because it is a form of active learning. The world model for active planning consists of two parts: (1) a user goal sampling module that samples a proper user goal at the start of a dialogue; (2) a response generation mod- ule that imitates real users' interaction with the agent to gen- erate for each dialogue turn the user action, reward and the user's decision whether to terminate the dialogue. • Active user goal sampling module. Assume that we have collected large amounts of user goals from human-human conversational data. These user goals can be grouped into different categories, each with different constraints, amounting to different scales of difficulties. The key ob- servation is that, during the training process, while mon- itoring the performance of the agent policy on valida- tion set, we can gather detailed information about the impact of each category of user goals on the perfor- mance improvement of the dialogue agent e.g., in terms of the success rate (line 13 in Algorithm 1). The de- tailed information can be used to measure the cost (or gain) in the active learning setting (Russo et al. 2018; Auer, Cesa-Bianchi, and Fischer 2002) and guide the world model how to sample user goals. Suppose there are k different categories of user goals. At each epoch, the failure rate of each category estimated on the validation set is denoted as fi and the number of sam- ples for the estimation is ni. For simplicity, denote the i ni. Then, the active sam- pling routine (line 6 in Algorithm 1) can be expanded as summation of ni as N = (cid:80) Algorithm 2 Active Sampling Routine 1: procedure ACTIVE USER GOAL SAMPLING 2: Draw a number pi for each category following pi ∼ fi, Select the user goal i with the maximum pi value (cid:113) k ln N N(cid:16) (cid:17) ni 3: (cid:113) k ln N Here, N is the Gaussian distribution for introducing randomness. The Thompson-Sampling-like (Russo et al. 2018) sub-routine of Algorithm 2 is motivated by two ob- servations: (1) on average, categories with larger failure rate fi are more preferable as they inject more difficult cases (containing more useful information to be learned) based on the current performance of the agent policy. The generated data (simulated experiences) are generally associated with the steepest learning direction and can prospectively boost the training speed; (2) categories that are estimated less reliably (due to a smaller value of ni value) may have a large de facto failure rate, thus worth being allocated with more training instances to reduce is the measurement of the uncer- the uncertainty. tainty of fi, serving the role of variance in the Gaussian. Thus, the categories with high uncertainty are still likely to be selected even if the failure rate is small. • Response generation module. We utilize the same design of the world model in Peng et al. (2018). Specifically, we parameterize it using a multi-task deep neural network (Liu et al. 2015). Each time the world model observes the dialogue state s and the last action from the agent a, it passes the input pair (s, a) through an MLP M (s, a; θM ) generating a user action au, a regressed reward r and a bi- nary terminating indicator signal t. The MLP has a com- mon sharing representation in the first layer (referred to as layer h). The computation for each term can be shown ni as below: h = tanh(Wh(s, a) + bh) au = softmax(Wah + ba) r = tanh(Wrh + br) t = sigmoid(Wth + bt) (3) (4) (5) (6) Switcher At every step of training, the switcher needs to decide whether the dialogue agent should be trained using simu- lated or real experience (lines 8-9 in Algorithm 1). The switcher is based on a binary classifier implemented using a Long Short-Term Memory (LSTM) model (Hochre- iter and Schmidhuber 1997). Assume that a dialogue is represented as a sequence of dialogue turns, denoted by {(si, ai, ri)}, i = 1, ..., N, where N is the number of di- alogue turns of the dialogue. Q-learning takes a tuple in the form of (s, a, r, s(cid:48)) as a training sample, which can be ex- tracted from two consecutive dialogue turns in a dialogue. Now, the design choice of switcher is whether the classi- fier is turn-based or dialogue-based. We choose the former, though a bit anti-intuitive, for data efficiency. There is an order of magnitude larger number of turns than that of dia- logues. As a result, a turn-based classifier can be more re- liably trained than a dialogue-based one. Then, given a dia- logue, we score the quality of each of its dialogue turns, and then averages these scores to measure the quality of the di- alogue (line 6 in Algorithm 1). If the dialogue-level score is below a certain threshold, the agent switches to interact with real users. Note that each dialogue turn is scored by tak- ing into account its previous turns in the same dia- logue. Given a dialogue turn (st, at, rt) and its history h = ((s1, a1, r1), (s2, a2, r2), ..., (st−1, at−1, rt−1)) We use LSTM to encode h using the hidden state vector, and output a turn-level quality score via a sigmoid layer: Score((s, a, r), h; θ) = sigmoid(LSTM((s, a, r), h; θ)) (7) Since we store user experiences and simulated experi- ences in the buffers Bu and Bs, respectively (lines 4, 7 in Algorithm 1), the training of Score(.) follows a similar pro- cess of minimizing the cross-entropy loss as in the common domain adversarial training setting (Ganin et al. 2016) using mini-batches: E(s,a,r),h∼Bu log (Score ((s, a, r), h; θ)) min θS + E(s,a,r),h∼Bs log (1 − Score((s, a, r), h; θ)) (8) Since the experiences stored in Bs and Bu change dur- ing the course of dialogue training, the score function of the switcher is updated accordingly, thus automatically ad- justing how much planning to perform at different stages of training. Experiments We evaluate the proposed Switch-DDQ framework in the movie-ticket booking domain, in two settings: simulation and human evaluation. Dataset For experiments, we use a movie-ticket booking dataset which contains raw conversational data collected via Ama- zon Mechanical Turk. The dataset is manually labeled based on a schema defined by domain experts. As shown in Table 1, the annotation schema consists of 11 intents and 16 slots. In total, the dataset contains 280 labeled dialogues, the aver- age length of which is 11 turns. Annotations Intent Slot request, inform, deny, confirm question, confirm answer, greeting, closing, not sure, multiple choice, thanks, welcome city, closing, date, distanceconstraints, greeting, moviename, numberofpeople, price, starttime, state, taskcomplete, theater, theater chain, ticket, video format, zip Table 1: The data annotation schema Baselines We compare the effectiveness of the Switch-DDQ agent with several baselines: • DQN agent is implemented with only direct reinforce- ment learning in each training epoch (without lines 5-9 in Algorithm 1). • The DQN(K) has (K − 1) times more real experiences than the DQN agent (repeat lines 3-4 in Algorithm 1 K times). The performance of DQN(K) can be viewed as the upper bound of DDQ (K), with the same number of planning steps (K − 1) (they have the same training set- ting and the same amount of training samples during the entire learning process). • The DDQ(K) agents are learned using a jointly-trained world model initiated from human conversational data, with (K − 1) planning steps (replace lines 5-9 in Algo- rithm 1 with a (K − 1)-round loop). • The proposed Switch-DDQ agents are updated as de- scribed in Algorithm 1. Note that there is no parameter K in the agent, as real/simulated ratio is automatically controlled by the switcher module. Implementation Details Agent and Hyper-parameter Settings We use an MLP to parameterize function Q(·) in all the agent variants (DQN, DDQ and Switch-DDQ). The MLP has one hidden layer of 80 neurons with ReLU (Nair and Hinton 2010) activation function. The -greedy policy is adopted to explore the ac- tion space. The discount factor γ for future rewards is set to 0.9. For DDQ(K), as the number of real and simulated ex- periences is different at each epoch, the buffer sizes of Bu and Bs are generally set to 2000 and 2000×K, respectively. For Switch-DDQ, we observed that the results are not sensi- tive to the buffer size of Bs, so we set it to 2000 × 5 for all settings. We randomly initialize the parameters in all neural net- works and empty both experience buffers Bu and Bs in the beginning. The RMSProp (Hinton, Srivastava, and Swersky 2012) algorithm is used to perform optimization over all the parameters where the learning rate is set to 0.001. We also apply the gradient clipping trick to all parameters with a maximum norm of 1 to prevent possible gradient explo- sion issues. At the beginning of each epoch (line 2 in Algo- rithm 1), the reference copy Q(cid:48)(·) is updated. Each simulated dialogue contains less than 40 turns. Conversations exceed- ing the maximum number of turns are counted as failed. In order to train the agents more efficiently, we utilized the im- itation learning method called Reply Buffer Spiking (RBS) (Lipton et al. 2016) at the initial stage to build a simple rule- based agent trained from human conversational data. The trained agent is then used to pre-fill the real experience re- play buffer Bu with a total of 50 complete dialogues before training all the variants of the agent. World Model We employ an MLP world model for DDQ and Switch-DDQ. The shared hidden layer is set to have size 160 with hyperbolic tangent activation. The state and action input are encoded through a linear layer of size 80. We pre- fill each ni as 5 to prevent division by 0 error, during the calculation of the Gaussian variance (line 2 in Algorithm 2). Switcher The LSTM switcher has a hidden layer with 126 cells. Similar to the world model, states and actions are passed through a linear layer of size 80 as inputs at each time step. The switcher adopts an annealing threshold w.r.t. the epoch number to decide the quality of each dialogue turn. If the average dialogue episode score passes a certain thresh- old, all the high-quality predictions are pushed into buffer Bs.2 Simulation Evaluation We train the dialogue agents by simulating interactions be- tween the agents and well-programmed user simulators, in- stead of real users. That is, we train the world model to imi- tate the behaviors of the user simulator. User Simulator We used an open-sourced task-oriented user simulator (Li et al. 2016) in our simulated evaluation. At each dialogue turn, the simulator will emit a simulated user response to the agent. When the dialogue ends, a reward signal will be provided. The dialogue is considered success- ful, if and only if a movie ticket is booked successfully and the information provided by the agent conform to all the con- straint slots in the sampled user goal. Each completed dia- logue shows either a positive reward 2 ∗ L for success, or a negative reward −L for failure, where L is the maximum number of turns in each dialogue and is set to 40 in our ex- periments. Furthermore, in each turn, a negative reward −1 is provided to encourage shorter dialogue. Main Results We summarize the main results in Table 2 and plot the learning curves in Figure 4. As illustrated in Figure 2, DDQ(K) is highly susceptible to parameter K. Therefore, we only keep the best performing DDQ(5) as 2See the code for specific hyper-parameters. Agent DQN DQN(5) DDQ(5) DDQ(10) DDQ(20) Switch-DDQ Epoch = 100 Success Reward Turns 25.51 0.2867 12.52 0.7667 19.96 0.6200 0.6800 16.36 29.76 0.3333 0.5200 15.84 -17.35 46.74 25.42 34.42 -13.88 15.48 Epoch = 200 Success Reward Turns 18.64 0.6733 11.88 0.7867 16.69 0.7733 0.6000 17.60 18.41 0.4467 0.8533 13.53 32.48 49.46 45.45 24.20 5.39 56.63 Epoch = 300 Success Reward Turns 12.27 0.7667 12.37 0.8000 14.76 0.7467 0.3733 15.81 16.69 0.3800 0.7800 12.21 46.87 50.81 43.22 -2.11 -1.75 48.49 Table 2: Results of different agents at training epoch = {100, 200, 300}. Each number is averaged over 3 runs, and each run is tested on 50 dialogues. (Success: success rate) Switch-DDQ outperforms DQN and DDQ variants after Epoch 100, where DQN(5) is shown as the upper bound as it uses more real experiences. Best scores are labeled in blue. Figure 4: The learning curves of DQN, DQN(5), Switch- DDQ, and DDQ(5) of each epoch. Figure 5: The learning curves of DQN, DQN(5), Switch- DDQ, and DDQ(5) on the scale of updating frequency. the baseline in the following figures. DQN(5), which uses 4 times more real user experiences to this end, is the upper bound for the corresponding DDQ(5) method. In Table 2, we report success rate, average reward and average number of turns over 3 different runs for each agent. As is shown, the agent of Switch-DDQ after the first 100 epochs, consistently achieves higher success rates with a smaller number of inter- action turns. Again, DDQ(10) and DDQ(20) quickly deteri- orate through the training process. In Figure 4, we can ob- serve that in the first 130 epochs, DDQ(5) performs slightly better than Switch-DDQ. However, after that, Switch-DDQ surpasses DDQ(5) and achieves better performance. It only takes Switch-DDQ 180 epochs to achieve comparable re- sults to DQN(5), which utilizes 4 times more real experi- ences, and DDQ(5) fails to reach similar performance within 300 epochs. This is expected, as the aggressive simulator sampling policy adopted by DDQ(5), though helping up- date the policy network more rapidly in the early stage of training, hurts the performance due to the use of low-quality training instances in the later stage. Note that except for DQN(5), all the agents are trained using the same number of real experiences in each epoch, differing only the amounts of simulated experiences used (for planning) and how these simulated experiences are generated (via active learning or not). The result show that Switch-DDQ can utilize simula- tors in a more effective and robust way than DDQ. We also examine the performance of different agents with an equal number of optimization operations. As shown in Figure 5, we plot the success rate as a function of updat- ing frequency, i.e., how many dialogue experiences (either real or simulated) are used altogether to optimize the agent policy network. Note that DQN(5) displays superior perfor- mance over DQN as it generates more diverse dialogues at the same updating frequency (DQN may refer to identical experiences more frequently since Bu in DQN is refreshed less often than that in DQN(5)). Furthermore, we observe that DDQ(5) fails to obtain a similar performance to DQN, due to the use of many low-quality simulated experiences. However, this does not happen in Switch-DDQ, since it ac- tively samples user goals by making diversified training di- alogues and discreetly controlling the amount of simulated experiences via the switcher. Ablation Test To further examine the effectiveness of the active learning module, we conduct an ablation test by re- placing the user goal selection routine (Algorithm 2) with the one based on uniform sampling, referred to as SU-DDQ. The results in Figure 6 demonstrate that Switch-DDQ can Figure 6: Learning curves of Switch-DDQ versus SU-DDQ where SU-DDQ uses a uniform sampling strategy. Figure 7: Success rate on 128 user goal categories for Switch-DDQ and SU-DDQ, ranking in ascending order. consistently outperform SU-DDQ, especially in the early phase (before epoch 100). This is due to the fact that the agent is more sensitive to the diversity of user goals in the earlier stage since in the limited data setting, many repeated cases introduce biases more easily. In Figure 7, we report the success rate for different categories of user goals and rank them in the increasing order. It is observed that for the cor- responding rank of user goal category, especially the ones with low success rate, the active version of Switch-DDQ al- ways give a better score. These results demonstrate that the use of the active module improves training efficiency. Human Evaluation Real users were recruited to interact with different agents, while the identity of the agent system is hidden from the users. At the beginning of the dialogue session, the user was provided with a randomly sampled user goal, and one of the agents was randomly picked to converse with the user. The dialogue session can be terminated at any time, if the user finds that the dialogue takes so many turns that it is unlikely to reach a promising outcome. Such dialogues are consid- ered as failed in our experiments. Three agents (DQN, DDQ(5), and Switch-DDQ) trained as previously described (Figure 4) at epoch 150 are selected as for human evaluation.3 As illustrated in Figure 8, the re- sults of human evaluation are consistent with those in the simulation evaluation. We find that DQN is abandoned more often by users as it takes so many dialogue turns (Table 2) re- sulting in a much hefty performance drop, and the proposed Switch-DDQ outperforms all the other agents. Figure 8: Human evaluation results of DQN, DDQ(5), and Switch-DDQ. The number of test dialogues is shown on each bar, and the one-sided p-value is from a two-sample permutation test over the success/fail lists. Switch-DDQ is capable of adaptively choosing the proper data source to use, either from real users or world model, enhancing the efficiency and robustness of dialogue policy learning. Furthermore, the active user goal sampling strategy provides a better utilization of the world model than that of previous DDQ, and boosts the performance of training. Val- idating Switch-DDQ in the movie-ticket booking task with simulation experiments and human evaluation, we show that the Switch-DDQ agent outperforms the agents trained by other state-of-the-art methods, including DQN and DDQ. Switch-DDQ can be viewed as a generic model-based RL approach, and is easily extensible to other RL problems. Conclusion Acknowledgement This paper presents a new framework Switch-based Ac- tive Deep Dyna-Q (Switch-DDQ) for task-completion dia- logue policy learning. With the introduction of a switcher, 3Epoch 150 is picked since we are testing the effectiveness of methods using a small number of real experiences. We thank the reviewers for their helpful comments, and we would like to acknowledge the volunteers for helping us with the human experiments. This work was done in part when Yuexin Wu was visiting Microsoft Research as an intern, and is supported in part by the National Science Foundation (NSF) under grant IIS-1546329. References [Auer, Cesa-Bianchi, and Fischer 2002] Auer, P.; Cesa- Bianchi, N.; and Fischer, P. 2002. Finite-time analysis of the multiarmed bandit problem. Machine learning 47(2-3):235 -- 256. [Dhingra et al. 2016] Dhingra, B.; Li, L.; Li, X.; Gao, J.; Chen, Y.-N.; Ahmed, F.; and Deng, L. 2016. Towards end- to-end reinforcement learning of dialogue agents for infor- mation access. arXiv preprint arXiv:1609.00777. [Ganin et al. 2016] Ganin, Y.; Ustinova, E.; Ajakan, H.; Ger- main, P.; Larochelle, H.; Laviolette, F.; Marchand, M.; and Lempitsky, V. 2016. Domain-adversarial training of neu- ral networks. The Journal of Machine Learning Research 17(1):2096 -- 2030. [Gao, Galley, and Li 2018] Gao, J.; Galley, M.; and Li, L. 2018. Neural approaches to conversational ai. arXiv preprint arXiv:1809.08267. [Hakkani-Tur et al. 2016] Hakkani-Tur, D.; Tur, G.; Celiky- ilmaz, A.; Chen, Y.-N.; Gao, J.; Deng, L.; and Wang, Y.-Y. 2016. Multi-domain joint semantic frame parsing using bi- directional rnn-lstm. In Interspeech, 715 -- 719. [Hinton, Srivastava, and Swersky 2012] Hinton, G.; Srivas- tava, N.; and Swersky, K. 2012. Rmsprop: Divide the gra- dient by a running average of its recent magnitude. Neural networks for machine learning, Coursera lecture 6e. [Hochreiter and Schmidhuber 1997] Hochreiter, and S., Schmidhuber, J. 1997. Long short-term memory. Neural computation 9(8):1735 -- 1780. [Levin, Pieraccini, and Eckert 1997] Levin, E.; Pieraccini, 1997. Learning dialogue strategies R.; and Eckert, W. In Auto- within the markov decision process framework. matic Speech Recognition and Understanding, 1997. Pro- ceedings., 1997 IEEE Workshop on, 72 -- 79. IEEE. [Li et al. 2016] Li, X.; Lipton, Z. C.; Dhingra, B.; Li, L.; Gao, J.; and Chen, Y.-N. 2016. A user simulator for task- completion dialogues. arXiv preprint arXiv:1612.05688. [Li et al. 2017] Li, X.; Chen, Y.-N.; Li, L.; Gao, J.; and Ce- likyilmaz, A. 2017. End-to-end task-completion neural dia- logue systems. arXiv preprint arXiv:1703.01008. [Lipton et al. 2016] Lipton, Z. C.; Gao, J.; Li, L.; Li, X.; Ahmed, F.; and Deng, L. 2016. Efficient exploration for dialogue policy learning with bbq networks & replay buffer spiking. arXiv preprint arXiv:1608.05081. [Liu et al. 2015] Liu, X.; Gao, J.; He, X.; Deng, L.; Duh, K.; and Wang, Y.-Y. 2015. Representation learning using multi- task deep neural networks for semantic classification and in- formation retrieval. [Mnih et al. 2015] Mnih, V.; Kavukcuoglu, K.; Silver, D.; Rusu, A. A.; Veness, J.; Bellemare, M. G.; Graves, A.; Ried- miller, M. A.; Fidjeland, A.; Ostrovski, G.; Petersen, S.; Beattie, C.; Sadik, A.; Antonoglou, I.; King, H.; Kumaran, D.; Wierstra, D.; Legg, S.; and Hassabis, D. 2015. Human- level control through deep reinforcement learning. Nature 518(7540):529 -- 533. [Mrksi´c et al. 2016] Mrksi´c, N.; S´eaghdha, D. O.; Wen, T.- H.; Thomson, B.; and Young, S. 2016. Neural belief tracker: Data-driven dialogue state tracking. arXiv preprint arXiv:1606.03777. [Nair and Hinton 2010] Nair, V., and Hinton, G. E. 2010. Rectified linear units improve restricted boltzmann ma- chines. In Proceedings of the 27th international conference on machine learning (ICML-10), 807 -- 814. [Peng et al. 2018] Peng, B.; Li, X.; Gao, J.; Liu, J.; Wong, K.-F.; and Su, S.-Y. 2018. Deep Dyna-Q: Integrating plan- ning for task-completion dialogue policy learning. In ACL. [Pietquin and Hastie 2013] Pietquin, O., and Hastie, H. 2013. A survey on metrics for the evaluation of user sim- ulations. The knowledge engineering review 28(1):59 -- 73. [Russo et al. 2018] Russo, D. J.; Van Roy, B.; Kazerouni, A.; Osband, I.; Wen, Z.; et al. 2018. A tutorial on thompson sampling. Foundations and Trends R(cid:13) in Machine Learning 11(1):1 -- 96. [Schatzmann et al. 2007] Schatzmann, J.; Thomson, B.; Weilhammer, K.; Ye, H.; and Young, S. 2007. Agenda- based user simulation for bootstrapping a pomdp dialogue system. In Human Language Technologies 2007: The Con- ference of the North American Chapter of the Association for Computational Linguistics; Companion Volume, Short Papers, 149 -- 152. Association for Computational Linguis- tics. [Silver et al. 2016] Silver, D.; Huang, A.; Maddison, C. J.; Guez, A.; Sifre, L.; van den Driessche, G.; Schrittwieser, J.; Antonoglou, I.; Panneershelvam, V.; Lanctot, M.; Dieleman, S.; Grewe, D.; Nham, J.; Kalchbrenner, N.; Sutskever, I.; Lil- licrap, T. P.; Leach, M.; Kavukcuoglu, K.; Graepel, T.; and Hassabis, D. 2016. Mastering the game of go with deep neu- ral networks and tree search. Nature 529(7587):484 -- 489. [Su et al. 2016] Su, P.-H.; Gasic, M.; Mrksic, N.; Rojas- Barahona, L.; Ultes, S.; Vandyke, D.; Wen, T.-H.; and Young, S. 2016. Continuously learning neural dialogue management. arXiv preprint arXiv:1606.02689. [Su et al. 2018] Su, S.-Y.; Li, X.; Gao, J.; Liu, J.; and Chen, Y.-N. 2018. Discriminative deep dyna-q: Ro- bust planning for dialogue policy learning. arXiv preprint arXiv:1808.09442. [Sutton 1990] Sutton, R. S. 1990. Integrated architectures for learning, planning, and reacting based on approximating dynamic programming. In Machine Learning Proceedings 1990. Elsevier. 216 -- 224. [Wen et al. 2015] Wen, T.-H.; Gasic, M.; Mrksic, N.; Su, P.- H.; Vandyke, D.; and Young, S. 2015. Semantically con- ditioned lstm-based natural language generation for spoken dialogue systems. arXiv preprint arXiv:1508.01745. [Young et al. 2013] Young, S. J.; Gasic, M.; Thomson, B.; and Williams, J. D. 2013. Pomdp-based statistical spo- ken dialog systems: A review. Proceedings of the IEEE 101(5):1160 -- 1179.
1803.07204
1
1803
2018-03-20T00:44:18
Why not be Versatile? Applications of the SGNMT Decoder for Machine Translation
[ "cs.CL" ]
SGNMT is a decoding platform for machine translation which allows paring various modern neural models of translation with different kinds of constraints and symbolic models. In this paper, we describe three use cases in which SGNMT is currently playing an active role: (1) teaching as SGNMT is being used for course work and student theses in the MPhil in Machine Learning, Speech and Language Technology at the University of Cambridge, (2) research as most of the research work of the Cambridge MT group is based on SGNMT, and (3) technology transfer as we show how SGNMT is helping to transfer research findings from the laboratory to the industry, eg. into a product of SDL plc.
cs.CL
cs
Why not be Versatile? Applications of the SGNMT Decoder for Machine Translation 8 1 0 2 r a M 0 2 ] L C . s c [ 1 v 4 0 2 7 0 . 3 0 8 1 : v i X r a Felix Stahlberg† Danielle Saunders† Gonzalo Iglesias‡ Bill Byrne‡† †Department of Engineering, University of Cambridge, UK ‡SDL Research, Cambridge, UK [email protected] [email protected] [email protected] [email protected], [email protected] Abstract SGNMT is a decoding platform for machine translation which allows paring various modern neural models of translation with different kinds of constraints and symbolic models. In this paper, we describe three use cases in which SGNMT is currently playing an active role: (1) teaching as SGNMT is being used for course work and student theses in the MPhil in Machine Learning, Speech and Language Technology at the University of Cambridge, (2) research as most of the research work of the Cambridge MT group is based on SGNMT, and (3) technology transfer as we show how SGNMT is helping to transfer research findings from the laboratory to the industry, eg. into a product of SDL plc. Introduction 1 The rate of innovation in machine translation (MT) has gathered impressive momentum over the recent years. The discovery and maturation of the neural machine translation (NMT) paradigm (Sutskever et al., 2014; Bahdanau et al., 2015) has led to steady and substantial im- provements of translation performance (Williams et al., 2014; Jean et al., 2015; Luong et al., 2015; Chung et al., 2016; Wu et al., 2016; Gehring et al., 2017; Vaswani et al., 2017). Fig. 1 shows that this progress is often driven by significant changes in the network architecture. This volatility poses major challenges in MT-related research, teaching, and industry. Researchers potentially spend a lot of time implementing to keep their setups up-to-date with the latest models, teaching needs to identify suitable material in a changing environment, and the in- dustry faces demanding speed requirements on its deployment processes. Another practical challenge many researchers are struggling with is the large number of available NMT tools (van Merrienboer et al., 2015; Junczys-Dowmunt et al., 2016; Klein et al., 2017; Sennrich et al., 2017; Helcl and Libovick´y, 2017; Bertoldi et al., 2017; Hieber et al., 2017).1 Committing to one particular NMT tool bears the risk of being outdated soon, as keeping up with the pace of research is especially costly for NMT software developers. The open-source SGNMT (Syntactically Guided Neural Machine Translation) de- coder2 (Stahlberg et al., 2017b) is our attempt to mediate the effects of the rapid progress in 1See https://github.com/jonsafari/nmt-list for a complete list of NMT software. 2Full documentation available at http://ucam-smt.github.io/sgnmt/html/. Figure 1: Best systems on the English-German WMT news-test2014 test set over the years (BLEU script: Moses' multi-bleu.pl). MT and the diversity of available NMT software. SGNMT introduces the concept of predictors as abstract scoring modules with left-to-right semantics. We can think of a predictor as an inter- face to a particular neural model or NMT tool. However, the interface also allows to implement constraints like in lattice or n-best list rescoring, and symbolic models such as n-gram language models or counting models as predictors. Our software architecture is designed to facilitate the implementation of new predictors. Therefore, SGNMT can be extended to a new model or tool with very limited coding effort because rather than reimplementing models it is often enough to access APIs within an adapter predictor.3 Software packages which are not written in Python can be exposed in SGNMT if they have a Python interface.4 Once a new predictor is imple- mented, it can be directly combined with all other predictors which are already available in SGNMT. Therefore, general techniques like lattice and n-best list rescoring (Stahlberg et al., 2016; Neubig et al., 2015), ensembling, MBR-based NMT (Stahlberg et al., 2017a), etc. only need to be implemented once (as predictor), and are automatically available for all models. This does not only speed up the transition to a new NMT toolkit, it also allows the combination of different NMT implementations, eg. ensembling a Theano-based NMT model (van Merrienboer et al., 2015) with a TensorFlow-based Tensor2Tensor (Google, 2017) model. Hasler et al. (2017) demonstrated the versatility of SGNMT by combining five very different models (RNN LM, feedforward NPLM, Kneser-Ney LM, bag-to-seq model, seq-to-seq model) and a bag-of-words constraint using predictors. Not only the way scores are assigned to translations is open for extension in SGNMT (via predictors), but also the search strategy (decoder) itself. Decoders in SGNMT are defined upon the predictor abstraction, which means that any search strategy is compatible with any predictor constellation. Therefore, common search procedures like beam search do not need to be reimplemented for every new model or toolkit. Secs. 2 to 4 describe central concepts in SGNMT like predictors and decoders briefly and outline some common use cases. Sec. 5 shows that the SGNMT software architecture has proven to be very well suited for our research as new directions can be quickly prototyped, and new NMT toolkits can be introduced without breaking old code. Sec. 6 and Sec. 7 discuss the benefits of SGNMT in teaching and industry, respectively. 3Making all models of the T2T library (Google, 2017) available to SGNMT took less than 200 lines of code. 4For example, the neural language modeling software NPLM (Vaswani et al., 2013) is written in C++, but can be accessed in SGNMT via its Python interface. Figure 2: Greedy decoding with the predictor constellation nmt,fst for lattice rescoring. 2 The Predictor Interface Predictors in SGNMT provide a uniform interface for models and constraints. Since predictors are decoupled from each other, any predictor can be combined with any other predictor in a linear model. One predictor usually has a single responsibility as it represents a single model or type of constraint. Predictors need to implement the following methods: • initialize(src sentence) Initialize the predictor state using the source sentence. • get state() Get the internal predictor state. • set state(state) Set the internal predictor state. • predict next() Given the internal predictor state, produce the posterior over target tokens for the next position. • consume(token) Update the internal predictor state by adding token to the current history. The structure of the predictor state and the implementations of these methods differ sub- stantially between predictors. Stahlberg et al. (2017b) provide a full list of available predictors. Fig. 2 illustrates how the fst and the nmt predictors work together to carry out (greedy) lattice rescoring with an NMT model. The predict next() method of the nmt predictor produces a distribution over the complete NMT vocabulary {A, B, C, UNK, </s>} at each time step in form of negative log probabilities. The fst predictor returns the scores of symbols with an out- going arc from the current node in the FST in predict next(). The linear combination of both scores is used to select the next word, which is then fed back to the predictors via consume(). Words outside a predictor vocabulary are automatically matched with the UNK score. For instance, 'D' in Fig. 2 is matched with the NMT 'UNK' token. Pseudo-code for the predictors and the decoder is listed in Figs. 3 and 4, respectively. c l a s s NMTPredictor ( P r e d i c t o r ) : i n i t i a l i z e ( s r c s e n t e n c e ) : def c l a s s F S T P r e d i c t o r ( P r e d i c t o r ) : i n i t i a l i z e ( s r c s e n t e n c e ) : def e n c s t a t e s = e n c c o m p u t a t i o n g r a p h ( s r c s e n t e n c e ) d e c i n p u t = [BOS] def p r e d i c t n e x t ( ) : s c o r e s , d e c s t a t e = \ d e c c o m p u t a t i o n g r a p h ( Load FST f i l e c u r n o d e = s t a r t n o d e def p r e d i c t n e x t ( ) : return o u t g o i n g a r c s ( c u r n o d e ) d e c i n p u t , e n c s t a t e s ) def consume ( word ) : return s c o r e s def consume ( word ) : d e c i n p u t = word def g e t s t a t e ( ) : return d e c s t a t e , d e c i n p u t def s e t s t a t e ( s t a t e ) : d e c s t a t e , d e c i n p u t = s t a t e c u r n o d e = c u r n o d e . a r c s [ word ] def g e t s t a t e ( ) : return c u r n o d e def s e t s t a t e ( s t a t e ) : c u r n o d e = s t a t e (a) The nmt predictor (b) The fst predictor Figure 3: Pseudo-code predictor implementations c l a s s GreedyDecoder ( Decoder ) : def decode ( s r c s e n t e n c e ) : i n i t i a l i z e p r e d i c t o r s ( s r c s e n t e n c e ) t r g t s e n t e n c e = [ ] t r g t w o r d = None while t r g t w o r d != EOS : t r g t w o r d = argmin ( combine ( p r e d i c t o r s . p r e d i c t n e x t ( ) ) ) t r g t s e n t e n c e . append ( t r g t w o r d ) p r e d i c t o r s . consume ( t r g t w o r d ) return t r g t s e n t e n c e Figure 4: Pseudo-code implementation of greedy decoding 3 Search Strategies Search strategies, called Decoders in SGNMT, search over the space spanned by the predictors. We use different decoders for different predictor constellations, e.g. heuristic search for bag- of-words problems (Hasler et al., 2017), or beam search for NMT. SGNMT can also be used to analyze search errors. Tab. 1 compares five different search configurations for SMT lattice rescoring with a Transformer model (Vaswani et al., 2017) on a subset5 of the Japanese-English Kyoto Free Translation Task (KFTT) test set (Neubig, 2011). Following Stahlberg et al. (2016) we measure time complexity in number of node expansions. Our depth-first search algorithm stops when a partial hypothesis score is worse than the current best complete hypothesis score (admissible pruning), but it is guaranteed to return the global best model score. Beam search yields a significant amount of search errors, even with a large beam of 20. Interestingly, a reduction in search errors does not benefit the BLEU score in this setting. 5SMT lattices are lightly pruned by removing paths whose weight is more than five times the weight of the shortest path. For the experiments in Tab. 1 we removed very long sentences from the original test set to keep the runtime under control. Lattices have 271 nodes and 408 arcs on average. Average number of node expansions per sentence Exhaustive enumeration Depth-first search with admissible pruning Beam search (beam=20) Beam search (beam=4) Greedy decoding 652.3K 3.0K 250.5 64.8 18.0 0% 0% Sentences with BLEU search errors score 21.7 21.7 21.9 21.9 22.1 20.3% 41.9% 67.9% Table 1: BPE-level SMT lattice rescoring with different search strategies. The BLEU score does not benefit from less search errors due to modeling errors. Pure NMT SMT lattice rescoring MBR-based NMT-SMT hybrid Theano: Blocks (van Merrienboer et al., 2015) TensorFlow: seq2seq tutorial6 TensorFlow: NMT tutorial7 TensorFlow: T2T Transformer (Google, 2017) 18.4 17.5 18.8 21.7 18.9 19.3 19.1 19.3 19.0 19.2 20.0 22.5 Table 2: BLEU scores of SGNMT with different NMT back ends on the complete KFTT test set (Neubig, 2011) computed with multi-bleu.pl. All neural systems are BPE-based (Sen- nrich et al., 2016) with vocabulary sizes of 30K. The SMT baseline achieves 18.1 BLEU. 4 Output Formats SGNMT supports five different output formats. • text: Plain text file with first best translations. • nbest: n-best list of translation hypotheses. • sfst: Lattice generation in OpenFST (Allauzen et al., 2007) format with standard arcs. • fst: Lattices with sparse tuple arcs (Iglesias et al., 2015) which keep predictor scores separate. • ngram: MBR-style n-gram posteriors (Kumar and Byrne, 2004; Tromble et al., 2008) as used by Stahlberg et al. (2017a) for NMT. 5 SGNMT for Research SGNMT is designed for environments in which implementation time is far more valuable than computation time. This basic design decision is strongly reflected by the software architecture which accepts degradations in runtime in favor of extendibility and flexibility. We designed SGNMT that way because training models and coding usually take the most time in our day-to- day work. Decoding, however, usually takes a small fraction of that time. Therefore, reducing the implementation time has a much larger impact on the overall productivity of our research group than improvements in runtime, especially since decoding can be easily parallelized on multiple machines. Another benefit of SGNMT's predictor framework is that it enables us to write code in- dependently of any NMT package, and swap the NMT back end with more recent software if 6https://github.com/ehasler/tensorflow 7https://github.com/tensorflow/nmt, trained with Tensor2Tensor (Google, 2017) needed. For example, our previous research work on lattice rescoring (Stahlberg et al., 2016) and MBR-based NMT (Stahlberg et al., 2017a) used the NMT package Blocks (van Merrienboer et al., 2015) which is based on Theano (Bastien et al., 2012). Since both Blocks and Theano have been discontinued, we recently switched to a Tensor2Tensor (Google, 2017) back end based on TensorFlow (Abadi et al., 2016). Without reimplementation, we could validate that MBR- based NMT holds up even under a much stronger NMT model, the Transformer model (Vaswani et al., 2017). Tab. 2 compares the performance of lattice rescoring and MBR-based combination across four different NMT implementations using SGNMT. 6 SGNMT for Teaching SGNMT is being used for teaching at the University of Cambridge in course work and student research projects. In the 2015-16 academic year, two students on the Cambridge MPhil in Ma- chine Learning, Speech and Language Technology used SGNMT for their dissertation projects. The first project involved using SGNMT with OpenFST (Allauzen et al., 2007) for applying subword models in SMT (Gao, 2016). The second project developed automatic music composi- tion by LSTMs where WFSAs were used to define the space of allowable chord progressions in 'Bach' chorales (Tomczak, 2016). The LSTM provides the 'creativity' and the WFSA enforces constraints that the chorales must obey. This year, SGNMT provides the decoder for a student project about simultaneous neural machine translation. SGNMT is also part of two practicals for MPhil students at Cambridge.8 The first practical applies different kinds of language models to restore the correct casing in a lowercased sentence using FSTs. Since SGNMT has good support for the OpenFST library (Allauzen et al., 2007) and can both read and write FSTs, it is used to integrate neural models such as RNN LMs into the exercise. The second practical focuses on decoding strategies for NMT and explores the synergies of word- and subword-based models and the potential of combining SMT and NMT. 7 SGNMT in the Industry SDL Research continuously balances the research and development of neural machine trans- lation with a focus on bringing state-of-the-art MT products to the market9 while pushing the boundaries of MT technology via innovation and quick experimental research. In this context, it is highly desirable to use versatile tools that can be easily extended to support and combine new models, allowing for quick and painless experimentation. SDL Research chose SGNMT over all other existing tools for rapid prototyping and assessment of new research avenues. Among other Neural MT innovations, SDL Research used SGNMT to prototype and assess attention-based Neural MT (Bahdanau et al., 2015), Neural MT model shrinking (Stahlberg and Byrne, 2017) and the recent Transformer model (Vaswani et al., 2017). As described in Sec. 5, the Transformer model is trivially supported by the SGNMT decoder through its predictor framework, and is easy to combine with other predictors. It is worth noting that at the time of writing this paper, Transformer ensembles are not natively supported by the Tensor2Tensor decoder (Google, 2017). Although SDL Research's decoder is homegrown, the SGNMT decoder is still a valuable reference tool for side-by-side comparison between state-of-the-art Neural MT research and the Neural MT product. 8http://ucam-smt.github.io/sgnmt/html/kyoto_nmt.html 9http://www.sdl.com/software-and-services/translation-software/ References Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G. S., Davis, A., Dean, J., Devin, M., et al. (2016). Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467. Allauzen, C., Riley, M., Schalkwyk, J., Skut, W., and Mohri, M. (2007). OpenFST: A general and efficient weighted finite-state transducer library. In Implementation and Application of Automata, pages 11–23. Springer. Bahdanau, D., Cho, K., and Bengio, Y. (2015). Neural machine translation by jointly learning to align and translate. In ICLR, Toulon, France. Bastien, F., Lamblin, P., Pascanu, R., Bergstra, J., Goodfellow, I., Bergeron, A., Bouchard, N., Warde- Farley, D., and Bengio, Y. (2012). Theano: new features and speed improvements. In NIPS, South Lake Tahoe, Nevada, USA. Bertoldi, N., Cattoni, R., Cettolo, M., Farajian, M., Federico, M., Caroselli, D., Mastrostefano, L., Rossi, A., Trombetti, M., Germann, U., et al. (2017). MMT: New open source MT for the translation industry. In Proceedings of The 20th Annual Conference of the European Association for Machine Translation (EAMT). Chung, J., Cho, K., and Bengio, Y. (2016). A character-level decoder without explicit segmentation In Proceedings of the 54th Annual Meeting of the Association for for neural machine translation. Computational Linguistics (Volume 1: Long Papers), pages 1693–1703. Association for Computational Linguistics. Gao, J. (2016). Variable length word encodings for neural translation models. MPhil dissertation, Univer- sity of Cambridge. Gehring, J., Auli, M., Grangier, D., Yarats, D., and Dauphin, Y. N. (2017). Convolutional sequence to sequence learning. ArXiv e-prints. Google (2017). Tensor2Tensor: A library for generalized sequence to sequence models. https:// github.com/tensorflow/tensor2tensor. Accessed: 2017-12-12, version 1.3.1. Hasler, E., Stahlberg, F., Tomalin, M., de Gispert, A., and Byrne, B. (2017). A comparison of neural mod- els for word ordering. In Proceedings of the International Natural Language Generation Conference, Santiago de Compostela, Spain. Helcl, J. and Libovick´y, J. (2017). Neural Monkey: An open-source tool for sequence learning. The Prague Bulletin of Mathematical Linguistics, pages 5–17. Hieber, F., Domhan, T., Denkowski, M., Vilar, D., Sokolov, A., Clifton, A., and Post, M. (2017). Sockeye: A toolkit for neural machine translation. ArXiv e-prints. Iglesias, G., de Gispert, A., and Byrne, B. (2015). Transducer disambiguation with sparse topological fea- tures. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 2275–2280. Association for Computational Linguistics. Jean, S., Cho, K., Memisevic, R., and Bengio, Y. (2015). On using very large target vocabulary for neural machine translation. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1–10. Association for Computational Linguistics. Junczys-Dowmunt, M., Dwojak, T., and Hoang, H. (2016). Is neural machine translation ready for de- ployment? A case study on 30 translation directions. In Proceedings of the 9th International Workshop on Spoken Language Translation (IWSLT), Seattle, WA. Klein, G., Kim, Y., Deng, Y., Senellart, J., and Rush, A. (2017). OpenNMT: Open-source toolkit for neural machine translation. In Proceedings of ACL 2017, System Demonstrations, pages 67–72. Association for Computational Linguistics. Kumar, S. and Byrne, W. (2004). Minimum Bayes-risk decoding for statistical machine translation. In HLT-NAACL, pages 169–176, Boston, MA, USA. Luong, T., Pham, H., and Manning, C. D. (2015). Effective approaches to attention-based neural ma- chine translation. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 1412–1421. Association for Computational Linguistics. Neubig, G. (2011). The Kyoto free translation task. http://www.phontron.com/kftt. Neubig, G., Morishita, M., and Nakamura, S. (2015). Neural reranking improves subjective quality of machine translation: NAIST at WAT2015. In WAT, Kyoto, Japan. Sennrich, R., Firat, O., Cho, K., Birch, A., Haddow, B., Hitschler, J., Junczys-Dowmunt, M., Laubli, S., Miceli Barone, A. V., Mokry, J., and Nadejde, M. (2017). Nematus: a toolkit for neural machine translation. In Proceedings of the Software Demonstrations of the 15th Conference of the European Chapter of the Association for Computational Linguistics, pages 65–68. Association for Computational Linguistics. Sennrich, R., Haddow, B., and Birch, A. (2016). Neural machine translation of rare words with subword In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics units. (Volume 1: Long Papers), pages 1715–1725. Association for Computational Linguistics. Stahlberg, F. and Byrne, B. (2017). Unfolding and shrinking neural machine translation ensembles. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1946–1956. Association for Computational Linguistics. Stahlberg, F., de Gispert, A., Hasler, E., and Byrne, B. (2017a). Neural machine translation by minimising the Bayes-risk with respect to syntactic translation lattices. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 362–368. Association for Computational Linguistics. Stahlberg, F., Hasler, E., Saunders, D., and Byrne, B. (2017b). SGNMT – A flexible NMT decod- In Proceedings of the ing platform for quick prototyping of new models and search strategies. 2017 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 25–30. Association for Computational Linguistics. Full documentation available at http: //ucam-smt.github.io/sgnmt/html/. Stahlberg, F., Hasler, E., Waite, A., and Byrne, B. (2016). Syntactically guided neural machine translation. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 299–305. Association for Computational Linguistics. Sutskever, I., Vinyals, O., and Le, Q. V. (2014). Sequence to sequence learning with neural networks. In Ghahramani, Z., Welling, M., Cortes, C., Lawrence, N. D., and Weinberger, K. Q., editors, Advances in Neural Information Processing Systems 27, pages 3104–3112. Curran Associates, Inc. Tomczak, M. (2016). Bachbot. MPhil dissertation, University of Cambridge. Tromble, R. W., Kumar, S., Och, F., and Macherey, W. (2008). Lattice minimum Bayes-risk decoding for statistical machine translation. In EMNLP, pages 620–629, Honolulu, HI, USA. van Merrienboer, B., Bahdanau, D., Dumoulin, V., Serdyuk, D., Warde-Farley, D., Chorowski, J., and Bengio, Y. (2015). Blocks and fuel: Frameworks for deep learning. CoRR. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L. u., and Polosukhin, I. (2017). Attention is all you need. In Advances in Neural Information Processing Systems 30, pages 6000–6010. Curran Associates, Inc. Vaswani, A., Zhao, Y., Fossum, V., and Chiang, D. (2013). Decoding with large-scale neural language models improves translation. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1387–1392, Seattle, Washington, USA. Association for Computational Linguistics. Williams, P., Sennrich, R., Nadejde, M., Huck, M., Hasler, E., and Koehn, P. (2014). Edinburghs syntax- based systems at WMT 2014. In Proceedings of the Ninth Workshop on Statistical Machine Translation, pages 207–214, Baltimore, Maryland, USA. Association for Computational Linguistics. Wu, Y., Schuster, M., Chen, Z., Le, Q. V., Norouzi, M., Macherey, W., Krikun, M., Cao, Y., Gao, Q., Macherey, K., et al. (2016). Google's neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144.
1609.02746
1
1609
2016-09-09T11:16:56
INSIGHT-1 at SemEval-2016 Task 4: Convolutional Neural Networks for Sentiment Classification and Quantification
[ "cs.CL", "cs.LG" ]
This paper describes our deep learning-based approach to sentiment analysis in Twitter as part of SemEval-2016 Task 4. We use a convolutional neural network to determine sentiment and participate in all subtasks, i.e. two-point, three-point, and five-point scale sentiment classification and two-point and five-point scale sentiment quantification. We achieve competitive results for two-point scale sentiment classification and quantification, ranking fifth and a close fourth (third and second by alternative metrics) respectively despite using only pre-trained embeddings that contain no sentiment information. We achieve good performance on three-point scale sentiment classification, ranking eighth out of 35, while performing poorly on five-point scale sentiment classification and quantification. An error analysis reveals that this is due to low expressiveness of the model to capture negative sentiment as well as an inability to take into account ordinal information. We propose improvements in order to address these and other issues.
cs.CL
cs
INSIGHT-1 at SemEval-2016 Task 4: Convolutional Neural Networks for Sentiment Classification and Quantification Sebastian Ruder12 Parsa Ghaffari2 John G. Breslin1 1Insight Centre for Data Analytics National University of Ireland, Galway [email protected] 2Aylien Ltd. Dublin, Ireland [email protected] Abstract two-point, This paper describes our deep learning-based approach to sentiment analysis in Twitter as part of SemEval-2016 Task 4. We use a convolutional neural network to determine sentiment and participate in all subtasks, i.e. three-point, and five-point scale sentiment classification and two-point and five-point scale sentiment quantification. We achieve competitive results for two-point scale sentiment classification and quantifica- tion, ranking fifth and a close fourth (third and second by alternative metrics) respec- tively despite using only pre-trained embed- dings that contain no sentiment information. We achieve good performance on three-point scale sentiment classification, ranking eighth out of 35, while performing poorly on five- point scale sentiment classification and quan- tification. An error analysis reveals that this is due to low expressiveness of the model to capture negative sentiment as well as an in- ability to take into account ordinal informa- tion. We propose improvements in order to address these and other issues. 1 Introduction Social media allows hundreds of millions of people to interact and engage with each other, while ex- pressing their thoughts about the things that move them. Sentiment analysis (Pang and Lee, 2008) al- lows us to gain insights about opinions towards persons, objects, and events in the public eye and is used nowadays to gauge public opinion towards companies or products, to analyze customer satis- faction, and to detect trends. Its immediacy allowed Twitter to become an im- portant platform for expressing opinions and public discourse, while the accessibility of large quantities of data in turn made it the focal point of social media sentiment analysis research. Recently, deep learning-based approaches have text clas- (Kim, 2014) phrase-level classification demonstrated remarkable results for sification and sentiment and and message-level (Severyn and Moschitti, 2015). performed well analysis for sentiment have in Past analysis SemEval competitions Twitter (Rosenthal et al., 2014; sentiment Rosenthal et al., 2015) have contributed to shape research in this field. SemEval-2016 Task 4 (Nakov et al., 2016) is no exception, as it introduces both quantification and five-point-scale classifica- tion tasks, neither of which have been tackled with deep learning-based approaches before. We apply our deep learning-based model for sen- timent analysis to all subtasks of SemEval-2016 Task 4: three-point scale message polarity classi- fication (subtask A), two-point and five-point scale topic sentiment classification (subtasks B and C re- spectively), and two-point and five-point scale topic sentiment quantification (subtasks D and E respec- tively). Our model achieves excellent results for subtasks B and D, ranks competitively for subtask A, while performing poorly for subtasks C and E. We perform an error analysis of our model to obtain a better un- derstanding of strengths and weaknesses of a deep learning-based approach particularly for these new tasks and subsequently propose improvements. 2 Related work Deep-learning based approaches have recently dom- inated the state-of-the-art in sentiment analysis. Kim (2014) uses a one-layer convolutional neural net- work to achieve top performance on various senti- ment analysis datasets, demonstrating the utility of pre-trained embeddings. State-of-the-art models in Twitter sentiment anal- ysis leverage large amounts of data accessible on Twitter to further enhance their embeddings by treat- ing smileys as noisy labels (Go et al., 2009): Tang et al. (2014) learn sentiment-specific word embed- dings from such distantly supervised data and use these as features for supervised classification, while Severyn and Moschitti (2015) use distantly super- vised data to fine-tune the embeddings of a convolu- tional neural network. In contrast, we observe distantly supervised data not to be as important for some tasks as long as suf- ficient training data is available. 3 Model The model architecture we use is an extension of the CNN structure used by Collobert et al. (2011). The model takes as input a text, which is padded to length n. We represent the text as a concatentation of its word embeddings x1:n where xi ∈ Rk is the k-dimensional vector of the i-th word in the text. The convolutional layer slides filters of different window sizes over the word embeddings. Each filter with weights w ∈ Rhk generates a new feature ci for a window of h words according to the following operation: ci = f (w · xi:i+h−1 + b) (1) Note that b ∈ R is a bias term and f is a non-linear function, ReLU (Nair and Hinton, 2010) in our case. The application of the filter over each possible win- dow of h words or characters in the sentence pro- duces the following feature map: c = [c1, c2, ..., cn−h+1] (2) Max-over-time pooling in turn condenses this fea- ture vector to its most important feature by taking its maximum value and naturally deals with variable in- put lengths. A final softmax layer takes the concatenation of the maximum values of the feature maps produced by all filters and outputs a probability distribution over all output classes. 4 Methodology 4.1 Datasets For every subtask, the organizers provide a training, development, and development test set for training and tuning. We use the concatentation of the training and development test set for each subtask for train- ing and use the development set for validation. Additionally, the organizers make training and de- velopment data from SemEval-2013 and trial data from 2016 available that can be used for training and tuning for subtask A and subtasks B, C, D, and E respectively. We experiment with adding these datasets to the respective subtask. Interestingly, adding them slightly increases loss on the validation set, while providing a significant performance boost on past development test sets, which we view as a proxy for performance on the 2016 test set. For this reason, we include these datasets for training of all our models. score, i.e. We notably do not select the model that achieves the lowest loss on the validation set, but choose the the arith- one that maximizes the F P N metic mean of the F1 of positive and negative tweets, which has historically been used to evaluate the Se- mEval message polarity classification subtask. We observe that the lowest loss does not necessarily lead to the lowest F P N , as it does not include F1 of neu- tral tweets. 1 1 4.2 Pre-processing For pre-processing, we use a script adapted from the pre-processing script1 used for training GloVe vec- tors (Pennington et al., 2014). Besides normalizing urls and mentions, we notably normalize happy and sad smileys, extract hashtags, and insert tags for re- peated, elongated, and all caps characters. 4.3 Word embeddings Past research Severyn and Moschitti, 2015) (Kim, 2014; good a found 1http://nlp.stanford.edu/projects/glove/ preprocess-twitter.rb initialization of word embeddings to be crucial in training an accurate sentiment model. random initialization, We thus evaluate the following evaluation schemes: initialization us- ing pre-trained GloVe vectors, fine-tuning pre- trained embeddings on a distantly supervised cor- pus (Severyn and Moschitti, 2015), and fine-tuning pre-trained embeddings on 40k tweets with crowd- sourced Twitter annotations. Perhaps counter- intuitively, we find that fine-tuning embeddings on a distantly supervised or crowd-sourced corpus does not improve performance on past development test sets when including the additionally provided data for training. We hypothesize that additional training data facilitates learning of the underlying semantics, thereby reducing the need for sentiment-specific em- beddings. Our scores partially echo this theory. For this reason, we initialize our word embed- dings simply with 200-dimensional GloVe vectors trained on 2B tweets. Word embeddings for un- known words are initialized randomly. 4.4 Hyperparameters and pre-processing We tune hyperparameters over a wide range of val- ues via random search on the validation set. We find that the following hyperparameters, which are sim- ilar to ones used by Kim (2014), yield the best per- formance across all subtasks: mini-batch size of 10, maximum sentence length of 50 tokens, word em- bedding size of 200 dimensions, dropout rate of 0.3, l2 regularization of 0.01, filter lengths of 3, 4, and 5 with 100 filter maps each. We train for 15 epochs using mini-batch stochas- the Adadelta update rule tic gradient descent, (Zeiler, 2012), and early stopping. 4.5 Task adaptation and quantification To adapt our model to the different tasks, we simply adjust the number of output neurons to conform to the scale used in the task at hand (two-point scale in subtasks B and D, three-point scale in subtask A, five-point scale in subtasks C and E). We perform a simple quantification for subtasks D and E by aggregating the classified tweets for each topic and reporting their distribution across senti- ments. We would thus expect our results on sub- tasks B and D and results on subtasks C and E to be closely correlated. Metric Our score Best score Rank 8/34 F P N 12/34 RP N 5/34 AccP N 0.593 0.616 0.635 0.633 0.670 0.646 1 Table 1: Our score and rank for subtask A for each metric com- pared to the best team's score (results for official metric in bold). 2013 2014 TW SMS TW TW LJ 2015 TW /s 76.84 51.95 65.51 69.08 50.00 67.28 64.52 13.64 45.71 66.73 49.65 77.83 65.56 + 72.49 - 53.00 47.97 65.23 = 67.53 Table 2: F1 scores of our model for positive, negative, and neu- tral tweets for each progress dataset of subtask A. TW: Tweet. /s: sarcasm. LJ: Live Journal. +: positive. -: negative. =: neutral. 5 Evaluation We report results of our model in Tables 1 and 2 (subtask A), Table 3 (subtask B), Tables 5 and 6 (subtask C), Table 4 (subtask D), and Table 7 (sub- task E). For some subtasks, the organizers make available alternative metrics. We observe that the choice of the scoring metric influences results con- siderably, with our system always placing higher if ranked by one of the alternative metrics. Subtask A. We obtain competitive performance on subtask A in Table 1. Analysis of results on the progress test sets in Table 2 reveals that our sys- tem achieves competitive F1 scores for positive and neutral tweets, but only low F1 scores for negative tweets due to low recall. This is mirrored in Table 1, where we rank higher for accuracy than for recall. accentuates The scoring metric for subtask A, F P OS F1 for positive and negative tweets, thereby ignoring our good performance on neutral tweets and leading to only mediocre ranks on the progress test sets for our system. 1 Subtasks B and D. We achieve a competitive fifth rank for subtask B by the official recall metric in Ta- ble 3. However, ranked by F1 (as in subtask A), we place third – and second if ranked by accuracy. Similarly, for subtask D, we rank fourth (with a dif- ferential of 0.001 to the second rank) by KLD, but second and first if ranked by AE and RAE respec- tively. Jointly, these results demonstrate that classifi- Metric Our score Best score Rank 5/19 3/19 2/19 0.767 0.786 0.864 0.797 0.799 0.870 R F1 Acc Table 3: Our score and rank for subtask B for each metric com- pared to the best team's score (results for official metric in bold). Metric Our score Best score Rank 4/14 KLD 2/14 AE 1/14 RAE 0.054 0.085 0.423 0.034 0.074 0.423 Table 4: Our score and rank for subtask D for each metric com- pared to the best team's score (results for official metric in bold). cation performance is a good indicator for quantifi- cation without using any more sophisticated quan- tification methods. These results are in line with past research (Kim, 2014) showcasing that even a conceptually simple neural network-based approach can achieve excellent results given enough training data per class. These results also highlight that em- beddings trained using distant supervision, which should be particularly helpful for this task as they are fine-tuned using the same classes, i.e. positive and negative, are not necessary given enough data. Subtasks C and E. We achieve mediocre results for subtask C in Table 5, only ranking sixth – how- ever, placing third by the alternative metric. Simi- larly, we only achieve an unsatisfactory eighth rank for subtask E in Table 7. An error analysis for sub- task C in Table 6 reveals that the model is able to differentiate between neutral, positive, and very pos- itive tweets with good accuracy. However, similarly to results in subtask A, we find that it lacks expres- siveness for negative sentiment and completely fails to capture very negative tweets due to their low num- ber in the training data. Additionally, it is unable to take into account sentiment order to reduce error for very positive and very negative tweets. Metric Our score Best score Rank 6/11 M AEM 3/11 M AEµ 1.006 0.607 0.719 0.580 Table 5: Our score and rank for subtask C for each metric com- pared to the best team's score (results for official metric in bold). Sentiment M AEM -2 2.09 -1 1.29 0 1 2 0.78 0.17 0.71 Table 6: Macro-averaged mean absolute error (M AEM) of our model for each sentiment class for subtask C. Lower error is better. Metric Our score Best score Rank 8/10 EM D 0.366 0.243 Table 7: Our score and rank for subtask E compared to the best team's score. Improvements 5.1 We propose different improvements to enable the model to better deal with some of the encountered challenges. Negative sentiment. The easiest way to enable our model to better capture negative sentiment is to include more negative tweets in the training data. Additionally, using distantly supervised data for fine-tuning embeddings would likely have helped to mitigate this deficit. In order to allow the model to better differentiate between different sentiments on a five-point scale, it would be interesting to evaluate ways to create a more fine-grained distantly super- vised corpus using e.g. a wider range of smileys and emoticons or certain hashtags indicating a high de- gree of elation or distress. Ordinal classification. Instead of treating all classes as independent, we can enable the model to take into account ordinal information by simply modifying the labels as in (Cheng et al., 2008). A more sophisticated approach would organically in- tegrate label-dependence into the network. Quantification. Instead of deriving the topic- level sentiment distribution by predicting tweet- level sentiment, we can directly minimize the Kullback-Leibler divergence for each topic. If the feedback from optimizing this objective proves to be too indirect to provide sufficient signals, we can jointly optimize tweet-level as well as topic-level sentiment as in (Kotzias, 2015). 6 Conclusion In this paper, we have presented our deep learning- based approach to Twitter sentiment analysis for two-point, three-point, and five-point scale sen- timent classification and two-point and five-point national Conference on Machine Learning, (3):807– 814. [Nakov et al.2016] Preslav Nakov, Alan Ritter, Sara Rosenthal, Veselin Stoyanov, and Fabrizio Sebastiani. 2016. SemEval-2016 Task 4: Sentiment Analysis in Twitter. In Proceedings of the 10th International Workshop on Semantic Evaluation, San Diego, Cali- fornia. Association for Computational Linguistics. [Pang and Lee2008] Bo Pang and Lillian Lee. 2008. Opinion Mining and Sentiment Analysis. Foundations and trends in information retrieval, 2(1-2):1–135. [Pennington et al.2014] Jeffrey Pennington, Richard Socher, and Christopher D Manning. 2014. Glove: Global Vectors for Word Representation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, pages 1532–1543. and Veselin Stoyanov. [Rosenthal et al.2014] Sara Rosenthal, Alan Ritter, Preslav Nakov, 2014. SemEval-2014 Task 9: Sentiment Analysis in Twitter. Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval 2014), (SemEval):73– 80. [Rosenthal et al.2015] Sara Rosenthal, Preslav Nakov, Svetlana Kiritchenko, Saif M Mohammad, Alan Ritter, and Veselin Stoyanov. 2015. SemEval-2015 Task 10: Sentiment Analysis in Twitter. Proceedings of the 9th International Workshop on Semantic Evaluation (Se- mEval 2015), (SemEval):451–463. [Severyn and Moschitti2015] Aliaksei and Alessandro Moschitti. 2015. UNITN : Training Deep Convolutional Neural Network for Twitter Sentiment Classification. (SemEval):464–469. Severyn [Tang et al.2014] Duyu Tang, Furu Wei, Nan Yang, Ming 2014. Learning Zhou, Ting Liu, and Bing Qin. Sentiment-Specific Word Embedding. Proceedings of the 52nd Annual Meeting of the Association for Com- putational Linguistics, 1:1555–1565. [Zeiler2012] Matthew D. Zeiler. 2012. ADADELTA: An Adaptive Learning Rate Method. scale sentiment quantification. We reviewed the dif- ferent aspects we took into consideration in creat- ing our model. We rank fifth and a close fourth (third and second by alternative metrics) on two- point scale classification and quantification despite using only pre-trained embeddings that contain no sentiment information. We analysed our weaker per- formance on three-point scale sentiment classifica- tion and five-point scale sentiment classification and quantification and found that the model lacks ex- pressiveness to capture negative sentiment and is un- able to take into account class order. Finally, we pro- posed improvements to resolve these deficits. Acknowledgments This project has emanated from research con- ducted with the financial support of the Irish Research Council (IRC) under Grant Number EBPPG/2014/30 and with Aylien Ltd. as Enter- prise Partner. This publication has emanated from research supported in part by a research grant from Science Foundation Ireland (SFI) under Grant Num- ber SFI/12/RC/2289. References [Cheng et al.2008] Jianlin Cheng Jianlin Cheng, Zheng Wang Zheng Wang, and G. Pollastri. 2008. A neu- ral network approach to ordinal regression. 2008 IEEE International Joint Conference on Neural Net- works (IEEE World Congress on Computational Intel- ligence). [Collobert et al.2011] Ronan Collobert, Jason Weston, Leon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel Kuksa. 2011. Natural Language Processing (almost) from Scratch. Journal of Machine Learning Research, 12(Aug):2493–2537. [Go et al.2009] Alec Go, Richa Bhayani, and Lei Huang. 2009. Twitter Sentiment Classification using Distant Supervision. Processing, 150(12):1–6. [Kim2014] Yoon Kim. 2014. Convolutional Neural Net- works for Sentence Classification. Proceedings of the Conference on Empirical Methods in Natural Lan- guage Processing, pages 1746–1751. [Kotzias2015] Dimitrios Kotzias. 2015. From Group to Individual Labels using Deep Features. [Nair and Hinton2010] Vinod Nair and Geoffrey E Hin- ton. 2010. Rectified Linear Units Improve Restricted Boltzmann Machines. Proceedings of the 27th Inter-
1705.00753
1
1705
2017-05-02T01:14:06
A Teacher-Student Framework for Zero-Resource Neural Machine Translation
[ "cs.CL" ]
While end-to-end neural machine translation (NMT) has made remarkable progress recently, it still suffers from the data scarcity problem for low-resource language pairs and domains. In this paper, we propose a method for zero-resource NMT by assuming that parallel sentences have close probabilities of generating a sentence in a third language. Based on this assumption, our method is able to train a source-to-target NMT model ("student") without parallel corpora available, guided by an existing pivot-to-target NMT model ("teacher") on a source-pivot parallel corpus. Experimental results show that the proposed method significantly improves over a baseline pivot-based model by +3.0 BLEU points across various language pairs.
cs.CL
cs
A Teacher-Student Framework for Zero-Resource Neural Machine Translation Yun Chen†, Yang Liu‡, Yong Cheng+, Victor O.K. Li† †Department of Electrical and Electronic Engineering, The University of Hong Kong ‡State Key Laboratory of Intelligent Technology and Systems Tsinghua National Laboratory for Information Science and Technology Department of Computer Science and Technology, Tsinghua University, Beijing, China Jiangsu Collaborative Innovation Center for Language Competence, Jiangsu, China +Institute for Interdisciplinary Information Sciences, Tsinghua University, Beijing, China 7 1 0 2 y a M 2 ] L C . s c [ 1 v 3 5 7 0 0 . 5 0 7 1 : v i X r a [email protected]; [email protected]; [email protected]; [email protected] Abstract While end-to-end neural machine transla- tion (NMT) has made remarkable progress recently, it still suffers from the data scarcity problem for low-resource lan- guage pairs and domains. In this paper, we propose a method for zero-resource NMT by assuming that parallel sentences have close probabilities of generating a sentence in a third language. Based on this assumption, our method is able to train a source-to-target NMT model ("stu- dent") without parallel corpora available, guided by an existing pivot-to-target NMT model ("teacher") on a source-pivot par- allel corpus. Experimental results show that the proposed method significantly im- proves over a baseline pivot-based model by +3.0 BLEU points across various lan- guage pairs. 1 Introduction Neural machine translation (NMT) (Kalchbren- ner and Blunsom, 2013; Sutskever et al., 2014; Bahdanau et al., 2015), which directly models the translation process in an end-to-end way, has attracted intensive attention from the commu- nity. Although NMT has achieved state-of-the-art translation performance on resource-rich language pairs such as English-French and German-English (Luong et al., 2015; Jean et al., 2015; Wu et al., 2016; Johnson et al., 2016), it still suffers from the unavailability of large-scale parallel corpora for translating low-resource languages. Due to the large parameter space, neural models usually learn poorly from low-count events, resulting in a poor choice for low-resource language pairs. Zoph et al. (2016) indicate that NMT obtains much worse translation quality than a statistical machine trans- lation (SMT) system on low-resource languages. As a result, a number of authors have endeav- ored to explore methods for translating language pairs without parallel corpora available. These methods can be roughly divided into two broad categories: multilingual and pivot-based. Firat et al. (2016b) present a multi-way, multilin- gual model with shared attention to achieve zero- resource translation. They fine-tune the attention part using pseudo bilingual sentences for the zero- resource language pair. Another direction is to develop a universal NMT model in multilingual scenarios (Johnson et al., 2016; Ha et al., 2016). They use parallel corpora of multiple languages to train one single model, which is then able to translate a language pair without parallel corpora available. Although these approaches prove to be effective, the combination of multiple languages in modeling and training leads to increased com- plexity compared with standard NMT. Another direction is to achieve source-to-target NMT without parallel data via a pivot, which is either text (Cheng et al., 2016a) or image (Nakayama and Nishida, 2016). Cheng et al. (2016a) propose a pivot-based method for zero- resource NMT: it first translates the source lan- guage to a pivot language, which is then translated to the target language. Nakayama and Nishida (2016) show that using multimedia information as pivot also benefits zero-resource translation. How- ever, pivot-based approaches usually need to di- vide the decoding process into two steps, which is not only more computationally expensive, but also potentially suffers from the error propagation problem (Zhu et al., 2013). In this paper, we propose a new method for zero-resource neural machine translation. Our method assumes that parallel sentences should Figure 1: (a) The pivot-based approach and (b) the teacher-student approach to zero-resource neural machine translation. X, Y, and Z denote source, target, and pivot languages, respectively. We use a dashed line to denote that there is a parallel corpus available for the connected language pair. Solid lines with arrows represent translation directions. The pivot-based approach leverages a pivot to achieve indirect source-to-target translation: it first translates x into z, which is then translated into y. Our training algorithm is based on the translation equivalence assumption: if x is a translation of z, then P (yx; θx→y) should be close to P (yz; θz→y). Our approach directly trains the intended source-to- target model P (yx; θx→y) ("student") on a source-pivot parallel corpus, with the guidance of an existing pivot-to-target model P (yz; θz→y) ("teacher"). have close probabilities of generating a sentence in a third language. To train a source-to-target NMT model without parallel corpora available ("student"), we leverage an existing pivot-to-target NMT model ("teacher") to guide the learning process of the student model on a source-pivot parallel corpus. Compared with pivot-based ap- proaches (Cheng et al., 2016a), our method al- lows direct parameter estimation of the intended NMT model, without the need to divide decod- ing into two steps. This strategy not only im- proves efficiency but also avoids error propaga- tion in decoding. Experiments on the Europarl and WMT datasets show that our approach achieves significant improvements in terms of both trans- lation quality and decoding efficiency over a base- line pivot-based approach to zero-resource NMT on Spanish-French and German-French transla- tion tasks. 2 Background Neural machine translation (Sutskever et al., 2014; Bahdanau et al., 2015) advocates the use of neu- ral networks to model the translation process in an end-to-end manner. As a data-driven approach, NMT treats parallel corpora as the major source for acquiring translation knowledge. Let x be a source-language sentence and y be a target-language sentence. We use P (yx; θx→y) to denote a source-to-target neural translation model, where θx→y is a set of model parame- ters. Given a source-target parallel corpus Dx,y, which is a set of parallel source-target sentences, the model parameters can be learned by maximiz- ing the log-likelihood of the parallel corpus: (cid:40) (cid:88) (cid:104)x,y(cid:105)∈Dx,y (cid:41) (1) θx→y = argmax θx→y log P (yx; θx→y) . Given learned model parameters θx→y, the de- cision rule for finding the translation with the highest probability for a source sentence x is given by (cid:40) (cid:41) P (yx; θx→y) . y = argmax y As a data-driven approach, NMT heavily relies on the availability of large-scale parallel corpora to deliver state-of-the-art translation performance (Wu et al., 2016; Johnson et al., 2016). Zoph et al. (2016) report that NMT obtains much lower BLEU scores than SMT if only small-scale par- allel corpora are available. Therefore, the heavy dependence on the quantity of training data poses a severe challenge for NMT to translate zero- resource language pairs. Simple and easy-to-implement, pivot-based methods have been widely used in SMT for (a)(b)XYZZXYP(zx;✓x!z)P(yz;✓z!y)P(yz;✓z!y)P(yx;✓x!y) translating zero-resource language pairs (de Gis- pert and Marino, 2006; Cohn and Lapata, 2007; Utiyama and Isahara, 2007; Wu and Wang, 2007; Bertoldi et al., 2008; Wu and Wang, 2009; Za- habi et al., 2013; Kholy et al., 2013). As pivot- based methods are agnostic to model structures, they have been adapted to NMT recently (Cheng et al., 2016a; Johnson et al., 2016). Figure 1(a) illustrates the basic idea of pivot- based approaches to zero-resource NMT (Cheng et al., 2016a). Let X, Y, and Z denote source, tar- get, and pivot languages. We use dashed lines to denote language pairs with parallel corpora avail- able and solid lines with arrows to denote transla- tion directions. Intuitively, the source-to-target translation can be indirectly modeled by bridging two NMT mod- els via a pivot: (cid:88) P (yx; θx→z, θz→y) = z P (zx; θx→z)P (yz; θz→y). (2) θx→z = argmax As shown in Figure 1(a), pivot-based ap- proaches assume that the source-pivot parallel cor- pus Dx,z and the pivot-target parallel corpus Dz,y are available. As it is impractical to enumerate all possible pivot sentences, the two NMT models are trained separately in practice: (cid:41) (cid:41) log P (zx; θx→z) log P (yz; θz→y) Due to the exponential search space of pivot sentences, the decoding process of translating an unseen source sentence x has to be divided into two steps: (cid:40) (cid:88) (cid:40) (cid:88) θz→y = argmax (cid:104)x,z(cid:105)∈Dx,z (cid:104)z,y(cid:105)∈Dz,y θx→z θz→y , . (cid:110) (cid:110) P (zx; θx→z) P (yz; θz→y) (cid:111) (cid:111) , . z = argmax z y = argmax y (3) (4) 3 Approach 3.1 Assumptions In this work, we propose to directly model the in- tended source-to-target neural translation based on a teacher-student framework. The basic idea is to use a pre-trained pivot-to-target model ("teacher") to guide the learning process of a source-to-target model ("student") without training data available on a source-pivot parallel corpus. One advantage of our approach is that Equation (1) can be used as the decision rule for decoding, which avoids the error propagation problem faced by two-step de- coding in pivot-based approaches. As shown in Figure 1(b), we still assume that a source-pivot parallel corpus Dx,z and a pivot-target parallel corpus Dz,y are avail- able. Unlike pivot-based approaches, we first use the pivot-target parallel corpus Dz,y to ob- tain a teacher model P (yz; θz→y), where θz→y is a set of learned model parameters. Then, the teacher model "teaches" the student model P (yx; θx→y) on the source-pivot parallel corpus Dx,z based on the following assumptions. Assumption 1 If a source sentence x is a transla- tion of a pivot sentence z, then the probability of generating a target sentence y from x should be close to that from its counterpart z. We can further introduce a word-level assump- tion: Assumption 2 If a source sentence x is a transla- tion of a pivot sentence z, then the probability of generating a target word y from x should be close to that from its counterpart z, given the already obtained partial translation y<j. The two assumptions are empirically verified in our experiments (see Table 2). In the following subsections, we will introduce two approaches to zero-resource neural machine translation based on the two assumptions. The above two-step decoding process potentially suffers from the error propagation problem (Zhu et al., 2013): the translation errors made in the first step (i.e., source-to-pivot translation) will af- fect the second step (i.e., pivot-to-target transla- tion). Therefore, it is necessary to explore methods to directly model source-to-target translation without parallel corpora available. 3.2 Sentence-Level Teaching Given a source-pivot parallel corpus Dx,z, our training objective based on Assumption 1 is de- fined as follows: (cid:16) (cid:88) JSENT(θx→y) KL = (cid:104)x,z(cid:105)∈Dx,z P (yz; θz→y) (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)P (yx; θx→y) (cid:17) , (5) where the KL divergence sums over all possible target sentences: (cid:16) (cid:88) KL y = (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)P (yx; θx→y) (cid:17) P (yz; θz→y) P (yx; θx→y) .(6) P (yz; θz→y) P (yz; θz→y) log As the teacher model parameters are fixed, the training objective can be equivalently written as (cid:88) JSENT(θx→y) E yz; θz→y (cid:104)x,z(cid:105)∈Dx,z = − (cid:104) (cid:105) log P (yx; θx→y) . (7) In training, our goal is to find a set of source-to- target model parameters that minimizes the train- ing objective: (cid:110) (cid:111) JSENT(θx→y) . (8) θx→y = argmin θx→y With learned source-to-target model parameters θx→y, we use the standard decision rule as shown in Equation (1) to find the translation y for a source sentence x. However, a major difficulty faced by our ap- proach is the intractability in calculating the gra- dients because of the exponential search space of target sentences. To address this problem, it is pos- sible to construct a sub-space by either sampling (Shen et al., 2016), generating a k-best list (Cheng et al., 2016b) or mode approximation (Kim and Rush, 2016). Then, standard stochastic gradient descent algorithms can be used to optimize model parameters. 3.3 Word-Level Teaching Instead of minimizing the KL divergence between the teacher and student models at the sentence level, we further define a training objective at the word level based on Assumption 2: (cid:88) JWORD(θx→y) E yz; θz→y (cid:104)x,z(cid:105)∈Dx,z = (cid:104) (cid:105) , (9) J(x, y, z, θz→y, θx→y) where = (cid:16) y(cid:88) j=1 J(x, y, z, θz→y, θx→y) KL P (yz, y<j; θz→y) (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) (cid:17) P (yx, y<j; θx→y) . (10) KL (cid:16) (cid:88) P (yz, y<j; θz→y) P (yz, y<j; θz→y) log Equation (9) suggests that the teacher model P (yz, y<j; θz→y) "teaches" the student model P (yx, y<j; θx→y) in a word-by-word way. Note that the KL-divergence between the two models is (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)P (yx, y<j; θx→y) (cid:17) defined at the word level: P (yz, y<j; θz→y) P (yx, y<j; θx→y) where Vy is the target vocabulary. As the param- eters of the teacher model are fixed, the training objective can be equivalently written as: (cid:105) (cid:88) JWORD(θx→y) y∈Vy (cid:104) = , = − (cid:104)x,z(cid:105)∈Dx,z E yz; θz→y S(x, y, z, θz→y, θx→y) , (11) S(x, y, z, θz→y, θx→y) where = y(cid:88) (cid:88) j=1 y∈Vy (12) P (yz, y<j; θz→y) × log P (yx, y<j; θx→y). (cid:110) (cid:111) JWORD(θx→y) Therefore, our goal is to find a set of source-to- target model parameters that minimizes the train- ing objective: θx→y = argmin θx→y . (13) We use similar approaches as described in Sec- tion 3.2 for approximating the full search space with sentence-level teaching. After obtaining θx→y, the same decision rule as shown in Equa- tion (1) can be utilized to find the most probable target sentence y for a source sentence x. 4 Experiments 4.1 Setup We evaluate our approach on the Europarl (Koehn, 2005) and WMT corpora. To compare with pivot- based methods, we use the same dataset as (Cheng et al., 2016a). All the sentences are tokenized by the tokenize.perl script. All the experiments treat English as the pivot language and French as the target language. For the Europarl corpus, we evaluate our pro- posed methods on Spanish-French (Es-Fr) and German-French (De-Fr) translation tasks in a Corpus Europarl WMT Direction Es→ En De→ En En→ Fr Es→ En En→ Fr Train Dev. 850K 2,000 840K 2,000 900K 2,000 6.78M 3,003 9.29M 3,003 Test 2,000 2,000 2,000 3,003 3,003 Table 1: Data statistics. For the Europarl corpus, we evaluate our approach on Spanish-French (Es- Fr) and German-French (De-Fr) translation tasks. For the WMT corpus, we evaluate our approach on the Spanish-French (Es-Fr) translation task. En- glish is used as a pivot language in all experiments. zero-resource scenario. To avoid the trilingual corpus constituted by the source-pivot and pivot- target corpora, we split the overlapping pivot sen- tences of the original source-pivot and pivot-target corpora into two equal parts and merge them sepa- rately with the non-overlapping parts for each lan- guage pair. The development and test sets are from WMT 2006 shared task.1 The evaluation metric is case-insensitive BLEU (Papineni et al., 2002) as calculated by the multi-bleu.perl script. To deal with out-of-vocabulary words, we adopt byte pair encoding (BPE) (Sennrich et al., 2016) to split words into sub-words. The size of sub-words is set to 30K for each language. For the WMT corpus, we evaluate our approach on a Spanish-French (Es-Fr) translation task with a zero-resource setting. We combine the follow- ing corpora to form the Es-En and En-Fr paral- lel corpora: Common Crawl, News Commentary, Europarl v7 and UN. All the sentences are tok- enized by the tokenize.perl script. New- stest2011 serves as the development set and New- stest2012 and Newstest2013 serve as test sets. We use case-sensitive BLEU to evaluate translation re- sults. BPE is also used to reduce the vocabulary size. The size of sub-words is set to 43K, 33K, 43K for Spanish, English and French, respectively. See Table 1 for detailed statistics for the Europarl and WMT corpora. We leverage an open-source NMT toolkit dl4mt implemented by Theano 2 for all the experiments and compare our approach with state-of-the-art multilingual methods (Firat et al., 2016b) and pivot-based methods (Cheng et al., 2016a). Two variations of our framework are used in the exper- 1http://www.statmt.org/wmt07/shared-task.html 2dl4mt-tutorial: https://github.com/nyu-dl iments: 1. Sentence-Level Teaching: for simplicity, we use the mode as suggested in (Kim and Rush, 2016) to approximate the target sentence space in calculating the expected gradients with respect to the expectation in Equation (7). We run beam search on the pivot sen- tence with the teacher model and choose the highest-scoring target sentence as the mode. Beam size with k = 1 (greedy decoding) and k = 5 are investigated in our experiments, denoted as sent-greedy and sent-beam, re- spectively.3 2. Word-Level Teaching: we use the same mode approximation approach as in sentence-level teaching to approximate the expectation in Equation 12, denoted as word-greedy (beam search with k = 1) and word-beam (beam search with k = 5), respectively. Besides, Monte Carlo estimation by sampling from the teacher model is also investigated since it in- troduces more diverse data, denoted as word- sampling. 4.2 Assumptions Verification To verify the assumptions in Section 3.1, we train a source-to-target translation model P (yx; θx→y) and a pivot-to-target translation model P (yz; θz→y) using the trilingual Europarl corpus. Then, we measure the sentence-level and word-level KL divergence from the source-to- target model P (yx; θx→y) at different iterations to the trained pivot-to-target model P (yz; θz→y) by caculating JSENT (Equation (5)) and JWORD 3We can also adopt sampling and k-best list for approxi- mation. Random sampling brings a large variance (Sutskever et al., 2014; Ranzato et al., 2015; He et al., 2016) for sentence-level teaching. For k-best list, we renormalize the probabilities P (yz; θz→y) ∼ (cid:80) P (yz; θz→y)α y∈Yk P (yz; θz→y)α , where Yk is the k-best list from beam search of the teacher model and α is a hyperparameter controling the sharpness of the distribution (Och, 2003). We set k = 5 and α = 5×10−3. The results on test set for Eureparl Corpus are 32.24 BLEU over Spanish-French translation and 24.91 BLEU over German-French translation, which are slightly better than the sent-beam method. However, considering the traing time and the memory consumption, we believe mode approximation is already a good way to approximate the target sentence space for sentence-level teaching. Approx. greedy beam greedy beam sampling 0 313.0 323.5 274.0 288.7 268.6 Iterations 2w 73.1 73.1 51.5 52.7 53.8 4w 61.5 60.7 43.1 43.3 46.6 6w 56.8 55.4 39.4 39.2 42.8 8w 55.1 54.0 38.8 38.4 42.4 JSENT JWORD Table 2: Verification of sentence-level and word-level assumptions by evaluating approximated KL di- vergence from the source-to-target model to the pivot-to-target model over training iterations of the source-to-target model. The pivot-to-target model is trained and kept fixed. Cheng et al. (2016a) Ours Method pivot hard soft likelihood sent-beam word-sampling Es→ Fr De→ Fr 23.70 29.79 23.88 29.93 23.79 30.57 32.59 25.93 24.39 31.64 33.86 27.03 Table 3: Comparison with previous work on Spanish-French and German-French translation tasks from the Europarl corpus. English is treated as the pivot language. The likelihood method uses 100K parallel source-target sentences, which are not available for other methods. (Equation (9)) on 2,000 parallel source-pivot sen- tences from the development set of WMT 2006 shared task. Table 2 shows the results. The source-to-target model is randomly initialized at iteration 0. We find that JSENT and JWORD decrease over time, suggesting that the source-to-target and pivot-to- target models do have small KL divergence at both sentence and word levels. 4.3 Results on the Europarl Corpus Table 3 gives BLEU scores on the Europarl corpus of our best performing sentence-level method (sent-beam) and word-level method (word-sampling) compared with pivot-based methods (Cheng et al., 2016a). We use the same data preprocessing as in (Cheng et al., 2016a). We find that both the sent-beam and word-sampling methods outperform the pivot-based approaches in a zero-resource scenario across language pairs. Our word-sampling method improves over the best performing zero-resource pivot-based method (soft) on Spanish-French translation by +3.29 BLEU points and German-French translation by +3.24 BLEU points. In addition, the word-sampling mothod surprisingly obtains improvement over the likelihood method, which leverages a source-target parallel corpus. The Method sent-greedy sent-beam word-greedy word-beam word-sampling Es→ Fr test dev 31.05 31.00 31.57 31.64 31.92 31.37 31.21 30.81 33.65 33.86 De→ Fr test dev 21.88 22.34 24.95 24.39 25.15 24.72 24.19 24.64 26.99 27.03 Table 4: Comparison of our proposed methods on Spanish-French and German-French transla- tion tasks from the Europarl corpus. English is treated as the pivot language. significant improvements can be explained by the error propagation problem of pivot-based methods, which propagates translation error of the source-to-pivot translation process to the pivot-to-target translation process. Table 4 shows BLEU scores on the Europarl corpus of our five proposed methods. For sentence-level approaches, the sent-beam method outperforms the sent-greedy method by +0.59 BLEU points over Spanish-French translation and +2.51 BLEU points over German-French transla- tion on the test set. The results are in line with our observation in Table 2 that sentence-level KL di- vergence by beam approximation is smaller than that by greedy approximation. However, as the Figure 2: Validation loss and BLEU across iterations of our proposed methods. Cheng et al. (2016a)† Cheng et al. (2016a)† Firat et al. (2016b) Firat et al. (2016b)† Method Training BLEU Existing zero-resource NMT systems - Es→ En En→ Fr Es→ Fr Newstest2012 Newstest2013 6.78M 9.29M 6.78M 9.29M 100K 34.71M 65.77M 34.71M 65.77M 24.60 25.78 17.59 21.33 pivot likelihood one-to-one many-to-one - - 17.61 21.19 - - Our zero-resource NMT system word-sampling 6.78M 9.29M - 28.06 27.03 Table 5: Comparison with previous work on Spanish-French translation in a zero-resource scenario over the WMT corpus. The BLEU scores are case sensitive. †: the method depends on two-step decoding. time complexity grows linearly with the number of beams k, the better performance is achieved at the expense of search time. For word-level experiments, we observe that the word-sampling method performs much bet- ter than the other two methods: +1.94 BLEU points on Spanish-French translation and +1.88 BLEU points on German-French translation over the word-greedy method; +2.65 BLEU points on Spanish-French translation and +2.84 BLEU points on German-French translation over the word-beam method. Although Table 2 shows that word-level KL divergence approximated by sam- pling is larger than that by greedy or beam, sam- pling approximation introduces more data diver- sity for training, which dominates the effect of KL divergence difference. We plot validation loss4 and BLEU scores over iterations on the German-French translation task in Figure 2. We observe that word-level models 4Validation loss: the average negative log-likelihood of sentence pairs on the validation set. tend to have lower validation loss compared with sentence-level methods. Generally, models with lower validation loss tend to have higher BLEU. Our results indicate that this is not necessarily the case: the sent-beam method converges to +0.31 BLEU points on the validation set with +13 vali- dation loss compared with the word-beam method. Kim and Rush (2016) claim a similar observation in data distillation for NMT and provide an expla- nation that student distributions are more peaked for sentence-level methods. This is indeed the case in our result: on German-French translation task the argmax for the sent-beam student model (on average) approximately accounts for 3.49% of the total probability mass, while the correspond- ing number is 1.25% for the word-beam student model and 2.60% for the teacher model. 4.4 Results on the WMT Corpus The word-sampling method obtains the best per- formance in our five proposed approaches ac- cording to experiments on the Europarl corpus. To further verify this approach, we conduct ex- 0369121530609012015018021003691215051015202530ValidLossIterationssent-greedysent-beamword-greedyword-beamword-sampling·104·104BLEUIterationssent-greedysent-beamword-greedyword-beamword-sampling groundtruth pivot likelihood word-sampling pivot target source Os sent´ais al volante en la costa oeste , en San Francisco , y vuestra misi´on es llegar los primeros a Nueva York . You get in the car on the west coast , in San Francisco , and your task is to be the first one to reach New York . Vous vous asseyez derri`ere le volant sur la cote ouest `a San Francisco et votre mission est d&apos; arriver le premier `a New York . You &apos;ll feel at the west coast in San Francisco , and your mission is to get the first to New York . [BLEU: 33.93] Vous vous sentirez comme chez vous `a San Francisco , et votre mission est d&apos; obtenir le premier `a New York . [BLEU: 44.52] You feel at the west coast , in San Francisco , and your mission is to reach the first to New York . [BLEU: 47.22] Vous vous sentez `a la cote ouest , `a San Francisco , et votre mission est d&apos; atteindre le premier `a New York . [BLEU: 49.44] Vous vous sentez au volant sur la cote ouest , `a San Francisco et votre mission est d&apos; arriver le premier `a New York . [BLEU: 78.78] target pivot pivot target target Table 6: Examples and corresponding sentence BLEU scores of translations using the pivot and likeli- hood methods in (Cheng et al., 2016a) and the proposed word-sampling method. We observe that our approach generates better translations than the methods in (Cheng et al., 2016a). We italicize correct translation segments which are no short than 2-grams. periments on the large scale WMT corpus for Spanish-French translation. Table 5 shows the re- sults of our word-sampling method in compari- son with other state-of-the-art baselines. Cheng et al. (2016a) use the same datasets and the same preprocessing as ours. Firat et al. (2016b) uti- lize a much larger training set.5 Our method ob- tains significant improvement over the pivot base- line by +3.46 BLEU points on Newstest2012 and over many-to-one by +5.84 BLEU points on New- stest2013. Note that both methods depend on a source-pivot-target decoding path. Table 6 shows translation examples of the pivot and likelihood methods proposed in (Cheng et al., 2016a) and our proposed word-sampling method. For the pivot and likelihood methods, the Spainish sentence segment 'sent´ais al volante' is lost when translated to English. Therefore, both methods miss this in- formation in the translated French sentence. How- ever, the word-sampling method generates 'volant sur', which partially translates 'sent´ais al volante', resulting in improved translation quality of the target-language sentence. 4.5 Results with Small Source-Pivot Data The word-sampling method can also be applied to zero-resource NMT with a small source-pivot corpus. Specifically, the size of the source-pivot corpus is orders of magnitude smaller than that of the pivot-target corpus. This setting makes sense in applications. For example, there are signifi- cantly fewer Urdu-English corpora available than 5Their training set does not include the Common Crawl corpus. Method MLE transfer pivot Ours Corpus De-En De-Fr En-Fr × √ √ √ × × √ √ √ √ × × BLEU 19.30 22.39 17.32 22.95 Table 7: Comparison on German-French trans- lation task from the Europarl corpus with 100K German-English sentences. English is regarded as the pivot language. Transfer represents the trans- fer learning method in (Zoph et al., 2016). 100K parallel German-French sentences are used for the MLE and transfer methods. English-French corpora. To fulfill this task, we combine our best per- forming word-sampling method with the initial- ization and parameter freezing strategy proposed in (Zoph et al., 2016). The Europarl corpus is used in the experiments. We set the size of German- English training data to 100K and use the same teacher model trained with 900K English-French sentences. Table 7 gives the BLEU score of our method on German-French translation compared with three other methods. Note that our task is much harder than transfer learning (Zoph et al., 2016) since the latter depends on a parallel German-French corpus. Surprisingly, our method outperforms all other methods. We significantly improve the base- line pivot method by +5.63 BLEU points and the state-of-the-art transfer learning method by +0.56 BLEU points. 5 Related Work Training NMT models in a zero-resource scenario by leveraging other languages has attracted inten- sive attention in recent years. Firat et al. (2016b) proposed an approach which delivers the multi- way, multilingual NMT model proposed by (Firat et al., 2016a) for zero-resource translation. They used the multi-way NMT model trained by other language pairs to generate a pseudo parallel cor- pus and fine-tuned the attention mechanism of the multi-way NMT model to enable zero-resource translation. Several authors proposed a universal encoder-decoder network in multilingual scenar- ios to perform zero-shot learning (Johnson et al., 2016; Ha et al., 2016). This universal model ex- tracts translation knowledge from multiple differ- ent languages, making zero-resource translation feasible without direct training. Besides multilingual NMT, another important line of research attempts to bridge source and tar- get languages via a pivot language. This idea is widely used in SMT (de Gispert and Marino, 2006; Cohn and Lapata, 2007; Utiyama and Isa- hara, 2007; Wu and Wang, 2007; Bertoldi et al., 2008; Wu and Wang, 2009; Zahabi et al., 2013; Kholy et al., 2013). Cheng et al. (2016a) pro- pose pivot-based NMT by simultaneously improv- ing source-to-pivot and pivot-to-target translation quality in order to improve source-to-target trans- lation quality. Nakayama and Nishida (2016) achieve zero-resource machine translation by uti- lizing image as a pivot and training multimodal en- coders to share common semantic representation. Our work is also related to knowledge distilla- tion, which trains a compact model to approximate the function learned by a larger, more complex model or an ensemble of models (Bucila et al., 2006; Ba and Caurana, 2014; Li et al., 2014; Hin- ton et al., 2015). Kim and Rush (2016) first in- troduce knowledge distillation in neural machine translation. They suggest to generate a pseudo cor- pus to train the student network. Compared with their work, we focus on zero-resource learning in- stead of model compression. 6 Conclusion In this paper, we propose a novel framework to train the student model without parallel corpora available under the guidance of the pre-trained teacher model on a source-pivot parallel corpus. We introduce sentence-level and word-level teach- ing to guide the learning process of the student model. Experiments on the Europarl and WMT corpora across languages show that our proposed word-level sampling method can significantly out- performs the state-of-the-art pivot-based methods and multilingual methods in terms of translation quality and decoding efficiency. We also analyze zero-resource translation with small source-pivot data, and combine our word- level sampling method with initialization and pa- rameter freezing suggested by (Zoph et al., 2016). The experiments on the Europarl corpus show that our approach obtains an significant improvement over the pivot-based baseline. In the future, we plan to test our approach on more diverse language pairs, e.g., zero-resource Uyghur-English translation using Chinese as a pivot. It is also interesting to extend the teacher- student framework to other cross-lingual NLP ap- plications as our method is transparent to architec- tures. Acknowledgments This work was done while Yun Chen is visiting Tsinghua University. This work is partially sup- ported by the National Natural Science Founda- tion of China (No.61522204, No. 61331013) and the 863 Program (2015AA015407). References Jimmy Ba and Rich Caurana. 2014. Do deep nets really need to be deep? In NIPS. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- gio. 2015. Neural machine translation by jointly In Proceedings of learning to align and translate. ICLR . Nicola Bertoldi, Madalina Barbaiani, Marcello Fed- erico, and Roldano Cattoni. 2008. Phrase-based sta- tistical machine translation with pivot languages. In IWSLT. Cristian Bucila, Rich Caruana, Niculescu-Mizil. 2006. Model compression. KDD. and Alexandru In Yong Cheng, Yang Liu, Qian Yang, Maosong Sun, and Wei Xu. 2016a. Neural machine translation with pivot languages. CoRR abs/1611.04928. Yong Cheng, Wei Xu, Zhongjun He, Wei He, Hua Wu, Maosong Sun, and Yang Liu. 2016b. Semi- supervised learning for neural machine translation . Trevor Cohn and Mirella Lapata. 2007. Machine trans- lation by triangulation: Making effective use of multi-parallel corpora. In ACL. Adri`a de Gispert and Jos´e B. Marino. 2006. Catalan- english statistical machine translation without paral- In Proceed- lel corpus: bridging through spanish. ings of 5th International Conference on Language Resources and Evaluation (LREC). Citeseer, pages 65–68. Orhan Firat, Kyunghyun Cho, and Yoshua Bengio. 2016a. Multi-way, multilingual neural machine translation with a shared attention mechanism. In HLT-NAACL. Orhan Firat, Baskaran Sankaran, Yaser Al-Onaizan, Fatos T. Yarman-Vural, and Kyunghyun Cho. 2016b. Zero-resource translation with multi-lingual neural machine translation. In EMNLP. Thanh-Le Ha, Jan Niehues, and Alexander H. Waibel. 2016. Toward multilingual neural machine trans- lation with universal encoder and decoder. CoRR abs/1611.04798. Thang Luong, Ilya Sutskever, Quoc V. Le, Oriol Vinyals, and Wojciech Zaremba. 2015. Addressing the rare word problem in neural machine translation. In ACL. Hideki Nakayama and Noriki Nishida. 2016. Zero- resource machine by multimodal encoder-decoder network with multimedia pivot. CoRR abs/1611.04503. translation Franz Josef Och. 2003. Minimum error rate training in statistical machine translation. In ACL. Kishore Papineni, Salim Roukos, Todd Ward, and Wei- Jing Zhu. 2002. Bleu: a method for automatic eval- uation of machine translation. In ACL. Marc'Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. 2015. Sequence level training with recurrent neural networks. CoRR abs/1511.06732. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units . Di He, Yingce Xia, Tao Qin, Liwei Wang, Nenghai Yu, Tie-Yan Liu, and Wei-Ying Ma. 2016. Dual learning for machine translation. In NIPS. Shiqi Shen, Yong Cheng, Zhongjun He, Wei He, Hua Wu, Maosong Sun, and Yang Liu. 2016. Minimum risk training for neural machine translation . Geoffrey E. Hinton, Oriol Vinyals, and Jeffrey Dean. 2015. Distilling the knowledge in a neural network. CoRR abs/1503.02531. Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks . S´ebastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. 2015. On using very large tar- get vocabulary for neural machine translation. In ACL. Melvin Johnson, Mike Schuster, Quoc V. Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Tho- rat, Fernanda B. Vi´egas, Martin Wattenberg, Gre- gory S. Corrado, Macduff Hughes, and Jeffrey Dean. 2016. Google's multilingual neural machine trans- lation system: Enabling zero-shot translation. CoRR abs/1611.04558. Nal Kalchbrenner and Phil Blunsom. 2013. Recurrent continuous translation models. In EMNLP. Ahmed El Kholy, Nizar Habash, Gregor Leusch, Evgeny Matusov, and Hassan Sawaf. 2013. Lan- guage independent connectivity strength features for phrase pivot statistical machine translation. Yoon Kim and Alexander M. Rush. 2016. Sequence- level knowledge distillation. In EMNLP. Philipp Koehn. 2005. Europarl: a parallel corpus for statistical machine translation. Jinyu Li, Rui Zhao, Jui-Ting Huang, and Yifan Gong. 2014. Learning small-size dnn with output- distribution-based criteria. In INTERSPEECH. Masao Utiyama and Hitoshi Isahara. 2007. A compari- son of pivot methods for phrase-based statistical ma- chine translation. In HLT-NAACL. Hua Wu and Haifeng Wang. 2007. Pivot language ap- proach for phrase-based statistical machine transla- tion. Machine Translation 21:165–181. Hua Wu and Haifeng Wang. 2009. Revisiting pivot In language approach for machine translation. ACL/IJCNLP. Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V. Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, Jeff Klingner, Apurva Shah, Melvin Johnson, Xiaobing Liu, Lukasz Kaiser, Stephan Gouws, Yoshikiyo Kato, Taku Kudo, Hideto Kazawa, Keith Stevens, George Kurian, Nishant Patil, Wei Wang, Cliff Young, Jason Smith, Jason Riesa, Alex Rudnick, Oriol Vinyals, Gregory S. Corrado, Macduff Hughes, and Jeffrey Dean. 2016. Google's neural machine translation system: Bridg- ing the gap between human and machine translation. CoRR abs/1609.08144. Samira Tofighi Zahabi, Somayeh Bakhshaei, and Shahram Khadivi. 2013. Using context vectors in improving a machine translation system with bridge language. In ACL. Xiaoning Zhu, Zhongjun He, Hua Wu, Haifeng Wang, Conghui Zhu, and Tiejun Zhao. 2013. Improving pivot-based statistical machine translation using ran- dom walk. In EMNLP. Barret Zoph, Deniz Yuret, Jonathan May, and Kevin Knight. 2016. Transfer learning for low-resource neural machine translation. In EMNLP.
1909.04315
1
1909
2019-09-10T06:31:09
Fine-grained Knowledge Fusion for Sequence Labeling Domain Adaptation
[ "cs.CL" ]
In sequence labeling, previous domain adaptation methods focus on the adaptation from the source domain to the entire target domain without considering the diversity of individual target domain samples, which may lead to negative transfer results for certain samples. Besides, an important characteristic of sequence labeling tasks is that different elements within a given sample may also have diverse domain relevance, which requires further consideration. To take the multi-level domain relevance discrepancy into account, in this paper, we propose a fine-grained knowledge fusion model with the domain relevance modeling scheme to control the balance between learning from the target domain data and learning from the source domain model. Experiments on three sequence labeling tasks show that our fine-grained knowledge fusion model outperforms strong baselines and other state-of-the-art sequence labeling domain adaptation methods.
cs.CL
cs
Fine-grained Knowledge Fusion for Sequence Labeling Domain Adaptation Jiajun Chen1,2 Huiyun Yang1,2 National Key Laboratory for Novel Software Technology, Nanjing, China1 Shujian Huang1,2 Xinyu Dai1,2 Nanjing University, Nanjing, China2 [email protected] {huangsj, daixinyu, chenjj}@nju.edu.cn 9 1 0 2 p e S 0 1 ] L C . s c [ 1 v 5 1 3 4 0 . 9 0 9 1 : v i X r a Abstract In sequence labeling, previous domain adap- tation methods focus on the adaptation from the source domain to the entire target domain without considering the diversity of individ- ual target domain samples, which may lead to negative transfer results for certain sam- ples. Besides, an important characteristic of sequence labeling tasks is that different ele- ments within a given sample may also have di- verse domain relevance, which requires further consideration. To take the multi-level domain relevance discrepancy into account, in this pa- per, we propose a fine-grained knowledge fu- sion model with the domain relevance mod- eling scheme to control the balance between learning from the target domain data and learn- ing from the source domain model. Experi- ments on three sequence labeling tasks show that our fine-grained knowledge fusion model outperforms strong baselines and other state- of-the-art sequence labeling domain adapta- tion methods. Introduction 1 Sequence labeling tasks, such as Chinese word segmentation (CWS), POS tagging (POS) and named entity recognition (NER), are fundamen- tal tasks in natural language processing. Recently, with the development of deep learning, neural se- quence labeling approaches have achieved pretty high accuracy (Chen et al., 2017; Zhang and Yang, 2018), relying on large-scale annotated corpora. However, most of the standard annotated corpora belong to the news domain, and models trained on these corpora will get sharp declines in per- formance when applied to other domains like so- cial media, forum, literature or patents (Daume III, 2007; Blitzer et al., 2007), which limits their ap- plication in the real world. Domain adaptation aims to exploit the abundant information of well- studied source domains to improve the perfor- Types Strongly Ops Steve Jobs resigned as CEO of Apple. Cases Share prices are rising soooo fast! Alas as time goes by, hair's gone. Rock to 204 Section next week! Weakly Table 1: Tweets from the social media domain have different degrees of relevance to the source domain (news). Within each case, the bold part is strongly rel- evant and the italic part is weakly relevant. mance in target domains (Pan and Yang, 2010), which is suitable to handle this issue. Following Daume III (2007), we focus on the supervised do- main adaptation setting, which utilizes large-scale annotated data from the source domain and small- scale annotated data from the target domain. For sequence labeling tasks, each sample is usu- ally a sentence, which consists of a sequence of words/Chinese characters, denoted as the element. We notice an interesting phenomenon: different target domain samples may have varying degrees of domain relevance to the source domain. As de- picted in Table 1, there are some tweets similar to the news domain (i.e. strongly relevant). But there are also some tweets of their own style, which only appear in the social media domain (i.e. weakly rel- evant). The phenomenon can be more complicated for the cases where the whole sample is strongly relevant while contains some target domain spe- cific elements, or vice versa, showing the diversity of relevance at the element-level. In the rest of this paper, we use 'domain relevance' to refer to the domain relevance to the source domain, unless specified otherwise. Conventional neural sequence labeling domain adaptation methods (Liu and Zhang, 2012; Liu et al., 2014; Zhang et al., 2014; Chen et al., 2017; Peng and Dredze, 2017; Lin and Lu, 2018) mainly focus on reducing the discrepancy between the sets of source domain samples and target domain (a) Previous methods (b) Our method Figure 1: Previous methods transfer knowledge by the whole sample set, while our method consider di- verse domain relevance within the target domain set and within every target sample to transfer knowledge respectively. samples. However, they neglect the diverse do- main relevance of individual target domain sam- ples, let alone the element-level domain relevance. As depicted in Figure 1, obviously, strongly rele- vant samples/elements should learn more knowl- edge from the source domain, while weakly rele- vant samples/elements should learn less and keep their characteristics. In this paper, we propose a fine-grained knowl- edge fusion model to control the balance between learning from the target domain data and learn- ing from the source model, inspired by the knowl- edge distillation method (Bucila et al., 2006; Hin- ton et al., 2015). With both the sample-level and element-level domain relevance modeling and incorporating, the fine-grained knowledge fusion model can alleviate the negative transfer (Rosen- stein et al., 2005) in sequence labeling domain adaptation. We verify the effectiveness of our method on six domain adaptation experiments of three different tasks, i.e. CWS, POS and NER, in two different languages, i.e. Chinese and English, respectively. Experiments show that our method achieves bet- ter results than previous state-of-the-art methods on all tasks. We also provide detailed analyses to study the knowledge fusion process. Contributions of our work are summarized as follows: • We propose a fine-grained knowledge fusion model to balance the learning from the target data and learning from the source model. • We also propose multi-level relevance mod- eling schemes to model both the sample-level and element-level domain relevance. Figure 2: The architecture of basicKD (with the red α, see §2) or fine-grained knowledge fusion model (with the blue α, see §4), where the green part belongs to the source model, the orange part belongs to the target model and the white part is common. Better viewed in color. • Empirical evidences and analyses are pro- vided on three different tasks in two different languages, which verify the effectiveness of our method. 2 Knowledge Distillation for Adaptation Knowledge distillation (KD), which distills the knowledge from a sophisticated model to a simple model, has been employed in domain adaptation (Bao et al., 2017; Meng et al., 2018). Recently, on- line knowledge distillation(Furlanello et al., 2018; Zhou et al., 2018) is shown to be more effective, which shares lower layers between the two models and trains them simultaneously. For sequence labeling domain adaptation, we utilize the online knowledge distillation method to distill knowledge from the source model to improve the target model, denoted as basicKD, which is depicted in Figure 2. We use the Bi- LSTM-CRF architecture (Huang et al., 2015), for both the source model and the target model, and share the embedding layer between them. Notations For the rest of the paper, we use the superscript S and T to denote the source domain and the target domain, respectively. Source do- main data is a set of m samples with gold la- j=1. Simi- bel sequences, denoted as (xS larly, target domain data has n samples, denoted j , yS j )m samesourcetargetsourcetargettransfertransfermoreless transferhigh domain relevancetarget sampleset-to-set knowledge transferset-to-sample knowledge transferequallysourcetargettargettransfera target sample(a) set-to-set KT(b) set-to-sample KTlow domain relevancesamplecharacter/wordsourcestrongly relevantweakly relevantsampleelementmore transferless transfersamesourcetargetsourcetargettransfertransfermoreless transferhigh domain relevancetarget sampleset-to-set knowledge transferset-to-sample knowledge transferequallysourcetargettargettransfera target sampleset-to-set knowledge transferset-to-sample knowledge transferlow domain relevancesamplecharacter/wordsourcehigh domain relevancelow domain relevancesampleelementmore transferless transfershared embedding layer!"!#Bi-LSTMBi-LSTMsoftmaxCRFsoftmaxCRFℒ",-#ℒ./#ℒ#⊕1"23"23#3#45678/4:;:</4<=;>?@#@"1#4 as (xT i , yT i )n The training loss of the source model is the cross entropy between the predicted label distri- bution y and the gold label y: i=1, where n (cid:28) m. m(cid:88) LS = − 1 m j=1 yS j log yS j (1) The training loss of the target model is com- posed of two parts, namely the sequence label- ing loss LT SEQ and the knowledge distillation loss LT KD: LT = (1 − α)LT KD SEQ + αLT n(cid:88) n(cid:88) yT i log yT i pS i log pT i i=1 i=1 LT SEQ = − 1 n LT KD = − 1 n (2) (3) (4) SEQ is similar to LS, while LT where LT KD is the cross entropy between the probability distribu- tions predicted by the source model and the tar- get model. α is a hyper-parameter scalar, which is used to balance the learning from the target do- main data and the learning from the source model. 3 Relevance Modeling BasicKD provides individual learning goals for every sample and element of the target domain, using a scalar α to weight. As a result, the source model has the same influence on all target sam- ples, in which the diversity of domain relevance is neglected. Here we present methods to model the domain relevance of target samples and elements, which could then be used to guide the knowledge fu- sion process (see §4). The overall architecture is shown in Figure 3. The relevance of each sam- ple is a scalar, denoted as the sample-level rele- vance weight, wsamp for the ith sample, which can be obtained by the sample-level domain classifi- cation. The relevance of each element is also a scalar, while the relevance weights of all elements within a sample form a weight vector welem, which can be obtained by the similarity calculation. i 3.1 Element-level Relevance To acquire the element-level relevance, we employ the domain representation q ∈ R2dh (dh is the di- mension of the Bi-LSTM) and calculate the simi- larity between the element representation and the Figure 3: The relevance modeling process (see §3), where the block f denotes Eq.(10) and the block g de- notes Eq.(14). domain representation. We incorporate two meth- ods to get q: (1) Domain-q: q is a trainable do- main specific vector, where every element within a domain share the same q; (2) Sample-q: q is the domain relevant feature extracted from each sam- ple, where every element within a sample share the same q. Because of the superiority of the capsule network modeling abstract features (Gong et al., 2018; Yang et al., 2018), we use it to capture the domain relevant features within a sample. We in- corporate the same bottom-up aggregation process as Gong et al. (2018) and the encoded vector is re- garded as q: q = Capsule(h) (5) where h is the hidden state matrix of a sample. The similarity calculation formula is the matrix dot 1: j = q(cid:62)Bhj welem (6) where hj is the hidden states of the jth element and is the relevance weight of it. B ∈ R2dh×2dh welem is a trainable matrix. j 3.2 Sample-level Relevance To acquire the sample-level domain relevance, we make use of the domain label to carry out sample- level text classification (two class, source domain or target domain). The weight welem is normalized across the sample length using the softmax func- tion, then the sample representation can be ob- 1We also try dot and MLP, while matrix dot get better performance with fewer parameters. S/T$%&%'(%&%'Domain classifier()*'+,$)*'+Similaritycalculation-Weighted sum('.&/0⨀fgCapsule layerℒ56r tained by the weighted sum of hidden states. The process can be expressed as: (cid:80) L(cid:88) welem j = exp(welem ) k exp(welem j k r = elem · hj wj ) (7) (8) j=1 r ∈ R2dh is the sample representation and L is the sample length. Once the sample representation is obtained, the multi-layer perceptron (MLP) and softmax do sample classification next: [wsamp, 1 − wsamp] = [softmax(MLP(r))] where wsamp is the sample relevance weight. 4 Fine-grained Knowledge Fusion for (cid:62) (9) Adaptation With the relevance modeling, the fine-grained knowledge fusion model is proposed to fuse the knowledge from the source domain and the target domain at different levels. The overall architecture is shown in Figure 2. 4.1 Sample-level Knowledge Fusion Different samples of target domain tend to show different domain relevance, and as a result, they need to acquire different amount of knowledge from the source domain. Different α is assigned to each target sample based on its domain relevance to achieve the sample-level knowledge fusion. The new α can be computed as: = σ(τ · wsamp αsamp i is the α of the ith sample and wsamp (10) where αsamp is the relevance weight of it; σ denotes the sigmoid function; τ is temperature and γ is bias. + γ) i i i The loss functions of the target model can be computed as: LT = LT SEQ + LT KD (11) n(cid:88) i=1 n(cid:88) i=1 LT SEQ = − 1 n (1 − αsamp i )yT i log yT i (12) LT KD = − 1 n αsamp i pS i log pT i (13) The sample classification losses of the source sc are both cross en- sc and target model LT model LS tropy. 4.2 Element-level Knowledge Fusion Besides the sample-level domain relevance, dif- ferent elements within a sample tend to present diverse domain relevance. In this method, we assign different α to each element based on its domain relevance weight to achieve the element- level knowledge fusion. The new α can be com- puted as: i + bα)] i = σ(Wαwelem αelem ∈ RL is a vector, in which αelem where αelem de- notes the α of the jth element in the ith sample. welem is the relevance weight of the ith sample. Wα and bα are trainable parameters. (14) ij i i The loss functions of the target model can be (1 − αelem ij )yT ij log yT ij (15) expressed as: LT SEQ = − 1 n L(cid:88) n(cid:88) n(cid:88) L(cid:88) j=1 i=1 i=1 j=1 LT KD = − 1 n αelem ij pS ij log pT ij (16) where ∗ij denotes the ∗ of the jth element in the ith sample, and the final loss function is the same with Eq.(11). 4.3 Multi-level Knowledge Fusion In this method, we take both the sample-level and element-level relevance diversities into account to implement the multi-level knowledge fusion, and the multi-level α can be computed as: αmulti = αsamp (cid:12) αelem (17) where (cid:12) denotes the element-wise product. αmulti ∈ Rn×L is a matrix as well. The loss functions of the target model can be in Eq.(15) ij with αmulti obtained by replacing αelem and Eq.(16). ij 4.4 Training Process Both the source model and the target model can be pre-trained on the source domain data (warm up, optional). In the fine-grained knowledge fusion method, the source model and the target model are trained alternately. Within an episode, we use I steps to train the source model ahead, then the soft target (pS) can be obtained and the target model will be trained. During the training of the Task CWS POS NER Language Chinese Chinese Chinese English Chinese English Source CTB6 (Xue et al., 2005) CTB6 (Xue et al., 2005) CTB6 (Xue et al., 2005) PTB (Marcus et al., 1993) MSRA (Levow, 2006) Ontonotes (Ralph et al., 2013) Target Zhuxian (Zhang et al., 2014) Weibo (Qiu et al., 2016) Weibo (Qiu et al., 2016) Twitter (Ritter et al., 2011) WeiboNER (Peng and Dredze, 2015) Twitter (Ritter et al., 2011) Domain news → novels news → social media Table 2: Datasets used in this paper. for i = 1 to I do Sample b samples from the source data Compute LS, and update θS Compute LS sc, and update θS Algorithm 1 Training Process of Knowledge Fusion 1. Input: source data, target data 2. Hyper − parameters: batch size b, teach step I 3. Initialize parameters of the source and target model 4. (optional) Use the source data to pre-train θS and θT 5. repeat 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. end while 20. until converge Sample b samples from the target data Use relevance modeling to get wsamp,welem Compute αsamp/αelem/αmulti and LT Use θT to predict pT , and compute LT Compute LT , and update θT Compute LT sc, and update θT end for Use θS to test xT while in an episode: train and get pS SEQ KD target model, the parameters of the source model are fixed (gradient block). Every training step in- cludes the sequence labeling training and the sam- ple classification training. We conduct early stop- ping according to the performance of the target model. The whole training process is shown in Algorithm 1. 5 Experiments 5.1 Datasets We conduct three sequence labeling tasks: CWS, POS and NER, and the latter two tasks contain- ing both Chinese and English settings. Detailed datasets are shown in Table 2. There are two kinds of source-target domain pairs: news-novels and news-social media. To be consistent with the set- ting where there is only small-scale target domain data, we use 5% training data of Weibo for both CWS and POS. For the different NER tag sets, we only focus on three types of entities: Person (PER), Location (LOC) and Organization (ORG) and regard other types as Other (O). 5.2 Settings For each task, hyper-parameters are set via grid search on the target domain development set. Em- bedding size and the dimension of LSTM hidden states is set to 100. Batch size is set to 64. Learn- ing rate is set to 0.01. We employ the dropout strategy on the embedding and MLP layer with the rate of 0.2. The l2 regularization term is set to 0.1. The gradient clip is set to 5. The teach step I is set to 100. The routing iteration is set to 3 and the number of the output capsules is set to 60. The temperature τ is initialized to 1 and the prob- ability bias γ is initialized to 0.5. We set the α of the basicKD method to 0.5 according to Hinton et al. (2015). We randomly initialize the embed- ding matrix without using extra data to pre-train, unless specified otherwise. 5.3 Baselines We implement several baseline methods, includ- ing: source only (training with only source do- main data), target only (training with only target domain data) and basicKD (see §2). We also re-implement state-of-the-art sequence labeling domain adaptation methods, following their settings except for unifying the embedding size and the dimension of LSTM hidden states: • Pre-trained methods: Pre-trained embed- ding incorporates source domain data with its gold label to pre-train context-aware char- acter embedding (Zhou et al., 2017), which is used to initialize the target model; Pre- trained model trains the model on the source domain and then finetune it on the target do- main. • Projection methods: Linear projection (Peng and Dredze, 2017) uses the domain- relevant matrix to transform the learned rep- resentation from different domains into the shared space; Domain mask (Peng and Dredze, 2017) masks the hidden states of Bi- LSTM to split the representations into private Methods Target only BasicKD Pre-trained embedding Pre-trained model Linear projection Domain mask NAL AMCL FGKF + Pre-trained embedding CWS Zhuxian 5% Weibo F F 92.80 94.23 93.70 94.43 94.14 94.30 94.47 94.62 95.01 95.09 ROOV 65.81 74.08 70.44 74.30 72.75 75.20 74.62 74.46 77.26 77.56 84.01 89.21 87.62 89.50 88.77 88.84 88.63 89.42 90.45 90.73 ROOV 64.12 76.26 72.27 76.27 75.85 75.03 75.77 76.16 77.27 77.87 POS NER zh 93.03 95.69 94.96 96.10 95.92 96.01 96.19 94.13 96.60 96.36 en 86.83 89.96 89.70 90.05 89.36 89.81 90.48 89.12 91.33 91.66 zh 46.49 49.92 52.53 54.25 52.71 54.12 54.70 51.47 55.60 57.57 en 59.58 62.15 61.36 62.88 62.27 62.64 63.32 61.57 63.81 65.51 Table 3: Results of domain adaptation on three tasks, where zh denotes the Weibo datasets (in Chinese), and en denotes the Twitter dataset (in English). and public regions to do the projection; Neu- ral adaptation layer (NAL) (Lin and Lu, 2018) incorporates adaptation layers at the input and output to conduct private-public- private projections. • Adversarial method: Adversarial multi- criteria learning (AMCL) (Chen et al., 2017) uses the shared-private architecture with the adversarial strategy to learn the shared representations across domains. 5.4 Overall Results on CWS We use the F1-score (F) and the recall of out- of-vocabulary words (Roov) to evaluate the do- main adaptation performance on CWS. We com- pare methods with different relevance modeling schemes and different levels of knowledge fusion, without warm up. And we denote our final model as FGKF, which is the multi-level knowledge fu- sion with the sample-q relevance modeling and warm up. Methods Source only Target only BasicKD Domain-q αsamp Domain-q αelem Domain-q αmulti Sample-q αsamp Sample-q αelem Sample-q αmulti FGKF Zhuxian 5% Weibo F F 83.86 92.80 94.23 94.55 94.81 94.75 94.57 94.78 94.91 95.01 ROOV 62.40 65.81 74.08 74.02 74.75 74.96 74.47 74.52 75.56 77.26 83.75 84.01 89.21 89.63 89.99 90.06 89.77 90.07 90.20 90.45 ROOV 70.74 64.12 76.26 75.93 77.59 77.25 76.81 76.94 77.46 77.27 Table 4: Results of baselines and fine-grained knowl- edge fusion methods on CWS. The results in Table 4 show that both the ba- sicKD method and fine-grained methods achieve basicKD on average), as it performance improvements through domain adap- tation. Compared with the basicKD method, FGKF behaves better (+1.1% F and +2.8% Roov v.s. takes multi- level relevance discrepancies into account. The sample-q method performs better than the domain- q method, which shows the domain feature is bet- ter represented at the sample level, not at the do- main level. As for the granularity of α, the per- formances of αelem is better than αsamp, showing the necessity of modeling element-level relevance. And there isn't a distinct margin between αelem and αmulti as most of the multi-level domain rel- evance can be included by the element level. Re- sults of FGKF with warm up indicate that starting from sub-optimal point is better than starting from scratch for the target model. Among related works (Table 3), AMCL and Pre-trained model methods have better perfor- mances in CWS. Compared with other methods, FGKF achieves the best results in both F and ROOV. Results demonstrate the effectiveness of our fine-grained knowledge fusion architecture for domain adaptation, and also show the significance of considering sample-level and element-level rel- evance discrepancies. 5.5 Overall Results on POS and NER To further verify the effectiveness of FGKF, we conduct experiments on POS and NER tasks, us- ing F1-score as the evaluation criterion. Detailed results are shown in Table 3. In these tasks, FGKF achieves better results than other adaptation meth- ods. Extra gain could be obtained by using pre- trained embedding. These results also verify the generalization of our method over different tasks and languages. Figure 4: Two cases of the element-level relevance modeling visualization, where the upper one belongs to the domain-q method and the lower one belongs to the sample-q method. The green dotted circle indicates the correct domain relevant element and the red solid circle indicates the ignored or mistaken extracted element. 6 Analysis In this section, we will display and discuss the domain adaptation improvements provided by our fine-grained knowledge fusion method. 6.1 Performances of Elements with Different Relevance To further probe into the experimental results of the fine-grained knowledge fusion, we classify the target test data (in element level) into two classes: strongly relevant and weakly relevant, based on their relevance degrees to the source domain. The partition threshold is according to the average rel- evance score of the target training data. Detailed results on Twitter are depicted in Table 5. Methods Source only Target only BasicKD FGKF POS Strong Weak 82.48 87.47 87.41 86.46 83.82 91.92 92.55 89.93 NER Strong Weak 46.30 68.27 56.29 62.01 52.63 70.20 71.81 57.92 Table 5: Results of the strongly/weakly relevant ele- ments on the Twitter test set. It is reasonable that both the basicKD and FGKF enhance the performance of the strongly relevant part, while FGKF get larger improve- ments because it is able to enhance the knowledge fusion by learning more from the source model. For the weakly relevant part, the basicKD method damages the performance on it (from 87.41 to 83.82 for POS and from 56.29 to 52.63 for NER), which indicate the negative transfer. On the con- trary, FGKF improves the performance of the weakly relevant part compared with the target only baseline with a large margin. It is shown that the fine-grained domain adaptation method can reduce the negative transfer on the weakly relevant part and contribute to the transfer on the strongly rele- vant one. 6.2 Relevance Weight Visualization We carry out the visualization of the element-level relevance weight to illustrate the effects of the two relevance modeling schemes (domain-q and sample-q). Figure 4 exhibits two cases of element- level relevance modeling results, from which we can explicitly observe that the two schemes cap- ture different domain relevance within a sample. In the first case, the sample-q method extracts more domain relevant elments, like "Qingyun", "Beast God" and "Zhuxian Old Sword", while the domain-q method ignores the last one. In the sec- ond case, the domain-q method extracts "front" in- correctly. These results indicate that the sample- q method can implement better relevance mod- eling than the domain-q method to some extent, and prove that the domain relevant feature is better represented at the sample level, not at the domain level. 6.3 Case Study We take two samples in Twitter test set as exam- ples to show how the element-level relevance af- fects the adaptation. Results in Table 6 show that both basicKD and FGKF can improve the perfor- mance of strongly relevant elements, e.g. "got (VBD)", "Lovis (B-PER)". However, only FGKF reduces the transfer of source domain errors, e.g. "u (NN)", "The (B-ORG) Sun (I-ORG)". 6.4 Ablation Study We conduct the ablation study on Twitter dataset (Table 7). Results show the gradient block and the 是日青云大战,兽神败在诛仙古剑之下是日青云大战,兽神败在诛仙古剑之下That day Qing Yun big battle , Beast God lose at Zhu Xian Old Sword under鬼厉一一记在心里,向面前的大巫师点了点头鬼厉一一记在心里,向面前的大巫师点了点头Ghostone one keep at mind in ,to face front big wizard nodnod head Tasks Sentence Source only Target only BasicKD FGKF got POS u I PN VBD NN PN VBZ PN PN VBD NN PN VBD PN next week NN JJ NN JJ NN JJ JJ NN Louis B-PER O B-PER B-PER NER interview with O O O O O O O O The O O Sun O O B-ORG I-ORG B-ORG I-ORG Table 6: Two cases of domain adaptation, where the underlined tags are wrong. multi-level knowledge fusion are of vital impor- tance to FGKF. The embedding sharing and warm up also make contributions. POS NER Methods FGKF w/o share embedding w/o gradient block w/o αsamp w/o αelem w/o αmulti w/o warm up F 91.33 90.75 88.48 90.94 90.23 90.12 90.89 ∆ - -0.58 -2.85 -0.39 -1.10 -1.21 -0.44 F 63.81 62.47 58.83 63.52 62.43 62.32 63.17 ∆ - -1.34 -4.98 -0.30 -1.38 -1.49 -0.64 Table 7: Ablation results of the Twitter test set. Influence of Target Data Size 6.5 Here we investigate the impact of the target do- main data size on FGKF. As is depicted in Figure 5, when the size is small (20%), the gap is pretty huge between FGKF and basicKD, which verifies the significance of fine-grained knowledge fusion in the low-resource setting. Even with the size of target data increasing, there are still stable margins between the two methods. Figure 5: Results of CWS target test set with vary- ing target training data size. Only 10% training data of Weibo is utilized. 7 Related Work Besides the source domain data, some methods utilize the target domain lexicons (Liu et al., 2014; Zhang et al., 2014), unlabeled (Liu and Zhang, 2012) or partial-labeled target domain data (Liu et al., 2014) to boost the sequence labeling adap- tation performance, which belong to unsupervised or semi-supervised domain adaptation. However, we focus on supervised sequence labeling do- main adaptation, where huge improvement can be achieved by utilizing only small-scale annotated data from the target domain. Previous works in domain adaptation often try to find a subset of source domain data to align with the target domain data (Chopra et al., 2013; Ruder and Plank, 2017) which realizes a kind of source data sample or construct a common fea- ture space, while those methods may wash out informative characteristics of target domain sam- ples. Instance-based domain adaptation (Jiang and Zhai, 2007; Zhang and Xiong, 2018) implement the source sample weighting by assigning higher weights to source domain samples which are more similar to the target domain. There are also some methods (Guo et al., 2018; Kim et al., 2017; Zeng et al., 2018) explicitly weighting multiple source domain models for target samples in multi-source domain adaptation. However, our work focuses on the supervised single source domain adaptation, which devote to implementing the knowledge fu- sion between the source domain and the target do- main, not within multiple source domains. More- over, considering the important characteristics of sequence labeling tasks, we put more attention to the finer-grained adaptation, considering the do- main relevance in sample level and element level. 8 Conclusion In this paper, we propose a fine-grained knowl- edge fusion model for sequence labeling domain adaptation to take the domain relevance diversity of target data into account. With the relevance modeling on both the sample level and element level, the knowledge of the source model and tar- get data can achieve multi-level fusion. Experi- mental results on different tasks demonstrate the effectiveness of our approach, and show the poten- tial of our approach in a broader range of domain adaptation applications. Acknowledgements We would like to thank the anonymous review- ers for their insightful comments. Shujian Huang is the corresponding author. This work is sup- ported by National Science Foundation of China (No. U1836221, No. 61772261), National Key R&D Program of China (No. 2019QY1806). References Zuyi Bao, Si Li, Weiran Xu, and Sheng Gao. 2017. Neural regularized domain adaptation for Chinese word segmentation. In AFNLP. John Blitzer, Mark Dredze, and Fernando Pereira. 2007. Biographies, bollywood, boom-boxes and blenders: Domain adaptation for sentiment classi- fication. In ACL. Cristian Bucila, Rich Caruana, Niculescu-Mizil. 2006. Model compression. SIGKDD. and Alexandru In Gina-Anne Levow. 2006. The third international Chi- nese language processing bakeoff: Word segmenta- tion and named entity recognition. In AFNLP. Bill Yuchen Lin and Wei Lu. 2018. Neural adapta- tion layers for cross-domain named entity recogni- tion. In EMNLP. Yang Liu and Yue Zhang. 2012. Unsupervised domain adaptation for joint segmentation and pos-tagging. In COLING. Yijia Liu, Yue Zhang, Wanxiang Che, Ting Liu, and Fan Wu. 2014. Domain adaptation for CRF-based Chinese word segmentation using free annotations. In EMNLP. Mitchell P. Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. 1993. Building a large annotated corpus of English: The penn treebank. Computa- tional Linguistics. Zhong Meng, Jinyu Li, Yifan Gong, and Biing-Hwang Juang. 2018. Adversarial teacher-student learning for unsupervised domain adaptation. In ICASSP. Sinno Jialin Pan and Qiang Yang. 2010. A survey on transfer learning. IEEE Trans. Knowl. Data Eng. Xinchi Chen, Zhan Shi, Xipeng Qiu, and Xuanjing Huang. 2017. Adversarial multi-criteria learning for Chinese word segmentation. In ACL. Nanyun Peng and Mark Dredze. 2015. Named entity recognition for Chinese social media with jointly trained embeddings. In EMNLP. Sumit Chopra, Suhrid Balakrishnan, and Raghuraman Gopalan. 2013. Dlid: Deep learning for domain adaptation by interpolating between domains. In ICML. Hal Daume III. 2007. Frustratingly easy domain adap- tation. In ACL. Tommaso Furlanello, Zachary Chase Lipton, Michael Tschannen, Laurent Itti, and Anima Anandkumar. 2018. Born-again neural networks. In ICML. Jingjing Gong, Xipeng Qiu, Shaojing Wang, and Xuan- jing Huang. 2018. Information aggregation via dy- namic routing for sequence encoding. In COLING. Jiang Guo, Darsh Shah, and Regina Barzilay. 2018. Multi-source domain adaptation with mixture of ex- perts. In EMNLP. Geoffrey E. Hinton, Oriol Vinyals, and Jeffrey Dean. 2015. Distilling the knowledge in a neural network. In NIPS. Zhiheng Huang, Wei Xu, and Kai Yu. 2015. Bidi- rectional LSTM-CRF models for sequence tagging. arXiv:1508.01991. Version 1. Jing Jiang and ChengXiang Zhai. 2007. Instance weighting for domain adaptation in nlp. In ACL. Young-Bum Kim, Karl Stratos, and Dongchan Kim. 2017. Domain attention with an ensemble of ex- perts. In ACL. Nanyun Peng and Mark Dredze. 2017. Multi- In task domain adaptation for sequence tagging. Repl4NLP. Xipeng Qiu, Peng Qian, and Zhan Shi. 2016. Overview of the NLPCC-ICCPOL 2016 shared task: Chinese In IC- word segmentation for micro-blog texts. CPOL. Weischedel Ralph, Palmer Martha, and Marcus et al. Mitchell. 2013. Ontonotes release 5.0 ldc2013t19. In Linguistic Data Consortium. Alan Ritter, Sam Clark, Mausam, and Oren Etzioni. 2011. Named entity recognition in tweets: An ex- perimental study. In EMNLP. Michael T Rosenstein, Zvika Marx, Leslie Pack Kael- bling, and Thomas G Dietterich. 2005. To transfer or not to transfer. NIPS. Sebastian Ruder and Barbara Plank. 2017. Learning to select data for transfer learning with bayesian opti- mization. In EMNLP. Naiwen Xue, Fei Xia, Fu-Dong Chiou, and Martha Palmer. 2005. The Penn Chinese Treebank: Phrase structure annotation of a large corpus. Natural Lan- guage Engineering. Min Yang, Wei Zhao, Jianbo Ye, Zeyang Lei, Zhou Zhao, and Soufei Zhang. 2018. Investigating cap- sule networks with dynamic routing for text classifi- cation. In EMNLP. Jiali Zeng, Jinsong Su, Huating Wen, Yang Liu, Jun Xie, Yongjing Yin, and Jianqiang Zhao. 2018. Multi-domain neural machine translation with word- level domain context discrimination. In EMNLP. Meishan Zhang, Yue Zhang, Wanxiang Che, and Ting Liu. 2014. Type-supervised domain adaptation for joint segmentation and pos-tagging. In ACL. Shiqi Zhang and Deyi Xiong. 2018. Sentence weight- ing for neural machine translation domain adapta- tion. In COLING. Yue Zhang and Jie Yang. 2018. Chinese ner using lat- tice lstm. In ACL. Guorui Zhou, Ying Fan, Runpeng Cui, Weijie Bian, Xi- aoqiang Zhu, and Kun Gai. 2018. Rocket launch- ing: A universal and efficient framework for training well-performing light net. In AAAI. Hao Zhou, Zhenting Yu, Yue Zhang, Shujian Huang, XIN-YU DAI, and Jiajun Chen. 2017. Word-context character embeddings for Chinese word segmenta- tion. In EMNLP.
1903.12008
1
1903
2019-03-28T14:33:50
Handling Noisy Labels for Robustly Learning from Self-Training Data for Low-Resource Sequence Labeling
[ "cs.CL", "cs.LG" ]
In this paper, we address the problem of effectively self-training neural networks in a low-resource setting. Self-training is frequently used to automatically increase the amount of training data. However, in a low-resource scenario, it is less effective due to unreliable annotations created using self-labeling of unlabeled data. We propose to combine self-training with noise handling on the self-labeled data. Directly estimating noise on the combined clean training set and self-labeled data can lead to corruption of the clean data and hence, performs worse. Thus, we propose the Clean and Noisy Label Neural Network which trains on clean and noisy self-labeled data simultaneously by explicitly modelling clean and noisy labels separately. In our experiments on Chunking and NER, this approach performs more robustly than the baselines. Complementary to this explicit approach, noise can also be handled implicitly with the help of an auxiliary learning task. To such a complementary approach, our method is more beneficial than other baseline methods and together provides the best performance overall.
cs.CL
cs
Handling Noisy Labels for Robustly Learning from Self-Training Data for Low-Resource Sequence Labeling Debjit Paul∗§, Mittul Singh†§, Michael A. Hedderich‡, Dietrich Klakow‡ ∗Research Training Group AIPHES, Institute for Computational Linguistics, †Department of Signal Processing and Acoustics, Aalto University, Finland Heidelberg University, Germany ‡Spoken Language Systems (LSV), Saarland Informatics Campus, Saarland University, Germany 9 1 0 2 r a M 8 2 ] L C . s c [ 1 v 8 0 0 2 1 . 3 0 9 1 : v i X r a [email protected], [email protected], {mhedderich, dietrich.klakow}@lsv.uni-saarland.de Abstract In this paper, we address the problem of effec- tively self-training neural networks in a low- resource setting. Self-training is frequently used to automatically increase the amount of training data. However, in a low-resource sce- nario, it is less effective due to unreliable anno- tations created using self-labeling of unlabeled data. We propose to combine self-training with noise handling on the self-labeled data. Directly estimating noise on the combined clean training set and self-labeled data can lead to corruption of the clean data and hence, per- forms worse. Thus, we propose the Clean and Noisy Label Neural Network which trains on clean and noisy self-labeled data simul- taneously by explicitly modelling clean and noisy labels separately. In our experiments on Chunking and NER, this approach performs more robustly than the baselines. Complemen- tary to this explicit approach, noise can also be handled implicitly with the help of an auxil- iary learning task. To such a complementary approach, our method is more beneficial than other baseline methods and together provides the best performance overall. Introduction 1 For many low-resource languages or domains, only small amounts of labeled data exist. Raw or unlabeled data, on the other hand, is usually avail- able even in these scenarios. Automatic annota- tion or distant supervision techniques are an option to obtain labels for this raw data, but they often require additional external resources like human- generated lexica which might not be available in a low-resource context. Self-training is a popu- lar technique to automatically label additional text. There, a classifier is trained on a small amount of labeled data and then used to obtain labels for §This work was started while the authors were at Saarland University. unlabeled instances. However, this can lead to unreliable or noisy labels on the additional data which impede the learning process (Pechenizkiy et al., 2006; Nettleton et al., 2010). In this pa- per, we focus on overcoming this slowdown of self-training. Hence, we propose to apply noise- reduction techniques during self-training to clean the self-labeled data and learn effectively in a low- resource scenario. Inspired by the improvements shown by the Noisy Label Neural Network (NLNN, Bekker and Goldberger (2016)), we can directly apply NLNN to the combined set of the existing clean data and the noisy self-labeled data. However, such an ap- plication can be detrimental to the learning pro- cess (Section 6). Thus, we introduce the Clean and Noisy Label Neural Network (CNLNN) that treats the clean and noisy data separately while training on them simultaneously (Section 3). This approach leads to two advantages over NLNN (Section 6 and 7) when evaluating on two sequence-labeling tasks, Chunking and Named Entity Recognition. Firstly, when adding noisy data, CNLNN is robust showing consistent im- provements over the regular neural network, whereas NLNN can lead to degradation in per- formance. Secondly, when combining with an indirect-noise handling technique, i.e. with an auxiliary target in a multi-task fashion, CNLNN complements better than NLNN in the multi-task setup and overall leads to the best performance. 2 Related Work Self-training has been applied to various NLP tasks, e.g. Steedman et al. (2003) and Sagae and Tsujii (2007). While McClosky et al. (2006) are able to leverage self-training for parsing, Charniak (1997) and Clark et al. (2003) obtain only minimal improvements at best on parsing and POS-tagging respectively. In some cases, the results even dete- riorate. Other successful approaches of automati- cally labeling data include using a different classi- fier trained on out-of-domain data (Petrov et al., 2010) or leveraging external knowledge (Dem- bowski et al., 2017). A detailed review of learning in the presence of noisy labels is given in (Fr´enay and Verleysen, 2014). Recently, several approaches have been proposed for modeling the noise using a confu- sion matrix in a neural network context. Many works assume that all the data is noisy-labeled (Bekker and Goldberger, 2016; Goldberger and Ben-Reuven, 2017; Sukhbaatar et al., 2015). Hed- derich and Klakow (2018) and Hendrycks et al. (2018) propose a setting where a mix of clean and unlabeled data is used. However, they require external knowledge sources for labeling the data or evaluate on synthetic noise. Alternatively, in- stances with incorrect labels might be filtered out, e.g. in the work by Guan et al. (2011) or Han et al. (2018), but this involves the risk of also filtering out difficult but correct instances. Another orthog- onal approach is the use of noise-robust loss func- tions (Zhang and Sabuncu, 2018). 3 Clean and Noisy Label Neural Network The Noisy Label Neural Network (NLNN, Bekker and Goldberger (2016)) assumes that all observed labels in the training set pass through a noise channel flipping some of them from a correct to an incorrect label (see left part of Figure 1). In our scenario, this means that both the human- annotated and the additional automatically-labeled (self-training) corpora are assumed to be noisy. In our experiments (Section 6 and 7), treating both corpora in this fashion degrades the overall per- formance. To remedy this effect, we propose to treat the human-annotated data as clean data and the self-training data as noisy. We assume a similar setup as Bekker and Gold- berger (2016), training a multi-class neural net- work soft-max classifier p(y = ix; w) = (cid:80)k exp(uT i h) j=1 exp(uT j h) Figure 1: A representation of NLNN (left) compared to our proposed CNLNN model. The complementary multi-task component (aux. task) is dashed. through a noisy channel changing the correct la- bels y to noisy ones (z ∈ N). A part of the training set remains clean (z ∈ C) such that C + N n where n is the total number of training examples. The clean labels are a copy of the corresponding correct labels. A schematic representation of this model is shown on the right side of Figure 1. The correct labels y and the noise distribution θ are hidden for the noisy labels. (cid:80)k i  We define the probability of observing a label z, which can either be noisy or clean and is, thus, dependent on the label's membership to C or N: jy i; θ)p(y ix; w) if z ∈ N if z ∈ C i.e. z y Using this probability function and t to index training instances, the log-likelihood of the model parameters is defined as p(y jx; w) jx, w, θ) 1 p(z p(z (cid:88) (cid:88) zt∈C zt∈N L(w, θ) = + log p(ztxt, w) k(cid:88) i 1 log( (p(ztyt i; θ) · p(yt ixt; w)) As in Bekker and Goldberger (2016) the model parameters are computed using Expectation Max- imization. In the E-step, θ and w are fixed and an estimate c of the true labels y is obtained for the noisy labels z: cti p(yt ixt, zt; w, θ) i, θ)p(yt (cid:80) p(ztyt j p(ztyt j; θ)p(yt ixt; w) jxt, w) for zt ∈ N where x is the feature vector, y is the label, w de- notes the network weights, k is the number of pos- sible labels, u are soft-max weights and h = h(x) denotes the multi-layer neural network applied to x. In contrast to Bekker and Goldberger (2016), we assume that not all of the training data passes Note that the estimate c is calculated only for the noisy labels whereas the clean labels remain unchanged. Similarly, the noise distribution θ is calculated only for the noisy labels. The initializa- tion of θ and the θ's update step in M-step remain the same as in Bekker and Goldberger (2016), also Figure 2: Micro-averaged F1-scores (averaged over five runs) on English Penn Treebank's Chunking and En- glish CoNLL 2003's NER tasks of models from Section 5 are plotted (with error bars) against the amount of automatically-labeled data. 0 on the x-axis represents models trained with only the clean training set (10k tokens). shown below. θ(i, j) = (cid:80) (cid:80) t cti1{zt=j} t cti i, j ∈ {1, ..., k}, zt ∈ N During the M-step, the neural network weights w are estimated as well. The loss function, how- ever, changes compared to the original approach (Bekker and Goldberger, 2016) to (1) and thus, changing the calculation of the gradient to (2): S(w) = log p(ztxt, w)+ cti log p(yt ixt; w) (cid:88) zt∈C ∂S ∂ui (cid:88) zt∈C (1{zt (cid:88) zt∈N + (cid:88) k(cid:88) zt∈N i 1 i} − p(ztxt, w))h(xt) (cti − p(ytxt, w))h(xt) (1) (2) Interestingly, the gradient calculation (2) is a summation of two parts: one to learn from the clean labels and another to learn from the noisy labels. We refer to this model as the Clean and Noisy Label Neural Network (CNLNN). 4 Training with Noisy Labels in a Multi-Task Setup NLNN and CNLNN form explicit ways of handling noise as the noise distribution is calculated dur- ing training. In contrast, we can apply a Deep Multi-Task Learning (MTL) approach (Søgaard and Goldberg, 2016), which, unlike NLNN and CNLNN, does not estimate the noise directly and thus, is an implicit noise-cleaning approach. The MTL method leverages an auxiliary task that aug- ments the data providing other reliable labels and hence, ignoring noisy labels (Ruder, 2017). In our experiments, we combine the implicit noise han- dling of Deep MTL with the explicit noise han- dling of NLNN and CNLNN to complement each other and obtain a more powerful noise handling model than the individual models. Schematic de- piction of combining MTL and CNLNN is shown in Figure 1. MTL and NLNN can also be combined in a similar way. 5 Experimental Setup We evaluate CNLNN and other methods on a Chunking and a Named Entity Recognition (NER) task with F1-score as the metric in each case. For Chunking, we use the same data splits as (Søgaard and Goldberg, 2016) based on the English Penn Treebank dataset (Marcus et al., 1993). For NER, the data splits of the English CoNLL 2003 task are used (Sang and Buchholz, 2000). Note that in our NER setup, we evaluate using BIO-2 labels, so F1- scores reported below might not be comparable to prior work. To mimic a low resource setting, we limit each training set to the first 10k tokens. The devel- opment sets are randomly chosen sentences from the original training set restricted to 1k tokens. The test sets remain unchanged. For the rest of the training data, the original labels are removed and the words are automatically labeled using the baseline model (NN described below). We add variable amounts of this automatically-annotated data for self-training in our experiments. 5.1 Models We apply the following models to the above two tasks: NN (the simple baseline) is an architec- ture with bidirectional LSTMs (Hochreiter and Schmidhuber, 1997). For Chunking, we use three LSTM layers, for NER five. The NN model, only 010K40K90K190KSelf-trained Automatically-Labeled Data90.591.091.592.092.593.0F1-score91.190.891.391.391.391.191.191.491.591.291.191.391.591.792.091.291.591.591.891.991.291.191.291.392.191.291.991.892.192.5ChunkingNNNLNNCNLNNMTLMTL+NLNNMTL+CNLNN010K40K90K190KSelf-trained Automatically-Labeled Data4450556064F1-score45.947.153.054.754.945.948.153.154.254.545.949.157.057.157.451.557.358.958.858.451.558.358.559.958.151.559.160.061.562.0NER trained on the clean data, is used for automatically labeling the raw data (obtaining the noisy data). NLNN combines the NN with the original noise channel (Bekker and Goldberger, 2016), training it both on clean and noisy instances. CNLNN is our new approach of modeling noise, treating clean and noisy labels separately (section 3). In contrast to the explicit noise handling of NLNN and CNLNN, we also apply MTL for im- plicit noise handling. Here, we use NN as the base architecture and POS-tagging as an auxiliary task. We hypothesise that this low-level task helps the model to generalise its representation and that the POS-tags are helpful because e.g. many named entities are proper nouns. The auxiliary task is trained jointly with the first LSTM layer of NN for Chunking and with the second LSTM layer for NER. In our low-resource setting, we use the first 10k tokens of section 0 of Penn Treebank for the auxiliary POS-tagging task for the MTL (Søgaard and Goldberg, 2016). This data is disjunct from the other datasets. Additionally, we combine both the explicit and implicit noise handling. In the low-resource set- ting, in general, such a combination addresses the data scarcity better than the individual models. NLNN and CNLNN combinations with MTL are labeled as MTL+NLNN and MTL+CNLNN re- spectively. Implementation Details 5.2 During training, we minimize the cross entropy loss which sums over the entire sentence. The networks are trained with Stochastic Gradient De- scent (SGD). To determine the number of itera- tions for both the NN model and the EM algo- rithm we use the development data. All models are trained with word embeddings of dimension- ality 64 that are initialized with pre-trained Poly- got embeddings (Al-Rfou et al., 2013). We add Dropout (Srivastava et al., 2014) with p=0.1 in be- tween the word embedding layer and the LSTM. 6 Results In Figure 2, we present the F1 scores of the mod- els introduced in the previous section. We per- form experiments on Chunking and NER with various amounts of added, automatically-labeled data. In general, adding additional, noisy data tends to improve the performance for all mod- Figure 3: NLNN confusion matrices on Chunking's clean training set for 1. and 3. EM iteration. The colors correspond to row-normalized values. Figure 4: MTL+CNLNN vs MTL+NLNN: Difference in precision between the combined models and MTL for NER and Chunking test sets with 190K noisy data. els. This includes the plain NN, showing that this model is somewhat robust to noise. Especially for the Chunking task, the possibility for improve- ment seems limited for NN as the performance converges after adding 40k noisy instances. In the Chunking 10k case, the negative effect of the noisy instances results in a score lower than if no data is added. The original NLNN model performs similarly to the NN model without a noise-handling compo- nent. In some cases, the score is even lower. In contrast, CNLNN is able to consistently improve over these scores. This demonstrates the impor- tance of our proposed CNLNN which treats clean and noisy data separately. MTL is able to improve somewhat over NN even without adding automatically-annotated data thanks to the auxiliary task. Additionally, MTL performs even better when noisy data is added showing its implicit noise handling capabilities. On their own, both CNLNN and MTL are able to eliminate some of the negative effects of the noisy data and to leverage the additional data effectively. Combining MTL with NLNN results in small improvements at best and can decrease perfor- I-LOCI-PERI-MISCI-ORGOTHERI-LOCI-PERI-MISCI-ORGOTHER57542758376606310121128549743265274061271531. IterationI-LOCI-PERI-MISCI-ORGOTHERI-LOCI-PERI-MISCI-ORGOTHER540285614877450620618151161911091477172947671493. IterationPredicted LabelTrue Label-2.5-2-1.5-1-0.5 0 0.5i-advpb-prti-adjpb-adjpb-sbarb-advpi-vpb-vpb-ppb-npi-npΔPrecisionChunkingMTL+CNLNNMTL+NLNNMTL 0 0.5 1 1.5 2 2.5 3i-misci-loci-orgi-perClassesNER mance, especially on Chunking. The best results are achieved with our combined MTL+CNLNN model as it outperforms all other models. Even when adding 19 times the amount of self-labeled data, the model is still able to cope with the noise and improve the performance. 7 Analysis NLNN vs. CNLNN: In NLNN, we observed that clean training tokens were subverted to become noisy in subsequent EM iterations mostly due to the influence of noisy labels from self-labeled data and this effect leads to NLNN's worse perfor- mance. Figure 3 presents one such case where the corruption of the confusion matrix from 1. iteration is displayed. CNLNN iteration to 3. treats clean and noise data separately and there- fore avoids the corruption of clean labels. MTL+CNLNN vs. MTL+NLNN: We noted that MTL+CNLNN consistently outperforms MTL and MTL+NLNN, whereas the MTL+NLNN combi- nation can degrade MTL's performance. For nearly all predicted labels the improvements in precision over MTL are higher for MTL+CNLNN when compared to MTL+NLNN (Figure 4). This shows that CNLNN complements MTL better than NLNN. 8 Concluding Remarks In this paper, we apply self-training to neural net- works for Chunking and NER in a low-resource setup. Adding automatically-labeled data, the per- formance of the classifier can wane or can even decline. We propose to mitigate this effect by ap- plying noisy label handling techniques. However, we found that directly applying an off-the-shelf noise-handling technique as NLNN leads to corruption of the clean training set and worse performance. Thus, we propose the Clean and Noisy Label Neural Network to work sep- arately on the automatically-labeled data. Our model improves the performance faster for a lesser amount of additional data. Moreover, combing the training with auxiliary information can further help handle noise in a complementary fashion. Meanwhile, more complex neural network ar- chitectures (Goldberger and Ben-Reuven, 2017; Luo et al., 2017; Veit et al., 2017) are available for handling noise and we look forward to working with these to upgrade our approach in the future. 9 Acknowledgements This work has been supported by the German Re- search Foundation as part of the Research Training Group Adaptive Preparation of Information from Heterogeneous Sources (AIPHES) under grant No. GRK 1994/1. We also thank the anonymous reviewers whose comments helped improve this paper. References Rami Al-Rfou, Bryan Perozzi, and Steven Skiena. 2013. Polyglot: Distributed word representations for multilingual NLP. In Proceedings of the Seven- teenth Conference on Computational Natural Lan- guage Learning, CoNLL 2013, Sofia, Bulgaria, Au- gust 8-9, 2013, pages 183 -- 192. Alan Joseph Bekker and Jacob Goldberger. 2016. Training deep neural-networks based on unreliable In Proceedings of the 2016 IEEE Interna- labels. tional Conference on Acoustics, Speech and Signal Processing, pages 2682 -- 2686. Eugene Charniak. 1997. Statistical parsing with a In Pro- context-free grammar and word statistics. ceedings of the Fourteenth National Conference on Artificial Intelligence and Ninth Conference on Innovative Applications of Artificial Intelligence, AAAI'97/IAAI'97, pages 598 -- 603. Stephen Clark, James R. Curran, and Miles Osborne. 2003. Bootstrapping pos taggers using unlabelled data. In Proceedings of the Seventh Conference on Natural Language Learning at HLT-NAACL 2003 - Volume 4, CONLL '03, pages 49 -- 55. Julia Dembowski, Michael Wiegand, and Dietrich Klakow. 2017. Language independent named en- In Pro- tity recognition using distant supervision. ceedings of Language and Technology Conference (LTC). Benoıt Fr´enay and Michel Verleysen. 2014. Classifica- tion in the presence of label noise: A survey. IEEE Transactions on Neural Networks and Learning Sys- tems, 25(5):845 -- 869. Jacob Goldberger and Ehud Ben-Reuven. 2017. Train- ing deep neural-networks using a noise adaptation layer. In International Conference on Learning Rep- resentations (ICLR). Donghai Guan, Weiwei Yuan, Young-Koo Lee, and Sungyoung Lee. 2011. Identifying mislabeled train- ing data with the aid of unlabeled data. Applied In- telligence, 35(3):345 -- 358. Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor W. Tsang, and Masashi Sugiyama. 2018. Co-teaching: Robust training of deep neural networks with extremely noisy labels. In Advances in Neural Information Processing Sys- tems 31: Annual Conference on Neural Informa- tion Processing Systems 2018, NeurIPS 2018, 3-8 December 2018, Montr´eal, Canada., pages 8536 -- 8546. Michael A. Hedderich and Dietrich Klakow. 2018. Training a neural network in a low-resource setting on automatically annotated noisy data. In Proceed- ings of the Workshop on Deep Learning Approaches for Low-Resource NLP, pages 12 -- 18. Association for Computational Linguistics. Dan Hendrycks, Mantas Mazeika, Duncan Wilson, and Kevin Gimpel. 2018. Using trusted data to train deep networks on labels corrupted by severe noise. In Advances in Neural Information Processing Sys- tems 31: Annual Conference on Neural Informa- tion Processing Systems 2018, NeurIPS 2018, 3-8 December 2018, Montr´eal, Canada., pages 10477 -- 10486. Curran Associates, Inc. Sepp Hochreiter and Jurgen Schmidhuber. 1997. Neural computation, Long short-term memory. 9(8):1735 -- 1780. Bingfeng Luo, Yansong Feng, Zheng Wang, Zhanxing Zhu, Songfang Huang, Rui Yan, and Dongyan Zhao. 2017. Learning with noise: Enhance distantly su- pervised relation extraction with dynamic transition In Proceedings of the 55th Annual Meet- matrix. ing of the Association for Computational Linguistics (Volume 1: Long Papers). Mitchell P. Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. 1993. Building a large annotated corpus of english: The penn treebank. Computa- tional Linguistics, 19(2):313 -- 330. David McClosky, Eugene Charniak, and Mark John- son. 2006. Effective self-training for parsing. In Proceedings of the main conference on human lan- guage technology conference of the North American Chapter of the Association of Computational Lin- guistics, pages 152 -- 159. Association for Computa- tional Linguistics. David F. Nettleton, Albert Orriols-Puig, and Albert Fornells. 2010. A study of the effect of differ- ent types of noise on the precision of supervised learning techniques. Artificial Intelligence Review, 33(4):275 -- 306. Mykola Pechenizkiy, Alexey Tsymbal, Seppo Puuro- nen, and Oleksandr Pechenizkiy. 2006. Class noise and supervised learning in medical domains: The ef- fect of feature extraction. In 19th IEEE Symposium on Computer-Based Medical Systems, pages 708 -- 713. Slav Petrov, Pi-Chuan Chang, Michael Ringgaard, and Hiyan Alshawi. 2010. Uptraining for accurate de- terministic question parsing. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, EMNLP '10, pages 705 -- 713. Sebastian Ruder. 2017. An overview of multi-task learning in deep neural networks. arXiv e-prints, page arXiv:1706.05098. Kenji Sagae and Jun'ichi Tsujii. 2007. Dependency parsing and domain adaptation with lr models and parser ensembles. In Proceedings of the 2007 Joint Conference on Empirical Methods in Natural Lan- guage Processing and Computational Natural Lan- guage Learning. Erik F. Tjong Kim Sang and Sabine Buchholz. 2000. Introduction to the conll-2000 shared task: Chunk- ing. In Proceedings of the 2nd workshop on Learn- ing language in logic and the 4th conference on Computational natural language learning-Volume 7, pages 127 -- 132. Association for Computational Lin- guistics. Anders Søgaard and Yoav Goldberg. 2016. Deep multi-task learning with low level tasks supervised at lower layers. In Proceedings of the 54th Annual Meeting of the Association for Computational Lin- guistics (Volume 2: Short Papers). Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. 2014. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Re- search, 15:1929 -- 1958. Mark Steedman, Miles Osborne, Anoop Sarkar, Stephen Clark, Rebecca Hwa, Julia Hockenmaier, Paul Ruhlen, Steven Baker, and Jeremiah Crim. 2003. Bootstrapping statistical parsers from small In Proceedings of the Tenth Conference datasets. on European Chapter of the Association for Com- putational Linguistics - Volume 1, EACL '03, pages 331 -- 338. Sainbayar Sukhbaatar, Joan Bruna, Manohar Paluri, Lubomir Bourdev, and Rob Fergus. 2015. Learn- ing from noisy labels with deep neural networks. In ICLR Workshop track. Andreas Veit, Neil Alldrin, Gal Chechik, Ivan Krasin, Abhinav Gupta, and Serge Belongie. 2017. Learn- ing from noisy large-scale datasets with minimal su- pervision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 839 -- 847. Zhilu Zhang and Mert R. Sabuncu. 2018. General- ized cross entropy loss for training deep neural net- In Advances in Neural works with noisy labels. Information Processing Systems 31: Annual Con- ference on Neural Information Processing Systems 2018, NeurIPS 2018, 3-8 December 2018, Montr´eal, Canada., pages 8792 -- 8802.
1803.11326
4
1803
2019-05-06T11:50:54
Deep Cascade Multi-task Learning for Slot Filling in Online Shopping Assistant
[ "cs.CL" ]
Slot filling is a critical task in natural language understanding (NLU) for dialog systems. State-of-the-art approaches treat it as a sequence labeling problem and adopt such models as BiLSTM-CRF. While these models work relatively well on standard benchmark datasets, they face challenges in the context of E-commerce where the slot labels are more informative and carry richer expressions. In this work, inspired by the unique structure of E-commerce knowledge base, we propose a novel multi-task model with cascade and residual connections, which jointly learns segment tagging, named entity tagging and slot filling. Experiments show the effectiveness of the proposed cascade and residual structures. Our model has a 14.6% advantage in F1 score over the strong baseline methods on a new Chinese E-commerce shopping assistant dataset, while achieving competitive accuracies on a standard dataset. Furthermore, online test deployed on such dominant E-commerce platform shows 130% improvement on accuracy of understanding user utterances. Our model has already gone into production in the E-commerce platform.
cs.CL
cs
Deep Cascade Multi-task Learning for Slot Filling in Online Shopping Assistant Yu Gong,1∗ Xusheng Luo,1∗ Yu Zhu,1 Wenwu Ou,1 Zhao Li,1 Muhua Zhu,1 Kenny Q. Zhu,2 Lu Duan,3 Xi Chen1 1Search Algorithm Team, Alibaba Group 2Shanghai Jiao Tong University 3Artificial Intelligence Department, Zhejiang Cainiao Supply Chain Management Co. {santong.oww, gongda.cx}@taobao.com, [email protected], [email protected] {gongyu.gy, lxs140564, zy143829, lizhao.lz, muhua.zmh}@alibaba-inc.com, 9 1 0 2 y a M 6 ] L C . s c [ 4 v 6 2 3 1 1 . 3 0 8 1 : v i X r a Abstract Slot filling is a critical task in natural language understanding (NLU) for dialog systems. State-of-the-art approaches treat it as a sequence labeling problem and adopt such models as BiLSTM-CRF. While these models work relatively well on standard benchmark datasets, they face challenges in the con- text of E-commerce where the slot labels are more informa- tive and carry richer expressions. In this work, inspired by the unique structure of E-commerce knowledge base, we pro- pose a novel multi-task model with cascade and residual con- nections, which jointly learns segment tagging, named entity tagging and slot filling. Experiments show the effectiveness of the proposed cascade and residual structures. Our model has a 14.6% advantage in F1 score over the strong baseline methods on a new Chinese E-commerce shopping assistant dataset, while achieving competitive accuracies on a standard dataset. Furthermore, online test deployed on such dominant E-commerce platform shows 130% improvement on accuracy of understanding user utterances. Our model has already gone into production in the E-commerce platform. 1 Introduction An intelligent online shopping assistant offers services such as pre-sale and after-sale inquiries, product recommenda- tions, and user complaints processing, all of which seek to give the customers better shopping experience. The core of such assistant is a task-oriented dialog system which has the ability to understand natural language utterances from a user and then give natural language responses (Yan et al. 2017). Natural Language Understanding (NLU), which aims to interpret the semantic meanings conveyed by input utter- ances, is a main component in task-oriented dialog systems. Slot filling, a sub-problem of NLU, extracts semantic con- stituents by using the words of input utterance to fill in pre- defined slots in a semantic frame (Mesnil et al. 2015). In the case of E-commerce shopping, there are three named entity types: Category, Property Key and Property Value, according to typical E-commerce knowledge base such as the one in Figure 1. We show a real example in Table 1 with In/Out/Begin (I/O/B) scheme. In the named entity level, "dress" is a Category (CG), while "brand" is Copyright c(cid:13) 2019, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. ∗Equal contribution. labeled as Property Key (PK), which is the name of one product property. "Nike" and "black" are labeled as Property Value (PV) since they are concrete property values. How- ever, merely labeling as Property Value is not sufficient as the shopping assistant needs more fine-grained semantics. Therefore, in the Slot Filling level, we further label "Nike" as Brand Property (Brand), and "black" as Color Property (Color). In Table 1, B-CG refers to Begin-Category (the meaning of other labels can also be inferred). In the mean- time, other words in the example utterance that carry no se- mantic meaning are assigned O label. Figure 1: Structure of E-commerce knowledge-base. Traditionally, slot filling problem can be regarded as a se- quence labeling task, which assigns an appropriate seman- tic label to each word in the given input utterance. State- of-the-art sequence labeling models are typically based on BiLSTM-CRF (Huang, Xu, and Yu 2015; Reimers and Gurevych 2017) and evaluated on a commonly used stan- dard dataset ATIS (Price 1990) in the slot filling area. This dataset is about airline travel in the United States. However, the vocabulary size of ATIS is small (only 572) and slot la- bels are not diverse enough (mostly related to only time and location) since airline travel is a relatively small and specific domain, such that recent deep learning models can achieve very high F1 scores (nearly 0.96). Recently, a detailed quan- titative and qualitative study of this dataset comes to the same conclusion that slot filling models should be tested on a much more real and complex dataset (B´echet and Raymond 2018). In this paper, we try to tackle a real-world slot filling prob- lem for one of the largest E-commerce platform in China. The semantic slots are much more diverse and informative CategoryT-shirtSkirt…Property KeyColorStyle…Property ValueBlack,Red,…Sexy,Cute,……Nike,Adidas,…DressBrand Utterance Slot Label Named Entity Label Segment Label I O O O want buy Nike brand O O O O O O B-Brand I-Brand B-PV B I-PV I B-PK B-PK B I-PK I-PK I \ O O O black B-Color I-Color B-PV I-PV B I B-CG B-CG B dress I-CG I-CG I I-CG I-CG I Table 1: A real example of slot filling in online shopping scenario. than ATIS. For example, to describe different properties of a product for the purpose of utterance understanding, we de- fine large amount of informative slot labels such as color, brand, style, season, gender and so on. In contrast, most se- mantic labels of ATIS are related to only time and location. Furthermore, the Chinese language used for e-commerce is more complex and the semantically rich expressions make it harder to understand. Whereas in ATIS, expression can be simpler, and most expressions are standard locations or time. Thus, large scale semantic slots and more complex expres- sions bring problem such as data sparsity. Traditional end- to-end sequence labeling model may not be able to handle it. tion 2.3). • We develop a Chinese E-commerce shopping assistant dataset ECSA (Section 3.1), which is much bigger and different from the common ATIS dataset, and would be a valuable contribution to dialog system research. • We evaluate DCMTL in both offline and online settings. Offline results show the model outperforms several strong baseline methods by a substantial margin of 14.6% on F 1 score (Section 3.3). Online testing deployed on the men- tioned E-commerce platform shows that slot filling results returned by our model achieve 130% improvement on ac- curacy which significantly benefits to the understanding of users' utterances (Section 3.4). Our model has already gone production in the platform. 2 Approach In this section we describe our approach in detail. Figure 2 gives an overview of the proposed architectures. First we in- troduce the most common and popular BiLSTM-CRF model (Figure 2(a)) for sequence labeling tasks. Then we move on to multi-task learning perspective (Figure 2(b) and (c)). Fi- nally we propose our new method, which is called Deep Cas- cade Multi-task Learning in Figure 2(d). Given an utterance containing a sequence of words w = (w1, w2, ..., wT ), the goal of our problem is to find a se- quence of slot labels y = (y1, y2, ..., yT ), one for each word in the utterance, such that: y = arg max y P (yw). We use "word" in problem and model description, but "word" actually means Chinese char in our problem. And a "term" consists of one or several words. 2.1 RNN Sequence Labeling Figure 2(a) shows the principle architecture of a BiLSTM- CRF model, which is the state-of-the-art model for var- ious sequence labeling tasks (Huang, Xu, and Yu 2015; Reimers and Gurevych 2017). BiLSTM-CRF model consists of a BiLSTM layer and a CRF layer. BiLSTM (Bidirectional-LSTM) enables the hidden states to capture both historical and future context information of the words. Mathematically, the input of this BiLSTM layer is a sequence of input vectors, denoted as X = (x1, x2, ..., xT ). The output of BiLSTM layer is a sequence of the hidden states for each input word, denoted as H = (h1, h2, ..., hT ). Each final hidden state is the concatenation of the forward Besides, Chinese language, like many other Asian lan- guages, is not word segmented by nature, and word segmen- tation is a difficult first step in many NLP tasks. Without proper word segmentation, sequence labeling becomes very challenging as the errors from segmentation will propagate. On the other hand, more than 97% of the chunks in ATIS data have only one or two words, in which segmentation (or chunking) is not a serious problem. Due to these reasons, if we simply apply basic sequence labeling models, which can be regarded as an end-to-end method, the sentences may not be segmented correctly in the first place. Then the errors will propagate and the resulting slot labels will be incorrect. In this paper, we propose to employ multi-task sequence labeling model to tackle slot filling in a novel Chinese E- commerce dialog system. Inspired by the natural structure of E-commerce knowledge base shown in Figure 1, we ex- tract two additional lower-level tasks from the slot filling task: named entity tagging and segment tagging. Example labels of these two tasks are shown in the bottom two rows of Table 1. Segment tagging and named entity tagging can be regarded as syntactic labeling, while slot filling is more like semantic labeling. With the help of information sharing abil- ity of multi-task learning, once we learn the information of syntactic structure of an input sentence, filling the semantic labels becomes much easier. Compared to directly attack- ing slot filling, these two low-level tasks are much easier to solve due to fewer labels. To this end, we propose a Deep Cascade Multi-task Learning model, and co-train three tasks in the same framework with a goal of optimizing the target slot filling task. The contributions of this paper are summarized below: • To the best of our knowledge, this is the first piece of work focusing on slot filling in E-commerce. We propose a novel deep multi-task sequence labeling model (DCMTL) with cascading and residual connection to solve it (Sec- ascent. For a training dataset {(H(i), y(i))}, the final log- likelihood is: L(W, b) = log p(y(i)H(i); W, b). (cid:88) i Finally, the Viterbi algorithm is adopted to decode the opti- mal output sequence y∗: y∗ = arg max y∈Y(H) p(yH; W, b). 2.2 Multi-task Learning The slot labels are large-scaled, informative and diverse in the case of E-commerce, and the syntactic structure of in- put Chinese utterance are complicated, so that the slot filling problem becomes hard to solve. If we directly train an end- to-end sequential model, the tagging performance will suffer from data sparsity severely. When we try to handle slot fill- ing (can be seen as semantic labeling task), some low-level tasks such as named entity tagging or segment tagging (can be seen as syntactic labeling task) may first make mistakes. If the low-level tasks get wrong, so as to the target slot fill- ing task. That is to say it is easy to make wrong decisions in the low-level tasks, if we try to fill in all the labels at once. Then the error will propagate and lead to a bad performance of slot filling, which is our high-level target. While directly attacking the slot filling task is hard, low- level tasks with fewer labels are much easier to solve. Once we know the syntactic structure of a sentence, filling in se- mantic labels will become easier accordingly. Thus, it is rea- sonable to solve the problem in a multi-task learning frame- work. In our problem, following the special structure of E- commerce knowledge base (Figure 1), we can devise three individual tasks: slot filling, named entity tagging and seg- ment tagging. Slot filling is our target task; named entity tagging is to classify which named entity type (PV/PK/CG) a word is; and segment tagging is to judge whether a word is begin (B), in (I) or out (O) of a trunking. In a multi-task learning (MTL) setting, we have several prediction tasks over the same input sequence, where each task has its own output vocabulary (a set of task specified labels). Intuitively, the three tasks do share a lot of infor- mation. Consider the example in Table 1 again. Knowing " being B-PVI-PV can def- the named entity type of " initely help determine its slot label, which is B-ColorI- Color. Similarly, knowing its segment type (BI) also helps with both named entity tagging and slot filling. Thus it is reasonable for these tasks to share parameters and learn in the same framework cooperatively. Vanilla Multi-task Learning The general idea of multi- task learning is to share parameters of encoding part of the network. As Figure 2(b) shows, this is naturally achieved by sharing the k-layers BiLSTM part of the network across three tasks. Based on that, we use a separate CRF decoder for each task t ∈ {seg, ne, slot}: p(ytHk; Wt, bt), where Wt and bt are task-specific parameters. This encourages the deep BiLSTM network to learn a hidden representation Hk which benefits all three different tasks. Figure 2: Sequential models for slot filling task. −→ hi and backward function BiLSTM(xi): ←− hi hidden states. We view BiLSTM as a −→ hi = LSTM(xi, −−→ hi−1), ←− hi = LSTM(xi, ←−− hi+1), BiLSTM(xi) = hi = [ −→ hi (xi); ←− hi (xi)]. Most of time we stack multiple BiLSTMs to make the model deeper, in which the output hl i of layer l becomes the input of layer l + 1, e.g. hl+1 i = BiLSTMl+1(hl i). It is always beneficial to consider the correlations between the current label and neighboring labels, since there are many syntactical constraints in natural language sentences. For example, I-Brand is never followed by a B-Color. If we simply feed the above mentioned hidden states indepen- dently to a softmax layer to predict the labels (Hakkani- Tur et al. 2016), such constraints are more likely to be vi- olated. Linear-chain Conditional Random Field (CRF) (Laf- ferty, McCallum, and Pereira 2001) is the most popular way to control the structure prediction and its basic idea is to use a series of potential functions to approximate the conditional probability of the output label sequence given the input word sequence. Formally, we take the above sequence of hidden states H = (h1, h2, ..., hT ) as input to a CRF layer, and the output of the CRF is the final prediction label sequence y = (y1, y2, ..., yT ), where yi is in the set of pre-defined target labels. We denote Y(H) as the set of all possible label sequences. Then we derive the conditional probability of the output sequence, given the input hidden state sequence is: (cid:81)T (cid:80) (cid:81)T i=1 ϕ(yi−1, yi, H) i−1, y(cid:48) i=1 ϕ(y(cid:48) , i, H) p(yH; W, b) = y(cid:48)∈Y(H) where ϕ(y(cid:48), y, H) = exp(WT y(cid:48),yH + by(cid:48),y) are potential y(cid:48),y and by(cid:48),y are weight vector and bias functions and WT of label pair (y(cid:48), y). To train the CRF layer, we use the clas- sic maximum conditional likelihood estimate and gradient (a) BasicBiLSTM-CRF(b) VanillaMulti-task(c) HierarchyMulti-task(d) Deep CascadeMulti-task!"!"!"!"!"#!"#!"#!"#!"#!"#!"#!"#!"#!"# Hierarchy Multi-task Learning Previous discussion in- dicates that there is a natural order among the different tasks: slot filling may benefit more from named entity tagging, than the other way around. This motivates us to employ low-level tasks at lower BiLSTM layers, while high level tasks are trained at higher layers. We borrow the idea of involving a hierarchical neural networks structure (Peters et al. 2018; Søgaard and Goldberg 2016). As shown in Figure 2(c), in- stead of decoding all tasks separately at the outermost BiL- STM layer, we associate each BiLSTM layer l(t) with one task t. Then the conditional probabilities of the output se- quence for each task are: seg tag(w) = p(ysegHl(seg); Wseg, bseg), Hl(seg) = BiLSTMl(seg)(E(w)). ne tag(w) = p(yneHl(ne); Wne, bne), Hl(ne) = BiLSTMl(ne)(Hl(seg)). slot fill(w) = p(yslotHl(slot); Wslot, bslot), Hl(slot) = BiLSTMl(slot)(Hl(ne)). Here seg tag, ne tag and slot fill represent the tasks of seg- ment tagging, named entity tagging and slot filling, respec- tively. E(w) is the word embeddings of input sequence w and l(seg) < l(ne) < l(slot). We call this model hierarchy multi-task learning, since some layers are shared by all tasks while the others are only related to specific tasks. 2.3 Deep Cascade Multi-task Learning Hierarchy multi-task learning share parameters among dif- ferent tasks, and allow low-level tasks help adjust the re- sult of high-level target task. It is effective for those tasks which are weakly correlated, such as POS tagging, syntac- tic chunking and CCG supertagging (Søgaard and Goldberg 2016). However, when it comes to problems where differ- ent tasks maintain a strict order, in another word, the perfor- mance of high-level task dramatically depends on low-level tasks, the hierarchy structure is not compact and effective enough. Therefore, we propose cascade and residual con- nections to allow high-level tasks to take the tagging results and hidden states from low-level tasks as additional input. These connections serves as "shortcuts" that create a more closely coupled and efficient model. We call it deep cascade multi-task learning, and the framework is shown in Figure 2(d). Cascade Connection Here we feed the tagging output of the task at lower layer e.g. seg tag∗(w) or ne tag∗(w) to the upper BiLSTM layer as its additional input. Now the hidden states of each task layer become: Hl(seg) = BiLSTMl(seg)(E(w)), Hl(ne) = BiLSTMl(ne)(Wseg Hl(slot) = BiLSTMl(slot)(Wne Cas. · seg tag∗(w) + Hl(seg)), Cas. · ne tag∗(w) + Hl(ne)), Cas. are the weight parameters for cas- At training time, seg tag∗(w) and ne tag∗(w) can be the true tagging outputs. At inference time, we simply where Wseg cade connection. Cas. and Wne take the greedy path of our cascade model without doing search, where the model emits the best seg tag∗(w) and ne tag∗(w) by Viterbi inference algorithm. Alternatively, one can do beam search (Sutskever, Vinyals, and Le 2014; Vinyals et al. 2015) by maintaining a set of k best partial hy- potheses at each cascade layer. However, unlike traditional seq2seq models e.g., in machine translation, where each in- ference step is just based on probability of a discrete vari- able (by softmax function), our inference for tagging output is a structured probability distribution defined by the CRF output. Efficient beam search method for this structured cas- cade model is left to our future work. Residual Connection To encourage the information shar- ing among different tasks, we also introduce the residual connection, where we add the input of a previous layer to the current input: Hl(seg) = BiLSTMl(seg)(xl(seg)), xl(seg) = E(w). Hl(ne) = BiLSTMl(ne)(Wseg Cas. · seg tag∗(w) + xl(ne)), xl(ne) = Hl(seg) + xl(seg). Hl(slot) = BiLSTMl(slot)(Wne Cas. · ne tag∗(w) + xl(slot)), xl(slot) = Hl(ne) + xl(ne). Deep residual learning (He et al. 2016) is introduced to ease the gradient vanish problem for training very deep neu- ral networks. Here we borrow the idea of cross residual learning method for multi-task visual recognition (Jou and Chang 2016) and believe the residual connection between different layers can benefit our multi-task sequence learning. We propose cascade residual connection instead of cross residual connection because different tasks are connected via cascading in our problem, while they are organized via branching in visual recognition. 2.4 Training For our multi-task setting, we define three loss functions (re- fer to Section 2.1): Lseg, Lne and Lslot for tasks of segment tagging, named entity tagging and slot filling respectively. We construct three training set, Dseg, Dne and Dslot, where each of them (called Dt generically) contains a set of input- output sequence pair (w, yt). The input utterance w is shared across tasks, but the output yt is task dependent. For vanilla multi-task learning, we define a unified loss function L = αLseg + βLner + (1 − α − β)Lslot, where α and β are hyper-parameters. And we update the model parameters by loss L. As for hierarchy multi-task learning and cascade multi- task learning, we choose a random task t ∈ {seg, ne, slot} at each training step, followed by a random training batch Batch(w, yt) ∈ Dt. Then we update the model parameters by back-propagating the corresponding loss Lt. 3 Experiments In this section we first introduce the popular ATIS dataset1, then describe how we collect our E-commerce Shopping 1https://github.com/yvchen/JointSLU Assistant (ECSA) dataset2. Then we show the implementa- tion details for our model. Finally we demonstrate the eval- uation results on both ATIS and ECSA dataset and give some discussions. In the following experiments, we call our proposed Deep Cascade Multi-Task Learning method as DCMTL for short. 3.1 Dataset ATIS Dataset The ATIS corpus, the most commonly used dataset for slot filling research, contains reservation requests for air travel. It contains 4,978 training and 893 testing sen- tences in total, with a vocabulary size of 572 (Mesnil et al. 2015). Apart from the ground-truth slot labels, we also generate its corresponding segment labels for our multi-task model setting. ECSA Dataset To create large amounts of gold standard data to train our model, we adopt an unsupervised method to automatically tag the input utterances. All the utterances are extracted from the user input logs (either from text or voice) on our online shopping assistant system. Besides our E-commerce knowledge-base is a dictionary consisting of pairs of word terms and their ground-truth slot labels such as "red-Color" or "Nike-Brand". Since this resource is cre- ated by human beings, we will use it to create gold standard. We use a dynamic programming algorithm of max-matching to match words in the utterances and then assign each word with its slot label in IOB scheme. We filter utterances whose matching result is ambiguous and only reserve those that can be perfectly matched (all words can be tagged by only one unique label) as our training and testing data. With the slot labels of each word, we can induce the named entity labels and segment labels straightforwardly via the E-commerce knowledge-base. For we only extract the perfectly matched sentences, the quality of our ECSA dataset can be guaran- teed. It can be considered as a long-distance supervision method (Mintz et al. 2009). To evaluate model's ability to generalize, we randomly split the dictionary into three parts. One part is used to gen- erate testing data and the other two to generate training data. If we don't split the dictionary and use the whole to gen- erate both training and testing data, then the trained model may remember the whole dictionary and the results will not reflect the true performance of the models. This unsupervised approach alleviates human annota- tions, and we can produce a large volume of labeled data automatically. The following experiments use a dataset of 24,892 training pairs and 2,723 testing pairs. Each pair con- tains an input utterance w, its corresponding gold sequence of slot labels yslot, named entity labels yne and segment la- bels yseg. The vocabulary size of ECSA is 1265 (Chinese characters), and the amount of segmented terms can be much larger. The Out-of-Vocabulary (OOV) rate of ESCA dataset is 85.3% (Meaning 85.3% of terms in testing data never ap- pear in training data) while the OOV rate of ATIS is lower than 1%. Apparently slot filling task on ESCA dataset is more challenging. 2https://github.com/pangolulu/DCMTL Implementation Details 3.2 For the RNN component in our system, we use a 3-layers BiLSTM networks for ECSA and 2-layers BiLSTM net- works for ATIS (no named entity tagging in this case), and all LSTM networks come with hidden state size 100. The input in ECSA is a sequence of Chinese characters rather that words since there is no segmentation. The dimension of embedding layer E and BiLSTM network output state (con- catenation of the forward and backward LSTM) are set to 200. We perform a mini-batch log-likelihood loss training with a batch size of 32 sentences for 10 training epochs. We use Adam optimizer, and the learning rate is initialized to 0.001. To prevent the gradient explosion problem for train- ing LSTM networks, we set gradient clip-norm as 5. 3.3 Results and Discussions Evaluation on ATIS We compare the ATIS results of our DCMTL model with current published results in Ta- ble 2. We split the methods into two categories: one is Se- quence Labeling based method, and the other is Encoder- Decoder based method. Sequence Labeling based method generally adopts a sequential network (RNN (Yao et al. 2013; Yao et al. 2014; Liu and Lane 2015; Peng and Yao 2015; Vu et al. 2016) or CNN (Xu and Sarikaya 2013; Vu 2016)) and calculate a loss function (such as CRF loss (Xu and Sarikaya 2013), cross entropy loss (Yao et al. 2013; Yao et al. 2014) or ranking loss (Vu et al. 2016)) on top of the network output. Encoder-Decoder based method, on the other hand, usually employs a RNN to encode the whole sentence and another RNN to decode the labels (Kurata et al. 2016). The decoder will attend to the whole encod- ing sequence with attention mechanism (Zhu and Yu 2017; Zhai et al. 2017). Our method follows the Sequence Label- ing framework and we design a novel multi-task sequence labeling model which achieve the best performance against the published Sequence Labeling based method (F1+0.22%) and compatible result against the best Encoder-Decoder based method (F1-0.03%). As we claim in Section 1, more than 97% of chunks in ATIS dataset have only one or two words and there are no named entity labels at all. These two reasons prevent our proposed DCMTL model from further improving the performance on ATIS dataset. Thus, we will mainly focus on ECSA dataset, which is much larger and more sophisticated, to prove the effectiveness of our pro- posed model. Besides, almost all the methods (including ours) reach very high F1 score of around 0.96. This also makes us won- der whether it is meaningful enough to continue evaluating on this dataset, for minor differences in the results may be attributed to data variance more than the models. Apparently high performance on ATIS does not mean working on real- world application which contains more informative semantic slot labels and more complicated expressions as in the case of online shopping assistant. Evaluation on ECSA On ECSA dataset, we evaluate dif- ferent models including Basic BiLSTM-CRF, Vanilla Multi- task, Hierarchy Multi-task and Deep Cascade Multi-task on Methods simple RNN (Yao et al. 2013) CNN-CRF (Xu and Sarikaya 2013) LSTM (Yao et al. 2014) RNN-SOP (Liu and Lane 2015) Deep LSTM (Yao et al. 2014) RNN-EM (Peng and Yao 2015) Bi-RNN with ranking loss (Vu et al. 2016) Sequential CNN (Vu 2016) Encoder-labeler Deep LSTM (Kurata et al. 2016) BiLSTM-LSTM (focus) (Zhu and Yu 2017) Neural Sequence Chunking (Zhai et al. 2017) DCMTL (Ours) F1 0.9411 0.9435 0.9485 0.9489 0.9508 0.9525 0.9547 0.9561 0.9566 0.9579 0.9586 0.9583∗ Table 2: Comparison with published results on the ATIS dataset. Models Precision Recall F1 Basic BiLSTM-CRF * Basic BiLSTM-CRF (cond. SEG) * Basic BiLSTM-CRF (cond. NE) Vanilla Multi-task Hierarchy Multi-task ** DCMTL (- cascade) ** DCMTL (- residual) DCMTL (full) 0.4330 0.7948 0.8985 0.3990 0.4417 0.4654 0.4923 0.5281 0.4275 0.7953 0.8986 0.3941 0.4494 0.4613 0.4760 0.4941 0.4302 0.7950 0.8985 0.3965 0.4455 0.4633 0.4840 0.5105 Table 3: Results for slot filling task on the ECSA dataset. Columns with highlighted boldface are the best perfor- mance. Rows with * prefix are just results for our case study. Rows with ** prefix are results for ablation test. testing data regarding slot filling as the target task. We report Precision, Recall and F1 in Table 3. The Basic BiLSTM-CRF model achieves an F1 score of 0.43. To show the usefulness of the lower tasks to slot filling, we "cheated" by using the ground-truth segment type (cond. SEG) or named entity type (cond. NE) as the extra features for each word in the Basic BiLSTM-CRF model. Row 3 and 4 (with *) in Table 3 show that the slot filling performance can be improved by 85% and 109% if the correct segment type or named entity type is pre-known. It can perfectly ver- ify our claim that low-level syntactic tasks can significantly affect to the slot filling performance. Of course in practice, the model doesn't know the true values of these types during prediction. Our further experiments show that DCMTL outperforms the baselines on both precision and recall. DCMTL achieves the best F1 score of 0.5105, which improves by a relative margin of 14.6% against the strong baseline method (see Table 3). Multi-task models generally perform better than the Basic BiLSTM with single-task target. The exception is the vanilla multi-task setting. This is mainly because vanilla multi-task shares parameters across all the layers, and these parameters are likely to be disturbed by the interaction of three tasks. It is more desirable to let the target task domi- nate the weights at high-level layers. (a) (b) Figure 3: (a) Learning trends of F1 respectively for different methods. (b) Result of different cascade connection types in DCMTL. We further investigate the learning trend of our proposed approach against baseline methods. Figure 3(a) shows the typical learning curves of performance measured by F1. We can observe that our method DCMTL performs worse than other baseline methods for the first 450 batch steps. After that, other methods converge quickly and DCMTL perform much better after 500 batch steps and finally converge to the best F1 score. We believe that in the beginning, high- level task in DCMTL is affected more by the noise of low- level tasks comparing to others, but as the training goes on, the high-level slot filling task slowly reaps the benefits from low-level tasks. To make our experiments more solid, we implemented two previous best performing models on ATIS dataset: Se- quential CNN (Vu 2016) (Sequence Labeling based) and Neural Sequence Chunking (Zhai et al. 2017) (Encoder- Decoder based). They achieved 0.2877 and 0.4355 F1 scores respectively, while our DCMTL model scores 0.5105 F1 and outperforms both of them (by 77% and 17% improve- ments). Ablation Test Our "shortcuts" connections come in two flavors: cascade connection and residual connection. Multi- task outputs and "shortcuts" connections are highly related since without the multi-task framework, there will be no cas- cade connections. We go on to show that both multi-task set- ting and the "shortcuts" connections are effective and useful in Table 3, where F1 score improves from 0.4302 to 0.4455 and 0.5105 respectively. We also investigate how our model DCMTL performs with or without cascade and residual con- nections (rows with ** prefix in Table 3). F1 score increases from 0.4840 to 0.5105 when residual connection is applied, which verifies its benefit. If we remove cascade connection from DCMTL, the model actually degenerates into hierar- chy multi-task model with residual connection and performs 0.4633 F1 score. Thus we can conclude that both connec- tions are helpful for our DCMTL model. However, the cas- cade connection, which relies on the multi-task, is more ef- fective than the residual connection. We can verify it from the fact that DCMTL model without cascade connection per- forms much worse than without residual connection (0.4633 vs. 0.4840 F1 scores). Furthermore, we explore how DCMTL performs with dif- ferent cascade connection methods. We compare three dif- 0200400600800Training Batch Step0.00.10.20.30.40.5F1Basic BiLSTM-CRFVanilla Multi-taskHierarchy Multi-taskDCMTL(full)PrecisionRecallF10.00.10.20.30.40.50.60.7SLOT+SEGSLOT+NESLOT+NE+SEG ferent types of cascade connection illustrated in Figure 4(a): 1. Segment labeling skipped to slot filling (SLOT+SEG). 2. Named entity labeling directly connected to slot filling (SLOT+NE). 3. Segment labeling, named entity labeling and slot filling in sequence (SLOT+NE+SEG). From Figure 3(b), we find that cascade connection with type 3 performs the best and then with type 2, while cas- cade method with skipped connection (type 1) performs the worst. Therefore, we design the networks with a cas- cade connection in a hierarchical fashion and do not apply skipped connection for the cascade inputs (Figure 4(b)). This phenomenon here may also be proved by our "cheated" case study above. Slot filling performance with pre-known named entity type is much better than with pre-known segment type (rows with * in Table 3). (a) (b) Figure 4: (a) Three types of cascade connection in our ex- periment. (b) Comparison between hierarchical and skipped cascade connection. 3.4 Online Testing Previous experimental results have proven the advantages of our proposed DCMTL approach, so we deploy it in a real world online environment to test its practical performance. For online A/B testing, we extracted users query log with the slot filling results for one day. There are in total 251,409 unique queries. We let three persons to manually evaluate whether a query is slotted perfectly with the strategy where the minority obeys the majority. A query is slotted perfectly means all terms in query are assigned with the correct slot la- bels. Our DCMTL model results in 152,178 perfectly slotted queries which is 60.53% accuracy3. While the original on- line max-matching algorithm with E-commerce knowledge base4 (more details in Section 3.1) only covers 66,302 per- fectly slotted queries with 26.37% accuracy. Thus, the ac- curacy of query slot filling in such online shopping assis- tant system is improved by 130% after deploying DCMTL 3We only report accuracy as evaluation metric, because preci- sion and recall are the same in such case. 4As we have showed that our DCMTL model outperforms sev- eral strong baselines in the offline evaluation, and the gap between online and offline is minor since our offline dataset also comes from online queries, we only deploy DCMTL model online since such evaluation is costly. model. This demonstrates that our model can effectively extract the semantic attributes of users query which is ex- tremely helpful E-commerce Shopping Assistant system. 4 Related Work There are mainly two lines of research that are related to our work: slot filling for dialog system and multi-task learning in natural language processing. Slot Filling is considered a sequence labeling problem that is traditionally solved by generative models. such as Hidden Markov Models (HMMs) (Wang, Deng, and Acero 2005), hidden vector state model (He and Young 2003), and discriminative models such as conditional random fields (CRFs) (Raymond and Riccardi 2007; Lafferty, McCallum, and Pereira 2001) and Support Vector Machine (SVMs) (Kudo and Matsumoto 2001). In recent years, deep learning approaches have been explored due to its successful appli- cation in many NLP tasks. Many neural network architec- tures have been used such as simple RNNs (Yao et al. 2013; Mesnil et al. 2015), convolutional neural networks (CNNs) (Xu and Sarikaya 2013), LSTMs (Yao et al. 2014) and vari- ations like encoder-decoder (Zhu and Yu 2017; Zhai et al. 2017) and external memory (Peng and Yao 2015). In gen- eral, these works adopt a BiLSTM (Zhu et al. 2018; Zhu et al. 2017) as the major labeling architecture to extract various features, then use a CRF layer (Huang, Xu, and Yu 2015) to model the label dependency. We also adopt a BiLSTM-CRF model as baseline and claim that a multi-task learning frame- work is working better than directly applying it on Chinese E-commerce dataset. Previous works only apply joint model of slot filling and intent detection (Zhang and Wang 2016; Liu and Lane 2016). Our work is the first to propose a multi- task sequence labeling model with novel cascade and resid- ual connections based on deep neural networks to tackle real-world slot filling problem. Multi-task Learning (MTL) has attracted increasing at- tention in both academia and industry recently. By jointly learning across multiple tasks (Caruana 1998), we can im- prove performance on each task and reduce the need for la- beled data. There has been several attempts of using multi- task learning on sequence labeling task (Peng and Dredze 2016b; Peng and Dredze 2016a; Yang, Salakhutdinov, and Cohen 2017), where most of these works learn all tasks at the out-most layer. Sgaard and Goldberg (2016) is the first to assume the existence of a hierarchy between the different tasks in a stacking BiRNN model. Compared to these works, our DCMTL model further improves this idea even thorough with cascade and residual connection. 5 Conclusion In this paper, we tackle the real-world slot filling task in a novel Chinese online shopping assistant system. We pro- posed a deep multi-task sequence learning framework with cascade and residual connection. Our model achieves com- parable results with several state-of-the-art models on the common slot filling dataset ATIS. On our real-world Chinese E-commerce dataset ECSA, our proposed model DCMTL also achieves best F1 score comparing to several strong Segment LabelingNamed Entity LabelingSlot Fillingtype 1type 2type 3type 3 baselines. DCMTL has been deployed on the online shop- ping assistant of a dominant Chinese E-commerce platform. Online testing results show that our model meets better understanding of users utterances and improves customers shopping experience. Our future research may include a joint model for category classification and slot filling. Active learning for slot filling can also be investigated by involving human-beings interaction with our system. Acknowledgments This work as partially supported by NSFC grants 91646205 and 61373031. We thank the anonymous reviewers for their valuable comments. References [2018] B´echet, F., and Raymond, C. 2018. Is atis too shallow to go deeper for benchmarking spoken language understand- ing models? In InterSpeech. [1998] Caruana, R. 1998. Multitask learning. In Learning to learn. Springer. [2016] Hakkani-Tur, D.; Tur, G.; Celikyilmaz, A.; Chen, Y.- N.; Gao, J.; Deng, L.; and Wang, Y.-Y. 2016. Multi-domain joint semantic frame parsing using bi-directional rnn-lstm. In INTERSPEECH. [2003] He, Y., and Young, S. 2003. A data-driven spoken language understanding system. In ASRU. [2016] He, K.; Zhang, X.; Ren, S.; and Sun, J. 2016. Deep residual learning for image recognition. In CVPR. [2015] Huang, Z.; Xu, W.; and Yu, K. 2015. Bidirectional lstm-crf models for sequence tagging. arXiv. [2016] Jou, B., and Chang, S.-F. 2016. Deep cross residual learning for multitask visual recognition. In ACM MM. [2001] Kudo, T., and Matsumoto, Y. 2001. Chunking with support vector machines. In NAACL. [2016] Kurata, G.; Xiang, B.; Zhou, B.; and Yu, M. 2016. Leveraging sentence-level information with encoder lstm for semantic slot filling. arXiv. [2001] Lafferty, J.; McCallum, A.; and Pereira, F. C. 2001. Conditional random fields: Probabilistic models for seg- menting and labeling sequence data. [2015] Liu, B., and Lane, I. 2015. Recurrent neural net- work structured output prediction for spoken language un- derstanding. In NIPS Workshop. [2016] Liu, B., and Lane, I. 2016. Joint online spoken lan- guage understanding and language modeling with recurrent neural networks. arXiv. [2015] Mesnil, G.; Dauphin, Y.; Yao, K.; Bengio, Y.; Deng, L.; Hakkani-Tur, D.; He, X.; Heck, L.; Tur, G.; Yu, D.; et al. 2015. Using recurrent neural networks for slot filling in spo- ken language understanding. TASLP. [2009] Mintz, M.; Bills, S.; Snow, R.; and Jurafsky, D. 2009. Distant supervision for relation extraction without labeled data. In ACL. [2016a] Peng, N., and Dredze, M. 2016a. Improving named entity recognition for chinese social media with word seg- mentation representation learning. In ACL. [2016b] Peng, N., and Dredze, M. 2016b. Multi-task multi- domain representation learning for sequence tagging. arXiv. [2015] Peng, B., and Yao, K. 2015. Recurrent neural net- works with external memory for language understanding. arXiv. [2018] Peters, M.; Neumann, M.; Iyyer, M.; Gardner, M.; Clark, C.; Lee, K.; and Zettlemoyer, L. 2018. Deep con- textualized word representations. In NAACL. [1990] Price, P. J. 1990. Evaluation of spoken language sys- tems: The atis domain. In Speech and Natural Language. [2007] Raymond, C., and Riccardi, G. 2007. Generative and discriminative algorithms for spoken language understand- ing. In INTERSPEECH. [2017] Reimers, N., and Gurevych, I. 2017. Optimal hy- perparameters for deep lstm-networks for sequence labeling tasks. arXiv. [2016] Søgaard, A., and Goldberg, Y. 2016. Deep multi-task learning with low level tasks supervised at lower layers. In ACL. [2014] Sutskever, I.; Vinyals, O.; and Le, Q. V. 2014. Se- quence to sequence learning with neural networks. In NIPS. [2015] Vinyals, O.; Toshev, A.; Bengio, S.; and Erhan, D. 2015. Show and tell: A neural image caption generator. In CVPR. [2016] Vu, N. T.; Gupta, P.; Adel, H.; and Schutze, H. 2016. Bi-directional recurrent neural network with ranking loss for spoken language understanding. In ICASSP. [2016] Vu, N. T. 2016. Sequential convolutional neural networks for slot filling in spoken language understanding. arXiv. [2005] Wang, Y.-Y.; Deng, L.; and Acero, A. 2005. Spoken language understanding. IEEE Signal Processing Magazine. [2013] Xu, P., and Sarikaya, R. 2013. Convolutional neural network based triangular crf for joint intent detection and slot filling. In ASRU. [2017] Yan, Z.; Duan, N.; Chen, P.; Zhou, M.; Zhou, J.; and Li, Z. 2017. Building task-oriented dialogue systems for online shopping. In AAAI. [2017] Yang, Z.; Salakhutdinov, R.; and Cohen, W. W. 2017. Transfer learning for sequence tagging with hierarchical re- current networks. arXiv. [2013] Yao, K.; Zweig, G.; Hwang, M.-Y.; Shi, Y.; and Yu, D. 2013. Recurrent neural networks for language under- standing. In Interspeech. [2014] Yao, K.; Peng, B.; Zhang, Y.; Yu, D.; Zweig, G.; and Shi, Y. 2014. Spoken language understanding using long short-term memory neural networks. In SLT Workshop. [2017] Zhai, F.; Potdar, S.; Xiang, B.; and Zhou, B. 2017. Neural models for sequence chunking. In AAAI. [2016] Zhang, X., and Wang, H. 2016. A joint model of intent determination and slot filling for spoken language un- derstanding. In IJCAI. [2017] Zhu, S., and Yu, K. 2017. Encoder-decoder with focus-mechanism for sequence labelling based spoken lan- guage understanding. In ICASSP. [2017] Zhu, Y.; Li, H.; Liao, Y.; Wang, B.; Guan, Z.; Liu, H.; and Cai, D. 2017. What to do next: Modeling user behaviors by time-lstm. IJCAI. [2018] Zhu, Y.; Zhu, J.; Hou, J.; Li, Y.; Wang, B.; Guan, Z.; and Cai, D. 2018. A brand-level ranking system with the customized attention-gru model. IJCAI.
1807.03586
5
1807
2019-05-30T09:41:11
Difficulty Controllable Generation of Reading Comprehension Questions
[ "cs.CL", "cs.AI" ]
We investigate the difficulty levels of questions in reading comprehension datasets such as SQuAD, and propose a new question generation setting, named Difficulty-controllable Question Generation (DQG). Taking as input a sentence in the reading comprehension paragraph and some of its text fragments (i.e., answers) that we want to ask questions about, a DQG method needs to generate questions each of which has a given text fragment as its answer, and meanwhile the generation is under the control of specified difficulty labels---the output questions should satisfy the specified difficulty as much as possible. To solve this task, we propose an end-to-end framework to generate questions of designated difficulty levels by exploring a few important intuitions. For evaluation, we prepared the first dataset of reading comprehension questions with difficulty labels. The results show that the question generated by our framework not only have better quality under the metrics like BLEU, but also comply with the specified difficulty labels.
cs.CL
cs
Difficulty Controllable Generation of Reading Comprehension Questions Yifan Gao1∗ , Lidong Bing2 , Wang Chen1 , Michael R. Lyu1 and Irwin King1 1Department of Computer Science and Engineering, The Chinese University of Hong Kong, Shatin, N.T., Hong Kong 2R&D Center Singapore, Machine Intelligence Technology, Alibaba DAMO Academy 1{yfgao,wchen,lyu,king}@cse.cuhk.edu.hk, [email protected] 9 1 0 2 y a M 0 3 ] L C . s c [ 5 v 6 8 5 3 0 . 7 0 8 1 : v i X r a Abstract We investigate the difficulty levels of questions in reading comprehension datasets such as SQuAD, and propose a new question generation setting, named Difficulty-controllable Question Generation (DQG). Taking as input a sentence in the read- ing comprehension paragraph and some of its text fragments (i.e., answers) that we want to ask ques- tions about, a DQG method needs to generate ques- tions each of which has a given text fragment as its answer, and meanwhile the generation is under the control of specified difficulty labels -- the output questions should satisfy the specified difficulty as much as possible. To solve this task, we propose an end-to-end framework to generate questions of des- ignated difficulty levels by exploring a few impor- tant intuitions. For evaluation, we prepared the first dataset of reading comprehension questions with difficulty labels. The results show that the question generated by our framework not only have better quality under the metrics like BLEU, but also com- ply with the specified difficulty labels. 1 Introduction Question Generation (QG) aims to generate natural and human-like questions from a range of data sources, such as image [Mostafazadeh et al., 2016], knowledge base [Serban et al., 2016; Su et al., 2016], and free text [Du et al., 2017]. Besides for constructing SQuAD-like dataset [Rajpurkar et al., 2016], QG is also helpful for the intelligent tutor system: The instructor can actively ask the learner questions accord- ing to reading comprehension materials [Heilman and Smith, 2010] or particular knowledge [Danon and Last, 2017]. In this paper, we focus on QG for reading comprehension text. For example, Figure 1 gives three questions from SQuAD, our goal is to generate such questions. QG for reading comprehension is a challenging task be- cause the generation should not only follow the syntactic structure of questions, but also ask questions to the point, i.e., ∗This work was partially done when Yifan Gao was an intern at Tencent AI Lab working with Lidong Bing, who was a full-time researcher there. Figure 1: Example questions from SQuAD. The answers of Q1 and Q2 are facts described in the sentences, thus they are easy to answer. But it is not straightforward to answer Q3 having a specified aspect as its answer. Some template-based approaches [Vanderwende, 2007; Heilman and Smith, 2010] were proposed initially, where well-designed rules and heavy human labor are required for declarative-to-interrogative sen- tence transformation. With the rise of data-driven learning approach and sequence to sequence (seq2seq) framework, some researchers formulated QG as a seq2seq problem [Du et al., 2017]: The question is regarded as the decoding tar- get from the encoded information of its corresponding input sentence. However, different from existing seq2seq learning tasks such as machine translation and summarization which could be loosely regarded as learning a one-to-one mapping, for question generation, different aspects of the given descrip- tive sentence can be asked, and hence the generated ques- tions could be significantly different. Several recent works tried to tackle this problem by incorporating the answer in- formation to indicate what to ask about, which helps the models generate more accurate questions [Song et al., 2018; Zhou et al., 2017]. In our work, we also focus on the answer- aware QG problem, which assumes the answer is given. Sim- ilar problems have been addressed in, e.g., [Zhao et al., 2018; Sun et al., 2018]. In this paper, we investigate a new setting of QG, namely Difficulty controllable Question Generation (DQG). In this setting, given a sentence in the reading comprehension para- graph, the text fragments (i.e., answers) that we want to ask questions about, and the specified difficulty levels, a frame- S2:It is a member of the chalcogengroup on the periodic table and is a highly reactive nonmetal and oxidizing agent that readily forms compounds (notably oxides) with most elements. Q2: (Easy) Of what group in the periodic table is oxygen a member?A2:chalcogenS3:The electric guitaris often emphasised, used with distortion and other effects, both as a rhythm instrument using repetitive riffs with a varying degree of complexity, and as a solo lead instrument. Q3: (Hard) What instrument is usually at the center of a hard rock sound?A3:Theelectric guitarS1:OxygenisachemicalelementwithsymbolOandatomicnumber8. Q1: (Easy) What is the atomicnumberoftheelementoxygen? A1:8 work needs to generate questions that are asked about the specified answers and satisfy the difficulty levels as much as possible. For example, given the sentence S3 and the answer "the electric guitar" in Figure 1, the system should be capable of asking both a hard question like Q3 and an easy one such as "What is often emphasised as a rhythm instrument?". DQG has rich application scenarios. For instance, when instruc- tors prepare learning materials for students, they may want to balance the numbers of hard questions and easy questions. Besides, the generated questions can be used to test how a QA system works for questions with diverse difficulty levels. Generating questions with designated difficulty levels is a more challenging task. First, no existing large-scale QA dataset has difficulty labels for questions to train a reliable neural network model. Second, for a single sentence and an- swer pair, we want to generate questions with diverse dif- ficulty levels. However, the current datasets like SQuAD only have one given question for each sentence and answer pair. Finally, there is no metric to evaluate the difficulty of questions. To overcome the first issue, we prepare a dataset of reading comprehension questions with difficulty la- bels. Specifically, we design a method to automatically label SQuAD questions with multiple difficulty levels, and obtain 76K questions with difficulty labels. To overcome the second issue, we propose a framework that can learn to generate questions complying with the spec- ified difficulty levels by exploring the following intuitions. To answer a SQuAD question, one needs to locate a text frag- ment in the input sentence as its answer. Thus, if a question has more hints that can help locate the answer fragment, it would be easier to answer. For the examples in Figure 1, the hint "atomic number" in Q1 is very helpful, because, in the corresponding sentence, it is just next to the answer "8", while for Q3, the hint "instrument" is far from the answer "The electric guitar". The second intuition is inspired by the recent research on style-guided text generation, which in- corporates a latent style representation (e.g., sentiment label or review rating score) as an input of the generator [Shen et al., 2017; Liao et al., 2018]. Similarly, performing difficulty control can be regarded as a problem of sentence generation towards a specified attribute or style. On top of the typical seq2seq architecture, our framework has two tailor-made de- signs to explore the above intuitions: (1) Position embeddings are learned to capture the proximity hint of the answer in the input sentence; (2) Global difficulty variables are learned to control the overall "difficulty" of the questions. For the last issue, we propose to employ the existing reading comprehen- sion (RC) systems to evaluate the difficulty of generated ques- tions. Intuitively, questions which cannot be answered by RC systems are more difficult than these correctly answered ones. In the quantitative evaluation, we compare our DQG model with state-of-the-art models and ablation baselines. The re- sults show that our model not only generates questions of bet- ter quality under the metrics like BLEU and ROUGE, but also has the capability of generating questions complying with the specified difficulty labels. The manual evaluation finds that the language quality of our generated questions is better, and our model can indeed control the question difficulty. 2 Task Definition In the DQG task, our goal is to generate SQuAD-like ques- tions of diverse difficulty levels for a given sentence. Note that the answers of SQuAD questions are text spans in the in- put sentence, and they are significantly different from RACE questions [Lai et al., 2017] such as "What do you learn from the story?". Considering their different emphases, SQuAD questions are more suitable for our task, while the difficulty of RACE questions mostly comes from the understanding of the story but not from the way how the question is asked. Thereby, we assume that the answers for asking questions are given, and they appear as text fragments in the input sentences by following the paradigm of SQuAD. We propose an end-to-end framework to handle DQG. For- mally, let a denote the answer for asking question, let s de- note the sentence containing a from a reading comprehension paragraph. Given a, s, and a specified difficulty level d as in- put, the DQG task is to generate a question q which has a as its answer, and meanwhile should have d as its difficulty level. 3 The Protocol of Difficulty Labeling SQuAD [Rajpurkar et al., 2016] is a reading comprehension dataset containing 100,000+ questions on Wikipedia articles. The answer of each question is a text fragment from the cor- responding input passage. We employ SQuAD questions to prepare our experimental dataset. The difficulty level is a subjective notion and can be ad- dressed in many ways, e.g., syntax complexity, coreference resolution and elaboration [Sugawara et al., 2017]. To avoid the ambiguity of the "question difficulty" in this preliminary study, we design the following automatic labeling protocol and study the correlation between automatically labelled dif- ficulty with human difficulty. We first define two difficulty levels, Hard and Easy, in this preliminary dataset for the sake of simplicity and practicality. We employ two RC systems, namely R-Net [Wang et al., 2017] 1 and BiDAF [Seo et al., 2017] 2, to automatically assess the difficulty of the questions. The labeling protocol is: A question would be labelled with Easy if both R-Net and BiDAF answer it correctly under the exact match metric, and labelled with Hard if both systems fail to answer it. The remaining questions are eliminated for suppressing the ambiguity. Note that we cannot directly employ the original data split of SQuAD to train a model of R-Net or BiDAF, and use the model to assess all questions. Such assessment is not appro- priate, because models will overfit training questions and la- bel them all as easy ones. To avoid this problem, we re-split the original SQuAD questions into 9 splits and adopt a 9-fold strategy. To label every single split (the current split), 7 splits are used as the training data, and the last split is used as the validation data. Then the trained model is used to assess the difficulty of questions in the current split. This way guar- antees that the model is never shown with the questions for automatic labeling. Finally, we obtain 44,723 easy questions and 31,332 hard questions. 1https://github.com/HKUST-KnowComp/R-Net 2https://github.com/allenai/bi-att-flow Avg. distance of question words Avg. distance of all sentence words Easy 7.67 11.23 Hard 9.71 11.16 All 8.43 11.20 Table 1: Distance statistics for non-stop words Table 1. In contrast, the average distance of all nonstop sen- tence words to the answer is also given in the bottom line. If we only count those nonstop question words, we find that their distance to the answer fragment is much smaller than the sentence words, namely 8.43 vs. 11.20. We call this Question Word Proximity Hint (QWPH). More importantly, the distance for hard questions is significantly larger than that for easy questions, namely 9.71 vs. 7.67, which well verifies our intuition that if a question has more obvious proximity hints (i.e., containing more words that are near the answer in the corresponding sentence), it would be easier to solve. We model QWPH for easy questions and hard questions sep- arately and call this Difficulty Level Proximity Hint (DLPH). To implement the QWPH intuition, our model learns a lookup table which maps the distance of each sentence word to the answer fragment, i.e., 0 (for answer words), 1, 2, etc., into a position embedding: (p0, p1, p2, ..., pL), where pi ∈ Rdp and dp is the dimension. L is the maximum dis- tance we consider. Different from QWPH that is difficulty agnostic, the DLPH intuition additionally explores the infor- mation of question difficulty levels. Therefore, we define two L) for the Easy label, and lookup tables: (pe 0, pe L) for the Hard label. Note that the above (ph 2 , ..., ph position embeddings not only carry the information of sen- tence word position, but also let our model know which as- pect (i.e., answer) to ask with the embeddings of position 0. 4.2 Characteristic-rich Encoder The characteristic-rich encoder incorporates several features into a contextualized representation. For each sentence word w, an embedding lookup table is firstly used to map tokens in the sentence into dense vectors: (w1, w2, ..., wm), where wi ∈ Rdw of dw dimensions. Then we concatenate its word embedding and position embedding (proximity hints) to de- rive a characteristic-rich embedding: x = [w; p]. We use bidirectional LSTMs to encode the sequence (x1, x2, ..., xm) to get a contextualized representation for each token: 2, ..., pe 0 , ph 1 , ph 1, pe ←− h i = ←−−−− LSTM( ←− h i+1, xi), −→ h i−1, xi), −→ h i = −→ h i and −−−−→ LSTM( ←− where h i are the hidden states at the i-th time step of the forward and the backward LSTMs. We concatenate them together as hi = [ 4.3 Difficulty-controllable Decoder We use another LSTM as the decoder to generate the ques- tion. We employ the difficulty label d to initialize the hidden state of the decoder. During the decoding, we incorporate the attention and copy mechanisms to enhance the performance. Global Difficulty Control. We regard the generation of difficulty-controllable questions as a problem of sentence generation towards a specified style, i.e., easy or hard. To −→ h i; ←− h i]. Figure 2: Overview of our DQG framework (better viewed in color) To verify the reasonability of our labeling protocol, we evaluate its consistency with human being's judgment. We sample 100 Easy questions and 100 Hard questions, and hire 3 annotators to rate the difficulty level of all these questions on a 1-3 scale (3 for the most difficult). The result shows that average difficulty rating for the Easy questions is 1.90 while it is 2.52 for the Hard ones. 4 Framework Description Given an input sentence s = (w1, w2, ..., wm), a text frag- ment a in s, and a difficulty level d, our task is to gener- ated a question q, which is asked with s as its background information, takes a as its answer, and has d as its difficulty. The architecture of our difficulty-controllable question gen- erator is depicted in Figure 2. The encoder takes two types of inputs, namely, the word embeddings and the relative posi- tion embeddings (capturing the proximity hints) of sentence words (including the answer words). Bidirectional LSTMs are employed to encode the input into contextualized repre- sentations. Besides two standard elements, namely attention and copy, the decoder contains a special initialization to con- trol the difficulty of the generated question. Specifically, we map the difficulty label d into a global difficulty variable with a lookup table, and combine the variable with the last hidden state of the encoder to initialize the decoder. 4.1 Exploring Proximity Hints Recall that our first intuition tells that the proximity hints are helpful for answering the SQuAD-like questions. Before in- troducing our design for implementing the intuition, we quan- titatively verify it by showing some statistics. Specifically, we examine the average distance of those nonstop question words that also appear in the input sentence to the answer fragment. For example, for Q1 in Figure 1 and its corre- sponding input sentence "Oxygen is a chemical element with symbol O and atomic number 8", we calculate the word-level average distance of words "atomic", "number", "element", and "oxygen" to the answer "8". The statistics are given in ⋯Context Vector⋮Final Distribution⋯proximityhints𝑤𝑖wordembvocabulary𝐰𝑖𝐩𝑖𝑒𝐡𝑖𝐡𝑚𝐮𝑡−1𝐜𝑡𝐮𝑡𝐰𝑡−1(1−𝑔𝑡)P𝑉+𝑔𝑡P𝐶𝐮0difficultyvariablediff leveld𝐝Global DifficultyControlEncoderDecoder⋯P(𝑤)𝐰𝑏𝑜𝑠LL-1…3210LL-1…3210𝐩𝑖𝑒𝐩𝑖ℎ # easy questions # hard questions Easy ratio Test Train 4,937 34,813 24,317 3,442 58.88% 58.19% 58.92% Dev 4,973 3,573 Table 2: The statistics of our dataset Ans QWPH QWPH-GDC DLPH DLPH-GDC Easy Questions Set R-Net BiDAF EM 82.16 82.66 84.35 85.49 85.82 F1 87.22 87.37 88.86 89.50 89.69 EM 75.43 76.10 77.23 78.35 79.09 F1 83.17 83.90 84.78 85.34 85.72 Hard Questions Set R-Net BiDAF EM 34.15 33.35 31.60 28.05 26.71 F1 60.07 59.50 57.88 54.21 53.40 EM 29.36 28.40 26.68 24.89 24.47 F1 55.89 55.21 54.31 51.25 51.20 do so, we introduce a global difficulty variable to control the generation. We follow the recent works for the task of style transfer that apply the control variable globally, i.e., using the style variable to initialize the decoder [Liao et al., 2018]. Specifically, for the specified difficulty level d, we first map it to its corresponding difficulty variable d ∈ Rdd, where dd is the dimension of a difficulty variable. Then we use the con- catenation of d with the final hidden state hm of the encoder to initialize the decoder hidden state u0 = [hm; d]. Note that in the training stage, we feed the model the ground truth dif- ficulty labels, while in the testing stage, our model can take any specified difficulty labels, i.e., difficulty-controllable, for question generation. We have also tried some variations by adding this variable to other places such as every encoder or decoder input in the model but it does not work. Decoder with Attention & Copy. The decoder predicts the word probability distribution at each decoding timestep to generate the question. At the t-th timestep, it reads the word embedding wt and the hidden state ut−1 of the pre- vious timestep to generate the current hidden state ut = LSTM(ut−1, wt). Then the decoder employs the atten- tion mechanism [Luong et al., 2015; Zhang et al., 2018; Chen et al., 2019] and copy mechanism [See et al., 2017] to generate the question by copying words in the sentence or generating words from a predefined vocabulary. 5 Experiments 5.1 Experimental Settings Dataset. Our prepared dataset is split according to articles of the SQuAD data, and Table 2 provides the detailed statis- tics. Across the training, validation and test sets, the splitting ratio is around 7:1:1, and the easy sample ratio is around 58% for all three. Baselines and Ablation Tests. We only employ neural net- work based methods as our baselines, since they perform bet- ter than non-neural methods as shown in recent works [Du et al., 2017; Zhou et al., 2017]. The first baseline models the question generation as a seq2seq problem incorporating the attention mechanism, and we refer to it as L2A [Du et al., 2017]. The second baseline Ans adds answer indicator em- bedding to the seq2seq model, similar to [Zhou et al., 2017; Kumar et al., 2018]. Two ablations that only employ the ques- tion word proximity hint or the difficulty level proximity hint are referred to as QWPH and DLPH. Moreover, we exam- ine the effectiveness of the global difficulty control (GDC) combined with QWPH and DLPH, refer to them as QWPH- GDC and DLPH-GDC. All these methods are enhanced by the copy mechanism. Model Details and Parameter Settings. The embedding dimensions for the position embedding and the global diffi- culty variable, i.e. dp and dd, are set to 50 and 10 respectively. Table 3: Difficulty of the generated questions, measured with R- Net and BiDAF. For easy questions, higher score indicates better difficulty-control, while for hard questions, lower indicates better Easy Questions Set R-Net BiDAF EM 7.41 12.41 12.91 F1 5.72 9.51 9.95 EM 7.13 11.28 12.40 F1 5.88 8.49 9.23 Hard Questions Set R-Net BiDAF EM 6.45 12.01 12.68 F1 5.47 10.45 10.76 EM 6.13 10.51 11.22 F1 5.10 9.37 9.97 QWPH-GDC DLPH DLPH-GDC Table 4: The results of controlling difficulty, measured with R-Net and BiDAF. The scores are performance gap between questions gen- erated with original difficulty label and questions generated with re- verse difficulty label We use the maximum relative distance L = 20 in the position embedding. We adopt teacher-forcing in the encoder-decoder training and use the ground truth difficulty labels. In the test- ing procedure, we select the model with the lowest perplexity and beam search with size 3 is employed for question gener- ation. All important hyper-parameters, such as dp and dd, are selected on the validation dataset. 5.2 Difficulty Control Results We run R-Net and BiDAF to assess the difficulty of our gen- erated hard and easy questions. Here the R-Net and BiDAF systems are trained using the same train/validation splits as shown in Table 2, and we report their performance under the standard reading comprehension measures for SQuAD ques- tions, i.e., Exact Match (EM) and macro-averaged F1 score (F1), on the easy and hard question sets respectively. For all experiments, we firstly show the performance of difficulty- controllable question generation by feeding ground truth dif- ficulty labels, then we feed the reverse difficulty labels to demonstrate our model can control the difficulty of generated questions. Recall that the generated questions can be split into an easy set and a hard set according to the difficulty labels. Here we evaluate the generated questions from the perspective that a reading comprehension system (e.g., R-Net and BiDAF) should perform better on the generated questions in the easy set, and perform worse on the hard question set. If a pipeline does not use the answer information, its generated questions are likely not about the answers, thus both BiDAF and R-Net cannot work well no matter for easy or hard questions. There- fore, we do not use L2A here. As shown in Table 3, for the easy set, the questions gener- ated by the methods using the difficulty label "Easy" are eas- ier to answer. Specifically, compared with Ans and QWPH which cannot control the difficulty, QWPH-GDC, DLPH, and DLPH-GDC generate easier questions, showing that they have the capability of generating difficulty-controllable ques- tions. One instant doubt is that a model can simply produce Easy Question Set R F 0.74 2.91 2.94 0.76 D 2.02 1.84 Hard Question Set R F 0.58 2.87 2.87 0.64 D 2.12 2.26 Ans DLPH-GDC Table 5: Human evaluation results for generated questions. Fluency(F) and Difficulty(D) take values from {1, 2, 3} (3 means the top fluency or difficulty), while Relevance(R) takes a binary value, i.e., 1 or 0 trivial questions by having them contain the answer words. In fact, our models do not have this behaviour, because it will increase the training loss. To further verify this, we calculate the occurrence rate of answer words in the generated ques- tions. The result shows that only 0.09% answer words appear in the questions generated by our models. For the hard set, we can draw the same conclusion by keep- ing in mind that a lower score indicates the corresponding method performs better in generating difficulty-controllable questions. (Note that questions irrelevant to the answer can also yield lower scores, and we have more discussion about this issue in Section 5.3 for the human evaluation.) This ob- servation shows that incorporating the difficulty information locally by the two position embeddings or globally by the difficulty-controlled initialization indeed guides the genera- tor to generate easier or harder questions. Comparing DLPH and QWPH-GDC, we find that the local difficulty control by the position embedding is more effective. DLPH-GDC per- forms the best by combining the local and global difficulty control signals. Moreover, we find that QWPH achieves slightly better per- formance than Ans baseline. A large performance gap be- tween QWPH-GDC and QWPH again validates the effective- ness of the global difficulty control. Meanwhile, the improve- ment from QWPH to DLPH shows that the local difficulty level proximity hint can stress the question difficulty at each time step to perform better. On the other hand, another way to validate our model is testing whether our model can control the difficulty by feed- ing the reversed difficulty labels. For example, for a question in the easy set, if we feed the "Hard" label together with the input sentence and answer of this question into our model, we expect the generated question should be harder than feed- ing the "Easy" label. Concretely, if a method has the better capability in controlling the difficulty, on two sets of ques- tions generated with this method by taking the true label and the reversed label, the performance gap of a reading compre- hension system should be larger. The results of this experi- ment are given in Table 4. We only compare models which have difficulty control capability. The model combining lo- cal and global difficulty signals, i.e., DLPH-GDC, achieves the largest gap, which again shows that: (1) DLPH-GDC has the strongest capability of generating difficulty-controllable questions; (2) The local difficulty control (i.e. DLPH) is more effective than the global (i.e. QWPH-GDC). 5.3 Manual Evaluation We hire 3 annotators to rate the model generated questions. We randomly sampled 100 question with "Easy" labels and 100 with "Hard" labels from the test set, and let each an- notator annotate these 200 cases. During the annotation, each data point contains a sentence, an answer, and the ques- tions generated by different models, without showing the dif- ficulty labels. We consider three metrics: Fluency(F), Difficulty(D) and Relevance(R). The annotators are first asked to read the generated questions to evaluate their grammatical correctness and fluency. Then, all annotators are required to rate the difficulty of each generated question by considering the corresponding sentence and answer. Finally, for relevance, we ask the annotators to judge if the question is asking about the answer. Fluency and Difficulty take values from {1, 2, 3} (3 means the top fluency or difficulty), while Relevance takes a binary value (1 or 0). Table 5 shows the results of the manual evaluation. We compare our best model DLPH-GDC with the Ans baseline. We separate the Easy questions and Hard questions for statistics. For both question sets, both models achieve high scores on Fluency, owing to the strong language modeling capability of neural models. For Difficulty, we can find that DLPH-GDC can generate easier or harder questions than Ans by feeding the true difficulty labels. Another observation is that, for the Ans baseline, questions generated in the Easy set are easier than those in the Hard set, which validates our difficulty labelling protocol from another perspective. Note that for human beings, all SQuAD-like questions are not re- ally difficult, therefore, the difference of Difficulty val- ues between the easy set and the hard set is not large. Furthermore, we can observe our model can generate more relevant questions compared with the Ans baseline. The rea- son could be that our position embedding can not only tell where the answer words are, but also indicate the distance of the context words to the answer. Thus, it provides more in- formation to the model for asking to the point questions. Ans only differentiates the answer token and non-answer token, and treats all non-answer tokens equally. Recall that we had the concern regarding Table 3 that the generated hard questions by our difficulty-controlling mod- els say DLPH-GDC may simply be irrelevant to the answer, which makes DLPH-GDC achieves lower EM/F1 scores than the Ans baseline. By comparing the Relevance scores in Table 5 and EM/F1 scores in Table 3 for Hard Question Set, we find that the questions generated by DLPH-GDC are more relevant (as shown in Table 5) and more difficult (as shown in both Tables 3 and 5) than those generated by the Ans base- line. This observation resolves our doubt on the irrelevance issue and supports the conclusion that our DLPH-GDC does generate more difficult and relevant questions which can fail the two RC pipelines. 5.4 Automatic Evaluation of Question Quality Here we evaluate the similarity of generated questions with the ground truth. Since our dataset is not parallel (i.e., for a sentence and answer pair, our dataset only has one question with the "easy" or "hard" label), here we only evaluate the question quality by feeding the ground truth difficulty labels. We employ BLEU (B), METEOR (MET) and ROUGE-L (R- L) scores by following [Du et al., 2017]. BLEU evaluates the average N-gram precision on a set of reference sentences, with a penalty for overly long sentences. ROUGE-L is com- B3 B2 B1 B4 MET R-L 36.01 21.61 14.97 10.88 15.99 38.06 L2A 43.51 29.06 21.35 16.22 20.53 45.66 Ans QWPH 43.75 29.28 21.61 16.46 20.70 46.02 QWPH-GDC 43.99 29.60 21.86 16.63 20.87 46.26 DLPH 44.11 29.64 21.89 16.68 20.94 46.22 DLPH-GDC 43.85 29.48 21.77 16.56 20.79 46.16 Table 6: Automatic evaluation for question quality monly employed to evaluate the recall of the longest common subsequences, with a penalty for short sentences. Table 6 shows the quality of generated questions. Com- paring the first three methods, we can find that the answer and position information helps a lot for asking to the point questions, i.e., more similar to the ground truth. Moreover, QWPH performs better than Ans, indicating that further dis- tinguishing the different distance of the non-answer words to the answer provides richer information for the model to gen- erate better questions. The results in the lower half show that, given the ground truth difficulty labels, these three methods with the capability of difficulty control are better than the first three methods. These three models achieve comparable per- formance, and DLPH-GDC sacrifices a little in N-gram based performance here while achieving the best difficulty control capability (refer to Tables 3 & 4). 5.5 Case Study Figure 3 provides some examples of generated questions (with answers marked in red). The number after the model is the average distance of the overlapped nonstop words be- tween the question and the input sentence to the answer frag- ment. The average distance corresponds to the our intuition proximity hints well. Compared with questions generated by Ans baseline, our model can give more hints (shorter distance) when asking easier questions and give less hints (longer distance) when asking harder questions. For the first example, we observe that the ground truth question generated by Human is quite easy, just replacing the answer "bodhi" with "what". Among the three systems, Ans asks a question that is not about the answer. While both DLPH-GDC and DLPH-GDC (reverse) are able to generate to the point questions. Specifically, by taking the "Easy" la- bel, DLPH-GDC tends to use more words from the input sen- tence, while DLPH-GDC (reverse) uses less and its generated question is relatively difficult. For the second example, we find our system is also applicable to the question with "Hard" label. 6 Related Work In this section, we primarily review question generation (QG) works on free text. Vanderwende [2007] proposed this task, later on, several rule-based approaches were proposed. They manually design some question templates and transform the declarative sentences to interrogative questions [Mazidi and Nielsen, 2014; Labutov et al., 2015; Lindberg et al., 2013; Heilman and Smith, 2010]. These Rule-based approaches need extensive human labor to design question templates, Figure 3: Example questions (with answers marked in red). The human question for Input 2 uses some information ("hard rock") in preceding sentences which are not shown here and usually can only ask annotators to evaluate the generated questions. Du et al. [2017] proposed the first automatic QG frame- work. They view QG as a seq2seq learning problem to learn the mapping between sentences and questions in read- ing comprehension. Moreover, the procedure of QG from a sentence is not a one-to-one mapping, because given a sen- tence, different questions can be asked from different aspects. As Du et al. [2017] mentioned, in their dataset, each sentence corresponds to 1.4 questions on average. Seq2seq learning may not perform well for learning such a one-to-many map- ping. Some recent works attempt to solve this issue by assum- ing the aspect has been already known when asking a question [Zhou et al., 2017; Yuan et al., 2017] or can be detected with a third-party pipeline [Du and Cardie, 2018]. This assump- tion makes sense, because for humans to ask questions, we usually first read the sentence to decide which aspect to ask. In this paper, we explore another important dimension in QG, i.e., generating questions with controllable difficulty, that has never been studied before. 7 Conclusions In this paper, we present a novel setting, namely difficulty- controllable question generation for reading comprehension, which to the best of our knowledge has never been studied before. We propose an end-to-end approach to learn the ques- tion generation with designated difficulty levels. We also pre- pared the first dataset for this task, and extensive experiments show that our framework can solve this task reasonably well. One interesting future direction is to explore generating mul- tiple questions for different aspects in one sentence [Gao et al., 2019]. Acknowledgments This work is supported by the Research Grants Council of the Hong Kong Special Administrative Region, China (No. CUHK 14208815 and No. CUHK 14210717 of the General Research Fund). We thank Department of Computer Science and Engineering, The Chinese University of Hong Kong for the conference grant support. We would like to thank Jianan Wang for her efforts in the preliminary investigation. Input 1:prajñāis the wisdom that is able to extinguish afflictions and bring about bodhi. (Easy Question)Human: (4.5) prajnais the wisomthat is able to extinguish afflictions and bring about what ? Ans: (13.0) what is prajñā?DLPH-GDC: (6.2) prajñāis able to extinguish afflictions and bring about what ?DLPH-GDC(reverse): (7.3) what isprajñāable to bring ?Input 2:the electric guitar is often emphasised, used with distortion and other effects , both as a rhythm instrument using repetitive riffs with a varying degree of complexity , and as a solo lead instrument . (Hard Question)Human: (16.0) what instrument is usually at the center of a hard rock sound ?Ans: (5.5) what is often emphasisedwith distortion and other effects ?DLPH-GDC: (25.7) what is a solo lead instrument ?DLPH-GDC(reverse): (2.5) what is often emphasised? References [Chen et al., 2019] Wang Chen, Yifan Gao, Jiani Zhang, Ir- win King, and Michael R. Lyu. Title-guided encoding for keyphrase generation. In AAAI, 2019. [Danon and Last, 2017] Guy Danon and Mark Last. A syntactic approach to domain-specific automatic question generation. CoRR, abs/1712.09827, 2017. [Du and Cardie, 2018] Xinya Du and Claire Cardie. Harvest- ing paragraph-level question-answer pairs from wikipedia. In ACL, 2018. [Du et al., 2017] Xinya Du, Junru Shao, and Claire Cardie. Learning to ask: Neural question generation for reading comprehension. In ACL, 2017. [Gao et al., 2019] Yifan Gao, Lidong Bing, Piji Li, Irwin King, and Michael R. Lyu. Generating distractors for read- ing comprehension questions from real examinations. In AAAI, 2019. [Heilman and Smith, 2010] Michael Heilman and Noah A. Smith. Good question! statistical ranking for question generation. In HLT-NAACL, 2010. [Kumar et al., 2018] Vishwajeet Kumar, Kireeti Boorla, Yo- gesh Meena, Ganesh Ramakrishnan, and Yuan-Fang Li. Automating reading comprehension by generating ques- tion and answer pairs. In PAKDD, 2018. [Labutov et al., 2015] Igor Labutov, Sumit Basu, and Lucy Vanderwende. Deep questions without deep understand- ing. In ACL, 2015. [Lai et al., 2017] Guokun Lai, Qizhe Xie, Hanxiao Liu, Yiming Yang, and Eduard Hovy. Race: Large-scale reading comprehension dataset from examinations. arXiv preprint arXiv:1704.04683, 2017. [Liao et al., 2018] Yi Liao, Lidong Bing, Piji Li, Shuming Shi, Wai Lam, and Tong Zhang. Quase: Sequence editing under quantifiable guidance. In EMNLP, 2018. [Lindberg et al., 2013] David Lindberg, Fred Popowich, John C. Nesbit, and Philip H. Winne. Generating natural language questions to support learning on-line. In ENLG, 2013. [Luong et al., 2015] Thang Luong, Hieu Pham, and Christo- pher D. Manning. Effective approaches to attention-based neural machine translation. In EMNLP, 2015. [Mazidi and Nielsen, 2014] Karen Mazidi and Rodney D. Nielsen. Linguistic considerations in automatic question generation. In ACL, 2014. [Mostafazadeh et al., 2016] Nasrin Mostafazadeh, Ishan Misra, Jacob Devlin, Margaret Mitchell, Xiaodong He, and Lucy Vanderwende. Generating natural questions about an image. In ACL, 2016. [Rajpurkar et al., 2016] Pranav Rajpurkar, Jian Zhang, Kon- stantin Lopyrev, and Percy S. Liang. Squad: 100, 000+ questions for machine comprehension of text. In EMNLP, 2016. [See et al., 2017] Abigail See, Peter J. Liu, and Christo- pher D. Manning. Get to the point: Summarization with pointer-generator networks. In ACL, 2017. [Seo et al., 2017] Min Joon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. Bidirectional attention flow for machine comprehension. ICLR, 2017. [Serban et al., 2016] Iulian Serban, Alberto Garc´ıa-Dur´an, C¸ aglar Gulc¸ehre, Sungjin Ahn, A. P. Sarath Chandar, Aaron C. Courville, and Yoshua Bengio. Generating fac- toid questions with recurrent neural networks: The 30m factoid question-answer corpus. In ACL, 2016. [Shen et al., 2017] Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi S. Jaakkola. Style transfer from non-parallel text by cross-alignment. In NIPS, pages 6833 -- 6844, 2017. [Song et al., 2018] Linfeng Song, Zhiguo Wang, Wael Leveraging In Hamza, Yue Zhang, and Daniel Gildea. context information for natural question generation. NAACL-HLT, 2018. [Su et al., 2016] Yu Su, Huan Sun, Brian Sadler, Mudhakar Srivatsa, Izzeddin Gur, Zenghui Yan, and Xifeng Yan. On generating characteristic-rich question sets for qa evalua- tion. In EMNLP, 2016. [Sugawara et al., 2017] Saku Sugawara, Yusuke Kido, Hikaru Yokono, and Akiko Aizawa. Evaluation metrics for machine reading comprehension: Prerequisite skills and readability. In ACL, 2017. [Sun et al., 2018] Xingwu Sun, Jing Liu, Yajuan Lyu, Wei He, Yanjun Ma, and Shi Wang. Answer-focused and In EMNLP, position-aware neural question generation. 2018. [Vanderwende, 2007] Lucy Vanderwende. Answering and In AAAI Spring Sym- questioning for machine reading. posium: Machine Reading, 2007. [Wang et al., 2017] Wenhui Wang, Nan Yang, Furu Wei, Baobao Chang, and Ming Zhou. Gated self-matching net- works for reading comprehension and question answering. In ACL, 2017. [Yuan et al., 2017] Xingdi Yuan, Tong Wang, C¸ aglar Gulc¸ehre, Alessandro Sordoni, Philip Bachman, Sandeep Subramanian, Saizheng Zhang, and Adam Trischler. Machine comprehension by text-to-text neural question generation. In Rep4NLP@ACL, 2017. [Zhang et al., 2018] Jiani Zhang, Xingjian Shi, Junyuan Xie, Hao Ma, Irwin King, and Dit-Yan Yeung. Gaan: Gated at- tention networks for learning on large and spatiotemporal graphs. In UAI, 2018. [Zhao et al., 2018] Yao Zhao, Xiaochuan Ni, Yuanyuan Ding, and Qifa Ke. Paragraph-level neural question gen- eration with maxout pointer and gated self-attention net- works. In ENNLP, 2018. [Zhou et al., 2017] Qingyu Zhou, Nan Yang, Furu Wei, Chuanqi Tan, Hangbo Bao, and Ming Zhou. Neural ques- tion generation from text: A preliminary study. In NLPCC, 2017.
1803.04757
1
1803
2018-03-13T12:56:27
Monitoring Targeted Hate in Online Environments
[ "cs.CL" ]
Hateful comments, swearwords and sometimes even death threats are becoming a reality for many people today in online environments. This is especially true for journalists, politicians, artists, and other public figures. This paper describes how hate directed towards individuals can be measured in online environments using a simple dictionary-based approach. We present a case study on Swedish politicians, and use examples from this study to discuss shortcomings of the proposed dictionary-based approach. We also outline possibilities for potential refinements of the proposed approach.
cs.CL
cs
Monitoring Targeted Hate in Online Environments Tim Isbister1, Magnus Sahlgren1, Lisa Kaati1, Milan Obaidi2, Nazar Akrami2 1Swedish Defense Research Agency (FOI), 2Uppsala University 1164 90 Stockholm, Sweden, 2Box 256, 751 05 Uppsala, Sweden {Tim.Isbister, Magnus.Sahlgren, Lisa.Kaati}@foi.se, {Milan.Obaidi, Nazar.Akrami}@psyk.uu.se 8 1 0 2 r a M 3 1 ] L C . s c [ 1 v 7 5 7 4 0 . 3 0 8 1 : v i X r a Hateful comments, swearwords and sometimes even death threats are becoming a reality for many people today in online environments. This is especially true for journalists, politicians, artists, and other public figures. This paper describes how hate directed towards individuals can be measured in online environments using a simple dictionary-based approach. We present a case study on Swedish politicians, and use examples from this study to discuss shortcomings of the proposed dictionary-based approach. We also outline possibilities for potential refinements of the proposed approach. Abstract 1. Introduction Digital environments provide an enormously large and ac- cessible platform for people to express a broad range of be- havior - perhaps even broader than what can be expressed in real world environments, due to the lack of social ac- countability in many digital environments. Hate and prej- udice are examples of such behaviors that are overrepre- sented in digital environments. Hate messages in particular are quite common, and have increased significantly in re- cent years. In fact, many, if not most, digital newspapers have closed down the possibility to comment on articles since the commentary fields have been overflowing with hate messages and racist comments (Gardiner et al., 2016). To many journalists, politicians, artists, and other public figures, hate messages and threats have become a part of daily life. A recent study on Swedish journalists showed that almost 3 out of 4 journalists received threats and in- sulting comments through emails and social media (Nils- son, 2015). Several attempts to automatically detect hate messages in online environments have been made. For example, Warner and Hirschberg (2012) use machine learning cou- pled with template-based features to detect hate speech in user-generated web content with promising results. Wester et al. (2016) examine the effects of various types of linguis- tic features for detecting threats of violence in a corpus of YouTube comments, and find promising results even using simple bag-of-words representations. On the other hand, Ross et al. (2016) examine the reliability of annotations of hate speech, and find that the annotator agreement is very low, indicating that hate speech detection is a very challeng- ing problem. The authors suggest that hate speech should be seen as a continuous rather then as a binary problem, and that detailed instructions for the annotators are needed to improve the reliability of hate speech annotation. Waseem and Hovy (2016) examine the effect of various types of features on hate speech detection, and find that character n-grams and gender information provide the best results. Davidson et al. (2017) argues that lexical methods suffer from low precision and aims to separate hate speech from other instances of offensive language. Their results show that while racist and homophobic content are classified as hate speech, this is not the case for sexist content, which il- lustrates the challenge in separating hate speech from other instances of offensive language. The apparent lack of consensus regarding the difficulty of the hate speech detection problem suggests that the prob- lem of hate speech detection deserves further study. This paper contributes to the discussion in two ways. Firstly, we provide a psychological perspective on the concept of hate. Secondly, we present a study of the advantages and disadvantages of using the arguably simplest possible ap- proach to hate speech detection: that of counting occur- rences of keywords based on dictionaries of terms related to hate speech. The main goal of this paper is to provide a critical discussion about the possibility of monitoring tar- geted hate in online environments. This paper is outlined as follows. Section 2 discusses the psychological aspects of hate and how hate messages can have various level of severity. Section 3 presents a dictionary-based approach to measure hate directed to- wards individuals. Section 4 provides a case study where we analyze hate speech targeted towards 23 Swedish politi- cians on immigration-critical websites, and discuss chal- lenges and directions for future work. Finally, Section 5 provides some concluding remarks. 2. On hate In the psychological literature hate is thought to be a combi- nation to two components: one cognitive and one emotional (Sternberg and Sternberg, 2008). The cognitive component can be threat perceptions caused for example by out-group members, but it can also involve devaluation or a nega- tive view of others. The emotional component on the other hand involves emotions such as contempt, disgust, fear, and anger that are generally evoked by the cognitive compo- nent. Defined in this way, hates shares much with prejudice, which is defined as negative evaluations or devaluations of others based on their group membership. Like hate, prej- udice is argued to be consisting of a cognitive component (stereotypes about others), an emotional component (dis- like of others) and a behavioral component (acting in ac- cordance with the emotional and cognitive component (All- port, 1954)). Hate, like prejudice, functions as the motiva- tional force when people behave in harmful ways toward others. Category Swearword Anger Naughtiness General threat Death threat Sexism Sample terms (ENG) fuck, shit, gay is crazy, idiot, enemy clown, is an idiot, stupid kidnap, be followed, hunt should be killed, ruin, bomb whore, bitch, should be raped Sample terms (SWE) fan, skit, bog ar galen, idiot, fiende clown, ar en idiot, knapp kidnappa, bor forfoljas, jaga borde dodas, utrota, bomba hora, subban, borde valdtas Normalized frequency per category 0.00137 0.00106 0.00076 0.00068 0.00031 0.00005 Table 1: Different categories of hate with representative terms and normalized frequency. Hate is commonly directed toward individuals and groups but it is also expressed toward other targets in the social world. For example, it is common that hate is expressed to- ward concepts (e.g. communism) or countries (e.g. USA). It is important to note however that there is some disagree- ment about not only the definition but also the behavioral outcomes of hate. For example, while some see hate lead- ing to behavioral tendencies such as withdrawal caused by disgust or fear, others see hate as the manifestation of anger or rage, which lead one to approach, or attack, the object of hate (Edward et al., 2005). Dealing with digital environments, the disagreement about behavioral tendencies might seem less relevant. Specifi- cally, withdrawal caused by disgust or fear in the real world is not the same in digital environment where withdrawal would not be necessary - or approach would not be a di- rect threat to wellbeing. Acknowledging the disagreements noted above, we aim to examine hate messages with vari- ous level of severity varying between swearwords directed to individuals to outright death threats. 3. Monitoring hate This work focuses on detecting hate messages and expres- sions directed towards individuals. The messages can have various level of severity with respect to individual integrity and individual differences in perception of threat. More specifically, we examine six different categories: anger, naughtiness, swearwords, general threats, and death threats. While the two categories naughtiness and anger may over- lap in some aspects, they were aimed to capture different expressions and causes of hate speech, with naughtiness in- dicating to the speaker's tendency to misbehave and gen- erally express naughtiness toward others, and anger being an emotional state triggered by something in the surround- ing and leading to the expression of anger (and/or naugh- tiness) towards a person. We also include sexism (degra- dation of women), since it is commonly used for devalua- tive purposes. Each category is represented by a dictionary of terms, as exemplified in Table 1. Our study focuses on Swedish data, but to ease understanding we have translated some of the words to English. Note that the dictionaries may contain both unigrams and multiword expressions. The dictionaries are constructed in a manner similar to Tulkens et al. (2016b; 2016a); human experts (psychologist and computer scientist) manually study a large number of posts from the text domain of interest (see further Section 4.1.) and record significant words and phrases. In order to improve the recall of the dictionaries, a word embedding is then used to suggest other relevant terms to the experts. This is done by simply computing the 15 nearest neighbors in the embedding space to each term in the dictionaries. For each term suggestion, the expert has the choice to either in- clude or reject the term suggestion. We note that it is also possible to cast the term suggestion task as an active learn- ing problem, in which a classifier is iteratively refined to identify useful term suggestions based on the expert's feed- back (Gyllensten and Sahlgren, 2018). As embedding, we use Gensim's ( Rehurek and Sojka, 2010) implementation of the Continuous Bag of Words (CBOW) model (Mikolov et al., 2013), which builds word vectors by training a 2-layer neural network to predict a target word based on a set of context words. The network learns two sets of vectors, one for the target terms (the em- bedding vectors), and one for context terms. The objective of the network is to learn vectors such that their dot product correspond to the log likelihood of observing word pairs in the training data. We use default parameters for the em- beddings, with a window size set to 5. The embeddings are trained on a collection of immigration-critical websites, further discussed in Section 4.1.. Note that the embedding method does not handle multiword units in any special way; if multiword units are to be included in the analysis, they need to be incorporated in the data as a preprocessing step. The expanded dictionaries are used to detect and moni- tor hate by simple frequency counting; if a term from one of the dictionaries occurs in the vicinity of a mention of a target individual, we increment the count for that cate- gory. This is arguably the simplest possible approach to hate speech monitoring, and many types of refinements are possible, such as weighting of the dictionary entries (Eisen- stein, 2017), handling of negation (Reitan et al., 2015), and scope detection. We will return to a more detailed discus- sion of problems with the proposed approach in Section 4.3.. At this point, we note that one possible advantage of using such a simple approach is its transparency; it is easy to understand a simple frequency counter for a non- technical end user. Of course, transparency and comprehensibility are useless if the method generates an excessive amount of false posi- tives. The only way for us to control the precision of the fre- quency counting is to delimit the context within which oc- currences of dictionary terms are counted; a narrow context window spanning something like one to three words around a target individual's name will reduce the probability that a term from one of the dictionaries refers to something other than the target name. In the following case study, we opt for the most conservative approach and use a context of only one term on each side of the target name. Website avpixlat.info nordfront.se nyatider.nu motgift.nu nordiskungdom.com # comments 2 904 933 89 495 2 176 1 380 117 # words 99 472 281 3 125 218 124 949 68 992 6 530 Table 2: The websites included in our study. 4. Case study To exemplify the dictionary-based approach, we have ex- amined the expression of the different categories of hate toward 23 national-level politicians (10 males and 13 fe- males). Studying national-level politicians in Sweden is timely as we are approaching the Swedish parliament elec- tion in September 2018. There have also been recent alarms on politicians threatening to leave politics because of an in- creasing amount of hate being expressed in recent years. Our analyses are based on text from commentary fields on immigration critical websites from September 2014 to De- cember 2017. The time period was chosen to cover a single electoral period in the Swedish parliament. As target names, we use the full names of the politicians. This is obviously a crude simplification that severely af- fects the recall of the approach, since people are often re- ferred to using only their first name, a pronoun, or, in the data we studied, some negative nickname or slur. As an ex- ample, the Swedish prime minister, Stefan Lofven, is often referred to in online discussions as "svetsarn" (the welder), or using negative nicknames such as "Rofven", which is a paraphrase of "roven" (in English "the ass"). 4.1. Data In Sweden, as well as in several other European coun- tries, there has been a recent surge in activity and forma- tion of movements that are critical of immigration. These immigration-critical groups show a high interactivity on so- cial media and on websites. In Sweden, there are several digital immigration-critical milieus with a similar structure: articles published by editorial staff and user-generated com- ments. The commentary fields are not moderated, which makes the comments an important scene to express hate to- ward journalists, politicians, artists, and other public fig- ures. The comment section allows readers to respond to an editorial article instantly. The editorial articles gener- ally focuses on topics such as crimes, migration, politics and societal issues. The websites that we have studied are listed in Table 2. For each website, we have downloaded all comments between 2014/09/01 to 2017/10/01. Note that the embeddings used for term suggestions are also trained on this data. 4.2. Results Table 3 shows the how many times each minister is men- tioned in the comments with his or hers full name dur- ing the given time period. Obviously, the Prime Minister Stefan Lofven is the most frequently mentioned politician, with more than 10,000 mentions during the analyzed pe- riod. The second most mentioned politician in the studies Name Stefan Lofven Morgan Johansson Margot Wallstrom Magdalena Andersson Ylva Johansson Gustav Fridolin Alice Bah Kuhnke Peter Eriksson Peter Hultqvist Isabella Lovin Mikael Damberg Ardalan Shekarabi Asa Regn´er Ann Linde Annika Strandhall Ibrahim Baylan Per Bolund Anna Ekstrom Hel´ene Fritzon Helene Hellmark Knutsson Karolina Skog Sven-Erik Bucht Mentions 10 663 3 142 2 681 1 931 1 524 1 113 567 248 228 184 169 158 136 128 98 61 48 36 36 14 11 8 Table 3: Number of times each Swedish minister is men- tioned in the comments during the time period. data is Morgan Johansson, the Swedish Minister of Justice and Home Affairs, and the third most mentioned minister is Margot Wallstrom, Minister for Foreign Affairs. Figure 1 (next page) shows the amount of hate towards the Swedish ministers. The left figure shows simple frequency counts of hate terms in the immediate vicinity of each tar- get name, while the right figure shows the proportions of targeted hate toward the Swedish ministers, calculated as the frequency of each hate category in the context of each politician, divided by the total number of mentions for that politician. In both figures, it is obvious that naughtiness (in purple) is the most frequent category for the politicians as a group, followed by anger (in red), swearwords (in yellow) and general threat (in gray). We do not see any sexism and no explicit death threats in our data, most likely due to the very narrow context used in these experiments. Figure 1 shows that the most frequently mentioned minis- ters are also those who receive the most hate in the data we have studied. However, when looking at the propor- tions of hateful comments for each minister, we see that the most mentioned politician (Stefan Lofven) is not the minister with the proportionally most hateful comments. This is instead Mikael Damberg, the Minister for Enterprise and Innovation. However, Damberg is only mentioned 169 times in the data, and a mere 1.18% of these contain hate; that is, only 2 mentions of 169. It is a similar situation with Ann Linde, the Minister for EU Affairs and Trade, who has the proportionally most general threats in her mentions, but this is based on only 1 mention out of 128. Isabella Lovin, the Minister for International Development Cooperation, is the target of the proportionally most naughtiness, but also in this case, this is only 1 mention out of 184. Figure 1: Amount of hate contexts for Swedish ministers (using only the preceding and succeeding terms). The left figure shows simple frequency counts of hate terms, while the right figure shows proportions (i.e. counts divided by the total number of mentions). 4.3. Discussion The results in Figure 1 demonstrate that even with such a simple and naıve method as the one used in this paper, it is possible to do a general and rudimentary form of threat assessment based on mentions in social media data. The method is sufficiently simple to be adaptable to many dif- ferent scenarios, and sufficiently transparent for end-users to understand. However, we do pay a price for the simplic- ity. As we noted in the last section, expressions of hate seem to correlate with frequency of mention (at least in the data we have studied). This makes the left part of Figure 1 less inter- esting. On the other hand, counting proportions, as we do in the right part of the figure, risks overestimating the signifi- cance of very rare events. A perhaps more useful measure might be to calculate deviations from the expected amount of hateful comments for each minister. As an example, Morgan Johansson is mentioned 3 142 by his full name in our data. Based on the normalized category frequencies in Table 3, we should expect that 4 of these mentions contain swearwords, 3 contain anger, 2 contain naughtiness, and 2 contain general threat. Looking at the actual frequency counts, we see that 3 mentions contain swearwords, 8 con- tain anger, 14 contain naughtiness, and 5 contain general threat. For the last three categories, the actual counts are much higher than would be expected, indicating that these are significant measurements. Table 4 (next page) shows the deviations from expected counts per category for each minister. The deviation is com- puted as the actual counts minus the expected counts: (cid:18) #(c) T (cid:19) #(m, c) − · #(m) (1) This is a obviously a severely oversimplified probabilistic model, but it does provide useful information. We note that the columns for death threats and sexism only contain nega- tive or zero values, which indicates that no significant death threats or sexism is being expressed towards the ministers in the data. Two ministers have higher general threats than can be expected, and a few more have higher swearwords and anger, but the deviations for these categories in our data are not very large. The highest deviation in our study is the naughtiness category for the prime minister, which in- dicates that he is the subject of a significant amount of neg- ative remarks in the data we have studied. Another poten- tially interesting observandum is the combination of cate- gories that have positive deviations for the different min- isters. To take two examples, Morgan Johansson has pos- itive deviations for anger, naughtiness and general threat, while Ylva Johansson has positive deviations for swear- words, anger and naughtiness. One might hypothesize that the combination of anger and general threat deserves more attention than the combination of swearwords and naughti- ness. The perhaps most obvious drawback of the approach used in this paper is that it will only detect hate in direct rela- tion to a full name, but not in relation to pronouns or slang expressions referring to the person in question; i.e. the ap- proach suffers from a lack of coreference resolution. This will obviously affect the recall of the method, which is a serious shortcoming that risks missing critical mentions. In the present analysis, we have no idea whether the lack of death threats in our results is due to an actual absence of death threats in the data, or whether it is due to omissions in the analysis. where #(m, c) is the actual co-occurrence count of a min- ister and a category, #(c) is the relative frequency of a cat- egory in the data #(c) is the frequency of the category and T is the total number of words in the data), and #(m) is the frequency of mention of a minister. T Although we delimit the context as much as possible to only include the preceding and succeeding terms, our results are still affected by false positives. There are three basic error types for false positives in our analysis. One is negated statements, such as (hate term in boldface): Person Stefan Lofven Morgan Johansson Margot Wallstrom Magdalena Andersson Ylva Johansson Gustav Fridolin Alice Bah Kuhnke Peter Eriksson Peter Hultqvist Isabella Lovin Mikael Damberg Ardalan Shekarabi Asa Regn´er Ann Linde Annika Strandhall Ibrahim Baylan Per Bolund Anna Ekstrom Hel´ene Fritzon Helene Hellmark Knutsson Karolina Skog 0.98 −1.16 1.5 −1.56 2.95 1.51 0.24 0.67 −0.29 −0.24 0.77 −0.21 −0.18 −0.17 −0.13 −0.08 −0.06 −0.05 −0.01 −0.02 −0.01 3.29 2.82 2.32 −1.96 1.43 −0.14 −0.58 0.74 −0.22 −0.18 0.83 −0.16 −0.14 −0.13 −0.1 −0.06 −0.05 −0.04 −0.01 −0.01 −0.01 16.49 2.77 3.12 0.63 1.9 2.2 −0.4 −0.18 −0.15 0.87 −0.12 −0.11 −0.1 −0.09 −0.07 −0.04 −0.03 −0.03 −0.01 −0.01 −0.01 −2.65 2.32 −1.41 −1.03 −0.83 −0.6 −0.3 −0.13 −0.12 −0.1 −0.09 −0.08 −0.07 0.93 −0.05 −0.03 −0.02 −0.02 −0.01 −0.01 −0.01 Swearword Anger Naughtiness General threat Death threat −3.15 −0.93 −0.79 −0.57 −0.46 −0.33 −0.17 −0.08 −0.06 −0.05 −0.05 −0.05 −0.04 −0.04 −0.03 −0.02 −0.01 −0.01 0 0 0 Sexism −0.46 −0.14 −0.12 −0.08 −0.07 −0.05 −0.02 −0.01 −0.01 −0.01 −0.01 −0.01 −0.01 −0.01 0 0 0 0 0 0 0 Table 4: Deviation from expected counts per category for each minister. Positive scores indicate that the actual count is higher than the expected count. jag tror inte Stefan Lovfen ar dum (I don't think Stefan Lovfen is stupid) Handling negations is a well-known issue in both informa- tion retrieval and sentiment analysis, and one could think of several different ways to deal with negations. The per- haps most simple method is to use a skip or flip function that skips a sequence of text when having encountered a negation, or simply flips the sentiment of the negated text (Choi and Cardie, 2009). It is of course also necessary to determine the scope of the negation, which is a non-trivial problem in itself (Lazib et al., 2016). Another error type in our analysis is quotes, such as: vi har varit naiva [sa] Stefan Lofven (we have been naive [said] Stefan Lofven) The "said" is implicit, and is signaled by quotation marks and punctuation in the original data. However, when using aggressive tokenization, such punctuation is normally re- moved, which leads to the above type of errors. Retaining punctuation would obviously be one way to prevent such errors. Another possibility is to use a dependency parse of the data, which would rearrange the context according to the dependency structure. "Naive" would then be closer to "we" than to "Stefan Lofven". A third error type that is related to the previous one is mis- interpreting (or ignoring) the semantic roles of the proposi- tion. Consider the following examples: lat regeringen med Stefan Lovfen hota med nyval (let the government with Stefan Lovfen threaten with new election) vi skiter i om du blir forbannad Stefan Lovfen (we don't care if you get upset Stefan Lovfen) Stefan Lofven is not the target of hate in neither of these cases. Instead, he (or in the first case, he and the Swedish government) is the agent of the predicates "threatened" vs. "upset". In order to resolve agency of the predicates, we would need to do semantic role labeling, which assigns a semantic role to each participant of a proposition. Iden- tifying the agent of the predicate becomes even more im- portant when increasing the context size, since it will also increase the number of false positives when only counting occurrences of hate terms. 5. Conclusion In this paper, we have aimed to measure how online hate is directed toward national-level politicians in Sweden. This is an important and timely endeavor because the expression of online hate is becoming increasingly pervasive in online forums, especially toward this specific group. The expres- sion of hate has shown to have downstream consequences not only for individuals who are targeted, but also for our democratic society and core liberal values. Recent stud- ies show that the frequent exposure to hate speeches does not only lead to increased devaluation and prejudice (So- ral et al., 2017), but may also increase dehumanization of the targeted group (Fasoli et al., 2016). Dehumanization in return makes the targeted groups or individuals seem less than human, legitimizing and increasing the likelihood of violence (Rai et al., 2017). Moreover, online hate does not only play a significant role in shaping people's attitudes and beliefs toward certain groups, but it also have far-reaching consequences for societies in general, such as increasing tendency to violating social norms and threatening demo- cratic core values. As we mentioned in the introduction, many digital newspa- pers in Sweden and other countries have closed down the possibility to comment on articles due to the degree of hate expressed by some users. This is a clear example of how online hate restricts and threatens one of the core values of democracy. That is the freedom to express your views and opinions. To prevent such harmful effects it is impor- tant to monitor and measure how and toward whom hate is expressed online. The second aim of this study was to address some of the gaps in the field. As noted in the introduction, the con- temporary approaches to measuring online hate are marked by the apparent lack of consensus regarding the difficulty of the hate speech detection. The approach for monitor- ing targeted hate that we have described in this work is a simple yet powerful way to understand hate messages di- rected toward individuals. The strength of this method lies in its simplicity and transparency, and perhaps also for hav- ing more conservative criteria that reduces the number of false positives. We have also identified a number of ways to improve the method, including the use of coreference resolution, handling of negation, context refinement using dependency parsing, and agency detection using seman- tic role labeling. The trade-off between complexity and performance, and between recall and precision, are challenging dilemmas for law enforcement and other end users of hate monitoring tools. Acknowledging these dilemmas, future improve- ments of hate monitoring should be directed toward the optimal cut-off where usefulness for law enforcement can meet ease of conduct when it comes to analyzing data. 6. References Allport, G. (1954). The Nature of Prejudice. Reading, MA: Addison-Wesley. Choi, Y. and Cardie, C. (2009). Adapting a polarity lexicon using integer linear programming for domain-specific In Proceedings of EMNLP, sentiment classification. EMNLP '09, pages 590–598, Stroudsburg, PA, USA. Association for Computational Linguistics. Davidson, T., Warmsley, D., Macy, M. W., and Weber, I. (2017). Automated hate speech detection and the problem of offensive language. In Proceedings of the Eleventh International Conference on Web and Social Media, pages 512–515. Edward, B., McCauley, C., and Rosin, P. (2005). From plato to putnam: Four ways to think about hate. in the psychology of hate. pages 3–36. Eisenstein, J. (2017). Unsupervised learning for lexicon- based classification. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, pages 3188– 3194. Fasoli, F., Paladino, M., Carnaghi, A., Jetten, J., Bastian, B., and Bain, P. (2016). Not "just words": Exposure to homophobic epithets leads to dehumanizing and physical distancing from gay men. European Journal of Social Psychology, 46:237–248. Gardiner, B., Mansfield, M., Anderson, I., Holder, J., Louter, D., and Ulmanu, M. (2016). The web we want: The dark side of guardian comments. The Guardian, 12, April. Gyllensten, A. C. and Sahlgren, M. (2018). Distributional term set expansion. In Accepted for publication in the Proceedings of LREC 2018. Lazib, L., Zhao, Y., Qin, B., and Liu, T. (2016). Negation scope detection with recurrent neural networks models in review texts. In Wanxiang Che, et al., editors, Social Computing, pages 494–508, Singapore. Springer Singa- pore. Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S., and Dean, J. (2013). Distributed representations of words and phrases and their compositionality. In Proceedings of NIPS, pages 3111–3119. Nilsson, M. L. (2015). Hot och hat mot svenska journalis- ter. Nordicom-information, 37(3-4):31–56. Rai, T., Valdesolo, P., and Graham, J. (2017). Dehuman- ization increases instrumental violence, but not moral vi- olence. Pnas, 114(32):8511–8516. Rehurek, R. and Sojka, P. (2010). Software Framework for Topic Modelling with Large Corpora. In Proceedings of the LREC 2010 Workshop on New Challenges for NLP Frameworks, pages 45–50, Valletta, Malta, May. ELRA. Reitan, J., Faret, J., Gamback, B., and Bungum, L. (2015). Negation scope detection for twitter sentiment analysis. In Proceedings of the 6th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, pages 99–108, Lisboa, Portugal, September. Ross, B., Rist, M., Carbonell, G., Cabrera, B., Kurowsky, N., and Wojatzki, M. (2016). Measuring the reliabil- ity of hate speech annotations: The case of the euro- pean refugee crisis. In Proceedings of NLP4CMC III. Bochumer Linguistische Arbeitsberichte. Soral, W., Bilewicz, M., and Winiewski, M. (2017). Expo- sure to hate speech increases prejudice through desensi- tization. Aggressive Behaviour. Sternberg, R. and Sternberg, K. (2008). The nature of hate. New York: Cambridge University Press. Tulkens, S., Hilte, L., Lodewyckx, E., Verhoeven, B., and (2016a). The automated detection of Daelemans, W. racist discourse in dutch social media. Computational Linguistics in the Netherlands Journal, 6:3–20, 12/2016. Tulkens, S., Hilte, L., Lodewyckx, E., Verhoeven, B., and Daelemans, W. (2016b). A dictionary-based approach to racism detection in dutch social media. In First Work- shop on Text Analytics for Cybersecurity and Online Safety (TA-COS 2016). Warner, W. and Hirschberg, J. (2012). Detecting hate speech on the world wide web. In Proceedings of the Second Workshop on Language in Social Media, LSM '12, pages 19–26, Stroudsburg, PA, USA. Association for Computational Linguistics. Waseem, Z. and Hovy, D. (2016). Hateful symbols or hate- ful people? predictive features for hate speech detection on twitter. In Proceedings of the Student Research Work- shop, SRW@HLT-NAACL 2016, pages 88–93. Wester, A., Øvrelid, L., Velldal, E., and Hammer, H. L. (2016). Threat detection in online discussions. In Pro- ceedings of the 7th Workshop on Computational Ap- proaches to Subjectivity, Sentiment & Social Media Analysis, pages 66–71, San Diego, USA.
1505.00161
1
1505
2015-05-01T11:43:34
Embedding Semantic Relations into Word Representations
[ "cs.CL" ]
Learning representations for semantic relations is important for various tasks such as analogy detection, relational search, and relation classification. Although there have been several proposals for learning representations for individual words, learning word representations that explicitly capture the semantic relations between words remains under developed. We propose an unsupervised method for learning vector representations for words such that the learnt representations are sensitive to the semantic relations that exist between two words. First, we extract lexical patterns from the co-occurrence contexts of two words in a corpus to represent the semantic relations that exist between those two words. Second, we represent a lexical pattern as the weighted sum of the representations of the words that co-occur with that lexical pattern. Third, we train a binary classifier to detect relationally similar vs. non-similar lexical pattern pairs. The proposed method is unsupervised in the sense that the lexical pattern pairs we use as train data are automatically sampled from a corpus, without requiring any manual intervention. Our proposed method statistically significantly outperforms the current state-of-the-art word representations on three benchmark datasets for proportional analogy detection, demonstrating its ability to accurately capture the semantic relations among words.
cs.CL
cs
Embedding Semantic Relations into Word Representations Danushka Bollegala Takanori Maehara Ken-ichi Kawarabayashi University of Liverpool Shizuoka University National Institute of Informatics JST, ERATO, Kawarabayashi Large Graph Project. 5 1 0 2 y a M 1 ] L C . s c [ 1 v 1 6 1 0 0 . 5 0 5 1 : v i X r a Abstract Learning representations for semantic relations is important for various tasks such as analogy de- tection, relational search, and relation classifica- tion. Although there have been several proposals for learning representations for individual words, learning word representations that explicitly cap- ture the semantic relations between words re- mains under developed. We propose an unsuper- vised method for learning vector representations for words such that the learnt representations are sensitive to the semantic relations that exist be- tween two words. First, we extract lexical patterns from the co-occurrence contexts of two words in a corpus to represent the semantic relations that ex- ist between those two words. Second, we represent a lexical pattern as the weighted sum of the rep- resentations of the words that co-occur with that lexical pattern. Third, we train a binary classifier to detect relationally similar vs. non-similar lexi- cal pattern pairs. The proposed method is unsuper- vised in the sense that the lexical pattern pairs we use as train data are automatically sampled from a corpus, without requiring any manual intervention. Our proposed method statistically significantly out- performs the current state-of-the-art word repre- sentations on three benchmark datasets for propor- tional analogy detection, demonstrating its ability to accurately capture the semantic relations among words. 1 Introduction Representing the semantics of words and relations are funda- mental tasks in Knowledge Representation (KR). Numerous methods for learning distributed word representations have been proposed in the NLP community [Turian et al., 2010; Collobert et al., 2011; Mikolov et al., 2013b; Mikolov et al., 2013a; Pennington et al., 2014]. Distributed word representa- tions have shown to improve performance in a wide-range of tasks such as, machine translation [Cho et al., 2014], seman- tic similarity measurement [Mikolov et al., 2013d; Penning- ton et al., 2014], and word sense disambiguation [Huang et al., 2012]. Despite the impressive performance of representation learning methods for individual words, existing methods use only co-occurrences between words, ignoring the rich se- mantic relational structure. The context in which two words co-occur provides useful insights into the semantic relations that exist between those two words. For example, the sen- tence ostrich is a large bird not only provides the infor- mation that ostrich and bird are co-occurring, but also de- scribes how they are related via the lexical pattern X is a large Y, where slot variables X and Y correspond to the two words between which the relation holds. If we can somehow embed the information about the semantic rela- tions R that are associated with a particular word w into the representation of w, then we can construct richer seman- tic representation than the pure co-occurrence-based word representations. Although the word representations learnt by co-occurrence prediction methods [Mikolov et al., 2013d; Pennington et al., 2014] have implicitly captured a certain degree of relational structure, it remains unknown how to ex- plicitly embed the information about semantic relations into word representations. We propose a method for learning word representations that explicitly encode the information about the semantic re- lations that exist between words. Given a large corpus, we extract lexical patterns that correspond to numerous seman- tic relations that exist between word-pairs (xi, xj). Next, we represent each word xi in the vocabulary by a d-dimensional vector xi ∈ Rd. Word representations can be initialized ei- ther randomly or by using pre-trained word representations. Next, we represent a pattern p by the weighted average of the vector differences (xi − xj) corresponding to word- pairs (xi, xj) that co-occur with p in the corpus. This en- ables us to represent a pattern p by a d-dimensional vector p ∈ Rd in the same embedding space as the words. Using vector difference between word representations to represent semantic relations is motivated by the observations in prior work on word representation learning [Mikolov et al., 2013d; Pennington et al., 2014] where, for example, the difference of vectors representing king and queen has shown to be similar to the difference of vectors representing man and woman. We model the problem of embedding semantic relations into word representations as an analogy prediction task where, given two lexical patterns, we train a binary classifier that predicts whether they are relationally similar. Our pro- posed method is unsupervised in the sense that both positive and negative training instances that we use for training are automatically selected from a corpus, without requiring any manual intervention. Specifically, pairs of lexical patterns that co-occur with the same set of word-pairs are selected as pos- itive training instances, whereas negative training instances are randomly sampled from pairs of patterns with low rela- tional similarities. Our proposed method alternates between two steps (Algorithm 1). In the first step, we construct pat- tern representations from current word representations. In the second step, we predict whether a given pair of patterns is re- lationally similar using the computed representations of pat- terns in the previous step. We update the word representations such that the prediction loss is minimized. Direct evaluation of word representations is difficult be- cause there is no agreed gold standard for semantic represen- tation of words. Following prior work on representation learn- ing, we evaluate the proposed method using the learnt word representations in an analogy detection task. For example, de- noting the word representation for a word w by v(w), the vector v(king)− v(man) + v(woman) is required to be sim- ilar to v(queen), than all the other words in the vocabulary. Similarity between two vectors is computed by the cosine of the angle between the corresponding vectors. The accuracy obtained in the analogy detection task with a particular word representation method is considered as a measure of its ac- curacy. In our evaluations, we use three previously proposed benchmark datasets for word analogy detection: SAT anal- ogy dataset [Turney, 2005], Google analogy dataset [Mikolov et al., 2013c], and SemEval analogy dataset [Jurgens et al., 2012]. The word representations produced by our proposed method statistically significantly outperform the current state- of-the-art word representation learning methods on all three benchmark datasets in an analogy detection task, demonstrat- ing the accuracy of the proposed method for embedding se- mantic relations in word representations. 2 Related Work Representing words using vectors (or tensors in general) is an essential task in text processing. For example, in distri- butional semantics [Baroni and Lenci, 2010], a word x is represented by a vector that contains other words that co- occur with x in a corpus. Numerous methods for selecting co- occurrence contexts (e.g. proximity-based windows, depen- dency relations), and word association measures (e.g. point- wise mutual information (PMI), log-likelihood ratio (LLR), local mutual information (LLR)) have been proposed [Tur- ney and Pantel, 2010]. Despite the successful applications of co-occurrence counting-based distributional word representa- tions, their high dimensionality and sparsity is often problem- atic when applied in NLP tasks. Consequently, further post- processing such as dimensionality reduction, and feature se- lection is often required when using distributional word rep- resentations. On the other hand, distributed word representation learn- ing methods model words as d-dimensional real vectors and learn those vector representations by applying them to solve an auxiliary task such as language modeling. The dimen- sionality d is fixed for all the words in the vocabulary and, unlike distributional word representations, is much smaller (e.g. d ∈ [10, 1000] in practice) compared to the vocabulary size. A pioneering work on word representation learning is the neural network language model (NNLMs) [Bengio et al., 2003], where word representations are learnt such that we can accurately predict the next word in a sentence using the word representations for the previous words. Using backpropaga- tion, word vectors are updated such that the prediction error is minimized. Although NNLMs learn word representations as a by- product, the main focus on language modeling is to predict the next word in a sentence given the previous words, and not on learning word representations that capture word se- mantics. Moreover, training multi-layer neural networks with large text corpora is often time consuming. To overcome those limitations, methods that specifically focus on learn- ing word representations that capture word semantics us- ing large text corpora have been proposed. Instead of using only the previous words in a sentence as in language mod- eling, these methods use all the words in a contextual win- dow for the prediction task [Collobert et al., 2011]. Meth- ods that use one or no hidden layers are proposed to im- prove the scalability of the learning algorithms. For exam- ple, the skip-gram model [Mikolov et al., 2013c] predicts the words c that appear in the local context of a word x, whereas the continuous bag-of-words model (CBOW) pre- dicts a word x conditioned on all the words c that appear in x’s local context [Mikolov et al., 2013a]. However, meth- ods that use global co-occurrences in the entire corpus to learn word representations have shown to outperform meth- ods that use only local co-occurrences [Huang et al., 2012; Pennington et al., 2014]. Word representations learnt us- ing above-mentioned representation learning methods have shown superior performance over word representations con- structed using the traditional counting-based methods [Baroni et al., 2014]. Word representations can be further classified depending on whether they are task-specific or task-independent. For ex- ample, methods for learning word representations for specific tasks such as sentiment classification [Socher et al., 2011], and semantic composition [Hashimoto et al., 2014] have been proposed. These methods use label data for the target task to train supervised models, and learn word representations that optimize the performance on this target task. Whether the meaning of a word is task-specific or task-independent re- mains an interesting open question. Our proposal can be seen as a third alternative in the sense that we use task-independent pre-trained word representations as the input, and embed the knowledge related to the semantic relations into the word rep- resentations. However, unlike the existing task-specific word representation learning methods, we do not require manually labeled data for the target task (i.e. analogy detection). 3 Learning Word Representations The local context in which two words co-occur provides use- ful information regarding the semantic relations that exist be- tween those two words. For example, from the sentence Os- trich is a large bird that primarily lives in Africa, we can infer that the semantic relation IS-A-LARGE exists between ostrich and bird. Prior work on relational similarity measure- ment have successfully used such lexical patterns as features to represent the semantic relations that exist between two words [Duc et al., 2010; Duc et al., 2011]. According to the relational duality hypothesis [Bollegala et al., 2010], a se- mantic relation R can be expressed either extensionally by enumerating word-pairs for which R holds, or intensionally by stating lexico-syntactic patterns that define the properties of R. Following these prior work, we extract lexical patterns from the co-occurring contexts of two words to represent the semantic relations between those two words. Specifically, we extract unigrams and bigrams of tokens as patterns from the midfix (i.e. the sequence of tokens that appear in between the given two words in a context) [Bollegala et al., 2007b; Bollegala et al., 2007a]. Although we use lexical patterns as features for representing semantic relations in this work, our proposed method is not limited to lexical patterns, and can be used in principle with any type of features that represent rela- tions. The strength of association between a word pair (u, v) and a pattern p is measured using the positive pointwise mu- tual information (PPMI), f (p, u, v), which is defined as fol- lows, (cid:18) g(p, u, v)g(∗,∗,∗) g(p,∗,∗)g(∗, u, v) (cid:19) f (p, u, v) = max(0, log ). (1) Here, g(p, u, v) denotes the number of co-occurrences be- tween p and (u, v), and ∗ denotes the summation taken over all words (or patterns) corresponding to the slot variable. We represent a pattern p by the set R(p) of word-pairs (u, v) for which f (p, u, v) > 0. Formally, we define R(p) and its norm R(p) as follows, We represent a word x using a vector x ∈ Rd. The dimen- sionality of the representation, d, is a hyperparameter of the proposed method. Prior work on word representation learn- ing have observed that the difference between the vectors that represent two words closely approximates the semantic re- lations that exist between those two words. For example, the vector v(king)−v(queen) has shown to be similar to the vec- tor v(man) − v(woman). We use this property to represent a pattern p by a vector p ∈ Rd as the weighted sum of dif- ferences between the two words in all word-pairs (u, v) that co-occur with p as follows, p = 1 R(p) (u,v)∈R(p) f (p, u, v)(u − v). (4) (cid:88) For example, consider Fig. 1, where the two word-pairs (lion, cat), and (ostrich, bird) co-occur respectively with the two lexical patterns, p1 = large Ys such as Xs, and p2 = X is a huge Y. Assuming that there are no other co- occurrences between word-pairs and patterns in the corpus, R(p) = {(u, v)f (p, u, v) > 0} R(p) = f (p, u, v) (cid:88) (u,v)∈R(p) (2) (3) Figure 1: Computing the similarity between two patterns. the representations of the patterns p1 and p2 are given respec- tively by p1 = x1 − x2, and p2 = x3 − x4. We measure the relational similarity between (x1, x2) and (x3, x4) using the inner-product p1(cid:62)p2. We model the problem of learning word representations as a binary classification task, where we learn representations for words such that they can be used to accurately predict whether a given pair of patterns are relationally similar. In our previous example, we would learn representations for the four words lion, cat, ostrich, and bird such that the similarity between the two patterns large Ys such as Xs, and X is a huge Y is maximized. Later in Section 3.1, we propose an unsuper- vised method for selecting relationally similar (positive) and dissimilar (negative) pairs of patterns as training instances to train a binary classifier. Let us denote the target label for two patterns p1, p2 by t(p1, p2) ∈ {1, 0}, where the value 1 indicates that p1 and p2 are relationally similar, and 0 otherwise. We compute the prediction loss for a pair of patterns (p1, p2) as the squared loss between the target and the predicted labels as follows, L(t(p1, p2), p1, p2) = (t(p1, p2) − σ(p1(cid:62)p2)) 2 . (5) 1 2 Different non-linear functions can be used as the prediction function σ(·) such as the logistic-sigmoid, hyperbolic tan- gent, or rectified linear units. In our preliminary experiments we found hyperbolic tangent, tanh, given by σ(θ) = tanh(θ) = exp(θ) − exp(−θ) exp(θ) + exp(−θ) (6) to work particularly well among those different non- linearities. To derive the update rule for word representations, let us consider the derivative of the loss w.r.t. the word representa- tion x of a word x, ∂L ∂x ∂p1 ∂x ∂p2 ∂x (7) + ∂L ∂p2 = ∂L ∂p1 , where the partial derivative of the loss w.r.t. pattern represen- x1x2p11x3x4p2lioncatostrichbirdlarge Ys such as XsX is a huge Yf(p1, x1, x2)(p1>p2)-f(p1, x1, x2)f(p2, x3, x4)-f(p2, x3, x4) tations are given by, = σ (cid:62) (cid:48) (p1 p2)(σ(p1 = σ (cid:62) (cid:48) (p1 p2)(σ(p1 (cid:62) p2) − t(p1, p2))p2, p2) − t(p1, p2))p1. (cid:62) ∂L ∂p1 ∂L ∂p2 (8) (9) Here, σ(cid:48) denotes the first derivative of tanh, which is given by 1− σ(θ)2. To simplify the notation we drop the arguments of the loss function. From Eq. 4 we get, 1 R(p1) (h(p1, u = x, v) − h(p1, u, v = x)) , R(p2) (h(p2, u = x, v) − h(p2, u, v = x)) , 1 (10) (11) = = ∂p1 ∂x ∂p2 ∂x where, h(p, u = x, v) = and h(p, u, v = x) = (cid:88) (cid:88) (x,v)∈{(u,v)(u,v)∈R(p),u=x} f (p, x, v), f (p, u, x). (u,x)∈{(u,v)(u,v)∈R(p),v=x} Substituting the partial derivatives given by Eqs. 8-11 in Eq. 7 we get, ∂L ∂x = λ(p1, p2)[H(p1, x) +H(p2, x) (cid:88) (cid:88) (u,v)∈R(p2) f (p2, u, v)(u − v) f (p1, u, v)(u − v)], where λ(p1, p2) is defined as (u,v)∈R(p1) λ(p1, p2) = σ(cid:48)(p1 (cid:62)p2)(t(p1, p2) − σ(p1 R(p1)R(p2) (cid:62)p2)) , and H(p, x) is defined as H(p, x) = h(p, u = x, v) − h(p, u, v = x). (12) (13) (14) 1 , p(i) 1 , p(i) 2 )}N 2 , t(p(i) We use stochastic gradient decent (SGD) with learning rate adapted by AdaGrad [Duchi et al., 2011] to update the word representations. The pseudo code for the proposed method is shown in Algorithm 1. Given a set of N relationally similar and dissimilar pattern-pairs, {(p(i) i=1, Al- gorithm 1 initializes each word xj in the vocabulary with a vector xj ∈ Rd. The initialization can be conducted either using randomly sampled vectors from a zero mean and unit variance Gaussian distribution, or by pre-trained word rep- resentations. In our preliminary experiments, we found that the word vectors learnt by GloVe [Pennington et al., 2014] to perform consistently well over random vectors when used as the initial word representations in the proposed method. Because word vectors trained using existing word representa- tions already demonstrate a certain degree of relational struc- ture with respect to proportional analogies, we believe that initializing using pre-trained word vectors assists the subse- quent optimization process. Algorithm 1 Learning word representations. Input: Training pattern-pairs {(p(i) 1 , p(i) 2 )}N i=1, dimensionality d of the word representations, and the maximum number of iterations T . Output: Representation xj ∈ Rd, of a word xj for j = 2 , t(p(i) 1 , p(i) 1, . . . , M, where M is the vocabulary size. j=1. (cid:80) (u,v)∈R(pk) f (pk, u, v)(u − v) R(pk) pk = 1 for k = 1 to K do end for for i = 1 to N do 1: Initialize word vectors {xj}M 2: for t = 1 to T do 3: 4: 5: 6: 7: 8: 9: 10: 11: end for 12: return {xj}M for j = 1 to M do xj = xj − α(t) end for end for ∂L ∂xj j=1. j During each iteration, Algorithm 1 alternates between two steps. First, in Lines 3-5, it computes pattern representations using Eq. 4 from the current word representations for all the patterns (K in total) in the training dataset. Second, in Lines 6-10, for each train pattern-pair we compute the derivative of the loss according to Eq. 12, and update the word represen- tations. These two steps are repeated for T iterations, after which the final set of word representations are returned. The computational complexity of Algorithm 1 is Ø(T Kd+ T N M d), where d is the dimensionality of the word represen- tations. Naively iterating over N training instances and M words in the vocabulary can be prohibitively expensive for large training datasets and vocabularies. However, in practice we can efficiently compute the updates using two tricks: de- layed updates and indexing. Once we have computed the pat- tern representations for all K patterns in the first iteration, we can postpone the update of a representation for a pattern until that pattern next appears in a training instance. This reduces the number of patterns that are updated in each iteration to a maximum of 2 instead of K for the iterations t > 1. Be- cause of the sparseness in co-occurrences, only a handful (ca. 100) of patterns co-occur with any given word-pair. There- fore, by pre-compiling an index from a pattern to the words with which that pattern co-occurs, we can limit the update of word representations in Line 8 to a much smaller number than M. Moreover, the vector subtraction can be parallized across the dimensions. Although the loss function defined by Eq. 5 is non-convex w.r.t. to word representations, in practice, Algorithm 1 converges after a few (less than 5) iterations. In practice, it requires less than an hour to train from a 2 bil- lion word corpus where we have N = 100, 000, T = 10, K = 10, 000 and M = 210, 914. Lexical patterns contain sequences of multiple words. Therefore, exact occurrences of lexical patterns are rare com- pared to that of individual words even in large corpora. Di- rectly learning representations for lexical patterns using their co-occurrence statistics leads to data sparseness issues, which becomes problematic when applying existing methods pro- posed for learning representations for single words to learn representations for lexical patterns that consist of multiple words. The proposal made in Eq. 4 to compute representa- tions for patterns circumvent this data sparseness issue by in- directly modeling patterns through word representations. 3.1 Selecting Similar/Dissimilar Pattern-Pairs We use the ukWaC corpus1 to extract relationally similar (positive) and dissimilar (negative) pairs of patterns (pi, pj) to train the proposed method. The ukWaC is a 2 billion word corpus constructed from the Web limiting the crawl to the .uk domain. We select word-pairs that co-occur at least in 50 sen- tences within a co-occurrence window of 5 tokens. Moreover, using a stop word list, we ignore word-pairs that purely con- sists of stop words. We obtain 210, 914 word-pairs from this step. Next, we extract lexical patterns for those word-pairs by replacing the first and second word in a word-pair respec- tively by slot variables X and Y in a co-occurrence window of length 5 tokens to extract numerous lexical patterns. We select the top occurring 10, 000 lexical patterns (i.e. K = 10, 000) for further processing. We represent a pattern p by a vector where the elements correspond to the PPMI values f (p, u, v) between p and all the word-pairs (u, v) that co-occur with p. Next, we com- pute the cosine similarity between all pairwise combinations of the 10, 000 patterns, and rank the pattern pairs in the de- scending order of their cosine similarities. We select the top ranked 50, 000 pattern-pairs as positive training instances. We select 50, 000 pattern-pairs from the bottom of the list which have non-zero similarity scores as negative training instances. The reason for not selecting pattern-pairs with zero similar- ity scores is that such patterns do not share any word-pairs in common, and are not informative as training data for updat- ing word representations. Thus, the total number of training instances we select is N = 50, 000 + 50, 000 = 100, 000. 4 Evaluating Word Representations using Proportional Analogies To evaluate the ability of the proposed method to learn word representations that embed information related to semantic relations, we apply it to detect proportional analogies. For example, consider the proportional analogy, man:woman :: king:queen. Given, the first three words, a word represen- tation learning method is required to find the fourth word from the vocabulary that maximizes the relational similar- ity between the two word-pairs in the analogy. Three bench- mark datasets have been popularly used in prior work for evaluating analogies: Google dataset [Mikolov et al., 2013c] (10, 675 syntactic analogies and 8869 semantic analogies), SemEval dataset [Jurgens et al., 2012] (79 questions), and SAT dataset [Turney, 2006] (374 questions). For the Google dataset, the set of candidates for the fourth word consists of all the words in the vocabulary. For the SemEval and SAT datasets, each question word-pair is assigned with a limited number of candidate word-pairs out of which only one is cor- rect. The accuracy of a word representation is evaluated by 1http://wacky.sslmit.unibo.it Table 1: Word analogy results on benchmark datasets. Method ivLBL CosAdd ivLBL CosMult ivLBL PairDiff skip-gram CosAdd skip-gram CosMult skip-gram PairDiff CBOW CosAdd CBOW CosMult CBOW PairDiff GloVe CosAdd GloVe CosMult GloVe PairDiff Prop CosAdd Prop CosMult Prop PairDiff sem. 63.60 65.20 52.60 31.89 33.98 7.20 39.75 38.97 5.76 86.67 86.84 45.93 86.70 86.91 41.85 synt. 61.80 63.00 48.50 67.67 69.62 19.73 70.11 70.39 13.43 82.81 84.80 41.23 85.35 87.04 42.86 total 62.60 64.00 50.30 51.43 53.45 14.05 56.33 56.13 9.95 84.56 85.72 43.36 85.97 86.98 42.40 SAT 20.85 19.78 22.45 29.67 28.87 35.29 29.41 28.34 33.16 27.00 25.66 44.65 29.41 28.87 45.99 SemEval 34.63 33.42 36.94 40.89 38.54 43.99 40.31 38.19 42.89 40.11 37.56 44.67 41.86 39.67 44.88 the percentage of the correctly answered analogy questions out of all the questions in a dataset. We do not skip any ques- tions in our evaluations. Given a proportional analogy a : b :: c : d, we use the following measures proposed in prior work for measuring the relational similarity between (a, b) and (c, d). CosAdd proposed by Mikolov et al. [2013d] ranks candi- dates c according to the formula CosAdd(a : b, c : d) = cos(b − a + c, d), (15) and selects the top-ranked candidate as the correct an- swer. CosMult: CosAdd measure can be decomposed into the summation of three cosine similarities, where in practice one of the three terms often dominates the sum. To over- come this bias in CosAdd, Levy and Goldberg [2014] proposed the CosMult measure given by, cos(b, d) cos(c, d) cos(a, d) +  CosMult(a : b, c : d) = (16) We convert all cosine values x ∈ [−1, 1] to positive val- ues using the transformation (x+1)/2. Here,  is a small constant value to prevent denominator becoming zero, and is set to 10−5 in the experiments. . PairDiff measures the cosine similarity between the two vectors that correspond to the difference of the word representations of the two words in each word-pair. It follows from our hypothesis that the semantic relation between two words can be represented by the vector dif- ference of their word representations. PairDiff has been used by Mikolov et al. [2013d] for detecting semantic analogies and is given by, PairDiff(a : b, c : d) = cos(b − a, d − c). (17) 5 Experiments and Results In Table 1, we compare the proposed method against pre- viously proposed word representation learning methods: ivLBL [Mnih and Kavukcuoglu, 2013], skip-gram [Mikolov et al., 2013c], CBOW [Mikolov et al., 2013a], and Figure 2: Accuracy on Google dataset when the proposed method is trained using 10k and 100k instances. GloVe [Pennington et al., 2014]. All methods compared in Table 1 are trained on the same ukWaC corpus of 2B tokens to produce 300 dimensional word vectors. We use the pub- licly available implementations2,3 by the original authors for training the word representations using the recommended pa- rameter values. Therefore, any differences in performances reported in Table 1 can be directly attributable to the differ- ences in the respective word representation learning methods. In all of our experiments, the proposed method converged with less than 5 iterations. From Table 1 we see that the proposed method (denoted by Prop) achieves the best results for the semantic (sem), syn- tactic (synt) and their union (total) analogy questions in the Google dataset using CosMult measure. For analogy ques- tions in SAT and SemEval datasets the best performance is reported by the proposed method using the PairDiff measure. The PairDiff measure computes the cosine similarity between the two difference vectors b − a and d − c, ignoring the spatial distances between the individual words as opposed to CosAdd or CosMult. Recall that in the Google dataset we are required to find analogies from a large open vocabulary whereas in SAT and SemEval datasets the set of candidates is limited to a closed pre-defined set. Relying on direction alone, while ignoring spatial distance is problematic when considering the entire vocabulary as candidates because, we are likely to find candidates d that have the same relation to c as reflected by a − b. For example, given the analogy man:woman::king:?, we are likely to recover feminine en- tities, but not necessarily royal ones using PairDiff. On the other hand, in both SemEval and SAT datasets, the set of can- didate answers already contains the related candidates, leav- ing mainly the direction to be decided. For the remainder of the experiments described in the paper, we use CosMult for evaluations on the Google dataset, whereas PairDiff is used for the SAT and SemEval datasets. Results reported in Table 1 reveal that according to the binomial exact test with 95% con- 2https://code.google.com/p/word2vec/ 3http://nlp.stanford.edu/projects/glove/ Figure 3: Accuracy of the proposed method on benchmark datasets for dimensionalities of the word representations. fidence the proposed method statistically significantly outper- forms GloVe, the current state-of-the-art word representation learning method, on all three benchmark datasets. To study the effect of the train dataset size on the perfor- mance of the proposed method, following the procedure de- scribed in Section 3.1, we sample two balanced datasets con- taining respectively 10, 000 and 100, 000 instances. Figure 2 shows the performance reported by the proposed method on the Google dataset. We see that the overall performance in- creases with the dataset size, and the gain is more for syntac- tic analogies. This result can be explained considering that se- mantic relations are more rare compared to syntactic relations in the ukWaC corpus, a generic web crawl, used in our exper- iments. However, the proposed train data selection method provides us with a potentially unlimited source of positive and negative training instances which we can use to further improve the performance. To study the effect of the dimensionality d of the represen- tation on the performance of the proposed method, we hold the train data size fixed and produce word representations for different dimensionalities. As shown in Figure 3, the perfor- mance increases until around 600 dimensions on the Google, and the SAT datasets after which it stabilizes. The perfor- mance on the SemEval dataset remains relatively unaffected by the dimensionality of the representation. 6 Conclusions We proposed a method to learn word representations that embeds information related to semantic relations between words. A two step algorithm that alternates between pat- tern and word representations was proposed. The proposed method significantly outperforms the current state-of-the-art word representation learning methods on three datasets con- taining proportional analogies. Semantic relations that can be encoded as attributes in words are only a fraction of all types of semantic relations. Whether we can accurately embed semantic relations that in- volve multiple entities, or semantic relations that are only ex- trinsically and implicitly represented remains unknown. We semanticsyntactictotal82838485868788Accuracy10k100k1002003004005006007008009001000Dimensionality354045505560657075AccuracysemanticsyntactictotalSATSemEval plan to explore these possibilities in our future work. References [Baroni and Lenci, 2010] Marco Baroni and Alessandro Lenci. Distributional memory: A general framework for corpus-based semantics. Computational Linguistics, 36(4):673 – 721, 2010. [Baroni et al., 2014] Marco Baroni, Georgiana Dinu, and Germ´an Kruszewski. Don’t count, predict! a systematic comparison of context-counting vs. context-predicting se- mantic vectors. In ACL’14, pages 238–247, 2014. [Bengio et al., 2003] Yoshua Bengio, R´ejean Ducharme, Pascal Vincent, and Christian Jauvin. A neural proba- bilistic language model. Journal of Machine Learning Re- search, 3:1137 – 1155, 2003. [Bollegala et al., 2007a] D. Bollegala, Y. Matsuo, and M. Ishizuka. An integrated approach to measuring semantic similarity between words using information In Proceedings of NAACL HLT, available on the web. pages 340–347, 2007. [Bollegala et al., 2007b] Danushka Bollegala, Yutaka Mat- suo, and Mitsuru Ishizuka. Websim: A web-based seman- tic similarity measure. In Proc. of 21st Annual Conference of the Japanese Society of Artitificial Intelligence, pages 757 – 766, 2007. [Bollegala et al., 2010] Danushka Bollegala, Yutaka Matsuo, and Mitsuru Ishizuka. Relational duality: Unsupervised extraction of semantic relations between entities on the web. In WWW 2010, pages 151 – 160, 2010. [Cho et al., 2014] Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ger Schwenk, and Yoshua Bengio. Learning phrase rep- resentations using rnn encoder–decoder for statistical ma- chine translation. In EMNP’14, pages 1724–1734, 2014. Jason Weston, Leon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel Kuska. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 12:2493 – 2537, 2011. [Collobert et al., 2011] Ronan Collobert, [Duc et al., 2010] Nguyen Tuan Duc, Danushka Bollegala, and Mitsuru Ishizuka. Using relational similarity between word pairs for latent relational search on the web. In IEEE/WIC/ACM International Conference on Web Intelli- gence and Intelligent Agent Technology, pages 196 – 199, 2010. [Duc et al., 2011] Nguyen Tuan Duc, Danushka Bollegala, and Mitsuru Ishizuka. Cross-language latent relational In Proc. search: Mapping knowledge across languages. of the Twenty-Fifth AAAI Conference on Artificial Intelli- gence, pages 1237 – 1242, 2011. [Duchi et al., 2011] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12:2121 – 2159, July 2011. [Hashimoto et al., 2014] Kazuma Hashimoto, Pontus Stene- torp, Makoto Miwa, and Yoshimasa Tsuruoka. Jointly learning word representations and composition functions using predicate-argument structures. In EMNLP’14, pages 1544–1555, 2014. [Huang et al., 2012] Eric H. Huang, Richard Socher, Christopher D. Manning, and Andrew Y. Ng. Improving word representations via global context and multiple word prototypes. In ACL’12, pages 873 – 882, 2012. [Jurgens et al., 2012] David A. Jurgens, Saif Mohammad, Peter D. Turney, and Keith J. Holyoak. Measuring degrees of relational similarity. In SemEval’12, 2012. [Levy and Goldberg, 2014] Omer Levy and Yoav Goldberg. Linguistic regularities in sparse and explicit word repre- sentations. In CoNLL, 2014. [Mikolov et al., 2013a] Tomas Mikolov, Kai Chen, and Jef- frey Dean. Efficient estimation of word representation in vector space. CoRR, 2013. [Mikolov et al., 2013b] Tomas Mikolov, Quoc V. Le, and Ilya Sutskever. Exploiting similarities among languages for machine translation. arXiv, 2013. [Mikolov et al., 2013c] Tomas Mikolov, Ilya Sutskever, Kai Chen, Gregory S. Corrado, and Jeffrey Dean. Distributed representations of words and phrases and their composi- tionality. In NIPS, pages 3111 – 3119, 2013. [Mikolov et al., 2013d] Tomas Mikolov, Wen tau Yih, and Geoffrey Zweig. Linguistic regularities in continous space In NAACL’13, pages 746 – 751, word representations. 2013. [Mnih and Kavukcuoglu, 2013] Andriy Mnih and Koray Kavukcuoglu. Learning word embeddings efficiently with noise-contrastive estimation. In NIPS, 2013. [Pennington et al., 2014] Jeffery Richard Socher, and Christopher D. Manning. Glove: global vectors for word representation. In EMNLP, 2014. Pennington, [Socher et al., 2011] Richard Socher, Jeffrey Pennington, Eric H. Huang, Andrew Y. Ng, and Christopher D. Man- ning. Semi-supervised recursive autoencoders for predict- In EMNLP’11, pages 151– ing sentiment distributions. 161, 2011. [Turian et al., 2010] Joseph Turian, Lev Ratinov, and Yoshua Bengio. Word representations: A simple and general method for semi-supervised learning. In ACL, pages 384 – 394, 2010. [Turney and Pantel, 2010] Peter D. Turney and Patrick Pan- tel. From frequency to meaning: Vector space models of Journal of Aritificial Intelligence Research, semantics. 37:141 – 188, 2010. [Turney, 2005] P.D. Turney. Measuring semantic similarity by latent relational analysis. In Proc. of IJCAI’05, pages 1136–1141, 2005. [Turney, 2006] P.D. Turney. Similarity of semantic relations. Computational Linguistics, 32(3):379–416, 2006.
1612.02706
2
1612
2017-07-21T16:03:13
Entity Identification as Multitasking
[ "cs.CL" ]
Standard approaches in entity identification hard-code boundary detection and type prediction into labels (e.g., John/B-PER Smith/I-PER) and then perform Viterbi. This has two disadvantages: 1. the runtime complexity grows quadratically in the number of types, and 2. there is no natural segment-level representation. In this paper, we propose a novel neural architecture that addresses these disadvantages. We frame the problem as multitasking, separating boundary detection and type prediction but optimizing them jointly. Despite its simplicity, this architecture performs competitively with fully structured models such as BiLSTM-CRFs while scaling linearly in the number of types. Furthermore, by construction, the model induces type-disambiguating embeddings of predicted mentions.
cs.CL
cs
Entity Identification as Multitasking∗ Karl Stratos Toyota Technological Institute at Chicago [email protected] 7 1 0 2 l u J 1 2 ] L C . s c [ 2 v 6 0 7 2 0 . 2 1 6 1 : v i X r a Abstract Standard approaches in entity identifica- tion hard-code boundary detection and type prediction into labels and perform Viterbi. This has two disadvantages: 1. the runtime complexity grows quadratically in the number of types, and 2. there is no nat- ural segment-level representation. In this paper, we propose a neural architecture that addresses these disadvantages. We frame the problem as multitasking, sep- arating boundary detection and type pre- diction but optimizing them jointly. De- spite its simplicity, this architecture per- forms competitively with fully structured models such as BiLSTM-CRFs while scal- ing linearly in the number of types. Fur- thermore, by construction, the model in- duces type-disambiguating embeddings of predicted mentions. in the number of types (assuming exact decoding with first-order label dependency). We empha- size that the asymptotic runtime remains quadratic even if we heuristically prune previous labels based on the BIO scheme. This is not an issue when the number of types is small but quickly be- comes problematic as the number grows. Second, there is no segment-level prediction: every predic- tion happens at the word-level. As a consequence, models do not induce representations correspond- ing to multi-word mentions, which can be useful for downstream tasks such as named-entity disam- biguation (NED). In this paper, we propose a neural architecture that addresses these disadvantages. Given a sen- tence, the model uses bidirectional LSTMs (BiL- STMs) to induce features and separately predicts: 1. Boundaries of mentions in the sentence. 2. Entity types of the boundaries. 1 Introduction A popular convention in segmentation tasks such as named-entity recognition (NER) and chunk- ing is the so-called "BIO"-label scheme. It hard-codes boundary detection and type predic- tion into labels using the indicators "B" (Begin- ning), "I" (Inside), and "O" (Outside). For in- stance, the sentence Where is John Smith is tagged as Where/O is/O John/B-PER Smith/I-PER. In this way, we can treat the problem as sequence labeling and apply standard structured models such as CRFs. But this approach has certain disadvantages. First, the runtime complexity grows quadratically ∗Part of the work was done while the author was at Bloomberg L. P. Crucially, during training, the errors of these two predictions are minimized jointly. One might suspect that the separation could de- grade performance; neither prediction accounts for the correlation between entity types. But we find that this is not the case due to joint op- timization. In fact, our model performs com- petitively with fully structured models such as BiLSTM-CRFs (Lample et al., 2016), implying that the model is able to capture the entity cor- relation indirectly by multitasking. On the other hand, the model scales linearly in the number of types and induces segment-level embeddings of predicted mentions that are type-disambiguating by construction. 2 Related Work Our work is directly inspired by Lample et al. (2016) who demonstrate that a simple neural architecture based on BiLSTMs achieves state- of-the-art performance on NER with no exter- nal features. They propose two models. The first makes structured prediction of NER labels with a CRF loss (LSTM-CRF) using the conven- tional BIO-label scheme. The second, which per- forms slightly worse, uses a shift-reduce frame- work mirroring tansition-based dependency pars- ing (Yamada and Matsumoto, 2003). While the latter also scales linearly in the number of types and produces embeddings of predicted mentions, our approach is quite different. We frame the problem as multitasking and do not need the stack/buffer data structure. Semi-Markov models (Kong et al., 2015; Sarawagi et al., 2004) explic- itly incorporate the segment structure but are com- putationally intensive (quadratic in the sentence length). Multitasking has been shown to be effective in numerous previous works (Collobert et al., 2011; Yang et al., 2016; Kiperwasser and Goldberg, 2016). This is especially true with neural net- works which greatly simplify joint optimization across multiple objectives. Most of these works consider multitasking across different problems. In contrast, we decompose a single problem (NER) into two natural subtasks and perform them jointly. Particularly relevant in this regard is the parsing model of Kiperwasser and Goldberg (2016) which multitasks edge prediction and classification. LSTMs (Hochreiter and Schmidhuber, 1997), and other variants of recurrent neural networks such as GRUs (Chung et al., 2014), have re- cently been wildly successful in various NLP tasks (Lample et al., 2016; Kiperwasser and Goldberg, 2016; Chung et al., 2014). Since there are many detailed descriptions of LSTMs available, we omit a precise definition. For our purposes, it is suffi- cient to treat an LSTM as a mapping φ : Rd × Rd′ that takes an input vector x and a state vector h to output a new state vector h′ = φ(x, h). → Rd′ 3 Model Let C denote the set of character types, W the set of word types, and E the set of entity types. Let ⊕ denote the vector concatenation operation. Our model first constructs a network over a sen- tence closely following Lample et al. (2016); we describe it here for completeness. The model pa- rameters Θ associated with this base network are • Character embedding ec ∈ R25 for c ∈ C • Character LSTMs φC f , φC b : R25 × R25 → R25 • Word embedding ew ∈ R100 for w ∈ W • Word LSTMs φW f , φW b : R150×R100 → R100 Let w1 . . . wn ∈ W denote a word sequence where word wi has character wi(j) ∈ C at position j. First, the model computes a character-sensitive word representation vi ∈ R150 as j = φC f C bC j = φC vi = f C f(cid:0)ewi(j), f C j−1(cid:1) b (cid:0)ewi(j), bC j+1(cid:1) wi ⊕ bC 1 ⊕ ewi ∀j = 1 . . . wi ∀j = wi . . . 1 for each i = 1 . . . n.1 Next, the model computes f W i = φW bW i = φW f (cid:0)vi, f W i−1(cid:1) b (cid:0)vi, bW i+1(cid:1) ∀i = 1 . . . n ∀i = n . . . 1 and induces a character- and context-sensitive word representation hi ∈ R200 as hi = f W i ⊕ bW i (1) for each i = 1 . . . n. These vectors are used to de- fine the boundary detection loss and the type clas- sification loss described below. Boundary detection loss We frame boundary detection as predicting BIO tags without types. A natural approach is to optimize the condi- tional probability of the correct tags y1 . . . yn ∈ {B, I, O}: p(y1 . . .ynh1 . . . hn) ∝ exp n Xi=1 Tyi−1,yi × gyi(hi)! (2) where g : R200 → R3 is a function that ad- justs the length of the LSTM output to the num- ber of targets. We use a feedforward network g(h) = W 2relu(W 1h + b1) + b2. We write Θ1 to refer to T ∈ R3×3 and the parameters in g. The 1For simplicity, we assume some random initial state vec- tors such as f C 0 and bC wi+1 when we describe LSTMs. boundary detection loss is given by the negative log likelihood: L1 (Θ, Θ1) = −Xl log p(cid:16)y(l)h(l)(cid:17) where l iterates over tagged sentences in the data. The global normalizer for (2) can be computed using dynamic programming; see Collobert et al. (2011). Note that the runtime complexity of boundary detection is constant despite dynamic programming since the number of tags is fixed (three). Type classification loss Given a mention bound- ary 1 ≤ s ≤ t ≤ n, we predict its type using (1) as follows. We introduce an additional pair : R200 × R200 → R200 and of LSTMs φE compute a corresponding mention representation µ ∈ RE as f , φE b CoNLL 2003 (4 types) BiLSTM-CRF Mention2Vec OntoNotes (18 types) BiLSTM-CRF Mention2Vec F1 90.22 90.90 F1 90.77 89.37 # words/sec 3889 4825 # words/sec 495 4949 Table 1: Test F1 scores on CoNLL 2003 and OntoNotes newswire portion. Model McCallum and Li (2003) Collobert et al. (2011) Lample et al. (2016)–Greedy Lample et al. (2016)–Stack Lample et al. (2016)–CRF Mention2Vec F1 84.04 89.59 89.15 90.33 90.94 90.90 Table 2: Test F1 scores on CoNLL 2003. f E j = φE bE j = φE f (cid:0)hj , f E j−1(cid:1) b (cid:0)hj , bE j+1(cid:1) s(cid:1) t ⊕ bE µ = q(cid:0)f E ∀j = s . . . t ∀j = t . . . s is optimized to handle both tasks. During train- ing, we use gold boundaries and types to optimize L2 (Θ, Θ2). At test time, we predict boundaries from the tagging layer (2) and classify them using the classification layer (4). (3) where q : R400 → RE is again a feedforward network that adjusts the vector length to E.2 We write Θ2 to refer to the parameters in φE b , q. Now we can optimize the conditional probability of the correct type τ : f , φE p(τ hs . . . ht) ∝ exp (µτ ) (4) The type classification loss is given by the negative log likelihood: L2 (Θ, Θ2) = −Xl log p(cid:16)τ (l)h(l) s . . . h (l) t (cid:17) where l iterates over typed mentions in the data. Joint loss The final training objective is to min- imize the sum of the boundary detection loss and the type classification loss: L(Θ, Θ1, Θ2) = L1 (Θ, Θ1) + L2 (Θ, Θ2) (5) In stochastic gradient descent (SGD), this amounts to computing the tagging loss l1 and the classifi- cation loss l2 (summed over all mentions) at each annotated sentence, and then taking a gradient step on l1 + l2. Observe that the base network Θ 2Clearly, one can consider different networks over the boundary, for instance simple bag-of-words or convolutional neural networks. We leave the exploration as future work. 4 Experiments Data We use two NER datasets: CoNLL 2003 which has four entity types PER, LOC, ORG and MISC (Tjong Kim Sang and De Meulder, 2003), and the newswire portion of OntoNotes Release 5.0 which has 18 entity types (Weischedel et al., 2013). Implementation and baseline We denote our model Mention2Vec and implement it using the DyNet library.3 We use the same pre-trained word embeddings in Lample et al. (2016). We use the Adam optimizer (Kingma and Ba, 2014) and apply dropout at all LSTM layers (Hinton et al., 2012). We perform minimal tuning over develop- ment data. Specifically, we perform a 5 × 5 grid search over learning rates 0.0001 . . . 0.0005 and dropout rates 0.1 . . . 0.5 and choose the configu- ration that gives the best performance on the dev set. We also re-implement the BiLSTM-CRF model of Lample et al. (2016); this is equivalent to opti- mizing just L1(Θ, Θ1) but using typed BIO tags. Lample et al. (2016) use different details in opti- mization (SGD with gradient clipping), data pre- processing (replacing every digit with a zero), and 3https://github.com/karlstratos/mention2vec PER LOC ORG WORK OF ART GPE ORG In another letter dated January 1865, a well-to-do Washington matron wrote to Lincoln to plead for . . . Chang and Washington were the only men's seeds in action on a day that saw two seeded women's . . . "Just one of those things, I was just trying to make contact," said Bragg. Washington's win was not comfortable, either. Lauck, from Lincoln, Nebraska, yelled a tirade of abuse at the court after his conviction for inciting . . . . . . warring factions, with the PUK aming to break through to KDP's headquarters in Saladhuddin. . . . is not expected to travel to the West Bank before Monday," Nabil Abu Rdainah told Reuters. . . . off a bus near his family home in the village of Donje Ljupce in the municipality of Podujevo. English division three - Swansea v Lincoln. SOCCER - OUT-OF-SORTS NEWCASTLE CRASH 2 1 AT HOME. Moura, who appeared to have elbowed Cyprien in the final minutes of the 3 0 win by Neuchatel, was . . . In Sofia: Leviski Sofia (Bulgaria) 1 Olimpija (Slovenia) 0 . . . Bond novels, and "Treasure Island," produced by Charlton Heston who also stars in the movie. . . . probably started in 1962 with the publication of Rachel Carson's book "Silent Spring." . . . Victoria Petrovich) spout philosophic bon mots with the self-concious rat-a-tat pacing of "Laugh In." Dennis Farney's Oct. 13 page - one article "River of Despair," about the poverty along the . . . . . . from a naval station at Treasure Island near the Bay Bridge to San Francisco to help fight fires. . . . lived in an expensive home on Lido Isle, an island in Newport's harbor, according to investigators. . . . Doris Moreno, 37, of Bell Gardens; and Ana L. Azucena, 27, of Huntington Park. One group of middle-aged manufacturing men from the company's Zama plant outside Tokyo was . . . . . . initiative will spur members of the General Agreement on Tariffs and Trade to reach . . . . . . question of Taiwan's membership in the General Agreement on Tariffs and Trade should . . . "He doesn't know himself," Kathy Stanwick of the Abortion Rights League says of . . . . . . administrative costs, management and research, the Office of Technology Assessment just reported. Table 3: Nearest neighbors of detected mentions in CoNLL 2003 and OntoNotes using (3). the dropout scheme (droptout at BiLSTM input (1)). As a result, our re-implementation is not di- rectly comparable and obtains different (slightly lower) results. But we emphasize that the main goal of this paper is to demonstrate the utility the proposed approach rather than obtaining a new state-of-the-art result on NER. McCallum and Li (2003) use CRFs with manually crafted features; Collobert et al. (2011) use convo- lutional neural networks; Lample et al. (2016) use BiLSTMs in a greedy tagger (Greedy), a stack- based model (Stack), and a global tagger using a CRF output layer (CRF). Mention2Vec performs competitively. 4.1 NER Performance 4.2 Mention Embeddings Table 1 compares the NER performance and de- coding speed between BiLSTM-CRF and Men- tion2Vec. The F1 scores are obtained on test data. The speed is measured by the average number of words decoded per second. On CoNLL 2003 in which the number of types is small, our model achieves 90.50 compared to 90.22 of BiLSTM-CRF with minor speed im- provement. This shows that despite the separation between boundary detection and type classifica- tion, we can achieve good performance through joint optimization. On OntoNotes in which the number of types is much larger, our model still performs well with an F1 score of 89.37 but is behind BiLSTM-CRF which achieves 90.77. We suspect that this is due to strong correlation be- tween mention types that fully structured models can exploit more effectively. However, our model is also an order of magnitude faster: 4949 com- pared to 495 words/second. Finally, Table 2 compares our model with other works in the literature on CoNLL 2003. Table 3 shows nearest neighbors of detected mentions using the mention representations µ in (3). Since µτ represents the score of type τ , the mention embeddings are clustered by en- tity types by construction. The model induces completely different representations even when the mention has the same lexical form. For instance, based on its context Lincoln re- ceives a person, location, or organization repre- sentation; Treasure Island receives a book or The model also learns representations for long multi-word expres- sions such as the General Agreement on Tariffs and Trade. location representation. 5 Conclusion We have presented a neural architecture for en- tity identification that multitasks boundary detec- tion and type classification. Joint optimization en- ables the base BiLSTM network to capture the correlation between entities indirectly via multi- Andrew McCallum and Wei Li. 2003. Early results for named entity recognition with conditional random fields, feature induction and web-enhanced lexicons. In Proceedings of the seventh conference on Natu- ral language learning at HLT-NAACL 2003-Volume 4. Association for Computational Linguistics, pages 188–191. Barbara Plank. 2016. Keystroke dynamics as signal for shallow syntactic parsing. In Proceedings of COL- ING. Barbara Plank, Anders Søgaard, and Yoav Goldberg. 2016. Multilingual part-of-speech tagging with bidirectional long short-term memory models and auxiliary loss. In Proceedings of ACL. Sunita Sarawagi, William W Cohen, et al. 2004. Semi- markov conditional random fields for information extraction. In NIPs. volume 17, pages 1185–1192. Erik F Tjong Kim Sang and Fien De Meulder. 2003. Introduction to the conll-2003 shared task: Language-independent named entity recognition. In Proceedings of the seventh conference on Natural language learning at HLT-NAACL 2003-Volume 4. Association for Computational Linguistics, pages 142–147. Ralph Weischedel, Martha Palmer, Mitchell Marcus, Eduard Hovy, Sameer Pradhan, Lance Ramshaw, Nianwen Xue, Ann Taylor, Jeff Kaufman, Michelle Franchini, et al. 2013. Ontonotes release 5.0 ldc2013t19. Linguistic Data Consortium, Philadel- phia, PA . Hiroyasu Yamada and Yuji Matsumoto. 2003. Statis- tical dependency analysis with support vector ma- chines. In Proceedings of IWPT. volume 3, pages 195–206. Zhilin Yang, Ruslan Salakhutdinov, and William Co- hen. 2016. Multi-task cross-lingual sequence tag- ging from scratch. arXiv preprint arXiv:1603.06270 . tasking. As a result, the model is competitive with fully structured models such as BiLSTM- CRFs on CoNLL 2003 while being more scal- able and also inducing context-sensitive mention embeddings clustered by entity types. There are many interesting future directions, such as apply- ing this framework to NED in which type classi- fication is much more fine-grained and finding a better method for optimizing the multitasking ob- jective (e.g., instead of using gold boundaries for training, dynamically use predicted boundaries in a reinforcement learning framework). Acknowledgments The author would like to thank Linpeng Kong for his consistent help with DyNet and Miguel Balles- teros for pre-trained word embeddings. References Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. 2014. Empirical evaluation of gated recurrent neural networks on sequence model- ing. In NIPS Deep Learning Workshop. Ronan Collobert, Jason Weston, L´eon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel Kuksa. 2011. Natural language processing (almost) from scratch. The Journal of Machine Learning Research 12:2493–2537. Geoffrey E Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan R Salakhutdinov. 2012. Improving neural networks by preventing co- adaptation of feature detectors. arXiv preprint arXiv:1207.0580 . Sepp Hochreiter and Jurgen Schmidhuber. 1997. Neural computation Long short-term memory. 9(8):1735–1780. Diederik Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980 . Eliyahu Kiperwasser and Yoav Goldberg. 2016. Sim- ple and accurate dependency parsing using bidirec- tional lstm feature representations. Transactions of the Association for Computational Linguistics 4:313–327. Lingpeng Kong, Chris Dyer, and Noah A Smith. 2015. Segmental recurrent neural networks. arXiv preprint arXiv:1511.06018 . Guillaume Lample, Miguel Ballesteros, Sandeep Sub- ramanian, Kazuya Kawakami, and Chris Dyer. 2016. Neural architectures for named entity recognition. In Proceedings of NAACL.
1702.01944
1
1702
2017-02-07T10:18:07
EliXa: A Modular and Flexible ABSA Platform
[ "cs.CL" ]
This paper presents a supervised Aspect Based Sentiment Analysis (ABSA) system. Our aim is to develop a modular platform which allows to easily conduct experiments by replacing the modules or adding new features. We obtain the best result in the Opinion Target Extraction (OTE) task (slot 2) using an off-the-shelf sequence labeler. The target polarity classification (slot 3) is addressed by means of a multiclass SVM algorithm which includes lexical based features such as the polarity values obtained from domain and open polarity lexicons. The system obtains accuracies of 0.70 and 0.73 for the restaurant and laptop domain respectively, and performs second best in the out-of-domain hotel, achieving an accuracy of 0.80.
cs.CL
cs
EliXa: A modular and flexible ABSA platform Inaki San Vicente, Xabier Saralegi Elhuyar Foundation Osinalde industrialdea 3 Usurbil, 20170, Spain Rodrigo Agerri IXA NLP Group University of the Basque Country (UPV/EHU) Donostia-San Sebasti´an {i.sanvicente,x.saralegi}@elhuyar.com [email protected] Abstract This paper presents a supervised Aspect Based Sentiment Analysis (ABSA) system. Our aim is to develop a modular platform which allows to easily conduct experiments by replacing the modules or adding new features. We obtain the best result in the Opinion Target Extrac- tion (OTE) task (slot 2) using an off-the-shelf sequence labeler. The target polarity classi- fication (slot 3) is addressed by means of a multiclass SVM algorithm which includes lex- ical based features such as the polarity values obtained from domain and open polarity lex- icons. The system obtains accuracies of 0.70 and 0.73 for the restaurant and laptop domain respectively, and performs second best in the out-of-domain hotel, achieving an accuracy of 0.80. 1 Introduction for Nowadays Sentiment Analysis is proving very useful tasks such as decision making and market analysis. The ever increasing interest is also shown in the number of related shared tasks TASS (Villena-Rom´an et al., 2012; organized: Villena-Rom´an et al., 2014), SemEval (Nakov et al., 2013; Pontiki et al., 2014; Rosenthal et al., 2014), the SemSA Chal- lenge at ESWC20141. Research has also been evolving towards specific opinion elements such as entities or properties of a certain opinion target, which is also known as ABSA. The Semeval or 1http://challenges.2014.eswc- conferences.org/index.php/SemSA 2015 ABSA shared task aims at covering the most common problems in an ABSA task: detecting the specific topics an opinion refers to (slot1); extracting the opinion targets (slot2), combining the topic and target identification (slot1&2) and, finally, computing the polarity of the identified word/targets (slot3). Participants were allowed to send one constrained (no external resources allowed) and one unconstrained run for each subtask. We participated in the slot2 and slot3 subtasks. Our main is to develop an ABSA system to be used in the future for further experimentation. Thus, rather than focusing on tuning the different mod- ules our goal is to develop a platform to facilitate future experimentation. The EliXa system consists of three independent supervised modules based on the IXA pipes tools (Agerri et al., 2014) and Weka (Hall et al., 2009). Next section describes the ex- ternal resources used in the unconstrained systems. Sections 3 and 4 describe the systems developed for each subtask and briefly discuss the obtained results. 2 External Resources Several polarity Lexicons and various corpora were used for the unconstrained versions of our systems. To facilitate reproducibility of results, every re- source listed here is publicly available. 2.1 Corpora For the restaurant domain we used the Yelp Dataset Following (Kiritchenko et al., 2014), we manually filtered Challenge dataset2. 2http://www.yelp.com/dataset challenge out categories not corresponding to food related businesses (173 out of 720 were finally selected). A total of 997,721 reviews (117.1M tokens) comprise what we henceforth call the Yelp food corpus (CY elp). For the laptop domain we leveraged a corpus composed of Amazon reviews of electronic devices (Jo and Oh, 2011). Although only 17,53% of the re- views belong to laptop products, early experiments showed the advantage of using the full corpus for both slot 2 and slot 3 subtasks. The Amazon elec- tronics corpus (CAmazon) consists of 24,259 reviews (4.4M tokens). Finally, the English Wikipedia was also used to induce word clusters using word2vec (Mikolov et al., 2013). 2.2 Polarity Lexicons We generated two types of polarity lexicons to rep- resent polarity in the slot3 subtasks: general purpose and domain specific polarity lexicons. A general purpose polarity lexicon Lgen was built by combining four well known polarity lexicons: SentiWordnet SWN (Baccianella et al., 2010), Gen- eral Inquirer GI (Stone et al., 1966), Opinion Finder OF (Wilson et al., 2005) and Liu's sentiment lex- icon Liu (Hu and Liu, 2004). When a lemma oc- curs in several lexicons, its polarity is solved ac- cording to the following priority order: Liu > OF > GI > SW N. The order was set based on the results of (San Vicente et al., 2014). All polarity weights were normalized to a [−1, 1] interval. Po- larity categories were mapped to weights for GI (neg+→−0.8; neg→-0.6; neg−→-0.2; pos−→0.2; pos→0.6; pos+→0.8), Liu and OF (neg→-0.7; pos→0.7 for both). In addition, a restricted lexicon Lgenres including only the strongest polarity words was derived from Lgen by applying a threshold of ±0.6. Domain General General Electronic devices Food Polarity Lexicon Lgen Lgenres LAmazon LY elp Total 42,218 12,398 4,511 4,691 LAmazon were automatically extracted from CY elp and CAmazon reviews corpora. Reviews are rated in a [1..5] interval, being 1 the most negative and 5 the most positive. Using the Log-likelihood ratio (LLR) (Dunning, 1993) we obtained the ranking of the words which occur more with negative and pos- itive reviews respectively. We considered reviews with 1 and 2 rating as negative and those with 4 and 5 ratings as positive. LLR scores were normalized to a [−1, 1] interval and included in LY elp and LAmazon lexicons as polarity weights. 3 Slot2 Subtask: Opinion Target Extraction The Opinion Target Extraction task (OTE) is ad- dressed as a sequence labeling problem. We use the ixa-pipe-nerc Named Entity Recognition sys- tem3 (Agerri et al., 2014) off-the-shelf to train our OTE models; the system learns supervised mod- els via the Perceptron algorithm as described by (Collins, 2002). ixa-pipe-nerc uses the Apache OpenNLP project implementation of the Percep- tron algorithm4 customized with its own features. Specifically, ixa-pipe-nerc implements basic non- linguistic local features and on top of those a combi- nation of word class representation features partially inspired by (Turian et al., 2010). The word repre- sentation features use large amounts of unlabeled data. The result is a quite simple but competitive system which obtains the best constrained and un- constrained results and the first and third best overall results. The local features implemented are: current to- ken and token shape (digits, lowercase, punctuation, etc.) in a 2 range window, previous prediction, be- ginning of sentence, 4 characters in prefix and suffix, bigrams and trigrams (token and shape). On top of them we induce three types of word representations: • Brown (Brown et al., 1992) clusters, taking the 4th, 8th, 12th and 20th node in the path. We in- duced 1000 clusters on the Yelp reviews dataset described in section 2.1 using the tool imple- mented by Liang5. Table 1: Statistics of the polarity lexicons. Domain specific polarity lexicons LY elp and 3https://github.com/ixa-ehu/ixa-pipe-nerc 4http://opennlp.apache.org/ 5https://github.com/percyliang/brown-cluster • Clark (Clark, 2003) clusters, using the standard configuration to induce 200 clusters on the Yelp reviews dataset and 100 clusters on the food portion of the Yelp reviews dataset. • Word2vec (Mikolov et al., 2013) clusters, based on K-means applied over the extracted word vectors using the skip-gram algorithm6; 400 clusters were induced using the Wikipedia. The implementation of the clustering features looks for the cluster class of the incoming token in one or more of the clustering lexicons induced fol- lowing the three methods listed above. If found, then we add the class as a feature. The Brown clusters only apply to the token related features, which are duplicated. We chose the best combina- tion of features using 5-fold cross validation, ob- taining 73.03 F1 score with local features (e.g. con- strained mode) and 77.12 adding the word clustering features, namely, in unconstrained mode. These two configurations were used to process the test set in this task. Table 2 lists the official results for the first 4 systems in the task. System (type) Baseline EliXa (u) NLANGP (u) EliXa (c) IHS-RD-Belarus (c) Precision Recall 43.4 71.22 64.02 66.61 59.23 55.42 68.93 70.53 67.23 67.58 F1 score 48.68 70.05 67.12 66.91 63.13 Table 2: Results obtained on the slot2 evaluation on restaurant data. The results show that leveraging unlabeled text is helpful in the OTE task, obtaining an increase of 7 points in recall. It is also worth mentioning that our constrained system (using non-linguistic local fea- tures) performs very closely to the second best over- all system by the NLANGP team (unconstrained). Finally, we would like to point out to the overall low results in this task (for example, compared to the 2014 edition), due to the very small and diffi- cult training set (e.g., containing many short samples such as "Tasty Dog!") which made it extremely hard to learn good models for this task. The OTE mod- els will be made freely available in the ixa-pipe-nerc website in time for SemEval 2015. 6https://code.google.com/p/word2vec/ 4 Slot3 Subtask: Sentiment Polarity The EliXa system implements a single multiclass SVM classifier. We use the SMO implementation provided by the Weka library (Hall et al., 2009). All the classifiers built over the training data were eval- uated via 10-fold cross validation. The complexity parameter was optimized as (C = 1.0). Many con- figurations were tested in this experiments, but in the following we only will describe the final setting. 4.1 Baseline The very first features we introduced in our classi- fier were token ngrams. Initial experiments showed that lemma ngrams (lgrams) performed better than raw form ngrams. One feature per lgram is added to the vector representation, and lemma frequency is stored. With respect to the ngram size used, we tested up to 4-gram features and improvement was achieved in laptop domain but only when not com- bined with other features. 4.2 PoS PoS tag and lemma information, obtained using the IXA pipes tools (Agerri et al., 2014), were also in- cluded as features. One feature per PoS tag was added again storing the number of occurrences of a tag in the sentence. These features slightly improve over the baseline only in the restaurant domain. 4.3 Window Given that a sentence may contain multiple opin- ions, we define a window span around a given opin- ion target (5 words before and 5 words after). When the target of an opinion is null the whole sentence is taken as span. Only the restaurant and hotel domains contained gold target annotations so we did not use this feature in the laptop domain. 4.4 Polarity Lexicons The positive and negative scores we extracted as fea- tures from both general purpose and domain specific lexicons. Both scores are calculated as the sum of every positive/negative score in the corresponding lexicon divided by the number of words in the sen- tence. Features obtained from the general lexicons provide a slight improvement. Lgenres is better for restaurant domain, while Lgen is better for laptops. Domain specific lexicons LAmazon and LY elp also help as shown by tables 3 and 4. 4.5 Word Clusters Word2vec clustering features combine best with the rest as shown by table 3. These features only were useful for the restaurant domain, perhaps due to the small size of the laptops domain data. 4.6 Feature combinations Every feature, when used in isolation, only marginally improves the baseline. Some of them, such as the E&A features (using the gold informa- tion from the slot1 subtask) for the laptop domain, only help when combined with others. Best perfor- mance is achieved when several features are com- bined. As shown by tables 4 and 5, improvement over the baseline ranges between 2,8% and 1,9% in the laptop and restaurant domains respectively. Classifier Baseline (organizers) Baseline 1lgram 2lgram 1lgram + E&A 1lgram(w5) 1lgram + P oS Lexicons 1lgram + Lgen 1lgram + Lgenres 1lgram + LY elp Combinations Acc Rest 78.8 80.11 79.3 79.8 80.41 80.59 (c) 80.6 81 80.9 1lgram(w5) + w2v(CY elp) + Lgenres + 82.34 (u) LY elp + P oS Table 3: Slot3 ablation experiments for restaurants. (c) and (u) refer to constrained and unconstrained tracks. Classifier Baseline (organizers) Baseline 1lgram 2lgram 1lgram + clusters(w2v) 1lgram + E&A 1lgram + P oS Lexicons 1lgram + Lgen 1lgram + Lgenres 1lgram + LAmazon Combinations Acc Lapt 78.3 79.33 79.7 79.23 79.23 78.88 79.2 79 79.7 1lgram + P oS + E&A 2lgram + P oS + E&A 1lgram + Lgenres + LAmazon + P oS + 79.99 (c) 78.27 80.85 (u) E&A Table 4: Slot3 ablation experiments for laptops; (c) and (u) refer to constrained and unconstrained tracks. strained system could mean that the feature combi- nation used may be robust across domains. With re- spect to the unconstrained system, we suspect that such a good performance is achieved due to the fact that word cluster information was very adequate for the hotel domain, because Cyelp contains a 10.55% of hotel reviews. System Baseline Sentiue lsislif EliXa (u) EliXa (c) Rest. 63.55 78.70 (1) 75.50 (3) 70.06(10) 67.34 (14) Lapt. 69.97 79.35 (1) 77.87 (3) 72.92 (7) 71.55 (9) Hotel 71.68 (majority) 71.68 (4) 85.84 (1) 79.65 (3) 74.93 (5) Table 5: Results obtained on the slot3 evaluation on restaurant data; ranking in brackets. 4.7 Results Table 5 shows the result achieved by our sentiment polarity classifier. Although for both restaurant and laptops domains we obtain results over the baseline both performance are modest. In contrast, for the out of domain track, which was evaluated on hotel reviews our system obtains the third highest score. Because of the similarity of the domains, we straightforwardly applied our restau- rant domain models. The good results of the con- 5 Conclusions We have presented a modular and supervised ABSA platform developed to facilitate future experimenta- tion in the field. We submitted runs corresponding to the slot2 and slot3 subtasks, obtaining competi- tive results. In particular, we obtained the best re- sults in slot2 (OTE) and for slot3 we obtain 3rd best result in the out-of-domain track, which is nice for a supervised system. Finally, a system for topic detec- tion (slot1) is currently under development. 6 Acknowledgments This work has been supported by the following projects: ADi project (Etortek grant No. IE-14-382), NewsReader (FP7-ICT 2011-8-316404), SKaTer (TIN2012-38584-C06-02) and Tacardi (TIN2012- 38523-C02-01). References [Agerri et al.2014] Rodrigo Agerri, Josu Bermudez, and German Rigau. 2014. Ixa pipeline: Efficient and ready to use multilingual nlp tools. In Proceedings of the 9th Language Resources and Evaluation Confer- ence (LREC2014), pages 26–31, Reykjavik, Iceland, May. 2010. [Baccianella et al.2010] S. Baccianella, A. Esuli, and F. Sebastiani. SentiWordNet 3.0: An en- hanced lexical resource for sentiment analysis and opinion mining. In Seventh conference on Interna- tional Language Resources and Evaluation (LREC- 2010), Malta., volume 25. [Brown et al.1992] Peter F Brown, Peter V Desouza, Robert L Mercer, Vincent J Della Pietra, and Jenifer C Lai. 1992. Class-based n-gram models of natural lan- guage. Computational linguistics, 18(4):467–479. [Clark2003] Alexander Clark. 2003. Combining dis- tributional and morphological information for part of speech induction. In Proceedings of the tenth confer- ence on European chapter of the Association for Com- putational Linguistics-Volume 1, pages 59–66. [Collins2002] Michael Collins. 2002. Discriminative training methods for hidden markov models: Theory and experiments with perceptron algorithms. In Pro- ceedings of the ACL-02 conference on Empirical meth- ods in natural language processing-Volume 10, pages 1–8. [Dunning1993] Ted Dunning. 1993. Accurate methods for the statistics of surprise and coincidence. Com- putacional Linguistics, 19(1):61–74, March. [Hall et al.2009] Mark Hall, Eibe Frank, Geoffrey Holmes, Bernhard Pfahringer, Peter Reutemann, and Ian H. Witten. 2009. The WEKA data mining software: an update. SIGKDD Explor. Newsl., 11(1):10–18, november. 2004. Mining [Hu and Liu2004] M. Hu and B. Liu. and summarizing customer reviews. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 168– 177. [Jo and Oh2011] Yohan Jo and Alice H. Oh. 2011. As- pect and sentiment unification model for online review In Proceedings of the fourth ACM inter- analysis. national conference on Web search and data mining, WSDM '11, pages 815–824, New York, NY, USA. ACM. [Kiritchenko et al.2014] Svetlana Kiritchenko, Xiaodan Zhu, Colin Cherry, and Saif Mohammad. 2014. NRC- canada-2014: Detecting aspects and sentiment in cus- tomer reviews. In Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval 2014), pages 437–442, Dublin, Ireland, August. [Mikolov et al.2013] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. 2013. Dis- tributed representations of words and phrases and their compositionality. In Advances in Neural Information Processing Systems, pages 3111–3119. [Nakov et al.2013] Preslav Nakov, Sara Rosenthal, Zor- nitsa Kozareva, Veselin Stoyanov, Alan Ritter, and Theresa Wilson. 2013. SemEval-2013 task 2: Senti- ment analysis in twitter. In Proceedings of the Seventh International Workshop on Semantic Evaluation (Se- mEval 2013), pages 312–320, Atlanta, Georgia, USA, June. [Pontiki et al.2014] Maria Pontiki, Dimitrios Galanis, John Pavlopoulos, Harris Papageorgiou, Ion Androut- sopoulos, and Suresh Manandhar. 2014. Semeval- 2014 task 4: Aspect based sentiment analysis. In Pro- ceedings of the International Workshop on Semantic Evaluation (SemEval). [Rosenthal et al.2014] Sara Rosenthal, Preslav Nakov, Alan Ritter, and Veselin Stoyanov. 2014. Semeval- 2014 task 9: Sentiment analysis in twitter. In Pro- ceedings of the 8th International Workshop on Seman- tic Evaluation, SemEval, volume 14. [San Vicente et al.2014] Inaki San Vicente, Rodrigo Agerri, and German Rigau. 2014. Simple, robust and (almost) unsupervised generation of polarity lexicons for multiple languages. In Proceedings of the 14th Conference of the European Chapter of the Associa- tion for Computational Linguistics, EACL2014, pages 88–97, Gothenburg, Sweden. [Stone et al.1966] P. Stone, D. Dunphy, M. Smith, and D. Ogilvie. 1966. The General Inquirer: A Computer Approach to Content Analysis. Cambridge (MA): MIT Press. [Turian et al.2010] Joseph Turian, Lev-Arie Ratinov, and Yoshua Bengio. 2010. Word representations: A sim- ple and general method for semi-supervised learning. In Proceedings of the 48th Annual Meeting of the Asso- ciation for Computational Linguistics, pages 384–394, Uppsala, Sweden, July. [Villena-Rom´an et al.2012] Julio Villena-Rom´an, Sara and Tass- Lana-Serrano, Jos´e Carlos Gonz´alez-Crist´obal. Eugenio Mart´ınez-C´amara, 2012. workshop on sentiment analysis at sepln. samiento del Lenguaje Natural, 50:37–44. Proce- [Villena-Rom´an et al.2014] Julio Villena-Rom´an, Janine Garc´ıa-Morera, Sara Lana-Serrano, and Jos´e Carlos Gonz´alez-Crist´obal. 2014. Tass 2013 - a second step in reputation analysis in spanish. Procesamiento del Lenguaje Natural, 52(0). [Wilson et al.2005] Theresa Wilson, Janyce Wiebe, and Paul Hoffmann. 2005. Recognizing contextual polar- ity in phrase-level sentiment analysis. In Proceedings of the conference on Human Language Technology and Empirical Methods in Natural Language Processing, page 347–354.
1811.04531
1
1811
2018-11-12T02:55:55
Sequence-Level Knowledge Distillation for Model Compression of Attention-based Sequence-to-Sequence Speech Recognition
[ "cs.CL" ]
We investigate the feasibility of sequence-level knowledge distillation of Sequence-to-Sequence (Seq2Seq) models for Large Vocabulary Continuous Speech Recognition (LVSCR). We first use a pre-trained larger teacher model to generate multiple hypotheses per utterance with beam search. With the same input, we then train the student model using these hypotheses generated from the teacher as pseudo labels in place of the original ground truth labels. We evaluate our proposed method using Wall Street Journal (WSJ) corpus. It achieved up to $ 9.8 \times$ parameter reduction with accuracy loss of up to 7.0\% word-error rate (WER) increase
cs.CL
cs
SEQUENCE-LEVEL KNOWLEDGE DISTILLATION FOR MODEL COMPRESSION OF ATTENTION-BASED SEQUENCE-TO-SEQUENCE SPEECH RECOGNITION Raden Mu'az Mun'im, Nakamasa Inoue, Koichi Shinoda [email protected], [email protected], [email protected] Tokyo Institute of Technology ABSTRACT We investigate the feasibility of sequence-level knowledge distillation of Sequence-to-Sequence (Seq2Seq) models for Large Vocabulary Continuous Speech Recognition (LVSCR). We first use a pre-trained larger teacher model to generate multiple hypotheses per utterance with beam search. With the same input, we then train the student model using these hy- potheses generated from the teacher as pseudo labels in place of the original ground truth labels. We evaluate our proposed method using Wall Street Journal (WSJ) corpus. It achieved up to 9.8× parameter reduction with accuracy loss of up to 7.0% word-error rate (WER) increase. Index Terms -- speech recognition, large vocabulary con- tinuous speech recognition, sequence-to-sequence, attention model, knowledge distillation, sequence-level knowledge dis- tillation 1. INTRODUCTION In recent years, end-to-end deep neural networks for Large Vocabulary Continuous Speech Recognition (LVSCR) have been steadily improving their accuracy, rivalling the tra- ditional Gaussian Mixture Model-Hidden Markov Models (GMM-HMM) and hybrid models of deep neural networks and HMMs (DNN-HMM). While these models have an acoustic model and a language model which are trained sep- arately, for end-to-end training, the whole model is trained using backpropagation with audio-transcription pairs [1]. Several end-to-end architectures for speech recogni- tion have been proposed. Their examples include Con- nectionist Temporal Classification (CTC) [2], Recurrent Neural Network-Transducer (RNN-T) [3], and Sequence- to-Sequence (Seq2Seq) with attention [4]. Unlike CTC and RNN-T, Seq2Seq with attention does not make any prior as- sumptions on the output sequence alignment given an input; it jointly learns how to align while learning to encode the input and decode its result into the output. In machine learning, model compression [5] is a way to significantly compress a model by reducing the number of its parameters while having negligible accuracy loss. This is important for deploying trained models on memory and compute-constrained devices such as mobile phones and em- bedded systems, and when energy efficiency is needed on large-scale deployment. Several model compression methods exist, such as pruning, quantization [5], and knowledge distil- lation (KD) [6]. KD is the focus of this work, where a smaller student model is trained by using the output distribution of a larger teacher model. Recently KD for Seq2Seq models with attention was proposed for neural machine translation (NMT) task [7] and proved to be effective. Also, Seq2Seq models for CTC-based speech recognition was recently proposed [11]. In this paper, we propose a sequence-level KD method for Seq2Seq speech recognition models with attention. Dif- ferent from the previous work for NMT [7], we extract the hypotheses from a pre-trained teacher Seq2Seq model using beam search, and train student Seq2Seq models using the hy- potheses as pseudo labels on the sequence-level cross-entropy criterion. To the best of our knowledge, there is no prior work on applying KD in Seq2Seq-based speech recognition mod- els. 2. KNOWLEDGE DISTILLATION FOR SEQ2SEQ MODELS 2.1. Sequence-to-Sequence Learning The Sequence-to-Sequence (Seq2Seq) [1] is neural network architecture which directly models conditional probability p(yx) where x = [x1, ..., xS] is the source sequence with length S and y = [y1, ..., yT ] is the target sequence with length T . Figure 1 illustrates the Seq2Seq model. It consists of an encoder, a decoder and an attention module. The encoder pro- cesses an input sequence x and outputs encoded hidden repre- sentation he = [he S] for the decoder [9]. The attention module is a network that assists the decoder to find relevant information on the encoder side based on the current decoder hidden states [4]. The attention module does this by produc- ing a context vector ct at time t based on the encoder and 1, ..., he 2.2. Knowledge Distillation In knowledge distillation (KD), a teacher model's probability distribution q(θTx; θ) is trained by using a given dataset, where θt is a set of its parameters. Using the same dataset, a student model p(θx; θ) is trained by minimizing cross- entropy with the teacher model's probability distribution q(θTx; θ) instead of the ground truth labels from the dataset. Let an input-label pairs be (x, y) and V is a set of possible classes. Then, the loss for KD is given as: V(cid:88) LKD(θ; θT ) = − q(y = k x; θT ) log p(y = k x; θ). k=1 (5) In KD training, the teacher produces softmax probabili- ties (soft targets), which reveal teacher's confidences for what classes it predicts given an input. With this additional knowl- edge, the student can model the data distribution better than learning directly from the ground truth labels consisting of one-hot vectors (hard targets) [6]. 2.3. Sequence-Level Knowledge Distillation While it is possible to use the original KD method to train autoregressive models such as RNN, it only gives non- significant accuracy gains [7], or simply degrade the per- formance compared to training with the dataset directly [10]. To adapt KD to autoregressive models, [7] suggested to use the approximation of a teacher's sequence-level distribu- tion instead of the teacher's single time step frame-level dis- tribution, so as to capture the time-dependencies between the inputs. Consider the sequence-level distribution specified by the model over all possible teacher label sequences t ∈ T , given the input sequence s : J(cid:89) j=1 Fig. 1. Architecture of Seq2Seq with Attention module decoder hidden states: s=1 S(cid:88) (cid:80)S (cid:104)he ct = at(s) ∗ he s, at(s) = exp(Score(he s, hd s=1 exp(Score(he t )) s, hd t )) (1) (2) , Several variations exist for Score(he s, hd t ): Score(he s, hd t ) = t(cid:105), s, hd he(cid:124) s Wshd t , (cid:124) s tanh(Ws[he V s, hd t ]), : dot product : bilinear : MLP (3) where Score is a function (RM ×RN ) → R, M is the number of hidden units for the encoder, N is the number of hidden (cid:124) units for the decoder, and both Ws and V s are weight ma- trices. Finally, the decoder predicts the probability of target sequence y at time t based on the previous output y<t and ct, which can be formulated as: T(cid:88) log p(yx) = log p(yty<t, ct). (4) p(t s) = p(tj s, t<j), (6) t=1 The previous outputs ct can obtained with greedy decod- ing, i.e. by taking the output with the highest probability for each time step (e.g in [7]). It is also possible to perform beam search to obtain more than one ct [1]. Seq2Seq can handle virtually any sequence related tasks[1], such as NMT and speech recognition. For speech recogni- tion, the input x is a sequence of feature vectors derived from audio waveform such as Short-time Fourier Transform (STFT) spectrogram or Mel-frequency cepstral coefficients (MFCC). Therefore, x is a real vector with S × D dimension where D is the number of the features and S is the total length of the utterance in frames. The output y can be a sequence of phonemes or graphemes (characters). for any length J. The sequence-level loss for Seq2Seq in- volves matching the input s with the one-hot distribution of all the complete sequences: 1{t = y} log p(t s) LSEQ-NLL = −(cid:88) = − J(cid:88) V(cid:88) t∈T 1{yj = k} log p(tj = k s, t<j), j=1 k=1 where 1{·} is the indicator function and y = [y1, . . . , yJ ] is the observed sequence. To formulate the sequence-level KD, we use q(t s) to represent the teacher's sequence distribution over the sample (7) (8) Model Teacher Student-mid Student-small Encoder bi-GRU Decoder bi-GRU 3 layers 384 cells 5 layers 384 cells 1 layer 256 cells 4 layers 256 cells 3 layers 128 cells 1 layer 128 cells Table 1. Model configurations. 2D CNN and Attention mod- ule configuration is the same for all models. labels with generated pseudo labels (Figure 2). In this proce- dure, the size of beam search and the value of k are adjustable hyperparameters. The dataset size increases with factor of k from the method using the 1-best [7]. The pseudo labels are analogous to soft targets in the orig- inal KD. Even if the pseudo labels are not fully accurate, the student is expected to achieve better performance with this training method since the student tries to imitate the teacher's distribution instead of trying to model the training data dis- tribution directly. Training with these pseudo labels can be seen as a form of regularization similar to the original KD [6], because the slightly inaccurate transcriptions from pseudo la- bels can prevent the trained models from overfitting to train- ing data distribution (Figure 2). 4. IMPLEMENTATION AND EXPERIMENTS 4.1. Seq2Seq Model Architecture The input speech audio waveform is sampled at 16kHz, then transformed into STFT spectrogram with Hanning window of 20ms and step size of 10ms. Then the STFT spectro- grams are fed into 2D convolutional neural network (CNN) with two layers, as described by [12, 13], as this STFT and CNN combination can further improve accuracy compared to using MFCC alone. 2D CNN is configured with filters=32, kernel size=(5, 8), stride=(2,2). Bidirectional Gated Recurrent Unit (GRU) [14] is used for the encoder and the decoder. The feature vector from 2D CNN is first fed into the encoder. Then, the hidden represen- tation made by the encoder is fed to an embedding layer of size 32. Next, the output of the embedding layer is fed into the decoder. The output of the decoder is fed into the softmax layer consisting of 31 classes (26 English alphabet plus 5 classes for start-of-sentence (sos), end-of-sentence (eos), space, apostro- phe and period). The decoder's attention module consists of 1D CNN layer with kernel=128, kernel size=15, stride=1, padding=7 followed by a fully-connected layer, as proposed by [4]. The models are trained with Dropout set to 0.4. The model configurations are summarised in Table 1. We have designed two kinds of student models with different sizes, Student-mid and Student-small. Fig. 2. Example of sequence-level KD training. The teacher produces pseudo labels obtained from the top-k results from beam search, then the student learns by minimizing cross en- tropy with them. space of all possible sequences, LSEQ-KD = −(cid:88) t∈T q(t s) log p(t s) (9) Different from previously stated LKD, LSEQ-KD minimizes the loss on the whole-sequence level. However, this loss is intractable. An approximation to calculate it is required. There are many ways to approximate the loss. The sequence-level KD for NMT [7] uses a single hypothesis with the best score as the pseudo label per input. For CTC- based speech recognition [11], this loss was k-best hypotheses from beam search per input (Figure 2). The loss is then LSEQ-KD ≈ −(cid:88) 1{t = y} log p(t s) t∈T = − log p(t = y s), (10) (11) where y is the output hypothesis obtained from running beam search with the teacher model. In this work, we investigated on how to apply these for Seq2Seq-based speech recognition models, which will be discussed in the next sections. 3. MULTIPLE HYPOTHESES FROM BEAM SEARCH FOR KNOWLEDGE DISTILLATION For Seq2Seq-based speech recognition, the sequence-level KD with the loss approximation can be done by the following three steps: (1) Pre-train a teacher model with a dataset, (2) With the same dataset, generate k-best sequences with beam search, and save them as pseudo labels, (3) Train a student model with the same dataset but replace the ground truth Table 2. Results on WSJ eval92 (trained on train si284). beamSize (shorthand for size of beam search) and topK (shorthand for top k-best hypotheses) are hyperparameters. We measured the accuracy using the character-error rate (CER) and word-error rate (WER). Model Teacher (Params: 16.8M; 100% size) CER (%) WER (%) Baseline 4.6 15.3 Student-mid (Params: 6.1M; 37% size) Baseline topK=1, beamSize=5 topK=1, beamSize=10 topK=5, beamSize=5 topK=5, beamSize=10 topK=10, beamSize=10 Student-small (Params: 1.7M; 10% size) Baseline topK=1, beamSize=5 topK=1, beamSize=10 topK=5, beamSize=5 topK=5, beamSize=10 topK=10, beamSize=10 7.0 6.4 6.5 6.0 6.5 6.1 9.2 7.6 7.7 6.5 6.9 7.4 21.8 20.5 20.5 20.1 21.2 19.7 28.7 26.1 25.3 22.3 23.3 24.7 4.2. Dataset and Software Wall Street Journal (WSJ) corpus (available at the Linguistic Data Consortium as LDC93S6B and LDC94S13B) is used as the training and testing datasets. From the corpus, train si284 (81 hours of 37k sentences) is used for training, dev93 is used for validation, and eval92 is used for testing. Data is extracted as according to WSJ recipe from Kaldi toolkit [15]. STFT spectrogram extraction, implementation of the models, train- ing and testing are conducted using Python 3.6, Scipy 1.0.1 and Pytorch 0.3.1. 4.3. Experimental Setup First, the teacher model and student models are trained di- rectly with train si284 and tested with eval92 to serve as the baselines. To perform Sequence-level KD, the teacher model pre-trained with train si284 is used for pseudo labels genera- tion. This is done by extracting k-best hypotheses from beam search with combinations of beam size of 5, 10 and k-best of 1, 5, 10. For each model the training is done using Adam op- timizer, with learning rate of 2e-4 exponential decay rate of 0.99 per epoch, and mini-batch size set at 16. Seq2Seq teacher forcing rate [4] is set at 0.4. Training is done up to 200 epochs, or until no improvement can be seen in validation or testing set. 5. RESULTS The results are shown in Table 2. The teacher model serves the reference baseline for student models. We benchmarked the character-error rate (CER) and word-error rate (WER). With KD training, the student models managed to achieve bet- ter CER and WER than the case when training directly with the dataset. For Student-mid model, the number of parameters is 37% of the teacher (2.7× reduction). It achieved the best CER (6.0%) with beamSize=5 and topK=5, and the best WER (19.7%) with beamSize=10 and beamSize=10. For Student-small model, the number of parameters is 10% of the teacher (9.8× reduction). As expected, the model suffered higher CER and WER compared to Student- mid model. The model achieved the best CER (6.5%) and WER (22.3%) with beamSize=5 and topK=5. The effect of sequence-level KD is more obvious in Student-small, where it achieve 6.4% reduction in WER with KD training compared to directly training with the dataset. Training was done using a server with Intel Xeon E5-2680 2.4GHz and NVIDIA Tesla P100 16GB. We did not found significant improvement in training and testing time. Student- mid and Student-small achieved speed-up of 1.4× and 1.7× respectively, relative to the teacher model. This relatively small improvement may be due to inherent sequential com- putations using RNN where some operations simply cannot be paralellized. To summarise, generally we found that using beamSize=5 and topK=5 are sufficient for reasonable WER and CER re- duction. Increasing beamSize and/or topK further do not nec- essarily improve the performance. 6. CONCLUSION In this work, we successfully performed sequence-level KD training for Seq2Seq speech recognition models. Using beam search to approximate the teacher's distribution, we extracted k-best hypotheses to be used as pseudo labels to train the stu- dent on the same dataset. We managed to train the students with reduction of 9.8× parameter size of the teacher, with in- crease of WER of 7.0% relative to the teacher. There are many problems left for future work. Since RNN is limited in inference speed due to its sequential operations, we plan to investigate the feasibility of sequence-level KD for other highly parallelizable attention-based architectures which are not based on RNN, such as, Transformer [16] and S2SConv [17]. 7. ACKNOWLEDGMENT This work was supported by JST CREST Grant Number JP- MJCR1687 and JSPS KAKEN Grant Number 16H02845. acoustic models," in Acoustics, Speech and Signal Pro- cessing (ICASSP), 2018 IEEE International Conference on. IEEE, 2018, pp. 5809 -- 5813. [12] Andrew L Maas, Peng Qi, Ziang Xie, Awni Y Han- nun, Christopher T Lengerich, Daniel Jurafsky, and An- drew Y Ng, "Building dnn acoustic models for large vocabulary speech recognition," Computer Speech & Language, vol. 41, pp. 195 -- 213, 2017. [13] Dario Amodei, Sundaram Ananthanarayanan, Rishita Anubhai, Jingliang Bai, Eric Battenberg, Carl Case, Jared Casper, Bryan Catanzaro, Qiang Cheng, Guoliang Chen, et al., "Deep speech 2: End-to-end speech recog- nition in english and mandarin," in International Con- ference on Machine Learning, 2016, pp. 173 -- 182. [14] Junyoung Chung, Caglar Gulcehre, Kyunghyun Cho, and Yoshua Bengio, "Empirical evaluation of gated recurrent neural networks on sequence modeling," in NIPS 2014 Workshop on Deep Learning, December 2014, 2014. [15] Daniel Povey, Arnab Ghoshal, Gilles Boulianne, Lukas Burget, Ondrej Glembek, Nagendra Goel, Mirko Han- nemann, Petr Motlicek, Yanmin Qian, Petr Schwarz, et al., "The kaldi speech recognition toolkit," in IEEE 2011 workshop on automatic speech recognition and understanding. IEEE Signal Processing Society, 2011, number EPFL-CONF-192584. [16] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin, "Attention is all you need," in Ad- vances in Neural Information Processing Systems, 2017, pp. 5998 -- 6008. [17] Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin, "Convolutional sequence to sequence learning," in International Conference on Machine Learning, 2017, pp. 1243 -- 1252. 8. REFERENCES [1] Ilya Sutskever, Oriol Vinyals, and Quoc V Le, "Se- quence to sequence learning with neural networks," in Advances in neural information processing systems, 2014, pp. 3104 -- 3112. [2] Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton, "Speech recognition with deep recurrent neural networks," in Acoustics, speech and signal processing (icassp), 2013 IEEE international conference on. IEEE, 2013, pp. 6645 -- 6649. [3] Alex Graves and Navdeep Jaitly, "Towards end-to-end speech recognition with recurrent neural networks," in International Conference on Machine Learning, 2014, pp. 1764 -- 1772. [4] Dzmitry Bahdanau, Jan Chorowski, Dmitriy Serdyuk, Philemon Brakel, and Yoshua Bengio, "End-to-end attention-based large vocabulary speech recognition," in Acoustics, Speech and Signal Processing (ICASSP), 2016 IEEE International Conference on. IEEE, 2016, pp. 4945 -- 4949. [5] Song Han, Huizi Mao, and William J Dally, "Deep com- pression: Compressing deep neural networks with prun- ing, trained quantization and huffman coding," arXiv preprint arXiv:1510.00149, 2015. [6] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean, "Distill- ing the knowledge in a neural network," arXiv preprint arXiv:1503.02531, 2015. [7] Yoon Kim and Alexander M Rush, "Sequence-level in Proceedings of the 2016 knowledge distillation," Conference on Empirical Methods in Natural Language Processing, 2016, pp. 1317 -- 1327. [8] Jan K Chorowski, Dzmitry Bahdanau, Dmitriy Serdyuk, Kyunghyun Cho, and Yoshua Bengio, "Attention-based models for speech recognition," in Advances in neural information processing systems, 2015, pp. 577 -- 585. [9] Andros Tjandra, Sakriani Sakti, and Satoshi Nakamura, "Attention-based wav2text with feature transfer learn- in Automatic Speech Recognition and Under- ing," standing Workshop (ASRU), 2017 IEEE. IEEE, 2017, pp. 309 -- 315. [10] Has¸im Sak, F´elix de Chaumont Quitry, Tara Sainath, Kanishka Rao, et al., "Acoustic modelling with cd-ctc- smbr lstm rnns," in Automatic Speech Recognition and Understanding (ASRU), 2015 IEEE Workshop on. IEEE, 2015, pp. 604 -- 609. [11] Ryoichi Takashima, Sheng Li, and Hisashi Kawai, "An investigation of a knowledge distillation method for ctc
1807.01466
1
1807
2018-07-04T07:18:36
Polarity and Intensity: the Two Aspects of Sentiment Analysis
[ "cs.CL" ]
Current multimodal sentiment analysis frames sentiment score prediction as a general Machine Learning task. However, what the sentiment score actually represents has often been overlooked. As a measurement of opinions and affective states, a sentiment score generally consists of two aspects: polarity and intensity. We decompose sentiment scores into these two aspects and study how they are conveyed through individual modalities and combined multimodal models in a naturalistic monologue setting. In particular, we build unimodal and multimodal multi-task learning models with sentiment score prediction as the main task and polarity and/or intensity classification as the auxiliary tasks. Our experiments show that sentiment analysis benefits from multi-task learning, and individual modalities differ when conveying the polarity and intensity aspects of sentiment.
cs.CL
cs
Polarity and Intensity: the Two Aspects of Sentiment Analysis Leimin Tian School of Informatics the University of Edinburgh [email protected] Catherine Lai School of Informatics the University of Edinburgh [email protected] Johanna D. Moore School of Informatics the University of Edinburgh [email protected] 8 1 0 2 l u J 4 ] L C . s c [ 1 v 6 6 4 1 0 . 7 0 8 1 : v i X r a Abstract Current multimodal sentiment analysis frames sentiment score prediction as a general Machine Learning task. How- ever, what the sentiment score actually represents has often been overlooked. As a measurement of opinions and affective states, a sentiment score generally con- sists of two aspects: polarity and intensity. We decompose sentiment scores into these two aspects and study how they are con- veyed through individual modalities and combined multimodal models in a natu- ralistic monologue setting. In particular, we build unimodal and multimodal multi- task learning models with sentiment score prediction as the main task and polarity and/or intensity classification as the auxil- iary tasks. Our experiments show that sen- timent analysis benefits from multi-task learning, and individual modalities differ when conveying the polarity and intensity aspects of sentiment. Introduction 1 Computational analysis of human multimodal lan- guage is a growing research area in Natural Lan- guage Processing (NLP). One important type of information communicated through human multi- modal language is sentiment. Current NLP stud- ies often define sentiments using scores on a scale, e.g., a 5-point Likert scale representing senti- ments from strongly negative to strongly positive. Previous work on multimodal sentiment analysis has focused on identifying effective approaches for sentiment score prediction (e.g., Zadeh et al. (2018b)). However, in these studies sentiment score prediction is typically represented as a re- gression or classification task, without taking into account what the sentiment score means. As a measurement of human opinions and affective states, a sentiment score can often be decomposed into two aspects: the polarity and intensity of the sentiment. In this work, we study how individ- ual modalities and multimodal information convey these two aspects of sentiment. More specifically, we conduct experiments on the Carnegie Mellon University Multimodal Opin- ion Sentiment Intensity (CMU-MOSI) database (Zadeh et al., 2016). The CMU-MOSI database is a widely used benchmark database for mul- timodal sentiment analysis. It contains natural- istic monologues expressing opinions on various subjects. Sentiments are annotated as continu- ous scores for each opinion segment in the CMU- MOSI database, and data were collected over the vocal, visual, and verbal modalities. We build uni- modal and multimodal multi-task learning models with sentiment score regression as the main task, and polarity and/or intensity classification as the auxiliary tasks. Our main research questions are: 1. Does sentiment score prediction benefit from multi-task learning? 2. Do individual modalities convey the polarity and intensity of sentiment differently? 3. Does multi-task learning influence unimodal and multimodal sentiment analysis models in different ways? Our work contributes to our current understand- ing of the intra-modal and inter-modal dynamics of how sentiments are communicated in human multimodal language. Moreover, our study pro- vides detailed analysis on how multi-task learning and modality fusion influences sentiment analysis. 2 Background Sentiment is an important type of information con- veyed in human language. Previous sentiment analysis studies in the field of NLP have mostly been focused on the verbal modality (i.e., text). For example, predicting the sentiment of Twit- ter texts (Kouloumpis et al., 2011) or news ar- ticles (Balahur et al., 2013). However, human language is multimodal in, for instance, face-to- face communication and online multimedia opin- ion sharing. Understanding natural language used in such scenarios is especially important for NLP applications in Human-Computer/Robot Interac- tion. Thus, in recent years there has been grow- ing interest in multimodal sentiment analysis. The three most widely studied modalities in current multimodal sentiment analysis research are: vocal (e.g., speech acoustics), visual (e.g., facial expres- sions), and verbal (e.g., lexical content). These are sometimes referred to as "the three Vs" of communication (Mehrabian et al., 1971). Mul- timodal sentiment analysis research focuses on understanding how an individual modality con- veys sentiment information (intra-modal dynam- ics), and how they interact with each other (inter- modal dynamics). It is a challenging research area and state-of-the-art performance of automatic sen- timent prediction has room for improvement com- pared to human performance (Zadeh et al., 2018a). While multimodal approaches to sentiment analysis are relatively new in NLP, multimodal emotion recognition has long been a focus of Af- fective Computing. For example, De Silva and Ng (2000) combined facial expressions and speech acoustics to predict the Big-6 emotion categories (Ekman, 1992). Emotions and sentiments are closely related concepts in Psychology and Cog- nitive Science research, and are often used in- terchangeably. Munezero et al. (2014) identi- fied the main differences between sentiments and emotions to be that sentiments are more stable and dispositional than emotions, and sentiments are formed and directed toward a specific ob- ject. However, when adopting the cognitive def- inition of emotions which connects emotions to stimuli in the environment (Ortony et al., 1990), the boundary between emotions and sentiments blurs. In particular, the circumplex model of emo- tions proposed by Russell (1980) describes emo- tions with two dimensions: Arousal which rep- resents the level of excitement (active/inactive), and Valence which represents the level of lik- ing (positive/negative). In many sentiment anal- ysis studies, sentiments are defined using Likert scales with varying numbers of steps. For ex- ample, the Stanford Sentiment Treebank (Socher et al., 2013) used a 7-point Likert scale to annotate sentiments. Such sentiment annotation schemes have two aspects: polarity (positive/negative val- ues) and intensity (steps within the positive or neg- ative range of values). This similarity suggests connections between emotions defined in terms of Valence and Arousal, and sentiments defined with polarity and intensity, as shown in Table 1. How- ever, while previous work on multimodal emo- tion recognition often predicts Arousal and Va- lence separately, most previous work on multi- modal sentiment analysis generally predicts the sentiment score as a single number. Thus, we are motivated to study how the polarity and intensity aspects of sentiments are each conveyed. Aspect of the affect Activeness Emotion as by Arousal Russell (1980) Sentiment on a Likert scale Intensity Liking Valence Polarity Table 1: Similarity between circumplex model of emotion and Likert scale based sentiment. In order to decompose sentiment scores into po- larity and intensity and study how they are con- veyed through different modalities, we include po- larity and/or intensity classification as auxiliary tasks to sentiment score prediction with multi-task learning. One problem with Machine Learning approaches for Affective Computing is model ro- bustness. In multi-task learning, the model shares representations between the main task and auxil- iary tasks related to the main task, often enabling the model to generalize better on the main task (Ruder, 2017). Multiple auxiliary tasks have been used in previous sentiment analysis and emotion recognition studies. For example, Xia and Liu (2017) used dimensional emotion regression as an auxiliary task for categorical emotion classi- fication, while Chen et al. (2017) used sentence type classification (number of opinion targets ex- pressed in a sentence) as an auxiliary task for ver- bal sentiment analysis. To the best of our knowl- edge, there has been no previous work applying multi-task learning to the CMU-MOSI database. In addition to how individual modalities convey sentiment, another interesting topic in multimodal sentiment analysis is how to combine information from multiple modalities. There are three main types of modality fusion strategies in current mul- timodal Machine Learning research (Baltrusaitis et al., 2018): early fusion which combines features from different modalities, late fusion which com- bines outputs of unimodal models, and hybrid fu- sion which exploits the advantages of both early and late fusion. We will study the performance of these different modality fusion strategies for mul- timodal sentiment analysis. 3 Methodology 3.1 The CMU-MOSI Database The CMU-MOSI database contains 93 YouTube opinion videos from 89 distinct speakers (Zadeh et al., 2016). The videos are monologues on var- ious topics recorded with various setups, lasting from 2 to 5 minutes. 2199 opinion segments were manually identified from the videos with an average length of 4.2 seconds (approximately 154 minutes in total). An opinion segment is the expression of opinion on a distinct subject, and can be part of a spoken utterance or consist of several consecutive utterances. Zadeh et al. (2016) collected sentiment score annotations of the opinion segments using Amazon Mechanical Turk and each video clip was annotated by five workers. For each opinion segment the sentiment scores are annotated on a 7-point Likert scale, i.e., strongly negative (-3), negative (-2), weakly negative (-1), neutral (0), weakly positive (+1), positive (+2), strongly positive (+3). The gold- standard sentiment score annotations provided are the average of all five workers. Previous work on the CMU-MOSI database ex- plored various approaches to improving perfor- mance of sentiment score prediction (e.g., Zadeh et al. (2018b)). The target sentiment annotations can be continuous sentiment scores or discrete sentiment classes (binary, 5-class, or 7-class senti- ment classes). The Tensor Fusion Network model of Zadeh et al. (2017) achieved the best perfor- mance for continuous sentiment score regression on the CMU-MOSI database using features from all three modalities. The Pearson's correlation co- efficient between the automatic predictions of their model and the gold-standard sentiment score an- notations reached 0.70. In this work, we follow the parameter settings and features used by Zadeh et al. (2017) when predicting the sentiment scores. 3.2 Multimodal Sentiment Analysis with Multi-Task Learning In this study, we apply multi-task learning to sen- timent analysis using the CMU-MOSI database. We consider predicting the gold-standard senti- ment scores as the main task. Thus, the single- task learning model is a regression model predict- ing the sentiment score So of an opinion segment o, which has a value within range [-3,+3]. To perform multi-task learning, for each opinion seg- ment, we transform the gold-standard sentiment score So into binary polarity class Po and inten- sity class Io: (cid:40) Po = Positive, Negative, if So ≥ 0 if So < 0  Io = Strong, Medium, Weak, Neutral, if So ≥ 2.5 if 1.5 ≤ So < 2.5 if 0.5 ≤ So < 1.5 if So < 0.5 (1) (2) Unlike previous studies performing a 5-class or 7-class classification experiment for sentiment analysis, our definition of intensity classes uses the absolute sentiment scores, thus separating the po- larity and intensity information. For example, an opinion segment o1 with So1 = +3.0 will have Po1 = Positive and Io1 = Strong, while an opinion seg- ment o2 with So2 = -2.75 will have Po2 = Negative and Io2 = Strong. Note that here we group the sen- timent scores into discrete intensity classes. In the future we plan to study the gain of preserving the ordinal information between the intensity classes. For each modality or fusion strategy we build four models: single-task sentiment regression model, bi-task sentiment regression model with polarity classification as the auxiliary task, bi-task sentiment regression model with intensity classi- fication as the auxiliary task, and tri-task senti- ment regression model with both polarity and in- tensity classification as the auxiliary tasks. In the bi-task and tri-task models, the main task loss is assigned a weight of 1.0, while the auxiliary task losses are assigned a weight of 0.5. Structures of the single-task and multi-task learning models only differ at the output layer: for sentiment score regression the output is a single node with tanh ac- tivation; for polarity classification the output is a single node with sigmoid activation; for intensity classification the output is 4 nodes with softmax activation. The main task uses mean absolute er- ror as the loss function, while polarity classifica- tion uses binary cross-entropy as the loss function, and intensity classification uses categorical cross- entropy as the loss function. Following state-of- the-art on the CMU-MOSI database (Zadeh et al., 2017), during training we used Adam as the opti- mization function with a learning rate of 0.0005. We use the CMU Multimodal Data Software De- velopment Kit (SDK) (Zadeh et al., 2018a) to load and pre-process the CMU-MOSI database, which splits the 2199 opinion segments into train- ing (1283 segments), validation (229 segments), and test (686 segments) sets.1 We implement the sentiment analysis models using the Keras deep learning library (Chollet et al., 2015). 3.3 Multimodal Features For the vocal modality, we use the COVAREP fea- ture set provided by the SDK. These are 74 vocal features including 12 Mel-frequency cepstral co- efficients, pitch tracking and voiced/unvoiced seg- menting features, glottal source parameters, peak slope parameters, and maxima dispersion quo- tients. The vocal features are extracted from the audio recordings at a sampling rate of 100Hz. For the visual modality, we use the FACET feature set provided by the SDK. These are 46 visual features including facial indicators of 9 types of emotion (anger, contempt, disgust, fear, joy, sadness, sur- prise, frustration, and confusion) and movements of 20 facial action units. The visual features are extracted from the speaker's facial region in the video recordings at a sampling rate of 30Hz. Fol- lowing Zadeh et al. (2017), for the vocal and vi- sual unimodal models, we apply a drop-out rate of 0.2 to the features and build a neural network with three hidden layers of 32 ReLU activation units, as shown in Figure 1. Figure 1: Visual/vocal unimodal tri-task model For the verbal modality, we use the word em- 1Segment 13 of video 8qrpnFRGt2A is partially missing and thus removed for the experiments. bedding features provided by the SDK, which are 300-dimensional GloVe word vectors. There are 26,295 words in total (3,107 unique words) in the opinion segments of the CMU-MOSI database. Following Zadeh et al. (2017), for the verbal uni- modal model we build a neural network with one layer of 128 Long Short-Term Memory (LSTM) units and one layer of 64 ReLU activation units, as shown in Figure 2. Previous work has found that context information is important for multimodal sentiment analysis, and the use of LSTM allows us to include history (Poria et al., 2017). Figure 2: Verbal unimodal tri-task model Note that the visual and vocal features are ex- tracted at the frame level, while the verbal features are extracted at the word level. Before conduct- ing all unimodal and multimodal experiments, we aligned all the features to the word level using the SDK. This down-samples the visual and vocal fea- tures to the word level by computing the averaged feature vectors for all frames within a word. 3.4 Modality Fusion Strategies We test four fusion strategies here: Early Fusion (EF), Tensor Fusion Network (TFN), Late Fusion (LF), and Hierarchical Fusion (HF). EF and LF are the most widely used fusion strategies in multi- modal recognition studies and were shown to be effective for multimodal sentiment analysis (Po- ria et al., 2015). TFN achieved state-of-the-art performance on the CMU-MOSI database (Zadeh et al., 2017). HF is a form of hybrid fusion strat- egy shown to be effective for multimodal emotion recognition (Tian et al., 2016). The structure of the EF model is shown in Fig- ure 3. The feature vectors are simply concatenated in the EF model. A drop-out rate of 0.2 is applied to the combined feature vector. We then stack one layer of 128 LSTM units and three layers of 32 ReLU units with an L2 regularizer weight of 0.01 on top of the multimodal inputs. To compare per- formance of the fusion strategies, this same struc- ture is applied to the multimodal inputs in all mul- timodal models. In the TFN model, we compute the Cartesian products (shown in Figure 4) of the unimodal model top layers as the multimodal in- puts. Unlike Zadeh et al. (2017), we did not add the extra constant dimension with value 1 when computing the 3-fold Cartesian space in order to reduce the dimensionality of the multimodal in- put. In the LF model, as shown in Figure 5, we concatenate the unimodal model top layers as the multimodal inputs. In the HF model, unimodal information is used in a hierarchy where the top layer of the lower unimodal model is concatenated with the input layer of the higher unimodal model, as shown in Figure 6. We use the vocal modality at the bottom of the hierarchy while using the verbal modality at the top in HF fusion. This is because in previous studies (e.g., Zadeh et al. (2018a)) the verbal modality was shown to be the most effec- tive for unimodal sentiment analysis, while the vo- cal modality was shown to be the least effective. Figure 3: Structure of EF tri-task model Figure 4: Fusion strategy of the TFN model (Zadeh et al., 2017) 4 Experiments and Results Here we report our sentiment score prediction ex- periments.2 In Tables 2 and 3, "S" is the single- task learning model; "S+P" is the bi-task learn- ing model with polarity classification as the aux- illary task; "S+I" is the bi-task learning model with intensity classification as the auxillary task; "S+P+I" is the tri-task learning model. To evalu- ate the performance of sentiment score prediction, following previous work (Zadeh et al., 2018a), we 2Source code available at: https://github.com/ tianleimin/. Figure 5: Structure of LF tri-task model Figure 6: Structure of HF tri-task model report both Pearson's correlation coefficient (CC, higher is better) and mean absolute error (MAE, lower is better) between predictions and annota- tions of sentiment scores on the test set. In each row of Tables 2 and 3, the numbers in bold are the best performance for each modality or fusion strategy. To identify the significant differences in results, we perform a two-sample Wilcoxon test on the sentiment score predictions given by each pair of models being compared and consider p < 0.05 as significant. We also include random prediction as a baseline and the human performance reported by Zadeh et al. (2017). 4.1 Unimodal Experiments The results of unimodal sentiment prediction ex- periments are shown in Table 2.3 The verbal mod- els have the best performance here, which is con- sistent with previous sentiment analysis studies on multiple databases (e.g., Zadeh et al. (2018a)). This suggests that lexical information remains the most effective for sentiment analysis. On each modality, the best performance is achieved by a multi-task learning model. This answers our first research question and suggests that sentiment analysis can benefit from multi-task learning. 3All unimodal models have significantly different per- formance. p = 0.009 for S+P and S+P+I Visual models, p << 0.001 for Visual and Vocal S+I models. UnimodalLanguage(zl)Acoustic(za)Visual(zv)EarlyFusionUnimodalLanguage(zl)Acoustic(za)Visual(zv)TensorFusionzlzvzaza⊗zvzl⊗zazl⊗zvzl⊗zv⊗za In multi-task learning, the main task gains addi- tional information from the auxillary tasks. Com- pared to the S model, the S+P model has increased focus on the polarity of sentiment, while the S+I model has increased focus on the intensity of sen- timent. On the verbal modality, the S+P model achieved the best performance, while on the vi- sual modality the S+I model achieved the best per- formance. This suggests that the verbal modal- ity is weaker at communicating the polarity of sentiment. Thus, verbal sentiment analysis ben- efits more from including additional information on polarity. On the contrary, the visual modal- ity is weaker at communicating the intensity of sentiment. Thus, visual sentiment analysis ben- efits more from including additional information on intensity. For the vocal modality, the S+P+I model achieved the best performance, and the S+P model yielded improved performance over that of the S model. This suggests that the vocal modality is weaker at communicating the polarity of senti- ment. Thus, addressing our second research ques- tion, the results suggest that individual modalities differ when conveying each aspect of sentiment. S – 0.125 0.092 0.404 0.820 CC Random Vocal Visual Verbal Human MAE Random 1.880 1.456 Vocal Visual 1.442 1.196 Verbal Human 0.710 S S+P – 0.149 0.109 0.455 – S+P – 1.471 1.439 1.156 – S+I – 0.119 0.116 0.434 – S+I – 1.444 1.453 1.181 – S+P+I – 0.153 0.106 0.417 – S+P+I – 1.431 1.460 1.206 – Table 2: Unimodal sentiment analysis results on the CMU-MOSI test set. Numbers in bold are the best results on each modality. results 4.2 Multimodal Experiments The experi- ments are shown in Table 3. We find that EF>HF>TFN>LF.4 The reason that the EF model yields the best performance may be that it the multimodal of 4Performance of multimodal models are significantly dif- ferent, except that the HF S and the TFN S+P model have p = 0.287. p = 0.001 for EF S+P+I and HF S, p = 0.017 for TFN S+P and LF S. is the least complex. This is shown to be beneficial for the small CMU-MOSI database (Poria et al., 2015). Unlike Zadeh et al. (2017), here the EF model outperforms the TFN model. However, the TFN model achieved the best performance on the training and validation sets. This indicates that performance of the TFN model may be limited by over-fitting. Compared to the feature concatenation used in EF, the Cartesian product used in TFN results in higher dimensionality of the multimodal input vector,5 which in turn increases the complexity of the model. Similarly, the HF model has worse performance than the EF model here, unlike in Tian et al. (2016). This may be due to the HF model having the deepest structure with the most hidden layers, which increases its complexity. The performance of unimodal and multimodal models are significantly different. In general, the multimodal models have better performance than the unimodal models.6 Unlike unimodal models, multimodal models benefit less from multi-task learning. In fact, the HF and LF models have bet- ter performance using single-task learning. For the TFN models, only the S+P model outperforms the S model, although the improvement is not sig- nificant.7 For the EF models, multi-task learning results in better performance.8 The reason that EF benefits from multi-task learning may be that it combines modalities without bias and individ- ual features have more influence on the EF model. Thus, the benefit of multi-task learning is pre- served in EF. However, the other fusion strategies (TFN, LF, HF) attempt to compensate one modal- ity with information from other modalities, i.e., re- lying more on other modalities when one modal- ity is weaker at predicting an aspect of sentiment. In Section 4.1 we showed that each modality has different weaknesses when conveying the polarity or intensity aspect of sentiment. The multimodal models are able to overcome such weaknesses by modality fusion. Thus, multi-task learning does not yield additional improvement in these models. Our observations answer our third research ques- tion: multi-task learning influences unimodal and 5Dimension of the EF input is 420, for TFN is 65,536. 6Except that the LF models often have worse performance than the verbal S+P model. p << 0.001 for TFN S+P and verbal S+P, p = 0.017 for verbal S+P and LF S. 7p = 0.105 for S TFN and S+P TFN. 8p = 0.888 for S EF and S+P EF, p = 0.029 for S EF and S+I EF, p = 0.009 for S EF and S+P+I EF. multimodal sentiment analysis differently. S – S 0.471 0.448 0.454 0.469 0.820 CC Random EF TFN LF HF Human MAE Random 1.880 1.197 EF TFN 1.186 1.179 LF 1.155 HF Human 0.710 S+P – 0.472 0.461 0.413 0.424 – S+P – 1.181 1.181 1.211 1.211 – S+I – 0.476 0.446 0.428 0.458 – S+I – 1.193 1.178 1.204 1.164 – S+P+I – 0.482 0.429 0.428 0.432 – S+P+I – 1.172 1.205 1.201 1.187 – Table 3: Multimodal sentiment analysis results on the CMU-MOSI test set. Numbers in bold are the best results for each fusion strategy in each row. 5 Discussion Our unimodal experiments in Section 4.1 show that unimodal sentiment analysis benefits signifi- cantly from multi-task learning. As suggested by Wilson (2008), polarity and intensity can be con- veyed through different units of language. We can use one word such as extremely to express inten- sity, while the polarity of a word and the polar- ity of the opinion segment the word is in may be opposite. Our work supports a fine-grained sen- timent analysis. By including polarity and inten- sity classification as the auxiliary tasks, we illus- trate that individual modalities differ when con- veying sentiment. In particular, the visual modal- ity is weaker at conveying the intensity aspect of sentiment, while the vocal and verbal modalities are weaker at conveying the polarity aspect of sen- timent. In previous emotion recognition studies under the circumplex model of emotions (Rus- sell, 1980), it was found that the visual modality is typically weaker at conveying the Arousal di- mension of emotion, while the vocal modality is typically weaker at conveying the Valence dimen- sion of emotion (e.g., Nicolaou et al. (2011)). The similarities between the performance of different communication modalities on conveying emotion dimensions and on conveying different aspects of sentiment indicate a connection between emotion dimensions and sentiment. The different behav- iors of unimodal models in conveying the polarity and intensity aspects of sentiment also explain the improved performance achieved by modality fu- sion in Section 4.2 and in various previous stud- ies. By decomposing sentiment scores into po- larity and intensity, our work provides detailed understanding on how individual modalities and multimodal information convey these two aspects of sentiment. We are aware that performance of our senti- ment analysis models leaves room for improve- ment compared to state-of-the-art on the CMU- MOSI database. One reason may be that we did not perform pre-training in this study. In the fu- ture, we plan to explore more advanced learning techniques and models, such as a Dynamic Fu- sion Graph (Zadeh et al., 2018b), to improve per- formance. We also plan to perform case studies to provide detailed analysis on how the unimodal models benefit from multi-task learning, and how individual modalities compensate each other in the multimodal models. 6 Conclusions In this work, we decouple Likert scale sentiment scores into two aspects: polarity and intensity, and study the influence of including polarity and/or intensity classification as auxiliary tasks to senti- ment score regression. Our experiments showed that all unimodal models and some multimodal models benefit from multi-task learning. Our uni- modal experiments indicated that each modality conveys different aspects of sentiment differently. In addition, we observed similar behaviors be- tween how individual modalities convey the po- larity and intensity aspects of sentiments and how they convey the Valence and Arousal emotion di- mensions. Such connections between sentiments and emotions encourage researchers to obtain an integrated view of sentiment analysis and emotion recognition. Our multimodal experiments showed that unlike unimodal models, multimodal models benefit less from multi-task learning. This sug- gests that one reason that modality fusion yields improved performance in sentiment analysis is its ability to combine the different strengths of indi- vidual modalities on conveying sentiments. Note that we only conducted experiments on the CMU-MOSI database. In the future, we plan to expand our study to multiple databases. More- over, we are interested in including databases col- lected on modalities beyond the three Vs. For ex- ample, gestures or physiological signals. We also plan to perform sentiment analysis and emotion recognition in a multi-task learning setting to fur- ther explore the relationship between sentiments and emotions. Acknowledgments We would like to thank Zack Hodari for his support on computational resources, and Jennifer Williams for the insightful discussion. References Alexandra Balahur, Ralf Steinberger, Mijail Kabad- jov, Vanni Zavarella, Erik Van Der Goot, Matina Halkia, Bruno Pouliquen, and Jenya Belyaeva. 2013. arXiv preprint Sentiment analysis in the news. arXiv:1309.6202. Tadas Baltrusaitis, Chaitanya Ahuja, and Louis- Philippe Morency. 2018. Multimodal machine IEEE Transac- learning: A survey and taxonomy. tions on Pattern Analysis and Machine Intelligence. Tao Chen, Ruifeng Xu, Yulan He, and Xuan Wang. 2017. Improving sentiment analysis via sentence type classification using BiLSTM-CRF and CNN. Expert Systems with Applications, 72:221–230. Franc¸ois Chollet et al. 2015. Keras. https:// keras.io. Liyanage C De Silva and Pei Chi Ng. 2000. Bimodal emotion recognition. In FG, pages 332–335. IEEE. Paul Ekman. 1992. An argument for basic emotions. Cognition & Emotion, 6(3-4):169–200. Efthymios Kouloumpis, Theresa Wilson, and Jo- hanna D Moore. 2011. Twitter sentiment analysis: ICWSM, 11(538- The good the bad and the omg! 541):164. Albert Mehrabian et al. 1971. Silent messages, vol- ume 8. Wadsworth Belmont, CA. Myriam D Munezero, Calkin Suero Montero, Erkki Su- tinen, and John Pajunen. 2014. Are they different? affect, feeling, emotion, sentiment, and opinion de- tection in text. IEEE Transactions on Affective Com- puting, 5(2):101–111. Mihalis A Nicolaou, Hatice Gunes, and Maja Pantic. 2011. Continuous prediction of spontaneous af- fect from multiple cues and modalities in valence- arousal space. IEEE Transactions on Affective Com- puting, 2(2):92–105. Andrew Ortony, Gerald L Clore, and Allan Collins. 1990. The cognitive structure of emotions. Cam- bridge University Press. Soujanya Poria, Erik Cambria, and Alexander Gel- bukh. 2015. Deep convolutional neural network textual features and multiple kernel learning for utterance-level multimodal sentiment analysis. In Proceedings of the 2015 conference on empiri- cal methods in natural language processing, pages 2539–2544. Soujanya Poria, Erik Cambria, Devamanyu Hazarika, Navonil Majumder, Amir Zadeh, and Louis-Philippe Morency. 2017. Context-dependent sentiment anal- ysis in user-generated videos. In Proceedings of the 55th Annual Meeting of the Association for Compu- tational Linguistics (Volume 1: Long Papers), vol- ume 1, pages 873–883. Sebastian Ruder. 2017. An overview of multi-task learning in deep neural networks. arXiv preprint arXiv:1706.05098. James A Russell. 1980. A circumplex model of af- fect. Journal of Personality and Social Psychology, 39(6):1161. Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment tree- bank. In EMNLP, pages 1631–1642. Leimin Tian, Johanna Moore, and Catherine Lai. 2016. Recognizing emotions in spoken dialogue with hi- erarchically fused acoustic and lexical features. In SLT, pages 565–572. IEEE. Theresa Ann Wilson. 2008. Fine-grained subjectiv- ity and sentiment analysis: recognizing the intensity, polarity, and attitudes of private states. University of Pittsburgh. Rui Xia and Yang Liu. 2017. A multi-task learning framework for emotion recognition using 2d contin- IEEE Transactions on Affective Com- uous space. puting, 8(1):3–14. A Zadeh, PP Liang, S Poria, P Vij, E Cambria, and LP Morency. 2018a. Multi-attention recurrent net- work for human communication comprehension. In AAAI. Amir Zadeh, Minghai Chen, Soujanya Poria, Erik Cambria, and Louis-Philippe Morency. 2017. Ten- sor fusion network for multimodal sentiment analy- sis. In EMNLP, pages 1103–1114. Amir Zadeh, Paul Pu Liang, Jon Vanbriesen, Soujanya Poria, Erik Cambria, Minghai Chen, and Louis- Philippe Morency. 2018b. Multimodal language analysis in the wild: CMU-MOSEI dataset and in- terpretable dynamic fusion graph. In Association for Computational Linguistics (ACL). Amir Zadeh, Rowan Zellers, Eli Pincus, and Louis- Philippe Morency. 2016. Multimodal sentiment in- tensity analysis in videos: Facial gestures and verbal messages. IEEE Intelligent Systems, 31(6):82–88.
1703.00786
1
1703
2017-03-02T13:52:47
A Generic Online Parallel Learning Framework for Large Margin Models
[ "cs.CL", "cs.LG" ]
To speed up the training process, many existing systems use parallel technology for online learning algorithms. However, most research mainly focus on stochastic gradient descent (SGD) instead of other algorithms. We propose a generic online parallel learning framework for large margin models, and also analyze our framework on popular large margin algorithms, including MIRA and Structured Perceptron. Our framework is lock-free and easy to implement on existing systems. Experiments show that systems with our framework can gain near linear speed up by increasing running threads, and with no loss in accuracy.
cs.CL
cs
A Generic Online Parallel Learning Framework for Large Margin Models Shuming Ma and Xu Sun MOE Key Laboratory of Computational Linguistics, Peking University School of Electronics Engineering and Computer Science, Peking University {shumingma, xusun}@pku.edu.cn 7 1 0 2 r a M 2 ] L C . s c [ 1 v 6 8 7 0 0 . 3 0 7 1 : v i X r a Abstract To speed up the training process, many existing systems use parallel technology for online learning algorithms. However, most research mainly focus on stochastic gradient descent (SGD) instead of other algorithms. We propose a generic online parallel learning framework for large mar- gin models, and also analyze our frame- work on popular large margin algorithms, including MIRA and Structured Percep- tron. Our framework is lock-free and easy to implement on existing systems. Exper- iments show that systems with our frame- work can gain near linear speed up by in- creasing running threads, and with no loss in accuracy. 1 Introduction Large margin models have been widely used in natural language processing for faster learning rate and smaller computational cost. However, the al- gorithms may still suffer from slow training time when training examples are extremely massive, the weight vector is large, or the inference process is slow. With parallel algorithms, we can make better use of our multi-core machine and reduce the time cost of training process. Unluckily, most studies about parallel algo- rithms mainly focus on SGD. Recht et.al (2011) first proposed a lock-free parallel SGD algorithm called HOGWILD. It is a simple and effective algorithm which outperforms non-parallel algo- rithms by an order of magnitude. Lian et.al (2015) provide theoretical analysis of asynchronous par- allel SGD for nonconvex optimization and a more precise description for lock-free implementation on shared memory system. Zinkevich et.al (2010) proposed a parallel algo- rithm for multi-machine called Parallel Stochas- tic Gradient Descent (PSGD). PSGD is an effec- tive parallel approach on distributed machine but Recht et.al (2011) found that it is not as promis- ing as HOGWILD on a single machine. Zhao and Li (2016) propose a fast asynchronous parallel SGD approach with convergence guarantee. The method has a much faster convergence rate than HOGWILD. To the best of our knowledge, there is no re- lated research about asynchronous parallel method for large margin models. McDonald et.al (2010) proposed a distributed structured perceptron algo- rithm but it needs multi-machine. We first pro- pose a generic online parallel learning framework for large margin models. In our framework, each thread updates the weight vector independently without any extra operation or lock. Besides, we analyze the performance of structured perceptron and Margin Infused Relaxed Algorithm (MIRA) in our framework. The contribution of our frame- work can be outlined as follow: • Our framework is generic and suitable for most of the large margin algorithms. It is sim- ple and can be easily implemented on exist- ing systems with large margin models. • The framework does not use extra memory. Experiments show that the memory cost is no more than single-thread algorithm. Besides, the parallel framework works on a shared memory system so we have no need to care about the data exchange. 2 Generic Parallel Learning Framework Suppose we have a training dataset with N sam- ples denoted as {(xi, yi)}N i=1, where xi is a se- quence (usually a sentence in natural language Algorithm 1 The Generic Parallel Framework Input: training set S with N samples 1: initialize: weight vector w = 0, v = 0 2: for t = 1 to T do 3: Random shuffle training set S Split training set into K part {Si}K for all threads parallel do 4: 5: 6: 7: 8: 9: i=1 Inference for update term Φi Update wi+1 with Φi v = v + wi+1 i = i + 1 end for 10: 11: end for Output: the learned weights www∗ = vvv/(N ∗ T ) processing) and yi is a structure on sequence xi (usually a tag list or a tree). The whole dataset is trained with T passes. We denote the weight vec- tor as w and after ith update the weight vector will be wi. In each pass, the online learning algorithm will shuffle the dataset after which the weight vector is updated with each sample in the dataset. Gen- erally, gradient-based algorithms like SGD take a lot of time to compute the gradient. Large margin algorithms like perceptron and MIRA spend most of time in decoding. Popular approach to speed up inference process is to take approximate inference instead of exact inference (Huang et al., 2012). However, we can parallel the inference process of several samples and update asynchronously to fur- ther accelerate the training process (Sun, 2016). In our parallel framework, we split the dataset into k parts and then assign these split datasets to k threads. Each thread updates independently with a shared memory system. After that, we av- erage the weight vector by the number of iterations (not the number of threads as some distributed par- allel algorithms). We can see that our approach has no more computation than large margin algo- rithms, so it is a simple parallel framework. Since the whole framework runs on a shared memory system, there are mainly two problems about this framework: First, several threads update at the same time so it may be closer to minibatch al- gorithm instead of online learning algorithm intu- itively. Whether the parallel framework will affect the convergence rate of online learning algorithm is a problem. Second, when a thread is work- ing, the weight vector may be overwritten by other threads. Whether it will lead to divergence is an- other problem need to be analyzed. For the first problem, Lian et.al (2015) proved that the convergence rate will not be affected un- der the parallel SGD framework. Our experiments also support that the convergence rate of large margin algorithms is still the same in our parallel framework. For the second problem, Recht et.al (2011) shows that individual SGD steps only mod- ify a small part of the decision variable so mem- ory overwrites are rare and barely any error will be made into the computation. We will also explain this problem on large margin models in Section 3. Experiments show that our parallel algorithm is so robust that the interference among threads will not affect the convergence. In our framework we also average the weight vector by the number of itera- tions. One reason is that Collins (2002) explains that averaging parameter helps advoid overfitting. Another advantage is that we can ensure every up- date will contribute to the final learned weight vec- tor. 3 Large Margin Models In this section, we will introduce some popular large margin algorithms and analyze their perfor- mance under our parallel framework. 3.1 MIRA Crammer and Singer (2003) developed a large margin algorithm called MIRA and later extended by Taskar et.al (?). The algorithm has been widely used in many popular models (McDonald et al., 2005). It tries to minimize kwk so that the mar- gin between output score s(x, z) and correct score s(x, y) is larger than the loss of output structure: minimizekwk st. ∀z ∈ GEN (x) s(x, y) − s(x, z) ≥ L(y, z) During the inference process, the algorithm manages to find out the output structure with the highest score. However, in our parallel framework weight vector can be overwritten so we may not get the 1-best structure. Actually, it does not mat- ter because the binary feature representation is so sparse that the output score is still close to 1-best score. We can say that the margin between output score and correct score is larger than the loss, so the margin between 1-best score and correct score will still satisfy the constrain. Chunking Speed Up Bio−NER Speed Up 6 5 4 3 2 1 ) s e m i t ( p U d e e p S 0 0 2 4 6 Number of threads 6 5 4 3 2 1 ) s e m i t ( p U d e e p S MIRA Perc 8 10 0 0 2 4 6 Number of threads MIRA Perc 8 10 5 4.5 4 3.5 3 2.5 2 1.5 1 0.5 ) s e m i t ( p U d e e p S 0 0 2 POS−tag Speed Up 4 6 Number of threads MIRA Perc 8 10 Figure 1: Speed up of our parallel framework. 3.2 Structured Perceptron Structured perceptron is first proposed by Collins (2002). It proves to be an effective and efficient structured prediction algorithm with con- vergence guarantee for separable data (Sun et al., 2009, 2013; Sun, 2015). We denote the binary feature representation of sequence x and structure y to be f (x, y). The set of structure candidates for the input sequence x is denoted as GEN (x). Structured perceptron searches the space of GEN (x) and finds the output z with highest score f (x, z) · w. The weight vector w then updates with the output z. In our parallel framework, the inference and up- date of different samples runs parallel. The infer- ence and update for structured perceptron can be descibed as: z = argmaxt∈GEN (x)f (x, t) · w w = w + f (x, y) − f (x, z) (1) (2) During the inference, although the weight vector may be modified, we can still ensure that the score of the output z is higher than that of correct struc- ture y. Huang et.al (2012) proved that if each up- date involves a violation (the output has a higher model score than the correct structure), structured perceptron algorithm is bound to converge. There- fore, our parallel framework on structure percep- tron is effective theoretically. 4 Experiments We compare our parallel framework and non- parallel large margin algorithms on several bench- mark datasets. 4.1 Experiment Tasks Part-of-Speech Tagging (POS-tag): Part of Speech Tagging is a famous and important task in natural language processing. Following the prior work (Collins, 2002), we derives the dataset from Penn Wall Street Journal Treebank (Marcus et al., 1993). We use sections 0-18 of the treebank as training set while sections 19-21 is development set and sections 22-24 is test set. The selected fea- ture is including unigrams and bigrams of neigh- boring words as well as lexical patterns of current word (Tsuruoka et al., 2011). We report the accu- racy of output tag as evaluation metric. The dataset Phrase Chunking (Chunking): In Phrase Chunking task, we tag the words in the se- I or O to identify the quence to be B, noun phrases. is extracted from the CoNLL-2000 shallow-parsing shared task (Tjong Kim Sang and Buchholz, 2000). The fea- ture includes word n-grams and part-of-speech n- grams. Our evaluation metric is F-score following prior works. Biomedical Named Entity Recognition (Bio- NER): Biomedical Named Entity Recognition is mainly about the recognition of 5 kinds of biomed- ical named entities. The dataset is from MED- LINE biomedical text corpus. We use word pat- tern features and part-of speech features in our model (Tsuruoka et al., 2011). The evaluation metric is F-score. 4.2 Experiment Setting We implement our parallel framework with large margin algorithms, including structured percep- tron and MIRA on above benchmark datasets. We use development set to tune the learning rate α0 and L2 regularization. The final learning rate α0 is set as 0.02, 0.05, 0.005 for above three tasks, and L2 regularization is 1, 0.5, 5. We implement a single-thread framework as our baseline. The setting of baseline is totally the same as our proposed framework. For fair com- 94.6 94.4 94.2 94 93.8 93.6 93.4 93.2 ) % ( e r o c S − F 93 0 20 94.8 94.6 94.4 94.2 94 93.8 93.6 93.4 ) % ( e r o c S − F 93.2 0 20 Perc:Chunking 1−thread 4−thread 10−thread 80 100 40 60 Number of iteration 72 71.5 71 70.5 70 69.5 69 68.5 68 ) % ( e r o c S − F 67.5 0 20 Perc:Bio−NER 97.2 Perc:POS−tag ) % ( y c a r u c c A 97.15 97.1 97.05 97 96.95 96.9 0 20 1−thread 4−thread 10−thread 80 100 40 60 Number of iteration 40 60 Number of iteration 1−thread 4−thread 10−thread 80 100 MIRA:Chunking MIRA:Bio−NER 72.5 97.2 MIRA:POS−tag ) % ( e r o c S − F 72 71.5 71 70.5 70 69.5 69 68.5 68 0 20 1−thread 4−thread 10−thread 80 100 ) % ( y c a r u c c A 97.15 97.1 97.05 97 96.95 96.9 96.85 0 20 1−thread 4−thread 10−thread 80 100 1−thread 4−thread 10−thread 80 100 40 60 Number of iteration 40 60 Number of iteration 40 60 Number of iteration Figure 2: Experiment Results on the benchmark datasets. 1 Chunking Number of threads Perc 94.40 MIRA 94.56 Perc 71.83 MIRA 71.75 Perc 97.17 MIRA 97.13 Bio-NER POS-tag 4 94.46 94.50 71.90 71.70 97.18 97.15 10 94.50 94.53 71.80 71.91 97.10 97.15 Table 1: Accuracy/F-score of baseline and our framework. 1 Chunking Number of threads Perc 1.0x MIRA 1.0x Perc 1.0x MIRA 1.0x Perc 1.0x MIRA 1.0x Bio-NER POS-tag 4 3.0x 3.7x 3.0x 3.0x 3.3x 3.4x 10 5.5x 4.7x 5.0x 4.6x 4.4x 4.4x Table 2: Speed up of our framework. parison, we also average the parameters of the baseline. We run our parallel framework up to 10 threads following prior work (Recht et al., 2011). We compare our parallel framework with base- line in accuracy/F-score and time cost. Experi- ments are performed on a computer with Intel(R) Xeon(R) 3.0GHz CPU. 4.3 Experiment Result Figure 1 shows that our parallel algorithm can gain near linear speed up. With 10 threads, our frame- work brings 4-fold to 6-fold faster speed than that with only 1 thread. Table 2 shows the speed up in our benchmark datasets with 1,4 and 10 threads. Figure 2 also shows that our parallel framework has no loss in accuracy/F-score or convergence rate compared with single-thread baseline. Table 1 indicates that our framework does not hurt large margin algorithm because the difference of results is very small. In other words, there is barely inter- ference among threads, and the strong robustness of large margin algorithm ensures no loss in per- formance under the parallel framework. 5 Conclusions We propose a generic online parallel learning framework for large margin models. Our experi- ment concludes that the proposed framework has no loss in performance compared with baseline while the training speed up is near linear with in- creasing running threads. 6 Acknowledgements This work was supported in part by National Natu- ral Science Foundation of China (No. 61673028), and National High Technology Research and De- velopment Program of China (863 Program, No. Xu Sun, Takuya Matsuzaki, and Wenjie Li. 2013. La- tent structured perceptrons for large-scale learning with hidden information. IEEE Trans. Knowl. Data Eng. 25(9):2063 -- 2075. Xu Sun, Takuya Matsuzaki, Daisuke Okanohara, and Jun'ichi Tsujii. 2009. Latent variable perceptron al- gorithm for structured classification. In Proceedings of the 21st International Joint Conference on Artifi- cial Intelligence (IJCAI 2009). pages 1236 -- 1242. Erik F Tjong Kim Sang and Sabine Buchholz. 2000. Introduction to the conll-2000 shared task: Chunk- ing. In Proceedings of the 2nd workshop on Learn- ing language in logic and the 4th conference on Computational natural language learning-Volume 7. Association for Computational Linguistics, pages 127 -- 132. Yoshimasa Tsuruoka, Yusuke Miyao, and Jun'ichi Kazama. 2011. Learning with lookahead: can history-based models rival globally optimized mod- els? In Proceedings of the Fifteenth Conference on Computational Natural Language Learning. Associ- ation for Computational Linguistics, pages 238 -- 246. Shen-Yi Zhao and Wu-Jun Li. 2016. Fast asyn- chronous parallel stochastic gradient descent: A lock-free approach with convergence guarantee . Martin Zinkevich, Markus Weimer, Lihong Li, and Alex J Smola. 2010. Parallelized stochastic gradient descent. In Advances in neural information process- ing systems. pages 2595 -- 2603. 2015AA015404). Xu Sun is the corresponding au- thor of this paper. References Michael Collins. 2002. Discriminative training meth- ods for hidden markov models: Theory and exper- iments with perceptron algorithms. In Proceedings of the ACL-02 conference on Empirical methods in natural language processing-Volume 10. Associa- tion for Computational Linguistics, pages 1 -- 8. Koby Crammer and Yoram Singer. 2003. Ultracon- servative online algorithms for multiclass problems. The Journal of Machine Learning Research 3:951 -- 991. Liang Huang, Suphan Fayong, and Yang Guo. 2012. Structured perceptron with inexact search. In Pro- ceedings of the 2012 Conference of the North Amer- ican Chapter of the Association for Computational Linguistics: Human Language Technologies. Asso- ciation for Computational Linguistics, pages 142 -- 151. Xiangru Lian, Yijun Huang, Yuncheng Li, and Ji Liu. 2015. Asynchronous parallel stochastic gradient for nonconvex optimization. In Advances in Neural In- formation Processing Systems. pages 2719 -- 2727. Mitchell P Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. 1993. Building a large annotated corpus of english: The penn treebank. Computa- tional linguistics 19(2):313 -- 330. Ryan McDonald, Koby Crammer, and Fernando Pereira. 2005. Online large-margin training of de- pendency parsers. In Proceedings of the 43rd an- nual meeting on association for computational lin- guistics. Association for Computational Linguistics, pages 91 -- 98. Ryan McDonald, Keith Hall, and Gideon Mann. 2010. Distributed training strategies for the structured per- ceptron. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Lin- guistics. Association for Computational Linguistics, pages 456 -- 464. Benjamin Recht, Christopher Re, Stephen Wright, and Feng Niu. 2011. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In Ad- vances in Neural Information Processing Systems. pages 693 -- 701. Xu Sun. 2015. Towards shockingly easy struc- tured classification: A search-based probabilis- tic online learning framework. Technical report, arXiv:1503.08381 . Xu Sun. 2016. Asynchronous parallel learning for neu- ral networks and structured models with dense fea- tures. In COLING.
1806.10771
1
1806
2018-06-28T05:09:38
Rich Character-Level Information for Korean Morphological Analysis and Part-of-Speech Tagging
[ "cs.CL" ]
Due to the fact that Korean is a highly agglutinative, character-rich language, previous work on Korean morphological analysis typically employs the use of sub-character features known as graphemes or otherwise utilizes comprehensive prior linguistic knowledge (i.e., a dictionary of known morphological transformation forms, or actions). These models have been created with the assumption that character-level, dictionary-less morphological analysis was intractable due to the number of actions required. We present, in this study, a multi-stage action-based model that can perform morphological transformation and part-of-speech tagging using arbitrary units of input and apply it to the case of character-level Korean morphological analysis. Among models that do not employ prior linguistic knowledge, we achieve state-of-the-art word and sentence-level tagging accuracy with the Sejong Korean corpus using our proposed data-driven Bi-LSTM model.
cs.CL
cs
Rich Character-Level Information for Korean Morphological Analysis and Part-of-Speech Tagging Andrew Matteson, Chanhee Lee, Heuiseok Lim∗ Korea University {amatteson, chanhee0222, limhseok}@korea.ac.kr Young-Bum Kim Amazon Alexa [email protected] Abstract 8 1 0 2 n u J 8 2 ] L C . s c [ 1 v 1 7 7 0 1 . 6 0 8 1 : v i X r a Due to the fact that Korean is a highly agglutinative, character-rich language, previous work on Korean morphological analysis typically employs the use of sub-character features known as graphemes or otherwise utilizes comprehensive prior linguistic knowledge (i.e., a dictionary of known morphological transformation forms, or actions). These models have been created with the assumption that character-level, dictionary-less morphological analysis was intractable due to the number of actions required. We present, in this study, a multi-stage action-based model that can perform morphological transformation and part-of-speech tagging using arbitrary units of input and apply it to the case of character-level Korean morphological analysis. Among models that do not employ prior linguistic knowledge, we achieve state-of-the-art word and sentence- level tagging accuracy with the Sejong Korean corpus using our proposed data-driven Bi-LSTM model. 1 Introduction Korean has traditionally posed a challenge for word segmentation and morphological analysis. In ad- dition to virtually unbounded vocabulary sizes, out-of-vocabulary (OOV) rates for models can be high. Korean is an agglutinative, phonetic language with a SOV (Subject-Object-Verb) syntax and a flexible word order, although certain word orders are considered to be "canonical". Honorifics, conditionals, im- peratives, and other forms are all signified using agglutinative endings which sometimes involve trans- formation of the stem to which they attach. Some endings can be further combined or fused to other endings in a defined order, and furthermore, morphological transformation rules also apply during this process. Transformation rules are mostly consistent at the grapheme level and can be represented by a handful of spelling rules, but many irregular forms do exist. In Unicode, Hangul (Korean alphabet) characters are allocated 11,140 codepoints. Each character contains an initial consonant, vowel, and final consonant represented in C+V+C, C+V, or V+C form. In Unicode, the form is always assumed to be C+V+C and the initial or final consonants are set to null according to the desired target form. Consonants and vowels are considered to be sub-character units called graphemes. Each character is represented using a combination of 19 initial consonants (including null), 21 vowels, and 27 final consonants (including null), and there is a mathematical formula that can be used to combine graphemes to generate the codepoint of a Hangul character. The character "ьҗ " (gim) can be represented in C+V+C form as follows. Initial Consonant ㄱ(g) Vowel ㅣ(i) Final Consonant ㅁ(m) The Korean language has "fusion" spelling rules that apply across character boundaries (within an agglutinative unit), which implies that morphological transformation may occur among adjacent ∗ Corresponding author This work is licensed under a Creative Commons Attribution 4.0 International License. License details: http://creativecommons.org/licenses/by/4.0/ Morphemes # 1 나(na)/VV + юҕ (neun)/ETM 2 ю҉ᆯ(nal)/VV + юҕ (neun)/ETM 3 나(na)/NP + юҕ (neun)/JX 4 나(na)/NNP + юҕ (neun)/JX 5 나(na)/VX + юҕ (neun)/ETM Table 1: Ambiguous parses of Eojeol "na- neun" # (3) (2) Eojeol 나юҕ na-neun 하юҕ nҎ ha-neul-e 나юҕ na-neun ѕᅢёҕ sae-leul ѓґn҉ᆻ다 Morphemes 나(na)/NP + юҕ (neun)/JX 하юҕ (ha-neul)/NNG + nҎ(e)/JKB ю҉ᆯ(nal)/VV + юҕ (neun)/ETM ѕᅢ(sae)/NNG + ёҕ (leul)/JKO ѓґ(bo)/VV + n҉ᆻ(ass)/EP bo-ass-da. + 다(da)/EF + ./SF Table 2: Correct transformation and tag sequence for sample sentence containing ambiguous Eojeol "na-neun". # corresponds to correct parse sequence in Table 1, only labeled here for "na-neun". graphemes. When the final consonant of one character meets the initial consonant of the next char- acter during verb inflection, there may be a change in the resulting combined character. This presents character-level embeddings with a unique challenge that is not present in most other languages. In order to avoid confusion of terminology, we must define the precise meaning of morphological analysis in the context of Korean. For most languages, morphological analysis refers to a word-level tag that describes the aspect, tense, plurality, and other features of the word, whereas part-of-speech (POS) tagging serves to classify the word as a noun, verb, etc. The POS tag is sometimes concatenated to the morphological tag string as in the POSMORPH annotation employed by Heigold, et al (2016a). In Korean, morphological analysis refers to the segmentation and restoration of morphemes within a "word" unit called an Eojeol and the POS tagging of each constituent morpheme. An Eojeol encodes not only lexical information but also grammatical information due to the agglutinative nature of the Korean language. The recovered morpheme segments often include a stem and other morphemes which indicate tense or other linguistic features. Traditional Korean morphological analysis algorithms operate at the Eojeol level and yield all ambiguous parses (Table 1) that lead to that particular Eojeol, including the morpheme transformations and tags. However, the model1 proposed in this paper receives input at the sentence level and attempts to produce the one correct sequence of transformations and tags for all Eojeol within the sentence according to the context (Table 2). 2 Related Work Morphological analysis of the Korean language has traditionally been performed in several ways, in- cluding separation of Korean characters into graphemes by using linguistic knowledge, lattice tree lookup (Park et al., 2010), application of regular and irregular inflection rules (Kang and Kim, 1992), morphosyntactic rule sets, and by using a pre-computed dictionary (Shim and Yang, 2004). However, we investigate whether morphological analysis of Korean is feasible without the use of any of these techniques and without a dictionary by making the assumption that common transformations and their underlying grapheme modifications can be easily recognized and learned with a Bi-LSTM model. Bi-LSTM-CRFs BIO annotation (Sang and Veenstra, 1999). Huang, et al (2015) show their effectiveness for POS tagging, chunk- ing, named entity recognition (NER). These models show state-of-the-art accuracy at several tasks. tagging with for sequential have been used Similar models have also been proposed in universal morphological analysis. Heigold, et al (2016b) show how a nested LSTM architecture can be applied to word-level morphological tagging for a wide variety of languages. At the lower level, an LSTM network is used for character-level embedding to 1Model source code is made available at https://github.com/xtknight/rich-morphological-tagger reduce OOV errors. However, this work does not investigate how such a model would operate for the most widely used Korean Sejong Corpus. Sub-character tagging has also been attempted. Dong, et al (2016) demonstrate how radical-level features incorporated at the character-level for named entity recognition achieve state-of-the-art accuracy for Chinese. The most convincing attempt to tag Korean at the morpheme level is by Choi, et al (2016) who achieve state-of-the-art (dictionary-less) performance by using a multi-stage Bi-LSTM-CRF model that involves the splitting of Korean character input into constituent graphemes. However, the implicit assumption that Korean characters must first be split into graphemes to achieve optimal performance for morphological analysis is not well supported, and we should consider the splitting of characters into graphemes to be employing linguistic knowledge specific to Korean. In our paper, we seek to answer the question of whether Korean morphemes can be tagged without grapheme-level splitting, rules specific to the language, or a dictionary. Although we initially considered Bi-LSTM-CRF for our model architecture, we show that the performance benefit by adding CRF is minimal and practically unnecessary compared to a standard Bi-LSTM model. Furthermore, CRF adds training and inference computational complexity due to the Viterbi algorithm. 3 Lemma and Form Alignment ьᅩ(go) іґ (tong) ѕҕ(seu) B-KEEP B-KEEP ѕҕёҍ (seu-reob) ьᅩіґ (go-tong) I-KEEP ㄴ(n) ёҍ (reon) I-MOD-ёҍ , B-MOD-ㄴ ьᅩіґ (go-tong) ѕҕёҍ (seu-reob) ㄴ(n) ETM NNG XSA Figure 1: Gold morphological transformation actions given by alignment oracle, including the resulting mor- phemes after running the BIO actions (Sejong corpus) Figure 2: Gold tagging actions (Sejong corpus) In the Sejong corpus, Eojeol are annotated with their corresponding POS-tagged morpheme con- stituents, exactly as shown in Table 2. As mentioned earlier, morpheme spelling transformations may occur, and therefore the morpheme constituents may have slightly different graphemes than what is present in the original Eojeol form. To generate our training data, we must align the Eojeol form and its constituent morphemes at the character level, as we forbid using linguistic knowledge such as sub- character elements (graphemes) in our model. Like most agglutinative languages, the Eojeol form and lemmas (morphemic elements in the Sejong corpus) often share overlapping characters at the beginning or end, and we utilize this assumption in our algorithm. Gold Action B-KEEP I-KEEP B-MOD-하(ha), B-MOD-ㄴ(n) NOOP B-MOD:하(ha), B-MOD-n҉ᆻ(ass) B-MOD:nᅵ(i), B-MOD-ㄴ(n) B-MOD:하(ha), B-MOD-아(a) I-MOD:하(ha), B-MOD-아(a) B-MOD:яt(doe), B-MOD-ㄴ(n) B-MOD:하(ha), B-MOD-ㄹ(l) Count 23,725,534 8,650,166 153,130 131,016 61,592 58,093 57,515 48,987 41,335 36,419 Table 3: Top 10 morphing actions We present an action-based algorithm (called an "alignment oracle") to align two arbitrary strings. Our oracle attempts to generate a 1:1 character-level mapping between the morphological form and the lemmas of an Eojeol by searching for a prefix, suffix, and modified inner string portion. Three primary actions are defined: KEEP (no modification to character), NOOP (drop character), and MOD (modify character). In the case of Korean, morphological transformations happen at the end of a form, so there is rarely a common suffix unless no transformation occurs at all. These primary actions are then augmented with B- and I- actions to facilitate morpheme segmentation. It is important to note that our algorithm is not specific in any way to the Sejong corpus or Korean itself. The full process is demonstrated in Figure 1 starting from the source form. The gold untagged seg- mented lemma form is shown in the bottom row, and the actions generated by the oracle to generate the lemma are given in the middle row. The first three characters (go-tong-seu) are preserved with KEEP ac- tions and the last character is considered the "modified inner string". In this case, the number of actions (5) exceeds the number of full input characters (4), and therefore two actions are assigned to the last character which split the "reon" syllable into "reob" and "n". The output after morpheme segmentation can be seen in the bottom row. In Figure 2, these output morphemes are then placed through a standard sequential tagger to assign part-of-speech tags. Figure 3: Actions for transformation with output segmentation For Korean, the task is considerably more complicated. Rather than merely character-level trans- formation, new morpheme boundaries based on the results of those transformations are also required. A segmentation module adds B-/I- (beginning and inside) annotations to the KEEP and MOD actions. These actions allow morpheme segmentation to take place even amidst the modified character output sequence. This is detailed in Figure 1, where the final consonant sub-character unit ("n") of the last character of input ("reon") is transformed to "b" and the resulting fused full character is appended to the previous output morpheme, whereas the "n" sub-character unit becomes separated and represented as an entirely new morpheme itself. The top 10 resulting actions for the Sejong corpus on the form and lemma alignment stage are shown in Table 3. 4 The Model Our model makes the assumption that in order to support morphological analysis for languages like Korean, two stages are required, which we call morphing and tagging. For tasks such as morphological transformation, word-level morphological analysis, or morpheme segmentation, only one stage is strictly necessary. To obtain tags for morphemes following morphological transformation, as in Korean, both stages are necessary, with tagging following morphing. The stages have no fundamental difference from each other: the second stage simply acts on the result of applying actions output by the first stage. Each stage outputs a single action for a single input unit. A single action could be as simple as a tag or as complicated as information resulting in advanced multi-character transformation along with the specification of the morphemic segments of those resulting characters. Model parameters are trained independently for each stage unless otherwise specified. The model presented in this paper is inspired by word-level morphological analysis work by Heigold, et al (2016a) with the goal of allowing analysis at arbitrary units of input at each stage. Because we do not specify whether the input unit should be a word, morpheme, character, or even a unit at the sub-character level (such as graphemes in Korean or radicals in Chinese), we theoretically have the flexibility to tag a variety of languages at any level. We employ a bidirectional Long Short-Term Memory (Hochreiter and Schmidhuber, 1997; Graves and Schmidhuber, 2005) network in our model and also experiment with optimization to a condi- tional random field (CRF) objective (Lafferty et al., 2001). In theory, CRF allows us to consider the like- lihood of neighboring outputs and therefore jointly decode the highest probable chain of output labels for Figure 4: Partial example of two-stage tagging process for Korean phrase "to point out the sea" a given set of inputs. Although we posit that CRF is not strictly necessary, the overall architecture of our model is otherwise identical to a standard Bi-LSTM-CRF sequence tagging model (Huang et al., 2015) used for POS tagging and NER. An overview of the architecture is shown in Figure 4. The input unit is embedded as a multi- dimensional vector. At the input level, an auxiliary attribute may be concatenated with the input unit to include auxiliary information for the unit, such as word break-level information, although empiri- cal findings indicate our model performs best when using only the input unit. Nested embeddings as in (2016a) may also be appended at the input level. All embeddings are concatenated to form a combined embedding which is then passed to the primary Bi-LSTM-CRF network and trained against a set of output actions. Whitespace delimiting Eojeols is represented as a reserved spacing token in the input unit. Although each stage is independent and can accept an arbitrary unit of input suitable for any lan- guage, the following sections describe how this model pertains to our primary task of morpheme-level morphological analysis for the Korean language. 4.1 Morphing The first stage of the model operates at the character level and is responsible for morphological trans- formation of the input form into the desired output lemma(s). During training, each input character is assigned one of three primary types by the alignment oracle as described in Section 3. Morpheme seg- mentation actions are also generated and augmented to the transformation actions at this stage for proper morpheme boundary identification. During inference, instead of using the alignment oracle, one action (including transformation and B-/I- tags) is predicted for each character based on trained parameters. At this point, tags are not yet assigned to each output morpheme. 4.2 Tagging After the necessary morphological transformation and segmentation, tagging occurs at the morpheme level and acts on output produced by actions in the first stage of the model. An example of this is shown in Figure 2. In this stage, the action is simply to assign a POS tag to the morpheme, which is the input unit. 5 Experiments 5.1 Datasets We conduct experiments using the full Sejong Korean Balanced Corpus dataset. The experiments are coded in Python using the TensorFlow library. The Sejong Corpus has been preprocessed to resolve punctuation inconsistencies and other surface-level errors. All datasets are converted at the sentence- level to a simple two-column format with each line containing an input unit and target action. For all experiments, we follow an 85/10/5 cross-validation split for training, testing, and validation sets respectively. All data is randomly shuffled prior to splitting. Actions are inferred from the dataset by using lemma and form alignment. For evaluation, output from predicted actions in the first stage is used as input to the subsequent stage. U niT agger represents the model proposed in this paper. The following number (for example, 500) represents the maximum action count for the morphing stage. The tagging stage only has as many actions as possible POS tags (45 in the Sejong corpus, including the reserved space token). Action pruning is performed at the training level, which removes from the training set the least common morphological transformation actions generated by the alignment oracle. For fair evaluation, actions are not removed from validation or test sets. All accuracy figures in this paper are reported based on a held-out test set. 5.2 Training Optimization is performed using Adam (Kingma and Ba, 2014) with a learning rate of 0.001 and decay of 0.9. In the case of multi-stage models, model parameters are optimized independently for each stage. We use identical hyperparameters for all morphing and tagging models. Input unit embedding size was set to 300 (for character and morpheme input). The final Bi-LSTM concatenating all embeddings before an optional CRF layer was used with an LSTM unit size of 300. Batch size was set to 64 for all experiments, except for the CRF experiment where it was set to 16. The maximum LSTM input length was set at a per-batch level which yielded optimal performance, and the maximum number of input units (whether characters or morphemes) was limited to 400 in both stages. A dropout of 10% was used for the reported model with best performance. Dropout is only applied at the unit embedding layer. Epoch count was set to 100 with early-stopping after 3 epochs with no improvement in validation set performance. Experiments were performed on GTX 1080 Ti 11GB GPUs. Average total training duration was around 5 hours for the entire Sejong dataset on a GTX 1080 Ti. In TensorFlow, the NVIDIA CuDNN-optimized LSTM was used (Appleyard et al., 2016). 5.3 Results In Table 4, we show Eojeol-level morphological analysis accuracy for Korean. Note here that an Eojeol is considered correctly tagged only if all its constituent morphemes have been transformed, segmented, and tagged properly. Table 5 measures sentence-level tagging performance, which is the accuracy of all morphemes being transformed and tagged properly. 5.4 Analysis and Discussion Our results show that our model can outperform previous state-of-the-art performance for Eojeol and sentence-level morphological analysis of Korean without linguistic knowledge. When the dropout factor is adjusted, all metrics follow a similar trend as seen in Figure 5. Sentence accuracy is most sensitive to dropout factor adjustment. Best performance is achieved with a dropout rate of 10%, and increasing the dropout rate further does not increase Eojeol-level OOV accuracy. This is a positive finding, as it indicates the model is not considerably overfitting to the training data beyond approximately the 10% level. In Figure 6, a 300-dimensional unit embedding layer of the morphing stage is visualized using 2- component t-SNE. The corresponding gold actions are shown in Table 6, where all past tense morphemes end with final consonant "ㅆ" (ss). The model is able to infer that most of the forms shown in the Model Lee, et al. (2005) Ahn, et al. (2007) Lee, et al. (2009) Choi, et al. (2016) UniTagger-500 Accuracy 92.96 93.12 92.95 94.89 96.20 Table 4: End-to-end Eojeol-level accuracy for morphological analysis of Korean (Sejong Cor- pus) Model Choi, et al. (2016) Bi-LSTM-CRF UniTagger-500 Model Type Bi-LSTM Acc 61.00 70.83 Form ю҉ᆻ(nass) ѕ҉ᆻ(sass) n҉ᆻ(jass) ї҉ (pass) яt (daess) јҊ (haess) юҏ (nyeoss) ёҏ (ryeoss) ѕҏ (syeoss) nҏ (jieoss) ьҏ (gyeoss) nt (oass) юt (noass) Gold Action B-나 + B-n҉ᆻ B-사 + B-n҉ᆻ B-자 + B-n҉ᆻ B-파 + B-n҉ᆻ B-яt + B-nҍ B-하 + B-n҉ᆻ B-юᅵ + B-nҍ B-ёᅵ + B-nҍ B-ѕᅵ + B-nҍ B-nᅵ + B-nҍ B-ьᅵ + B-nҍ B-nґ + B-n҉ᆻ B-юґ + B-n҉ᆻ nt (chuweoss) B-nt + B-nҍ Table 5: End-to-end sentence-level accuracy for morphological analysis of Korean (Sejong Corpus) Table 6: Past tense morphing actions shown in embedding and gold actions from Sejong cor- pus Model Choi, et al. (2016) Bi-LSTM-CRF UniTagger-500 Model Type Bi-LSTM Acc 67.25 79.49 Table 7: Eojeol-level OOV accuracy graph represent the past tense and that they share a similar transformation pattern at the final consonant grapheme level. This shows that our model is able to correlate similar sub-character level morphological transformations even when operating at the character level. Furthermore, it is worth noting that Chinese characters still occur rarely in the Korean language in certain contexts. We can see Chinese characters grouped in a cluster, which shows that the model is able to distinguish one character-rich language (Korean) from another (Chinese). Other characters, such as punctuation, are also grouped by type in largely distinct clusters with occasional overlap. Joint training of both stages was also attempted, though an initial investigation suggests that perfor- mance is not significantly different from training each stage's parameters independently. The use of using an auxiliary binary break level attribute to represent whitespace was also investigated, but significantly higher accuracy was achieved by using a reserved spacing token instead. Despite the auxiliary break level attribute embedding, both stages of the model have a tendency to learn ambiguous morpheme transformations for adjacent Eojeol. In other words, even though the morpheme transforma- tion and tags are correct, the Eojeol boundaries were incorrectly identified. With the reserved spacing token, this issue was extremely rare. 6 Conclusion and Future Work In this work, we address the commonly held notion that Korean can not be tagged with competitive performance at the character level without prior linguistic knowledge. Our model architecture is not novel compared to previous work. The novelty of our morphological analyzer is its striking simplic- ity compared to previous approaches for character-rich languages such as Korean. The alignment ora- cle does not require any cost value for alignment operations such as in the Needleman–Wunsch algo- rithm (Needleman and Wunsch, 1970). The Bi-LSTM model is able to learn and utilize alignments that are purely arbitrary and apply them to unseen test data. Even when significantly limiting the number ] % [ y c a r u c c A 98 94 90 86 82 78 74 70 66 62 58 0 10 20 30 40 50 60 Dropout [%] Correct Eojeol Correct OOV Eojeol Correct Sentences Figure 5: Impact of dropout on end-to-end tagging performance Figure 6: Deep embeddings of characters at the morphing stage (t-SNE) of actions in the training data, we show that by using the most common morphological transformation actions in an agglutinative language, we can exceed the performance of a model that uses linguistic knowledge such as sub-character features. We also show that the widely used CRF layer may in fact be unnecessary for high performance and add unnecessary computational complexity. This exceeded our own expectations and raises the possibility that a single architecture can handle tagging universally with only two simple Bi-LSTM stages. We contribute the necessary source code to replicate the experiments and to attempt alignment and training for any other language, assuming a corpus exists. Nevertheless, there are several points that future work should address. Out-of-vocabulary morphemes generated by the morphing stage can also result in errors at the tag- ging stage, as the tagging stage was trained on the assumption of gold morphemes. We would like to experiment with including possible morpheme transformation errors at the tagging stage to determine if tagging performance can be improved. We attempted joint training but found that end-to-end accuracy was marginally lower. We suspect this is because optimization of each individual stage is hindered by attempting to find optimal parameters for both stages. Future work should attempt joint training of an end-to-end model with the preinitialized parameters from optimizing each stage independently, which has been shown to be ideal in sequential models (Tang et al., 2016). Lastly, although we are unaware of a language more character-rich and more morphologically complex than Korean, we would like to see our model applied to other morphologically complex languages to prove its universality. At the time of writing, we lacked sufficient baseline figures and methodology for generating training data for analyzing other languages at the morpheme level using the Universal Dependencies corpus, and the morphological tags were often conflated with part-of-speech tags. The baselines we found did not specify whether or not morpheme segmentation was taken into account. Without this information, it would be difficult to prove the performance of our model for other languages and we decided to leave training other languages as future work. That being said, our model does not employ any linguistic knowledge specific to Korean, and we therefore have no reason to believe it cannot be trained on any other arbitrary corpus with minor modifications at the preprocessing level. Acknowledgements This research was supported by the MSIT (Ministry of Science and ICT), South Korea, under the ITRC (Information Technology Research Center) support program ("Research and Development of Human- Inspired Multiple Intelligence") supervised by the IITP (Institute for Information & Communications Technology Promotion). Additionally, this work was supported by the National Research Foundation of Korea (NRF) grant funded by the South Korean government (MSIP) (No. NRF-2016R1A2B2015912). References Young-Min Ahn and Young-Hoon Seo. 2007. Korean part-of-speech tagging using disambiguation rules for ambiguous word and statistical information. IEEE International Conference on Convergence Information Tech- nology, pages 1598–1601. Jeremy Appleyard, Tomáš Kociský, and Phil Blunsom. 2016. Optimizing performance of recurrent neural net- works on gpus. arXiv, (1604.01946). Jihun Choi, Jonghem Youn, and Sang goo Lee. 2016. A grapheme-level approach for constructing a korean mor- phological analyzer without linguistic knowledge. IEEE International Conference on Big Data, pages 3872– 3879. Chuanhai Dong, Jiajun Zhang, Chengqing Zong, Masanori Hattori, and Hui Di. 2016. Character-based lstm- crf with radical-level features for chinese named entity recognition. International Conference on Computer Processing of Oriental Languages, pages 239–250. A. Graves and J. Schmidhuber. 2005. Framewise phoneme classification with bidirectional lstm and other neural network architectures. Neural Networks, 18(5–6):602–610. Georg Heigold, Guenter Neumann, and Josef van Genabith. 2016a. Neural morphological tagging from characters for morphologically rich languages. arXiv, (1606.06640). Georg Heigold, Guenter Neumann, and Josef van Genabith. 2016b. Scaling character-based morphological tag- ging to fourteen languages. IEEE International Conference on Big Data. Sepp Hochreiter and Jurgen Schmidhuber. 1997. Long short-term memory. Neural Computation, 9(8):1735– 1780. Zhiheng Huang, Wei Xu, and Kai Yu. 2015. Bidirectional lstm-crf models for sequence tagging. arXiv, (1508.01991). Seungshik Kang and Yungtaek Kim. 1992. A computational analysis model of irregular verbs in korean morpho- logical analyzer. Journal of Korea Information Science Society, 19(2):151–164. Diederik Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv, (1412.6980). J. Lafferty, A. McCallum, and F. Pereira. 2001. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. Proceedings of ICML. Do-Gil Lee and Hae-Chang Rim. 2005. Probabilistic models for korean morphological analysis. Companion to the Proceedings of the International Joint Conference on Natural Language Processing, pages 197–202. Do-Gil Lee and Hae-Chang Rim. 2009. Probabilistic modeling of korean morphology. IEEE Transactions on Audio, Speech, and Language Processing, 17(5):945–955. Saul B. Needleman and Christian D. Wunsch. 1970. A general method applicable to the search for similarities in the amino acid sequence of two proteins. Journal of Molecular Biology. Sangwon Park, D Choi, E Kim, and K.-S Choi. 2010. A plug-in component-based korean morphological analyzer. Tjong Kim Sang and Jorn Veenstra. 1999. Representing text chunks. EACL '99 Proceedings of the ninth confer- ence on European chapter of the Association for Computational Linguistics, pages 173–179. Gwang-Seob Shim and Jae-Hyung Yang. 2004. High speed korean morphological analysis based on adjacency condition check. KIISE: Software and Applications, 31(1):89–99. Hao Tang, Weiran Wang, Kevin Gimpel, and Karen Livescu. 2016. End-to-end training approaches for discrimi- native segmental models. IEEE Spoken Language Technology Workshop. This figure "chinese_characters.png" is available in "png"(cid:10) format from: http://arxiv.org/ps/1806.10771v1 This figure "past_tenses4.png" is available in "png"(cid:10) format from: http://arxiv.org/ps/1806.10771v1
1507.01839
2
1507
2015-08-03T15:36:45
Dependency-based Convolutional Neural Networks for Sentence Embedding
[ "cs.CL", "cs.AI", "cs.LG" ]
In sentence modeling and classification, convolutional neural network approaches have recently achieved state-of-the-art results, but all such efforts process word vectors sequentially and neglect long-distance dependencies. To exploit both deep learning and linguistic structures, we propose a tree-based convolutional neural network model which exploit various long-distance relationships between words. Our model improves the sequential baselines on all three sentiment and question classification tasks, and achieves the highest published accuracy on TREC.
cs.CL
cs
Dependency-based Convolutional Neural Networks for Sentence Embedding∗ Mingbo Ma† Liang Huang† ‡ †Graduate Center & Queens College City University of New York {mma2,lhuang}gc.cuny.edu 5 1 0 2 g u A 3 ] L C . s c [ 2 v 9 3 8 1 0 . 7 0 5 1 : v i X r a Abstract In sentence modeling and classification, convolutional neural network approaches have recently achieved state-of-the-art re- sults, but all such efforts process word vec- tors sequentially and neglect long-distance dependencies. To combine deep learn- ing with linguistic structures, we pro- pose a dependency-based convolution ap- proach, making use of tree-based n-grams rather than surface ones, thus utlizing non- local interactions between words. Our model improves sequential baselines on all four sentiment and question classification tasks, and achieves the highest published accuracy on TREC. Introduction 1 Convolutional neural networks (CNNs), originally invented in computer vision (LeCun et al., 1995), has recently attracted much attention in natural language processing (NLP) on problems such as sequence labeling (Collobert et al., 2011), seman- tic parsing (Yih et al., 2014), and search query retrieval (Shen et al., 2014). In particular, recent work on CNN-based sentence modeling (Kalch- brenner et al., 2014; Kim, 2014) has achieved ex- cellent, often state-of-the-art, results on various classification tasks such as sentiment, subjectivity, and question-type classification. However, despite their celebrated success, there remains a major limitation from the linguistics perspective: CNNs, being invented on pixel matrices in image process- ing, only consider sequential n-grams that are con- secutive on the surface string and neglect long- distance dependencies, while the latter play an im- portant role in many linguistic phenomena such as negation, subordination, and wh-extraction, all of which might dully affect the sentiment, subjectiv- ity, or other categorization of the sentence. ∗ This work was done at both IBM and CUNY, and was supported in part by DARPA FA8750-13-2-0041 (DEFT), and NSF IIS-1449278. We thank Yoon Kim for sharing his code, and James Cross and Kai Zhao for discussions. Bing Xiang‡ Bowen Zhou‡ ‡IBM Watson Group T. J. Watson Research Center, IBM {lhuang,bingxia,zhou}@us.ibm.com Indeed, in the sentiment analysis literature, re- searchers have incorporated long-distance infor- mation from syntactic parse trees, but the results are somewhat inconsistent: some reported small improvements (Gamon, 2004; Matsumoto et al., 2005), while some otherwise (Dave et al., 2003; Kudo and Matsumoto, 2004). As a result, syn- tactic features have yet to become popular in the sentiment analysis community. We suspect one of the reasons for this is data sparsity (according to our experiments, tree n-grams are significantly sparser than surface n-grams), but this problem has largely been alleviated by the recent advances in word embedding. Can we combine the advan- tages of both worlds? So we propose a very simple dependency-based convolutional neural networks (DCNNs). Our model is similar to Kim (2014), but while his se- quential CNNs put a word in its sequential con- text, ours considers a word and its parent, grand- parent, great-grand-parent, and siblings on the de- pendency tree. This way we incorporate long- distance information that are otherwise unavail- able on the surface string. Experiments on three classification tasks demonstrate the superior performance of our DCNNs over the baseline sequential CNNs. In particular, our accuracy on the TREC dataset outperforms all previously published results in the literature, including those with heavy hand-engineered features. Independently of this work, Mou et al. (2015, unpublished) reported related efforts; see Sec. 3.3. 2 Dependency-based Convolution The original CNN, first proposed by LeCun et al. (1995), applies convolution kernels on a se- ries of continuous areas of given images, and was adapted to NLP by Collobert et al. (2011). Fol- lowing Kim (2014), one dimensional convolution operates the convolution kernel in sequential order in Equation 1, where xi ∈ Rd represents the d di- mensional word representation for the i-th word in Figure 1: Dependency tree of an example sentence from the Movie Reviews dataset. the sentence, and ⊕ is the concatenation operator. from the i-th word to the (i + j)-th word: Therefore(cid:101)xi,j refers to concatenated word vector Sequential word concatenation (cid:101)xi,j works as n-gram models which feeds local information into convolution operations. However, this setting can not capture long-distance relationships unless we enlarge the window indefinitely which would in- evitably cause the data sparsity problem. (cid:101)xi,j = xi ⊕ xi+1 ⊕ ··· ⊕ xi+j (1) In order to capture the long-distance dependen- cies we propose the dependency-based convolu- tion model (DCNN). Figure 1 illustrates an exam- ple from the Movie Reviews (MR) dataset (Pang and Lee, 2005). The sentiment of this sentence is obviously positive, but this is quite difficult for sequential CNNs because many n-gram windows would include the highly negative word “short- comings”, and the distance between “Despite” and “shortcomings” is quite long. DCNN, however, could capture the tree-based bigram “Despite – shortcomings”, thus flipping the sentiment, and the tree-based trigram “ROOT – moving – sto- ries”, which is highly positive. 2.1 Convolution on Ancestor Paths We define our concatenation based on the depen- dency tree for a given modifier xi: xi,k = xi ⊕ xp(i) ⊕ ··· ⊕ xpk−1(i) (2) where function pk(i) returns the i-th word’s k-th ancestor index, which is recursively defined as: pk(i) =(cid:40)p(pk−1(i)) i if k > 0 if k = 0 (3) Figure 2 (left) illustrates ancestor paths patterns with various orders. We always start the convo- lution with xi and concatenate with its ancestors. If the root node is reached, we add “ROOT” as dummy ancestors (vertical padding). For a given tree-based concatenated word se- quence xi,k, the convolution operation applies a filter w ∈ Rk×d to xi,k with a bias term b de- scribed in equation 4: ci = f (w · xi,k + b) (4) where f is a non-linear activation function such as rectified linear unit (ReLu) or sigmoid function. The filter w is applied to each word in the sen- tence, generating the feature map c ∈ Rl: c = [c1, c2,··· , cl] where l is the length of the sentence. (5) 2.2 Max-Over-Tree Pooling and Dropout The filters convolve with different word concate- nation in Eq. 4 can be regarded as pattern detec- tion: only the most similar pattern between the words and the filter could return the maximum ac- tivation. In sequential CNNs, max-over-time pool- ing (Collobert et al., 2011; Kim, 2014) operates over the feature map to get the maximum acti- vation c = max c representing the entire feature map. Our DCNNs also pool the maximum activa- tion from feature map to detect the strongest ac- tivation over the whole tree (i.e., over the whole sentence). Since the tree no longer defines a se- quential “time” direction, we refer to our pooling as “max-over-tree” pooling. In order to capture enough variations, we ran- domly initialize the set of filters to detect different structure patterns. Each filter’s height is the num- ber of words considered and the width is always equal to the dimensionality d of word representa- tion. Each filter will be represented by only one feature after max-over-tree pooling. After a series of convolution with different filter with different heights, multiple features carry different structural information become the final representation of the input sentence. Then, this sentence representation is passed to a fully connected soft-max layer and outputs a distribution over different labels. Neural networks often suffer from overtrain- ing. Following Kim (2014), we employ random dropout on penultimate layer (Hinton et al., 2014). in order to prevent co-adaptation of hidden units. In our experiments, we set our drop out rate as 0.5 and learning rate as 0.95 by default. Following Kim (2014), training is done through stochastic gradient descent over shuffled mini-batches with the Adadelta update rule (Zeiler, 2012). Despitethefilm’sshortcomingsthestoriesarequietlymoving.ROOTFigure1:RunningexamplefromMovieReviewsdataset.mensionalwordrepresentationforthei-thwordinthesentence,and⊕istheconcatenationoperator.Thereforeexi,jreferstoconcatenatedwordvectorfromthei-thwordtothe(i+j)-thword:exi,j=xi⊕xi+1⊕···⊕xi+j(1)Sequentialwordconcatenationexi,jworksasn-grammodelswhichfeedslocalinformationintoconvolutionoperations.However,thissettingcannotcapturelong-distancerelationshipsunlessweenlargethewindowindefinitelywhichwouldin-evitablycausethedatasparsityproblem.Inordertocapturethelong-distancedependen-ciesweproposethedependencytree-basedcon-volutionmodel(DTCNN).Figure1illustratesanexamplefromtheMovieReviews(MR)dataset(PangandLee,2005).Thesentimentofthissen-tenceisobviouslypositive,butthisisquitedif-ficultforsequentialCNNsbecausemanyn-gramwindowswouldincludethehighlynegativeword“shortcomings”,andthedistancebetween“De-spite”and“shortcomings”isquitelong.DTCNN,however,couldcapturethetree-basedbigram“Despite–shortcomings”,thusflippingthesenti-ment,andthetree-basedtrigram“ROOT–moving–stories”,whichishighlypositive.2.1ConvolutiononAncestorPathsWedefineourconcatenationbasedonthedepen-dencytreeforagivenmodifierxi:xi,k=xi⊕xp(i)⊕···⊕xpk−1(i)(2)wherefunctionpk(i)returnsthei-thword’sk-thancestorindex,whichisrecursivelydefinedas:pk(i)=(p(pk−1(i))ifk>0iifk=0(3)Figure2(left)illustratesancestorpathspatternswithvariousorders.Wealwaysstarttheconvo-lutionwithxiandconcatenatewithitsancestors.Iftherootnodeisreached,weadd“ROOT”asdummyancestors(verticalpadding).Foragiventree-basedconcatenatedwordse-quencexi,k,theconvolutionoperationappliesafilterw∈Rk×dtoxi,kwithabiastermbde-scribedinequation4:ci=f(w·xi,k+b)(4)wherefisanon-linearactivationfunctionsuchasrectifiedlinearunit(ReLu)orsigmoidfunction.Thefilterwisappliedtoeachwordinthesen-tence,generatingthefeaturemapc∈Rl:c=[c1,c2,···,cl](5)wherelisthelengthofthesentence.2.2Max-Over-TreePoolingandDropoutThefiltersconvolvewithdifferentwordconcate-nationinEq.4canberegardedaspatterndetec-tion:onlythemostsimilarpatternbetweenthewordsandthefiltercouldreturnthemaximumac-tivation.InsequentialCNNs,max-over-timepool-ing(Collobertetal.,2011;Kim,2014)operatesoverthefeaturemaptogetthemaximumacti-vationc=maxcrepresentingtheentirefeaturemap.OurDTCNNsalsopoolthemaximumac-tivationfromfeaturemaptodetectthestrongestactivationoverthewholetree(i.e.,overthewholesentence).Sincethetreenolongerdefinesase-quential“time”direction,werefertoourpoolingas“max-over-tree”pooling.Inordertocaptureenoughvariations,weran-domlyinitializethesetoffilterstodetectdifferentstructurepatterns.Eachfilter’sheightisthenum-berofwordsconsideredandthewidthisalwaysequaltothedimensionalitydofwordrepresenta-tion.Eachfilterwillberepresentedbyonlyonefeatureaftermax-over-treepooling.Afteraseriesofconvolutionwithdifferentfilterwithdifferentheights,multiplefeaturescarrydifferentstructuralinformationbecomethefinalrepresentationoftheinputsentence.Then,thissentencerepresentationispassedtoafullyconnectedsoft-maxlayerandoutputsadistributionoverdifferentlabels.Neuralnetworksoftensufferfromovertrain-ing.FollowingKim(2014),weemployrandomdropoutonpenultimatelayer(Hintonetal.,2012).inordertopreventco-adaptationofhiddenunits.Inourexperiments,wesetourdropoutrateas0.5andlearningrateas0.95bydefault.FollowingKim(2014),trainingisdonethroughstochasticgradientdescentovershuffledmini-batcheswiththeAdadeltaupdaterule(Zeiler,2012).2.3ConvolutiononSiblingsAncestorpathsaloneisnotenoughtocapturemanylinguisticphenomenasuchasconjunction. Figure 2: Convolution patterns on trees. Word concatenation always starts with m, while h, g, and g2 denote parent, grand parent, and great-grand parent, etc., and “ ” denotes words excluded in convolution. 2.3 Convolution on Siblings For all datasets, we first obtain the dependency parse tree from Stanford parser (Manning et al., Ancestor paths alone is not enough to capture 2014).1 Different window size for different choice many linguistic phenomena such as conjunction. of convolution are shown in Figure 2. For the Inspired by higher-order dependency parsing (Mc- dataset without a development set (MR), we ran- Donald and Pereira, 2006; Koo and Collins, 2010), domly choose 10% of the training data to indicate we also incorporate siblings for a given word in early stopping. In order to have a fare compari- various ways. See Figure 2 (right) for details. son with baseline CNN, we also use 3 to 5 as our window size. Most of our results are generated by GPU due to its efficiency, however CPU could po- tentially get better results.2 Our implementation, on top of Kim (2014)’s code,3 will be released.4 2.4 Combined Model Powerful as it is, structural information still does not fully cover sequential information. Also, pars- ing errors (which are common especially for in- formal text such as online reviews) directly affect DCNN performance while sequential n-grams are always correctly observed. To best exploit both in- formation, we want to combine both models. The easiest way of combination is to concatenate these representations together, then feed into fully con- nected soft-max neural networks. In these cases, combine with different feature from different type of sources could stabilize the performance. The final sentence representation is thus: 3.1 Sentiment Analysis Both sentiment analysis datasets (MR and SST- 1) are based on movie reviews. The differences between them are mainly in the different num- bers of categories and whether the standard split is given. There are 10,662 sentences in the MR dataset. Each instance is labeled positive or neg- ative, and in most cases contains one sentence. Since no standard data split is given, following the literature we use 10 fold cross validation to include every sentence in training and testing at least once. Concatenating with sibling and sequential infor- mation obviously improves DCNNs, and the final model outperforms the baseline sequential CNNs by 0.4, and ties with Zhu et al. (2015). Different from MR, the Stanford Sentiment Treebank (SST-1) annotates finer-grained labels, very positive, positive, neutral, negative and very negative, on an extension of the MR dataset. There are 11,855 sentences with standard split. Our model achieves an accuracy of 49.5 which is sec- ond only to Irsoy and Cardie (2014). 1The phrase-structure trees in SST-1 are actually automatically parsed, and thus can not be used as gold-standard trees. 2GPU only supports float32 while CPU supports float64. 3https://github.comw/yoonkim/CNN_sentence 4https://github.com/cosmmb/DCNN c = [c(1) a , ..., c(Na) ; c(1) s , ..., c(Ns) s ; c(1), ..., c(N ) ] siblings sequential (cid:123)(cid:122) (cid:125) (cid:124) a ancestors (cid:123)(cid:122) (cid:125) (cid:124) (cid:123)(cid:122) (cid:125) (cid:124) where Na, Ns, and N are the number of ancestor, sibling, and sequential filters. In practice, we use 100 filters for each template in Figure 2 . The fully combined representation is 1,100-dimensional by contrast to 300-dimensional for sequential CNN. 3 Experiments Table 1 summarizes results in the context of other high-performing efforts in the literature. We use three benchmark datasets in two categories: senti- ment analysis on both Movie Review (MR) (Pang and Lee, 2005) and Stanford Sentiment Treebank (SST-1) (Socher et al., 2013) datasets, and ques- tion classification on TREC (Li and Roth, 2002). ancestorpathssiblingsnpattern(s)npattern(s)3mhg2sm4mhgg23smhtsm5mhgg2g34tsmhsmhgTable1:Tree-basedconvolutionpatterns.Wordconcatenationalwaysstartswithm,whileh,g,andg2denoteparent,grandparent,andgreat-grandparent,etc.,and“”denoteswordsexcludedinconvolution.2.3ConvolutiononSiblingsAncestorpathsaloneisnotenoughtocapturemanylinguisticphenomenasuchasconjunction.Inspiredbyhigher-orderdependencyparsing(Mc-DonaldandPereira,2006;KooandCollins,2010),wealsoincorporatesiblingsforagivenwordinvariousways.SeeTable1(right)fordetails.2.4CombinedModelPowerfulasitis,structuralinformationstilldoesnotfullycoversequentialinformation.Also,pars-ingerrors(whicharecommonespeciallyforin-formaltextsuchasonlinereviews)directlyaffectDTCNNperformancewhilesequentialn-gramsarealwayscorrectlyobserved.Tobestexploitbothinformation,wewanttocombinebothmod-els.Theeasiestwayofcombinationistocon-catenatetheserepresentationstogether,thenfeedintofullyconnectedsoft-maxneuralnetworks.Inthesecases,combinewithdifferentfeaturefromdifferenttypeofsourcescouldstabilizetheperfor-mance.Thefinalsentencerepresentationisthus:c=[c(1)a,...,c(Na)a{z}ancestors;c(1)s,...,c(Ns)s{z}siblings;c(1),...,c(N){z}sequential]whereNa,Ns,andNarethenumberofancestor,sibling,andsequentialfilters.Inpractice,weuse100filtersforeachtemplateinTable1.Thefullycombinedrepresentationis1100-dimensionalbycontrastto300-dimensionalforsequentialCNN.3ExperimentsWeimplementourDTCNNontopoftheopensourceCNNcodebyKim(2014).1Table2summarizesourresultsinthecontextofotherhigh-performingeffortsintheliterature.Weusethreebenchmarkdatasetsintwocategories:senti-mentanalysisonbothMovieReview(MR)(PangandLee,2005)andStanfordSentimentTreebank1https://github.com/yoonkim/CNNsentence(SST-1)(Socheretal.,2013)datasets,andques-tionclassificationonTREC(LiandRoth,2002).Foralldatasets,wefirstobtainthedependencyparsetreefromStanfordparser(Manningetal.,2014).2DifferentwindowsizefordifferentchoiceofconvolutionareshowninTable1.Forthedatasetwithoutadevelopmentset(MR),weran-domlychoose10%ofthetrainingdatatoindicateearlystopping.Inordertohaveafarecompari-sonwithbaselineCNN,wealsouse3to5asourwindowsize.MostofourresultsaregeneratedbyGPUduetoitsefficiency,howeverCPUpoten-tiallycouldgeneratebetterresults.3Ourimple-mentationcanbefoundonGithub.43.1SentimentAnalysisBothsentimentanalysisdatasets(MRandSST-1)arebasedonmoviereviews.Thedifferencesbetweenthemaremainlyinthedifferentnum-bersofcategoriesandwhetherthestandardsplitisgiven.Thereare10,662sentencesintheMRdataset.Eachinstanceislabeledpositiveorneg-ative,andinmostcasescontainsonesentence.Sincenostandarddatasplitisgiven,followingtheliteratureweuse10foldcrossvalidationtoincludeeverysentenceintrainingandtestingatleastonce.Concatenatingwithsiblingandsequentialinfor-mationobviouslyimprovestree-basedCNNs,andthefinalmodeloutperformsthebaselinesequen-tialCNNsby0.4,andtieswithZhuetal.(2015).DifferentfromMR,theStanfordSentimentTreebank(SST-1)annotatesfiner-grainedlabels,verypositive,positive,neutral,negativeandverynegative,onanextensionoftheMRdataset.Thereare11,855sentenceswithstandardsplit.Ourmodelachievesanaccuracyof49.5whichissec-ondonlytoIrsoyandCardie(2014).Wesetbatchsizeto100forthistask.2Thephrase-structuretreesinSST-1areactuallyautomat-icallyparsed,andthuscannotbeusedasgold-standardtrees.3GPUonlysupportsfloat32whileCPUsupportsfloat64.4https://github.com/cosmmb/DTCNN Category This work CNNs Recursive NNs Recurrent NNs Other deep learning Hand-coded rules Model DCNNs: ancestor DCNNs: ancestor+sibling DCNNs: ancestor+sibling+sequential CNNs-non-static (Kim, 2014) – baseline CNNs-multichannel (Kim, 2014) Deep CNNs (Kalchbrenner et al., 2014) Recursive Autoencoder (Socher et al., 2011) Recursive Neural Tensor (Socher et al., 2013) Deep Recursive NNs (Irsoy and Cardie, 2014) LSTM on tree (Zhu et al., 2015) Paragraph-Vec (Le and Mikolov, 2014) SVMS (Silva et al., 2011) MR 80.4† 81.7† 81.9 81.5 81.1 - 77.7 - - 81.9 - - SST-1 TREC TREC-2 47.7† 48.3† 49.5 48.0 47.4 48.5 43.2 45.7 49.8 48.0 48.7 88.4† 89.0† 88.8† 86.4∗ 86.0∗ - - - - - - 90.8 95.4† 95.6† 95.4† 93.6 92.2 93.0 - - - - - 95.0 Table 1: Results on Movie Review (MR), Stanford Sentiment Treebank (SST-1), and TREC datasets. TREC-2 is TREC with fine grained labels. †Results generated by GPU (all others generated by CPU). ∗Results generated from Kim (2014)’s implementation. 3.2 Question Classification In the TREC dataset, the entire dataset of 5,952 sentences are classified into the following 6 cate- gories: abbreviation, entity, description, location and numeric. In this experiment, DCNNs easily outperform any other methods even with ancestor convolution only. DCNNs with sibling achieve the best performance in the published literature. DC- NNs combined with sibling and sequential infor- mation might suffer from overfitting on the train- ing data based on our observation. One thing to note here is that our best result even exceeds SVMS (Silva et al., 2011) with 60 hand-coded rules. The TREC dataset also provides subcategories such as numeric:temperature, numeric:distance, and entity:vehicle. To make our task more real- istic and challenging, we also test the proposed model with respect to the 50 subcategories. There are obvious improvements over sequential CNNs from the last column of Table 1. Like ours, Silva et al. (2011) is a tree-based system but it uses constituency trees compared to ours dependency trees. They report a higher fine-grained accuracy of 90.8 but their parser is trained only on the Ques- tionBank (Judge et al., 2006) while we used the standard Stanford parser trained on both the Penn Treebank and QuestionBank. Moreover, as men- tioned above, their approach is rule-based while ours is automatically learned. 3.3 Discussions and Examples Compared with sentiment analysis, the advantage of our proposed model is obviously more substan- tial on the TREC dataset. Based on our error anal- ysis, we conclude that this is mainly due to the Figure 3: Examples from TREC (a–c), SST-1 (d) and TREC with fine-grained label (e–f) that are misclassified by the baseline CNN but correctly labeled by our DCNN. For example, (a) should be entity but is labeled location by CNN. CategoryModelMRSST-1TRECTREC-2ThisworkDTCNNs:ancestor80.4†47.7†95.4†88.4†DTCNNs:ancestor+sibling81.7†48.3†95.6†89.0†DTCNNs:ancestor+sibling+sequential81.949.595.4†88.8†CNNsCNNs-non-static(Kim,2014)–baseline81.548.093.686.4∗CNNs-multichannel(Kim,2014)81.147.492.286.0∗DeepCNNs(Kalchbrenneretal.,2014)-48.593.0-RecursiveNNsRecursiveAutoencoder(Socheretal.,2011)77.743.2--RecursiveNeuralTensor(Socheretal.,2013)-45.7--DeepRecursiveNNs(IrsoyandCardie,2014)-49.8--RecurrentNNsLSTMontree(Zhuetal.,2015)81.948.0--OtherdeeplearningParagraph-Vec(LeandMikolov,2014)-48.7--Hand-codedrulesSVMS(Silvaetal.,2011)-95.090.8Table2:ResultsonMovieReview(MR),StanfordSentimentTreebank(SST-1),andTRECdatasets.TREC-2isTRECwithfinegrainedlabels.†ResultsgeneratedbyGPU(allothersgeneratedbyCPU).∗ResultsgeneratedfromKim(2014)’simplementation.WhatisHawaii’sstateflower?root(a)enty⇒locWhatisnaturalgascomposedof?root(b)enty⇒descWhatdoesadefibrillatordo?root(c)desc⇒entyNothingplotwiseisworthemailinghomeaboutroot(d)mildnegative⇒mildpositiveWhatisthetemperatureatthecenteroftheearth?root(e)NUM:temp⇒NUM:distWhatwereChristopherColumbus’threeships?root(f)ENTY:veh⇒LOC:otherFigure2:ExamplesfromTREC(a–c),SST-1(d)andTRECwithfine-grainedlabel(e–f)thataremisclassifiedbythebaselineCNNbutcorrectlylabeledbyourDTCNN.Forexample,(a)shouldbeentitybutislabeledlocationbyCNN.3.2QuestionClassificationIntheTRECdataset,theentiredatasetof5,952sentencesareclassifiedintothefollowing6cate-gories:abbreviation,entity,description,locationandnumeric.Inthisexperiment,DTCNNseas-ilyoutperformanyothermethodsevenwithan-cestorconvolutiononly.DTCNNswithsiblingachievethebestperformanceinthepublishedlit-erature.DTCNNscombinedwithsiblingandse-quentialinformationmightsufferfromoverfittingonthetrainingdatabasedonourobservation.Onethingtonotehereisthatourbestresultevenex-ceedsSVMS(Silvaetal.,2011)with60hand-codedrules.Wesetbatchsizeto210forthistask.TheTRECdatasetalsoprovidessubcategoriessuchasnumeric:temperature,numeric:distance,andentity:vehicle.Tomakeourtaskmorereal-isticandchallenging,wealsotesttheproposedmodelwithrespecttothe50subcategories.ThereareobviousimprovementsoversequentialCNNsfromthelastcolumnofTable2.Likeours,Silvaetal.(2011)isatree-basedsystembutitusesconstituencytreescomparedtooursdependencytrees.Theyreportahigherfine-grainedaccuracyof90.8buttheirparseristrainedonlyontheQues-tionBank(Judgeetal.,2006)whileweusedthestandardStanfordparsertrainedonboththePennTreebankandQuestionBank.Moreover,asmen-tionedabove,theirapproachisrule-basedwhileoursisautomaticallylearned.Forthistask,wesetbatchsizeto30.3.3DiscussionsandExamplesComparedwithsentimentanalysis,theadvantageofourproposedmodelisobviouslymoresubstan-tialontheTRECdataset.Basedonourerroranal- Figure 4: Examples from TREC datasets that are misclassified by DCNN but correctly labeled by baseline CNN. For example, (a) should be numer- ical but is labeled entity by DCNN. difference of the parse tree quality between the two tasks. In sentiment analysis, the dataset is collected from the Rotten Tomatoes website which includes many irregular usage of language. Some of the sentences even come from languages other than English. The errors in parse trees inevitably affect the classification accuracy. However, the parser works substantially better on the TREC dataset since all questions are in formal written English, and the training set for Stanford parser5 already includes the QuestionBank (Judge et al., 2006) which includes 2,000 TREC sentences. Figure 3 visualizes examples where CNN errs while DCNN does not. For example, CNN la- bels (a) as location due to “Hawaii” and “state”, while the long-distance backbone “What – flower” is clearly asking for an entity. Similarly, in (d), DCNN captures the obviously negative tree-based trigram “Nothing – worth – emailing”. Note that our model also works with non-projective depen- dency trees such as the one in (b). The last two ex- amples in Figure 3 visualize cases where DCNN outperforms the baseline CNNs in fine-grained TREC. In example (e), the word “temperature” is at second from the top and is root of a 8 word span “the ... earth”. When we use a window of size 5 for tree convolution, every words in that span get convolved with “temperature” and this should be the reason why DCNN get correct. Figure 4 showcases examples where baseline CNNs get better results than DCNNs. Example (a) is misclassified as entity by DCNN due to pars- ing/tagging error (the Stanford parser performs its 5 http://nlp.stanford.edu/software/parser-faq.shtml Figure 5: Examples from TREC datasets that are misclassified by both DCNN and baseline CNN. For example, (a) should be numerical but is la- beled entity by DCNN and description by CNN. own part-of-speech tagging). The word “fly” at the end of the sentence should be a verb instead of noun, and “hummingbirds fly” should be a relative clause modifying “speed”. There are some sentences that are misclassified by both the baseline CNN and DCNN. Figure 5 shows three such examples. Example (a) is not classified as numerical by both methods due to the ambiguous meaning of the word “point” which is difficult to capture by word embedding. This word can mean location, opinion, etc. Apparently, the numerical aspect is not captured by word embed- ding. Example (c) might be an annotation error. Shortly before submitting to ACL 2015 we learned Mou et al. (2015, unpublished) have inde- pendently reported concurrent and related efforts. Their constituency model, based on their unpub- lished work in programming languages (Mou et al., 2014),6 performs convolution on pretrained re- cursive node representations rather than word em- beddings, thus baring little, if any, resemblance to our dependency-based model. Their dependency model is related, but always includes a node and all its children (resembling Iyyer et al. (2014)), which is a variant of our sibling model and always flat. By contrast, our ancestor model looks at the vertical path from any word to its ancestors, being linguistically motivated (Shen et al., 2008). 4 Conclusions We have presented a very simple dependency- based convolution framework which outperforms sequential CNN baselines on modeling sentences. 6Both their 2014 and 2015 reports proposed (independently of each other and independently of our work) the term “tree-based convolution” (TBCNN). Whatisthespeedhummingbirdsfly?(noun)root(a)num⇒entyWhatbodyofwateraretheCanaryIslandsin?root(b)loc⇒entyWhatpositiondidWillieDavisplayinbaseball?root(c)hum⇒entyFigure3:ExamplesfromTRECdatasetsthataremisclassifiedbyDTCNNbutcorrectlylabeledbybaselineCNN.Forexample,(a)shouldbenumer-icalbutislabeledentitybyDTCNN.ysis,weconcludethatthisismainlyduetothedifferenceoftheparsetreequalitybetweenthetwotasks.Insentimentanalysis,thedatasetiscollectedfromtheRottenTomatoeswebsitewhichincludesmanyirregularusageoflanguage.SomeofthesentencesevencomefromlanguagesotherthanEnglish.Theerrorsinparsetreesinevitablyaffecttheclassificationaccuracy.However,theparserworkssubstantiallybetterontheTRECdatasetsinceallquestionsareinformalwrittenEnglish,andthetrainingsetforStanfordparser5alreadyincludestheQuestionBank(Judgeetal.,2006)whichincludes2,000TRECsentences.Figure2visualizesexampleswhereCNNerrswhileDTCNNdoesnot.Forexample,CNNla-bels(a)aslocationdueto“Hawaii”and“state”,whilethelong-distancebackbone“What–flower”isclearlyaskingforanentity.Similarly,in(d),DTCNNcapturestheobviouslynegativetree-basedtrigram“Nothing–worth–emailing”.Notethatourmodelalsoworkswithnon-projectivede-pendencytreessuchastheonein(b).ThelasttwoexamplesinFigure2visualizecaseswhereDTCNNoutperformsthebaselineCNNsinfine-grainedTREC.Inexample(e),theword“temper-ature”isatsecondfromthetopandisrootofa8wordspan“the...earth”.Whenweuseawin-dowofsize5fortreeconvolution,everywordsinthatspangetconvolvedwith“temperature”andthisshouldbethereasonwhyDTCNNgetcorrect.5http://nlp.stanford.edu/software/parser-faq.shtmlWhatisthemeltingpointofcopper?root(a)num⇒entyanddescWhatdidJesseJacksonorganize?root(b)hum⇒entyandentyWhatistheelectricaloutputinMadrid,Spain?root(c)enty⇒numandnumFigure4:ExamplesfromTRECdatasetsthataremisclassifiedbybothDTCNNandbaselineCNN.Forexample,(a)shouldbenumericalbutisla-beledentitybyDTCNNanddescriptionbyCNN.Figure3showcasesexampleswherebaselineCNNsgetbetterresultsthanDTCNNs.Exam-ple(a)ismisclassifiedasentitybyDTCNNduetoparsing/taggingerror(theStanfordparserper-formsitsownpart-of-speechtagging).Theword“fly”attheendofthesentenceshouldbeaverbinsteadofnoun,and“hummingbirdsfly”shouldbearelativeclausemodifying“speed”.TherearesomesentencesthataremisclassifiedbyboththebaselineCNNandDTCNN.Figure4showsthreesuchexamples.Example(a)isnotclassifiedasnumericalbybothmethodsduetotheambiguousmeaningoftheword“point”whichisdifficulttocapturebywordembedding.Thiswordcanmeanlocation,opinion,etc.Apparently,thenumericalaspectisnotcapturedbywordembed-ding.Example(c)mightbeanannotationerror.FromthemistakesmadebyDTCNNs,wefindtheperformanceofDTCNNismainlylimitedbytwofactors:theaccuracyoftheparserandthequalityofwordembedding.Futureworkwillfo-cusonthesetwoissues.4ConclusionsandFutureWorkWehavepresentedaverysimpledependencytree-basedconvolutionframeworkwhichoutperformssequentialCNNbaselinesonvariousclassificationtasks.Extensionsofthismodelwouldconsiderdependencylabelsandconstituencytrees.Also,wewouldevaluateongold-standardparsetrees.Whatisthespeedhummingbirdsfly?(noun)root(a)num⇒entyWhatbodyofwateraretheCanaryIslandsin?root(b)loc⇒entyWhatpositiondidWillieDavisplayinbaseball?root(c)hum⇒entyFigure3:ExamplesfromTRECdatasetsthataremisclassifiedbyDTCNNbutcorrectlylabeledbybaselineCNN.Forexample,(a)shouldbenumer-icalbutislabeledentitybyDTCNN.ysis,weconcludethatthisismainlyduetothedifferenceoftheparsetreequalitybetweenthetwotasks.Insentimentanalysis,thedatasetiscollectedfromtheRottenTomatoeswebsitewhichincludesmanyirregularusageoflanguage.SomeofthesentencesevencomefromlanguagesotherthanEnglish.Theerrorsinparsetreesinevitablyaffecttheclassificationaccuracy.However,theparserworkssubstantiallybetterontheTRECdatasetsinceallquestionsareinformalwrittenEnglish,andthetrainingsetforStanfordparser5alreadyincludestheQuestionBank(Judgeetal.,2006)whichincludes2,000TRECsentences.Figure2visualizesexampleswhereCNNerrswhileDTCNNdoesnot.Forexample,CNNla-bels(a)aslocationdueto“Hawaii”and“state”,whilethelong-distancebackbone“What–flower”isclearlyaskingforanentity.Similarly,in(d),DTCNNcapturestheobviouslynegativetree-basedtrigram“Nothing–worth–emailing”.Notethatourmodelalsoworkswithnon-projectivede-pendencytreessuchastheonein(b).ThelasttwoexamplesinFigure2visualizecaseswhereDTCNNoutperformsthebaselineCNNsinfine-grainedTREC.Inexample(e),theword“temper-ature”isatsecondfromthetopandisrootofa8wordspan“the...earth”.Whenweuseawin-dowofsize5fortreeconvolution,everywordsinthatspangetconvolvedwith“temperature”andthisshouldbethereasonwhyDTCNNgetcorrect.5http://nlp.stanford.edu/software/parser-faq.shtmlWhatisthemeltingpointofcopper?root(a)num⇒entyanddescWhatdidJesseJacksonorganize?root(b)hum⇒entyandentyWhatistheelectricaloutputinMadrid,Spain?root(c)enty⇒numandnumFigure4:ExamplesfromTRECdatasetsthataremisclassifiedbybothDTCNNandbaselineCNN.Forexample,(a)shouldbenumericalbutisla-beledentitybyDTCNNanddescriptionbyCNN.Figure3showcasesexampleswherebaselineCNNsgetbetterresultsthanDTCNNs.Exam-ple(a)ismisclassifiedasentitybyDTCNNduetoparsing/taggingerror(theStanfordparserper-formsitsownpart-of-speechtagging).Theword“fly”attheendofthesentenceshouldbeaverbinsteadofnoun,and“hummingbirdsfly”shouldbearelativeclausemodifying“speed”.TherearesomesentencesthataremisclassifiedbyboththebaselineCNNandDTCNN.Figure4showsthreesuchexamples.Example(a)isnotclassifiedasnumericalbybothmethodsduetotheambiguousmeaningoftheword“point”whichisdifficulttocapturebywordembedding.Thiswordcanmeanlocation,opinion,etc.Apparently,thenumericalaspectisnotcapturedbywordembed-ding.Example(c)mightbeanannotationerror.FromthemistakesmadebyDTCNNs,wefindtheperformanceofDTCNNismainlylimitedbytwofactors:theaccuracyoftheparserandthequalityofwordembedding.Futureworkwillfo-cusonthesetwoissues.4ConclusionsandFutureWorkWehavepresentedaverysimpledependencytree-basedconvolutionframeworkwhichoutperformssequentialCNNbaselinesonvariousclassificationtasks.Extensionsofthismodelwouldconsiderdependencylabelsandconstituencytrees.Also,wewouldevaluateongold-standardparsetrees. References R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. 2011. Natural lan- guage processing (almost) from scratch. Journal of Machine Learning Research, 12. Kushal Dave, Steve Lawrence, and David M Pennock. 2003. Mining the peanut gallery: Opinion extraction and semantic classification of product reviews. In Proceedings of World Wide Web. Michael Gamon. 2004. Sentiment classification on customer feedback data: noisy data, large feature vectors, and the role of linguistic analysis. In Pro- ceedings of COLING. Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhut- Improving neural networks by dinov. preventing co-adaptation of feature detectors. Journal of Machine Learning Research, 15. 2014. Ozan Irsoy and Claire Cardie. 2014. Deep recursive neural networks for compositionality in language. In Advances in Neural Information Processing Sys- tems, pages 2096–2104. Mohit Iyyer, Jordan Boyd-Graber, Leonardo Claudino, Richard Socher, and Hal Daum´e III. 2014. A neural network for factoid question answering over para- graphs. In Proceedings of EMNLP. John Judge, Aoife Cahill, and Josef van Genabith. 2006. Questionbank: Creating a corpus of parse- annotated questions. In Proceedings of COLING. Nal Kalchbrenner, Edward Grefenstette, and Phil Blun- som. 2014. A convolutional neural network for modelling sentences. In Proceedings of ACL. Yoon Kim. 2014. Convolutional neural networks for sentence classification. In Proceedings of EMNLP. Terry Koo and Michael Collins. 2010. Efficient third- order dependency parsers. In Proceedings of ACL. Taku Kudo and Yuji Matsumoto. 2004. A boosting algorithm for classification of semi-structured text. In Proceedings of EMNLP. Quoc V Le and Tomas Mikolov. 2014. Distributed representations of sentences and documents. In Pro- ceedings of ICML. Y. LeCun, L. Jackel, L. Bottou, A. Brunot, C. Cortes, J. Denker, H. Drucker, I. Guyon, U. Mller, E. Sckinger, P. Simard, and V. Vapnik. 1995. Com- parison of learning algorithms for handwritten digit recognition. In Int’l Conf. on Artificial Neural Nets. Xin Li and Dan Roth. 2002. Learning question classi- fiers. In Proceedings of COLING. Christopher D. Manning, Mihai Surdeanu, John Bauer, Jenny Finkel, Steven J. Bethard, and David Mc- Closky. 2014. The Stanford CoreNLP natural lan- guage processing toolkit. In Proceedings of ACL: Demonstrations, pages 55–60. Shotaro Matsumoto, Hiroya Takamura, and Manabu 2005. Sentiment classification using In Okumura. word sub-sequences and dependency sub-trees. Proceedings of PA-KDD. Ryan McDonald and Fernando Pereira. 2006. Online learning of approximate dependency parsing algo- rithms. In Proceedings of EACL. Lili Mou, Ge Li, Zhi Jin, Lu Zhang, and Tao Wang. 2014. TBCNN: A tree-based convolutional neu- ral network for programming language processing. Unpublished manuscript: http://arxiv.org/ abs/1409.5718. Lili Mou, Hao Peng, Ge Li, Yan Xu, Lu Zhang, and Zhi Jin. 2015. Discriminative neural sentence modeling by tree-based convolution. Unpublished manuscript: http://arxiv.org/abs/1504. 01106v5. Version 5 dated June 2, 2015; Version 1 (“Tree-based Convolution: A New Architecture for Sentence Modeling”) dated Apr 5, 2015. Bo Pang and Lillian Lee. 2005. Seeing stars: Exploit- ing class relationships for sentiment categorization with respect to rating scales. In Proceedings of ACL, pages 115–124. Libin Shen, Lucas Champollion, and Aravind K Joshi. 2008. LTAG-spinal and the treebank. Language Re- sources and Evaluation, 42(1):1–19. Yelong Shen, Xiaodong he, Jianfeng Gao, Li Deng, and Gregoire Mesnil. 2014. Learning semantic repre- sentations using convolutional neural networks for web search. In Proceedings of WWW. J. Silva, L. Coheur, A. C. Mendes, and Andreas Wichert. 2011. From symbolic to sub-symbolic in- formation in question classification. Artificial Intel- ligence Review, 35. Richard Socher, Jeffrey Pennington, Eric H. Huang, Andrew Y. Ng, and Christopher D. Manning. 2011. Semi-Supervised Recursive Autoencoders for Pre- dicting Sentiment Distributions. In Proceedings of EMNLP 2011. Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Y. Ng, and Christopher Potts. 2013. Recursive deep mod- els for semantic compositionality over a sentiment treebank. In Proceedings of EMNLP 2013. Wen-tau Yih, Xiaodong He, and Christopher Meek. 2014. Semantic parsing for single-relation question answering. In Proceedings of ACL. Mattgew Zeiler. 2012. Adadelta: An adaptive learning rate method. Unpublished manuscript: http:// arxiv.org/abs/1212.5701. Xiaodan Zhu, Parinaz Sobhani, and Hongyu Guo. 2015. Long short-term memory over tree structures. In Proceedings of ICML.
1907.00184
2
1907
2019-09-11T12:35:35
Empirical Evaluation of Sequence-to-Sequence Models for Word Discovery in Low-resource Settings
[ "cs.CL" ]
Since Bahdanau et al. [1] first introduced attention for neural machine translation, most sequence-to-sequence models made use of attention mechanisms [2, 3, 4]. While they produce soft-alignment matrices that could be interpreted as alignment between target and source languages, we lack metrics to quantify their quality, being unclear which approach produces the best alignments. This paper presents an empirical evaluation of 3 main sequence-to-sequence models (CNN, RNN and Transformer-based) for word discovery from unsegmented phoneme sequences. This task consists in aligning word sequences in a source language with phoneme sequences in a target language, inferring from it word segmentation on the target side [5]. Evaluating word segmentation quality can be seen as an extrinsic evaluation of the soft-alignment matrices produced during training. Our experiments in a low-resource scenario on Mboshi and English languages (both aligned to French) show that RNNs surprisingly outperform CNNs and Transformer for this task. Our results are confirmed by an intrinsic evaluation of alignment quality through the use of Average Normalized Entropy (ANE). Lastly, we improve our best word discovery model by using an alignment entropy confidence measure that accumulates ANE over all the occurrences of a given alignment pair in the collection.
cs.CL
cs
Empirical Evaluation of Sequence-to-Sequence Models for Word Discovery in Low-resource Settings Marcely Zanon Boito1, Aline Villavicencio2,3, Laurent Besacier1 1Laboratoire d'Informatique de Grenoble, Univ. Grenoble Alpes (UGA), France 2School of Computer Science and Electronic Engineering, University of Essex, UK 3Institute of Informatics, Federal University of Rio Grande do Sul, Brazil contact: [email protected] 9 1 0 2 p e S 1 1 ] L C . s c [ 2 v 4 8 1 0 0 . 7 0 9 1 : v i X r a Abstract Since Bahdanau et al. [1] first introduced attention for neural machine translation, most sequence-to-sequence models made use of attention mechanisms [2, 3, 4]. While they pro- duce soft-alignment matrices that could be interpreted as align- ment between target and source languages, we lack metrics to quantify their quality, being unclear which approach produces the best alignments. This paper presents an empirical evalu- ation of 3 of the main sequence-to-sequence models for word discovery from unsegmented phoneme sequences: CNN, RNN and Transformer-based. This task consists in aligning word se- quences in a source language with phoneme sequences in a tar- get language, inferring from it word segmentation on the target side [5]. Evaluating word segmentation quality can be seen as an extrinsic evaluation of the soft-alignment matrices produced during training. Our experiments in a low-resource scenario on Mboshi and English languages (both aligned to French) show that RNNs surprisingly outperform CNNs and Transformer for this task. Our results are confirmed by an intrinsic evalua- tion of alignment quality through the use Average Normalized Entropy (ANE). Lastly, we improve our best word discovery model by using an alignment entropy confidence measure that accumulates ANE over all the occurrences of a given alignment pair in the collection. Index Terms: sequence-to-sequence models, soft-alignment matrices, word discovery, low-resource languages, computa- tional language documentation 1. Introduction Sequence-to-Sequence (S2S) models can solve many tasks where source and target sequences have different lengths. For learning to focus on specific parts of the input at decoding time, most of these models are equipped with attention mech- anisms [1, 2, 3, 4, 6]. By-products of the attention are soft- alignment probability matrices, that can be interpreted as align- ment between target and source. However, we lack metrics to quantify their quality. Moreover, while these models perform very well in a typical use case, it is not clear how they would be affected by low-resource scenarios. This paper proposes an empirical evaluation of well-known S2S models for a particular S2S modeling task. This task con- sists of aligning word sequences in a source language with phoneme sequences in a target language, inferring from it word segmentation on the target side [5]. We concentrate on three models: Convolutional Neural Networks (CNN) [2], Recurrent Neural Networks (RNN) [1] and Transformer-based models [3]. While this word segmentation task can be used for the extrinsic evaluation of the soft-alignment probability matrices produced during S2S learning, we also introduce Average Normalized Entropy (ANE), a task-agnostic confidence metric to quantify the quality of the source-to-target alignments obtained. Experi- ments performed on a low-resource scenario for two languages (Mboshi and English) using equivalently sized corpora aligned to French, are, to our knowledge, the first empirical evaluation of these well-known S2S models for a word segmentation task. We also illustrate how our entropy-based metric can be used in a language documentation scenario, helping a linguist to effi- ciently discover types, in an unknown language, from an unseg- mented sequence of phonemes. This work is thus also a contri- bution to the emerging computational language documentation domain [7, 8, 9, 10, 11], whose main goal is the creation of au- tomatic approaches able to help the documentation of the many languages soon to be extinct [12]. Lastly, studies focused on comprehensive attention mech- anisms for NMT [13, 14, 15] lack evaluation of the resulting alignments, and the exceptions [16] do so for the task of word- to-word alignment in well-resourced languages. Differently, our work is not only an empirical evaluation of NMT models focused on alignment quality, but it also tackles data scarcity of low-resource scenarios. 2. Experimental Settings 2.1. Unsupervised Word Segmentation from Speech As in language documentation scenarios available corpora usu- ally contain speech in the language to document aligned with translations in a well-resourced language, Godard et al. [5] in- troduced a pipeline for performing Unsupervised Word Seg- mentation (UWS) from speech. The system outputs time- stamps delimiting stretches of speech, associated with class labels, corresponding to real words in the language. The pipeline consists of first transforming speech into a sequence of phonemes, either through Automatic Unit Discovery (e.g. [17]) or manual transcription. The phoneme sequences, together with their translations, are then fed to an attention-based S2S system that produces soft-alignment probability matrices be- tween target and source languages. The alignment probability distributions between the phonemes and the translation words (as in Figure 1) are used to cluster (segment) together neigh- bor phonemes whose alignment distribution peaks at the same word. The final speech segmentation is evaluated using the Zero Resource Challenge1 (ZRC) 2017 evaluation suite (track 2).2 1Available at http://zerospeech.com/2017. 2 We increment over [5] by removing silence labels before training, and using them for segmentation. This results in slightly better scores. by averaging NE for all phonemes from a single (discovered) token. Type ANE results from averaging the ANE for every to- ken instance of a discovered type. Finally, Alignment ANE is the result of averaging the ANE for every discovered (type, trans- lation word) alignment pair. Intuition that lower ANEs corre- spond to better alignments is exemplified in Figure 1. 3. Empirical Comparison of S2S Models We compare three NMT models §3.1, §3.2, §3.3) for UWS, focusing on their ability of aligning words (French) with phonemes (English or Mboshi) in medium-low resource set- tings. The results, an analysis of the impact of data size and quality, and the correlation between intrinsic (ANE) and extrin- sic (boundary F-score) metrics are presented in §3.4. The ap- plication of ANE for type discovery in low-resource settings is presented in §3.5. 3.1. RNN: Attention-based Encoder-Decoder The classic RNN encoder-decoder model [1] connects a bidi- rectional encoder with an unidirectional decoder by the use of an alignment module. The RNN encoder learns annotations for every source token, and these are weighted by the alignment module for the generation of every target token. Weights are defined as context vectors, since they capture the importance of every source token for the generation of each target token. Attention mechanism: a context vector for a decoder step t is computed using the set of source annotations H and the last state of the decoder network (translation context). The attention is the result of the weighted sum of the source annotations H (with H = h1, ..., hA) and their α probabilities (3) obtained through a feed-forward network align (4). A(cid:88) ct = Att(H, st−1) = αt ihi i=1 αt i = softmax(align(hi, st−1)) (3) (4) 3.2. Transformer Transformer [3] is a fully attentional S2S architecture, which has obtained state-of-the-art results for several NMT shared tasks. It replaces the use of sequential cell units (such as LSTM) by Multi-Head Attention (MHA) operations, which make the architecture considerably faster. Both encoder and decoder net- works are stacked layers sets that receive source and target se- quences, embedded and concatenated with positional encoding. An encoder layer is made of two sub-layers: a Self-Attention MHA and a feed-forward. A decoder layer is made of three sub-layers: a masked Self-Attention MHA (no access to sub- sequent positions); an Encoder-Decoder MHA (operation over the encoder stack's final output and the decoder self-attention output); and a feed-forward sub-layer. Dropout and residual connections are applied between all sub-layers. Final output probabilities are generated by applying a linear projection over the decoder stack's output, followed by a softmax operation. Multi-head attention mechanism: attention is seen as a map- ping problem: given a pair of key-value vectors and a query vector, the task is the computation of the weighted sum of the given values (output). In this setup, weights are learned by com- patibility functions between key-query pairs (of dimension dk). For a given query (Q), keys (K) and values (V) set, the Scaled Figure 1: Soft-alignment probability matrices from the UWS task. ANE values (from left to right) are 0.11, 0.64 and 0.83. The gold segmentation is "BAH1T MAA1MAH0 PAA1PAH0 IH0Z AW1T", which corresponds to the English sentence "But mama, papa is out". 2.2. Parallel Speech Corpora The parallel speech corpora used in this work are the English- French (EN-FR) [18] and the Mboshi-French (MB-FR) [19] parallel corpora. EN-FR corpus is a 33,192 sentences mul- tilingual extension from librispeech [20], with English audio books automatically aligned to French translations. MB-FR is a 5,130 sentences corpus from the language documentation pro- cess of Mboshi (Bantu C25), an endangered language spoken in Congo-Brazzaville. Thus, while the former corpus presents larger vocabulary and longer sentences, the latter presents a more tailored environment, with short sentences and simpler vocabulary. In order to provide a fair comparison, as well as to study the impact of corpus size, the EN-FR corpus was also down-sampled to 5K utterances (to the exact same size than the MB-FR corpus). Sub-sampling was conducted preserving the average number of tokens per sentence, shown in Table 1. 2.3. Introducing Average Normalized Entropy (ANE) In this paper, we focus on studying the soft-alignment probabil- ity matrices resulting from the learning of S2S models for the UWS task. To assess the overall quality of these matrices with- out having gold alignment information, we introduce Average Normalized Entropy (ANE). Definition: Given the source and target pair (s, t) of lengths s and t respectively, for every phone ti, the normalized entropy (NE) is computed considering all possible words in s (Equa- tion 1), where P (ti, sj) is the alignment probability between the phone ti and the word sj (a cell in the matrix). The ANE for a sentence is then defined by the arithmetic mean over the resulting NE for every phone from the sequence t (Equation 2). N E(ti, s) = − s(cid:88) j=1 P (ti, sj) · logs(P (ti, sj)) (cid:80)t i=1 N E(ti, s) (1) (2) AN E(t, s) = t From this definition, we can derive ANE for different granular- ities (sub or supra-sentential) by accumulating its value for the full corpus, for a single type or for a single token. Corpus ANE will be used to summarize the overall performance of a S2S model on a specific corpus. Token ANE extends ANE to tokens Table 1: Statistics of the three source-target data sets. corpus EN-FR (33k) EN-FR (5k) MB-FR (5k) #types source 21,083 8,740 6,633 target 33,135 12,226 5,162 #tokens source 381,044 59,090 30,556 target 467,475 72,670 42,715 Dot-Product (SDP) Attention function is computed as: Att(V, K, Q) = sof tmax( QK T√ dk )V (5) In practice, several attentions are computed for a given QKV set. The QKV set is first projected into h different spaces (mul- tiple heads), where the SDP attention is computed in parallel. Resulting values for all heads are then concatenated and once again projected, yielding the layer's output. (6) and (7) illustrate the process, in which H is the set of h heads (H = h1, ..., hh) and f is a linear projection. Self-Attention defines the case where query and values come from same source (learning com- patibility functions within the same sequence of elements). M ultiHead(V, K, Q) = f (Concat(H)) hi = Att(fi(V ), fi(K), fi(Q)) (6) (7) 3.3. CNN: Pervasive Attention Different from the previous models, which are based on encoder-decoder structures interfaced by attention mechanisms, this approach relies on a single 2D CNN across both sequences (no separate coding stages) [2]. Using masked convolutions, an auto-regressive model predicts the next output symbol based on a joint representation of both input and partial output se- quences. Given a source-target pair (s, t) of lengths s and t respectively, tokens are first embed in ds and dt dimensional spaces via look-up tables. Token embeddings {x1, . . . , xs} and {y1, . . . , yt} are then concatenated to form a 3D tensor X ∈ Rt×s×f0, with f0 = dt + ds, where: Xij = [yi xj] (8) Each convolutional layer l ∈ {1, . . . , L} of the model produces a tensor Hl of size t×s× fl, where fl is the number of output channels for that layer. To compute a distribution over the tokens in the output vocabulary, the second dimension of the tensor is used. This dimension is of variable length (given by the input sequence) and it is collapsed by max or average pooling to L of size t×fL. Finally, 1×1 convolution obtain the tensor HPool followed by a softmax operation are applied, resulting in the distribution over the target vocabulary for the next output token. Attention mechanism: joint encoding acts as an attention-like mechanism, since individual source elements are re-encoded as the output is generated. The self-attention approach of [21] is applied. It computes the attention weight tensor α, of size t × s, from the last activation tensor HL, to pool the elements of the same tensor along the source dimension, as follows: HAtt L = αHL. α = softmax (W1 tanh (HLW2)) (9) (10) where W1 ∈ Rfa and W2 ∈ Rfa×fL are weight tensors that map the fL dimensional features in HL to the attention weights via an fa dimensional intermediate representation. average( token length) source 4.37 4.38 4.18 target 4.57 4.57 4.39 average( #tokens / sentence) source 11.48 11.52 5.96 target 14.08 14.17 8.33 3.4. Comparing S2S Architectures For each S2S architecture, and each of the three corpora, we train five models (runs) with different initialization seeds.3 Be- fore segmenting, we average the produced matrices from the five different runs as in [5]. Evaluation is done in a bilingual segmentation condition that corresponds to the real UWS task. In addition, we also perform segmentation in a monolingual condition, where a phoneme sequence is segmented with re- gards to the corresponding word sequence (transcription) in the same language (hence monolingual).4 Our networks are opti- mized for the monolingual task. Across all architectures, we use embeddings of size 64 and batch size of 32 (5K data set), or embeddings of size 128 and batch size of 64 (33K data set). Dropout of 0.5 and early-stopping procedure are applied in all cases. RNN models have only one layer, a bi-directional en- coder, and cell size equal to the embedding size, as in [5]. CNN models use the hyper-parameters from [2] with only 3 layers (5K data set), or 6 (33K data set), and kernel size of 3. Trans- former models were optimized starting from the original hyper- parameters of [3]. Best results (among 50 setups) were achieved using 2 heads, 3 layers (encoder and decoder), warm-up of 5K steps, and using cross-entropy loss without label-smoothing. Finally, for selecting which head to use for UWS, we exper- imented using the last layer's averaged heads, or by selecting the head with minimum corpus ANE. While the results were not significantly different, we kept the ANE selection. 3.4.1. Unsupervised Word Segmentation Results The word boundary F-scores5 for the task of UWS from phoneme sequence (in Mboshi or English) are presented in Ta- ble 2, with monolingual results shown for information only (topline). Surprisingly, RNN models outperform the more re- cent (CNN and Transformer) approaches. One possible expla- nation is the lower number of parameters (for a 5K setup, in average 700K parameters are trained, while CNN needs an ad- ditional 30.79% and Transformer 5.31%). However, for 33K setups, CNNs actually need 30% less parameters than RNNs, but still perform worse. Transformer's low performance could be due to the use of several heads "distributing" alignment in- formation across different matrices. Nonetheless, we evaluated averaged heads and single-head models, and these resulted in significant decreases in performance. This suggests that this ar- chitecture may not need to learn explicit alignment to translate, but instead it could be capturing different kinds of linguistic information, as discussed in the original paper and in its exam- ples [3]. Also, on the decoder side, the behavior of the self- attention mechanism on phoneme units is unclear and under- 3RNN, CNN and Transformer implementations from [22, 2, 23] re- spectively. 4This task can be seen as an automatic extraction of a pronunciation lexicon from parallel words/phonemes sequences. 5For CNN and RNN, average standard deviation for the bilingual task is of less than 0.8%. For Transformer, it is almost 4%. Table 2: Boundary F-scores for the UWS task. Bilingual Monolingual EN 33K EN 5K MB 5K RNN CNN Transformer RNN CNN Transformer RNN CNN Transformer 77.10 71.30 52.70 70.40 55.90 52.50 74.00 68.20 66.40 99.80 98.60 94.90 99.30 98.80 80.90 92.50 89.80 83.50 studied so far. For the encoder, Voita et al. [15] performed after- training encoder head removal based on head confidence, show- ing that after initial training, most heads were not necessary for maintaining translation performance. Hence, we find the Multi-head mechanism interpretation challenging, and maybe not suitable for a direct word segmentation application, such as our method. As in [24], our best UWS method (RNN) for the bilingual task does not reach the performance level of a strong Bayesian baseline [25] with F-scores of 89.80 (EN33K), 87.93 (EN5K), and 77.00 (MB5K). However, even if we only evaluate word segmentation performance, our neural approaches learn to seg- ment and align, whereas this baseline only learns to segment. Section 3.5 will leverage those alignments for a type discovery task useful in language documentation. The Pearson's ρ correlation coefficients between ANE and boundary F-scores for all mono and bilingual runs of all cor- pora (N = 30) are −0.98 (RNN), −0.97 (CNN), and −0, 66 (Transformer), with p-values smaller than 10−5. These strong negative correlations confirm our hypothesis that lower ANEs correspond to sharper and better alignments. 3.4.2. Impact of Data Size and Quality EN33K and EN5K results of Table 2 allow us to analyze the impact of data size on the S2S models. For the bilingual task, RNN performance drops by 7% on average, whereas perfor- mance drop is bigger for CNN (14-15%). Transformer performs poorly in both cases, and increasing data size from 5K to 33K seems to help only for a trivial task (see monolingual results). The EN5K and MB5K results of Table 2 reflect the impact of language pairs on the S2S models. We know from [26, 27] that English should be easier to segment than Mboshi, and this was confirmed by both dpseg and monolingual results. How- ever, this trend is not confirmed in the bilingual task, where the quality of the (sentence aligned) parallel corpus seems to have more impact (higher boundary F-scores for MB5K than for EN5K for all S2S models). As shown in Table 1, MB-FR corpus has shorter sentences and smaller lexicon diversity, while EN- FR is made of automatically aligned books (noisy alignments), what may explain our experimental results. 3.5. Type Discovery in Low-Resource Settings We investigate the use of Alignment ANE as a confidence mea- sure. From the RNN models, we extract and rank the discovered types by their ANE, and examine if it can be used to separate true words in the discovered vocabulary from the rest. The results for low-resource scenarios (only 5K) in Table 3 sug- gest that low ANE corresponds to the portion of the discov- Table 3: Type retrieval results (RNN) using ANE for keeping most confident (type, translation) pairs. For instance, AN E = 0.4 means all discovered types have AN E ≤ 0.4. EN 5K R 0.50 3.85 12.51 21.76 28.17 32.41 34.34 35.16 35.31 35.34 P 70.97 55.43 44.99 32.81 23.37 18.54 16.23 15.21 15.01 15.01 F 1.00 7.20 19.58 26.17 25.54 23.59 22.04 21.23 21.06 21.07 MB 5K R 0.57 2.89 8.14 16.61 23.44 27.61 30.12 30.95 31.05 31.05 F 1.12 5.46 13.41 22.01 25.49 26.09 26.08 25.84 25.80 25.80 P 72.13 49.02 38.18 32.63 27.93 24.73 23.00 22.17 22.06 22.06 ANE 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 all Table 4: Top 5 low and high ANE ranking for the discovered types (EN5K), with gold transcription and aligned information between parentheses (respectively). "INV" means incorrect type. Top Low ANE Top High ANE 1 SER1 (sir, EOS token) 2 HHAH1SH (hush, chut) 3 4 KLER1K (clerk, clerc) 5 KIH1S (kiss, embrasse) AH0 (a, convenable) IH1 (INV, ah) FIH1SHER0 (fisher, fisher) D (INV, riant) N (INV, obit) YUW1 (you, diable) ered vocabulary the network is confident about, and these are, in most of the cases, true discovered lexical items (first row, P ≥ 70%).6 As we keep higher Alignment ANE values, we increase recall but loose precision. This suggests that, in a doc- umentation scenario, ANE could be used as a confidence mea- sure by a linguist to extract a list of types with higher precision, without having to pass through all the discovered vocabulary. Moreover, as exemplified for EN5K in Table 4, we also retrieve aligned information (translation candidates) for the generated lexicon. 4. Conclusions We presented an empirical evaluation of different architectures (RNN, CNN and Transformer) with respect to their capacity to align word sequences in a source language with phoneme se- quences in a target language, inferring from it word segmen- tation on the target side (UWS task).7 Although RNNs have been outperformed by CNN and Transformer-based models for machine translation, for UWS these architectures are still more robust in low-resource scenarios, and present the best segmen- tation results. We also introduced ANE, an intrinsic measure of alignment quality of S2S models. Accumulating it over the dis- covered alignments, we showed it can be used as a confidence measure to select true words, increasing Type F-scores. 6Type ANE for the retrieval task was also investigated, and results were positive, but slightly worse than the ones from Alignment ANE. 7Pointers for corpora, parameters and implementations available at https://gitlab.com/mzboito/attention_study [19] P. Godard, G. Adda, M. Adda-Decker, J. Benjumea, L. Be- sacier, J. Cooper-Leavitt, G.-N. Kouarata, L. Lamel, H. Maynard, M. Muller et al., "A very low resource language speech corpus for computational language documentation experiments," arXiv preprint arXiv:1710.03501, 2017. [20] V. Panayotov, G. Chen, D. Povey, and S. Khudanpur, "Librispeech: An ASR corpus based on public domain audio books," in 2015 IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP 2015, South Brisbane, Queensland, Australia, April 19-24, 2015, 2015, pp. 5206 -- 5210. [Online]. Available: https://doi.org/10.1109/ICASSP.2015. 7178964 [21] Z. Lin, M. Feng, C. dos Santos, M. Yu, B. Xiang, B. Zhou, and Y. Bengio, "A structured self-attentive sentence embedding," in iclr, 2017. [22] A. B´erard, O. Pietquin, C. Servan, and L. Besacier, "Listen and translate: A proof of concept for end-to-end speech-to-text trans- lation," arXiv preprint arXiv:1612.01744, 2016. [23] M. Ott, S. Edunov, A. Baevski, A. Fan, S. Gross, N. Ng, D. Grang- ier, and M. Auli, "fairseq: A fast, extensible toolkit for sequence modeling," arXiv preprint arXiv:1904.01038, 2019. [24] P. Godard, "Unsupervised word discovery for computational lan- guage documentation," Ph.D. dissertation, Universit Paris-Saclay, 2019. [25] S. Goldwater, T. L. Griffiths, and M. Johnson, "A Bayesian frame- work for word segmentation: Exploring the effects of context," Cognition, vol. 112, no. 1, pp. 21 -- 54, 2009. [26] A. Fourtassi, B. Borschinger, M. Johnson, and E. Dupoux, "Why is english so easy to segment?" in Proceedings of the Fourth An- nual Workshop on Cognitive Modeling and Computational Lin- guistics (CMCL), 2013, pp. 1 -- 10. [27] A. Rialland, M. E. Aborobongui, M. Adda-Decker, and L. Lamel, "Dropping of the class-prefix consonant, vowel elision and auto- matic phonological mining in embosi (bantu c 25)," in Selected Proceedings of the 44th Annual Conference on African Linguis- tics, 2015, pp. 7 -- 10. 5. References [1] D. Bahdanau, K. Cho, and Y. Bengio, "Neural machine trans- lation by jointly learning to align and translate," arXiv preprint arXiv:1409.0473, 2014. [2] M. Elbayad, L. Besacier, and J. Verbeek, "Pervasive attention: 2d convolutional neural networks for sequence-to-sequence predic- tion," arXiv preprint arXiv:1808.03867, 2018. [3] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, "Attention is all you need," in Advances in Neural Information Processing Systems, 2017, pp. 5998 -- 6008. [4] J. Gehring, M. Auli, D. Grangier, D. Yarats, and Y. N. Dauphin, "Convolutional sequence to sequence learning," in Proceedings of the 34th International Conference on Machine Learning-Volume 70. JMLR. org, 2017, pp. 1243 -- 1252. [5] P. Godard, M. Zanon Boito, L. Ondel, A. Berard, F. Yvon, A. Villavicencio, and L. Besacier, "Unsupervised word segmenta- tion from speech with attention," in Interspeech, 2018. Curran Associates, [Online]. Available: and Q. V. Le, [6] I. Sutskever, O. Vinyals, "Sequence to sequence learning with neural networks," in Advances in Neural Information Processing Systems 27, Z. Ghahramani, and K. Q. M. Welling, C. Cortes, N. D. Lawrence, Weinberger, Eds. Inc., 2014, pp. 3104 -- 3112. http://papers.nips.cc/paper/ 5346-sequence-to-sequence-learning-with-neural-networks.pdf [7] G. Adda, S. Stuker, M. Adda-Decker, O. Ambouroue, L. Be- sacier, D. Blachon, H. Bonneau-Maynard, P. Godard, F. Ham- laoui, D. Idiatov, G.-N. Kouarata, L. Lamel, E.-M. Makasso, A. Rialland, M. V. de Velde, F. Yvon, and S. Zerbian, "Break- ing the unwritten language barrier: The BULB project," Procedia Computer Science, vol. 81, pp. 8 -- 14, 2016. [8] A. Anastasopoulos and D. Chiang, "A case study on using speech- to-translation alignments for language documentation," arXiv preprint arXiv:1702.04372, 2017. [9] L. Besacier, B. Zhou, and Y. Gao, "Towards speech translation of non written languages," in Spoken Language Technology Work- shop, 2006. IEEE. IEEE, 2006, pp. 222 -- 225. [10] C. Lignos and C. Yang, "Recession segmentation: simpler on- line word segmentation using limited resources," in Proceedings of the fourteenth conference on computational natural language learning. Association for Computational Linguistics, 2010, pp. 88 -- 97. [11] C. Bartels, W. Wang, V. Mitra, C. Richey, A. Kathol, D. Vergyri, H. Bratt, and C. Hung, "Toward human-assisted lexical unit dis- covery without text resources," in Spoken Language Technology Workshop (SLT), 2016 IEEE. IEEE, 2016, pp. 64 -- 70. [12] P. K. Austin and J. Sallabank, The Cambridge handbook of en- dangered languages. Cambridge University Press, 2011. [13] K. Song, T. Xu, F. Peng, and J. Lu, "Hybrid self-attention network for machine translation," arXiv preprint arXiv:1811.00253, 2018. [14] J. Li, Z. Tu, B. Yang, M. R. Lyu, and T. Zhang, "Multi- head attention with disagreement regularization," arXiv preprint arXiv:1810.10183, 2018. [15] E. Voita, D. Talbot, F. Moiseev, R. Sennrich, and I. Titov, "Ana- lyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned," arXiv preprint arXiv:1905.09418, 2019. [16] T. Zenkel, J. Wuebker, and J. DeNero, "Adding interpretable at- tention to neural translation models improves word alignment," arXiv preprint arXiv:1901.11359, 2019. [17] L. Ondel, L. Burget, and J. Cernock`y, "Variational inference for acoustic unit discovery," Procedia Computer Science, vol. 81, pp. 80 -- 86, 2016. [18] A. C. Kocabiyikoglu, L. Besacier, and O. Kraif, "Augmenting lib- rispeech with french translations: A multimodal corpus for direct speech translation evaluation," arXiv preprint arXiv:1802.03142, 2018.
1811.05569
1
1811
2018-11-13T23:27:06
Cross-lingual Short-text Matching with Deep Learning
[ "cs.CL" ]
The problem of short text matching is formulated as follows: given a pair of sentences or questions, a matching model determines whether the input pair mean the same or not. Models that can automatically identify questions with the same meaning have a wide range of applications in question answering sites and modern chatbots. In this article, we describe the approach by team hahu to solve this problem in the context of the "CIKM AnalytiCup 2018 - Cross-lingual Short-text Matching of Question Pairs" that is sponsored by Alibaba. Our solution is an end-to-end system based on current advances in deep learning which avoids heavy feature-engineering and achieves improved performance over traditional machine-learning approaches. The log-loss scores for the first and second rounds of the contest are 0.35 and 0.39 respectively. The team was ranked 7th from 1027 teams in the overall ranking scheme by the organizers that consisted of the two contest scores as well as: innovation and system integrity, understanding data as well as practicality of the solution for business.
cs.CL
cs
Cross-lingual Short-text Matching with Deep Learning Asmelash Teka Hadgu [email protected] L3S Research Center Hannover, Germany ABSTRACT The problem of short text matching is formulated as follows: given a pair of sentences or questions, a matching model determines whether the input pair mean the same or not. Models that can automatically identify questions with the same meaning have a wide range of applications in question answering sites and modern chatbots. In this article, we de- scribe the approach by team ሀሁ to solve this problem in the context of the "CIKM AnalytiCup 2018 - Cross-lingual Short-text Matching of Question Pairs" that is sponsored by Alibaba. Our solution is an end-to-end system based on cur- rent advances in deep learning which avoids heavy feature- engineering and achieves improved performance over tradi- tional machine-learning approaches. The log-loss scores for the first and second rounds of the contest are 0.35 and 0.39 respectively. The team was ranked 7th from 1027 teams in the overall ranking scheme by the organizers that consisted of the two contest scores as well as: innovation and system integrity, understanding data as well as practicality of the solution for business. KEYWORDS natural language inference, deep learning, cross-lingual text matching 1 Many large Internet companies such as Alibaba, perform mil- lions of transactions with users every day. For instance, Al- iMe is an online conversational assistant for individuals that enables intelligent services such as all-time shopping guides, assistance service, chatting service and supports many other products within Alibaba's ecosystem. Short-text matching is one of the most common and important tasks when designing and developing such chatbots. With increased globalization, the services need to be provided with foreign languages, such as English, Spanish, etc. In this challenge, we focus on the language adaptation problem in short-text matching task. A similar challenge was posed by Quora on Kaggle 1 where Kagglers were challenged to tackle the problem of classify- ing whether question pairs are duplicates or not. A good model would help Quora to provide better experience for users (writers, seekers and readers) by making it easier to find high quality answers to questions. INTRODUCTION The goal of this challenge is to build a cross-lingual short- text matching model. The source language is English and the target language is Spanish. Participants could train their models by applying advanced techniques to classify whether 1https://www.kaggle.com/c/quora-question-pairs question pairs are the same meaning or not. At the end, the models' performance is tested on the target language. Challenge Restrictions The organizers wanted all participants to focus on the text matching and language adaptation problems in this task. They gave the following restrictions: (cid:15) During training one can only use the data provided by them, including labeled data, unlabeled data, transla- tions, word vectors. No other data or pre-trained mod- els are allowed. (cid:15) If one uses pre-trained word vectors, only fastText pre- trained word vectors are allowed. (cid:15) If one needs translation model or translation corpus, he/she can only use the translations provided by them. (cid:15) With the parallel data provided, theoretically one can train a translation model. Such methods are not pro- hibited, but the organizers do not recommend so. Dataset In this competition, the training dataset contains two lan- guages. There are 20,000 labeled question pairs in English. There are 1,400 labeled question pairs and 55,669 unlabeled questions in Spanish. The ground truth is the set of labels that have been supplied by human experts. Following is the description of each file. (cid:15) cikm_english_train: English pairs, labels, and the cor- responding Spanish translations. The format is: Eng- lish question 1, Spanish translation 1, English question 2, Spanish translation 2, label. Label being 1 indicates that the two questions have essentially the same mean- ing, and 0 otherwise. (cid:15) cikm_spanish_train: Spanish pairs, labels, and the corresponding English translations. The format is Spanish question 1, English translation 1, Spanish question 2, English translation 2, label Label being 1 indicates that the two questions have essentially the same meaning, and 0 otherwise. (cid:15) cikm_unlabel_spanish_train: Spanish questions and corresponding English translations. (cid:15) cikm_test_a: Spanish question pairs to be predicted in phase one. (cid:15) cikm_test_b: Spanish question pairs to be predicted in phase two. unlabeled 2 RELATED WORK Traditional approaches to question matching involve trans- forming pair of questions into a term space or latent space and performing matching in term/latent space through dis- tance measures such as cosine similarity or dot product. E.g., BM25 is a bag-of-words retrieval function that is used to identify matching questions based on the terms appearing in each question. However, relying on terms that appear in question pairs is problematic. Questions may be formulated using differ- ent words to mean the same thing. This includes words that are synonyms which are used to convey the same intent but have different surface forms. In this case, trivial approaches that rely on exact matches of terms will not work since there maybe no overlapping words. The key challenges are (i) bridging the semantic gap between words and (ii) capturing the order of words. Current advances in deep learning have improved performance of many natural language processing (NLP) tasks including the problem of text matching. Deep learning methods for matching have two components. They use distributed representation of words and sentences. The use neural networks to perform more complex relationships instead of applying similarity functions such as cosine or dot product. In this work, we follow the latter line of research because better representation gives better generalization ability and these deep learning models involve richer matching signals. Methods for representation learning involve first comput- ing representation through: deep neural networks (DNN), convolutional neural networks (CNN) or Recurrent Neural Networks (RNN). This is followed by performing a match- ing function on the representations using (i) cosine similarity dot product or (ii) learning through feed forward networks. In [3] the authors use bag of words and bag of letter tri- grams to capture compositional representation of sentences. Using letter trigrams to represent questions has the advan- tage of reduced vocabulary, generalizes to unseen words and is robust to misspelling, inflection etc. After learning the representations through DNNs, they use cosine similarity between the learned semantic vectors to perform matching. One of the weaknesses of this approach is that bag of letter trigrams cannot keep the word order information. CNNs are good to keep local order of words. In [2] Hu et al. use CNNs for matching sentences. RNNs can keep long dependence re- lations. Mueller and Thyagarajan [4] use siamese RNNs to learn sentence similarity. Two state-of-the-art approaches we will use in our ex- periments are: A decomposable attention model for natural language inference (Decomposable) [6] that combines neu- ral network attention with token alignment and Enhanced LSTM for natural language inference (ESIM) [1] that uses chain LSTMs. 3 SOLUTION In this section, we describe our solution. Our key contri- butions are (i) unsupervised training data generation from small labeled data and (ii) a novel neural architecture for short text matching. 3.1 Data Preprocessing As with any data science task, we will begin by first exploring our dataset to help us get a good grasp of the problem and make better decisions e.g., of neural network setup. Table 1 shows the number of terms per sentence for Spanish. This is important to determine the maximum length of tokens per sentence to feed to an embedding layer. After trying 50, 60, and 70, we found 60 to be better. Since there is a restriction to use word embeddings from fastText2, it is important to assess the out-of-vocabulary terms. These are tokens that are in our dataset but can- not be found in the vocabulary of the fastText embedding vocabulary. As we can see from Table 1 the test data (both for stage one and stage two) has significantly more out-of- vocabulary tokens than all the other available data sources that can be potentially used for training. Out-of-vocabulary terms are indeed a big problem in this challenge. Inspecting the out-of-vocabulary terms, reveals that these are of many types: foreign words such as 'trademanager', misspellings and typos e.g., reemboloso, reembolzo to mean reembolso, misspellings such as the use of v in place of b e.g., recivido to mean recibido as well as the use of accented or non-accented characters for instance (cancelé, cancele), (cupon, cupón), (trabajais, trabajáis), (recibire, recibiré) where the first term in each of these tuples is an out-of-vocabulary term and the second is available in the embedding. We add these rules that cover many out-of-vocabulary cases in our preprocess- ing step. 3.2 Unsupervised Training Data Generation The datasets provided in the challenge mirrors a very com- mon scenario in large Internet companies where there is al- ready a relatively large training sample of English question pairs (20,000) and a small labeled data set in the target lan- guage (Spanish). Our first attempt to use the small Spanish training dataset in combination with the Spanish transla- tions of the English question pairs alone did not yield a promising result. The question is how to leverage the big (55,669) unlabeled Spanish question pairs? Our key insight is to leverage the English translations as a link to 'mint' more natural Spanish question pairs from the unlabeled dataset for training. Concretely, for each labeled question pairs in English, we generate the corresponding Spanish pair with the same label. Consolidating training data through user generated matching of sentences proceeds in two stages. The first one involves gathering matching question pairs form the unlabeled dataset only. The second approach gathers all unique English labeled question pairs from the English (cikm_english_train) and Spanish (cikm_spanish_train) ground truth data and uses the English translation in the unlabeled data to collect more pairs with the same label. In both of these tasks, the most important operation is how to find whether or not two English questions mean the same. 2https://github.com/facebookresearch/fastText 2 Table 1: Characterizing Spanish sentences in terms of number of (i) unique and (ii) out-of-vocabulary terms per sentence. cikm_spanish_train cikm_english_train cikm_unlabel_spanish_train cikm_test_a cikm_test_b number of uni-grams per sentence (max, mean, std) 51, 9.823, 5.547 53, 7.877, 5.093 73, 17.11, 8.588 57, 9.52, 6.481 55, 9.47, 6.801 out of vocabulary terms (terms, sentences, pairs) 64, 143, 141 370, 451, 415 987, 1375, 1177 We require that such a method be very precise as we do not want to introduce wrong labeled pairs in our training. One basic and straightforward answer is to use exact matching. Another idea would be to build a classifier us- ing the English training set. We tried both ideas. Whereas the first approach cannot generate many pairs the second method did not meet our high precision requirement. Finally we used exact matches of sentences after hashing each Eng- lish sentence by taking a bag of words approach after lower casing the sentence, stripping off stop-words, numbers and separately encoding one or more negation keyword markers as 'no'. This normalization step destroys the order but since it keeps the most essential terms in a sentence, we can still retain the intent of the question. We observed the stop word lists in NLTK3 had some omissions. For instance whereas the stop-word list contains "you're" "you'll" "should" it does not contain: "I'm" "I'll" "would" etc. This phenomenon has been studied in [5] where the authors found that stop words in most open-source soft- ware (OSS) packages for natural language processing have omissions. We consolidated the stop-words list by adding such omissions and removing some inclusions such as "re" or "again" to better suite the particular problem we are solving. Following this approach to gather more training data gave us a big jump in the leaderboard and confirming our hypothesis that minting more natural Spanish pairs from the unlabeled dataset was indeed a good idea. We evaluated our unsupervised approach of match- ing English question pairs by applying the technique on cikm_english_train. It is not possible to evaluate absolute precision and recall. However we can ask how many of the ground-truth matches can we obtain using this approach and most importantly, what is the relative precision? i.e., of the matches we generate how many are with the wrong label? We recovered 404 of the 4887 (8.3%) matching pairs. We also got 9 pairs out of the 15650 false positives. Overall, the relative precision is 97.82%. On further inspection, we found that half of the false positives are actually wrongly labeled pairs on the ground truth data. This gives us the confidence that our unsupervised approach has acceptable precision for the purpose of generating more matching pairs from the un- labeled dataset that we can use for training. Expanding the ground-truth pairs follows the same logic. After applying the normalization step described above, if an English sentence in the unlabeled data matches a sentence in 3https://www.nltk.org the ground-truth tuple, then the Spanish equivalent of this sentence produces a new pair by replacing the Spanish sen- tence on the ground-truth. Using these combined approaches, we gathered a total of 76,178 pairs where 39,395 are non- matches and the remaining 36,783 are matching pairs. One of the main challenges in this competition has been building a good validation set that would reflect the dis- tribution of the test data. One approach we used to avoid overfitting was to completely leave out the Spanish training set as validation set and do the training on the combination of Spanish translations on the English training dataset and the data generated through the unsupervised approach. 3.3 Proposed Model Current advanced in deep learning have improved results on a variety of NLP tasks. With this observation, our focus was to test current state-of-the-art methods and explore room for improvement in the context of this challenge. Our approach builds on the works we highlighted in the related work sec- tion. A visual representation of our architecture is shown in Figure 1. It is implemented in Keras4 and uses Tensorflow5 as back-end. Here is a brief description of how it works. As with any matching system, our model accepts a pair of questions as input. The questions are then passed through a preprocessing step: lower casing, stripping punctuation and checking for fixes if a term does not exist in the embedding vocabulary. Then up to 60 of the terms in a question are passed to an embedding layer that encodes each vocabulary by a 300 dimensional dense vector. We use fastText embed- dings provided by the organizers for this purpose. After independently encoding the input question pairs, they are passed through our representation learning mod- ule that serves as a 'feature extractor'. Our representation learning module is a Siamese network that has three compo- nents: CNNs, an LSTM and a BiLSTM. We use three CNNs using 1D convolutions that can iterate over the word vectors of a sentence. We use kernel sizes of 1, 2 and 3 correspond- ing to word uni- bi- and tri-grams. The LSTM unit in the Siamese network similarly takes the output of the embed- ding layer and produces a fixed size (experimented with 32, 64, 128) dimensional vector. Finally the third component of the Siamese network is a BiLSTM unit. The sentences encoded in the embedding spaces are passed through a BiL- STM to produce a fixed size dimensional vector. These three 4https://keras.io 5https://www.tensorflow.org 3 Figure 1: An overview of our proposed approach. units form the bases of our representation learning module. The outputs of these three 'feature extractors' is then con- catenated in one vector, the representation vector. Finally we take the element-wise difference and element- wise product of the representation vector, concatenate them and feed the combined vector into a Multi-layer perceptron (MLP) to learn the matching function. The MLP is a stan- dard feed-forward neural network with two hidden layers that uses relu as an activation function and has Dropout and Batch normalization. We use the log loss to evaluate the performance. If yi is the ground truth label and pi is the probability assigned to instance xi, the log loss is defined as follows: log loss = 1 N [yi log pi + (1 (cid:0) yi ) log(1 (cid:0) pi )] . Table 2: Evaluation of the different algorithms on the valida- tion set, cikm_spanish_train dataset. Results are averages of best 3-5 runs per algorithm. N∑ i=1 algorithm log loss precision recall F1-score character_ngram - baseline siamese_lstm [4] esim [1] decomposable_attention [6] siamese_conv 0.7433 0.4088 0.3114 0.3072 0.3093 siamese_conv_lstm 0.3072 siamese_conv_lstm_bilstm 0.3134 0.61 0.84 0.87 0.87 0.87 0.86 0.86 0.54 0.83 0.87 0.88 0.88 0.86 0.87 0.56 0.84 0.86 0.87 0.87 0.86 0.86 Our approach was depicted in Figure to use a Siamese network as 1. We experimented by using 4 or an ensemble (siamese_conv); using CNNs and LSTM only CNNs using CNNs, LSTM and (siamese_conv_lstm) sub- BiLSTM (siamese_conv_lstm_bilstm). Our best esim, one was mission for phase of siamese_conv_lstm, and siamese_conv_lstm_bilstm, decomposable_attention. For phase two we used esim, siamese_conv, siamese_conv_lstm_bilstm, and decom- posable_attention. Extensive experimentation was done to fine-tune and arrive at the best hyperparameters for learning rate and batch-size among others. Table 2 shows the performance of the different algorithms on the validation set. Clearly, the algorithms perform much better on the validation set than the acutal test set. This is due to the fact that the test has slightly different distribution than the validation set. One evidence is the out-of-vocabulary problem we highlighted earlier in Table 1. 4 CONCLUSION In this work we have described the approach used by team ሀሁ to solve the problem of cross-linugal short-text match- ing in the context of the "CIKM AnalytiCup 2018 - Cross- lingual Short-text Matching of Question Pairs". This prob- lem is quite useful for applications such as chat-bots and question answering sites. We have shown a neural architec- ture solution that yields very competitive results to the state- of-the-art work in the literature. In future work, we would like to explore character-level embeddings in addition to the word-level embeddings to help tackle the problem of out-of- vocabulary terms. Question oneQuestion twoEmbeddingRepresentation learningMatching function learning(0,1)CNNsLSTMBiLSTMConcatMLPdifferenceproductelement-wiseConcat REFERENCES [1] Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. 2017. Enhanced LSTM for Natural Language In- ference.. In ACL (1). Association for Computational Linguistics, 1657 -- 1668. [2] Baotian Hu, Zhengdong Lu, Hang Li, and Qingcai Chen. 2014. Convolutional Neural Network Architectures for Matching Natural Language Sentences.. In NIPS. 2042 -- 2050. [3] Po-Sen Huang, Xiaodong He, Jianfeng Gao, Li Deng, Alex Acero, and Larry P. Heck. 2013. Learning deep structured semantic mod- els for web search using clickthrough data.. In CIKM. ACM, 2333 -- 2338. [4] Jonas Mueller and Aditya Thyagarajan. 2016. Siamese Recurrent Architectures for Learning Sentence Similarity.. In AAAI. AAAI Press, 2786 -- 2792. [5] Joel Nothman, Hanmin Qin, and Roman Yurchak. 2018. Stop Word Lists in Free Open-source Software Packages. In Proceedings of Workshop for NLP Open Source Software (NLP-OSS). 7 -- 12. [6] Ankur P. Parikh, Oscar Täckström, Dipanjan Das, and Jakob Uszkoreit. 2016. A Decomposable Attention Model for Natural Language Inference. CoRR abs/1606.01933 (2016). 5
1609.06791
1
1609
2016-09-22T01:08:31
Twitter-Network Topic Model: A Full Bayesian Treatment for Social Network and Text Modeling
[ "cs.CL", "cs.IR", "cs.SI" ]
Twitter data is extremely noisy -- each tweet is short, unstructured and with informal language, a challenge for current topic modeling. On the other hand, tweets are accompanied by extra information such as authorship, hashtags and the user-follower network. Exploiting this additional information, we propose the Twitter-Network (TN) topic model to jointly model the text and the social network in a full Bayesian nonparametric way. The TN topic model employs the hierarchical Poisson-Dirichlet processes (PDP) for text modeling and a Gaussian process random function model for social network modeling. We show that the TN topic model significantly outperforms several existing nonparametric models due to its flexibility. Moreover, the TN topic model enables additional informative inference such as authors' interests, hashtag analysis, as well as leading to further applications such as author recommendation, automatic topic labeling and hashtag suggestion. Note our general inference framework can readily be applied to other topic models with embedded PDP nodes.
cs.CL
cs
Twitter-Network Topic Model: A Full Bayesian Treatment for Social Network and Text Modeling Kar Wai Lim ANU, NICTA Canberra, Australia Changyou Chen ANU, NICTA Canberra, Australia Wray Buntine NICTA, ANU Canberra, Australia Abstract Twitter data is extremely noisy – each tweet is short, unstructured and with in- formal language, a challenge for current topic modeling. On the other hand, tweets are accompanied by extra information such as authorship, hashtags and the user-follower network. Exploiting this additional information, we propose the Twitter-Network (TN) topic model to jointly model the text and the social net- work in a full Bayesian nonparametric way. The TN topic model employs the hierarchical Poisson-Dirichlet processes (PDP) for text modeling and a Gaussian process random function model for social network modeling. We show that the TN topic model significantly outperforms several existing nonparametric models due to its flexibility. Moreover, the TN topic model enables additional informative inference such as authors' interests, hashtag analysis, as well as leading to further applications such as author recommendation, automatic topic labeling and hashtag suggestion. Note our general inference framework can readily be applied to other topic models with embedded PDP nodes. 1 Introduction Emergence of web services such as blog, microblog and social networking websites allows people to contribute information publicly. This user-generated information is generally more personal, informal and often contains personal opinions. In aggregate, it can be useful for reputation analysis of entities and products, natural disasters detection, obtaining first-hand news, or even demographic analysis. Twitter, an easily accessible source of information, allows users to voice their opinions and thoughts in short text known as tweets. Latent Dirichlet allocation (LDA) (Blei et al., 2003) is a popular form of topic model. Unfortunately, a direct application of LDA on tweets yields poor result as tweets are short and often noisy (Zhao et al., 2011), i.e. tweets are unstructured and often contain grammatical and spelling errors, as well as informal words such as user-defined abbreviations due to the 140 characters limit. LDA fails on short tweets since it is heavily dependent on word co-occurrence. Also notable is that text in tweets may contain special tokens known as hashtags; they are used as keywords and allow users to link their tweets with other tweets tagged with the same hashtag. Nevertheless, hashtags are informal since they have no standards. Hashtags can be used as both inline words or categorical labels. Hence instead of being hard labels, hashtags are best treated as special words which can be the themes of the tweets. Tweets are thus challenging for topic models, and ad hoc alternatives are used instead. In other text analysis applications, tweets are often 'cleansed' by NLP methods such as lexical normalization (Baldwin et al., 2013). However, the use of normalization is also criticized (Eisenstein, 2013). In this paper, we propose a novel method for short text modeling by leveraging the auxiliary infor- mation that accompanies tweets. This information, complementing word co-occurrence, allows us to model the tweets better, as well as opening the door to more applications, such as user recommen- 1 dation and hashtag suggestion. Our main contributions include: 1) a fully Bayesian nonparametric model called Twitter-Network (TN) topic model that models tweets very well; and 2) a combination of both the hierarchical Poisson Dirichlet process (HPDP) and the Gaussian process (GP) to jointly model text, hashtags, authors and the followers network. We also develop a flexible framework for arbitrary PDP networks, which allows quick deployment (including inference) of new variants of HPDP topic models. Despite the complexity of the TN topic model, its implementation is made relatively straightforward with the use of the framework. 2 Background and Related Work LDA is often extended for different types of data, some notable examples that use auxiliary infor- mation are the author-topic model (Rosen-Zvi et al., 2004), the tag-topic model (Tsai, 2011), and Topic-Link LDA (Liu et al., 2009). However, these models only deal with just one kind of additional information and do not work well with tweets since they are designed for other types of text data. Note that the tag-topic model treats tags as hard labels and uses them to group text documents, which is not appropriate for tweets due to the noisy nature of hashtags. Twitter-LDA (Zhao et al., 2011) and the behavior-topic model (Qiu et al., 2013) were designed to explicitly model tweets. Both models are not admixture models since they limit one topic per document. The behavior-topic model an- alyzes tweets' "posting behavior" of each topic for user recommendation. On the other hand, the biterm topic model (Yan et al., 2013) uses only the biterm co-occurrence to model tweets, discard- ing document level information. Both biterm topic model and Twitter-LDA do not incorporate any auxiliary information. All the above topic models also have a limitation in that the number of topics need to be chosen in advance, which is difficult since this number is not known. To sidestep the need of choosing the number of topics, (Teh and Jordan, 2010) proposed Hierarchi- cal Dirichlet process (HDP) LDA, which utilizes the Dirichlet process (DP) as nonparametric prior. Furthermore, one can replace the DP with the Poisson-Dirichlet process (PDP, also known as the Pitman-Yor process), which models the power-law of word frequencies distributions in natural lan- guages. In natural languages, the distribution of word frequencies exhibits a power-law (Goldwater et al., 2006). For topic models, replacing the Dirichlet distribution with the PDP can yield great improvement (Sato and Nakagawa, 2010). Some recent work models text data with network information ((Liu et al., 2009; Chang and Blei, 2010; Nallapati et al., 2008)), however, these models are parametric in nature and can be restrictive. On the contrary, Miller et al. (Miller et al., 2009) and Lloyd et al. (Lloyd et al., 2012) model network data directly with nonparametric priors, i.e. with the Indian Buffet process and the Gaussian process respectively, but do not model text. 3 Model Summary The TN topic model makes use of the accompanying hashtags, authors, and followers network to model tweets better. The TN topic model is composed of two main components: a HPDP topic Figure 1: Twitter-Network topic model Figure 2: Log-likelihood vs. iterations 2 Misc. Topic Author Topic Authors Link Hashtags Words Word Dist. Tags Dist. Doc. Topic 0500100015002000-2400000-2200000-2000000iterationlog-likelihoodTN ATM HDP-LDA model for the text and hashtags, and a GP based random function model for the followers network. The authorship information serves to connect the two together. We design our HPDP topic model for text as follows. First, generate the global topic distribution µ0 that serves as a prior. Then generate the respective authors' topic distributions ν for each author, and a miscellaneous topic distribution µ1 to capture topics that deviate from the authors' usual topics. Given ν and µ1, we generate the topic distributions for the documents, and words (η, θ(cid:48), θ). We also explicitly model the influence of hashtags to words. Hashtag and word generation follows standard LDA and is not discussed here. Note that the tokens of hashtags are shared with the words, i.e. the hashtag #happy share the same token as the word happy. Also note that all distributions on probability vectors are modeled by the PDP, making the model a network of PDP nodes. The network modeling is connected to the HPDP topic model via the author topic distributions ν, where we treat ν as inputs to the GP in the network model. The GP, denoted as F, determines the links between the authors (x). Figure 1 displays the graphical model of TN, where region a(cid:13) and b(cid:13) shows the network model and topic model respectively. See supplementary material1 for a detailed description. We emphasize that our treatment of the network model is different to that of (Lloyd et al., 2012). We define a new kernel function based on the cosine similarity in our network model, which provides significant improvement over the original kernel function. Also, we derive a new sampling procedure for inference due to the additive coupling of topic distributions and network connections. 4 Posterior Inference We alternatively perform Markov chain Monte Carlo (MCMC) sampling on the topic model and the network model, conditioned on each other. We derive a collapsed Gibbs sampler for the topic model, and a Metropolis-Hastings (MH) algorithm for the network model. We develop a framework to perform collapse Gibbs sampling generally on any Bayesian network of PDPs, built upon the work of (Buntine et al., 2010; Chen et al., 2011), which allows quick prototyping and development of new variants of topic model. We refer the readers to the supplementary materials for the technical details. 5 Experiments and Applications We evaluate the TN topic model quantitatively with standard topic model measures such as test-set perplexity, likelihood convergence and clustering measures. Qualitatively, we evaluate the model by visualizing the topic summaries, authors' topic distributions and by performing an automatic la- beling task. We compare our model with HDP-LDA, a nonparametric variant of the author-topic model (ATM), and the original random function network model. We also perform ablation studies to show the importance of each component in the model. The results of the comparison and ablation studies are shown in Table 1. We use two tweets corpus for experiments, first is a subset of Twit- ter7 dataset2 (Yang and Leskovec, 2011), obtained by querying with certain keywords (e.g. finance, sports, politics). we remove tweets that are not English with langid.py (Lui and Baldwin, 2012) and filter authors who do not have network information and who authored less than 100 tweets. The corpus consists of 60370 tweets by 94 authors. We then randomly select 90% of the dataset as train- ing documents and use the rest for testing. Second tweets corpus is obtained from (Mehrotra et al., 2013), which contains a total of 781186 tweets. We note that we perform no word normalization to prevent any loss of meaning of the noisy text. In all cases, we vary α from 0.3 to 0.7 on topic nodes (µ0, µ1, νi, ηm, θ(cid:48) Experiment Settings m, θm) and set α = 0.7 on vocabulary nodes (ψ, γ) to induce power-law. We initialize β to 0.5, and set its hyperprior to Gamma(0.1, 0.1). We fix the hyperparameters λ's, s, l and σ to 1 since their values have no significant impact on model performance. In the following evaluations, we run the sampling algorithms for 2000 iterations for the training likelihood to converge. We repeat each experiment five times to reduce the estimation error of the evaluation measures. In the experiments for the TN topic model, we achieve a better computational efficiency by first running the collapsed Gibbs 1Supplementary material is available online at the authors' websites. 2http://snap.stanford.edu/data/twitter7.html 3 Table 1: Perplexity & network log-likelihood Table 2: Labeling topics with hashtags HDP-LDA ATM Random Function No Author No Hashtag No µ1 node No Word-tag link No Power-law No Network Full TN Network N/A N/A Perplexity 358.1±6.7 302.9±8.1 N/A N/A −294.6±5.9 243.8±3.4 307.5±8.3 −269.2±9.5 221.3±3.9 −271.2±5.2 217.6±6.3 −275.0±10.1 222.5±3.1 −280.8±15.4 218.4±4.0 208.4±3.2 −266.0±6.9 N/A Top hashtags/words #finance #money #economy finance money bank marketwatch stocks china group #politics #iranelection #tcot politics iran iranelection tcot tlot topprog obama #music #folk #pop music folk monster head pop free indie album gratuit T0 T1 T2 Table 3: Topics by authors Table 4: Cosine similarity Twitter ID finance yard ultimate music seriouslytech seriouspolitics pr science Top topics represented by hashtags #finance #money #realestate #music #ultimatemusiclist #mp3 #technology #web #tech #politics #postrank #news #science #news #postrank Recommended Original TN Not-recommended Original TN 1st 0.00 0.78 1st 0.36 0.17 2nd 0.05 0.57 2nd 0.33 0.09 3rd 0.06 0.55 3rd 0.14 0.10 sampling for 1000 iterations before the full inference procedure. In Figure 2, we can see that the TN topic model converges quickly compared to the HDP-LDA and the nonparametric ATM. Also, the training likelihood of the TN topic model becomes better sampling for the network information after 1000 iterations. Automatic Topic Labeling There have been recent attempts to label topics automatically in topic modeling. Here, we show that using hashtag information allows us to get good labels for topics. Table 2 shows topics labeled by the TN topic model. More detailed topic summaries are shown in the supplementary material. We empirically evaluate the suitability of hashtags in representing the topics and found that, consistently, over 90% of the hashtags are good candidates for the topic labels. Inference on Authors' Topic Distributions In addition to inference on the topic distribution of each document, the TN topic model allows us to analyze the topic distribution of each author. Table 3 presents a summary of topics by different authors, where topics are obvious from the Twitter ID. Author Recommendation We illustrate the use of the TN topic model for author recommenda- tion. On a new test dataset with 90451 tweets and 625 new authors, we predict the most similar and dissimilar authors for the new authors, based on the training model of 60370 tweets. We quantify the recommendation quality with the cosine similarities of the authors' topic distributions for the recommended author pairs. We compare our new kernel function with the original kernel function (denoted as original) used in (Lloyd et al., 2012). Table 4 shows average cosine similarities between the recommended and not-recommended authors. This suggests that our kernel function is more appropriate. Additionally, we manually checked the recommended authors and we found that they usually belong to the same community, i.e., having tweets with similar topics. Clustering and Topic Coherence We also evaluate the TN topic model against state-of-the-art LDA-based clustering techniques (Mehrotra et al., 2013). We find that the TN topic model outper- forms the state-of-the-art in purity, normalized mutual information and pointwise mutual informa- tion (PMI). Due to space, the evaluation result is provided in the supplementary material. 6 Conclusion and Future Work We propose a full Bayesian nonparametric Twitter-Network (TN) topic model that jointly models tweets and the associated social network information. Our model employs a nonparametric Bayesian approach by using the PDP and GP, and achieves flexible modeling by performing inference on a 4 network of PDPs. Our experiments with Twitter dataset show that the TN topic model achieves sig- nificant improvement compared to existing baselines. Furthermore, our ablation study demonstrates the usefulness of each component of the TN model. Our model also shows interesting applications such as author recommendation, as well as providing additional informative inferences. We also engineered a framework for rapid topic model development, which is important due to the complexity of the model. While we could have used Adaptor Grammars (Johnson et al., 2007), our framework yields more efficient computation for topic models. Future work includes speeding up the posterior inference algorithm, especially for the network model, as well as incorporating other auxiliary information that is available in social media such as location, hyperlinks and multimedia contents. We also intend to explore other applications that can be addressed with the TN topic model, such as hashtag recommendation. It is also interesting to apply the TN topic model to other types of data such as blog and publication data. Acknowledgement We would like to thank the anonymous reviewers for their helpful feedback and comments. NICTA is funded by the Australian Government through the Department of Communications and the Australian Research Council through the ICT Centre of Excellence Program. References Baldwin, T., Cook, P., Lui, M., MacKinlay, A., and Wang, L. (2013). How noisy social media text, how diffrnt social media sources? IJCNLP. Blei, D. M., Ng, A. Y., and Jordan, M. I. (2003). Latent Dirichlet Allocation. the Journal of machine Learning research, 3:993–1022. Buntine, W., Du, L., and Nurmi, P. (2010). Bayesian networks on dirichlet distributed vectors. pages 33–40. Chang, J. and Blei, D. M. (2010). Hierarchical relational models for document networks. The Annals of Applied Statistics, 4(1):124–150. Chen, C., Du, L., and Buntine, W. (2011). Sampling table configurations for the hierarchical Poisson-Dirichlet process. In Machine Learning and Knowledge Discovery in Databases, pages 296–311. Springer. Eisenstein, J. (2013). What to do about bad language on the internet. In Proceedings of the 2013 Confer- ence of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Atlanta, Georgia. Association for Computational Linguistics. Goldwater, S., Griffiths, T., and Johnson, M. (2006). Interpolating between types and tokens by estimating power-law generators. Advances in neural information processing systems, 18:459. Johnson, M., Griffiths, T. L., and Goldwater, S. (2007). Adaptor grammars: A framework for specifying compositional nonparametric Bayesian models. Advances in neural information processing systems, 19:641. Liu, Y., Niculescu-Mizil, A., and Gryc, W. (2009). Topic-link LDA: joint models of topic and author commu- nity. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 665–672. ACM. Lloyd, J., Orbanz, P., Ghahramani, Z., and Roy, D. (2012). Random function priors for exchangeable arrays with applications to graphs and relational data. In Advances in Neural Information Processing Systems 25, pages 1007–1015. Lui, M. and Baldwin, T. (2012). langid.py: An off-the-shelf language identification tool. In Proceedings of the ACL 2012 System Demonstrations, pages 25–30. Association for Computational Linguistics. Mehrotra, R., Sanner, S., Buntine, W., and Xie, L. (2013). Improving LDA topic models for microblogs via tweet pooling and automatic labeling. In The 36th Annual ACM SIGIR Conference, page 4, Dublin/Ireland. Miller, K., Jordan, M. I., and Griffiths, T. L. (2009). Nonparametric latent feature models for link prediction. In Advances in neural information processing systems, pages 1276–1284. Nallapati, R., Ahmed, A., and Xing, E. P. (2008). Joint latent topic models for text and citations. In KDD. Qiu, M., Zhu, F., and Jiang, J. (2013). It is not just what we say, but how we say them: Lda-based behavior-topic model. 2013 SIAM International Conference on Data Mining (SDM'13). Rosen-Zvi, M., Griffiths, T., Steyvers, M., and Smyth, P. (2004). The author-topic model for authors and documents. In Proceedings of the 20th conference on Uncertainty in artificial intelligence, pages 487–494. AUAI Press. 5 Sato, I. and Nakagawa, H. (2010). Topic models with power-law using pitman-yor process. In Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining, KDD '10, pages 673–682, New York, NY, USA. ACM. Teh, Y. W. and Jordan, M. I. (2010). Hierarchical Bayesian nonparametric models with applications. Bayesian Nonparametrics: Principles and Practice. Cambridge University Press. In Tsai, F. S. (2011). A tag-topic model for blog mining. Expert Systems with Applications, 38(5):5330–5335. Yan, X., Guo, J., Lan, Y., and Cheng, X. (2013). A biterm topic model for short texts. In Proceedings of the 22nd international conference on World Wide Web, WWW '13, pages 1445–1456, Republic and Canton of Geneva, Switzerland. International World Wide Web Conferences Steering Committee. Yang, J. and Leskovec, J. (2011). Patterns of temporal variation in online media. In Proceedings of the fourth ACM international conference on Web search and data mining, pages 177–186. ACM. Zhao, W. X., Jiang, J., Weng, J., He, J., Lim, E.-P., Yan, H., and Li, X. (2011). Comparing twitter and traditional media using topic models. In Proceedings of the 33rd European conference on Advances in information retrieval, ECIR'11, pages 338–349, Berlin, Heidelberg. Springer-Verlag. 6
1808.08762
2
1808
2019-06-03T19:50:52
Sentence Embeddings in NLI with Iterative Refinement Encoders
[ "cs.CL", "cs.LG" ]
Sentence-level representations are necessary for various NLP tasks. Recurrent neural networks have proven to be very effective in learning distributed representations and can be trained efficiently on natural language inference tasks. We build on top of one such model and propose a hierarchy of BiLSTM and max pooling layers that implements an iterative refinement strategy and yields state of the art results on the SciTail dataset as well as strong results for SNLI and MultiNLI. We can show that the sentence embeddings learned in this way can be utilized in a wide variety of transfer learning tasks, outperforming InferSent on 7 out of 10 and SkipThought on 8 out of 9 SentEval sentence embedding evaluation tasks. Furthermore, our model beats the InferSent model in 8 out of 10 recently published SentEval probing tasks designed to evaluate sentence embeddings' ability to capture some of the important linguistic properties of sentences.
cs.CL
cs
1 Sentence Embeddings in NLI with Iterative Refinement Encoders Aarne Talman, Anssi Yli-Jyra and Jorg Tiedemann Department of Digital Humanities {aarne.talman, anssi.yli-jyra, jorg.tiedemann}@helsinki.fi University of Helsinki Abstract Sentence-level representations are necessary for various NLP tasks. Recurrent neural net- works have proven to be very effective in learning distributed representations and can be trained efficiently on natural language inference tasks. We build on top of one such model and propose a hierarchy of BiLSTM and max pooling layers that implements an iterative refinement strategy and yields state of the art results on the SciTail dataset as well as strong results for SNLI and MultiNLI. We can show that the sentence em- beddings learned in this way can be utilized in a wide variety of transfer learning tasks, outperforming InferSent on 7 out of 10 and SkipThought on 8 out of 9 SentEval sentence embedding evaluation tasks. Furthermore, our model beats the InferSent model in 8 out of 10 recently published SentEval probing tasks designed to evaluate sentence embeddings' ability to capture some of the important linguistic properties of sentences. 1 Introduction Neural networks have been shown to provide a powerful tool for building represen- tations of natural languages on multiple levels of linguistic abstraction. Perhaps the most widely used representations in natural language processing are word embed- dings (Mikolov, Sutskever, Chen, Corrado, and Dean 2013, Pennington, Socher, and Manning 2014). Recently there has been a growing interest in models for sentence- level representations using a range of different neural network architectures. Such sentence embeddings have been generated using unsupervised learning approaches (Kiros, Zhu, Salakhutdinov, Zemel, Urtasun, Torralba, and Fidler 2015, Hill, Cho, and Korhonen 2016), and supervised learning (Bowman, Gauthier, Rastogi, Gupta, Manning, and Potts 2016, Conneau, Kiela, Schwenk, Barrault, and Bordes 2017). Supervision typically comes in the form of an underlying semantic task with labeled data to train the model. The most prominent task for that purpose is natural language inference (NLI) that tries to model the inferential relationship between two or more given sentences. In particular, given two sentences - the premise p and the hypothesis h - the task is to determine whether h is entailed by p, whether the sentences are in contradiction with each other or whether there is no inferential relationship between the sentences (neutral). There are two main neural approaches 2 Talman, Yli-Jyra and Tiedemann to NLI. Sentence encoding-based models focus on building separate embeddings for the premises and the hypothesis and then combine those using a classifier (Bowman, Angeli, Potts, and Manning 2015, Bowman et al. 2016, Conneau et al. 2017). Other approaches do not treat the two sentences separately but utilize e.g. cross-sentence attention (Tay, Tuan, and Hui 2018, Chen, Zhu, Ling, Wei, Jiang, and Inkpen 2017a). With the goal of obtaining general-purpose sentence representations in mind, we opt for the sentence encoding approach. Motivated by the success of the InferSent architecture (Conneau et al. 2017) we extend their architecture with a hierarchy- like structure of bidirectional LSTM (BiLSTM) layers with max pooling. All in all, our model improves the previous state of the art for SciTail (Khot, Sabharwal, and Clark 2018) and achieves strong results for the SNLI and Multi-Genre Natural Language Inference corpus (MultiNLI; Williams, Nangia, and Bowman 2018). In order to demonstrate the semantic abstractions achieved by our approach, we also apply our model to a number of transfer learning tasks using the SentEval test- ing library (Conneau et al. 2017), and show that it outperforms the InferSent model on 7 out of 10 and SkipThought (Kiros et al. 2015) on 8 out of 9 tasks, comparing to the scores reported by Conneau et al. (2017). Moreover, our model outperforms the InferSent model in 8 out of 10 recently published SentEval probing tasks designed to evaluate sentence embeddings' ability to capture some of the important linguistic properties of sentences (Conneau, Kruszewski, Lample, Barrault, and Baroni 2018). This highlights the generalization capability of the proposed model, confirming that its architecture is able to learn sentence representations with strong performance across a wide variety of different NLP tasks. 2 Related Work There is a wide variety of approaches to sentence-level representations that can be used in natural language inference. Bowman et al. (2015) and Bowman et al. (2016) explore RNN and LSTM architectures, Mou, Men, Li, Xu, Zhang, Yan, and Jin (2016) convolutional neural networks and Vendrov, Kiros, Fidler, and Urtasun (2016) GRUs, to name a few. The basic idea behind these approaches is to encode the premise and hypothesis sentences separately and then combine those using a neural network classifier. Conneau et al. (2017) explore multiple different sentence embedding architectures ranging from LSTM, BiLSTM and intra-attention to convolution neural networks and the performance of these architectures on NLI tasks. They show that, out of these models, BiLSTM with max pooling achieves the strongest results not only in NLI but also in many other NLP tasks requiring sentence level meaning repre- sentations. They also show that their model trained on NLI data achieves strong performance on various transfer learning tasks. Although sentence embedding approaches have proven their effectiveness in NLI, there are multiple studies showing that treating the hypothesis and premise sen- tences together and focusing on the relationship between those sentences yields bet- ter results (Tay et al. 2018, Chen et al. 2017a). These methods are focused on the Sentence Embeddings in NLI with Iterative Refinement Encoders 3 inference relations rather than the internal semantics of the sentences. Therefore, they do not offer similar insights about the sentence level semantics, as individual sentence embeddings do, and they cannot straightforwardly be used outside of the NLI context. 3 Model Architecture Our proposed architecture follows a sentence embedding-based approach for NLI introduced by Bowman et al. (2015). The model illustrated in Figure 1 contains sentence embeddings for the two input sentences, where the output of the sen- tence embeddings are combined using a heuristic introduced by Mou et al. (2016), putting together the concatenation (u, v), absolute element-wise difference u − v, and element-wise product u ∗ v. The combined vector is then passed on to a 3- layered multi-layer perceptron (MLP) with a 3-way softmax classifier. The first two layers of the MLP both utilize dropout and a ReLU activation function. We use a variant of ReLU called Leaky ReLU (Maas, Hannun, and Ng 2013), defined by: LeakyReLU (x) = max(0, x) + y ∗ min(0, x) where we set y = 0.01 as the negative slope for x < 0. This prevents the gradient from dying when x < 0. Fig. 1. Overall NLI Architecture For the sentence representations we first embed the individual words with pre- trained word embeddings. The sequence of the embedded words is then passed on to the sentence encoder which utilizes BiLSTM with max pooling. Given a sequence T of words (w1 . . . , wT ), the output of the bi-directional LSTM is a set of vectors (h1, . . . , hT ), where each ht ∈ (h1, . . . , hT ) is the concatenation ht = [ −→ h t, ←− h t] 4 Talman, Yli-Jyra and Tiedemann of a forward and backward LSTMs −→ h t = ←− h t = −−−−→ LST M t(w1, . . . , wt) ←−−−− LST M t(wT , . . . , wt). The max pooling layer produces a vector of the same dimensionality as ht, returning, for each dimension, its maximum value over the hidden units (h1, . . . , hT ). Motivated by the strong results of the BiLSTM max pooling network by Conneau et al. (2017), we experimented with combining BiLSTM max pooling networks in a hierarchy-like structure.1 To improve the BiLSTM layers' ability to remember the input words, we let each layer of the network re-read the input embeddings instead of stacking the layers in a strict hierarchical model. In this way, our model acts as an iterative refinement architecture that reconsiders the input in each layer while being informed by the previous layer through initialisation. This creates a hierarchy of refinement layers and each of them contributes to the NLI classification by max pooling the hidden states. In the following we refer to that architecture with the abbreviation HBMP. Max pooling is defined in the standard way of taking the highest value over each dimension of the hidden states and the final sentence embedding is the concatenation of those vectors coming from each BiLSTM layer. The overall architecture is illustrated in Figure 2. To summarize the differences between our model and traditional stacked BiLSTM architectures we can list the following three main aspects: 1. Each layer in our model is a separate BiLSTM initialized with the hidden and cell states of the previous layer. 2. Each layer in our model receives the same word embeddings as its input. 3. The final sentence representation is the concatenation of the max pooled output of each layer in the encoder network. In order to study the effect of our architecture we conduct a comparison of HBMP with the following alternative models: 1. BiLSTM-Ens: Ensemble of three BiLSTMs with max pooling, all getting the same embeddings as the input. 2. BiLSTM-Ens-Train: Ensemble of three BiLSTMs with max pooling, with the hidden and cell states of each BiLSTM being trainable parameters of the whole network. 3. BiLSTM-Ens-Tied: Ensemble of three BiLSTMs with max pooling, where the weights of the BiLSTMs are tied. 4. BiLSTM-Stack: A strictly hierarchical model with three BiLSTM layers where the second and third layer receive the output of the previous layer as their input. In the first model (BiLSTM-Ens) we contrast our architecture with a similar 1 Conneau et al. (2017) explore a similar architecture using convolutional neural networks, called Hierarchical ConvNet. Sentence Embeddings in NLI with Iterative Refinement Encoders 5 Fig. 2. Architecture of the HBMP sentence encoder (where T = 4). setup that does not transfer knowledge between layers but also combines infor- mation from three separate BiLSTM layers for the final classification. The second model (BiLSTM-Ens-Train) adds a trainable initialization to each layer to study the impact of the hierarchical initialization that we propose in our architecture. The third model (BiLSTM-Ens-Tied) connects the three layers by tying parameters to each other. Finally, the fourth model (BiLSTM-Stack) implements a standard hi- erarchical network with stacked layers that do not re-read the original input. We apply the standard SNLI data for the comparison of these different architec- tures (see Section 5 for more information about the SNLI benchmark). Table 1 lists the results of the experiment. Model 600D HBMP (our model) 600D BiLSTM-Ens 600D BiLSTM-Ens-Train 600D BiLSTM-Ens-Tied 600D BiLSTM-Stack Accuracy Confidence Interval (95%)* 86.6 86.3 86.3 86.1 86.3 [84.6%, 88.7%] [84.4%, 88.3%] [84.3%, 88.4%] [83.8%, 87.9%] [84.2%, 88.3%] Table 1. SNLI test accuracies (%) of different architectures. *Confidence intervals calculated over 1000 random samples of 1000 sentence pairs. The results show that HBMP performs better than each of the other models, 6 Talman, Yli-Jyra and Tiedemann which supports the use of our setup in favor of alternative architectures. Further- more, we can see that the different components all contribute to the final score. Ensembling information from three separate BiLSTM layers (with independent parameters) improves the performance as we can see in the comparison between BiLSTM-Ens and BiLSTM-Ens-Tied. Trainable initialization does not seem to add to the model's capacity and indicates that the hierarchical initialization that we propose is indeed beneficial. Finally, feeding the same input embeddings to all Bi- LSTMs of HBMP leads to an improvement over the stacked model that does not re-read the input information. Using these initial findings, we will now look at a more detailed analyses of the performance of HBMP on various datasets and tasks. But before, we first give some more details about the implementation of the model and the training procedures we use. Note, that the same specifications also apply to the experiments that we already discussed above. 4 Training Details The architecture was implemented using PyTorch. We have published our code in GitHub: https://github.com/Helsinki-NLP/HBMP. For all of our models we used a gradient descent optimization algorithm based on the Adam update rule (Kingma and Ba 2015), which is pre-implemented in PyTorch. We used a learning rate of 5e-4 for all our models. The learning rate was decreased by the factor of 0.2 after each epoch if the model did not improve. We used a batch size of 64. The models were evaluated with the development data after each epoch and training was stopped if the development loss increased for more than 3 epochs. The model with the highest development accuracy was selected for testing. We use pre-trained GloVe word embeddings of size 300 dimensions (GloVe 840B 300D; Pennington et al. 2014), which were fine-tuned during training. The sentence embeddings have hidden size of 600 for both direction (except for SentEval test, where we test models with 600D and 1200D per direction) and the 3-layer multi- layer perceptron (MLP) have the size of 600 dimensions. We use a dropout of 0.1 between the MLP layers (except just before the final layer). Our models were trained using one NVIDIA Tesla P100 GPU. 5 Evaluation Benchmarks To further study the performance of HBMP, we train our architecture with three common NLI datasets: • the Stanford Natural Language Inference (SNLI) corpus, • the Multi-Genre Natural Language Inference (MultiNLI) corpus, • the Textual Entailment Dataset from Science Question Answering (SciTail). Note that we treat them as separate tasks and do not mix any of the training, development and test data in our NLI experiments. We further perform additional linguistic error analyses using the MultiNLI Annotation Dataset and the Breaking Sentence Embeddings in NLI with Iterative Refinement Encoders 7 NLI dataset. Finally, in order to test the ability of the model to learn general- purpose representations, we apply the downstream tasks that are bundled in the SentEval package for sentence embedding evaluation. Note that we combine SNLI and MultiNLI data in those experiments in order to be compatible with related work. Below we provide a few more details about each of the evaluation frameworks. SNLI: The Stanford Natural Language Inference (SNLI) corpus (Bowman et al. 2015) is a dataset of 570k human-written sentence pairs manually labeled with the gold labels entailment, contradiction, and neutral. The dataset is divided into training (550,152 pairs), development (10,000 pairs) and test sets (10,000 pairs). The source for the premise sentences in SNLI were image captions taken from the Flickr30k corpus (Young, Lai, Hodosh, and Hockenmaier 2014). MultiNLI: The Multi-Genre Natural Language Inference (MultiNLI) corpus (Williams et al. 2018) is a broad-coverage corpus for natural language inference, consisting of 433k human-written sentence pairs labeled with entailment, contra- diction and neutral. Unlike the SNLI corpus, which draws the premise sentence from image captions, MultiNLI consists of sentence pairs from ten distinct genres of both written and spoken English. The dataset is divided into training (392,702 pairs), development (20,000 pairs) and test sets (20,000 pairs). Only five genres are included in the training set. The development and test sets have been divided into matched and mismatched, where the former includes only sentences from the same genres as the training data, and the latter includes sen- tences from the remaining genres not present in the training data. In addition to the training, development and test sets, MultiNLI provides a smaller annotation dataset, which contains approximately 1000 sentence pairs an- notated with linguistic properties of the sentences and is split between the matched and mismatched datasets.2 This dataset provides a simple way to assess what kind of sentence pairs an NLI system is able to predict correctly and where it makes errors. We use the annotation dataset to perform linguistic error analysis of our model and compare the results to results obtained with InferSent. For our ex- periment with the annotation dataset we use the annotations for the MultiNLI mismatched dataset. SciTail: SciTail (Khot et al. 2018) is an NLI dataset created from multiple-choice science exams consisting of 27k sentence pairs. Each question and the correct answer choice have been converted into an assertive statement to form the hypothesis. The dataset is divided into training (23,596 pairs), development (1,304 pairs) and test sets (2,126 pairs). Unlike the SNLI and MultiNLI datasets, SciTail uses only two labels: entailment and neutral. 2 The annotated dataset and description of the annotations are available at http://www. nyu.edu/projects/bowman/multinli/multinli_1.0_annotations.zip 8 Talman, Yli-Jyra and Tiedemann Breaking NLI: Breaking NLI (Glockner, Shwartz, and Goldberg 2018) is a test set (8,193 pairs) which is constructed by taking premises from the SNLI training set and constructing several hypotheses from them by changing at most one word within the premise. It was constructed to highlight how poorly current neural network models for NLI can handle lexical meaning. SentEval: SentEval (Conneau et al. 2017, Conneau and Kiela 2018) is a library for evaluating the quality of sentence embeddings.3 It contains 17 downstream tasks as well as 10 probing tasks. The downstream datasets included in the tests were MR movie reviews, CR product reviews, SUBJ subjectivity status, MPQA opinion-polarity, SST binary sentiment analysis, TREC question-type classification, MRPC paraphrase detection, SICK-Relatedness (SICK-R) semantic textual simi- larity, SICK-Entailment (SICK-E) natural language inference and STS14 semantic textual similarity. The probing tasks evaluate how well the sentence encodings are able to capture the following linguistic properties: Length prediction, Word Content analysis, Tree depth prediction, Top Constituents prediction, Word order analysis, Verb tense prediction, Subject number prediction, Object number prediction, Se- mantic odd man out and Coordination Inversion. For the SentEval tasks we trained our model on NLI data consisting of the con- catenation of the SNLI and MultiNLI training sets consisting of 942,854 sentence pairs in total. This allows us to compare our results to the InferSent results which were obtained using a model trained on the same data (Conneau et al. 2017). Con- neau et al. (2017) have shown that including all the training data from SNLI and MultiNLI improves significantly the model performance on transfer learning tasks, compared to training the model only on SNLI data. 6 Model Performance on the NLI task In this section, we discuss the performance of the proposed sentence-encoding ap- proach in common natural language inference benchmarks. From the experiments, we can conclude that the model provides strong results on all of the three NLI datasets. It clearly outperforms the similar but non-hierarchical BiLSTM models reported in the literature and fares well in comparison to other state of the art architectures in the sentence encoding category. In particular, our results are close to the current state of the art on SNLI in this category and strong on both, the matched and mismatched test sets of MultiNLI. Finally, on SciTail, we achieve the new state of the art with an accuracy of 86.0%. Below, we provide additional details on our results for each of the benchmarks. We compare our model only with other state-of-the-art sentence encoding models and exclude cross-sentence attention models, except for SciTail where previous sentence encoding model-based results have not been published. 3 The SentEval test suite is available online at https://github.com/facebookresearch/ SentEval. Sentence Embeddings in NLI with Iterative Refinement Encoders 9 6.1 SNLI For the SNLI dataset, our model provides the test accuracy of 86.6% after 4 epochs of training. The comparison of our results with the previous state of the art and selected other sentence embedding based results are reported in Table 2. Model BiLSTM Max Pool (InferSent)a Distance-based Self-Attentionb ReSAc 600D BiLSTM with generalized poolingb 600D Dynamic Self-Attention Modelc 2400D Multiple-Dynamic Self-Attention Modelc 600D HBMP (our model) Accuracy 84.5 86.3 86.3 86.6 86.8 87.4 86.6 Table 2. SNLI test accuracies (%). Results marked with a by Conneau et al. (2017), b by Chen, Ling, and Zhu (2018) and c by Yoon, Lee, and Lee (2018). 6.2 MultiNLI For the MultiNLI matched test set (MultiNLI-m) our model achieves a test accuracy of 73.7% after 3 epochs of training, which is 0.8% points lower than the state of the art 74.5% by Nie and Bansal (2017). For the mismatched test set (MultiNLI-mm) our model achieves a test accuracy of 73.0% after 3 epochs of training, which is 0.6% points lower than the state of the art 73.6% by Chen, Zhu, Ling, Wei, Jiang, and Inkpen (2017b). A comparison of our results with the previous state of the art and selected other approaches are reported in Table 3. Although we did not achieve state of the art results for the MultiNLI dataset, we believe that a systematic study of different BiLSTM max pooling structures could reveal an architecture providing the needed improvement. 6.3 SciTail On the SciTail dataset we compared our model also against non-sentence embedding-based models, as no results have been previously published which are based on independent sentence embeddings. We obtain a score of 86.0% after 4 epochs of training, which is +2.7% points absolute improvement on the previous published state of the art by Tay et al. (2018). Our model also outperforms In- ferSent which achieves an accuracy of 85.1% in our experiments. The comparison of our results with the previous state of the art results are reported in Table 4. The results achieved by our proposed model are significantly higher than the previously published results. It has been argued that the lexical similarity of the sentences in SciTail sentence pairs make it a particularly difficult dataset (Khot et al. 2018). If this is the case, we hypothesize that our model is indeed better 10 Talman, Yli-Jyra and Tiedemann Model CBOWa BiLSTMa BiLSTM + enh embed + max poolingb BiLSTM + Inner-attentionc Deep Gated Attn. BiLSTM encodersd Shortcut-Stacked BiLSTMe 600D HBMP Accuracy Accuracy (MultiNLI-m) (MultiNLI-mm) 66.2 67.5 70.7 72.1 73.5 74.5 73.7 64.6 67.1 70.8 72.1 73.6 73.5 73.0 Table 3. MultiNLI test accuracies (%). Results marked with a are baseline results by Williams et al. (2018), b by Vu (2017), c by Balazs, Marrese-Taylor, Loyola, and Matsuo (2017), d by Chen et al. (2017b) and e by Nie and Bansal (2017). Our results for the MultiNLI test sets were obtained by submitting the predictions to the respective Kaggle competitions. Model DecompAtta ESIMa Ngrama DGEM w/o edgesa DGEMa CAFEb InferSent 600D HBMP Accuracy 72.3 70.6 70.6 70.8 77.3 83.3 85.1 86.0 Table 4. SciTail test accuracies (%). Results marked with a are baseline results reported by Khot et al. (2018) and b by Tay et al. (2018). at identifying entailment relations beyond focusing on the lexical similarity of the sentences. 7 Error Analysis of NLI Predictions To better understand what kind of inferential relationships our model is able to identify, we conducted an error analysis for the three datasets. We report the results below. Table 5 shows the accuracy of predictions per label (in terms of F-scores) for the HBMP model and compares them to the InferSent model. This analysis shows that our model leads to a significant improvement over the outcome of the non- hierarchical model from previous work in almost all categories on all the three benchmarks. The only exception is the entailment score on SciTail, which is slightly below the performance of InferSent. To see in more detail how our HBMP model is able to classify sentence pairs with different labels and what kind of errors it makes, we summarize error statistics as confusion matrices for the different datasets. They highlight the HBMP model's strong performance across all the labels. Sentence Embeddings in NLI with Iterative Refinement Encoders 11 SNLI MultiNLI-m MultiNLI-mm SciTail HBMP InferSent HBMP InferSent HBMP InferSent HBMP InferSent entailment 88.5 contradiction 89.1 neutral 81.9 77.2 75.3 68.2 77.9 75.6 68.6 86.8 86.2 80.9 74.9 71.5 65.4 74.4 71.8 67.1 88.9 81.3 88.1 - 81.0 - Table 5. Model performance by F-score, comparing HBMP to InferSent (Conneau et al. 2017) (our implementation). Predicted - HBMP contradict neutral entail 3047 117 357 58 2840 240 recall Predicted - InferSent entail 263 90.5% 2967 280 87.7% 154 2622 81.5% 346 2756 302 contradict neutral recall 306 88.1% 327 85.1% 2571 79.9% 95 85.6% 87.4% 80.2% d entail l o G contradict neutral precision 86.5% 90.5% 82.8% Table 6. SNLI confusion matrices for HBMP and InferSent. On the SNLI dataset our model clearly outperforms InferSent on all labels in terms of precision and recall. Table 6 contains the confusion matrices for that dataset comparing HBMP to InferSent. The precision on contradiction exceeds 90% for our model and reaches high recall values for both, entailment and contradiction. The performance is lower for neutral and the confusion of that label with both, contradiction and entailment is higher. However, HBMP still outperforms InferSent by a similar margin as for the other two labels. Unlike for the SNLI and both of the MultiNLI datasets, on the SciTail dataset our model is most accurate on sentence pairs labeled neutral, having an F-score 88.9% compared to pairs marked with entailment, where the F-score was 81.0%. InferSent has slightly higher accuracy on entailment, whereas HBMP outperforms InferSent on neutral. Table 7 contains the confusion matrices for the SciTail dataset comparing the HBMP to InferSent. This analysis reveals that our model mainly suffers in recall on entailment detection whereas it performs well for neutral with respect to recall. It is difficult to say what the reason might be for the mismatch between the two systems but the overall performance of our architecture suggests that it is superior to the InferSent model even though the balance between precision and recall on individual labels is different. The error analysis of the MultiNLI dataset is not standard as it cannot be based on test data. As the labeled test data is not openly available for MultiNLI, we analyzed the error statistics for this dataset based on the development data. For the matched dataset (MultiNLI-m) our model had a development accuracy of 74.1%. For MultiNLI-m our model has the best accuracy on sentence pairs labeled with entailment, having an F-score of 77.2%. The model is also almost as accurate in predicting contradictions, with an F-score of 75.3%. Similar to SNLI, our model is less effective on sentence pairs labeled with neutral, having an F-score of 68.2% but, again, the HBMP model outperforms the InferSent on all the labels. Table 8 contains the confusion matrices for the MultiNLI matched dataset comparing the 12 Talman, Yli-Jyra and Tiedemann HBMP InferSent entail neutral recall entail neutral d entail l o neutral G precision 88.0% 85.0% 632 88 210 75.0% 673 1196 93.1% 140 82.8% 87.1% recall 169 79.9% 1144 89.1% Table 7. SciTail confusion matrices for HBMP and InferSent based on the development set. d entail l o G contradict entail 2781 372 528 196 2354 443 neutral precision 75.6% 78.7% 68.3% Predicted - HBMP contradict neutral recall Predicted - InferSent entail 486 80.3% 2614 514 72.7% 449 2158 69.0% 477 278 2241 507 contradict neutral recall 587 75.1% 523 69.7% 2139 68.5% 73.8% 74.1% 65.8% Table 8. MultiNLI-matched confusion matrices for HBMP and InferSent based on the development set. HBMP to InferSent. Our model improves upon InferSent in all values of precision and recall, in some cases by a wide margin. For the MultiNLI mismatched dataset (MultiNLI-mm) our model had a develop- ment accuracy of 73.7%. or MultiNLI-mm our model has very similar performance as with the MultiNLI-m dataset, having the best accuracy on sentence pars labeled with entailment, having an F-score of 77.9%. The model is also almost as accurate in predicting contradictions, with an F-score of 75.6%. Our model is less effective on sentence pairs labeled with neutral, having an F-score of 68.6%. Table 9 contains the confusion matrices for the MultiNLI Mismatched dataset comparing the HBMP to InferSent and the picture is similar to the result of the matched dataset. Substan- tial improvements can be seen again, in particular in the precision of contradiction detection. 8 Evaluation of Linguistic Abstractions The most interesting part of the sentence encoder approach to NLI is the ability of the system to learn generic sentence embeddings that capture abstractions, which can be useful for other downstream tasks as well. In order to understand the capa- bilities of our model we first look at the type of linguistic reasoning that the NLI system is able to learn using the MultiNLI annotation set and the Breaking NLI test set. Thereafter, we evaluate downstream tasks using the SentEval library to study the use of our NLI-based sentence embeddings in transfer learning. 8.1 Linguistic Error Analysis of NLI Classifications The MultiNLI annotation set makes it possible to conduct a detailed analysis of different linguistic phenomena when predicting inferential relationships. We use this to compare our model to InferSent with respect to the type of linguistic properties Sentence Embeddings in NLI with Iterative Refinement Encoders 13 d entail l o G contradict entail 2841 438 613 163 2279 387 neutral precision 73.0% 81.0% 68.4% Predicted - HBMP contradict neutral recall Predicted - InferSent entail 459 82.0% 2731 523 70.3% 491 3111 68.0% 611 246 2226 510 contradict neutral recall 486 78.9% 523 68.7% 2008 64.2% 71.2% 74.6% 66.6% Table 9. MultiNLI-mismatched confusion matrices for HBMP and InferSent. that are present in the given sentence pairs. Table 10 contains the comparison for the MultiNLI-mm dataset. The analysis shows that our HBMP model outperforms InferSent with antonyms, coreference links, modality, negation, paraphrases and tense differences. It also produces improved scores for most of the other categories in entailment detection. InferSent gains especially with conditionals in contradic- tion and in the word overlap catehory for entailments. This seems to suggest that InferSent relies a lot on matching words to find entailment and specific construc- tions indicating contradictions. HBMP does not seem to use word overlap as an indication for entailment that much and is better on detecting neutral sentences in this category. This outcome may indicate that our model works with stronger lexical abstractions than InferSent. However, due to the small number of examples per annotation category and small differences in the scores in general, it is hard to draw reliable conclusions from this experiment. Entailment Contradiction Neutral HBMP InferSent HBMP InferSent HBMP InferSent - 100.0 active/passive (10) anto (16) 88.2 belief (44) 81.8 conditional (16) 75.0 coref (22) 80.6 long sentence (77) 80.9 modal (98) negation (78) 76.0 89.2 paraphrase (33) 75.0 quantifier (104) quantity/time (15) 33.3 tense difference (14) 100.0 90.5 word overlap (26) Total 80.6 100.0 - 82.4 81.8 75.0 77.4 78.7 64.0 86.5 72.5 50.0 75.0 95.2 83.0 100.0 76.9 66.7 37.5 71.4 58.3 68.6 81.8 - 73.1 41.7 0.0 41.7 66.3 100.0 69.2 61.1 62.5 64.3 61.1 68.6 76.4 - 73.1 41.7 0.0 41.7 68.5 - 85.7 73.9 57.1 81.8 73.8 81.8 58.3 75.0 33.3 83.3 50.0 73.8 - 71.4 78.3 71.4 81.8 71.4 70.5 45.8 - 77.1 33.3 75.0 0.0 72.7 Table 10. MultiNLI-mm linguistic error analysis (accuracy %), comparing our HBMP results to the InferSent Conneau et al. (2017) results (our implementation). Number of sentence pairs with the linguistic label in brackets after the label name. 14 Talman, Yli-Jyra and Tiedemann 8.2 Tests with the Breaking NLI dataset In the second experiment we conducted testing of the proposed sentence embedding architecture using the Breaking NLI test set recently published by Glockner et al. (2018). The test set is designed to highlight the lack of lexical reasoning capability of NLI systems. For the Breaking NLI experiment, we trained our HBMP model and the InferSent model using the SNLI training data. We compare our results with the results pub- lished by Glockner et al. (2018) and to results obtained with InferSent sentence encoder (our implementation). The results show that our HBMP model outperforms the InferSent model in 7 out of 14 categories, receiving an overall score of 65.1% (InferSent: 65.6%). Our model is especially strong with handling antonyms, which shows a good level of semantic abstraction on the lexical level. InferSent fares well in narrow categories like drinks, instruments and planets, which may indicate a problem of overfitting to prominent examples in the training data. The strong result on the synonyms class may also come from a significant representation of related examples in training. However, more detailed investigations are necessary to verify this hypothesis. Our model also compares well against the other models, outperforming Decom- posable Attention model (51.90%) (Parikh, Tackstrom, Das, and Uszkoreit 2016) and Residual Encoders (62.20%) (Nie and Bansal 2017) in the overall score. As these models are not based purely on sentence embeddings, the obtained result highlights that sentence embedding approaches can be competitive when handling inferences requiring lexical information. The results of the comparison are summa- rized in Table 11. 8.3 Transfer Learning In this section, we focus on transfer learning experiments that apply sentence em- beddings trained on NLI to other downstream tasks. In order to better understand how well the sentence encoding model generalizes to different tasks, we conducted various tests implemented in the SentEval sentence embedding evaluation library (Conneau et al. 2017) and compared our results to the results published for In- ferSent and SkipThought (Kiros et al. 2015). We used the SentEval library with the default settings recommended on their website, with a logistic regression classifier, Adam optimizer with learning rate of 0.001, batch size of 64 and epoch size of 4. Table 12 lists the transfer learning results for our models with 600D and 1200D hidden dimensionality and compares it to the InferSent and SkipThought scores reported by Conneau et al. (2017). Our 1200D model outperforms the InferSent model on 7 out of 10 tasks. The model achieves higher score on 8 out of 9 tasks reported for SkipThought, having equal score on the SUBJ dataset. No MRPC results have been reported for SkipThought. To study in more detail the linguistic properties of our proposed model, we also ran the recently published SentEval probing tasks (Conneau et al. 2018). Our 1200D Sentence Embeddings in NLI with Iterative Refinement Encoders 15 Category antonyms antonyms(wordnet) cardinals colors countries drinks instruments materials nationalities ordinals planets rooms synonyms vegetables Total Decomp. WordNet Infer- 600D Attn* ESIM* Baseline* KIM* Sent HBMP 41.6 55.1 53.5 85.0 15.2 52.9 96.9 65.2 37.5 2.1 31.7 59.2 97.5 43.1 51.9 95.5 94.5 98.6 98.7 100.0 94.8 67.7 75.3 78.5 40.7 100.0 89.9 70.5 86.2 85.8 51.6 63.7 49.4 90.6 77.2 85.1 98.5 81.6 47.3 7.4 75.0 76.3 99.6 39.5 65.6 54.7 69.1 58.8 90.4 81.2 81.3 96.9 82.6 49.8 4.5 45.0 72.1 84.5 40.4 65.1 70.4 74.6 75.5 96.1 25.4 63.7 90.8 89.7 35.9 21.0 3.3 69.4 99.7 31.2 65.6 86.5 78.8 93.4 98.3 70.8 96.6 96.9 98.7 73.5 56.6 5.0 77.6 92.1 79.8 83.5 Table 11. Breaking NLI scores (accuracy %). Results marked with * as reported by Glockner et al. (2018). InferSent results obtained with our implementation using the training set-up described in (Conneau et al. 2017). Scores highlighted with bold are top scores when comparing the InferSent and our HBMP model. InferSent SkipThought 600D HBMP 1200D HBMP 81.1 86.3 92.4 90.2 84.6 88.2 Task MR CR SUBJ MPQA SST TREC MRPC 76.2/83.1 SICK-R 0.884 SICK-E 86.3 STS14 .70/.67 79.4 83.1 93.7 89.3 82.9 88.4 - 0.858 79.5 .44/.45 81.5 86.4 92.7 89.8 83.6 86.4 81.7 87.0 93.7 90.3 84.0 88.8 74.6/82.0 76.7/83.4 0.876 85.3 .70/.66 0.876 84.7 .71/.68 Table 12. Transfer learning test results for the HBMP model on a number of Sent- Eval downstream sentence embedding evaluation tasks. InferSent and SkipThought results as reported by Conneau et al. (2017). To remain consistent with other work using SentEval, we report the accuracies as they are provided by the SentEval library. model outperforms the InferSent model in 8 out of 10 probing tasks. The results are listed in Table 13. Looking at both the downstream and the probing tasks we can observe strong results of our model compared to the InferSent model that already demonstrated good general abstractions on the sentence level according to the original publication by Conneau et al. (2017). Hence, HBMP does not only provide competitive NLI 16 Talman, Yli-Jyra and Tiedemann Task SentLen WC TreeDepth TopConst BShift Tense SubjNum ObjNum SOMO CoordInv InferSent 600D HBMP 1200D HBMP 71.7 87.3 41.6 70.5 65.1 86.7 80.7 80.3 62.1 66.8 75.9 84.1 42.9 76.6 64.3 86.2 83.7 79.3 58.9 68.5 75.0 85.3 43.8 77.2 65.6 88.0 87.0 81.8 59.0 70.8 Table 13. SentEval probing task results (accuracy %). InferSent results are BiLSTM Max (NLI) results as reported by Conneau et al. (2018). scores but also produces improved sentence embeddings that are useful for other tasks. 9 Conclusion In this paper we have introduced an iterative refinement architecture (HBMP) based on BiLSTM layers with max pooling that achieves a new state of the art for SciTail and strong results in the SNLI and MultiNLI sentence-encoding category. We carefully analyzed the performance of our model with respect to the label cat- egories and the errors it produces in the various NLI benchmarks. We demonstrate that our model outperforms InferSent in nearly all cases with substantially reduced confusion between classes of inferential relationships. The linguistic analysis on MultiNLI also reveals that our approach is robust across the various categories and outperforms InferSent on, for example, antonyms and negations that require a good level of semantic abstraction. Furthermore, we tested our model using the SentEval sentence embedding eval- uation library, showing that it achieves great generalization capability. The model outperforms InferSent on 7 out of 10 downstream and 8 out of 10 probing tasks, and SkipThought on 8 out of 9 downstream tasks. Overall, our model performs well across all the conducted experiments, which highlights its applicability for various NLP tasks and further demonstrates the general abstractions that it is able to pick up from the NLI training data. Although the neural network approaches to NLI have been hugely successful, there has also been a number of concerns raised about the quality of current NLI datasets. Gururangan, Swayamdipta, Levy, Schwartz, Bowman, and Smith (2018) and Poliak, Naradowsky, Haldar, Rudinger, and Van Durme (2018) show that datasets like SNLI and MultiNLI contain annotation artifacts which help neural network models in classification, allowing decisions only based on the hypothesis sentences as their input. On a theoretical and methodological level, there is an on- going discussion on the nature of various NLI datasets, as well as the definition of what counts as NLI and what does not. For example, Chatzikyriakidis, Cooper, Sentence Embeddings in NLI with Iterative Refinement Encoders 17 Dobnik, and Larsson (2017) present an overview of the most standard datasets for NLI and show that the definitions of inference in each of them are actually quite different. Talman and Chatzikyriakidis (2019) further highlight this by testing dif- ferent state-of-the-art neural network models by training them on one dataset and then testing on another, leading to a significant drop in performance for all models. In addition to the concerns related to the quality of NLI datasets, the success of the proposed architecture raises a number of other interesting questions. First of all, it would be important to understand what kind of semantic information the different layers are able to capture and how they differ from each other. Secondly, we would like to ask whether other architecture configurations could lead to even stronger results in NLI and other downstream tasks. A third question is concerned with other languages and cross-lingual settings. Does the result carry over to multi- lingual setups and applications? The final question is whether NLI-based sentence embeddings could successfully be combined with other supervised and also unsu- pervised ways of learning sentence-level representations. We will look at all those questions in our future work. Acknowledgments The work in this paper was supported by the Academy of Finland through project 314062 from the ICT 2023 call on Computation, Machine Learning and Artificial Intelligence, and through projects 270354/273457/313478. This project has also received funding from the Eu- ropean Research Council (ERC) under the European Union's Horizon 2020 research and innovation pro- gramme (grant agreement No 771113). We would also like to acknowledge NVIDIA and their GPU grant. References Balazs, J., E. Marrese-Taylor, P. Loyola, and Y. Matsuo 2017. Refining raw sentence repre- sentations for textual entailment recognition via attention. In Workshop on Evaluating Vector Space Representations for NLP. ACL. Bowman, S. R., G. Angeli, C. Potts, and C. D. Manning 2015. A large annotated corpus for learning natural language inference. In EMNLP. Bowman, S. R., J. Gauthier, A. Rastogi, R. Gupta, C. D. Manning, and C. Potts 2016. A fast unified model for parsing and sentence understanding. In ACL. Chatzikyriakidis, S., R. Cooper, S. Dobnik, and S. Larsson 2017. An overview of natural language inference data collection: The way forward? In Computing Natural Language Inference Workshop. Chen, Q., Z.-H. Ling, and X. Zhu 2018. Enhancing Sentence Embedding with Generalized Pooling. In COLING. Chen, Q., X. Zhu, Z.-H. Ling, S. Wei, H. Jiang, and D. Inkpen 2017a. Enhanced lstm for natural language inference. In ACL. Chen, Q., X. Zhu, Z.-H. Ling, S. Wei, H. Jiang, and D. Inkpen 2017b. Recurrent neural network-based sentence encoder with gated attention for natural language inference. In Workshop on Evaluating Vector Space Representations for NLP. ACL. 18 Talman, Yli-Jyra and Tiedemann Conneau, A. and D. Kiela 2018, May 7 -- 12. SentEval: An evaluation toolkit for universal sentence representations. In N. Calzolari (Ed.), LREC 2018, Eleventh International Conference on Language Resources and Evaluation, Phoenix Seagaia Conference Center, Miyazaki, Japan, pp. 1699 -- 1704. Conneau, A., D. Kiela, H. Schwenk, L. Barrault, and A. Bordes 2017. Supervised learning of universal sentence representations from natural language inference data. In EMNLP. Conneau, A., G. Kruszewski, G. Lample, L. Barrault, and M. Baroni 2018. What you can cram into a single vector: Probing sentence embeddings for linguistic properties. In ACL. Glockner, M., V. Shwartz, and Y. Goldberg 2018. Breaking nli systems with sentences that require simple lexical inferences. In ACL. Gururangan, S., S. Swayamdipta, O. Levy, R. Schwartz, S. Bowman, and N. A. Smith 2018. Annotation artifacts in natural language inference data. In NAACL. ACL. Hill, F., K. Cho, and A. Korhonen 2016. Learning distributed representations of sentences from unlabelled data. In NAACL. Khot, T., A. Sabharwal, and P. Clark 2018. Scitail: A textual entailment dataset from science question answering. In AAAI. Kingma, D. P. and J. Ba 2015. Adam: A method for stochastic optimization. In ICLR. Kiros, R., Y. Zhu, R. Salakhutdinov, R. S. Zemel, R. Urtasun, A. Torralba, and S. Fidler 2015. Skip-thought vectors. In NeurIPS. Maas, A. L., A. Y. Hannun, and A. Y. Ng 2013. Rectifier nonlinearities improve neural network acoustic models. In Intl. Conf. on Machine Learning. Mikolov, T., I. Sutskever, K. Chen, G. Corrado, and J. Dean 2013. Distributed represen- tations of words and phrases and their compositionality. In NeurIPS, USA. Mou, L., R. Men, G. Li, Y. Xu, L. Zhang, R. Yan, and Z. Jin 2016. Natural language inference by tree-based convolution and heuristic matching. In ACL. Nie, Y. and M. Bansal 2017. Shortcut-stacked sentence encoders for multi-domain infer- ence. In Workshop on Evaluating Vector Space Representations for NLP. ACL. Parikh, A. P., O. Tackstrom, D. Das, and J. Uszkoreit 2016. A decomposable attention model for natural language inference. In EMNLP. Pennington, J., R. Socher, and C. D. Manning 2014. Glove: Global vectors for word representation. In EMNLP. Poliak, A., J. Naradowsky, A. Haldar, R. Rudinger, and B. Van Durme 2018. Hypoth- esis only baselines in natural language inference. In Joint Conference on Lexical and Computational Semantics. ACL. Talman, A. and S. Chatzikyriakidis 2019. Testing the generalization power of neural In Proceedings of the 2019 ACL Workshop network models across nli benchmarks. BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP. Tay, Y., L. A. Tuan, and S. C. Hui 2018. Compare, compress and propagate: Enhancing In neural architectures with alignment factorization for natural language inference. EMNLP. Vendrov, I., R. Kiros, S. Fidler, and R. Urtasun 2016. Order-embeddings of images and language. Vu, H. 2017. Lct-malta's submission to repeval 2017 shared task. In Workshop on Evalu- ating Vector Space Representations for NLP. ACL. Williams, A., N. Nangia, and S. R. Bowman 2018. A broad-coverage challenge corpus for sentence understanding through inference. In NAACL. Yoon, D., D. Lee, and S. Lee 2018. Dynamic Self-Attention : Computing Attention over Words Dynamically for Sentence Embedding. arXiv:1808.07383 . Young, P., A. Lai, M. Hodosh, and J. Hockenmaier 2014. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. TACL 2.
1907.03233
1
1907
2019-07-07T07:03:09
NIESR: Nuisance Invariant End-to-end Speech Recognition
[ "cs.CL", "cs.SD", "eess.AS" ]
Deep neural network models for speech recognition have achieved great success recently, but they can learn incorrect associations between the target and nuisance factors of speech (e.g., speaker identities, background noise, etc.), which can lead to overfitting. While several methods have been proposed to tackle this problem, existing methods incorporate additional information about nuisance factors during training to develop invariant models. However, enumeration of all possible nuisance factors in speech data and the collection of their annotations is difficult and expensive. We present a robust training scheme for end-to-end speech recognition that adopts an unsupervised adversarial invariance induction framework to separate out essential factors for speech-recognition from nuisances without using any supplementary labels besides the transcriptions. Experiments show that the speech recognition model trained with the proposed training scheme achieves relative improvements of 5.48% on WSJ0, 6.16% on CHiME3, and 6.61% on TIMIT dataset over the base model. Additionally, the proposed method achieves a relative improvement of 14.44% on the combined WSJ0+CHiME3 dataset.
cs.CL
cs
NIESR: Nuisance Invariant End-to-end Speech Recognition I-Hung Hsu, Ayush Jaiswal, Premkumar Natarajan USC Information Sciences Institute, Marina del Rey, CA, USA {ihunghsu, ajaiswal, pnataraj}@isi.edu 9 1 0 2 l u J 7 ] L C . s c [ 1 v 3 3 2 3 0 . 7 0 9 1 : v i X r a Abstract Deep neural network models for speech recognition have achieved great success recently, but they can learn incorrect associations between the target and nuisance factors of speech (e.g., speaker identities, background noise, etc.), which can lead to overfitting. While several methods have been proposed to tackle this problem, existing methods incorporate additional in- formation about nuisance factors during training to develop in- variant models. However, enumeration of all possible nuisance factors in speech data and the collection of their annotations is difficult and expensive. We present a robust training scheme for end-to-end speech recognition that adopts an unsupervised adversarial invariance induction framework to separate out es- sential factors for speech-recognition from nuisances without using any supplementary labels besides the transcriptions. Ex- periments show that the speech recognition model trained with the proposed training scheme achieves relative improvements of 5.48% on WSJ0, 6.16% on CHiME3, and 6.61% on TIMIT dataset over the base model. Additionally, the proposed method achieves a relative improvement of 14.44% on the combined WSJ0+CHiME3 dataset. Index Terms: invariant representation learning, speech recog- nition, adversarial learning 1. Introduction With the aid of recent advances in neural networks, end-to-end deep learning systems for automatic speech recognition (ASR) have gained popularity and achieved extraordinary performance on a variety of benchmarks [1, 2, 3, 4]. End-to-end ASR models typically consist of Recurrent Neural Networks (RNNs) with Sequence-to-Sequence (Seq2Seq) architectures and atten- tion mechanisms [5], RNN transducers [6], or transformer net- works [3]. These systems learn a direct mapping from an au- dio signal sequence to a sequence of text transcriptions. How- ever, the input audio sequence often contains nuisance factors that are irrelevant to the recognition task and the trained model can incorrectly learn to associate some of these factors with target variables, which leads to overfitting. For example, be- sides linguistic content, speech data contains nuisance informa- tion about speaker identities, background noise, etc., which can hurt the recognition performance if the distributions of these at- tributes are mismatched between training and testing. A common method for combatting the vulnerability of deep neural networks to nuisance factors is the incorporation of in- variance induction during model training. For example, invari- ant deep models have achieved considerable success in com- puter vision [7, 8, 9] and speech recognition [10, 11, 12, 13]. Serdyuk et al. [10] obtain noise-invariant representations by em- ploying noise-condition annotations and the gradient reversal layer [14] for acoustic modeling. Similarly, Meng et al. [11] utilize speaker information to train a speaker-invariant model for senone prediction. Hsu et al. [12] extract domain-invariant features using a factorized hierarchical variational autoencoder. Liang et al. [13] force their end-to-end ASR model to learn sim- ilar representations for clean input instances and their syntheti- cally generated noisy counterparts. While these methods work well at handling discrepancies between training and testing datasets for ASR systems, they re- quire domain knowledge [12], supplementary nuisance infor- mation during training (e.g., speaker identities [11], recording environments [10], etc.), or pairwise data [13]. However, these requirements are difficult and expensive to fulfill in real world, e.g., it is hard to enumerate all possible nuisance factors and collect corresponding annotations. In this work, we propose a new training scheme, namely NIESR, which adopts the unsupervised adversarial invariance learning framework (UAI) [7] for end-to-end speech recog- nition. Without incorporating supervised information of nui- sances for the input signal features, the proposed method is ca- pable of separating the underlying elements of speech data into two series of latent embeddings -- one containing all the infor- mation that is essential for ASR, and the other containing in- formation that is irrelevant to the recognition task (e.g. accents, background noises, etc.). Experimental results show that the proposed training method boosts the end-to-end ASR perfor- mance on WSJ0, CHiME3, and TIMIT datasets. We also show the effectiveness of combining NIESR with data augmentation. 2. Methodology In this section, we present the proposed NIESR model for nuisance-invariant end-to-end speech recognition, where the in- variance is achieved by adopting the UAI framework [7]. We begin by describing the base Seq2Seq ASR model. Subse- quently, we introduce the UAI framework for unsupervised ad- versarial invariance induction. Finally, we present the complete design of the proposed NIESR model. 2.1. Base Sequence-to-sequence Model We are interested in learning a mapping from a sequence of acoustic spectra features x = (x1, x2, . . . , xT ) to a series of textual characters y = (y1, y2, . . . , yS), given a dataset D ≡ {(x, y)i}N i=1, following the formulation of Chan et al. [5]. We employ a Seq2Seq model for this task, which estimates the probability of each character output yi by conditioning over the previous characters y1:(i−1) and the input sequence x. Thus, the conditional probability of the entire output y is: (cid:89) p(yx) = p(yix, y1:(i−1)) (1) i A Seq2Seq model is composed of two modules: an encoder Enc and a decoder Dec. Enc transforms the input features x into a high-level representation h = (h1, h2, . . . , hT ), i.e. h = Enc(x) and Dec infers the output sequence y from h. We model Enc as a stack of Bidirectional Long-Short Term Mem- ory (BLSTM) layers with interspersed projected-subsampling layers [15]. The subsampling layer projects a pair of consec- utive input frames (u2i−1, u2i) to a single lower-dimensional frame vi. We model Dec as an attention-based LSTM trans- ducer [16], which employs h to produce the output character sequence. At every time step, Dec generates a probability dis- tribution of yi over character sequences, which is a function of a transducer state si and an attention context ci. We denote this function as CharDist, which is implemented as a single layer perceptron with softmax activation: si = LSTM([yi−1, ci−1], si−1) p(yix, y1:(i−1)) = CharDist(si, ci) (2) (3) In order to calculate the attention context ci, we employ the hybrid location-aware content-based attention mechanism pro- posed by [17]. Specifically, the attention energy ei,j for frame j at time-step i takes previous attention alignment αi−1 into account through the convolution operation: (cid:124) ei,j = w tanh(W si + V hj + U (F ∗ αi−1) + b) (4) where w, b, W , V , U, and F are learned parameters and ∗ depicts the convolution operation. The attention alignment αi,j and the attention context ci is then calculated as: ci =(cid:80)L , j=1 αi,jhj (5) αi,j = exp(ei,j) k=1 exp(ei,k) (cid:80)L Ly = −(cid:88) The base model is trained by minimizing the cross-entropy loss: log p(yix, y1:(i−1)) (6) i 2.2. Unsupervised Adversarial Invariance Induction Deep neural networks (DNNs) often learn incorrect associations between nuisance factors in the raw data and the final target, leading to poor generalization [7]. In the case of ASR, the net- work can link accents, speaker-specific information, or back- ground noise with the transcriptions, resulting in overfitting. In order to cope with this issue, we adopt the unsupervised ad- versarial invariance (UAI) [7] framework for learning invariant representations that eliminate factors irrelevant to the recogni- tion task without requiring any knowledge of nuisance factors. The working principle of UAI is to learn a split representa- tion of data as h1 and h2, where h1 contains information rel- evant to the prediction task (here ASR) and h2 holds all other information about the input data. The underlying mechanism for learning such a split representation is to induce competition between the main prediction task and an auxiliary task of data reconstruction. In order to achieve this, the framework uses h1 for the prediction task and a noisy version(cid:101)h1 of h1 along with h2 for reconstruction. In addition, a disentanglement constraint enforces that h1 and h2 contain independent information. The prediction task tries to pull relevant factors into h1, while the reconstruction task drives h2 to store all the information about input data because (cid:101)h1 is unreliable. However, the disentan- glement constraint forces the two embeddings to not contain overlapping information, thus leading to competition. At con- vergence, this results in a nuisance-free h1 that contains only those factors that are essential for the prediction task. Figure 1: NIESR: The two encoders Enc1 and Enc2 are BLSTM-based feature extractors that encode the input sequence x into representations h1 and h2. The two encodings are disen- tangled by adversarially training the two disentanglers, Dis1 and Dis2, which aim to predict one embedding from another. Dec is an attention-based decoder that generates the target y characters from h1. Recon is a BLSTM-based reconstructor that decodes h2 and the noisy(cid:101)h1 back to the input-sequence x 2.3. NIESR Model Design and Optimization The NIESR model comprises five types of modules: (1) en- coders Enc1 and Enc2 that map input data to the encodings h1 and h2, respectively, (2) a decoder Dec that infers target y from h1, (3) a dropout layer that converts h1 into its noisy version (cid:101)h1, (4) a reconstructor Recon that reconstructs input data from [(cid:101)h1, h2], and (5) two adversarial disentanglers Dis1 and Dis2 that try to infer each embedding (h1 or h2) from the other. Figure 1 shows the complete NIESR model. The encoder Enc1 and decoder Dec follow the base model design as described in Section 2.1, i.e., an attention-based Seq2Seq model for the speech recognition task. Enc2 is de- signed to have exactly the same structure as Enc1. The dropout layer is introduced to make (cid:101)h1 an unreliable source of infor- mation for reconstruction, which influences the reconstruction task to extract all information about x into h2 [7]. Recon is modeled as a stack of BLSTM layers interspersed with novel upsampling layers, which perform decompression by splitting information in each time-frame to two frames. This is the in- verse of the subsampling layers [15] used in Enc1 and Enc2. The upsampling operation is formulated as: [u2i−1, u2i] = BLSTM([(cid:102)h1 , (7) (8) where [·,·] represents concatenation, o is the output, and P is a learned projection matrix. o2i−1 = P u2i−1 o2i = P u2i i ], si−1) i , h2 The adversarial disentanglers Dis1 and Dis2 model the UAI disentanglement constraint discussed in Section 2.2 fol- lowing previous works [7, 8, 9]. Dis1 tries to predict h2 from ……ℎ12ℎ22ℎ𝐿2𝑬𝒏𝒄𝟐𝑥1𝑥2𝑥3𝑥4……𝑥T……ℎ11ℎ21ℎ𝐿1𝑬𝒏𝒄𝟏𝑥1𝑥2𝑥3𝑥4……𝑥T𝒉1=(ℎ11,ℎ21,…,ℎ𝐿1)𝒉2=(ℎ12,ℎ22,…,ℎ𝐿2)𝑿𝒀𝑹𝒆𝒄𝒐𝒏𝑿′𝐷𝑟𝑜𝑝𝑜𝑢𝑡෪𝒉1=(෪ℎ11,෪ℎ21,…,෪ℎ𝐿1)…𝑥1′[෪ℎ11;ℎ12]𝑥2′𝑥3′𝑥4′𝑥T−1′𝑥T′…[෪ℎ21;ℎ22][෪ℎ𝐿1;ℎ𝐿2]…ℎ12′ℎ11ℎ21ℎ31ℎ𝐿1ℎ22′ℎ32′ℎ𝐿2′𝑫𝒊𝒔𝟏𝒉𝟐′…ℎ11′ℎ12ℎ22ℎ32ℎ𝐿2ℎ21′ℎ31′ℎ𝐿1′𝑫𝒊𝒔𝟐𝒉𝟏′…𝑦1𝑫𝒆𝒄𝐵𝑂𝑆𝑠1𝑐1𝑦2𝑦1𝑠2𝑐2𝑦𝑆𝑐𝑆𝑠𝑆𝐸𝑂𝑆…… 1, h2 2, . . . , h2 h1 and Dis2 tries to do the inverse. This is directly opposite to the desired independence between h1 and h2. Thus, training Dis1 and Dis2 adversarially against the rest of the model helps achieve the independence goal. Unlike previous works [7, 8, 9], the encodings h1 and h2 for this work are vector-sequences instead of single vectors: h1 = (h1 L) and h2 = L). Naıve instantiations of the disentanglers (h2 would perform frame-specific predictions of h2 i and vice versa. However, each pair of h1 i generated at the time-step i contains information not only from frame i but also from other frames across the time-span. This is because Enc1 and Enc2 are modeled as RNNs. Therefore, a better method to perform disentanglement for sequential representations is to use the whole series of h1 or h2 to estimate every element of the other. Hence, we model Dis1 and Dis2 as BLSTMs. i from h1 2, . . . , h1 1, h1 i and h2 The proposed NIESR model is optimized by adopting the UAI training strategy [7, 9], i.e., playing a game where we treat Enc1, Enc2, Dec, and Recon as one player P1, and Dis1 and Dis2 as the other player P2. The model is trained using a scheduled update scheme where we freeze the weights of one player model when we update the weights of the other. The training objective comprises three tasks: (1) predicting tran- scriptions from the input signal, (2) reconstruction of the input, and (3) adversarial prediction of each of h1 and h2 from the other. The objective of the first task is written as Equation 6. The goal for the reconstruction task is to minimize the mean squared error (MSE) between x and the reconstructed x(cid:48): Lx = MSE(Recon([ψ(Enc1(x)), Enc2(x)]), x) (9) where ψ means dropout. The training objective for the disen- tanglers is to minimize the MSE between embeddings predicted by the disentenglers and the embeddings generated from the en- coder. However, that of the encoders is to generate h1 and h2 that are not predictive of each other. Hence, in the scheduled update scheme, the targets t1 and t2 for the disentanglers are different when updating the player models P1 versus P2, fol- lowing [9]. The loss can be written as: Ld = MSE(Dis1(Enc1(x)), t1) + MSE(Dis2(Enc2(x)), t2)) (10) (11) where t1 and t2 are set as h2 and h1, respectively, when updat- ing P2 but are set to random vectors when updating P1. Overall, the model is trained through backpropagation by optimizing the objective described in Equation 12, where the loss-weights α, β, and γ are hyperparameters, which are de- cided by the performance on the development set. L = αLy + βLx + γLd (12) Inference with NIESR involves a forward pass of data through Enc1 followed by Dec. Hence, the usage and computational cost of NIESR for inference is the same as the base model. 3. Experiments The effectiveness of NIESR is quantified through the perfor- mance improvement achieved by adopting the invariant learning framework. We provide experimental results on speech recog- nition on three benchmark datasets: the Wall Street Journal Cor- pus (WSJ0) [18], CHiME3 [19], and TIMIT [20]. We addition- ally provide results on the combined WSJ0+CHiME3 dataset. Table 1: Hyperparameters for the base model. Setting Item 200 Enc and Dec LSTM Dimension 200 Subsampling Projected Dimension Attention Dimension 200 10 Attention Convolution Channel 100 Attention Convolution Kernel Size Adam Optimizer Learning Rate 5e-4 3.1. Datasets WSJ0: This dataset is a collection of readings of the Wall Street Journal. It contains 7,138 utterances in the training set, 410 in the development set, and 330 in the test set. We use 40- dimensional log Mel filterbank features as the model input, and normalize the transcriptions to capitalized character sequences. CHiME3: CHiME3 dataset contains: (1) WSJ0 sentences spo- ken in challenging noisy environments (real data) and (2) WSJ0 readings mixed with four different background noise (simulated data). The real speech data was recorded in five noisy envi- ronments using a six-channel tablet-based microphone array. Training data consists of 1,999 real noisy utterances from four speakers, and 7,138 simulated noisy utterances from 83 speak- ers in the WSJ0 training set. In total, there are 3,280 utterances in the development set, and 2,640 utterances in the test set con- taining both real and simulated data. The speakers in training, development, and test set are mutually different. In our experi- ments, we follow [11] to use far-field speech from the fifth mi- crophone channel for all sets. We adopt the same input-output setting for CHiME3 as WSJ0. TIMIT: This corpus contains a total of 6,300 sentences, with 10 sentences spoken by 630 speakers each with 8 different di- alects. Among them, utterances from 168 different speakers are held-out as the test set. We further select sentences from 4 speakers of each dialect group, i.e., 32 speakers in total, from the remaining data to form the development set. Thus, all speak- ers in training, development, and test sets are different. Models were trained on 80 log Mel filterbank features and capitalized character sequences were treated as targets. 3.2. Experiment Setup We train the base model without using invariance induction, i.e., the model consisting of Enc and Dec (Section 2.1), as a base- line. We feed the whole sequence of spectra features to Enc and get the predicted character sequence from Dec. We use a stack of two BLSTMs with a subsampling layer (as described in Section 2.1) in between for Enc. Dec is implemented as a sin- gle layer LSTM combined with attention modules introduced in Section 2.1. All the models were trained with early stopping with 30 epochs of patience and the best model is selected based on the performance on the development set. Other model and training hyperparameters are listed in Table 1. We augment the base model with Enc2, Recon, Dis1, and Dis2, while treating Enc as Enc1, to form the NIESR model. Enc2 has the same hyperparameter setting and structure as Enc1. Recon is modeled as a cascade of a BLSTM layer, an upsampling layer, and another BLSTM layer. Dis1 and Dis2 are implemented as BLSTMs followed by two fully-connected layers. We update the player models P1 and P2 in the fre- quency ratio of 1 : 5 in our experiments. Hyperparameters for Enc1 and Dec are the same as the base model. Additional hy- perparameters for NIESR are summarized in Table 2. Table 2: Hyperparameters for the NIESR model. Item Recon LSTM Dimension Upsampling Projected Dimension Dis1, Dis2 Dimension Dropout layer rate Optimizer Learning Rate for P1 Learning Rate for P2 α, β, γ for WSJ0 α, β, γ for CHiME3 α, β, γ for TIMIT Setting 300 200 200 0.4 Adam 5e-4 1e-3 100, 10, 1 100, 1, 0.5 100, 50, 1 Table 3: Speech recognition performance as CER (%). Values in parentheses show relative improvement (%) over Base model. Model Base Spk-Inv Env-Inv Dial-Inv NIESR WSJ0 12.95 12.31 (4.94) -- -- 12.24 (5.48) CHiME3 44.61 43.93 (1.52) 42.61 (4.48) -- 41.86 (6.16) TIMIT 28.76 28.45 (1.08) -- 28.29 (1.63) 26.86 (6.61) We further provide results of a stronger baseline model that utilizes labeled nuisances z (speakers for WSJ0, speakers and noise environment condition for CHiME3, speakers and dialect groups for TIMIT) with the gradient reversal layer (GRL) [14] to learn invariant representations. Specifically, the model con- sists of Enc, Dec, and a classifier with a GRL between the embedding learned from Enc and the classifier, following the standard setup in [14]. The target for the classifier is to pre- dict z from the embedding while the direction of the training gradient to Enc is flipped. We denote this model as Spk-Inv for speaker-invariance, Env-Inv for environment-invariance in CHiME3, and Dial-Inv for dialect-invariance in TIMIT. 3.3. ASR Performance on Benchmark Datasets Table 3 summarizes the results at end-to-end ASR on WSJ0, CHiME3, and TIMIT datasets. Results show that NIESR achieves 5.48%, 6.16%, and 6.61% relative improvements over base model on WSJ0, CHiME3, and TIMIT, respectively, and demonstrates the best CER among all methods. 3.4. Invariance to Nuisance Factors In order to examine whether a latent embedding is invariant to nuisance factors z, we calculate the accuracy of predicting the factor z from the encoding. Specifically, this is calculated by training classification networks (BLSTM followed by two fully- connected layers) to predict z from the generated embeddings. Table 4 presents results of this experiment, showing that the h1 embedding of the NIESR model, which is used for ASR, con- tains less nuisance information than the h encoding of the base, Spk-Inv, and Env-Inv models. In contrast, the h2 embedding of NIESR contains most of the nuisance information, showing that nuisance factors migrate to this embedding, as expected. 3.5. Additional Robustness through Data Augmentation Training with additional data that reflects multiple variations of nuisance factors helps models generalize better. In this ex- periment, we treat the CHiME3 dataset, which contains WSJ0 Table 4: Results of predicting nuisance factor z from learned representations as accuracy. Env stands for environment. Dataset WSJ0 CHiME3 Predict z from h in Base Model h in Spk-Inv h1 in NIESR h2 in NIESR h in Base Model h in Spk-Inv h in Env-Inv h1 in NIESR h2 in NIESR Accuracy z : Speaker z : Env 67.91 65.60 63.35 97.92 38.52 37.91 38.84 35.87 92.28 -- -- -- -- 69.24 69.11 66.44 63.45 97.05 Table 5: Test results of models trained on the WSJ0+CHiME3 augmented dataset as CER (%). Values in parentheses show the relative improvement (%) over Base model. Model Base Spk-Inv Env-Inv NIESR WSJ0 9.35 8.62 (7.81) 9.17 (1.93) 8.00 (14.44) CHiME3 41.55 40.77 (1.88) 40.27 (3.08) 38.35 (7.7) recordings with four different types of noise, as a noisy aug- mentation for WSJ0. We train the base model and NIESR on the augmented dataset, i.e. WSJ0+CHiME3, and test on the origi- nal CHiME3 and WSJ0 test sets separately. Table 5 summarizes the results on this experiment, showing that training with data augmentation provides improvements on both CHiME3 and WSJ0 datasets compared to the results in Table 3. It is important to note that the NIESR model trained on the augmented dataset achieves 14.44% relative improvement on WSJ0 as compared to the base model trained on the same. This is because data augmentation provides additional information about potential nuisance factors to the NIESR model and, consequently, helps it ignore these factors for the ASR task, even though pairwise data is not provided to the model like [13]. Hence, results show that the NIESR model can be easily combined with data augmenta- tion to further enhance the robustness and nuisance-invariance of the learned features. 4. Conclusion We presented NIESR, an end-to-end speech recognition model that adopts the unsupervised adversarial invariance framework for invariance to nuisances without requiring any knowledge of potential nuisance factors. The model works by learning a split representation of data through competition between the recog- nition and an auxiliary data reconstruction task. Results of experimental evaluation demonstrate that the proposed model achieves significant boosts in performance on ASR. 5. Acknowledgements This material is based on research sponsored by DARPA un- der agreement number FA8750-18-2-0014. The U.S. Gov- ernment is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily rep- resenting the official policies or endorsements, either expressed or implied, of DARPA or the U.S. Government. [20] J. S. Garofolo, L. F. Lamel, W. M. Fisher, J. G. Fiscus, D. S. Pallett, and N. L. Dahlgren, "Darpa timit acoustic phonetic con- tinuous speech corpus cdrom," 1993. 6. References [1] R. Prabhavalkar, K. Rao, T. N. Sainath, B. Li, L. Johnson, and N. Jaitly, "A comparison of sequence-to-sequence models for speech recognition." 2017. [2] C.-C. Chiu, T. N. Sainath, Y. Wu, R. Prabhavalkar, P. Nguyen, Z. Chen, A. Kannan, R. J. Weiss, K. Rao, E. Gonina et al., "State- of-the-art speech recognition with sequence-to-sequence models," in 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2018, pp. 4774 -- 4778. [3] S. Zhou, L. Dong, S. Xu, and B. Xu, "Syllable-based sequence- to-sequence speech recognition with the transformer in mandarin chinese," arXiv preprint arXiv:1804.10752, 2018. [4] N. Jaitly, Q. V. Le, O. Vinyals, I. Sutskever, D. Sussillo, and S. Bengio, "An online sequence-to-sequence model using partial conditioning," in Advances in Neural Information Processing Sys- tems, 2016, pp. 5067 -- 5075. [5] W. Chan, N. Jaitly, Q. V. Le, and O. Vinyals, "Listen, attend and spell," arXiv preprint arXiv:1508.01211, 2015. [6] K. Rao, H. Sak, and R. Prabhavalkar, "Exploring architectures, data and units for streaming end-to-end speech recognition with rnn-transducer," in 2017 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU). IEEE, 2017, pp. 193 -- 199. [7] A. Jaiswal, R. Y. Wu, W. Abd-Almageed, and P. Natarajan, "Un- supervised Adversarial Invariance," in Advances in Neural Infor- mation Processing Systems, 2018, pp. 5097 -- 5107. [8] A. Jaiswal, S. Xia, I. Masi, and W. AbdAlmageed, "RoPAD: Ro- bust Presentation Attack Detection through Unsupervised Adver- sarial Invariance," in 12th IAPR International Conference on Bio- metrics (ICB), 2019. [9] A. Jaiswal, Y. Wu, W. AbdAlmageed, and P. Natarajan, "Unified adversarial invariance," 2019. [10] D. Serdyuk, K. Audhkhasi, P. Brakel, B. Ramabhadran, S. Thomas, and Y. Bengio, "Invariant representations for noisy speech recognition," arXiv preprint arXiv:1612.01928, 2016. [11] Z. Meng, J. Li, Z. Chen, Y. Zhao, V. Mazalov, Y. Gang, and B.- H. Juang, "Speaker-invariant training via adversarial learning," in 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2018, pp. 5969 -- 5973. [12] W.-N. Hsu and J. Glass, "Extracting domain invariant features by unsupervised learning for robust automatic speech recognition," in 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2018, pp. 5614 -- 5618. [13] D. Liang, Z. Huang, and Z. C. Lipton, "Learning noise-invariant representations for robust speech recognition," arXiv preprint arXiv:1807.06610, 2018. [14] Y. Ganin and V. Lempitsky, "Unsupervised domain adaptation by backpropagation," arXiv preprint arXiv:1409.7495, 2014. [15] Y. Zhang, W. Chan, and N. Jaitly, "Very deep convolutional net- works for end-to-end speech recognition," in 2017 IEEE Inter- national Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2017, pp. 4845 -- 4849. [16] D. Bahdanau, K. Cho, and Y. Bengio, "Neural machine trans- lation by jointly learning to align and translate," arXiv preprint arXiv:1409.0473, 2014. [17] J. K. Chorowski, D. Bahdanau, D. Serdyuk, K. Cho, and Y. Ben- gio, "Attention-based models for speech recognition," in Ad- vances in neural information processing systems, 2015, pp. 577 -- 585. [18] D. B. Paul and J. M. Baker, "The design for the wall street journal- based csr corpus," in Proceedings of the workshop on Speech and Natural Language. Association for Computational Linguistics, 1992, pp. 357 -- 362. [19] J. Barker, R. Marxer, E. Vincent, and S. Watanabe, "The third chimespeech separation and recognition challenge: Dataset, task and baselines," in 2015 IEEE Workshop on Automatic Speech Recognition and Understanding (ASRU). IEEE, 2015, pp. 504 -- 511.
1504.02162
2
1504
2015-06-18T13:19:39
Concentric network symmetry grasps authors' styles in word adjacency networks
[ "cs.CL" ]
Several characteristics of written texts have been inferred from statistical analysis derived from networked models. Even though many network measurements have been adapted to study textual properties at several levels of complexity, some textual aspects have been disregarded. In this paper, we study the symmetry of word adjacency networks, a well-known representation of text as a graph. A statistical analysis of the symmetry distribution performed in several novels showed that most of the words do not display symmetric patterns of connectivity. More specifically, the merged symmetry displayed a distribution similar to the ubiquitous power-law distribution. Our experiments also revealed that the studied metrics do not correlate with other traditional network measurements, such as the degree or betweenness centrality. The effectiveness of the symmetry measurements was verified in the authorship attribution task. Interestingly, we found that specific authors prefer particular types of symmetric motifs. As a consequence, the authorship of books could be accurately identified in 82.5% of the cases, in a dataset comprising books written by 8 authors. Because the proposed measurements for text analysis are complementary to the traditional approach, they can be used to improve the characterization of text networks, which might be useful for related applications, such as those relying on the identification of topical words and information retrieval.
cs.CL
cs
epl draft 5 1 0 2 n u J 8 1 ] L C . s c [ 2 v 2 6 1 2 0 . 4 0 5 1 : v i X r a Concentric network symmetry grasps authors' styles in word ad- jacency networks Diego R. Amancio1, Filipi N. Silva2 and Luciano da F. Costa2 1 Institute of Mathematics and Computer Science University of Sao Paulo, Sao Carlos, Sao Paulo, Brazil 2 Sao Carlos Institute of Physics University of Sao Paulo, Sao Carlos, Sao Paulo, Brazil PACS 89.75.Hc -- Networks and genealogical trees PACS 02.40.Pc -- General topology PACS 02.50.-r -- Probability theory, stochastic processes, and statistics Abstract -- Several characteristics of written texts have been inferred from statistical analysis derived from networked models. Even though many network measurements have been adapted to study textual properties at several levels of complexity, some textual aspects have been disre- garded. In this paper, we study the symmetry of word adjacency networks, a well-known represen- tation of text as a graph. A statistical analysis of the symmetry distribution performed in several novels showed that most of the words do not display symmetric patterns of connectivity. More specifically, the merged symmetry displayed a distribution similar to the ubiquitous power-law distribution. Our experiments also revealed that the studied metrics do not correlate with other traditional network measurements, such as the degree or betweenness centrality. The effective- ness of the symmetry measurements was verified in the authorship attribution task. Interestingly, we found that specific authors prefer particular types of symmetric motifs. As a consequence, the authorship of books could be accurately identified in 82.5% of the cases, in a dataset com- prising books written by 8 authors. Because the proposed measurements for text analysis are complementary to the traditional approach, they can be used to improve the characterization of text networks, which might be useful for applications such as identification of topical words and information retrieval. Introduction. -- In recent years, network science has become commonplace. Many real systems such as the In- ternet, social networks and transportation systems have increasingly been studied via networked models [1]. Be- cause language is organized by rules and relationships be- tween words in a complex way, it can also be represented as networks. In this case, words are connected according to syntactical or semantical relationships [2]. The use of the network framework not only allowed for a better un- derstanding of the origins and organization of language [2], but also improved the performance of several natural pro- cessing language tasks, including e.g. the automatic sum- marization of texts [3], the identification of word senses [4] and the classification of syntactical complexity [5]. Many measurements proposed for analyzing complex networks have been reinterpreted when applied to analyze linguistic features. Centrality measurements, for exam- ple, have been useful to identify core concepts and key- words, which in turn have allowed the improvement of summarization and classification tasks [3]. While a myr- iad of measurements have been adapted to probe tex- tual patterns, only a limited number of studies have been devoted to devise novel network measurements that are able to identify more complex linguistic patterns. Par- ticularly, a relevant pattern that has not been addressed by networked-linguistic models is the quantification of the heterogeneity of specific textual distributions. This is the case of the spatial distribution of words along the text, which has been mainly studied in terms of the burstiness (or intermittency) of time series [6]. Another interest- p-1 Diego R. Amancio1 Filipi N. Silva2 Luciano da F. Costa2 ing pattern concerns the uneven distribution of the num- ber of distinct neighbors of words [7]. In this context, we introduce two network measurements to quantify the heterogeneity of accessing words neighbors in word adja- cency networks. As we shall show, the adopted measure- ments, henceforth referred to as symmetry measurements, are able to characterize authors' stylistic marks, since dis- tinct authors display specific bias towards particular net- work motifs. In addition to being useful to improve the characterization of word adjacency networks, we found out that the symmetry measurements do not correlate with other traditional network measurements. Therefore, they could be useful to complement the characterization of text networks in its several levels of complexity. Methods. -- In this section, we describe the formation word adjacency networks from raw books. The symmetry measurements, namely backbone and merged symmetry are then described. Furthermore, we present a short in- troduction to the pattern recognition methods employed in this study. Word adjacency networks. Written texts can be mod- eled as networks in several ways [2]. If one aims at grasping stylistic textual features, networks generated from syntac- tical analysis can be employed [3, 8]. Another possibility is to map texts into a word adjacency network (WAN), which links adjacent words [9, 11, 12]. Actually, WANs can be considered as an extension of the syntactical model since most of the syntactical links occur between adjacent words [8]. Because syntax depends upon the language, WANs have also proven useful to capture language depen- dent features [13]. To construct a word adjacency network, some pre- processing steps are usually applied. First, stopwords such as articles and prepositions are removed because such words convey no semantic information. Therefore, they can be modeled as edges in the WAN model because stop- words usually play the role of linking content words. In order to represent as a single node the words that refer to the same concept, the text undergoes a lemmatization process. Hence, nouns and verbs are mapped to their sin- gular and infinitive forms, respectively. To minimize the errors arising from the lemmatization, before this step, all words are labeled with their part-of-speech [14]. In the current study, the maximum-entropy model devised in [15] was used to perform the part-of-speech labeling. After the lemmatization and the removal of the stopwords, each distinct word is mapped into a node and edges are created between adjacent words. Further details regarding the WAN model can be found in [9]. Symmetry in networks. Symmetry is one of the most fundamental aspects of complex systems, naturally emerg- ing from physical spatial restrictions and laws [16], self organization [17], biological structures [18], and chemical reactions [19], etc. Written texts bear no exception to this rule, presenting intrinsic patterns of symmetry. In a sentence, for instance, some words can be exchanged by synonyms without compromising its original meaning. In a similar fashion, some grammatical constructions are also interchangeable. Aside from restrictions conveying seman- tic relationships and grammatical rules, authors also tend to employ additional restrictions in their works, which in turn affects their written style. Whenever texts are repre- sented by networks, it is expected that such styles may be reflected on the symmetrical characteristics of its topolog- ical structure. While the concept of symmetry in graph theory is tightly related to the problem of finding and counting au- tomorphisms, this approach cannot be straightforwardly extended to study most of real complex networks [20]. Re- cently, practical definitions of symmetries for real networks have been proposed in the literature. They include path similarity techniques [20], the methods based on quantum walks [21] and concentric rings [22]. The latter presents some advantages over the other strategies. For example, the symmetry can be calculated locally around nodes in a multiscale fashion, defined in terms of node centered subgraphs referred to as concentric patterns conceptually linked to the concentric levels of a node. The concentric level Γh(i) is defined as the set of nodes h hops away from the original node i and the concentric l-pattern is the sub- graph comprising only nodes located l or less hops away from i, i.e., nodes in the set(cid:83)l h=0 Γh(i). The concentric symmetry approach is based on the ac- cessibility measurement [23], which is calculated as a nor- malization of the entropy obtained from the transition probabilities for a network walk dynamics, such as the traditional random walk or self-avoiding random walk. In particular, the symmetry is obtained considering a very special case of walk dynamics in which an agent never goes back to a node belonging to a lower concentric level. However, to account for the degeneracy caused by con- nections between nodes in the same concentric level, two transformations of concentric patterns were proposed, re- sulting in two types of symmetry measurements: backbone and merged symmetries. The backbone symmetry, Sb, is loosely based on the concept of radial symmetry, in which edges among nodes in the same concentric level are re- moved for the pattern. Differently, the merged symmetry, Sm, that bears some resemblance with angular symmetry, is obtained from patterns by effectively merging nodes in the same concentric level. In both cases, the symmetry measurements Sh for level h centered on i are calculated from the Shannon entropy Hh of the transition probabili- ties Ph(i → j). More specifically, (cid:41) (cid:40) (cid:80) j ∈ Γh(i) exp Sh(i) = Ph(i → j) ln[Ph(i → j)] Γh(i) +(cid:80)h−1 r=0 Ξr , (1) where Ξr stands for the number of dead ends in level r (i.e., nodes with no connections to any node in the next con- centric level). Fig. 1 illustrates the backbone and merged p-2 Network symmetry reveals authors' styles in word adjacency networks Fig. 1: Example illustrating the calculation of the backbone and merged symmetries for two concentric 2-patterns. The numbers next to each node account for the transition probabilities and colors indicate the respective concentric level of a node (blue for level 0, orange for level 1 and green for level 2) [10]. Red self loops indicate a dead end. Both transformations of patterns are shown. The backbone pattern is obtained by removing edges connecting nodes at the same level from the original pattern, whereas merged patterns are weighted subgraphs created by merging nodes originally connected at the same concentric level. In this case, the weight corresponds to the number of connections spanning from the nodes that were merged to each node in other concentric levels. Note that the pattern in the left panel only presents merged asymmetry, while the pattern in the right panel presents both types of asymmetry, which is also confirmed by the symmetry values. transformations for two patterns alongside the transition probabilities and calculated symmetries. Pattern Recognition Methods. Pattern recognition methods are useful to identify patterns and infer classi- fiers [24]. Particularly, in this study, pattern recognition methods were applied to recognize patterns in the distri- bution of symmetry measurements across distinct authors. Four pattern recognition methods were employed: support vector machines (SVM), multilayer perceptron (MLP), nearest neighbors (KNN) and naive Bayes (NBY). These four methods were chosen because they usually display a good overall performance [25]. An introduction to these methods can be found in [25, 26]. We also provide a very short introduction to these methods in the Supplementary Information1. Results and discussion. -- This section is divided in two subsections. Firstly, we study the statistical prop- erties of symmetry measurements in word adjacency net- works. We then show how the symmetry of specific words can be employed to discriminate authors' styles. The list of books employed in the experiments is shown in Table S1 of the Supplementary Information. Properties of merged and backbone symmetry in word adjacency networks. We start the investigation of the statistical properties of symmetry measurements in tex- tual networks by analyzing the distribution of symmetry values in real networks formed from books. Here we focus our discussion on the book "Adventures of Sally", by P.G. Wodehouse. Notwithstanding, all discussion henceforth applies to the other books of the dataset. Concerning the merged symmetry, all books displayed a probability den- 1The Supplementary Information is available from https://dl. dropboxusercontent.com/u/2740286/symmetry.pdf sity function with the following logistic form: P (Sm) (cid:39) A1 − A2 1 + (Sm/S0)p + A2, (2) where A1, A2, S0 and p are constant. According to the equation 2, high values of symmetry are very rare. This is similar to other well-known distributions in texts, such as the frequency distribution given by the Zipf's law [27]. Fig. 2 illustrates the histogram of symmetry distribu- tion obtained for the book "Adventures of Sally", by P.W. Wodehouse. For this book in particular, the p.d.f of the merged symmetry in equation 2 can be written as P (Sm) (cid:39) A 1 + (Sm/S0)p , (3) where A = 1.0136, S0 = 0.0136 and p = 1.25348. The high value of adjusted Pearson (R2 = 0.99181) and low value of chi-square (χ2 = 1.43261· 10−5) confirm the adehenrece of the fitting. Unlike the merged symmetry, the backbone counterpart displayed a distribution of values with two typical peaks, as revealed by Fig. 2 (see left panel). The first peak of distribution occurs around Sb (cid:39) 0.3. While low values of backbone symmetry are very rare, high values are fre- quent, especially on the less frequent words. This occurs because smaller (or lowly connected) concentric patterns are more unlikely to accumulate enough imperfections over the concentric levels to attain very low symmetry values. On the other hand, larger patterns do not present such constraints and can attain many distinct levels of symme- try. While several traditional centrality network measure- ments correlate with the node degree, the proposed sym- metry measurements for text analysis usually do not yield a strong correlation with the connectivity of nodes. In Ta- bles 1 and 2, we show, in the same row, words with sim- ilar degree taking very discrepant values of merged and p-3 BackboneOriginal PatternMerged3161651236142626262616161616161616Sb2 = 1.00Sb1 = 1.00Sm2 = 0.98Sm1 = 0.87BackboneMerged22217171717175757171727271717172717Original PatternSb2 = 0.56Sb1 = 1.00Sm2 = 0.61Sm1 = 0.92 Diego R. Amancio1 Filipi N. Silva2 Luciano da F. Costa2 Fig. 2: Histograms of the distribution of the backbone Sb and merged symmetries Sm (computed at the second level) for the book "Adventures of Sally". The merged symmetry computed at the second level seems to follow a logistic function (see equa- tions 2 and 3). A similar distribution was found for the other books of the dataset. backbone symmetries. For example, in Table 2, the words bathing and mother occur with the same frequency; how- ever, the respective values of backbone symmetry are quite discrepant. As a matter of fact, the access to the second level neighbors is much more regular for the word mother, as it backbone symmetry is close to the maximum possible value, i.e. max(Sb) = 1. Table 1: Merged symmetry (second level) computed for se- lected words in the book "Adventures of Sally", a novel by P.G. Wodehouse. Note that words with similar degree k (the words in the same line) may take distinct values of symmetry. Word Cracknell heart gentleman revue notice cold luck meditate Sm 0.011 0.012 0.012 0.012 0.013 0.014 0.017 0.020 k Word 31 27 26 21 17 11 6 5 hotel corner conversation rise blow tongue wealth banquet Sm 0.024 0.029 0.041 0.062 0.080 0.094 0.331 0.259 k 33 27 24 21 17 10 6 5 The correlation between symmetry and other tradi- tional topological measurements were also investigated. According to Fig. 3, there is no consistent, significant correlation between symmetry and other network mea- surements. This means that the values of both merged and backbone symmetry cannot be mimicked by other well known network measurements. Therefore, the symmetry measurements provide novel information for network anal- ysis. Authorship recognition via network symmetry. In this section, we exemplify the discriminability power of sym- metry measurements in word adjacency networks. More specifically, we show that the symmetry os specific words is able to identify the writing style of distinct authors. In the Table 2: Backbone symmetry (second level) computed for se- lected words in the book "Adventures of Sally", a novel by P.G. Wodehouse. Note that words with similar degree k (the words in the same line) may take distinct values of symmetry. Word hair heart manner chapter water note memory bathing Sb 0.196 0.211 0.190 0.127 0.132 0.052 0.089 0.071 k Word hotel 30 corner 27 conversation 26 york 22 16 disappear 10 mysterious 6 secure 5 mother Sb 0.472 0.412 0.544 0.579 0.610 0.709 0.904 0.932 k 33 27 24 19 14 8 6 5 Fig. 3: Pearson correlation coefficients between symmetry and other traditional network measurements. Note that, in general, there is a weak correlation between symmetry and other mea- surements. The correlations were obtained from the word adja- cency network obtained from the book "Adventures of Sally", by P.G. Wodehouse. context of information sciences, the authorship recognition task is relevant because it can be useful to classify liter- ary manuscripts [28] and intercept terrorist messages [29]. Traditional features employed for stylometric analysis in- clude simple statistics such as the average length and fre- quency of words [30], richness of vocabulary size [30] and burstiness indexes [7]. To evaluate the ability of the symmetry measurements to recognize particular authors' styles, we used a dataset of 40 books written by 8 authors (see Table S1 of the Supplementary Information). As features for the classi- fication task, both merged and backbone symmetry were computed for the 229 words appearing in all books of the dataset. To automatically recognize and classify the pat- terns displayed by each author, we used the four pattern recognition techniques described in the methodology. The accuracy rates in identifying the correct author are shown in Table 3. With regard to the performance of the pat- tern recognition methods, the best results were obtained with the SVM and MLP methods. When the symmetry was computed considering the second level of neighbors p-4 600500400300200Number of OccurencesNumber of OccurencesBackbone SymmetryMerged Symmetry1000.00.20.40.60.81.00.00.20.40.60.81.0002004006008001000120014001600Merged h=4Node DegreeStress centralityBetweennessClusteringMerged h=3Backbone h=3Backbone h=4Merged h=2Backbone h=2Node DegreeStress centralityBetweennessClusteringMerged h=4Backbone h=4Merged h=3Backbone h=3Merged h=2Backbone h=2 Network symmetry reveals authors' styles in word adjacency networks (h = 2), the best accuracy rate achieved was 75.0% (this corresponds to a p-value lower than 1.0·10−15). Both sym- metries measurements calculated at the third level did not increase the best classification performance obtained with h = 2. A minor improvement in performance occurred when the fourth level was included in the analysis. The best accuracy rate increased from 75.0% to 82.5%. We also probed the performance of the classification by combining different levels as features. In this case, the performance did not improve (result not shown). All in all, these re- sults confirms the suitability of symmetry measurements to identify the subtleties of authors' styles in terms of the homogeneity of accessibility of neighbors. Table 3: Accuracy rate found for the authorship recognition task. The best accuracy rate found to recognize the authorship in a dataset comprising 8 authors was 82.5%. Symmetry Merged h = 2 Merged h = 3 Merged h = 4 Backbone h = 2 Backbone h = 3 Backbone h = 4 SVM MLP KNN NBY 75.0% 72.5% 55.0% 42.5% 70.0% 62.5% 65.0% 40.0% 82.5% 82.5% 57.5% 42.5% 32.5% 32.5% 20.0% 20.0% 70.0% 72.5% 57.5% 27.5% 70.0% 82.5% 57.5% 42.5% symmetry measurements are robust in the sense that they do not mimic the behavior of other traditional topological measurements. Thus, because symmetry measurements do not strongly correlate with other traditional network or textual features, they could be combined with other mea- surements to improve the characterization of texts rep- resented as graphs and related networked systems. The proposed symmetry measurements were also evaluated in the context of the authorship recognition task. The re- sults revealed that the symmetry of specific words is able to identify the authorship of books with high accuracy rates. This result confirms the suitability of the measure- ments to detect the subtleties of authors' styles reflected on the organization of word adjacency networks. In future works, we intend to study the suitability of both backbone and merged symmetry in semantical networks, which may ultimately lead to the improvement of several semantical- related applications. ∗ ∗ ∗ DRA acknowledges financial from Sao Paulo Research Foundation (FAPESP) (grant number 2014/20830-0). FNS thanks CAPES for support. LdFC is grateful to FAPESP (grant number 2011/50761-2), CNPq (Brazil) and NAP-PRP-USP. support To understand the patterns behind the high discrim- inability rates found in Table 3 we show some visualiza- tions obtained for two words, "time" and "indeed", in Fig. 4. We chose these words because they were able discriminate among a few groups of authors while also presenting a wide range of symmetry values. The pat- terns obtained for the word "time" are arranged along the top of the corresponding axis according to their respective merged symmetry, which was found to separate Arthur Conan Doyle, Thomas Hardy and Charles Darwin. Note that the nodes with low merged symmetry presented sev- eral edges crossing over the internal shell of its patterns. Additionally, connections between nodes lying at the third concentric level are much less organized, hence the low values of symmetry. Conversely, nodes taking high values of symmetry displayed more organized connections, lead- ing to higher uniformity of connections among nodes lying at the farthest concentric level. The same observations can be made for the patterns obtained for the word "in- deed", which discriminated between Hector Hugh Munro and the group of authors encompassing Arthur Conan Doyle, Bram Stoker, Thomas Hardy and Charles Dickens. Still, however, these patterns are much more symmetric, which is once again reflected in the visualizations by their higher organization on the last concentric level. Conclusion. -- In this paper, we have introduced the concept of symmetry to study the connectivity patterns of word association networks. By defining symmetry as a function of particular random walks, we showed that the REFERENCES [1] Costa L.F. et al., Adv. Phys., 60 (2011) 329 -- 412. [2] Cong J. and Liu H., Phys. Life Rev., 11 (2014) 598 -- 618. [3] Amancio D.R., Nunes M.G.V., Oliveira Jr. O.N. and Costa L.F., Physica A, 391 (2012) 1855 -- 1864. [4] Amancio D.R., Oliveira Jr. O.N. and Costa L.F., Eu- rophys. Lett., 98 (2012) 18002 [5] Amancio D.R., Aluisio S.M., Oliveira Jr. O.N. and Costa L.F., Europhys. Lett., 100 (2012) 58002 [6] Ortuno M., Carpena P., Bernaola-Galvan P., Munoz E. and Somoza A.M., Europhys. Lett., 57 (2002) 759 [7] Amancio D.R., J. Stat. Mech., (2015) P03005. [8] Ferrer i Cancho R., Sol´e R.V. and Kohler R., Phys. Rev. E, 69 (2004) 1 -- 8. [9] Amancio D.R., Oliveira Jr. O.N. and Costa L.F., New J. Phys., 14 (2012) 043029. [10] Costa, L.da F., Tognetti, M.A.R. and Silva, F.N., Physica A, 24(387) (2008) 6201-6214. [11] Amancio D.R., PLoS ONE, 10 (2015) e0118394. [12] Roxas R.M. and Tapang G., Int. J. Mod. Phys. C, 21 (2010) 503. [13] Amancio D.R., Altmann E.G., Rybski D., Oliveira Jr. O.N. and Costa L.F., PLoS ONE, 8 (2013) e67310. [14] Manning C.D. and Schutze H., Foundations of Statis- tical Natural Language Processing (MIT Press) 1999. [15] Ratnaparki A., Proceedings of the Empirical Methods in Natural Language Processing Conference 1996. [16] Debs T. and Redhead M., Objectivity, Invariance, and Convention: Symmetry in Physical Science (Harvard Univ. Press) 2007 p-5 Diego R. Amancio1 Filipi N. Silva2 Luciano da F. Costa2 Fig. 4: Merged symmetry values for considered books and visualizations of a few concentric patterns obtained by considering the words "time" and "indeed". Each bar over the axis correspond to a book and the colors indicate their respective authors according to the legend. The patterns visualizations was accomplished by using a modified force directed method [31] where nodes connected in the same level are more likely to be close together. Words shared among all books are also shown next to the respective nodes with the opacity proportional to its frequency. [17] MacArthur B.D. and Anderson J.W., arXiv: cond- mat/0609274, (2006) [18] Finnerty J.R., Int. J. Dev. Biol., 47 (2003) 5239 [19] Longuet-Higgins H.C., Mol. Phys., 6:5 (1963) 445 -- 460 [20] Holmes P., Phys. Rev. E, 74 (2006) 036107 [21] Rossi L., Torsello A., Hancock E.R. and Wilson R.C., Phys. Rev. E, 88 (2013) 032806 [22] Silva F.N., Comin C.H., Peron T.K.D., Rodrigues F.A., Ye C., Wilson R.C., Hancock E. and Costa L.F., arXiv: 1407.0224, (2014) [23] Viana M.P., Batista J.L.B. and Costa L.F., Phys. Rev. E, 85 (2012) 036105 [24] Duda R.O., Hart P.E. and Stork D.G., Pattern Clas- sification, Vol. 2 (Wiley-Interscience) 2000 [25] Amancio D.R., Comin C.H., Casanova D., Travieso G., Bruno O.M., Rodrigues F.A. and Costa L.F., PLoS ONE, 9 (2014) e94137. [26] Bishop C.M., Pattern Recognition and Machine Learning (Springer-Verlag New York, Inc. Secaucus, NJ, USA) 2006. [27] Zipf G.K., Human behavior and the principle of least ef- fort (Addison-Wesley, Reading MA, USA) 1949 [28] Ebrahimpour M., Putnins T.J., Berryman M.J., Al- lison A., Ng BW-H. and Derek A., PLoS ONE , 8 (2013) e54998. [29] Abbasi A. and Chen H. , IEEE Intell. Syst., 20 (2005) 67 -- 75. [30] Stamatatos E., J. Assoc. Inf. Sci. Technol., 60 (2009) 538 -- 556. [31] Fruchterman T.M.J. and Reingold E.M., Softw: Pract. Exper., 11(21) (1991) 1129 -- 1164 p-6 SbSm0.1440.033"indeed" in Beasts and SupebeastsSbSm0.3650.01"indeed" in A Paiof Blue EyesSbSm0.3880.02"indeed" in Draculas GuestSbSm0.6830.068"indeed" in When William CameSbSm0.3920.006"time" in Jude the ObscureSbSm0.4330.05"time" in Volcanic IslandsSbSm0.4460.01"time" in The Great BoewarSbSm0.4350.023"time" in Coral ReefsArthur Conan DoyleBram StokerCharles DickensThomas HardyP.G. WodehouseHector Hugh Munro (Saki)Charlies DarwinHerman Melville0.010.1Merged Symmetry (h=2)Merged Symmetry (h=2)0.010.11"Time""Indeed"
1601.01705
4
1601
2016-06-07T23:25:51
Learning to Compose Neural Networks for Question Answering
[ "cs.CL", "cs.CV", "cs.NE" ]
We describe a question answering model that applies to both images and structured knowledge bases. The model uses natural language strings to automatically assemble neural networks from a collection of composable modules. Parameters for these modules are learned jointly with network-assembly parameters via reinforcement learning, with only (world, question, answer) triples as supervision. Our approach, which we term a dynamic neural model network, achieves state-of-the-art results on benchmark datasets in both visual and structured domains.
cs.CL
cs
Learning to Compose Neural Networks for Question Answering Jacob Andreas and Marcus Rohrbach and Trevor Darrell and Dan Klein Department of Electrical Engineering and Computer Sciences {jda,rohrbach,trevor,klein}@eecs.berkeley.edu University of California, Berkeley 6 1 0 2 n u J 7 ] L C . s c [ 4 v 5 0 7 1 0 . 1 0 6 1 : v i X r a Abstract We describe a question answering model that applies to both images and structured knowl- edge bases. The model uses natural lan- guage strings to automatically assemble neu- ral networks from a collection of composable modules. Parameters for these modules are learned jointly with network-assembly param- eters via reinforcement learning, with only (world, question, answer) triples as supervi- sion. Our approach, which we term a dynamic neural module network, achieves state-of-the- art results on benchmark datasets in both vi- sual and structured domains. Introduction 1 This paper presents a compositional, attentional model for answering questions about a variety of world representations, including images and struc- tured knowledge bases. The model translates from questions to dynamically assembled neural net- works, then applies these networks to world rep- resentations (images or knowledge bases) to pro- duce answers. We take advantage of two largely independent lines of work: on one hand, an exten- sive literature on answering questions by mapping from strings to logical representations of meaning; on the other, a series of recent successes in deep neural models for image recognition and captioning. By constructing neural networks instead of logical forms, our model leverages the best aspects of both linguistic compositionality and continuous represen- tations. Our model has two components, trained jointly: first, a collection of neural "modules" that can be freely composed (Figure 1a); second, a network lay- out predictor that assembles modules into complete deep networks tailored to each question (Figure 1b). Figure 1: A learned syntactic analysis (a) is used to assemble a collection of neural modules (b) into a deep neural network (c), and applied to a world representation (d) to produce an answer. Previous work has used manually-specified modular structures for visual learning (Andreas et al., 2016). Here we: • learn a network structure predictor jointly with module parameters themselves • extend visual primitives from previous work to reason over structured world representations Training data consists of (world, question, answer) triples: our approach requires no supervision of net- work layouts. We achieve state-of-the-art perfor- mance on two markedly different question answer- ing tasks: one with questions about natural im- ages, and another with more compositional ques- tions about United States geography.1 2 Deep networks as functional programs We begin with a high-level discussion of the kinds of composed networks we would like to learn. 1We have released our code at http://github.com/ jacobandreas/nmn2 What cities are in Georgia?AtlantaandlookupGeorgiafindcityGeorgiaAtlantaMontgomeryKnowledge sourcerelateinNetwork layout (Section 4.2)find[city]lookup[Georgia]relate[in]and(b)Module inventory (Section 4.1)findlookupandrelate(a)(c)(d) Andreas et al. (2016) describe a heuristic ap- proach for decomposing visual question answering tasks into sequence of modular sub-problems. For example, the question What color is the bird? might be answered in two steps: first, "where is the bird?" (Figure 2a), second, "what color is that part of the image?" (Figure 2c). This first step, a generic mod- ule called find, can be expressed as a fragment of a neural network that maps from image features and a lexical item (here bird) to a distribution over pix- els. This operation is commonly referred to as the attention mechanism, and is a standard tool for ma- nipulating images (Xu et al., 2015) and text repre- sentations (Hermann et al., 2015). The first contribution of this paper is an exten- sion and generalization of this mechanism to enable fully-differentiable reasoning about more structured semantic representations. Figure 2b shows how the same module can be used to focus on the entity Georgia in a non-visual grounding domain; more generally, by representing every entity in the uni- verse of discourse as a feature vector, we can obtain a distribution over entities that corresponds roughly to a logical set-valued denotation. Having obtained such a distribution, existing neu- ral approaches use it to immediately compute a weighted average of image features and project back into a labeling decision-a describe module (Fig- ure 2c). But the logical perspective suggests a num- ber of novel modules that might operate on atten- tions: e.g. combining them (by analogy to conjunc- tion or disjunction) or inspecting them directly with- out a return to feature space (by analogy to quantifi- cation, Figure 2d). These modules are discussed in detail in Section 4. Unlike their formal counterparts, they are differentiable end-to-end, facilitating their integration into learned models. Building on previ- ous work, we learn behavior for a collection of het- erogeneous modules from (world, question, answer) triples. The second contribution of this paper is a model for learning to assemble such modules composition- ally. Isolated modules are of limited use-to ob- tain expressive power comparable to either formal approaches or monolithic deep networks, they must be composed into larger structures. Figure 2 shows simple examples of composed structures, but for realistic question-answering tasks, even larger net- Figure 2: Simple neural module networks, corresponding to the questions What color is the bird? and Are there any states? (a) A neural find module for computing an attention over pixels. (b) The same operation applied to a knowledge base. (c) Using an attention produced by a lower module to identify the color of the region of the image attended to. (d) Performing quantification by evaluating an attention directly. works are required. Thus our goal is to automati- cally induce variable-free, tree-structured computa- tion descriptors. We can use a familiar functional notation from formal semantics (e.g. Liang et al., 2011) to represent these computations.2 We write the two examples in Figure 2 as (describe[color] find[bird]) and (exists find[state]) respectively. These are network layouts: they spec- ify a structure for arranging modules (and their lex- ical parameters) into a complete network. Andreas et al. (2016) use hand-written rules to deterministi- cally transform dependency trees into layouts, and are restricted to producing simple structures like the above for non-synthetic data. For full generality, we will need to solve harder problems, like transform- ing What cities are in Georgia? (Figure 1) into (and find[city] (relate[in] lookup[Georgia])) In this paper, we present a model for learning to se- lect such structures from a set of automatically gen- erated candidates. We call this model a dynamic neural module network. 2But note that unlike formal semantics, the behavior of the primitive functions here is itself unknown. black and whiteGeorgiaAtlantaMontgomeryGeorgiaAtlantaMontgomeryexiststruefindbirddescribecolorfindstate(a)(b)(c)(d) 3 Related work There is an extensive literature on database ques- tion answering, in which strings are mapped to log- ical forms, then evaluated by a black-box execu- tion model to produce answers. Supervision may be provided either by annotated logical forms (Wong and Mooney, 2007; Kwiatkowski et al., 2010; An- dreas et al., 2013) or from (world, question, answer) triples alone (Liang et al., 2011; Pasupat and Liang, 2015). In general the set of primitive functions from which these logical forms can be assembled is fixed, but one recent line of work focuses on induc- ing new predicates functions automatically, either from perceptual features (Krishnamurthy and Kol- lar, 2013) or the underlying schema (Kwiatkowski et al., 2013). The model we describe in this paper has a unified framework for handling both the per- ceptual and schema cases, and differs from existing work primarily in learning a differentiable execution model with continuous evaluation results. Neural models for question answering are also a subject of current interest. These include approaches that model the task directly as a multiclass classifi- cation problem (Iyyer et al., 2014), models that at- tempt to embed questions and answers in a shared vector space (Bordes et al., 2014) and attentional models that select words from documents sources (Hermann et al., 2015). Such approaches generally require that answers can be retrieved directly based on surface linguistic features, without requiring in- termediate computation. A more structured ap- proach described by Yin et al. (2015) learns a query execution model for database tables without any nat- ural language component. Previous efforts toward unifying formal logic and representation learning in- clude those of Grefenstette (2013), Krishnamurthy and Mitchell (2013), Lewis and Steedman (2013), and Beltagy et al. (2013). The visually-grounded component of this work relies on recent advances in convolutional net- works for computer vision (Simonyan and Zisser- man, 2014), and in particular the fact that late convo- lutional layers in networks trained for image recog- nition contain rich features useful for other vision tasks while preserving spatial information. These features have been used for both image captioning (Xu et al., 2015) and visual QA (Yang et al., 2015). Most previous approaches to visual question an- swering either apply a recurrent model to deep rep- resentations of both the image and the question (Ren et al., 2015; Malinowski et al., 2015), or use the question to compute an attention over the input im- age, and then answer based on both the question and the image features attended to (Yang et al., 2015; Xu and Saenko, 2015). Other approaches include the simple classification model described by Zhou et al. (2015) and the dynamic parameter prediction network described by Noh et al. (2015). All of these models assume that a fixed computation can be performed on the image and question to compute the answer, rather than adapting the structure of the computation to the question. As noted, Andreas et al. (2016) previously con- sidered a simple generalization of these attentional approaches in which small variations in the net- work structure per-question were permitted, with the structure chosen by (deterministic) syntactic pro- cessing of questions. Other approaches in this gen- eral family include the "universal parser" sketched by Bottou (2014), the graph transformer networks of Bottou et al. (1997), the knowledge-based neu- ral networks of Towell and Shavlik (1994) and the recursive neural networks of Socher et al. (2013), which use a fixed tree structure to perform further linguistic analysis without any external world rep- resentation. We are unaware of previous work that simultaneously learns both parameters for and struc- tures of instance-specific networks. 4 Model Recall that our goal is to map from questions and world representations to answers. This process in- volves the following variables: 1. w a world representation 2. x a question 3. y an answer 4. z a network layout 5. θ a collection of model parameters Our model is built around two distributions: a lay- out model p(zx; θ(cid:96)) which chooses a layout for a sentence, and a execution model pz(yw; θe) which applies the network specified by z to w. For ease of presentation, we introduce these mod- els in reverse order. We first imagine that z is always observed, and in Section 4.1 describe how to evalu- ate and learn modules parameterized by θe within fixed structures. In Section 4.2, we move to the real scenario, where z is unknown. We describe how to predict layouts from questions and learn θe and θ(cid:96) jointly without layout supervision. 4.1 Evaluating modules Given a layout z, we assemble the corresponding modules into a full neural network (Figure 1c), and apply it to the knowledge representation. Interme- diate results flow between modules until an answer is produced at the root. We denote the output of the network with layout z on input world w as (cid:74)z(cid:75)w; can alternatively write (cid:74)m(h1, h2)(cid:75) for a top-level when explicitly referencing the substructure of z, we module m with submodule outputs h1 and h2. We then define the execution model: pz(yw) = ((cid:74)z(cid:75)w)y (1) (This assumes that the root module of z produces a distribution over labels y.) The set of possible layouts z is restricted by module type constraints: some modules (like find above) operate directly on the input representation, while others (like describe above) also depend on input from specific earlier modules. Two base types are considered in this pa- per are Attention (a distribution over pixels or enti- ties) and Labels (a distribution over answers). Parameters are tied across multiple instances of the same module, so different instantiated networks may share some parameters but not others. Modules have both parameter arguments (shown in square brackets) and ordinary inputs (shown in parenthe- ses). Parameter arguments, like the running bird example in Section 2, are provided by the layout, and are used to specialize module behavior for par- ticular lexical items. Ordinary inputs are the re- sult of computation lower in the network. In ad- dition to parameter-specific weights, modules have global weights shared across all instances of the module (but not shared with other modules). We write A, a, B, b, . . . for global weights and ui, vi for weights associated with the parameter argument i. ⊕ and (cid:12) denote (possibly broadcasted) elementwise addition and multiplication respectively. The com- plete set of global weights and parameter-specific weights constitutes θe. Every module has access to the world representation, represented as a collection of vectors w1, w2, . . . (or W expressed as a matrix). The nonlinearity σ denotes a rectified linear unit. The modules used in this paper are shown below, with names and type constraints in the first row and a description of the module's computation following. (→ Attention) Lookup lookup[i] produces an attention focused entirely at the index f (i), where the relationship f between words and positions in the input map is known ahead of time (e.g. string matches on database fields). (cid:74)lookup[i](cid:75) = ef (i) (2) where ei is the basis vector that is 1 in the ith position and 0 elsewhere. (→ Attention) Find find[i] computes a distribution over indices by con- catenating the parameter argument with each position of the input feature map, and passing the concatenated vector through a MLP: (cid:74)find[i](cid:75) = softmax(a (cid:12) σ(Bvi ⊕ CW ⊕ d)) (3) (Attention → Attention) Relate relate directs focus from one region of the input to another. It behaves much like the find module, but also conditions its behavior on the current region of k hkwk, where hk is the attention h. Let ¯w(h) = (cid:80) kth element of h. Then, (cid:74)relate[i](h)(cid:75) = softmax(a (cid:12) σ(Bvi ⊕ CW ⊕ D ¯w(h) ⊕ e)) (4) (Attention* → Attention) And and performs an operation analogous to set intersec- tion for attentions. The analogy to probabilistic logic suggests multiplying probabilities: (cid:74)and(h1, h2, . . .)(cid:75) = h1 (cid:12) h2 (cid:12) ··· (5) (Attention → Labels) Describe describe[i] computes a weighted average of w under the input attention. This average is then used to predict an answer representation. With ¯w as above, (cid:74)describe[i](h)(cid:75) = softmax(Aσ(B ¯w(h) + vi)) (6) (Attention → Labels) Exists exists is the existential quantifier, and inspects the incoming attention directly to produce a label, rather than an intermediate feature vector like describe: (cid:16)(cid:0) max k (cid:17) (cid:1)a + b hk (cid:74)exists](h)(cid:75) = softmax (7) mapped onto a (possibly smaller) set of semantic primitives. Second, these semantic primitives must be combined into a structure that closely, but not ex- actly, parallels the structure provided by syntax. For example, state and province might need to be identi- fied with the same field in a database schema, while all states have a capital might need to be identified with the correct (in situ) quantifier scope. While we cannot avoid the structure selection problem, continuous representations simplify the lexical selection problem. For modules that accept a vector parameter, we associate these parameters with words rather than semantic tokens, and thus turn the combinatorial optimization problem asso- ciated with lexicon induction into a continuous one. Now, in order to learn that province and state have the same denotation, it is sufficient to learn that their associated parameters are close in some embedding space-a task amenable to gradient descent. (Note that this is easy only in an optimizability sense, and not an information-theoretic one-we must still learn to associate each independent lexical item with the correct vector.) The remaining combinatorial problem is to arrange the provided lexical items into the right computational structure. In this respect, layout prediction is more like syntactic parsing than ordinary semantic parsing, and we can rely on an off-the-shelf syntactic parser to get most of the way there. In this work, syntactic structure is provided by the Stanford dependency parser (De Marneffe and Manning, 2008). The construction of layout candidates is depicted in Figure 3, and proceeds as follows: 1. Represent the input sentence as a dependency tree. 2. Collect all nouns, verbs, and prepositional phrases that are attached directly to a wh-word or copula. 3. Associate each of these with a layout frag- ment: Ordinary nouns and verbs are mapped to a single find module. Proper nouns to a sin- gle lookup module. Prepositional phrases are mapped to a depth-2 fragment, with a relate module for the preposition above a find mod- ule for the enclosed head noun. 4. Form subsets of this set of layout fragments. For each subset, construct a layout candidate by Figure 3: Generation of layout candidates. The input sentence (a) is represented as a dependency parse (b). Fragments of this dependency parse are then associated with appropriate modules (c), and these fragments are assembled into full layouts (d). With z observed, the model we have described so far corresponds largely to that of Andreas et al. (2016), though the module inventory is different- in particular, our new exists and relate modules do not depend on the two-dimensional spatial struc- ture of the input. This enables generalization to non- visual world representations. Learning in this simplified setting is straightfor- ward. Assuming the top-level module in each layout is a describe or exists module, the fully- instan- (cid:80) tiated network corresponds to a distribution over la- bels conditioned on layouts. To train, we maximize (w,y,z) log pz(yw; θe) directly. This can be under- stood as a parameter-tying scheme, where the deci- sions about which parameters to tie are governed by the observed layouts z. 4.2 Assembling networks Next we describe the layout model p(zx; θ(cid:96)). We first use a fixed syntactic parse to generate a small set of candidate layouts, analogously to the way a semantic grammar generates candidate semantic parses in previous work (Berant and Liang, 2014). A semantic parse differs from a syntactic parse in two primary ways. First, lexical items must be What cities are in Georgia?whatcitybeinGeorgiafind[city]relate[in]lookup[Georgia]relate[in]...lookup[Georgia]find[city]and(a)(b)(c)(d)relate[in]lookup[Georgia] joining all fragments with an and module, and inserting either a measure or describe module at the top (each subset thus results in two parse candidates.) All layouts resulting from this process feature a relatively flat tree structure with at most one con- junction and one quantifier. This is a strong sim- plifying assumption, but appears sufficient to cover most of the examples that appear in both of our tasks. As our approach includes both categories, re- lations and simple quantification, the range of phe- nomena considered is generally broader than pre- vious perceptually-grounded QA work (Krishna- murthy and Kollar, 2013; Matuszek et al., 2012). Having generated a set of candidate parses, we need to score them. This is a ranking problem; as in the rest of our approach, we solve it using standard neural machinery. In particular, we pro- duce an LSTM representation of the question, a feature-based representation of the query, and pass both representations through a multilayer perceptron (MLP). The query feature vector includes indicators on the number of modules of each type present, as well as their associated parameter arguments. While one can easily imagine a more sophisticated parse- scoring model, this simple approach works well for our tasks. Formally, for a question x, let hq(x) be an LSTM encoding of the question (i.e. the last hidden layer of an LSTM applied word-by-word to the input ques- tion). Let {z1, z2, . . .} be the proposed layouts for x, and let f (zi) be a feature vector representing the ith layout. Then the score s(zix) for the layout zi is s(zix) = a(cid:62)σ(Bhq(x) + Cf (zi) + d) (8) i.e. the output of an MLP with inputs hq(x) and f (zi), and parameters θ(cid:96) = {a, B, C, d}. Finally, we normalize these scores to obtain a distribution: p(zix; θ(cid:96)) = es(zix)(cid:46) n(cid:88) es(zjx) (9) a and Having defined a layout network j=1 selection module p(zx; θ(cid:96)) execution model pz(yw; θe), we are ready to define a model for predicting answers given only (world, question) pairs. The key constraint is that we want to min- imize evaluations of pz(yw; θe) (which involves expensive application of a deep network to a large input representation), but can tractably evaluate p(zx; θ(cid:96)) for all z (which involves application of a shallow network to a relatively small set of candidates). This is the opposite of the situation usually encountered semantic parsing, where calls to the query execution model are fast but the set of candidate parses is too large to score exhaustively. In fact, the problem more closely resembles the scenario faced by agents in the reinforcement learn- ing setting (where it is cheap to score actions, but potentially expensive to execute them and obtain re- wards). We adopt a common approach from that lit- erature, and express our model as a stochastic pol- icy. Under this policy, we first sample a layout z from a distribution p(zx; θ(cid:96)), and then apply z to the knowledge source and obtain a distribution over answers p(yz, w; θe). After z is chosen, we can train the execution model directly by maximizing log p(yz, w; θe) with respect to θe as before (this is ordinary backprop- agation). Because the hard selection of z is non- differentiable, we optimize p(zx; θ(cid:96)) using a policy gradient method. The gradient of the reward surface J with respect to the parameters of the policy is ∇J(θ(cid:96)) = E[∇ log p(zx; θ(cid:96)) · r] (10) (this is the REINFORCE rule (Williams, 1992)). Here the expectation is taken with respect to rollouts of the policy, and r is the reward. Because our goal is to select the network that makes the most accurate predictions, we take the reward to be identically the negative log-probability from the execution phase, i.e. E[(∇ log p(zx; θ(cid:96))) · log p(yz, w; θe)] (11) Thus the update to the layout-scoring model at each timestep is simply the gradient of the log-probability of the chosen layout, scaled by the accuracy of that layout's predictions. At training time, we approxi- mate the expectation with a single rollout, so at each step we update θ(cid:96) in the direction (∇ log p(zx; θ(cid:96)))· log p(yz, w; θe) for a single z ∼ p(zx; θ(cid:96)). θe and θ(cid:96) are optimized using ADADELTA (Zeiler, 2012) with ρ = 0.95, ε = 1e−6 and gradient clipping at a norm of 10. test-dev test-std Yes/No Number Other Zhou (2015) 76.6 Noh (2015) 80.7 Yang (2015) 79.3 81.2 NMN D-NMN 81.1 35.0 37.2 36.6 38.0 38.6 42.6 41.7 46.1 44.0 45.5 All 55.7 57.2 58.7 58.6 59.4 All 55.9 57.4 58.9 58.7 59.4 Table 1: Results on the VQA test server. NMN is the parameter-tying model from Andreas et al. (2015), and D-NMN is the model described in this paper. best if the candidate layouts were relatively simple: only describe, and and find modules are used, and layouts contain at most two conjuncts. One weakness of this basic framework is a diffi- culty modeling prior knowledge about answers (of the form most bears are brown). This kinds of lin- guistic "prior" is essential for the VQA task, and easily incorporated. We simply introduce an extra hidden layer for recombining the final module net- work output with the input sentence representation hq(x) (see Equation 8), replacing Equation 1 with: log pz(yw, x) = (Ahq(x) + B(cid:74)z(cid:75)w)y (12) (Now modules with output type Labels should be understood as producing an answer embedding rather than a distribution over answers.) This allows the question to influence the answer directly. Results are shown in Table 1. The use of dynamic networks provides a small gain, most noticeably on "other" questions. We achieve state-of-the-art re- sults on this task, outperforming a highly effective visual bag-of-words model (Zhou et al., 2015), a model with dynamic network parameter prediction (but fixed network structure) (Noh et al., 2015), a more conventional attentional model (Yang et al., 2015), and a previous approach using neural mod- ule networks with no structure prediction (Andreas et al., 2016). Some examples are shown in Figure 4. In general, the model learns to focus on the correct region of the image, and tends to consider a broad window around the region. This facilitates answering questions like Where is the cat?, which requires knowledge of the surroundings as well as the object in question. What is in the sheep's ear? What color is she wearing? What is the man dragging? (describe[what] (describe[color] (describe[what] (and find[sheep] find[ear])) find[wear]) find[man]) tag white boat (board) Figure 4: Sample outputs for the visual question answering task. The second row shows the final attention provided as in- put to the top-level describe module. For the first two exam- ples, the model produces reasonable parses, attends to the cor- rect region of the images (the ear and the woman's clothing), and generates the correct answer. In the third image, the verb is discarded and a wrong answer is produced. 5 Experiments The framework described in this paper is general, and we are interested in how well it performs on datasets of varying domain, size and linguistic com- plexity. To that end, we evaluate our model on tasks at opposite extremes of both these criteria: a large visual question answering dataset, and a small col- lection of more structured geography questions. 5.1 Questions about images Our first task is the recently-introduced Visual Ques- tion Answering challenge (VQA) (Antol et al., 2015). The VQA dataset consists of more than 200,000 images paired with human-annotated ques- tions and answers, as in Figure 4. We use the VQA 1.0 release, employing the de- velopment set for model selection and hyperparam- eter tuning, and reporting final results from the eval- uation server on the test-standard set. For the ex- periments described in this section, the input feature representations wi are computed by the the fifth con- volutional layer of a 16-layer VGGNet after pooling (Simonyan and Zisserman, 2014). Input images are scaled to 448×448 before computing their represen- tations. We found that performance on this task was Accuracy Model GeoQA GeoQA+Q LSP-F LSP-W NMN D-NMN 48 51 51.7 54.3 – – 35.7 42.9 Table 2: Results on the GeoQA dataset, and the GeoQA dataset with quantification. Our approach outperforms both a purely logical model (LSP-F) and a model with learned percep- tual predicates (LSP-W) on the original dataset, and a fixed- structure NMN under both evaluation conditions. 5.2 Questions about geography The next set of experiments we consider focuses on GeoQA, a geographical question-answering task first introduced by Krishnamurthy and Kollar (2013). This task was originally paired with a vi- sual question answering task much simpler than the one just discussed, and is appealing for a number of reasons. In contrast to the VQA dataset, GeoQA is quite small, containing only 263 examples. Two baselines are available: one using a classical se- mantic parser backed by a database, and another which induces logical predicates using linear clas- sifiers over both spatial and distributional features. This allows us to evaluate the quality of our model relative to other perceptually grounded logical se- mantics, as well as strictly logical approaches. The GeoQA domain consists of a set of entities (e.g. states, cities, parks) which participate in vari- ous relations (e.g. north-of, capital-of). Here we take the world representation to consist of two pieces: a set of category features (used by the find module) and a different set of relational features (used by the relate module). For our experiments, we use a sub- set of the features originally used by Krishnamurthy et al. The original dataset includes no quantifiers, and treats the questions What cities are in Texas? and Are there any cities in Texas? identically. Be- cause we are interested in testing the parser's ability to predict a variety of different structures, we intro- duce a new version of the dataset, GeoQA+Q, which distinguishes these two cases, and expects a Boolean answer to questions of the second kind. Results are shown in Table 2. As in the orig- inal work, we report the results of leave-one- environment-out cross-validation on the set of 10 en- Is Key Largo an island? (exists (and lookup[key-largo] find[island])) yes: correct What national parks are in Florida? (and find[park] (relate[in] lookup[florida])) everglades: correct What are some beaches in Florida? (exists (and lookup[beach] (relate[in] lookup[florida]))) yes (daytona-beach): wrong parse What beach city is there in Florida? (and lookup[beach] lookup[city] (relate[in] lookup[florida])) [none] (daytona-beach): wrong module behavior Figure 5: Example layouts and answers selected by the model on the GeoQA dataset. For incorrect predictions, the correct answer is shown in parentheses. vironments. Our dynamic model (D-NMN) outper- forms both the logical (LSP-F) and perceptual mod- els (LSP-W) described by (Krishnamurthy and Kol- lar, 2013), as well as a fixed-structure neural mod- ule net (NMN). This improvement is particularly notable on the dataset with quantifiers, where dy- namic structure prediction produces a 20% relative improvement over the fixed baseline. A variety of predicted layouts are shown in Figure 5. 6 Conclusion We have introduced a new model, the dynamic neu- ral module network, for answering queries about both structured and unstructured sources of informa- tion. Given only (question, world, answer) triples as training data, the model learns to assemble neu- ral networks on the fly from an inventory of neural models, and simultaneously learns weights for these modules so that they can be composed into novel structures. Our approach achieves state-of-the-art results on two tasks. We believe that the success of this work derives from two factors: Continuous representations improve the expres- siveness and learnability of semantic parsers: by re- placing discrete predicates with differentiable neural network fragments, we bypass the challenging com- binatorial optimization problem associated with in- duction of a semantic lexicon. In structured world representations, neural predicate representations al- low the model to invent reusable attributes and re- lations not expressed in the schema. Perhaps more importantly, we can extend compositional question- answering machinery to complex, continuous world representations like images. Semantic structure prediction improves general- ization in deep networks: by replacing a fixed net- work topology with a dynamic one, we can tailor the computation performed to each problem instance, using deeper networks for more complex questions and representing combinatorially many queries with comparatively few parameters. In practice, this re- sults in considerable gains in speed and sample effi- ciency, even with very little training data. These observations are not limited to the question answering domain, and we expect that they can be applied similarly to tasks like instruction following, game playing, and language generation. Acknowledgments JA is supported by a National Science Foundation Graduate Fellowship. MR is supported by a fellow- ship within the FIT weltweit-Program of the German Academic Exchange Service (DAAD). This work was additionally supported by DARPA, AFRL, DoD MURI award N000141110688, NSF awards IIS- 1427425 and IIS-1212798, and the Berkeley Vision and Learning Center. References Jacob Andreas, Andreas Vlachos, and Stephen Clark. 2013. Semantic parsing as machine translation. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, Sofia, Bulgaria. Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. 2016. Neural module networks. In Pro- ceedings of the Conference on Computer Vision and Pattern Recognition. Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Mar- garet Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. 2015. VQA: Visual question answer- In Proceedings of the International Conference ing. on Computer Vision. Islam Beltagy, Cuong Chau, Gemma Boleda, Dan Gar- rette, Katrin Erk, and Raymond Mooney. 2013. Mon- tague meets markov: Deep semantics with probabilis- tic logical form. Proceedings of the Joint Conference on Distributional and Logical Semantics, pages 11– 21. Jonathan Berant and Percy Liang. 2014. Semantic pars- In Proceedings of the Annual ing via paraphrasing. Meeting of the Association for Computational Linguis- tics, volume 7, page 92. Antoine Bordes, Sumit Chopra, and Jason Weston. 2014. Question answering with subgraph embeddings. Pro- ceedings of the Conference on Empirical Methods in Natural Language Processing. L´eon Bottou, Yoshua Bengio, and Yann Le Cun. 1997. Global training of document processing systems us- ing graph transformer networks. In Proceedings of the Conference on Computer Vision and Pattern Recogni- tion, pages 489–494. IEEE. L´eon Bottou. 2014. From machine learning to machine reasoning. Machine learning, 94(2):133–149. Marie-Catherine De Marneffe and Christopher D Man- ning. 2008. The Stanford typed dependencies repre- sentation. In Proceedings of the International Confer- ence on Computational Linguistics, pages 1–8. Edward Grefenstette. 2013. Towards a formal distribu- tional semantics: Simulating logical calculi with ten- sors. Joint Conference on Lexical and Computational Semantics. Karl Moritz Hermann, Tomas Kocisky, Edward Grefen- stette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. 2015. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems, pages 1684–1692. Mohit Iyyer, Jordan Boyd-Graber, Leonardo Claudino, Richard Socher, and Hal Daum´e III. 2014. A neu- ral network for factoid question answering over para- graphs. In Proceedings of the Conference on Empiri- cal Methods in Natural Language Processing. Jayant Krishnamurthy and Thomas Kollar. 2013. Jointly learning to parse and perceive: connecting natural lan- guage to the physical world. Transactions of the Asso- ciation for Computational Linguistics. Jayant Krishnamurthy and Tom Mitchell. 2013. Vec- tor space semantic parsing: A framework for compo- In Proceedings of the sitional vector space models. ACL Workshop on Continuous Vector Space Models and their Compositionality. Tom Kwiatkowski, Luke Zettlemoyer, Sharon Goldwa- ter, and Mark Steedman. 2010. Inducing probabilis- tic CCG grammars from logical form with higher- In Proceedings of the Conference order unification. on Empirical Methods in Natural Language Process- ing, pages 1223–1233, Cambridge, Massachusetts. Tom Kwiatkowski, Eunsol Choi, Yoav Artzi, and Luke Zettlemoyer. 2013. Scaling semantic parsers with on- the-fly ontology matching. In Proceedings of the Con- Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhutdinov, Richard Zemel, and Yoshua Bengio. 2015. Show, attend and tell: Neural image caption generation with visual In International Conference on Machine attention. Learning. Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention net- works for image question answering. arXiv preprint arXiv:1511.02274. 2015. Pengcheng Yin, Zhengdong Lu, Hang Li, and Ben Kao. 2015. Neural enquirer: Learning to query tables. arXiv preprint arXiv:1512.00965. Matthew D Zeiler. 2012. adaptive learning rate method. arXiv:1212.5701. ADADELTA: An arXiv preprint Bolei Zhou, Yuandong Tian, Sainbayar Sukhbaatar, Arthur Szlam, and Rob Fergus. 2015. Simple base- arXiv preprint line for visual question answering. arXiv:1512.02167. ference on Empirical Methods in Natural Language Processing. Mike Lewis and Mark Steedman. 2013. Combining distributional and logical semantics. Transactions of the Association for Computational Linguistics, 1:179– 192. Percy Liang, Michael Jordan, and Dan Klein. 2011. Learning dependency-based compositional semantics. In Proceedings of the Human Language Technology Conference of the Association for Computational Lin- guistics, pages 590–599, Portland, Oregon. Mateusz Malinowski, Marcus Rohrbach, and Mario Fritz. 2015. Ask your neurons: A neural-based approach to answering questions about images. In Proceedings of the International Conference on Computer Vision. Cynthia Matuszek, Nicholas FitzGerald, Luke Zettle- moyer, Liefeng Bo, and Dieter Fox. 2012. A joint model of language and perception for grounded at- tribute learning. In International Conference on Ma- chine Learning. Hyeonwoo Noh, Paul Hongsuck Seo, and Bohyung Han. 2015. Image question answering using convolutional neural network with dynamic parameter prediction. arXiv preprint arXiv:1511.05756. Panupong Pasupat and Percy Liang. 2015. Composi- tional semantic parsing on semi-structured tables. In Proceedings of the Annual Meeting of the Association for Computational Linguistics. Mengye Ren, Ryan Kiros, and Richard Zemel. 2015. Ex- ploring models and data for image question answer- In Advances in Neural Information Processing ing. Systems. K Simonyan and A Zisserman. 2014. Very deep con- volutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556. Richard Socher, John Bauer, Christopher D. Manning, and Andrew Y. Ng. 2013. Parsing with compositional vector grammars. In Proceedings of the Annual Meet- ing of the Association for Computational Linguistics. 1994. Knowledge-based artificial neural networks. Artificial Intelligence, 70(1):119–165. Geoffrey G Towell and Jude W Shavlik. Ronald J Williams. 1992. Simple statistical gradient- following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256. Yuk Wah Wong and Raymond J. Mooney. 2007. Learn- ing synchronous grammars for semantic parsing with lambda calculus. In Proceedings of the Annual Meet- ing of the Association for Computational Linguistics, volume 45, page 960. Huijuan Xu and Kate Saenko. 2015. Ask, attend and answer: Exploring question-guided spatial atten- arXiv preprint tion for visual question answering. arXiv:1511.05234.
1802.09189
1
1802
2018-02-26T07:52:30
Language Distribution Prediction based on Batch Markov Monte Carlo Simulation with Migration
[ "cs.CL" ]
Language spreading is a complex mechanism that involves issues like culture, economics, migration, population etc. In this paper, we propose a set of methods to model the dynamics of the spreading system. To model the randomness of language spreading, we propose the Batch Markov Monte Carlo Simulation with Migration(BMMCSM) algorithm, in which each agent is treated as a language stack. The agent learns languages and migrates based on the proposed Batch Markov Property according to the transition matrix T and migration matrix M. Since population plays a crucial role in language spreading, we also introduce the Mortality and Fertility Mechanism, which controls the birth and death of the simulated agents, into the BMMCSM algorithm. The simulation results of BMMCSM show that the numerical and geographic distribution of languages varies across the time. The change of distribution fits the world cultural and economic development trend. Next, when we construct Matrix T, there are some entries of T can be directly calculated from historical statistics while some entries of T is unknown. Thus, the key to the success of the BMMCSM lies in the accurate estimation of transition matrix T by estimating the unknown entries of T under the supervision of the known entries. To achieve this, we first construct a 20 by 20 by 5 factor tensor X to characterize each entry of T. Then we train a Random Forest Regressor on the known entries of T and use the trained regressor to predict the unknown entries. The reason why we choose Random Forest(RF) is that, compared to Single Decision Tree, it conquers the problem of over fitting and the Shapiro test also suggests that the residual of RF subjects to the Normal distribution.
cs.CL
cs
Language Distribution Prediction based on Batch Markov Monte Carlo Simulation with Migration XingYu Fu ZiYi Yang XiuWen Duan Sun Yat_sen University {fuxy28, yangzy7, duanxw3}@mail2.sysu.edu.cn Abstract Language spreading is a complex mechanism that involves issues like culture, economics, migration, population etc. In this paper, we propose a set of methods to model the dynamics of the spreading system. To model the randomness of language spreading, we propose the Batch Markov Monte Carlo Simulation with Migration(BMMCSM) algorithm, in which each agent is treated as a language stack. The agent learns languages and migrates based on the proposed Batch Markov Property according to the transition matrix 𝑇 and migration matrix 𝑀. Since population plays a crucial role in language spreading, we also introduce the Mortality and Fertility Mechanism, which controls the birth and death of the simulated agents, into the BMMCSM algorithm. The simulation results of BMMCSM show that the numerical and geographic distribution of languages varies across the time. The change of distribution fits the world's cultural and economic development trend. Next, when we construct Matrix 𝑇, there are some entries of 𝑇 can be directly calculated from historical statistics while some entries of 𝑇 is unknown. Thus, the key to the success of the BMMCSM lies in the accurate estimation of transition matrix 𝑇 by estimating the unknown entries of 𝑇 under the supervision of the known entries. To achieve this, we first construct a 20 × 20 × 5 factor tensor 𝑋⃑ to characterize each entry of 𝑇. Then we train a Random Forest Regressor on the known entries of 𝑇 and use the trained regressor to predict the unknown entries. The reason why we choose Random Forest (RF) is that, compared to Single Decision Tree, it conquers the problem of over-fitting and the Shapiro test also suggests that the residual of RF subjects to the Normal distribution. Keywords: Language Spreading; Batch Markov Chain; Monte Carlo Simulation; Machine Learning; Classification and Regression Tree; Random Forest; The implementation of our work is available at: https://github.com/fxy96/Batch-Markov-Monte-Carlo-for-Language-Distribution 1 Mechanisms for Learning Languages Supposing there are 𝑁 languages 𝐿 = {𝑙1, 𝑙2, … , 𝑙𝑁} to be modelled, we treat 𝐿 as the states set in the classical Stochastic Markov theory where each agent learns new language 𝑙𝑗 based on the batch of languages he(her) has already mastered and the transition matrix 𝑇 = (𝑡𝑖𝑗) of 𝐿, in which: 𝑁×𝑁 𝑡𝑖𝑗 = 𝑃{𝑎𝑔𝑒𝑛𝑡 𝑤𝑖𝑙𝑙 𝑙𝑒𝑎𝑟𝑛 𝑙𝑗 𝑎𝑔𝑒𝑛𝑡 ℎ𝑎𝑠 𝑚𝑎𝑠𝑡𝑒𝑟𝑒𝑑 𝑙𝑖}. The construction of transition matrix 𝑇 depends on a thorough research on a selection of factors which determine the learning trend for different languages speakers. Some Regression techniques are applied to make an accurate prediction of each 𝑡𝑖𝑗. We will cover the details of the construction in section 4. One thing to note is that, the Markov property in traditional Stochastic Markov theory [1]: 𝑃{𝑋𝑡+1 = 𝑖𝑋𝑡, 𝑋𝑡−1, … , 𝑋0} = 𝑃{𝑋𝑡+1 = 𝑖𝑋𝑡} no longer holds in our case, and therefore we propose the Batch Markov Property(BMP) in which the next language each agent is going to learn is dependent on the whole batch of languages he(her) has already mastered. Figure1 illustrates the intuition of BMP: Figure1: a batch of learned languages behaves as an integrated unit To make the concept of BMP clear, imagine 𝐿 = {𝑙1, 𝑙2, 𝑙3} , e.g. {𝐾𝑜𝑟𝑒𝑎𝑛, 𝐸𝑛𝑔𝑙𝑖𝑠ℎ, 𝐺𝑒𝑟𝑚𝑎𝑛}, and there is a specific agent who has already mastered languages 𝑙1 and 𝑙3. We now calculate the probability of the event that the agent masters 𝑙2 in the next round by assuming that the agent is currently uniformly distributed among the batch {𝑙1, 𝑙3} , by total probability rule [2], that is: 𝑃{𝑎𝑔𝑒𝑛𝑡 𝑤𝑖𝑙𝑙 𝑙𝑒𝑎𝑟𝑛 𝑙2 𝑎𝑔𝑒𝑛𝑡 ℎ𝑎𝑠 𝑚𝑎𝑠𝑡𝑒𝑟𝑒𝑑 𝑙1 𝑎𝑛𝑑 𝑙3 } = (𝑡12 + 𝑡32) ∕ 2. Another mechanism of interest in our work is the Language Stack Mechanism(LSM), where we imagine each learning agent as an ever-updating stack which is pushed into a language at each round while the layer is deleted from the top if it turns out to be the same language as another already inserted layer. Figure2 shows an example of LSM: 2 Figure2: an agent can be deemed as an ever-updating stack The 𝑛𝑡ℎ layer of the stack represents the 𝑛𝑡ℎ language of the agent from the bottom up (first layer is native language) and the deleting mechanism guarantees that the agent can stop learning new languages, which is quite common for most of us, and there are no repeated languages in the language stack for each agent 2 Batch Markov Monte Carlo Simulation To study the distribution of various language speaker over time, we propose the Batch Markov Monte Carlo Simulation(BMMCS) algorithm to model the collective learning behaviors of a sample of agents as time develops. We run the algorithm multiple times (100 times, in our case) with rather large initial sample number (1 million, in our case). By the Law of Large Numbers [2], we form a stable and accurate statistical prediction of the future languages distribution. In our Monte Carlo Simulation, we first sample an initial group of language learning agents whose languages subject to the initial distribution of various languages. [18] At each year, some of the sampled agents will learn new languages based on the BMP mechanism that we have just discussed in section1 and some of the sampled agents will not learn new languages, which is rather common since language learning process is painful for most of us. By simulating like this, we can see the dynamics of how languages spread over a group of people whose first and second languages are quite diverse. One phenomenon we need to pay special attention to is that some languages that are not that international are actually spoken by a large number of population, e.g. Chinese (Rank 1st in native languages) and Hindi (Rank 3rd in native languages) [3]. The reason for this phenomenon is obvious since it turns out China and India are the countries of most population on Earth [4] and therefore such languages are spoken most. Figure3 visualize the distribution of world population by country in 2017 [4] 3 Figure3: World Population Percentage by country From above, we can see that the factors closely related to population distribution and population distribution itself can influence the languages distribution profoundly. Hence, we adopt two methods to take this into consideration. First, the initial sampling has already contained the population information. Second, we implement the Mortality and Fertility Mechanism (MFM) in the BMMCS algorithm to simulate the dynamics of population distribution over time. The parameters involved in MFM is described below: We download the database of the prediction of the population pattern of each country in the coming 50 years which is modeled and predicted by the Department of Economic and Social Affairs of the UN [19]. We take 5 years as a term (10 terms for 50 years) and summarize countries' population of each term to get each term's language zone population distribution. When running BMMCS, we update the population through the time to get a more practical stimulation. Figure4 shows the pipeline of BMMCS algorithm: Figure4: the pipeline of BMMCS 4 To summarize the discussion above, we write the algorithm here: Algorithm1 (BMMCS): # Establish the initial society • Sample an initial group of language stacks (learning agents) according to the initial distribution of various languages at the starting time. for the length of time do # BMP Learning • Let each stack learns language based on the transition matrix 𝑇 and the BMP mechanism. # MFM • Delete a proportion of stacks based on the death rate 𝛼0 of different zones in that time. • Add new stacks into the system whose native languages (first layer of stack) subject to the birth rate 𝛼1 and population of different language regions in that time. end for 3 Batch Markov Monte Carlo Simulation with Migration In section 2, we proposed the so-called Batch Markov Monte Carlo Simulation algorithm where each agent (language stack) is learning new languages as time develops and some of the agent may pass away while some new agent may be born by the mortality and fertility mechanism we proposed in BMMCS. To summarize, BMMCS takes the spread of languages and the population changes into consideration. However, BMMCS doesn't include the human migration, which is intuitively crucial for the geographic distribution of languages, and therefore we add the migration mechanism in this section. We name the final simulation strategy which consider human migration as Batch Markov and Monte Carlo Simulation with Migration (BMMCSM). In BMMCSM, we first construct the migration preference matrix 𝑀 = (𝑚𝑖𝑗) , where: 𝑁×𝑁 𝑚𝑖𝑗 = 𝑃{ 𝑎𝑔𝑒𝑛𝑡 𝑤𝑖𝑙𝑙 𝑚𝑖𝑔𝑟𝑎𝑡𝑒 𝑡𝑜 𝑙𝑎𝑛𝑔𝑢𝑎𝑔𝑒 𝑧𝑜𝑛𝑒 𝑗 𝑎𝑔𝑒𝑛𝑡 𝑠𝑡𝑎𝑦 𝑖𝑛 𝑙𝑎𝑛𝑔𝑢𝑎𝑔𝑒 𝑧𝑜𝑛𝑒 𝑖}. While, note that the migration pattern for each agent relies on not only the agent's current living location but also has a strong connection to the mother land (i.e. the language zone of the native language) of the agent. Thus, for an agent whose mother land is in language zone 𝑘 and currently 5 living in language zone 𝑖, we calculate the distribution of his(her) next living language zone as following: (𝑚𝑖 + 𝑚𝑘)/2. , where 𝑚𝑖 denotes the 𝑖𝑡ℎ row of 𝑀. The intuition for the above equation is that the agent uniformly distributes between his(her) birth place and currently living place by the total probability rule [2]. To summarize the above discussion, we write the algorithm here: Algorithm2 (BMMCSM): # Establish the initial society • Sample an initial group of language stacks (learning agents) according to the distribution of various languages at the starting time. We assume the current location for each agent is his(her) mother land. for the length of time do # BMP Learning • Let each stack learn language based on the transition matrix 𝑇 and the BMP mechanism. # Migration (Difference between BMMCS and BMMCSM) • Each agent changes their current living location subjecting to (𝑚𝑚𝑜𝑡ℎ𝑒𝑟 + 𝑚𝑐𝑢𝑟𝑟𝑒𝑛𝑡)/2. # MFM • Delete a proportion of stacks based on the death rate 𝛼0 of the time. • Add new stacks into the system whose native languages (first layer of stack) subject to the birth rate 𝛼1 and population of different language regions of the time. • end for After the simulation, we end up with a group of agents spread over each language zone and we know exactly what languages are in the language stack for each agent. Hence, we can know the languages distribution for each language zone after years' migration, languages spread, and population change. 6 4 Estimation of transition matrix 𝑻 4.1 Sketch of Section 4 So far, we have shown how the BMMCS and BMMCSM algorithms work under the assumption that the transition matrix 𝑇 = (𝑡𝑖𝑗) the pipeline of building matrix 𝑇 specifically. has been given. In this section, we will show 𝑁×𝑁 To recap, we write the definition of 𝑡𝑖𝑗 here again: 𝑡𝑖𝑗 = 𝑃{𝑎𝑔𝑒𝑛𝑡 𝑤𝑖𝑙𝑙 𝑙𝑒𝑎𝑟𝑛 𝑙𝑗 𝑎𝑔𝑒𝑛𝑡 ℎ𝑎𝑠 𝑚𝑎𝑠𝑡𝑒𝑟𝑒𝑑 𝑙𝑖} For some 𝑡𝑖𝑗 ∈ 𝑇 , we can tell the value of it directly from historical statistical data, while for some other 𝑡𝑖𝑗 ∈ 𝑇 , this value can't be known directly. Therefore, we result in a sparse matrix 𝑇 like this: 0.9 ( 0.2 0.1 ) What remains to be solved is estimating the unknown 𝑡𝑖𝑗 from the known ones, which falls into the classical supervised learning paradigm. To implement regression, for each 𝑡𝑖𝑗 ∈ 𝑇, we look for factors that determine the willingness (𝑛)) for 𝑡𝑖𝑗, of language 𝑖 speakers to learn language 𝑗. Say we have 𝑛 factors (𝑥𝑖𝑗 then we want to find a decision function 𝑓: 𝑅𝑛 → 𝑅 such that: (2), . . . , 𝑥𝑖𝑗 (1), 𝑥𝑖𝑗 𝑡𝑖𝑗 = 𝑓(𝑥𝑖𝑗 (1), 𝑥𝑖𝑗 (2), . . . , 𝑥𝑖𝑗 (𝑛)) + 𝜀𝑖𝑗 , ∀(𝑖, 𝑗) ∈ 𝐿 × 𝐿 where 𝜀𝑖𝑗 is a Normal(Gaussian) random noise: 𝜀𝑖𝑗~𝑁(0, 𝜎2) In our work, we compare two models to approximate decision function 𝑓, i.e. Classification And Regression Tree(CART) [5] and Random Forest(RF) [6], which turns out that CART results in serious over-fitting problem while RF can elegantly overcome it by its Random Sampling, Random Split and Ensemble Mechanism [6]. The comparison will be discussed in detail in section 1.4.4. Figure5 visualize the pipeline of Random Forest learning algorithm [7]: 7 Figure5: Random Forest We train our model on the set of known 𝑡𝑖𝑗(training dataset), and then predict the unknown 𝑡𝑖𝑗 by the already well-trained model. The construction of matrix 𝑇 is completed here. The key to the success of our estimation lies in the choice of factors which will be explained in detail in next sub-section. 4.2 Construction of Factors There are many aspects of factors influence the willingness of language 𝑖 speakers to learn language 𝑗. To well estimate the unknown 𝑡𝑖𝑗, we now introduce the factors that we choose in this work. It is also natural to add more factors into the framework which can be studied as future research. Set Up: Classification of Language Zone and Data Pre-Preparation We studied 26 most used languages and clustered them into 20 language zones. Here, we give each language zone an index, that is: 𝐿 = {𝑙0, 𝑙1, . . . , 𝑙19} All data analyzed in our model is collected in terms of language zones. Among the 26 languages, Mandarin Chinese, Wu Chinese and Yue Chinese are putted together as Language zone Chinese while Telugu, Tamil, Marathi and Punjabi are considered as sub branch of Hindi/Urdu Language family. The reason behind this clustering is that these languages are most spread and spoken in a relatively close geographical area and the developments of these languages are mostly influenced by the characteristics of the same countries and districts. To construct the factors and transition matrix 𝑇, we collect data of different countries concerned their official language, economic status and culture influence. Then, we match the countries with their corresponding language zones and further processed the data to calculate our factors and then use the factors to estimate the transition matrix 𝑇. 8 As for the countries we chosen, we consider the top 30 most populous countries and the top 30 countries with strongest culture soft power, since they are the most influential countries in the language zones. The figure below shows the countries that we study for each language zone: Figure6: 35 countries are selected and assigned to 20 language zones. Factor1: Language similarity Firstly, based on the Ethnology theory, Language Similarity is an important motivation for people to acquire a new language, especially when the new language that the people try to learn shares similar analogical syntax or grammar system with the language they have already mastered [11]. For example, it is a common phenomenon in Europe that a person who takes German as his native language prefer to learn Dutch than other people due to the similarity of these two languages. We Thus, we introduce the factor 𝑆𝑖𝑚𝑖 (𝑖, 𝑗) to quantify any two languages' similarity in the field of Ethnology Language family. According to the data in appendix, most languages in our 20 language zones belong to 8 language families, excluding Japanese and Korean. (Japanese and Korean are two relatively independent languages. [12]) Then, in our paper, we use the method of Hot-Encoding by assigning each language zone a vector with 8 dimensions representing 8 language families. For each language zone 𝑖 's language family vector, we assign 1 to the language families it belongs to and 0 to other dimensions. While for Japanese and Korean, we assign their vectors with 0⃗ = (0,0,0,0,0,0,0,0) . Given any two languages 𝑖, 𝑗 ∈ 𝐿 , their similarity can be calculated by inner product, that is: 𝑆𝑖𝑚𝑖 (𝑖, 𝑗) = 𝑖 𝑗 where 𝑖 and 𝑗 represent the language family vectors for language 𝑖 and 𝑗 respectively. If 𝑆𝑖𝑚𝑖 (𝑖, 𝑗) = 1, we say these two languages share similarity, otherwise we say the two have no similarity. 9 Factor2: Foreign Direct Investment Net Outflows(FDINO) The openness of countries can influence the popularities of their languages. We use the amount of one zone's Foreign Direct Investment Net Outflows(FDINO) to quantify the openness. From the FDINO, we can see the government's willingness to communication with other regions, so we can call it the extroversion of one language zone. The data we use is from the World Bank [13] [14], while the data were distinguished by countries. Thus, we use the above formulas to get the data we want (i.e. distinguished by language zones), that is: 𝑒𝑥𝑡𝑟𝑜(𝑖) = ∑ 𝑒𝑥𝑝𝑜𝑟𝑡(𝑎) ∙ 𝑤𝑒𝑖𝑔ℎ𝑡(𝑎) , 𝑖 ∈ 𝐿 𝑎∈𝑖 𝑤𝑒𝑖𝑔ℎ𝑡(𝑎) = 𝐺𝐷𝑃 𝑜𝑓 𝑐𝑜𝑢𝑛𝑡𝑟𝑦 𝑎 𝐺𝐷𝑃 𝑜𝑓 𝑙𝑎𝑛𝑔𝑢𝑎𝑔𝑒 𝑧𝑜𝑛𝑒 𝑖 (𝐺𝐷𝑃 𝑜𝑓 𝑙𝑎𝑛𝑔𝑢𝑎𝑔𝑒 𝑧𝑜𝑛𝑒 𝑖 = ∑ 𝐺𝐷𝑃 𝑜𝑓 𝑐𝑜𝑢𝑛𝑡𝑟𝑦 𝑘 ) 𝑘∈𝑖 Further, for any 𝑖, 𝑗 ∈ 𝐿 , we assume that 𝑒𝑥𝑡𝑟𝑜(𝑖, 𝑗) = 𝑒𝑥𝑡𝑟𝑜(𝑗), which makes sense since the willingness of learning language 𝑗 is mostly dependent on the situation of 𝑗, rather than 𝑖. Factor3: Economic Interaction between Language Zones As global communication increases, there emerges international business and global tourism, which can impose influence on the spread of languages. We need to consider the interaction between language zones as a factor, to illustrate, if one zone intends to do business with another zone, then the people from the former zone have more motivation to learn the latter zone's language, which is necessary for the buyer and the seller to communicate. Therefore, we use the Export Percentage from one zone to another zone measure the importance the former imposes on the latter, defined as 𝑒𝑥𝑝𝑜𝑟𝑡(𝑖, 𝑗), 𝑖, 𝑗 ∈ 𝐿. If this factor is high, means that region 𝑖 has a large amount of export towards region 𝑗, then region 𝑗 seems more connected to region 𝑖, and therefore there is a tendency for people in region 𝑖 to learn the language in region 𝑗. The data we use to calculate 𝑒𝑥𝑝𝑜𝑟𝑡(𝑖, 𝑗) is from a famous official business website in China [15], and this dataset were based on Department of Statistics of each country. However, we can only obtain data between countries, so we need to convert it into data between language zones. Therefore, we calculate as follow: 𝑒𝑥𝑝𝑜𝑟𝑡(𝑖, 𝑗) = ∑ ∑ 𝑒𝑥𝑝𝑜𝑟𝑡 (𝑎, 𝑏) ∙ 𝑤𝑒𝑖𝑔ℎ𝑡(𝑎) 𝑎∈𝑖 𝑏∈𝑗 𝑤𝑒𝑖𝑔ℎ𝑡(𝑎) = 𝐺𝐷𝑃 𝑜𝑓 𝑐𝑜𝑢𝑛𝑡𝑟𝑦 𝑎 𝐺𝐷𝑃 𝑜𝑓 𝑙𝑎𝑛𝑔𝑢𝑎𝑔𝑒 𝑧𝑜𝑛𝑒 𝑖 10 Figure7 illustrates the intuition of this calculation: Figure7: the circles with the same color represent countries in the same language zone and the Economic Interaction between two language zones are calculated by summing up the exports between all possible pairs Factor4: Culture Soft Power Culture soft power is also a key factor we considered in our model. Language of high culture export countries enjoys higher language exposure rate. For these languages, foreigners can get access to them easily through culture products like music, TV drama, movies and so on. Even some pop culture may cause a hit to learn certain language. For example, many teenagers all over the world have been attracted by Korean pop culture or Japanese anime to learn these countries' languages. A rank with score officially provided by USC Center on Public Diplomacy [16] shows us each country's soft power. Summarize the scores so that we get the assessment of language zones' soft power (𝑠𝑜𝑓𝑡𝑝𝑜𝑤𝑒𝑟(𝑖), 𝑖 ∈ 𝐿 ). Here we assume that countries inside each language zone contribute to the spread of its language independently and additively. Since each zone's culture exports to countries all over the world, regardless of the speakers' original zones, we therefore assume that 𝑠𝑜𝑓𝑡(𝑖, 𝑗) is independent of 𝑖, that is: 𝑠𝑜𝑓𝑡(𝑖, 𝑗) = 𝑠𝑜𝑓𝑡𝑝𝑜𝑤𝑒𝑟(𝑗), 𝑓𝑜𝑟 ∀𝑖, 𝑗 ∈ 𝐿 Factor 5: Migration Preference The immigration and emigration patterns are good tools for us to predict the future distribution of language. In our predictive model, we introduce Migration Preference which represents the probability that people immigrate into another language zone from one language zone. Migration Preference is derived from the 2017 the UN workbook of Migrant Stock by Origin and Destination [17]. We summarize corresponding countries' data and know how many people migrate from language zone 𝑖 and finally settle in language zone 𝑗, which we denote as 𝑒𝑖𝑗. Then, we calculate each entry 𝑚𝑖𝑗 of Migration Matrix 𝑀 ,which represents the probability people immigrate into language zone 𝑗 from language zone 𝑖 , by the following formula: 𝑚𝑖𝑗 = 𝑒𝑖𝑗 ∑ 𝑘∈𝐿 𝑒𝑖𝑘 , 𝑖, 𝑗 ∈ 𝐿 We not only consider 𝑚𝑖𝑗 as factor for predicting 𝑡𝑖𝑗, but also use it to simulate the population migration in BMMCSM. 11 4.3 Estimation of 𝑻 For each pair (𝑖, 𝑗) ∈ 𝐿 × 𝐿, we construct the corresponding factor vector as we discussed in section 4.2 : 𝑋⃑𝑖𝑗 = (𝑥𝑖𝑗 (5)) (1), 𝑥𝑖𝑗 (2), . . . , 𝑥𝑖𝑗 and therefore, we end up with a 20 × 20 × 5 factor tensor 𝑋⃑. Figure8 visualizes the structure of 𝑋⃑: Figure8: Factor Tensor 𝑋⃑ To calculate all the entries in 𝑇, we first calculate the 𝑡𝑖𝑗 ∈ 𝑇 that can be directly known from historical statistics, which end up with a sparse estimation of the transition matrix 𝑇, i.e. many of the entries in 𝑇 are empty. The work we left now is to make an inference for the empty entries in 𝑇, which can't be directly estimated, based on the known (𝑋⃑𝑖𝑗, 𝑡𝑖𝑗), i.e. the supervised learning paradigm. Formally, we define the training dataset and predicting dataset as follow: 𝑋⃑𝑡𝑟𝑎𝑖𝑛 = { (𝑋⃑𝑖𝑗, 𝑡𝑖𝑗) 𝑡𝑖𝑗 𝑖𝑠 𝑑𝑖𝑟𝑒𝑐𝑡𝑙𝑦 𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑒𝑑 𝑓𝑟𝑜𝑚 ℎ𝑖𝑠𝑡𝑜𝑟𝑖𝑐𝑎𝑙 𝑑𝑎𝑡𝑎} 𝑋⃑𝑝𝑟𝑒𝑑𝑖𝑐𝑡 = { 𝑋⃑𝑖𝑗 𝑡𝑖𝑗 𝑖𝑠 𝑒𝑚𝑝𝑡𝑦 }. We train our models (CART and RF) on the training dataset 𝑋⃑𝑡𝑟𝑎𝑖𝑛 to approximate the decision function 𝑓, which end up with two regressors: 𝑓𝐶𝐴𝑅𝑇 and 𝑓𝑅𝐹. Then we apply the two regressors to 𝑋⃑𝑝𝑟𝑒𝑑𝑖𝑐𝑡 and completes the inference of transition matrix 𝑇. Figure9 shows our estimated 𝑇 predicted by Random Forest (with 100 trees and maximal depth of 4 to avoid over-fitting): 12 Figure9: 𝑇 predicted by Random Forest In our work, we use scikit-learn [10], a popular open sourced implementation of many machine learning algorithms in Python programming language community, to apply RF and CART efficiently. 4.4 Result Analysis We calculate the residual for both 𝑓𝐶𝐴𝑅𝑇 and 𝑓𝑅𝐹 on the training dataset respectively by: ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ = { 𝜀𝑖𝑗 = (𝑡𝑖𝑗 − 𝑓(𝑋⃑𝑖𝑗) ) (𝑋⃑𝑖𝑗, 𝜀𝑖𝑗) ∈ 𝑋⃑𝑡𝑟𝑎𝑖𝑛}. 𝑅𝑒𝑠𝑖𝑑𝑢𝑎𝑙 Now we analyze the following two questions: 1) Can we estimate the generalization abilities for the two models? 2) Does the residual subjects to the normal distribution? The former question handles the tradeoff between bias and variance [8], which is a tricky problem in the Machine Learning research community. The latter one is an examination of our statistical assumption that: 𝑡𝑖𝑗 = 𝑓(𝑥𝑖𝑗 (𝑛)) + 𝜀𝑖𝑗 , ∀(𝑖, 𝑗) ∈ 𝐿 × 𝐿 (1), 𝑥𝑖𝑗 (2), . . . , 𝑥𝑖𝑗 13 where: ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ We draw the histograms of 𝑅𝑒𝑠𝑖𝑑𝑢𝑎𝑙 ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ 𝑅𝐹 and 𝑅𝑒𝑠𝑖𝑑𝑢𝑎𝑙 𝐶𝐴𝑅𝑇 below: 𝜀𝑖𝑗~𝑁(0, 𝜎2) Figure10: Histograms of residuals for RF and CART We can directly see from the above figure that the residuals for RF roughly subject to the normal distribution while the residuals for CART are almost 0, which means that CART over-fits the dataset and loses the ability of generalization. The RF conquers the problem of over-fitting by its clever designs of Random mechanism and Ensemble mechanism. ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ To further exam the normality of 𝑅𝑒𝑠𝑖𝑑𝑢𝑎𝑙 residual vector of RF and the 𝑝 − 𝑣𝑎𝑙𝑢𝑒 turns out to be 0.23942, which is above the significance ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ level 5%. Thus, we accept hypothesis 𝐻0 that 𝑅𝑒𝑠𝑖𝑑𝑢𝑎𝑙 the validity of our model. 𝑅𝐹, we apply the Shapiro-Wilk test [9] to the 𝑅𝐹 is normally distributed, which exams Simulation Results 5 Section 1 to Section 4 describe specifically our methodology for modelling the distribution of various languages over time dimension and over geography dimension. To summarize, we use Random Forest Machine Learning technique to estimate the parameters (transition matrix 𝑇) involved in our system, and then run the proposed Batch Markov Monte Carlo Simulation with Migration(BMMCSM) algorithm to simulate the dynamics of language as time develops. Our simulation result shows that the numerical and geographical distribution of different languages will change in an insightful way in the future, which will be demonstrated in the following sub-sections. 5.1 Numerical Distribution In the next fifty years, the distribution of different language speakers will change notably in several aspects including the total speakers number, first language speakers number and second 14 language speakers number based on our numerical simulation. Figure11 shows the future change of distribution of total language speakers (including first, second, and third speakers etc.). (For Figure 11,13, and 14. From left to right are: Chinese, English, Hindi, Spanish, Arabic, Malay, Russian, Bengali, Portuguese, French, Hausa, Japanese, German, Persian, Swahili, Javanese, Korean, Turkish, Vietnamese, Italian) Figure11: Change of total language speakers in the next fifty years Figure12: Change of Language Ranking 15 As for total speaker numbers, Figure 11 and Figure 12 clearly shows the Language Ranking change in the next 50 years. Compared with initial top 10 most used language, the rank changes while the components stay relative stable. English becomes the most common used language in the word which may reveal the further progress of globalization with aspects of electronic communication and social media. The rank change of Chinese and Hindi are mainly due to the population pattern. Moreover, German takes place of Russian to be one of the top 10. It may be explained that Germany may embrace high- speed development period after the Brexit. Figure13: Change of first language speakers in the next fifty years As for first language speaker, Hindi ranks the first while Chinese drops to the second place. It meets the future population trend. According to the world population pattern, China will reach its population peak in next 10 years and then decline. Meanwhile, India will exceed China with a continuously population growth. Figure14: Change of second language speakers in the next fifty years As for second language, English remains to be the most popular choice since English is regarded as an official language in transnational communication. The rise of other language second speakers also indicates that much more people would like to acquire a second language and their choices are diversified. 16 5.2 Geographic Distribution With the help of Batch Markov Monte Carlo Simulation with Migration algorithm, we can further study the geographic distribution of languages when take human migration into consideration. Figure15: Change of geographic language distribution The two figures above demonstrate the geographic distribution of languages before or after the migration. The value in the 𝑖𝑡ℎ row and 𝑗𝑡ℎ column of the matrix means the percentage of 𝑗 language speakers of total speakers living in language zone 𝑖. The color intensity of the 𝑖𝑡ℎ row and 𝑗𝑡ℎ column of the matrix shows the percent of how many people in this area (language zone 𝑖) can speak language 𝑗 . So, as we can see from the left part of figure15, for any 𝑗, the speaker of 𝑗 centralizes on the diagonal line of the matrix, i.e. language zone 𝑗. But in the right part of figure15, we can see the distribution becomes sparse, which implies the migration of people advances the cultural collision and spread their native languages. To be specific, as there is a lot of people flooded into the English language zone, this district reveals high language diversity. Languages in Europe tend to assimilate each other and enlarge the speakers of each language. Some languages spread to different countries of the world while they might be spoken only within a small region previously. 17 Reference [1] Sheldon M. Ross. Stochastic Process (Second Edition). [2] Dimitri P. Bertsekas, John N. Tsitsiklis. Introduction to Probability (Second Edition). [3] https://en.wikipedia.org/wiki/List_of_languages_by_total_number_of_speakers [4] https://en.wikipedia.org/wiki/World_population [5] Breiman, Leo, Friedman, J. H., Olshen, R. A. Stone, C. J. (1984). Classification and regression trees. Monterey, CA: Wadsworth & Brooks/Cole Advanced Books & Software. [6] Ho, Tin Kam (1995). Random Decision Forests (PDF). Proceedings of the 3rd International Conference on Document Analysis and Recognition, Montreal, QC, 14–16 August 1995. pp. 278–282. [7] https://mapr.com/blog/predicting-loan-credit-risk-using-apache-spark-machine-learning- random-forests/ [8] Trevor Hastie, Robert Tibshirani. The Elements of Statistical Learning (Second Edition). [9] Michael H. Kutner, John Neter. Applied Linear Statistical Model (Fifth Edition). [10] http://scikit-learn.org/stable/ [11] Carla. Contemori, Giuli. Dussias (2006), Referential choice in a second language, Second Language Research, 22(3):339-368. [12] https://en.wikipedia.org/wiki/Comparison_of_Japanese_and_Korean [13] https://data.worldbank.org.cn/indicator/BM.KLT.DINV.WD.GD.ZS [14] https://data.worldbank.org.cn/indicator/NY.GDP.MKTP.CD [15] http://s.askci.com/ [16] https://softpower30.com [17] http://www.un.org/en/development/desa/population/migration/data/estimates2/estimates17 [18] https://en.m.wikipedia.org/wiki/List_of_languages_by_total_number_of_speakers [19] https://ourworldindata.org/world-population-growth 18 19 s r a e y 0 5 t x e n n i d n e r t n o i t a u p o P l : 1 x i d n e p p A k c o t s t n a r g m m i I : 2 x i d n e p p A 2 L d n a 1 L f o n o i t u b i r t s i D l a n g i r i O : 4 x i d n e p p A r e w o p t f o S : 3 x i d n e p p A n o i t a c i f i s s a c y l l i m a f e g a u g n a L : 5 x i d n e p p A s e n o z e g a u g n a l n e e w t e b t r o p x E : 6 x i d n e p p A t n e m t s e v n I t c e r i i D n g e r o F : 7 x i d n e p p A
1805.06201
1
1805
2018-05-16T09:10:21
Contextual Augmentation: Data Augmentation by Words with Paradigmatic Relations
[ "cs.CL", "cs.LG" ]
We propose a novel data augmentation for labeled sentences called contextual augmentation. We assume an invariance that sentences are natural even if the words in the sentences are replaced with other words with paradigmatic relations. We stochastically replace words with other words that are predicted by a bi-directional language model at the word positions. Words predicted according to a context are numerous but appropriate for the augmentation of the original words. Furthermore, we retrofit a language model with a label-conditional architecture, which allows the model to augment sentences without breaking the label-compatibility. Through the experiments for six various different text classification tasks, we demonstrate that the proposed method improves classifiers based on the convolutional or recurrent neural networks.
cs.CL
cs
Data Augmentation by Words with Paradigmatic Relations Contextual Augmentation: Sosuke Kobayashi Preferred Networks, Inc. [email protected] 8 1 0 2 y a M 6 1 ] L C . s c [ 1 v 1 0 2 6 0 . 5 0 8 1 : v i X r a Abstract We propose a novel data augmentation for labeled sentences called contextual augmen- tation. We assume an invariance that sen- tences are natural even if the words in the sentences are replaced with other words with paradigmatic relations. We stochastically re- place words with other words that are pre- dicted by a bi-directional language model at the word positions. Words predicted accord- ing to a context are numerous but appropri- ate for the augmentation of the original words. Furthermore, we retrofit a language model with a label-conditional architecture, which al- lows the model to augment sentences without breaking the label-compatibility. Through the experiments for six various different text clas- sification tasks, we demonstrate that the pro- posed method improves classifiers based on the convolutional or recurrent neural networks. 1 Introduction Neural network-based models for NLP have been growing with state-of-the-art results in various tasks, e.g., dependency parsing (Dyer et al., 2015), text classification (Socher et al., 2013; Kim, 2014), machine translation (Sutskever et al., 2014). How- ever, machine learning models often overfit the training data by losing their generalization. Gener- alization performance highly depends on the size and quality of the training data and regulariza- tions. Preparing a large annotated dataset is very time-consuming. Instead, automatic data augmen- tation is popular, particularly in the areas of vi- sion (Simard et al., 1998; Krizhevsky et al., 2012; Szegedy et al., 2015) and speech (Jaitly and Hin- ton, 2015; Ko et al., 2015). Data augmentation is basically performed based on human knowledge on invariances, rules, or heuristics, e.g., "even if a picture is flipped, the class of an object should be unchanged". Figure 1: Contextual augmentation with a bi- directional RNN language model, when a sentence "the actors are fantastic" is augmented by replacing only actors with words predicted based on the context. However, usage of data augmentation for NLP has been limited. In natural languages, it is very difficult to obtain universal rules for transforma- tions which assure the quality of the produced data and are easy to apply automatically in various do- mains. A common approach for such a transfor- mation is to replace words with their synonyms se- lected from a handcrafted ontology such as Word- Net (Miller, 1995; Zhang et al., 2015) or word sim- ilarity calculation (Wang and Yang, 2015). Be- cause words having exactly or nearly the same meanings are very few, synonym-based augmen- tation can be applied to only a small percentage of the vocabulary. Other augmentation methods are known but are often developed for specific do- mains with handcrafted rules or pipelines, with the loss of generality. In this paper, we propose a novel data aug- arethefantasticactorspositiveperformancesfilmsmoviesstories…the performances are fantasticthe films are fantasticthe movies are fantasticthe stories are fantastic…positivethe actors are fantasticpositive mentation method called contextual augmenta- tion. Our method offers a wider range of sub- stitute words by using words predicted by a bi- directional language model (LM) according to the context, as shown in Figure 1. This contextual pre- diction suggests various words that have paradig- matic relations (Saussure and Riedlinger, 1916) with the original words. Such words can also be good substitutes for augmentation. Furthermore, to prevent word replacement that is incompatible with the annotated labels of the original sentences, we retrofit the LM with a label-conditional archi- tecture. Through the experiment, we demonstrate that the proposed conditional LM produces good words for augmentation, and contextual augmen- tation improves classifiers using recurrent or con- volutional neural networks (RNN or CNN) in var- ious classification tasks. 2 Proposed Method For performing data augmentation by replac- ing words in a text with other words, prior works (Zhang et al., 2015; Wang and Yang, 2015) used synonyms as substitute words for the origi- nal words. However, synonyms are very limited and the synonym-based augmentation cannot pro- duce numerous different patterns from the origi- nal texts. We propose contextual augmentation, a novel method to augment words with more varied words. Instead of the synonyms, we use words that are predicted by a LM given the context surround- ing the original words to be augmented, as shown in Figure 1. 2.1 Motivation First, we explain the motivation of our pro- posed method by referring to an example with a sentence from the Stanford Sentiment Treebank (SST) (Socher et al., 2013), which is a dataset of sentiment-labeled movie reviews. The sentence, "the actors are fantastic.", is annotated with a pos- itive label. When augmentation is performed for the word (position) "actors", how widely can we augment it? According to the prior works, we can use words from a synset for the word actor ob- tained from WordNet (histrion, player, thespian, and role player). The synset contains words that have meanings similar to the word actor on aver- age.1 However, for data augmentation, the word 1 Actually, the word actor has another synset containing other words such as doer and worker. Thus, this synonym- actors can be further replaced with non-synonym words such as characters, movies, stories, and songs or various other nouns, while retaining the positive sentiment and naturalness. Considering the generalization, training with maximum pat- terns will boost the model performance more. We propose using numerous words that have the paradigmatic relations with the original words. A LM has the desirable property to assign high prob- abilities to such words, even if the words them- selves are not similar to the original word to be replaced. 2.2 Word Prediction based on Context For our proposed method, we requires a LM for calculating the word probability at a position i based on its context. The context is a sequence of words surrounding an original word wi in a sen- tence S, i.e., cloze sentence S\{wi}. The calcu- lated probability is p(·S\{wi}). Specifically, we use a bi-directional LSTM-RNN (Hochreiter and Schmidhuber, 1997) LM. For prediction at posi- tion i, the model encodes the surrounding words individually rightward and leftward (see Figure 1). As well as typical uni-directional RNN LMs, the outputs from adjacent positions are used for cal- culating the probability at target position i. The outputs from both the directions are concatenated and fed into the following feed-forward neural net- work, which produces words with a probability distribution over the vocabulary. In contextual augmentation, new substitutes for word wi can be smoothly sampled from a given probability distribution, p(·S\{wi}), while prior works selected top-K words conclusively. In this study, we sample words for augmentation at each update during the training of a model. To control the strength of augmentation, we introduce tem- perature parameter τ and use an annealed distri- bution pτ (·S\{wi}) ∝ p(·S\{wi})1/τ . If the temperature becomes infinity (τ → ∞), the words are sampled from a uniform distribution. 2 If it becomes zero (τ → 0), the augmentation words are always words predicted with the highest prob- ability. The sampled words can be obtained at one time at each word position in the sentences. We re- place each word simultaneously with a probability based approach further requires word sense disambiguation or some rules for selecting ideal synsets. 2 Bengio et al. (2015) reported that stochastic replace- ments with uniformly sampled words improved a neural encoder-decoder model for image captioning. as well as Wang and Yang (2015) for efficiency. 2.3 Conditional Constraint Finally, we introduce a novel approach to address the issue that context-aware augmentation is not always compatible with annotated labels. For un- derstanding the issue, again, consider the exam- ple, "the actors are fantastic.", which is annotated with a positive label. If contextual augmentation, as described so far, is simply performed for the word (position of) fantastic, a LM often assigns high probabilities to words such as bad or terrible as well as good or entertaining, although they are mutually contradictory to the annotated labels of positive or negative. Thus, such a simple augmen- tation can possibly generate sentences that are im- plausible with respect to their original labels and harmful for model training. To address this issue, we introduce a condi- tional constraint that controls the replacement of words to prevent the generated words from revers- ing the information related to the labels of the sen- tences. We alter a LM to a label-conditional LM, i.e., for position i in sentence S with label y, we aim to calculate pτ (·y, S\{wi}) instead of the de- fault pτ (·S\{wi}) within the model. Specifically, we concatenate each embedded label y with a hid- den layer of the feed-forward network in the bi- directional LM, so that the output is calculated from a mixture of information from both the label and context. 3 Experiment 3.1 Settings We tested combinations of three augmentation methods for two types of neural models through six text classification tasks. The corresponding code is implemented by Chainer (Tokui et al., 2015) and available 3. The benchmark datasets used are as follows: (1, 2) SST is a dataset for sentiment classifica- tion on movie reviews, which were annotated with five or two labels (SST5, SST2) (Socher et al., 2013). (3) Subjectivity dataset (Subj) was anno- tated with whether a sentence was subjective or objective (Pang and Lee, 2004). (4) MPQA is an opinion polarity detection dataset of short phrases rather than sentences (Wiebe et al., 2005). (5) RT is another movie review sentiment dataset (Pang 3https://github.com/pfnet-research/ contextual_augmentation and Lee, 2005). (6) TREC is a dataset for clas- sification of the six question types (e.g., person, location) (Li and Roth, 2002). For a dataset with- out development data, we use 10% of its training set for the validation set as well as Kim (2014). We tested classifiers using the LSTM-RNN or CNN, and both have exhibited good performances. We used typical architectures of classifiers based on the LSTM or CNN with dropout (Hinton et al., 2012) using hyperparameters found in preliminary experiments. 4 The reported accuracies of the models were averaged over eight models trained from different seeds. The tested augmentation methods are: (1) synonym-based augmentation, and (2, 3) con- textual augmentation with or without a label- conditional architecture. The hyperparameters of the augmentation (temperature τ and probability of word replacement) were also selected by a grid- search using validation set, while retaining the hyperparameters of the models. For contextual augmentation, we first pretrained a bi-directional LSTM LM without the label-conditional architec- ture, on WikiText-103 corpus (Merity et al., 2017) from a subset of English Wikipedia articles. After the pretraining, the models are further trained on each labeled dataset with newly introduced label- conditional architectures. 3.2 Results Table 1 lists the accuracies of the models with or without augmentation. The results show that our contextual augmentation improves the model per- formances for various datasets from different do- mains more significantly than the prior synonym- based augmentation does. Furthermore, our label- conditional architecture boosted the performances on average and achieved the best accuracies. Our methods are effective even for datasets with more 4 An RNN-based classifier has a single layer LSTM and word embeddings, whose output is fed into an output affine layer with the softmax function. A CNN-based classifier has convolutional filters of size {3, 4, 5} and word embed- dings (Kim, 2014). The concatenated output of all the fil- ters are applied with a max-pooling over time and fed into a two-layer feed-forward network with ReLU, followed by the softmax function. For both the architectures, training was performed by Adam (Kingma and Ba, 2015) and finished by early stopping with validation at each epoch. The hyperparameters of the models and training were se- lected by a grid-search using baseline models without data augmentation in each task's validation set individually. We used the best settings from the combinations by changing the learning rate, unit or filter size, embedding dimension, and dropout ratio. STT5 STT2 Subj MPQA RT TREC Avg. Models 41.3 79.5 92.4 86.1 75.9 90.0 77.53 CNN 86.3 76.0 89.6 77.50 w/ synonym 40.7 80.0 92.4 w/ context 86.7 75.9 90.0 78.02 41.9 80.9 92.7 86.7 76.1 90.5 78.20 42.1 80.8 93.0 + label 86.0 76.7 89.0 77.43 RNN 40.2 80.3 92.4 w/ synonym 40.5 80.2 92.8 86.4 76.6 87.9 77.40 86.4 77.0 89.3 77.62 40.9 79.3 92.8 w/ context 86.4 77.4 89.2 77.83 + label 41.1 80.1 92.8 Table 1: Accuracies of the models for various bench- marks. The accuracies are averaged over eight models trained from different seeds. than two types of labels, SST5 and TREC. For investigating our label-conditional bi- directional LM, we show in Figure 2 the top-10 word predictions by the model for a sentence from the SST dataset. Each word in the sentence is fre- quently replaced with various words that are not always synonyms. We present two types of pre- dictions depending on the label fed into the con- ditional LM. With a positive label, the word "fan- tastic" is frequently replaced with funny, honest, good, and entertaining, which are also positive ex- pressions. In contrast, with a negative label, the word "fantastic" is frequently replaced with tired, forgettable, bad, and dull, which reflect a negative sentiment. At another position, the word "the" can be replaced with "no" (with the seventh highest probability), so that the whole sentence becomes "no actors are fantastic.", which seems negative as a whole. Aside from such inversions caused by labels, the parts unrelated to the labels (e.g., "ac- tors") are not very different in the positive or neg- ative predictions. These results also demonstrated that conditional architectures are effective. 4 Related Work Some works tried text data augmentation by us- ing synonym lists (Zhang et al., 2015; Wang and Yang, 2015), grammar induction (Jia and Liang, task-specific heuristic rules (Furstenau 2016), and Lapata, 2009; Kafle et al., 2017; Silfver- berg et al., 2017), or neural decoders of au- toencoders (Bergmanis et al., 2017; Xu et al., 2017; Hu et al., 2017) or encoder-decoder mod- els (Kim and Rush, 2016; Sennrich et al., 2016; Xia et al., 2017). The works most similar to our research are Kolomiyets et al. (2011) and Fadaee et al. (2017). In a task of time expression recog- nition, Kolomiyets et al. replaced only the head- words under a task-specific assumption that tem- poral trigger words usually occur as headwords. Figure 2: Words predicted with the ten highest prob- abilities by the conditional bi-directional LM applied to the sentence "the actors are fantastic". The squares above the sentence list the words predicted with a pos- itive label. The squares below list the words predicted with a negative label. They selected substitute words with top-K scores given by the Latent Words LM (Deschacht and Moens, 2009), which is a LM based on fixed- length contexts. Fadaee et al. (2017), focusing on the rare word problem in machine transla- tion, replaced words in a source sentence with only rare words, which both of rightward and left- ward LSTM LMs independently predict with top- K confidences. A word in the translated sentence is also replaced using a word alignment method and a rightward LM. These two works share the idea of the usage of language models with our method. We used a bi-directional LSTM LM which captures variable-length contexts with con- sidering both the directions jointly. More impor- tantly, we proposed a label-conditional architec- ture and demonstrated its effect both qualitatively and quantitatively. Our method is independent of any task-specific knowledge, and effective for classification tasks in various domains. We use a label-conditional fill-in-the-blank con- text for data augmentation. Neural models us- ing the fill-in-the-blank context have been invested in other applications. Kobayashi et al. (2016, 2017) proposed to extract and organize informa- tion about each entity in a discourse using the con- text. Fedus et al. (2018) proposed GAN (Goodfel- low et al., 2014) for text generation and demon- hisotherallitsmostthosesomeboththesethestoriesstoryactorstwoperformancesfilmsmoviesmoviefilmcharacters the actors are fantasticgethaveseemfeelfindbeiswere'rearehilariousyoungcompellingenjoyableengagingfunentertaininggoodhonestfunnypositivethesomethesesuchitsallnohisbothothercharactersmoviefilmplotstoryfilmsthemesmoviesstoriessongs'rearewereseemfeelisbefindgethavetiredn'tforgettablebadgooddullunfunnyflatpretentiousblandnegativehigherprobabilityhigherprobability1098765432112345678910 strated that the mode collapse and training insta- bility can be relieved by in-filling-task training. Melamud et al. (2016) and Peters et al. (2018) re- ported that encoding the context with bidirectional LM was effective for a broad range of NLP tasks. 5 Conclusion We proposed a novel data augmentation using nu- merous words given by a bi-directional LM, and further introduced a label-conditional architecture into the LM. Experimentally, our method pro- duced various words compatibly with the labels of original texts and improved neural classifiers more than the synonym-based augmentation. Our method is independent of any task-specific knowl- edge or rules, and can be generally and easily used for classification tasks in various domains. On the other hand, the improvement by our method is sometimes marginal. Future work will explore comparison and combination with other generalization methods exploiting datasets deeply as well as our method. Acknowledgments I would like to thank the members of Preferred Networks, Inc., especially Takeru Miyato and Yuta Tsuboi, for helpful comments. I would also like to thank anonymous reviewers for helpful comments. References Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. 2015. Scheduled sampling for se- quence prediction with recurrent neural networks. In NIPS, pages 1171–1179. Toms Bergmanis, Katharina Kann, Hinrich Schutze, and Sharon Goldwater. 2017. Training data aug- mentation for low-resource morphological inflec- tion. In CoNLL SIGMORPHON, pages 31–39. Koen Deschacht and Marie-Francine Moens. 2009. Semi-supervised semantic role labeling using the la- tent words language model. In EMNLP, pages 21– 29. Chris Dyer, Miguel Ballesteros, Wang Ling, Austin Matthews, and Noah A. Smith. 2015. Transition- based dependency parsing with stack long short- term memory. In ACL, pages 334–343. Marzieh Fadaee, Arianna Bisazza, and Christof Monz. 2017. Data augmentation for low-resource neural machine translation. In ACL, pages 567–573. William Fedus, Ian Goodfellow, and Andrew M. Dai. 2018. MaskGAN: Better text generation via filling in the . In ICLR. Hagen Furstenau and Mirella Lapata. 2009. Semi- supervised semantic role labeling. In EACL, pages 220–228. Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. 2014. Generative ad- versarial nets. In NIPS, pages 2672–2680. Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhut- dinov. 2012. Improving neural networks by preventing co-adaptation of feature detectors. CoRR, abs/1207.0580. Sepp Hochreiter and Jurgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735–1780. Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P. Xing. 2017. Toward con- In ICML, pages 1587– trolled generation of text. 1596. Navdeep Jaitly and Geoffrey E Hinton. 2015. Vo- cal tract length perturbation (vtlp) improves speech recognition. In ICML. Robin Jia and Percy Liang. 2016. Data recombination for neural semantic parsing. In ACL, pages 12–22. Kushal Kafle, Mohammed Yousefhussien, and Christo- pher Kanan. 2017. Data augmentation for visual question answering. In INLG, pages 198–202. Yoon Kim. 2014. Convolutional neural networks for In EMNLP, pages 1746– sentence classification. 1751. Yoon Kim and Alexander M. Rush. 2016. Sequence- In EMNLP, pages level knowledge distillation. 1317–1327. Diederik Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In ICLR. Tom Ko, Vijayaditya Peddinti, Daniel Povey, and Sanjeev Khudanpur. 2015. Audio augmentation In INTERSPEECH, pages for speech recognition. 3586–3589. Sosuke Kobayashi, Naoaki Okazaki, and Kentaro Inui. 2017. A neural language model for dynamically rep- resenting the meanings of unknown words and enti- ties in a discourse. In IJCNLP, pages 473–483. Sosuke Kobayashi, Ran Tian, Naoaki Okazaki, and Kentaro Inui. 2016. Dynamic entity representation with max-pooling improves machine reading. In NAACL-HLT, pages 850–855. Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Du- mitru Erhan, Vincent Vanhoucke, and Andrew Ra- binovich. 2015. Going deeper with convolutions. In CVPR. Seiya Tokui, Kenta Oono, Shohei Hido, and Justin Clayton. 2015. Chainer: a next-generation open source framework for deep learning. In Proceedings of Workshop on LearningSys in NIPS 28. William Yang Wang and Diyi Yang. 2015. That's so annoying!!!: A lexical and frame-semantic em- bedding based data augmentation approach to au- tomatic categorization of annoying behaviors using #petpeeve tweets. In EMNLP, pages 2557–2563. Janyce Wiebe, Theresa Wilson, and Claire Cardie. 2005. Annotating expressions of opinions and emo- tions in language. Language Resources and Evalu- ation, 39(2):165–210. Yingce Xia, Tao Qin, Wei Chen, Jiang Bian, Nenghai Yu, and Tie-Yan Liu. 2017. Dual supervised learn- ing. In ICML, pages 3789–3798. Weidi Xu, Haoze Sun, Chao Deng, and Ying Tan. 2017. Variational autoencoder for semi-supervised text classification. In AAAI, pages 3358–3364. Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text clas- sification. In NIPS, pages 649–657. Oleksandr Kolomiyets, Steven Bethard, and Marie- Francine Moens. 2011. Model-portability experi- ments for textual temporal analysis. In ACL, pages 271–276. Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hin- Imagenet classification with deep con- In NIPS, pages 1097– ton. 2012. volutional neural networks. 1105. Xin Li and Dan Roth. 2002. Learning question classi- fiers. In COLING, pages 1–7. Oren Melamud, Jacob Goldberger, and Ido Dagan. 2016. context2vec: Learning generic context em- In CoNLL, pages bedding with bidirectional lstm. 51–61. Stephen Merity, Caiming Xiong, James Bradbury, and Pointer sentinel mixture Richard Socher. 2017. models. In ICLR. George A. Miller. 1995. Wordnet: A lexical database for english. Commun. ACM, 38(11):39–41. Bo Pang and Lillian Lee. 2004. A sentimental educa- tion: Sentiment analysis using subjectivity summa- rization based on minimum cuts. In ACL. Bo Pang and Lillian Lee. 2005. Seeing stars: Exploit- ing class relationships for sentiment categorization In ACL, pages 115– with respect to rating scales. 124. Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word rep- resentations. In NAACL-HLT. Charles Bally Albert Sechehaye Saussure, Ferdi- nand de and Albert Riedlinger. 1916. Cours de lin- guistique generale. Lausanne: Payot. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Improving neural machine translation models with monolingual data. In ACL, pages 86–96. Miikka Silfverberg, Adam Wiemerslage, Ling Liu, and Lingshuang Jack Mao. 2017. Data augmentation for morphological reinflection. In CoNLL SIGMOR- PHON, pages 90–99. Patrice Y. Simard, Yann A. LeCun, John S. Denker, and Bernard Victorri. 1998. Transformation Invariance in Pattern Recognition - Tangent Distance and Tan- gent Propagation. Springer Berlin Heidelberg. Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment tree- bank. In EMNLP, pages 1631–1642. Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural net- works. In NIPS, pages 3104–3112.
1901.10746
1
1901
2019-01-30T10:21:04
Reference-less Quality Estimation of Text Simplification Systems
[ "cs.CL" ]
The evaluation of text simplification (TS) systems remains an open challenge. As the task has common points with machine translation (MT), TS is often evaluated using MT metrics such as BLEU. However, such metrics require high quality reference data, which is rarely available for TS. TS has the advantage over MT of being a monolingual task, which allows for direct comparisons to be made between the simplified text and its original version. In this paper, we compare multiple approaches to reference-less quality estimation of sentence-level text simplification systems, based on the dataset used for the QATS 2016 shared task. We distinguish three different dimensions: gram-maticality, meaning preservation and simplicity. We show that n-gram-based MT metrics such as BLEU and METEOR correlate the most with human judgment of grammaticality and meaning preservation, whereas simplicity is best evaluated by basic length-based metrics.
cs.CL
cs
Reference-less Quality Estimation of Text Simplification Systems Louis Martin Facebook AI Research & Inria [email protected] Samuel Humeau Facebook AI Research [email protected] Pierre-Emmanuel Mazar´e Facebook AI Research [email protected] Antoine Bordes Facebook AI Research [email protected] ´Eric de La Clergerie Inria eric.de la [email protected] [email protected] Benoıt Sagot Inria 9 1 0 2 n a J 0 3 ] L C . s c [ 1 v 6 4 7 0 1 . 1 0 9 1 : v i X r a Abstract The evaluation of text simplification (TS) systems remains an open challenge. As the task has common points with machine translation (MT), TS is often evaluated using MT metrics such as BLEU. How- ever, such metrics require high quality ref- erence data, which is rarely available for TS. TS has the advantage over MT of be- ing a monolingual task, which allows for direct comparisons to be made between the simplified text and its original ver- sion. In this paper, we compare multiple approaches to reference-less quality esti- mation of sentence-level text simplifica- tion systems, based on the dataset used for the QATS 2016 shared task. We dis- tinguish three different dimensions: gram- maticality, meaning preservation and sim- plicity. We show that n-gram-based MT metrics such as BLEU and METEOR cor- relate the most with human judgment of grammaticality and meaning preservation, whereas simplicity is best evaluated by ba- sic length-based metrics. Introduction 1 Text simplification (hereafter TS) has received in- creasing interest by the scientific community in recent years. It aims at producing a simpler ver- sion of a source text that is both easier to read and to understand, thus improving the accessibil- ity of text for people suffering from a range of dis- abilities such as aphasia (Carroll et al., 1998) or dyslexia (Rello et al., 2013), as well as for sec- ond language learners (Xia et al., 2016) and peo- ple with low literacy (Watanabe et al., 2009). This topic has been researched for a variety of lan- guages such as English (Zhu et al., 2010; Wubben et al., 2012; Narayan and Gardent, 2014; Xu et al., 2015), French (Brouwers et al., 2014), Spanish (Saggion et al., 2011), Portuguese (Specia, 2010), Italian (Brunato et al., 2015) and Japanese (Goto et al., 2015).1 One of the main challenges in TS is finding an adequate automatic evaluation metric, which is necessary to avoid the time-consuming human evaluation. Any TS evaluation metric should take into account three properties expected from the output of a TS system, namely: • Grammaticality: how grammatically correct is the TS system output? • Meaning preservation: how well is the mean- ing of the source sentence preserved in the TS system output? • Simplicity: how simple is the TS system out- put?2 TS is often reduced to a sentence-level problem, whereby one sentence is transformed into a sim- pler version containing one or more sentences. In this paper, we shall make use of the terms source (sentence) and (TS system) output to respectively denote a sentence given as an input to a TS system and the simplified, single or multi-sentence output produced by the system. TS, seen as a sentence-level problem, is of- ten viewed as a monolingual variant of (sentence- level) MT. The standard approach to automatic TS evaluation is therefore to view the task as a transla- tion problem and to use machine translation (MT) 1Note that text simplification has also been used as a pre- processing step for other natural language processing tasks such as machine translation (Chandrasekar et al., 1996) and semantic role labelling (Vickrey and Koller, 2008). 2There is no unique way to define the notion of simplicity in this context. Previous works often rely on the intuition of human annotators to evaluate the level of simplicity of a TS system output. evaluation metrics such as BLEU (Papineni et al., 2002). However, MT evaluation metrics rely on the existence of parallel corpora of source sen- tences and manually produced reference transla- tions, which are available on a large scale for many language pairs (Tiedemann, 2012). TS datasets are less numerous and smaller. Moreover, they are of- ten automatically extracted from comparable cor- pora rather than strictly parallel corpora, which results in noisier reference data. For example, the PWKP dataset (Zhu et al., 2010) consists of 100,000 sentences from the English Wikipedia au- tomatically aligned with sentences from the Sim- ple English Wikipedia based on term-based sim- ilarity metrics. It has been shown by Xu et al. (2015) that many of PWKP's "simplified" sen- tences are in fact not simpler or even not related to their corresponding source sentence. Even if bet- ter quality corpora such as Newsela do exist (Xu et al., 2015), they are costly to create, often of lim- ited size, and not necessarily open-access. This creates a challenge for the use of reference- based MT metrics for TS evaluation. However, TS has the advantage of being a monolingual translation-like task, the source being in the same language as the output. This allows for new, non- conventional ways to use MT evaluation metrics, namely by using them to compare the output of a TS system with the source sentence, thus avoid- ing the need for reference data. However, such an evaluation method can only capture at most two of the three above-mentioned dimensions, namely meaning preservation and, to a lesser extent, gram- maticality. Previous works on reference-less TS evaluation include Stajner et al. (2014), who compare the be- haviour of six different MT metrics when used between the source sentence and the correspond- ing simplified output. They evaluate these metrics with respect to meaning preservation and gram- maticality. We extend their work in two direc- tions. Firstly, we extend the comparison to in- clude the degree of simplicity achieved by the sys- tem. Secondly, we compare additional features, including those used by Stajner et al. (2016a), both individually, as elementary metrics, and within multi-feature metrics. To our knowledge, no pre- vious work has provided as thorough a compari- son across such a wide range and combination of features for the reference-less evaluation of TS. First we review available text simplification evaluation methods and traditional quality estima- tion features. We then present the QATS shared task and the associated dataset, which we use for our experiments. Finally we compare all methods in a reference-less setting and analyze the results. 2 Existing evaluation methods 2.1 Using MT metrics to compare the output and a reference TS can be considered as a monolingual transla- tion task. As a result, MT metrics such as BLEU (Papineni et al., 2002), which compare the output of an MT system to a reference translation, have been extensively used for TS (Narayan and Gar- dent, 2014; Stajner et al., 2015; Xu et al., 2016). Other successful MT metrics include TER (Snover et al., 2009), ROUGE (Lin, 2004) and METEOR (Banerjee and Lavie, 2005), but they have not gained much traction in the TS literature. These metrics rely on good quality references, something which is often not available in TS, as discussed by Xu et al. (2015). Moreover, Stajner et al. (2015) and Sulem et al. (2018a) showed that using BLEU to compare the system output with a reference is not a good way to perform TS evalua- tion, even when good quality references are avail- able. This is especially true when the TS sys- tem produces more than one sentence for a single source sentence. 2.2 Using MT metrics to compare the output and the source sentence As mentioned in the Introduction, the fact that TS is a monolingual task means that MT metrics can also be used to compare a system output with its corresponding source sentence, thus avoiding the need for reference data. Following this idea, Stajner et al. (2014) found encouraging correla- tions between 6 widely used MT metrics and hu- man assessments of grammaticality and meaning preservation. However MT metrics are not rele- vant for the evaluation of simplicity, which is why they did not take this dimension into account. Xu et al. (2016) also explored the idea of compar- ing the TS system output with its corresponding source sentence, but their metric, SARI, also re- quires to compare the output with a reference. In fact, this metric is designed to take advantage of more than one reference. It can be applied when only one reference is available for each source sen- tence, but its results are better when multiple ref- erences are available. Attempts to perform Quality Estimation on the output of TS systems, without using references, include the 2016 Quality Assessment for Text Simplification (QATS) shared task (Stajner et al., 2016b), to which we shall come back in section 3. Sulem et al. (2018b) introduce another approach, named SAMSA. The idea is to evaluate the struc- tural simplicity of a TS system output given the corresponding source sentence. SAMSA is max- imized when the simplified text is a sequence of short and simple sentences, each accounting for one semantic event in the original sentence. It re- lies on an in-depth analysis of the source sentence and the corresponding output, based on a semantic parser and a word aligner. A drawback of this ap- proach is that good quality semantic parsers are only available for a handful of languages. The intuition that sentence splitting is an important sub-task for producing simplified text motivated Narayan et al. (2017) to organize the Split and Rephrase shared task, which was dedicated to this problem. 2.3 Other metrics One can also estimate the quality of a TS system output based on simple features extracted from it. For instance, the QUEST framework for qual- ity estimation in MT gives a number of useful baseline features for evaluating an output sentence (Specia et al., 2013). These features range from simple statistics, such as the number of words in the sentence, to more sophisticated features, such as the probability of the sentence according to a language model. Several teams who par- ticipated in the QATS shared task used metrics based on this framework, namely SMH (Stajner et al., 2016a), UoLGP (Rios and Sharoff, 2015) and UoW (B´echara et al., 2015). Readability metrics such as Flesch-Kincaid Grade Level (FKGL) and Flesch Reading Ease (FRE) (Kincaid et al., 1975) have been extensively used for evaluating simplicity. These two metrics, which were shown experimentally to give good results, are linear combinations of the number of words per sentence and the number of syllables per word, using carefully adjusted weights. 3 Methodology Our goal is to compare a large number of ways to perform TS evaluation without a reference. To Figure 1: Label repartition on the QATS Shared task this end, we use the dataset provided in the QATS shared task. We first compare the behaviour of elementary metrics, which range from commonly used metrics such as BLEU to basic metrics based on a single low-level feature such as sentence length. We then compare the effect of aggregating these elementary metrics into more complex ones and compare our results with the state of the art, based on the QATS shared task data and results. 3.1 The QATS shared task The data from the QATS shared task (Stajner et al., 2016b) consists of a collection of 631 pairs of en- glish sentences composed of a source sentence ex- tracted from an online corpus and a simplified ver- sion thereof, which can contain one or more sen- tences. This collection is split into a training set (505 sentence pairs) and a test set (126 sentence pairs). Simplified versions were produced auto- matically using one of several TS systems trained by the shared task organizers. Human annotators labelled each sentence pair using one of the three labels Good, OK and Bad on each of the three dimensions: grammaticality, meaning preserva- tion and simplicity3. An overall quality label was then automatically assigned to each sentence pair based on its three manually assigned labels using a method detailed in (Stajner et al., 2016b). Dis- tribution of the labels and examples are presented in FIGURE 1 and TABLE 1. The goal of the shared task is, for each sentence in the test set, to either produce a label (Good, OK, 3We were not able to find detailed information about the annotation process. In particular, we do not know whether each sentence was annotated only once or whether multiple annotations were produced, followed by an adjudication step. Version Sentence Original All three were arrested in the Toome area and have been taken to the Serious Crime Suite at Antrim police station. All three were arrested in the Toome area. All three have been taken to the Serious Crime Suite at Antrim police station. Simple Original Simple Original Simple Original Simple For years the former Bosnia Serb army commander Ratko Mladic had evaded capture and was one of the worlds most wanted men, but his time on the run finally ended last year when he was arrested near Belgrade. For years the former Bosnia Serb army commander Ratko Mladic had evaded capture. Madrid was occupied by French troops during the Napoleonic Wars, and Napoleons brother Joseph was installed on the throne. Madrid was occupied by French troops during the Napoleonic Wars, and Napoleons brother Joseph was put on the throne. Keeping articles with potential encourages editors, especially unregistered users, to be bold and improve the article to allow it to evolve over time. Keeping articles with potential editors, especially unregistered users, to be bold and improve the article to allow it to evolve over time. Aspect M S O G Modification good good good good syntactic good bad ok bad content reduction good good good good lexical bad bad ok bad dropping Table 1: Examples from the training dataset of QATS. Differences between the original and the simplified version are presented in bold. This table is adapted from Stajner et al. (2016b). Bad) or a raw score estimating the overall quality of the simplification for each of the three dimen- sions. Raw score predictions are evaluated using the Pearson correlation with the ground truth la- bels, while actual label prediction are evaluated using the weighted F1-score. The shared task is described in further details on the QATS website4. 3.2 Features In our experiments, we compared about 60 ele- mentary metrics, which can be organised as fol- lows: • MT metrics -- BLEU, ROUGE, METEOR, TERp -- Variants of BLEU: BLEU 1gram, BLEU 3gram, BLEU 2gram, BLEU 4gram and seven smoothing methods5 from NLTK (Bird and Loper, 2004). -- Intermediate components of TERp in- spired by (Stajner et al., 2016a): e.g. number of insertions, deletions, shifts... 4http://qats2016.github.io/shared.html 5https://www.nltk.org/api/nltk. translate.html#nltk.translate.bleu_ score.SmoothingFunction • Readability metrics and other sentence-level features: FKGL and FRE, numbers of words, characters, syllables... • Metrics based on the baseline QUEST fea- tures (17 features) (Specia et al., 2013), such as statistics on the number of words, word lengths, language model probability and n- gram frequency. • Metrics based on other features: frequency table position, concreteness as extracted from Brysbaert et al.'s 2014 list, language model probability of words using a convolutional sequence to sequence model from (Gehring et al., 2017), comparison methods using pre- trained fastText word embeddings (Mikolov et al., 2018) or Skip-thought sentence embed- dings (Kiros et al., 2015). TABLE 2 lists 30 of the elementary metrics that we compared, which are those that we found to correlate the most with human judgments on one or more of the three dimensions (grammaticality, meaning preservation, simplicity). 3.3 Experimental setup Evaluation of elementary metrics We rank all features by comparing their behaviour with human judgments on the training set. We first compute for each elementary metric the Pearson correlation be- tween its results and the manually assigned labels for each of the three dimensions. We then rank our elementary metrics according to the absolute value of the Pearson correlation.6 Training and evaluation of a combined met- ric We use our elementary metrics as features to train classifiers on the training set, and evalu- ate their performance on the test set. We therefore scale them and reduce the dimensionality with a 25-component PCA7, then train several regression algorithms8 and classification algorithms9 using scikit-learn (Pedregosa et al., 2011). For each di- mension, we keep the two models performing best on the test set and add them in the leaderboard of the QATS shared task (TABLE 4), naming them with the name of the regression algorithm they were built with. 4 Results 4.1 Comparing elementary metrics FIGURE 3 ranks all elementary metrics given their absolute Pearson correlation on each of the three dimensions. Grammaticality N-gram based MT metrics have the highest correlation with human grammat- icality judgments. METEOR seems to be the best, probably because of its robustness to synonymy, followed by smoothed BLEU (BLEUSmoothed in 2). This indicates that relevant grammaticality information can be derived from the source sen- tence. We were expecting that information con- tained in a language model would help achieving better results (AvgLMProbsOutput), but MT met- rics correlate better with human judgments. We deduce that the grammaticality information con- tained in the source is more specific and more helpful for evaluation than what is learned by the language model. 6The code is available on Github at https: //github.com/facebookresearch/ text-simplification-evaluation 7We used PCA instead of feature selection because it per- formed better on the validation set. The number of compo- nent was tuned on the validation set as well. 8Regressors: Linear regression, Lasso, Ridge, Linear SVR (SVM regressor), Adaboost regressor, Gradient boost- ing regressor and Random forest regressor. 9Classifiers: Logistic regression, MLP classifier (with L2 penalty, alpha=1), SVC (linear SVM classifier), K- nearsest neighbors classifier (k=3), Adaboost classifier, Gra- dient boosting classifier and Random forest classifier. Meaning preservation It is not surprising that meaning preservation is best evaluated using MT metrics that compare the source sentence to the output sentence, with in particular smoothed BLEU, BLEU 3gram and METEOR. Very simple features such as the percentage of words in com- mon between source and output also rank high. Surprisingly, word embedding comparison meth- ods do not perform as well for meaning preserva- tion, even when using word alignment. Simplicity Methods that give the best results are the most straightforward for assessing simplicity, namely word, character and syllable counts in the output, averaged over the number of output sen- tences. These simple features even outperform the traditional, more complex metrics FKGL and FRE. As could be expected, we find that met- rics with the highest correlation to human simplic- ity judgments only take the output into account. Exceptions are the NBSourceWords and NBSour- cePunct features. Indeed, if the source sentence has a lot of words and punctuation, and is therefore likely to be particularly complex, then the output will most likely be less simple as well. We also ex- pected word concreteness ratings and position in the frequency table to be good indicators of sim- plicity, but it does not seem to be the case here. Structural simplicity might simply be more impor- tant than such more sophisticated components of the human intuition of simple text. Discussion Even if counting the number of words or comparing n-grams are good proxies for the simplification quality, they are still very su- perficial features and might miss some deeper and more complex information. Moreover the fact that grammaticality and meaning preservation are best evaluated using n-gram-based comparison metrics might bias the TS models towards copying the source sentence and applying fewer modifications. Syntactic parsing or language modelling might capture more insightful grammatical information and allow for more flexibility in the simplification model. Regarding meaning preservation, seman- tic analysis or paraphrase detection models would also be good candidates for a deeper analysis. Warning note We should be careful when inter- preting these results as the QATS dataset is rel- atively small. We compute confidence intervals on our results, and find them to be non-negligible, yet without putting our general observations into Description Number of punctuation tokens in source (QUEST) Number of source words (QUEST) Number of punctuation tokens in output (QUEST) Type token ratio (QUEST) Number of deletions (TERp component) Number of total errors (TERp component) Number of substitutions (TERp component) TERp MT metric BLEU MT metric with unigrams only BLEU MT metric up to bigrams BLEU MT metric up to trigrams BLEU MT metric up to 4-grams METEOR MT metric ROUGE summarization metric BLEU MT metric with smoothing (method 7 from nltk) Cosine similarity between source and output pre-trained word embeddings Number of characters in the output Average number of characters per sentence in the output Number of syllables in the output Short name NBSourcePunct NBSourceWords NBOutputPunct TypeTokenRatio TERp Del TERp NumEr TERp Sub TERp BLEU 1gram BLEU 2gram BLEU 3gram BLEU 4gram METEOR ROUGE BLEUSmoothed AvgCosineSim NBOutputChars NBOutputCharsPerSent NBOutputSyllables NBOutputSyllablesPerSent Average number of syllables per sentence in the output NBOutputWords NBOutputWordsPerSent AvgLMProbsOutput MinLMProbsOutput MaxPosInFreqTable AvgConcreteness OutputFKGL OutputFRE WordsInCommon Number of words in the output Average number of words per sentence in the output Average log-probabilities of output words (Language Model) Minimum log-probability of output words (Language Model) Maximum position of output words in the frequency table Average word concreteness Brysbaert et al.'s 2014 concreteness list Flesch-Kincaid Grade Level Flesch Reading Ease Percentage of words in common between source and Output Table 2: Brief description of 30 of our most relevant elementary metrics Grammaticality Short name Best QATS team METEOR BLEUSmoothed BLEU 4gram BLEU 3gram TERp NumEr BLEU 2gram TERp ROUGE AvgLMProbsOutput BLEU 1gram WordsInCommon TERp Del NBSourceWords AvgCosineSim MinLMProbsOutput Train ↓ 0.36 0.33 0.32 0.31 -0.30 0.30 -0.30 0.29 0.28 0.27 0.27 -0.27 -0.25 0.23 0.11 BLEU 2gram BLEU 4gram Meaning Preservation Short name Best QATS team BLEUSmoothed BLEU 3gram Test 0.48 0.39 0.34 0.34 METEOR 0.34 -0.31 0.34 WordsInCommon -0.32 0.29 0.34 0.33 0.30 -0.35 AvgCosineSim -0.07 AvgLMProbsOutput 0.25 AvgConcreteness -0.07 NBSourceWords BLEU 1gram ROUGE TERp TERp NumEr TERp Del Train ↓ 0.59 0.57 0.57 0.57 0.57 0.55 0.55 0.55 -0.54 -0.53 -0.50 0.44 0.39 -0.28 -0.28 Simplicity Short name Best QATS team Test 0.59 0.52 NBOutputCharsPerSent 0.52 NBOutputSyllablesPerSent 0.58 NBOutputWordsPerSent 0.52 NBOutputChars 0.51 NBOutputWords 0.50 NBOutputSyllables 0.52 NBOutputPunt 0.47 NBSourceWords -0.48 -0.49 NBSourcePunct -0.52 TypeTokenRatio 0.34 AvgConcreteness 0.36 MaxPosInFreqTable -0.06 MinLMProbsOutput -0.13 OutputFRE outputFKGL Train ↓ -0.52 -0.52 -0.51 -0.48 -0.47 -0.46 -0.42 -0.38 -0.36 -0.34 -0.22 0.21 -0.18 0.17 0.16 Test 0.38 -0.45 -0.49 -0.39 -0.37 -0.29 -0.42 -0.31 -0.21 -0.37 -0.18 -0.04 0.32 0.03 0.15 0.27 Table 3: Pearson correlation with human judgments of elementary metrics ranked by absolute value on training set (15 best metrics for each dimension). question. For instance, METEOR, which per- forms best on grammaticality, has a 95% confi- dence interval of 0.36 ± 0.08 on the training set. These results are therefore preliminary and should be validated on other datasets. 4.2 Combination of all features with trained models We also combine all elementary metrics and train an evaluation models for each of the three dimen- sions. TABLE 4a presents our two best regressors in validation for each of the dimensions and TA- BLE 4b for classifiers. Pearson correlation for regressors (raw scor- ing) Combining the features does not bring a clear advantage over the elementary metrics ME- TEOR and NBOutputSyllablesPerSent. Indeed our best models score respectively on grammati- cality, meaning preservation and simplicity: 0.33 (Lasso), 0.58 (Ridge) and 0.49 (Ridge) versus 0.39 (METEOR), 0.58 (METEOR) and 0.49 (NBOut- putSyllablesPerSent). It is surprising to us that the aggregation of mul- tiple elementary features would score worse than the features themselves. However, we observe a strong discrepancy between the scores obtained on the train and test set, as illustrated by TABLE 3. We also observed very large confidence intervals in terms of Pearson correlation. For instance our lasso model scores 0.33 ± 0.17 on the test set for grammaticality. This should observe caution when interpreting Pearson scores on QATS. F1-score for classifiers (assigning labels) On the classification task, our models seem to score best for meaning preservation, simplicity and overall, and third for grammaticality. This seems to confirm the importance of considering a large ensemble of elementary features including length- based metrics to evaluate simplicity. 5 Conclusion Finding accurate ways to evaluate text simplifica- tion (TS) without the need for reference data is a key challenge for TS, both for exploring new approaches and for optimizing current models, in particular those relying on unsupervised, often MT-inspired models. We explore multiple reference-less quality eval- uation methods for automatic TS systems, based on data from the 2016 QATS shared task. We rely on the three key dimensions of the quality of a TS system: grammaticality, meaning preservation and simplicity. Our results show that grammaticality and mean- ing preservation are best assessed using n-gram- based MT metrics evaluated between the output and the source sentence. In particular, METEOR and smoothed BLEU achieve the highest corre- lation with human judgments. These approaches even outperform metrics that make an extensive use of external data, such as language models. This shows that a lot of useful information can be obtained from the source sentence itself. Regarding simplicity, we observe that counting the number of characters, syllables and words pro- vides the best results. In other words, given the currently available metrics, the length of a sen- tence seems to remain the best available proxy for its simplicity. However, given the small size of the QATS dataset and the high variance observed in our ex- periments, these results must be taken with a pinch of salt and will need to be confirmed on a larger dataset. Creating a larger annotated dataset as well as averaging multiple human annotations for each pair of sentences would help reducing the variance of the experiments and confirming our findings. In future work, we shall explore richer and more complex features extracted using syntactic and semantic analyzers, such as those used by the SAMSA metric, and paraphrase detection models. Finally, it remains to be understood how we can optimize the trade-off between grammatical- ity, meaning preservation and simplicity, in or- der to build the best possible comprehensive TS metric in terms of correlation with human judg- ments. Unsurprisingly, optimizing one of these dimensions often leads to lower results on other dimensions (Schwarzer and Kauchak, 2018). For instance, the best way to guarantee grammatical- ity and meaning preservation is to leave the source sentence unchanged, thus resulting in no simplifi- cation at all. Improving TS systems will require better global TS evaluation metrics. This is es- pecially true when considering that TS is in fact a multiply defined task, as there are many differ- ent ways of simplifying a text, depending on the different categories of people and applications at whom TS is aimed. Grammaticality 0.482 OSVCML1 0.384 METEOR 0.344 BLEU 0.340 OSVCML 0.327 Lasso 0.323 TER 0.308 SimpleNets-MLP 0.308 WER 0.256 UoLGP-emb 0.256 UoLGP-combo 0.208 UoLGP-quest 0.118 GradientBoostingRegressor 0.064 SimpleNets-RNN3 0.056 SimpleNets-RNN2 Meaning Preservation 0.588 IIT-Meteor 0.585 OSVCML 0.575 Ridge 0.573 OSVCML2 0.555 Lasso 0.533 BLEU 0.527 METEOR 0.513 TER 0.495 WER 0.482 OSVCML1 0.465 SimpleNets-MLP 0.285 UoLGP-quest 0.262 SimpleNets-RNN2 0.262 SimpleNets-RNN3 0.250 UoLGP-combo 0.188 UoLGP-emb Simplicity 0.487 Ridge 0.456 LinearSVR 0.382 OSVCML1 0.376 OSVCML2 0.339 OSVCML 0.320 SimpleNets-MLP 0.307 SimpleNets-RNN3 0.240 SimpleNets-RNN2 0.123 UoLGP-combo 0.120 UoLGP-emb 0.086 UoLGP-quest 0.052 IIT-S -0.169 METEOR -0.242 TER -0.260 WER -0.267 BLEU Overall 0.423 Ridge 0.423 LinearRegression 0.343 OSVCML2 0.334 OSVCML 0.232 SimpleNets-RNN2 0.230 OSVCML1 0.205 UoLGP-emb 0.198 SimpleNets-MLP 0.196 METEOR 0.189 UoLGP-combo 0.144 UoLGP-quest 0.130 TER 0.112 SimpleNets-RNN3 0.111 WER 0.107 BLEU (a) Pearson correlation for regressors (raw scoring) Grammaticality 71.84 SMH-RandForest 71.64 SMH-IBk 70.43 LogisticRegression 69.96 SMH-RandForest-b 69.09 BLEU 68.82 SimpleNets-MLP 68.36 TER 67.60 GradientBoosting 67.53 MS-RandForest 67.50 IIT-LM 66.79 WER 66.75 MS-RandForest-b 65.89 DeepIndiBow 65.89 DeepBow 65.89 MT-baseline 65.89 Majority-class 65.72 METEOR 65.50 SimpleNets-RNN2 65.11 SimpleNets-RNN3 64.39 CLaC-RF-Perp 62.00 MS-IBk 46.32 UoW Meaning Preservation 70.14 SVC 68.07 SMH-Logistic 65.60 MS-RandForest 64.40 SMH-RandForest 63.74 TER 63.54 SimpleNets-MLP 62.82 BLEU 62.72 MT-baseline 62.69 IIT-Meteor 61.71 MS-IBk-b 61.50 MS-IBk 60.38 GradientBoosting 60.12 METEOR 59.69 SMH-RandForest-b 59.06 WER 58.83 UoW 51.29 SimpleNets-RNN2 51.00 CLaC-RF 46.64 SimpleNets-RNN3 46.30 DeepBow 42.53 DeepIndiBow 42.51 Majority-class Simplicity 61.60 SVC 56.95 AdaBoostClassifier 56.42 SMH-RandForest-b 53.02 SMH-RandForest 51.12 SMH-IBk 49.96 SimpleNets-RNN3 49.81 SimpleNets-MLP 48.31 MT-baseline 47.84 MS-IBk-b 47.82 MS-RandForest 47.47 SimpleNets-RNN2 43.46 IIT-S 42.57 DeepIndiBow 40.92 UoW 39.68 Majority-class 38.10 MS-IBk 35.58 DeepBow 34.88 CLaC-RF-0.5 34.66 CLaC-RF-0.6 34.48 WER 34.30 CLaC-RF-0.7 33.52 TER 33.34 METEOR 33.00 BLEU Overall 49.61 LogisticRegression 48.57 SMH-RandForest-b 48.20 UoW 47.54 SMH-Logistic 46.06 SimpleNets-RNN2 45.71 AdaBoostClassifier 44.50 SMH-RandForest 40.94 METEOR 40.75 SimpleNets-RNN3 39.85 MS-RandForest 39.80 DeepIndiBow 39.30 IIT-Metrics 38.27 MS-IBk 38.16 MS-IBk-b 38.03 DeepBow 37.49 MT-baseline 34.08 TER 34.06 CLaC-0.5 33.69 SimpleNets-MLP 33.04 IIT-Default 32.92 BLEU 32.88 CLaC-0.7 32.20 CLaC-0.6 31.28 WER 26.53 Majority-class (b) Weighted F1 Score for classifiers (assign the label Good, OK or Bad) Table 4: QATS leaderboard. Results in bold are our additions to the original leaderboard. We only select the two models that rank highest during cross-validation. Acknowledgments We would like to thank our anonymous reviewers for their insightful comments. References Satanjeev Banerjee and Alon Lavie. 2005. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evalu- ation measures for machine translation and/or sum- marization, pages 65 -- 72. Hanna B´echara, Hernani Costa, Shiva Taslimipoor, Ro- hit Gupta, Constantin Orasan, Gloria Corpas Pastor, and Ruslan Mitkov. 2015. Miniexperts: An svm ap- proach for measuring semantic textual similarity. In Proceedings of the 9th international workshop on semantic evaluation (SemEval 2015), pages 96 -- 101. Steven Bird and Edward Loper. 2004. Nltk: the nat- In Proceedings of the ACL ural language toolkit. 2004 on Interactive poster and demonstration ses- sions, page 31. Association for Computational Lin- guistics. Laetitia Brouwers, Delphine Bernhard, Anne-Laure Ligozat, and Thomas Franc¸ois. 2014. Syntactic sen- In Proceedings of tence simplification for french. the 3rd Workshop on Predicting and Improving Text Readability for Target Reader Populations (PITR), pages 47 -- 56. Dominique Brunato, Felice Dell'Orletta, Giulia Ven- turi, and Simonetta Montemagni. 2015. Design and annotation of the first italian corpus for text simpli- fication. In Proceedings of The 9th Linguistic Anno- tation Workshop, pages 31 -- 41. Marc Brysbaert, Amy Beth Warriner, and Victor Ku- perman. 2014. Concreteness ratings for 40 thousand generally known english word lemmas. Behavior research methods, 46(3):904 -- 911. John Carroll, Guido Minnen, Yvonne Canning, Siob- han Devlin, and John Tait. 1998. Practical simpli- fication of english newspaper text to assist aphasic In Proceedings of the AAAI-98 Workshop readers. on Integrating Artificial Intelligence and Assistive Technology, pages 7 -- 10. Raman Chandrasekar, Christine Doran, and Bangalore Srinivas. 1996. Motivations and methods for text In Proceedings of the 16th confer- simplification. ence on Computational linguistics-Volume 2, pages 1041 -- 1044. Association for Computational Linguis- tics. Jonas Gehring, Michael Auli, David Grangier, De- nis Yarats, and Yann N. Dauphin. 2017. Convolu- tional sequence to sequence learning. arXiv preprint arXiv:1705.03122. Isao Goto, Hideki Tanaka, and Tadashi Kumano. 2015. Japanese news simplification: Task design, data set construction, and analysis of simplified text. Pro- ceedings of MT Summit XV, 1:17 -- 31. J. Peter Kincaid, Robert P Fishburne Jr., Richard L. Rogers, and Brad S. Chissom. 1975. Derivation of new readability formulas (automated readability in- dex, fog count and flesch reading ease formula) for navy enlisted personnel. Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Skip-thought vectors. In Advances in neural information processing systems, pages 3294 -- 3302. Chin-Yew Lin. 2004. Rouge: A package for auto- matic evaluation of summaries. Text Summarization Branches Out. Tomas Mikolov, Edouard Grave, Piotr Bojanowski, Christian Puhrsch, and Armand Joulin. 2018. Ad- vances in pre-training distributed word representa- In Proceedings of the International Confer- tions. ence on Language Resources and Evaluation (LREC 2018). Shashi Narayan and Claire Gardent. 2014. Hybrid sim- plification using deep semantics and machine trans- In Proceedings of the 52nd Annual Meet- lation. ing of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pages 435 -- 445. Shashi Narayan, Claire Gardent, Shay B Cohen, and Split and rephrase. Anastasia Shimorina. 2017. arXiv preprint arXiv:1707.06971. Kishore Papineni, Salim Roukos, Todd Ward, and Wei- Jing Zhu. 2002. Bleu: a method for automatic eval- In Proceedings of uation of machine translation. the 40th annual meeting on association for compu- tational linguistics, pages 311 -- 318. Association for Computational Linguistics. Fabian Pedregosa, Gal Varoquaux, Alexandre Gram- fort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, Jake Vanderplas, Alexan- dre Passos, David Cournapeau, Matthieu Brucher, Matthieu Perrot, and douard Duchesnay. 2011. Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research, 12:2825 -- 2830. Luz Rello, Ricardo Baeza-Yates, Stefan Bott, and Horacio Saggion. 2013. Simplify or help?: text simplification strategies for people with dyslexia. In Proceedings of the 10th International Cross- Disciplinary Conference on Web Accessibility, page 15. ACM. Miguel Rios and Serge Sharoff. 2015. Large scale In The Proceedings translation quality estimation. of the 1st Deep Machine Translation Workshop. Evaluation, LREC'12, pages 2214 -- 2218, Istanbul, Turkey. David Vickrey and Daphne Koller. 2008. Sentence simplification for semantic role labeling. Proceed- ings of ACL-08: HLT, pages 344 -- 352. Willian Massami Watanabe, Arnaldo Candido Junior, Vin´ıcius Rodriguez Uzeda, Renata Pontin de Mat- tos Fortes, Thiago Alexandre Salgueiro Pardo, and Sandra Maria Alu´ısio. 2009. Facilita: reading as- sistance for low-literacy readers. In Proceedings of the 27th ACM international conference on Design of communication, pages 29 -- 36. ACM. Sander Wubben, Antal Van Den Bosch, and Emiel Krahmer. 2012. Sentence simplification by mono- lingual machine translation. In Proceedings of the 50th Annual Meeting of the Association for Compu- tational Linguistics: Long Papers-Volume 1, pages 1015 -- 1024. Association for Computational Linguis- tics. Menglin Xia, Ekaterina Kochmar, and Ted Briscoe. 2016. Text readability assessment for second lan- In Proceedings of the 11th Work- guage learners. shop on Innovative Use of NLP for Building Educa- tional Applications, pages 12 -- 22. Wei Xu, Chris Callison-Burch, and Courtney Napoles. 2015. Problems in current text simplification re- search: New data can help. Transactions of the Association of Computational Linguistics, 3(1):283 -- 297. Wei Xu, Courtney Napoles, Ellie Pavlick, Quanze Chen, and Chris Callison-Burch. 2016. Optimizing statistical machine translation for text simplification. Transactions of the Association for Computational Linguistics, 4:401 -- 415. Zhemin Zhu, Delphine Bernhard, and Iryna Gurevych. 2010. A monolingual tree-based translation model In Proceedings of the for sentence simplification. 23rd international conference on computational lin- guistics, pages 1353 -- 1361. Association for Compu- tational Linguistics. Horacio Saggion, Elena G´omez Mart´ınez, Esteban Etayo, Alberto Anula, and Lorena Bourg. 2011. Text simplification in simplext. making text more accessible. Procesamiento del lenguaje natural, 47:341 -- 342. Max Schwarzer and David Kauchak. 2018. Human evaluation for text simplification: The simplicity- adequacy tradeoff. Matthew G Snover, Nitin Madnani, Bonnie Dorr, and Richard Schwartz. 2009. Ter-plus: paraphrase, se- mantic, and alignment enhancements to translation edit rate. Machine Translation, 23(2-3):117 -- 127. Lucia Specia. 2010. Translating from complex to sim- In International Conference on plified sentences. Computational Processing of the Portuguese Lan- guage, pages 30 -- 39. Springer. Lucia Specia, Kashif Shah, Jose GC Souza, and Trevor Cohn. 2013. Quest-a translation quality estimation framework. In Proceedings of the 51st Annual Meet- ing of the Association for Computational Linguis- tics: System Demonstrations, pages 79 -- 84. Sanja Stajner, Hannah B´echara, and Horacio Saggion. 2015. A deeper exploration of the standard pb-smt approach to text simplification and its evaluation. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Lan- guage Processing (Volume 2: Short Papers), vol- ume 2, pages 823 -- 828. Sanja Stajner, Ruslan Mitkov, and Horacio Saggion. 2014. One step closer to automatic evaluation of text In Proceedings of the 3rd simplification systems. Workshop on Predicting and Improving Text Read- ability for Target Reader Populations (PITR), pages 1 -- 10. Sanja Stajner, Maja Popovic, and Hanna B´echara. 2016a. Quality estimation for text simplification. In Proceedings of the QATS Workshop, pages 15 -- 21. Sanja Stajner, Maja Popovic, Horacio Saggion, Lucia Specia, and Mark Fishel. 2016b. Shared task on quality assessment for text simplification. Training, 218(95):192. Elior Sulem, Omri Abend, and Ari Rappoport. 2018a. Bleu is not suitable for the evaluation of text simpli- fication. Elior Sulem, Omri Abend, and Ari Rappoport. 2018b. Semantic structural evaluation for text simplifica- In Proceedings of the 2018 Conference of tion. the North American Chapter of the Association for Computational Linguistics: Human Language Tech- nologies, Volume 1 (Long Papers), volume 1, pages 685 -- 696. Jrg Tiedemann. 2012. Parallel Data, Tools and In- In Proceedings of the 8th In- terfaces in OPUS. ternational Conference on Language Resources and
1905.10892
1
1905
2019-05-26T21:50:15
Extreme Multi-Label Legal Text Classification: A case study in EU Legislation
[ "cs.CL" ]
We consider the task of Extreme Multi-Label Text Classification (XMTC) in the legal domain. We release a new dataset of 57k legislative documents from EURLEX, the European Union's public document database, annotated with concepts from EUROVOC, a multidisciplinary thesaurus. The dataset is substantially larger than previous EURLEX datasets and suitable for XMTC, few-shot and zero-shot learning. Experimenting with several neural classifiers, we show that BIGRUs with self-attention outperform the current multi-label state-of-the-art methods, which employ label-wise attention. Replacing CNNs with BIGRUs in label-wise attention networks leads to the best overall performance.
cs.CL
cs
Extreme Multi-Label Legal Text Classification: A case study in EU Legislation Ilias Chalkidis* Manos Fergadiotis* Prodromos Malakasiotis* Nikolaos Aletras** Ion Androutsopoulos* * Department of Informatics, Athens University of Economics and Business, Greece ** Computer Science Department, University of Sheffield, UK 9 1 0 2 y a M 6 2 ] L C . s c [ 1 v 2 9 8 0 1 . 5 0 9 1 : v i X r a [ihalk,fergadiotis,rulller,ion]@aueb.gr, [email protected] Abstract We consider the task of Extreme Multi-Label Text Classification (XMTC) in the legal do- main. We release a new dataset of 57k leg- islative documents from EUR-LEX, the Euro- pean Union's public document database, anno- tated with concepts from EUROVOC, a multi- disciplinary thesaurus. The dataset is substan- tially larger than previous EUR-LEX datasets and suitable for XMTC, few-shot and zero-shot learning. Experimenting with several neural classifiers, we show that BIGRUs with self- attention outperform the current multi-label state-of-the-art methods, which employ label- wise attention. Replacing CNNs with BIGRUs in label-wise attention networks leads to the best overall performance. 1 Introduction Extreme multi-label text classification (XMTC), is the task of tagging documents with relevant la- bels from an extremely large label set, typically containing thousands of labels (classes). Ap- plications include building web directories (Par- talas et al., 2015), labeling scientific publica- tions with concepts from ontologies (Tsatsaronis et al., 2015), product categorization (McAuley and Leskovec, 2013), categorizing medical examina- tions (Mullenbach et al., 2018; Rios and Kavu- luru, 2018b), and indexing legal documents (Men- cia and Frnkranz, 2007). We focus on legal text processing, an emerging NLP field with many ap- plications (Nallapati and Manning, 2008; Aletras et al., 2016; Chalkidis et al., 2017), but limited publicly available resources. We release a new dataset, named EURLEX57K, including 57,000 English documents of EU legis- lation from the EUR-LEX portal. All documents have been tagged with concepts from the Euro- pean Vocabulary (EUROVOC), maintained by the Publications Office of the European Union. Al- though EUROVOC contains more than 7,000 con- cepts, most of them are rarely used in practice. Consequently, they are under-represented in EU- RLEX57K, making the dataset also appropriate for few-shot and zero-shot learning. Experimenting on EURLEX57K, we explore the use of various RNN-based and CNN-based neural classifiers, including the state of the art Label- Wise Attention Network of Mullenbach et al. (2018), called CNN-LWAN here. We show that both a simpler BIGRU with self-attention (Xu et al., 2015) and the Hierarchical Attention Network (HAN) of Yang et al. (2016) outperform CNN- LWAN by a wide margin. Replacing the CNN en- coder of CNN-LWAN with a BIGRU, which leads to a method we call BIGRU-LWAN, further improves performance. Similar findings are observed in the zero-shot setting where Z-BIGRU-LWAN outper- forms Z-CNN-LWAN. 2 Related Work Liu et al. (2017) proposed a CNN similar to that of Kim (2014) for XMTC. They reported re- sults on several benchmark datasets, most no- tably: RCV1 (Lewis et al., 2004), containing news articles; EUR-LEX (Mencia and Frnkranz, 2007), containing legal documents; Amazon-12K (McAuley and Leskovec, 2013), containing prod- uct descriptions; and Wiki-30K (Zubiaga, 2012), containing Wikipedia articles. Their proposed method outperformed both tree-based methods (e.g., FASTXML, (Prabhu and Varma, 2014)) and target-embedding methods (e.g., SLEEC (Bha- tia et al., 2015), FASTTEXT (Bojanowski et al., 2016)). RNNs with self-attention have been employed in a wide variety of NLP tasks, such as Natural Lan- guage Inference (Liu et al., 2016), Textual Entail- ment (Rocktaschel et al., 2016), and Text Classifi- cation (Zhou et al., 2016). You et al. (2018) used RNNs with self-attention in XMTC comparing with tree-based methods and deep learning approaches including vanilla LSTMs and CNNs. Their method outperformed the other approaches in three out of four XMTC datasets, demonstrating the effective- ness of attention-based RNNs. Mullenbach et al. (2018) investigated the use of label-wise attention mechanisms in medical code prediction on the MIMIC-II and MIMIC-III datasets (Johnson et al., 2017). MIMIC-II and MIMIC-III contain over 20,000 and 47,000 documents tagged with approximately 9,000 and 5,000 ICD-9 code descriptors, respectively. Their best method, Con- volutional Attention for Multi-Label Classifica- tion, called CNN-LWAN here, includes multiple attention mechanisms, one for each one of the L labels. CNN-LWAN outperformed weak base- lines, namely logistic regression, vanilla BIGRUs and CNNs. Another important fact is that CNN- LWAN was found to have the best interpretability in comparison with the rest of the methods in hu- man readers' evaluation. Rios and Kavuluru (2018b) discuss the chal- lenge of few-shot and zero-shot learning on the MIMIC datasets. Over 50% of all ICD-9 labels never appear in MIMIC-III, while 5,000 labels oc- cur fewer than 10 times. The same authors pro- posed a new method, named Zero-Shot Attentive CNN, called Z-CNN-LWAN here, which is simi- lar to CNN-LWAN (Mullenbach et al., 2018), but also exploits the provided ICD-9 code descrip- tors. The proposed Z-CNN-LWAN method was compared with prior state-of-the-art methods, in- cluding CNN-LWAN (Mullenbach et al., 2018) and MATCH-CNN (Rios and Kavuluru, 2018a), a multi- head matching CNN. While Z-CNN-LWAN did not outperform CNN-LWAN overall on MIMIC-II and MIMIC-III, it had exceptional results in few-shot and zero-shot learning, being able to identify la- bels with few or no instances at all in the train- ing sets. Experimental results showed an improve- ment of approximately four orders of magnitude in comparison with CNN-LWAN in few-shot learning and an impressive 0.269 R@5 in zero-shot learn- ing, compared to zero R@5 reported for the other models compared.1 Rios and Kavuluru (2018b) also apply graph convolutions to hierarchical re- lations of the labels, which improves the perfor- 1See Section 5.2 for a definition of R@K. mance on few-shot and zero-shot learning. In this work, we do not consider relations between labels and do not discuss this method further. Note that CNN-LWAN and Z-CNN-LWAN were not compared so far with strong generic text clas- sification baselines. Both Mullenbach et al. (2018) and Rios and Kavuluru (2018b) proposed sophis- ticated attention-based architectures, which intu- itively are a good fit for XMTC, but they did not di- rectly compare those models with RNNs with self- attention (You et al., 2018) or even more complex architectures, such as Hierarchical Attention Net- works (HANs) (Yang et al., 2016). 3 EUROVOC & EURLEX57K 3.1 EUROVOC Thesaurus EUROVOC is a multilingual thesaurus maintained by the Publications Office of the European Union.2 It is used by the European Parliament, the national and regional parliaments in Europe, some national government departments, and other Eu- ropean organisations. The current version of EU- ROVOC contains more than 7,000 concepts refer- ring to various activities of the EU and its Member States (e.g., economics, health-care, trade, etc.). It has also been used for indexing documents in systems of EU institutions, e.g., in web legislative databases, such as EUR-LEX and CELLAR. All EU- ROVOC concepts are represented as tuples called descriptors, each containing a unique numeric identifier and a (possibly) multi-word description of the concept concept, for example (1309, im- port), (693, citrus fruit), (192, health control), (863, Spain), (2511, agri-monetary policy). 3.2 EURLEX57K EURLEX57K can be viewed as an improved ver- sion of the EUR-LEX dataset released by Men- cia and Frnkranz (2007), which included 19,601 documents tagged with 3,993 different EUROVOC concepts. While EUR-LEX has been widely used in XMTC research, it is less than half the size of EURLEX57K and one of the smallest among XMTC benchmarks.3 Over the past years the EUR-LEX archive has been widely expanded. EURLEX57K is a more up to date dataset including 57,000 pieces 2https://publications.europa.eu/en/ web/eu-vocabularies 3The most notable XMTC benchmarks can be found http://manikvarma.org/downloads/XC/ at XMLRepository.html. of EU legislation from the EUR-LEX portal.4 All documents have been annotated by the Publica- tions Office of EU with multiple concepts from the EUROVOC thesaurus. EURLEX57K is split in train- ing (45,000 documents), development (6,000), and validation (6,000) subsets (see Table 1).5 Subset Documents (D) Words/D Labels/D Train Dev. Test 45,000 6,000 6,000 729 714 725 5 5 5 Table 1: Statistics of the EUR-LEX dataset. All documents are structured in four major zones: the header including the title and the name of the legal body that enforced the legal act; the recitals that consist of references in the legal back- ground of the decision; the main body, which is usually organized in articles; and the attachments that usually include appendices and annexes. For simplicity, we will refer to each one of header, recitals, attachments and each of the main body's articles as sections. We have pre-processed all documents in order to provide the aforementioned structure. While EUROVOC includes over 7,000 concepts (labels), only 4,271 (59.31%) of them are present in EURLEX57K. Another important fact is that most labels are under-represented; only 2,049 (47,97%) have been assigned to more than 10 doc- uments. Such an aggressive Zipfian distribution (Figure 1) has also been noted in other domains, like medical examinations (Rios and Kavuluru, 2018b) where XMTC has been applied to index documents with concepts from medical thesauri. The labels of EURLEX57K are divided in three categories: frequent labels (746), which occur in more than 50 training documents and can be found in all three subsets (training, development, test); few-shot labels (3,362), which appear in 1 to 50 training documents; and zero-shot labels (163), which appear in the development and/or test, but not in the training, documents. 4 Methods Considered We experiment with a wide repertoire of methods including linear and non-linear neural classifiers. We also propose and conduct initial experiments 4https://eur-lex.europa.eu 5Our dataset at http://nlp.cs. available aueb.gr/software_and_datasets/EURLEX57K, reuse under European Union c(cid:13), with permission of https://eur-lex.europa.eu, 1998 -- 2019. is Figure 1: EUROVOC concepts frequency. with two novel neural methods that aim to cope with the extended length of the legal documents and the information sparsity (for XMTC purposes) across the sections of the documents. 4.1 Baselines 4.1.1 Exact Match To demonstrate that plain label name matching is not sufficient, our first weak baseline, Exact Match, tags documents only with labels whose de- scriptors appear verbatim in the documents. 4.1.2 Logistic Regression To demonstrate the limitations of linear classifiers with bag-of-words representations, we train a Lo- gistic Regression classifier with TF-IDF scores for the most frequent unigrams, bigrams, trigrams, 4- grams, 5-grams across all documents. Logistic regression with similar features has been widely used for multi-label classification in the past. 4.2 Neural Approaches We present eight alternative neural methods. In the following subsections, we describe their structure consisting of five main parts: • word encoder (ENCw): turns word embed- dings into context-aware embeddings, • section encoder (ENCs): turns each section (sentence) into a sentence embedding, • document encoder (ENCd): turns an entire document into a final dense representation, • section decoder (DECs) or document decoder (DECd): maps the section or document repre- sentation to a many-hot label assignment. All parts except for ENCw and DECd are optional, i.e., they may not be present in all methods. Figure 2: Illustration of (a) BIGRU-ATT, (b) HAN, and (c) BIGRU-LWAN. 4.2.1 BIGRU-ATT In the first deep learning method, BIGRU-ATT (Figure 2a), ENCw is a stack of BIGRUs that con- verts the pre-trained word embeddings (wt) to context-aware ones (ht). ENCd employs a self at- tention mechanism to produce the final represen- tation d of the document as a weighted sum of ht: (cid:80) exp(h(cid:62) t u) j exp(h(cid:62) T(cid:88) atht 1 T t=1 j u) at = d = (1) (2) T is the document's length in words, and u is a trainable vector used to compute the attention scores at over ht. DECd is a linear layer with L = 4, 271 output units and sigmoid (σ) activa- tions that maps the document representation d to L probabilities, one per label. 4.2.2 HAN The Hierarchical Attention Network (HAN) (Yang et al., 2016), exploits the structure of the doc- uments by encoding the text in two consecutive steps (Figure 2b). First, a BIGRU (ENCw) followed by a self-attention mechanism (ENCs) turns the word embeddings (wit) of each section si with Ti words into a section embedding ci: vit = tanh(W (s)hit + b(s)) a(s) it = ci = (cid:80) exp(v(cid:62) j exp(v(cid:62) Ti(cid:88) it u(s)) ij u(s)) a(s) it hit 1 Ti t=1 (3) (4) (5) where u(s) is a trainable vector. Next, ENCd, an- other BIGRU with self-attention, converts the sec- tion embeddings (S in total, as many as the sec- tions) to the final document representation d: vi = tanh(W (d)ci + b(d)) a(d) i = d = i u(d)) j u(d)) (cid:80) exp(v(cid:62) j exp(v(cid:62) S(cid:88) a(d) i ci 1 S i=1 (6) (7) (8) where u(d) is a trainable vector. The final decoder DECd of HAN is the same as in BIGRU-ATT. 4.3 MAX-HSS Initial experiments we conducted indicated that HAN is outperformed by the shallower BIGRU- ATT. We suspected that the main reason was the fact that the section embeddings ci that HAN's ENCs produces contain useful information that is later degraded by HAN's ENCd. Based on this as- sumption, we experimented with a novel method, named Max-Pooling over Hierarchical Attention Scorers (MAX-HSS). MAX-HSS produces section embeddings ci in the same way as HAN, but then employs a separate DECs per section to produce label predictions from each section embedding ci: p(s) i = σ(W (m)ci + b(m)) (9) where pi is an L-dimensional vector containing probabilities for all labels, derived from ci. DECd aggregates the predictions for the whole document with a MAXPOOL operator that extracts the highest probability per label across all sections: p(d) = MAXPOOL(p(s) 1 , . . . , p(s) S ) (10) Intuitively, each section tries to predict the labels relying on its content independently, and DECd ex- tracts the most probable labels across sections. document representations dl = (cid:80) 4.3.1 CNN-LWAN and BIGRU-LWAN The Label-wise Attention Network, LWAN (Mul- lenbach et al., 2018), also uses a self-attention mechanism, but here ENCd employs L indepen- dent attention heads, one per label, generating L t altht (l = 1, . . . , L) from the sequence of context aware word embeddings h1, . . . , hT of each document d. The intuition is that each attention head focuses on possibly different aspects of h1, . . . , hT needed to decide if the corresponding label should be as- signed to the document or not. DECd employs L linear layers with σ activation, each one operating on a label-wise document representation dl to pro- duce the probability for the corresponding label. In the original LWAN (Mullenbach et al., 2018), called CNN-LWAN here, ENCw is a vanilla CNN. We use a modified version, BIGRU-LWAN, where ENCw is a BIGRU (Figure 2c). 4.4 Z-CNN-LWAN and Z-BIGRU-LWAN Following the work of Mullenbach et al. (2018), Rios and Kavuluru (2018b) designed a similar ar- chitecture in order to improve the results in docu- ments that are classified with rare labels. In one of their models, ENCd creates label representations, ul, from the corresponding descriptors as follows: E(cid:88) e=1 ul = 1 E wle (11) where wle is the word embedding of the e-th word in the l-th label descriptor. The label representa- tions are then used as alternative attention vectors: vt = tanh(W (z)ht + b(z)) (cid:80) exp(v(cid:62) t ul) j exp(v(cid:62) T(cid:88) altht 1 T t=1 j ul) alt = dl = (12) (13) (14) where ht are the context-aware embeddings pro- duced by a vanilla CNN (ENCw) operating on the document's word embeddings, alt are the attention scores conditioned on the corresponding label rep- resentation ul, and dl is the label-wise document representation. DECd also relies on label represen- tations to produce each label's probability: pl = σ(u(cid:62) l dl) (15) Note that the representations ul of both encoun- tered (during training) and unseen (zero-shot) la- bels remain unchanged, because the word embed- dings wle are not updated (Eq. 11). This keeps the representations of zero-shot labels close to those of encountered labels they share several descriptor words with. In turn, this helps the attention mech- anism (Eq. 13) and the decoder (Eq. 15), where the label representations ul are used, cope with un- seen labels that have similar descriptors with en- countered labels. As with CNN-LWAN and BIGRU- LWAN, we experiment with the original version of the model of Rios and Kavuluru (2018b), which uses a CNN ENCw (Z-CNN-LWAN), and a version that uses a BIGRU ENCw (Z-BIGRU-LWAN). 4.5 LW-HAN We also propose a new method, Label-Wise Hier- archical Attention Network (LW-HAN), that com- bines ideas from both HAN and LWAN. For each section, LW-HAN employs an LWAN to produce L probabilities. Then, like MAX-HSS, a MAXPOOL operator extracts the highest probability per label across all sections. In effect, LW-HAN exploits the document structure to cope with the extended doc- ument length of legal documents, while employing multiple label-wise attention heads to deal with the vast and sparse label set. By contrast, MAX-HSS does not use label-wise attention. 5 Experimental Results 5.1 Experimental Setup Hyper-parameters were tuned on development data using HYPEROPT.6 We tuned for the fol- lowing hyper-parameters and ranges: ENC output units {200, 300, 400}, ENC layers {1, 2}, batch size {8, 12, 16}, dropout rate {0.1, 0.2, 0.3, 0.4}, word dropout rate {0.0, 0.01, 0.02}. For the best hyper-parameter values, we perform five runs and report mean scores on test data. For statistical sig- nificance, we take the run of each method with the best performance on development data, and per- form two-tailed approximate randomization tests (Dror et al., 2018) on test data. We used 200- dimensional pre-trained GLOVE embeddings (Pen- nington et al., 2014) in all neural methods. 6https://github.com/hyperopt 5.2 Evaluation Measures The most common evaluation measures in XMTC are recall (R@K), precision (P @K), and nDCG (nDCG@K) at the top K predicted labels, along with micro-averaged F -1 across all labels. Mea- sures that macro-average over labels do not con- sider the number of instances per label, thus being very sensitive to infrequent labels, which are many more than frequent ones (Section 3.2). On the other hand, ranking measures, like R@K, P @K, nDCG@K, are sensitive to the choice of K. In EURLEX57K the average number of labels per document is 5.07, hence evaluating at K = 5 is a reasonable choice. We note that 99.4% of the dataset's documents have at most 10 gold labels. While R@K and P @K are commonly used, we question their suitability for XMTC. R@K leads to unfair penalization of methods when doc- uments have more than K gold labels. Evaluating at K = 1 for a document with N > 1 gold labels returns at most R@1 = 1 N , unfairly penalizing systems by not allowing them to return N labels. This is shown in Figure 3, where the green lines show that R@K decreases as K decreases, be- cause of low scores obtained for documents with more than K labels. On the other hand, P @K leads to excessive penalization for documents with fewer than K gold labels. Evaluating at K = 5 for a document with just one gold label returns at most P @5 = 1 5 = 0.20, unfairly penalizing sys- tems that retrieved all the gold labels (in this case, just one). The red lines of Figure 3 decline as K increases, because the number of documents with fewer than K gold labels increases (recall that the average number of gold labels is 5.07). Similar concerns have led to the introduction of R-Precision and nDCG@K in Information Re- trieval (Manning et al., 2009), which we believe are also more appropriate for XMTC. Note, how- ever, that R-Precision requires that the number of gold labels per document is known beforehand, which is not realistic in practical applications. Therefore we propose R-Precision@K (RP @K) where K is the maximum number of retrieved labels. Both RP @K and nDCG@K adjust to the number of gold labels per document, without unfairly penalizing systems for documents with fewer than K or many more than K gold labels. They are defined as follows: 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 1 2 3 BIGRU-ATT HANs BIGRU-LWANs 5 4 7 K top predictions 6 8 9 10 Figure 3: R@K (green lines), P @K (red), RP @K (black) scores of the best methods (BIGRU-ATT, HANs, BIGRU-LWAN), for K = 1 to 10. All scores macro- averaged over test documents. RP @K = 1 N N(cid:88) nDCG@K = 1 N Rel(n, k) min (K, Rn) 2Rel(n,k) − 1 log2 (1 + k) (16) (17) N(cid:88) n=1 ZKn K(cid:88) K(cid:88) k=1 n=1 k=1 Here N is the number of test documents; Rel(n, k) is 1 if the k-th retrieved label of the n-th test doc- ument is correct, otherwise 0; Rn is the number of gold labels of the n-th test document; and ZKn is a normalization factor to ensure that nDCG@K = 1 for perfect ranking. In effect, RP @K is a macro-averaged (over test documents) version of P @K, but K is reduced to the number of gold labels Rn of each test docu- ment, if K exceeds Rn. Figure 3 shows RP @K for the three best systems. Unlike P @K, RP @K does not decline sharply as K increases, because it replaces K by Rn (number of gold labels) when K > Rn. For K = 1, RP @K is equivalent to P @K, as confirmed by Fig. 3. For large values of K that almost always exceed Rn, RP @K asymp- totically approaches R@K (macro-averaged over documents), as also confirmed by Fig. 3. 5.3 Overall Experimental Results Table 2 reports experimental results for all meth- ods and evaluation measures. As expected, Exact Match is vastly outperformed by machine learning methods, while Logistic Regression is also unable to cope with the complexity of XMTC. Exact Match Logistic Regression BIGRU-ATT HAN CNN-LWAN BIGRU-LWAN Z-CNN-LWAN Z-BIGRU-LWAN ENSEMBLE-LWAN MAX-HSS LW-HAN ALL LABELS FREQUENT FEW ZERO RP @5 nDCG@5 Micro-F 1 RP @5 nDCG@5 RP @5 nDCG@5 RP @5 nDCG@5 0.097 0.710 0.758 0.746 0.716 0.766 0.684 0.718 0.766 0.737 0.721 0.219 0.767 0.799 0.789 0.761 0.805 0.730 0.764 0.805 0.784 0.766 0.074 0.470 0.580 0.544 0.557 0.618 0.454 0.510 0.618 0.443 0.402 0.194 0.011 0.040 0.051 0.036 0.029 0.321 0.438 0.438 0.039 0.039 0.186 0.011 0.027 0.034 0.023 0.019 0.264 0.345 0.345 0.028 0.026 0.099 0.741 0.789 0.778 0.746 0.796 0.717 0.752 0.796 0.773 0.761 0.120 0.539 0.689 0.680 0.642 0.698 0.618 0.652 0.698 0.671 0.669 0.201 0.781 0.813 0.805 0.772 0.819 0.745 0.780 0.819 0.803 0.790 0.111 0.508 0.631 0.597 0.613 0.662 0.495 0.561 0.662 0.463 0.412 Table 2: Results on EURLEX57K for all, frequent (> 50 training instances), few-shot (1 to 50 instances), and zero- shot labels. All the differences between the best (bold) and other methods are statistically significant (p < 0.01). In Section 2, we referred to the lack of pre- vious experimental comparison between meth- ods relying on label-wise attention and strong generic text classification baselines. Interestingly, for all, frequent, and even few-shot labels, the generic BIGRU-ATT performs better than CNN- LWAN, which was designed for XMTC. HAN also performs better than CNN-LWAN for all and fre- quent labels. However, replacing the CNN encoder of CNN-LWAN with a BIGRU (BIGRU-LWAN) leads to the best results overall, with the exception of zero-shot labels, indicating that the main weak- ness of CNN-LWAN is its vanilla CNN encoder. 5.4 Few-shot and Zero-shot Results As noted by Rios and Kavuluru (2018b), de- veloping reliable and robust classifiers for few- shot and zero-shot tasks is a significant challenge. Consider, for example, a test document referring to concepts that have rarely (few-shot) or never (zero-shot) occurred in training documents (e.g., 'tropical disease', which exists once in the whole dataset). A reliable classifier should be able to at least make a good guess for such rare concepts. As shown in Table 2, BIGRU-LWAN outper- forms all other methods in both frequent and few- shotlabels, but not in zero-shot labels, where Z- CNN-LWAN (Rios and Kavuluru, 2018b) provides exceptional results compared to other methods. Again, replacing the vanilla CNN of Z-CNN-LWAN with a BIGRU (Z-BIGRU-LWAN) improves perfor- mance across all label types and measures. All other methods, including BIGRU-ATT, HAN, LWAN, fail to predict relevant zero-shot labels (Ta- ble 2). This behavior is not surprising, because the training objective, minimizing binary cross- entropy across all labels, largely ignores infre- quent labels. The zero-shot versions of CNN- LWAN and BIGRU-LWAN outperform all other methods on zero-shot labels, in line with the find- ings of Rios and Kavuluru (2018b), because they exploit label descriptors, which they do not update during training (Section 4.4). Exact Match also performs better than most other methods (exclud- ing Z-CNN-LWAN and Z-BIGRU-LWAN) on zero- shot labels, because it exploits label descriptors. To better support all types of labels (frequent, few-shot, zero-shot), we propose an ensemble of BIGRU-LWAN and Z-BIGRU-LWAN, which outputs the predictions of BIGRU-LWAN for frequent and few-shot labels, along with the predictions of Z- BIGRU-LWAN for zero-shot labels. The ensem- ble's results for 'all labels' in Table 2 are the same as those of BIGRU-LWAN, because zero-shot labels are very few (163) and rare in the test set. The two methods (MAX-HSS, LW-HAN) that ag- gregate (via MAXPOOL) predictions across sec- tions under-perform in all types of labels, sug- gesting that combining predictions from individ- ual sections is not a promising direction for XMTC. 5.5 Providing Evidence through Attention Chalkidis and Kampas (2018) noted that self- attention does not only lead to performance im- provements in legal text classification, but might also provide useful evidence for the predictions (i.e., assisting in decision-making). On the left side of Figure 4a, we demonstrate such indica- tive results by visualizing the attention heat-maps of BIGRU-ATT and BIGRU-LWAN. Recall that BIGRU-LWAN uses a separate attention head per label. This allows producing multi-color heat- maps (a different color per label) separately indi- cating which words the system attends most when predicting each label. By contrast, BIGRU-ATT uses a single attention head and, thus, the result- ing heat-maps include only one color. (a) COMMISSION DIRECTIVE (EEC) No 82/147 (b) COMMISSION REGULATION (EEC) No 3517/84 Figure 4: Attention heat-maps for BIGRU-ATT (left) and BIGRU-LWAN (right). Gold labels (concepts) are shown at the top of each sub-figure, while the top 5 predicted labels are shown at the bottom. Correct predictions are shown in bold. BIGRU-LWAN's label-wise attentions are depicted in different colors. 6 Conclusions and Future Work We compared various neural methods on a new le- gal XMTC dataset, EURLEX57K, also investigat- ing few-shot and zero-shot learning. We showed that BIGRU-ATT is a strong baseline for this XMTC dataset, outperforming CNN-LWAN (Mullenbach et al., 2018), which was especially designed for XMTC, but that replacing the vanilla CNN of CNN- LWAN by a BIGRU encoder (BIGRU-LWAN) leads to the best overall results, except for zero-shot la- bels. For the latter, the zero-shot version of CNN- LWAN of Rios and Kavuluru (2018b) produces exceptional results, compared to the other meth- ods, and its performance improves further when its CNN is replaced by a BIGRU (Z-BIGRU-LWAN). Surprisingly HAN (Yang et al., 2016) and other hierarchical methods we considered (MAX-HSS, LW-HAN) are weaker compared to the other neu- ral methods we experimented with, which do not consider the structure (sections) of the documents. The best methods of this work rely on GRUs and thus are computationally expensive. The length of the documents further affects the training time of these methods. Hence, we plan to investigate the use of Transformers (Vaswani et al., 2017; Dai et al., 2019) and dilated CNNs (Kalchbrenner et al., 2017) as alternative document encoders. Given the recent advances in transfer learning for natural language processing, we plan to ex- periment with pre-trained neural language models for feature extraction and fine-tuning using state- of-the-art approaches such as ELMO (Peters et al., 2018)), ULMFIT (Howard and Ruder, 2018) and BERT (Devlin et al., 2019). Finally, we also plan to investigate further the extent to which attention heat-maps provide use- ful explanations of the predictions made by legal predictive models following recent work on atten- tion explainability (Jain and Wallace, 2019). References Nikolaos Aletras et al. 2016. Predicting judicial de- cisions of the European Court of Human Rights: a Natural Language Processing perspective. PeerJ Computer Science, 2:e93. Kush Bhatia, Himanshu Jain, Purushottam Kar, Manik Varma, and Prateek Jain. 2015. Sparse Local Em- beddings for Extreme Multi-label Classification. In Advances in Neural Information Processing Systems 28, pages 730 -- 738. Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. 2016. Enriching Word Vec- arXiv preprint tors with Subword Information. arXiv:1607.04606. Ilias Chalkidis, Ion Androutsopoulos, and Achilleas Michos. 2017. Extracting Contract Elements. In Proceedings of the 16th International Conference on Artificial Intelligence and Law, pages 19 -- 28. Ilias Chalkidis and Dimitrios Kampas. 2018. Deep learning in law: early adaptation and legal word em- beddings trained on large corpora. Artificial Intelli- gence and Law. Zihang Dai, Zhilin Yang, Yiming Yang, Jaime G. Carbonell, Quoc V. Le, and Ruslan Salakhutdi- nov. 2019. Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context. CoRR, abs/1901.02860. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of Deep Bidirectional Transformers for Language Un- derstanding. Proceedings of the Conference of the NA Chapter of the Association for Computational Linguistics. Rotem Dror, Gili Baumer, Segev Shlomov, and Roi Re- ichart. 2018. The Hitchhiker's Guide to Testing Sta- tistical Significance in Natural Language Process- ing. In Proceedings of the 56th Annual Meeting of ACL (Long Papers), pages 1383 -- 1392. Jeremy Howard and Sebastian Ruder. 2018. Universal Language Model Fine-tuning for Text Classification. In Proceedings of the 56th Annual Meeting of the As- sociation for Computational Linguistics, pages 328 -- 339. Sarthak Jain and Byron C. Wallace. 2019. Attention is not Explanation. CoRR, abs/1902.10186. Alistair EW Johnson, David J. Stone, Leo A. Celi, and Tom J. Pollard. 2017. MIMIC-III, a freely accessi- ble critical care database. Nature. Yoon Kim. 2014. Convolutional Neural Networks for Sentence Classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Lan- guage Processing (EMNLP), pages 1746 -- 1751. David D. Lewis, Yiming Yang, Tony G. Rose, and Fan Li. 2004. RCV1: A New Benchmark Collection for Text Categorization Research. Journal Machine Learning Research, 5:361 -- 397. Jingzhou Liu, Wei-Cheng Chang, Yuexin Wu, and Yiming Yang. 2017. Deep Learning for Extreme In Proceedings Multi-label Text Classification. of the 40th International ACM SIGIR Conference on Research and Development in Information Re- trieval, SIGIR '17, pages 115 -- 124. Yang Liu, Chengjie Sun, Lei Lin, and Xiaolong Wang. 2016. Learning Natural Language Inference us- ing Bidirectional LSTM model and Inner-Attention. arXiv preprint arXiv:1605.09090, abs/1605.09090. Christopher D. Manning, Prabhakar Raghavan, and Introduction to Information Hinrich Schtze. 2009. Retrieval. Cambridge University Press. Julian McAuley and Jure Leskovec. 2013. Hidden Factors and Hidden Topics: Understanding Rating In Proceedings of Dimensions with Review Text. the 7th ACM Conference on Recommender Systems, RecSys '13, pages 165 -- 172. Eneldo Loza Mencia and Johannes Frnkranz. 2007. Efficient Multilabel Classification Algorithms for Large-Scale Problems in the Legal Domain. In Pro- ceedings of the LWA 2007, pages 126 -- 132. James Mullenbach, Sarah Wiegreffe, Jon Duke, Jimeng Sun, and Jacob Eisenstein. 2018. Explainable Pre- diction of Medical Codes from Clinical Text. In Proceedings of the 2018 Conference of the NA Chap- ter of the Association for Computational Linguistics: Human Language Technologies, pages 1101 -- 1111. Ramesh Nallapati and Christopher D. Manning. 2008. Legal Docket Classification: Where Machine Learn- ing Stumbles. In EMNLP, pages 438 -- 446. Ioannis Partalas, Aris Kosmopoulos, Nicolas Baskiotis, Thierry Arti`eres, Georgios Paliouras, ´Eric Gaussier, Ion Androutsopoulos, Massih-Reza Amini, and Patrick Gallinari. 2015. LSHTC: A Bench- mark for Large-Scale Text Classification. CoRR, abs/1503.08581. Jeffrey Pennington, Richard Socher, and Christo- pher D. Manning. 2014. GloVe: Global Vectors for Word Representation. In Empirical Methods in Nat- ural Language Processing (EMNLP), pages 1532 -- 1543. Nal Kalchbrenner, Lasse Espeholt, Karen Simonyan, Aaron van den Oord, Alex Graves, and Koray Kavukcuoglu. 2017. Neural Machine Translation In Proceedings of Conference on in Linear Time. Empirical Methods in Natural Language Processing (EMNLP). Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word repre- sentations. In Proceedings of the Conference of NA Chapter of the Association for Computational Lin- guistics. Peng Zhou, Wei Shi, Jun Tian, Zhenyu Qi, Bingchen Li, Hongwei Hao, and Bo Xu. 2016. Attention- Based Bidirectional Long Short-Term Memory Net- works for Relation Classification. In Proceedings of the 54th Annual Meeting of the Association for Com- putational Linguistics (Volume 2: Short Papers), pages 207 -- 212. Arkaitz Zubiaga. 2012. Enhancing Navigation on Wikipedia with Social Tags. CoRR, abs/1202.5469. Yashoteja Prabhu and Manik Varma. 2014. FastXML: A Fast, Accurate and Stable Tree-classifier for Ex- treme Multi-label Learning. In Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD '14, pages 263 -- 272. Anthony Rios and Ramakanth Kavuluru. 2018a. EMR Coding with Semi-Parametric Multi-Head Matching Networks. In Proceedings of the 2018 Conference of the NA Chapter of the Association for Computa- tional Linguistics: Human Language Technologies, pages 2081 -- 2091. Anthony Rios and Ramakanth Kavuluru. 2018b. Few- Shot and Zero-Shot Multi-Label Learning for Struc- In Proceedings of the 2018 tured Label Spaces. Conference on Empirical Methods in Natural Lan- guage Processing, pages 3132 -- 3142. Tim Rocktaschel, Edward Grefenstette, Karl Moritz Hermann, Tom´as Kocisk´y, and Phil Blunsom. 2016. Reasoning about Entailment with Neural Attention. In Proceedings of the 4th International Conference on Learning Representations (ICLR). George Tsatsaronis, Georgios Balikas, Prodromos Malakasiotis, Ioannis Partalas, Matthias Zschunke, Michael R. Alvers, Dirk Weissenborn, Anastasia Krithara, Sergios Petridis, Dimitris Polychronopou- los, Yannis Almirantis, John Pavlopoulos, Nico- las Baskiotis, Patrick Gallinari, Thierry Arti`eres, Axel-Cyrille Ngonga Ngomo, Norman Heino, ´Eric Gaussier, Liliana Barrio-Alvers, Michael Schroeder, Ion Androutsopoulos, and Georgios Paliouras. 2015. An overview of the BIOASQ large-scale biomedical semantic indexing and question answering competi- tion. BMC Bioinformatics, 16(138). Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention Is All You Need. Proceedings of the 31th Annual Confer- ence on Neural Information Processing Systems. Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. 2015. Show, Attend and Tell: Neural Image Caption Generation with Visual At- In Proceedings of the 32nd International tention. Conference on Machine Learning, volume 37, pages 2048 -- 2057. Zichao Yang, Diyi Yang, Chris Dyer, Xiaodong He, Alex Smola, and Eduard Hovy. 2016. Hierarchical Attention Networks for Document Classification. In Proceedings of the 2016 Conference of the NA Chap- ter of the Association for Computational Linguistics: Human Language Technologies, pages 1480 -- 1489. Ronghui You, Suyang Dai, Zihan Zhang, Hiroshi Atten- Mamitsuka, and Shanfeng Zhu. 2018. tionXML: Extreme Multi-Label Text Classification with Multi-Label Attention Based Recurrent Neural Networks. CoRR, abs/1811.01727.
1709.03064
2
1709
2017-11-10T06:13:30
AppTechMiner: Mining Applications and Techniques from Scientific Articles
[ "cs.CL" ]
This paper presents AppTechMiner, a rule-based information extraction framework that automatically constructs a knowledge base of all application areas and problem solving techniques. Techniques include tools, methods, datasets or evaluation metrics. We also categorize individual research articles based on their application areas and the techniques proposed/improved in the article. Our system achieves high average precision (~82%) and recall (~84%) in knowledge base creation. It also performs well in application and technique assignment to an individual article (average accuracy ~66%). In the end, we further present two use cases presenting a trivial information retrieval system and an extensive temporal analysis of the usage of techniques and application areas. At present, we demonstrate the framework for the domain of computational linguistics but this can be easily generalized to any other field of research.
cs.CL
cs
AppTechMiner: Mining Applications and Techniques from Scientific Articles Mayank Singh∗ Soham Dan Sanyam Agarwal Dept. of Computer Science and Engg. Dept. of Computer Science and Engg. Dept. of Computer Science and Engg. IIT Kharagpur, India [email protected] IIT Kharagpur, India [email protected] IIT Kharagpur, India [email protected] 7 1 0 2 v o N 0 1 ] L C . s c [ 2 v 4 6 0 3 0 . 9 0 7 1 : v i X r a Pawan Goyal Animesh Mukherjee Dept. of Computer Science and Engg. Dept. of Computer Science and Engg. IIT Kharagpur, India [email protected] IIT Kharagpur, India [email protected] ABSTRACT (cid:140)is paper presents AppTechMiner, a rule-based information extrac- tion framework that automatically constructs a knowledge base of all application areas and problem solving techniques. Techniques include tools, methods, datasets or evaluation metrics. We also categorize individual research articles based on their application areas and the techniques proposed/improved in the article. Our system achieves high average precision (∼82%) and recall (∼84%) in knowledge base creation. It also performs well in application and technique assignment to an individual article (average accuracy ∼66%). In the end, we further present two use cases presenting a trivial information retrieval system and an extensive temporal anal- ysis of the usage of techniques and application areas. At present, we demonstrate the framework for the domain of computational linguistics but this can be easily generalized to any other (cid:128)eld of research. CCS CONCEPTS •Information systems →Data mining; KEYWORDS Information extraction, application area, techniques, computational linguistic ACM Reference format: Mayank Singh, Soham Dan, Sanyam Agarwal, Pawan Goyal, and Animesh Mukherjee. 2017. AppTechMiner: Mining Applications and Techniques from Scienti(cid:128)c Articles. In Proceedings of WOSP 2017, Toronto, ON, Canada, June 19, 2017, 8 pages. DOI: 10.1145/3127526.3127527 ∗First three authors have equal contribution. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for pro(cid:128)t or commercial advantage and that copies bear this notice and the full citation on the (cid:128)rst page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permi(cid:138)ed. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior speci(cid:128)c permission and/or a fee. Request permissions from [email protected]. WOSP 2017, Toronto, ON, Canada © 2017 ACM. 978-1-4503-5388-5/17/06...$15.00 DOI: 10.1145/3127526.3127527 1 INTRODUCTION It is not uncommon for researchers to envisage an information extraction system for scienti(cid:128)c articles that can answer queries like, (i)What are all the techniques and tools used in Machine Transla- tion?, (ii)Which are the subareas of Computational Linguistics, where Malt Parser is frequently used? etc. However, the meta-information necessary for constructing such a system is rarely available. Each research domain consists of multiple application areas which are typically associated with various techniques used to solve prob- lems in these areas. For instance, two commonly used techniques in Information Extraction are "Conditional Random Fields" and "Hidden Markov Models". Wikipedia lists 32 popular NLP tasks and sub-tasks1. However, to our surprise, we do not (cid:128)nd in this list many trending applications areas, for example, Dialog and In- teractive systems, Social Media, Cognitive Modeling and Psycholin- guistics, etc. In addition, new techniques are continuously being proposed/improved for an application area with time and changing needs. (cid:140)is temporal aspect raises diverse research questions - for example, how techniques for POS tagging varied over time, or, what are the most important areas of Computational Linguistics that have been addressed in the last (cid:128)ve years? (cid:140)is also should be of huge interest for new researchers surveying for an application area. Contributions: In this paper, we introduce AppTechMiner that automatically constructs a knowledge base of all application ar- eas and problem solving techniques using a rule-based approach. Subsequently, the generated knowledge base can be employed in several information retrieval systems to answer aforementioned questions. We demonstrate the current framework construction for the domain of computational linguistics because of the availability of full-text research articles. However, the proposed construction mechanism can be easily generalized to any other (cid:128)eld of research. Next, we de(cid:128)ne two common keywords used in the current paper: Area: Area represents an application area of a particular research domain. Common application areas (herea(cid:137)er wri(cid:138)en in italics) in Computational Linguistics include Machine Translation, Depen- dency Parsing, POS Tagging, Information Extraction, etc. Technique: A tecnhnique represents a tool or method used for a task. (cid:140)is may also include evaluation tool/method. Common examples (herea(cid:137)er wri(cid:138)en within quotes) include "Bleu Score", 1h(cid:138)ps://en.wikipedia.org/wiki/Natural language processing#Major tasks WOSP 2017, June 19, 2017, Toronto, ON, Canada Singh et al. "Rouge Score", "Charniak Parser", "TnT Tagger", etc. Note that tech- nique of one paper can potentially be an area of another paper. For example, in "Training Nonde(cid:128)cient Variants of IBM-3 and IBM-4 for Word Alignment" [23], "Word Alignment" is an area but in "Using Word-Dependent Transition Models in HMM-Based Word Align- ment for Statistical Machine Translation" [9], "Word Alignment" is a technique for Machine Translation. (cid:140)e entire framework is organized into four phases (Section 4): (1) Creation of a ranked list of areas; (2) Categorizing papers on the basis of areas; (3) Creation of a ranked list of techniques; (4) Categorizing papers on the basis of techniques. Key results: We achieve high performance in each of the above phases (see Section 5). (cid:140)e precision of the (cid:128)rst phase is 84% (for top 30 areas) and recall is 87%. For the second phase, the accuracy is 73.3%. (cid:140)e third phase results in a precision and recall of 80% (for top 26 techniques) and 80.7% respectively. In the fourth phase, our system achieves an accuracy of 60%. Use cases: In Section 6, we present two use-cases: (i) construct- ing an information retrieval system, and (ii) analysis of temporal characteristics of techniques associated with an area. We also in- vestigate the temporal variation of the popular areas for speci(cid:128)c conferences, namely, acl and coling. 2 RELATED WORK Extracting application area and techniques is primarily an infor- mation extraction task. Information extraction (IE) from scienti(cid:128)c articles combines approaches from natural language processing and data mining and has generated substantial research interest in recent times. In particular, there has been burgeoning research interest in the domain of biomedical documents. Shah et al. [24] extracted keywords from full text of biomedical articles and claim that there exist a heterogeneity in the keywords from di(cid:130)erent sec- tions. Muller et al. [19] have developed the Textpresso framework, that leverage ontologies for information retrieval and extraction. In a similar work, Fukuda et al. [5] proposed an IE system for protein name extraction. (cid:140)ere has been signi(cid:128)cant work in information extraction in the area of protein structure analysis. Gaizauskas et al. [6] proposed PASTA, an IE system developed and evaluated for the protein structure domain. Friedman et al. [4] have developed a similar system to extract structure information about cellular path- ways using a knowledge model. Biological information extraction has seen extensive work covering diverse aspects with large num- ber of survey papers. Cohen et al.'s [3] survey on biomedical text mining, Krallinger et al.'s [15] survey on information extraction and applications for biology and Wimalasuriya et al. [26] on ontology based information extraction are examples of some of the popular surveys on IE for biomedical domain. Information extraction in other domains has also received an equally strong a(cid:138)ention from researchers. Hyponym relations have been extracted automatically in the celebrated work by Hearst et al. [10]. Caraballo et al. [1] have extended previous work on auto- matically building semantic lexicons to automatic construction of a hierarchy of nouns and their hypernyms. Teufel [25] proposed information management and information foraging for researchers and introduced a new document analysis technique called argu- mentative zoning which is useful for generating user-tailored and task-tailored summaries. Kim et al. [13] and Lopez et al. [16] are two popular works in automatic keyphrase extraction from scien- ti(cid:128)c articles. (cid:139)azvinian et al. [20] have explored summarization of scienti(cid:128)c papers using citation summary networks and citation summarization through keyphrase extraction [21]. Jones [12] introduced an approach for entity extraction from la- beled and unlabeled text. (cid:140)ey proposed algorithms that alternately look at noun phrases and their local contexts to recognize members of a semantic class in context. A relatively recent work by Gupta et al. [8] developed a pa(cid:138)ern learning system with bootstrapped entity extraction. In Gupta et al. [7], the authors investigated the dynamics of a research community by extracting key aspects from scienti(cid:128)c papers and showed how extracting key information helps in analyzing the in(cid:131)uence of one community on another. Jin at al. [11] proposed a supervised sequence labeling system that iden- ti(cid:128)es scienti(cid:128)c terms and their accompanying de(cid:128)nition. We believe that this is the (cid:128)rst a(cid:138)empt to speci(cid:128)cally mine ap- plication areas and techniques from research articles. Instead of complex statistical machine learning models, we employ rule-based approach, preferred in commercial world for information extrac- tion tasks [2]. (cid:140)e proposed construction mechanism can be easily generalized to any other (cid:128)eld of research. 3 DATASET We use ACL Anthology Network [22] dataset which consists of 21,213 full text papers from the domain of computational linguistics and natural language processing. (cid:140)e dataset consists of papers between the years 1965 -- 2013 from 342 ACL venues. 4 METHODOLOGY In this section, we describe methods to construct knowledge base of areas and techniques. As we already pointed out in Section 1, the entire framework is organized in four phases: (1) creation of a ranked list of areas, (2) categorizing papers on the basis of areas, (3) creation of a ranked list of techniques, and (4) categorizing papers on the basis of techniques. Next, we brie(cid:131)y describe these four phases in further details. 4.1 Creation of a ranked list of areas We employ paper title information to extract areas. We use hand- wri(cid:138)en rules to extract phrases which are likely to contain the area names. We observe that some functional keywords, such as, "for", "via", "using" and "with" act as delimiters for such phrases. For example, paper title, "Moses: Open source toolkit for statistical machine translation" [14] represents an instance of the form X for Y, where Y is the application area. We also observe that the phrase succeeding "for" or preceding "using" or both (e.g., in "Decision procedures for dependency parsing using graded constraints" [18]) are likely to contain the name of an area. Seed set creation: We create a seed set of the above functional key- words and use bootstrapped pa(cid:138)ern learning to gather more such words along with areas. We had initially started with seven func- tional keywords and by bootstrapped pa(cid:138)ern learning, augmented this to a (cid:128)nal set of 11 functional keywords. AppTechMiner: Mining Applications and Techniques from Scientific Articles WOSP 2017, June 19, 2017, Toronto, ON, Canada Ranking of the extracted phrases: Even though bootstrapped pa(cid:138)ern learning identi(cid:128)ed potential area names, we observe large amount of noisy phrases such as, "machine translation system combination and evaluation". Here, "machine translation" must be extracted from the surrounding noisy words. We notice that empirical ranking algorithms produce good results in extraction of the exact area names from long phrases. We employ three ranking schemes, described below: • Scheme 1: In this scheme, we rank according to individual n-gram scores. (cid:140)e score of a given n-gram (N ) is calculated as: (1)  ScoreN = countN j countj where, countN represents occurrence count of the N th n-gram and the denominator represents total count of all the n-grams. • Scheme 2: (cid:140)is scheme is very similar to previous scheme with an additional constraint that if the score of an n-gram is greater than both of its border (n − 1) grams, then the border (n − 1) grams are le(cid:137) out. (cid:140)e intuition behind this is as follows: the trigram "word sense disambiguation" will have a higher score than its border bigrams, "word sense" and "sense disambiguation", causing both these bigrams to be le(cid:137) out. • Scheme 3: We improve upon the previous scheme by es- timating di(cid:130)erent threshold scores for each n-gram. (cid:140)e thresholds are selected manually by observing the individ- ual n-gram lists. In Section 5.2, we shall compare the preci- sion of each of these methods and we have (cid:128)nally adopted Scheme 3 since it gives the best results. We present 24 of the top 30 areas judged as accurate by domain experts: Machine Translation, Natural Language Processing, Word Sense Disambiguation, Speech Recognition, (cid:139)estion Answering, Depen- dency Parsing, Information Extraction, Chinese Word Segmenta- tion, Semantic Role Labeling, Information Retrieval, Entity Recog- nition, Word Alignment, Conditional Random Fields, Maximum Entropy, Coreference Resolution, Machine Learning, Dialogue Systems, Textual Entailment, Natural Language Understanding, Active Learning, POS Tagging, Relation Extraction, Sentiment Analysis, Sense Induction 4.2 Categorizing papers on the basis of areas In this phase, we assign individual papers to one of the discovered areas. Individual papers are categorized to their corresponding areas on the basis of two strategies -- direct match and relevance as per the language models, de(cid:128)ned for various areas. Direct match: In the direct match approach, we search for an explicit string match between the title or abstract and one of the areas. In case we do not (cid:128)nd a match in the title, we check for a direct match with the abstract of the paper. If the abstract contains only one such matching area then the paper is categorized to that area. On the other hand, if the title or the abstract contains more than one direct match with the set of area names then we further use the language modeling approach (discussed next) to classify that paper. Language modeling: In this approach, we create a language model for each area, and classify a document into one of these areas. To create a language model for each area, we select the pa- pers which could be classi(cid:128)ed on the basis of a single direct match. (cid:140)e titles and abstracts of all the papers belonging to one area are taken together to construct the language model of that area with the Jelinek-Mercer (JM) smoothing. A document not categorized using direct match is treated as a query, consisting of the words in its title and abstract. A(cid:137)er experimenting on a small set of sample papers, we (cid:128)xed λ for JM smoothing to 0.7 [27]. (cid:140)e prior probability P(a) for an application area a, is proportional to the number of papers which were assigned to that area by a single direct match of either the title or the abstract. Hence, given a query paper q, the area which scores the highest arg max a P(aq) = arg max a P(qa)P(a) (2) is assigned as the area for the given paper. 4.3 Creation of a ranked list of techniques (cid:140)is extraction phase is based on the idea of method papers. We classify a paper as method paper, if it introduces a novel technique or provides a toolkit in an area of computational linguistics. For instance, the paper introducing the Stanford CoreNLP toolkit is one such relevant example. We observe two characteristics for these papers -- one, they are expected to have been cited a number of times which is above some threshold (k1) thus indicating that the technique introduced or improved upon is frequently used and second, the fraction of times they obtain their citations in the "methodology" section of other papers is above some threshold (k2%), thereby, indicating that they are primarily "method papers". In the current framework, we select k1 = 15 and k2 = 50% based on extensive experiments on the AAN dataset. We assume that when citing paper applies a technique from the cited paper, it cites that paper and also mentions the name of the technique in the citation context (i.e., the sentence where the citation is made). Our objective is to extract all the techniques a method paper is used for, from the citation context(s). We now describe the algorithm in detail. For every method paper in the corpora, we extract all the citation contexts where this paper has been cited. We observe that usually the techniques are represented as noun phrases in the citation contexts. For example, in the citation context, "For English, we used the Dan Bikel implementation of the Collins parser (Collins, 2003).", we obtain three noun phrases: 1) Dan Bikel implementation, 2) Collins parser, and 3) Collins. We build a global vector of noun phrases across all citation contexts for all the method papers. We consider this global vector as the ranked list of all the techniques th component used in the computational linguistics domain. (cid:140)e i th noun phrase, ordered of the vector is the raw count of the i lexicographically, over the method citations of the entire corpora. Some of the top ranking noun phrases are: WOSP 2017, June 19, 2017, Toronto, ON, Canada Singh et al. Penn Treebank, Stanford Parser, Rate Training, Berkeley Parser, Machine Translation, Statistical Machine Translation, Charniak Parser, Moses Toolkit, Word Sense Disambiguation, Maximum Entropy, IBM Model, Bleu Score, Perceptron Algorithm, Word Alignment, Stanford POS Tagger, Collins Parser, Natural Language Processing, Bleu Metric, Coreference Resolution, Moses Decoder, Giza++ Toolkit, Brill Tagger, TnT Tagger,Anaphora Resolution, MST Parser, CCG Parser, Malt Parser, Minimum Error Rate Train- ing 4.4 Categorizing papers on the basis of techniques To identify the techniques for which a paper X is used, we extract all the noun phrases present in all the citation context(s) where this paper has been cited. We build a similar vector of these noun th component of the vector is the raw count of phrases where the i that noun phrase drawn from the global vector introduced in the previous section. If a particular noun phrase from the global vector is missing in the citation contexts for X, its weight is set to zero. We take dot product between this local vector of X and the global vector to get a ranked list of possible techniques for X. Finally, we choose top K techniques on this rank list as the techniques the paper X is used for. (cid:140)e four phases resulted into a knowledge base that consists of a list of areas, a mapping between individual papers to the list of areas, a list of techniques and a mapping between individual papers to the list of techniques. We can employ this generated knowledge base in multiple information retrieval tasks. Section 6.1 demonstrate construction of one such IR system. 5 EVALUATION RESULTS In this section, we present extensive evaluations carried out on our proposed system. Section 5.1 discusses general evaluation guidelines along with summary of human judgment experiment se(cid:138)ings. 5.1 Evaluation setup As described in Section 4, the entire framework is organized into four phases. (cid:140)erefore, we evaluate each phase individually using human judgment experiments. For (cid:128)rst and third phase, two subject experts (the (cid:128)rst and the second author) are employed. For second and fourth phase, we (cid:131)oat an online survey among six subject ex- perts (four PhD and two under-graduate students). Each subject expert has evaluated 20 paper-area and ten paper-technique assign- ments. In total, we evaluate 120 paper-area and 60 paper-technique assignments. 5.2 Evaluation of the ranked list of areas First, we conduct experiment to understand the relative perfor- mances of the three schemes described in Section 4.1 for creation of the ranked list. Scheme 3 (80%) outperforms scheme 1 (57%) and 2 (73%) in terms of precision. (cid:140)erefore, we employ scheme 3 for the creation of the ranked list in the subsequent stages. We evaluate the ranked list of the potential areas in the compu- tational linguistics domain extracted from the ACL corpora. We employ precision-recall measures for the purpose of evaluation. For computing recall, however, due to limited human resource for this challenging task of labeling areas for the entire corpus of papers, we select a random set of 200 research papers and manually2 identi(cid:128)ed each of their areas. In total, we (cid:128)nd 23 distinct areas (comparable to Wikipedia list of 32 popular tasks3). Scheme 3 identi(cid:128)ed 20 out of 23 areas, achieving a high recall of 87%. Precision was computed by measuring fraction of correctly iden- ti(cid:128)ed areas in the top K area list. Table 1 presents the values of precision obtained for K = 25, 50, 75 and 100 top application areas. As we can observe, majority of correct areas are ranked higher by our ranking methodology. Precision (%) Areas Techniques K 25 50 75 100 84 72 51 43 80 64 48 41 Table 1: (cid:135)e precision values for K = 25, 50, 75 and 100 for ex- traction of the list of application areas (Scheme 3) and tech- niques. We also employed another domain expert to annotate (cid:128)rst 30 results independent of the (cid:128)rst judge. Inter-annotator agreement (Cohen's kappa coe(cid:129)cient) was calculated and the value of κ came out to be 0.79. (cid:140)e matrix with the agreement/disagreement count between the experts is presented in Table 2. Domain Expert 1 Yes No Total Domain Expert 2 Yes 23 1 24 No 1 5 6 Total 24 6 30 Table 2: (cid:135)e matrix of agreement and disagreement between two domain experts for annotation of area list. 5.3 Evaluating the extraction of areas from individual papers Next, we evaluate our area assignment phase. As described in Sec- tion 5.1, out of the 120 expert assignments, 88 (73.3%) assignments were marked as correct. 5.4 Evaluating the list of techniques (cid:140)is evaluation task is similar to the evaluation of the ranked list of application areas (see Section 5.2). However, in this case, recall calculation is di(cid:129)cult if we work with the top K techniques for each method paper. To simplify the task, we proceed to calculate recall for only the highest ranked technique for each method paper. Again, due to resource constraints, we select a small random set of 30 papers and aggregate all their citation contexts from the method sections of the citing papers. Annotation of this random set resulted into 26 introduced or improved distinct techniques. Technique extraction algorithm obtained 21 out of 26 techniques resulting 2(cid:140)e second author participated in labeling task. 3h(cid:138)ps://en.wikipedia.org/wiki/Natural language processing#Major tasks AppTechMiner: Mining Applications and Techniques from Scientific Articles WOSP 2017, June 19, 2017, Toronto, ON, Canada Domain Expert 1 Yes No Total Domain Expert 2 Yes 18 1 19 No 2 4 6 Total 20 5 25 Table 3: (cid:135)e matrix of agreement and disagreement between two domain experts for annotation of technique list. in a recall of 80.7%. Table 1 shows the precision obtained for the technique extraction algorithm for various values of K. As we can observe, majority of the correct techniques are ranked higher by our ranking algorithm. Here again we asked another domain expert to annotate the results independent of the (cid:128)rst judge. We also calculated the inter-annotator agreement (Cohen's kappa coe(cid:129)cient) for the top 25 techniques and κ came out to be 0.65. (cid:140)e matrix of agree- ment/disagreement counts is presented in Table 3. 5.5 Evaluating the extraction of techniques from a method paper For this evaluation, we employ subject experts as described in Section 5.1. We achieve a moderate accuracy of 60% on set of random 60 paper-techniques assignments. 6 USE CASE In this section, we present two use cases. In the (cid:128)rst use case, we demonstrate construction of an example information retrieval system. In the second use case, we analyze the evolution of the application areas and the corresponding techniques over a given time-period. 6.1 An example information retrieval system We demonstrate the construction of an information retrieval (IR) system that takes area name as an input and outputs a list of tools and techniques. An example of input/output of such IR system could be: Machine Translation → "Word Alignment", "Gale Church Algorithm", "Bleu Score", "Moses Toolkit" etc. We propose a count update based algorithm to construct this IR system. More speci(cid:128)- cally, for each paper P, we (cid:128)nd its area and all the techniques of the method papers that it cites in its methodology section and append all these techniques to the list corresponding to the extracted area for this paper. Result: list of techniques for that area initialization T ← ϕ; for P ∈ Corpus do A ← Area(P) T ← ϕ MSet ← MethodPapersCitedBy(P) for M ∈ MSet do end T(A) ← T(A) ∪ T T ← T ∪ T echnique(M) end Algorithm 1: Algorithm to generate list of techniques given area name. Here, function Area(P) returns area of a paper P. Function Tech- nique(M) returns techniques introduced or improved upon by a method paper M. Function MethodPapersCitedBy(P) returns all the method papers cited by paper P in its methodology section. A simple variation of Algorithm 1 by keeping track of the number of times a particular technique features in an area can potentially trace most popular techniques for an area. In Table 4, we present some of the input/output examples from higher ranked areas of Computational Linguistics. As we see from these examples, the techniques extracted consist of sub-tasks, tools and datasets popularly used in an area. Also, it is interesting to observe that the extracted techniques span a wide range of time, for example, techniques like "Collins Parser", "Berkeley Parser", "Charniak Parser", "Stanford Parser", "MST Parser" and "Malt Parser" are introduced in Dependency Parsing at substantially di(cid:130)erent time periods. 6.2 Temporal Analysis We analyze evolution of application areas and techniques over a given time-period. Below, we present three temporal scenarios. 6.2.1 Evolution of areas. From the list of popular areas (based on the total number of papers published in an area) in aan, we present six representative areas, namely, Machine Translation, Dependency Parsing, Speech Recognition, Information extraction, Summarization and Semantic Role Labeling, and study their popularity (percent- age of papers in that area for that time period out of total papers published in that time period) from 1980-2013 in 5-year windows. Figure 1 demonstrates the temporal variations for these areas and how they evolve with time. Observations: While areas like Machine Translation and Depen- dency Parsing are on the rise, Information extraction and Semantic Role Labeling are on a decline. A further interesting observation is that till 1994, the ACL community had a lot of interest in Speech Recognition which then saw a sharp decline possibly because of the fact that the speech community slowly separated out. Figure 1: Evolution of di(cid:130)erent application areas over time in terms of fraction of publications. Machine Translation and dependency parsing are on the rise, information extrac- tion and semantic role labeling are on a decline. ACL com- munity gradually separates out from Speech community. 1980-19841985-19891990-19941995-19992000-20042005-20092010-2013024681012Papers(%)intheAreaMachineTranslationDependencyParsingSpeechRecognitionInformationExtractionSummarizationSemanticRoleLabeling WOSP 2017, June 19, 2017, Toronto, ON, Canada Singh et al. Area Machine Translation Dependency Parsing Summariza- Multi-document tion Word Sense Disambiguation Sense Induction Opinion Mining Chinese Word Segmentation Techniques Bleu Score, Rate Training, IBM Model, Word Alignment, Moses Toolkit, Inversion Transduction Grammar, Bootstrap Resampling, Translation Model, PennTreebank, Translation (cid:139)ality, Language Model, Gale Church Algorithm Penn Treebank, Malt Parser, Berkeley Parser, MST Parser, Charniak Parser, Collins Parser, Maximum Entropy, Nivre's Arc-Eager, Stanford Parser, Perceptron Algorithm Topic Signatures, Information Extraction, Page Rank, Klsum Summarization System, Mead Summarizer, Word Sense Disambiguation, Lexical Chains, Inverse Sentence Frequency Coarse Senses, Semcor Corpus, Senseval Competitions, Cemantic Similarity, Micro Context, Maximum Entropy, Mutual Information Word Sense Disambiguation, SemEval Word Sense Induction, Chinese Whispers, Recursive Spectral Clustering, Topic Models, Graded Sense Annotation, Ontonotes Project Sentiment Analysis, Mutual Information, Spin Model, Subjectivity Lexicon, Semantic Role Analysis, Multiclass Clasi(cid:128)er, Coreference Resolution, Latent Dirichlet Entity Recognition, Conditional Random Fields, Segmentation Bakeo(cid:130), Stanford Chinese Word Seg- menter, Perceptron Algorithm , Discourse Segmentation, CRF model Table 4: Example application areas and corresponding techniques from AAN dataset AAN 1975-1984 1985-1994 1995-2004 2005-2013 ACL 1975-1984 1985-1994 1995-2004 2005-2013 COLING 1965-1974 1975-1984 1985-1994 1995-2004 Figure 2: Phrase-Clouds representing the proportion of papers for an area across various time periods for the complete AAN dataset as well as ACL and COLING conferences. ACL seems to be more interested in the areas such as Machine Translation and Dependency Parsing over the recent decades. COLING community also seems more interested towards areas like Machine Translation and Dependency Parsing along with Bilingual Lexicon Extraction in the recent decades. 6.2.2 Evolution of major areas in top conferences. We shortlist two top-tier conferences in the computational linguistics domain, namely, the Annual Meeting of the Association of Computational Linguistics (ACL) and the International Conference on Compu- tational Linguistics (COLING). We study 40 years of conference history by dividing into four 10-year buckets. Next, for each con- ference, we extract top ten most popular areas (based on citation AppTechMiner: Mining Applications and Techniques from Scientific Articles WOSP 2017, June 19, 2017, Toronto, ON, Canada counts) for each 10-year bucket. Figure 2 presents phrase clouds rep- resenting evolution of areas in these two conferences in comparison to the full AAN dataset itself. Some of the interesting observations from this analysis are: • Full AAN dataset: Here, we observe that while in the earlier decades, areas such as Semantic Role Labeling, Eval- uation of Natural Language and Speech Recognition were dominant, they fade away in the recent decades. On the other hand, areas such as Machine Translation and Depen- dency Parsing, which were less prevalent in the earlier decades gain signi(cid:128)cant importance in the recent decades. We also see Sentiment Analysis as one of the major areas in the last decade. • ACL: In the earlier decades, this community was interested in areas like Linguistic Knowledge Sources and Semantic Role Labeling. Over the recent decades, however, it seems to be more interested in areas such as Machine Translation and Dependency Parsing. Interestingly, in the time period 2005 -- 2013, an upcoming area of Social Media is found to gain importance. • COLING: Areas like Lexical Semantics and Linguistic Knowl- edge Sources were of interest to the community in the earlier decades. However, in the recent years, areas like Machine Translation, Dependency Parsing and Bilingual Lexicon Ex- traction have gained importance. An interesting observa- tion here is that Semantic Role Labeling has been all through a thrust area for this particular conference. 6.2.3 Evolution of techniques in areas. In the second use case, we study evolution of techniques for a given area. For this analysis, we divide the time-line into (cid:128)xed buckets of 4 − 5 years. Next, for each bucket, we extract popular techniques (based on the number of times any paper has cited that technique) using our proposed system. Table 5 presents the popular techniques for (cid:128)ve example areas. Some of the interesting trends from Table 5 are listed below: • Dependency Parsing: New techniques like "Malt Parser", "Minimum Spanning Tree (MST) Parser", etc. came into existence in 2005 -- 2009. In the next year bucket, these parsers overcome popularity of previous parsers such as "Collin's Parser", "Berkeley Parser" and are almost at par with "Charniak Parser". In addition, we observe that the "Penn Treebank" is extensively used for Dependency Parsing across almost all time periods. • Machine Translation: We found that "Word Alignment" and "Inversion Transduction Grammar" are popular tech- niques for Machine Translation across all time periods. Also, "Bleu Score" has been a popular technique since its intro- duction in 2000 -- 2004. Similarly, "Moses Toolkit" and "IBM Model" are both popular techniques across most time periods. • Sentiment Analysis: In this area, "Mutual Information" and "Word Sense Disambiguation" are popular techniques for most of the time periods. "Latent Dirichlet Allocation" (introduced in 2003) found important use in Sentiment Anal- ysis in 2005 -- 2009. Also the "Spin Model" got popularity in 2005 -- 2009. • Cross Lingual Textual Entailment: "Distributional Sim- ilarity" and "Mutual Information" are important techniques and are popular in multiple time periods. "Verb Ocean" gets popular in 2005 -- 2009 and 2009 -- 2013. It is also very interesting to note that "Machine Translation" is actually an important tool for this area and is very popular in 2005 -- 2009. However, in 2010 -- 2013 its popularity goes down. A probable explanation for this could be the introduction of techniques which perform Cross-lingual Textual Entailment without "Machine Translation" [17]. • Grammatical Error Correction: Techniques to address out-of-Vocabulary (OOV) words have become important in recent times. Over the years, "Collins Parser" got replaced by "Charniak Parser" and (cid:128)nally by "Berkeley Parser". "Penn Treebank" is an important dataset for this area. 7 CONCLUSION AND FUTURE WORK In this paper, we have proposed a rule-based information extraction system to extract application areas and techniques from scienti(cid:128)c articles. (cid:140)e system extracts ranked list of all application areas in the computational linguistics domain. At a more granular level, it also extracts application area for a given paper. We evaluate our system with domain experts and prove that it performs reason- ably well on both precision and recall. As a use case, we present an extensive analysis of temporal variation in popularity of the techniques for a given area. Some of the interesting observation that we make here are that the areas like Machine Translation and Dependency Parsing are on the rise of popularity while areas like Speech Recognition, Linguistic Knowledge Sources and Evolution of Natural Language are on the decline. In future, we plan to work on constructing a multi-level map- ping table that maps application areas to techniques and further techniques to a set of parameters. For example, Machine Translation (application area) has "Bleu Score" as one of its techniques. Bleu Score is a algorithm that takes few input parameters. Changing these parameters will change the outcome of the score. Example of one such parameter is n, which represents the value of n for the n-grams. All our methods can be generalized to domains other than compu- tational linguistics. We plan to build an online version of AppTech- Miner in near future. We also plan to study temporal characteristics of techniques for a given application area to observe if future pre- dictions can be made for a technique - whether its popularity will increase or decrease in the years come. REFERENCES [1] Sharon A Caraballo. 1999. Automatic construction of a hypernym-labeled noun hierarchy from text. In Proceedings of the 37th annual meeting of the Associa- tion for Computational Linguistics on Computational Linguistics. Association for Computational Linguistics, 120 -- 126. [2] Laura Chiticariu, Yunyao Li, and Frederick R. Reiss. 2013. Rule-Based Informa- tion Extraction is Dead! Long Live Rule-Based Information Extraction Systems!. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, EMNLP 2013, 18-21 October 2013, Grand Hya(cid:136) Sea(cid:136)le, Sea(cid:136)le, Wash- ington, USA, A meeting of SIGDAT, a Special Interest Group of the ACL. 827 -- 832. h(cid:138)p://aclweb.org/anthology/D/D13/D13-1079.pdf [3] Aaron M Cohen and William R Hersh. 2005. A survey of current work in biomedical text mining. Brie(cid:128)ngs in bioinformatics 6, 1 (2005), 57 -- 71. [4] Carol Friedman, Pauline Kra, Hong Yu, Michael Krauthammer, and Andrey Rzhetsky. 2001. GENIES: a natural-language processing system for the extraction 1995-1999 Penn Treebank, Probabilis- tic Context Free Grammar, Tree Substitution Grammar, Conditional Random Fields, Dependency Links, Collins Parser Inversion IBM Model, Transduction Grammar, Word Alignment, Sentence Alignment, Moses Toolkit Levenshtein Distance, Dis- course Structure Techniques 2000-2004 Penn Treebank, Collins Parser, Berkeley Parser, Charniak Parser, Maximum Entropy, NEGRA Corpus 2005-2009 Penn Treebank, Charniak Parser, Malt Parser, MST Parser, Berkeley Parser, Stanford CCG Parser, Nivre's arc-eager Parser, Word Alignment, Bleu Score, Inversion Transduc- tion Grammar, Parse-parse- match Approaches Mutual Information, Infor- mation Extraction, Penn Treebank, Distributional Similarity, Statistical Parser Training, Rate IBM Model, Bleu Score, Word Inversion Alignment, Transduction Grammar, Moses Toolkit Mutual Information, Word Sense Disambiguation, Sub- jectivity Lexicon, Latent Dirichlet , Spin Model Singh et al. 2010-2013 Penn Treebank, Malt Parser, MST Parser, Berkeley Parser, Charniak Parser, Stanford Parser, Percep- tron Algorithm, Nivre's arc-eager Bleu Score, Rate Train- ing, Moses Toolkit, Word Alignment, Bootstrap Re- sampling, IBM Model Mutual Information, Word Sense Disambiguation, Sub- jectivity Lexicon, Latent Dirichlet, Polarity Lexicons WOSP 2017, June 19, 2017, Toronto, ON, Canada Area Dependency Parsing Machine Trans- lation Sentiment Anal- ysis Cross-lingual Textual Entail- ment 1990-1994 Dependency Uni(cid:128)ca- tion Grammar, Kasper Algorithm, Le(cid:137) Corner Parser, Inheritence Systems, Eurotra Project Ap- Parse-parse-match Type proaches, Early Deduction, Bo(cid:138)om-up Head Driven Algorithm, Bilingual signs Early Type Deduction Mechanisms, Uni(cid:128)cation Grammars, Sentence Plan Language, Mutual Information, Taxonomy Files Ordinary Dictionary, Text Generation, Dependency Uni(cid:128)cation Grammar, Machine Translation Mutual Information, Man- ual Annotation, Distribu- tional Similarity, Heuristic Approaches Word Sense Disambigua- tion, Machine Translation, Textual Entailment Chal- lenge Semantic Textual Similarity, Verb Ocean, Moses Toolkit, Machine Translation Discourse Structure, Encode TFS, Temporal Information, English Texts, Kappa Coe(cid:129)cient, CUE Phrases Penn Treebank, Preposi- tional Phrase A(cid:138)achment, Collins Parser Probabilistic Context Free Grammars, Parseval Metric, Brill POS Tagger Grammatical English corpus, CLC FCE Error Correc- dataset, OOV words, Berke- tion ley Parser, Charniak Parser Table 5: A few examples of areas and their top techniques for di(cid:130)erent time periods. "Penn Treebank" is extensively used for Dependency Parsing and Grammatical Error Correction across almost all time periods. "Moses Toolkit" and "IBM Model" are both popular techniques across most time periods in Machine Translation. "Mutual information" found important use in Sentiment Analysis. Penn Treebank, Brill Tag- ger, FNTBL Toolkit, Char- niak Parser, Kappa Statistics Penn Treebank, Word Sense Disambiguation, Charniak Parser, OOV words [8] Sonal Gupta and Christopher D Manning. 2014. Spied: Stanford pa(cid:138)ern-based [7] Sonal Gupta and Christopher D Manning. 2011. Analyzing the Dynamics of of molecular pathways from journal articles. Bioinformatics 17, suppl 1 (2001), S74 -- S82. [5] Ken-ichiro Fukuda, Tatsuhiko Tsunoda, Ayuchi Tamura, Toshihisa Takagi, and others. 1998. Toward information extraction: identifying protein names from biological papers. In Pac symp biocomput, Vol. 707. Citeseer, 707 -- 718. [6] Robert Gaizauskas, George Demetriou, Peter J. Artymiuk, and Peter Wille(cid:138). 2003. Protein structures and information extraction from biological texts: the PASTA system. Bioinformatics 19, 1 (2003), 135 -- 143. Research by Extracting Key Aspects of Scienti(cid:128)c Papers.. In IJCNLP. 1 -- 9. information extraction and diagnostics. Sponsor: Idibon 38 (2014). [9] Xiaodong He. 2007. Using word dependent transition models in HMM based word alignment for statistical machine translation. In Proceedings of the Second Workshop on Statistical Machine Translation. Association for Computational Linguistics, 80 -- 87. [10] Marti A. Hearst. 1992. Automatic Acquisition of Hyponyms from Large Text Corpora. In Proceedings of the 14th Conference on Computational Linguistics - Volume 2 (COLING '92). Association for Computational Linguistics, Stroudsburg, PA, USA, 539 -- 545. DOI:h(cid:138)p://dx.doi.org/10.3115/992133.992154 [11] Yiping Jin, Min-Yen Kan, Jun-Ping Ng, and Xiangnan He. 2013. Mining Scienti(cid:128)c Terms and their De(cid:128)nitions: A Study of the ACL Anthology. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, Sea(cid:138)le, Washington, USA, 780 -- 790. h(cid:138)p://www.aclweb.org/anthology/D13-1073 Ph.D. Dissertation. Citeseer. [12] Rosie Jones. 2005. Learning to extract entities from labeled and unlabeled text. [13] Su Nam Kim, Olena Medelyan, Min-Yen Kan, and Timothy Baldwin. 2010. Semeval-2010 task 5: Automatic keyphrase extraction from scienti(cid:128)c articles. In Proceedings of the 5th International Workshop on Semantic Evaluation. Association for Computational Linguistics, 21 -- 26. [14] Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, and others. 2007. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th annual meeting of the ACL on interactive poster and demonstration sessions. Association for Computational Linguistics, 177 -- 180. [15] Martin Krallinger, Alfonso Valencia, and Lyne(cid:138)e Hirschman. 2008. Linking genes to literature: text mining, information extraction, and retrieval applications for biology. Genome biology 9, Suppl 2 (2008), 1 -- 14. [16] Patrice Lopez and Laurent Romary. 2010. HUMB: Automatic key term extraction from scienti(cid:128)c articles in GROBID. In Proceedings of the 5th international workshop on semantic evaluation. Association for Computational Linguistics, 248 -- 251. [17] Yashar Mehdad, Ma(cid:138)eo Negri, and Jos´e Guilherme C de Souza. 2012. FBK: cross- lingual textual entailment without translation. In Proceedings of the First Joint Conference on Lexical and Computational Semantics-Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation. Association for Computational Linguistics, 701 -- 705. [18] Wolfgang Menzel and Ingo Schroder. 1998. Decision procedures for dependency parsing using graded constraints. In in proceedings of ACL'90. Citeseer. [19] Hans-Michael Muller, Arun Rangarajan, Tracy K Teal, and Paul W Sternberg. 2008. Textpresso for neuroscience: searching the full text of thousands of neuroscience research papers. Neuroinformatics 6, 3 (2008), 195 -- 204. [20] Vahed Qazvinian and Dragomir R Radev. 2008. Scienti(cid:128)c paper summarization using citation summary networks. In Proceedings of the 22nd International Con- ference on Computational Linguistics-Volume 1. Association for Computational Linguistics, 689 -- 696. [21] Vahed Qazvinian, Dragomir R Radev, and Arzucan Ozgur. 2010. Citation sum- marization through keyphrase extraction. In Proceedings of the 23rd International Conference on Computational Linguistics. Association for Computational Linguis- tics, 895 -- 903. [22] Dragomir R. Radev, Pradeep Muthukrishnan, and Vahed Qazvinian. 2009. (cid:140)e ACL Anthology Network Corpus. In Proceedings, ACL Workshop on Natural Language Processing and Information Retrieval for Digital Libraries. Singapore. [23] (cid:140)omas Schoenemann. 2013. Training Nonde(cid:128)cient Variants of IBM-3 and IBM-4 for Word Alignment.. In ACL (1). 22 -- 31. [24] Parantu K. Shah, Carolina Perez-Iratxeta, Peer Bork, and Miguel A. Andrade. 2003. Information extraction from full text scienti(cid:128)c articles: Where are the keywords? BMC Bioinformatics 4, 1 (2003), 1 -- 9. DOI:h(cid:138)p://dx.doi.org/10.1186/ 1471-2105-4-20 [25] Simone Teufel and others. 2000. Argumentative zoning: Information extraction from scienti(cid:128)c text. Ph.D. Dissertation. Citeseer. [26] Daya C Wimalasuriya and Dejing Dou. 2010. Ontology-based information extraction: An introduction and a survey of current approaches. Journal of Information Science (2010). [27] Chengxiang Zhai and John La(cid:130)erty. 2004. A study of smoothing methods for lan- guage models applied to information retrieval. ACM Transactions on Information Systems (TOIS) 22, 2 (2004), 179 -- 214.
1903.07917
1
1903
2019-03-19T10:18:57
CVIT-MT Systems for WAT-2018
[ "cs.CL" ]
This document describes the machine translation system used in the submissions of IIIT-Hyderabad CVIT-MT for the WAT-2018 English-Hindi translation task. Performance is evaluated on the associated corpus provided by the organizers. We experimented with convolutional sequence to sequence architectures. We also train with additional data obtained through backtranslation.
cs.CL
cs
CVIT-MT Systems for WAT-2018 Jerin Philip†, Vinay P. Namboodiri‡ and C.V. Jawahar† † CVIT, IIIT Hyderabad, ‡ IIT-Kanpur [email protected] [email protected], [email protected] Abstract This document describes the machine trans- lation system used in the submissions of IIIT-Hyderabad (CVIT-MT) for the WAT-2018 English-Hindi translation task. Performance is evaluated on the associated corpus provided by the organizers. We experimented with con- volutional sequence to sequence architectures. We also train with additional data obtained through backtranslation. for for 2018(Nakazawa et al., 2018) the Hindi- English and English-Hindi translation tasks of the mixed domain tasks. In Section 2, we describe the components constituting our pipeline, following which in Section 3 we provide the details of the data used and procedure used for the training. Section 4 summarizes our results for WAT-2018. Finally in Section 5 we include additional results using newer architectures. We conclude our observations in Sec- tion 6. 1 Introduction 2 System Description Innovations in Neural Machine Translation (NMT) have led to success in many machine transla- tion tasks, often outperforming Statistical Ma- chine Translation (SMT) techniques. Similar to many other language pairs, NMT based approaches have been attempted for the English-Hindi lan- guage pair as well (e.g. the WAT-2017 submission (Wang et al., 2017)). Hindi continue to remain as a low resource language demanding further attention from Natural Language Processing (NLP, Machine Learning ML and other related communities. The Hindi-English pair has limited availability of sen- tence level aligned bitext as parallel corpora. Lack of sufficient data for Indian languages mo- tivated us to explore techniques that can help in low-resource situations. Recent works (such as (Edunov et al., 2018; Lample et al., 2018)) point to the use of iterative backtranslation to improve trans- lation in low resource languages or under the un- availability of parallel corpora. This paper describes an overview of the sub- mission from IIIT Hyderabad (CVIT-MT) in WAT- In this section, we describe the details associated with the tokenization, architecture and data augmen- tation. These are the three components that helped in obtaining superior results on the corpus provided by the organizers of WAT-2018. 2.1 Tokenization A popular method of addressing rare-words with- out compromising coverage of the entire corpus was Byte Pair Encoding (BPE) (Sennrich et al., 2016b), which used a deterministic greedy compression based algorithm to bring the vocabulary down to a finite feasible value. SentencePiece (Kudo, 2018) builds on top of byte pair encoding. Unlike BPE, which is agnostic to lan- guage, SentencePiece gives the most likely deriva- tion of a sentence composed of subword units. This setting reduces to character level in case a com- pletely unknown sentence/word is provided, and the translation model also learns to transliterate. We use SentencePiece for its merits mentioned above. 2.2 Convolutional Sequence to Sequence 3 Experimental Setup Learning In our submission, we employ the Convolutional Sequence to Sequence architecture (CONVS2S) (Gehring et al., 2017). CONVS2S follows an en- coder decoder architecture. This has the advan- tage of being faster than the popular Recurrent Neu- ral Network (RNN) based encoder decoder architec- tures with attention. This is because the context is built through multiple inputs stacking k convolution blocks (O( n k )) with the ability to build in parallel representations for multiple parts of the sentence, unlike through time in the RNN (O(n)). A 1-D convolutional filter of width w with two the output sliding over the embed- channels at dings of the text inputs constitute a basic con- volutional block. Output of one channel builds up context representation and the other is used to enable gating through Gated Linear Units (GLUs) (Dauphin et al., 2017). The encoder is constructed by stacking k of the above setup, creating a receptive field controlled by w and k. The decoder is similar to the encoder in architecture, with a fully connected layer projecting output to vocabulary size. 2.3 Backtranslation Backtranslation is a widely tried and tested data augmentation method, proposed for aiding NMT in languages low on parallel resources using available monolingual data by Sennrich et. al (2016a). The method works by first training a model in the low to high resource direction followed by using this model on monolingual data. The process provides more authentic sentences in the resource-scarce lan- guage and close approximation of its translation in the high resource language. It has been empirically shown that synthetic data alone generated through backtranslation can attain upto 83% of the perfor- mance using proper bitext (Edunov et al., 2018). 3.1 Dataset In our experiments, we use the training data pro- vided by organizers. In addition, we also use data obtained from translated Hindi content available on Internet. Top level statistics of the data used are pro- vided in Table 1. Dataset Pairs Tokens IITB train IITB train† National News Backtranslated IITB dev IITB test 1,492,827 923,377 2,495,129 5,653,644 505 2,507 hi en 22.2M 20.6M 20.3M 18.9M 41.2M 39.0M 77.5M 91.9M 10,174 10,656 49,394 57,037 Table 1: Descriptions of the corpora used, IITB train† is a filtered version of the IITB train corpus. The training corpus provided by the organizers, hereafter denoted by IITB-corpus consists of data from mixed domains. There are roughly 1.5M sam- ples in training data from diverse sources, while the development and test sets are from newspaper crawls. In addition to this, monolingual data col- lected by the organizers from several sources are used in our backtranslation enabled attempts at train- ing an NMT system. There are 45M samples in the monolingual corpus provided. We enhanced the training data with additional pairs, but automatically translated. Note that no manual translation was used to create additional data. We obtain 2.5M Hindi sentences automatically translated to English from newspapers and similar resources, obtained from Internet. This data is some what domain specific. They are primarily, from news articles related to national news. This is men- tioned as National News in Table 1. In the next section, we describe how the compo- nents explained above are implemented and used in training - including generating dataset, preprocess- ing and filtering the training samples, hyperparame- ters of the architectures in place and evaluations. We also create a parallel corpus through back- translation using the organizers monolingual Hindi data hereafter denoted by Backtranslated, the details of which are also included in Table 1 and the meth- ods of creation elaborated in Section 3.3. 3.2 Data Processing We train separate SentencePiece models using offi- cial implementation available online 1 with vocabu- lary restricted to 8000 units to function as a learned tokenizer for both English and Hindi. We use the un- igram model, which gives language aware tokeniza- tion. To filter any noisy content from IITB corpus, langdetect2 and removed every pair which had prob- ability of being in the respective language less than 0.95. This gave us roughly 0.92M pairs for train- ing, from IITB corpus and is indicated as IITB train† in Table 1. English data is kept true-cased, which we found to have better results consistently with our NMT model. 3.3 Training In our experiments we use the fairseq 3 toolkit. For the tasks in this submission we use the CONVS2S model. The encoder and decoder embeddings have a di- mension of 512. The hidden units in the encoder and decoder are also 512 dimensional, following Gehring et. al (2017). We use convolutional filters of width 3 and 20 layers stacked for both the en- coder and decoder. A dropout with probability 0.1 is put in-place right after the embeddings layer for better generalization. The training is run in batches of maximum 4000 tokens at a time, which is on an average 140 sample sentences per batch. The model is trained to minimize the categorical cross-entropy loss at the token level using Nestorov accelerated gradient descent. Decoding is performed through beam search with a beam width of 10. We run training using four NVIDIA 1080Ti-s until validation loss hasn't improved for 3 epochs straight. The training time was roughly 2 days and stopping around 30-40 epochs. We keep our model hyperparameters constant as specified across experiments and work with different combinations of corpora created from augmenting the National News dataset and official parallel cor- pora. For creating the Backtranslated corpus, we use a model trained to translate from Hindi to English 1https://github.com/google/sentencepiece 2https://github.com/Mimino666/langdetect 3http://github.com/pytorch/fairseq (for- merly fairseq-py) using both National News and IITB corpus. We fil- ter the obtained pairs using confidence of translation obtained from the beam-score and further to pairs with a length between 10 and 30 tokens. 3.4 Evaluations (Papineni et al., 2002), report Bilingual Evaluation Understudy Rank-based (RIBES) Adequacy-fluency met- for all our from WAT-2018 human We (BLEU) Intuitive Bilingual Evaluation Score (Isozaki et al., 2010), rics (AM-FM) attempts evaluations(Human in Table 2) when available. (Banchs et al., 2015) and scores BLEU is computed as the geometric mean of un- igram, bigram, trigram and 4-gram precision multi- plied by a brevity penalty (BP). BLEU ranges from 0 to 1, but the values reported in Tables 2 and 3 are in percentages. RIBES, also giving a value in [0, 1] was proposed to tackle shortcomings of BLEU in distant language pairs, where changes in word ordering de- teriorates BLEU. 4 Discussions The results using our systems for WAT-2018 are pre- sented in Table 2 (see some additional results in Ta- ble 3). The first part of the table consists of results on combinations of datasets and augmentations. All values are for models trained from scratch. In the second part, the current leader board is indicated for comparison. Note that entries in this part don't cor- respond to a single submission, but the values corre- sponding to the best in the respective metric. Our submission based on the combination Na- tional News and IITB corpus tops human evalua- tion in Hindi to English, and ranks second in En- glish to Hindi. We demonstrate the possibility of distilling knowledge of online available sources into a usable translation model. We successfully use the CONVS2S architecture along with SentencePiece to obtain results comparable to the top submissions. Our experiments also indicates data augmentation using backtranslation positively works for the Hindi- English pair. 5 Additional Transformer Experiments In this section, we present a set of experiments and results post WAT-2018 involving the Transformer Dataset en-hi hi-en IITB train† National News +IITB train† Backtranslated 2017 Best 2018 Best BLEU 13.25 18.77 19.69 16.77 21.39 20.28 RIBES 0.695113 0.748008 0.758365 0.714197 0.749660 0.761582 AM-FM Human BLEU 11.83 0.647220 19.53 0.697630 0.699810 20.63 0.664330 69.50 50.50 - - - RIBES 0.675462 0.745764 0.751883 AM-FM Human 0.572900 0.614260 0.623240 72.25 - - - - 0.688770 0.704220 64.50 77.00 22.44 17.80 0.750921 0.731727 0.629530 0.611090 - 68.25 67.25 Table 2: Quantitative results of translating English to Hindi and vice versa. Architecture (Vaswani et al., 2017). Two variants of the architecture - Transformer Base and Transformer Big outperformed then state of the art CONVS2S models in the WMT German-English and French- English translation tasks. We used the Transformer-Base architecture in fur- ther experiments with the National News + IITB cor- pus where CONVS2S performed the best, with the rest of the pipeline being kept same as described be- fore. We went with the default hyperparameters pro- vided by fairseq framework - which did not give us impressive results. Following Popel and Bojar (2018), we modified the hyperparameters for initial warm-up steps of 16000 without any learning rate decay, starting from a learning rate of 0.25, followed by an exponen- tial decay of learning rate. We also had to enable delayed gradient updates (Ott et al., 2018) to simu- late a larger batch on smaller GPU before the model demonstrated any learning. During inference time, we averaged checkpoints of the model at different epochs once the loss on the development set had plateaued to obtain better results than a single check- point. Architecture BLEU 19.69 CONVS2S 21.10 Transformer 21.57 +Averaging RIBES 0.758365 0.771549 0.773923 AM-FM 0.699810 0.712200 0.712110 Table 3: Transformer-Base vs CONVS2S on National News + IITB corpus, for English to Hindi direction. In Table 3, we compare the performance of the transformer with that CONVS2S. Consistent with observations in languages like German-English and French-English, the transformer network produces better results than CONVS2S on all metrics. The av- eraged model performs the best in all metrics in En- glish to Hindi translation task, at the time of writing this paper. 6 Observations We believe that NMT is a promising approach for Indian language machine translation for obtaining reasonably accurate solutions. Our initial results re- ported here confirms this. In addition, we believe, the popular data augmentation methods are effective and feasible for many low-resource machine trans- lation settings. We see the direct utility of the ad- vances in NMT for many western language pairs on English-Hindi in terms of ideas and architectures. At the same time, we also believe, there is much more to do for making them effective on Indian languages. Acknowledgments We thank the organizers for systematically setting up this task, and for the very useful resources. We also thank the larger language processing group at IIIT Hyderabad for the encouragement, support and insights. References [Banchs et al.2015] Rafael E Banchs, Luis F D'Haro, and Haizhou Li. 2015. Adequacy-fluency metrics: Eval- uating MT in the continuous space model framework. IEEE/ACM Transactions on Audio, Speech and Lan- guage Processing (TASLP), 23(3):472 -- 482. [Dauphin et al.2017] Yann N Dauphin, Angela Fan, Michael Auli, and David Grangier. 2017. Language Modeling with Gated Convolutional Networks. In In- ternational Conference on Machine Learning, pages 933 -- 941. tion for Computational Linguistics (Volume 1: Long Papers), volume 1, pages 86 -- 96. [Sennrich et al.2016b] Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016b. Neural Machine Translation of Rare Words with Subword Units. In Proceedings of the 54th Annual Meeting of the Association for Com- putational Linguistics (Volume 1: Long Papers), vol- ume 1, pages 1715 -- 1725. [Vaswani et al.2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural In- formation Processing Systems, pages 5998 -- 6008. [Wang et al.2017] Boli Wang, Zhixing Tan, Jinming Hu, Yidong Chen, et al. 2017. XMU neural machine trans- lation systems for WAT 2017. In Proceedings of the 4th Workshop on Asian Translation (WAT2017), pages 95 -- 98. [Edunov et al.2018] Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018. Understanding Back-Translation at Scale. In Proceedings of the 2018 Conference on Empirical Methods in Natural Lan- guage Processing, pages 489 -- 500. [Gehring et al.2017] Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. 2017. Convolutional Sequence to Sequence Learning. In In- ternational Conference on Machine Learning, pages 1243 -- 1252. [Isozaki et al.2010] Hideki Isozaki, Tsutomu Hirao, Kevin Duh, Katsuhito Sudoh, and Hajime Tsukada. 2010. Automatic evaluation of translation quality for distant language pairs. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, pages 944 -- 952. Association for Computational Linguistics. 2018. Subword regulariza- tion: Improving neural network translation models with multiple subword candidates. In Proceedings of the 56th Annual Meeting of the Association for Com- putational Linguistics (Volume 1: Long Papers), pages 66 -- 75. Association for Computational Linguistics. [Kudo2018] Taku Kudo. [Lample et al.2018] Guillaume Lample, Alexis Conneau, Ludovic Denoyer, and Marc'Aurelio Ranzato. 2018. Unsupervised machine translation using monolingual corpora only. In International Conference on Learn- ing Representations (ICLR). [Nakazawa et al.2018] Toshiaki Nakazawa, Shohei Hi- gashiyama, Chenchen Ding, Raj Dabre, Anoop Kunchukuttan, Win Pa Pa, Isao Goto, Hideya Mino, Katsuhito Sudoh, and Sadao Kurohashi. 2018. Overview of the 5th workshop on asian translation. In Proceedings of the 5th Workshop on Asian Translation (WAT2018), Hong Kong, China, December. [Ott et al.2018] Myle Ott, Sergey Edunov, David Grang- ier, and Michael Auli. 2018. Scaling neural machine translation. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 1 -- 9. Association for Computational Linguistics. [Papineni et al.2002] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. BLEU: a method for automatic evaluation of machine transla- tion. In Proceedings of the 40th annual meeting on association for computational linguistics, pages 311 -- 318. Association for Computational Linguistics. [Popel and Bojar2018] Martin Popel and Ondrej Bojar. 2018. Training Tips for the Transformer Model. The Prague Bulletin of Mathematical Linguistics, pages 43 -- 70. [Sennrich et al.2016a] Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016a. Improving Neural Machine Translation Models with Monolingual Data. In Pro- ceedings of the 54th Annual Meeting of the Associa-
1807.11243
2
1807
2018-10-25T08:54:52
Active Learning for Interactive Neural Machine Translation of Data Streams
[ "cs.CL" ]
We study the application of active learning techniques to the translation of unbounded data streams via interactive neural machine translation. The main idea is to select, from an unbounded stream of source sentences, those worth to be supervised by a human agent. The user will interactively translate those samples. Once validated, these data is useful for adapting the neural machine translation model. We propose two novel methods for selecting the samples to be validated. We exploit the information from the attention mechanism of a neural machine translation system. Our experiments show that the inclusion of active learning techniques into this pipeline allows to reduce the effort required during the process, while increasing the quality of the translation system. Moreover, it enables to balance the human effort required for achieving a certain translation quality. Moreover, our neural system outperforms classical approaches by a large margin.
cs.CL
cs
Active Learning for Interactive Neural Machine Translation of Data Streams ´Alvaro Peris and Francisco Casacuberta Pattern Recognition and Human Language Technology Research Center Universitat Polit`ecnica de Val`encia, Val`encia, Spain {lvapeab, fcn}@prhlt.upv.es 8 1 0 2 t c O 5 2 ] L C . s c [ 2 v 3 4 2 1 1 . 7 0 8 1 : v i X r a Abstract We study the application of active learning techniques to the translation of unbounded data streams via interactive neural machine translation. The main idea is to select, from an unbounded stream of source sentences, those worth to be supervised by a human agent. The user will interactively translate those samples. Once validated, these data is useful for adapt- ing the neural machine translation model. We propose two novel methods for selecting the samples to be validated. We exploit the information from the attention mechanism of a neural machine translation system. Our ex- periments show that the inclusion of active learning techniques into this pipeline allows to reduce the effort required during the pro- cess, while increasing the quality of the trans- lation system. Moreover, it enables to balance the human effort required for achieving a cer- tain translation quality. Moreover, our neural system outperforms classical approaches by a large margin. 1 Introduction The translation industry is a high-demand field. Large amounts of data must be translated on a reg- ular basis. Machine translation (MT) techniques greatly boost the productivity of the translation agencies (Arenas, 2008). However, despite the re- cent advances achieved in this field, MT systems are still far to be perfect and make errors. The correction of such errors is usually done in a post- processing step, called post-editing. This requires a great effort, as it needs from expert human su- pervisors. The requirements of the translation industry have increased in the last years. We live in a global world, in which large amounts of data must be pe- riodically translated. This is the case of the Euro- pean Parliament, whose proceedings must be reg- ularly translated; or the Project Syndicate1 plat- form, which translates editorials from newspapers to several languages. In these scenarios, the sen- tences to be translated can be seen as unbounded streams of data (Levenberg et al., 2010). When dealing with such massive volumes of data, it is prohibitively expensive to manually re- vise all the translations. Therefore, it is manda- tory to spare human effort, at the expense of some translation quality. Hence, when facing this sit- uation, we have a twofold objective: on the one hand, we aim to obtain translations with the high- est quality possible. On the other hand, we are constrained by the amount of human effort spent in the supervision and correction process of the translations proposed by an MT system. The active learning (AL) framework is well- suited for these objectives. The application of AL techniques to MT involve to ask a human or- acle to supervise a fraction of the incoming data (Bloodgood and Callison-Burch, 2010). Once the human has revised these samples, they are used for improving the MT system, via incremental learning. Therefore, a key element of AL is the so-called sampling strategy, which determines the sentences that should be corrected by the human. Aiming to reduce the human effort required during post-editing, other alternative frameworks have been study. A successful one is the interactive-predictive machine translation (IMT) paradigm (Foster et al., 1997; Barrachina et al., 2009). In IMT, human and MT system jointly collaborate for obtaining high-quality translations, while reducing the human effort spent in this pro- cess. In this work, we explore the application of NMT to the translation of unbounded data streams. We apply AL techniques for selecting the instances to 1www.project-syndicate.org be revised by a human oracle. The correction pro- cess is done by means of an interactive-predictive NMT (INMT) system, which aims to reduce the human effort of this process. The supervised sam- ples will be used for the NMT system to incremen- tally improve its models. To the best of our knowl- edge, this is the first work that introduces an INMT system into the scenario involving the translation of unbounded data. Our main contributions are: • We study the application of AL on an INMT framework when dealing with large data streams. We introduce two sampling strate- gies for obtaining the most useful samples to be supervised by the human. We compare these techniques with other classical, well- performing strategies. • We conduct extensive experiments, analyzing the different sampling strategies and studying the amount of effort required for obtaining a certain translation quality. • The results show that AL succeeds at improv- ing the translation pipeline. The translation systems featuring AL have better quality and require less human effort in the IMT process than static systems. Moreover, the applica- tion of the AL framework allows to obtain a balance between translation quality and ef- fort required for achieving such quality. This balance can be easily tuned, according to the needs of the users. • We open-source our code2 and use publicly- available corpora, fostering further research on this area. 2 Related work The translation of large data streams is a prob- lem that has been thoroughly studied. Most works aim to continuously modify the MT sys- tem as more data become available. These mod- ifications are usually performed in an incremen- tal way (Levenberg et al., 2010; Denkowski et al., 2014; Turchi et al., 2017), learning from user post-edits. This incremental learning has also been applied to IMT, either to phrase-based statistical machine translation (SMT) systems (Nepveu et al., 2004; Ortiz-Mart´ınez, 2016) or NMT (Peris and Casacuberta, 2018b). 2The source code can be found at: http://github.com/lvapeab/nmt-keras. The translation of large volumes of data is a scenario very appropriate for the AL frame- work (Cohn et al., 1994; Olsson, 2009; Settles, 2009). The application of AL to SMT has been studied for pool-based (Haffari et al., 2009; Bloodgood and Callison-Burch, 2010) and stream-based (Gonz´alez-Rubio et al., 2011) se- tups. Later works (Gonz´alez-Rubio et al., 2012; Gonz´alez-Rubio and Casacuberta, 2014), com- bined AL together with IMT, showing that AL can effectively reduce the human effort required for achieving a certain translation quality. All these works were based on SMT sys- tems. However, the recently introduced NMT paradigm (Sutskever et al., 2014; Bahdanau et al., 2015) has irrupted as the current state-of-the-art for MT (Bojar et al., 2017). Several works aimed at building more productive NMT systems. Re- lated to our work, studies on interactive NMT systems (Knowles and Koehn, 2016; Peris et al., 2017; Hokamp and Liu, 2017) proved the effi- cacy of this framework. A body of work has been done aiming to build adaptive NMT systems, which continuously learn from human correc- tions (Turchi et al., 2017; Peris and Casacuberta, 2018b). Recently, Lam et al. (2018) applied AL techniques to an INMT system, for deciding whether the user should revise a partial hypothe- sis or not. However, to our knowledge, a study on the use of AL for NMT in a scenario of translation of unbounded data streams is still missing. 3 Neural machine translation the goal NMT is a particular case of sequence-to-sequence learning: given a sequence of words from the is to generate an- source language, other sequence of words in the target lan- guage. This is usually done by means of an encoder -- decoder architecture (Sutskever et al., In this work, 2014; Vaswani et al., 2017). we use a recurrent encoder -- decoder system with long short-term memory (LSTM) units (Hochreiter and Schmidhuber, 1997) and an atten- tion mechanism (Bahdanau et al., 2015). Each element from the input sequence is pro- jected into a continuous space by means of an embedding matrix. The sequence of em- beddings is then processed by a bidirectional (Schuster and Paliwal, 1997) LSTM network, that concatenates the hidden states from forward and backward layers and produces a sequence of an- notations. The decoder is a conditional LSTM (cLSTM) network (Peris and Casacuberta, 2018b). A cLSTM network is composed of several LSTM transition blocks with an attention mechanism in between. We use two LSTM blocks. The output of the decoder is combined to- gether with the attended representation of the in- put sentence and with the word embedding of the word previously generated in a deep output layer (Pascanu et al., 2014). Finally, a softmax layer computes a probability distribution over the target language vocabulary. is descent gradient The model stochastic jointly trained by means of (SGD) (Robbins and Monro, 1951), aiming to mini- mize the cross-entropy over a bilingual training corpus. SGD is usually applied to mini-batches of data; but it can be also applied sample-to-sample, allowing the training of the NMT system in an incremental way (Turchi et al., 2017). For decoding, the model uses a beam search method (Sutskever et al., 2014) for obtaining the most probable target sentence y, given a source sentence x: y = arg max p(y x) (1) y Source (x): They are lost forever . Target (y): Ils sont perdus `a jamais . IT-0 MT Ils sont perdus pour toujours . IT-1 User Ils sont perdus `a pour toujours . MT Ils sont perdus `a jamais . IT-2 User Ils sont perdus `a jamais . Figure 1: IMT session to translate a sentence from English to French. IT- is the number of iterations of the process. The MT row shows the MT hy- pothesis in the current iteration. In the User row is the feedback introduced by the user: the corrected character (boxed). We color in green the prefix that the user inherently validated with the charac- ter correction. where yp is the validated prefix provided by the user and x is the source sentence. Note that this expression is similar to Eq. (1). The difference is that now, the search space is the set of suffixes that complete yp. For NMT systems, Eq. (2) is implemented constrained by the pre- (Peris et al., 2017; as a beam search, fix provided by the user Peris and Casacuberta, 2018b). 3.1 Interactive machine translation 4 Active learning in machine translation As previously discussed, MT systems are not per- fect. Their outputs must be corrected by a human agent in a post-editing stage, in order to achieve high-quality translations. The IMT framework constitutes a more effi- In a cient alternative to the regular post-editing. nutshell, IMT consists in an iterative process in which, at each iteration, the user introduces a cor- rection to the system hypothesis. The system takes into account the correction and provides an alter- native hypothesis, considering the feedback from the user. In this work, we use a prefix-based IMT pro- tocol: the user corrects the left-most wrong char- acter of the hypothesis. With this action, the user has also validated a correct prefix. Then, the sys- tem must complete the provided prefix, generating a suitable suffix. Fig. 1 shows an example of the prefix-based IMT protocol. More formally, the expression for computing the most probable suffix (ys) is: ys = arg max p(ys x, yp) (2) ys potentially dealing with unbounded When it becomes prohibitively expensive to datasets, manually supervise all the translations. Aiming to address this problem, in the AL framework, a sampling strategy selects a subset of sentences worth to be supervised by the user. Once cor- rected, the MT system adapts its models with these samples. data is streams Therefore, applied as the AL protocol to follows unbounded (Gonz´alez-Rubio et al., 2012): first, we re- trieve from the data stream S a block B of consecutive sentences, with the function getBlockFromStream(S). According to the sampling(B, ε) function, we select from B a subset V of ε instances, worth to be supervised by the user. See Section 5 for deeper insights on the sampling functions used in this work. These sampled sentences are interactively translated together with the user (Section 3.1). This process is done in the function INMT(θ, x, y). Once the user translates via INMT a source sentence x, a correct translation y is obtained. Then, we Algorithm 1: Active learning for unbounded data streams with interactive neural machine translation. input : θ (NMT model) S (stream of source sentences) ε (effort level desired) auxiliar : B (block of source sentences) V ⊆ B (sentences to be supervised by the user) 1 begin 2 3 4 5 6 7 8 9 10 11 12 13 14 15 repeat B = getBlockFromStream(S); V = sampling(B, ε); foreach x ∈ B do y = translate(θ, x); if x ∈ V then y = INMT(θ, x, y); θ = update(θ, (x, y)); output(y); else output(y); end end until S 6= ∅; 16 end use the pair (x, y) to retrain the parameters θ from the NMT model, via SGD. This is done with the function update(θ, (x, y)). Therefore, the NMT system is incrementally adapted with new data. The sentences considered unworthy to be supervised are automatically translated according to according Eq. (1), with the function translate(θ, x). Once we finish the translation of the current block B, we start the process again. Algorithm 1 details the full procedure. 5 Sentence sampling strategies One of the key elements of AL is to have a mean- ingful strategy for obtaining the most useful sam- ples to be supervised by the human agent. This re- quires an evaluation of the informativeness of un- labeled samples. The sampling strategies used in this work belong to two major frameworks: un- certainty sampling (Lewis and Catlett, 1994) and query-by-committee (Seung et al., 1992). As baseline, we use a random sampling strat- egy: sentences are randomly selected from the data stream S. Although simple, this strategy usu- ally works well in practice. In the rest of this sec- tion, we describe the sampling strategies used in this work. 5.1 Uncertainty sampling The idea behind this family of methods is to se- lect those instances for which the model has the least confidence to be properly translated. There- fore, all techniques compute, for each sample, an uncertainty score. The selected sentences will be those with the highest scores. Quality estimation sampling A common and effective way for measuring the uncertainty of a MT system is to use con- fidence estimation (Gandrabur and Foster, 2003; Blatz et al., 2004; Ueffing et al., 2007). The idea is to estimate the quality of a translation according to confidence scores of the words. More specifically, given a source sentence x = x1, . . . , xJ and a translation hypothesis y = y1, . . . , yI , a word confidence score (Cw) as com- puted as (Ueffing and Ney, 2005): Cw(x, yi) = max 0≤j≤J p(yixj) (3) where p(yixj) is the alignment probability of yi and xj, given by an IBM Model 2 (Brown et al., 1993). x0 denotes the empty source word. The choice of the IBM Model 2 is twofold: on the one hand, it is a very fast method, which only requires to query in a dictionary. We are in an interactive framework, therefore speed becomes a crucial re- quirement. On the other hand, its performance is close to more complex methods (Blatz et al., 2004; Dyer et al., 2013). Following Gonz´alez-Rubio et al. (2012), the uncertainty score for the quality estimation sam- pling is defined as: Cqe(x, y) = 1 − {yi ∈ yCw(x, yi) > τw} y (4) where τw is a word confidence threshold, adjusted · denotes according to a development corpus. the size of a sequence or set. Coverage sampling One of the main issues suffered by NMT sys- tems is the lack of coverage: the NMT system may not translate all words from a source sen- tence. This results in over-translation or under- translation problems (Tu et al., 2016). We propose to use the translation coverage as a measure of the uncertainty suffered by the NMT system when translating a sentence. There- fore, we modify the coverage penalty proposed by Wu et al. (2016), for obtaining a coverage-based uncertainty score: Ccov(x, y) = Px j=1 log (cid:0) min(Py i=1 αi,j, 1)(cid:1) x (5) where αi,j is attention probability of the i-th target word and the j-th source word. Attention distraction sampling When generating a target word, an attentional NMT system should attend on meaningful parts of the source sentence. If the system is translating an uncertain sample, its attention mechanism will be distracted. That means, dispersed throughout the source sequence. A sample with a great dis- traction will feature an attention probability distri- bution with heavy tails (e.g. a uniform distribu- tion). Therefore, for the attention distraction sam- pling strategy, the sentences to select will be those with highest attention distraction. For computing a distraction score, we compute the kurtosis of the weights given by the attention model for each target word yi: Kurt(yi) = 1 x Px x Px (cid:0) 1 j=1(αi,j − 1 j=1(αi,j − 1 x )4 x )2(cid:1)2 (6) being, as above, αi,j the weight assigned by the attention model to the j-th source word when de- coding the i-th target word. Note that, by construc- tion of the attention model, 1 x is equivalent to the mean of the attention weights of the word yi. Since we want to obtain samples with heavy tails, we average the minus kurtosis values for all words in the target sentence, obtaining the atten- tion distraction score Cad: Cad(x, y) = Py i=1 −Kurt(yi) y (7) 5.2 Query-by-committee This framework maintains a committee of mod- els, each one able to vote for the sentences to be selected. The query-by-committee (QBC) method selects the samples with the largest dis- agreement among the members of the commit- tee. The level of disagreement of a sample x measured according to the vote-entropy function (Dagan and Engelson, 1995): Cqbc(x) = − #V (x) C + log #V (x) C (8) where #V (x) is the number of members of the committee that voted x to be worth to be super- vised and C is the number of members of the committee. If #V (x) is zero, we set the value of Cqbc(x) to −∞. Our committee was composed by the four un- certainty sampling strategies, namely quality es- timation, coverage, attention distraction and ran- dom sampling. The inclusion of the latter into the committee can be seen as a way of introducing some noise, aiming to prevent overfitting. 6 Experimental framework In order to assess the effectiveness of AL for INMT, we conducted a similar experimen- tation than the latter works in AL for IMT (Gonz´alez-Rubio and Casacuberta, 2014): we started from a NMT system trained on a general corpus and followed Algorithm 1. This means that the sampling strategy selected those instances to be supervised by the human agent, who interac- tively translated them. Next, the NMT system was updated in an incremental way with the selected samples. Due to the prohibitive cost that an experimen- tation with real users conveys, in our experiments, the users were simulated. We used the references from our corpus as the sentences the users would like to obtain. 6.1 Evaluation An IMT scenario with AL requires to assess two different criteria: translation quality of the system and human effort spent during the process. For evaluating the quality of the translations, we used the BLEU (bilingual evaluation understudy) (Papineni et al., 2002) score. BLEU computes an average mean of the precision of the n-grams (up to order 4) from the hypothesis that appear in the reference sentence. It also has a brevity penalty for short translations. For estimating the human effort, we simulated the actions that the human user would perform when using the IMT system. Therefore, at each iteration the user must search in the hypothesis the next error, and position the mouse pointer on it. Once the pointer is positioned, the user would in- troduce the correct character. These actions corre- spond to a mouse-action and a keystroke, respec- tively. It Therefore, we use a commonly-used met- interac- ric that accounts for both types of the keystroke mouse-action ratio (KSMR) tion: is defined as the (Barrachina et al., 2009). number of keystrokes plus the number of mouse- actions required for obtaining the desired sen- tence, divided by the number of characters of such sentence. We add a final mouse-action, account- ing for action of accepting the translation hypoth- esis. Although keystrokes and mouse-actions are different and require a different amount of effort (Macklovitch et al., 2005), KSMR makes an ap- proximation and assumes that both actions require a similar effort. 6.2 Corpora applied to ensure a comparison with fair of AL the To IMT latter works 2014), we (Gonz´alez-Rubio and Casacuberta, used the same datasets: our training data was the Europarl corpus (Koehn, 2005), with the development set provided at the 2006 workshop on machine translation (Koehn and Monz, 2006). As test set, we used the News Commentary corpus (Callison-Burch et al., 2007). This test set is suit- able to our problem at hand because i. it contains data from different domains (politics, economics and science), which represent challenging out- of-domain samples, but account for a real-life situation in a translation agency; and ii. it is large enough to properly simulate long-term evolution of unbounded data streams. All data are publicly available. We conducted the experimentation in the Spanish to English language direction. Table 1 shows the main figures of our data. 6.3 NMT systems and AL setup Our NMT system was built using NMT-Keras (Peris and Casacuberta, 2018a) and featured a bidirectional LSTM encoder and a decoder with cLSTM units. Following Britz et al. (2017), we set the dimension of the LSTM, embeddings and attention model to 512. We applied batch nor- malizing transform (Ioffe and Szegedy, 2015) and Gaussian noise during training (Graves, 2011). The L2 norm of the gradients was clipped to 5, for avoiding the exploiting gradient effect Table 1: Corpora main figures, in terms of number of sentences (S), number of running words (W ) and vocabulary size (V ). k and M stand for thou- sands and millions of elements, respectively. Corpus Usage S W V Europarl News Commentary Train Dev. Test En Es En Es En Es 2M 2k 51k 46M 106k 48M 160k 6.1k 58k 61k 7.7k 1.2M 1.5M 35k 49k (Pascanu et al., 2012). We applied joint byte pair encoding (BPE) (Sennrich et al., 2016) to all cor- pora. For training the system, we used Adam (Kingma and Ba, 2014), with a learning rate of 0.0002 and a batch size of 50. We early-stopped the training according to the BLEU on our devel- opment set. For decoding, we used a beam of 6. We incrementally update the system (Line 9 in Algorithm 1), with vanilla SGD, with a learning rate of 0.0005. We chose this configuration ac- cording to an exploration on the validation set. The rest of hyperparameters were set according to previous works. The blocks retrieved from the data stream contained 500 samples (according to Gonz´alez-Rubio et al. (2012), the performance is similar regardless the block size). For the quality estimation method, the IBM Model 2 was obtained with fast align (Dyer et al., 2013) and τw was set to 0.4 (Gonz´alez-Rubio et al., 2010). 7 Results and discussion A system with AL involves two main facets to evaluate: the improvement on the quality of the system and the amount of human effort required for achieving such quality. In this section, we compare and study our AL framework for all our sampling strategies: quality estimation sampling (QES), coverage sampling (CovS), attention dis- traction sampling (ADS), random sampling (RS) and query-by-committee (QBC). 7.1 Active learning evaluation First, we evaluated the effectiveness of the ap- plication of AL in the NMT system, in terms of translation quality. Fig. 2 shows the BLEU of the initial hypotheses proposed by the NMT system (Line 6 in Algorithm 1), as a function of the per- centage of sentences supervised by the user (ε in Algorithm 1). That means, the percentage of sen- tences used to adapt the system. The BLEU of a static system without AL was 34.6. Applying AL, we obtained improvements up to 4.1 points of BLEU. QES ADS CovS QBC RS 39 38 37 36 35 ] % [ U E L B 0 20 40 60 80 100 Sentences supervised [%] Figure 2: BLEU of the initial hypotheses pro- posed by the the NMT system as a function of the amount of data used to adapt it. The percentage of sentences supervised refers to the value of ε with respect to the block size. As expected, the addition of the new knowledge had a larger impact when applied to a non-adapted system. Once the system becomes more special- ized, a larger amount of data was required to fur- ther improve. The sampling strategies helped the system to learn faster. Taking RS as a baseline, the learning curves of the other techniques were better, espe- cially when using few (up to a 30%) data for fine- tuning the system. The strategies that achieved a fastest adaptation were those involving the atten- tion mechanism (ADS, CovS and QBC). This in- dicates that the system is learning from the most useful data. The QES and RS required more su- pervised data for achieving the comparable BLEU results. When supervising high percentages of the data, we observed BLEU differences. This is due to the ordering in which the selected sen- tences were presented to the learner. The sampling strategies performed a sort of curriculum learning (Bengio et al., 2009). 7.2 Introducing the human into the loop From the point of view of a user, it is important to assess not only the quality of the MT system, but also the effort spent to obtain such quality. Fig. 3 relates both, showing the amount of effort required for obtaining a certain translation quality. We compared the results of system with AL against the same NMT system without AL and with two other SMT systems, with and without AL, from Gonz´alez-Rubio and Casacuberta (2014). Results in Fig. 3 show consistent positive re- sults of the AL framework. In all cases, AL re- duced the human effort required for achieving a certain translation quality. Compared to a static NMT system, approximately a 25% of the human effort can be spent using AL techniques. QES CovS ADS QBC Static-NMT AL-SMT† Static-SMT† RS 100 80 60 40 20 ] % [ U E L B 0 5 10 15 20 25 KSMR (KSMR) the human effort Translation quality (BLEU) as a Figure 3: function of re- quired. Static-NMT relates to the same NMT system without AL. † denotes systems from Gonz´alez-Rubio and Casacuberta (2014): Static- SMT is a SMT system without AL and AL-SMT is the coverage augmentation SMT system. Regarding the different sampling strategies, all of them behaviored similarly. They provided con- sistent and stable improvements, regardless the level of effort desired (ε). This indicates that, al- though the BLEU of the system may vary (Fig. 2), this had small impact on the effort required for cor- recting the samples. All sampling strategies out- performed the random baseline, which had a more unstable behavior. Compared to classical SMT systems, NMT per- formed surprisingly well. Even the NMT sys- tem without AL largely outperformed the best AL- SMT system. This is due to several reasons: on the one hand, the initial NMT system was much bet- ter than the original SMT system (34.6 vs. 14.9 BLEU points). Part of this large difference were presumably due to the BPE used in NMT: the data stream contained sentences from different do- mains, but they can be effectively encoded into known sequences via BPE. The SMT system was unable to handle well such unseen sentences. On the other hand, INMT systems usually respond much better to the human feedback than inter- active SMT systems (Knowles and Koehn, 2016; Peris et al., 2017). Therefore, the differences be- tween SMT and NMT were enlarged even more. Finally, it should be noted that all our sampling strategies can be computed speedily. They involve analysis of the NMT attention weights, which are computed as a byproduct of the decoding process; or queries to a dictionary (in the case of QES). The update of NMT system is also fast, taking approx- imately 0.1 seconds. This makes AL suitable for a real-time scenario. 8 Conclusions and future work We studied the application of AL methods to INMT systems. The idea was to supervise the most useful samples from a potentially unbounded data stream, while automatically translating the rest of samples. We developed two novel sam- pling strategies, able to outperform other well- established methods, such as QES, in terms of translation quality of the final system. We evaluated the capabilities and usefulness of the AL framework by simulating real-life sce- nario, involving the aforementioned large data streams. AL was able to enhance the performance of the NMT system in terms of BLEU. More- over, we obtained consistent reductions of approx- imately a 25% of the effort required for reaching a desired translation quality. Finally, it is worth noting that NMT outperformed classical SMT sys- tems by a large margin. We want to explore several lines of work in a future. First, we intend to apply our method to other datasets, involving linguistically diverse lan- guage pairs and low-resource scenarios, in order to observe whether the results obtained in this work hold. We also aim to devise more effective sam- pling strategies. To take into account the cogni- tive effort or time required for interactively trans- lating a sentence seem promising objective func- tions. Moreover, these sampling strategies can be used as a data selection technique. It would be in- teresting to assess their performance on this task. We also want to study the addition of reinforce- ment or bandit learning into our framework. Re- cent works (Nguyen et al., 2017; Lam et al., 2018) already showed the usefulness of these learning paradigms, which are orthogonal to our work. Fi- nally, we intend to assess the effectiveness of our proposals with real users in a near future. Acknowledgments The research leading this work received funding from grants PROMETEO/2018/004 and CoMUN- HaT - TIN2015-70924-C2-1-R. We also acknowl- edge NVIDIA Corporation for the donation of GPUs used in this work. References Ana Guerberof Arenas. 2008. Productivity and quality in the post-editing of outputs from translation mem- ories and machine translation. Localisation Focus, 7(1):11 -- 21. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- gio. 2015. Neural machine translation by jointly learning to align and translate. arXiv:1409.0473. Sergio Barrachina, Oliver Bender, Francisco Casacu- berta, Jorge Civera, Elsa Cubel, Shahram Khadivi, Antonio Lagarda, Hermann Ney, Jes´us Tom´as, En- rique Vidal, and Juan-Miguel Vilar. 2009. Statistical approaches to computer-assisted translation. Com- putational Linguistics, 35(1):3 -- 28. Yoshua Bengio, J´erome Louradour, Ronan Collobert, and Jason Weston. 2009. Curriculum learning. In Proceedings of the 26th annual international con- ference on machine learning, pages 41 -- 48. John Blatz, Erin Fitzgerald, George Foster, Simona Gandrabur, Cyril Goutte, Alex Kulesza, Alberto Sanchis, and Nicola Ueffing. 2004. Confidence es- timation for machine translation. In Proceedings of the international conference on Computational Lin- guistics, pages 315 -- 321. Michael Bloodgood and Chris Callison-Burch. 2010. Bucking the trend: Large-scale cost-focused active learning for statistical machine translation. In Pro- ceedings of the 48th Annual Meeting of the Associa- tion for Computational Linguistics, pages 854 -- 864. Ondrej Bojar, Christian Buck, Rajen Chatterjee, Chris- tian Federmann, Yvette Graham, Barry Haddow, Matthias Huck, Antonio Jimeno Yepes, Philipp Koehn, and Julia Kreutzer. 2017. In Proceedings of the Second Conference on Machine Translation. Denny Britz, Anna Goldie, Minh-Thang Luong, and Quoc Le. 2017. Massive exploration of neural ma- chine translation architectures. In Proceedings of the 2017 Conference on Empirical Methods in Nat- ural Language Processing, pages 1442 -- 1451. Jes´us Gonz´alez-Rubio, Daniel Ortiz-Mart´ınez, and Francisco Casacuberta. 2012. Active learning for in- teractive machine translation. In Proceedings of the Conference of the European Chapter of the Associa- tion for Computational Linguistics, pages 245 -- 254. Peter F. Brown, Vincent J. Della Pietra, Stephen A. Della Pietra, and Robert L. Mercer. 1993. The mathematics of statistical machine translation: Pa- rameter estimation. Computational Linguistics, 19(2):263 -- 311. Chris Callison-Burch, Cameron Fordyce, Philipp Koehn, Christof Monz, and Josh Schroeder. 2007. (Meta-) evaluation of machine translation. In Pro- ceedings of the Workshop on Statistical Machine Translation, pages 136 -- 158. David Cohn, Les Atlas, and Richard Ladner. 1994. Im- proving generalization with active learning. Ma- chine learning, 15(2):201 -- 221. Ido Dagan and Sean P Engelson. 1995. Committee- based sampling for training probabilistic classifiers. In Machine Learning Proceedings 1995, pages 150 -- 157. Elsevier. Michael Denkowski, Chris Dyer, and Alon Lavie. 2014. Learning from post-editing: Online model adaptation for statistical machine translation. In Proceedings of the 14th Conference of the European Chapter of the Association for Computational Lin- guistics, pages 395 -- 404. Chris Dyer, Victor Chahuneau, and Noah A Smith. 2013. A simple, fast, and effective reparameteriza- tion of IBM Model 2. In Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 644 -- 648. Alex Graves. 2011. Practical variational inference for neural networks. In Advances in Neural Information Processing Systems, pages 2348 -- 2356. Gholamreza Haffari, Maxim Roy, and Anoop Sarkar. 2009. Active learning for statistical phrase-based machine translation. In Proceedings of Human Lan- guage Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 415 -- 423. Sepp Hochreiter and Jurgen Schmidhuber. 1997. Long short-term memory. Neural Computation, 9(8):1735 -- 1780. Chris Hokamp and Qun Liu. 2017. Lexically con- strained decoding for sequence generation using grid beam search. In Proceedings of the 55th Annual Meeting of the Association for Computational Lin- guistics (Volume 1: Long Papers), volume 1, pages 1535 -- 1546. Sergey Ioffe and Christian Szegedy. 2015. Batch nor- malization: Accelerating deep network training by reducing internal covariate shift. arXiv:1502.03167. Diederik Kingma and Jimmy Ba. 2014. Adam: optimization. method A arXiv:1412.6980. for stochastic Rebecca Knowles and Philipp Koehn. 2016. Neural interactive translation prediction. In Proceedings of the Association for Machine Translation in the Americas, pages 107 -- 120. George Foster, Pierre Isabelle, and Pierre Plamon- don. 1997. Target-text mediated interactive machine translation. Machine Translation, 12:175 -- 194. Philipp Koehn. 2005. Europarl: A parallel corpus for statistical machine translation. In Proceedings of the Machine Translation Summit, pages 79 -- 86. Simona Gandrabur and George Foster. 2003. Confi- dence estimation for text prediction. In Proceedings of the Conference on Computational Natural Lan- guage Learning, pages 315 -- 321. Philipp Koehn and Christof Monz, editors. 2006. Pro- ceedings on the Workshop on Statistical Machine Translation. Association for Computational Lin- guistics. Jes´us Gonz´alez-Rubio and Francisco Casacuberta. 2014. Cost-sensitive active learning for computer- assisted translation. Pattern Recognition Letters, 37:124 -- 134. Jes´us Gonz´alez-Rubio, Daniel Ortiz-Mart´ınez, and Francisco Casacuberta. 2010. Balancing user effort and translation error in interactive machine trans- lation via confidence measures. In Proceedings of the Annual Meeting of the Association for Computa- tional Linguistics, pages 173 -- 177. Jes´us Gonz´alez-Rubio, Daniel Ortiz-Mart´ınez, and Francisco Casacuberta. 2011. An active learning scenario for interactive machine translation. In Pro- ceedings of the 13th international conference on multimodal interfaces, pages 197 -- 200. Tsz Kin Lam, Julia Kreutzer, and Stefan Riezler. 2018. A reinforcement learning approach to interactive- predictive neural machine translation. In Proceed- ings of the European Association for Machine Trans- lation conference, pages 169 -- 178. Abby Levenberg, Chris Callison-Burch, and Miles Os- borne. 2010. Stream-based translation models for statistical machine translation. In Human Lan- guage Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 394 -- 402. David D Lewis and Jason Catlett. 1994. Heteroge- neous uncertainty sampling for supervised learning. In Machine Learning Proceedings 1994, pages 148 -- 156. Elliot Macklovitch, Nam-Trung Nguyen, and Roberto Silva. 2005. User evaluation report. Technical re- port. Transtype2 (ISR-2001-32091). B. Settles. 2009. Active learning literature survey. Computer Sciences Technical Report 1648, Univer- sity of Wisconsin -- Madison. H Sebastian Seung, Manfred Opper, and Haim Som- polinsky. 1992. Query by committee. In Proceed- ings of the fifth annual workshop on Computational learning theory, pages 287 -- 294. Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural net- works. In Proceedings of the Advances in Neural Information Processing Systems, volume 27, pages 3104 -- 3112. Zhaopeng Tu, Zhengdong Lu, Yang Liu, Xiaohua Liu, and Hang Li. 2016. Modeling coverage for neural machine translation. In Proceedings of the Annual Meeting of the Association for Computational Lin- guistics, volume 1, pages 76 -- 85. Marco Turchi, Matteo Negri, M Amin Farajian, and Marcello Federico. 2017. Continuous learning from human post-edits for neural machine translation. The Prague Bulletin of Mathematical Linguistics, 108(1):233 -- 244. Nicola Ueffing, Gholamreza Haffari, Anoop Sarkar, et al. 2007. Transductive learning for statistical machine translation. In Proceedings of the Annual Meeting of the Association for Computational Lin- guistics, pages 25 -- 35. Nicola Ueffing and Hermann Ney. 2005. Application of word-level confidence measures in interactive sta- tistical machine translation. In Proceedings of the European Association for Machine Translation con- ference, pages 262 -- 270. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Pro- cessing Systems, pages 5998 -- 6008. Y. Wu, M. Schuster, Z. Chen, Q. V. Le, M. Norouzi, W. Macherey, M. Krikun, Y. Cao, Q. Gao, K. Macherey, J. Klingner, A. Shah, M. Johnson, X. Liu, Ł. Kaiser, S. Gouws, Y. Kato, T. Kudo, H. Kazawa, K. Stevens, G. Kurian, N. Patil, W. Wang, C. Young, J. Smith, J. Riesa, A. Rudnick, O. Vinyals, G. Corrado, M. Hughes, and J. Dean. 2016. Google's neural machine translation system: Bridging the gap between human and machine trans- lation. arXiv:1609.08144. Laurent Nepveu, Guy Lapalme, Philippe Langlais, and George Foster. 2004. Adaptive language and trans- lation models for interactive machine translation. In Proceedings of the Conference on Empirical Method in Natural Language Processing, pages 190 -- 197. Khanh Nguyen, Hal Daum´e III, and Jordan Boyd- Graber. 2017. Reinforcement learning for bandit neural machine translation with simulated human feedback. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Process- ing, pages 1464 -- 1474. Fredrik Olsson. 2009. A literature survey of active machine learning in the context of natural language processing. Technical report, Swedish Institute of Computer Science. Daniel Ortiz-Mart´ınez. 2016. Online learning for sta- tistical machine translation. Computational Linguis- tics, 42(1):121 -- 161. Kishore Papineni, Salim Roukos, Todd Ward, and Wei- Jing Zhu. 2002. BLEU: a method for automatic evaluation of machine translation. In Proceedings of the Annual Meeting of the Association for Com- putational Linguistics, pages 311 -- 318. Razvan Pascanu, Caglar Gulcehre, Kyunghyun Cho, and Yoshua Bengio. 2014. How to construct deep recurrent neural networks. arXiv:1312.6026. Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. 2012. On the difficulty of training recurrent neural networks. arXiv:1211.5063. ´Alvaro Peris and Francisco Casacuberta. 2018a. NMT- Keras: a very flexible toolkit with a focus on interac- tive NMT and online learning. The Prague Bulletin of Mathematical Linguistics, 111:113 -- 124. ´Alvaro Peris and Francisco Casacuberta. 2018b. On- line learning for effort reduction in interactive neural machine translation. arXiv:1802.03594. ´Alvaro Peris, Miguel Domingo, and Francisco Casacu- berta. 2017. Interactive neural machine translation. Computer Speech & Language, 45:201 -- 220. Herbert Robbins and Sutton Monro. 1951. A stochastic approximation method. The Annals of Mathemati- cal Statistics, pages 400 -- 407. Mike Schuster and Kuldip K. Paliwal. 1997. Bidirec- tional recurrent neural networks. IEEE Transactions on Signal Processing, 45(11):2673 -- 2681. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Improving neural machine translation models with monolingual data. In Proceedings of the An- nual Meeting of the Association for Computational Linguistics, pages 86 -- 96.
1811.06096
1
1811
2018-11-14T22:19:03
Automatic Grammar Augmentation for Robust Voice Command Recognition
[ "cs.CL", "cs.SD", "eess.AS" ]
This paper proposes a novel pipeline for automatic grammar augmentation that provides a significant improvement in the voice command recognition accuracy for systems with small footprint acoustic model (AM). The improvement is achieved by augmenting the user-defined voice command set, also called grammar set, with alternate grammar expressions. For a given grammar set, a set of potential grammar expressions (candidate set) for augmentation is constructed from an AM-specific statistical pronunciation dictionary that captures the consistent patterns and errors in the decoding of AM induced by variations in pronunciation, pitch, tempo, accent, ambiguous spellings, and noise conditions. Using this candidate set, greedy optimization based and cross-entropy-method (CEM) based algorithms are considered to search for an augmented grammar set with improved recognition accuracy utilizing a command-specific dataset. Our experiments show that the proposed pipeline along with algorithms considered in this paper significantly reduce the mis-detection and mis-classification rate without increasing the false-alarm rate. Experiments also demonstrate the consistent superior performance of CEM method over greedy-based algorithms.
cs.CL
cs
AUTOMATIC GRAMMAR AUGMENTATION FOR ROBUST VOICE COMMAND RECOGNITION Yang Yang†, Anusha Lalitha (cid:63), Jinwon Lee†, Chris Lott† (cid:63) Department of Electrical and Computer Engineering, University of California San Diego † Qualcomm Research, San Diego 8 1 0 2 v o N 4 1 ] L C . s c [ 1 v 6 9 0 6 0 . 1 1 8 1 : v i X r a ABSTRACT This paper proposes a novel pipeline for automatic grammar aug- mentation that provides a significant improvement in the voice com- mand recognition accuracy for systems with small footprint acoustic model (AM). The improvement is achieved by augmenting the user- defined voice command set, also called grammar set, with alternate grammar expressions. For a given grammar set, a set of potential grammar expressions (candidate set) for augmentation is constructed from an AM-specific statistical pronunciation dictionary that cap- tures the consistent patterns and errors in the decoding of AM in- duced by variations in pronunciation, pitch, tempo, accent, ambigu- ous spellings, and noise conditions. Using this candidate set, greedy optimization based and cross-entropy-method (CEM) based algo- rithms are considered to search for an augmented grammar set with improved recognition accuracy utilizing a command-specific dataset. Our experiments show that the proposed pipeline along with algo- rithms considered in this paper significantly reduce the mis-detection and mis-classification rate without increasing the false-alarm rate. Experiments also demonstrate the consistent superior performance of CEM method over greedy-based algorithms. Index Terms -- voice command recognition, CTC, grammar augmentation, cross entropy method, statistical pronunciation dic- tionary 1. INTRODUCTION Voice UI is becoming ubiquitous for all types of devices, from smart- phones to automobiles. Although we have seen substantial improve- ment in speech recognition accuracy reported in the literature since the advent of deep neural network based solutions [1, 2, 3, 4], design- ing robust voice UI system for low memory/power footprint embed- ded devices without a cloud-based back-end still remains a challeng- ing problem. Compared to its cloud-based counterpart, on-device in- ference, despite being limited by computation power, memory size, and power consumption, remains appealing for several reasons: (i) there are less privacy concerns as user voice data need not be up- loaded to the cloud; (ii) it reduces the latency as it does not involve network access delay; (iii) its usage is not restricted by internet avail- ability, and can be applied in devices with no built-in communication module. In this work, we focus on improving the recognition accuracy of on-device voice UI systems designed to respond to a limited set of pre-defined voice commands. Such voice UI systems are commonly used in modern IoT/embedded devices such as bluetooth speaker, portable camcorder, hearables, home appliances, etc. Specially, we assume a fixed audio front-end and only look at the pipeline of map- ping acoustic features to voice commands. As illustrated in Fig. 1, we focus on the voice command recog- nition system composed of an acoustic model (AM) encoder that Fig. 1. Voice command recognition pipeline converts the acoustic features into phoneme/grapheme-based proba- bilistic output, followed by a decoder (e.g., FST) that maps the prob- abilistic output from AM to one of the voice commands. State of the art acoustic model utilizes either CTC [5], RNN-transducer [4], or Attention Model [6] (see [7, 8] for a good summary). They gener- ate probabilistic outputs, which are fed to a decoder that generates the posterior probability of the corresponding phoneme or grapheme label. Even though these model architectures and training method- ologies lead to satisfactory and even super-human transcription ac- curacy, the best models obtained are often too large for their de- ployment in small portable devices, e.g., even the smallest model considered in [9] (Table 11 therein) has 18M parameters. In this work, we utilize a 211K parameter unidirectional-RNN- based acoustic model trained with CTC criterion using Librispeech and a few other datasets, which output probabilities on grapheme tar- gets. Due to the small model size, its transcription accuracy is low: the greedy decoding word-error-rate (WER) without any language model is 48.6% on Libri-speech test-clean dataset. Hence, one of the challenges addressed by our work is, given a small acoustic model trained with general speech dataset, how can one improve the com- mand recognition accuracy utilizing limited command-specific data. Such small footprint AMs have been considered for keyword detec- tion in [10] and [11]. Our work extends these by improving the com- mand command recognition accuracy with a small footprint AM. In Table 1, we list a few samples of the greedy decoding results from the 211K parameter acoustic model. It is worth noting that even though the word-error-rate is high, the error that it makes tends to be a phonetically plausible rendering of the correct word [1]. Running through a large dataset, we also observe that the error patterns tend to be consistent across different utterances. This leads to a useful in- sight: for the recognition of a limited set of voice commands (a.k.a. grammar of the decoder), one could improve recognition accuracy AM greedy decoding the recter pawsd and den shaking his classto hands before him went on tax for wone o thease and itees he other Ground truth the rector paused and then shaking his clasped hands before him went on facts form one of these and ideas the other Table 1. Greedy decoding samples from the acoustic encoder. Word errors are labeled in bold. by adding variations that capture common and consistent errors from the acoustic model to original command set. We define grammar as a set of valid voice commands (e.g., the grammar can be {play music, stop music, . . .}) and we refer to this technique of adding variations to the original grammar as grammar augmentation. Effective gram- mar augmentation is the focus of this work. The main contribution of this paper is the design of effective grammar augmentation framework which provides significant im- provement over the baseline system. Next, we highlight our main contributions in detail: (a) For any given set of original voice com- mands, we propose the design of a candidate set of all grammar variations which captures the consistent errors for a given AM (b) We propose a technique for fast evaluation of command recognition accuracy along with false-alarm and mis-detection rate for any aug- mented grammar set and finally (c) We devise various algorithms to automatically identify an improved augmented grammar set by suit- ably adding variations from the candidate set to the original gram- mar. Our novel pipeline using the above techniques is illustrated in Fig. 2. The rest of the paper is organized as the following: In Sec- tion 2, we give an overview of the proposed grammar augmenta- tion pipeline and dive into the generation of a candidate set and fast grammar evaluation techniques. In Section 3 algorithms via greedy optimization and CEM algorithm are utilized to automate the gram- mar augmentation process. The experiment results are presented in Section 4 and we discussion on future directions in Section 5. 2. PIPELINE FOR AUTOMATIC GRAMMAR AUGMENTATION Our AM is trained with CTC loss [5], and can thus assign a posterior probability PCTC(gu) for each command g in a command set, for an input utterance u. For a given test utterance, our system picks the command with the highest probability, or rejects the utterance if the highest probability is below a pre-defined confidence threshold (see Section 2.3) [12][13]. Command decoding errors happen if the AM output deviates from the ground truth to the extent that it can no longer success- fully discriminate against other grammar sequences. The idea be- hind grammar augmentation is to restore the discriminative power of the acoustic model by including in the grammar the sequence vari- ations that capture pronunciation variations or consistent AM error patterns. To do that, we begin with generation of a candidate set containing meaningful variations. 2.1. AM-specific statistical pronunciation dictionary The augmentation candidates should ideally capture consistent error patterns from the AM, induced by variations in pronunciation, pitch, tempo, accent, ambiguous spellings, or even inherent mistakes made by the AM. For example, if any command includes words that have homophones, then it is necessary to consider adding those homo- phones into the grammar. To capture these word-level variations, we introduce a novel concept named AM-specific statistical pronun- ciation dictionary, obtained by the following steps: First, we run the AM through a large general speech dataset (e.g., the training set of AM). For each utterance, we obtain its greedy decoding se- quence by outputting the character with the maximum probability at each time frame, followed by the CTC squashing function [5] to collapse repeated output graphemes and remove blanks. Given that most utterances from a general speech dataset correspond to a sen- tence rather than a single word, we use Levenshtein algorithm to find the minimum-edit-path of the ground-truth to the decoding, and by doing so obtain a mapping of each word to its corresponding max- imum probability decoding. For each word, we gather the statistics regarding the frequencies of its maximum-probability decoding out- puts. Here we sample a few entries from the dictionary obtained using our 211K-parameter AM: set pause two set said sat sait sed 32.2% pause 16.6% pose 11.4% pase 8.15% porse 4.71% pas 15.7% to 14.9% two 7.68% do 7.31% tu 7.31% too 53.3% 34.7% 1.0% 0.7% 0.3% 2.2. Candidate set for grammar augmentation Utilizing this statistical dictionary, we build a candidate set contain- ing potential grammar variations by repeatedly replacing each word in the original grammar by its top-k likely max-decoding outputs. Consider a voice UI application for a small bluetooth player, one could have the following five commands forming the original gram- mar. command (C) play music stop music pause music previous song next song original grammar1 play music stop music pause music previous song next song candidate set for grammar augmentation (G) pla music, ply music, play mesic, . . . stap music, stup music, stup mesic, . . . pose music, pase mesic, pause mesic, . . . previs song, previous son, . . . nex song, lext song, nex son, . . . By looking up in the statistical dictionary the words contained in the original grammar, one can form an array of alternate expressions for the original commands as shown above. For each command, the set of candidates is the cartesian product of the top-k decoding list from the statistical pronunciation dictionary for each word in the command. The value of k can be different for different words, and is chosen to capture at least a certain fraction of all the variations. 2.3. Evaluation of command recognition accuracy Let us denote the set of commands as C, the set of all grammar candi- dates G, and the mapping function from G to C as f. A grammar G is a subset of G. For the purpose of evaluating the recognition accuracy of any grammar, we need a command-specific dataset containing au- dio waveforms and the corresponding target commands. We denote such dataset as (u, t) ∈ D with u and t denoting an utterance and its corresponding target command. To evaluate the false alarm rate, we also need an out-of-domain dataset u ∈ Dood that contains a set of utterances that do not correspond to any of the commands. As mentioned before, the acoustic decoder compares the poste- rior probabilities PCTC(gu) of all the grammar candidates g included in grammar set G ⊂ G given the audio waveform u, and output the PCTC(gu). This calcu- command f (g∗) where g∗ = argmaxg∈G lation is done by running a forward-only dynamic programming al- gorithm on the AM output. In order to avoid having to repeat the calculation of the probability scores for every choice of grammar 1Here we assume that AM is trained with grapheme as target, and as a result the grammar is exact the same as the command. Note that the same grammar augmentation pipeline introduced here can be applied to AM trained with phoneme target as well, in which case the grammar is a set of phoneme sequences, and the statistical pronunciation dictionary contains variations of each word in phoneme representation. Fig. 2. Grammar augmentation pipeline. set G ⊆ G, we pre-compute and store the probability scores for all the candidate grammar, and all the utterances in both command- specific dataset D and out-of-domain dataset Dood. Precisely, as a pre-processing steps of the grammar augmentation search algorithm, we obtain the following probability scores: PCTC(gu), ∀g ∈ G,∀u ∈ D ∪ Dood. (1) To achieve a false alarm rate (FAR) target of α, the confidence threshold for the probability score can be computed as below, (cid:12)(cid:12)(cid:8)u ∈ Dood : max PCTC(gu) > τ(cid:9)(cid:12)(cid:12) (cid:41) τ (G, α) = min g∈G Dood The decoded command for an utterance u is τ : τ < α . (cid:40) (cid:40) φ, d(G, α, u) = argmax c∈C if maxg∈G PCTC(gu) < τ (G, α), otherwise. max PCTC(gu), g∈G,f (g)=c φ denotes decoding being out-of-domain. With a fixed false-alarm rate, there are two types of error event: mis-detection and mis-classification. Mis-detection refers to the case where a voice command is issued but not detected (i.e., decoded as being out-of-domain), whereas mis-classification happens where a voice command is issued and detected, but the wrong command is decoded. Precisely, the mis-detection-rate (MDR) and the mis- classification-rate (MCR) are defined as below MDR(G, α) ={(u, t) ∈ D : d(G, α, u) = φ}/D, MCR(G, α) ={(u, t) ∈ D : d(G, α, u) (cid:54)∈ {φ, t}}/D. 3. AUGMENTATION SEARCH ALGORITHMS The grammar augmentation algorithms we consider search for the grammar set G among all subsets of a candidate set G that minimizes a weighted sum of the mis-detection-rate and mis-classification-rate with a fixed false-alarm target α, G⊆G MCR(G, α) + βMDR(G, α). min (2) Here the weight factor β controls the significance of mis-detection versus mis-classification. Since we pre-compute the probabilities as shown in Equation (1), for each grammar G ⊆ G the objective func- tion can be evaluated without invoking the AM, which significantly speeds up the search algorithms. It is important to note that adding candidate to the grammar does not always improve performance: (i) With a fixed false-alarm tar- get, adding more candidates only increase the confidence threshold τ (G, α), which could potentially result in degraded mis-detection rate. (ii) distinguishability of the commands has a complex inter- dependency, hence adding grammar candidate for one command may reduce the recognition rate of other commands, as it may alter the classification boundary amongst the set of commands. , 3.1. Augmentation via greedy optimization methods We consider the following three methods based on greedy optimiza- tion: Naive greedy search: Start with the original grammar, iteratively go through all the candidates from G. In each iteration, add the candidate that best improves the objective function and update the confidence threshold to maintain target FAR, until no candidate can improve further. Greedy search with refinement: This algorithm is similar to greedy search except for every time a candidate is added to the grammar, we remove those candidates among the remaining ones which contain the added candidate as a subsequence. For example, for pause music command, if candidate pose music is added to the grammar, then porse music is removed from subsequent iterations. Trimming the candidate set in this manner increases the diversity of variations in the grammar. Beam-search: In each iteration a list of l best grammar sets is maintained. This degenerates to the naive greedy algorithm when l = 1. 3.2. Augmentation via cross entropy method (CEM) Cross entropy method (CEM) is a widely used combinatorial opti- mization algorithm and has been successfully applied in some rein- forcement learning problems [14, 15]. The main idea is rooted from rare event sampling, for which the algorithm tries to minimize the KL divergence between a proposed sampling distribution and the optimal zero-variance importance sampling distribution [15]. Go- ing back to the grammar augmentation objective function in Equa- tion (2), the search space is the power set of the candidate set G, which can be represented by {0, 1}G, with each grammar choice represented by a G-dimensional binary vector. Applying the idea of CEM, we start with an initial probability distribution on {0, 1}G, and iteratively tune its parameter so that it assigns most of the probability mass in the region towards the min- imization of the objection function. In our design, the distribution on this discrete space is induced by the sign of a G-dimensional in- dependent Gaussian distributions, parameterized by their mean and variance in each dimension. For each iteration, we start with a pop- ulation of s samples from the current distribution, each representing a feasible candidate choice. We evaluate the objective function of MDR + βMCR for each of sample candidate choice, and keep the best γ fraction. We then update the parameter of the distribution using the sample mean and variance of the top γs candidates (also called elite set), and iterate the procedure by obtaining s samples from the updated distribution. 4. EXPERIMENTS In this section, we present some experiments which illustrate the im- provement that can obtained in recognition accuracy by applying our grammar augmentation algorithm. All the results are obtained with a dataset containing 5 commands: play music, pause music, stop mu- sic, next song and previous song. This dataset contains utterances with varying gender, pitch, volume, noise types and accents, and are split into training, validation, and testing datasets. The training dataset is used to train the augmentation search algorithms to min- imize the objective defined in (2). The validation dataset is used to compare performances of grammar sets obtained and decide which one to take. Finally, we report the results of the final grammar set on a test dataset. For the training objective function in Equa- tion (2), we pick β = 1, in which case minimizing the sum of MDR and MCR is equivalent to maximizing the command success rate 1−MCR(G, α)−MDR(G, α). A candidate set is obtained from run- ning the 211K parameter AM with a 2000-hour dataset using steps discussed in Section 2.1 and 2.2. We consider 150 grammar candi- dates (G = 150) using our statistical pronunciation dictionary. 4.1. Performance Evaluation We analyze the grammar augmentation algorithms described in Sec- tion 3 with a fixed FAR target of α = 0.1% and compare the aug- mentation grammar output by each algorithm in terms. Fig. 3 shows the command success rate and the decomposition of the error in terms of mis-detection and mis-classification. Note that CEM algo- rithm provides most improvement in command success rate unlike greedy-optimization based algorithms which may commit to sub- optimal grammar sets early on. As discussed previously, adding more variations to the grammar set makes it more susceptible to mis-detection errors. In fact, adding all 150 grammar expression reduces the command success rate to 80% and increases the MDR to 13.76%. However, Fig 3 shows that performing augmentation in a principled manner can greatly reduce the mis-classification error without increasing the mis-detection errors. naive greedy. The greedy algorithm refinement reaches its best per- formance in the least number of grammar evaluations. This suggests that incentivizing diversity over exploration may provide better im- provement in command success rate and in fewer evaluations. Fig. 4. Test dataset performance vs. number of grammar evaluations 4.3. Effect of Candidate Set Size on Performance So far we considered a candidate set size of 150 (G = 150). Next, we investigate the effect of varying the candidate set size on the per- formance of the augmentation algorithms. We vary the candidate size by varying the number of words k we choose from the top-k likely max-decoding outputs for every word in the statistical pronun- ciation dictionary. Hence, a larger candidate size captures a larger probability of max-decoding outputs. We repeat our experiments by altering the candidate set size from 25 to 150. Table 2 shows the performance the augmentation algorithms for various candidate set sizes. In particular, it shows that CEM improves as we increase the candidate set and is consistently better than greedy based algorithms. Candidate Set Size G 25 50 75 100 150 Greedy Greedy (refinement) 91.79 92.74 93.16 92.65 94.02 92.31 93.16 93.08 92.82 93.76 Beamsearch (width 5) 92.31 93.50 92.99 92.05 93.85 CEM 93.25 93.59 93.68 94.02 94.44 Fig. 3. Performance of grammar augmentation algorithms. 4.2. Complexity of Grammar Augmentation Algorithms We evaluate the complexity of the augmentation algorithms consid- ered in Section 3. The most computationally expensive step in im- plementing our augmentation algorithms is the evaluation of MCR and MDR for any candidate grammar set. Hence, we measure the complexity of our augmentation algorithms in terms of number of grammar evaluations needed to output their best augmented gram- mar set. Fig. 4 illustrates the variation/improvement in command success rate (1-MDR-MCR) as the number of grammar evaluations increases. Note that CEM takes only marginally more evaluations while providing the maximum reduction in the sum of MCR and MDR. While beamsearch explores more and requires more gram- mar evaluation, it provides only marginally better improvement over Table 2. 1-MDR - MCR (%) for different algorithms with different candidate set size G. 5. CONCLUSION AND FUTURE WORK In this work, we focus on a small-footprint voice command recogni- tion system composed of a CTC-based small-capacity acoustic en- coder, and a corresponding maximum a posteriori decoder for the recognition of a limited set of fixed commands. With a command specific dataset, we proposed a novel pipeline that automatically augments the command grammar for improved mis-detection and mis-classification rate. We achieved this by adapting the decoder to the consistent decoding variations of the acoustic model. An impor- tant direction of future work is to extend our grammar augmentation pipeline to provide personalization, i.e., to improve the recognition accuracy for a specific user by adapting the decoder to better fit both the AM and the user's pronunciation pattern. OriginalGreedyGreedy(with refinement)Beam-search(width=5)CEM86889092949698100% (FAR=0.1%)90.345.903.7693.764.022.2294.023.502.4893.853.502.6594.442.313.25Command Success RateMCRMDR0100020003000400050006000700080009000Number of grammar evaluations8990919293941-MCR-MDR (%)CEMGreedy (with refinement)GreedyBeamsearch (width = 5)Original Grammar [12] Y. Miao, M. Gowayyed, and F. Metze, "EESEN: End-to- end speech recognition using deep RNN models and WFST- based decoding," in 2015 IEEE Workshop on Automatic Speech Recognition and Understanding (ASRU), Dec 2015, pp. 167 -- 174. [13] Naoyuki Kanda, Xugang Lu, and Hisashi Kawai, "Maximum a posteriori based decoding for ctc acoustic models," in INTER- SPEECH, 2016. [14] Istv´an Szita and Andr´as Lorincz, "Learning Tetris Using the Noisy Cross-entropy Method," Cambridge, MA, USA, Dec. 2006, vol. 18, pp. 2936 -- 2941, MIT Press. [15] Pieter-Tjerk de Boer, Dirk P. Kroese, Shie Mannor, and "A Tutorial on the Cross-Entropy Reuven Y. Rubinstein, Method," Feb 2005, vol. 134, pp. 19 -- 67. 6. REFERENCES [1] Awni Y. Hannun, Carl Case, Jared Casper, Bryan Catanzaro, Greg Diamos, Erich Elsen, Ryan Prenger, Sanjeev Satheesh, Shubho Sengupta, Adam Coates, and Andrew Y. Ng, "Deep Speech: Scaling up end-to-end speech recognition," 2014, vol. abs/1412.5567. [2] Dario Amodei, Sundaram Ananthanarayanan, Rishita Anub- hai, Jingliang Bai, Eric Battenberg, Carl Case, Jared Casper, Bryan Catanzaro, Qiang Cheng, Guoliang Chen, Jie Chen, Jingdong Chen, Zhijie Chen, Mike Chrzanowski, Adam Coates, Greg Diamos, and et al, "Deep Speech 2 : End-to-End Speech Recognition in English and Mandarin," in Proceed- ings of The 33rd International Conference on Machine Learn- ing, Maria Florina Balcan and Kilian Q. Weinberger, Eds., New York, New York, USA, 20 -- 22 Jun 2016, vol. 48 of Proceedings of Machine Learning Research, pp. 173 -- 182, PMLR. [3] Ronan Collobert, Christian Puhrsch, and Gabriel Synnaeve, "Wav2Letter: an End-to-End ConvNet-based Speech Recog- nition System," 2016, vol. abs/1609.03193. [4] Alex Graves, "Sequence Transduction with Recurrent Neural Networks," 2012, vol. abs/1211.3711. [5] Alex Graves, Santiago Fern´andez, Faustino Gomez, and Jurgen Schmidhuber, "Connectionist Temporal Classification: La- belling Unsegmented Sequence Data with Recurrent Neural Networks," in Proceedings of the 23rd International Confer- ence on Machine Learning, New York, NY, USA, 2006, ICML '06, pp. 369 -- 376, ACM. [6] Jan Chorowski, Dzmitry Bahdanau, Dmitriy Serdyuk, KyungHyun Cho, and Yoshua Bengio, "Attention-Based Mod- els for Speech Recognition," 2015, vol. abs/1506.07503. [7] Rohit Prabhavalkar, Kanishka Rao, Tara N. Sainath, Bo Li, Leif Johnson, and Navdeep Jaitly, "A Comparison of Sequence- in INTER- to-Sequence Models for Speech Recognition," SPEECH, 2017. [8] E. Battenberg, J. Chen, R. Child, A. Coates, Y. G. Y. Li, H. Liu, S. Satheesh, A. Sriram, and Z. Zhu, "Exploring neural transducers for end-to-end speech recognition," in 2017 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU), Dec 2017, pp. 206 -- 213. [9] Dario Amodei, Rishita Anubhai, Eric Battenberg, Carl Case, Jared Casper, Bryan Catanzaro, Jingdong Chen, Mike Chrzanowski, Adam Coates, Greg Diamos, and et al, "Deep Speech 2: End-to-End Speech Recognition in English and Mandarin," 2015, vol. abs/1512.02595. [10] Tara N. Sainath and Carolina Parada, "Convolutional neural in INTER- networks for small-footprint keyword spotting," SPEECH. 2015, pp. 1478 -- 1482, ISCA. [11] G. Chen, C. Parada, and G. Heigold, "Small-footprint keyword spotting using deep neural networks," in 2014 IEEE Interna- tional Conference on Acoustics, Speech and Signal Processing (ICASSP), May 2014, pp. 4087 -- 4091.
1805.02442
1
1805
2018-05-07T11:14:07
Paraphrase to Explicate: Revealing Implicit Noun-Compound Relations
[ "cs.CL" ]
Revealing the implicit semantic relation between the constituents of a noun-compound is important for many NLP applications. It has been addressed in the literature either as a classification task to a set of pre-defined relations or by producing free text paraphrases explicating the relations. Most existing paraphrasing methods lack the ability to generalize, and have a hard time interpreting infrequent or new noun-compounds. We propose a neural model that generalizes better by representing paraphrases in a continuous space, generalizing for both unseen noun-compounds and rare paraphrases. Our model helps improving performance on both the noun-compound paraphrasing and classification tasks.
cs.CL
cs
Paraphrase to Explicate: Revealing Implicit Noun-Compound Relations Vered Shwartz Ido Dagan Computer Science Department, Bar-Ilan University, Ramat-Gan, Israel [email protected] [email protected] 8 1 0 2 y a M 7 ] L C . s c [ 1 v 2 4 4 2 0 . 5 0 8 1 : v i X r a Abstract Revealing the implicit semantic rela- tion between the constituents of a noun- compound is important for many NLP ap- plications. It has been addressed in the literature either as a classification task to a set of pre-defined relations or by pro- ducing free text paraphrases explicating the relations. Most existing paraphras- ing methods lack the ability to generalize, and have a hard time interpreting infre- quent or new noun-compounds. We pro- pose a neural model that generalizes better by representing paraphrases in a contin- uous space, generalizing for both unseen noun-compounds and rare paraphrases. Our model helps improving performance on both the noun-compound paraphrasing and classification tasks. 1 Introduction Noun-compounds hold an implicit semantic rela- tion between their constituents. For example, a 'birthday cake' is a cake eaten on a birthday, while 'apple cake' is a cake made of apples. Interpreting noun-compounds by explicating the relationship is beneficial for many natural language understand- ing tasks, especially given the prevalence of noun- compounds in English (Nakov, 2013). The interpretation of noun-compounds has been addressed in the literature either by classifying them to a fixed inventory of ontological relation- ships (e.g. Nastase and Szpakowicz, 2003) or by generating various free text paraphrases that de- scribe the relation in a more expressive manner (e.g. Hendrickx et al., 2013). Methods dedicated to paraphrasing noun- compounds usually rely on corpus co-occurrences of the compound's constituents as a source of ex- plicit relation paraphrases (e.g. Wubben, 2010; Versley, 2013). Such methods are unable to gen- eralize for unseen noun-compounds. Yet, most noun-compounds are very infrequent in text (Kim and Baldwin, 2007), and humans easily interpret the meaning of a new noun-compound by general- izing existing knowledge. For example, consider interpreting parsley cake as a cake made of pars- ley vs. resignation cake as a cake eaten to cele- brate quitting an unpleasant job. We follow the paraphrasing approach and pro- pose a semi-supervised model for paraphras- ing noun-compounds. Differently from previ- ous methods, we train the model to predict ei- ther a paraphrase expressing the semantic rela- tion of a noun-compound (predicting '[w2] made of [w1]' given 'apple cake'), or a missing con- stituent given a combination of paraphrase and noun-compound (predicting 'apple' given 'cake made of [w1]'). Constituents and paraphrase tem- plates are represented as continuous vectors, and semantically-similar paraphrase templates are em- bedded in proximity, enabling better generaliza- tion. Interpreting 'parsley cake' effectively re- duces to identifying paraphrase templates whose "selectional preferences" (Pantel et al., 2007) on each constituent fit 'parsley' and 'cake'. A qualitative analysis of the model shows that the top ranked paraphrases retrieved for each noun-compound are plausible even when the con- stituents never co-occur (Section 4). We evalu- ate our model on both the paraphrasing and the classification tasks (Section 5). On both tasks, the model's ability to generalize leads to improved performance in challenging evaluation settings.1 1The code is available at github.com/vered1986/panic 2 Background 2.1 Noun-compound Classification Noun-compound classification is the task con- cerned with automatically determining the seman- tic relation that holds between the constituents of a noun-compound, taken from a set of pre-defined relations. Early work on the task leveraged information derived from lexical resources and corpora (e.g. Girju, 2007; ´O S´eaghdha and Copestake, 2009; Tratz and Hovy, 2010). More recent work broke the task into two steps: in the first step, a noun- compound representation is learned from the dis- tributional representation of the constituent words (e.g. Mitchell and Lapata, 2010; Zanzotto et al., 2010; Socher et al., 2012). In the second step, the noun-compound representations are used as fea- ture vectors for classification (e.g. Dima and Hin- richs, 2015; Dima, 2016). The datasets for this task differ in size, num- ber of relations and granularity level (e.g. Nastase and Szpakowicz, 2003; Kim and Baldwin, 2007; Tratz and Hovy, 2010). The decision on the re- lation inventory is somewhat arbitrary, and sub- sequently, the inter-annotator agreement is rela- tively low (Kim and Baldwin, 2007). Specifi- cally, a noun-compound may fit into more than one relation: for instance, in Tratz (2011), busi- ness zone is labeled as CONTAINED (zone con- tains business), although it could also be labeled as PURPOSE (zone whose purpose is business). 2.2 Noun-compound Paraphrasing As an alternative to the strict classification to pre- defined relation classes, Nakov and Hearst (2006) suggested that the semantics of a noun-compound could be expressed with multiple prepositional and verbal paraphrases. For example, apple cake is a cake from, made of, or which contains apples. The suggestion was embraced and resulted in two SemEval tasks. SemEval 2010 task 9 (Butnariu et al., 2009) provided a list of plau- sible human-written paraphrases for each noun- compound, and systems had to rank them with the goal of high correlation with human judgments. In SemEval 2013 task 4 (Hendrickx et al., 2013), systems were expected to provide a ranked list of paraphrases extracted from free text. Various approaches were proposed for this task. Most approaches start with a pre-processing step of extracting joint occurrences of the constituents from a corpus to generate a list of candidate para- phrases. Unsupervised methods apply information extraction techniques to find and rank the most meaningful paraphrases (Kim and Nakov, 2011; Xavier and Lima, 2014; Pasca, 2015; Pavlick and Pasca, 2017), while supervised approaches learn to rank paraphrases using various features such as co-occurrence counts (Wubben, 2010; Li et al., 2010; Surtani et al., 2013; Versley, 2013) or the distributional representations of the noun- compounds (Van de Cruys et al., 2013). One of the challenges of this approach is the ability to generalize. If one assumes that suffi- cient paraphrases for all noun-compounds appear in the corpus, the problem reduces to ranking the existing paraphrases. It is more likely, however, that some noun-compounds do not have any para- phrases in the corpus or have just a few. The ap- proach of Van de Cruys et al. (2013) somewhat generalizes for unseen noun-compounds. They represented each noun-compound using a compo- sitional distributional vector (Mitchell and Lap- ata, 2010) and used it to predict paraphrases from the corpus. Similar noun-compounds are expected to have similar distributional representations and therefore yield the same paraphrases. For exam- ple, if the corpus does not contain paraphrases for plastic spoon, the model may predict the para- phrases of a similar compound such as steel knife. sharing information between semantically-similar paraphrases, Nulty and Costello (2010) and Surtani et al. (2013) learned "is-a" relations between paraphrases from the co-occurrences of various paraphrases with each other. For example, the specific '[w2] extracted in the context of olive from [w1]' template (e.g. oil) generalizes to '[w2] made from [w1]'. One of the drawbacks of these systems is that they favor more frequent paraphrases, which may co-occur with a wide variety of more specific paraphrases. In terms of 2.3 Noun-compounds in other Tasks Noun-compound paraphrasing may be considered as a subtask of the general paraphrasing task, whose goal is to generate, given a text fragment, additional texts with the same meaning. How- ever, general paraphrasing methods do not guar- antee to explicate implicit information conveyed in the original text. Moreover, the most notable source for extracting paraphrases is multiple trans- lations of the same text (Barzilay and McKeown, w1i = 28 M LPw pi = 78 M LPp cake made of [w1] cake [p] apple (23) made (28) apple (4145) cake ... (7891) of (1) [w1] (2) [w2] (3) [p] (23) made (28) apple (4145) cake ... (7891) of (1) [w1] (2) [w2] (3) [p] (78) [w2] containing [w1] ... (131) [w2] made of [w1] ... Figure 1: An illustration of the model predictions for w1 and p given the triplet (cake, made of, apple). The model predicts each component given the encoding of the other two components, successfully pre- dicting 'apple' given 'cake made of [w1]', while predicting '[w2] containing [w1]' for 'cake [p] apple'. 2001; Ganitkevitch et al., 2013; Mallinson et al., 2017). If a certain concept can be described by an English noun-compound, it is unlikely that a translator chose to translate its foreign language equivalent to an explicit paraphrase instead. Another related task is Open Information Ex- traction (Etzioni et al., 2008), whose goal is to ex- tract relational tuples from text. Most system fo- cus on extracting verb-mediated relations, and the few exceptions that addressed noun-compounds provided partial solutions. Pal and Mausam (2016) focused on segmenting multi-word noun- compounds and assumed an is-a relation between the parts, as extracting (Francis Collins, is, NIH director) from "NIH director Francis Collins". Xavier and Lima (2014) enriched the corpus with compound definitions from online dictionaries, for interpreting oil industry as (industry, example, produces and delivers, oil) based on the Word- Net definition "industry that produces and delivers oil". This method is very limited as it can only interpret noun-compounds with dictionary entries, while the majority of English noun-compounds don't have them (Nakov, 2013). 3 Paraphrasing Model As opposed to previous approaches, that focus on predicting a paraphrase template for a given noun- compound, we reformulate the task as a multi- task learning problem (Section 3.1), and train the model to also predict a missing constituent given the paraphrase template and the other constituent. Our model is semi-supervised, and it expects as input a set of noun-compounds and a set of con- strained part-of-speech tag-based templates that make valid prepositional and verbal paraphrases. Section 3.2 details the creation of training data, and Section 3.3 describes the model. 3.1 Multi-task Reformulation Each training example consists of two constituents and a paraphrase (w2, p, w1), and we train the model on 3 subtasks: (1) predict p given w1 and w2, (2) predict w1 given p and w2, and (3) predict w2 given p and w1. Figure 1 demonstrates the pre- dictions for subtasks (1) (right) and (2) (left) for the training example (cake, made of, apple). Ef- fectively, the model is trained to answer questions such as "what can cake be made of?", "what can be made of apple?", and "what are the possible re- lationships between cake and apple?". The multi-task reformulation helps learning bet- ter representations for paraphrase templates, by embedding semantically-similar paraphrases in proximity. Similarity between paraphrases stems either from lexical similarity and overlap between the paraphrases (e.g. 'is made of' and 'made of'), or from shared constituents, e.g. '[w2] involved in [w1]' and '[w2] in [w1] industry' can share [w1] = insurance and [w2] = company. This allows the model to predict a correct paraphrase for a given noun-compound, even when the constituents do not occur with that paraphrase in the corpus. 3.2 Training Data We collect a training set of (w2, p, w1, s) exam- ples, where w1 and w2 are constituents of a noun- compound w1w2, p is a templated paraphrase, and s is the score assigned to the training instance.2 2We refer to "paraphrases" and "paraphrase templates" in- terchangeably. In the extracted templates, [w2] always pre- cedes [w1], probably because w2 is normally the head noun. We use the 19,491 noun-compounds found in the SemEval tasks datasets (Butnariu et al., 2009; Hendrickx et al., 2013) and in Tratz (2011). To ex- tract patterns of part-of-speech tags that can form noun-compound paraphrases, such as '[w2] VERB PREP [w1]', we use the SemEval task training data, but we do not use the lexical information in the gold paraphrases. Corpus. Similarly to previous noun-compound paraphrasing approaches, we use the Google N- gram corpus (Brants and Franz, 2006) as a source of paraphrases (Wubben, 2010; Li et al., 2010; Surtani et al., 2013; Versley, 2013). The cor- pus consists of sequences of n terms (for n ∈ {3, 4, 5}) that occur more than 40 times on the web. We search for n-grams following the ex- tracted patterns and containing w1 and w2's lem- mas for some noun-compound in the set. We re- move punctuation, adjectives, adverbs and some determiners to unite similar paraphrases. For ex- ample, from the 5-gram 'cake made of sweet ap- ples' we extract the training example (cake, made of, apple). We keep only paraphrases that occurred at least 5 times, resulting in 136,609 instances. Weighting. Each n-gram in the corpus is accom- panied with its frequency, which we use to assign scores to the different paraphrases. For instance, 'cake of apples' may also appear in the corpus, al- though with lower frequency than 'cake from ap- ples'. As also noted by Surtani et al. (2013), the shortcoming of such a weighting mechanism is that it prefers shorter paraphrases, which are much count('cake more common in the corpus (e.g. made of apples') (cid:28) count('cake of apples')). We overcome this by normalizing the frequencies for each paraphrase length, creating a distribution of paraphrases in a given length. Negative Samples. We add 1% of negative sam- ples by selecting random corpus words w1 and w2 that do not co-occur, and adding an exam- ple (w2, [w2] is unrelated to [w1], w1, sn), for some predefined negative samples score sn. Sim- ilarly, for a word wi that did not occur in a para- phrase p we add (wi, p, UNK, sn) or (UNK, p, wi, sn), where UNK is the unknown word. This may help the model deal with non-compositional noun-compounds, where w1 and w2 are unrelated, rather than forcibly predicting some relation be- tween them. 3.3 Model For a training instance (w2, p, w1, s), we predict each item given the encoding of the other two. Encoding. We use the 100-dimensional pre- trained GloVe embeddings (Pennington et al., 2014), which are fixed during training. In addi- tion, we learn embeddings for the special words [w1], [w2], and [p], which are used to represent a missing component, as in "cake made of [w1]", "[w2] made of apple", and "cake [p] apple". For a missing component x ∈ {[p], [w1], [w2]} surrounded by the sequences of words v1:i−1 and vi+1:n, we encode the sequence using a bidirec- tional long-short term memory (bi-LSTM) net- work (Graves and Schmidhuber, 2005), and take the ith output vector as representing the missing component: bLS(v1:i, x, vi+1:n)i. In bi-LSTMs, each output vector is a concate- nation of the outputs of the forward and backward LSTMs, so the output vector is expected to con- tain information on valid substitutions both with respect to the previous words v1:i−1 and the sub- sequent words vi+1:n. Prediction. We predict a distribution of the vo- cabulary of the missing component, i.e. to predict w1 correctly we need to predict its index in the word vocabulary Vw, while the prediction of p is from the vocabulary of paraphrases in the training set, Vp. We predict the following distributions: p = softmax(Wp · bLS( (cid:126)w2, [p], (cid:126)w1)2) w1 = softmax(Ww · bLS( (cid:126)w2, (cid:126)p1:n, [w1])n+1) w2 = softmax(Ww · bLS([w2], (cid:126)p1:n, (cid:126)w1)1) where Ww ∈ RVw×2d, Wp ∈ RVp×2d, and d is the embeddings dimension. (1) During training, we compute cross-entropy loss for each subtask using the gold item and the pre- diction, sum up the losses, and weight them by the instance score. During inference, we predict the missing components by picking the best scoring index in each distribution:3 pi = argmax(p) w1i = argmax( w1) w2i = argmax( w2) (2) The subtasks share the pre-trained word embed- dings, the special embeddings, and the biLSTM parameters. Subtasks (2) and (3) also share Ww, the MLP that predicts the index of a word. 3In practice, we pick the k best scoring indices in each distribution for some predefined k, as we discuss in Section 5. [w1] [w2] cataract surgery software company stone wall Predicted Paraphrases [w2] of [w1] [w2] on [w1] [w2] to remove [w1] [w2] in patients with [w1] [w2] of [w1] [w2] to develop [w1] [w2] in [w1] industry [w2] involved in [w1] [w2] is of [w1] [w2] of [w1] [w2] Paraphrase surgery [w2] to treat [w1] company [w2] engaged in [w1] Predicted [w1] heart brain back knee management production computer business spring afternoon Paraphrase [w1] [w2] to treat [w1] cataract [w2] engaged in [w1] software Predicted [w2] surgery drug patient transplant company firm engineer industry party meeting [w2] is made of [w1] [w2] made of [w1] rally session Table 1: Examples of top ranked predicted components using the model: predicting the paraphrase given w1 and w2 (left), w1 given w2 and the paraphrase (middle), and w2 given w1 and the paraphrase (right). hour day meeting [w2] held in [w1] [w2] held in [w1] morning Figure 2: A t-SNE map of a sample of paraphrases, using the paraphrase vectors encoded by the biLSTM, for example bLS([w2] made of [w1]). Implementation Details. The model is imple- mented in DyNet (Neubig et al., 2017). We dedi- cate a small number of noun-compounds from the corpus for validation. We train for up to 10 epochs, stopping early if the validation loss has not im- proved in 3 epochs. We use Momentum SGD (Nesterov, 1983), and set the batch size to 10 and the other hyper-parameters to their default values. 4 Qualitative Analysis To estimate the quality of the proposed model, we first provide a qualitative analysis of the model outputs. Table 1 displays examples of the model outputs for each possible usage: predicting the paraphrase given the constituent words, and pre- dicting each constituent word given the paraphrase and the other word. The examples in the table are from among the top 10 ranked predictions for each component- pair. We note that most of the (w2, paraphrase, w1) triplets in the table do not occur in the training data, but are rather generalized from similar exam- ples. For example, there is no training instance for "company in the software industry" but there is a "firm in the software industry" and a company in many other industries. While the frequent prepositional paraphrases are often ranked at the top of the list, the model also retrieves more specified verbal paraphrases. The list often contains multiple semantically- similar paraphrases, such as '[w2] involved in [w1]' and '[w2] in [w1] industry'. This is a result of the model training objective (Section 3) which positions the vectors of semantically-similar para- phrases close to each other in the embedding space, based on similar constituents. To illustrate paraphrase similarity we compute a t-SNE projection (Van Der Maaten, 2014) of the embeddings of all the paraphrases, and draw a sample of 50 paraphrases in Figure 2. The projec- tion positions semantically-similar but lexically- divergent paraphrases in proximity, likely due to [w2] is for [w1][w2] belongs to [w1][w2] pertaining to [w1][w2] issued by [w1][w2] related to [w1][w2] by way of [w1][w2] in terms of [w1][w2] done by [w1][w2] to produce [w1][w2] involved in [w1][w2] with [w1][w2] composed of [w1][w2] employed in [w1][w2] owned by [w1][w2] by means of [w1][w2] to make [w1][w2] produced by [w1][w2] source of [w1][w2] found in [w1][w2] offered by [w1][w2] out of [w1][w2] held by [w1][w2] for use in [w1][w2] consists of [w1][w2] relating to [w1][w2] devoted to [w1][w2] engaged in [w1][w2] occur in [w1][w2] caused by [w1][w2] supplied by [w1][w2] part of [w1][w2] provided by [w1][w2] generated by [w1][w2] made of [w1][w2] consisting of [w1][w2] is made of [w1][w2] for [w1][w2] from [w1][w2] created by [w1][w2] given by [w1][w2] of providing [w1][w2] belonging to [w1][w2] aimed at [w1][w2] conducted by [w1][w2] dedicated to [w1][w2] made by [w1][w2] because of [w1][w2] included in [w1][w2] with respect to [w1][w2] given to [w1] many shared constituents. For instance, 'with', 'from', and 'out of' can all describe the relation between food words and their ingredients. 5 Evaluation: Noun-Compound Interpretation Tasks For quantitative evaluation we employ our model for two noun-compound interpretation tasks. The main evaluation is on retrieving and ranking para- phrases (§5.1). For the sake of completeness, we also evaluate the model on classification to a fixed inventory of relations (§5.2), although it wasn't de- signed for this task. 5.1 Paraphrasing Task Definition. The general goal of this task is to interpret each noun-compound to multiple prepositional and verbal paraphrases. In SemEval 2013 Task 4,4 the participating systems were asked to retrieve a ranked list of paraphrases for each noun-compound, which was automatically evaluated against a similarly ranked list of para- phrases proposed by human annotators. Model. For a given noun-compound w1w2, we first predict the k = 250 most likely paraphrases: p1, ..., pk = argmaxk p, where p is the distribution of paraphrases defined in Equation 1. While the model also provides a score for each paraphrase (Equation 1), the scores have not been optimized to correlate with human judgments. We therefore developed a re-ranking model that re- ceives a list of paraphrases and re-ranks the list to better fit the human judgments. We follow Herbrich (2000) and learn a pair- wise ranking model. The model determines which of two paraphrases of the same noun-compound should be ranked higher, and it is implemented as an SVM classifier using scikit-learn (Pedregosa et al., 2011). For training, we use the available training data with gold paraphrases and ranks pro- vided by the SemEval task organizers. We extract the following features for a paraphrase p: 1. The part-of-speech tags contained in p 2. The prepositions contained in p 3. The number of words in p 4. Whether p ends with the special [w1] symbol 5. cosine(bLS([w2], p, [w1])2, (cid:126)Vp pi is the biLSTM encoding of the pre- where (cid:126)Vp dicted paraphrase computed in Equation 1 and ppi pi) · ppi 4https://www.cs.york.ac.uk/semeval-2013/task4 is its confidence score. The last feature incorpo- rates the original model score into the decision, as to not let other considerations such as preposition frequency in the training set take over. During inference, the model sorts the list of paraphrases retrieved for each noun-compound ac- cording to the pairwise ranking. It then scores each paraphrase by multiplying its rank with its original model score, and prunes paraphrases with final score < 0.025. The values for k and the threshold were tuned on the training set. Evaluation Settings. The SemEval 2013 task provided a scorer that compares words and n- grams from the gold paraphrases against those in the predicted paraphrases, where agreement on a prefix of a word (e.g. in derivations) yields a partial scoring. The overall score assigned to each system is calculated in two different ways. The 'isomorphic' setting rewards both precision and recall, and performing well on it requires ac- curately reproducing as many of the gold para- phrases as possible, and in much the same order. The 'non-isomorphic' setting rewards only preci- sion, and performing well on it requires accurately reproducing the top-ranked gold paraphrases, with no importance to order. Baselines. We compare our method with the published results from the SemEval task. The SemEval 2013 baseline generates for each noun- compound a list of prepositional paraphrases in an arbitrary fixed order. It achieves a moder- ately good score in the non-isomorphic setting by generating a fixed set of paraphrases which are both common and generic. The MELODI sys- tem performs similarly: it represents each noun- compound using a compositional distributional vector (Mitchell and Lapata, 2010) which is then used to predict paraphrases from the corpus. The performance of MELODI indicates that the sys- tem was rather conservative, yielding a few com- mon paraphrases rather than many specific ones. SFS and IIITH, on the other hand, show a more balanced trade-off between recall and precision. As a sanity check, we also report the results of a baseline that retrieves ranked paraphrases from the training data collected in Section 3.2. This base- line has no generalization abilities, therefore it is expected to score poorly on the recall-aware iso- morphic setting. Method SFS (Versley, 2013) IIITH (Surtani et al., 2013) MELODI (Van de Cruys et al., 2013) SemEval 2013 Baseline (Hendrickx et al., 2013) Baseline Our method isomorphic 23.1 23.1 13.0 13.8 3.8 28.2 non-isomorphic 17.9 25.8 54.8 40.6 16.1 28.4 Baselines This paper Table 2: Results of the proposed method and the baselines on the SemEval 2013 task. Category False Positive (1) Valid paraphrase missing from gold (2) Valid paraphrase, slightly too specific (3) Incorrect, common prepositional paraphrase (4) Incorrect, other errors (5) Syntactic error in paraphrase (6) Valid paraphrase, but borderline grammatical False Negative (1) Long paraphrase (more than 5 words) (2) Prepositional paraphrase with determiners (3) Inflected constituents in gold (4) Other errors % 44% 15% 14% 14% 8% 5% 30% 25% 10% 35% Table 3: Categories of false positive and false neg- ative predictions along with their percentage. Results. Table 2 displays the performance of the proposed method and the baselines in the two eval- uation settings. Our method outperforms all the methods in the isomorphic setting. In the non- isomorphic setting, it outperforms the other two systems that score reasonably on the isomorphic setting (SFS and IIITH) but cannot compete with the systems that focus on achieving high precision. The main advantage of our proposed model is in its ability to generalize, and that is also demonstrated in comparison to our baseline per- formance. The baseline retrieved paraphrases only for a third of the noun-compounds (61/181), ex- pectedly yielding poor performance on the isomor- phic setting. Our model, which was trained on the very same data, retrieved paraphrases for all noun- compounds. For example, welfare system was not present in the training data, yet the model pre- dicted the correct paraphrases "system of welfare benefits", "system to provide welfare" and others. Error Analysis. We analyze the causes of the false positive and false negative errors made by the model. For each error type we sample 10 noun- compounds. For each noun-compound, false pos- itive errors are the top 10 predicted paraphrases which are not included in the gold paraphrases, while false negative errors are the top 10 gold paraphrases not found in the top k predictions made by the model. Table 3 displays the manu- ally annotated categories for each error type. Many false positive errors are actually valid paraphrases that were not suggested by the hu- man annotators (error 1, "discussion by group"). Some are borderline valid with minor grammati- cal changes (error 6, "force of coalition forces") or too specific (error 2, "life of women in commu- nity" instead of "life in community"). Common prepositional paraphrases were often retrieved al- though they are incorrect (error 3). We conjec- ture that this error often stem from an n-gram that does not respect the syntactic structure of the sen- tence, e.g. a sentence such as "rinse away the oil from baby 's head" produces the n-gram "oil from baby". With respect to false negative examples, they consisted of many long paraphrases, while our model was restricted to 5 words due to the source of the training data (error 1, "holding done in the case of a share"). Many prepositional paraphrases consisted of determiners, which we conflated with the same paraphrases without determiners (error 2, "mutation of a gene"). Finally, in some para- phrases, the constituents in the gold paraphrase appear in inflectional forms (error 3, "holding of shares" instead of "holding of share"). 5.2 Classification Noun-compound classification is defined as a mul- ticlass classification problem: given a pre-defined set of relations, classify w1w2 to the relation that holds between w1 and w2. Potentially, the cor- pus co-occurrences of w1 and w2 may contribute to the classification, e.g. '[w2] held at [w1]' in- dicates a TIME relation. Tratz and Hovy (2010) in- cluded such features in their classifier, but ablation tests showed that these features had a relatively small contribution, probably due to the sparseness of the paraphrases. Recently, Shwartz and Wa- terson (2018) showed that paraphrases may con- tribute to the classification when represented in a continuous space. Model. We generate a paraphrase vector repre- sentation (cid:126)par(w1w2) for a given noun-compound w1w2 as follows. We predict the indices of the k most likely paraphrases: p1, ..., pk = argmaxk p, where p is the distribution on the paraphrase vo- cabulary Vp, as defined in Equation 1. We then encode each paraphrase using the biLSTM, and average the paraphrase vectors, weighted by their confidence scores in p: (cid:80)k (cid:80)k i=1 ppi · (cid:126)Vp i=1 ppi pi (3) (cid:126)par(w1w2) = We train a linear classifier, and represent w1w2 in a feature vector f (w1w2) in two variants: para- phrase: f (w1w2) = (cid:126)par(w1w2), or integrated: concatenated to the constituent word embeddings f (w1w2) = [ (cid:126)par(w1w2), (cid:126)w1, (cid:126)w2]. The classifier type (logistic regression/SVM), k, and the penalty are tuned on the validation set. We also pro- vide a baseline in which we ablate the paraphrase component from our model, representing a noun- compound by the concatenation of its constituent embeddings f (w1w2) = [ (cid:126)w1, (cid:126)w2] (distributional). Datasets. We evaluate on the Tratz (2011) dataset, which consists of 19,158 instances, la- beled in 37 fine-grained relations (Tratz-fine) or 12 coarse-grained relations (Tratz-coarse). We report the performance on two different dataset splits to train, test, and validation: a ran- dom split in a 75:20:5 ratio, and, following con- cerns raised by Dima (2016) about lexical mem- orization (Levy et al., 2015), on a lexical split in which the sets consist of distinct vocabularies. The lexical split better demonstrates the scenario in which a noun-compound whose constituents have not been observed needs to be interpreted based on similar observed noun-compounds, e.g. inferring the relation in pear tart based on apple cake and other similar compounds. We follow the random and full-lexical splits from Shwartz and Waterson (2018). Baselines. We report the results of 3 baselines representative of different approaches: 1) Feature-based (Tratz and Hovy, 2010): we re- implement a version of the classifier with features from WordNet and Roget's Thesaurus. 2) Compositional (Dima, 2016): a neural archi- tecture that operates on the distributional represen- tations of the noun-compound and its constituents. Noun-compound representations are learned with Dataset & Split Tratz fine Random Tratz fine Lexical Tratz coarse Random Tratz coarse Lexical Method Tratz and Hovy (2010) Dima (2016) Shwartz and Waterson (2018) distributional paraphrase integrated Tratz and Hovy (2010) Dima (2016) Shwartz and Waterson (2018) distributional paraphrase integrated distributional paraphrase integrated distributional paraphrase integrated Tratz and Hovy (2010) Dima (2016) Shwartz and Waterson (2018) Tratz and Hovy (2010) Dima (2016) Shwartz and Waterson (2018) F1 0.739 0.725 0.714 0.677 0.505 0.673 0.340 0.334 0.429 0.356 0.333 0.370 0.760 0.775 0.736 0.689 0.557 0.700 0.391 0.372 0.478 0.370 0.345 0.393 Table 4: Classification results. For each dataset split, the top part consists of baseline methods and the bottom part of methods from this paper. The best performance in each part appears in bold. the Full-Additive (Zanzotto et al., 2010) and Ma- trix (Socher et al., 2012) models. We report the results from Shwartz and Waterson (2018). 3) Paraphrase-based (Shwartz and Waterson, 2018): a neural classification model that learns an LSTM-based representation of the joint occur- rences of w1 and w2 in a corpus (i.e. observed paraphrases), and integrates distributional infor- mation using the constituent embeddings. Results. Table 4 displays the methods' perfor- mance on the two versions of the Tratz (2011) dataset and the two dataset splits. The paraphrase model on its own is inferior to the distributional model, however, the integrated version improves upon the distributional model in 3 out of 4 settings, demonstrating the complementary nature of the distributional and paraphrase-based methods. The contribution of the paraphrase component is espe- cially noticeable in the lexical splits. As expected, the integrated method in Shwartz and Waterson (2018), in which the paraphrase representation was trained with the objective of classification, performs better than our integrated model. The superiority of both integrated models in the lexical splits confirms that paraphrases are beneficial for classification. Example Noun-compounds printing plant marketing expert development expert weight/job loss rubber band rice cake Gold PURPOSE Distributional OBJECTIVE TOPICAL OBJECTIVE OBJECTIVE CAUSAL CONTAINMENT PURPOSE Example Paraphrases [w2] engaged in [w1] [w2] in [w1] [w2] knowledge of [w1] [w2] of [w1] [w2] made of [w1] [w2] is made of [w1] laboratory animal LOCATION/PART-WHOLE ATTRIBUTE [w2] in [w1], [w2] used in [w1] Table 5: Examples of noun-compounds that were correctly classified by the integrated model while being incorrectly classified by distributional, along with top ranked indicative paraphrases. Analysis. To analyze the contribution of the paraphrase component to the classification, we fo- cused on the differences between the distributional and integrated models on the Tratz-Coarse lexical split. Examination of the per-relation F1 scores revealed that the relations for which performance improved the most in the integrated model were TOPICAL (+11.1 F1 points), OBJECTIVE (+5.5), AT- TRIBUTE (+3.8) and LOCATION/PART WHOLE (+3.5). a plausible concrete interpretation or which origi- nated from one. For example, it predicted that sil- ver spoon is simply a spoon made of silver and that monkey business is a business that buys or raises monkeys. In other cases, it seems that the strong prior on one constituent leads to ignoring the other, unrelated constituent, as in predicting "wedding made of diamond". Finally, the "unrelated" para- phrase was predicted for a few compounds, but those are not necessarily non-compositional (ap- plication form, head teacher). We conclude that the model does not address compositionality and suggest to apply it only to compositional com- pounds, which may be recognized using compo- sitionality prediction methods as in Reddy et al. (2011). Table 5 provides examples of noun-compounds that were correctly classified by the integrated model while being incorrectly classified by the dis- tributional model. For each noun-compound, we provide examples of top ranked paraphrases which are indicative of the gold label relation. 6 Compositionality Analysis Our paraphrasing approach at its core assumes compositionality: only a noun-compound whose meaning is derived from the meanings of its con- stituent words can be rephrased using them. In §3.2 we added negative samples to the train- ing data to simulate non-compositional noun- compounds, which are included in the classifi- cation dataset (§5.2). We assumed that these compounds, more often than compositional ones would consist of unrelated constituents (spelling bee, sacred cow), and added instances of random unrelated nouns with '[w2] is unrelated to [w1]'. Here, we assess whether our model succeeds to recognize non-compositional noun-compounds. We used the compositionality dataset of Reddy et al. (2011) which consists of 90 noun- compounds along with human judgments about their compositionality in a scale of 0-5, 0 be- ing non-compositional and 5 being compositional. For each noun-compound in the dataset, we pre- dicted the 15 best paraphrases and analyzed the er- rors. The most common error was predicting para- phrases for idiomatic compounds which may have 7 Conclusion We presented a new semi-supervised model for noun-compound paraphrasing. The model differs from previous models by being trained to predict both a paraphrase given a noun-compound, and a missing constituent given the paraphrase and the other constituent. This results in better general- ization abilities, leading to improved performance in two noun-compound interpretation tasks. In the future, we plan to take generalization one step fur- ther, and explore the possibility to use the biL- STM for generating completely new paraphrase templates unseen during training. Acknowledgments This work was supported in part by an Intel ICRI-CI grant, the Israel Science Foundation grant 1951/17, the German Research Foundation through the German-Israeli Project Cooperation (DIP, grant DA 1600/1-1), and Theo Hoffenberg. Vered is also supported by the Clore Scholars Pro- gramme (2017), and the AI2 Key Scientific Chal- lenges Program (2017). References Regina Barzilay and R. Kathleen McKeown. 2001. Extracting paraphrases from a parallel corpus. In Proceedings of the 39th Annual Meeting of the Association for Computational Linguistics. http://aclweb.org/anthology/P01-1008. Thorsten Brants and Alex Franz. 2006. Web 1t 5-gram version 1 . Cristina Butnariu, Su Nam Kim, Preslav Nakov, Diarmuid ´O S´eaghdha, Stan Szpakowicz, and Tony Veale. 2009. Semeval-2010 task 9: The interpretation of noun compounds using para- In Proceed- phrasing verbs and prepositions. ings of the Workshop on Semantic Evalua- tions: Recent Achievements and Future Direc- tions (SEW-2009). Association for Computational Linguistics, Boulder, Colorado, pages 100–105. http://www.aclweb.org/anthology/W09-2416. Corina Dima. 2016. Proceedings of the 1st Work- shop on Representation Learning for NLP, As- sociation for Computational Linguistics, chapter On the Compositionality and Semantic Interpreta- tion of English Noun Compounds, pages 27–39. https://doi.org/10.18653/v1/W16-1604. Corina Dima and Erhard Hinrichs. 2015. Automatic noun compound interpretation using deep neural networks and word embeddings. IWCS 2015 page 173. Oren Etzioni, Michele Banko, Stephen Soderland, and Daniel S Weld. 2008. Open information extrac- tion from the web. Communications of the ACM 51(12):68–74. In Proceedings of the North American Chapter of Juri Ganitkevitch, Benjamin Van Durme, and Chris PPDB: The paraphrase Callison-Burch. 2013. the 2013 Con- database. ference of the Association for Computational Linguistics: Hu- man Language Technologies. Association for Computational 758–764. pages http://aclweb.org/anthology/N13-1092. Linguistics, Roxana Girju. 2007. In Proceedings of Improving the interpreta- tion of noun phrases with cross-linguistic infor- the 45th Annual mation. Meeting of the Association of Computational Lin- guistics. Association for Computational Linguis- tics, Prague, Czech Republic, pages 568–575. http://www.aclweb.org/anthology/P07-1072. Alex Graves and Jurgen Schmidhuber. 2005. Frame- wise phoneme classification with bidirectional lstm and other neural network architectures. Neural Net- works 18(5-6):602–610. Iris Hendrickx, Zornitsa Kozareva, Preslav Nakov, Di- armuid ´O S´eaghdha, Stan Szpakowicz, and Tony Veale. 2013. Semeval-2013 task 4: Free paraphrases In Second Joint Conference of noun compounds. on Lexical and Computational Semantics (*SEM), Volume 2: Proceedings of the Seventh International Workshop on Semantic Evaluation (SemEval 2013). Association for Computational Linguistics, pages 138–143. http://aclweb.org/anthology/S13-2025. Ralf Herbrich. 2000. Large margin rank boundaries for ordinal regression. Advances in large margin classi- fiers pages 115–132. Nam Su Kim and Preslav Nakov. 2011. Large- scale noun compound interpretation using boot- In Pro- strapping and the web as a corpus. ceedings of the 2011 Conference on Empirical Methods in Natural Language Processing. Associa- tion for Computational Linguistics, pages 648–658. http://aclweb.org/anthology/D11-1060. Su Nam Kim and Timothy Baldwin. 2007. Interpret- ing noun compounds using bootstrapping and sense In Proceedings of Conference of the collocation. Pacific Association for Computational Linguistics. pages 129–136. In Proceedings of Omer Levy, Steffen Remus, Chris Biemann, and Do supervised distribu- Ido Dagan. 2015. inference re- tional methods really learn lexical the 2015 Confer- lations? ence of the North American Chapter of the As- sociation for Computational Linguistics: Human Language Technologies. Association for Computa- tional Linguistics, Denver, Colorado, pages 970– 976. http://www.aclweb.org/anthology/N15-1098. Guofu Li, Alejandra Lopez-Fernandez, and Tony Veale. 2010. Ucd-goggle: A hybrid system for In Proceedings of noun compound paraphrasing. the 5th International Workshop on Semantic Eval- uation. Association for Computational Linguistics, pages 230–233. Jonathan Mallinson, Rico Sennrich, and Mirella Lap- ata. 2017. Paraphrasing revisited with neural ma- chine translation. In Proceedings of the 15th Confer- ence of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers. Association for Computational Linguistics, Valen- cia, Spain, pages 881–893. Jeff Mitchell and Mirella Lapata. 2010. Composition in distributional models of semantics. Cognitive sci- ence 34(8):1388–1429. Preslav Nakov. 2013. On the interpretation of noun compounds: Syntax, semantics, and entailment. Natural Language Engineering 19(03):291–330. Preslav Nakov and Marti Hearst. 2006. Using verbs to In International characterize noun-noun relations. Conference on Artificial Intelligence: Methodology, Systems, and Applications. Springer, pages 233– 244. Vivi Nastase and Stan Szpakowicz. 2003. Explor- In Fifth in- ing noun-modifier semantic relations. ternational workshop on computational semantics (IWCS-5). pages 285–301. Yurii Nesterov. 1983. A method of solving a con- vex programming problem with convergence rate o (1/k2). In Soviet Mathematics Doklady. volume 27, pages 372–376. Graham Neubig, Chris Dyer, Yoav Goldberg, Austin Matthews, Waleed Ammar, Antonios Anastasopou- los, Miguel Ballesteros, David Chiang, Daniel Clothiaux, Trevor Cohn, et al. 2017. Dynet: The arXiv preprint dynamic neural network toolkit. arXiv:1701.03980 . Paul Nulty and Fintan Costello. 2010. Ucd-pn: Select- ing general paraphrases using conditional probabil- In Proceedings of the 5th International Work- ity. shop on Semantic Evaluation. Association for Com- putational Linguistics, pages 234–237. Diarmuid ´O S´eaghdha and Ann Copestake. 2009. Using lexical and relational similarity to clas- the sify semantic relations. 12th Conference of the European Chapter of the ACL (EACL 2009). Association for Computa- tional Linguistics, Athens, Greece, pages 621–629. http://www.aclweb.org/anthology/E09-1071. In Proceedings of Harinder Pal and Mausam. 2016. Demonyms and com- pound relational nouns in nominal open ie. In Pro- ceedings of the 5th Workshop on Automated Knowl- edge Base Construction. Association for Compu- tational Linguistics, San Diego, CA, pages 35–39. http://www.aclweb.org/anthology/W16-1307. Patrick Pantel, Rahul Bhagat, Bonaventura Coppola, Timothy Chklovski, and Eduard Hovy. 2007. ISP: Learning inferential selectional preferences. In Hu- man Language Technologies 2007: The Confer- ence of the North American Chapter of the Asso- ciation for Computational Linguistics; Proceedings of the Main Conference. Association for Computa- tional Linguistics, Rochester, New York, pages 564– 571. http://www.aclweb.org/anthology/N/N07/N07- 1071. Marius Pasca. 2015. Interpreting compound noun In Proceed- phrases using web search queries. ings of the 2015 Conference of the North American Chapter of the Association for Computational Lin- guistics: Human Language Technologies. Associa- tion for Computational Linguistics, pages 335–344. https://doi.org/10.3115/v1/N15-1037. Ellie Pavlick and Marius Pasca. 2017. Identify- ing 1950s american jazz musicians: Fine-grained In Pro- isa extraction via modifier composition. ceedings of the 55th Annual Meeting of the As- sociation for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, Vancouver, Canada, pages 2099–2109. http://aclweb.org/anthology/P17-1192. F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Pretten- hofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Pas- sos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. 2011. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research 12:2825–2830. Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global vectors for word In Proceedings of the 2014 Con- representation. ference on Empirical Methods in Natural Language Processing (EMNLP). Association for Computa- tional Linguistics, Doha, Qatar, pages 1532–1543. http://www.aclweb.org/anthology/D14-1162. Siva Reddy, Diana McCarthy, and Suresh Manand- har. 2011. An empirical study on compositional- In Proceedings of 5th In- ity in compound nouns. ternational Joint Conference on Natural Language Processing. Asian Federation of Natural Language Processing, Chiang Mai, Thailand, pages 210–218. http://www.aclweb.org/anthology/I11-1024. Vered Shwartz and Chris Waterson. 2018. Olive oil is made of olives, baby oil is made for babies: In- terpreting noun compounds using paraphrases in a In The 16th Annual Conference of neural model. the North American Chapter of the Association for Computational Linguistics: Human Language Tech- nologies (NAACL-HLT). New Orleans, Louisiana. Richard Socher, Brody Huval, D. Christopher Man- ning, and Y. Andrew Ng. 2012. Semantic composi- tionality through recursive matrix-vector spaces. In Proceedings of the 2012 Joint Conference on Empir- ical Methods in Natural Language Processing and Computational Natural Language Learning. Asso- ciation for Computational Linguistics, pages 1201– 1211. http://aclweb.org/anthology/D12-1110. Nitesh Surtani, Arpita Batra, Urmi Ghosh, and Soma Iiit-h: A corpus-driven co-occurrence Paul. 2013. based probabilistic model for noun compound para- In Second Joint Conference on Lexical phrasing. and Computational Semantics (* SEM), Volume 2: Proceedings of the Seventh International Workshop on Semantic Evaluation (SemEval 2013). volume 2, pages 153–157. Stephen Tratz. 2011. Semantically-enriched parsing for natural language understanding. University of Southern California. Stephen Tratz and Eduard Hovy. 2010. A taxon- omy, dataset, and classifier for automatic noun In Proceedings of the compound interpretation. 48th Annual Meeting of the Association for Com- putational Linguistics. Association for Computa- tional Linguistics, Uppsala, Sweden, pages 678– 687. http://www.aclweb.org/anthology/P10-1070. Tim Van de Cruys, Stergos Afantenos, and Philippe Muller. 2013. Melodi: A supervised distribu- tional approach for free paraphrasing of noun com- In Second Joint Conference on Lex- pounds. ical and Computational Semantics (*SEM), Vol- ume 2: the Seventh Interna- tional Workshop on Semantic Evaluation (Se- Proceedings of mEval 2013). Association for Computational Lin- guistics, Atlanta, Georgia, USA, pages 144–147. http://www.aclweb.org/anthology/S13-2026. Laurens Van Der Maaten. 2014. Accelerating t-sne Journal of machine using tree-based algorithms. learning research 15(1):3221–3245. Yannick Versley. 2013. Sfs-tue: Compound para- phrasing with a language model and discriminative In Second Joint Conference on Lexical reranking. and Computational Semantics (* SEM), Volume 2: Proceedings of the Seventh International Workshop on Semantic Evaluation (SemEval 2013). volume 2, pages 148–152. Sander Wubben. 2010. Uvt: Memory-based pairwise In Proceedings of ranking of paraphrasing verbs. the 5th International Workshop on Semantic Eval- uation. Association for Computational Linguistics, pages 260–263. Clarissa Xavier and Vera Lima. 2014. Boosting open information extraction with noun-based relations. In Nicoletta Calzolari (Conference Chair), Khalid Choukri, Thierry Declerck, Hrafn Loftsson, Bente Maegaard, Joseph Mariani, Asuncion Moreno, Jan Odijk, and Stelios Piperidis, editors, Proceedings of the Ninth International Conference on Language Re- sources and Evaluation (LREC'14). European Lan- guage Resources Association (ELRA), Reykjavik, Iceland. Fabio Massimo Zanzotto, Ioannis Korkontzelos, Francesca Fallucchi, and Suresh Manandhar. 2010. Estimating linear models for compositional distribu- tional semantics. In Proceedings of the 23rd Inter- national Conference on Computational Linguistics. Association for Computational Linguistics, pages 1263–1271.
1806.02253
1
1806
2018-06-06T15:42:22
The Limitations of Cross-language Word Embeddings Evaluation
[ "cs.CL" ]
The aim of this work is to explore the possible limitations of existing methods of cross-language word embeddings evaluation, addressing the lack of correlation between intrinsic and extrinsic cross-language evaluation methods. To prove this hypothesis, we construct English-Russian datasets for extrinsic and intrinsic evaluation tasks and compare performances of 5 different cross-language models on them. The results say that the scores even on different intrinsic benchmarks do not correlate to each other. We can conclude that the use of human references as ground truth for cross-language word embeddings is not proper unless one does not understand how do native speakers process semantics in their cognition.
cs.CL
cs
The Limitations of Cross-language Word Embeddings Evaluation Amir Bakarov†* Roman Suvorov* Ilya Sochenkov‡* †National Research University Higher School of Economics, *Federal Research Center 'Computer Science and Control' of the Russian Academy of Sciences, ‡Skolkovo Institute of Science and Technology (Skoltech), [email protected], [email protected], [email protected] Moscow, Russia Abstract The aim of this work is to explore the possi- ble limitations of existing methods of cross- language word embeddings evaluation, ad- dressing the lack of correlation between in- trinsic and extrinsic cross-language evaluation methods. To prove this hypothesis, we con- struct English-Russian datasets for extrinsic and intrinsic evaluation tasks and compare per- formances of 5 different cross-language mod- els on them. The results say that the scores even on different intrinsic benchmarks do not correlate to each other. We can conclude that the use of human references as ground truth for cross-language word embeddings is not proper unless one does not understand how do native speakers process semantics in their cognition. 1 Introduction Real-valued word representations called word em- beddings are an ubiquitous and effective technique of semantic modeling. So it is not surprising that cross-language extensions of such models (cross- language word embeddings) rapidly gained pop- ularity in the NLP community (Vuli´c and Moens, 2013), proving their effectiveness in certain cross- language NLP tasks (Upadhyay et al., 2016). However, the problem of proper evaluation of any type of word embeddings still remains open. In recent years there was a critique to main- stream methods of intrinsic evaluation: some re- searchers addressed subjectivity of human assess- ments, obscurity of instructions for certain tasks and terminology confusions (Faruqui et al., 2016; Batchkarov et al., 2016). Despite all these limi- tations, some of the criticized methods (like the word similarity task) has been started to be ac- tively applied yet for cross-language word embed- dings evaluation (Camacho-Collados et al., 2017, 2015). We argue that if certain tasks are considered as not proper enough for mono-lingual evalua- tion, then it should be even more inappropriate to use them for cross-language evaluation since new problems would appear due to the new fea- tures of cross-linguality wherein the old limita- tions still remain. Moreover, it is still unknown for the field of cross-language word embeddings, are we able to make relevant predictions on per- formance of the model on one method, using an- other. We do not know whether can we use the relative ordering of different embeddings obtained by evaluation on an intrinsic task to decide which model will be better on a certain extrinsic task. So, the aim of this work is to highlight the lim- itations of cross-language intrinsic benchmarks, studying the connection of outcomes from differ- ent cross-language word embeddings evaluation schemes (intrinsic evaluation and extrinsic evalu- ation), and explain this connection by addressing certain issues of intrinsic benchmarks that hamper us to have a correlation between two evaluation schemes. In this study as an extrinsic task we con- sider the cross-language paraphrase detection task. This is because we think that the model's features that word similarity and paraphrase detection eval- uate are very close: both of them test the quality of semantic modeling (i.e. not the ability of the model to identify POS tags, or the ability to clus- ter words in groups, or something else) in terms of properness of distances in words pairs with certain types of semantic relations (particularly, seman- tic similarity). Therefore, we could not say that a strong difference in performances of word embed- dings on these two tasks could be highly expected. In this paper we propose a comparison of 5 cross-language models on extrinsic and intrinsic datasets for English-Russian language pair con- structed specially for this study. We consider Rus- sian because we are native speakers of this lan- guage (hence, we are able to adequately construct novel datasets according the limitations that we address). Our work is a step towards exploration of the limitations of cross-language evaluation of word embeddings, and it has three primary contribu- tions: 1. We propose an overview of limitations of current intrinsic cross-language word embed- dings evaluation techniques; was proposed (Ruder, 2017), but this study did not considered any empirical analysis. After all, we are aware of certain works on a topic of cross-language evaluation from the cross-language information retrieval community (Braschler et al., 2000), but there are no works that highlight non-trivial issues of cross-language sys- tems evaluation from the position of word embed- dings. 3 Problems of Cross-language 2. We construct 12 cross-language datasets for Evaluation evaluation on the word similarity task; 3. We propose a novel task for cross-language extrinsic evaluation that was never addressed before from the benchmarking perspective, and we create a human-assessed dataset for this task. This paper is organized as follows. Section 2 puts our work in the context of previous studies. Section 3 describes the problems of intrinsic cross- language evaluation. Section 4 is about the exper- imental setup. The results of the comparison are reported in Section 5, while Section 6 concludes the paper. 2 Related Work First investigation of tasks for cross-language word embeddings evaluation was proposed in 2015 (Camacho-Collados et al., 2015). This work was the first towards mentioning the problem of lack of lexical one-to-one correspondence across different languages from the evaluation perspec- tive. However, no detailed insights on limitations of evaluation (e.g. effect of this lack on evalua- tion scores) was reported. 2015 also saw an explo- ration of the effect of assessments' language and the difference in word similarity scores for differ- ent languages (Leviant and Reichart, 2015). In 2016 the first survey of cross-language intrin- sic and extrinsic evaluation techniques was pro- posed (Upadhyay et al., 2016). The results of this study did not address the correlation of in- trinsic evaluation scores with extrinsic ones (de- spite that the lack of correlation of intrinsic and extrinsic tasks for mono-language evaluation was proved (Schnabel et al., 2015), it is not obvious if this would also extend to cross-language evalua- tion). In 2017 a more extensive overview of cross- language word embeddings evaluation methods We address the following problems that could ap- pear on any kind of evaluation of cross-language word embeddings against human references on any intrinsic task: 1. Translation Disagreement. Some re- searchers have already faced the limitations of machine word translation for construct- ing cross-language evaluation datasets from mono-language ones by translating them word-by-word. The obtained problems were in two different words with the same trans- lation or with different parts of speech (Camacho-Collados et al., 2015). We also ar- gue that some words could have no transla- tions while some words could have multiple translations. Of course, these issues could be partially avoided if the datasets would be translated manually and the problematic words would be dropped from the cross- language dataset, but it is not clear how the agreement for word dropping of human as- sessors could be concluded. 2. Scores Re-assessment. Some researchers obtain new scores reporting human refer- ences by automatically averaging the scores from the mono-language datasets of which the new dataset is constructed. Another op- tion of scores re-assessment proposes man- ual scoring of a new dataset by bilingual as- sessors. We consider that both variants are not proper since it is unclear how the scores in the cross-language dataset should be as- sessed: humans usually do not try to iden- tify a similarity score between word a in lan- guage A and word b in language B since of difference in perception of these words in cognition of speakers of different languages. 3. Semantic Fields. According to the theories of lexical typology, the meaning of a prop- erly translated word could denote a bit differ- ent things in a new languages. Such effect is called semantic shift, and there is a pos- sibility that the actual meanings of two cor- responding words could be different even if they are correctly translated and re-assessed (Ryzhova et al., 2016). One of the ways of avoiding this problem is to exclude relational nouns which are words with non-zero va- lency (Koptjevskaja-Tamm et al., 2015) from the dataset, so it should consist only of zero valency nouns that are more properly linked with real world objects. However, the distinc- tion of words on relational and non-relational ones is fuzzy, and such assessments could be very subjective (also, since verbs are usually highly relational, they should not be used in cross-language evaluation). 4. New Factors for Bias. It is already known that existence of connotative associations for certain words in mono-language datasets could introduce additional subjectivity in the human assessments (Liza and Grzes, 2016). We argue that yet more factors could be the cause of assessors' bias in the cross-language datasets. For example, words five and clock could be closely connected in minds of En- glish speakers (since of the common five o'clock tea collocation), but not in minds of speakers of other languages, and we think that a native English speaker could assess bi- ased word similarity scores for this word pair. 4 Experimental Setup 4.1 Distributional Models To propose a comparison, we used 5 cross- language embedding models. 1. MSE (Multilingual Supervised Embeddings). Trains using a bilingual dictionary and learns a mapping from the source to the target space using Procrustes alignment (Conneau et al., 2017). 2. MUE (Multilingual Unsupervised Embed- dings). Trains learning a mapping from the source to the target space using ad- versarial training and Procrustes refinement (Conneau et al., 2017). 3. VecMap. Maps the source into the tar- get space using a bilingual dictionary or shared numerals minimizing the squared Eu- clidean distance between embedding matri- ces (Artetxe et al., 2018). 4. BiCCA (Bilingual Canonical Correlation Analysis). Projects vectors of two differ- ent languages in the same space using CCA (Faruqui and Dyer, 2014). 5. MFT (Multilingual FastText). Uses SVD to learn a linear transformation, which aligns monolingual vectors from two languages in a single vector space (Smith et al., 2017). We mapped vector spaces of Russian and English FastText models trained on a dump of Wikipedia (Bojanowski et al., 2016) with dictionary an (Conneau et al., 2017) translation for a single word). bilingual (only one English-Russian 4.2 Intrinsic Tasks Word Semantic Similarity. The task is to predict the similarity score for a word a in language A and a word b in language B. All three publicly available datasets for cross-language word simi- larity (Camacho-Collados et al., 2015, 2017) are not available for Russian, so we created the cross- language datasets ourselves. We used 5 English datasets assessed by semantic similarity of nouns and adjectives (S), 3 datasets assessed by seman- tic similarity of verbs (V), and 3 datasets assessed by semantic relatedness of nouns and adjectives (R); we labeled each with a letter reporting the type of relations. We translated these datasets, merged into cross-language sets (the first word of each word pair was English, and the second was Russian), dropped certain words pairs according to limitations addressed by us (in the Section 2), and re-assessed the obtained cross-languages datasets with the help of 3 English-Russian volunteers, having Krippendorff's alpha 0.5 (final amount of word pairs and ratio to original datasets is reported at Table 1). Then we compared human references of these datasets with cosine distances of cross- language word vectors, and computed Spearman's rank correlation coefficient (p − value in all cases was lower than 0.05). Dictionary Induction (also called word trans- lation). The second task is to translate a word in language A into language B, so for the seed word S.RareWord-958 (56.3%) (Luong et al., 2013) S.SimLex-739 (95.9%) (Hill et al., 2016) S.SemEval-243 (88.0%) (Camacho-Collados et al., 2017) S.WordSim-193 (96.4%) (Agirre et al., 2009) S.RG-54 (83.1%) (Rubenstein and Goodenough, 1965) S.MC-28 (93.3%) (Miller and Charles, 1991) V. SimVerb-3074 (87.8%) (Gerz et al., 2016) V.Verb-115 (85.4%) (Baker et al., 2014) V.YP-111 (88.5%) (Yang and Powers, 2006) R.MEN-1146 (94.7%) (Bruni et al., 2014) R.MTurk-551 (91.7%) (Halawi et al., 2012) R.WordSim-193 (96.4%) (Agirre et al., 2009) P@1, dictionary induction P@5, dictionary induction P@10, dictionary induction F1, paraphrase detection, our dataset F1, paraphrase detection, parallel sentences MSE MUE VM BCCA MFT 0.44 0.34 0.6 0.69 0.68 0.66 0.2 0.24 0.22 0.68 0.56 0.55 0.31 0.53 0.61 0.82 0.55 0.42 0.32 0.56 0.67 0.67 0.7 0.2 0.39 0.37 0.66 0.51 0.53 0.16 0.34 0.42 0.77 0.45 0.43 0.35 0.35 0.72 0.63 0.71 0.23 0.27 0.25 0.69 0.57 0.57 0.32 0.52 0.5 0.84 0.57 0.43 0.34 0.34 0.67 0.61 0.72 0.22 0.27 0.25 0.66 0.54 0.53 0.29 0.49 0.55 0.83 0.6 0.43 0.34 0.34 0.71 0.61 0.7 0.21 0.27 0.25 0.68 0.57 0.55 0.21 0.38 0.45 0.86 0.59 Table 1: Performance of the compared models across different tasks. Evaluation on first 11 datasets indicate Spearman's rank correlation. For word similarity task: words before the hyphen in datasets name report the name of the original English dataset, the number after the hyphen report the amount of word pairs, the numbers in brackets report ratio to its English original and the prefix before the dot in the name report type of assessments. the model generates a list of the closest word in other language, and we need to find the correct translation in it. As a source of correct transla- tions we used English-Russian dictionary of 53 186 translation pairs (Conneau et al., 2017). The evaluation on this measure was proposed as a pre- cision on k nearest vectors of a word embedding model for k = 1, 5, 10. 4.3 Extrinsic Task and Our Dataset Cross-language Paraphrase Detection. In an analogy with a monolingual paraphrase detection task (also called sentence similarity identifica- tion) (Androutsopoulos and Malakasiotis, 2010), the task is to identify whether sentence a in lan- guage A and sentence b in language B are para- phrases or not. This task is highly scalable, and usually figures as a sub-task of bigger tasks like cross-language plagiarism detection. We are not aware of any dataset for this task, so we designed a benchmark ourselves for English- Russian language pair. The dataset was con- structed on the base of Wikipedia articles covering wide range of topics from technology to sports. It contains 8 334 sentences with a balanced class dis- tribution. The assessments and translations were done by 3 bilingual assessors. The negative results were obtained by automatically randomly sam- pling another sentence in the same domain from the datasets. Translations were produced manually by a pool of human translators. Translators could para- phrase the translations using different techniques (according to our guidelines), and the assessors had to verify paraphrase technique labels and an- notate similarity of English-Russian sentences in binary labels. We invited 3 assessors to estimate inter-annotator agreement. To obtain the evalua- tion scores, we conducted 3-fold cross validation and trained Logistic Regression with only one fea- ture: cosine similarity of two sentence vectors. Sentence representations were built by averaging their word vectors. In order to validate the correctness of results on our dataset, we automatically constructed a para- phrase set from a corpus of 1 million English- SimLex and WordSim both being word similarity benchmarks are clustered away from each other). Our datasets, aligned models and code to repro- duce the experiments are available at our GitHub †. 6 Conclusions and Future Work In this work we explored primary limitations of evaluation methods of intrinsic cross-language word embeddings. We proposed experiments on 5 models in order to answer the question 'could we somehow estimate extrinsic performance of cross- language embeddings given some intrinsic met- rics?'. Currently, the short answer is 'No', but the longer is 'maybe yes, if we understand the cogni- tive and linguistic regularities that take place in the benchmarks we use. Our point is that we not only need intrinsic datasets of different types if we want to robustly predict the performance of different ex- trinsic tasks, but we also should overthink the de- sign and capabilities of existing extrinsic bench- marks. Our research does not address some evaluation methods (like MultiQVEC (Ammar et al., 2016)) and word embeddings models (for instance, Bivec (Luong et al., 2015)) since Russian do not have enough linguistic resources: there are certain parallel corpora available at http://opus. nlpl.eu, but a merge of all English-Russian cor- pora has 773.0M/710.5M tokens, while the mono- lingual Russian model that we used in this study was trained on Wikipedia of 5B tokens (and En- glish Wikipedia has a triple of this size). A for- tiori, these corpora have different nature (subtitles, corpus of Europar speeches, etc), and we think that merging them would yield a dataset of unpre- dictable quality. In future we plan to make a comparison with other languages giving more insights about perfor- mance of compared models. We also plan to inves- tigate cross-language extensions of other intrinsic monolingual tasks (like the analogical reasoning task) to make our findings more generalizable. Acknowledgments The reported study was funded by the Russian Foundation for Basic Research project 16-37- 60048 mol a dk and by the Ministry of Educa- tion and Science of the Russian Federation (grant 14.756.31.0001). Figure 1: Clustermap of different evaluation techniques. Lighter color correspond to stronger positive correlation. Each row and column is labeled according to benchmark type: red – extrinsic, blue – verbs, purple – word translation, green – word relatedness, yellow – word similarity. Russian parallel sentences from WMT'16∗, gen- erating for each sentence pair a semantic nega- tive sample, searching for nearest sentence with a monolingual FastText model. 5 Results and Discussion The results of the experiments with intrinsic and extrinsic evaluation are presented in Table 1. De- spite the difference in scores for different models in one dataset could be minuscule, the scores for different intrinsic datasets vary a lot, and models that achieve higher results on one task often have lower results on other tasks. Figure 1 shows mutual similarities between datasets (measured as Spearman's rank correlation between evaluation scores from Table 1). One can see that there are at least 4 clusters: ex- trinsic+SemEval; word relations; word transla- tion+some word similarities; others. Interestingly, SemEval behaves similarly to ex- trinsic tasks: this benchmark contains not only single words but also two-word expressions (e.g. Borussia Dortmund), so evaluation on this dataset is more similar to paraphrase detection task. Sur- prisingly, other word similarity datasets yield very different metrics. This is kind of unexpected, be- cause paraphrase detection task relies on similarity of word senses. Notably, many datasets from the same group (marked using color in the leftmost column on Figure 1) have difference in models' behavior (e.g. ∗https://translate.yandex.ru/corpus †https://github.com/bakarov/cross-lang-embeddings References Eneko Agirre, Enrique Alfonseca, Keith Hall, Jana Kravalova, Marius Pas¸ca, and Aitor Soroa. 2009. A study on similarity and relatedness using distribu- tional and wordnet-based approaches. In Proceed- ings of Human Language Technologies: The 2009 Annual Conference of the North American Chap- ter of the Association for Computational Linguistics, pages 19–27. Association for Computational Lin- guistics. Waleed Ammar, George Mulcaire, Yulia Tsvetkov, Guillaume Lample, Chris Dyer, and Noah A Smith. 2016. Massively multilingual word embeddings. arXiv preprint arXiv:1602.01925. Ion Androutsopoulos and Prodromos Malakasiotis. 2010. A survey of paraphrasing and textual entail- ment methods. Journal of Artificial Intelligence Re- search, 38:135–187. Mikel Artetxe, Gorka Labaka, and Eneko Agirre. 2018. Generalizing and improving bilingual word embed- ding mappings with a multi-step framework of lin- ear transformations. In Proceedings of the Thirty- Second AAAI Conference on Artificial Intelligence (AAAI-18). Simon Baker, Roi Reichart, and Anna Korhonen. 2014. An unsupervised model for instance level subcate- gorization acquisition. In EMNLP, pages 278–289. Miroslav Batchkarov, Thomas Kober, Jeremy Reffin, Julie Weeds, and David Weir. 2016. A critique of word similarity as a method for evaluating distribu- tional semantic models. Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. 2016. Enriching word vec- tors with subword information. arXiv preprint arXiv:1607.04606. Martin Braschler, Donna Harman, Michael Hess, Michael Kluck, Carol Peters, and Peter Schauble. 2000. The evaluation of systems for cross-language information retrieval. In LREC. Elia Bruni, Nam-Khanh Tran, and Marco Baroni. 2014. Multimodal distributional semantics. J. Artif. Intell. Res.(JAIR), 49(2014):1–47. Jose Camacho-Collados, Mohammad Taher Pilehvar, Nigel Collier, and Roberto Navigli. 2017. Semeval- 2017 task 2: Multilingual and cross-lingual semantic word similarity. In Proceedings of the 11th Interna- tional Workshop on Semantic Evaluation (SemEval- 2017), pages 15–26. Jos´e Camacho-Collados, Mohammad Taher Pilehvar, and Roberto Navigli. 2015. A framework for the construction of monolingual and cross-lingual word similarity datasets. In Proceedings of the 53rd An- nual Meeting of the Association for Computational Linguistics and the 7th International Joint Confer- ence on Natural Language Processing (Volume 2: Short Papers), volume 2, pages 1–7. Alexis Conneau, Guillaume Lample, Marc'Aurelio Ranzato, Ludovic Denoyer, and Herv´e J´egou. 2017. Word translation without parallel data. arXiv preprint arXiv:1710.04087. Manaal Faruqui and Chris Dyer. 2014. Improving vec- tor space word representations using multilingual correlation. In Proceedings of EACL. Manaal Faruqui, Yulia Tsvetkov, Pushpendre Rastogi, and Chris Dyer. 2016. Problems with evaluation of word embeddings using word similarity tasks. arXiv preprint arXiv:1605.02276. Daniela Gerz, Ivan Vuli´c, Felix Hill, Roi Reichart, and Anna Korhonen. 2016. Simverb-3500: A large- scale evaluation set of verb similarity. arXiv preprint arXiv:1608.00869. Guy Halawi, Gideon Dror, Evgeniy Gabrilovich, and Yehuda Koren. 2012. Large-scale learning of word relatedness with constraints. In Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 1406– 1414. ACM. Felix Hill, Roi Reichart, and Anna Korhonen. 2016. Simlex-999: Evaluating semantic models with (gen- uine) similarity estimation. Computational Linguis- tics. Maria Koptjevskaja-Tamm, Ekaterina Rakhilina, and Martine Vanhove. 2015. The semantics of lexical typology. The Routledge Handbook of Semantics, page 434. Ira Leviant and Roi Reichart. 2015. Separated by an un-common language: Towards judgment language informed vector space modeling. arXiv preprint arXiv:1508.00106. Farhana Ferdousi Liza and Marek Grzes. 2016. An improved crowdsourcing based evaluation technique for word embedding methods. ACL 2016, page 55. Minh-Thang Luong, Hieu Pham, and Christopher D. Manning. 2015. Bilingual word representations with monolingual quality in mind. In NAACL Work- shop on Vector Space Modeling for NLP. Thang Luong, Richard Socher, and Christopher D Manning. 2013. Better word representations with recursive neural networks for morphology. In CoNLL, pages 104–113. George A Miller and Walter G Charles. 1991. Contex- tual correlates of semantic similarity. Language and cognitive processes, 6(1):1–28. Herbert Rubenstein and John B Goodenough. 1965. Contextual correlates of synonymy. Communica- tions of the ACM, 8(10):627–633. Sebastian Ruder. 2017. A survey of cross-lingual em- bedding models. arXiv preprint arXiv:1706.04902. Daria Ryzhova, Maria Kyuseva, and Denis Paperno. 2016. Typology of adjectives benchmark for com- positional distributional models. In Proceedings of the Language Resources and Evaluation Con- ference, pages 1253–1257. European Language Re- sources Association (ELRA). Tobias Schnabel, Igor Labutov, David M Mimno, and Thorsten Joachims. 2015. Evaluation methods for unsupervised word embeddings. In EMNLP, pages 298–307. Samuel L Smith, David HP Turban, Steven Hamblin, and Nils Y Hammerla. 2017. Offline bilingual word vectors, orthogonal transformations and the inverted softmax. arXiv preprint arXiv:1702.03859. Shyam Upadhyay, Manaal Faruqui, Chris Dyer, and Dan Roth. 2016. Cross-lingual models of word em- beddings: An empirical comparison. arXiv preprint arXiv:1604.00425. Ivan Vuli´c and Marie-Francine Moens. 2013. Cross- lingual semantic similarity of words as the similarity of their semantic word responses. In Proceedings of the 2013 Conference of the North American Chap- ter of the Association for Computational Linguistics: Human Language Technologies, pages 106–116. Dongqiang Yang and David Martin Powers. 2006. Verb similarity on the taxonomy of wordnet. In The Third International WordNet Conference: GWC 2006. Masaryk University.
1904.08138
5
1904
2019-12-11T17:29:01
Complementary Fusion of Multi-Features and Multi-Modalities in Sentiment Analysis
[ "cs.CL", "cs.SD", "eess.AS" ]
Sentiment analysis, mostly based on text, has been rapidly developing in the last decade and has attracted widespread attention in both academia and industry. However, the information in the real world usually comes from multiple modalities, such as audio and text. Therefore, in this paper, based on audio and text, we consider the task of multimodal sentiment analysis and propose a novel fusion strategy including both multi-feature fusion and multi-modality fusion to improve the accuracy of audio-text sentiment analysis. We call it the DFF-ATMF (Deep Feature Fusion - Audio and Text Modality Fusion) model, which consists of two parallel branches, the audio modality based branch and the text modality based branch. Its core mechanisms are the fusion of multiple feature vectors and multiple modality attention. Experiments on the CMU-MOSI dataset and the recently released CMU-MOSEI dataset, both collected from YouTube for sentiment analysis, show the very competitive results of our DFF-ATMF model. Furthermore, by virtue of attention weight distribution heatmaps, we also demonstrate the deep features learned by using DFF-ATMF are complementary to each other and robust. Surprisingly, DFF-ATMF also achieves new state-of-the-art results on the IEMOCAP dataset, indicating that the proposed fusion strategy also has a good generalization ability for multimodal emotion recognition.
cs.CL
cs
Complementary Fusion of Multi-Features and Multi-Modalities in Sentiment Analysis Feiyang Chen Ziqian Luo Department of Computer Science and Technology, Beijing Forestry University School of Computer Science, Language Technologies Institute, Carnegie Mellon University [email protected] [email protected] Yanyan Xu∗ Department of Computer Science and Technology, Beijing Forestry University [email protected] Dengfeng Ke† National Laboratory of Pattern Recognition, Institute of Automation, Chinese Academy of Sciences [email protected] 9 1 0 2 c e D 1 1 ] L C . s c [ 5 v 8 3 1 8 0 . 4 0 9 1 : v i X r a Abstract Sentiment analysis, mostly based on text, has been rapidly developing in the last decade and has attracted widespread attention in both academia and industry. However, informa- tion in the real world usually comes from multiple modalities, such as audio and text. Therefore, in this paper, based on au- dio and text, we consider the task of multimodal sentiment analysis and propose a novel fusion strategy including both multi-feature fusion and multi-modality fusion to improve the accuracy of audio-text sentiment analysis. We call it the DFF-ATMF (Deep Feature Fusion - Audio and Text Modal- ity Fusion) model, which consists of two parallel branches, the audio modality based branch and the text modality based branch. Its core mechanisms are the fusion of multiple fea- ture vectors and multiple modality attention. Experiments on the CMU-MOSI dataset and the recently released CMU- MOSEI dataset, both collected from YouTube for sentiment analysis, show the very competitive results of our DFF-ATMF model. Furthermore, by virtue of attention weight distribu- tion heatmaps, we also demonstrate the deep features learned by using DFF-ATMF are complementary to each other and robust. Surprisingly, DFF-ATMF also achieves new state-of- the-art results on the IEMOCAP dataset, indicating that the proposed fusion strategy also has a good generalization ability for multimodal emotion recognition. Introduction Sentiment analysis provides beneficial information to un- derstand an individual's attitude, behavior, and preference (Zhang, Wang, and Liu 2018). Understanding and analyzing context-related sentiment is an innate ability of a human be- ing, which is also an important distinction between a machine and a human being (Kozinets, Scaraboto, and Parmentier 2018). Therefore, sentiment analysis becomes a crucial issue in the field of artificial intelligence to be explored. In recent years, sentiment analysis mainly focuses on tex- tual data, and consequently, text-based sentiment analysis becomes relatively mature (Zhang, Wang, and Liu 2018). With the popularity of social media such as Facebook and ∗Corresponding Author †Corresponding Author Copyright c(cid:13) 2020, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. YouTube, many users are more inclined to express their views with audio or video (Poria et al. 2017a). Audio re- views become an increasing source of consumer informa- tion and are increasingly being followed with interest by companies, researchers and consumers. They also provide more natural experiences than traditional text comments due to allowing viewers to better perceive a commenta- tor's sentiment, belief, and intention through richer chan- nels such as intonation (Poria, Hussain, and Cambria 2018). The combination of multiple modalities (Zadeh et al. 2018; Poria, Hussain, and Cambria 2018) brings significant advan- tages over using only text, including language disambiguation (audio features can help eliminate ambiguous language mean- ings) and language sparsity (audio features can bring addi- tional emotional information). Also, basic audio patterns can enhance links to the real world environment. Actually, people often associate information with learning and interact with the external environment through multiple modalities such as audio and text (Baltrušaitis, Ahuja, and Morency 2019). Consequently, multimodal learning becomes a new effective method for sentiment analysis (Majumder et al. 2018). Its main challenge lies in inferring joint representations that can process and connect information from multiple modalities (Poria et al. 2018). In this paper, we propose a novel fusion strategy, including the multi-feature fusion and the multi-modality fusion, to im- prove the accuracy of multimodal sentiment analysis based on audio and text. We call it the DFF-ATMF model, and the learned features have strong complementarity and robustness. We conduct experiments on the CMU Multimodal Opinion- level Sentiment Intensity (CMU-MOSI) (Zadeh et al. 2016) dataset and the recently released CMU Multimodal Opinion Sentiment and Emotion Intensity (CMU-MOSEI) (Zadeh et al. 2018) dataset, both collected from YouTube, and make comparisons with other state-of-the-art models to show the very competitive performance of our proposed model. It is worth mentioning that DFF-ATMF also achieves the most advanced results on the IEMOCAP dataset in the general- ized verification experiments, meaning that it has a good generalization ability for multimodal emotion recognition. The major contributions of this paper are as follows: • We propose the DFF-ATMF model for audio-text senti- ment analysis, combining the multi-feature fusion with the multi-modality fusion to learn more comprehensive sentiment information. • The features learned by the DFF-ATMF model have good complementarity and excellent robustness, and even show an amazing performance when generalized to emotion recognition tasks. • Experimental results indicate that the proposed model out- performs the state-of-the-art models on the CMU-MOSI dataset (Ghosal et al. 2018) and the IEMOCAP dataset (Poria et al. 2018), and also has very competitive results on the recently released CMU-MOSEI dataset. The rest of this paper is structured as follows. In the follow- ing section, we review related work. We exhibit the details of our proposed methodologies in Section 3. Then, in Section 4, experimental results and further discussions are presented. Finally, we conclude this paper in Section 5. Related Work Audio Sentiment Analysis Audio data are usually extracted from the characteristics of audio samples' channel, excitation, and prosody. Among them, prosody parameters extracted from segments, sub- segments, and hyper-segments are used for sentiment anal- ysis in (Liu et al. 2018). In the past several years, classi- cal machine learning algorithms, such as Hidden Markov Model (HMM), Support Vector Machine (SVM), and deci- sion tree-based methods, have been utilized for audio sen- timent analysis (Schuller, Rigoll, and Lang 2004; Schuller, Rigoll, and Lang 2003; Lee et al. 2011). Recently, researchers have proposed various neural network-based architectures to improve audio sentiment analysis. In 2014, an initial study employed deep neural networks (DNNs) to extract high-level features from raw audio data and demonstrated its effective- ness (Han, Yu, and Tashev 2014). With the development of deep learning, more complex neural-based architectures have been proposed. For example, convolutional neural net- work (CNN)-based models have been used to train spec- trograms or audio features derived from original audio sig- nals such as Mel Frequency Cepstral Coefficients (MFCCs) and Low-Level Descriptors (LLDs) (Bertero and Fung 2017; Parthasarathy and Tashev 2018; Minaee and Abdolrashidi 2019). Text Sentiment Analysis After decades of development, text sentiment analysis has become mature in recent years (Hussein 2018). The most commonly used classification techniques such as SVM, max- imum entropy and naive Bayes, are based on the word bag model, where the sequence of words is ignored, which may result in inefficient extraction of sentiment from the input be- cause the sequence of words will affect the existing sentiment (Chaturvedi et al. 2018). Later research has overcome this problem by using deep learning in sentiment analysis (Zhang, Wang, and Liu 2018). For instance, a kind of DNN model is proposed, using word-level, character-level and sentence- level representations for sentiment analysis (Jianqiang, Xi- aolin, and Xuejun 2018). In order to better capture the tem- poral information, (Dai et al. 2019) proposes a novel neural architecture, called Transformer-XL, which enables learning dependency beyond a fixed-length without disrupting tem- poral coherence. It consists of a segment-level recurrence mechanism and a novel positional encoding scheme, not only capturing longer-term dependency but also resolving the con- text fragmentation problem. Multimodal Learning Multimodal learning is an emerging field of research (Bal- trušaitis, Ahuja, and Morency 2019). Learning from multi- ple modalities needs to capture the correlation among these modalities. Data from different modalities may have different predictive power and noise topology, with possibly losing the information of at least one of the modalities (Baltrušaitis, Ahuja, and Morency 2019). (Majumder et al. 2018) presents a novel feature fusion strategy that proceeds in a hierarchi- cal manner for multimodal sentiment analysis. (Ghosal et al. 2018) proposes a recurrent neural network-based multimodal attention framework that leverages contextual information for utterance-level sentiment prediction and shows a state-of-the- art model on the CMU-MOSI and CMU-MOSEI datasets. Figure 1: The overall architecture of the proposed DFF- ATMF framework. ht represents the hidden state of Bi-LSTM at time t. e means the final audio sentiment vector. at repre- sents the attention weight and is calculated as the dot product of the final audio sentiment vector and the final text sentiment vector of ht. "FC" means a fully-connected layer. Proposed Methodology In this section, we describe the proposed DFF-ATMF model for audio-text sentiment analysis in detail. We firstly intro- DatasetU1U3U2Audio ModalText ModalLSTMLSTMLSTMLSTMLSTMLSTMASVTSVFCehthtFCatSentiment Analysis duce an overview of the whole neural network architecture, illustrating how to fuse audio and text modalities. After that, two separate branches of DFF-ATMF are respectively ex- plained to show how to fuse the audio feature vector and the text feature vector. Finally, we present the multimodal- attention mechanism used in the DFF-ATMF model. The DFF-ATMF Framework The overall architecture of the proposed DFF-ATMF frame- work is shown in Figure 1. We fuse audio and text modalities in this framework through two parallel branches, that is, the audio modality based branch and the text modality based branch. DFF-ATMF's core mechanisms are feature vector fusion and multimodal-attention fusion. The audio modality branch uses Bi-LSTM (Cai and Hao 2018) to extract audio sentiment information between adjacent utterances (U1, U2, U3), while another branch uses the same network architecture to extract text features. Furthermore, the audio feature vector of each piece of utterance is used as the input of our proposed neural network, which is based on the audio feature fusion, so we can obtain a new feature vector before the softmax layer, called the audio sentiment vector (ASV). The text sen- timent vector (TSV) can be achieved similarly. Finally, after the multimodal-attention fusion, the output of the softmax layer produces final sentiment analysis results, as shown in Figure 1. 4: 5: 6: 7: 8: 9: 10: 11: 12: Audio Sentiment Vector (ASV) from Audio Feature Fusion (AFF) Base on the work in (Luo, Xu, and Chen 2019), in order to explore further the fusion of feature vectors inter the audio modality, we extend the experiments of different types of audio features on the CMU-MOSI dataset, and the results are shown in Table 1. In addition, we also implement an improved serial neural network of Bi-LSTM and CNN (Wu et al. 2018), combin- ing with the attention mechanism to learn the deep features of different sound representations. The multi-feature fusion procedure is described with the LSTM branch and the CNN branch respectively in Algorithm 1. Algorithm 1 The Multi-Feature Fusion Procedure 1: procedure LSTM BRANCH 2: 3: for i:[0,n] do fi = getAudioF eature(ui) // get the audio fea- ture from the uth utterance ai = getASV (fi) end for for i:[0,M] do //M is the number of videos inputi = GetT opU tter(vi) ufi = getU tterF eature(inputi) end for shuf f le(v) Attention(Ai) M ulti − F eature F usion f rom the LST M branch for i:[0,n] do 13: end procedure 14: procedure CNN BRANCH 15: 16: 17: 18: 19: 20: xi ← get SpectrogramImage(ui) ci ← CNNModel(xi) end for Attention(Ci) M ulti − F eature F usion f rom the CN N branch for i:[0,n] do 21: end procedure 22: procedure FEATURE FUSION 23: 24: 25: 26: 27: 28: 29: end procedure end for Attention(Li + Ci) M ulti − F eature F usion Li = Attention(ai) Ci = Attention(li) Figure 2: The architecture of ASV from AFF. The features are learned from raw waveforms and acoustic features, which are complementary to each other. Therefore, audio sentiment analysis can be improved by applying our feature fusion technique, that is, ASV from AFF, whose architecture is shown in Figure 2. In terms of raw audio waveforms, taking the CMU-MOSI dataset as an example, we illustrate their sampling distribu- tion in Figure 3. The inputs to the network are raw audio waveforms sampled at 22 kHz. We also scale the waveforms to be in the range [-256, 256], so that we do not need to sub- DatasetU1U3U2Audio ModalRaw WaveformAcoustic FeatureBi-LSTMAttentionCNNConcatenated Feature Vector --- Audio Sentiment Vector (ASV) Table 1: Comparison of different types of audio features on the CMU-MOSI dataset. Feature 1 Chromagram from spectrogram (chroma_stft) 2 Chroma Energy Normalized (chroma_cens) 3 Mel-frequency cepstral coefficients (MFCC) 4 Root-Mean-Square Energy (RMSE) 5 Spectral_Centroid 6 Spectral_Contrast 7 Tonal Centroid Features (tonnetz) Model LSTM BiLSTM LSTM BiLSTM LSTM BiLSTM LSTM BiLSTM LSTM BiLSTM LSTM BiLSTM LSTM BiLSTM 2-class 43.24 45.37 42.98 45.85 55.12 55.98 52.30 52.76 48.39 48.84 48.34 48.97 53.78 54.24 Accuracy(%) 5-class 20.23 2.29 20.87 20.53 23.64 23.75 21.14 22.35 22.25 22.36 22.50 22.28 22.67 21.87 7-class 13.96 12.39 13.31 13.76 16.99 17.24 15.33 15.87 14.97 15.79 15.02 15.98 15.83 16.01 tract the mean value as the data are naturally near zero already. To obtain a better sentiment analysis accuracy, batch normal- ization (BN) and the ReLU function are employed after each convolutional layer. Additionally, dropout regularization is also applied to the proposed serial network architecture. In terms of acoustic features, we extract them using the Librosa (McFee et al. 2015) toolkit and obtain four effec- tive kinds of features to represent sentiment information, which are MFCCs, spectral_centroid, chroma_stft and spec- tral_contrast, respectively. In particular, taking log-Mel spec- trogram extraction (Yin, Shah, and Zimmermann 2018) as an example, we use 44.1 kHz without downsampling and extract the spectrograms with 64 Bin Mel-scale. The window size for short-time Fourier transform is 1,024 with a hop size of 512. The resulting Mel-spectrograms are next converted into log-scaled ones and standardized by subtracting the mean value and divided by the standard deviation. Finally, we feed feature vectors of raw waveforms and acoustic features into our improved serial neural network of Bi-LSTM and CNN, combining with the attention mecha- nism to learn the deep features of different sound representa- tions, that is, ASV. Figure 3: The raw audio waveform sampling distribution on the CMU-MOSI dataset. weight ai can be formulated by Equation 1. Text Sentiment Vector (TSV) from Text Feature Fusion (TFF) ai = The architecture of TSV from TFF is shown in Figure 4. BERT (Devlin et al. 2018) is a new language representation model, standing for Bidirectional Encoder Representations from Transformers. Thus far, to the best of our knowledge, no studies have leveraged BERT to pre-train text feature rep- resentations on the multimodal dataset such as CMU-MOSI. We then utilize BERT embeddings for CMU-MOSI. Next, the Bi-LSTM layer takes the concatenated word embeddings and POS tags as its inputs and it outputs each hidden state. Let hi be the output hidden state at time i. Then its attention In Equation 1, wimi + bi denotes a linear transformation of mi. Therefore, the output representation ri is given by: ri = aihi. (2) Based on such text representations, the sequence of fea- tures will be assigned with different attention weights. Thus, crucial information such as emotional words can be identified more easily. The convolutional layer takes the text represen- tation ri as its input, and the output CNN feature maps are concatenated together. Finally, text sentiment analysis can be improved by using TSV from TFF. mi = tanh(hi) ai = wimi + bi (1) (cid:80) exp( ai) j exp( aj) 0100000200000300000400000500000600000Audio Vector Length01020304050607080Frequency respectively. xt+1 and xt−1 represent the features at time (t + 1)th and (t − 1)th, respectively. The text modality is similar, represented by T . (cid:80) (cid:80) at = tt = exp(eT ht) t exp(eT ht) exp(eT h(cid:48) t) t exp(eT h(cid:48) t) atht Za = (cid:88) (cid:88) t Zt = tth(cid:48) t (4) t yi,j = sof tmax(concat(concat(Za, Zt), A)T M + b) (5) score as a weight parameter, the weighted sum(cid:80) We then consider the final ASV e as an intermediate vec- tor, as shown in Figure 1. During each time step t, the dot product of the intermediate vector e and the hidden state ht is evaluated to calculate a similarity score at. Using this t atht is calculated to generate a multi-feature fusion vector Za. The multi-feature fusion vector of the text modality is calculated similarly, represented by Zt. We are therefore able to obtain two kinds of multi-feature fusion vectors for the audio modal- ity and the text modality respectively, as shown in Equation 4 and 5. These multi-feature fusion vectors are respectively concatenated with the final intermediate vectors of ASV and TSV, which will pass through the softmax function to perform sentiment analysis, as shown in Equation 6 and 7. ASV = gθ(e) (cid:48)(ht) T SV = gθ (6) yi = sof tmax(concat(ASV, T SV )T M + b) (7) Empirical Evaluation In this section, we firstly introduce the datasets, the evaluation metrics and the network structure parameters used in our experiments, and then exhibit the experimental results and make comparisons with other state-of-the-art models to show the advantages of DFF-ATMF. At last, more discussions are illustrated to understand the learning behavior of DFF-ATMF better. Experiment Settings Datasets The datasets used for training and test are de- picted in Table 2. The CMU-MOSI dataset is rich in senti- ment expression, consisting of 2,199 utterances, that is, 93 videos by 89 speakers. The videos involve a large array of top- ics such as movies, books, and other products. These videos were crawled from YouTube and segmented into utterances where each utterance is annotated with scores between −3 Figure 4: The architecture of TSV from TFF. Audio and Text Modal Fusion with the Multimodal-Attention Mechanism Inspired by human visual attention, the attention mechanism, proposed by (Luong, Pham, and Manning 2015) for neural machine translation, is introduced into the encoder-decoder framework to select reference words from the source lan- guage for the words in the target language. Based on the existing attention mechanism, inspired by the work in (Yoon, Byun, and Jung 2018), we improve the multimodal-attention method on the basis of the multi-feature fusion strategy, fo- cusing on the fusion of comprehensive and complementary sentiment information from audio and text. We leverage the multimodal-attention mechanism to preserve the intermedi- ate outputs of the input sequences by retaining the Bi-LSTM encoder, and then a model is trained to selectively learn these inputs and to correlate output sequences with the model's output. More specifically, ASV and TSV are firstly encoded with Audio-BiLSTM and Text-BiLSTM using Equation 3. At+1 = fθ(At, xt+1) At−1 = fθ(At, xt−1) Tt+1 = fθ(Tt, xt+1) Tt−1 = fθ(Tt, xt−1) (3) In Equation 3, fθ is the LSTM function with the weight parameter θ. At+1, At and At−1 represent the hidden states at time (t + 1)th, tth and (t − 1)th from the audio modality, DatasetU1U3U2Text ModalBi-LSTMAttentionCNNConcatenated Feature Vector --- Text Sentiment Vector (TSV)BERT Table 2: Datasets for training and test in our experiments. Dataset CMU-MOSI CMU-MOSEI IEMOCAP Training #utterance 1 616 18 051 4 290 (strongly negative) and +3 (strongly positive) by five anno- tators. We take the average of these five annotations as the sentiment polarity and then consider only two classes, that is, "positive" and "negative". Our training and test splits of the dataset are completely disjoint with respect to speakers. In order to better compare with the previous work, similar to (Poria et al. 2018), we divide the dataset by 7:3 approxi- mately, resulting in 1,616 and 583 utterances for training and test respectively. The CMU-MOSEI dataset is an upgraded version of the CMU-MOSI dataset, which has 3,229 videos, that is, 22,676 utterances, from more than 1,000 online YouTube speakers. The training and test sets include 18,051 and 4,625 utterances respectively, similar to (Ghosal et al. 2018). The IEMOCAP dataset was collected following theatrical theory in order to simulate natural dyadic interactions be- tween actors. We use categorical evaluations with majority agreement and use only four emotional categories, that is, "happy", "sad", "angry", and "neutral" to compare the per- formance of our model with other researches using the same categories (Poria et al. 2018). Evaluation Metrics We evaluate the performance of our proposed model by the weighted accuracy on 2-class or multi- class classifications. weighted accuracy = correct utterances utterances (8) Additionally, F1-Score is used to evaluate 2-class classifi- cation. Fβ=(1 + β2) · precision · recall (β2 · precision) + recall (9) In Equation 9, β represents the weight between precision and recall. During our evaluation process, we set β = 1 since we consider precision and recall to have the same weight, and thus F 1-score is adopted. However, in emotion recognition, we use Macro F 1-Score to evaluate the performance. n(cid:80) F1n n M acro F 1= 1 (10) In Equation 10, n represents the number of classifications and F1n is the F 1 score on the nth category. Network Structure Parameters Our proposed architec- ture is implemented on the open-source deep learning frame- work TensorFlow. More specifically, for the proposed audio and text multi-modality fusion framework, we use Bi-LSTM #video 65 1 550 120 Test #utterance 583 4 625 1 208 #video 28 679 31 with 200 neurons, each followed by a dense layer consisting of 100 neurons. Utilizing the dense layer, we project the input features of audio and text to the same dimension, and next combine them with the multimodal-attention mechanism. We set the dropout hyperparameter to be 0.4 for CMU-MOSI and 0.3 for CMU-MOSEI & IEMOCAP as a measure of regularization. We also use the same dropout rates for the Bi-LSTM layers. We employ the ReLu function in the dense layers and softmax in the final classification layer. When training the network, we set the batch size to be 32, and use Adam optimizer with the cross-entropy loss function and train for 50 epochs. In data processing, we make each utter- ance one-to-one correspondence with the label and rename the utterance. The network structure of the proposed audio and text multi- feature fusion framework is similar. Taking the audio multi- feature fusion framework as an example, the hidden states of Bi-LSTM are of 2 ∗ 200-dim. The kernel sizes of CNN are 3, 5, 7 and 9 respectively. The size of the feature map is 4 ∗ 200. A dropout rate is a random number between 0.3 and 0.4. The loss function used is MAE, and the batch size is set to 16. We combine the training set and the development set in our experiments. We use 90% for training and reserve 10% for cross-validation. To train the feature encoder, we follow the fine-tuning training strategy. In order to reduce randomness and improve credibility, we report the average value over 3 runs for all experiments. Experimental Results Comparison with Other Models • (Poria et al. 2017b) proposes an LSTM-based model that enables utterances to capture contextual information from their surroundings in the video, thus aiding the classifica- tion. • (Poria et al. 2017c) introduces attention-based networks to improve both context learning and dynamic feature fusion. • (Zadeh et al. 2018) proposes a novel multimodal fusion • (Poria et al. 2018) explores three different deep learning- based architectures, each improving upon the previous one, which is the state-of-the-art method on the IEMOCAP dataset at present. • (Ghosal et al. 2018) proposes a recurrent neural network- based multimodal-attention framework that leverages the contextual information, which is the state-of-the-art model on the CMU-MOSI dataset at present. • (Lee et al. 2018) proposes a new method of learning about the hidden representations between speech and text data technique called Dynamic Fusion Graph (DFG). Table 3: Comparison with other state-of-the-art models. Model (Poria et al. 2017b) (Poria et al. 2017c) (Zadeh et al. 2018) (Poria et al. 2018) (Ghosal et al. 2018) (Lee et al. 2018) DFF-ATMF CMU-MOSI Acc(%) 79.30 80.10 74.93 76.60 80.58 - 80.98 F1 80.12 80.62 75.42 76.93 80.96 - 81.26 Acc(%) CMU-MOSEI F1 - - - - 76.24 - 79.74 84.08 77.15 77.03 - 80.15 88.89 78.33 IEMOCAP Overall Acc(%) 75.60 - - - - 78.20 81.37 Macro F1 76.31 - - - - 78.79 82.29 Table 4: Experimental results on the IEMOCAP dataset. IEMOCAP Emotion happy sad angry neutral Overall ACC(%) 74.41 73.62 78.57 64.35 81.37 using CNN, which is the state-of-the-art model on the CMU-MOSEI dataset at present. Table 3 shows the comparison of DFF-ATMF with other state-of-the-art models. From Table 3, we can see that DFF- ATMF outperforms the other models on the CMU-MOSI dataset and the IEMOCAP dataset. At the same time, the experimental results on the CMU-MOSEI dataset also show DFF-ATMF's competitive performance. Generalization Ability Analysis In order to verify the fea- ture complementarity of our proposed fusion strategy and its robustness, we conduct experiments on the IEMOCAP dataset to examine DFF-ATMF's generalization capability. Surprisingly, our proposed fusion strategy is effective on the IEMOCAP dataset and outperforms the current state-of-the- art method in (Poria et al. 2018), which can be seen from Table 3 and the overall accuracy is improved by 3.17%. More detailed experimental results on the IEMOCAP dataset are illustrated in Table 4. Further Discussions Macro F1 75.66 74.31 79.14 65.72 82.29 Figure 6: Softmax attention weights of an example from the CMU-MOSEI test set. Figure 7: Softmax attention weights of an example from the IEMOCAP test set. Figure 5: Softmax attention weights of an example from the CMU-MOSI test set. The above experimental results have already shown that DFF-ATMF can improve the performance of audio-text Sen- timent analysis. We now analyze the attention values to un- Figure 8: Softmax attention weight comparison of the CMU- MOSI, CMU-MOSEI, and IEMOCAP test sets. u1u2u3u1u2u3u1u2u30.150.300.450.600.750.90u1u2u3u1u2u3u1u2u30.150.300.450.600.750.90u1u2u3u1u2u3u1u2u30.150.300.450.600.75u1u2u3u4u5u6u7u8u9u1u2u3u4u5u6u7u8u9u1u2u3u4u5u6u7u8u90.20.40.60.8 derstand the learning behavior of the proposed architecture better. We take a video from the CMU-MOSI test set as an ex- ample. From the attention heatmap in Figure 5, we can see evidently that by applying different weights across contextual utterances and modalities, the model is able to predict labels of all the utterances correctly, which shows that our proposed fusion strategy with multi-feature and multi-modality is in- deed effective, and thus has good feature complementarity and excellent robustness of generalization ability. However, at the same time, we have a doubt about the multi-feature fusion. When the raw waveform of the audio is fused with the vector of acoustic features, the dimensions are inconsistent. If the existing method is utilized to reduce the dimension, some audio information may also be lost. We intend to solve this problem from the perspective of some mathematical theory such as the angle between two vectors. Similarly, the attention weight distribution heatmaps on the CMU-MOSEI and IEMOCAP test sets are shown in Figure 6 and 7, respectively. Furthermore, we also give the softmax attention weight comparison of the CMU-MOSI, CMU-MOSEI, and IEMOCAP test sets in Figure 8. Conclusions In this paper, we propose a novel fusion strategy, includ- ing multi-feature fusion and multi-modality fusion, and the learned features have strong complementarity and robustness, leading to the most advanced experimental results on the audio-text multimodal sentiment analysis tasks. Experiments on both the CMU-MOSI and CMU-MOSEI datasets show that our proposed model is very competitive. More surpris- ingly, the experiments on the IEMOCAP dataset achieve un- expected state-of-the-art results, indicating that DFF-ATMF can also be generalized for multimodal emotion recognition. In this paper, we did not consider the video modality because we try to use only the information of audio and text derived from videos. To the best of our knowledge, this is the first attempt in the multimodal domain. In the future, we will con- sider more fusion strategies supported by basic mathematical theories for multimodal sentiment analysis. Acknowledgements This research work was supported by the National Under- graduate Training Programs for Innovation and Entrepreneur- ship (Grant No. 201810022064) and the World-Class Disci- pline Construction and Characteristic Development Guid- ance Funds for Beijing Forestry University (Grant No. 2019XKJS0310). We also thank the anonymous reviewers for their thoughtful comments. Special thanks to the support of AAAI 2020 and AffCon2020. References [Baltrušaitis, Ahuja, and Morency 2019] Baltrušaitis, T.; Ahuja, C.; and Morency, L.-P. 2019. Multimodal machine learning: A survey and taxonomy. IEEE Transactions on Pattern Analysis and Machine Intelligence 41(2):423 -- 443. [Bertero and Fung 2017] Bertero, D., and Fung, P. 2017. A first look into a convolutional neural network for speech emotion detection. In 2017 IEEE international conference on acoustics, speech and signal processing (ICASSP), 5115 -- 5119. IEEE. [Cai and Hao 2018] Cai, X., and Hao, Z. 2018. Multi-view and attention-based bi-lstm for weibo emotion recognition. In 2018 International Conference on Network, Communica- tion, Computer Engineering (NCCE), Advances in Intelligent Systems Research, volume 147, 772 -- 779. Atlantis Press. [Chaturvedi et al. 2018] Chaturvedi, I.; Cambria, E.; Welsch, R. E.; and Herrera, F. 2018. Distinguishing between facts and opinions for sentiment analysis: Survey and challenges. Information Fusion 44:65 -- 77. [Dai et al. 2019] Dai, Z.; Yang, Z.; Yang, Y.; Cohen, W. W.; Carbonell, J.; Le, Q. V.; and Salakhutdinov, R. 2019. Transformer-xl: Attentive language models beyond a fixed- length context. arXiv preprint arXiv:1901.02860. [Devlin et al. 2018] Devlin, J.; Chang, M.-W.; Lee, K.; and Toutanova, K. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. [Ghosal et al. 2018] Ghosal, D.; Akhtar, M. S.; Chauhan, D.; Poria, S.; Ekbal, A.; and Bhattacharyya, P. 2018. Contextual inter-modal attention for multi-modal sentiment analysis. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, 3454 -- 3466. [Han, Yu, and Tashev 2014] Han, K.; Yu, D.; and Tashev, I. 2014. Speech emotion recognition using deep neural network and extreme learning machine. In The fifteenth annual confer- ence of the international speech communication association (INTERSPEECH), 223 -- 227. [Hussein 2018] Hussein, D. M. E.-D. M. 2018. A survey on sentiment analysis challenges. Journal of King Saud University-Engineering Sciences 30(4):330 -- 338. [Jianqiang, Xiaolin, and Xuejun 2018] Jianqiang, Z.; Xi- aolin, G.; and Xuejun, Z. 2018. Deep convolution neural IEEE Access networks for twitter sentiment analysis. 6:23253 -- 23260. [Kozinets, Scaraboto, and Parmentier 2018] Kozinets, R. V.; Scaraboto, D.; and Parmentier, M.-A. 2018. Evolving netnog- raphy: how brand auto-netnography, a netnographic sensibil- ity, and more-than-human netnography can transform your research. JOURNAL OF MARKETING MANAGEMENT 34(3-4):231 -- 242. [Lee et al. 2011] Lee, C.-C.; Mower, E.; Busso, C.; Lee, S.; and Narayanan, S. 2011. Emotion recognition using a hierar- chical binary decision tree approach. Speech Communication 53(9-10):1162 -- 1171. [Lee et al. 2018] Lee, C. W.; Song, K. Y.; Jeong, J.; and Choi, W. Y. 2018. Convolutional attention networks for multimodal emotion recognition from speech and text data. arXiv preprint arXiv:1805.06606. [Liu et al. 2018] Liu, Z.-T.; Wu, M.; Cao, W.-H.; Mao, J.-W.; Xu, J.-P.; and Tan, G.-Z. 2018. Speech emotion recognition based on feature selection and extreme learning machine decision tree. Neurocomputing 273:271 -- 280. ing acoustic features and linguistic information in a hybrid support vector machine-belief network architecture. In 2004 IEEE International Conference on Acoustics, Speech, and Signal Processing, volume 1, I -- 577. IEEE. [Wu et al. 2018] Wu, C.; Wu, F.; Liu, J.; Yuan, Z.; Wu, S.; and Huang, Y. 2018. Thu_ngn at semeval-2018 task 1: Fine- grained tweet sentiment intensity analysis with attention cnn- lstm. In Proceedings of The 12th International Workshop on Semantic Evaluation, 186 -- 192. [Yin, Shah, and Zimmermann 2018] Yin, Y.; Shah, R. R.; and Zimmermann, R. 2018. Learning and fusing multimodal deep features for acoustic scene categorization. In 2018 ACM Multimedia Conference on Multimedia Conference, 1892 -- 1900. ACM. [Yoon, Byun, and Jung 2018] Yoon, S.; Byun, S.; and Jung, K. 2018. Multimodal speech emotion recognition using audio and text. In 2018 IEEE Spoken Language Technology Workshop (SLT), 112 -- 118. IEEE. [Zadeh et al. 2016] Zadeh, A.; Zellers, R.; Pincus, E.; and Morency, L.-P. 2016. Mosi: multimodal corpus of sentiment intensity and subjectivity analysis in online opinion videos. arXiv preprint arXiv:1606.06259. [Zadeh et al. 2018] Zadeh, A. B.; Liang, P. P.; Poria, S.; Cam- bria, E.; and Morency, L.-P. 2018. Multimodal language analysis in the wild: Cmu-mosei dataset and interpretable dynamic fusion graph. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, 2236 -- 2246. [Zhang, Wang, and Liu 2018] Zhang, L.; Wang, S.; and Liu, B. 2018. Deep learning for sentiment analysis: A survey. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery 8(4):e1253. 2015. [Luo, Xu, and Chen 2019] Luo, Z.; Xu, H.; and Chen, F. 2019. Audio sentiment analysis by heterogeneous signal features learned from utterance-based parallel neural net- work. In Proceedings of the AAAI-19 Workshop on Affective Content Analysis, Honolulu, USA, AAAI. [Luong, Pham, and Manning 2015] Luong, M.-T.; Pham, H.; and Manning, C. D. Effective approaches to attention-based neural machine translation. arXiv preprint arXiv:1508.04025. [Majumder et al. 2018] Majumder, N.; Hazarika, D.; Gel- bukh, A.; Cambria, E.; and Poria, S. 2018. Multimodal sentiment analysis using hierarchical fusion with context modeling. Knowledge-Based Systems 161:124 -- 133. [McFee et al. 2015] McFee, B.; Raffel, C.; Liang, D.; Ellis, D. P.; McVicar, M.; Battenberg, E.; and Nieto, O. 2015. librosa: Audio and music signal analysis in python. In Pro- ceedings of the 14th python in science conference, 18 -- 25. [Minaee and Abdolrashidi 2019] Minaee, S., and Abdol- rashidi, A. 2019. Deep-emotion: Facial expression recogni- tion using attentional convolutional network. arXiv preprint arXiv:1902.01019. [Parthasarathy and Tashev 2018] Parthasarathy, S., and Ta- shev, I. 2018. Convolutional neural network techniques for speech emotion recognition. In 2018 16th International Workshop on Acoustic Signal Enhancement (IWAENC), 121 -- 125. IEEE. [Poria et al. 2017a] Poria, S.; Cambria, E.; Bajpai, R.; and Hussain, A. 2017a. A review of affective computing: From unimodal analysis to multimodal fusion. Information Fusion 37:98 -- 125. [Poria et al. 2017b] Poria, S.; Cambria, E.; Hazarika, D.; Ma- jumder, N.; Zadeh, A.; and Morency, L.-P. 2017b. Context- dependent sentiment analysis in user-generated videos. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), vol- ume 1, 873 -- 883. [Poria et al. 2017c] Poria, S.; Cambria, E.; Hazarika, D.; Mazumder, N.; Zadeh, A.; and Morency, L.-P. 2017c. Multi- level multiple attentions for contextual multimodal sentiment analysis. In 2017 IEEE International Conference on Data Mining (ICDM), 1033 -- 1038. IEEE. [Poria et al. 2018] Poria, S.; Majumder, N.; Hazarika, D.; Cambria, E.; Gelbukh, A.; and Hussain, A. 2018. Multi- modal sentiment analysis: Addressing key issues and setting up the baselines. IEEE Intelligent Systems 33(6):17 -- 25. [Poria, Hussain, and Cambria 2018] Poria, S.; Hussain, A.; and Cambria, E. 2018. Combining textual clues with audio- visual information for multimodal sentiment analysis. In Multimodal Sentiment Analysis. Springer. 153 -- 178. [Schuller, Rigoll, and Lang 2003] Schuller, B.; Rigoll, G.; and Lang, M. 2003. Hidden markov model-based speech emotion recognition. In 2003 IEEE International Conference on Acoustics, Speech, and Signal Processing, 2003. Proceed- ings.(ICASSP'03)., volume 2, II -- 1. IEEE. [Schuller, Rigoll, and Lang 2004] Schuller, B.; Rigoll, G.; and Lang, M. 2004. Speech emotion recognition combin-
1704.03956
2
1704
2017-04-15T07:15:00
Incremental Skip-gram Model with Negative Sampling
[ "cs.CL" ]
This paper explores an incremental training strategy for the skip-gram model with negative sampling (SGNS) from both empirical and theoretical perspectives. Existing methods of neural word embeddings, including SGNS, are multi-pass algorithms and thus cannot perform incremental model update. To address this problem, we present a simple incremental extension of SGNS and provide a thorough theoretical analysis to demonstrate its validity. Empirical experiments demonstrated the correctness of the theoretical analysis as well as the practical usefulness of the incremental algorithm.
cs.CL
cs
Incremental Skip-gram Model with Negative Sampling Nobuhiro Kaji and Hayato Kobayashi {nkaji,hakobaya}@yahoo-corp.jp Yahoo Japan Corporation 7 1 0 2 r p A 5 1 ] L C . s c [ 2 v 6 5 9 3 0 . 4 0 7 1 : v i X r a Abstract This paper explores an incremental train- ing strategy for the skip-gram model with negative sampling (SGNS) from both em- pirical and theoretical perspectives. Ex- isting methods of neural word embed- dings, including SGNS, are multi-pass al- gorithms and thus cannot perform incre- mental model update. To address this problem, we present a simple incremen- tal extension of SGNS and provide a thorough theoretical analysis to demon- strate its validity. Empirical experiments demonstrated the correctness of the theo- retical analysis as well as the practical use- fulness of the incremental algorithm. Introduction 1 Existing methods of neural word embeddings are typically designed to go through the entire train- ing data multiple times. For example, negative sampling (Mikolov et al., 2013b) needs to pre- compute the noise distribution from the entire training data before performing Stochastic Gradi- ent Descent (SGD). It thus needs to go through the training data at least twice. Similarly, hierarchical soft-max (Mikolov et al., 2013b) has to determine the tree structure and GloVe (Pennington et al., 2014) has to count co-occurrence frequencies be- fore performing SGD. The fact that those existing methods are multi- pass algorithms means that they cannot perform incremental model update when additional train- ing data is provided. Instead, they have to re-train the model on the old and new training data from scratch. However, the re-training is obviously inefficient since it has to process the entire training data received thus far whenever new training data is provided. This is especially problematic when the amount of the new training data is relatively smaller than the old one. One such a situa- tion is that the embedding model is updated on a small amount of training data that includes newly emerged words for instantly adding them to the vocabulary set. Another situation is that the word embeddings are learned from ever-evolving data such as news articles and microbologs (Peng et al., 2017) and the embedding model is periodically updated on newly generated data (e.g., once in a week or month). This paper investigates an incremental training method of word embeddings with a focus on the skip-gram model with negative sampling (SGNS) (Mikolov et al., 2013b) for its popularity. We present a simple incremental extension of SGNS, referred to as incremental SGNS, and provide a thorough theoretical analysis to demonstrate its validity. Our analysis reveals that, under a mild assumption, the optimal solution of incremental SGNS agrees with the original SGNS when the training data size is infinitely large. See Section 4 for the formal and strict statement. Additionally, we present techniques for the efficient implemen- tation of incremental SGNS. Three experiments were conducted to assess the correctness of the theoretical analysis as well as the practical usefulness of incremental SGNS. The first experiment empirically investigates the validity of the theoretical analysis result. The second experiment compares the word embed- dings learned by incremental SGNS and the orig- inal SGNS across five benchmark datasets, and demonstrates that those word embeddings are of comparable quality. The last experiment explores the training time of incremental SGNS, demon- strating that it is able to save much training time by avoiding expensive re-training when additional training data is provided. 2 SGNS Overview As a preliminary, overview of SGNS. this section provides a brief Given a word sequence, w1, w2, . . . , wn, for training, the skip-gram model seeks to minimize the following objective to learn word embeddings: LSG = − 1 n log p(wi+j wi), n(cid:88) (cid:88) i=1 j≤c j(cid:54)=0 where wi is a target word and wi+j is a context word within a window of size c. p(wi+j wi) represents the probability that wi+j appears within the neighbor of wi, and is defined as p(wi+j wi) = (cid:80) exp(twi · cwi+j ) w∈W exp(twi · cw) , (1) where tw and cw are w's embeddings when it be- haves as a target and context, respectively. W rep- resents the vocabulary set. Since it is too expensive to optimize the above objective, Mikolov et al. (2013b) proposed nega- tive sampling to speed up skip-gram training. This approximates Eq. (1) using sigmoid functions and k randomly-sampled words, called negative sam- ples. The resulting objective is given as LSGNS =− 1 n wi,wi+j +kEv∼q(v)[ψ− ψ+ wi,v], n(cid:88) (cid:88) i=1 j≤c j(cid:54)=0 w,v = log σ(tw · cv), ψ− w,v = log σ(−tw · where ψ+ cv), and σ(x) is the sigmoid function. The nega- tive sample v is drawn from a smoothed unigram probability distribution referred to as noise distri- bution: q(v) ∝ f (v)α, where f (v) represents the frequency of a word v in the training data and α is a smoothing parameter (0 < α ≤ 1). The objective is optimized by SGD. Given a target-context word pair (wi and wi+j) and k negative samples (v1, v2, . . . , vk) drawn from the wi,wi+j − noise distribution, the gradient of −ψ+ kEv∼q(v)[ψ− k(cid:48)=1 ψ− wi,vk(cid:48) is computed. Then, the gradient descent is per- formed to update twi, cwi+j , and cv1, . . . , cvk. wi,wi+j − (cid:80)k wi,v] ≈ −ψ+ SGNS training needs to scan the entire train- ing data multiple times because it has to pre- compute the noise distribution q(v) before per- forming SGD. This makes it difficult to perform incremental model update when additional train- ing data is provided. Incremental SGNS 3 This section explores incremental training of SGNS. The incremental training algorithm (Sec- tion 3.1), its efficient implementation (Section 3.2), and the computational complexity (Section 3.3) are discussed in turn. 3.1 Algorithm Algorithm 1 presents incremental SGNS, which goes through the training data in a single-pass to update word embeddings incrementally. Unlike the original SGNS, it does not pre-compute the noise distribution. Instead, it reads the training data word by word1 to incrementally update the word frequency distribution and the noise distribu- tion while performing SGD. Hereafter, the origi- nal SGNS (c.f., Section 2) is referred to as batch SGNS to emphasize that the noise distribution is computed in a batch fashion. The learning rate for SGD is adjusted by using AdaGrad (Duchi et al., 2011). Although the linear decay function has widely been used for training batch SGNS (Mikolov, 2013), adaptive methods such as AdaGrad are more suitable for the incre- mental training since the amount of training data is unknown in advance or can increase unboundedly. It is straightforward to extend the incremental SGNS to the mini-batch setting by reading a sub- set of the training data (or mini-batch), rather than a single word, at a time to update the noise distri- bution and perform SGD (Algorithm 2). Although this paper primarily focuses on the incremental SGNS, the mini-batch algorithm is also important in practical terms because it is easier to be multi- threaded. Alternatives to Algorithms 2 might be possi- ble. Other possible approaches include computing the noise distribution separately on each subset of the training data, fixing the noise distribution after computing it from the first (possibly large) subset, and so on. We exclude such alternatives from our investigation because it is considered difficult to provide them with theoretical justification. 3.2 Efficient implementation Although the incremental SGNS is conceptually simple, implementation issues are involved. 1In practice, Algorithm 1 buffers a sequence of words wi−c, . . . , wi+c (rather than a single word wi) at each step, as it requires an access to the context words wi+j in line 7. This is not a practical problem because the window size c is usually small and independent from the training data size n. Algorithm 1 Incremental SGNS 1: f (w) ← 0 for all w ∈ W 2: for i = 1, . . . , n do f (wi) ← f (wi) + 1 3: q(w) ← 4: for j = −c, . . . ,−1, 1, . . . , c do 5: 6: 7: 8: 9: end for end for (cid:80) f (w)α w(cid:48)∈W f (w(cid:48))α for all w ∈ W draw k negative samples from q(w): v1, . . . , vk use SGD to update twi, cwi+j , and cv1 , . . . , cvk Algorithm 2 Mini-batch SGNS 1: for each subset D of the training data do update the noise distribution using D 2: perform SGD over D 3: 4: end for 3.2.1 Dynamic vocabulary One problem that arises when training incremen- tal SGNS is how to maintain the vocabulary set. Since new words emerge endlessly in the train- ing data, the vocabulary set can grow unboundedly and exhaust a memory. We address this problem by dynamically chang- ing the vocabulary set. The Misra-Gries algorithm (Misra and Gries, 1982) is used to approximately keep track of top-m frequent words during train- ing, and those words are used as the dynamic vo- cabulary set. This method allows the maximum vocabulary size to be explicitly limited to m, while being able to dynamically change the vocabulary set. 3.2.2 Adaptive unigram table Another problem is how to generate negative sam- ples efficiently. Since k negative samples per target-context pair have to be generated by the noise distribution, the sampling speed has a sig- nificant effect on the overall training efficiency. Let us first examine how negative samples are generated in batch SGNS. In a popular implemen- tation (Mikolov, 2013), a word array (referred to as a unigram table) is constructed such that the number of a word w in it is proportional to q(w). See Table 1 for an example. Using the unigram table, negative samples can be efficiently gener- ated by sampling the table elements uniformly at random. It takes only O(1) time to generate one negative sample. The above method assumes that the noise dis- tribution is fixed and thus cannot be used directly for the incremental training. One simple solution is to reconstruct the unigram table whenever new training data is provided. However, such a method w q(w) a 0.5 b 0.3 c 0.2 T = (a, a, a, a, a, b, b, b, c, c) Table 1: Example noise distribution q(w) for the vocabulary set W = {a, b, c} (left) and the corre- sponding unigram table T of size 10 (right). f (wi) ← f (wi) + 1 F ← f (wi)α − (f (wi) − 1)α z ← z + F if T < τ then Algorithm 3 Adaptive unigram table. 1: f (w) ← 0 for all w ∈ W 2: z ← 0 3: for i = 1, . . . , n do 4: 5: 6: 7: 8: 9: 10: 11: 12: end if 13: 14: end for T [j] ← wi with probability F add F copies of wi to T for j = 1, . . . , τ do end for else z is not effective for the incremental SGNS, because the unigram table reconstruction requires O(W) time.2 z = (cid:80) We propose a reservoir-based algorithm for ef- ficiently updating the unigram table (Vitter, 1985; Efraimidis, 2015) (Algorithm 3). The algorithm incrementally update the unigram table T while limiting its maximum size to τ. In case T < τ, it can be easily confirmed that the number of a word w in T is f (w)α(∝ q(w)). In case T = τ, since w∈W f (w)α is equal to the normalization factor of the noise distribution, it can be proven by induction that, for all j, T [j] is a word w with probability q(w). See (Vitter, 1985; Efraimidis, 2015) for reference. Note on implementation In line 8, F copies of wi are added to T . When F is not an integer, the copies are generated so that their expected number becomes F . Specifically, (cid:100)F(cid:101) copies are added to T with probability F − (cid:98)F(cid:99), and (cid:98)F(cid:99) copies are added otherwise. The loop from line 10 to 12 becomes expen- sive if implemented straightforwardly because the maximum table size τ is typically set large (e.g., τ = 108 in word2vec (Mikolov, 2013)). For ac- celeration, instead of checking all elements in the unigram table, randomly chosen τ F z elements are substituted with wi. Note that τ F is the expected z 2This overhead is amortized in mini-batch SGNS if the mini-batch size is sufficiently large. Our discussion here is dedicated to efficiently perform the incremental training irre- spective of the mini-batch size. number of table elements to be substituted in the original algorithm. This approximation achieves great speed-up because we usually have F (cid:28) z. In fact, it can be proven that it takes O(1) time when α = 1.0. See Appendix3 A for more discus- sions. 3.3 Computational complexity Both incremental and batch SGNS have the same space complexity, which is independent of the training data size n. Both require O(W) space to store the word embeddings and the word fre- quency counts, and O(T) space to store the uni- gram table. The two algorithms also have the same time complexity. Both require O(n) training time when the training data size is n. Although incremen- tal SGNS requires extra time for updating the dynamic vocabulary and adaptive unigram table, these costs are practically negligible, as will be demonstrated in Section 5.3. 4 Theoretical Analysis Although the extension from batch to incremental SGNS is simple and intuitive, it is not readily clear whether incremental SGNS can learn word em- beddings as well as the batch counterpart. To an- swer this question, in this section we examine in- cremental SGNS from a theoretical point of view. The analysis begins by examining the difference between the objectives optimized by batch and in- cremental SGNS (Section 4.1). Then, probabilis- tic properties of their difference are investigated to demonstrate the relationship between batch and incremental SGNS (Sections 4.2 and 4.3). We shortly touch the mini-batch SGNS at the end of this section (Section 4.4). 4.1 Objective difference As discussed in Section 2, batch SGNS optimizes the following objective: LB(θ) =− 1 n wi,wi+j +kEv∼qn(v)[ψ− ψ+ wi,v], n(cid:88) (cid:88) i=1 j≤c j(cid:54)=0 where θ = (t1, t2, . . . , tW, c1, c2, . . . , cW) col- lectively represents the model parameter4 (i.e., word embeddings) and qn(v) represents the noise 3The appendices are in the supplementary material. 4We treat words as integers and thus W ={1, 2, . . .W}. (cid:80) distribution. Note that the noise distribution is rep- resented in a different notation than Section 2 to make its dependence on the whole training data explicit. The function qi(v) is defined as qi(v) = fi(v)α v(cid:48)∈W fi(v(cid:48))α , where fi(v) represents the word frequency in the first i words of the training data. In contrast, incremental SGNS computes the gradient of −ψ+ wi,v] at each step to perform gradient descent. Note that the noise distribution does not depend on n but rather on i. Because it can be seen as a sample approxi- mation of the gradient of wi,wi+j − kEv∼qi(v)[ψ− LI(θ) = − 1 n wi,wi+j +kEv∼qi(v)[ψ− ψ+ wi,v], n(cid:88) (cid:88) i=1 j≤c j(cid:54)=0 objectives can be given as ∆L(θ) = LB(θ) − LI(θ) incremental SGNS can be interpreted as optimiz- ing LI(θ) with SGD. (cid:80) Since the expectation terms in the objec- tives can be rewritten as Ev∼qi(v)[ψ− wi,v] = v∈W qi(v)ψ− wi,v, the difference between the two (cid:88) n(cid:88) (cid:88) (cid:88) n(cid:88) n(cid:88) (cid:88) (qi(v) − qn(v))ψ− (qi(v)−qn(v))ψ− j≤c j(cid:54)=0 2ck n i=1 v∈W v∈W 1 n wi,v wi,v i=1 k δwi,w(qi(v) − qn(v))ψ− w,v = = = 2ck n w,v∈W i=1 where δw,v = δ(w = v) is the delta function. 4.2 Unsmoothed case Let us begin by examining the objective difference ∆L(θ) in the unsmoothed case, α = 1.0. The technical difficulty in analyzing ∆L(θ) is that it is dependent on the word order in the train- ing data. To address this difficulty, we assume that the words in the training data are generated from some stationary distribution. This assumption al- lows us to investigate the property of ∆L(θ) from a probabilistic perspective. Regarding the validity of this assumption, we want to note that this as- sumption is already taken by the original SGNS: the probability that the target and context words co-occur is assumed to be independent of their po- sition in the training data. We below introduce some definitions and nota- tions as the preparation of the analysis. Definition 1. Let Xi,w be a random variable that represents δwi,w. It takes 1 when the i-th word in the training data is w ∈ W and 0 otherwise. Remind that we assume that the words in the training data are generated from a stationary dis- tribution. This assumption means that the expec- tation and (co)variance of Xi,w do not depend on the index i. Hereafter, they are respectively de- noted as E[Xi,w] = µw and V[Xi,w, Xj,v] = ρw,v. Definition 2. Let Yi,w be a random variable that represents qi(w) when α = 1.0. It is given as Yi,w = 1 i 4.2.1 Convergence of the first and second i(cid:48)=1 Xi(cid:48),w. (cid:80)i order moments of ∆L(θ) It can be shown that the first order moment of ∆L(θ) has an analytical form. Theorem 1. The first order moment of ∆L(θ) is given as E[∆L(θ)] = 2ck(Hn − 1) ρw,vψ− w,v, n w,v∈W (cid:88) n(cid:88) (cid:88) where Hn is the n-th harmonic number. Sketch of proof. Notice that E[∆L(θ)] can be written as 2ck n Because we have, for any i and j such that i ≤ j, (cid:0)E[Xi,wYi,v] − E[Xi,wYn,v](cid:1)ψ− j(cid:88) w,v∈W Xj(cid:48),v w,v. i=1 E[Xi,wYj,v] = E[Xi,w ] = µwµv + ρw,v , j j(cid:48)=1 j plugging this into E[∆L(θ)] proves the theorem. See Appendix B.1 for the complete proof. Theorem 1 readily gives the convergence prop- erty of the first order moment of ∆L(θ): Theorem 2. The first-order moment of ∆L(θ) de- creases in the order of O( log(n) n ): (cid:18) log(n) (cid:19) , n E[∆L(θ)] = O and thus converges to zero in the limit of infinity: E[∆L(θ)] = 0. lim n→∞ Proof. We have Hn = O(log(n)) from the up- per integral bound, and thus Theorem 1 gives the proof. A similar result to Theorem 2 can be obtained for the second order moment of ∆L(θ) as well. Theorem 3. The second-order moment of ∆L(θ) decreases in the order of O( log(n) n ): (cid:18) log(n) (cid:19) , n E[∆L(θ)2] = O and thus converges to zero in the limit of infinity: E[∆L(θ)2] = 0. lim n→∞ Proof. Omitted. See Appendix B.2. 4.2.2 Main result The above theorems reveal the relationship be- tween the optimal solutions of the two objectives, as stated in the next lemma. Lemma 4. Let θ∗ and θ be the optimal solu- tions of LB(θ) and LI(θ), respectively: θ∗ = arg minθ LB(θ) and θ = arg minθ LI(θ). Then, E[LB(θ) − LB(θ∗)] = 0, V[LB(θ) − LB(θ∗)] = 0. lim n→∞ lim n→∞ (2) (3) Proof. The proof is made by the squeeze theorem. Let l = LB(θ) − LB(θ∗). The optimality of θ∗ gives 0 ≤ l. Also, the optimality of θ gives l = LB(θ) − LI(θ∗) + LI(θ∗) − LB(θ∗) ≤ LB(θ) − LI(θ) + LI(θ∗) − LB(θ∗) = ∆L(θ) − ∆L(θ∗). We thus have 0 ≤ E[l] ≤ E[∆L(θ) − ∆L(θ∗)]. Since Theorem 2 implies that the right hand side converges to zero when n → ∞, the squeeze the- orem gives Eq. (2). Next, we have V[l] =E[l2]−E[l]2≤E[l2]≤E[(∆L(θ)−∆L(θ∗))2] ≤E[(∆L(θ)−∆L(θ∗))2+(∆L(θ)+∆L(θ∗))2] = 2E[∆L(θ)2] + 2E[∆L(θ∗)2]. (4) Theorem 3 suggests that Eq. (4) converges to zero when n → ∞. Also, the non-negativity of the variance gives 0 ≤ V[l]. Therefore, the squeeze theorem gives Eq. (3). (cid:20) (cid:20) (cid:21) (cid:21) We are now ready to provide the main result of the analysis. The next theorem shows the conver- gence of LB(θ). Theorem 5. LB(θ) converges in probability to LB(θ∗): ∀ > 0, lim LB(θ) − LB(θ∗) ≥  (cid:21) (cid:20) = 0. n→∞ Pr Proof. Let again l = LB(θ) − LB(θ∗). Then, Chebyshev's inequality gives, for any 1 > 0, V[l] 2 1 lim n→∞ ≥ lim n→∞ Pr l − E[l] ≥ 1 . Remember that Eq. (2) means that for any 2 > 0, there exists n(cid:48) such that if n(cid:48) ≤ n then E[l] < 2. Therefore, we have V[l] 2 1 lim n→∞ ≥ lim n→∞ Pr l ≥ 1 + 2 ≥ 0. The arbitrary property of 1 and 2 allows 1 + 2 to be rewritten as . Also, Eq. (3) implies that limn→∞ = 0. This completes the proof. V[l] 2 1 Informally, this theorem can be interpreted as sug- gesting that the optimal solutions of batch and in- cremental SGNS agree when n is infinitely large. 4.3 Smoothed case We next examine the smoothed case (0 < α < 1). In this case, the noise distribution can be repre- sented by using the ones in the unsmoothed case: qi(w) = (cid:80) (cid:80) fi(w)α Fi w(cid:48)∈W fi(w(cid:48))α = where Fi =(cid:80) w(cid:48)∈W w(cid:48)∈W fi(w(cid:48)) and fi(w) Fi (cid:1)α (cid:0) fi(w) (cid:0) fi(w(cid:48)) (cid:1)α Fi corresponds to the noise distribution in the unsmoothed case. Definition 3. Let Zi,w be a random variable that represents qi(w) in the smoothed case. Then, it can be written by using Yi,w: Zi,w = gw(Yi,1, Yi,2, . . . , Yi,W) w(cid:80) xα w(cid:48) . w(cid:48)∈W xα where gw(x1, x2, . . . , xW) = Because Zi,w is no longer a linear combina- tion of Xi,w, it becomes difficult to derive simi- lar proofs to the unsmoothed case. To address this difficulty, Zi,w is approximated by the first-order Taylor expansion around E[(Yi,1, Yi,2, . . . , Yi,W)] = (µ1, µ2, . . . , µW). The first-order Taylor approximation gives Zi,w ≈ gw(µ) + Mw,v(Yi,v − gv(µ)) (cid:88) v∈W ∂xv where µ = (µ1, µ2, . . . , µW) and Mw,v = x=µ. Consequently, it can be shown that ∂gw(x) the first and second order moments of ∆L(θ) have the order of O( log(n) n ) in the smoothed case as well. See Appendix C for the details. 4.4 Mini-batch SGNS The same analysis result can also be obtained for the mini-batch SGNS. We can prove Theorems 2 and 3 in the mini-batch case as well (see Ap- pendix D for the proof). The other part of the anal- ysis remains the same. 5 Experiments Three experiments were conducted to investigate the correctness of the theoretical analysis (Sec- tion 5.1) and the practical usefulness of incremen- tal SGNS (Sections 5.2 and 5.3). Details of the experimental settings that do not fit into the paper are presented in Appendix E. 5.1 Validation of theorems An empirical experiment was conducted to vali- date the result of the theoretical analysis. Since it is difficult to assess the main result in Section 4.2.2 directly, the theorems in Sections 4.2.1, from which the main result is readily derived, were in- vestigated. Specifically, the first and second order moments of ∆L(θ) were computed on datasets of increasing sizes to empirically investigate the con- vergence property. Datasets of various sizes were constructed from the English Gigaword corpus (Napoles et al., 2012). The datasets made up of n words were constructed by randomly sampling sentences from the Gigaword corpus. The value of n was varied over {103, 104, 105, 106, 107}. 10, 000 different datasets were created for each size n to compute the first and second order moments. Figure 1 (top left) shows log-log plots of the first order moments of ∆L(θ) computed on the different sized datasets when α = 1.0. The crosses and circles represent the empirical values and the- oretical values obtained by Theorem 1, respec- tively. Figure 1 (top right) similarly illustrates the second order moments of ∆L(θ). Since Theo- rem 3 suggests that the second order moment de- ample, incremental SGNS (denoted as incremen- tal) utilized the dynamic vocabulary (c.f., Section 3.2.1) and thus we set the maximum vocabulary size m to control the vocabulary size. On the other hand, we set a frequency threshold to determine the vocabulary size of w2v. We set m = 240k for incremental, while setting the frequency thresh- old to 100 for w2v. This yields vocabulary sets of comparable sizes: 220, 389 and 246, 134. The learned word embeddings were assessed on five benchmark datasets commonly used in the literature (Levy et al., 2015): WordSim353 (Agirre et al., 2009), MEN (Bruni et al., 2013), SimLex-999 (Hill et al., 2015), the MSR analogy dataset (Mikolov et al., 2013c), the Google anal- ogy dataset (Mikolov et al., 2013a). The former three are for a semantic similarity task, and the remaining two are for a word analogy task. As evaluation measures, Spearman's ρ and prediction accuracy were used in the two tasks, respectively. Figures 2 (a) and (b) represent the results on the similarity datasets and the analogy datasets. We see that the three methods (incremental, batch, and w2v) perform equally well on all of the datasets. This indicates that incremental SGNS can learn as good word embeddings as the batch counterparts, while being able to perform incre- mental model update. Although incremental per- forms slightly better than the batch methods in some datasets, the difference seems to be a prod- uct of chance. The figures also show the results of incremen- tal SGNS when the maximum vocabulary size m was reduced to 150k and 100k (incremental-150k and incremental-100k). The resulting vocabulary sizes were 135, 447 and 86, 993, respectively. We see that incremental-150k and incremental-100k perform comparatively well with incremental, al- though relatively large performance drops are ob- served in some datasets (MEN and MSR). This demonstrates that the Misra-Gries algorithm can effectively control the vocabulary size. 5.3 Update time The last experiment investigates how much time incremental SGNS can save by avoiding re- training when updating the word embeddings. In this experiment, incremental was first trained on the initial training data of size5 n1 and then updated on the new training data of size n2 to 5The number of sentences here. Figure 1: Log-log plots of the first and second order moments of ∆L(θ) on the different sized datasets when α = 1.0 (top left and top right) and α = 0.75 (bottom left and bottom right). creases in the order of O( log(n) n ), the graph y ∝ is also shown. The graph was fitted to the log(x) x empirical data by minimizing the squared error. The top left figure demonstrates that the empiri- cal values of the first order moments fit the theoret- ical result very well, providing a strong empirical evidence for the correctness of Theorem 1. In ad- dition, the two figures show that the first and sec- ond order moments decrease almost in the order of O( log(n) n ), converging to zero as the data size increases. This result validates Theorems 2 and 3. Figures 1 (bottom left) and (bottom right) show similar results when α = 0.75. Since we do not have theoretical estimates of the first order mo- ment when α (cid:54)= 1.0, the graphs y ∝ log(n) are shown in both figures. From these, we can again observe that the first and second order moments decrease almost in the order of O( log(n) n ). This indicates the validity of the investigation in Sec- tion 4.3. The relatively larger deviations from the graphs y ∝ log(n) n , compared with the top right figure, are considered to be attributed to the first- order Taylor approximation. n 5.2 Quality of word embeddings The next experiment investigates the quality of the word embeddings learned by incremental SGNS through comparison with the batch counterparts. The Gigaword corpus was used for the training. For the comparison, both our own implementation of batch SGNS as well as WORD2VEC (Mikolov et al., 2013c) were used (denoted as batch and w2v). The training configurations of the three methods were set the same as much as possible, although it is impossible to do so perfectly. For ex- 10-610-510-410-310-210-1100102103104105106107108First order momentData size10-610-510-410-310-210-1100102103104105106107108Second order momentData size10-610-510-410-310-210-1100102103104105106107108First order momentData size10-610-510-410-310-210-1100102103104105106107108Second order momentData size (a) (b) (c) Figure 2: (a): Spearman's ρ on the word similarity datasets. (b): Accuracy on the analogy datasets. (c): Update time when new training data is provided. measure the update time. For comparison, batch and w2v were re-trained on the combination of the initial and new training data. We fixed n1 = 107 and varied n2 over {1×106, 2×106, . . . , 5×106}. Figure 2 (c) compares the update time of the three methods across various values of n2. We see that incremental significantly reduces the update time. It achieves 10 and 7.3 times speed-up com- pared with batch and w2v (when n2 = 106). This represents the advantage of the incremental algo- rithm, as well as the time efficiency of the dynamic vocabulary and adaptive unigram table. We note that batch is slower than w2v because it uses Ada- Grad, which maintains different learning rates for different dimensions of the parameter, while w2v uses the same learning rate for all dimensions. 6 Related Work Word representations based on distributional se- mantics have been common (Turney and Pantel, 2010; Baroni and Lenci, 2010). The distribu- tional methods typically begin by constructing a word-context matrix and then applying dimen- sion reduction techniques such as SVD to obtain high-quality word meaning representations. Al- though some investigated incremental updating of the word-context matrix (Yin et al., 2015; Goyal and Daume III, 2011), they did not explore the re- duced representations. On the other hand, neural word embeddings have recently gained much pop- ularity as an alternative. However, most previous studies have not explored incremental strategies (Mikolov et al., 2013a,b; Pennington et al., 2014). Very recently, Peng et al. (2017) proposed an incremental learning method of hierarchical soft- max. Because hierarchical soft-max and negative sampling have different advantages (Peng et al., 2017), the incremental SGNS and their method are complementary to each other. Also, their updating method needs to scan not only new but also old training data, and thus is not an incremental algo- rithm in a strict sense. As a consequence, it poten- tially incurs the same time complexity as the re- training. Another consequence is that their method has to retain the old training data and thus wastes space, while incremental SGNS can discard old training examples after processing them. There are publicly available implementations for training SGNS, one of the most popular being WORD2VEC (Mikolov, 2013). However, it does not support an incremental training method. GEN- SIM ( Rehurek and Sojka, 2010) also offers SGNS training. Although GENSIM allows the incremen- tal updating of SGNS models, it is done in an ad- hoc manner. In GENSIM, the vocabulary set as well as the unigram table are fixed once trained, meaning that new words cannot be added. Also, they do not provide any theoretical accounts for the validity of their training method. 7 Conclusion and Future Work This paper proposed incremental SGNS and pro- vided thorough theoretical analysis to demonstrate its validity. We also conducted experiments to em- pirically demonstrate its effectiveness. Although the incremental model update is often required in practical machine learning applications, only a lit- tle attention has been paid to learning word em- beddings incrementally. We consider that incre- mental SGNS successfully addresses this situation and serves as an useful tool for practitioners. The success of this work suggests several re- search directions to be explored in the future. One possibility is to explore extending other embed- ding methods such as GloVe (Pennington et al., 2014) to incremental algorithms. Such studies would further extend the potential of word embed- ding methods. 0.2 0.4 0.6 0.8 1WordSim353MENSimLex999Spearman's ρincrementalincremental-150kincremental-100kbatchw2v 0.2 0.4 0.6 0.8 1GoogleMSRAccuracyincrementalincremental-150kincremental-100kbatchw2v 0 5 10 1512345Update time (103 sec.)Size of new training data (×106)incrementalbatchw2v References Eneko Agirre, Enrique Alfonseca, Keith Hall, Jana Kravalova, Marius Pasca, and Aitor Soroa. A study on similarity and relatedness 2009. using distributional ap- proaches. In Proceedings of NAACL. pages 19–27. http://www.aclweb.org/anthology/N/N09/N09- 1003. and wordnet-based Marco Baroni and Alessandro Lenci. 2010. Dis- tributional memory: A general framework for corpus-based semantics. Computatoinal Linguistics 36:673–721. http://aclweb.org/anthology/J/J10/J10- 4006. E. Bruni, N. K. Tran, and M. Baroni. 2013. Multi- modal distributional semantics. Journal of Artificial Intelligence Research 49:1–49. Courtney Napoles, Matthew Gormley, and Ben- jamin Van Durme. 2012. Annotated english giga- word ldc2012t21. Hao Peng, Jianxin Li, Yangqiu Song, and Yaopeng Liu. 2017. Incrementally learning the hierarchical soft- max function for neural language models. In Pro- ceedings of AAAI (to appear). Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global vectors for word In Proceedings of EMNLP. pages representation. 1532–1543. http://www.aclweb.org/anthology/D14- 1162. Radim Rehurek and Petr Sojka. 2010. Software frame- work for topic modelling with large corpora. In Pro- ceedings of the LREC 2010 Workshop on New Chal- lenges for NLP Frameworks. pages 45–50. John Duchi, Elad Hazan, and Yoram Singer. 2011. Adaptive subgradient methods for online learning Journal of Machine and stochastic optimization. Learning Research 12:2121–2159. Peter D. Turney and Patrick Pantel. 2010. From fre- quency to meaning: Vector space models of se- mantics. Journal of Artificial Intelligence Research 37:141–188. Pavlos S. Efraimidis. 2015. Weighted random sam- pling over data streams. ArXiv:1012.0256. Amit Goyal and Hal Daume III. 2011. Approxi- mate scalable bounded space sketch for large data In Proceedings of EMNLP. pages 250–261. nlp. http://www.aclweb.org/anthology/D11-1023. Felix Hill, Roi Reichart, Simlex-999: and Anna Korho- Evaluating seman- similarity estima- Computational Linguistics 41:665–695. nen. 2015. tic models with (genuine) tion. http://aclweb.org/anthology/J/J15/J15-4004. Jeffrey S. Vitter. 1985. Random sampling with a reser- voir. ACM Transactions on Mathematical Software 11:37–57. Wenpeng Yin, Tobias Schnabel, Schutze. 2015. resentations Proceedings http://aclweb.org/anthology/D15-1155. for part-of-speech tagging. of EMNLP. and Hinrich Online updating of word rep- In 1329–1334. pages Omer Levy, Yoav Goldberg, and Ido Dagan. 2015. Im- proving distributional similarity with lessons learned from word embeddings. Transactions of the Asso- ciation for Computational Linguistics 3:211–225. https://tacl2013.cs.columbia.edu/ojs/index.php/tacl/article/view/570. Tomas Mikolov. https://code.google.com/archive/p/word2vec. 2013. word2vec. Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013a. Efficient estimation of word represen- tations in vector space. In Workshop at ICLR. Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Cor- rado, and Jeff Dean. 2013b. Distributed representa- tions of words and phrases and their compositional- ity. In Advances in NIPS. pages 3111–3119. Tomas Mikolov, Wen-Tau Yih, and Geof- regularities frey Zweig. 2013c. in representations. In Proceedings of NAACL. pages 746–751. http://www.aclweb.org/anthology/N13-1090. space word continuous Linguistic Jayadev Misra and David Gries. 1982. Finding re- peated elements. Science of Computer Program- ming 2(2):143–152. A Note on Adaptive Unigram Table Algorithm 4 illustrates the efficient implementation of the adaptive unigram table (c.f., Section 3.2.2). In line 8 and 10, F and τ F z are not always integers and therefore they are probabilistically converted into integers as explained in the paper. Time complexity of Algorithm 4 is O(1) per update in case of α = 1.0. When T < τ, the update (line 8) takes O(1) time since we always have F = 1. When τ ≤ T, we have τ ≤ z and consequently z ≤ 1. This means that the update (line 10–13) takes O(1) time. Even if α (cid:54)= 1.0, the value of z becomes sufficiently large in practice, and thus the update becomes τ F efficient as demonstrated in the experiment. f (wi) ← f (wi) + 1 F ← f (wi)α − (f (wi) − 1)α z ← z + F if T < τ then Algorithm 4 Adaptive unigram table. 1: f (w) ← 0 for all w ∈ W 2: z ← 0 3: for i = 1, . . . , n do 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: end if 14: 15: end for add F copies of wi to T for t = 1, . . . , τ F end for z do else j is randomly drawn from [1,T] T [j] ← wi B Complete Proofs This appendix provides complete proofs of Theorems 1, 3, and 5. B.1 Proof of Theorem 1 Proof. The first order moment of ∆L(θ) can be rewritten as E[∆L(θ)] = E δwi,w(qi(v) − qn(v))ψ− w,v n i=1 v∈W w∈W (cid:20) 2ck n(cid:88) (cid:88) (cid:88) n(cid:88) (cid:88) (cid:88) n(cid:88) (cid:88) (cid:88) (cid:18) n(cid:88) (cid:88) (cid:88) w∈W w∈W v∈W v∈W i=1 i=1 w∈W v∈W i=1 = = = 2ck n 2ck n 2ck n (cid:21) (cid:19) E[δwi,w(qi(v) − qn(v))ψ− w,v] E[Xi,w(Yi,v − Yn,v)ψ− w,v] E[Xi,wYi,v] − E[Xi,wYn,v] ψ− w,v. Here, for any i and j such that i ≤ j, we have j(cid:88) j(cid:48)=1 Xj(cid:48),v] = j(cid:88) j(cid:48)=1 1 j E[Xi,wXj(cid:48),v] (cid:19) E[Xi,w]E[Xj(cid:48),v] + V[Xi,w, Xj(cid:48),v] E[Xi,wYj,v] = E[Xi,w 1 j (cid:18) j(cid:88) j(cid:48)=1 = 1 j Therefore, we have E[∆L(θ)] = = = µwµv + ρw,v. 1 j (cid:18) n(cid:88) (cid:88) (cid:88) i=1 (cid:88) (cid:88) 2ck n v∈W 2ck(Hn − 1) w∈W n w∈W v∈W ρw,v − µwµv − 1 n µwµv + 1 i ρw,vψ− w,v. (cid:19) ψ− w,v ρw,v B.2 Proof of Theorem 3 To prove Theorem 3, we begin by examining the upper- and lower-bounds of E[Xi,wYj,vYk,v] in the following Lemma, and then make use of the bounds to evaluate the order of the second order moment of ∆L(θ). Lemma 6. For any j and k such that j ≤ k, we have Proof. We have v + 2j + k − 2 , E[Xi,wYj,vYk,v] ≤ (jk − 2j − k + 2)µwµ2 E[Xi,wYj,vYk,v] ≥ (jk − 2j − k + 2)µwµ2 (cid:19)(cid:18) 1 E[Xi,wYj,vYk,v] = E[Xi,w j(cid:88) Xl,v jk jk v . (cid:18) 1 k(cid:88) j(cid:88) = l=1 j k E[Xi,wXl,vXm,v] l=1 m=1 jk (cid:19) Xm,v ] k(cid:88) m=1 . To prove the lemma, we rewrite the expression by splitting the set of (l, m) into two subsets. Let S (j,k) (j ≤ k) be a set of (l, m) such that Xi,w, Xl,v, and Xm,v are independent from each other (i.e., i, l, and m are all different), and let ¯S (j,k) be its complementary set: i i i S (j,k) ¯S (j,k) i = {(l, m) ∈ {1, 2, . . . , j} × {1, 2, . . . , k} i (cid:54)= l ∧ l (cid:54)= m ∧ m (cid:54)= i}, = {1, 2, . . . , j} × {1, 2, . . . , k} \ S (j,k) . i Then, E[Xi,wYj,vYk,v] is upper-bounded as E[Xi,wYj,vYk,v] = E[Xi,w]E[Xl,v]E[Xm,v] + (cid:88) E[Xi,wXl,vXm,v] jk (cid:88) ≤ (cid:88) (l,m)∈S(j,k) i + µwµ2 v jk v + ¯S (j,k) µwµ2 jk i , (l,m)∈S(j,k) S (j,k) i i = jk (cid:88) (l,m)∈ ¯S(j,k) i (l,m)∈ ¯S(j,k) i 1 jk where the inequality holds because Xi,w, Xl,v, and Xm,v are binary random variables and thus E[Xi,wXl,vXm,v] ≤ 1. Here, we have ¯S (j,k) includes j elements such that l = m and also includes k − 1 and j − 1 elements such that i = l (cid:54)= m and i = m (cid:54)= l, respectively. And we consequently have S (j,k) = jk − 2j − k + 2. Therefore, the upper-bound can be rewritten as = 2j + k − 2, because ¯S (j,k) = jk − ¯S (j,k) i i i i Similarly, by making use of 0 ≤ E[Xi,wXl,vXm,v], the lower-bound can be derived: E[Xi,wYj,vYk,v] = E[Xi,w]E[Xl,v]E[Xm,v] E[Xi,wXl,vXm,v] E[Xi,wYj,vYk,v] ≤ (jk − 2j − k + 2)µwµ2 (cid:88) ≥ (cid:88) (l,m)∈S(j,k) i jk (cid:88) + µwµ2 v jk jk 0 jk . v + 2j + k − 2 (cid:88) + (l,m)∈ ¯S(j,k) i jk i (l,m)∈S(j,k) S (j,k) µwµ2 jk v i = = (l,m)∈ ¯S(j,k) i (jk − 2j − k + 2)µwµ2 v . jk Making use the above Lemma, we can prove Theorem 3. Proof. The upper-bound of E[∆L(θ)2] is examined to prove the theorem. Let Ψi,n,w,v = δwi,w(qi(v) − qn(v))ψ− w,v. Making use of Jensen's inequality, we have E[∆L(θ)2] = E Furthermore, the term E[Ψ2 E[Ψ2 i,n,w,v] = E[δ2 (cid:19)2(cid:21) Ψi,n,w,v (cid:21) 1 W2n Ψi,n,w,v (cid:19)2(cid:21) 1 W2n n2 (cid:20) 4c2k2 (cid:20) 4c2k2 (cid:20) 4c2k2 n2 n2 Ψi,n,w,v i=1 v∈W (cid:18)(cid:88) w∈W W4n2 (cid:88) n(cid:88) (cid:18)(cid:88) (cid:88) n(cid:88) n(cid:88) (cid:88) W4n2 (cid:88) n(cid:88) (cid:88) (cid:88) w∈W w∈W v∈W v∈W i=1 i=1 E[Ψ2 i,n,w,v]. = E ≤ E 4c2k2W2 = n v∈W i,n,w,v] is upper-bounded as w∈W i=1 wi,v(qi(v) − qn(v))2(ψ− w,v)2] = E[δwi,v(qi(v) − qn(v))2(ψ− w,v)2] = E[Xi,w(Yi,v − Yn,v)2](ψ− w,v)2 = (E[Xi,wY2 ≤ (cid:26) 1 v + 3i − 2 (cid:19) (cid:18) (cid:18) i2 − 2 1 in 1 n2 + (cid:26) = (2µwµ2 + (2µwµ2 v (i2 − 3i + 2)µwµ2 (in − 2i − n + 2)µwµ2 (n2 − 3n + 2)µwµ2 v − 2) i2 + (−µwµ2 v − 2) 1 n2 + (µwµ2 1 v + 3n − 2 (cid:27) v − 4 n 1 n v + 3) (cid:19)(cid:27) (ψ− w,v)2 µwµ2 1 i v + 3) (ψ− w,v)2, i,v] − 2E[Xi,wYi,vYn,v] + E[Xi,wY2 n,v])(ψ− w,v)2 where the above Lemma is used to derive the inequality. Therefore, we have n(cid:88) i=1 E[Ψ2 (cid:26) i,n,w,v] ≤ n(cid:88) (cid:26) i=1 + (2µwµ2 = (2µwµ2 (2µwµ2 v − 2) 1 i2 + (−µwµ2 µwµ2 v + 3) 1 i v − 4 (cid:27) n (ψ− w,v)2 µwµ2 v + 3)Hn 1 n2 + (µwµ2 v − 2) v + 3) v − 2)Hn,2 + (−µwµ2 v − 2) 1 n (cid:27) v − 4 n (ψ− + (µwµ2 v + 3) 1 n w,v)2, + (2µwµ2 we have(cid:80)n where Hn,2 represents the generalized harmonic number of order n of 2. Since Hn,2 ≤ Hn = O(log(n)), E[Ψ2 i,n,w,v] = O(log(n)) and consequently E[∆L(θ)2] = O( log(n) n ). i=1 B.3 Proof of Theorem 5 Proof. The proof is made by the squeeze theorem. Let l = LB(θ) − LB(θ∗). Then, Chebyshev's inequality gives, for any 1 > 0, V[l] 2 1 lim n→∞ ≥ lim n→∞ Pr l − E[l] ≥ 1 = lim n→∞ Pr = lim n→∞ Pr l − E[l] ≤ −1 + Pr 1 ≤ l − E[l] l ≤ E[l] − 1 + Pr E[l] + 1 ≤ l . (cid:20) (cid:20) (cid:20) (cid:20) (cid:20) (cid:20) (cid:21) (cid:21) (cid:21) (cid:21) (cid:21) (cid:21) (cid:20) (cid:20) (cid:20) (cid:20) (cid:21) (cid:21) (cid:21) (cid:19) Remind that Eq. (2) in Lemma 4 means that for any 2 > 0, there exists n(cid:48) such that if n(cid:48) ≤ n then E[l] < 2. Therefore we have V[l] 2 1 E[l] + 1 ≤ l l ≤ E[l] − 1 n→∞ Pr ≥ lim lim n→∞ + Pr (cid:21) ≥ lim n→∞ Pr = lim n→∞ Pr l ≤ −2 − 1 + Pr 2 + 1 ≤ l l ≥ 1 + 2 ≥ 0. The arbitrary property of 1 and 2 allows 1 + 2 to be rewritten as . Also, Eq. (3) in Lemma 4 implies that limn→∞ = 0. Therefore, the squeeze theorem gives the proof. V[l] 2 1 C Theoretical Analysis in Smoothed Case This appendix investigates the convergence of the first and second order moment of ∆L(θ) in the smoothed case. C.1 Convergence of the first order moment of ∆L(θ) The first order moment of ∆L(θ) in the smoothed case is given as (cid:88) (cid:88) (cid:18) n(cid:88) w∈W v∈W i=1 E[∆L(θ)] = 2ck n E[Xi,wZi,v] − E[Xi,wZn,v] ψ− w,v. Let us investigate E[Xi,wZj,v] as we did E[Xi,wYj,v] in the unsmoothed case. Let φw = gw(µ) − (cid:80) v∈W Mw,vgv(µ). Then, for any i and j such that i ≤ j, we have E[Xi,wZj,v] ≈ E[Xi,w gv(µ) + Mv,v(cid:48)(Yj,v(cid:48) − gv(cid:48)(µ)) ] (cid:88) v(cid:48)∈W (cid:18) (cid:88) v(cid:48)∈W = E[Xi,w( Mv,v(cid:48)Yj,v(cid:48) + φv)] v(cid:48)∈W (cid:88) (cid:88) (cid:88) v(cid:48)∈W v(cid:48)∈W = = = Mv,v(cid:48)E[Xi,wYj,v(cid:48)] + φvE[Xi,w] Mv,v(cid:48)(µwµv(cid:48) + 1 j ρw,v(cid:48)) + µwφv Mv,v(cid:48)µwµv(cid:48) + µwφv + 1 j Mv,v(cid:48)ρw,v(cid:48). (cid:88) v(cid:48)∈W Therefore, plugging the above equation into E[∆L(θ)] yields E[∆L(θ)] ≈ O( log(n) n ). C.2 Convergence of the second order moment of ∆L(θ) Next, let us examine the convergence of the second order moment of ∆L(θ). This can be confirmed by inspecting E[Xi,wZj,vZk,v] and then E[Ψ2 i,n,w,v] analogously to the unsmoothed case. For any i, j, and k such that i ≤ j ≤ k, we have E[Xi,wZj,vZk,v] ≈ E[Xi,w Mv,v(cid:48)Yj,v(cid:48) + φv Mv,v(cid:48)(cid:48)Yk,v(cid:48)(cid:48) + φv ] (cid:19) (cid:19) = = v(cid:48)∈W + v(cid:48)(cid:48)∈W (cid:18)(cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) v(cid:48)(cid:48)∈W v(cid:48)∈W v(cid:48)∈W v(cid:48)∈W + + v(cid:48)(cid:48)∈W (cid:19)(cid:18) (cid:88) (cid:88) v(cid:48)(cid:48)∈W v(cid:48)∈W v(cid:48)(cid:48)∈W Mv,v(cid:48)Mv,v(cid:48)(cid:48)E[Xi,wYj,v(cid:48)Yk,v(cid:48)(cid:48)] Mv,v(cid:48)Mv,v(cid:48)(cid:48)E[Xi,wYj,v(cid:48)Yk,v(cid:48)(cid:48)] Mv,v(cid:48)φv(µwµv(cid:48) + 1 j ρw,v(cid:48)) Mv,v(cid:48)(cid:48)φv(µwµv(cid:48)(cid:48) + 1 k Σw,v(cid:48)(cid:48)) + µwφ2 v. Mv,v(cid:48)φvE[Xi,wYj,v(cid:48)] + Mv,v(cid:48)(cid:48)φvE[Xi,wYk,v(cid:48)(cid:48)] + φ2 E[Xi,w] v Therefore, we have E[Ψ2 (cid:18) i,n,w,v] = E[Xi,w(Zi,v − Zn,v)2]ψ2 Mv,v(cid:48)Mv,v(cid:48)(cid:48) ≈ (cid:88) (cid:88) w,v v(cid:48)(cid:48)∈W v(cid:48)∈W − 2E[Xi,wYi,v(cid:48)Yn,v(cid:48)(cid:48)] + E[Xi,wYn,v(cid:48)Yn,v(cid:48)(cid:48)] ψ2 w,v. E[Xi,wYi,v(cid:48)Yi,v(cid:48)(cid:48)] (cid:19) Using similar bounds to Lemma 3, we also have (cid:80)n E[Ψ2 i,n,w,v] ≈ O(log(n)) and consequently i=1 E[∆L(θ)2] ≈ O( log(n) n ). D Theoretical Analysis of Mini-batch SGNS This appendix demonstrates that Theorems 2 and 3 also hold for the mini-batch SGNS, that is, the first and second order moments of ∆L(θ) are in the order of O( log(n) n ). We here investigate the mini-batch setting in which M words, as opposed to a single word in the case of incremental SGNS, are processed at a time. Definition 4. Let Y(M ) size is M. Then, it is given as i,w be a random variable that represents qi(w) when α = 1.0 and the mini-batch where b(i, M ) = (cid:100) i Y(M ) i,w = Yb(i,M ),w M (cid:101) × M. Note that we always have Y(M ) We first examine the first order moment of ∆L(θ) by taking a similar step as the proof of Theorem 1. The first order moment of ∆L(θ) is given as n,w = Yn,w and i ≤ b(i, M ). (cid:19) j,v ] − E[Xi,wY(M ) (cid:19) n,v ] j,v ] − E[Xi,wYn,v] (cid:19) − n(cid:88) 1 . 1 n b(i, M ) i=1 i=1 ψ− w,v ψ− w,v E[Xi,wY(M ) E[Xi,wY(M ) (cid:18) n(cid:88) ρw,vψ− w,v w∈W v∈W w∈W v∈W (cid:88) (cid:88) (cid:88) w∈W 1 (cid:18) (cid:18) i=1 n(cid:88) n(cid:88) (cid:88) (cid:88) (cid:88) ≤ n(cid:88) i=1 v∈W i=1 b(i, M ) = Hn = O(log(n)), 1 i (5) E[∆L(θ)] = = = Because we have 2ck n 2ck n 2ck n n(cid:88) i=1 we have E[∆L(θ)] = O( log(n) n ). proof of Theorem 3, we have n(cid:88) i,n,w,v] ≤ n(cid:88) (cid:26) E[Ψ2 Next, we investigate the second order moment of E[∆L(θ)]. Analogously to the last inequality of the i=1 i=1 + (2µwµ2 v − 2) (2µwµ2 v − 2) v − 4 n 1 b(i, M )2 + (−µwµ2 (cid:27) (ψ− v + 3) w,v)2. 1 n2 + (µwµ2 1 n µwµ2 v + 3) 1 b(i, M ) Since we have n(cid:88) i=1 b(i, M )2 ≤ n(cid:88) 1 i=1 1 i2 = Hn,2 = O(log(n)), (6) it can be proven that E[∆L(θ)2] = O( log(n) n ). E Experimental Configurations This appendix details the experimental configurations that are not described in the paper. E.1 Verification of theorems The vocabulary set in the Gigaword corpus was reduced to 1000 by converting infrequent words into the same special tokens because it is expensive to evaluate the expectation terms in ∆L(θ) for a large vocabulary set. The parameter θ was set to 100-dimensional vectors each element of which is drawn from [−0.5, 0.5] uniformly at random. In preliminary experiments we confirmed that the result is not sensitive to the choice of the parameter value. Note that the same parameter value was used for all n. We set c and k as c = 5 and k = 5. The mean µw and covariances ρw,v are required to compute the theoretical value of the first order moment. They were given as the maximum likelihood estimations from the entire Gigaword corpus. Parameter Embedding size Number negative samples Subsampling threshold Subsampling method Window size Smoothing parameter α Value 400 10 1.0 × 10−5 dirty 10 0.75 Table 2: Training configurations. Incremental SGNS used the incrementally-updated frequency for the subsampling. E.2 Quality of word embeddings Table 2 summarizes the training configurations. Those parameter values were used for both incremental and batch SGNS. The learning rate was set to 0.1 for incremental and batch, which use AdaGrad to adjust the learning rate. On the other hand, the learning rate of w2v, which uses linear decay function to adjust the learning rate, was set as the default value of 0.025. In the word similarity and the analogy tasks, we use tw + cw as an embedding of the word w (Pen- nington et al., 2014; Levy et al., 2015). The analogy task was performed by using 3CosMul (Levy et al., 2015). E.3 Update time The experiment was conducted on Intel R(cid:13) Xeon R(cid:13) 2GHz CPU. The update time was averaged over five trials.
1804.07331
1
1804
2018-04-19T18:37:40
Stylistic Variation in Social Media Part-of-Speech Tagging
[ "cs.CL", "cs.AI" ]
Social media features substantial stylistic variation, raising new challenges for syntactic analysis of online writing. However, this variation is often aligned with author attributes such as age, gender, and geography, as well as more readily-available social network metadata. In this paper, we report new evidence on the link between language and social networks in the task of part-of-speech tagging. We find that tagger error rates are correlated with network structure, with high accuracy in some parts of the network, and lower accuracy elsewhere. As a result, tagger accuracy depends on training from a balanced sample of the network, rather than training on texts from a narrow subcommunity. We also describe our attempts to add robustness to stylistic variation, by building a mixture-of-experts model in which each expert is associated with a region of the social network. While prior work found that similar approaches yield performance improvements in sentiment analysis and entity linking, we were unable to obtain performance improvements in part-of-speech tagging, despite strong evidence for the link between part-of-speech error rates and social network structure.
cs.CL
cs
Stylistic Variation in Social Media Part-of-Speech Tagging Murali Raghu Babu Balusu and Taha Merghani and Jacob Eisenstein School of Interactive Computing Georgia Institute of Technology Atlanta, GA, USA {b.murali, tmerghani3, jacobe}@gatech.edu Abstract Social media features substantial stylistic vari- ation, raising new challenges for syntactic analysis of online writing. However, this vari- ation is often aligned with author attributes such as age, gender, and geography, as well as more readily-available social network meta- data. In this paper, we report new evidence on the link between language and social net- works in the task of part-of-speech tagging. We find that tagger error rates are correlated with network structure, with high accuracy in some parts of the network, and lower accu- racy elsewhere. As a result, tagger accuracy depends on training from a balanced sample of the network, rather than training on texts from a narrow subcommunity. We also de- scribe our attempts to add robustness to stylis- tic variation, by building a mixture-of-experts model in which each expert is associated with a region of the social network. While prior work found that similar approaches yield per- formance improvements in sentiment analysis and entity linking, we were unable to obtain performance improvements in part-of-speech tagging, despite strong evidence for the link between part-of-speech error rates and social network structure. Introduction 1 Social media feature greater diversity than the for- mal genres that constitute classic datasets such as the Penn Treebank (Marcus et al., 1993) and the Brown Corpus (Francis and Kucera, 1982): there are more authors, more kinds of authors, more var- ied communicative settings, fewer rules, and more stylistic variation (Baldwin et al., 2013; Eisen- stein, 2013). Previous work has demonstrated precipitous declines in the performance of state- of-the-art systems for core tasks such as part-of- speech tagging (Gimpel et al., 2011) and named- entity recognition (Ritter et al., 2010) when these systems are applied to social media text, and stylistic diversity seems the likely culprit. How- ever, we still lack quantitative evidence of the role played by language variation in the performance of NLP systems in social media, and existing so- lutions to this problem are piecemeal at best. In this paper, we attempt to address both issues: we quantify the impact of one form of sociolinguistic variation on part-of-speech tagging accuracy, and we design a model that attempts to adapt to this variation. Our contribution focuses on the impact of lan- guage variation that is aligned with one or more social networks among authors on the microblog- ging platform Twitter. We choose Twitter because language styles in this platform are particularly di- verse (Eisenstein et al., 2010), and because mod- erately large labeled datasets are available (Gim- pel et al., 2011; Owoputi et al., 2013). We choose social networks for several reasons. First, they can readily be obtained from both metadata and behavioral traces on multiple social media plat- forms (Huberman et al., 2008). Second, social net- works are strongly correlated with "demographic" author-level variables such as age (Rosenthal and McKeown, 2011), gender (Eckert and McConnell- Ginet, 2003), race (Green, 2002), and geogra- phy (Trudgill, 1974), thanks to the phenomenon of homophily, also known as assortative mix- ing (McPherson et al., 2001; Al Zamal et al., 2012). These demographic variables are in turn closely linked to language variation in American English (Wolfram and Schilling-Estes, 2005), and have been shown to improve some document clas- sification tasks (Hovy, 2015). Third, there is grow- ing evidence of the strong relationship between social network structures and language variation, even beyond the extent to which the social network acts as a proxy for demographic attributes (Milroy, 1991; Dodsworth, 2017). To measure the impact of socially-linked lan- guage variation, we focus on part-of-speech tag- ging, a fundamental task for syntactic analysis. First, we measure the extent to which tagger per- formance is correlated with network structure, finding that tagger performance on friends is sig- nificantly more correlated than would be expected by chance. We then design alternative training and test splits that are aligned with network structure, and find that test set performance decreases in this scenario, which corresponds to domain adaptation across social network communities. This speaks to the importance of covering all relevant social network communities in training data. We then consider how to address the prob- lem of language variation, by building social awareness into a recurrent neural tagging model. Our modeling approach is inspired by Yang and Eisenstein (2017), who train a mixture-of-experts for sentiment analysis, where the expert weights are computed from social network node embed- dings. But while prior work demonstrated im- provements in sentiment analysis and information extraction (Yang et al., 2016), this approach does not yield any gains on part-of-speech tagging. We conclude the paper by briefly considering possi- ble reasons for this discrepancy, and propose ap- proaches for future work in social adaptation of syntactic analysis.1 2 Data We use the corrected2 OCT27 dataset from Gim- pel et al. (2011) and Owoputi et al. (2013) as our training set, which contains part-of-speech anno- tations for 1,827 tweets sampled from Oct 27-28, 2010. We use the train and dev splits of OCT27 as our training dataset and the test split of OCT27 dataset as our validation dataset. The DAILY547 dataset from Owoputi et al. (2013) which has 547 tweets is used for evaluation. Table 2 specifies the number of tweets and tokens in each dataset. The tagset for this dataset is explained in Owoputi et al. (2013); it differs significantly from the Penn Tree- bank and Universal Dependencies tagsets. In September 2017, we extracted author IDs for each of the tweets and constructed three au- thor social networks based on the follow, mention, and retweet relations between the authors in the 1Code for rerunning the experiments is available here: https://github.com/bmurali1994/socialnets postagging 2Owoputi et al. corrected inconsistencies in the ground labeling of that/this in 100 (about 0.4%) total labels. Dataset OCT27 DAILY547 #Msg. 1,827 547 #Tok. 26,594 7,707 Table 1: Annotated datasets: number of messages and tokens Network #Authors Follow Mention Retweet 1,280 1,217 1,154 #Nodes 905,751 384,190 182,390 #Edges 1,239,358 623,754 314,381 Table 2: Statistics for each social network dataset, which we refer to as follow, mention and retweet networks in Table 2. Specifically, we use the Twitter API to crawl the friends of the OCT27 and DAILY547 users (individuals that they follow) and the most recent 3,200 tweets in their timelines. The mention and retweet links are then extracted from the tweet text and metadata. Table 2 specifies the total number of authors (whose tweets exist in our dataset) in each network, the total number of nodes and the total number of relations among these nodes. We treat all social networks as undi- rected graphs, where two users are socially con- nected if there exists at least one social relation between them. Several authors of the tweets can no longer be queried from Twitter, possibly be- cause their accounts have been deleted. They are not included in the network, but their tweets are still used for training and evaluation. 3 Linguistic Homophily The hypothesis of linguistic homophily is that socially connected individuals tend to use lan- guage similarly, as compared to randomly selected pairs of individuals who are not socially con- nected (Yang and Eisenstein, 2017). We now de- scribe two pilot studies that test this hypothesis. 3.1 Assortativity We test whether errors in POS tagging are assorta- tive on the social networks defined in the previous section: that is, if two individuals (i, j) are con- nected in the network, then a model's error on the tweets of author i suggests that the errors on the tweets of author j are more likely. To measure as- sortativity, we compute the average difference in the tagger's per-token accuracy on tweets for au- (a) Most-common-tag baseline tagger (b) Pre-trained MEMM tagger from Owoputi et al. (2013). Figure 1: Average of the squared difference in tagging accuracy on observed (red) and randomized net- works (blue). thors i and j, averaged over all connected pairs in the network. This measures whether classification errors are related on the network structure. We compare the observed assortativity against the assortativity in a network that has been ran- domly rewired. Each rewiring epoch involves a number of random rewiring operations equal to the total number of edges in the network. The edges are randomly selected, so a given edge may not be rewired in each epoch; furthermore, the degree of each node is preserved throughout. If the squared difference in accuracy is lower for the observed networks than for their rewired counterparts, this would indicate that tagger accuracy is correlated with network structure. Figure 2 explains the met- ric and rewiring briefly through an example. We compute the assortativity for three taggers: • We first use a naıve tagger, which predicts the most common tag seen during training if the word exists in the vocabulary, and oth- erwise predicts the the most common tag for an unseen word. Preprocessing of each tweet involves lowercasing, normalizing all @-mentions to h@M EN T IONi, and nor- malizing URLs and email addresses to a com- mon token (e.g. http : //bit.ly/dP 8rR8 ⇒ hU RLi). Figure 2: Toy example: differences in tagging ac- curacy on original and randomly-rewired network. • We train a lexical, feature-rich CRF model. Lexical features in the CRF model include the word, previous two words, next two words, prefixes and suffixes of the previ- ous two, current and next two words, and flags for special characters like hyphen, at- mention, hashtag, hyphen and digits in the current word. • Finally, we repeat these experiments with the pretrained maximum entropy Markov model (MEMM) tagger from (Owoputi et al., 2013), trained on OCT27 tweets. Figure 1 shows the results for the naıve tagger and the MEMM tagger; the results were similar for the CRF were similar. Tagger accuracy is well correlated with network structure in the mention and retweet graphs, consistent with the hypothe- sis of linguistic homophily. These findings sup- port prior work suggesting that "behavioral" social networks such as mentions and retweets are more meaningful than "articulated" networks like the follower graph (Huberman et al., 2008; Puniyani et al., 2010). 3.2 Clustering Next, we examine whether linguistic homophily can lead to mismatches between the test and train- ing data. We embed each author's social network position into a vector representation of dimension Dv, using the LINE method for social network node embedding (Tang et al., 2015). These em- beddings are obtained solely from the social net- work, and not from the text. We obtain Dv = 50-dimensional node embed- dings, and apply k-means clustering (Hartigan and Wong, 1979) to obtain two sets of authors (train and test). By design, the training and test sets will be in different regions of the network, so train- ing and test authors will be unlikely to be socially connected. We then train the lexical CRF tagger on the training set, and apply it to the test set. The same setup is then applied to a randomly- selected training/test split, in which the social net- work structure is ignored. This comparison is il- lustrated in Figure 3. We repeat this experiment for 10 times for all three social networks: follow, mention and retweet. The theory of linguistic homophily implies that the test set performance should be worse in the case that the test set and training sets are drawn from different parts of the network, since the lin- guistic style in the training set will not match the test data. In contrast, when the training and test sets are drawn in a manner that is agnostic to net- work structure, the training and test sets are ex- pected to be more linguistically similar, and there- fore, test set performance should be better. As shown in Table 3, the results support the theory: predictive accuracy is higher when the test and training sets are not drawn from different parts of the network. 4 Adapting to socially-linked variation In this section, we describe a neural network method that leverages social network informa- Network Network clusters Random 83.83% Follow 83.07% Mention Retweet 83.52% 82.01% 81.40% 81.01% Table 3: Comparison of tagger accuracy using network-based and random training/test splits tion to improve part-of-speech tagging. We em- ploy the Social Attention neural network architec- ture, where the system prediction is the weighted combination of the outputs of several basis mod- els (Yang and Eisenstein, 2017). We encour- age each basis model to focus on a local re- gion of the social network, so that classification on socially connected individuals employs simi- lar model combinations. This allows sharing of strength for some similar properties between these network components. In this architecture, each prediction is the weighted combination of the outputs of several basis models. Given a set of labeled instances {xi, yi} and authors {ai}, the goal of personalized probabilistic classification is to estimate a condi- tional label distribution p(y x, a). We condition on the author a by modeling the conditional label distribution as a mixture over the posterior distri- butions of K basis taggers, p(y x, a) = K X k=1 πa,k × pk(y x) (1) The basis taggers pk(y x) can be arbitrary conditional distributions. We use a hierarchical recurrent neural network model, in addition to a tag dictionary and Brown cluster surface fea- tures (Brown et al., 1992), which we describe in more detail in § 4.2. The component weighting distribution πa,k is conditioned on the social net- work G, and functions as an attentional mecha- nism, described in § 4.1. The main idea is that for a pair of authors ai and aj who are nearby in the social network G, the prediction rules should be- have similarly if the attentional distributions are similar, i.e., πai,k ≈ πaj ,k. If we have labeled training data for ai and wish to make predictions on author aj, some of the personalization from ai will be shared by aj. The overall classification ap- proach can be viewed as a mixture of experts (Ja- cobs et al., 1991), leveraging the social network Figure 3: (left) Network-aligned train/test split and (right) random train/test split as side information to choose the distribution over experts for each author. 4.1 Social Attention Model The goal of the social attention model is to assign similar basis weights to authors who are nearby in the social network G. We operationalize so- cial proximity by embedding each author's so- cial network position into a vector representation, again using the LINE method for node embed- ding (Tang et al., 2015). The resulting embeddings va are treated as fixed parameters in a probabilis- tic model over edges in the social network. These embeddings are learned solely from the social net- work G, without leveraging any textual informa- tion. The attentional weights are then computed from the embeddings using a softmax layer, πa,k = PK exp(φk · va + bk) k0 exp(φk0 · va + bk0 ) . (2) The parameters φk and bk are learned in the model. We observed that almost 50% of the au- thors in our dataset do not appear in any social network. For all these authors, we use the same embedding v0 to let the model learn the proportion weight of the individual basis models in the en- semble. This embedding v0 is also learned as a pa- rameter in the model. We have also tried comput- ing the attentional weights using a sigmoid func- tion, πa,k = σ(φk · va + bk), (3) so that πa is not normalized, but the results were quite similar. 4.2 Modeling Surface Features We use surface-level features in addition to the basis models to improve the performance of our model closer to the state-of-the-art results. Specif- ically, we use the tag dictionary features and the Brown cluster features as described by Gimpel et al. (2011). Since Brown clusters are hierarchical in a bi- nary tree, each word is associated with a tree path represented as a bitstring with length ≤ 16; we use prefixes of the bitstring as features (for all pre- fix lengths ∈ {2, 4, 6, ..., 16}). Concatenating the Brown cluster features of the previous and next to- ken along with the current token helped improve the performance of the baseline model. We also used the tag dictionary features from Gimpel et al. (2011), by adding features for a word's most frequent part-of-speech tags from Penn Treebank and Universal Dependencies. This also helped improve the performance of the base- line model. We found these surface features to be vital. Nonetheless, we were not able to match the performance of the state-of-the-art systems. 4.3 POS tagging with Hierarchical LSTMs We next describe the baseline model: pk(y x). The baseline model is a word-level bi-LSTM, with a character-level bi-LSTM to compute the embed- dings of the words (Ling et al., 2015). In addi- tion to the embeddings from the character level bi- LSTM, we also learn the word embeddings which are initialized randomly and also use fixed pre- trained GloVe Twitter (Pennington et al., 2014) embeddings for the word-level bi-LSTM. The fi- nal input to the word-level LSTM is the concate- nation of the embedding from the character level, learned word embedding and the fixed pretrained word embedding. The final hidden state for each word hi is obtained and concatenated with the sur- face features for each word sk i , and the result is passed through a fully connected neural network, i . The conditional giving a latent representation rk probability is then computed as, pk(yi = t xi) = i + ct) exp(βt · rk Pt0 exp(βt0 · rk i + ct0 ) . (4) 4.4 Loss Function and Training We train the ensemble model by minimizing the negative log likelihood of the tags for all the to- kens in all the tweets in the training dataset. Alternative objectives We have also tried train- ing the model using a hinge loss, but the results were similar and hence excluded in the paper. We also explored a variational autoencoder (VAE) framework (Kingma and Welling, 2014), in which the node embeddings were modeled with a latent vector z, which was used both to control the mix- ture weights πk, and to reconstruct the node em- beddings. Again, results were similar to those ob- tained with the simpler negative log-likelihood ob- jective. Training problems One potential problem with this framework is that after initialization, a small number of basis models may claim most of the mixture weights for all the users, while other basis models are inactive. This can occur because some basis models may be initialized with parameters that are globally superior. As a result, the "dead" basis models will receive near-zero gradient up- dates, and therefore can never improve. Care- ful initialization of the parameters φk and bk and using L2-regularization parameters of the model helped mitigate the issue to some extent. Using the attentional weights computed using the sig- moid function as described in Equation 3 does not have this problem, but the final evaluation results were quite similar to the model with attentional weights computed using softmax as mentioned in Equation 2. 5 Experiments Our evaluation focuses on the DAILY547 dataset (Owoputi et al., 2013). We train our system on the train and dev splits of the OCT27 dataset (Gimpel et al., 2011) and use the test split of OCT27 as our validation dataset and evaluate on the DAILY547 dataset. Accuracy of the tokens is our evaluation metric for the model. We compare our results to our baseline model and the state of the art results on the Twitter OCT27+Daily547 dataset. 5.1 Experimental Settings We use 100-dimensional pretrained Twitter GloVe embeddings (Pennington et al., 2014) which are System Owoputi et. al. BiLSTM tagger Ensemble of BiLSTM taggers BiLSTM taggers with social attention Accuracy 92.80% 90.50% 90.11% 89.80% Table 4: Accuracy of the models on the DAILY547 dataset. The best results are in bold. Network Accuracy 89.42% Follow Mention 89.80% 89.65% Retweet Table 5: Accuracy of the social attention model, across each of the three networks. trained on about two billion tweets. We use one- layer for both the character-level and the word- level bi-LSTM model with hidden state sizes of 50 and 150 dimensions respectively. The dimensions of character embeddings is set to be 30 and the learned word embeddings is 50. We use tanh acti- vation functions all throughout the model and use Xavier initialization (Glorot and Bengio, 2010) for the parameters. The model is trained with ADAM optimizer (Kingma and Ba, 2014) on L2- regularized negative log-likelihood. The regular- ization strength was set to 0.01, and the dropout was set to 0.35. The best hyper-parameters for the number of basis classifiers is K = 3 for the follow and mention networks, and K = 4 for the retweet network. 5.2 Results and Discussion Table 4 summarizes the main empirical findings, where we report results from author embeddings trained on the mention network for Social Atten- tion. The results of different social networks with Social Attention is shown in Table 5. We also evaluate the performance of the trained Social Attention model on the subset of authors who can be located in the social network. The ac- curacy on these authors is similar to the overall performance on the full dataset. We also observe the attention distributions of the authors in the so- cial network on the basis models in the ensemble. For every pair of authors ai and aj connected in the social network we compute Σkπai,k − πaj ,k and average it across all pairs in the network. This Network Actual Network Random Follow Mention Retweet 1.10 1.06 0.68 0.90 0.38 0.36 Table 6: Comparison of the mean absolute dif- ference in attention distributions of connected au- thors in actual social networks versus randomly rewired networks. is compared with against a randomly rewired net- work. If this value is lower for the social net- work, then this indicates that the connected au- thors tend to have similar attentional distributions as explained in § 4. The results are presented in Table 6. These results clearly indicate that the au- thors who are connected in the social network tend to have similar attentional distributions. While the analyses in § 3 indicated a strong de- gree of linguistic homophily, we do not observe any significant gain in performance. We think the following factors played an important role: Missing authors. There are a large number of missing authors in each of the social network (about 50% of the authors of the tweets in the dataset). The results from combining all the three social networks by just concatenat- ing this embeddings did not help either in our experiments. Tweets per author. We have only one tweet for every author in our dataset and this makes it harder for the model to extract relations be- tween authors and their tweets. Dataset size. The dataset contains only 2374 tweets, which could be the reason our deep learning model is still behind the feature-rich Markov Model of Owoputi et al. (2013) by about 2%. Sparse social networks. The social networks that we constructed using the twitter IDs from the tweet metadata of the OCT27 and DAILY547 datasets were very sparse, and the node degree distributions (number of edges per node) have high variance. 6 Related Work Previous problems on incorporating social rela- tions have focused on sentiment analysis and en- tity linking, where the existence of social relations between users is considered as a clue that the sen- timent polarities in the messages from the users should be similar or the entities that they refer to in their messages are the same. Speriosu et al. (2011) constructs a heterogeneous network with tweets, users, and n-grams as nodes, and the senti- ment label distributions associated with the nodes are refined by performing label propagation over social relations. Tan et al. (2011) and Hu et al. (2013) leverage social relations for sentiment anal- ysis by exploiting a factor graph model and the graph Laplacian technique respectively, so that the tweets belonging to social connected users share similar label distributions. Yang et al. (2016) pro- posed a neural based structured learning architec- ture for tweet entity linking, leveraging the ten- dency of socially linked individuals to share simi- lar interests on named entities - the phenomenon of entity homophily. Yang and Eisenstein (2017) proposed a middle ground between group-level demographic characteristics and personalization, by exploiting social network structure. We extend this work by applying it for the first time to syn- tactic analysis. 7 Conclusion This paper describes the hypothesis of linguistic homophily specifically linked to stylistic variation on social media data and tests the effectiveness of social attention to overcome language varia- tion, leveraging the tendency of socially proxi- mate individuals to use language similarly for POS tagging. While our preliminary analyses demon- strate a strong correlation between tagging accu- racy and network structure, we are unable to lever- age these correlations for improvements in tagging accuracy. How should we reconcile these conflicting re- sults? In the limit of infinite resources, we could train separate taggers for separate treebanks, fea- turing each language variety. But even if language variation is strongly associated with the network structure, the effectiveness of this approach would still be limited by the inherent difficulty of tagging each language variety. In other words, augment- ing the tagger with social network metadata may not help much, because some parts of the network may simply be harder to tag than others. However, this pessimistic conclusion must be offset by not- ing the small size of existing annotated datasets for social media writing, which are orders of magni- tude smaller than comparable corpora of newstext. While some online varieties maybe hard to tag well, it is equally possible that the advantages of more flexible modeling frameworks only become visible when there is sufficient data to accurately estimate them. We are particularly interested to explore the utility of semi-supervised techniques for training such models in future work. References Faiyaz Al Zamal, Wendy Liu, and Derek Ruths. 2012. Homophily and latent attribute inference: Inferring latent attributes of Twitter users from neighbors. In Proceedings of the International Conference on Web and Social Media (ICWSM). pages 387–390. Timothy Baldwin, Paul Cook, Marco Lui, Andrew MacKinlay, and Li Wang. 2013. How noisy social media text, how diffrnt social media sources. In Pro- ceedings of the 6th International Joint Conference on Natural Language Processing (IJCNLP 2013). pages 356–364. Peter F Brown, Peter V Desouza, Robert L Mercer, Vincent J Della Pietra, and Jenifer C Lai. 1992. Class-based n-gram models of natural language. Computational linguistics 18(4):467–479. Robin Dodsworth. 2017. Migration and dialect con- tact. Annual Review of Linguistics 3(1):331–346. P. Eckert and S. McConnell-Ginet. 2003. Language and Gender. Cambridge Textbooks in Linguistics. Cambridge University Press. Jacob Eisenstein. 2013. What to do about bad language on the internet. In Proceedings of the North Amer- ican Chapter of the Association for Computational Linguistics (NAACL). pages 359–369. Jacob Eisenstein, Brendan O'Connor, Noah A. Smith, and Eric P. Xing. 2010. A latent variable model for geographic lexical variation. In Proceedings of Em- pirical Methods for Natural Language Processing (EMNLP). pages 1277–1287. W Francis and Henry Kucera. 1982. Frequency analy- sis of English usage. Houghton Mifflin Company. Kevin Gimpel, Nathan Schneider, Brendan O'Connor, Dipanjan Das, Daniel Mills, Jacob Eisenstein, Michael Heilman, Dani Yogatama, Jeffrey Flanigan, and Noah A Smith. 2011. Part-of-speech tagging for twitter: Annotation, features, and experiments. ACL pages 42–47. Xavier Glorot and Yoshua Bengio. 2010. Understand- ing the difficulty of training deep feedforward neural networks. In Yee Whye Teh and Mike Titterington, editors, Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics. PMLR, Chia Laguna Resort, Sardinia, Italy, vol- ume 9 of Proceedings of Machine Learning Re- search, pages 249–256. L.J. Green. 2002. African American English: A Lin- guistic Introduction. Cambridge University Press. J. A. Hartigan and M. A. Wong. 1979. A k-means JSTOR: Applied Statistics clustering algorithm. 28(1):100–108. Dirk Hovy. 2015. Demographic factors improve clas- sification performance. ACL pages 752–762. Xia Hu, Lei Tang, Jiliang Tang, and Huan Liu. 2013. Exploiting social relations for sentiment analysis in microblogging. In Proceedings of the Sixth ACM International Conference on Web Search and Data Mining. ACM, New York, NY, USA, WSDM '13, pages 537–546. Bernardo A. Huberman, Daniel M. Romero, and Fang Wu. 2008. Social networks that matter: Twitter un- der the microscope. CoRR abs/0812.1045. Robert A. Jacobs, Michael I. Jordan, Steven J. Nowlan, and Geoffrey E. Hinton. 1991. Adaptive mixtures of local experts. Neural Comput. 3(1):79–87. Diederik P. Kingma and Jimmy Ba. 2014. Adam: CoRR A method for stochastic optimization. abs/1412.6980. Diederik P Kingma and Max Welling. 2014. Auto- encoding variational bayes. In Proceedings of the International Conference on Learning Representa- tions (ICLR). Wang Ling, Chris Dyer, Alan W Black, Isabel Tran- coso, Ramon Fermandez, Silvio Amir, Luis Marujo, and Tiago Luis. 2015. Finding function in form: Compositional character models for open vocab- ulary word representation. Proceedings of Em- pirical Methods for Natural Language Processing (EMNLP) pages 1520–1530. Mitchell P. Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. 1993. Building a large annotated corpus of English: The Penn Treebank. Computa- tional Linguistics 19(2):313–330. Miller McPherson, Lynn Smith-Lovin, and James M Cook. 2001. Birds of a feather: Homophily in social networks. Annual review of sociology 27(1):415– 444. Lesley Milroy. 1991. Language and Social Networks. Wiley-Blackwell, 2 edition. Olutobi Owoputi, Brendan O'Connor, Chris Dyer, Kevin Gimpel, Nathan Schneider, and Noah A Smith. 2013. Improved part-of-speech tagging for online conversational text with word clusters. Pro- ceedings of North American Association for Compu- tational Linguistics (NAACL) . Jeffrey Pennington, Richard Socher, and Christo- pher D. Manning. 2014. Glove: Global vectors for word representation. In Proceedings of Em- pirical Methods for Natural Language Processing (EMNLP). pages 1532–1543. Kriti Puniyani, Jacob Eisenstein, Shay Cohen, and Eric P. Xing. 2010. Social links from latent topics in microblogs. In Proceedings of NAACL Workshop on Social Media. Los Angeles. Alan Ritter, Colin Cherry, and Bill Dolan. 2010. Un- supervised modeling of twitter conversations. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics. Associ- ation for Computational Linguistics, Stroudsburg, PA, USA, HLT '10, pages 172–180. Sara Rosenthal and Kathleen McKeown. 2011. Age prediction in blogs: A study of style, content, and online behavior in pre-and post-social media genera- tions. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Hu- man Language Technologies-Volume 1. Association for Computational Linguistics, pages 763–772. Michael Speriosu, Nikita Sudan, Sid Upadhyay, and Ja- son Baldridge. 2011. Twitter polarity classification with label propagation over lexical links and the fol- lower graph. In Proceedings of the First Workshop on Unsupervised Learning in NLP. Association for Computational Linguistics, Stroudsburg, PA, USA, EMNLP '11, pages 53–63. Chenhao Tan, Lillian Lee, Jie Tang, Long Jiang, Ming Zhou, and Ping Li. 2011. User-level sentiment anal- ysis incorporating social networks. In Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, New York, NY, USA, KDD '11, pages 1397–1405. Jian Tang, Meng Qu, Mingzhe Wang, Ming Zhang, Jun Yan, and Qiaozhu Mei. 2015. Line: Large-scale in- formation network embedding. In WWW. ACM. Peter Trudgill. 1974. Linguistic change and diffusion: description and explanation in sociolinguistic dialect geography. Language in Society 3(2):215246. Walt Wolfram and Natalie Schilling-Estes. 2005. American English: dialects and variation. Wiley- Blackwell, second edition. Yi Yang, Ming-Wei Chang, and Jacob Eisenstein. 2016. Toward socially-infused information extrac- tion: Embedding authors, mentions, and entities. In Proceedings of Empirical Methods for Natural Lan- guage Processing (EMNLP). Yi Yang and Jacob Eisenstein. 2017. Overcoming lan- guage variation in sentiment analysis with social at- tention. Transactions of the Association for Compu- tational Linguistics (TACL) 5.
1909.09524
1
1909
2019-09-20T14:16:27
Pivot-based Transfer Learning for Neural Machine Translation between Non-English Languages
[ "cs.CL", "cs.LG" ]
We present effective pre-training strategies for neural machine translation (NMT) using parallel corpora involving a pivot language, i.e., source-pivot and pivot-target, leading to a significant improvement in source-target translation. We propose three methods to increase the relation among source, pivot, and target languages in the pre-training: 1) step-wise training of a single model for different language pairs, 2) additional adapter component to smoothly connect pre-trained encoder and decoder, and 3) cross-lingual encoder training via autoencoding of the pivot language. Our methods greatly outperform multilingual models up to +2.6% BLEU in WMT 2019 French-German and German-Czech tasks. We show that our improvements are valid also in zero-shot/zero-resource scenarios.
cs.CL
cs
Pivot-based Transfer Learning for Neural Machine Translation between Non-English Languages Yunsu Kim1∗ Petre Petrov1,2∗ Pavel Petrushkov2 Shahram Khadivi2 Hermann Ney1 1RWTH Aachen University, Aachen, Germany {surname}@cs.rwth-aachen.de {petrpetrov,ppetrushkov,skhadivi}@ebay.com 2eBay, Inc., Aachen, Germany 9 1 0 2 p e S 0 2 ] L C . s c [ 1 v 4 2 5 9 0 . 9 0 9 1 : v i X r a Abstract We present effective pre-training strategies for neural machine translation (NMT) using parallel corpora involving a pivot language, i.e., source-pivot and pivot-target, leading to a significant improvement in source→target translation. We propose three methods to increase the relation among source, pivot, and target languages in the pre-training: 1) step-wise training of a single model for different language pairs, 2) additional adapter component to smoothly connect pre-trained encoder and decoder, and 3) cross-lingual encoder the pivot language. Our methods greatly out- perform multilingual models up to +2.6% BLEU in WMT 2019 French→German and German→Czech tasks. We show that our improvements are valid also in zero-shot/zero- resource scenarios. training via autoencoding of i.e., Introduction 1 Machine translation (MT) research is biased to- wards language pairs including English due to the ease of collecting parallel corpora. Trans- lation between non-English languages, e.g., French→German, is usually done with pivot- ing through English, translating French (source) input to English (pivot) first with a French→English model which is later translated to German (target) with a English→German model (De Gispert and Marino, 2006; Utiyama and Isahara, 2007; Wu and Wang, 2007). How- ever, pivoting requires doubled decoding time and the translation errors are propagated or expanded via the two-step process. Therefore, it is more beneficial to build a sin- gle source→target model directly for both effi- ciency and adequacy. Since non-English language ∗ Equal contribution. pairs often have little or no parallel text, common choices to avoid pivoting in NMT are generating pivot-based synthetic data (Bertoldi et al., 2008; Chen et al., 2017) or training multilingual systems (Firat et al., 2016; Johnson et al., 2017). In this work, we present novel transfer learn- ing techniques to effectively train a single, di- rect NMT model for a non-English language pair. We pre-train NMT models for source→pivot and pivot→target, which are transferred to a source→target model. To optimize the usage of given source-pivot and pivot-target parallel data for the source→target direction, we devise the fol- lowing techniques to smooth the discrepancy be- tween the pre-trained and final models: • Step-wise pre-training with careful parameter freezing. • Additional adapter component to familiarize the pre-trained decoder with the outputs of the pre-trained encoder. • Cross-lingual encoder pre-training with au- toencoding of the pivot language. Our methods are evaluated in two non-English language pairs of WMT 2019 news translation tasks: high-resource (French→German) and low- resource (German→Czech). We show that NMT models pre-trained with our methods are highly ef- fective in various data conditions, when fine-tuned for source→target with: • Real parallel corpus • Pivot-based synthetic parallel corpus (zero- resource) • None (zero-shot) For each data condition, we consistently outper- form strong baselines, e.g., multilingual, pivoting, or teacher-student, showing the universal effec- tiveness of our transfer learning schemes. The rest of the paper is organized as follows. We first review important previous works on pivot- based MT in Section 2. Our three pre-training techniques are presented in Section 3. Section 4 shows main results of our methods with a detailed description of the experimental setups. Section 5 studies variants of our methods and reports the results without source-target parallel resources or with large synthetic parallel data. Section 6 draws conclusion of this work with future research direc- tions. 2 Related Work In this section, we first review existing approaches to leverage a pivot language in low-resource/zero- resource MT. They can be divided into three cate- gories: 1. Pivot translation (pivoting). The most naive approach is reusing (already trained) source→pivot and pivot→target models di- rectly, decoding twice via the pivot language (Kauers et al., 2002; De Gispert and Marino, 2006). One can keep N-best hypotheses in the pivot language to reduce the prediction bias (Utiyama and Isahara, 2007) and im- prove the final translation by system combi- nation (Costa-Juss`a et al., 2011), which how- ever increases the translation time even more. In multilingual NMT, Firat et al. (2016) mod- ify the second translation step (pivot→target) to use source and pivot language sentences together as the input. 2. Pivot-based synthetic parallel data. We may translate the pivot side of given pivot- target parallel data using a pivot→source model (Bertoldi et al., 2008), or the other way around translating source-pivot data using a pivot→target model (De Gispert and Marino, 2006). For NMT, the former is extended by Zheng et al. (2017) to compute the expec- tation over synthetic source sentences. The latter is also called teacher-student approach (Chen et al., 2017), where the pivot→target model (teacher) produces target hypotheses for training the source→target model (stu- dent). 3. Pivot-based model training. In phrase- there have been many ef- based MT, forts to combine phrase/word level fea- tures of source-pivot and pivot-target into a source→target system (Utiyama and Isa- hara, 2007; Wu and Wang, 2007; Bakhshaei et al., 2010; Zahabi et al., 2013; Zhu et al., 2014; Miura et al., 2015). In NMT, Cheng et al. (2017) jointly train for three transla- tion directions of source-pivot-target by shar- ing network components, where Ren et al. (2018) use the expectation-maximization al- gorithm with the target sentence as a latent variable. Lu et al. (2018) deploy intermedi- ate recurrent layers which are common for multiple encoders and decoders, while John- son et al. (2017) share all components of a single multilingual model. Both methods train the model for language pairs involv- ing English but enable zero-shot translation for unseen non-English language pairs. For this, Ha et al. (2017) encode the target lan- guage as an additional embedding and filter out non-target tokens in the output. Lakew et al. (2017) combine the multilingual train- ing with synthetic data generation to improve the zero-shot performance iteratively, where Sestorain et al. (2018) applies the NMT pre- diction score and a language model score to each synthetic example as gradient weights. Our work is based on transfer learning (Zoph et al., 2016) and belongs to the third category: model training. On the contrary to the multilingual joint training, we suggest two distinct steps: pre- training (with source-pivot and pivot-target data) and fine-tuning (with source-target data). With our proposed methods, we prevent the model from los- ing its capacity to other languages while utilizing the information from related language pairs well, as shown in the experiments (Section 4). Our pivot adapter (Section 3.2) shares the same motivation with the interlingua component of Lu et al. (2018), but is much compact, independent of variable input length, and easy to train offline. The adapter training algorithm is adopted from bilingual word embedding mapping (Xing et al., 2015). Our cross-lingual encoder (Section 3.3) is inspired by cross-lingual sentence embedding al- gorithms using NMT (Schwenk and Douze, 2017; Schwenk, 2018). Transfer learning was first introduced to NMT by Zoph et al. (2016), where only the source language is switched before/after the transfer. Nguyen and Chiang (2017) and Kocmi and Bojar (2018) use shared subword vocabularies to work Figure 1: Plain transfer learning. Figure 2: Step-wise pre-training. with more languages and help target language switches. Kim et al. (2019) propose additional techniques to enable NMT transfer even without shared vocabularies. To the best of our knowl- edge, we are the first to propose transfer learn- ing strategies specialized in utilizing a pivot lan- guage, transferring a source encoder and a target decoder at the same time. Also, for the first time, we present successful zero-shot translation results only with pivot-based NMT pre-training. 3 Pivot-based Transfer Learning Our methods are based on a simple transfer learn- ing principle for NMT, adjusted to a usual data condition for non-English language pairs: lots of source-pivot and pivot-target parallel data, little (low-resource) or no (zero-resource) source-target parallel data. Here are the core steps of the plain transfer (Figure 1): 1. Pre-train a source-pivot source→pivot model with a a pivot→target model with a pivot-target parallel corpus. and parallel corpus 2. Initialize the source→target model with the source encoder from the pre-trained source→pivot model and the target decoder from the pre-trained pivot→target model. 3. Continue the training with a source-target parallel corpus. If we skip the last step (for zero-resource cases) and perform the source→target translation di- rectly, it corresponds to zero-shot translation. Thanks to the pivot language, we can pre-train a source encoder and a target decoder without changing the model architecture or training objec- tive for NMT. On the contrary to other NMT trans- fer scenarios (Zoph et al., 2016; Nguyen and Chi- ang, 2017; Kocmi and Bojar, 2018), this principle has no language mismatch between transferor and transferee on each source/target side. Experimen- tal results (Section 4) also show its competitive- ness despite its simplicity. Nonetheless, the main caveat of this basic pre- training is that the source encoder is trained to be used by an English decoder, while the target de- coder is trained to use the outputs of an English encoder -- not of a source encoder. In the follow- ing, we propose three techniques to mitigate the inconsistency of source→pivot and pivot→target pre-training stages. Note that these techniques are not exclusive and some of them can complement others for a better performance of the final model. 3.1 Step-wise Pre-training A simple remedy to make the pre-trained encoder and decoder refer to each other is to train a single NMT model for source→pivot and pivot→target in consecutive steps (Figure 2): 1. Train a source→pivot model with a source- pivot parallel corpus. 2. Continue the training with a pivot-target par- allel corpus, while freezing the encoder pa- rameters of 1. In the second step, a target decoder is trained to use the outputs of the pre-trained source encoder as its input. Freezing the pre-trained encoder en- sures that, even after the second step, the encoder is still modeling the source language although we train the NMT model for pivot→target. Without the freezing, the encoder completely adapts to the pivot language input and is likely to forget source language sentences. We build a joint vocabulary of the source and pivot languages so that the encoder effectively rep- resents both languages. The frozen encoder is pre- trained for the source language in the first step, but also able to encode a pivot language sentence in a similar representation space. It is more ef- fective for linguistically similar languages where Pre-trainFinal ModelSourceEncoderPivotDecoderSourceEncoderTargetDecoderCopyParametersPre-trainPivotEncoderTargetDecoderCopyParametersPre-train 1Pre-train 2SourceEncoderPivotDecoderPivotEncoder(Frozen)TargetDecoderCopyParametersFinal ModelSourceEncoderTargetDecoderCopyParametersCopyParameters Figure 3: Pivot adapter. many tokens are common for both languages in the joint vocabulary. 3.2 Pivot Adapter Instead of the step-wise pre-training, we can also postprocess the network to enhance the connec- tion between the source encoder and the target de- coder which are pre-trained individually. Our idea is that, after the pre-training steps, we adapt the source encoder outputs to the pivot encoder out- puts to which the target decoder is more familiar (Figure 3). We learn a linear mapping between the two representation spaces with a small source- pivot parallel corpus: 1. Encode the source sentences with the source the pre-trained source→pivot encoder of model. 2. Encode the pivot sentences with the pivot en- coder of the pre-trained pivot→target model. 3. Apply a pooling to each sentence of 1 and 2, extracting representation vectors for each sentence pair: (s, p). 4. Train a mapping M ∈ Rd×d to minimize the distance between the pooled representations s ∈ Rd×1 and p ∈ Rd×1, where the source representation is first fed to the mapping: (cid:88) M = argmin (cid:107)Ms − p(cid:107)2 (1) M s,p where d is the hidden layer size of the encoders. Introducing matrix notations S ∈ Rd×n and P ∈ Rd×n, which concatenate the pooled representa- tions of all n sentences for each side in the source- pivot corpus, we rewrite Equation 1 as: (cid:107)MS − P(cid:107)2 M = argmin (2) M Figure 4: Cross-lingual encoder. which can be easily computed by the singular value decomposition (SVD) for a closed-form so- lution, if we put an orthogonality constraint on M (Xing et al., 2015). The resulting optimization is also called Procrustes problem. The learned mapping is multiplied to encoder outputs of all positions in the final source→target tuning step. With this mapping, the source en- coder emits sentence representations that lie in a similar space of the pivot encoder. Since the tar- get decoder is pre-trained for pivot→target and ac- customed to receive the pivot encoder outputs, it should process the mapped encoder outputs better than the original source encoder outputs. 3.3 Cross-lingual Encoder As a third technique, we modify the source→pivot pre-training procedure to force the encoder to have cross-linguality over source and pivot languages; modeling source and pivot sentences in the same mathematical space. We achieve this by an ad- ditional autoencoding objective from a pivot sen- tence to the same pivot sentence (Figure 4). The encoder is fed with sentences of both source and pivot languages, which are processed by a shared decoder that outputs only the pivot language. In this way, the encoder is learned to produce representations in a shared space regard- less of the input language, since they are used in the same decoder. This cross-lingual space facili- tates smoother learning of the final source→target model, because the decoder is pre-trained to trans- late the pivot language. The same input/output in autoencoding encour- ages, however, merely copying the input; it is said to be not proper for learning complex structure of the data domain (Vincent et al., 2008). Denoising autoencoder addresses this by corrupting the in- put sentences by artificial noises (Hill et al., 2016). Learning to reconstruct clean sentences, it encodes linguistic structures of natural language sentences, e.g., word order, better than copying. Here are the Pre-trainFinal ModelSourceEncoderPivotDecoderSourceEncoderTargetDecoderCopyParametersPre-trainPivotEncoderTargetDecoderCopyParametersSource→PivotAdapterTrainTrainPre-trainFinal ModelPivotDecoderSourceEncoderTargetDecoderCopyParametersPre-trainPivotEncoderTargetDecoderCopyParametersSource/PivotEncoderSourcePivotPivotPivot noise types we use (Edunov et al., 2018): • Drop tokens randomly with a probability pdel • Replace tokens with a <BLANK> token ran- domly with a probability prep • Permute the token positions randomly so that the difference between an original index and its new index is less than or equal to dper We set pdel = 0.1, prep = 0.1, and dper = 3 in our experiments. The key idea of all three methods is to build a closer connection between the pre-trained encoder and decoder via a pivot language. The differ- ence is in when we do this job: Cross-lingual encoder (Section 3.3) changes the encoder pre- training stage (source→pivot), while step-wise pre-training (Section 3.1) modifies decoder pre- training stage (pivot→target). Pivot adapter (Sec- tion 3.2) is applied after all pre-training steps. 4 Main Results We evaluate the proposed transfer learning tech- niques in two non-English language pairs of WMT 2019 news translation tasks1: French→German and German→Czech. Data We used the News Commentary v14 par- allel corpus and newstest2008-2010 test sets as the source-target training data for both tasks. The newstest sets were oversampled four times. The German→Czech task was originally limited to unsupervised learning (using only monolin- gual corpora) in WMT 2019, but we relaxed this constraint by the available parallel data. We used newstest2011 as a validation set and new- stest2012/newstest2013 as the test sets. Both language pairs have much abundant paral- lel data in source-pivot and pivot-target with En- glish as the pivot language. Detailed corpus statis- tics are given in Table 1. Preprocessing We used the Moses2 tokenizer and applied true-casing on all corpora. For all transfer learning setups, we learned byte pair en- coding (BPE) (Sennrich et al., 2016) for each lan- guage individually with 32k merge operations, ex- cept for cross-lingual encoder training with joint BPE only over source and pivot languages. This 1http://www.statmt.org/wmt19/translation-task. html 2http://www.statmt.org/moses/ Usage Data Sentences Pre-train Fine-tune Pre-train Fine-tune fr-en en-de fr-de de-en en-cs de-cs 35M 9.1M 270k 9.1M 49M 230k Words (Source) 950M 170M 6.9M 181M 658M 5.1M Table 1: Parallel training data statistics. is for modularity of pre-trained models: for ex- ample, a French→English model trained with joint French/English/German BPE could be trans- ferred smoothly to a French→German model, but would not be optimal for a transfer to e.g., a French→Korean model. Once we pre-train an NMT model with separate BPE vocabularies, we can reuse it for various final language pairs with- out wasting unused portion of subword vocabu- laries (e.g., German-specific tokens in building a French→Korean model). On the contrary, baselines used joint BPE over all languages with also 32k merges. Model and Training The 6-layer base Trans- former architecture (Vaswani et al., 2017) was used for all of our experiments. Batch size was set to 4,096 tokens. Each checkpoint amounts to 10k updates for pre-training and 20k updates for fine-tuning. Each model was optimized with Adam (Kingma and Ba, 2014) with an initial learning rate of 0.0001, which was multiplied by 0.7 whenever perplexity on the validation set was not improved for three checkpoints. When it was not improved for eight checkpoints, we stopped the training. The NMT model training and transfer were done with the OPENNMT toolkit (Klein et al., 2017). Pivot adapter was trained using the MUSE toolkit (Conneau et al., 2018), which was orig- inally developed for bilingual word embeddings but we adjusted for matching sentence represen- tations. Baselines We thoroughly compare our ap- proaches to the following baselines: 1. Direct source→target: A standard NMT model trained on given source→target paral- French→German German→Czech newstest2012 newstest2013 newstest2012 newstest2013 BLEU [%] TER [%] BLEU [%] TER [%] BLEU [%] TER [%] BLEU [%] TER [%] 77.7 73.2 75.8 70.9 70.3 71.4 70.8 70.9 69.9 11.1 14.9 13.1 15.4 15.9 15.0 15.6 15.6 16.2 81.1 76.6 79.6 75.4 75.0 75.9 75.3 75.0 74.6 12.8 16.5 14.6 18.0 18.7 17.6 18.1 18.1 19.1 14.8 18.7 18.3 17.5 18.0 17.4 17.8 18.6 19.5 75.1 71.9 71.7 72.3 71.9 72.1 72.3 70.7 69.8 16.0 19.5 19.2 18.7 19.1 18.9 19.1 19.9 20.7 75.1 72.6 71.5 71.8 71.1 71.8 71.5 70.4 69.4 Direct source→target Multilingual many-to-many Multilingual many-to-one Plain transfer + Pivot adapter + Cross-lingual encoder + Pivot adapter Step-wise pre-training + Cross-lingual encoder Table 2: Main results fine-tuned with source-target parallel data. lel data. 2. Multilingual: A single, shared NMT model for multiple translation directions (Johnson et al., 2017). • Many-to-many: Trained for all possi- ble directions among source, target, and pivot languages. • Many-to-one: Trained for only the directions i.e., source→target and pivot→target, which tends to work better than many-to-many systems (Aharoni et al., 2019). to target language, In Table 2, we report principal results after fine- tuning the pre-trained models using source-target parallel data. As for baselines, multilingual models are bet- ter than a direct NMT model. The many-to-many models surpass the many-to-one models; since both tasks are in a low-resource setup, the model gains a lot from related language pairs even if the target languages do not match. Plain transfer of pre-trained encoder/decoder without additional techniques (Figure 1) shows a nice improvement over the direct baseline: up to +2.7% BLEU for French→German and +5.2% BLEU for German→Czech. Pivot adapter pro- vides an additional boost of maximum +0.7% BLEU or -0.7% TER. Cross-lingual encoder pre-training is proved to be not effective in the plain transfer setup. It shows no improvements over plain transfer in French→German, and 0.4% BLEU worse perfor- mance in German→Czech. We conjecture that the cross-lingual encoder needs a lot more data to be fine-tuned for another decoder, where the en- coder capacity is basically divided into two lan- guages at the beginning of the fine-tuning. On the other hand, the pivot adapter directly improves the connection to an individually pre-trained decoder, which works nicely with small fine-tuning data. Pivot adapter gives an additional improvement on top of the cross-lingual encoder; up to +0.4% BLEU in French→German and +0.6% BLEU in German→Czech. In this case, we extract source and pivot sentence representations from the same shared encoder for training the adapter. Step-wise pre-training gives a big improve- ment up to +1.2% BLEU or -1.6% TER against plain transfer in French→German. It shows the best performance in both tasks when combined with the cross-lingual encoder: up to +1.2% BLEU in French→German and +2.6% BLEU in German→Czech, compared to the multilingual baseline. Step-wise pre-training prevents the cross-lingual encoder from degeneration, since the pivot→target pre-training (Step 2 in Section 3.1) also learns the encoder-decoder connection with a large amount of data -- in addition to the source→target tuning step afterwards. Note that the pivot adapter, which inserts an ex- tra layer between the encoder and decoder, is not appropriate after the step-wise pre-training; the decoder is already trained to correlate well with the pre-trained encoder. We experimented with the pivot adapter on top of step-wise pre-trained mod- els -- with or without cross-lingual encoder -- but obtained detrimental results. Compared to pivot translation (Table 5), our best results are also clearly better in French →German and comparable in German→Czech. 5 Analysis In this section, we conduct ablation studies on the variants of our methods and see how they perform in different data conditions. 5.1 Pivot Adapter newstest2013 Adapter Training BLEU [%] TER [%] 70.7 70.5 70.3 Average-pooled 18.2 18.4 18.7 None Max-pooled Plain transfer 18.0 70.9 Table 3: Pivot adapter variations (German→Czech). All results are tuned with source-target parallel data. Firstly, we compare variants of the pivot adapter (Section 3.2) in Table 3. The row "None" shows that a randomly initialized linear layer already guides the pre-trained encoder/decoder to harmo- nize with each other. Of course, when we train the adapter to map source encoder outputs to pivot encoder outputs, the performance gets bet- ter. For compressing encoder outputs over posi- tions, average-pooling is better than max-pooling. We observed the same trend in the other test set and in French→German. We also tested nonlinear pivot adapter, e.g., a 2- layer feedforward network with ReLU activations, but the performance was not better than just a lin- ear adapter. 5.2 Cross-lingual Encoder Trained on Monolingual Pivot side of parallel newstest2013 Input BLEU [%] TER [%] Clean 77.7 73.6 Noisy 77.3 Clean 72.7 Noisy 15.7 17.5 15.9 18.0 Table 4: Cross-lingual encoder variations (French→ German). All results are in the zero-shot setting with step-wise pre-training. Table 4 verifies that the noisy input in autoen- coding is indeed beneficial to our cross-lingual encoder. It improves the final translation perfor- mance by maximum +2.1% BLEU, compared to using the copying autoencoding objective. As the training data for autoencoding, we also compare between purely monolingual data and the pivot side of the source-pivot parallel data. By the latter, one can expect a stronger signal for a joint encoder representation space, since two dif- ferent inputs (in source/pivot languages) are used to produce the exactly same output sentence (in pivot language). The results also tell that there are slight but consistent improvements by using the pivot part of the parallel data. Again, we performed these comparisons in the other test set and German→Czech, observing the same tendency in results. 5.3 Zero-resource/Zero-shot Scenarios If we do not have an access to any source- target parallel data (zero-resource), non-English language pairs have two options for still building a working NMT system, given source-English and target-English parallel data: • Zero-shot: Perform source→target transla- tion using models which have not seen any source-target parallel sentences, e.g., multi- lingual models or pivoting (Section 2.1). • Pivot-based synthetic data: Generate syn- thetic source-target parallel data using source↔English and target↔English models (Section 2.2). Use this data to train a model for source→target. Table 5 shows how our pre-trained models perform in zero-resource scenarios with the two options. Note that, unlike Table 2, the mul- tilingual baselines exclude source→target and target→source directions. First of all, plain trans- fer, where the encoder and the decoder are pre- trained separately, is poor in zero-shot scenarios. It simply fails to connect different representation spaces of the pre-trained encoder and decoder. In our experiments, neither pivot adapter nor cross- lingual encoder could enhance the zero-shot trans- lation of plain transfer. Step-wise pre-training solves this problem by changing the decoder pre-training to familiarize itself with representations from an already pre- trained encoder. It achieves zero-shot performance of 11.5% BLEU in French→German and 6.5% BLEU in German→Czech (newstest2013), while French→German German→Czech newstest2012 newstest2013 newstest2012 newstest2013 BLEU [%] TER [%] BLEU [%] TER [%] BLEU [%] TER [%] BLEU [%] TER [%] 99.8 70.1 70.9 79.1 72.4 70.3 74.5 75.0 5.9 16.4 16.0 0.1 6.0 14.1 16.5 - - 92.1 76.8 74.6 6.3 19.5 18.5 0.1 6.5 16.5 19.1 - 87.8 73.5 70.2 Multilingual many-to-many Pivot translation Teacher-student Plain transfer Step-wise pre-training + Cross-lingual encoder + Teacher-student 14.1 16.6 18.7 0.1 11.0 17.3 19.3 14.6 17.9 20.7 0.2 11.5 18.0 20.9 79.1 72.5 69.5 - 82.5 72.7 69.3 - 81.6 72.1 69.7 Table 5: Zero-resource results. Except those with the teacher-student, the results are all in the zero-shot setting, i.e., the model is not trained on any source-target parallel data. '-' indicates a TER score over 100%. showing comparable or better fine-tuned perfor- mance against plain transfer (see also Table 2). the data size of pivot-target With the pre-trained cross-lingual encoder, the zero-shot performance of step-wise pre- training is superior to that of pivot translation in French→German with only a single model. It is worse than pivot translation in German→Czech. We think that is critical in pivot translation; relatively huge data for English→Czech make the pivot translation stronger. Note again that, nevertheless, pivoting (second row) is very poor in efficiency since it per- forms decoding twice with the individual models. For the second option (pivot-based synthetic the data), we compare our methods against sentence-level beam search version of the teacher- student framework (Chen et al., 2017), with which we generated 10M synthetic parallel sentence pairs. We also tried other variants of Chen et al. (2017), e.g., N-best hypotheses with weights, but there were no consistent improvements. Due to enormous bilingual signals, the model trained with the teacher-student synthetic data out- performs pivot translation. If tuned with the same synthetic data, our pre-trained model performs even better (last row), achieving the best zero- resource results on three of the four test sets. We also evaluate our best German→Czech zero-resource model on newstest2019 and com- pare it with the participants of the WMT 2019 unsupervised news translation task. Ours yield 17.2% BLEU, which is much better than the best single unsupervised system of the winner of the task (15.5%) (Marie et al., 2019). We argue that, if one has enough source-English and English-target parallel data for a non-English language pair, it is more encouraged to adopt pivot-based transfer learning than unsupervised MT -- even if there is no source-target parallel data. In this case, unsu- pervised MT unnecessarily restricts the data con- dition to using only monolingual data and its high computational cost does not pay off; simple pivot- based pre-training steps are more efficient and ef- fective. 5.4 Large-scale Results We also study the effect of pivot-based transfer learning in more data-rich scenarios: 1) with large synthetic source-target data (German→Czech), and 2) with larger real source-target data in combi- nation with the synthetic data (French→German). We generated synthetic parallel data using pivot- based back-translation (Bertoldi et al., 2008): 5M sentence pairs for German→Czech and 9.1M sen- tence pairs for French→German. For the second scenario, we also prepared 2.3M more lines of French→German real parallel data from Europarl v7 and Common Crawl corpora. Table 6 shows our transfer learning results fine-tuned with a combination of given parallel data and generated synthetic parallel data. The real source-target parallel data are oversampled to make the ratio of real and synthetic data to be 1:2. As expected, the direct source→target model can be improved considerably by training with large synthetic data. Plain pivot-based transfer outperforms the syn- thetic data baseline by up to +1.9% BLEU or -3.3% TER. However, the pivot adapter or cross-lingual encoder gives marginal or inconsistent improve- ments over the plain transfer. We suppose that the entire model can be tuned sufficiently well without French→German German→Czech newstest2012 newstest2013 newstest2012 newstest2013 Direct source→target + Synthetic data Plain transfer + Pivot adapter + Cross-lingual encoder + Pivot adapter Step-wise pre-training + Cross-lingual encoder 20.1 21.1 21.8 21.8 21.9 22.1 21.8 21.9 69.8 68.2 67.6 67.6 67.7 67.5 67.8 67.6 BLEU [%] TER [%] BLEU [%] TER [%] BLEU [%] TER [%] BLEU [%] TER [%] 77.7 72.0 68.7 68.3 68.7 68.5 69.2 68.6 12.8 18.5 20.3 20.9 20.3 20.6 20.0 20.5 11.1 15.7 17.6 17.6 17.5 17.5 17.3 17.5 22.3 22.6 23.1 23.1 23.4 23.3 23.0 23.4 68.7 68.1 67.5 67.6 67.4 67.5 67.8 67.4 81.1 76.5 73.2 73.0 73.5 73.2 73.6 73.1 Table 6: Results fine-tuned with a combination of source-target parallel data and large synthetic data. French→German task used larger real parallel data than Table 2. additional adapter layers or a well-curated training process, once we have a large source-target paral- lel corpus for fine-tuning. 6 Conclusion In this paper, we propose three effective tech- niques for transfer learning using pivot-based par- allel data. The principle is to pre-train NMT mod- els with source-pivot and pivot-target parallel data and transfer the source encoder and the target de- coder. To resolve the input/output discrepancy of the pre-trained encoder and decoder, we 1) consec- utively pre-train the model for source→pivot and pivot→target, 2) append an additional layer after the source encoder which adapts the encoder out- put to the pivot language space, or 3) train a cross- lingual encoder over source and pivot languages. Our methods are suitable for most of the non- English language pairs with lots of parallel data involving English. Experiments in WMT 2019 French→German and German→Czech tasks show that our methods significantly improve the fi- nal source→target translation performance, out- performing multilingual models by up to +2.6% BLEU. The methods are applicable also to zero- resource language pairs, showing a strong perfor- mance in the zero-shot setting or with pivot-based synthetic data. We claim that our methods expand the advances in NMT to many more non-English language pairs that are not yet studied well. Future work will be zero-shot translation with- out step-wise pre-training, i.e., combining individ- ually pre-trained encoders and decoders freely for a fast development of NMT systems for a new non-English language pair. Acknowledgments This work has received funding from the Euro- pean Research Council (ERC) (under the Euro- pean Union's Horizon 2020 research and inno- vation programme, grant agreement No 694537, project "SEQCLAS") and eBay Inc. The work reflects only the authors' views and none of the funding agencies is responsible for any use that may be made of the information it contains. References Roee Aharoni, Melvin Johnson, and Orhan Firat. 2019. Massively multilingual neural machine translation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computa- tional Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 3874 -- 3884. Somayeh Bakhshaei, Shahram Khadivi, and Noushin Riahi. 2010. Farsi-german statistical machine trans- lation through bridge language. In 2010 5th Inter- national Symposium on Telecommunications, pages 557 -- 561. IEEE. Nicola Bertoldi, Madalina Barbaiani, Marcello Fed- erico, and Roldano Cattoni. 2008. Phrase-based statistical machine translation with pivot languages. In Proceedings of 5th International Workshop on Spoken Language Translation (IWSLT 2008), pages 143 -- 149, Honolulu, HI, USA. Yun Chen, Yang Liu, Yong Cheng, and Victor OK Li. 2017. A teacher-student framework for zero- In Proceed- resource neural machine translation. ings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Pa- pers), pages 1925 -- 1935. Manuel Kauers, Stephan Vogel, Christian Fugen, and Alex Waibel. 2002. Interlingua based statistical ma- chine translation. In Seventh International Confer- ence on Spoken Language Processing. Yong Cheng, Qian Yang, Yang Liu, Maosong Sun, and Wei Xu. 2017. Joint training for pivot-based neu- ral machine translation. In Proceedings of the 26th International Joint Conference on Artificial Intelli- gence, pages 3974 -- 3980. AAAI Press. Alexis Conneau, Guillaume Lample, Marc'Aurelio Ranzato, Ludovic Denoyer, and Herv´e J´egou. 2018. Word translation without parallel data. In Proceed- ings of 6th International Conference on Learning Representations (ICLR 2018). Marta R Costa-Juss`a, Carlos Henr´ıquez, and Rafael E Banchs. 2011. Enhancing scarce-resource language translation through pivot combinations. In Proceed- ings of 5th International Joint Conference on Nat- ural Language Processing (IJCNLP 2011), pages 1361 -- 1365, Chiang Mai, Thailand. Adri`a De Gispert and Jose B Marino. 2006. Catalan- english statistical machine translation without par- In Pro- allel corpus: bridging through spanish. ceedings of the 5th International Conference on Language Resources and Evaluation (LREC 2006), pages 65 -- 68, Genoa, Italy. Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018. Understanding back-translation at In Proceedings of the 2018 Conference on scale. Empirical Methods in Natural Language Process- ing, pages 489 -- 500, Brussels, Belgium. Orhan Firat, Baskaran Sankaran, Yaser Al-Onaizan, Fatos T Yarman Vural, and Kyunghyun Cho. 2016. Zero-resource translation with multi-lingual neural In Proceedings of the 2016 machine translation. Conference on Empirical Methods in Natural Lan- guage Processing, pages 268 -- 277. Thanh-Le Ha, Jan Niehues, and Alexander Waibel. 2017. Effective strategies in zero-shot neural ma- In 14th International Workshop chine translation. on Spoken Language Translation. Felix Hill, Kyunghyun Cho, and Anna Korhonen. 2016. Learning distributed representations of sentences from unlabelled data. In Proceedings of the 15th An- nual Conference of the North American Chapter of the Association for Computational Linguistics: Hu- man Language Technologies (NAACL-HLT 2016), pages 1367 -- 1377. Melvin Johnson, Mike Schuster, Quoc V Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda Vi´egas, Martin Wattenberg, Greg Corrado, et al. 2017. Google's multilingual neural machine translation system: Enabling zero-shot translation. Transactions of the Association of Computational Linguistics (TACL), 5(1):339 -- 351. Yunsu Kim, Yingbo Gao, and Hermann Ney. 2019. Effective cross-lingual transfer of neural machine translation models without shared vocabularies. In Proceedings of the 57th Annual Meeting of the As- sociation for Computational Linguistics (Volume 1: Long Papers), pages 1246 -- 1257, Florence, Italy. Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. Guillaume Klein, Yoon Kim, Yuntian Deng, Jean Senellart, and Alexander Rush. 2017. OpenNMT: Open-source toolkit for neural machine translation. In Proceedings of ACL 2017, System Demonstra- tions, pages 67 -- 72, Vancouver, Canada. Association for Computational Linguistics. Tom Kocmi and Ondrej Bojar. 2018. Trivial trans- fer learning for low-resource neural machine trans- In Proceedings of the Third Conference on lation. Machine Translation: Research Papers, pages 244 -- 252. Surafel M Lakew, Quintino F Lotito, Matteo Negri, Marco Turchi, and Marcello Federico. 2017. Im- proving zero-shot translation of low-resource lan- guages. In 14th International Workshop on Spoken Language Translation. Yichao Lu, Phillip Keung, Faisal Ladhak, Vikas Bhard- waj, Shaonan Zhang, and Jason Sun. 2018. A neu- ral interlingua for multilingual machine translation. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 84 -- 92. Benjamin Marie, Haipeng Sun, Rui Wang, Kehai Chen, Atsushi Fujita, Masao Utiyama, and Ei- ichiro Sumita. 2019. NICT's unsupervised neural and statistical machine translation systems for the In Proceedings of WMT19 news translation task. the Fourth Conference on Machine Translation (Vol- ume 2: Shared Task Papers, Day 1), pages 294 -- 301, Florence, Italy. Akiva Miura, Graham Neubig, Sakriani Sakti, Tomoki Toda, and Satoshi Nakamura. 2015. Improving pivot translation by remembering the pivot. In Pro- ceedings of the 53rd Annual Meeting of the Associ- ation for Computational Linguistics and the 7th In- ternational Joint Conference on Natural Language Processing (Volume 2: Short Papers), volume 2, pages 573 -- 577. Toan Q Nguyen and David Chiang. 2017. Trans- fer learning across low-resource, related languages In Proceedings of for neural machine translation. the Eighth International Joint Conference on Natu- ral Language Processing (Volume 2: Short Papers), volume 2, pages 296 -- 301. Shuo Ren, Wenhu Chen, Shujie Liu, Mu Li, Ming Zhou, and Shuai Ma. 2018. Triangular architecture for rare language translation. In Proceedings of the 56th Annual Meeting of the Association for Compu- tational Linguistics (Volume 1: Long Papers), pages 56 -- 65. Samira Tofighi Zahabi, Somayeh Bakhshaei, and Shahram Khadivi. 2013. Using context vectors in improving a machine translation system with bridge language. In Proceedings of the 51st Annual Meet- ing of the Association for Computational Linguistics (Volume 2: Short Papers), volume 2, pages 318 -- 322. Holger Schwenk. 2018. Filtering and mining paral- In Proceed- lel data in a joint multilingual space. ings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Pa- pers), pages 228 -- 234. Hao Zheng, Yong Cheng, and Yang Liu. 2017. Maximum expected likelihood estimation for zero- resource neural machine translation. In Proceedings of the 26th International Joint Conference on Artifi- cial Intelligence, pages 4251 -- 4257. AAAI Press. Xiaoning Zhu, Zhongjun He, Hua Wu, Conghui Zhu, Haifeng Wang, and Tiejun Zhao. 2014. Improving pivot-based statistical machine translation by pivot- ing the co-occurrence count of phrase pairs. In Pro- ceedings of the 2014 Conference on Empirical Meth- ods in Natural Language Processing, pages 1665 -- 1675. Barret Zoph, Deniz Yuret, Jonathan May, and Kevin Knight. 2016. Transfer learning for low-resource In Proceedings of the neural machine translation. 2016 Conference on Empirical Methods in Natural Language Processing, pages 1568 -- 1575. Holger Schwenk and Matthijs Douze. 2017. Learn- ing joint multilingual sentence representations with In Proceedings of the neural machine translation. 2nd Workshop on Representation Learning for NLP, pages 157 -- 167. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Lin- guistics (Volume 1: Long Papers), volume 1, pages 1715 -- 1725. Lierni Sestorain, Massimiliano Ciaramita, Chris- tian Buck, and Thomas Hofmann. 2018. Zero- arXiv preprint shot dual machine translation. arXiv:1805.10338. Masao Utiyama and Hitoshi Isahara. 2007. A com- parison of pivot methods for phrase-based statistical machine translation. In Human Language Technolo- gies 2007: The Conference of the North American Chapter of the Association for Computational Lin- guistics; Proceedings of the Main Conference, pages 484 -- 491. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Pro- cessing Systems, pages 5998 -- 6008. Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. 2008. Extracting and composing robust features with denoising autoen- In Proceedings of the 25th international coders. conference on Machine learning, pages 1096 -- 1103. ACM. Hua Wu and Haifeng Wang. 2007. Pivot language ap- proach for phrase-based statistical machine transla- tion. In Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics, pages 856 -- 863. Chao Xing, Dong Wang, Chao Liu, and Yiye Lin. 2015. Normalized word embedding and orthogonal trans- In Proceed- form for bilingual word translation. ings of the 2015 Conference of the North Ameri- can Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1006 -- 1011.
1710.10361
2
1710
2018-09-21T10:57:04
Deep Residual Learning for Small-Footprint Keyword Spotting
[ "cs.CL" ]
We explore the application of deep residual learning and dilated convolutions to the keyword spotting task, using the recently-released Google Speech Commands Dataset as our benchmark. Our best residual network (ResNet) implementation significantly outperforms Google's previous convolutional neural networks in terms of accuracy. By varying model depth and width, we can achieve compact models that also outperform previous small-footprint variants. To our knowledge, we are the first to examine these approaches for keyword spotting, and our results establish an open-source state-of-the-art reference to support the development of future speech-based interfaces.
cs.CL
cs
DEEP RESIDUAL LEARNING FOR SMALL-FOOTPRINT KEYWORD SPOTTING Raphael Tang Jimmy Lin David R. Cheriton School of Computer Science {r33tang,jimmylin}@uwaterloo.ca University of Waterloo 8 1 0 2 p e S 1 2 ] L C . s c [ 2 v 1 6 3 0 1 . 0 1 7 1 : v i X r a ABSTRACT We explore the application of deep residual learning and di- lated convolutions to the keyword spotting task, using the recently-released Google Speech Commands Dataset as our benchmark. Our best residual network (ResNet) implemen- tation significantly outperforms Google's previous convo- lutional neural networks in terms of accuracy. By varying model depth and width, we can achieve compact models that also outperform previous small-footprint variants. To our knowledge, we are the first to examine these approaches for keyword spotting, and our results establish an open-source state-of-the-art reference to support the development of future speech-based interfaces. Index Terms -- deep residual networks, keyword spotting 1. INTRODUCTION The goal of keyword spotting is to detect a relatively small set of predefined keywords in a stream of user utterances, usually in the context of an intelligent agent on a mobile phone or a consumer "smart home" device. Such a capability comple- ments full automatic speech recognition, which is typically performed in the cloud. Because cloud-based interpretation of speech input requires transferring audio recordings from the user's device, there are significant privacy implications. Therefore, on-device keyword spotting has two main uses: First, recognition of common commands such as "on" and "off" as well as other frequent words such as "yes" and "no" can be accomplished directly on the user's device, thereby sidestepping any potential privacy concerns. Second, key- word spotting can be used to detect "command triggers" such as "hey Siri", which provide explicit cues for interactions di- rected at the device. It is additionally desirable that such models have a small footprint (for example, measured in the number of model parameters) so they can be deployed on low power and performance-limited devices. In recent years, neural networks have been shown to pro- vide effective solutions to the small-footprint keyword spot- ting problem. Research typically focuses on a tradeoff be- tween achieving high detection accuracy and having a small footprint. Compact models are usually variants derived from a full model that sacrifice accuracy for a smaller model foot- print, often via some form of sparsification. In this work, we focus on convolutional neural networks (CNNs), a class of models that has been successfully applied to small-footprint keyword spotting in recent years. In par- ticular, we explore the use of residual learning techniques and dilated convolutions. On the recently-released Google Speech Commands Dataset, which provides a common benchmark for keyword spotting, our full residual network model outper- forms Google's previously-best CNN [1] (95.8% vs. 91.7% in accuracy). We can tune the depth and width of our networks to target a desired tradeoff between model footprint and ac- curacy: one variant is able to achieve accuracy only slightly below Google's best CNN with a 50× reduction in model pa- rameters and an 18× reduction in the number of multiplies in a feedforward inference pass. This model far outperforms previous compact CNN variants. 2. RELATED WORK Deep residual networks (ResNets) [2] represent a ground- breaking advance in deep learning that has allowed re- searchers to successfully train deeper networks. They were first applied to image recognition, where they contributed to a significant jump in state-of-the-art performance [2]. ResNets have subsequently been applied to speaker identification [3] and automatic speech recognition [4, 5]. This paper explores the application of deep residual learning techniques to the keyword spotting task. The application of neural networks to keyword spotting, of course, is not new. Chen et al. [6] applied a standard multi- layer perceptron to achieve significant improvements over previous HMM-based approaches. Sainath and Parada [1] built on that work and achieved better results using convo- lutional neural networks (CNNs). They specifically cited reduced model footprints (for low-power applications) as a major motivation in moving to CNNs. Despite more recent work in applying recurrent neural networks to the keyword spotting task [7, 8], we focus on the family of CNN models for several reasons. CNNs to- day remain the standard baseline for small-footprint keyword Fig. 2. Exponentially increasing dilated convolutions; in this case, k = 1. type m r 3 conv res × 6 3 3 conv - bn avg-pool - softmax - Total - 3 3 3 - - - - n 45 45 45 45 45 12 - dw - 2(cid:98) i 3(cid:99) 16 - - - - dh - 2(cid:98) i 3(cid:99) 16 - - - - Mult. Par. 1.52M 405 219K 824M 18.2K 68.6M 169K - - 540 238K 45 540 894M Table 1. Parameters used for res15, along with the number of parameters and multiplies. be merely "tacked on" to shallower nets. Specifically, He et al. proposed that it may be easier to learn the residual H(x) = F (x) + x instead of the true mapping F (x), since it is empirically difficult to learn the identity mapping for F when the model has unnecessary depth. In residual networks (ResNets), residuals are expressed via connections between layers (see Figure 1), where an input x to layer i is added to the output of some downstream layer i + k, enforcing the residual definition H(x) = F (x) + x. Following standard ResNet architectures, our residual block begins with a bias-free convolution layer with weights W ∈ R(m×r)×n, where m and r are the width and height, respectively, and n the number of feature maps. After the con- volution layer, there are ReLU activation units and -- instead of dropout -- a batch normalization [11] layer. In addition to using residual blocks, we also use a (dw, dh) convolution dilation [12] to increase the receptive field of the network, which allows us to consider the one-second input in its en- tirety using a smaller number of layers. To expand our input for the residual blocks, which requires inputs and outputs of equal size throughout, our entire architecture starts with a convolution layer with weights W ∈ R(m×r)×n. A separate non-residual convolution layer and batch normalization layer are further appended to the chain of residual blocks, as shown in Figure 1 and Table 1. Our base model, which we refer to as res15, comprises six such residual blocks and n = 45 feature maps (see Fig- ure 1). For dilation, as illustrated in Figure 2, an exponential sizing schedule [12] is used: at layer i, the dilation is dw = Fig. 1. Our full architecture, with a magnified residual block. spotting -- they have a straightforward architecture, are rel- atively easy to tune, and have implementations in multiple deep learning frameworks (at least TensorFlow [9] and Py- Torch [10]). We are not aware of any publicly-available im- plementations of recurrent architectures to compare against. We believe that residual learning techniques form a yet unex- plored direction for the keyword spotting task, and that our use of dilated convolutions achieves the same goal that pro- ponents of recurrent architectures tout, the ability to capture long(er)-range dependencies. 3. MODEL IMPLEMENTATION This section describes our base model and its variants. All code necessary to replicate our experiments has been made open source in our GitHub repository.1 3.1. Feature Extraction and Input Preprocessing For feature extraction, we first apply a band-pass filter of 20Hz/4kHz to the input audio to reduce noise. Forty- dimensional Mel-Frequency Cepstrum Coefficient (MFCC) frames are then constructed and stacked using a 30ms win- dow and a 10ms frame shift. All frames are stacked across a 1s interval to form the two-dimensional input to our models. 3.2. Model Architecture Our architecture is similar to that of He et al. [2], who pos- tulated that it may be easier to learn residuals than to learn the original mapping for deep convolutional neural networks. They found that additional layers in deep networks cannot 1https://github.com/castorini/honk/ 3x3 conv, 45 3x3 conv, 45 3x3 conv, 45 Avg pool softmax 3x3 conv, 45 MFCCs ⋮ 3x3 conv, 45 3x3 Convolution Batch Normalization ReLU 3x3 Convolution Batch Normalization ReLU Add 3x3 conv, 45 Layer 1 Layer 1+k Layer 1+2k ⋯ ⋯ Convolution filter Receptive field type m r 3 conv 3 avg-pool res × 3 3 avg-pool - - softmax Total - 3 4 3 - - - n 19 19 19 19 12 - 19.5K Par. 171 - Mult. 643K 6.18K 5.0M 19 - 228 228 19.9K 5.65M Table 2. Parameters used for res8-narrow. type m r 3 conv 2 avg-pool res × 12 3 - avg-pool - softmax Total - 3 2 3 - - - n 45 45 45 45 12 - Par. Mult. 1.80M 405 - 45K 437K 378M 45 - 540 540 438K 380M Table 3. Parameters used for res26. 3(cid:99), resulting in a total receptive field of 125×125. As dh = 2(cid:98) i is standard in ResNet architectures, all output is zero-padded at each layer and finally average-pooled and fed into a fully- connected softmax layer. Following previous work, we mea- sure the "footprint" of a model in terms of two quantities: the number of parameters in the model and the number of multi- plies that are required for a full feedforward inference pass. Our architecture uses roughly 238K parameters and 894M multiplies (see Table 1 for the exact breakdown). To derive a compact small-footprint model, one simple approach is to reduce the depth of the network. We tried cut- ting the number of residual blocks in half to three, yielding a model we call res8. Because the footprint of res15 arises from its width as well as its depth, the compact model adds a 4× 3 average-pooling layer after the first convolutional layer, reducing the size of the time and frequency dimensions by a factor of four and three, respectively. Since the average pool- ing layer sufficiently reduces the input dimension, we did not use dilated convolutions in this variant. In the opposite direction, we explored the effects of deeper models. We constructed a model with double the number of residual blocks (12) with 26 layers, which we refer to as res26. To make training tractable, we prepend a 2 × 2 average-pooling layer to the chain of residual blocks. Dilation is also not used, since the receptive field of 25 3×3 convolution filters is large enough to cover our input size. In addition to depth, we also varied model width. All models described above used n = 45 feature maps, but we also considered variants with n = 19 feature maps, denoted by -narrow appended to the base model's name. A detailed breakdown of the footprint of res8-narrow, our best com- pact model, is shown in Table 2; the same analysis for our deepest and widest model, res26, is shown in Table 3. 4. EVALUATION 4.1. Experimental Setup We evaluated our models using Google's Speech Commands Dataset [9], which was released in August 2017 under a Creative Commons license.2 The dataset contains 65,000 one-second long utterances of 30 short words by thousands of different people, as well as background noise samples such as pink noise, white noise, and human-made sounds. The blog post announcing the data release also references Google's TensorFlow implementation of Sainath and Parada's models, which provide the basis of our comparisons. Following Google's implementation, our task is to dis- criminate among 12 classes: "yes," "no," "up," "down," "left," "right," "on," "off," "stop," "go", unknown, or silence. Our experiments followed exactly the same procedure as the TensorFlow reference. The Speech Commands Dataset was split into training, validation, and test sets, with 80% training, 10% validation, and 10% test. This results in roughly 22,000 examples for training and 2,700 each for validation and test- ing. For consistency across runs, the SHA1-hashed name of the audio file from the dataset determines the split. To generate training data, we followed Google's pre- processing procedure by adding background noise to each sample with a probability of 0.8 at every epoch, where the noise is chosen randomly from the background noises pro- vided in the dataset. Our implementation also performs a random time-shift of Y milliseconds before transforming the audio into MFCCs, where Y ∼ UNIFORM[−100, 100]. In or- der to accelerate the training process, all preprocessed inputs are cached for reuse across different training epochs. At each epoch, 30% of the cache is evicted. Accuracy is our main metric of quality, which is sim- ply measured as the fraction of classification decisions that are correct. For each instance, the model outputs its most likely prediction, and is not given the option of "don't know". We also plot receiver operating characteristic (ROC) curves, where the x and y axes show false alarm rate (FAR) and false reject rate (FRR), respectively. For a given sensitiv- ity threshold -- defined as the minimum probability at which a class is considered positive during evaluation -- FAR and FRR represent the probabilities of obtaining false positives and false negatives, respectively. By sweeping the sensitiv- ity interval [0.0, 1.0], curves for each of the keywords are computed and then averaged vertically to produce the over- all curve for a particular model. Curves with less area under the curve (AUC) are better. 4.2. Model Training Mirroring the ResNet paper [2], we used stochastic gradient descent with a momentum of 0.9 and a starting learning rate 2https://research.googleblog.com/2017/08/ launching-speech-commands-dataset.html Model trad-fpool3 tpool2 one-stride1 res15 res15-narrow res26 res26-narrow res8 res8-narrow Test accuracy 90.5% ± 0.297 91.7% ± 0.344 77.9% ± 0.715 95.8% ± 0.484 94.0% ± 0.516 95.2% ± 0.184 93.3% ± 0.377 94.1% ± 0.351 90.1% ± 0.976 Mult. Par. 1.37M 125M 1.09M 103M 954K 5.76M 238K 894M 42.6K 160M 438K 380M 78.4K 68.5M 110K 30M 19.9K 5.65M Table 4. Test accuracy of each model with 95% confidence intervals (across five trials), as well as footprint size in terms of number of parameters and multiplies. of 0.1, which is multiplied by 0.1 on plateaus. We also ex- perimented with Nesterov momentum, but we found slightly decreased learning performance in terms of cross entropy loss and test accuracy. We used a mini-batch size of 64 and L2 weight decay of 10−5. Our models were trained for a total of 26 epochs, resulting in roughly 9,000 training steps. 4.3. Results Since our own networks are implemented in PyTorch, we used our PyTorch reimplementations of Sainath and Parada's models as a point of comparison. We have previously con- firmed that our PyTorch implementation achieves the same accuracy as the original TensorFlow reference [10]. Our ResNet models are compared against three CNN variants proposed by Sainath and Parada: trad-fpool3, which is their base model; tpool2, the most accurate variant of those they explored; and one-stride1, their best compact vari- ant. The accuracies of these models are shown in Table 4, which also shows the 95% confidence intervals from five different optimization trials with different random seeds. The table provides the number of model parameters as well as the number of multiplies in an inference pass. We see that tpool2 is indeed the best performing model, slightly better than trad-fpool3. The one-stride1 model substan- tially reduces the model footprint, but this comes at a steep price in terms of accuracy. The performance of our ResNet variants is also shown in Table 4. Our base res15 model achieves significantly better accuracy than any of the previous Google CNNs (the con- fidence intervals do not overlap). This model requires fewer parameters, but more multiplies, however. The "narrow" vari- ant of res15 with fewer feature maps sacrifices accuracy, but remains significantly better than the Google CNNs (although it still uses ∼30% more multiplies). Looking at our compact res8 architecture, we see that the "wide" version strictly dominates all the Google models -- it achieves significantly better accuracy with a smaller foot- print. The "narrow" variant reduces the footprint even more, Fig. 3. ROC curves for different models. albeit with a small degradation in performance compared to tpool2, but requires 50× fewer model parameters and 18× fewer multiplies. Both models are far superior to Google's compact variant, one-stride1. Turning our attention to the deeper variants, we see that res26 has lower accuracy than res15, suggesting that we have overstepped the network depth for which we can prop- erly optimize model parameters. Comparing the narrow vs. wide variants overall, it appears that width (the number of feature maps) has a larger impact on accuracy than depth. We plot the ROC curves of selected models in Fig- ure 3, comparing the two competitive baselines to res8, res8-narrow, and res15. The remaining models were less interesting and thus omitted for clarity. These curves are consistent with the accuracy results presented in Table 4, and we see that res15 dominates the other models in perfor- mance at all operating points. 5. CONCLUSIONS AND FUTURE WORK This paper describes the application of deep residual learn- ing and dilated convolutions to the keyword spotting problem. Our work is enabled by the recent release of Google's Speech Commands Dataset, which provides a common benchmark for this task. Previously, related work was mostly incompa- rable because papers relied on private datasets. Our work es- tablishes new, state-of-the-art, open-source reference models on this dataset that we encourage others to build on. For future work, we plan to compare our CNN-based ap- proaches with an emerging family of models based on recur- rent architectures. We have not undertaken such a study be- cause there do not appear to be publicly-available reference implementations of such models, and the lack of a common benchmark makes comparisons difficult. The latter problem has been addressed, and it would be interesting to see how recurrent neural networks stack up against our approach. 6. REFERENCES [1] Tara N. Sainath and Carolina Parada, "Convolutional neural networks for small-footprint keyword spotting," in Interspeech, 2015, pp. 1478 -- 1482. [2] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun, "Deep residual learning for image recognition," in CVPR, 2016, pp. 770 -- 778. [3] Chunlei Zhang and Kazuhito Koishida, "End-to-end text-independent speaker verification with triplet loss on short utterances," in Interspeech, 2017, pp. 1487 -- 1491. [4] Wayne Xiong, Jasha Droppo, Xuedong Huang, Frank Seide, Mike Seltzer, Andreas Stolcke, Dong Yu, and Geoffrey Zweig, "The Microsoft 2016 conversational in ICASSP, 2017, pp. speech recognition system," 5255 -- 5259. [5] Wayne Xiong, Lingfeng Wu, Fil Alleva, Jasha Droppo, Xuedong Huang, and Andreas Stolcke, "The Mi- crosoft 2017 conversational speech recognition system," arXiv:1708.06073v2, 2017. [6] Guoguo Chen, Carolina Parada, and Georg Heigold, "Small-footprint keyword spotting using deep neural networks," in ICASSP, 2014, pp. 4087 -- 4091. [7] Sercan Omer Arik, Markus Kliegl, Rewon Child, Joel Hestness, Andrew Gibiansky, Christopher Fougner, Ryan Prenger, and Adam Coates, "Convolutional recur- rent neural networks for small-footprint keyword spot- ting," arXiv:1703.05390v3, 2017. [8] Ming Sun, Anirudh Raju, George Tucker, Sankaran Panchapagesan, Gengshen Fu, Arindam Mandal, Spy- ros Matsoukas, Nikko Strom, and Shiv Vitaladevuni, "Max-pooling loss training of Long Short-Term Mem- ory networks for small-footprint keyword spotting," arXiv:1705.02411v1, 2017. [9] Pete Warden, "Launching the speech commands dataset," Google Research Blog, 2017. [10] Raphael Tang and Jimmy Lin, "Honk: A PyTorch reim- plementation of convolutional neural networks for key- word spotting," arXiv:1710.06554v2, 2017. [11] Sergey Ioffe and Christian Szegedy, "Batch normaliza- tion: Accelerating deep network training by reducing internal covariate shift," arXiv:1502.03167v3, 2015. [12] Fisher Yu and Vladlen Koltun, dilated by context arXiv:1511.07122v3, 2015. aggregation "Multi-scale convolutions,"
1801.00388
2
1801
2018-08-30T21:54:56
Beyond Word Embeddings: Learning Entity and Concept Representations from Large Scale Knowledge Bases
[ "cs.CL", "cs.AI", "cs.IR", "cs.SI" ]
Text representations using neural word embeddings have proven effective in many NLP applications. Recent researches adapt the traditional word embedding models to learn vectors of multiword expressions (concepts/entities). However, these methods are limited to textual knowledge bases (e.g., Wikipedia). In this paper, we propose a novel and simple technique for integrating the knowledge about concepts from two large scale knowledge bases of different structure (Wikipedia and Probase) in order to learn concept representations. We adapt the efficient skip-gram model to seamlessly learn from the knowledge in Wikipedia text and Probase concept graph. We evaluate our concept embedding models on two tasks: (1) analogical reasoning, where we achieve a state-of-the-art performance of 91% on semantic analogies, (2) concept categorization, where we achieve a state-of-the-art performance on two benchmark datasets achieving categorization accuracy of 100% on one and 98% on the other. Additionally, we present a case study to evaluate our model on unsupervised argument type identification for neural semantic parsing. We demonstrate the competitive accuracy of our unsupervised method and its ability to better generalize to out of vocabulary entity mentions compared to the tedious and error prone methods which depend on gazetteers and regular expressions.
cs.CL
cs
Accepted in Information Retrieval Journal. Publisher link: http://link.springer.com/article/10.1007/s10791-018-9340-3 Beyond Word Embeddings: Learning Entity and Concept Representations from Large Scale Knowledge Bases Walid Shalaby · Wlodek Zadrozny · Hongxia Jin. Received: 30 January 2018 / Accepted: 2 August 2018 Abstract Text representations using neural word embeddings have proven effective in many NLP applications. Recent researches adapt the traditional word embedding models to learn vectors of multiword expressions (concepts/entities). However, these methods are limited to textual knowledge bases (e.g., Wikipedia). In this paper, we propose a novel and simple technique for integrating the knowledge about concepts from two large scale knowledge bases of different structure (Wikipedia, and Probase) in order to learn concept representations. We adapt the efficient skip-gram model to seamlessly learn from the knowledge in Wikipedia text and Probase concept graph. We evaluate our concept embedding models on two tasks: 1) analogical reasoning, where we achieve a state- of-the-art performance of 91% on semantic analogies, 2) concept categorization, where we achieve a state-of-the-art performance on two benchmark datasets achieving categorization accuracy of 100% on one and 98% on the other. Additionally, we present a case study to evaluate our model on unsupervised argument type identification for neural semantic parsing. We demonstrate the competitive accuracy of our unsupervised method and its ability to better generalize to out of vocabulary entity mentions compared to the tedious and error prone methods which depend on gazetteers and regular expressions. In this paper, we use the terms "concept" and "entity" interchangeably. Walid Shalaby Department of Computer Science University of North Carolina at Charlotte 9201 University City Blvd, Charlotte, NC 28223, USA E-mail: [email protected] Wlodek Zadrozny Department of Computer Science University of North Carolina at Charlotte 9201 University City Blvd, Charlotte, NC 28223, USA E-mail: [email protected] Hongxia Jin Samsung Research America 665 Clyde Avenue, Mountain View, CA 94043, USA E-mail: [email protected] 8 1 0 2 g u A 0 3 ] L C . s c [ 2 v 8 8 3 0 0 . 1 0 8 1 : v i X r a 2 Walid Shalaby et al. Fig. 1 Integrating knowledge from Wikipedia text (left) and Probase concept graph (right). Local concept-concept, concept-word, and word-word contexts are generated from both KBs and used for training the skip-gram model. Keywords Entity & Concept Embeddings · Entity Identification · Concept Categorization · Skip-gram · Probase · Knowledge Graph Representations 1 Introduction Vector-based semantic representation models are used to represent textual structures (words, phrases and documents) as multidimensional vectors. Typically, these models utilize textual corpora and/or Knowledge Bases (KBs) in order to extract and model real-world knowledge. Once acquired, any given text structure is represented as a real-valued vector in the semantic space. The goal is thus to accurately place semantically similar structures close to each other in that semantic space, while placing dissimilar structures far apart. Recent neural-based methods for learning word vectors (embeddings) have even succeeded in capturing both syntactic and semantic regularities using simple vector arithmetic (Mikolov et al (2013a,b); Pennington et al (2014)). For example, inferring analogical relationships between words: vec(king)-vec(man)+vec(woman)=vec(queen). This indicates that the learned vector dimensions encode meaningful multi-clustering for each word. Word vectors suffer significant limitations. First, each word is assumed to have a single meaning regardless of its context and thus is represented by a single vector in the semantic space (e.g., charlotte (city) vs. charlotte (given name)). Second, the space contains vectors of single words only. Vectors of multiword expressions (MWEs) are typically obtained by averaging the vectors of individual words. However, this would often produce inaccurate representations especially if the Title Suppressed Due to Excessive Length 3 meaning of the MWE is different from the composition of meanings of its individual words (e.g., vec(north carolina) vs. vec(north)+vec(carolina). Additionally, mentions that are used to refer to the same concept would have different embeddings (e.g., u.s., america, usa), and the model might not be able to place those individual vectors in the same sub-cluster, especially the rare surface forms. To address these limitations, a lot of research interest has been focusing on learning distributed representations of concepts and entities which are lexical expressions (single or multiword) that denote an idea, event, or an object and have a set of properties. Typically each concept has an entry in a KB (e.g., an article in Wikipedia or a node in knowledge graph). Such entity embeddings models utilize text KBs (e.g., Wikipedia) or a triple-based KBs (e.g., DBpedia and Freebase) in order to learn entity vectors. Broadly speaking, existing methods can be divided into two categories. First, methods that learn embeddings of KB concepts only (Hu et al (2015); Zwicklbauer et al (2016); Li et al (2016); Ristoski and Paulheim (2016)). Second, methods that jointly learn embeddings of words and concepts in the same semantic space (Wang et al (2014); Fang et al (2016); Yamada et al (2016); Camacho-Collados et al (2016); Fang et al (2016); Cao et al (2017); Shalaby and Zadrozny (2017); Phan et al (2017)). In this paper, we introduce an effective approach for jointly learning word and concept vectors from two large scale KBs of different modalities: a text KB (Wikipedia) and a graph-based concept KB (Microsoft concept graph1 (aka Probase)). We adapt skip-gram, the popular local context window method Mikolov et al (2013b), to integrate the knowledge from both KBs. As shown in Figure 1, three key properties differentiate our approach from existing methods. First, we generate word and concept contexts from their raw mentions in the Wikipedia text. This makes our model extensible to other text corpora with annotated concept mentions. Second, we model Probase as a weighted undirected KB graph, exploiting the co-occurrence counts between pairs of concepts. This allows us to generate more concept-concept contexts during training, and subsequently learn better concept vectors for rare and infrequent concepts in Wikipedia. Third, to our knowledge, this work is the first to combine knowledge from two KBs of different modalities (Wikipedia and Probase) into a unified representation. We evaluate the generated concept vectors intrinsically on two tasks: 1) analogical reasoning where we achieve a state-of-the-art accuracy of 91% on semantic analogies, 2) concept categorization on two datasets, where we achieve 100% accuracy on one dataset and 98% accuracy on the other. We also present a case study to analyze the impact of using our concept vectors for unsupervised argu- ment type identification with semantic parsing as an end-to-end task. The results show competitive performance of our unsupervised method compared to the tedious and error prone argument type identification methods which depend on gazetteers and regular expressions. The analysis also shows superior generalization performance on utterances containing out of vocabulary (OOV) mentions. We make our concept vectors and source code publicly available2 for the research community for further experimentation and replication. 1 https://concept.research.microsoft.com 2 https://sites.google.com/site/conceptembeddings/ 4 Walid Shalaby et al. 2 Learning Concept Embeddings 2.1 Skip-gram We learn continuous vectors of words and entities by building upon the skip-gram model of Mikolov et al (2013b). In the conventional skip-gram model, a set of contexts are generated by sliding a context window of predefined size over sentences of a given text corpus. The vector representation of a target word is learned with the objective to maximize the ability of predicting surrounding words of that target word. Formally, given a training corpus of V words w1, w2, ..., wV . The skip-gram model aims to maximize the average log likelihood probability: V(cid:88) 1 V (cid:88) i=1 −s≤j≤s,j(cid:54)=0 log p(wi+jwi) (1) where s is the context window size, wi is the target word, and wi+j is a surrounding context word. The softmax function is used to estimate the probability p(wOwI ) as follows: p(wOwI ) = (cid:80)V (cid:124) wO exp(v w=1 exp(v uwI ) (cid:124) wuwI ) (2) where uw and vw are the input and output vectors respectively, and V is the vocabulary size. Mikolov et al (2013b) proposed hierarchical softmax and negative sampling as efficient alternatives to approximate the softmax function (which becomes computationally intractable when V becomes huge). 2.2 Learning from Text Our approach genuinely learns distributed concept representations by generating concept contexts from mentions of those concepts in large encyclopedic text KBs such as Wikipedia. Utilizing such annotated KBs eliminates the need to manually annotate concept mentions and thus comes at no cost. Here we propose learning the embeddings of both words and concepts jointly. First, all concept mentions are identified in the given corpus. Second, contexts are generated for both words and concepts from other surrounding words and other surrounding concepts as well. After generating all the contexts, we use the skip-gram model to jointly learn embeddings of words and concepts. Formally, given a training corpus of V words w1, w2, ..., wV . We iterate over the corpus identifying words and concept mentions and thus generating a sequence of T tokens t1, t2, ...tT where T < V (as multiword concepts will be counted as one token). Afterwards we train the a skip-gram model aiming to maximize: log p(ti+jti) (3) T(cid:88) (cid:88) i=1 −s≤j≤s,j(cid:54)=0 Lt = 1 T where as in the conventional skip-gram model, s is the context window size. Here, ti is the target token which would be either a word or a concept mention, and ti+j is a surrounding context word or concept mention. Title Suppressed Due to Excessive Length 5 2.3 Learning from Concept Graph We employ Microsoft concept graph (Probase), a large scale probabilistic KB of millions of concepts and their relationships (basically is-a hierarchy). Probase was created by mining billions of Web pages and search logs of Microsoft's Bing3 repository using syntactic patterns. The concept KB was then leveraged for text conceptualization to support text understanding tasks such as clustering of Twitter messages and News titles (Song et al (2011, 2015)), search query understanding (Wang et al (2015b)), short text segmentation (Hua et al (2015)), and term similarity (Kim et al (2013)). Probase has a different structure (or modality) than Wikipedia because the knowledge is orga- nized as a graph whose nodes are concepts and edges represent a weighted is-a relationship between pairs of concepts. Formally, we model Probase as a 4-tuple graph G = (C, E, TC, TE) such that: -- C is a set of vertices representing concepts. -- E is a set of edges (arcs) connecting pairs of concepts. -- TC is a finite set of tuples representing global statistics of each concept (i.e. its total occurrences). -- TE is a finite set of tuples representing co-statistics of each edge connecting pairs of concepts (i.e. their co-occurrence count). Under this representation, location information is lost. Therefore the context of each concept can be defined by the set of its neighbors in the graph. Formally, the skip-gram optimization function would be maximizing: C(cid:88) (cid:88) i=1 (ci,cj )∈E Lp = 1 C log p(cjci) (4) Note that, while maximizing Lp, the number of training examples generated from (ci, cj) ∈ E, is equal to their co-occurrence count nci,cj . The incorporation of the concept-concept co-occurrence counts in Probase will result in a dynamic adjustment to the overall likelihood Lp depending on the counts between pairs of concepts. For example, for highly related concepts the co-occurrence count will be high, and so will be their contribution to Lp and vice versa. Thus Probase provides another source of conceptual knowledge to generate more concept-concept contexts, and subsequently learn better concept representations. 2.4 Data and Model Training 2.4.1 Wikipedia We utilized the Wikipedia dump of August 20164, which had ∼7 million articles. We extracted articles plain text discarding images and tables. We also discarded References and External links sections (if any). We pruned articles not under the main namespace5. Eventually, our corpus con- tained ∼5 million articles in total. We preprocessed each article replacing all its references to other Wikipedia articles with the their corresponding article IDs. In case any of the references is a title of a redirect page, we used the page ID of the original page to ensure that all concept mentions were normalized to their article IDs. 3 https://www.bing.com/ 4 http://dumps.wikimedia.org/enwiki/ 5 Articles which are prefixed with a string then colon before the title name 6 Walid Shalaby et al. 2.4.2 Microsoft Concept Graph (Probase) We used Probase data repository6 which contained ∼5 million unique concepts, ∼12 million unique instances, and ∼85 million is-a relationships. We followed a simple exact string matching between Wikipedia article titles and Probase concept names in order to align the concepts in both KBs and generate the final concepts set. 2.4.3 Training We call our model Concept Multimodal Embedding (CME). During training, we jointly train our model to maximize L = Lt + Lp, which as mentioned before is estimated using the softmax function. Although it is possible to use weighted sum of Lt and Lp, we opted using unweighted sum as it is simpler to train, and will not to introduce an extra hyperparameter to the learning model. Thus, we let the model learn the best combination between Lt and Lp based on the global words/concepts counts and local co-occurrences between pairs of them. Following Mikolov et al (2013b), we utilize negative sampling to efficiently approximate the softmax function by replacing every log p(wOwI ) term in the softmax function (equation 2) with: k(cid:88) log σ(v (cid:124) wO uwI ) + Ews∼Pn(w)[log σ(−v (cid:124) wg uwI )] (5) g=1 1 where k is the number of negative samples drawn for each term, and σ(x) is the sigmoid function 1+e−x ). ( We consider global word and concept statistics when generating the negative samples for train- ing. As in Mikolov et al (2013b), we implement the downsampling trick where words with normalized frequency (>10-3) are downsampled. For each training sample, we sample 5 noisy words/concepts as negatives from the uniform distribution raised to 3/4rd power. For text learning, we use a context window of size 9. We set the vector size to 500 dimensions and train the model for 10 iterations using 12 cores machine with 64GB of RAM. Our model takes ∼15 hours to train. The total vocabulary size is ∼12.7 million including words and concepts. 3 Evaluation 3.1 Analogical Reasoning Mikolov et al (2013c) introduced this intrinsic evaluation scheme to assess the capacity of the embedding model to learn a vector space with meaningful substructure. Typically, analogies take the form "a to b is same as c to ?" where a, b, and c are elements of the vocabulary V . Using vector arithmetic, this can be answered by identifying d such that: d = arg maxd Sim(vec(d), vec(b) − vec(a) + vec(c)), ∀d ∈ V −{a, b, c}, where Sim is a similarity function7. A good performance on this task indicates the model's ability to learn semantic and syntactic patterns as linear relationships between vectors in the embedding space (Pennington et al (2014)). 6 https://concept.research.microsoft.com/Home/Download 7 Cosine similarity or dot product if vectors are normalized. Title Suppressed Due to Excessive Length 7 Dataset/Questions Semantic Syntactic (10,675) Method (8,869) Word2Vecsg Word2Vecsg b Glove Gloveb MPME CME 58 78.1 80.8 69.5 71.6 91.4 61 62.8 61.5 32.1 54.6 61.7 All (19,544) 59.5 69.8 70.3 49.1 63.1 75.2 Table 1 Results of analogical reasoning, given as percent accuracy (bold indicates best obtained accuracy). Our CME model gives the best result on semantic analogies and higher overall accuracy than all other models. 3.1.1 Dataset We use the word analogies dataset of Mikolov et al (2013a). The dataset contains 19,544 questions divided into semantic analogies (8,869), and syntactic analogies (10,675). The semantic analogies are questions about country capitals, state cities, country currencies...etc. For example, "cairo to egypt is same as paris to france". The syntactic analogies are questions about verb tenses, opposites, and adjective forms. For example, "big to biggest is same as great to greatest". In order to leverage the concept vectors, we first identify the corresponding entity of each analogy word and use its vector. If the word has no corresponding entity or corresponds to a disambiguation page under Wikipedia we use its word vector instead. 3.1.2 Compared Systems We compare our model to various word and entity embedding methods including: 1. Word embeddings: a) Word2Vecsg, word embedding model trained on Wikipedia using skip- gram Mikolov et al (2013a), b) Word2Vecsg b, a baseline model we created by training the skip-gram model on the same Wikipedia dump we used for our CME model, c) GloVe, word em- bedding model proposed by Pennington et al (2014), and d) GloVeb, same model by Pennington et al (2014), but trained on the same Wikipedia version used by CME without preprocessing, for fair comparison. We use recommended hyperparameter values in Pennington et al (2014). 2. Entity mention embeddings: MPME, a recent model proposed by Cao et al (2017). The model jointly learn embeddings of words and entity mentions by training the skip-gram on Wikipedia, and utilizing anchor texts to generate multi-prototype entity mention embeddings. 3.1.3 Results We report the accuracy scores of analogical reasoning in Table 1. As we see, our CME model outper- forms all other models by significant percentages on the semantic analogies. The closest performing model (Glove) is ∼10% less accurate. Performance on syntactic analogies is still very competitive to Word2Vecsg b and GloVe. Overall, our model is ∼ 5% better than the closest performing model. 3.1.4 Error Analysis Local context window models like ours generally perform better on semantic analogies than syn- tactic ones. This indicates that syntactic regularities in most textual corpora are more difficult 8 Walid Shalaby et al. to capture, using embeddings, than semantic regularities. A possible reason could be the more morphological variations of verbs and adjectives than nouns. Our model training is even more bi- ased toward capturing semantic relationships between concepts by incorporating knowledge from Probase concept graph. This bias caused our model to produce some semantic predictions on the syntactic analogies compared to the Word2Vecsg b baseline, returning a semantically related word to the answer. For instance, our model predicted "fast" rather than "slows" 9 times compared to 2 times by Word2Vecsg b. And "large" rather than "smaller" 14 times compared to 1 time by Word2Vecsg b, Another set of errors were predicting the correct word but with wrong ending espe- cially "ing". For instance, "implementing" rather than "implements" 27 times compared to 19 time by Word2Vecsg b. We argue that, despite this bias, our CME model still produces very competitive performance compared to other models on syntactic analogies. And more importantly, emphasizing the semantic relatedness between concepts during training contributes to the significant accuracy gains on the semantic analogies. Algorithm 1: Classification + Bootstrapping Input: U ={(l1, ul1 ), ..., (ln, uln )}: labels + embeddings D ={(d1, vd1 ), ..., (dm, vdm )}: instances + embeddings Result: L ={..., (di, lj ), ...}: label assignment for each instance N: number of bootstrap instances 1 repeat 2 candidates ← {l1 : φ, ..., ln : φ} foreach (d, vd) ∈ D do 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 dmax sim = 0 dmax label = null foreach (l, ul) ∈ U do siml = Sim(vd, ul) if siml > dmax sim then dmax sim = siml dmax lebel = l end end add (d, dmax sim) to candidates[l] end foreach (l, candidatesl) ∈ candidates.items do repeat scoremax = 0 dmax = null foreach (d, scored) ∈ candidatesl do if scored > scoremax then scoremax = scored dmax = d end end add (dmax, l) to L ul ← ul + vd remove d from candidatesl remove d from D until N highest scored instances added end 30 31 until D = φ (cid:46) most similar instance so far (cid:46) assign class label (cid:46) bootstrap label embedding (cid:46) no more instances to classify Title Suppressed Due to Excessive Length 9 3.2 Concept Learning Concept learning is a cognitive process which involves classifying a given concept/entity to one or more candidate categories (e.g., "milk" as beverage, dairy product, liquid...etc). This process is also known as concept categorization8 Li et al (2016). Automated concept categorization can be viewed through both intrinsic and extrinsic evaluation. Intrinsic because a "good" embedding model would generate clusters of concepts belonging to the same category, and optimally place the category vector at the center of its instances cluster. And extrinsic as the embedding model could be leveraged in many knowledge modeling tasks such as KB construction (creating new concepts), KB completion (inferring new relationships between concepts), and KB curation (removing noisy or assessing weak relationships). Similar to Li et al (2016), we assign a given concept to a target category using Rocchio classifi- cation (Rocchio (1971)), where the centroid of each category is set to the category's corresponding embedding vector. Formally, given a set of n candidate concept categories G = {g1, ..., gn}, an in- stance concept c, an embedding function f , and a similarity function Sim, then c is assigned to the ith category gi such that gi = arg maxi Sim(f (gi), f (c)). Under our CME model, the embedding function f would always map the given concept to its vector. 3.2.1 Bootstrapping We leverage bootstrapping in order to improve the categorization accuracy without the need for labeled data. In the context of concept learning, we start with the vectors of target category concepts as a prototype view upon which categorization assignments are made (e.g., vec(bird), vec(mammal)...etc). We leverage bootstrapping by iteratively updating this prototype view with the vectors of concept instances we are most confident. For example, if "deer" is closest to "mammal" than any other instance in the dataset, then we update the definition of "mammal" by perform- ing vec(mammal)+=vec(deer), normalize it, and repeat the same operation for other categories as well. This way, we adapt the initial prototype view to better match the specifics of the given data. Algorithm 1 presents the pseudocode for performing concept categorization with bootstrapping. In our implementation, we bootstrap the category vector with vectors of the most similar N instances at a time. Another implementation option might be defining a threshold and bootstrapping using vectors of N instances if their similarity scores exceed that threshold. 3.2.2 Datasets As in Li et al (2016), we utilize two benchmark datasets: 1) Battig test (Baroni and Lenci (2010)), which contains 83 single word concepts (e.g., cat, tuna, spoon..etc) belonging to 10 categories (e.g., mammal, fish, kitchenware..etc), and 2) DOTA, which was created by Li et al (2016) from Wikipedia article titles (entities) and category names (categories). DOTA contains 300 single-word concepts (DOTA-single) (e.g., coffee, football, semantics..etc), and (150) multiword concepts (DOTA-mult) (e.g., masala chai, table tennis, noun phrase..etc). Both belong to 15 categories (e.g., beverage, sport, linguistics...etc). Performance is measured in terms of the ability of the system to assign concept instances to their correct categories. 8 In this paper, we use concept learning and concept categorization interchangeably 10 Walid Shalaby et al. Dataset/Instances Battig DOTA-single DOTA-mult DOTA-all Method WESenna WEM ikolov TransE1 TransE2 TransE3 CE HCE WEb +bootstrap Wiki-ccb +bootstrap Probase-ccb +bootstrap CME +bootstrap (83) 44 74 66 75 46 79 87 77 88 72 81 73 95 94 100 (300) (150) (450) 52 72 72 80 55 89 93 93 97 90 91 65 78 91 99 32 67 69 77 52 85 91 86 86 80 86 70 81 88 95 45 72 71 79 54 88 92 91 90 87 87 67 83 90 98 Table 2 Results of the concept categorization task, given as percent accuracy (bold indicates best obtained accu- racy). Our CME model with bootstrapping gives the best results outperforming all other models and baselines. 3.2.3 Compared Systems We compare our model to various word, entity and category embedding methods including: 1. Word embeddings: Collobert et al (2011) model (WESenna) trained on Wikipedia. Here vectors of multiword concepts are obtained by averaging their individual word vectors. 2. MWEs embeddings: Mikolov et al (2013b) model (WEM ikolov) trained on Wikipedia. This model jointly learns single and multiword embeddings where MWEs are identified using corpus statistics. 3. Entity-category embeddings: which include Bordes et al (2013) embedding model (TransE). This model utilizes relational data between entities in a KB as triplets in the form (entity, relation, entity) to generate representations of both entities and relationships. Li et al (2016) implemented three variants of this model (TransE1, TransE2, TransE3) to generate represen- tations for entities and categories jointly. Two other models introduced by Li et al (2016) are CE and HCE. CE generates embeddings for concepts and categories using category information of Wikipedia articles. HCE extends CE by incorporating Wikipedia's category hierarchy while training the model to generate concept and category vectors. 4. Other baselines: we created three baselines: a) WEb, has word embeddings only and was obtained by training the skip-gram model on the same Wikipedia dump we used for our CME model (cf. equation 1), b) Wiki-ccb, has concept embeddings only and was obtained by first preprocessing Wikipedia to remove all non-concept tokens, and then training the skip-gram model on concept-concept contexts (cf. equation 3 where each token t is a concept mention), and c) Probase-ccb, has concept embeddings only and was obtained by training the adapted skip-gram model on Probase concept graph (cf. equation 4). These baselines are meant to quantify and analyze the contribution of each type of information individually. Specifically, entity-entity in Wikipedia conceptual contexts, entity-entity in Probase knowledge graph, and word-word in Wikipedia raw contexts. Title Suppressed Due to Excessive Length 11 No Utterance 1 where is new orleans where is ci0 2 what states border the mississippi river how many states border ri0 3 list flights from philadelphia to san francisco via dallas list flight from ci0 to ci1 via ci2 4 flights from jfk or la guardia to cleveland flight from ap0 or ap1 to ci0 Logical form ( lambda $0 e ( loc:t new orleans:ci $0 ) ) ( lambda $0 e ( loc:t ci0 $0 ) ) ( lambda $0 e ( and ( state:t $0 ) ( next to:t $0 mississippi river:r ) ) ) ( count $0 ( and ( state:t $0 ) ( next to:t $0 ri0 ) ) ) ( lambda $0 e ( and ( flight $0 ) ( from $0 philadelphia:ci ) ( to $0 san francisco:ci ) ( stop $0 dallas:ci ) ) ) ( lambda $0 e ( and ( flight $0 ) ( from $0 ci0 ) ( to $0 ci1 ) ( stop $0 ci2 ) ) ) ( lambda $0 e ( and ( flight $0 ) ( or ( from $0 jfk:ap ) ( from $0 lga:ap ) ) ( to $0 cleveland:ci ) ) ) ( lambda $0 e ( and ( flight $0 ) ( or ( from $0 ap0 ) ( from $0 ap1 ) ) ( to $0 ci0 ) ) ) Table 3 Example utterances and their corresponding logical forms from the geography and flights domains. Left, utterances before and after argument type identification. Right, logical forms before and after argument type iden- tification. City is mapped to ci, Airport to ap, and River to ri. 3.2.4 Results We report the accuracy scores of concept categorization9 in Table 2. Accuracy is calculated by dividing the number of correctly classified concepts by the total number of concepts in the given dataset. Scores of all non-baseline methods are obtained from Li et al (2016). As we can see in Table 2, our CME+bootstrap model outperforms all other models and baselines by significant percentages. It even achieves 100% accuracy on the Battig dataset. With single word concepts, CME achieves the best performance on Battig and competitive performance to WEb on DOTA-single. When it comes to multiword concepts, our CME model comes second after HCE. In general, baselines which depend only on pure concept-concept contexts (Wiki-ccb and Probase-ccb) perform worse than the word-word contexts baseline (WEb). This indicates the significance of the full concept contextual information obtained when including both other nearby words and other nearby concepts while learning target concept representation. 3.2.5 Analysis Is bootstrapping a magic bullet? A first look at the results of CME+bootstrap vs. CME might indicate that if bootstrapping is applied to HCE or WEb which perform better than CME on some datasets, their performance would still be superior. However, the results of WEb+bootstrap show that the margin of performance gains of bootstrapping is not necessarily proportional to the performance of the model without it. For example, WEb+bootstrap performs worse than CMEb+bootstrap on DOTA-single, though WEb was initially better than CME. This means that bootstrapping other better performing models such as HCE might not be as beneficial as it is to CME. The bottom line here is: the model should learn a semantic space with optimal substruc- tures which cluster instances of the same category together, and keep them far from instances of other categories. This is clearly the case with our CME model which ends up having (near-)optimal category vectors with bootstrapping. 9 From a multi-class classification perspective, the accuracy scores would be equivalent to the clustering purity score as reported in Li et al (2016). 12 Walid Shalaby et al. 3.3 Argument Type Identification: A Case Study In this section, we present a case study to analyze the impact of using our concept vectors for un- supervised argument type identification with semantic parsing as an end-to-end task. In a nutshell, semantic parsing is concerned with mapping natural language utterances into executable logical forms Wang et al (2015a). The logical form is subsequently executed on a knowledge base to answer the user question. Table 3 shows some example utterances and their corresponding logical forms from the geography and flights domains. 3.3.1 Argument Identification As we can notice from the examples in Table 3, user utterances usually contain mentions of entities of various types (e.g., city, state, and airport names). These mentions are typically parsed as arguments in the resulting logical form. Some of these mentions could be rare or even missing in the training data. As noted by Dong and Lapata (2016), this problem reduces the model's capacity to learn reliable parameters for such mentions. One possible solution is to preprocess the training data, replacing all entity mentions with their type names (e.g., san francisco to city, california to state...etc). This step allows the model to see more identical input/output patterns during training, and thus better learn the parameters of such patterns. The model would also generalize better to out of vocabulary mentions because the same preprocessing could be done at test time. Dong and Lapata (2016) proposed using gazetteers and regular expressions for argument identifi- cation. The authors also demonstrated increased accuracy when employing such approach. However, using regular expressions is error prone as the same utterance could be paraphrased in many dif- ferent ways. In addition, gazetteers usually have low recall, and will not cover many surface forms of the same entity mention. In this paper, we embrace argument type identification in a totally unsupervised fashion. The idea is to build upon the promising performance we achieved in concept categorization and apply the same scheme to map entity mentions to their corresponding type names. Our unsupervised argument type identification is a four step process: 1) we predefine target entity types and retrieve their corresponding vectors from our CME model, 2) we identify entity mentions in user utterances (e.g., mississippi river), 3) we lookup the mention vector in our CME model, and 4) we compute the similarity between the mention vector and each of the predefined target entity types and choose the most similar type if it exceeds a predefined threshold. This scheme is efficient and doesn't require any manually crafted rules or heuristics. The only needed parameter is the similarity threshold which we fix to 0.5 during experiments. Note that standard off-the-shelf entity recognition systems could help in identifying the entity mentions but not their type names. In domains like flights, we are interested in non standard types such as airports and airlines. It is also important to distinguish between city, state, and country mentions in the geography domain and not classifying all instances of these categories as the standard location type. Title Suppressed Due to Excessive Length 13 Dataset w/o Identification w/ Identification GEO ATIS 73.2 68.6 77.1 83.7 Table 4 Results of semantic parsing before and after argument type identification, given as percent accuracy. Using CME to identify argument types resulted in improved accuracy on both datasets. 3.3.2 Datasets We analyze our unsupervised scheme on two datasets10 : 1) GEO which contains a total of 880 utterances about U.S. geography Zettlemoyer and Collins (2012). The dataset is split into 680 training instances and 200 test instances. Here we target identifying five entity types: city, state, river, mountain, and country, and 2) ATIS which contains 5,410 utterances about flight bookings split into 4,480 training instances, 480 development instances, and 450 test instances. Here we target identifying six entity types: city, state, airline, airport, day name, and month. 3.3.3 Model & Training We assess the performance of argument type identification by training Dong and Lapata (2016) neural semantic parsing model11. The model utilizes sequence-to-sequence learning with neural attention (see Dong and Lapata (2016) for more details). We use the Seq2Seq variant of the model and do not perform any parameter tuning as our purpose is to analyze the performance before and after argument type identification, and not to get a state-of-the-art performance on these datasets. 3.3.4 Results We report the parsing accuracy in Table 4. Accuracy is defined as the proportion of the input utterances whose logical form is identical to the gold standard. As we can see, our argument type identification scheme resulted in significant accuracy improvements of ∼10% on both datasets. We present this experiment as a case study for the utility of our embedding model in an end- to-end task. We don't claim superiority over other embedding techniques here, rather we show that the application of our embedding space to infer is-a relationships can be extended successfully to other application areas including but not limited to: 1) unsupervised argument type identification, and 2) inferring is-a relationship of other categories (city, state, airline, airport, day name...etc) than those categories in the concept learning datasets (DOTA and Battig). 3.3.5 Error Analysis Training the Seq2Seq semantic parsing model on preprocessed data is clearly beneficial as the results in Table 4 show. Without argument identification, the model is prone to the out of vocabulary problem. For example, on GEO we spotted 24 test instances with entities not mentioned in the training data (e.g., new jersey, chattahoochee river). The same on ATIS with 23 instances. Another source of errors was due to rare mentions. For example, "portland" appeared once in GEO training data. 10 We obtained the raw dataset files by contacting the authors of Dong and Lapata (2016) 11 https://github.com/donglixp/lang2logic 14 Walid Shalaby et al. Our scheme demonstrated good ability to capture most entity mentions and map them to their correct type names. However, there was some subtle failure cases. For example, in "what length is the mississippi", our scheme mapped "mississippi" to the state, while it was mapped to the river in the gold standard logical form. Another example was mapping "new york" to the city in "what is the density of the new york", while it was mapped to the state in the gold standard. Overall, the results show competitive performance of our unsupervised method compared to the tedious and error prone argument type identification methods. The analysis also shows supe- rior generalization performance when using unsupervised argument identification with utterances containing out of vocabulary and rare mentions. 4 Related Work Neural embedding models have been proposed to learn distributed representations of concepts and entities. Song and Roth (2015) proposed using the popular Word2Vec model of Mikolov et al (2013a) to obtain the embeddings of each concept by averaging the vectors of the concept's individual words. For example, the embeddings of "Microsoft Office" would be obtained by averaging the embeddings of "Microsoft" and "Office" obtained from the Word2Vec model. Clearly, this scheme fails when the semantics of multiword concepts is different from the compositional meaning of their individual words. More robust entity embeddings can be learned from the entity's corresponding article and/or from the structure of the employed KB (e.g., its link graph) as in Hu et al (2015); Li et al (2016); Yamada et al (2016); and Shalaby and Zadrozny (2017) who all utilize the skip-gram model, but differ in how they define the context of the target concept. However, all these methods utilize one KB only (Wikipedia) to learn entity representations. Our approach, on the other hand, learns better entity representations by exploiting the conceptual knowledge in a weighted KB graph (Probase) and not only from Wikipedia. Unlike Hu et al (2015) and Li et al (2016) who learn entity embeddings only, our proposed CME model maps both words and concepts into the same semantic space. In addition, compared to Yamada et al (2016) model which also learns words and entity embeddings jointly, we better model the local contextual information of entities and words in Wikipedia viewed as a textual KB. During training, we generate word-word, word-concept, concept-word, and concept-concept contexts (cf. equation 3). In Yamada et al (2016) model, concept-concept contexts are generated from Wikipedia link graph, and not from their raw mentions in Wikipedia text. Exploiting all concept tokens surrounding a target concept allows us, given another corpus with annotated concept mentions, to easily harness concept-concept contexts even if the corpus has no link structure (e.g., news stories, scientific publications, medical guidelines...etc). Our model is computationally less costly than those of Hu et al (2015) and Yamada et al (2016) as it requires a few hours rather than days to train using similar computing resources. Although the learning of the embeddings might seem straightforward, as it uses the standard skip-gram model, we see this as an advantage. On one hand, it allows our training to scale efficiently to huge vocabulary of words and concepts without the need for a lot of preprocessing (e.g., removing low frequent words and phrases as in Wang et al (2014); Fang et al (2016)). On the other hand, to learn from the knowledge graph contexts, we propose simple adaption to the skip-gram model (cf. equation 4), which allows us to use the same dot product scoring function when optimizing for both Lt and Lp. This is a simpler and more computationally efficient function than the scoring Title Suppressed Due to Excessive Length 15 function proposed by previous approaches which learn from knowledge graphs (cf. Fang et al (2016)'s equation 1). 5 Conclusion & Discussion Concepts are lexical expressions (single or multiword) that denote an idea, event or an object and typically have a set of properties associated with it. In this paper, we introduced a neural-based approach for learning embeddings of explicit concepts using the skip-gram model. Our approach learns concept representations from mentions in free text corpora with annotated concept men- tions. These mentions even if not available could be obtained through state-of-the-art entity linking systems. We also proposed an effective and seamless addition to the skip-gram learning scheme to learn concept vectors from two large scale knowledge bases of different modalities (Wikipedia, and Probase). We evaluated of the learned concept embeddings intrinsically and extrinsically. Our performance on the analogical reasoning task produced a new state-of-the-art performance of 91% on semantic analogies. Empirical results on two datasets for performing concept categorization show superior perfor- mance of our approach over other word and entity embedding models. We also presented a case study to analyze the feasibility of using the learned vectors for argument identification with neural semantic parsing. The analysis shows significant performance gains using our unsupervised argument type identification scheme and better handling of out of vocabulary entity mentions. To our knowledge, this work is the first to combine knowledge from both Wikipedia and Probase into a unified representation. Our concept space contains all Wikipedia article titles (∼5 million). We use Probase as another source of conceptual knowledge to generate more concept-concept contexts, and subsequently learn better concept vectors. In this spirit, we first filter Probase graph keeping only edges whose both vertices are Wikipedia concepts. Using string matching, ∼1 million unique Probase concepts were mapped to Wikipedia articles. Note that we still use the contexts generated from the 5 million Wikipedia concepts, and add to them contexts obtained from the filtered Probase graph. Out of the ∼12.7 million vectors in our model, we have ∼5 million concept vectors and ∼7.7 million word vectors. One important future improvement is to better match entities from both Wikipedia and Probase. For example, using string edits to increase recall or graph matching techniques to increase precision. Despite using a simple string matching, the performance of our method is superior to other methods utilizing Wikipedia only. It is expected that string matching might produce incorrect mappings. However, it is important to mention that our string matching exploits the redirect pages titles as well as the canonical titles of Wikipedia articles. This increases the recall. For example, in Probase, nyc, city of new york, new york city are all matched with same Wikipedia article New York City. Our initial qualitative analysis shows that it is common to match single-sense Wikipedia concepts (ss-Wiki) with multi-sense Probase concepts (ms-Pro). However, in many of these cases, the ms-Pro is dominated by the ss-Wiki. For example, the Wikipedia page for Tiger describes the animal. In Probase, Tiger is-a Animal and Tiger is-a Big cat has more co-occurrences (917 & 315 respectively) compared to Tiger is-a Dance (1 co-occurrence). Same for Rose which is described in Wikipedia as flowering plant. In Probase, Rose is-a Flower has (906) and Rose is-a Plant has (487) co-occurrences compared to Rose is-a Garden (10) and Rose is-a Odor (5) co-occurrences. We believe this would 16 Walid Shalaby et al. help generating more consistent contexts from Wikipedia and Probase. On the other hand, such multiple sense concepts in Probase could be leveraged for tasks like sense disambiguation and multi- prototype embeddings, along the lines of Camacho-Collados et al (2016), Iacobacci et al (2015), and Mancini et al (2016). One important aspect of our CME model is its ability to better represent the long tail entities with few mentions. Existing approaches that utilize Wikipedia's link graph treat Wikipedia as unweighted directed KB graph. During training, a context is generated for entities e1 and e2 if e1 has incoming/outgoing link from/to e2. This mechanism poorly represents rare/infrequent Wikipedia concepts which have few incoming links (i.e. few mentions). We, alternatively, exploit Probase link structure modeling it as a weighted undirected KB graph. We also utilize the co-occurrence counts between pairs of concepts (cf. Figure 1). Therefore, we generate more concept-concept contexts, resulting in better representations of the long-tail concepts. Consider for example Nightstand which has in Wikipedia 17 incoming links. In Probase, Nightstand is-a Furniture, is-a Casegoods, and is-a Bedroom furniture with co-occurrences 47, 47, and 32 respectively. This is a 100+ more contexts than we can generate from Wikipedia. Even for frequent Wikipedia concepts, by exploiting the co-occurrence counts, our model will reinforce concept-concept relatedness from the many contexts obtained from Probase. Our aim in this work was to combine the knowledge from both Wikipedia and Probase in a seamless and simple way which is scalable (computationally cheap) and effective. The integration learning scheme and the results show that we can achieve these two goals with high degree of success. It principle, it is possible to perform such integration between Wikipedia and Probase contexts in other ways, which may for example distinguish between syntactic and semantic information in these contexts. However, such approaches will require extra preprocessing in order to prepare such contexts. For instance, Levy and Goldberg (2014) explored learning word embeddings from contexts generated from a dependency parser. We still claim an advantage over such approaches, because they require costly preprocessing in terms of scalability and effectiveness. As demonstrated by the results, our CME model advances the state-of-the-art on both the analogical reasoning and the concept learning tasks, without the need to do expensive preprocessing or training to learn concept representations. Acknowledgements This work was partially supported by the National Science Foundation under grant number 1624035. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation. The authors would like to thank Avik Ray and Yilin Shen from Samsung Research America for their constructive feedback and discussions while developing the case study on the argument type identification task. The authors also appreciate the reviewers valuable and profound comments. References Baroni M, Lenci A (2010) Distributional memory: A general framework for corpus-based semantics. Computational Linguistics 36(4):673 -- 721 Bordes A, Usunier N, Garcia-Duran A, Weston J, Yakhnenko O (2013) Translating embeddings for modeling multi-relational data. In: Advances in neural information processing systems, pp 2787 -- 2795 Title Suppressed Due to Excessive Length 17 Camacho-Collados J, Pilehvar MT, Navigli R (2016) Nasari: Integrating explicit knowledge and corpus statistics for a multilingual representation of concepts and entities. Artificial Intelligence 240:36 -- 64 Cao Y, Huang L, Ji H, Chen X, Li J (2017) Bridge text and knowledge by learning multi-prototype entity mention embedding. In: Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), vol 1, pp 1623 -- 1633 Collobert R, Weston J, Bottou L, Karlen M, Kavukcuoglu K, Kuksa P (2011) Natural language processing (almost) from scratch. Journal of Machine Learning Research 12(Aug):2493 -- 2537 Dong L, Lapata M (2016) Language to logical form with neural attention. arXiv preprint arXiv:160101280 Fang W, Zhang J, Wang D, Chen Z, Li M (2016) Entity disambiguation by knowledge and text jointly embedding. In: Proceedings of The 20th SIGNLL Conference on Computational Natural Language Learning, pp 260 -- 269 Hu Z, Huang P, Deng Y, Gao Y, Xing EP (2015) Entity hierarchy embedding. In: Proceedings of The 53rd Annual Meeting of the Association for Computational Linguistics Hua W, Wang Z, Wang H, Zheng K, Zhou X (2015) Short text understanding through lexical- semantic analysis. In: Data Engineering (ICDE), 2015 IEEE 31st International Conference on, IEEE, pp 495 -- 506 Iacobacci I, Pilehvar MT, Navigli R (2015) Sensembed: Learning sense embeddings for word and relational similarity. In: ACL (1), pp 95 -- 105 Kim D, Wang H, Oh AH (2013) Context-dependent conceptualization. In: IJCAI, pp 2330 -- 2336 Levy O, Goldberg Y (2014) Dependency-based word embeddings. In: Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), vol 2, pp 302 -- 308 Li Y, Zheng R, Tian T, Hu Z, Iyer R, Sycara K (2016) Joint embedding of hierarchical categories and entities for concept categorization and dataless classification. arXiv preprint arXiv:160707956 Mancini M, Camacho-Collados J, Iacobacci I, Navigli R (2016) Embedding words and senses to- gether via joint knowledge-enhanced training. arXiv preprint arXiv:161202703 Mikolov T, Chen K, Corrado G, Dean J (2013a) Efficient estimation of word representations in vector space. arXiv preprint arXiv:13013781 Mikolov T, Sutskever I, Chen K, Corrado GS, Dean J (2013b) Distributed representations of words and phrases and their compositionality. In: Advances in neural information processing systems, pp 3111 -- 3119 Mikolov T, Yih Wt, Zweig G (2013c) Linguistic regularities in continuous space word representa- tions. In: hlt-Naacl, vol 13, pp 746 -- 751 Pennington J, Socher R, Manning CD (2014) Glove: Global vectors for word representation. Pro- ceedings of the Empiricial Methods in Natural Language Processing (EMNLP 2014) 12:1532 -- 1543 Phan MC, Sun A, Tay Y, Han J, Li C (2017) Neupl: Attention-based semantic matching and pair- linking for entity disambiguation. In: Proceedings of the 2017 ACM on Conference on Information and Knowledge Management, ACM, pp 1667 -- 1676 Ristoski P, Paulheim H (2016) Rdf2vec: Rdf graph embeddings for data mining. In: International Semantic Web Conference, Springer, pp 498 -- 514 Rocchio JJ (1971) Relevance feedback in information retrieval Shalaby W, Zadrozny W (2017) Learning concept embeddings for efficient bag-of-concepts densifi- cation. arXiv preprint arXiv:170203342 18 Walid Shalaby et al. Song Y, Roth D (2015) Unsupervised sparse vector densification for short text similarity. In: Pro- ceedings of NAACL Song Y, Wang H, Wang Z, Li H, Chen W (2011) Short text conceptualization using a probabilistic knowledgebase. In: Proceedings of the Twenty-Second international joint conference on Artificial Intelligence-Volume Volume Three, AAAI Press, pp 2330 -- 2336 Song Y, Wang S, Wang H (2015) Open domain short text conceptualization: A generative+ de- scriptive modeling approach. In: IJCAI, pp 3820 -- 3826 Wang Y, Berant J, Liang P, et al (2015a) Building a semantic parser overnight. In: ACL (1), pp 1332 -- 1342 Wang Z, Zhang J, Feng J, Chen Z (2014) Knowledge graph and text jointly embedding. In: EMNLP, vol 14, pp 1591 -- 1601 Wang Z, Zhao K, Wang H, Meng X, Wen JR (2015b) Query understanding through knowledge-based conceptualization Yamada I, Shindo H, Takeda H, Takefuji Y (2016) Joint learning of the embedding of words and entities for named entity disambiguation. arXiv preprint arXiv:160101343 Zettlemoyer LS, Collins M (2012) Learning to map sentences to logical form: Structured classifica- tion with probabilistic categorial grammars. arXiv preprint arXiv:12071420 Zwicklbauer S, Seifert C, Granitzer M (2016) Robust and collective entity disambiguation through semantic embeddings. In: Proceedings of the 39th International ACM SIGIR conference on Re- search and Development in Information Retrieval, ACM, pp 425 -- 434
1909.00091
1
1909
2019-08-30T23:27:06
Automatically Inferring Gender Associations from Language
[ "cs.CL" ]
In this paper, we pose the question: do people talk about women and men in different ways? We introduce two datasets and a novel integration of approaches for automatically inferring gender associations from language, discovering coherent word clusters, and labeling the clusters for the semantic concepts they represent. The datasets allow us to compare how people write about women and men in two different settings - one set draws from celebrity news and the other from student reviews of computer science professors. We demonstrate that there are large-scale differences in the ways that people talk about women and men and that these differences vary across domains. Human evaluations show that our methods significantly outperform strong baselines.
cs.CL
cs
Automatically Inferring Gender Associations from Language Serina Chang Kathleen McKeown Department of Computer Science Department of Computer Science Columbia University∗ Columbia University [email protected] [email protected] Abstract Our contributions include: In this paper, we pose the question: do people talk about women and men in different ways? We introduce two datasets and a novel integra- tion of approaches for automatically inferring gender associations from language, discover- ing coherent word clusters, and labeling the clusters for the semantic concepts they repre- sent. The datasets allow us to compare how people write about women and men in two dif- ferent settings - one set draws from celebrity news and the other from student reviews of computer science professors. We demonstrate that there are large-scale differences in the ways that people talk about women and men and that these differences vary across domains. Human evaluations show that our methods sig- nificantly outperform strong baselines. • Two datasets for studying language and gen- der, each consisting of over 300K sentences. • Methods to infer gender-associated words and labeled clusters in any domain. • Novel findings that demonstrate in both do- mains that people do talk about women and men in different ways. Each contribution brings us closer to modeling how gender associations appear in everyday lan- guage. In the remainder of the paper, we present related work, our data collection, methods and findings, and human evaluations of our system.1 1 Introduction 2 Related Work It is well-established that gender bias exists in language -- for example, we see evidence of this given the prevalence of sexism in abu- sive language datasets (Waseem and Hovy, 2016; Jha and Mamidi, 2017). However, these are ex- treme cases of gender norms in language, and only encompass a small proportion of speakers or texts. Less studied in NLP is how gender norms man- ifest in everyday language -- do people talk about women and men in different ways? These types of differences are far subtler than abusive language, but they can provide valuable insight into the roots of more extreme acts of discrimination. Subtle dif- ferences are difficult to observe because each case on its own could be attributed to circumstance, a passing comment or an accidental word. How- ever, at the level of hundreds of thousands of data points, these patterns, if they do exist, become un- deniable. Thus, in this work, we introduce new datasets and methods so that we can study subtle gender associations in language at the large-scale. ∗ Since writing this paper, Serina Chang has moved to the Department of Computer Science at Stanford University. The study of gender and language has a rich his- tory in social science. Its roots are often attributed to Robin Lakoff, who argued that language is fun- damental to gender inequality, "reflected in both the ways women are expected to speak, and the ways in which women are spoken of" (Lakoff, 1973). Prominent scholars following Lakoff have included Deborah Tannen (1990), Mary Bucholtz and Kira Hall (1995), Janet Holmes (2003), Pene- lope Eckert (2003), and Deborah Cameron (2008), along with many others. In recent decades, the study of gender and re- language has also attracted computational searchers. Echoing Lakoff's original claim, a popular strand of computational work focuses on differences in how women and men talk, an- alyzing key lexical traits (Boulis and Ostendorf, 2005; Argamon et al., 2007; Bamman et al., 2014) and predicting a person's gender from some text they have written (Rao et al., 2010; Jurgens et al., 1Our datasets and code are available cs.columbia.edu/nlp/tools.cgi#gendered%20corpus github.com/serinachang5/gender-associations, respectively. at and 2017). There is also research studying how people talk to women and men (Voigt et al., 2018), as well as how people talk about women and men, typi- cally in specific domains such as sports journalism (Fu et al., 2016), fiction writing (Fast et al., 2016), movie scripts (Sap et al., 2017), and Wikipedia bi- ographies (Wagner et al., 2015, 2016). Our work builds on this body by diving into two novel do- mains: celebrity news, which explores gender in pop culture, and student reviews of CS professors, which examines gender in academia and, particu- larly, the historically male-dominated field of CS. Furthermore, many of these works rely on manu- ally constructed lexicons or topics to pinpoint gen- dered language, but our methods automatically in- fer gender-associated words and labeled clusters, thus reducing supervision and increasing the po- tential to discover subtleties in the data. Modeling gender associations in language could also be instrumental to other NLP tasks. Abusive language is often founded in sex- ism (Waseem and Hovy, 2016; Jha and Mamidi, 2017), so models of gender associations could help to improve detection in those cases. Gen- der bias also manifests in NLP pipelines: prior research has found that word embeddings preserve gender biases (Bolukbasi et al., 2016; Caliskan et al., 2017; Garg et al., 2018), and some have developed methods to reduce this bias (Zhao et al., 2018, 2019). Yet, the problem is far from solved; for example, Gonen and Goldberg 2019 showed that it is still possible to recover gender bias from "de-biased" embeddings. These findings further motivate our research, since be- fore we can fully reduce gender bias in embed- dings, we need to develop a deeper understanding of how gender permeates through language in the first place. We also build on methods to cluster words in word embedding space and automatically label clusters. Clustering word embeddings has proven useful for discovering salient patterns in text cor- pora (Wilson et al., 2018; Demszky et al., 2019). Once clusters are derived, we would like them to be interpretable. Much research simply considers the top-n words from each cluster, but this method can be subjective and time-consuming to interpret. Thus, there are efforts to design methods of auto- matic cluster labeling (Manning et al., 2008). We take a similar approach to Poostchi and Piccardi 2018, who leverage word embeddings and Word- Num. texts Num. sentences Fem-Male prop. Celeb 15,917 342,645 .67 / .33 Professor 283,973 976,677 .28 / .72 Table 1: Summary statistics of our datasets. Net during labeling, and we extend their method with additional techniques and evaluations. 3 Data Collection Our first dataset contains articles from celebrity magazines People, UsWeekly, and E!News. We labeled each article for whether it was report- ing on men, women, or neither/unknown.2 To do this, we first extracted the article's topic tags. Some of these tags referred to people, but oth- ers to non-people entities, such as "Gift Ideas" or "Health." To distinguish between these types of tags, we queried each tag on Wikipedia and checked whether the top page result contained a "Born" entry in its infobox -- if so, we concluded that the tag referred to a person. Then, from the person's Wikipedia page, we de- termined their gender by checking whether the in- troductory paragraphs of the page contained more male or female pronouns. This method was simple but effective, since pronouns in the introduction al- most always resolve to the subject of that page. In fact, on a sample of 80 tags that we manually an- notated, we found that comparing pronoun counts predicted gender with perfect accuracy. Finally, if an article tagged at least one woman and did not tag any men, we labeled the article as Female; in the opposite case, we labeled it as Male. Our second dataset contains reviews from Rate- MyProfessors (RMP), an online platform where students can review their professors. We included all 5,604 U.S. schools on RMP, and collected all reviews for CS professors at those schools. We la- beled each review with the gender of the professor whom it was about, which we determined by com- paring the count of male versus female pronouns over all reviews for that professor. This method was again effective, because the reviews are ex- 2Our method unfortunately could not take into account non-binary gender identities, as it relied on she/her and he/his pronouns, and could not easily integrate the singular they/them, nor could we find sufficient examples of ze/zir or other non-binary pronouns in our data. That said, we will continue striving towards better inclusion, and hope in future work to expand our methods beyond the binary. pressly written about a certain professor, so the pronouns typically resolve to that professor. In addition to extracting the text of the articles or reviews, for each dataset we also collected var- ious useful metadata. For the celebrity dataset, we recorded each article's timestamp and the name of the author, if available. Storing author names creates the potential to examine the relationship between the gender of the author and the gender of the subject, such as asking if there are differ- ences between how women write about men and how men write about men. In this work, we did not yet pursue this direction because we wanted to begin with a simpler question of how gender is discussed: regardless of the gender of the au- thors, what is the content being put forth and con- sumed? Furthermore, we were unable to extract author gender in the professor dataset since the RMP reviews are anonymous. However, in future work, we may explore the influence of author gen- der in the celebrity dataset. For the professor dataset, we captured metadata such as each review's rating, which indicates how the student feels about the professor on a scale of AWFUL to AWESOME. This additional variable in our data creates the option in future work to factor in sentiment; for example, we could study whether there are differences in language used when criticizing a female versus a male professor. 4 Inferring Word-Level Associations Our first goal was to discover words that are sig- nificantly associated with men or women in a given domain. We employed an approach used by Bamman et al. 2014 in their work to analyze dif- ferences in how men and women write on Twitter. 4.1 Methods First, to operationalize, we say that term i is as- sociated with gender j if, when discussing indi- viduals of gender j, i is used with unusual fre- quency -- which we can check with statistical hy- pothesis tests. Let fi represent the likelihood of i appearing when discussing women or men. fi is unknown, but we can model the distribution of all possible fi using the corpus of texts that we have from the domain. We construct a gender- balanced version of the corpus by randomly un- dersampling the more prevalent gender until the proportions of each gender are equal. Assuming a non-informative prior distribution on fi, the pos- Female-Associated girl, cover, husband, wedding, gown, fash- ion, mom, pregnancy, photo, top, hair, look rec- respond, email, ommend, help, love, accept, need, send, re- ply, communicate easy, rude, wonder- ful, kind, caring, hot, strict, timely, mean, disorganized, beautiful teach, lecture, Male-Associated movie, president, wife, dad, death, film, host, assault, claim, miscon- duct, action, director know, learn, write, chal- lenge, solve, ramble, push, joke, bore real, knowledgeable, challenging, bril- liant, arrogant, hard, passionate, practical Table 2: Top: Sample from the top-25 most gender- associated nouns in the celebrity domain. Middle: pro- fessor domain, sample from top-25 verbs. Bottom: professor domain, sample from top-25 adjectives. All associations listed are p ≤ 0.05, with Bonferroni cor- rection. See Appendix for all top-25 nouns, verbs, and adjectives for both genders in both domains. terior distribution is Beta(ki, N − ki), where ki is the count of i in the gender-balanced corpus and N is the total count of words in that corpus. As Bamman et al. 2014 discuss, "the distri- bution of the gender-specific counts can be de- scribed by an integral over all possible fi. This integral defines the Beta-Binomial distribution (Gelman et al., 2004), and has a closed form so- lution." We say that term i is significantly asso- ciated with gender j if the cumulative distribu- tion at kij (the count of i in the j portion of the gender-balanced corpus) is p ≤ 0.05. As in the original work, we apply the Bonferroni correction (Dunn, 1961) for multiple comparisons because we are computing statistical tests for thousands of hypotheses. 4.2 Findings We applied this method to discover gender- In Table 2, associated words in both domains. we present a sample of the most gender-associated nouns from the celebrity domain. Several themes emerge: for example, female celebrities seem to be more associated with appearance ("gown," "photo," "hair," "look"), while male celebrities are more associated with creating content ("movie," "film," "host," "director"). This echoes real-world trends: for instance, on the red carpet, actresses tend to be asked more questions about their ap- pearance - what brands they are wearing, how long it took to get ready, etc. - while actors are asked questions about their careers and creative processes (as an example, see Selby 2014). Table 2 also includes some of the most gender- associated verbs and adjectives from the professor domain. Female CS professors seem to be praised for being communicative and personal with stu- dents ("respond," "communicate," "kind," "car- ing"), while male CS professors are recognized for being knowledgeable and challenging the stu- dents ("teach,", "challenge," "brilliant," "practi- cal"). These trends are well-supported by so- cial science literature, which has found that fe- male teachers are praised for "personalizing" in- struction and interacting extensively with students, while male teachers are praised for using "teacher as expert" styles that showcase mastery of material (Statham et al., 1991). These findings establish that there are clear dif- ferences in how people talk about women and men -- even with Bonferroni correction, there are still over 500 significantly gender-associated nouns, verbs, and adjectives in the celebrity domain and over 200 in the professor domain. Furthermore, the results in both domains align with prior stud- ies and real world trends, which validates that our methods can capture meaningful patterns and innovatively provide evidence at the large-scale. This analysis also hints that it can be helpful to abstract from words to topics to recognize higher- level patterns of gender associations, which moti- vates our next section on clustering. 5 Clustering & Cluster Labeling With word-level associations in hand, our next goals were to discover coherent clusters among the words and to automatically label those clusters. 5.1 Methods First, we trained domain-specific word embed- dings using the Word2Vec (Mikolov et al., 2013) CBOW model (w ∈ R100). Then, we used k- means clustering to cluster the embeddings of the gender-associated words. Since k-means may con- verge at local optima, we ran the algorithm 50 times and kept the model with the lowest sum of squared errors. To automatically label the clusters, we com- bined the grounded knowledge of WordNet (Miller, 1995) and context-sensitive strengths of domain-specific word embeddings. Our algo- rithm is similar to Poostchi and Piccardi 2018's approach, but we extend their method by introduc- ing domain-specific word embeddings for cluster- ing as well as a new technique for sense disam- biguation. Given a cluster, our algorithm proceeds with the following three steps: 1. Sense disambiguation: The goal is to as- sign each cluster word to one of its WordNet synsets; let S represent the collection of cho- sen synsets. We know that these words have been clustered in domain-specific embedding space, which means that in the context of the domain, these words are very close semanti- cally. Thus, we choose S ∗ that minimizes the total distance between its synsets. 2. Candidate label generation: In this step, we generate L, the set of possible cluster labels. Our approach is simple: we take the union of all hypernyms of the synsets in S ∗. 3. Candidate label ranking: Here, we rank the synsets in L. We want labels that are as close to all of the synsets in S ∗ as possible; thus, we score the candidate labels by the sum of their distances to each synset in S ∗ and we rank them from least to most distance. In steps 1 and 3, we use WordNet pathwise dis- tance, but we encourage the exploration of other distance representations as well. 5.2 Findings Table 3 displays a sample of our results -- we find that the clusters are coherent in context and the la- bels seem reasonable. In the next section, we dis- cuss human evaluations that we conducted to more rigorously evaluate the output, but first we discuss the value of these methods toward analysis. At the word-level, we hypothesized that in the celebrity domain, women were more associated with appearance and men with creating content. Now, we can validate those hypotheses against la- beled clusters -- indeed, there is a cluster labeled clothing that is 100% female (i.e. 100% words are female-associated), and a 80% male cluster labeled movie. Likewise, in the professor do- main, we had guessed that women are associated with communication and men with knowledge, and there is a 100% female cluster labeled commu- nication and a 89% male cluster labeled cognition. Thus, cluster labeling proves to be very effective at Domain Celeb Professor Sample Words in Cluster gown, top, dress, pant, skirt, neckline film, release, role, character, project boyfriend, beau, hubby, wife, girlfriend response, email, contact, answer material, concept, topic, stuff, subject teacher, woman, lady, prof, guy, dude F:M Top 3 Pred. Cluster Labels 25:0 4:16 15:7 13:0 1:8 5:7 covering, cloth covering, clothing movie, show, event lover, person, relative statement, message, communication content, idea, cognition man, adult, woman Table 3: Sample of our clusters and predicted cluster labels. We include in the Appendix a more comprehensive table of our results. F:M refers to the ratio of female-associated to male-associated words in the cluster. pulling out the patterns that we believed we saw at the word-level, but could not formally validate. The clusters we mentioned so far all lean heav- ily toward one gender association or the other, but some clusters are interesting precisely be- cause they do not lean heavily -- this allows us to see where semantic groupings do not align exactly with gender association. For example, in the celebrity domain, there is a cluster la- beled lover that has a mix of female-associated words ("boyfriend," "beau," "hubby") and male- associated words ("wife," "girlfriend"). Jointly leveraging cluster labels and gender associations allows us to see that in the semantic context of hav- ing a lover, women are typically associated with male figures and men with female figures, which reflects heteronormativity in society. whether the word falls under the concept. The concept is a potential cluster label and the word is either a word from that cluster or drawn ran- domly from the domain vocabulary. For a good label, the rate at which in-cluster words fall un- der the label should be much higher than the rate at which out-of-cluster words fall under. In our experiments, we tested the top 4 predicted labels and the centroid of the cluster as a strong base- line label. The centroid achieved an in-cluster rate of .60 and out-of-cluster rate of .18 (difference of .42). Our best performing predicted label achieved an in-cluster rate of .65 and an out-of-cluster rate of .04 (difference of .61), thus outperforming the centroid on both rates and increasing the gap be- tween rates by nearly 20 points. In the Appendix, we include more detailed results on both tasks. 6 Human Evaluations 7 Conclusion To test our clusters, we employed the Word In- trusion task (Chang et al., 2009). We present the annotator with five words -- four drawn from one cluster and one drawn randomly from the domain vocabulary -- and we ask them to pick out the in- truder. The intuition is that if the cluster is co- herent, then an observer should be able to identify the out-of-cluster word as the intruder. For both domains, we report results on all clusters and on the top 8, ranked by ascending normalized sum of squared errors, which can be seen as a prediction of coherence. In the celebrity domain, annotators identified the out-of-cluster word 73% of the time in the top-8 and 53% overall. In the professor do- main, annotators identified it 60% of the time in the top-8 and 49% overall. As expected, top-8 per- formance in both domains does considerably bet- ter than overall, but at all levels the precision is significantly above the random baseline of 20%. To test cluster labels, we present the annota- tor with a label and a word, and we ask them We have presented two substantial datasets and a novel integration of methods to automatically infer gender associations in language. We have demonstrated that in both datasets, there are clear differences in how people talk about women and men. Furthermore, we have shown that cluster- ing and cluster labeling are effective at identifying higher-level patterns of gender associations, and that our methods outperform strong baselines in human evaluations. In future work, we hope to use our findings to improve performance on tasks such as abusive language detection. We also hope to delve into finer-grained analyses, exploring how language around gender interacts with other vari- ables, such as sexual orientation or profession (e.g. actresses versus female athletes). Finally, we plan to continue widening the scope of our study -- for example, expanding our methods to include non-binary gender identities, evaluating changes in gender norms over time, and spreading to more domains, such as the political sphere. References Shlomo Argamon, Moshe Koppel, James Pennebaker, and Jonathan Schler. 2007. Mining the blogosphere: age, gender, and the varieties of self-expression. First Monday, 12(9). David Bamman, Jacob Eisenstein, and Tyler Schnoe- belen. 2014. Gender identity and lexical variation in social media. Journal of Sociolinguistics, 18(2). Tolga Bolukbasi, Kai-Wei Chang, James Zou, Venkatesh Saligrama, and Adam Kalai. 2016. Man is to computer programmer as woman is to home- maker? debiasing word embeddings. In NeurIPS. Constantinos Boulis and Mari Ostendorf. 2005. A quantitative analysis of lexical differences between genders in telephone conversations. In ACL. Mary Bucholtz and Kira Hall. 1995. Gender articu- lated: language and the socially constructed self. Routledge. Aylin Caliskan, Joanna J. Bryson, and Arvind Narayanan. 2017. Semantics derived automatically from language corpora contain human-like biases. Science, 356(6334). Deborah Cameron. 2008. The myth of mars and venus: do men and women really speak different lan- guages? Oxford University Press. Jonathan Chang, Sean Gerrish, Chong Wang, Jordan L. Boyd-Graber, and David M. Blei. 2009. Reading tea leaves: how humans interpret topic models. In NeurIPS. Dorottya Demszky, Nikhil Garg, Rob Voigt, James Zou, Matthew Gentzkow, Jesse Shapiro, and Dan Ju- rafsky. 2019. Analyzing polarization in social me- dia: method and application to tweets on 21 mass shootings. In NAACL. Olive Jean Dunn. 1961. Multiple comparisons among means. Journal of the American Statistical Associa- tion, 56(293). Penelope Eckert and Sally McConnell-Ginet. 2003. Language and gender. Cambridge University Press. Ethan Fast, Tina Vachovsky, and Michael Bernstein. 2016. Shirtless and dangerous: quantifying linguis- tic signals of gender bias in an online fiction writing community. In ICWSM. Liye Fu, Cristian Danescu-Niculescu-Mizil, and Lil- lian Lee. 2016. Tie-breaker: using language mod- els to quantify gender bias in sports journalism. In IJCAI Workshop on NLP Meets Journalism. Andrew Gelman, John B. Carlin, Hal S. Stern, and Donald B. Rubin. 2004. Bayesian data analysis. CRC Press/Chapman Hall. Hila Gonen and Yoav Goldberg. 2019. Lipstick on a pig: debiasing methods cover up systematic gender biases in word embeddings but do not remove them. In NAACL-HLT. Janet Holmes and Miriam Meyerhoff. 2003. The hand- book of language and gender. Blackwell Publish- ing. Akshita Jha and Radhika Mamidi. 2017. When does a compliment become sexist? analysis and classifi- cation of ambivalent sexism using twitter data. In ACL Workshop on NLP and Computational Social Science. David Jurgens, Yulia Tsvetkov, and Dan Jurafsky. 2017. Writer profiling without the writers text. In SocInfo. Robin Lakoff. 1973. Language and woman's place. Language in Society, 2(1). Christopher D. Manning, Prabhakar Raghavan, and Hinrich Schutze. 2008. Introduction to information retrieval. Cambridge University Press. Tomas Mikolov, Kai Chen, Gregory Corrado, and Jef- frey Dean. 2013. Efficient estimation of word repre- sentations in vector space. In ICLR Workshop. George A. Miller. 1995. Wordnet: a lexical database for english. Communications of the ACM, 38(11). Hanieh Poostchi and Massimo Piccardi. 2018. Cluster labeling by word embeddings and wordnet's hyper- nymy. In Australasian Language Technology Asso- ciation Workshop. Delip Rao, David Yarowsky, Abhishek Shreevats, and Manaswi Gupta. 2010. Classifying latent user at- tributes in twitter. In SMUC. Maarten Sap, Marcella Cindy Prasetio, Ari Holtzman, Hannah Rashkin, and Yejin Choi. 2017. Connota- tion frames of power and agency in modern films. In EMNLP. Jenn Selby. 2014. Cate blanchett calls out red carpet sexism: 'do you do this to the guys?'. In Independent. Anna Statham, Laurel Richardson, and Judith A. Cook. 1991. Gender and university teaching: a negotiated difference. SUNY Press. Deborah Tannen. 1990. You just dont understand: men and women in conversation. Ballantine Books. Nikhil Garg, Londa Schiebinger, Dan Jurafsky, and James Zou. 2018. Word embeddings quantify 100 years of gender and ethnic stereotypes. Proceedings of the National Academy of Sciences, 155(16). Rob Voigt, David Jurgens, Vinodkumar Prabhakaran, Dan Jurafsky, and Yulia Tsvetkov. 2018. Rtgender: a corpus for studying differential responses to gen- der. In LREC. for just the top 8, determined by ascending nor- malized sum of squares. Domain Celeb Celeb Prof. Prof. Level Top-8 Overall Top-8 Overall Precision Fleiss' κ .725 .527 .600 .488 .530 .314 .216 .212 Table 4: Results for Word Intrusion task. All results significantly outperform the random baseline of .20 (p ≤ 0.0001). Table 9 displays more detailed results for the cluster labeling task. As discussed in the main pa- per, we would like to see that the rate at which in- cluster words fall under the cluster label is much higher than the rate at which out-of-cluster words fall under. We tried the top 4 predicted labels, compared against the centroid as a baseline label. For each cluster, we tested labels against 10 in- cluster words and 3 out-of-cluster words; thus, we tested 65 questions (13 words x 5 labels) per clus- ter. Due to the high number of questions per clus- ter, we only tested 15 clusters -- the top 10 labeled in the celebrity domain and the top 5 labeled in the professor domain. We report results over all tested clusters, but broken down by label type (e.g. cen- troid or 2nd predicted label). Claudia Wagner, David Garcia, Mohsen Jadidi, and Markus Strohmaier. 2015. It's a man's wikipedia? assessing gender inequality in an online encyclope- dia. In ICWSM. Claudia Wagner, Eduardo Graells-Garrido, David Gar- cia, and Filippo Menczer. 2016. Women through the glass ceiling: gender asymmetries in wikipedia. EPJ Data Sci, 5(5). Zeerak Waseem and Dirk Hovy. 2016. Hateful sym- bols or hateful people? predictive features for hate speech detection on twitter. In NAACL-HLT. Steven Wilson, Yiting Shen, and Rada Mihalcea. 2018. Building and validating hierarchical lexicons with a case study on personal values. In SocInfo. Jieyu Zhao, Tianlu Wang, Mark Yatskar, Ryan Cot- terell, Vicente Ordonez, and Kai-Wei Chang. 2019. Gender bias in contextualized word embeddings. In NAACL-HLT. Jieyu Zhao, Yichao Zhou, Zeyu Li, Wei Wang, and Kai- Wei Chang. 2018. Learning gender-neutral word embeddings. In EMNLP. A Appendix We include here extended results for each of the stages of work that we covered in the main paper: findings for inferring word-level gender associa- tions (Tables 5 and 6), findings from clustering and cluster labeling (Tables 7 and 8), and results from our two evaluation tasks (Tables 4 and 9). Tables 5 -- 9 are on the following three pages. A.1 Word-Level Results Tables 5 and 6 provide the top 25 most significant female-associated and male-associated nouns, verbs, and adjectives in both domains. Gender association is determined using the method de- scribed in Section 4.1. A.2 Clustering and Cluster Labeling Results Tables 7 and 8 provide the clustering and clus- ter labeling results for the top-n clusters in each domain, ranked by ascending normalized sum of squared errors. During clustering, we set k to N 50 , where N was the number of embeddings being clustered. In the celebrity domain, this resulted in 45 clusters; in Table 7, we show the top 12. In the professor domain, this resulted in 16 clusters; in Table 8, we show the top 6. A.3 Human Evaluation Results Table 4 provides more detailed results for the Word Intrusion task. As in the main paper, we pro- vide the results in each domain for all clusters and Table 5: Top 25 most gender-associated nouns, verbs, and adjectives in the celebrity domain. Words are listed in order of decreasing significance, but all words fall under p ≤ 0.05, with Bonferroni correction. Nouns Verbs Adj. Female-Associated girl, eye, cover, star, sister, shoulder, husband, lady, baby, issue, wedding, actress, reality, daughter, carpet, gown, fashion, mom, pregnancy, photo, top, hair, look, outfit, mother caption, wear, look, keep, love, date, match, rock, use, accessorize, style, pair, feel, share, show, shop, fit, plunge, model, apply, reveal, flaunt, open, tone, color red, pink, pregnant, sexy, sheer, white, black, beautiful, stylish, nude, stun- ning, chic, natural, blonde, new, blue, sweet, glam, loose, hot, oversized, ca- sual, gorgeous, toned, little Male-Associated movie, actor, president, wife, dad, death, film, host, news, statement, father, girlfriend, man, assault, alle- gation, attorney, claim, investigation, misconduct, behavior, lawsuit, action, guy, director, harassment say, deny, accord, claim, accuse, allege, would, apologize, publish, fire, hear, play, come, continue, ask, involve, pass, replace, investigate, charge, win, rap, pay, state, sue sexual, consensual, inappropriate, fu- rious, guilty, alleged, oral, presiden- tial, late, republican, deadpool, many, financial, bad, political, public, false, russian, comic, non, dead, detailed, nu- merous, untrue, criminal Table 6: Top 25 most gender-associated nouns, verbs, and adjectives in the professor domain. Words are listed in order of decreasing significance, but all words fall under p ≤ 0.05, with Bonferroni correction, aside from the last three terms listed for Female-Associated Verbs and the last four terms listed for Male-Associated Verbs. Nouns Verbs Adj. instruction, Female-Associated class, work, teacher, person, woman, assignment, email, credit, week, step, direction, attitude, lady, instructor, date, response, discussion, sweetheart, communication, husband, point, group, mail, time take, would, respond, email, recom- mend, help, love, submit, miss, grade, treat, follow, complete, accept, hat, need, send, reply, turn, correct, com- municate, check, feel, wait, finish easy, helpful, nice, rude, online, due, wonderful, extra, sweet, kind, busy, caring, hot, late, strict, timely, annoy- ing, horrible, mean, quick, disorga- nized, pleasant, responsive, beautiful, lovely topic, lay, teach, Male-Associated material, concept, professor, exam, sense, joke, math, stuff, pro- gramming, world, department, lecture, prof, note, humor, guy, story, lecturer, curve, tangent, man, dude, genius, in- dustry learn, curve, talk, crack, know, write, lecture, challenge, want, relate, sleep, solve, ramble, push, start, entertain, joke, put, bore, mumble, base, cover, explain smart, good, knowledgeable, great, interesting, intelligent, difficult, real, funny, hilarious, boring, cool, dry, en- tertaining, favorite, challenging, bril- liant, arrogant, interested, hard, pas- sionate, old, tough, practical, excellent Table 7: Top 12 clusters out of 45 overall in the celebrity domain. Predicted labels are included if applicable -- we were only able to predict labels for clusters that contained nouns, since our clustering labeling algorithm relied on the noun taxonomy in WordNet. In the Sample Words in Cluster column, italics indicate female-associated terms, and non-italics indicate male-associated. F:M refers to the ratio of female-associated to male-associated words in the cluster. F:M Centroid Top 3 Pred. Cluster Labels 2:3 month time period, fundamental quan- tity, measure state, union, separation breakup man person, man, adult 10:2 snapshot photograph, representation, pic- ture N/A explain 6:0 1:7 7:3 1:5 5:0 1:5 Sample Words in Cluster month, day, year, decade, hour engagement, marriage, divorce, re- lationship, split, breakup woman, man, guy, people, some- one, anyone, one, person photo, post, pic, snap, selfie, image, snapshot, kiss, photograph, tribute reveal, gush, tell, explain, dish, ad- mit, say, recall, reply trophy, win, category, nominate, nomination, finalist exclusive, peek, sneak, glimpse, pre- view difference, allegation, claim, accu- sation, truth, lie accessorize, jewel, floral, embroider, pink, hat, veil, turtleneck, sequin, tiara, bodysuit girl, sister, baby, daughter, mom, pregnancy, dad, father, brother, son husband, boyfriend, beau, hubby, fi- ance, wife, girlfriend, finacee top, dress, pant, shoulder, gown, skirt, diamond, neckline, waist, bra sneaker, toe, finalist collection, condition, award preview look, sensing, screening accusation claim, assertion, statement 123:1 halter artifact, garment, covering 14:6 dad person, parent, mother 15:7 fiance lover, person, relative 25:0 blouse covering, cloth covering, cloth- ing Table 8: Top 6 clusters out of 16 overall in the professor domain. Same details as Table 7 apply. lady, professor, Sample Words in Cluster teacher, woman, prof, guy, lecturer, man, dude everything, material, concept, topic, stuff, tangent, subject, content respond, email, response, respon- sive, stuff, reply, contact, answer familiar, nerd, background, scientist, geek communicate, solve, explain, introduce, convey compassionate, lovely, amazing, sweet, understanding, hot, nice, passionate, funniest, smart, cool, in- spirational, intelligent, likable savvy, genius, teach, know, literate, learn, F:M Centroid Top 3 Pred. Cluster Labels 5:7 man, adult, woman prof 1:8 content content, idea, cognition 13:0 respond 5:10 geek statement, message, communi- cation person, expert, anomaly 1:18 simplify N/A 21:44 outgoing N/A Label Type In-Cluster Rate Out-of-Cluster Rate Difference Fleiss' κ Centroid 1st pred. label 2nd pred. label 3rd pred. label 4th pred. label .597 .621 .540 .653 .452 .178 .156 .200 .044 .111 .419 .465 .340 .609 .341 .322 .258 .256 .353 .261 Table 9: Results for cluster labeling task. The 3rd predicted label has a significantly lower out-of-cluster rate than the centroid and all the other predicted labels (p ≤ 0.02). The same label also slightly outperforms the centroid on the in-cluster rate, thus producing a much larger gap between rates than the centroid.
1707.07167
3
1707
2018-02-13T08:20:30
Attention-Based End-to-End Speech Recognition on Voice Search
[ "cs.CL", "cs.SD" ]
Recently, there has been a growing interest in end-to-end speech recognition that directly transcribes speech to text without any predefined alignments. In this paper, we explore the use of attention-based encoder-decoder model for Mandarin speech recognition on a voice search task. Previous attempts have shown that applying attention-based encoder-decoder to Mandarin speech recognition was quite difficult due to the logographic orthography of Mandarin, the large vocabulary and the conditional dependency of the attention model. In this paper, we use character embedding to deal with the large vocabulary. Several tricks are used for effective model training, including L2 regularization, Gaussian weight noise and frame skipping. We compare two attention mechanisms and use attention smoothing to cover long context in the attention model. Taken together, these tricks allow us to finally achieve a character error rate (CER) of 3.58% and a sentence error rate (SER) of 7.43% on the MiTV voice search dataset. While together with a trigram language model, CER and SER reach 2.81% and 5.77%, respectively.
cs.CL
cs
ATTENTION-BASED END-TO-END SPEECH RECOGNITION ON VOICE SEARCH Changhao Shan1,2, Junbo Zhang2, Yujun Wang2, Lei Xie1 1Shaanxi Provincial Key Laboratory of Speech and Image Information Processing, School of Computer Science, Northwestern Polytechnical University, Xi'an, China {shanchanghao, zhangjunbo, wangyujun}@xiaomi.com, [email protected] 2Xiaomi Inc., Beijing, China 8 1 0 2 b e F 3 1 ] L C . s c [ 3 v 7 6 1 7 0 . 7 0 7 1 : v i X r a ABSTRACT Recently, there has been a growing interest in end-to-end speech recognition that directly transcribes speech to text without any predefined alignments. In this paper, we explore the use of attention-based encoder-decoder model for Man- darin speech recognition on a voice search task. Previous attempts have shown that applying attention-based encoder- decoder to Mandarin speech recognition was quite difficult due to the logographic orthography of Mandarin, the large vocabulary and the conditional dependency of the attention model. In this paper, we use character embedding to deal with the large vocabulary. Several tricks are used for effective model training, including L2 regularization, Gaussian weight noise and frame skipping. We compare two attention mech- anisms and use attention smoothing to cover long context in the attention model. Taken together, these tricks allow us to finally achieve a character error rate (CER) of 3.58% and a sentence error rate (SER) of 7.43% on the MiTV voice search dataset. While together with a trigram language model, CER and SER reach 2.81% and 5.77%, respectively. Index Terms- automatic speech recognition, end-to-end speech recognition, attention model, voice search 1. INTRODUCTION Voice search (VS) allows users to acquire information by a simple voice command. It has become a dominating function on various devices such as smart phones, speakers and TVs, etc. Automatic speech recognition (ASR) is the first step for a voice search task and thus its performance highly affects the user experience. Deep Neural Networks (DNNs) have shown tremendous success and are widely used in ASR, usually in combination with Hidden Markov Models (HMMs) [12, 9, 21]. These systems are based on a complicated architecture with sev- eral separate components, including acoustic, phonetic and language models, which are usually trained separately, each with a different objective. Recently, some end-to-end neu- ral network ASR approaches, such as connectionist temporal classification (CTC) [11, 1, 17] and attention-based encoder- decoder [6, 8, 3, 4, 5, 14, 23, 7], have emerged. These end- to-end trained systems directly map the input acoustic speech to grapheme (or word) sequences and the acoustic, pronunci- ation, and language modeling components are trained jointly in a single system. Attention-based models have become increasingly popu- lar and with delightful performances on various sequence-to- sequence tasks, such as machine translation [2], text summa- rization [20], image captioning [22] and speech recognition. In speech recognition, the attention-based approaches usually consist of an encoder network, which maps the input acoustic speech into a higher-level representation, and an attention- based decoder that predicts the next output symbol condi- tioned on the sequence of previous predictions. A recent com- parison of sequence-to-sequence models for speech recogni- tion [19] has shown that Listen, Attend and Spell (LAS) [4], a typical attention-based approach, offered improvements over other sequence-to-sequence models. Attention-based encoder-decoder performs considerably well in English speech recognition [7] and many attempts have been proposed to further optimize the model [8, 23]. However, applying attention-based encoder-decoder to Man- darin was found quite problematic. In [5], Chan et. al. have pointed out that the attention model is difficult to converge with Mandarin data due to the logographic orthography of Mandarin, the large vocabulary and the conditional depen- dency of the attention model. They have proposed a joint Mandarin Character-Pinyin model but with limited success: the character error rate (CER) is as high as 59.3% on GALE broadcast news corpus. In this paper, we aim to improve the LAS approach for Mandarin speech recognition on a voice search task. Instead of using joint Character-Pinyin model, we directly use Chinese characters as network output. Specifically, we map the one-hot character representation to an embedding vector via a neural network layer. We also use several tricks for effective model training, including L2 regularization [13], Gaussian weight noise [15] and frame skipping [18]. We compare two attention mechanisms and use attention smoothing to cover long context in the attention model. Taken together, these tricks allow us to finally achieve a promising result on a Mandarin voice search task. 2. LISTEN, ATTEND AND SPELL Listen, Attend and Spell (LAS) [4] is an attention-based encoder-decoder network which is often used to deal with variable-length input to variable-length output mapping prob- lems. The encoder (the Listen module) extracts a higher-level feature representation (i.e., an embedding) from the input features. Then the attention mechanism (the Attend module) determines which encoder features should be attended in or- der to predict the next output symbol, resulting in a context vector. Finally, the decoder (the Spell module) takes the attention context vector and an embedding of the previous prediction to generate a prediction of the next output. Specifically, in Fig. 1, the encoder we used is a bidirec- tional long short term memory (BLSTM) recurrent neural net- work (RNN) that generates a high-level feature representation sequence h = (h1, ..., hT ) from the input time-frequency rep- resentation sequence of speech x: h = Listen(x) (1) Fig. 1. The encoder model is a BLSTM that extracts h from input x. Frame skipping is employed during training. In Fig. 2, the AttendAndSpell is an attention-based trans- ducer: p(yx) = AttendAndSpell(y, h). (2) In practice, the process predicts the character yi at a time ac- cording to the probability distribution: p(yix, yi−1,··· , y1) = CharacterDist(si, ci), (3) where si is an LSTM hidden state for time i, computed by si = DecodeRN N ([yi−1, ci−1], si−1), and the context vector ci = AttentionContext(si, h). (4) (5) The DecodeRN N is a unidirectional LSTM RNN which pro- duces a transducer state si and the AttentionContext gener- ates context ci with a multi-layer perceptron (MLP) attention network. Finally, the probability distribution CharacterDist is computed by a softmax function. 3. METHODS In this section, we detail the tricks we used in LAS-based speech recognition for the Mandarin voice search task. 3.1. Embedding and regularization Chinese has a large set of characters and even the number of frequently-used characters can reach 3,500. Chan et. al. [5] have pointed out that the large vocabulary with limited train- ing data made the model difficult to learn and generalize well. This means that, for an end-to-end Mandarin system that di- rectly outputs characters, it is critical to use an appropriate embedding to ensure the converge of the model. Fig. 2. The AttendAndSpell model composed by MLP (the Attention mechanism) and LSTM (the Decoder model). In this paper, we first represent each character in a one- hot scheme and further embed it to a vector using neural net- work. Specifically, in Fig. 2, a fully-connected embedding layer (shaded circle) is used to connect the one-hot input and the subsequent BLSTM layer of the LAS encoder. The weight matrix We of the character embedding layer is updated in the whole LAS model training procedure. The embedding layer works as follows. Assume the size of the vocabulary is n and the dimension of the embedding layer is m. Then the weight matrix We is of size n × m. When the character's index is i, the embedding layer will pass the ith row of We to the sub- sequent encoder. That is, it acts as a lookup-table, making the training procedure more efficient. We find that this simple character embedding provides significant benefit to the model convergence and robustness. The LAS model often gives poor generalization to new data without regularizations. Thus two popular regularization tricks are used in this paper: L2 regularization and Gaussian x1x3x5x7x2T-1h2h3h4hTh1h = (h1, ,hT) <sos>y2y3y4yL-1y4y5y2y3<eos>s3Initial stateh = (h1,h2, ,hT)s2c2c2 weight noise [13, 15]. 3.2. Attention mechanism The attention mechanism selects (or weights) the input frames to generate the next output element. In this study, we com- pared the content-based attention and the location-based at- tention. Content-based attention: Borrowed from neural ma- chine translation [2], content-based attention can be directly used in speech recognition. Here, the context vector ci is computed as a weighted sum of hi: T(cid:88) j=1 ci = αi,jhj. T(cid:88) (6) (7) The weight αi,j of each hj is computed by αi,j = exp(ei,j)/ exp(ei,j), j=1 where ei,j = Score(si−1, hj). (8) Here the Score is an MLP network which measures how well the inputs around position j and the output at position i match. It is based on the LSTM hidden state si−1 and hj of the input sentence. Specifically, it can be further described by ei,j = w(cid:62)tanh(Wsi−1 + Vhj + b), (9) where w and b are vectors, and W and V are matrices. Location-based attention: In [8], location-awareness was added to the attention mechanism to better fit the speech recognition task. Specifically, the content-based attention mechanism is extended by making it take into account the alignment at the previous step. k vectors fi,j are extracted for every position j of the previous alignment αi−1 by convolv- ing it with a matrix F: fi = F ∗ αi−1. By adding fij, the scoring mechanism is changed to ei,j = w(cid:62)tanh(Wsi−1 + Vhj + Uf ij + b). 3.3. Attention smoothing (10) (11) We found that long context information is important for the voice search task. Hence we explore attention smoothing to get longer context in the attention mechanism. When the input sequence h is long, the αi distribution is typically very sharp on convergence, and thus it focuses on only a few frames of h. To keep the diversity of the model, similar to [8], we replace the softmax function in Eq. (7) with the logistic sigmoid σ: αi,j = σ(ei,j). (12) C = −(cid:88) 3.4. Frame skipping Frame skipping is a simple-but-effective trick that has been previously used for fast model training and decoding [18]. As training BLSTM is notoriously time-consuming, we borrow this idea in the training of LAS encoder which is BLSTM. As our task does not consider online decoding, we use all frames to generate the context h during decoding. 3.5. Language model At each time step, the decoder generates a character de- pending on the previous ones, similar to the mechanism of a language model (LM). Therefore, the attention model works pretty good without using any explicit language model. How- ever, the model itself is insufficient to learn a complex lan- guage model [3]. Hence we build a character-level language model T from a word-level language model G that is trained using the training transcripts and a lexicon L that simply spells out the characters of each word. In other words, the in- put of L is characters and output is words. More specifically, we build a finite state transducer (FST) T = min(det(L◦G)) to calculate the log-probability for the character sequences. We add T to the cost of decoder's output: [log p(yix, yi−1,··· , y1) + γT ] (13) i During decoding, we minimize the cost C which combines the attention-based model and the external language model with a tunable parameter γ. 4. EXPERIMENTS 4.1. Data We used a 3000-hour dataset for LAS model training, which contains approximately 4M voice search utterances, collected from the microphone on the MiTV remote controller. The dataset was composed of diverse search entries on popular TV programs, movies, songs and personal names (e.g. movie stars). The test set and held-out validation set were also from the MiTV voice search and each was composed of 3,000 utter- ances. As input features, we used 80 Mel-scale filterbank co- efficients computed every 10ms with delta and delta-delta ac- celeration coefficients. Mean and variance normalization was conducted for each speaker. For the decoder model, we used 6,925 labels: 6,922 common Chinese characters, unknown to- ken and sentence start and end tokens (<sos>/<eos>). 4.2. Training We trained LAS models, in which the encoder was a 3-layer BLSTM with 256 LSTM units per-direction (or 512 in total) and the decoder was a 1-layer LSTM with 256 LSTM units. All the weight matrices were initialized with the normalized Table 1. Results of our attention-based models with a beam size of 30, τ = 2 and γ = 0.1. model CT C Content based attention + trigram LM Location based attention + trigram LM Attention smoothing + trigram LM CER/% SER/% 14.57 5.29 4.05 9.10 7.20 3.60 8.17 3.82 6.33 3.26 7.43 3.58 2.81 5.77 Fig. 3. The effect of the decoding beam width for the content- based attention and attention smoothing (τ = 1). initialization [10] and the bias vectors were initialized to 0. Gradient norm clipping to 1 was applied, together with Gaus- sian weight noise and L2 weight decay 1e-5. We used ADAM as the optimization method [16] while we decayed the learn- ing rate from 1e-3 to 1e-4 after it converged. The softmax output and the cross entropy cost were combined as the model cost. Frame skipping was used in the encoder during training. For comparison, we also constructed a CTC model that has the same structure with the the LAS encoder. 4.3. Decoding We used a simple left-to-right beam search algorithm during decoding [8]. We invesitaged the importance of the beam- search width on decoding accuracy [8] and the impact of the temperature of the softmax function [5]. The temperature can smooth the distribution of characters. We changed the charac- ter probability distribution by a temperature hyperparameter τ: (cid:88) yt = exp(ot/τ )/ exp(oj/τ ). (14) where ot is the input of the softmax function. j 4.4. Results Fig. 4. The impact of the temperature for content-based at- tention and attention smoothing (beam-size=30). a SER of 8.17%, which outperformed the content-based at- tention model. By using attention smoothing on the content- based attention model, the CER was reduced to 3.58% ( or 11.6% relative gain over the content-based attention). We believe that the improvement is mainly because the sigmoid function keeps the diversity of the model and smooths the fo- cus found by the attention mechanism. Fig. 3 shows the effect of the decoding beam width on the WER/SER for the test set. The CER reached the low- est (4.78%) at a beam width of 30. We cannot observe extra benefit when further increasing the beam width. In Fig. 4, we can see that attention smoothing achieves the best perfor- mance when τ = 2 and there is no additional benefits when we further increase the temperature. We see the same obser- vation on the validation set as well. Meanwhile, we inves- tigated the effect of adding language model. During decod- ing, with the help of a trigram LM that was trained using 4M voice search entries, further gains can be observed. Finally, attention smoothing + trigram LM achieved the lowest CER of 2.81%. This was obtained when γ = 0.1. 5. CONCLUSION In this paper, we reported our preliminary results on attention- based encoder-decoder for Mandarin speech recognition. With several tricks, our model finally achieves a CER of 3.58% and a SER of 7.43% on a Mandarin voice search task without a language model. Note that the voice search con- tent on MiTV is kind of limited with closed domains. In the future, we will further investigage our approach on general ASR tasks through public datasets. 6. ACKNOWLEDGMENTS Table 1 shows that our models performed extremely well in the Mandarin voice search task. The content-based attention model achieved a CER of 4.05% and a SER of 9.1%. The location-based attention model achieved a CER of 3.82% and The authors would like to thank the Xiaomi Deep Learning Team and MiAI SRE Team for Xiaomi Cloud-ML and GPU cluster support. We also thank Yu Zhang and Jian Li for help- ful comments and suggestions. 7. REFERENCES [1] D. Amodei, S. Ananthanarayanan, R. Anubhai, J. Bai, E. Battenberg, C. Case, J. Casper, B. Catanzaro, Q. Cheng, G. Chen et al., "Deep speech 2: End-to-end speech recognition in English and Mandarin," in ICML, 2016, pp. 173–182. [2] D. Bahdanau, K. Cho, and Y. Bengio, "Neural machine translation by jointly learning to align and translate," arXiv preprint arXiv:1409.0473, 2014. [3] D. Bahdanau, J. Chorowski, D. Serdyuk, P. Brakel, and Y. Bengio, "End-to-end attention-based large vocabu- lary speech recognition," in ICASSP. IEEE, 2016, pp. 4945–4949. [4] W. Chan, N. Jaitly, Q. Le, and O. Vinyals, "Listen, at- tend and spell: A neural network for large vocabulary conversational speech recognition," in ICASSP. IEEE, 2016, pp. 4960–4964. [5] W. Chan and I. Lane, "On online attention-based speech recognition and joint Mandarin character-pinyin train- ing." in INTERSPEECH, 2016, pp. 3404–3408. [6] J. Chorowski, D. Bahdanau, K. Cho, and Y. Ben- gio, "End-to-end continuous speech recognition us- ing attention-based recurrent NN: first results," arXiv preprint arXiv:1412.1602, 2014. [7] J. Chorowski and N. Jaitly, "Towards better decoding and language model integration in sequence to sequence models," arXiv preprint arXiv:1612.02695, 2016. [8] J. K. Chorowski, D. Bahdanau, D. Serdyuk, K. Cho, and Y. Bengio, "Attention-based models for speech recog- nition," in Advances in Neural Information Processing Systems, 2015, pp. 577–585. [9] L. Deng, J. Li, J. Huang, K. Yao, D. Yu, F. Seide, M. Seltzer, G. Zweig, X. He, J. Williams et al., "Re- cent advances in deep learning for speech research at Microsoft," in ICASSP.IEEE, 2013, pp. 8604–8608. [10] X. Glorot and Y. Bengio, "Understanding the difficulty of training deep feedforward neural networks," in Pro- ceedings of the 13rd International Conference on Artifi- cial Intelligence and Statistics, 2010, pp. 249–256. [11] A. Graves, S. Fern´andez, F. Gomez, and J. Schmidhuber, "Connectionist temporal classification: labelling unseg- mented sequence data with recurrent neural networks," in ICML.ACM, 2006, pp. 369–376. [12] G. Hinton, L. Deng, D. Yu, G. E. Dahl, A. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath et al., "Deep neural networks for acoustic mod- eling in speech recognition: The shared views of four research groups," IEEE Signal Processing Magazine, vol. 29, no. 6, pp. 82–97, 2012. [13] G. E. Hinton and D. Van Camp, "Keeping the neural networks simple by minimizing the description length of the weights," in Proceedings of the sixth annual con- ference on Computational learning theory. ACM, 1993, pp. 5–13. [14] T. Hori, S. Watanabe, Y. Zhang, and W. Chan, "Ad- vances in joint CTC-attention based end-to-end speech recognition with a deep CNN encoder and RNN-LM," arXiv preprint arXiv:1706.02737, 2017. [15] K. Jim, C. L. Giles, and B. G. Horne, "An analysis of noise in recurrent neural networks: convergence and generalization," IEEE Transactions on neural networks, vol. 7, no. 6, pp. 1424–1438, 1996. [16] D. Kingma and J. Ba, "Adam: A method for stochastic optimization," arXiv preprint arXiv:1412.6980, 2014. [17] Y. Miao, M. Gowayyed, and F. Metze, "Eesen: End- to-end speech recognition using deep RNN models and WFST-based decoding," in ASRU.IEEE, 2015, pp. 167– 174. [18] Y. Miao, J. Li, Y. Wang, S.-X. Zhang, and Y. Gong, "Simplifying long short-term memory acoustic models for fast training and decoding," in ICASSP. IEEE, 2016, pp. 2284–2288. [19] R. Prabhavalkar, K. Rao, T. N. Sainath, B. Li, L. John- son, and N. Jaitly, "A comparison of sequence-to- sequence models for speech recognition," in Inter- speech, 2017. [20] A. M. Rush, S. Chopra, and J. Weston, "A neural at- tention model for abstractive sentence summarization," arXiv preprint arXiv:1509.00685, 2015. [21] J. Schmidhuber, "Deep learning in neural networks: An overview," Neural networks, vol. 61, pp. 85–117, 2015. [22] K. Xu, J. Ba, R. Kiros, K. Cho, A. Courville, R. Salakhudinov, R. Zemel, and Y. Bengio, "Show, at- tend and tell: Neural image caption generation with vi- sual attention," in ICML, 2015, pp. 2048–2057. [23] Y. Zhang, W. Chan, and N. Jaitly, "Very deep convolu- tional networks for end-to-end speech recognition," in ICASSP.IEEE, 2017, pp. 4845–4849.
1312.6948
1
1312
2013-12-25T09:23:49
Description Logics based Formalization of Wh-Queries
[ "cs.CL", "cs.AI" ]
The problem of Natural Language Query Formalization (NLQF) is to translate a given user query in natural language (NL) into a formal language so that the semantic interpretation has equivalence with the NL interpretation. Formalization of NL queries enables logic based reasoning during information retrieval, database query, question-answering, etc. Formalization also helps in Web query normalization and indexing, query intent analysis, etc. In this paper we are proposing a Description Logics based formal methodology for wh-query intent (also called desire) identification and corresponding formal translation. We evaluated the scalability of our proposed formalism using Microsoft Encarta 98 query dataset and OWL-S TC v.4.0 dataset.
cs.CL
cs
Description Logics based Formalization of Wh-Queries Sourish Dasgupta Rupali KaPatel Ankur Padia Kushal Shah DA-IICT, India DA-IICT, India DA-IICT, India DA-IICT, India kushalshah40 padiaankur rupali.it.08 sourish_dasgupta @daiict.ac.in @gmail.com @gmail.com @daiict.ac.in interest in mining graph databases represented in RDF-like format. As a result several works have been proposed to translate NL query into SPARQL-like formalism [5-7, 18]. However, many of these works support at the most shallow lexico-syntactic query analysis extracting heuristic patterns which are then translated into SPARQL like queries. Many other approaches are ontology based where an external set of ontologies are required for mapping query tokens to the most probable formal concept (mostly RDF/RDFS/OWL represented) so as to link together the mapped tokens into a formal semantic graph structure (such as SPARQL, nRQL) [5-6, 18]. The graph structure is then matched with similar graphical for query representations of document content answering. However, ontology assisted NLQF heavily depends on the correctness and completeness of the external ontologies and may not be very accurate if the target information source is independent of the imported ontology set. Moreover, such RDF databases are nothing more than very light-weight knowledge bases with no high-end reasoning support required for knowledge discovery. Hence, if the target corpus is a formal knowledge base then SPARQL cannot serve as a suitable formal query language. ABSTRACT The problem of Natural Language Query Formalization (NLQF) is to translate a given user query in natural language (NL) into a formal language ( ) so that the semantic interpretation has equivalence with the NL interpretation. Formalization of NL queries enables logic based reasoning during information retrieval, database query, question-answering, etc. Formalization also helps in Web query normalization and indexing, query intent analysis, etc. In this paper we are proposing a Description Logics based formal methodology for wh-query intent (also called desire) identification and corresponding formal translation. We evaluated the scalability of our proposed formalism using Microsoft Encarta 98 query dataset and OWL-S TC v.4.0 dataset. Categories and Subject Descriptors I.2.4 [Knowledge Representation Formalism and Methods]: Representation (procedural and rule-based) General Terms Theory, Measurement, Performance. Keywords Query Formalization, Description Logics, Semantic Web . 1. INTRODUCTION Natural Language Query Formalization (NLQF) is a formal and systematic procedure of translating a user query in natural language into an expression in a formal language without losing the semantics of the user query. The choice of a formal language can range from SQL used in conventional DBMS to more advanced SPARQL for RDF graph based databases designed to support the Semantic Web. However, any translation process involves rigorous linguistic analysis of NL queries and constructing a formal semantic interpretation that is equivalent to the original query semantics. NLQF has a twofold effect. First, it helps in proper identification of the query intent (also called desire). Secondly, it formally defines the query intent in relation to other linguistic constituents of the query thereby providing a platform for logical reasoning based semantic information retrieval and question answering [1-2]. The biggest challenge involved in NLQF is to efficiently and accurately identify the innate desire and to understand the linguistic nuances during a translation process. A query may bear the same semantic content but may be structurally different. For an example, the query: "Who is the greatest crime novel writer?" is semantically equivalent to the query: "What is the name of the greatest author of crime novel?". It may also have the same grammatical structure but bear different semantics. NLQF has been a topic of intensive research in the database community. Most of the effort was concentrated in translating NL queries into formal representations suitable for database retrieval such as SQL [3-4]. More recent researches have shown a growing Other distributional hypothesis [8] based purely statistical approaches has also been proposed mostly for NL query processing which can hardly fall under NLQF [9-11]. One of the intrinsic problems of statistical approaches is that query goal (or desire/intention) detection is very difficult if linguistic analysis is ignored. Also information retrieval largely depends on similarity measure models that are mostly token co-occurrence based [12- 13]. Such co-occurrence analysis cannot guarantee semantic similarity with the query goal. In this paper we propose a deep linguistic analysis based semantic formalization framework for NL wh-queries in English. DL representation of queries provides the support to perform formal subsumption based reasoning over DL based knowledgebase for knowledge discovery. We show that such queries can be neatly called Query characterized structure, syntactic a into Characterization Template (QCT), covering most possible linguistically valid query variations. The primary aim of QCT is to identify the query desire and the relationship of the desire with the query input. This leads to the next step of accurate query formalization. However, such characterization is non-trivial and involves capturing positional nuances of query tokens correctly. We also show that a Description Logic (DL) [25] sub-language exists that has semantic equivalency with that of wh-queries. We have presented the salient rules for NL query to DL query translation. The proposed methodology is independent of any external ontology assistance. The scope of this paper is limited to wh- queries of six kinds: (i) what, (ii) which, (iii) who, (iv) when, (v) where, and (vi) non-procedural how. Our contribution in this paper is as follows: Table 11 NLQP System NLQ Type FL Ont. Lex. Aided Aided Target Corps L.A. UR Triple based Yes many Word Net [10] UR No LASSO UR [9] AquaLog [7] R C.Voc Key- word based patter ns Triple based Power- Aqua [24] Querix UR [6] PANTO UR [5] [23] UR Triple based SPAR QL Triple based SPAR QL DL based No No No ATIS TAN Word Net NL docs L- SPL Yes Word Net No No Sem. mark-up docs Distr. sem. docs Yes Word Net Selected set of Ont. L- SPL Yes Word Net Ont. POS TAG Yes NA Ont. POS TAG Masque/ R SQL No No RDBMS PTr. SQL [3] PRECISE UR SQL No [4] START UR [21] QCT based2 UR NL Ann. based DL based No No from DB MIT Lexico n Word Net ATIS PTr. Web corpus L- SPL NL docs POS TAG 1. A novel query desire-input dependency analysis theory, termed QCT, is proposed. 2. Proposing DL has a suitable candidate formal semantic theory for query formalization. 3. Evaluation in terms of characterization accuracy using Microsoft Encarta query dataset and query dataset built on OWL-S TC v.4.0 dataset. The paper is organized into the following sections: (i) related work outlining some of the major contributions in NL query processing, (ii) problem statement defining the problem of NLQF formally, (iii) Approach where query characterization and DL 1 NLQP: Natural Language Query Processing; FL: Formal Language; L-SPL: Lexico-Syntactic Pattern Learning; C. Voc.: Controlled Vocabulary; PTr.: Parse Tree; Ann.: Annotation; DB: Database; Ont.: Ontology; Lex: Lexicon; Corps: Corpus; L.A.: Linguistic Analysis; Sem.: Semantic 2 proposed DL based framework formalization has been discussed at length, and (iv) Evaluation in terms of characterization accuracy. 2. RELATED WORKS Various approaches for NL Query Formalization can be broadly classified into two main categories: (i) statistical learning based analysis, and (iii) lexico-syntactic analysis. Table 1 is an overview of various approaches for developing NLQP systems. We have categorized them on the basis of various parameters which differentiate them. One of those parameters is query nature which can be of two types: (i) restricted (R NL), and (ii) unrestricted (UR NL). Restricted NL based systems cannot accept queries of all linguistics forms and hence, provide query formulation only for NL queries that can be given through some sort of controlled vocabulary. Ontology aided systems import external ontologies as input for aiding NL queries into their respective formal representations. Lexicon aided systems use lexicons (or thesauri) for enriching NL query vocabulary which in turn aids in normalized query formalization. By target corpus we mean the resource from which the answer is expected. We see that systems in this respect can be either NL document corpus based or ontology based. In [10] author has tried to detect goal (i.e. desire) from the user’s NL query using Tree-Augmented Naive Bayes networks (TANs) for goal detection but this work is domain specific and semantic values are compromised here. In [14] a conversion tool which takes queries expressed in NL and an ontology as input and returns the appropriate formal queries. It uses WordNet to disambiguate the words and triple based model for formalization. The generated queries are then sent to the reasoner for querying the knowledge bases. In this work ontology to be queried is required to be chosen by user and it doesn’t support complex query formulation. In [15] an approach to Semantic Information Retrieval of semantically annotated documents, based on NL understanding of query, has been proposed. This work incorporates an OWL query ontology for SPARQL based inference. In [16] a nested CG (Conceptual Graph) language for formal representations of natural language queries has been proposed. In [17] a formal semantic analysis of object queries required for the modern object-oriented databases has been proposed. Unlike other object query languages, a number of realistic features including object identity, object creation and invocation of methods that need not terminate has been covered. A translation procedure from NL query into a formal language query such as SPARQL has been described in [18]. In this paper a user query is translated into SPARQL by choosing the most appropriate query from the prepared queries. Queries for the knowledge base and a set of corresponding normalized queries for the problem has been prepared beforehand and user’s query is mapped to one of query which is obtainable from the knowledge base. For relatively large knowledge base such WWW this may not be scalable approach. In [19] models of DP services as RDF views over a mediated (domain) ontology has been proposed. Each RDF view contains concepts and relations from the mediated ontology to capture the semantic relationships between input and output parameters. Query rewriting algorithms for processing queries over DP services and query mediator which automatically transforms a user’s query (during the query rewriting stage) into a composition of DP services. START [20] was the first online question-answering system which uses statistical NLP techniques and lexico-syntactic pattern matching. Another system called NLP-Reduce [21] was proposed which is also based on lexico-syntactic pattern matching. In this system query keywords are mapped with synonym enhanced triple stores in the target corpus. A key feature was that user queries can be phrases or complete queries and also need not be grammatically correct. A domain-independent system, called Querix, was proposed in [6] where full English questions had to be given which were then parsed for extracting triple patterns. These triples are extracted out of a prior query skeleton which is generated based on word categories. These triple patterns are then mapped onto the target knowledge base for match. A guided input NL search engine, called Ginseng, was proposed in [22]. 3. PROBLEM OVERVIEW The problem of NLQF involves 3 core tasks: Task 1: To choose a formal grammar that can generate the dependency structure (ex: parse tree) of the linguistic components of a given NL query accurately. language that has an Task 2: To select a formal interpretation such to one a one exists there that correspondence with the semantic interpretation of the formal grammar . Task 3: To model a representational equivalence function that takes in a query Q in and maps it to an expression in such that maximum semantic preservation is achieved. Such semantic preservation can be achieved through model-theoretic semantic constructions. should be consistent and should not generate expressions that are mutually inconsistent. Task 1 involves syntactic parsing of all valid NL queries. This is a challenging task since NL queries can be of varied forms with (a) similar syntactic structures but different semantics (ex: "Where is the capital of Florida?" - Answer: "28.5N, 81.3W" vs. "What is the capital of Florida?" - Answer: "Orlando") and (b) similar semantics but different syntactic structures (ex: "Where is the capital of Florida?" vs. "What is Orlando's location?" - Answer for both: "28.5N, 81.3W"). In the former case the queries should be characterized such that they have their corresponding formal language translation unique while in the latter case both the queries should have the same normalized formal language translation. Moreover, queries may not always be simple (i.e. no clausal constraint; ex: "Who are Alexandar's favorite Greek mythological heroes?") but can be complex (ex: "Who are the heroes of Greek mythology who were Alexander's favorite?") and compound ("Who are the heroes of Greek mythology and Alexander?"). Although structurally the queries are simple, complex and compound yet semantically they are the equivalent. Hence, they should have the same answer: "Achilles". This requires accurate part-of-speech tagging (POS tagger) and parse tree generation based on which a given NL query is fitted into a chosen characterization grammar. Task 2 consists of translation of the parsed queries into a formal language representation (usually the model-theoretic style). Just like task 1 formal translation is also not trivial since it involves: (i) resolution of several ambiguities and linguistic nuances including re-formulation and normalization of semantically equivalent NL queries having different structures, (ii) computational query resolution (ex: "How far is New York from Orlando?"), (iii) comparative/superlative query resolution (ex: "What is the highest mountain in Asia?"). The scope of this paper is limited to the wh- queries of the kinds: (i) what/which, (ii) who/whom/whose, (iii) where, (iv) when, and (v) how much. 3.1 Problem Definition in English model a transformation Given an NL wh-query function such that:   where: is the formalization of in the formal language  is the linguistic reading of English  is the semantic interpretation function of  4. APPROACH 4.1 Characterization (Task 1) Any user query has two primary linguistic components - (i) desire (or intent) of the query and (ii) input of the query. While the query desire is essentially what an answer needs to satisfy, the query input provides the satisfiability constraint on the desire. For an example, in the query: "What is the capital of USA?" while the desire is an instance of the entity Capital, the input is USA acts as a constraint imposed on the instance relating it to USA (and not just any other country/province). For task 1 (described in section 3.1) choosing a formal grammar theory serves as a basis for generating the parse tree of a query. Constructing semantics by applying a particular semantic theory over complicated (although sophisticated) parse trees is computationally expensive. We observed that since our chosen semantic theory is Description Logics (DL), where concepts are defined in terms of roles and their associations with other concepts (thus, forming subject- predicate-object triples), the primary objective of query parsing should be to identify the desire (which is the subject of the query), predicate, and input (which is the object of the query). Hence, a full-fledged parse tree is not necessary for the case. We developed a pseudo-grammar structure, called Query Characterization Template (QCT), intrinsic desire-input that captures the dependency structure in all forms of English factual queries (simple, complex, and compound). This dependency generates a unique QCT for each of the three forms. QCT is a pseudo- grammar in several senses: (i) the sequence of the lexicons of the original query can get changed after the characterization process, (ii) lexicons can get normalized into a standard form after characterization, and (iii) it does not give a generic set of rules to combine or split phrase structures but rather "fits in" queries of equivalent grammatical structure into one fixed template. We hereby define the wh-query and its three forms of as follows: Definition 1 (Wh-Query): A Wh-Query is a query that contains at least one of the following query tokens (or their equivalent lexical variations): what, which, who, whose, whom, when, where, how , why. What query can be: (i) definitional such as "What is a cat?" (expected answer: class definition), (ii) inclusion such as "What animals are mammals?" (expected answer: sub classes of mammal); (iii) instance retrieval such as "What is the capital of USA?" (expected answer: a city instance), (iv) class retrieval such as "What is Taj Mahal?" (expected answer: class of instance Taj Mahal), and (v) instance associated concept retrieval such as "What does John drink in the morning?" (expected answer: sub classes of drink that John has for morning). Which query is similar to What queries except that such queries cannot be definitional. Who query behaves sometimes as a Which query and sometimes as a What query with the special underpinning that the expected answer is related to either a named animal, or a person (or person group/organization). Definition 6 (Compound Query Wh-Query ): A Compound Wh- Query is a wh-query that consists of conjunctive/disjunctive lexicons between one or more simple wh-queries or complex wh- queries. When query can be: (i) absolute temporal such as "When is Thanksgiving?" (expected answer: a particular day of a month), and (ii) relative temporal such as "When will John arrive?" (expected answer can be: after/before some event). Example of compound wh-query is “What are the available car models of Volkswagen and their respective prices?”. In the following sub-sections the QCT of each of the three forms of sentences has been discussed at length. Where query can be: (i) absolute spatial such as "Where is the leaning tower of Pisa?" (expected answer: geographical location), and (ii) relative spatial such as "Where is the ball?" (expected answer can be: on/under/below/at some object). How query can be: (i) procedural such as "How is a flan made?"(expected answer: recipe or step-wise set of actions), (ii) state based such as "How is Joe?" (expected answer: current health status of Joe), (iii) quantitative such as "How much does the bag cost?" (expected answer: price), or (iv) computational such as "How far is Tampa from Miami?" (expected answer: computed distance). We do not consider procedural how in the scope of this paper. Why query is causal in nature such as "Why is the grass green?". We also leave out why queries from the scope of this paper. Definition 2 (Simple Wh-Query): A Simple Wh-Query is a wh- query that consists of a single and non-clausal query desire (explicit or implicit) and a single, unconstrained, and explicit query input. Example simple wh-query is "What is the capital of USA?". In this case the desire (Capital) is explicit, single, and unconstrained by any clausal phrase. The input (USA) is also explicit, single, and unconstrained by any clausal phrase. It should be noted that, as remarked earlier, the input is an implied constraint over the desire which is different than clausal constraint. Also, the desire may be implicit sometimes. For an example, in the query: "What is a tomb?" the implicit desire is the definition of Tomb (i.e. description of the class Tomb) while the unconstrained and single input is Tomb. Definition 3 (Complex Wh-Query): A Complex Wh-Query is a wh-query that consists of a single query desire (explicit or implicit) and multiple explicit query input. Definition 4 (Complex Non-Clausal Wh-Query): A Complex Non-Clausal Wh-Query is a complex wh-query that is clausal constraint free on both the query desire and the multiple query input. Example complex non-clausal query is "In which country is the state capital of Missouri located?". In this query the desire Country is unconstrained. There are two input (State Capital and Missouri) each of which is also unconstrained. Definition 5 (Complex Clausal Wh-Query): A Complex Clausal Wh-Query is a complex wh-query that consists of at least one clausal constraint on either the query desire or query input or both. Example complex clausal wh-query is "Who was the British Prime Minister who was elected two times one of which was during World War II?". In this query the single explicit desire is the (instance of the) class British Prime Minister having no clausal constraint. There are two query input: two times and World War II. Also, the first input two times has a clausal constraint "one of which was during …". 4.1.1 QCT of Simple Wh-Query A simple wh-query can be characterized according to the following structure: where: : second square bracket indicates optional component : Query desire class/instance - value restricted to {NN, NNP, JJ, RB, VBG}3 : Query input class/instance - value restricted to {NN, NNP, JJ, RB, VBG} : Auxiliary relation - includes variations of the set {is, is kind of, much, might be, does} : Relation that acts as (i) predicate of D as the subject and I as the object or (ii) action role of I as the actor - value restricted to {VB, PP, VB-PP}1 : Quantifier of D or I - values restricted to {DT}1. The * indicates that Q can recur before D or I. : Modifier of D or I - value restricted to set {NN, JJ, RB, VBG}. The * indicates that M can recur before D or I. We can observe that this QCT can cover all the linguistically valid 180 questions (excluding quantifiers and modifiers) according to the given definition of simple wh-query. is auxiliary role in the sense that it cannot act as a predicate of either the D or the I. However, serves as a good indicator for resolving several linguistic ambiguities. For an example, in a how query if is much (or its lexical variations) then it is a quantitative query while in a who query if is does (or its lexical variations) then the associated verb is an activity (i.e. Gerund; ex: "Who does singing?" - Singing is an activity in this case). is a relation that can either be associated with D as the subject or I as the subject but not both. If is positioned after D in the original query then s subject is D. For an example, in the simple query "What is the capital of USA?" the subject of (of) is D (Capital) and the object is I (USA). If is positioned after I in the original query then its subject is I. For an example, in the query "Which country is California located in?" the subject of (located in) is I (California) and object is D (Country). Table 2 lists some of the important simple wh-query characterization. 4.1.1.1 Implicit Desire Identification Implicit query desire implies that D is empty. This can happen if and only if the following query structures are found: 1. 3 Abbreviations follow the conventions of Penn Treebank POS tags. [30] Table 2 Table 4 Natural Language Wh-Simple Query What is the capital of Gujarat? Which is the highest mountain in world? How many legs does a millipede have? What are some dangerous plants? Where California? is Wh-Simple Query Characterization = 'What', = 'is', = 'the capital', = 'of', = 'Gujarat', [?] = 'Which', = 'is', = 'the highest mountain', = 'in', = 'world', [?] ='How many', = count('legs'), = 'does have', = 'millipede', [?] = = 'are', = 'What', 'dangerous plants', [?] = 'Where', = 'California', [?] 'is', = What is most populous the democracy in is Caribbean which geographically the largest as well? What the distance is between Missouri and Texas? Table 3 =what, =is, =the_most_p opulous_democracy, =the_Caribbean, =in, = =which, =is, geographically_the_largest? =what, =is =the_distance , =null, =between, =Misssouri, =Texas? =and, 2. 3. If does not exist then D is empty. If does not exist while exists then D is empty. For an example, in the query: "What is converted into diamond?" is identified to be is by default and is detected to be is converted into. However, there is no lexicon in between and (structure 3). Therefore, D is empty. Another case in which D always remains empty is when the wh- query is a where or a when query. This also holds true for complex and compound queries. For an example, in the query: "When is the next solar eclipse?" the query characterization is as: 4.1.1.2 Explicit Desire Identification As an extension to the observation the previous section we can conclude that any lexicon between and is D. For an example, in the simple query "What is the capital of USA?" is identified to be is and is detected to be of. Therefore, D is Capital. After D is identified the remaining lexicon is I. 4.1.2 QCT of Complex Wh-Query A complex Wh-query can be characterized according to4: Natural language Compound Wh-Query What happens when you potassium mix permanganate and glycerin? How long will an electric car run and how fast can it go? What is shape and size of baloon when air comes out? is travelling the What charge to Bombay and hotel_rent in Bombay? foremost the Who were authorities in discovering formulas, algebraic theorems, and/or expressions? Which volcanoes are active and which is which ones are dormant? Wh-Query Compound Characterization =null, =happ =what, ens(implicit =when, =mix, activity), =potassium = permanganate, =and, glycerine, =null? =will, =c =Howlong, ount(implicit), =potassi =mix, =null, = um permanganate, =and, glycerine? =is, =shape, =What, =size, =and, =null, =of, =baloon, =when, =comes_out, =air, = null? =is, =the_tra =What, velling_charge, =hotel_rent, =n =and, =in, =bombay ull, , =null? =were, =the_f =Who, oremost_authorities, =in_discoverying, =null, =,algebraic_formulas, theorems = , expressions, =null? =null, =volc =Which anoes, =are_active, =null, =,n ull, =null, =volc =Which anoes, =dormant, =null, =,nul l? where: : clausal lexicon (constraining D) : second clausal lexicon (constraining I1) : clausal lexicon associated with structure : conjunctive/disjunctive lexicon for I 4 Modifiers and quantifiers are not associated with D and I. They are associated in exactly the same way as QCT of simple queries. : query desire - value restricted to {NN, NNP, JJ, RB, VBG} : l-th query input k-th structure - value restricted to {NN, NNP, JJ, RB, VBG} : relation associated with the k-th clause that acts as (i) predicate of D as the subject and I as the object or (ii) action role of I as the actor - value restricted to {VB, PP, VB-PP} : modifier of the D or the I - value restricted to set {NN, JJ, RB, VBG}. The * indicates that M can recur before D or I. In this QCT we see the possible repetition of the structure . Within this structure there is an optional sub- that may add to the number of input structure within each of such structures. A clausal lexicon in a complex clausal wh-query is always associated with such a structure. The number of clausal lexicons is the same as the number of such structures in a given query. It should be noted that there must be at least two such structures for a query to qualify as complex. Also, clausal lexicons in the general case is optional and hence, the QCT also holds true for complex non-clausal wh-query. We name the following structure as clausal structure (CS): Example complex query characterization is given in table 3. The given QCT can cover 1800 linguistically valid complex queries (excluding quantifiers and modifiers). 4.1.3 QCT of Compound Wh-Query A compound Wh-query can be characterized according to: where: : Conjunctive/disjunctive lexicon for D : Conjunctive/disjunctive lexicon for wh-sub-query Compound query characterization example has been given in table 4. 4.2 DL as Formal Query Language (Task 2) In our approach we choose the formal language to be Description Logics (DL). As mentioned earlier we argue that most factual IS-A sentences have expressive equivalency in the DL language: where: Attributive Language – supports atomic concept definition, concept intersection, full value restriction, limited role restriction, and atomic concept negation. Union – supports concept union Existential – supports full role restriction Complement – supports concept negation Role Hierarchy – supports inclusion axioms of roles : Nominal – supports concept creation of unrecognized Named Entity : Role Inversion - supports inverse roles ( ): Data Type – supports range concepts to be data type The choice of DL over other semantic theories has several reasons: (i) DL is equivalent to the guarded fragment of FOPL and hence, is decidable [25], (ii) DL representation is compact and variable-free as compared to representations such as DRS [26] and LFT [27] making it comparatively easy to parse, (iii) the DL sub-language is tractable since we observed that most IS-A sentence interpretation is covered by , (iv) highly optimized semantic tableau based DL reasoners [28] are available as compared to slower hyper- resolution based theorem provers used in DRS or LFT based reasoning, (v) DL has direct mapping with the W3C recommended OWL format for web ontology5. Expressions in DL can represent two types of queries: (i) general queries such as "What is a synagogue?" (answer is a T-Box definition or inclusion axiom in the knowledgebase), and (ii) specific queries such as "What is the name of the highest mountain in Australia?" (the answer is an A-Box assertion in the knowledgebase). 4.3 DL Formalization (Task 3) As mentioned in the previous section, NL queries can be of two types in the context of DL: (i) T-Box queries and (ii) A-Box queries. T-Box queries can be: (i) definitional (ex: "What is a cat?", (ii) inclusion (ex: "What animals are mammals?"), and (iii) super class retrieval (ex: "What kind of animal is lion?". A-Box queries on the other hand can be: (i) instance retrieval ("Who resides in 221B Baker Street?", (ii) class retrieval (ex: "Who is Agatha Christie?", and (iii) instance associated concept retrieval ("What does John drink in the morning?"). Some queries are ambiguous and the linguistic reading may imply either T-Box definitional or A-Box instance retrieval (ex: "Who is a student?" - Answer 1: "John and Joe are students"; Answer 2: "A student is a person who studies in an educational institution .") We argue that correct and complete DL formalization of query implies that query processing (and hence, question-answering) can be formulated as either a T-Box subsumption reasoning or an A-Box retrieval reasoning over a knowledgebase. We do not include (i.e. concept negation) in this work since we exclude from the scope of this paper formalization of queries with negative clauses (such as "What is an animal called that cannot lay egg?"). 4.3.1 Base Translation Rules As discussed in section 4.1 we model any wh-query to have two components - desire and input. We also mentioned that QCT helps to establish desire-input dependency. From a DL formalization point of view such dependency identification naturally culminates to the DL definition of the desire in terms of the input. By definition we mean the model theoretic semantic interpretation of the description of a desire as constrained by the input. Given any simple wh-query Q having D, I, R2 the following translation rules always holds true: Base Rule 1.1: If is empty and I is not NNP or quantified then Base Rule 1.2: If is empty and I is NNP then otherwise: Base Rule 2.1: If subject of is and is not empty then 5 OWL DL is equivalent to while OWL 2 is equivalent . Base Rule 2.2: If subject of is and is not empty then Base Rule 3.1: If subject of is and I is NNP then otherwise: Base Rule 3.2: If subject of is and I is NNP then otherwise: where: Formalized desire Strongly formalized desire Weakly formalized desire Desire component identified in QCT Input component identified in QCT Relation component identified in QCT that is associated with D and I WordNet.getMSP: A method developed to get the most specific parent class from WordNet v 2.1. Base rule 1.1 is meant for T-Box queries in general except when the input is quantified (ex: "Who is the student?"). Strongly ) is an inclusion/definitional T-Box query formalized desire ( and requires more specific answers (i.e. sub-classes of I). Weakly ) is an generic T-Box query and can allow formalized desire ( less specific answers (i.e. super-classes of I is allowed). Base rules 2.1 and 2.2 are meant for A-Box queries. At an A-Box level the query formalism for rules 2.1 and 2.2 is: where ?x is the variable that belongs to the class . Rules 3.1 and 3.2 are meant for class retrieval queries and instance associated concept retrieval. Also rule 1.2 is class retrieval as well. All the above base rules can be extended automatically for complex and compound queries as well. The core extension rules are discussed in the next section. 4.3.2 Extension Translation Rules In this paper we discuss extension rules: (i) effect of modifiers, (ii) effect of clausal phrases, and (iii) effect of conjunctive and disjunctive phrases. 4.3.2.1 Effect of Modifier Normally, if a modifier in wh-query is a JJ or an NN then it modifies either an NN or an NNP. For an example, in the query: “Who are the tall students?” the JJ Tall modifies the input concept Student which is an NN. In such general cases it is evident that the concept TallStudent is a sub concept of the concept Student. An interesting phenomenon that can be observed for desire/input modification is what we term as recursive nested modification. In sentences where the subject modification is by a sequence of modifiers such as then a nested structure is assumed as: Here '( )' denotes scope of the modifier. Therefore, the scope of the inner most nested modifier M3 is the concept D. The scope of the modifier M2 is the sub-concept M3D formed as a result of the M3 modifying D. At the same time M2 also recursively modifies D to form the sub- concept M2D. Similarly M1 has the sub-concept M2M3D as scope of modification while in recursion modifies M3D and D. The T- Box rule for such recursive nested modification is as follows: Extension Rule (Recursive Nested Modification: 3-level nesting): ; ; 4.3.2.2 Effect of Clausal Phrases Complex wh-queries can be formalized by extending the base rule and extended rules of simple wh-queries. While formalization it is important to identify that whether the clausal constraint(s) is applied to desire or inputs. If it is an input constraint then which of the multiple inputs it is applied. This leads to a very important issue called query dependency problem. Query dependencies can be broadly classified as: Desire Dependency: In some clausal complex wh-query constraint is applied on the desire. For example, in the query “Which atomic bomb was dropped in Japan which had caused million people to die?” the desire is name or type of atomic bomb with constraint: the bomb caused million people to die and was dropped in Japan. If clausal phrase contains an attribute of the desire then we assume it is constraint on desire. The given example query is characterized as: . Here type of atomic bomb is desire and clausal constraint (i.e. atomic bomb causing millions people to die). Therefore, constraint is considered to be applied on desire, not on input. Attributes are associated with relations of lexical variations of the structure {'DESIRE which has', includes', 'DESIRE which 'DESIRE which is a'}. Input Dependency: If clausal phrase contains an attribute of the input then we assume it is constraint on input. For example, in the query “What is the price of SLR camera which has 3.2 megapixel resolution?” is characterized as: Here, “3.2 megapixel resolution” is a constraint input which is attribute of input “SLR camera”. Attributes are associated with relations of lexical variations of the structure {'INPUT which has', 'INPUT which includes', 'INPUT which is a'}. In this section generic DL transformation rule for all complex wh-queries are given. All constraints can be formulated as intersection of concepts/instance given in the query. Extension Rule 1 (Complex Query: Inclusion T-Box): An example query that requires this rule for translation is: "What are the kinds of animals which are vegetarians?". The corresponding equivalent DL is . Extension Rule 2 (Complex Query: Input Dependency): Extension Rule 3.1 (Complex Query: Desire Dependency): An interesting observation that we make is that if is empty while D is non empty and constrained then 's subject is D. For an example, in the query "What country which is in Europe has the largest population?" (has) has subject D (country) since is empty. In this case the extension rule is as follows: Extension Rule 3.2 (Complex Query: Empty ): ; 4.3.2.3 Effect of Conjunctive/Disjunctive Phrases To formalize the compound wh-queries, after the characterization process it is important to identify whether conjunctive/disjunctive phrase is applied on desire, input or relation. Compound queries can sometimes be split into simple queries and/or complex queries. They can then be formalized using simple query and complex query translation rules. We have defined the rules for cases when a given compound query can be split into conjunction of simple wh-queries.We have also done exhastive analysis of all possible structure of compound query structure by applying conjunctive/disjunctive lexicons between inputs, desires, relation. We concluded on 14 different forms of compound query. The main motivation to break the compound query into simple query is to increase the precision and recall of the knowledge discovery system. If we can break the compound query into separated simple queries then later on all separated queries can be fired in parallel and answer of all separated queires can be returned by applying union operation between them. We have also defined the cases where splitting is not possible and separate formalization rules have been defined for them. More details on this topic is beyond the scope of this paper due to lack of space. 4.3.3 Non-Trivial Translation Rules There are some queries whose semantic interpretation cannot be completely and correctly constructed in a straightforward way by applying a formal semantic theory. This is because of certain innate linguistic nuances that these queries carry that demand additional modification in the formal semantic representations. In the following sub sections we look into a few of such cases. 4.3.3.1 Problem of Empty Input In some queries the input can be empty. For an example, in the query "Who barks?" is a non-transitive verb with no explicit input as object. In such situation we need to do a reification of into its corresponding gerund sense and normalize the given NL query to the form where fr is the reification function. In the given example we can reformulate the query as "Who does barking?" and the corresponding DL rule is: Extension Rule (Empty Input): 4.3.3.2 Problem of Desire Inclusion Some inclusion queries may have desire that have may have an intersection with input. For an example, in the query "What kind of a water vehicle is also an air vehicle?". In such cases the base rule 1.1 is modified as: Extension Rule (Desire Inclusion): 4.3.3.3 Problem of Quantitative how-Query In how queries that are quantitative in nature (i.e. R1 = {much, many, etc}) we need to introduce a primitive concept Count and a primitive role hasCount where for any arbitrary satisfiable concept the following axiom holds: . The hasCount is mapped to a function called fcount that calculates the size of the instances of at any given point of time. For an example, in the query "How many people live in New York?" the count operator works on the desire people living in New York. The corresponding rule is: Extension Rule (Quantitative how): 4.3.3.4 Problem of Temporal Adverbial Modifier Some queries have temporal adverbial tokens such as in the query "What can be sometimes observed in the morning sky?" where R2 (observed in) is associated with a temporal adverbial modifier (sometimes). The problem with formalizing such queries is that the ontological validity of the desire is essentially temporal in nature. In other words, for the given example, if a particular planet is observed in the morning sky it is not so that it will always be observed (like the sun which we can observe every day). Hence, sun cannot be a candidate answer in this case. The rule for such queries is as follows: Extension Rule (Temporal Adverbial: sometimes): 4.3.3.5 Problem of Superlative Modifier In some queries superlative tokens are included such as in "What is the tallest mountain in Europe?". In such queries the desire is for a specific instance that has the optimal (maximal or minimal) degree of measurable modifier of the desire class. In the example tall is a measurable modifier whose superlative form is maximal height of all instances of the desire class Mountain. The height attribute of mountain is implicit in the given query. Keywords such as most and least are good indicators of deciding whether the computation has to be maximal or minimal. However, for suffix based superlative tokens (i.e. est) it is not so evident. The problem is how to know that tall+est has to maximized while low+est has to be minimized. We take a bootstrapping based approach with a seed bag of measurable modifiers (such as tall, long, big, low, high, large, wide, etc) and then mapped the bootstrapped keywords with corresponding plausible attributes (denoted AM). For an example we get pairs such as: ). Based on such pairing we then classify into positive modifiers (those the modifiers that requires maximization such as tall, wide, etc.) and negative modifiers (those that requires minimization such as low). The corresponding extension rule is: Extension Rule (Superlative Queries): where: Optimality function that returns Integer Datatype ( ). 5. EVALUATION 5.1 Evaluation Goal and Metric Our evaluation aim was to observe the accuracy of the proposed QCT. We leave the accuracy evaluation of the DL formalization as a future work since that requires indirect comparative testing in terms of mean average precision and recall on some of the cutting-edge knowledge discovery systems. However, it is to be understood that the accuracy of the DL formalization is intrinsically dependent on the accuracy of QCT. To evaluate QCT we decided on a simple Characterization Coverage (CC) measure. The measure is modeled to understand how many different linguistic forms of simple, complex and compound wh-queries in English can be identified correctly by QCT. We measure CC in three perspectives: (i) CC-Precision, (ii) CC-Recall, and (iii) CC-F1 score. We define them as follows: CC-Precision: Given a test set of NL queries the CC-Precision is calculated as the ratio of the number of correctly identified queries (NCI) and the total number of identified queries in the test set (N I). CC-Recall: Given a test set of NL queries the CC-Recall is calculated as the ratio of the number of correctly identified queries (NCI) and the total number of queries in the test set (N). CC-F1: The Simple Harmonic Mean of CC-Precision and CC- Recall is the CC-F1. 5.2 Experimental Results To evaluate CC of proposed work we have used the Microsoft Encarta 98 query test set [29] and OWL-S TC dataset. The Microsoft Question Answering Corpus (MSQA), which is aimed at querying documents belonging to the Encarta-98 encyclopedia. The test set contains 1365 usable English wh-queries. We excluded the queries of procedural how and why from this dataset. We have categorized simple, complex and compound queries from the dataset. There are total 473 queries of procedural how and why which are excluded. The reduced dataset consist of total 982 queries, which is distributed among 676 simple, 147 complex and 69 compound wh-queries. The accuracy statistics is given in table 5. We observe that the CC-Precision is 100% for all types of wh-queries while the overall CC-Recall is 94.50. The perfect precision shows that the QCT is theoretically sound. To validate our results with Encarta 98 dataset we also tested QCT on custom query dataset built on top of OWL-S TC v.4.0 dataset6. The OWL-S TC dataset consists of service descriptions of 1083 web services from 9 different domains. A service description is a formal specification of the behavior of a web service in terms of its required input parameters, given output parameters, and other binding parametric details for runtime execution. The description also contains a short NL narrative of the overall behavior. A query dataset for this corpus was developed by three research assistants. The task for each of these three assistants was to formulate a wh-query for every service such that the query desire matches the given output of the service and query input matches the required input of the service. Since this task was done independently we observed that almost in all cases the syntactic structuring of the query for a given service by each assistant was different. The queries were simple, complex, and compound with an average of 90% query of the form complex and compound. Ideally, the extracted query desire by QCT should be semantically equivalent the the output parameter of corresponding web service specification. Based on this notion we have calculated CC-precision, CC-recall and CC-F1 measure for each of the three query datasets. From table 6 we observed that the average recall was 98.77%, average precision 100% and average F1 was 98.92%. The results clearly validate the earlier results with Microsoft Encarta 98. 6. CONCLUSION In this paper we have a Description Logic based NL query formalization methodology. The motivation is to improve 6 http://projects.semwebcentral.org/projects/owls-tc/ Table 5.1 Query Types Nwh NI-wh NCI-wh CC- Re. CC- Pr. CC- F1 (%) (%) (%) Simple 676 642 642 94.97 100 97.42 Wh-Query Complex 147 140 140 95.23 100 97.55 Wh-Query Compound 69 64 64 92.75 100 96.23 Wh-Query Total 892 843 843 94.50 100 97.17 Table 5.2 Query Types Nwh NI-wh NCI-wh How What When Where Which Who Total 165 406 39 85 5 143 843 158 392 35 82 5 143 815 158 392 35 82 5 143 815 Table 6 CC- Re. CC- Pr. CC- F1 (%) (%) (%) 96.68 95.75 96.55 89.74 96.47 100 100 100 100 100 100 100 98.31 97.83 98.24 94.59 98.20 100 96.68 100 98.31 Query Types Nwh NI-wh NCI-wh CC- Re. CC- Pr. CC- F1 (%) (%) (%) 1083 1000 1000 97.65 1083 1083 997 1010 Total 3249 3007 997 1010 3007 97.36 98.63 97.88 100 100 100 100 98.81 98.66 99.31 98.92 accuracy of answer extraction from NL documents using formal logic based reasoning. We have proposed the basic DL translation rules along with some of the important derived rules that cover different kinds of linguistic nuances. We found promising results while evaluating DLQS-WhM with MS Encarta query test set and a query dataset built on top of OWL-S TC v.4.0 dataset. 7. REFERENCES [1] Pejtersen, A. M. 1998. Semantic information retrieval. Communications of the ACM. 41, 4 (April,1998) 90 – 92. [2] Moldovan, D., Clark, C., and Bowden, M. 2007. Lymba's PowerAnswer 4 In TREC-2007, Association for Computational Linguistics. [3] Androutsopoulos, I. , Ritchie, G. D. and Thanisch, P. 1993 MASQUE/SQL-An Efficient and Portable Natural Language Query Interface for Relational Databases. in Proceedings of the Sixth International Conference on Industrial and Engineering Applications of Artificial Intelligence and Expert Systems - IEA/AIE (Edinburgh, Scotland, 1993). [4] Popescu, A-M. and Etzioni, O. and Kautz, H. 2003Towards a theory of natural language interfaces to databases. in Proceedings of the 8th international conference on Intelligent user interfaces (Miami, USA, January 12 - 15, 2003). [5] Wang, C., Xiong, M., Zhou, Q. and Yu, Y. 2007. Panto: A portable natural language interface to ontologies. in Proceedings of the 4th European conference on the Semantic Web: Research and Applications (Innsbruck, Austria, June, 2007). [6] Kaufmann, E., Bernstein, A. and Zumstein, R. Querix. 2006. A Natural Language Interface to Query Ontologies Based on Clarification Dialogs. in International Symposium on Wearable Computers - ISWC (Montreux, Switzerland, October 11 - 14, 2006). [7] Lopez, V. Pasin, M. and Motta, E. 2005. AquaLog: An Ontology-Portable Question Answering System for the Semantic Web. in European Semantic Web Symposium /Conference - ESWS (Heraklion, Crete, May 29 - June 1, 2005) [8] Sahlgren. M. 2008 The distributional hypothesis. Italian Journal of Linguistics. 20, 1 (June, 2008) 33 – 54. [9] Moldovan, D., Harabagiu, S., Pasca, M., Mihalcea, R., Goodrum, R., Girju, R. and Rus, V. 1999. LASSO: A Tool for Surfing the Answer Net. in TREC 1999, National Institute of Standards and Technology (NIST) (November, 1999) [10] Yuhan He. 2010. Goal Detection from Natural Language Queries. In 15th International Conference on Applications of Natural Language to Information Systems (Cardiff, UK, June, 2010). [11] Dumais, S., Banko, M., Brill, E., Lin, J. and Ng, A. 2002. Web Question Answering: Is More Always Better?. in Proceedings of ACM SIGIR’02 (Tampere, Finland, August, 2002). [12] Deerwester, S. C. , Dumais, S. T.,Landauer, T. K., Furnas, G. W. and Harshman, R. A. 1990. Indexing by latent semantic analysis. JASIS. 41, 6 (September, 1990) 391 – 407. [13] Hofmann, T. 1999 Probabilistic latent semantic indexing. In Proceedings of the 22nd International ACM SIGIR conference on Research and development in information retrieval (Berkeley, USA, 1999). [14] Boumechaal, H. and Boufaida, Z. Formalization of natural language queries. in IEEE International Symposium on Innovations in Intelligent Systems and Applications (IN- ISTA) (Istanbul, June 15 - 18, 2011). [15] B. Di Martino. 2010. An approach to semantic information retrieval based on natural language query understanding. in Current Trends in Web Engineering, ICWE Workshop (Vienna, Austria, July 5 - 6, 2010). [16] Cao, T. H. and Mai, A. H. 2010. Ontology-based understanding of natural language queries using nested conceptual graphs. in Proceedings of 18th International Conference on Conceptual Structures: From Information to Intelligence (Kuching, Malaysia, July 26 - 30, 2010). [17] Bierman, G.M.. 2003. Formal semantics and analysis of object queries. in Proceedings of the 2003 ACM SIGMOD international conference on Management of data (San Diego, USA, June 9 - 12, 2003). [18] Han, Y-J., Noh, T-G., Park, S-B., Park, S. Y. and Lee, S-J. 2010. A natural language interface of thorough coverage by concordance with knowledge bases. in Proceedings of the 15th international conference on Intelligent user interfaces (HongKong, China, February 7 - 10, 2010). [19] Barhamgi, M., Benslimane, D. and Medjahed, B. 2010. A query rewriting approach for web service composition. IEEE Transactions on Services Computing. 3, 3 (July, 2010) 206- 222. [20] Katz, B., Borchardt, G. and Felshin, S. 2006. Natural Language Annotations for Question Answering. in Proceedings of the 19th International FLAIRS Conference (Melbourne Beach, USA, May 2006). [21] Kaufmann, E., Bernstein, A. and Fischer, L. 2007. NLP- Reduce: A "naive" but Domain-independent Natural Language Interface for Querying Ontologies. in Proceedings of the 4th European Semantic Web Conference (Innsbruck, Austria, June, 2007). [22] Bernstein, A., Kaufmann, E. , Kaiser, C. and Kiefer, C. 2006. Ginseng: A Guided Input Natural Language Search Engine for Querying Ontologies. in 2006 Jena User Conference (Bristol, UK, May 2006). [23] Linckels, S. and Meinel, C. 2006. Resolving Ambiguities in the Semantic Interpretation of Natural Language Questions. in Proceedings of 7th International Conference on Intelligent Data Engineering and Automated Learning - IDEAL (Burgos, Spain, September 20 - 23, 2006). [24] Lopez, V., Fernández, M., Motta, E., Sabou, M. and Uren, V. 2007. Question Answering on the Real Semantic Web . in Proceedings of International Semantic Web Conference (Busan, Korea, November 11 - 15, 2007). [25] Baader, F. 2003 The description logic handbook: theory, implementation, and applications. Cambridge university press. [26] Kamp, H. 1981 A theory of truth and semantic representation. Linguistis: Formal semantics-the essential readings, 7:189 - 222, 1981. [27] Moldovan D. and Rus V. 2001 Logic form transformation of wordnet and its applicability to question answering. In ACL, 402 – 409. [28] Tsarkov D. and Horrocks I. 2006. Fact++ description logic reasoner: System description. In Proceedings of 3rd Joint Conference on Automated reasoning (Seattle, USA, August 17 - 20, 2006) [29] Microsoft Research Question-Answering Corpus - Encarta 98, v 1.0.0, November 2008 [30] Marcus, M. P., Marcinkiewicz, M. A., and Santorini, B. 1993 Building a large annotated corpus of English: The Penn Treebank. Computational linguistics. 19, 2 (June, 1993) 313 – 330.
1512.01409
1
1512
2015-12-04T14:01:32
What Makes it Difficult to Understand a Scientific Literature?
[ "cs.CL" ]
In the artificial intelligence area, one of the ultimate goals is to make computers understand human language and offer assistance. In order to achieve this ideal, researchers of computer science have put forward a lot of models and algorithms attempting at enabling the machine to analyze and process human natural language on different levels of semantics. Although recent progress in this field offers much hope, we still have to ask whether current research can provide assistance that people really desire in reading and comprehension. To this end, we conducted a reading comprehension test on two scientific papers which are written in different styles. We use the semantic link models to analyze the understanding obstacles that people will face in the process of reading and figure out what makes it difficult for human to understand a scientific literature. Through such analysis, we summarized some characteristics and problems which are reflected by people with different levels of knowledge on the comprehension of difficult science and technology literature, which can be modeled in semantic link network. We believe that these characteristics and problems will help us re-examine the existing machine models and are helpful in the designing of new one.
cs.CL
cs
What Makes it Difficult to Understand a Scientific Literature? Mengyun Cao#*1, Jiao Tian#*2, Dezhi Cheng#*3, Jin Liu&4, Xiaoping Sun*5 #University of Chinese Academy of Sciences Beijing, China [email protected] [email protected] [email protected] *Knowledge Grid Group Key Lab of Intelligent Information Processing Institute of Computing Technology Chinese Academy of Sciences [email protected] &Wuhan University [email protected] language on different that people really desire *Abstract—In the artificial intelligence area, one of the ultimate goals is to make computers understand human language and offer assistance. In order to achieve this ideal, researchers of computer science have put forward a lot of models and algorithms attempting at enabling the machine to analyze and process human natural levels of semantics. Although recent progress in this field offers much hope, we still have to ask whether current research can provide assistance in reading and comprehension. To this end, we conducted a reading comprehension test on two scientific papers which are written in different styles. We use the semantic link models to analyze the understanding obstacles that people will face in the process of reading and figure out what makes it difficult for human to understand a scientific literature. Through such analysis, we summarized some characteristics and problems which are reflected by people with different levels of knowledge on the comprehension of difficult science and technology literature, which can be modelled in semantic link network. We believe that these characteristics and problems will help us re-examine the existing machine models and are helpful in the designing of new one. Keywords: Natrual language processing; Comprehension; scientific literature; understanding obstacles; Semantic link network I. INTRODUCTION The term Artificial Intelligence (AI) was coined by John McCarthy in 1955 [25] and gradually developed into a formal discipline. This domain is usually defined as the science and engineering of making machines, especially intelligent computer programs, conduct tasks that require * Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE. Corresponding author: Xiaoping Sun([email protected]) translation have high intelligence when done by humans [1]. Natural language processing (NLP) is among the central goals of AI research [2] and becomes an attractive research field. Some of tasks in NLP are used to solve syntax/grammar analysis tasks, such as word segmentation, co-reference resolution, named entity recognition, Part-of-Speech (PoS) tagging, etc. Some of the tasks such as automatic summarization, question answering, and machine real-world applications [3] for assisting people in reading, information retrieval and mining. The performance of models aiming at addressing these high level tasks of NLP is still far from satisfactory. For example, the state-of-the-art results on automatic summarization are not quiet readable yet [6]. Almost all question-answering systems can only handle questions that are either based on single-relation or factual issues with some simple inference and their performance can only achieve 50% on average using this domain’s evaluation criteria. level To achieve a better solution, one way is to tackle a high level task into many sub tasks and apply different methods to solve them in more effective and efficient way. Recently, statistics machine learning methods such as topic models [20] and deep neural network (NN) models [16][17][18] have achieved significant progress on many sub NLP tasks [20]. For example, the F1-score of word segmentation for Chinese novels can reach more than 90% by using a common noun entities mining method [4], a new model for PoS tagging can achieve more than 90% accuracy on different domains [5]. Teaching machine to read and comprehend is even possible [8]. These advances are deemed as a big step toward our ideal. If we can make machine to read and comprehend text like human, one would be able to make more intelligent task possible, like to teach machine large amount of knowledge. But before we dedicate ourselves to design new models for making machine reading and comprehension possible, shall we rethink what is the help that people really desire or how difficult and what difficulties in that task. To more concretely feel difficulties in making machine reading and understanding text, we can evaluate how difficult for a human to read and comprehend text. Since most people feel no difficult in comprehending daily reading task such as reading news, we pay our attention to scientific literature comprehension. That is, what makes it difficult for students or researchers to understand an academic paper? In order to answer this question, we organized an experiment about the comprehension of human on scientific literature reading. We conducted this test by letting participants read academic papers that they may not understand well. It should be noted that we assume that there is no problem in the articles and readers’ understanding process is to rebuild the thought of the author inside their own mind. That is, the content in the articles, such as the structure of papers and the conclusion drowned by the author, are all reasonable. Two papers written in different styles and period were selected as our test material. Six people with different levels of knowledge background on computer science were invited to offer their questions when reading test papers. We intended to probe the comprehension impediments that they encountered through their questions, and anatomize the reasons causing these impediments. After the analytical steps, we draw several conclusions about the characteristics and problems on the comprehension of such difficult science and technology literature by people who have different levels of knowledge. We argue that these characteristics and problems will facilitate the inspection of the existing works on NLP, and will provide some insightful guide for the future research. There are in fact already many psychological works on science text comprehension properties [21]. Their main purpose is to improve the quality of tutoring and teach. We conduct this work mainly from an angle of computer science and our main target is to investigate how we can leverage computer models to do the understanding task. II. SEMANTIC AND KNOWLEDGE MODEL Before we introduce the main experiment and its results, we first introduce how to define the problem and concepts and how to model the problem in a computer science way, rather than in a psychological way. The key is to model the semantics, the knowledge and its relationships with texts or scientific papers. That is, when we say that we can understand a scientific paper, we mean that we can setup a mapping from the text to the semantic and knowledge information in reader's brain and this mapping can match the author's understanding in a certain acceptable degree. Of course, exact mapping is impossible. To understand is at least to be able to set up such a mapping and such a mapping can be accepted by many readers in a common sense. To model this argument, we adopt a semantic link network model [14] to describe the semantics and knowledge in the text of a scientific paper. A. Example A semantic link network is a network consisting of entity names and their relationships. An entity is a string representing a real world object and concept. A relationship is a common accepted relationship such as class-instance relationship, causality relationship, belong-to relationship, negation relationship, etc.. Then the semantic of a string of a word, a sentence or a paragraph, is defined as a mapping from this string to the predefined semantic link network. The knowledge of such a string is the mapped node and its related nodes in the semantic link network. The constraints of semantic link network are not as strict as what has been coined in the Semantic Web languages [19], which gives Knowledge is represented by a sub network A in the shaded area Square Tape Step Turing Machine State Model Partial function Transition Function Inversion of function Semantic mapping: a mapping from text to one node Knowledge mapping: a mapping from text to a sub network of knowledge Computer science math The Inversion Function of Turing Machine Fig 1. A simple semantic link network for describing a Turing machine model and a mapping from a sentence to the semantic link network semantic link network a flexible modeling capability. Fig 1. gives such an example of using semantic link network for describing a Turing machine model and a semantic mapping and a knowledge mapping from a sentence "The inversion function of Turing Machine". As shown in the figure, the shaded area on the network is a piece of knowledge of about the Turing machine model. The edges among concepts can be inclusion relationship, equivalence relationship and sub class relationship. The dotted arrow line represented semantic mapping, which is to map an object to a node in the network. The bold dotted arrow line is to map the whole sentence to the knowledge piece in the shaded area. The shade area does not cover the partial function or the transition concept. It is to show this mapping is not complete. It is just an incomplete mapping or even incorrect mapping. But note that here it does not mean that we use the semantic link network to describe every piece of knowledge in author's mind. Or we do not mean that knowledge is only the semantic link network instances. Rather, we use the semantic link network to model the knowledge of authors in some scale or sense such that the semantic link network can be a knowledge representation at certain level or accuracy or coverage. Or in another word, if we can find the author or a specialist, we can let the author use the semantic link network tool to describe his knowledge in a certain level of details about his paper and we deem this semantic link network as the knowledge representation of the paper of the author or a teacher or an authority. We assume such a network can be detailed and extended by authors or people. And when a reader read the paper, he or she can also use the semantic link network tool to describe his knowledge derived from the paper. In this way, we can set up a computable comparing platform to see what they know about this paper. B. Semantic link network based knowledge modelling So from this example, if we say that a reader can understand the sentence “The inversion function of Turing machine", we mean that they can setup such a kind of mapping from text to a semantic link network that describes the related knowledge about the sentence. Of course, a semantic link network about one thing is different for different people with different knowledge background and understanding. We assume that there is such a "correct" semantic link network inside author's understanding. And a 'correct' understanding by a reader is to setup such an approximation to the correct semantic link network and correct mapping from text to it. A sentence or a text may be mapped to different knowledge in different context. But in fact, a context of a sentence S of a paper P is the knowledge of a set C of strings larger than that original string. P here is the set of any text combination of texts in a paper. So its mapping could be different from the S. To clearly show how this can model the reading process. We formally define the related concepts as below: (1) P: a paper. (2) s P: a text or a set of text from P. (3) A=<E,V>: A semantic link network for describing knowledge of a given people A. (4) BA means that a semantic link network B is a sub network of A. (5) A semantic mapping from s to the knowledge is defined as: s(A):sv, where vV is a node in the semantic link network A. (6) A knowledge mapping from a text s P to knowledge A(s) by a given people A when reading a sentence s can be defined as: is A(s):sA(s), where A the current background knowledge of reader r, i.e., a set of semantic link network having being built before reading P. A(s) is the semantic link network either belong to A or a new semantic link network that is new to A. Also note that a semantic mapping can be deemed as a knowledge mapping: s(A) = A(s) when A=< E =, V={v}>, i.e. mapping s to a semantic network A with only one node and no edge. But simply union of w(A) for all ws does not construct A(s) because there is no edge in w(A). (7) A(P):{A(s):sA(s)sP} is a collection of semantic link networks derived from text of paper P. (8) A can be updated by A(s) using a simple graph union operation AAA(s), which means that a semantic link network A is extended by merging nodes and links from A(s) as well as adding new edges among A and A(s). If A(s)A, then, AA(s)=A. Similarly, A(s)  A(s)A(p) means that the semantic link network derived from s is extended by another semantic link network derived from p and in this case and the newly one can be different from the original one. A(p) = A(p)A(s) may not equal to the A(s) = A(s)A(p) because applying A(p)  A(p)A(s), which may be different from applying A(s)  A(s)A(p). added when new edges are (9) B(s) A(s) means that two semantic link networks are similar or the knowledge of two people on s are similar. The similarity can be defined in terms of graph similarity considering both nodes and edges labels as well as their topology or can be directly specified using a semantic link “equivalent” or “similar to” A: Knowledge of author A A(P):Knowledge on paper P by A B: Knowledge of reader B B': Knowledge of reader B before reading P Matching A(P1) A(P):Knowledge in paper P but constructed from P1 B'(P): Knowledge of B on P Paper P written by author A and read by reader B P Other resources P1 P2 Pn Fig 2. Knowledge derived from paper P by author A and reader B One possible confusing point is about the abstraction of a semantic link network. For example, one semantic link network T may contain only one node v= “Turing Machine” and another one A is like what in Fig. 1. One may argue that B(s) A(s) where s = “Turing Machine”. But in fact, from the aspect of graph information, T is quite different from A. We take it as the different knowledge because without any other information we cannot deduce that T is A. One possible of such information is that a direct semantic link “equivalent” is added from T to A. When adding such an equivalent link between T and A, it can be deemed as an updating operation on T(s) by A(s). That is, T(s)  T(s) A(s) adds a link “equivalent” between corresponding node in T and in A. C. Reading and Comprehension modelling Then, we can now use the above modeling tools to model a reading and comprehension case. We use an example in Fig. 2 to show how this work. In Fig. 2, an author A has a paper P that is read by a reader B. So, here A is used to represent the semantic link network knowledge of the author along with his paper. We also use A(P) to represent the semantic link network derived from P by the author A. And there is a semantic link network A(P1) A(P) and A(P1) is derived from P1 rather than P. So, in fact, an extension is applied as A(P)A(P) A (P1).Then, the process can be modelled in sequence as following: (1) A is built. (2) A(P1) is built (3) A(P)A(P) A (P1) is built. Note that the merging is actually happen during writing each word or sentence by A. B' represents the semantic link network knowledge of the reader B before reading paper P. After reading P, his semantic link knowledge can be extended by: BB'B'(P). And then, by applying the updating extension B(P) B  B'(P), we can have the final semantic link network as the knowledge model of B after reading P. But we can see that if the reader B has not accessed the paper P1, then, he may not be able to set up such a knowledge mapping that B(P) A(P). III. EXPERIMENT We conduct a small experiment involving six readers and two scientific papers. Table 1 shows the basic information of six participants majoring in computer science area and their roles in the task. It is also noted that they are all not native English speakers. We divided participants into two groups G1 and G2. There are 4 people in G1 and their questions are used as material for classification and analysis to get conclusions. The questions of G2 are used as the validation material for our conclusions. One of our test material (referred to as P1) is a classical paper named “The Inversion of Functions defined by Turing Machines”. This article was written by John McCarthy in 1956 [7]. It is difficult for most people to understand in three aspects: first, it involves very fundamental ideas on Turing machine, computational complexity and formal theory; second, some of its concepts are too old to maintain its original meaning in current; in addition, there are many inferences and functions that the author considered obviously but cannot be easily proved by readers. Another (referred to as P2) is a newly published paper named “Teaching machines to read and comprehend”. This article introduces some deep NN and classical methods for answering Cloze form queries [8], and that may difficult to understand for people who have no contact with these methods. TABLE I EXPERIMENTER INFORMATION Group Participant Computer Roles ID G1 G2 A B C D E F Science Degree college graduate master candidate master candidate doctor master candidate PhD candidate ask questions ask questions ask questions ask & answer ask questions ask questions TABLE II CLASSIFY THE QUESTIONS ABOUT P1 type0 type1 P1 type2 type3 Synthesis 3 0 3 0 0 0 0 0 10 6 4 8 9 0 1 6 37 12 25 18 23 2 4 10 31 5 24 15 9 0 3 4 9 3 10 2 1 0 3 3 TABLE IIII CLASSIFY THE QUESTIONS ABOUT P2 type0 type1 1 0 1 0 12 11 4 4 P2 type2 36 20 18 11 type3 Synthesis 27 11 17 15 7 11 9 2 G1 G2 A B C D E F G1 G2 A B C D E F 0 0 0 0 9 0 11 0 20 2 14 8 12 0 9 1 7 0 10 2 A. Experiment Processes Our experiment is conducted in two days (at least 6 hour a day) without letting junior participants to do much preparation work before. The first day, we handed out the electronic and print version of P1 to all the participants. We let participants read it paragraph by paragraph without any auxiliary material such as dictionary, and meanwhile write down their questions as well as the gist of each paragraph. Then, D singled out some questions to answer. We recorded all the questions and answers from D. The second day, we do the same thing with P2. We removed repeated questions for the same test paper on the same group. At last, for P1, we collected a total of 90 questions asked by G1 and 26 by G2; for P2, there are 83 questions asked by G1 and 53 by G2. Finally, by analyzing materials at hand, we tried to classify all the questions and summarized several characteristics in the comprehension processes, and showed them in the following sections. mechanism of Turning Machine such as “tape”, “square” and “internal states”, which are basics in Turing Machine model, are contained within this paper’s outside knowledge. Following questions are raised by A in P1:  What are the specific definitions of “steps” in the third, the fourth sentence of paragraph 1, the last sentence of paragraph 3 and the first two sentences of paragraph 6?  Why “for any Turing machine there is another one which does k steps of the original machine in one step”? This sentence is in the second sentence of paragraph 6.  Why “a machine with Q internal states and S symbols should be considered as making about 1/2logQS elementary steps per step of computation”? This sentence is in the last sentence of paragraph 8. 4) Type 3: lack of semantic links inside the paper: The answers of this type of questions could be founded out through the description in the articles, but participants cannot find them probably because they have not yet read the relevant sentences in the following sections, or they had some incomprehensible parts in the earlier parts. Several questions of this type in P1 are listed here for B. Analysis and Classification example: First, we tried to classify those questions to see what properties are there. These questions can be divided into four types according to their inherent characteristic (see Table II and Table II): 1) Type 0: Language problems: Language problems represent the questions caused by the grammar, or particular expression of the author. This type contains the least number of questions because the English level of our participants can fit the requirement of parsing the papers. For example:  Whether the word of “to” is missing in the third sentence of paragraph 19? Because we always use the phrase “from … to …”. 2) Type 1: Lack of the semantic mapping from the notations or words to the concepts behind the word: Readers did not notice that this notation links to the real concept. For example:  A does not known the word “enumerative” in the first sentence of paragraph 5.  C does not known the word “homogeneous” and “isotropic” in the first sentence of paragraph 8. 3) Type 2: lack of links to the knowledge outside the paper and reader's current knowledge: The knowledge outside of the paper represents the meaning of concepts, logical relationships among concepts, derivation of theorem and formulas, etc., that are mentioned in the particular context of the paper and are not directly provided in the paper but we should have known to comprehend the paper. In another words, the knowledge could not be learned in this articles but are still required in understanding processes. For example, article P1 does not explain anything about Turing Machine. So, the structure and the operation  What is the meaning of “well-defined problems” mentioned in the first sentence of paragraph 1? Actually the interpretation of this notation is given in the next three sentences. In the fourth sentence of paragraph 7, reader A cannot find the corresponding parts in transform function of “but”?   Which is the corresponding part of “return to the the first sentence of in question” mentioned paragraph 10? 5) Synthesis questions: The questions of this type are caused by two or more questions listed in the previous type. That is, for example, a question that is raised not only because the language problems but also the lack of links to the knowledge outside of the test papers. Take the questions raised by G1 about P2 for example:  What is meaning of paragraph 21? A, B, C all asked this question because they not only have no idea about Deep LSTM Reader ( both lack of outside knowledge of P2 and the incomprehension about description in the paragraph above ), but also don’t know what the symbols in the formulas refer to.  Why the author said that “There is no significant advantage in this” in the fifth sentence of paragraph 16? The asker cannot understand the reason that the author explains followed the mention. C. Semantic link network modelling From Table II and III, we can see that the major types of questions are related to the knowledge inside and outside paper. We can use the modeling method in section II to describe these problems. Fig. 3 shows what the knowledge outside the paper is and what knowledge inside the paper is. Assuming that the paper contains a sentence S: “A well- defined problem is a problem that has Turing Machine tester to validate its solution”, let R is reader and A is the author, then: 1) Semantic mapping is missing. Type 1 questions can be modeled as w(R)= or w(R)w(A) for a word or a phrase w  S. For example, in Fig.3 there are three semantic mappings that link from the words and phrases of sentence to the nodes in this knowledge piece. 2) Knowledge constructed inside the paper There is one semantic link network R(S) that can be constructed from the sentence S in the paper (marked in the right shaded area of Fig. 3). This network R(S) is deemed as the knowledge inside the paper P because sP of reader R. If this knowledge cannot be setup by reader R, the problem related to it is of type 3. 3) Knowledge outside the paper and reader knowledge There is a semantic link network A(w) of the author A about the word w =“Turing Machine” which can be detailed in Fig.1. Here we use a shaded area in the left corner to represent such a network. The knowledge is outside the paper because from sentences in the paper reader R can NOT setup such a knowledge piece, or a semantic link network to represent the model of Turing machine that is similar to A(w). Setting up R(w) such that R(w)  A(w) is possible only when the reader know the P0 before reading because A(w)= A(w)A(P0) and P0 is other resource. More formally, we can define this problem as: s such that when R(w)  R  R(w)  R(s), we have R(w)  A(w) and A(w)  A(w) A(P0) with sP. That is, there is no text s in paper P such that R(w) can be extended to approximate A(w). So, basically, type 1 problem is about the semantic mapping setup problem. Type 2 problem is about the knowledge mapping to the knowledge outside paper and Type 3 problem is related to the knowledge mapping construction to the inside knowledge. How about type 0 problem? Type0 problem is about the semantic mapping and knowledge mapping from sentences language knowledge. the to 4) Modelling understanding To understand sentence S in the figure, of course, R need to approximate A(S), which in turn requires to setup R(w) in a correct way. Before setting up R(w), there is already an R(S) which can be derived from S using current knowledge R. But this R(S) is far from A(S). If R obtains A(w) by reading some other materials P0, then, it can be described as : R(w) R(w)  R(P0) and then R(w)  A(w) . Then, by applying another merging operation: R(S)  R(S)  R(w). Then, we finally can have R(S)  A(S) because R(S)  R(S) R(w) and A(S)  A(S)  A(w). D. Characteristics and problems Further, we tried to analyse characteristics of those questions raised by readers to see why they may raise such questions. We have found that there are 10 characteristics, or say, problems, that are reflected by these questions. 1) The key questions from understanding the article could not be asked by themselves sometime : that hinder people For example, reader A had a question “What are the logical relations among ‘not defined’, ‘exist’, ‘existence’, and ‘not exist’? Are they not in conflict with each other?” when A reads the paragraph 2 of P1. In fact it is because A does not know “partial function” and “mth Turing machine”, and the relationship between function ‘g(m, r)’ and ‘fm(g(m, r))’, which lead A to ask that question. And A has set up a wrong mapping for “partial function”. 2) The major understanding obstacles that people Knowledge A(w) outside the paper Turing Machine related knowledge Well-defined problem Problem There is a tester on solution Semantic mapping Knowledge mapping Knowledge R(S) in the paper R(S) P0 A(w) Sentence S in the paper A Well-defined problem is a problem that has Turing Machine tester to validate its solution Fig 3. A semantic link network that is derived from the sentences of paper and it is also related to a knowledge piece outside the paper concern are mainly focused on type 2 and type 3: This conclusion can be directly drawn for the total number of questions in all types. The questions in these two categories are the majority of our question lists for all participants. Here we assumed that people who may read scientific literature all have a good command of English. As for type 1 questions, they all believed that problems caused by the mismatch about notation and concepts can be solved easily by a dictionary. 3) The barrier of understanding caused by the lack of links to the knowledge outsid the paper and the reader's knowlege will seriously prevent people from comprehending the paper they are reading: First, a lot of questions in type 4 contain the concepts that have been asked in type 2. For example, a question of P1 in type 2 is “what’s the meaning of ‘well-defined problems’ in first two sentences of paragraph 1?”, while in P1’s type 3 there is a question about the “logical relationship among ‘problem’, ‘solution’ and ‘test’ in paragraph 1”. Second, as shown in the first characteristic, the key to answer many questions depends on the complete understanding of knowledge outside the papers. People may not discover the importance of some concepts or think they have already armed with that background knowledge, which will finally to either wrong understanding or incomprehensible concepts in other parts of the paper. leads 4) Some questions of type 3 may also be raised by leaping thinking in articles and readers cannot keep up with the authors’ thought: For example, in the P1, paragraphs from 7 to 9 discuss a computational complexity in another way. Both B and C have learned related concepts before, but they paid all of their attention on the Turing machine, partial function and the inversion of functions and raised a lot of questions because they did not realize that these paragraphs is about computational complexity theory. 5) People can’t reproduce some proof of theorems and reasoning of functions not only because the lack of background knowledge but also related to their individual factors such as capability and training experience: For example, D has enough background to understand the major parts of two test papers but he still cannot prove an argument in the P1: “a machine with Q internal states and S symbols should be considered as making about 1/2 log QS elementary steps per step of computation”, which is mentioned in the last sentence of paragraph 8. 6) The obstacles of comprehension caused by the limitation of outside knowledge could not be overcame by using the internal information of the paper; That is, information from outside is needed: This is obvious according to the definition of the knowledge outside the paper. There are the knowledge that cannot be learned within this article but still be need in understanding processes. 7) People’s comprehension of the main ideas weakens dramatically with the increasing of points they don’t understand as well as with the accumulation of their bad mood: Reader A, B and C could hardly summarize the main ideas of the paragraphs after the third page of P1. E even gave up reading P1 after paragraph 6. As for P2, reader A, B, C and E all jumped from paragraph 21 to 26 because there are many things they don’t know for deep NN. And they all feel agitated because there are numerous points they could not understand in the paper. 8) Most of the time, we still cannot understand the article even if excellent work on syntax/grammar parsing has been done: In our experiment, grammar or language problem of type 0 is rare. So, solving type 0 problem may not help much to solve type 1 and 2 problems. Of course, basic syntactic parsing is necessary for understanding basic meaning of sentences, but we argue that the works of syntax parsing can't help understanding content when the understanding requires a certain level of semantics or knowledge that is far above the basic semantics of words. 9) Some research on semantics could help people understand articles: In linguistics, semantics is a study mainly focusing on the meaning and relationship inherent at the levels of words, phrases, sentences, and larger units of discourse [11]. Many tasks in NLP need to concern semantic, such as automatic summarization, co-reference resolution, question answering, etc. As we argued in the introduction, most of them are still far from satisfaction. Although these tools can help some in identifying word and relationships, we argue that to make machine reading and comprehending, we need to pay attentions to the problems of type 2, 3 and 4 we have modelled. 10) The function of guide is significant: D spent a month reading P1 until he could make a comprehension, but A, B and C only take one day to reach a certain degree of understanding under the guidance of D. So the guidance is important. From this view, if we intend to make a machine simulate human to understand scientific literature and then help people read, it is more plausible that we teach the machine to understand at first than let it study on its own from scratch. There are many methods we can refer in the teaching process among people, such as exemplification, graphical method, searching for the key problems, etc.. IV. IMPLICATIONS Although this experiment is conducted in a very small scale with only six participants and two papers involved, we still argue that the results can be representative, especially for those who are reading difficult scientific literatures that they are not so familiar with. Moreover, what we have done in this experiment at least show three instructive points that could be referred when we design artificial intelligence models for letting machine to understand text: 1) Syntax semantics and content semantics A language expression has two levels of semantics. One is syntax semantics that is used to understand a basic, topic- irrelevant semantics of the expression. In our work they are related to type 0 problems. But capturing basic semantics of an expression may not help much for understanding content semantics of text. How to deal with this gap may be fundamental in making machine understanding natural language text. 2) the knowledge outside the papers. To better process text, outside knowledge is important or even indispensable. How to incorporate explicit outside knowledge into machine learning process is an important research issue. In this view, it may be worth thinking how to design the method for machines to express and save knowledge, and how to design the algorithm to learning new knowledge using their own knowledge. 3) High-level guidance. Guidance is an efficient way to increase the efficiency of understanding [23]. How to make such explicit guidance on machine learning process deserves further study. At present, the popular way to “teach” a machine is to input rules defined by people, or by a supervised learning model with large benchmark data. But we still cannot understand how human comprehend articles until now. So we cannot completely define the rules for understanding and teach it to machine. 4) Semantic link network modelling. We have used the semantic link network model to analyze four types of questions and we found that the key to make the reader understanding is to help them setup semantic link networks either from outside knowledge sources or from the texts in the paper and then help them setting up mappings from texts to those semantic link networks. So this can help us derive the future solution to make the machine read and comprehend the text. That is, make machine be able to set up semantic link networks and then setting up mappings from texts to those semantic link networks automatically [15][22][24]. V. CONCLUSIONS In this work, we conducted a human reading comprehension experiment where we let six people read two computer science papers which are difficult to understand for many people, and let them write down their questions in the comprehension process. From the experiment, we have summarized ten characteristics and problems that people reflected in reading difficult scientific literature by trying to classify and analyze the question they listed using a semantic network model. And those characteristics and problems show that even for people, it is still hard to comprehend such complicated papers completely. For machine, it is much more difficult to conduct such kinds of task. But the results also provide some implications, that is, we should consider how to deal with syntax semantics and content semantics, and how to incorporate explicit knowledge into machine learning process and how to make explicit guidance on machine learning process. ACKNOWLEDGMENT Thanks to Wei Li and Pengshan Cai for their supporting and thanks to Prof. Zhiwei Xu for his suggestions in this work. Research Supported by the Open Project Funding of CAS Key Lab of Intelligent Information Processing, Institute of Computing Technology, Chinese Academy of Sciences (No. IIP2014-2).This work was also partially supported by National Science Foundation of China (No.61075074 and No.61070183). REFERENCES [1] [2] [3] J. Copeland. AlanTuring.net What is AI. [Online]. Available: http://www.alanturing.net/turing_archive/pages/Reference%20Articl es/What%20is%20AI.html. The Wikipedia page Artificial intelligence. [Online]. Available: https://en.wikipedia.org/wiki/Artificial_intelligence. Processing. Language The Wikipedia https://en.wikipedia.org/wiki/Natural_language_ processing. (2015) [4] Q. Likun and Y. Zhang. "Word Segmentation for Chinese Novels", in Proceeding of 29th AAAI Conference on Artificial Intelligence. 2015, p. 2440-2446 S. Tobias, and H. Schütze. "Flors: Fast and simple domain adaptation the Association for Computational Linguistics. vol.2, pp. 15-26, 2014 tagging." Transactions of for part-of-speech Natural page [5] [6] K. Nandhini and S. R. Balasundaram. “Improving readability through extractive summarization reading difficulties”. Egyptian Informatics, Journal, vol.14, iss.3, pp. 195- 204, Nov. 2013. J. McCarthy. “The inversion of functions defined by Turing machines”, Automata studies, pp. 177-181, 1956. learners with [7] for [8] K. M. Hermann, T. Kočiský, E. Grefenstette, L. Espeholt, W. Kay, M. Suleyman, & P. Blunsom. "Teaching Machines to Read and Comprehend". arXiv preprint arXiv:1506.03340. 2015. [9] C. Mellish, G. Ritchie. "The Grammatical Analysis of Sentences." http://homepages.abdn.ac.uk/advaith/pages/teaching/ Available: NLP/information/gram.pdf. [10] R. Collobert, J. Weston, L. Bottou, et al.. ”Natural language processing (almost) from scratch”, The Journal of Machine Learning Research, vol. 12, pp. 2493-2537, 2011. [11] The Wikipedia page Semantics. Available: https://en.wikipedia.org/wiki/Semantics. [12] Q. V. Le and T. Mikolov. "Distributed representations of sentences and documents." arXiv preprint arXiv:1405.405[31]3 , 2014. [13] K. Cho, B. van Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, Y. Bengio. "Learning phrase representations using RNN encoder-decoder for statistical machine translation". arXiv preprint arXiv:1406.1078, 2014. [14] H. Zhuge, The Knowledge Grid, World Scientific Publishing Co., Singapore, 2004 (1st ed), 2012 (2nd ed) [15] O. Hassanzadeh, A. Kementsietsidis, L. Lim, R. J. Miller, M. Wang, M. "A framework for semantic link discovery over relational data". In Proceedings of the 18th ACM conference on Information and knowledge management. pp. 1027-1036. ACM. 2009, November. [16] M. Palmer, D. Gildea, & N. Xue. "Semantic role labeling". Synthesis Lectures on Human Language Technologies, 3(1), 1-103, 2010. [17] T. Rocktäschel, S. Singh, S. Riedel. "Injecting Logical Background Knowledge into Embeddings for Relation Extraction". Proceedings of the 2015 Human Language Technology Conference of the North American Chapter of the Association of Computational Linguistics. 2015. [18] S. R. Bowman, & C. Potts. "Recursive neural networks can learn logical semantics". ACL-IJCNLP 2015, 12. 2015. [19] T. Berners-Lee, J. Hendler, & O. Lassila. "The semantic web". Scientific American, 284(5), pp.28-37, 2001. [20] M. Steyvers, & T. Griffiths,. Probabilistic topic models. Handbook of latent semantic analysis, 427(7), 424-440. 2007. [21] J. Otero, J. Lecentsn, & A. C. Graesser, (Eds.). (2014). The psychology of science text comprehension. Routledge. [22] H. Zhuge, Communities and Emerging Semantics in Semantic Link IEEE Transactions on Network: Discovery and Learning, Knowledge and Data Engineering, vol.21, no.6, pp. 785-799, 2009. [23] H. Zhuge, Interactive Semantics, Artificial Intelligence, 174(2010), pp.190-204, 2010. [24] H. Zhuge, Semantic linking through spaces for cyber-physical-socio intelligence: A methodology, Artificial Intelligence, 175(2011), pp.988-1019, 2011. [25] J. McCarthy, M. L. Minsky, N Rochester, et al. A proposal for the Dartmouth summer research project on artificial intelligence, August 31, 1955[J].
1508.05154
2
1508
2015-09-02T17:26:24
Posterior calibration and exploratory analysis for natural language processing models
[ "cs.CL" ]
Many models in natural language processing define probabilistic distributions over linguistic structures. We argue that (1) the quality of a model' s posterior distribution can and should be directly evaluated, as to whether probabilities correspond to empirical frequencies, and (2) NLP uncertainty can be projected not only to pipeline components, but also to exploratory data analysis, telling a user when to trust and not trust the NLP analysis. We present a method to analyze calibration, and apply it to compare the miscalibration of several commonly used models. We also contribute a coreference sampling algorithm that can create confidence intervals for a political event extraction task.
cs.CL
cs
Posterior calibration and exploratory analysis for natural language processing models Khanh Nguyen Department of Computer Science University of Maryland, College Park College Park, MD 20742 Brendan O’Connor College of Information and Computer Sciences University of Massachusetts, Amherst Amherst, MA, 01003 5 1 0 2 p e S 2 ] L C . s c [ 2 v 4 5 1 5 0 . 8 0 5 1 : v i X r a [email protected] [email protected] Abstract Many models in natural language process- ing define probabilistic distributions over linguistic structures. We argue that (1) the quality of a model’s posterior distribu- tion can and should be directly evaluated, as to whether probabilities correspond to empirical frequencies; and (2) NLP uncer- tainty can be projected not only to pipeline components, but also to exploratory data analysis, telling a user when to trust and not trust the NLP analysis. We present a method to analyze calibration, and apply it to compare the miscalibration of sev- eral commonly used models. We also con- tribute a coreference sampling algorithm that can create confidence intervals for a political event extraction task.1 Introduction 1 Natural language processing systems are imper- fect. Decades of research have yielded analyzers that mis-identify named entities, mis-attach syn- tactic relations, and mis-recognize noun phrase coreference anywhere from 10-40% of the time. But these systems are accurate enough so that their outputs can be used as soft, if noisy, indicators of language meaning for use in downstream analysis, such as systems that perform question answering, machine translation, event extraction, and narra- tive analysis (McCord et al., 2012; Gimpel and Smith, 2008; Miwa et al., 2010; Bamman et al., 2013). To understand the performance of an ana- lyzer, researchers and practitioners typically mea- sure the accuracy of individual labels or edges among a single predicted output structure y, such as a most-probable tagging or entity clustering arg maxy P (yx) (conditional on text data x). 1This is the extended version of a paper published in Pro- ceedings of EMNLP 2015. This version includes acknowl- edgments and an appendix. For all materials, see: http: //brenocon.com/nlpcalib/ But a probabilistic model gives a probability distribution over many other output structures that have smaller predicted probabilities; a line of work has sought to control cascading pipeline errors by passing on multiple structures from earlier stages of analysis, by propagating prediction uncertainty through multiple samples (Finkel et al., 2006), K-best lists (Venugopal et al., 2008; Toutanova et al., 2008), or explicitly diverse lists (Gimpel et al., 2013); often the goal is to marginalize over structures to calculate and minimize an expected loss function, as in minimum Bayes risk decod- ing (Goodman, 1996; Kumar and Byrne, 2004), or to perform joint inference between early and later stages of NLP analysis (e.g. Singh et al., 2013; Durrett and Klein, 2014). These approaches should work better when the posterior probabilities of the predicted linguistic structures reflect actual probabilities of the struc- tures or aspects of the structures. For example, say a model is overconfident: it places too much prob- ability mass in the top prediction, and not enough in the rest. Then there will be little benefit to us- ing the lower probability structures, since in the training or inference objectives they will be incor- rectly outweighed by the top prediction (or in a sampling approach, they will be systematically un- dersampled and thus have too-low frequencies). If we only evaluate models based on their top pre- dictions or on downstream tasks, it is difficult to diagnose this issue. Instead, we propose to directly evaluate the cal- ibration of a model’s posterior prediction distri- bution. A perfectly calibrated model knows how often it’s right or wrong; when it predicts an event with 80% confidence, the event empirically turns out to be true 80% of the time. While perfect accuracy for NLP models remains an unsolved challenge, perfect calibration is a more achievable goal, since a model that has imperfect accuracy could, in principle, be perfectly calibrated. In this paper, we develop a method to empirically analyze calibration that is appropriate for NLP models (§3) and use it to analyze common generative and dis- criminative models for tagging and classification (§4). Furthermore, if a model’s probabilities are meaningful, that would justify using its proba- bility distributions for any downstream purpose, including exploratory analysis on unlabeled data. In §6 we introduce a representative corpus explo- ration problem, identifying temporal event trends in international politics, with a method that is de- pendent on coreference resolution. We develop a coreference sampling algorithm (§5.2) which projects uncertainty into the event extraction, in- ducing a posterior distribution over event frequen- cies. Sometimes the event trends have very high posterior variance (large confidence intervals),2 reflecting when the NLP system genuinely does not know the correct semantic extraction. This highlights an important use of a calibrated model: being able to tell a user when the model’s predic- tions are likely to be incorrect, or at least, not giv- ing a user a false sense of certainty from an erro- neous NLP analysis. 2 Definition of calibration Consider a binary probabilistic prediction prob- lem, which consists of binary labels and proba- bilistic predictions for them. Each instance has a ground-truth label y ∈ {0, 1}, which is used for evaluation. The prediction problem is to gener- ate a predicted probability or prediction strength q ∈ [0, 1]. Typically, we use some form of a prob- abilistic model to accomplish this task, where q represents the model’s posterior probability3 of the instance having a positive label (y = 1). Let S = {(q1, y1), (q2, y2),··· (qN , yN )} be the set of prediction-label pairs produced by the model. Many metrics assess the overall quality of how well the predicted probabilities match the data, such as the familiar cross entropy (negative average log-likelihood), 1 qi 1 N + (1 − yi) log 1 i yi log L(cid:96)((cid:126)y, (cid:126)q) = 1 − qi or mean squared error, also known as the Brier score when y is binary (Brier, 1950), (yi − qi)2 (cid:88) L2((cid:126)y, (cid:126)q) = (cid:88) 1 N i 2We use the terms confidence interval and credible inter- val interchangeably in this work; the latter term is debatably more correct, though less widely familiar. 3Whether q comes from a Bayesian posterior or not is ir- relevant to the analysis in this section. All that matters is that predictions are numbers q ∈ [0, 1]. Both tend to attain better (lower) values when q is near 1 when y = 1, and near 0 when y = 0; and they achieve a perfect value of 0 when all qi = yi.4 Let P(y, q) be the joint empirical distribution over labels and predictions. Under this notation, L2 = Eq,y[y − q]2. Consider the factorization P(y, q) = P(y q) P(q) where P(y q) denotes the label empirical fre- quency, conditional on a prediction strength (Mur- phy and Winkler, 1987).5 Applying this factor- ization to the Brier score leads to the calibration- refinement decomposition (DeGroot and Fienberg, 1983), in terms of expectations with respect to the prediction strength distribution P(q): L2 = Eq[q − pq]2 + Eq[pq(1 − pq)] (1) (cid:124) (cid:123)(cid:122) (cid:125) Calibration MSE Refinement where we denote pq ≡ P(y = 1 q) for brevity. Here, calibration measures to what extent a model’s probabilistic predictions match their cor- responding empirical frequencies. Perfect calibra- tion is achieved when P(y = 1 q) = q for all q; intuitively, if you aggregate all instances where a model predicted q, they should have y = 1 at q percent of the time. We define the magnitude of miscalibration using root mean squared error: Definition 1 (RMS calibration error). (cid:113)Eq[q − P(y = 1 q)]2 CalibErr = (cid:123)(cid:122) (cid:124) (cid:125) The second term of Eq 1 refers to refinement, which reflects to what extent the model is able to separate different labels (in terms of the con- ditional Gini entropy pq(1 − pq)). If the predic- tion strengths tend to cluster around 0 or 1, the re- finement score tends to be lower. The calibration- refinement breakdown offers a useful perspective on the accuracy of a model posterior. This paper focuses on calibration. There are several other ways to break down squared error, log-likelihood, and other probabilis- tic scoring rules.6 We use the Brier-based calibra- tion error in this work, since unlike cross-entropy 4These two loss functions are instances of proper scoring rules (Gneiting and Raftery, 2007; Brocker, 2009). 5 We alternatively refer to this as label frequency or empir- ical frequency. The P probabilities can be thought of as fre- quencies from the hypothetical population the data and pre- dictions are drawn from. P probabilities are, definitionally speaking, completely separate from a probabilistic model that might be used to generate q predictions. 6They all include a notion of calibration corresponding to a Bregman divergence (Brocker, 2009); for example, cross- entropy can be broken down such that KL divergence is the measure of miscalibration. A set of N prediction-label Algorithm 2 Estimate calibration error’s confi- dence interval by sampling. Input: {(q1, y1), (q2, y2),··· , (qN , yN )}. Output: Calibration error with a 95% confidence interval. Parameter: Number of samples, S. Step 1: Calculate {p1, p2,··· , pT} from step 4 of Algo- rithm 1. Step 2: Draw S samples. For each s = 1..S, pairs i ∼ N(cid:0)pi, σ2 i (cid:1), where If necessary clip to [0, 1]: • For each bin i = 1..T , draw p(s) i = pi(1 − pi)/Bi. σ2 p(s) i := min(1, max(0, p(s) i )) • Calculate the sample’s CalibErr from using the pairs qk (qi, p(s) i ) as per Step 5 of Algorithm 1. Step 3: Calculate the 95% confidence interval for the calibra- tion error as: CalibErravg ± 1.96 serror where CalibErravg and serror are the mean and the stan- dard deviation, respectively, of the CalibErrs calculated from the samples. Algorithm 1 Estimate calibration error using adaptive binning. Input: A set {(q1, y1), (q2, y2),··· , (qN , yN )}. Output: Calibration error. Parameter: Target bin size β. Step 1: Sort pairs by prediction values qk in ascending order. of N prediction-label pairs β + 1. Step 2: For each, assign bin label bk = Step 3: Define each bin Bi as the set of indices of pairs that have the same bin label. If the last bin has size less than β, merge it with the second-to-last bin (if one exists). Let {B1, B2,··· , BT} be the set of bins. Step 4: Calculate empirical and predicted probabilities per bin: (cid:106) k−1 (cid:107) pi = 1 Bi yk and qi = 1 Bi (cid:88) k∈Bi (cid:88) k∈Bi Step 5: Calculate the calibration error as the root mean squared error per bin, weighted by bin size in case they are not uniformly sized: (cid:118)(cid:117)(cid:117)(cid:116) 1 N T(cid:88) CalibErr = Bi(qi − pi)2 i=1 the middle of the q distribution (Figure 1). it does not tend toward infinity when near prob- ability 0; we hypothesize this could be an issue since both p and q are subject to estimation error. 3 Empirical calibration analysis From a test set of labeled data, we can analyze model calibration both in terms of the calibration error, as well as visualizing the calibration curve of label frequency versus predicted strength. How- ever, computing the label frequencies P(y = 1q) requires an infinite amount of data. Thus approx- imation methods are required to perform calibra- tion analysis. 3.1 Adaptive binning procedure Previous studies that assess calibration in super- vised machine learning models (Niculescu-Mizil and Caruana, 2005; Bennett, 2000) calculate la- bel frequencies by dividing the prediction space into deciles or other evenly spaced bins—e.g. q ∈ [0, 0.1), q ∈ [0.1, 0.2), etc.—and then calculat- ing the empirical label frequency in each bin. This procedure may be thought of as using a form of nonparametric regression (specifically, a regres- sogram; Tukey 1961) to estimate the function f (q) = P(y = 1 q) from observed data points. But models in natural language processing give very skewed distributions of confidence scores q (many are near 0 or 1), so this procedure performs poorly, having much more variable estimates near We propose adaptive binning as an alterna- tive. Instead of dividing the interval [0, 1] into fixed-width bins, adaptive binning defines the bins such that there are an equal number of points in each, after which the same averaging proce- dure is used. This method naturally gives wider bins to area with fewer data points (areas that re- quire more smoothing), and ensures that these ar- eas have roughly similar standard errors as those near the boundaries, since for a bin with β num- ber of points and empirical frequency p, the stan- dard error is estimated by(cid:112)p(1 − p)/β, which is β. Algorithm 1 describes bounded above by 0.5/ the procedure for estimating calibration error us- ing adaptive binning, which can be applied to any probabilistic model that predicts posterior proba- bilities. √ 3.2 Confidence interval estimation Especially when the test set is small, estimating calibration error may be subject to error, due to uncertainty in the label frequency estimates. Since how to estimate confidence bands for nonparamet- ric regression is an unsolved problem (Wasserman, 2006), we resort to a simple method based on the binning. We construct a binomial normal approx- imation for the label frequency estimate in each bin, and simulate from it; every simulation across all bins is used to construct a calibration error; these simulated calibration errors are collected to construct a normal approximation for the calibra- (c) (d) (a) (b) Figure 1: (a) A skewed distribution of predictions on whether a word has the NN tag (§4.2.2). Calibration curves produced by equally-spaced binning with bin width equal to 0.02 (b) and 0.1 (c) can have wide confidence intervals. Adaptive binning (with 1000 points in each bin) (d) gives small confidence intervals and also captures the prediction distribution. The confidence intervals are estimated as described in §3.1. tion error estimate. Since we use bin sizes of at least β ≥ 200 in our experiments, the central limit theorem justifies these approximations. We report all calibration errors along with their 95% confi- dence intervals calculated by Algorithm 2.7 iments, we set the target bin size in Algorithm 1 to be 5,000 and the number of samples in Algo- rithm 2 to be 10,000. better 3.3 Visualizing calibration a model’s understand In order to pairs plot the calibration properties, we (p1, q1), (p2, q2),··· , (pT , qT ) obtained from the adaptive binning procedure to visualize the calibration curve of the model—this visualization is known as a calibration or reliability plot. It provides finer grained insight into the calibra- tion behavior in different prediction ranges. A perfectly calibrated curve would coincide with the y = x diagonal line. When the curve lies above the diagonal, the model is underconfident (q < pq); and when it is below the diagonal, the model is overconfident (q > pq). An advantage of plotting a curve estimated from fixed-size bins, instead of fixed-width bins, is that the distribution of the points hints at the refinement aspect of the model’s performance. If the points’ positions tend to cluster in the bottom-left and top- right corners, that implies the model is making more refined predictions. 4 Calibration for classification and tagging models Using the method described in §3, we assess the quality of posterior predictions of several classi- fication and tagging models. In all of our exper- 7A major unsolved issue is how to fairly select the bin size. If it is too large, the curve is oversmoothed and calibra- tion looks better than it should be; if it is too small, calibra- tion looks worse than it should be. Bandwidth selection and cross-validation techniques may better address this problem in future work. In the meantime, visualizations of calibration curves help inform the reader of the resolution of a particular analysis—if the bins are far apart, the data is sparse, and the specific details of the curve are not known in those regions. Introduction 4.1 Naive Bayes and logistic regression 4.1.1 Previous work on Naive Bayes has found its prob- abilities to have calibration issues, in part due to its incorrect conditional independence assump- tions (Niculescu-Mizil and Caruana, 2005; Ben- nett, 2000; Domingos and Pazzani, 1997). Since logistic regression has the same log-linear repre- sentational capacity (Ng and Jordan, 2002) but does not suffer from the independence assump- tions, we select it for comparison, hypothesizing it may have better calibration. We analyze a binary classification task of Twit- ter sentiment analysis from emoticons. We col- lect a dataset consisting of tweets identified by the Twitter API as English, collected from 2014 to 2015, with the “emoticon trick” (Read, 2005; Lin and Kolcz, 2012) to label tweets that contain at least one occurrence of the smiley emoticon “:)” as “happy” (y = 1) and others as y = 0. The smiley emoticons are deleted in positive examples. We sampled three sets of tweets (subsampled from the Decahose/Gardenhose stream of public tweets) with Jan-Apr 2014 for training, May-Dec 2014 for development, and Jan-Apr 2015 for testing. Each set contains 105 tweets, split between an equal number of positive and negative instances. We use binary features based on unigrams extracted from the twokenize.py8 tokenization. We use the scikit-learn (Pedregosa et al., 2011) implementa- tions of Bernoulli Naive Bayes and L2-regularized logistic regression. The models’ hyperparameters (Naive Bayes’ smoothing paramter and logistic re- gression’s regularization strength) are chosen to 8https://github.com/myleott/ ark-twokenize-py 01000020000300000.000.250.500.751.00Prediction StrengthCount0.000.250.500.751.000.000.250.500.751.00Prediction strengthEmpirical frequency0.000.250.500.751.000.000.250.500.751.00Prediction strengthEmpirical frequency0.000.250.500.751.000.000.250.500.751.00Prediction strengthEmpirical frequency (a) (b) (a) (b) Figure 2: Calibration curve of (a) Naive Bayes and (b) lo- gistic regression on predicting whether a tweet is a “happy” tweet. maximize the F-1 score on the development set. 4.1.2 Results Naive Bayes attains a slightly higher F-1 score (NB 73.8% vs. LR 72.9%), but logistic regression has much lower calibration error: less than half as much RMSE (NB 0.105 vs. LR 0.041; Figure 2). Both models have a tendency to be undercon- fident in the lower prediction range and overconfi- dent in the higher range, but the tendency is more pronounced for Naive Bayes. 4.2 Hidden Markov models and conditional random fields Introduction 4.2.1 Hidden Markov models (HMM) and linear chain conditional random fields (CRF) are another com- monly used pair of analogous generative and dis- criminative models. They both define a posterior over tag sequences P (yx), which we apply to part-of-speech tagging. We can analyze these models in the binary cal- ibration framework (§2-3) by looking at marginal distribution of binary-valued outcomes of parts of the predicted structures. Specifically, we examine calibration of predicted probabilities of individual tokens’ tags (§4.2.2), and of pairs of consecutive tags (§4.2.3). These quantities are calculated with the forward-backward algorithm. To prepare a POS tagging dataset, we ex- tract Wall Street Journal articles from the En- glish CoNLL-2011 coreference shared task dataset from Ontonotes (Pradhan et al., 2011), using the CoNLL-2011 splits for training, development and testing. This results in 11,772 sentences for train- ing, 1,632 for development, and 1,382 for testing, over a set of 47 possible tags. We train an HMM with Dirichlet MAP us- ing one pseudocount for every transition and word emission. For the CRF, we use the L2- regularized L-BFGS algorithm implemented in Figure 3: Calibration curves of (a) HMM, and (b) CRF, on predictions over all POS tags. CRFsuite (Okazaki, 2007). We compare an HMM to a CRF that only uses basic transition (tag-tag) and emission (tag-word) features, so that it does not have an advantage due to more features. In order to compare models with similar task perfor- mance, we train the CRF with only 3000 sentences from the training set, which yields the same accu- racy as the HMM (about 88.7% on the test set). In each case, the model’s hyperparameters (the CRF’s L2 regularizer, the HMM’s pseudocount) are selected by maximizing accuracy on the devel- opment set. 4.2.2 Predicting single-word tags In this experiment, we measure miscalibration of the two models on predicting tags of single words. First, for each tag type, we produce a set of 33,306 prediction-label pairs (for every token); we then concatenate them across the tags for calibration analysis. Figure 3 shows that the two models exhibit distinct calibration patterns. The HMM tends to be very underconfident whereas the CRF is overconfident, and the CRF has a lower (better) overall calibration error. We also examine the calibration errors of the individual POS tags (Figure 4(a)). We find that CRF is significantly better calibrated than HMM in most but not all categories (39 out of 47). For example, they are about equally calibrated on pre- dicting the NN tag. The calibration gap between the two models also differs among the tags. 4.2.3 Predicting two-consecutive-word tags There is no reason to restrict ourselves to model predictions of single words; these models define marginal distributions over larger textual units. Next we examine the calibration of posterior pre- dictions of tag pairs on two consecutive words in the test set. The same analysis may be impor- tant for, say, phrase extraction or other chunk- ing/parsing tasks. CalibErr=0.1048 ± 6.9E−030.000.250.500.751.000.000.250.500.751.00Prediction strengthEmpirical frequencyCalibErr=0.0409 ± 6.2E−030.000.250.500.751.000.000.250.500.751.00Prediction strengthEmpirical frequencyCalibErr=0.0153 ± 5.1E−040.000.250.500.751.000.000.250.500.751.00Prediction strengthEmpirical frequencyCalibErr=0.0081 ± 3.5E−030.000.250.500.751.000.000.250.500.751.00Prediction strengthEmpirical frequency which previous mention it attaches to, or NEW if it is starting a new entity that has not yet been seen at a previous position in the text. Such a mention- mention attachment indicates coreference, while the final entity clustering includes more links im- plied through transitivity. The model’s generative process is: Definition 2 (Antencedent coreference model and sampling algorithm). • For i = 1..N, sample exp(wTf (i, ai, x)) ai ∼ 1 Zi • Calculate the entity clusters as e := CC(a), the connected components of the antecedent graph having edges (i, ai) for i where ai (cid:54)= NEW. (cid:81) Here x denotes all information in the document that is conditioned on for log-linear features f. e = {e1, ...eM} denotes the entity clusters, where each element is a set of mentions. There are M en- tity clusters corresponding to the number of con- nected components in a. The model defines a joint distribution over antecedent decisions P (ax) = i P (aix); it also defines a joint distribution over entity clusterings P (ex), where the probability of an e is the sum of the probabilities of all a vectors that could give rise to it. In a manner similar to a distance-dependent Chinese restaurant process (Blei and Frazier, 2011), it is non-parametric in the sense that the number of clusters M is not fixed in advance. 5.2 Sampling-based inference For both calibration analysis and exploratory ap- plications, we need to analyze the posterior distri- bution over entity clusterings. This distribution is a complex mathematical object; an attractive ap- proach to analyze it is to draw samples from this distribution, then analyze the samples. This antecedent-based model admits a very straightforward procedure to draw independent e samples, by stepping through Def. 2: indepen- dently sample each ai then calculate the connected components of the resulting antecedent graph. By construction, this procedure samples from the joint distribution of e (even though we never com- pute the probability of any single clustering e). Unlike approximate sampling approaches, such as Markov chain Monte Carlo methods used in other coreference work to sample e (Haghighi and Klein, 2007), here there are no questions about burn-in or autocorrelation (Kass et al., 1998). Every sample is independent and very fast to (a) (b) Figure 4: Calibration errors of HMM and CRF on predict- ing (a) single-word tags and (b) two-consecutive-word tags. Lower errors are better. The last two columns in each graph are the average calibration errors over the most common la- bels. We report results for the top 5 and 100 most fre- quent tag pairs (Figure 4(b)). We observe a simi- lar pattern as seen from the experiment on single tags: the CRF is generally better calibrated than the HMM, but the HMM does achieve better cali- bration errors in 29 out of 100 categories. These tagging experiments illustrate that, de- pending on the application, different models can exhibit different levels of calibration. 5 Coreference resolution We examine a third model, a probabilistic model for within-document noun phrase coreference, which has an efficient sampling-based inference procedure. In this section we introduce it and ana- lyze its calibration, in preparation for the next sec- tion where we use it for exploratory data analysis. 5.1 Antecedent selection model We use the Berkeley coreference resolution sys- tem (Durrett and Klein, 2013), which was origi- nally presented as a CRF; we give it an equivalent a series of independent logistic regressions (see appendix for details). The primary component of this model is a locally-normalized log-linear dis- tribution over clusterings of noun phrases, each cluster denoting an entity. The model takes a fixed input of N mentions (noun phrases), indexed by i in their positional order in the document. It posits that every mention i has a latent antecedent selec- tion decision, ai ∈ {1, . . . , i − 1, NEW}, denoting 0.0000.0250.0500.075NNINNNPDTJJAverage (5)Average (all)LabelCalibErrHMMCRF0.000.020.040.06NNP−NNPDT−NNNN−ININ−DTJJ−NNAverage (5)Average (100)LabelCalibErrHMMCRF We perform this analysis on the develop- ment section of the English CoNLL-2011 data (404 documents). Using the sampling inference method discussed in §5.2, we compute 4.3 mil- lions prediction-label pairs and measure their cali- bration error. Our result shows that the model pro- duces very well-calibrated predictions with less than 1% CalibErr (Figure 5), though slightly overconfident on middle to high-valued predic- tions. The calibration error indicates that it is the most calibrated model we examine within this pa- per. This result suggests we might be able to trust its level of uncertainty. 6 Uncertainty in Entity-based Exploratory Analysis 6.1 Entity-syntactic event aggregation We demonstrate one important use of calibration analysis: to ensure the usefulness of propagating uncertainty from coreference resolution into a sys- tem for exploring unannotated text. Accuracy can- not be calculated since there are no labels; but if the system is calibrated, we postulate that un- certainty information can help users understand the underlying reliability of aggregated extractions and isolate predictions that are more likely to con- tain errors. We illustrate with an event analysis application to count the number of “country attack events”: for a particular country of the world, how many news articles describe an entity affiliated with that country as the agent of an attack, and how does this number change over time? This is a simpli- fied version of a problem where such systems have been built and used for political science analysis (Schrodt et al., 1994; Schrodt, 2012; Leetaru and Schrodt, 2013; Boschee et al., 2013; O’Connor et al., 2013). A coreference component can im- prove extraction coverage in cases such as “Rus- sian troops were sighted . . . and they attacked . . . ” We use the coreference system examined in §5 for this analysis. To propagate coreference un- certainty, we re-run event extraction on multiple coreference samples generated from the algorithm described in §5.2, inducing a posterior distribution over the event counts. To isolate the effects of coreference, we use a very simple syntactic depen- dency system to identify affiliations and events. Assume the availability of dependency parses for a document d, a coreference resolution e, and a lexicon of country names, which contains a small set of words w(c) for each country c; for example, w(FRA) = {france, french}. The binary function Figure 5: Coreference calibration curve for predicting whether two mentions belong to the same entity cluster. compute—only slightly slower than calculating the MAP assignment (due to the exp and normal- ization for each ai). We implement this algorithm by modifying the publicly available implementa- tion from Durrett and Klein.9 5.3 Calibration analysis We consider the following inference query: for a randomly chosen pair of mentions, are they coref- erent? Even if the model’s accuracy is compara- tively low, it may be the case that it is correctly calibrated—if it thinks there should be great vari- ability in entity clusterings, it may be uncertain whether a pair of mentions should belong together. Let (cid:96)ij be 1 if the mentions i and j are predicted to be coreferent, and 0 otherwise. Annotated data defines a gold-standard (cid:96)(g) ij value for every pair i, j. Any probability distribution over e defines a marginal Bernoulli distribution for every proposi- tion (cid:96)ij, marginalizing out e: 1{(i, j) ∈ e}P (e x) (2) P ((cid:96)ij = 1 x) = where (i, j) ∈ e is true iff there is an entity in e that contains both i and j. (cid:88) e In a traditional coreference evaluation of the the model as- best-prediction entity clustering, signs 1 or 0 to every (cid:96)ij and the pairwise precision and recall can be computed by comparing them to the corresponding (cid:96)(g) ij . Here, we instead compare the qij ≡ P ((cid:96)ij = 1 x, e) prediction strengths against (cid:96)(g) ij empirical frequencies to assess pair- wise calibration, with the same binary calibration analysis tools developed in §3 by aggregating pairs with similar qij values. Each qij is computed by averaging over 1,000 samples, simply taking the fraction of samples where the pair (i, j) is coref- erent. 9Berkeley Coreference Resolution System, version http://nlp.cs.berkeley.edu/projects/ 1.1: coref.shtml CalibErr=0.0087 ± 3.3E−030.000.250.500.751.000.000.250.500.751.00Prediction strengthEmpirical frequency f (c, e; xd) assesses whether an entity e is affiliated with country c and is described as the agent of an attack, based on document text and parses xd; f returns true iff both:10 • There exists a mention i ∈ e described as country c: either its head word is in w(c) (e.g. “Americans”), or its head word has an nmod or amod modifier in w(c) (e.g. “American forces”, “president of the U.S.”); and there is only one unique country c among the mentions in the entity. • There exists a mention j ∈ e which is the nsubj or agent argument to the verb “attack” (e.g. “they attacked”, “the forces attacked”, “attacked by them”). For a given c, we first calculate a binary variable for whether there is at least one entity fulfilling f in a particular document, a(d, c, ed) = f (c, e; xd) (3) (cid:95) e∈ed (cid:88) d∈d(t) and second, the number of such documents in d(t), the set of New York Times articles published in a given time period t, n(t, c, ed(t)) = a(d, c, ed) (4) These quantities are both random variables, since they depend on e; thus we are interested in the posterior distribution of n, marginalizing out e, P (n(t, c, ed(t)) xd(t)) (5) If our coreference model was highly certain (only one structure, or a small number of similar struc- tures, had most of the probability mass in the space of all possible structures), each document would have an a posterior near either 0 or 1, and their sum in Eq. 5 would have a narrow distribution. But if the model is uncertain, the distribution will be wider. Because of the transitive closure, the prob- ability of a is potentially more complex than the single antecedent linking probability between two mentions—the affiliation and attack information can propagate through a long coreference chain. 6.2 Results We tag and parse a 193,403 article subset of the Annotated New York Times LDC corpus (Sand- haus, 2008), which includes articles about world 10Syntactic are Universal Dependencies (de Marneffe et al., 2014); more details for the extrac- tion rules are in the appendix. relations news from the years 1987 to 2007 (details in ap- pendix). For each article, we run the coreference system to predict 100 samples, and evaluate f on every entity in every sample.11 The quantity of interest is the number of articles mentioning at- tacks in a 3-month period (quarter), for a given country. Figure 6 illustrates the mean and 95% posterior credible intervals for each quarter. The posterior mean m is calculated as the mean of the samples, and the interval is the normal approxima- tion m ± 1.96 s, where s is the standard deviation among samples for that country and time period. Uncertainty information helps us understand whether a difference between data points is real. In the plots of Figure 6, if we had used a 1-best coreference resolution, only a single line would be shown, with no assessment of uncertainty. This is problematic in cases when the model genuinely does not know the correct answer. For example, the 1993-1996 period of the USA plot (Figure 6, top) shows the posterior mean fluctuating from 1 to 5 documents; but when credible intervals are taken into consideration, we see that model does not know whether the differences are real, or were caused by coreference noise. A similar case is highlighted at the bottom plot of Figure 6. Here we compare the event counts for Yugoslavia and NATO, which were engaged in a conflict in 1999. Did the New York Times de- vote more attention to the attacks by one particu- lar side? To a 1-best system, the answer would be yes. But the posterior intervals for the two coun- tries’ event counts in mid-1999 heavily overlap, indicating that the coreference system introduces too much uncertainty to obtain a conclusive an- swer for this question. Note that calibration of the coreference model is important for the credible in- tervals to be useful; for example, if the model was badly calibrated by being overconfident (too much probability over a small set of similar structures), these intervals would be too narrow, leading to in- correct interpretations of the event dynamics. Visualizing this uncertainty gives richer infor- mation for a potential user of an NLP-based sys- tem, compared to simply drawing a line based on a single 1-best prediction. It preserves the gen- uine uncertainty due to ambiguities the system was unable to resolve. This highlights an alternative use of Finkel et al. (2006)’s approach of sampling multiple NLP pipeline components, which in that work was used to perform joint inference. Instead 11We obtained similar results using only 10 samples. We also obtained similar results with a different query function, the total number of entities, across documents, that fulfill f. of focusing on improving an NLP pipeline, we can pass uncertainty on to exploratory purposes, and try to highlight to a user where the NLP system may be wrong, or where it can only imprecisely specify a quantity of interest. Finally, calibration can help error analysis. For a calibrated model, the more uncertain a predic- tion is, the more likely it is to be erroneous. While coreference errors comprise only one part of event extraction errors (alongside issues in parse qual- ity, factivity, semantic roles, etc.), we can look at highly uncertain event predictions to understand the nature of coreference errors relative to our task. We manually analyzed documents with a 50% probability to contain an “attack”ing country- affiliated entity, and found difficult coreference cases. In one article from late 1990, an “attack” event for IRQ is extracted from the sentence “But some political leaders said that they feared that Mr. Hus- sein might attack Saudi Arabia”. The mention “Mr. Hussein” is classified as IRQ only when it is coreferent with a previous mention “President Saddam Hussein of Iraq”; this occurs only 50% of the time, since in some posterior samples the coreference system split apart these two “Hussein” mentions. This particular document is addition- ally difficult, since it includes the names of more than 10 countries (e.g. United States, Saudi Ara- bia, Egypt), and some of the Hussein mentions are even clustered with presidents of other countries (such as “President Bush”), presumably because they share the “president” title. These types of er- rors are a major issue for a political analysis task; further analysis could assess their prevalence and how to address them in future work. 7 Conclusion In this work, we argue that the calibration of pos- terior predictions is a desirable property of prob- abilistic NLP models, and that it can be directly evaluated. We also demonstrate a use case of having calibrated uncertainty: its propagation into downstream exploratory analysis. Our posterior simulation approach for ex- ploratory and error analysis relates to posterior predictive checking (Gelman et al., 2013), which analyzes a posterior to test model assumptions; Mimno and Blei (2011) apply it to a topic model. One avenue of future work is to investigate more effective nonparametric regression methods to better estimate and visualize calibration error, such as Gaussian processes or bootstrapped kernel Figure 6: Number of documents with an “attack”ing coun- try per 3-month period, and coreference posterior uncertainty for that quantity. The dark line is the posterior mean, and the shaded region is the 95% posterior credible interval. See appendix for more examples. density estimation. Another important question is: what types of in- ferences are facilitated by correct calibration? In- tuitively, we think that overconfidence will lead to overly narrow confidence intervals; but in what sense are confidence intervals “good” when cal- ibration is perfect? Also, does calibration help joint inference in NLP pipelines? It may also assist calculations that rely on expectations, such as in- ference methods like minimum Bayes risk decod- ing, or learning methods like EM, since calibrated predictions imply that calculated expectations are statistically unbiased (though the implications of this fact may be subtle). Finally, it may be in- teresting to pursue recalibration methods, which readjust a non-calibrated model’s predictions to be calibrated; recalibration methods have been de- veloped for binary (Platt, 1999; Niculescu-Mizil and Caruana, 2005) and multiclass (Zadrozny and Elkan, 2002) classification settings, but we are unaware of methods appropriate for the highly structured outputs typical in linguistic analysis. Another approach might be to directly constrain CalibErr = 0 during training, or try to reduce it as a training-time risk minimization or cost objec- tive (Smith and Eisner, 2006; Gimpel and Smith, 2010; Stoyanov et al., 2011; Brummer and Dod- dington, 2013). Calibration is an interesting and important prop- erty of NLP models. Further work is necessary to address these and many other questions. 19901995200020050102030USA0102030199519961997199819992000051015Serbia/Yugo.NATO Acknowledgments Thanks to Erik Learned-Miller, Benjamin Mar- lin, Craig Greenberg, Phan-Minh Nguyen, Caitlin Cellier and the CMU ARK Lab for discussion and comments, and to the anonymous reviewers (espe- cially R3) for helpful suggestions. References David Bamman, Brendan O’Connor, and Noah A. Smith. Learning latent personas of film charac- ters. In Proceedings of ACL, 2013. Paul N. Bennett. Assessing the calibration of naive Bayes’ posterior estimates. Technical report, Carnegie Mellon University, 2000. David M. Blei and Peter I. Frazier. Distance dependent Chinese restaurant processes. The Journal of Machine Learning Research, 12: 2461–2488, 2011. Elizabeth Boschee, Premkumar Natarajan, and Ralph Weischedel. Automatic extraction of events from open source text for predictive forecasting. Handbook of Computational Ap- proaches to Counterterrorism, page 51, 2013. Glenn W. Brier. Verification of forecasts expressed in terms of probability. Monthly weather review, 78(1):1–3, 1950. Jochen Brocker. Reliability, sufficiency, and the decomposition of proper scores. Quarterly Journal of the Royal Meteorological Society, 135(643):1512–1519, 2009. Niko Brummer and George Doddington. Likelihood-ratio calibration prior- weighted proper scoring rules. arXiv preprint arXiv:1307.7981, 2013. Interspeech 2013. using Marie-Catherine de Marneffe, Timothy Dozat, Natalia Silveira, Katri Haverinen, Filip Gin- ter, Joakim Nivre, and Christopher D. Man- ning. Universal Stanford dependencies: A In Proceedings of cross-linguistic typology. LREC, 2014. Morris H. DeGroot and Stephen E. Fienberg. The comparison and evaluation of forecasters. The statistician, pages 12–22, 1983. Pedro Domingos and Michael Pazzani. On the op- timality of the simple Bayesian classifier under zero-one loss. Machine learning, 29(2-3):103– 130, 1997. Greg Durrett and Dan Klein. A joint model for entity analysis: Coreference, typing, and link- ing. Transactions of the Association for Com- putational Linguistics, 2:477–490, 2014. Jenny Rose Finkel, Christopher D. Manning, and Andrew Y. Ng. Solving the problem of cascad- ing errors: Approximate Bayesian inference for linguistic annotation pipelines. In Proceedings of the 2006 Conference on Empirical Methods in Natural Language Processing, pages 618– 626. Association for Computational Linguis- tics, 2006. Andrew Gelman, John B. Carlin, Hal S. Stern, David B. Dunson, Aki Vehtari, and Donald B. Rubin. Bayesian data analysis. Chapman and Hall/CRC, 3rd edition, 2013. Kevin Gimpel and Noah A. Smith. Kevin Gimpel and Noah A. Smith. Rich source- side context for statistical machine translation. In Proceedings of the Third Workshop on Sta- tistical Machine Translation, pages 9–17, 2008. Softmax- margin CRFs: Training log-linear models with cost functions. In Human Language Technolo- gies: The 2010 Annual Conference of the North American Chapter of the Association for Com- putational Linguistics, pages 733–736. Associ- ation for Computational Linguistics, 2010. Kevin Gimpel, Dhruv Batra, Chris Dyer, and Gre- gory Shakhnarovich. A systematic exploration In Pro- of diversity in machine translation. ceedings of the 2013 Conference on Empiri- cal Methods in Natural Language Processing, pages 1100–1111, Seattle, Washington, USA, October 2013. Association for Computational Linguistics. URL http://www.aclweb. org/anthology/D13-1111. Tilmann Gneiting and Adrian E. Raftery. Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477):359–378, 2007. Joshua Goodman. Parsing algorithms and met- rics. In Proceedings of the 34th Annual Meet- ing of the Association for Computational Lin- guistics, pages 177–183, Santa Cruz, Califor- nia, USA, June 1996. Association for Com- putational Linguistics. doi: 10.3115/981863. 981887. URL http://www.aclweb.org/ anthology/P96-1024. Greg Durrett and Dan Klein. Easy victories and In uphill battles in coreference resolution. EMNLP, pages 1971–1982, 2013. Aria Haghighi and Dan Klein. Unsuper- vised coreference resolution in a nonparametric Bayesian model. In Annual Meeting, Associa- tion for Computational Linguistics, volume 45, page 848, 2007. in neural information processing systems, 14: 841, 2002. Robert E. Kass, Bradley P. Carlin, Andrew Gel- man, and Radford M. Neal. Markov chain Monte Carlo in practice: a roundtable discus- sion. The American Statistician, 52(2):93–100, 1998. Shankar Kumar and William Byrne. Minimum Bayes-risk decoding for statistical machine translation. In Daniel Marcu Susan Dumais and Salim Roukos, editors, HLT-NAACL 2004: Main Proceedings, pages 169–176, Boston, Massachusetts, USA, May 2 - May 7 2004. As- sociation for Computational Linguistics. Kalev Leetaru and Philip A. Schrodt. GDELT: Global data on events, location, and tone, 1979– In ISA Annual Convention, volume 2, 2012. page 4, 2013. Jimmy Lin and Alek Kolcz. Large-scale ma- chine learning at Twitter. In Proceedings of the 2012 ACM SIGMOD International Conference on Management of Data, pages 793–804. ACM, 2012. Michael C. McCord, J. William Murdock, and Branimir K. Boguraev. Deep parsing in Watson. IBM Journal of Research and Development, 56 (3.4):3–1, 2012. David Mimno and David Blei. Bayesian check- In Proceedings of ing for topic models. the 2011 Conference on Empirical Meth- ods in Natural Language Processing, pages 227–237, Edinburgh, Scotland, UK., July 2011. Association for Computational Linguis- tics. URL http://www.aclweb.org/ anthology/D11-1021. Makoto Miwa, Sampo Pyysalo, Tadayoshi Hara, and Jun’ichi Tsujii. Evaluating dependency In Pro- representations for event extraction. ceedings of the 23rd International Confer- ence on Computational Linguistics (Coling 2010), pages 779–787, Beijing, China, Au- gust 2010. Coling 2010 Organizing Commit- tee. URL http://www.aclweb.org/ anthology/C10-1088. Allan H. Murphy and Robert L. Winkler. A general framework for forecast verification. Monthly Weather Review, 115(7):1330–1338, 1987. Andrew Ng and Michael Jordan. On discrimina- tive vs. generative classifiers: A comparison of logistic regression and naive Bayes. Advances Alexandru Niculescu-Mizil and Rich Caruana. Predicting good probabilities with supervised In Proceedings of the 22nd Interna- learning. tional Conference on Machine Learning, pages 625–632, 2005. Brendan O’Connor, Brandon Stewart, and Learning to extract inter- In Noah A. Smith. national relations from political context. Proceedings of ACL, 2013. Naoaki Okazaki. Crfsuite: a fast implemen- tation of conditional random fields (CRFs), 2007. URL http://www.chokkan.org/ software/crfsuite/. F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Van- derplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Ma- chine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. John Platt. Probabilistic outputs for support vector machines and comparisons to regularized like- In Advances in large margin lihood methods. classifiers. MIT Press (2000), 1999. URL http://research.microsoft.com/ pubs/69187/svmprob.ps.gz. Sameer Pradhan, Lance Ramshaw, Mitchell Mar- cus, Martha Palmer, Ralph Weischedel, and Ni- anwen Xue. CoNLL-2011 shared task: Mod- eling unrestricted coreference in Ontonotes. In Proceedings of the Fifteenth Conference on Computational Natural Language Learning: Shared Task, pages 1–27. Association for Com- putational Linguistics, 2011. Jonathon Read. Using emoticons to reduce depen- dency in machine learning techniques for senti- ment classification. In Proceedings of the ACL Student Research Workshop, pages 43–48. As- sociation for Computational Linguistics, 2005. Evan Sandhaus. The New York Times Anno- Linguistic Data Consortium, tated Corpus. LDC2008T19, 2008. Philip A. Schrodt. Precedents, progress, and prospects in political event data. International Interactions, 38(4):546–569, 2012. Philip A. Schrodt, Shannon G. Davis, and Ju- dith L. Weddle. KEDS – a program for the machine coding of event data. Social Science Computer Review, 12(4):561 –587, December doi: 10.1177/089443939401200408. http://ssc.sagepub.com/ 1994. URL content/12/4/561.abstract. Sameer Singh, Sebastian Riedel, Brian Martin, Ji- aping Zheng, and Andrew McCallum. Joint in- ference of entities, relations, and coreference. In Proceedings of the 2013 Workshop on Auto- mated Knowledge Base Construction, pages 1– 6. ACM, 2013. David A. Smith and Jason Eisner. Minimum risk annealing for training log-linear models. In Pro- ceedings of the COLING/ACL 2006 Main Con- ference Poster Sessions, pages 787–794, Syd- ney, Australia, July 2006. Association for Com- putational Linguistics. URL http://www. aclweb.org/anthology/P06-2101. Veselin Stoyanov, Alexander Ropson, and Jason Eisner. Empirical risk minimization of graphi- cal model parameters given approximate infer- ence, decoding, and model structure. In Interna- tional Conference on Artificial Intelligence and Statistics, pages 725–733, 2011. Kristina Toutanova, Aria Haghighi, and Christo- pher D. Manning. A global joint model for se- mantic role labeling. Computational Linguis- tics, 34(2):161–191, 2008. John W. Tukey. Curves as parameters, and touch estimation. In Proceedings of the Fourth Berkeley Symposium on Mathematical Statis- tics and Probability, Volume 1: Contributions to the Theory of Statistics, pages 681–694, Berkeley, Calif., 1961. University of Califor- nia Press. URL http://projecteuclid. org/euclid.bsmsp/1200512189. Ashish Venugopal, Andreas Zollmann, Noah A. Smith, and Stephan Vogel. Wider pipelines: N- best alignments and parses in MT training. In Proceedings of AMTA, 2008. Larry Wasserman. All of nonparametric statistics. Springer Science & Business Media, 2006. Bianca Zadrozny and Charles Elkan. Transform- ing classifier scores into accurate multiclass probability estimates. In Proceedings of KDD, pages 694–699. ACM, 2002. Appendix 1 Sampling a deterministic function of a random variable In several places in this paper, we define proba- bility distributions over deterministic functions of a random variable, and sample from them by ap- plying the deterministic function to samples of the random variable. This should be valid by con- struction, but we supply the following argument for further justification. X is a random variable and g(x) is a determin- istic function which takes a value of X as its in- put. Since g depends on a random variable, g(X) is a random variable as well. The distribution for g(X), or aspects of it (such as a PMF or in- dependent samples from it) can be calculated by marginalizing out X with a Monte Carlo approx- imation. Assuming g has discrete outputs (as is the case for the event counting function n, or con- nected components function CC), we examine the probability mass function: pmf(h) ≡ P (g(X) = h) (6) (7) (8) (9) (cid:88) (cid:88) x = = x ≈ 1 S (cid:88) x∼P (X) P (g(x) = h x) P (x) 1{g(x) = h}P (x) 1{g(x) = h} Eq. 8 holds because g(x) is a deterministic func- tion, and Eq. 9 is a Monte Carlo approximation that uses S samples from P (x). This implies that a set of g values calculated on x samples, {g(x(s)) : x(s) ∼ P (x)}, should con- stitute a sample from the distribution P (g(X)); in our event analysis section we usually call this the “posterior” distribution of g(X) (the n(t, c) func- tion there). In our setting, we do not directly use the PMF calculation above; instead, we construct normal approximations to the probability distribu- tion g(X). We use this technique in several places. For the calibration error confidence interval, the calibra- tion error is a deterministic function of the uncer- tain empirical label frequencies pi; there, we prop- agate posterior uncertainty from a normal approx- imation to the Bernoulli parameter’s posterior (the pi distribution under the central limit theorem) through simulation. In the coreference model, the connected components function is a determinis- tic function of the antecedent vector; thus repeat- edly calculating e(s) := CC(a(s)) yields samples of entity clusterings from their posterior. For the event analysis, the counting function n(t, c, ed(t)) is a function of the entity samples, and thus can be recalculated on each—this is a multiple step deter- ministic pipeline, which postprocesses simulated random variables. √ As in other Monte Carlo-based inference tech- niques (as applied to both Bayesian and frequentist (e.g. bootstrapping) inference), the mean and stan- dard deviation of samples drawn from the distribu- tion constitute the mean and standard deviation of the desired posterior distribution, subject to Monte Carlo error due to the finite number of samples, which by the central limit theorem shrinks at a rate √ of 1/ S. The Monte Carlo standard error for es- timating the mean is σ/ S where σ is the stan- dard deviation. So with 100 samples, the Monte Carlo standard error for the mean is 100 = 10 times smaller than standard deviation. Thus in the time series graphs, which are based on S = 100 samples, the posterior mean (dark line) has Monte Carlo uncertainty that is 10 times smaller than the vertical gray area (95% CI) around it. 2 Normalization in the coreference √ model Durrett and Klein (2013) present their model as a globally normalized, but fully factorized, CRF: P (ax) = 1 Z exp(wTf (i, ai, x)) regex /(SportsOpinion), and whose text body con- tains a mention of at least one country name. Country names are taken from the dictionary country igos.txt based on previous work (http: //brenocon.com/irevents/). Country name matching is case insensitive and uses light stemming: when trying to match a word against the lexicon, if a match is not found, it backs off to stripping the last and last two characters. (This is usually unnecessary since the dictionary contains modifier forms.) POS, NER, and constituent and dependency parses are produced with Stanford CoreNLP 3.5.2 with default settings except for one change, to use its shift-reduce constituent parser (for convenience of processing speed). We treat tags and parses as fixed and leave their uncertainty propagation for future work. When formulating the extraction rules, we ex- amined frequencies of all syntactic dependencies within country-affiliated entities, in order to help find reasonably high-coverage syntactic relations for the “attack” rule. 4 Event time series graphs The following pages contain posterior time series graphs for 20 countries, as described in the sec- tion on coreference-based event aggregation, in or- der of decreasing total event frequency. As in the main paper, the blue line indicates the posterior mean, and the gray region indicates 95% posterior credibility intervals, with count aggregation at the monthly level. The titles are ISO3 country codes. (cid:89) i (cid:89) i Since the factor function decomposes indepen- dently for each random variable ai, their probabil- ities are actually independent, and can be rewritten with local normalization, P (ax) = 1 Zi exp(wTf (i, ai, x)) This interpretation justifies the use of independent sampling to draw samples of the joint posterior. 3 Event analysis: Corpus selection, country affiliation, and parsing Articles are filtered to yield a dataset about world news. In the New York Times Annotated Corpus, every article is tagged with a large set of labels. We include articles that contain a category whose label starts with the string Top/News/World, and exclude articles with any category matching the 19901995200020050102030USA01020301990199520002005010203040IRQ0102030401990199520002005051020ISR051020199019952000200502468GBR02468199019952000200502468PSE0246819901995200020050102030IRN01020301990199520002005051020SRB051020199019952000200502468RUS02468199019952000200502468CHN02468199019952000200502468FRA02468199019952000200502468DEU02468199019952000200502468IND02468 199019952000200502468AFG024681990199520002005051015IGONAT051015199019952000200502468JPN02468199019952000200502468KWT02468199019952000200502468PAK02468199019952000200502468HRV02468199019952000200502468LBN02468199019952000200502468SYR02468
1810.12343
2
1810
2019-02-18T22:14:21
Content Selection in Deep Learning Models of Summarization
[ "cs.CL" ]
We carry out experiments with deep learning models of summarization across the domains of news, personal stories, meetings, and medical articles in order to understand how content selection is performed. We find that many sophisticated features of state of the art extractive summarizers do not improve performance over simpler models. These results suggest that it is easier to create a summarizer for a new domain than previous work suggests and bring into question the benefit of deep learning models for summarization for those domains that do have massive datasets (i.e., news). At the same time, they suggest important questions for new research in summarization; namely, new forms of sentence representations or external knowledge sources are needed that are better suited to the summarization task.
cs.CL
cs
Content Selection in Deep Learning Models of Summarization Chris Kedzie and Kathleen McKeown Department of Computer Science Columbia University 9 1 0 2 b e F 8 1 ] L C . s c [ 2 v 3 4 3 2 1 . 0 1 8 1 : v i X r a {kedzie,kathy}@cs.columbia.edu Abstract We carry out experiments with deep learning models of summarization across the domains of news, personal stories, meetings, and medi- cal articles in order to understand how content selection is performed. We find that many so- phisticated features of state of the art extractive summarizers do not improve performance over simpler models. These results suggest that it is easier to create a summarizer for a new do- main than previous work suggests and bring into question the benefit of deep learning mod- els for summarization for those domains that do have massive datasets (i.e., news). At the same time, they suggest important questions for new research in summarization; namely, new forms of sentence representations or ex- ternal knowledge sources are needed that are better suited to the summarization task. 1 Introduction Content selection is a central component in many natural language generation tasks, where, given a generation goal, the system must determine which information should be expressed in the output text (Gatt and Krahmer, 2018). In summarization, content selection is usually accomplished through sentence (and, occasionally, phrase) extraction. Despite being a key component of both extrac- tive and abstractive summarization systems, it is is not well understood how deep learning models perform content selection with only word and sen- tence embedding based features as input. Non- neural network approaches often use frequency and information theoretic measures as proxies for content salience (Hong and Nenkova, 2014), but these are not explicitly used in most neural net- work summarization systems. In this paper, we seek to better understand how deep learning models of summarization perform content selection across multiple domains (§ 4): Hal Daum´e III University of Maryland, College Park Microsoft Research, New York City [email protected] news, personal stories, meetings, and medical articles (for which we collect a new corpus).1 We analyze several recent sentence extractive neural network architectures, specifically considering the design choices for sentence encoders (§ 3.1) and sentence extractors (§ 3.2). We compare Recurrent Neural Network (RNN) and Convolutional Neural Network (CNN) based sentence representations to the simpler approach of word embedding aver- aging to understand the gains derived from more sophisticated architectures. We also question the necessity of auto-regressive sentence extraction (i.e. using previous predictions to inform future predictions), which previous approaches have used (§ 2), and propose two alternative models that extract sentences independently. Our main results (§ 5) reveal: 1. Sentence position bias dominates the learn- ing signal for news summarization, though not for other domains.2 Summary quality for news is only slightly degraded when con- tent words are omitted from sentence embed- dings. 2. Word embedding averaging is as good or bet- ter than either RNNs or CNNs for sentence embedding across all domains. 3. Pre-trained word embeddings are as good, or better than, learned embeddings in five of six datasets. 4. Non auto-regressive sentence extraction per- forms as good or better than auto-regressive extraction in all domains. Taken together, these and other results in the pa- per suggest that we are over-estimating the abil- 1Data preprocessing and implementation code can be https://github.com/kedz/nnsum/ found here: tree/emnlp18-release 2This is a known bias in news summarization (Nenkova, 2005). ity of deep learning models to learn robust and meaningful content features for summarization. In one sense, this might lessen the burden of apply- ing neural network models of content to other do- mains; one really just needs in-domain word em- beddings. However, if we want to learn something other than where the start of the article is, we will need to design other means of sentence represen- tation, and possibly external knowledge represen- tations, better suited to the summarization task. 2 Related Work The introduction of the CNN-DailyMail corpus by Hermann et al. (2015) allowed for the applica- tion of large-scale training of deep learning mod- els for summarization. Cheng and Lapata (2016) developed a sentence extractive model that uses a word level CNN to encode sentences and a sen- tence level sequence-to-sequence model to predict which sentences to include in the summary. Sub- sequently, Nallapati et al. (2017) proposed a dif- ferent model using word-level bidirectional RNNs along with a sentence level bidirectional RNN for predicting which sentences should be extracted. Their sentence extractor creates representations of the whole document and computes separate scores for salience, novelty, and location. These works represent the state-of-the-art for deep learning- based extractive summarization and we analyze them further in this paper. Other recent neural network approaches in- clude, Yasunaga et al. (2017), who learn a graph- convolutional network (GCN) for multi-document summarization. They do not closely examine the choice of sentence encoder, which is one of the focuses of the present paper; rather, they study the best choice of graph structure for the GCN, which is orthogonal to this work. Non-neural network learning-based approaches have also been applied to summarization. Typi- cally they involve learning n-gram feature weights in linear models along with other non-lexical word or structural features (Berg-Kirkpatrick et al., 2011; Sipos et al., 2012; Durrett et al., 2016). In this paper, we study representation learning in neural networks that can capture more complex word level feature interactions and whose dense representations are more compatible with current practices in NLP. The previously mentioned works have focused on news summarization. To further understand the content selection process, we also explore other domains of summarization. In particular, we ex- plore personal narrative summarization based on stories shared on Reddit (Ouyang et al., 2017), workplace meeting summarization (Carletta et al., 2005), and medical journal article summarization (Mishra et al., 2014). While most work on these summarization tasks often exploit domain-specific features (e.g. speaker identification in meeting summarization (Galley, 2006; Gillick et al., 2009)), we purpose- fully avoid such features in this work in order to understand the extent to which deep learning mod- els can perform content selection using only sur- face lexical features. Summarization of academic literature (including medical journals), has long been a research topic in NLP (Kupiec et al., 1995; Elhadad et al., 2005), but most approaches have explored facet-based summarization (Jaidka et al., 2017), which is not the focus of our work. 3 Methods The goal of extractive text summarization is to se- lect a subset of a document's text to use as a sum- mary, i.e. a short gist or excerpt of the central con- tent. Typically, we impose a budget on the length of the summary in either words or bytes. In this work, we focus on sentence extractive summariza- tion, where the basic unit of extraction is a sen- tence and impose a word limit as the budget. We model the sentence extraction task as a se- quence tagging problem, following (Conroy and O'Leary, 2001). Specifically, given a document containing n sentences s1, . . . , sn we generate a summary by predicting a corresponding label se- quence y1, . . . , yn ∈ {0, 1}n, where yi = 1 in- dicates the i-th sentence is to be included in the summary. Each sentence is itself a sequence of (i)si where si word embeddings si = w summary word length(cid:80)n is the length of the sentence in words. The word budget c ∈ N enforces a constraint that the total For a typical deep learning model of extractive summarization there are two main design deci- sions: a) the choice of sentence encoder which maps each sentence si to an embedding hi, and b) the choice of sentence extractor which maps a se- quence of sentence embeddings h = h1, . . . , hn to a sequence of extraction decisions y = y1, . . . , yn. i=1 yi · si ≤ c. (i) 1 , . . . , w (cid:76) indicates attention. Green blocks repesent sentence encoder output and red blocks indicates learned "begin Figure 1: Sentence extractor architectures: a) RNN, b) Seq2Seq, c) Cheng & Lapata, and d) SummaRunner. The decoding" embeddings. Vertically stacked yellow and orange boxes indicate extractor encoder and decoder hidden states respectively. Horizontal orange and yellow blocks indicate multi-layer perceptrons. The purple blocks represent the document and summary state in the SummaRunner extractor. 3.1 Sentence Encoders We experiment with three architectures for map- ping sequences of word embeddings to a fixed length vector: averaging, RNNs, and CNNs. Hy- perparameter settings and implementation details can be found in Appendix A. (cid:80)s Averaging Encoder Under the averaging en- coder, a sentence embedding h is simply the aver- age of its word embeddings, i.e. h = 1s i=1 wi. RNN Encoder When using the RNN sentence encoder, a sentence embedding is the concatena- tion of the final output states of a forward and backward RNN over the sentence's word embed- dings. We use a Gated Recurrent Unit (GRU) for the RNN cell (Chung et al., 2014). CNN Encoder The CNN sentence encoder uses a series of convolutional feature maps to encode each sentence. This encoder is similar to the con- volutional architecture of Kim (2014) used for text classification tasks and performs a series of "one-dimensional" convolutions over word em- beddings. The final sentence embedding h is a concatenation of all the convolutional filter out- puts after max pooling over time. 3.2 Sentence Extractors Sentence extractors take sentence embeddings h1:n and produce an extract y1:n. The sentence extractor is essentially a discriminative classi- fier p(y1:nh1:n). Previous neural network ap- proaches to sentence extraction have assumed ities p(y1:nh) = (cid:81)n an auto-regressive model, leading to a semi- Markovian factorization of the extractor probabil- i=1 p(yiy<i, h), where each is dependent on all previous yj for prediction yi all j < i. We compare two such models pro- posed by Cheng and Lapata (2016) and Nallap- ati et al. (2017). A simpler approach that does not allow interaction among the y1:n is to model i=1 p(yih), which we explore in two proposed extractor models that we refer to as the RNN and Seq2Seq extractors. Implementation details for all extractors are in Appendix B. p(y1:nh) = (cid:81)n Previously Proposed Sentence Extractors We consider two recent state-of-the-art extractors. The first, proposed by Cheng and Lapata is built around a sequence-to-sequence (2016), model. First, each sentence embedding3 is fed into an encoder side RNN, with the final encoder state passed to the first step of the decoder RNN. On the decoder side, the same sentence embeddings are fed as input to the decoder and decoder out- puts are used to predict each yi. The decoder input is weighted by the previous extraction probability, inducing the dependence of yi on y<i. See Fig- ure 1.c for a graphical layout of the extractor. Nallapati et al. (2017) proposed a sentence ex- tractor, which we refer to as the SummaRunner Extractor, that factorizes the extraction probabil- ity into contributions from different sources. First, a bidirectional RNN is run over the sentence em- 3Cheng and Lapata (2016) used an CNN sentence en- coder with this extractor architecture; in this work we pair the Cheng & Lapata extractor with several different encoders. a)h1h2h3y1y2y3b)h1h2h3−→hh1h2h3←−hy1y2y3c)h1h2h3h∗h1h2y1y2y3d)h1h2h3y1y2y3 beddings4 and the output is concatenated. A repre- sentation of the whole document is made by aver- aging the RNN output. A summary representation is also constructed by taking the sum of the pre- vious RNN outputs weighted by their extraction probabilities. Extraction predictions are made us- ing the RNN output at the i-th step, the document representation, and i-th version of the summary representation, along with factors for sentence lo- cation in the document. The use of the iteratively constructed summary representation creates a de- pendence of yi on all y<i. See Figure 1.d for a graphical layout. Proposed Sentence Extractors We propose two sentence extractor models that make a independence assumption stronger conditional i=1 p(yih), essentially making inde- p(yh) = (cid:81)n pendent predictions conditioned on h. RNN Extractor Our first proposed model is a very simple bidirectional RNN based tagging model. As in the RNN sentence encoder we use a GRU cell. The forward and backward outputs of each sentence are passed through a multi-layer perceptron with a logsitic sigmoid output to pre- dict the probability of extracting each sentence. See Figure 1.a for a graphical layout. Seq2Seq Extractor One shortcoming of the RNN extractor is that long range information from one end of the document may not easily be able to affect extraction probabilities of sentences at the other end. Our second proposed model, the Seq2Seq extractor mitigates this problem with an attention mechanism commonly used for neural machine translation (Bahdanau et al., 2014) and abstractive summarization (See et al., 2017). The sentence embeddings are first encoded by a bidi- rectional GRU. A separate decoder GRU trans- forms each sentence into a query vector which attends to the encoder output. The attention weighted encoder output and the decoder GRU output are concatenated and fed into a multi-layer perceptron to compute the extraction probability. See Figure 1.b for a graphical layout. 4 Datasets We perform our experiments across six corpora from varying domains to understand how differ- 4Nallapati et al. (2017) use an RNN sentence encoder with this extractor architecture; in this work we pair the Sum- maRunner extractor with different encoders. Dataset Train CNN/DM 287,113 44,382 516 404 98 21,250 NYT DUC Reddit AMI PubMed Valid 13,368 5,523 91 24 19 1,250 Test Refs 1 1.93 2 2 1 1 11,490 6,495 657 48 20 2,500 Table 1: Sizes of the training, validation, test splits for each dataset and the average number of test set human reference summaries per document. ent biases within each domain can affect content selection. The corpora come from the news do- main (CNN-DailyMail, New York Times, DUC), personal narratives domain (Reddit), workplace meetings (AMI), and medical journal articles (PubMed). See Table 1 for dataset statistics. CNN-DailyMail We use the preprocessing and training, validation, and test splits of See et al. (2017). This corpus is a mix of news on differ- ent topics including politics, sports, and entertain- ment. New York Times The New York Times (NYT) corpus (Sandhaus, 2008) contains two types of ab- stracts for a subset of its articles. The first sum- mary is an archival abstract and the second is a shorter online teaser meant to entice a viewer of the webpage to click to read more. From this col- lection, we take all articles that have a concate- nated summary length of at least 100 words. We create training, validation, and test splits by parti- tioning on dates; we use the year 2005 as the val- idation data, with training and test partitions in- cluding documents before and after 2005 respec- tively. DUC We use the single document summariza- tion data from the 2001 and 2002 Document Understanding Conferences (DUC) (Over and Liggett, 2002). We split the 2001 data into train- ing and validation splits and reserve the 2002 data for testing. AMI The AMI corpus (Carletta et al., 2005) is a collection of real and staged office meetings anno- tated with text transcriptions, along with abstrac- tive summaries. We use the prescribed splits. Extractor Enc. CNN/DM NYT DUC 2002 Reddit AMI PubMed M R-2 M R-2 M R-2 M R-2 M R-2 M R-2 9.3 24.1 25.2 17.0 Avg. RNN 25.1 16.6 16.8 CNN 25.0 17.7 25.2 Avg. RNN 25.1 16.7 16.9 CNN 25.0 17.7 Avg. 25.0 16.7 RNN 25.0 CNN 25.2 16.9 17.2 Avg. 25.1 16.5 RNN 25.1 CNN 24.9 16.8 31.1 25.0 10.9 11.4 11.4 12.8 13.6 12.0 13.2 13.6 12.6 13.4 13.4 12.5 12.3 16.2 20.1 20.4 20.2 20.9 20.9 20.5 20.7 20.9 20.3 20.5 21.0 20.9 20.4 24.3 32.3 34.7 34.9 33.7 35.7 35.9 35.1 35.6 35.8 35.0 35.4 35.5 34.4 48.9 15.9 19.8 19.7 19.9 20.1 19.7 19.8 20.1 19.7 19.9 19.9 19.7 19.8 24.1 30.0 29.8 29.6 29.0 30.5 30.2 29.9 30.4 30.3 29.9 30.2 30.0 29.3 35.3 24.4 25.4 25.4 25.1 25.6 25.3 25.1 25.3 25.0 25.1 25.4 25.2 25.0 36.2 25.1 26.8 26.8 26.7 27.0 26.7 26.7 27.1 27.0 26.9 26.7 26.5 26.4 31.3 12.3 17.0 16.2 14.4 17.0 16.1 14.2 16.7 16.3 14.3 17.0 16.5 14.5 17.8 21.5 22.7 22.6 22.7 22.8 22.5 22.7 23.1 23.0 23.0 22.3 22.1 22.2 31.8 2.0 5.5 5.2 3.2 5.5 5.3 2.9 6.1 5.0 2.8 5.6 5.4 3.2 8.7 Lead RNN Seq2Seq Cheng & Lapata Summa Runner Oracle -- -- Table 2: METEOR (M) and ROUGE-2 recall (R-2) results across all extractor/encoder pairs. Results that are statistically indistinguishable from the best system are shown in bold face. Reddit Ouyang et al. (2017) collected a corpus of personal stories shared on Reddit5 along with multiple extractive and abstractive summaries. We randomly split this data using roughly three and five percent of the data validation and test respec- tively. PubMed We created a corpus of 25,000 ran- domly sampled medical journal articles from the PubMed Open Access Subset6. We only included articles if they were at least 1000 words long and had an abstract of at least 50 words in length. We used the article abstracts as the ground truth hu- man summaries. 4.1 Ground Truth Extract Summaries Since we do not typically have ground truth ex- tract summaries from which to create the labels yi, we construct gold label sequences by greedily optimizing ROUGE-1, using the algorithm in Ap- pendix C. We choose to optimize for ROUGE-1 rather than ROUGE-2 similarly to other optimiza- tion based approaches to summarization (Sipos et al., 2012; Durrett et al., 2016) which found this to be the easier target to learn. 5 Experiments We evaluate summary quality using ROUGE-2 recall (Lin, 2004); ROUGE-1 and ROUGE-LCS trend similarity in our experiments. We use tar- get word lengths of 100 words for news, and 75, 290, and 200 for Reddit, AMI, and PubMed respectively. We also evaluate using METEOR (Denkowski and Lavie, 2014).7 Summaries are generated by extracting the top ranked sentences by model probability p(yi = 1y<i, h), stopping when the word budget is met or exceeded. We estimate statistical significance by averaging each document level score over the five random initial- izations. We then test the difference between the best system on each dataset and all other systems using the approximate randomization test (Riezler and Maxwell, 2005) with the Bonferroni correc- tion for multiple comparisons, testing for signifi- cance at the 0.05 level. 5.1 Training We train all models to minimize the weighted neg- ative log-likelihood (cid:88) n(cid:88) s,y∈D h=enc(s) i=1 L = − ω(yi) log p (yiy<i, h) 5www.reddit.com 6https://www.ncbi.nlm.nih.gov/pmc/ tools/openftlist/ 7We use the default settings for METEOR and use remove stopwords and no stemming options for ROUGE, keeping de- faults for all other parameters. Ext. Seq2Seq C&L Summa Runner Emb. CNN/DM Fixed Learn Fixed Learn Fixed Learn 25.6 25.3 25.3 24.9 25.4 25.1 35.7 (0.3) 35.7 35.6 (0.4) 35.4 35.4 (0.3) 35.2 NYT DUC Reddit AMI 22.8 (0.0) 22.9 23.1 (0.2) 23.0 22.3 (0.2) 22.2 (-0.1) (0.1) (0.1) 13.6 13.8 13.6 13.4 13.4 12.6 (-0.2) (0.2) (0.8) 5.5 5.8 6.1 6.2 5.6 5.8 (-0.3) (-0.1) (-0.2) (0.8) PubMed 17.7 16.9 17.7 16.4 17.2 16.8 (1.3) (0.4) Table 3: ROUGE-2 recall across sentence extractors when using fixed pretrained embeddings or when embeddings are updated during training. In both cases embeddings are initialized with pretrained GloVe embeddings. All ex- tractors use the averaging sentence encoder. When both learned and fixed settings are bolded, there is no signifcant performance difference. RNN extractor is omitted for space but is similar to Seq2Seq. Difference in scores shown in parenthesis. Ablation CNN/DM 25.4 all words 25.3† (0.1) -nouns 25.3† (0.1) -verbs 25.3† (0.1) -adj/adv 25.2† (0.2) -function NYT 34.7 34.3† (0.4) 34.4† (0.3) 34.4† (0.3) 34.5† (0.2) DUC 22.7 22.3† (0.4) 22.4† (0.3) 22.5 (0.2) 22.9† (-0.2) Reddit 11.4 10.3† (1.1) 10.8 (0.6) 9.5† (1.9) 10.3† (1.1) AMI 5.5 3.8† (1.7) 5.8 (-0.3) 5.4 (0.1) 6.3† (-0.8) PubMed 17.0 15.7† (1.3) 16.6† (0.4) 16.8† (0.2) 16.6† (0.4) Table 4: ROUGE-2 recall after removing nouns, verbs, adjectives/adverbs, and function words. Ablations are performed using the averaging sentence encoder and the RNN extractor. Bold indicates best performing system. † indicates significant difference with the non-ablated system. Difference in score from all words shown in paren- thesis. over the training data D using stochastic gradient descent with the ADAM optimizer (Kingma and Ba, 2014). ω(0) = 1 and ω(1) = N0/N1 where Ny is the number of training examples with label y. We trained for a maximum of 50 epochs and the best model was selected with early stopping on the validation set according to ROUGE-2. Each epoch constitutes a full pass through the dataset. The av- erage stopping epoch was: CNN-DailyMail, 16.2; NYT, 21.36; DUC, 37.11; Reddit, 36.59; AMI, 19.58; PubMed, 19.84. All experiments were re- peated with five random initializations. Unless specified, word embeddings were initialized using pretrained GloVe embeddings (Pennington et al., 2014) and we did not update them during training. Unknown words were mapped to a zero embed- ding. See Appendix D for more optimization and training details. 5.2 Baselines Lead As a baseline we include the lead sum- mary, i.e. taking the first x words of the docu- ment as summary, where x is the target summary length for each dataset (see the first paragraph of § 5). While incredibly simple, this method is still a competitive baseline for single document summa- rization, especially on newswire. Oracle To measure the performance ceiling, we show the ROUGE/METEOR scores using the ex- tractive summary which results from greedily op- timizing ROUGE-1. I.e., if we had clairvoyant knowledge of the human reference summary, the oracle system achieves the (approximate) maxi- mum possible ROUGE scores. See Appendix C for a detailed description of the oracle algorithm. 5.3 Results The results of our main experiment comparing the different extractors/encoders are shown in Table 2. Overall, we find no major advantage when us- ing the CNN and RNN sentence encoders over the averaging encoder. The best performing en- coder/extractor pair either uses the averaging en- coder (five out of six datasets) or the differences are not statistically significant. When looking at extractors, the Seq2Seq extrac- tor is either part of the best performing system (three out of six datasets) or is not statistically dis- tinguishable from the best extractor. Overall, on the news and medical journal do- mains, the differences are quite small with the dif- Ext. Seq2Seq Order In-Order Shuffled CNN/DM 25.6 21.7 35.7 (3.9) 25.6 NYT DUC Reddit AMI 22.8 (10.1) 21.2 13.6 (1.6) 13.5 (0.1) 5.5 6.0 (-0.5) PubMed 17.7 14.9 (2.8) Table 5: ROUGE-2 recall using models trained on in-order and shuffled documents. Extractor uses the averag- ing sentence encoder. When both in-order and shuffled settings are bolded, there is no signifcant performance difference. Difference in scores shown in parenthesis. Hurricane Gilbert swept toward the Dominican Republic Sunday, and the Civil Defense alerted its heavily populated south coast to prepare for high winds, heavy rains and high seas. The storm was approaching from the southeast with sustained winds of 75 mph gusting to 92 mph. An estimated 100,000 people live in the province, including 70,000 in the city of Barahona, about 125 miles west of Santo Domingo. On Saturday, Hurricane Florence was downgraded to a tropical storm and its remnants pushed inland from the U.S. Gulf Coast. Tropical Storm Gilbert formed in the east- ern Caribbean and strengthened into a hurricane Saturday night. Hurricane Gilbert swept toward the Dominican Republic Sunday, and the Civil Defense alerted its heavily populated south coast to prepare for high winds, heavy rains and high seas. The storm was approaching from the southeast with sustained winds of 75 mph gusting to 92 mph. An esti- mated 100,000 people live in the province, including 70,000 in the city of Barahona, about 125 miles west of Santo Domingo. Tropical Storm Gilbert formed in the eastern Caribbean and strengthened into a hurricane Saturday night. Strong winds associated with the Gilbert brought coastal flooding, strong southeast winds and up to 12 feet feet to Puerto Rico's south coast. Table 6: Example output of Seq2Seq extractor (left) and Cheng & Lapata Extractor (right). This is a typical example, where only one sentence is different between the two (shown in bold). ferences between worst and best systems on the CNN/DM dataset spanning only .56 of a ROUGE point. While there is more performance variability in the Reddit and AMI data, there is less distinc- tion among systems: no differences are significant on Reddit and every extractor has at least one con- figuration that is indistinguishable from the best system on the AMI corpus. This is probably due to the small test size of these datasets. Word Embedding Learning Given that learn- ing a sentence encoder (averaging has no learned parameters) does not yield significant improve- ment, it is natural to consider whether learning word embeddings is also necessary. In Table 3 we compare the performance of different extrac- tors using the averaging encoder, when the word embeddings are held fixed or learned during train- ing. In both cases, word embeddings are initial- ized with GloVe embeddings trained on a combi- nation of Gigaword and Wikipedia. When learn- ing embeddings, words occurring fewer than three times in the training data are mapped to an un- known token (with learned embedding). In all but one case, fixed embeddings are as good or better than the learned embeddings. This is a somewhat surprising finding on the CNN/DM data since it is reasonably large, and learning em- beddings should give the models more flexibility to identify important word features.8 This sug- 8The AMI corpus is an exception here where learning gests that we cannot extract much generalizable learning signal from the content other than what is already present from initialization. Even on PubMed, where the language is quite different from the news/Wikipedia articles the GloVe em- beddings were trained on, learning leads to signif- icantly worse results. POS Tag Ablation It is also not well explored what word features are being used by the encoders. To understand which classes of words were most important we ran an ablation study, selectively removing nouns, verbs (including participles and auxiliaries), adjectives & adverbs, and function words (adpositions, determiners, conjunctions). All datasets were automatically tagged using the spaCy part-of-speech (POS) tagger9. The em- beddings of removed words were replaced with a zero vector, preserving the order and position of the non-ablated words in the sentence. Abla- tions were performed on training, validation, and test partitions, using the RNN extractor with av- eraging encoder. Table 4 shows the results of the POS tag ablation experiments. While removing any word class from the representation generally hurts performance (with statistical significance), on the news domains, the absolute values of the does lead to small performance boosts, however, only in the Seq2Seq extractor is this diference significant; it is quite pos- sible that this is an artifact of the very small test set size. 9https://github.com/explosion/spaCy differences are quite small (.18 on CNN/DM, .41 on NYT, .3 on DUC) suggesting that the model's predictions are not overly dependent on any par- ticular word types. On the non-news datasets, the ablations have a larger effect (max differences are 1.89 on Reddit, 2.56 on AMI, and 1.3 on PubMed). Removing nouns leads to the largest drop on AMI and PubMed. Removing adjectives and adverbs leads to the largest drop on Reddit, suggesting the intensifiers and descriptive words are useful for identifying important content in personal narra- tives. Curiously, removing the function word POS class yields a significant improvement on DUC 2002 and AMI. Document Shuffling Sentence position is a well known and powerful feature for news sum- marization (Hong and Nenkova, 2014), owing to the intentional lead bias in the news article writ- ing10; it also explains the difficulty in beating the lead baseline for single-document summarization (Nenkova, 2005; Brandow et al., 1999). In exam- ining the generated summaries, we found most of the selected sentences in the news domain came from the lead paragraph of the document. This is despite the fact that there is a long tail of sen- tence extractions from later in the document in the ground truth extract summaries (31%, 28.3%, and 11.4% of DUC, CNN/DM, and NYT training ex- tract labels come from the second half of the doc- ument). Because this lead bias is so strong, it is questionable whether the models are learning to identify important content or just find the start of the document. We conduct a sentence order exper- iment where each document's sentences are ran- domly shuffled during training. We then evalu- ate each model performance on the unshuffled test data, comparing to the model trained on unshuf- fled data; if the models trained on shuffled data drop in performance, then this indicates the lead bias is the relevant factor. Table 5 shows the results of the shuffling ex- periments. The news domains and PubMed suffer a significant drop in performance when the docu- ment order is shuffled. By comparison, there is no significant difference between the shuffled and in- order models on the Reddit domain, and shuffling actually improves performance on AMI. This sug- gest that position is being learned by the models in the news/journal article domain even when the 10https://en.wikipedia.org/wiki/ Inverted_pyramid_(journalism) model has no explicit position features, and that this feature is more important than either content or function words. 6 Discussion Learning content selection for summarization in the news domain is severely inhibited by the lead bias. The summaries generated by all systems de- scribed here -- the prior work and our proposed sim- plified models -- are highly similar to each other and to the lead baseline. The Cheng & Lapata and Seq2Seq extractors (using the averaging encoder) share 87.8% of output sentences on average on the CNN/DM data, with similar numbers for the other news domains (see Table 6 for a typical example). Also on CNN/DM, 58% of the Seq2Seq selected sentences also occur in the lead summary, with similar numbers for DUC, NYT, and Reddit. Shuf- fling reduces lead overlap to 35.2% but the overall system performance drops significantly; the mod- els are not able to identify important information without position. The relative robustness of the news domain to part of speech ablation also suggests that models are mostly learning to recognize the stylistic fea- tures unique to the beginning of the article, and not the content. Additionally, the drop in performance when learning word embeddings on the news do- main suggests that word embeddings alone do not provide very generalizable content features com- pared to recognizing the lead. The picture is rosier for non-news summariza- tion where part of speech ablation leads to larger performance differences and shuffling either does not inhibit content selection significantly or leads to modest gains. Learning better word-level rep- resentations on these domains will likely require much larger corpora, something which might re- main unlikely for personal stories and meetings. The lack of distinction among sentence en- coders is interesting because it echoes findings in the generic sentence embedding literature where word embedding averaging is frustratingly diffi- cult to outperform (Iyyer et al., 2015; Wieting et al., 2015; Arora et al., 2016; Wieting and Gim- pel, 2017). The inability to learn useful sen- tence representations is also borne out in the Sum- maRunner model, where there are explicit similar- ity computations between document or summary representations and sentence embeddings; these computations do not seem to add much to the per- formance as the Cheng & Lapata and Seq2Seq models which lack these features generally per- form as well or better. Furthermore, the Cheng & Lapata and SummaRunner extractors both con- struct a history of previous selection decisions to inform future choices but this does not seem to sig- nificantly improve performance over the Seq2Seq extractor (which does not). This suggests that we need to rethink or find novel forms of sentence representation for the summarization task. A manual examination of the outputs revealed some interesting failure modes, although in gen- eral it was hard to discern clear patterns of be- haviour other than lead bias. On the news domain, the models consistently learned to ignore quoted material in the lead, as often the quotes provide color to the story but are unlikely to be included in the summary (e.g. "It was like somebody slugging a punching bag."). This behavior was most likely triggered by the presence of quotes, as the quote attributions, which were often tokenized as sep- arate sentences, would subsequently be included in the summary despite also not containing much information (e.g. Gil Clark of the National Hurri- cane Center said Thursday). 7 Conclusion We have presented an empirical study of deep learning based content selection algorithms for summarization. Our findings suggest such mod- els face stark limitations on their ability to learn robust features for this task and that more work is needed on sentence representation for summariza- tion. 8 Acknowledgements The authors would like to thank the anonymous re- viewers for their valuable feedback. Thanks goes out as well to Chris Hidey for his helpful com- ments. We would also like to thank Wen Xiao for identifying an error in the oracle results for the AMI corpus, which as since been corrected. This research is based upon work supported in part by the Office of the Director of National Intel- ligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA), via contract # FA8650- 17-C-9117. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of ODNI, IARPA, or the U.S. Government. The U.S. Gov- ernment is authorized to reproduce and distribute reprints for governmental purposes notwithstand- ing any copyright annotation therein. References Sanjeev Arora, Yingyu Liang, and Tengyu Ma. 2016. A simple but tough-to-beat baseline for sentence em- beddings. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- gio. 2014. Neural machine translation by jointly arXiv preprint learning to align and translate. arXiv:1409.0473. Taylor Berg-Kirkpatrick, Dan Gillick, and Dan Klein. 2011. Jointly learning to extract and compress. In Proceedings of the 49th Annual Meeting of the Asso- ciation for Computational Linguistics: Human Lan- guage Technologies-Volume 1, pages 481 -- 490. As- sociation for Computational Linguistics. Ronald Brandow, Karl Mitze, and Lisa Rau. 1999. Automatic condensation of electronic publications by sentence selection. In Jan Fagerberg, David C. Mowery, and Richard R. Nelson, editors, Advances in Automatic Text Summarization, chapter 19, pages 293 -- 303. MIT Press, Oxford. Jean Carletta, Simone Ashby, Sebastien Bourban, Mike Flynn, Mael Guillemot, Thomas Hain, Jaroslav Kadlec, Vasilis Karaiskos, Wessel Kraaij, Melissa Kronenthal, et al. 2005. The ami meeting corpus: In International Workshop A pre-announcement. on Machine Learning for Multimodal Interaction, pages 28 -- 39. Springer. Jianpeng Cheng and Mirella Lapata. 2016. Neural summarization by extracting sentences and words. arXiv preprint arXiv:1603.07252. Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. 2014. Empirical evaluation of gated recurrent neural networks on sequence model- ing. arXiv preprint arXiv:1412.3555. John M Conroy and Dianne P O'Leary. 2001. Text summarization via hidden markov models. In Pro- ceedings of the 24th annual international ACM SI- GIR conference on Research and development in in- formation retrieval, pages 406 -- 407. ACM. Michael Denkowski and Alon Lavie. 2014. Meteor universal: Language specific translation evaluation for any target language. In Proceedings of the EACL 2014 Workshop on Statistical Machine Translation. Greg Durrett, Taylor Berg-Kirkpatrick, and Dan Klein. 2016. Learning-based single-document summariza- tion with compression and anaphoricity constraints. arXiv preprint arXiv:1603.08887. Noemie Elhadad, M-Y Kan, Judith L Klavans, and KR McKeown. 2005. Customization in a unified framework for summarizing medical literature. Ar- tificial intelligence in medicine, 33(2):179 -- 198. Michel Galley. 2006. A skip-chain conditional ran- dom field for ranking meeting utterances by impor- In Proceedings of the 2006 Conference on tance. Empirical Methods in Natural Language Process- ing, pages 364 -- 372. Association for Computational Linguistics. Albert Gatt and Emiel Krahmer. 2018. Survey of the state of the art in natural language generation: Core tasks, applications and evaluation. Journal of Artifi- cial Intelligence Research, 61:65 -- 170. Dan Gillick, Korbinian Riedhammer, Benoit Favre, and Dilek Hakkani-Tur. 2009. A global optimization In Acous- framework for meeting summarization. tics, Speech and Signal Processing, 2009. ICASSP 2009. IEEE International Conference on, pages 4769 -- 4772. IEEE. Xavier Glorot and Yoshua Bengio. 2010. Understand- ing the difficulty of training deep feedforward neu- In Proceedings of the thirteenth in- ral networks. ternational conference on artificial intelligence and statistics, pages 249 -- 256. Karl Moritz Hermann, Tom´as Kocisk´y, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Su- leyman, and Phil Blunsom. 2015. Teaching ma- chines to read and comprehend. In Advances in Neu- ral Information Processing Systems (NIPS). Kai Hong and Ani Nenkova. 2014. Improving the estimation of word importance for news multi- In Proceedings of the document summarization. 14th Conference of the European Chapter of the As- sociation for Computational Linguistics, pages 712 -- 721. Mohit Iyyer, Varun Manjunatha, Jordan Boyd-Graber, and Hal Daum´e III. 2015. Deep unordered com- position rivals syntactic methods for text classifica- tion. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), vol- ume 1, pages 1681 -- 1691. Kokil Jaidka, Muthu Kumar Chandrasekaran, Sajal Insights from the faceted scientific document International Journal Rustagi, and Min-Yen Kan. 2017. cl-scisumm 2016: summarization shared task. on Digital Libraries, pages 1 -- 9. Yoon Kim. 2014. works for sentence classification. arXiv:1408.5882. Convolutional neural net- arXiv preprint Julian Kupiec, Jan Pedersen, and Francine Chen. 1995. A trainable document summarizer. In Proceedings of the 18th annual international ACM SIGIR confer- ence on Research and development in information retrieval, pages 68 -- 73. ACM. Chin-Yew Lin. 2004. Rouge: A package for auto- matic evaluation of summaries. Text Summarization Branches Out. Rashmi Mishra, Jiantao Bian, Marcelo Fiszman, Charlene R Weir, Siddhartha Jonnalagadda, Javed Mostafa, and Guilherme Del Fiol. 2014. Text sum- marization in the biomedical domain: a systematic review of recent research. Journal of biomedical in- formatics, 52:457 -- 467. Ramesh Nallapati, Feifei Zhai, and Bowen Zhou. 2017. Summarunner: A recurrent neural network based se- quence model for extractive summarization of docu- ments. In AAAI, pages 3075 -- 3081. Ani Nenkova. 2005. Automatic text summarization of newswire: Lessons learned from the document un- derstanding conference. In AAAI, volume 5, pages 1436 -- 1441. Jessica Ouyang, Serina Chang, and Kathy McKeown. 2017. Crowd-sourced iterative annotation for narra- tive summarization corpora. In Proceedings of the 15th Conference of the European Chapter of the As- sociation for Computational Linguistics: Volume 2, Short Papers, volume 2, pages 46 -- 51. Paul Over and Walter Liggett. 2002. duc: news to generic duction of tems. gov/projects/duc/guidelines/2002. html. An text Proc. DUC. intrinsic summarization http://wwwnlpir. Intro- evaluation sys- nist. Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 confer- ence on empirical methods in natural language pro- cessing (EMNLP), pages 1532 -- 1543. Stefan Riezler and John T Maxwell. 2005. On some pitfalls in automatic evaluation and significance test- ing for mt. In Proceedings of the ACL workshop on intrinsic and extrinsic evaluation measures for ma- chine translation and/or summarization, pages 57 -- 64. Evan Sandhaus. 2008. The new york times annotated corpus. Linguistic Data Consortium, Philadelphia, 6(12):e26752. Abigail See, Peter J Liu, and Christopher D Man- to the point: Summarization arXiv preprint ning. 2017. Get with pointer-generator networks. arXiv:1704.04368. Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. Ruben Sipos, Pannaga Shivaswamy, and Thorsten Joachims. 2012. Large-margin learning of submod- ular summarization models. In Proceedings of the 13th Conference of the European Chapter of the As- sociation for Computational Linguistics, pages 224 -- 233. Association for Computational Linguistics. John Wieting, Mohit Bansal, Kevin Gimpel, and Towards universal para- arXiv preprint Karen Livescu. 2015. phrastic sentence embeddings. arXiv:1511.08198. John Wieting and Kevin Gimpel. 2017. Revisiting re- current networks for paraphrastic sentence embed- dings. arXiv preprint arXiv:1705.00364. Michihiro Yasunaga, Rui Zhang, Kshitijh Meelu, Ayush Pareek, Krishnan Srinivasan, and Dragomir Radev. 2017. Graph-based neural multi-document summarization. arXiv preprint arXiv:1706.06681. Content Selection in Deep Learning Models of Summarization Supplementary Material For: A Details on Sentence Encoders We use 200 dimenional word embeddings wi in all models. Dropout is applied to the embeddings during training. Wherever dropout is applied, the drop probability is .25. A.1 Details on RNN Encoder Under the RNN encoder, a sentence embedding is defined as h = [−→h s;←−h 1] where −→h 0 = 0; −→h i = −−−→GRU(wi,−→h i−1) ←−h s+1 = 0; ←−h i = ←−−−GRU(wi,←−h i+1), (1) (2) and −−−→GRU amd ←−−−GRU indicate the forward and backward GRUs respectively, each with separate parame- ters. We use 300 dimensional hidden layers for each GRU. Dropout is applied to GRU during training. A.2 Details on CNN Encoder The CNN encoder has hyperparameters associated with the window sizes K ⊂ N of the convolutional the number of words associated with each convolution) and the number of feature maps filters (i.e. Mk ∈ N associated with each filter (i.e. the output dimension of each convolution). The CNN sentence embedding h is computed as follows: k(cid:88) j=1 (m,k) a i = b(m,k) + W (m,k) j (cid:104) h(m,k) = h = max ReLU i∈1,...,s−k+1 h(m,k)m ∈ {1, . . . , Mk}, k ∈ K (cid:17) (cid:16) · wi+j−1 (m,k) a i (cid:105) (3) (4) (5) where b(m,k) ∈ R and W (m,k) ∈ Rk×n(cid:48) are learned bias and filter weight parameters respectively, and ReLU(x) = max(0, x) is the rectified linear unit activation. We use window sizes K = {1, 2, 3, 4, 5, 6} with corresponding feature maps sizes M1 = 25, M2 = 25, M3 = 50, M4 = 50, M5 = 50, M6 = 50, giving h a dimensionality of 250. Dropout is applied to the CNN output during training. B Details on Sentence Extractors B.1 Details on RNN Extractor −→z 0 = 0; −→z i = −−−→GRU(hi,−→z i−1) ←−z n+1 = 0; ←−z i = ←−−−GRU(hi,←−z i+1) ai = ReLU (U · [−→z i;←−z i] + u) p(yi = 1h) = σ (V · ai + v) (6) (7) (8) (9) where −−−→GRU and ←−−−GRU indicate the forward and backward GRUs respectively, and each have separate learned parameters; U, V and u, v are learned weight and bias parameters. The hidden layer size of the GRU is 300 for each direction and the MLP hidden layer size is 100. Dropout is applied to the GRUs and to ai. B.2 Details on Seq2Seq Extrator −→z 0 = 0; −→z i = −−−→GRUenc(hi,−→z i−1) ←−z n+1 = 0; ←−z i = ←−−−GRUenc(hi,←−z i+1) −→q i = −−−→GRUdec(hi,−→q i−1) ←−q i = ←−−−GRUdec(hi,←−q i+1) qi = [−→q i;←−q i], zi = [−→z i;←−z i] n(cid:88) exp (qi · zj) j=1 exp (qi · zj) (cid:80)n , ¯zi = αi,jzj j=1 αi,j = ai = ReLU (U · [¯zi; qi] + u) p(yi = 1h) = σ (V · ai + v) . The final outputs of each encoder direction are passed to the first decoder steps; additionally, the first step of the decoder GRUs are learned "begin decoding" vectors −→q 0 and ←−q 0 (see Figure 1.b). Each GRU has separate learned parameters; U, V and u, v are learned weight and bias parameters. The hidden layer size of the GRU is 300 for each direction and MLP hidden layer size is 100. Dropout with drop probability .25 is applied to the GRU outputs and to ai. B.3 Details on Cheng & Lapata Extractor. The basic architecture is a unidirectional sequence-to-sequence model defined as follows: (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) (21) (22) (23) (24) (25) z0 = 0; zi = GRUenc(hi, zi−1) q1 = GRUdec(h∗, zn) qi = GRUdec(pi−1 · hi−1, qi−1) ai = ReLU (U · [zi; qi] + u) pi = p(yi = 1y<i, h) = σ (V · ai + v) where h∗ is a learned "begin decoding" sentence embedding (see Figure 1.c). Each GRU has separate learned parameters; U, V and u, v are learned weight and bias parameters. Note in Equation 20 that the decoder side GRU input is the sentence embedding from the previous time step weighted by its probabilitiy of extraction (pi−1) from the previous step, inducing dependence of each output yi on all previous outputs y<i. The hidden layer size of the GRU is 300 and the MLP hidden layer size is 100. Dropout with drop probability .25 is applied to the GRU outputs and to ai. Note that in the original paper, the Cheng & Lapata extractor was paired with a CNN sentence encoder, but in this work we experiment with a variety of sentence encoders. B.4 Details on SummaRunner Extractor. Like the RNN extractor it starts with a bidrectional GRU over the sentence embeddings It then creates a representation of the whole document q by passing the averaged GRU output states through a fully connected layer: −→z 0 = 0; −→z i = −−−→GRU(hi,−→z i−1) ←−z n+1 = 0; ←−z i = ←−−−GRU(hi,←−z i+1), (cid:33) (cid:32) q = tanh bq + Wq [−→z i;←−z i] n(cid:88) i=1 1 n A concatentation of the GRU outputs at each step are passed through a separate fully connected layer to create a sentence representation zi, where zi = ReLU (bz + Wz[−→z i;←−z i]) . The extraction probability is then determined by contributions from five sources: (con) content a i (sal) salience a i (nov) novelty a i (pos) position a i (qrt) quartile a i = W (con)zi, = zT i W (sal)q, = −zT = W (pos)li, = W (qrt)ri, i W (nov) tanh(gi), (26) (27) (28) (29) (30) (31) where li and ri are embeddings associated with the i-th sentence position and the quarter of the document containing sentence i respectively. In Equation 29, gi is an iterative summary representation computed as the sum of the previous z<i weighted by their extraction probabilities, i−1(cid:88) j=1 gi = p(yj = 1y<j, h) · zj. (32) Note that the presence of this term induces dependence of each yi to all y<i similarly to the Cheng & Lapata extractor. The final extraction probability is the logistic sigmoid of the sum of these terms plus a bias, (cid:32) p(yi = 1y<i, h) = σ + a (con) a i (pos) +a i (sal) i (qrt) + a i (nov) + a i + b (cid:33) . (33) The weight matrices Wq, Wz, W (con), W (sal), W (nov), W (pos), W (qrt) and bias terms bq, bz, and b are learned parameters; The GRUs have separate learned parameters. The hidden layer size of the GRU is 300 for each direction zi, q, and gi have 100 dimensions. The position and quartile embeddings are 16 dimensional each. Dropout with drop probability .25 is applied to the GRU outputs and to zi. Note that in the original paper, the SummaRunner extractor was paired with an RNN sentence encoder, but in this work we experiment with a variety of sentence encoders. C Ground Truth Extract Summary Algorithm Algorithm 1: ORACLEEXTRACTSUMMARYLABELS Data: input document sentences s1, s2, . . . , sn, human reference summary R, summary word budget c. 1 yi := 0 ∀i ∈ 1, . . . , n 2 S := [ ] 3 while(cid:80) s∈S WORDCOUNT(s) ≤ c do // Initialize extract labels to be 0. // Initialize summary as empty list. // While summary word count ≤ word budget. 4 5 6 7 8 9 10 11 12 /* Add the next best sentence to the summary if it will improve the ROUGE score otherwise no improvement can be made so break. */ i = arg maxi∈{1,...,n}, yi(cid:54)=1 ROUGE(S + [si], R) if ROUGE(S + [si], R) > ROUGE(S, R) then S := S + [si] yi := 1 else break // Add si to the summary sentence list. // Set the i-th extract label to indicate extraction. Result: extract summary labels y1, . . . , yn D Optimizer and initialization settings. We use a learning rate of .0001 and a dropout rate of .25 for all dropout layers. We also employ gradient clipping (−5 < ∇θ < 5). Weight matrix parameters are initialized using Xavier initialization with the normal distribution (Glorot and Bengio, 2010) and bias terms are set to 0. We use a batch size of 32 for all datasets except AMI and PubMed, which are often longer and consume more memory, for which we use sizes two and four respectively. For the Cheng & Lapata model, we train for half of the maximum epochs with teacher forcing, i.e. we set pi = 1 if yi = 1 in the gold data and 0 otherwise when computing the decoder input pi · hi; we revert to the predicted model probability during the second half training.
1910.02228
1
1910
2019-10-05T07:49:12
On the Limits of Learning to Actively Learn Semantic Representations
[ "cs.CL" ]
One of the goals of natural language understanding is to develop models that map sentences into meaning representations. However, training such models requires expensive annotation of complex structures, which hinders their adoption. Learning to actively-learn (LTAL) is a recent paradigm for reducing the amount of labeled data by learning a policy that selects which samples should be labeled. In this work, we examine LTAL for learning semantic representations, such as QA-SRL. We show that even an oracle policy that is allowed to pick examples that maximize performance on the test set (and constitutes an upper bound on the potential of LTAL), does not substantially improve performance compared to a random policy. We investigate factors that could explain this finding and show that a distinguishing characteristic of successful applications of LTAL is the interaction between optimization and the oracle policy selection process. In successful applications of LTAL, the examples selected by the oracle policy do not substantially depend on the optimization procedure, while in our setup the stochastic nature of optimization strongly affects the examples selected by the oracle. We conclude that the current applicability of LTAL for improving data efficiency in learning semantic meaning representations is limited.
cs.CL
cs
On the Limits of Learning to Actively Learn Semantic Representations Omri Koshorek1 Gabriel Stanovsky2,4 Yichu Zhou3 Vivek Srikumar3 Jonathan Berant1,2 1Tel-Aviv University, 2Allen Institute for AI 3The University of Utah, 4University of Washington {omri.koshorek,joberant}@cs.tau.ac.il [email protected], {flyaway,svivek}@cs.utah.edu 9 1 0 2 t c O 5 ] L C . s c [ 1 v 8 2 2 2 0 . 0 1 9 1 : v i X r a Abstract One of the goals of natural language under- standing is to develop models that map sen- tences into meaning representations. How- ever, training such models requires expensive annotation of complex structures, which hin- ders their adoption. Learning to actively-learn (LTAL) is a recent paradigm for reducing the amount of labeled data by learning a policy that selects which samples should be labeled. In this work, we examine LTAL for learning semantic representations, such as QA-SRL. We show that even an oracle policy that is al- lowed to pick examples that maximize perfor- mance on the test set (and constitutes an up- per bound on the potential of LTAL), does not substantially improve performance compared to a random policy. We investigate factors that could explain this finding and show that a dis- tinguishing characteristic of successful appli- cations of LTAL is the interaction between op- timization and the oracle policy selection pro- cess. In successful applications of LTAL, the examples selected by the oracle policy do not substantially depend on the optimization pro- cedure, while in our setup the stochastic nature of optimization strongly affects the examples selected by the oracle. We conclude that the current applicability of LTAL for improving data efficiency in learning semantic meaning representations is limited. 1 Introduction The task of mapping a natural language sentence into a semantic representation, that is, a structure that represents its meaning, is one of the core goals of natural language processing. This goal has led to the creation of many general-purpose for- malisms for representing the structure of language, such as semantic role labeling (SRL; Palmer et al., 2005), semantic dependencies (SDP; Oepen et al., 2014), abstract meaning representation (AMR; Banarescu et al., 2013), universal conceptual cog- nitive annotation (UCCA; Abend and Rappoport, 2013), question-answer driven SRL (QA-SRL; He et al., 2015), and universal dependencies (Nivre et al., 2016), as well as domain-specific semantic representations for particular users in fields such as biology (Kim et al., 2009; N´edellec et al., 2013; Berant et al., 2014) and material science (Mysore et al., 2017; Kim et al., 2019). Currently, the dominant paradigm for building models that predict such representations is super- vised learning, which requires annotating thou- sands of sentences with their correct structured representation, usually by experts. This arduous data collection is the main bottleneck for building parsers for different users in new domains. Past work has proposed directions for accelerat- ing data collection and improving data efficiency through multi-task learning across different rep- resentations (Stanovsky and Dagan, 2018; Hersh- covich et al., 2018), or having non-experts anno- tate sentences in natural language (He et al., 2015, 2016). One of the classic and natural solutions for reducing annotation costs is to use active learning, an iterative procedure for selecting unlabeled ex- amples which are most likely to improve the per- formance of a model, and annotating them (Set- tles, 2009). Recently, learning to actively-learn (LTAL) has been proposed (Fang et al., 2017; Bachman et al., 2017; Liu et al., 2018), where the procedure for se- lecting unlabeled examples is trained using meth- ods from reinforcement and imitation learning. In recent work by Liu et al. (2018), given a labeled dataset from some domain, active learning is sim- ulated on this dataset, and a policy is trained to iteratively select the subset of examples that max- imizes performance on a development set. Then, this policy is used on a target domain to select un- labeled examples for annotation. If the learned policy generalizes well, we can reduce the cost of learning semantic representations. Liu et al. (2018) and Vu et al. (2019) have shown that such learned policies significantly reduce annotation costs on both text classification and named entity recognition (NER). In this paper, we examine the potential of LTAL for learning a semantic representation such as QA- SRL. We propose an oracle setup that can be con- sidered as an upper bound to what can be achieved with a learned policy. Specifically, we use an or- acle policy that is allowed to always pick a subset of examples that maximizes its target metric on a development set, which has the same distribution as the test set. Surprisingly, we find that even this powerful oracle policy does not substantially im- prove performance compared to a policy that ran- domly selects unlabeled examples on two seman- tic tasks: QA-SRL span (argument) detection and QA-SRL question (role) generation. To elucidate this surprising finding, we perform a thorough analysis, investigating various factors that could negatively affect the oracle policy se- lection process. We examine possible explanatory factors including: (a) the search strategy in the unlabeled data space (b) the procedure for train- ing the QA-SRL model (c) the architecture of the model and (d) the greedy nature of the selection procedure. We find that for all factors, it is chal- lenging to get consistent gains with an oracle pol- icy over a random policy. To further our understanding, we replicate the experiments of Liu et al. (2018) on NER, and com- pare the properties of a successful oracle policy in NER to the less successful case of QA-SRL. We find that optimization stochasticity negatively af- fects the process of sample selection in QA-SRL; different random seeds for the optimizer result in different selected samples. We propose a mea- sure for quantifying this effect, which can be used to assess the potential of LTAL in new setups. To conclude, in this work, we conduct a thor- ough empirical investigation of LTAL for learn- ing a semantic representation, and find that it is difficult to substantially improve data efficiency compared to standard supervised learning. Thus, other approaches should be explored for the im- portant goal of reducing annotation costs in build- ing such models. Code for reproducing our exper- iments is available at https://github.com/ koomri/LTAL_SR/. 2 Learning to Actively Learn Classic pool-based active learning (Settles, 2009) assumes access to a small labeled datasetSlab and a large pool of unlabeled examplesSunlab for a tar- notation and added toSlab. An example heuristic get task. In each iteration, a heuristic is used to select L unlabeled examples, which are sent to an- is uncertainty sampling (Lewis and Gale, 1994), which at each iteration chooses examples that the current model is the least confident about. LTAL proposes to replace the heuristic with a learned policy πθ, parameterized by θ. At train- ing time, the policy is trained by simulating active learning on a labeled dataset and generating train- ing data from the simulation. At test time, the pol- icy is applied to select examples in a new domain. Figure 1 and Algorithm 1 describe this data col- lection procedure, on which we build our oracle policy (§3). In LTAL, we assume a labeled datasetD which labeled set Slab, a large set Sunlab that will be treated as unlabeled, and an evaluation set Seval is partitioned into three disjoint sets: a small In each iteration i, a model mi φ is fine- tuned on each candidate set, producing K mod- that will be used to estimate the quality of mod- els. Then, active learning is simulated for B it- erations. φ, pa- rameterized by φ, is first trained on the labeled dataset. Then, K subsets{Cj}K j=1 are randomly sampled fromSunlab, and the model mi els{mi φj}K j=1. The performance of each model is evaluated onSeval, yielding the scores{s(Cj)}K j=1. Let the candidate set with highest accuracy beCi j=1) are the inputs and (Slab,Sunlab, mi φ,{s(Cj)}K t is the label. ThenCi t is moved fromSunlab to Ci Slab. train K models overSlab∪Cj. However, a trained t. We can create training examples for πθ, where Simulating active learning is a computationally expensive procedure. In each iteration we need to network can potentially lead to a policy that is bet- ter than standard active learning heuristics. 3 An Oracle Active Learning Policy Our goal is to examine the potential of LTAL for learning a semantic representation such as QA- SRL. Towards this goal, we investigate an oracle policy that should be an upper bound for what can be achieved with a learned policy πθ. The oracle policy is allowed to use Algorithm 1 • Training: The models mi φj are affected by the training procedure in Lines 2 and 5 of Alg. 1. Different training procedures affect the perfor- mance of models trained with the oracle policy. • Search space coverage: Training over all unla- beled examples in each iteration is intractable, so the oracle policy randomly samples K subsets, each with L examples. Because K⋅L<<Sunlab, it is possible that randomly sampling these sets will miss the more beneficial unlabeled exam- ples. Moreover, the parameter L controls the di- versity of candidate subsets, since as L increases the similarity between the K different subsets grows. Thus, the hyper-parameters K and L might affect the outcome of the oracle policy. • Model architecture: The model architecture (e.g., number of parameters) can affect the ef- ficacy of learning under the oracle policy. is small). • Stochasticity: The oracle policy chooses an un- labeled set based on performance after training with stochastic gradient descent. Differences in performance between candidate sets might be re- lated to this stochasticity, rather than to the ac- tual value of the examples (especially whenSlab Ci • Myopicity: The oracle policy chooses the set j that maximizes its performance. However, the success of LTAL depends on the sequence of choices that are made. It is possible that the greedy nature of this procedure results in sub- optimal performance. Unfortunately, improving search through beam search or similar measures is intractable in this already computationally- expensive procedure. We now describe QA-SRL (He et al., 2015), which is the focus of our investigation, and then describe the experiments with the oracle policy. 4 QA-SRL Schema QA-SRL was introduced by He et al. (2015) as an open variant of the predefined role schema in traditional SRL. QA-SRL replaces the predefined set of roles with the notion of argument ques- tions. These are natural language questions cen- tered around a target predicate, where the answers to the given question are its corresponding argu- ments. For example, for the sentence "Elizabeth Warren decided to run for president", traditional SRL will label "Elizabeth Warren" as ARG0 of the run predicate (the agent of the predicate, or the entity running in this case), while QA-SRL annotate. See §2 for details. Algorithm 1: Simulating active learning Figure 1: A single iteration of LTAL, where examples are sampled fromSunlab, trained with examples inSlab, and performance onSeval is used to select examples to Input:Slab,Sunlab,Seval 1 for i∈{1 . . . B} do φ← Train(Slab) Ci 1, . . . ,Ci K= SampleCandidates(Sunlab) for j∈{1, . . . , K} do φ,SlabCi ← FineTune(mi j) j← Accuracy(mi φj ,Seval) t← argmax CreateTrainEx((Slab,Sunlab, mi j=1),Ci j}K φ,{Ci t) j∈{1,...,K} si t,Sunlab←SunlabࢨCi Slab←SlabCi mi φj si mi 3 4 5 2 6 7 t j 8 10 returnSlab 9 at test time (it does not create training examples for πθ, thus Line 8 is skipped). Put differently, the oracle policy selects the set of unlabeled examples that maximizes the target metric of our model on a set sampled from the same distribution as the test set. Therefore, the oracle policy enjoys extremely favorable conditions compared to a trained policy, and we expect it to provide an upper bound on the performance of πθ. Despite these clear advan- tages, we will show that an oracle policy struggles to substantially improve performance compared to a random policy. While the oracle policy effectively "peeks" at the label to make a decision, there are various fac- tors that could explain the low performance of a model trained under the oracle policy. We now list several hypotheses, and in §5.4 and §6 method- ologically examine whether they explain the em- pirical results of LTAL. Elizabeth Warren announced her candidacy at a rally in Massachusetts. Argument Elizabeth Warren her candidacy at a rally in Massachusetts Where did someone announce something? QA-SRL role Who announced something? What did someone announce? PropBank role ARG0 ARG1 ARGM-LOC Table 1: Example of QA-SRL versus traditional SRL annotation for a given input sentence (top). Each line shows a single argument, and its role in QA-SRL (in question form) followed by its traditional SRL role, using PropBank notation. Roles in QA-SRL have a structured open representation, while SRL assigns discrete roles from a predefined set. will assign the more subtle question "who might run?", indicating the uncertainty of this future event. Questions are generated by assigning val- ues to 7 pre-defined slots (where some of the slots are potentially empty). See Table 1 for an example QA-SRL annotation of a full sentence. Recently, FitzGerald et al. (2018) demonstrated the scalability of QA-SRL by crowdsourcing the annotation of a large QA-SRL dataset, dubbed QA-SRL bank 2.0. It consists of 250K QA pairs over 64K sentences on three different domains (Wikipedia, news, and science). Following, this large dataset has enabled the development a neu- ral model which breaks QA-SRL into a pipeline of two tasks, given a target predicate in an input sen- tence. First, a span detection algorithm identifies arguments of the predicate as continuous spans in the sentence (e.g., "Elizabeth Warren" in the pre- vious example), then a question generation model predicts an appropriate role question (e.g., "who might run?"). We find that QA-SRL is a good test-bed for active learning of semantic representations, for several key reasons: (1) it requires semantic un- derstanding of the sentence, beyond syntactic or surface-level features (e.g., identifying the factu- ality of a given predicate), (2) adopting the formu- lation of FitzGerald et al. (2018), it consists of two semantic tasks, allowing us to test active learning on both of them, (3) we can leverage the large QA- SRL dataset to simulate active learning scenar- ios, and lastly (4) QA-SRL's scalability is attrac- tive for the application of active learning policies, as they may further reduce costs for researchers working on developing specialized semantic rep- resentations in low-resource domains (e.g., medi- cal, biological, or educational domains). 5 Experimental Evaluation We now perform a series of experiments compar- ing the performance of an oracle policy to a ran- dom policy. We describe the experimental settings (§5.1), tasks and models (§5.2), present the main results (§5.3), and conclude by investigating fac- tors that might affect our empirical findings (§5.4). 5.1 Experimental Settings We evaluate the potential of the oracle policy on QA-SRL Bank 2.0 (FitzGerald et al., 2018). We use the training set of the science domain asD, randomly split it intoSlab,Sunlab, andSeval. We evaluate the success of a model mi φ trained with the oracle policy by periodically measuring per- formance on the development set of the science domain. Unless mentioned, all results are an aver- age of 3 experiments, where a different split ofD was performed. Each experiment used K threads of a 40-core 2.2GHz Xeon Silver 4114 machine. We compare the results of a base oracle pol- icy (BASEORACLE) corresponding to the best pol- icy we were able to obtain using the architec- ture from FitzGerald et al. (2018) to the following baselines: • RANDOM: One of the candidate setsCi at random and added toSlab. • LONGEST: The setCi number of tokens per sentence is added toSlab. tences in the set, and choose the setCi • UNCERTAINTY: For each candidate set, we use φ to perform predictions over all of the sen- j that has the maximal average entropy over the set of pre- dictions. j with the maximal average j is chosen mi 5.2 Tasks and Models We now describe the three tasks and correspond- ing models in our analysis: Span Detection: Here we detect spans that are arguments of a predicate in a sentence (see Table 1). We start with a labeled set of sizeSlab= 50, B = 460 iterations. We set the number of candi- date sets to K= 5, and the size of each set to L= 1, and select examples with the oracle policy for thus the size of the final labeled set is 510 exam- ples. We train the publicly available span detection model released by FitzGerald et al. (2018), which consumes as input a sentence x1, . . . , xn, where xi is the concatenation of the embedding of the ith word in the sentence and a learned embedding of a binary indicator for whether this word is the tar- get predicate. This input is fed into a multi-layer encoder, producing a representation hi for every token. Each span xi∶j is represented by concate- nating the respective hidden states: sij=[hi; hj]. A fully connected network consumes the span rep- resentation sij, and predicts a probability whether the span is an argument or not. To accelerate training, we reduce the number of parameters to 488K by freezing the token embed- dings, reducing the number of layers in the en- coder, and by shrinking the dimension of both the hidden representations and the binary predicate in- dicator embedding. Following FitzGerald et al. (2018), we use GLoVe embeddings (Pennington et al., 2014). Question Generation: We generate the ques- tion (role) for a given predicate and correspond- ing argument. We start with a labeled set of size Slab = 500 and perform B = 250 iterations, where in each iteration we sample K = 5 candi- date sets each of size L= 10 (lower values were intractable). Thus, the final size ofSlab is 3,000 samples. We train the publicly available local question generation model from FitzGerald et al. (2018), where the learned argument representation sij is used to independently predict each of the 7 question slots. We reduce the number of parame- ters to 360K with the same modifications as in the span detector model. As a metric for the quality of question generation models, we use its official metric exact match (EM), which reflects the per- centage of predicted questions that are identical to the ground truth questions. Named Entity Recognition: To reproduce the experiments of Liu et al. (2018) we run the oracle policy on the CoNLL-2003 NER English dataset (Sang and De Meulder, 2003), replicating the ex- perimental settings described in Liu et al. (2018) (as their code is not publicly available). We run the oracle policy for B = 200 iterations, start- ing from an empty Slab, and adding one exam- ple (L = 1) from K = 5 candidate sets in each iteration. We use a CRF sequence tagger from AllenNLP (Gardner et al., 2018), and experiment with two variants: (1) NER-MULTILANG: A Bi- LSTM CRF model (20K parameters) with 40 di- mensional multi-lingual word embeddings (Am- mar et al., 2016), and (2) NER-LINEAR: A linear CRF model which was originally used by Liu et al. (2018). 5.3 Results Span Detection: Table 2 shows F1 score (the of- ficial metric) of the QA-SRL span detector mod- els for different sizes of Slab for BASEORACLE and the other baselines. Figure 2 (left) shows the relative improvement of the baselines over RAN- DOM. We observe that the maximal improvement of BASEORACLE over RANDOM is 9% given 200 examples, but with larger Slab the improvement drops to less than 5%. This is substantially less than the improvements obtained by Liu et al. (2018) on text classification and NER. Moreover, LONGEST outperforms BASEORACLE in most of the observed results. This shows that there exists a selection strategy that is better than BASEOR- ACLE, but it is not the one chosen by the oracle policy. Question Generation: To check whether the previous result is specific to span detection, we conduct the same experiment for question genera- tion. However, training question generation mod- els is slower compared to span detection and thus we explore a smaller space of hyper-parameters. Table 3 reports the EM scores achieved by BASE- ORACLE and the other baselines, and Figure 2 (center) shows the relative improvement. Here, the performance of BASEORACLE is even worse compared to span detection, as its maximal rela- tive improvement over RANDOM is at most 5%. Named Entity Recognition: Figure 2 (right) shows the relative improvement of NER-LINEAR and NER-MULTILANG compared to RANDOM. We observe that in NER-LINEAR, which is a replication of Liu et al. (2018), the oracle policy indeed obtains a large improvement over RAN- DOM for various sizes ofSlab, with at least 9.5% especially when the size ofSlab is small. relative improvement in performance. However, in NER-MULTILANG the relative gains are smaller, 5.4 Extended Experiments Surprisingly, we observed in §5.3 that even an or- acle policy, which is allowed to pick the examples # samples BASEORACLE RANDOM LONGEST UNCERTAINTY 100 42.7 42.8 44.1 42.8 150 49.2 47.2 49.1 47.0 200 52.9 48.3 53.0 50.1 250 54.2 52.4 55.5 51.3 300 56.6 53.3 56.4 52.2 350 57.4 56.1 57.4 54.4 400 58.4 57.0 58.7 55.1 450 59.5 57.5 58.6 55.6 500 59.9 58.5 60.0 56.9 Table 2: Span detection F1 on the development set for all models across different numbers of labeled examples. QA-SRL span detection QA-SRL question generation BASEORACLE L=5 ORACLESMALLMODEL 20 15 10 5 0 100 200 300 400 500 Size ofSlab 20 15 10 5 0 500 BASEORACLE LONGEST UNCERTAINTY 1,500 Size ofSlab 2,500 60 40 20 10 0 50 NER MULTILANG LINEAR 100 Size ofSlab 150 200 Figure 2: Relative improvement (in %) of different models compared to RANDOM on the development set. Note that the range of the y-axis in NER is different from QA-SRL. that maximize performance on samples from the same distribution as the test set, does not substan- tially improve performance over a random policy. One possibility is that no active learning policy is better than random. However, LONGEST outper- formed BASEORACLE showing that the problem is at least partially related to BASEORACLE itself. We now examine the possible factors described in §3 and investigate their interaction with the per- formance of models trained with BASEORACLE. All modifications were tested on span detection, using the experimental settings described in §5.1. Search space coverage We begin by examining the effect of the parameters K and L on the oracle policy. As K increases, we cover more of the un- labeled data, but training time increases linearly. As L increases, the subsets{Cj}K j=1 become more similar to one another due to the fact that we are randomly mixing more examples from the unla- beled data. On the other hand, when L is small, the fine-tuning process is less affected by the can- didate sets and more bySlab. In such case, it is BASEORACLE uses K = 5, L= 1. We exam- likely that the difference in scores is also affected by stochasticity. ine the performance of the oracle policy as these values are increased in Table 4. We observe that performance does not improve, and perhaps even decreases for larger values of K. We hypothesize that a large K increases the greediness of the pro- cedure, and may result in selecting an example that seems promising in the current iteration but is sub- optimal in the long run, similar to large beam sizes reducing performance in neural machine transla- tion (Yang et al., 2018). A moderate K results in a more random and possibly beneficial selection. Increasing the size of each candidate set to L= L = 1. We hypothesize that there is a trade-off 5 or 20 results in roughly similar performance to where as L increases the similarity between the different sets increases but training becomes more stable and vice versa, and thus performance for different L values does not vary substantially. Slab and then fine-tune on the unionSlab∪Ci Slab∪Ci Training In Lines 2 and 5 of Alg. 1 we train on j un- til si j does not significantly improve for 5 epochs. It is possible that fine-tuning from a fixed model reduces the efficacy of training, and training on j from random weights will improve per- formance. Of course, training from scratch will substantially increase training time. We run an ex- periment, termed INDEP., where Line 2 is skipped, and in Line 5 we independently train each of the candidate models from random weights. We find that this modification does not achieve better re- sults than BASEORACLE, possibly because train- ing a model from scratch for each of the candidates increases the stochasticity in the optimization. # samples BASEORACLE RANDOM LONGEST UNCERTAINTY 550 18.9 18.1 17.8 19.3 750 21.7 21.4 20.9 21.4 1000 24.4 23.7 22.8 23.0 1250 26.4 25.2 25.7 25.4 1500 27.1 27.3 27.1 26.9 1800 28.4 27.9 28.0 27.8 2100 29.1 28.6 29.1 29.0 2500 30.6 29.9 30.4 29.8 3000 31.1 31.3 31.3 31.5 Table 3: Question generation scores (exact match) on the development set across different numbers of labeled examples. # samples RANDOM BASEORACLE K= 10 K= 20 L= 5 L= 20 LOSS-SCORE INDEP.* EPSILON-GREEDY-0.3 ORACLE-100 RANDOMSMALLMODEL ORACLESMALLMODEL 110 45.2 43.3 46.6 44.8 44.2 45.2 30.0 40.9 45.1 44.9 51.9 53.8 150 47.2 49.2 48.8 47.4 48.3 47.5 38.2 44.6 48.6 48.8 54.8 56.6 210 50.5 52.9 51.4 52.1 52.5 51.9 41.0 50.1 52.4 51.4 57.3 58.9 370 55.8 57.8 57.6 510 290 58.5 53.1 60.3 56.8 55.8 58.6 55.9 -- -- 59.8 55.5 55.1 58.7 51.5 57.2 54.1 -- -- 59.8 55.6 53.9 59.2 62.6 59.5 60.3 63.3 58.0 56.7 53.7 57.1 57.0 61.4 61.5 set for different size ofSlab. We highlight the best per- Table 4: Span detection F1 scores on the development forming policy for the standard span detector architec- ture. (*) indicates that the results are for a single run. onCj only, rather thanSlab∪Cj. As we expect, re- In addition, we also experiment with fine-tuning sults are quite poor since the model uses only a few examples for fine-tuning and forgets the examples in the labeled set. Lastly, we hypothesize that selecting a candi- date set based on the target metric (F1 for span de- tection) might not be sensitive enough and thus we run an experiment, termed LOSS-SCORE, where we select the setCj that minimizes the loss on the whenSlab is small, reflecting the fact that the loss development set. We find that this modification achieves lower results than RANDOM, especially is not perfectly correlated with our target metric. Model Architecture In §5.3 we observed that results on NER vary with the model architecture. To see whether this phenomenon occurs also for span detection we perform a modification to the model -- we reduce the number of parameters from 488K to 26K by reducing the hidden state size and replacing GLoVe embeddings with multi-lingual embeddings (Ammar et al., 2016). We then com- pare an oracle policy (ORACLESMALLMODEL) with a random policy (RANDOMSMALLMODEL). Table 4 shows that while absolute F1 actually im- proves in this setup, the oracle policy improves performance compared to a random policy by no more than 4%. Thus, contrary to NER, here archi- tecture modifications do not expose an advantage of the oracle policy compared to the random one. We did not examine a simpler linear model for span detection, in light of recent findings (Lowell et al., 2019) that it is important to test LTAL with state-of-the-art models, as performance is tied to the specific model being trained. First, we examine EPSILON-GREEDY-P, where Myopicity We hypothesized that greedily se- lecting an example that maximizes performance in a specific iteration might be suboptimal in the long run. Because non-greedy selection strategies are computationaly intractable, we perform the fol- lowing two experiments. in each iteration the oracle policy selects the setCj ity 1− p and randomly chooses a set with prob- that when p= 0.3 its performance is comparable to ability p. This is meant to check whether adding random exploration to the oracle policy might pre- vent it from getting stuck in local optima. We find that maximizes target performance with probabil- BASEORACLE while reducing the computational costs. Second, we observe that most of the gain of BASEORACLE compared to RANDOM is in the be- ginning of the procedure. Thus, we propose to use BASEORACLE in the first b iterations, and then transition to a random policy (termed ORACLE- B). We run this variation with b = 100 and find that it leads to similar performance. To summarize, we have found that an ora- cle policy only slightly improves performance for QA-SRL span detection and question generation compared to a random policy, and that improve- ments in NER are also conditioned on the un- derlying model. Our results echo recent findings by Lowell et al. (2019), who have shown that gains achieved by active learning are small and inconsis- tent when modifying the model architecture. We have examined multiple factors that might affect the performance of models trained with an oracle policy including the training procedure, model architecture, and search procedure, and have shown that in all of them the oracle policy struggles to improve over the random one. Thus, a learned policy is even less likely to obtain mean- ingful gains using LTAL. In the next section we analyze the differences between NER-LINEAR, where LTAL works well, and BASEORACLE, in order to better under- stand the underlying causes for this phenomenon. 6 When does LTAL Work? A basic underlying assumption of active learning (with or without a learned policy), is that some samples in Sunlab are more informative for the Seval (Line 6 in Alg. 1). Thus, for active learning to learning process than others. In LTAL, the infor- mativeness of a candidate example set is defined by the accuracy of a trained model, as evaluated on 1, . . .Ci work, the candidate set that is selected should not be affected by the stochasticity of the training pro- cess. Put differently, the ranking of the candidate sets by the oracle policy should be consistent and not be dramatically affected by the optimization. To operationalize this intuition, we use Alg. 1, but run the for-loop in Line 4 twice, using two dif- t be the chosen or refer- ence candidate set according to the first run of the for-loop in iteration i. We can measure the con- sistency of the optimization process by looking at K accord- ing to the second fine-tuning, and computing the mean reciprocal rank (MRR) with respect to the ferent random seeds. LetCi the ranking of the candidate setsCi reference candidate setCi MRR= 1 BQ t) , rank(Ci i=1 t) is the rank of Ci where rank(Ci t in the second fine tuning step. The only difference between the two fine-tuning procedures is the random seed. Therefore, an MRR value that is close to 1 means that the ranking of the candidates is mostly af- fected by the quality of the samples, while a small MRR hints that optimization plays a large role. We prefer MRR to other correlation-based mea- sures (such as Spearman's rank-order correlation), because the oracle is only affected by the candi- date set that is ranked first. We can now examine whether the MRR score correlates with whether LTAL works or not. t across all iterations: 1 B (1) We measure the MRR in 3 settings: (1) NER-LINEAR, a linear CRF model for NER which replicates the experimental settings in (Liu et al., 2018), where LTAL works, (2) NER- MULTILANG, a BiLSTM-CRF sequence tagger from AllenNLP (Gardner et al., 2018) with 40 di- mensional multi-lingual word embeddings of Am- mar et al. (2016), and (3) BASEORACLE, the base- line model for span detection task. In all experi- ments the initialSlab was empty and B= 200, fol- might change as the size ofSlab is increasing, we lowing the experimental settings in which LTAL has shown good performance (Liu et al., 2018; Fang et al., 2017; Vu et al., 2019). Since the MRR compute and report MRR every 10 iterations. Figure 3 (left) presents the MRR in the three experiments. We observe that in NER-LINEAR the MRR has a stable value of 1, while in NER- MULTILANG and BASEORACLE the MRR value is substantially lower, and closer to an MRR value of a random selection (∼.46). The right side of Fig- ure 3 shows that NER-LINEAR oracle policy out- performs a random policy by a much larger mar- gin, compared to the other 2 experiments. These results show that the ranking in NER- LINEAR is not affected by the stochasticity of op- timization, which is expected given its underlying convex loss function. On the other hand, the opti- mization process in the other experiments is over a non-convex loss function and a smallSlab, and thus optimization is more brittle. Interestingly, we observe in Figure 3 that the gains of the ora- cle policy in NER-LINEAR are higher than NER- MULTILANG, although the task and the dataset are exactly same in the two experiments. This shows that the potential of LTAL is affected by the model, where a more complex model leads to smaller gains by LTAL. We view our findings as a guideline for future work: by tracking the MRR one can assess the po- tential of LTAL at development time -- when the MRR is small, the potential is limited. 7 Related Work Active learning has shown promising results on various tasks. The commonly used uncertainty criteria (Lewis and Catlett, 1994; Culotta and Mc- Callum, 2005) is focused on selecting the sam- ples on which the confidence of the model is low. Among other notable approaches, in query by committee (Seung et al., 1992) a disagreement between a set of trained models on the predicted output of an unlabeled sample is the criterion for MRR Relative improvement (in %) 1 0.8 0.6 0.4 0.2 0 50 Size ofSlab 100 150 80 60 40 20 0 200 50 100 Size ofSlab 150 200 NER-LINEAR NER-MULTILANG BASEORACLE Figure 3: MRR (on the left) and relative improvement (in %) of different models compared to RANDOM on the development set. selecting what samples to label. In a large empirical study, Lowell et al. (2019) have recently shown other limitations in active learning. They investigate the performance of ac- tive learning across NLP tasks and model archi- tectures, and demonstrate that it does not achieve consistent gains over supervised learning, mostly because the collected samples are beneficial to a specific model architecture, and does not yield bet- ter results than random selection when switching to a new architecture. There has been little research regarding active learning of semantic representations. Among the relevant work, Siddhant and Lipton (2018) have shown that uncertainty estimation using dropout and Bayes-By-Backprop (Blundell et al., 2015) achieves good results on the SRL formulation. The improvements in performance due to LTAL approaches on various tasks (Konyushkova et al., 2017; Bachman et al., 2017; Fang et al., 2017; Liu et al., 2018) has raised the question whether learned policies can be applied also to the field of learning semantic representations. 8 Conclusions We presented the first experimentation with LTAL techniques in learning parsers for semantic rep- resentations. Surprisingly, we find that LTAL, a learned method which was shown to be effective for NER and document classification, does not do significantly better than a random selection on two semantic representation tasks within the QA-SRL framework, even when given extremely favourable conditions. We thoroughly analyze the factors leading to this poor performance, and find that the stochasticity in the model optimization negatively affects the performance of LTAL. Finally, we pro- pose a metric which can serve as an indicator for whether LTAL will fare well for a given dataset and model. Our results suggest that different ap- proaches should be explored for the important task of building semantic representation models. Acknowledgements We thank Julian Michael and Oz Anani for their useful comments and feedback. This research was supported by The U.S-Israel Binational Science Foundation grant 2016257, its associated NSF grant 1737230 and The Yandex Initiative for Ma- chine Learning. References Omri Abend and Ari Rappoport. 2013. Universal con- In Proceed- ceptual cognitive annotation (ucca). ings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Pa- pers), volume 1, pages 228 -- 238. Waleed Ammar, George Mulcaire, Yulia Tsvetkov, Guillaume Lample, Chris Dyer, and Noah A Smith. 2016. Massively multilingual word embeddings. arXiv preprint arXiv:1602.01925. Philip Bachman, Alessandro Sordoni, and Adam Learning algorithms for active Trischler. 2017. In Proceedings of the 34th International learning. Conference on Machine Learning-Volume 70, pages 301 -- 310. JMLR. org. Laura Banarescu, Claire Bonial, Shu Cai, Madalina Georgescu, Kira Griffitt, Ulf Hermjakob, Kevin Knight, Philipp Koehn, Martha Palmer, and Nathan Schneider. 2013. Abstract meaning representation for sembanking. In Proceedings of the 7th Linguis- tic Annotation Workshop and Interoperability with Discourse, pages 178 -- 186. Jonathan Berant, Vivek Srikumar, Pei-Chun Chen, Abby Vander Linden, Brittany Harding, Brad Huang, Peter Clark, and Christopher D Manning. 2014. Modeling biological processes for reading In Proceedings of the 2014 Con- comprehension. ference on Empirical Methods in Natural Language Processing (EMNLP). Charles Blundell, Julien Koray Kavukcuoglu, and Daan Wierstra. 2015. Weight arXiv preprint uncertainty in neural networks. arXiv:1505.05424. Cornebise, Aron Culotta and Andrew McCallum. 2005. Reduc- ing labeling effort for structured prediction tasks. In AAAI, volume 5, pages 746 -- 751. Meng Fang, Yuan Li, and Trevor Cohn. 2017. Learning how to active learn: A deep reinforcement learning approach. EMNLP. Nicholas FitzGerald, Julian Michael, Luheng He, and Luke Zettlemoyer. 2018. Large-scale qa-srl parsing. arXiv preprint arXiv:1805.05377. Matt Gardner, Joel Grus, Mark Neumann, Oyvind Tafjord, Pradeep Dasigi, Nelson Liu, Matthew Pe- ters, Michael Schmitz, and Luke Zettlemoyer. 2018. Allennlp: A deep semantic natural language pro- cessing platform. arXiv preprint arXiv:1803.07640. Luheng He, Mike Lewis, and Luke Zettlemoyer. 2015. Question-answer driven semantic role labeling: Us- ing natural language to annotate natural language. In Proceedings of the 2015 conference on empirical methods in natural language processing, pages 643 -- 653. Luheng He, Julian Michael, Mike Lewis, and Luke Zettlemoyer. 2016. Human-in-the-loop parsing. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing. Daniel Hershcovich, Omri Abend, and Ari Rappoport. 2018. Multitask parsing across semantic representa- tions. In Proc. of ACL, pages 373 -- 385. Edward Kim, Zach Jensen, Alexander van Grootel, Kevin Huang, Matthew Staib, Sheshera Mysore, Haw-Shiuan Chang, Emma Strubell, Andrew McCallum, Stefanie Jegelka, and Elsa Olivetti. Inorganic materials synthesis planning 2019. CoRR, with literature-trained neural networks. abs/1901.00032. Jin-Dong Kim, Tomoko Ohta, Sampo Pyysalo, Yoshi- nobu Kano, and Jun'ichi Tsujii. 2009. Overview of bionlp'09 shared task on event extraction. In Proceedings of the Workshop on Current Trends in Biomedical Natural Language Processing: Shared Task. Association for Computational Linguistics. Ksenia Konyushkova, Raphael Sznitman, and Pascal Fua. 2017. Learning active learning from data. In Advances in Neural Information Processing Sys- tems, pages 4225 -- 4235. David D Lewis and Jason Catlett. 1994. Heteroge- neous uncertainty sampling for supervised learning. In Machine learning proceedings 1994, pages 148 -- 156. Elsevier. David D. Lewis and William A. Gale. 1994. A sequen- tial algorithm for training text classifiers. In SIGIR. Ming Liu, Wray Buntine, and Gholamreza Haffari. 2018. Learning how to actively learn: A deep im- In Proceedings of the itation learning approach. 56th Annual Meeting of the Association for Compu- tational Linguistics (Volume 1: Long Papers), pages 1874 -- 1883. David Lowell, Zachary C. Lipton, and Byron C. Wal- lace. 2019. Practical obstacles to deploying active learning. In Proceedings of EMNLP. Sheshera Mysore, Edward Kim, Emma Strubell, Ao Liu, Haw-Shiuan Chang, Srikrishna Kompella, Kevin Huang, Andrew McCallum, and Elsa Olivetti. 2017. Automatically extracting action graphs from CoRR, materials science synthesis procedures. abs/1711.06872. Claire N´edellec, Robert Bossy, Jin-Dong Kim, Jung- Jae Kim, Tomoko Ohta, Sampo Pyysalo, and Pierre Zweigenbaum. 2013. Overview of bionlp shared In Proceedings of the BioNLP Shared task 2013. Task 2013 Workshop, pages 1 -- 7. Joakim Nivre, Marie-Catherine De Marneffe, Filip Ginter, Yoav Goldberg, Jan Hajic, Christopher D Manning, Ryan McDonald, Slav Petrov, Sampo Pyysalo, Natalia Silveira, et al. 2016. Universal de- pendencies v1: A multilingual treebank collection. In Proceedings of the Tenth International Confer- ence on Language Resources and Evaluation (LREC 2016). Stephan Oepen, Marco Kuhlmann, Yusuke Miyao, Daniel Zeman, Dan Flickinger, Jan Hajic, Angelina Ivanova, and Yi Zhang. 2014. Semeval 2014 task 8: Broad-coverage semantic dependency parsing. In Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval 2014), pages 63 -- 72. Martha Palmer, Daniel Gildea, and Paul Kingsbury. 2005. The proposition bank: An annotated cor- pus of semantic roles. Computational linguistics, 31(1):71 -- 106. Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 confer- ence on empirical methods in natural language pro- cessing (EMNLP), pages 1532 -- 1543. Erik F Sang and Fien De Meulder. 2003. Intro- duction to the conll-2003 shared task: Language- arXiv independent named entity recognition. preprint cs/0306050. Burr Settles. 2009. Active learning literature survey. Technical report, University of Wisconsin-Madison Department of Computer Sciences. H Sebastian Seung, Manfred Opper, and Haim Som- polinsky. 1992. Query by committee. In Proceed- ings of the fifth annual workshop on Computational learning theory, pages 287 -- 294. ACM. Aditya Siddhant and Zachary C Lipton. 2018. Deep bayesian active learning for natural language pro- cessing: Results of a large-scale empirical study. arXiv preprint arXiv:1808.05697. Gabriel Stanovsky and Ido Dagan. 2018. Semantics as a foreign langauge. In Proceedings of the 2018 Con- ference on Empirical Methods in Natural Language Processing (EMNLP), Brussels, Belgium. Associa- tion for Computational Linguistics. Thuy Vu, Ming Liu, Dinh Phung, and Gholamreza Haf- fari. 2019. Learning how to active learn by dream- In Proceedings of the 57th Conference of the ing. Association for Computational Linguistics, pages 4091 -- 4101. Yilin Yang, Liang Huang, and Mingbo Ma. 2018. Breaking the beam search curse: A study of (re-) scoring methods and stopping criteria for neural ma- chine translation. EMNLP.
1811.01710
1
1811
2018-10-31T01:31:10
Weakly Supervised Grammatical Error Correction using Iterative Decoding
[ "cs.CL", "cs.LG", "stat.ML" ]
We describe an approach to Grammatical Error Correction (GEC) that is effective at making use of models trained on large amounts of weakly supervised bitext. We train the Transformer sequence-to-sequence model on 4B tokens of Wikipedia revisions and employ an iterative decoding strategy that is tailored to the loosely-supervised nature of the Wikipedia training corpus. Finetuning on the Lang-8 corpus and ensembling yields an F0.5 of 58.3 on the CoNLL'14 benchmark and a GLEU of 62.4 on JFLEG. The combination of weakly supervised training and iterative decoding obtains an F0.5 of 48.2 on CoNLL'14 even without using any labeled GEC data.
cs.CL
cs
Weakly Supervised Grammatical Error Correction using Iterative Decoding Jared Lichtarge, Christopher Alberti, Shankar Kumar, Noam Shazeer, Niki Parmar {lichtarge,chrisalberti,shankarkumar,noam,nikip}@google,com Google AI 8 1 0 2 t c O 1 3 ] L C . s c [ 1 v 0 1 7 1 0 . 1 1 8 1 : v i X r a Abstract We describe an approach to Grammatical Er- ror Correction (GEC) that is effective at mak- ing use of models trained on large amounts of weakly supervised bitext. We train the Trans- former sequence-to-sequence model on 4B to- kens of Wikipedia revisions and employ an iterative decoding strategy that is tailored to the loosely-supervised nature of the Wikipedia training corpus. Finetuning on the Lang-8 cor- pus and ensembling yields an F0.5 of 58.3 on the CoNLL'14 benchmark and a GLEU of 62.4 on JFLEG. The combination of weakly super- vised training and iterative decoding obtains an F0.5 of 48.2 on CoNLL'14 even without us- ing any labeled GEC data. 1 Introduction Much progress in the Grammatical Error Correc- tion (GEC) task can be credited to approaching the problem as a translation task (Brockett et al., 2006) from an ungrammatical source language to a grammatical target language. This strict anal- ogy to translation imparts an unnecessary all-at- once constraint. We hypothesize that GEC can be more accurately characterized as a multi-pass it- erative process, in which progress is made incre- mentally through the accumulation of minor cor- rections (Table 1). We address the relative scarcity of publicly available GEC training data by lever- aging the entirety of English language Wikipedia revision histories1, a large corpus that is weakly supervised for GEC because it only occasionally contains grammatical error corrections and is not human curated specifically for GEC. In this work, we present an iterative decoding algorithm that allows for incremental corrections. While prior work (Dahlmeier and Ng, 2012a) ex- plored a similar algorithm to progressively expand 1https://dumps.wikimedia.org/enwiki/latest/ Original 1st 2nd 3nd 4th Final this is nto the pizzza that i ordering this is not the pizza that I ordering This is not the pizza that I ordering This is not the pizza that I ordered This is not the pizza that I ordered. This is not the pizza that I ordered. Table 1: Iterative decoding on a sample sentence. the search space for GEC using a phrase-based machine translation approach, we demonstrate the effectiveness of this approach as a means of do- main transfer for models trained exclusively on noisy out-of-domain data. We apply iterative decoding to a Trans- former model (Vaswani et al., 2017) trained on minimally-filtered Wikipedia revisions, and show the model is already useful for GEC. With finetun- ing on Lang-8, our approach achieves the best re- ported single model result on the CoNLL'14 GEC task, and by ensembling four models, we obtain the state-of-the-art. 2 Pretraining Data Wikipedia is a publicly available, online encyclo- pedia for which all content is communally cre- ated and curated. We use the revision histories of Wikipedia pages as training data for GEC. Unlike the WikEd corpus for GEC (Grundkiewicz and Junczys-Dowmunt, 2014), our extracted corpus does not include any heuristic grammar-specific filtration beyond simple text extraction and is two orders of magnitude larger than Lang-8 (Mizu- moto et al., 2011), the largest publicly available corpus curated for GEC (Table 2). Section 5 de- scribes our data generation method. Corpus Num. of sentences Num. of words Wikipedia revisions Lang-8 WikEd 170M 1.9M 12M 4.1B 25.0M 292 M Table 2: Statistics computed over training sets for GEC. Original Target Artilleryin 1941 and was medically dis- charged Artilleryin 1941 he was later medically discharged with Original Wolfpac has their evry own internet ra- Target Original Target own their very dio show WOLFPAC has Internet radio show League called ONEFA. TEXTBFhe University is also a site for the third League called ONEFA. The University also hosts the third Spanish Algorithm 1: Iterative Decoding Data: I, beam, threshold, MAXITER Result: T for i ∈ {1, 2, ..., MAXITER} do Nbestlist = Decode(I, beam) CIdentity = +∞ CNon-Identity = +∞ HNon-Identity = N U LL for H ∈ Nbestlist do if H = I then CIdentity = Cost(H); else if Cost(H) < CNon-Identity then CNon-Identity = Cost(H) HNon-Identity = H Table 3: Example source-target pairs from the Wikipedia dataset used for pretraining models. end In Table 3, we show representative examples of the extracted source-target pairs, including some artificial errors. While some of the edits are gram- matical error corrections, the vast majority are not. 3 Decoding Our iterative decoding algorithm is presented in Algorithm 1. Unlike supervised bitext such as CoNLL, our Wikipedia-derived bitext typically contains fewer edits. Thus a model trained on Wikipedia learns to make very few edits in a single decoding pass. Iterative decoding alleviates this problem by applying a sequence of rewrites start- ing from the grammatically incorrect sentence (I), making incremental improvements until it cannot find any more edits to make. In each iteration, the algorithm performs a conventional beam search but is only allowed to output a rewrite for which it has high confidence. The best non-identity de- coded target sentence is output only if its cost is less than the cost of the identity translation times a predetermined threshold. Applied to the models trained exclusively on out-of-domain Wikipedia data, iterative decoding mediates domain transfer by allowing the accu- mulation of incremental changes, as would be more typical of Wikipedia, rather than requiring a single-shot fix, as is the format of curated GEC data. Using incremental edits produces a signif- icant improvement in performance over single- shot decoding, revealing that the pre-trained mod- els, which would have otherwise appeared use- less, may already be useful for GEC by themselves (Figure 1). The improvements from iterative de- coding on finetuned models are not as dramatic, but still substantial. In Table 1, we show an example of iterative de- coding in action. The model continues to refine (cid:46) Rewrite if non-identity cost < identity cost if CNon-Identity/CIdentity < threshold then T = HNon-Identity (cid:46) Output rewrite. (cid:46) Output identity. (cid:46) Input for next iteration. else T = I end I = T end the input until it reaches a sentence that does not require any edits. We generally see fewer edits be- ing applied as the model gets closer to the final result. 4 Model In this work, we use the Transformer sequence- to-sequence model (Vaswani et al., 2017), using the Tensor2Tensor opensource implementation.2 We use 6 layers for both the encoder and the de- coder, 8 attention heads, a dictionary of 32k word pieces (Schuster and Nakajima, 2012), embedding size dmodel = 1024, a position-wise feed forward network at every layer of inner size df f = 4096, and Adafactor as optimizer with inverse squared 2https://github.com/tensorflow/tensor2tensor Figure 1: F0.5 with iterative decoding on the CoNLL dev set. Triangles indicate performance with single-shot decod- ing. Each point for the pre-trained/fine-tuned settings is an average performance across 4 models. llllllllllllllllllPre−trained on WikipediaFine−tunedEnsemble1020304050123456IterationF0.5 root decay (Shazeer and Stern, 2018).3 5 Experiments Starting with the raw XML of the Wikipedia re- vision history dump, we extract individual pages, each containing snapshots in chronological order. We extract the inline text and remove the non-text elements within. We throw out pages larger than 64Mb. For remaining pages, we logarithmically downsample pairs of consecutive snapshots, ad- mitting only log1.5(X) pairs for a total of X snap- shots.4 Each remaining pair of consecutive snap- shots forms a source/target pair. Our goal is to train a single model that can per- form both spelling and grammar correction. We therefore introduce spelling errors on the source side at a rate of 0.003 per character, using dele- tion, insertion, replacement, and transposition of adjacent characters. We then align the texts from consecutive snapshots and extract sequences be- tween matching segments with a maximum length of 256 word-pieces.5 Examples with identical source and target sequences are downsampled by 99% to achieve 3.8% identical examples in the fi- nal data. We experimented with data filtering by discard- ing examples where source and target were fur- ther than a maximum edit distance apart, by vary- ing the max page size cutoff, and trying different rates of downsampling consecutive pages. Models trained on the augmented data did not obtain sub- stantially different performance. We did however observe performance improvements when we en- sembled together models trained on datasets with different filtering settings. We train the Transformer model on Wikipedia revisions for 5 epochs with a batch size of ap- proximately 64,000 word pieces. During this pre- training, we set the learning rate to 0.1 for the first 10,000 steps, then decrease it proportionally to the inverse square root of the number of steps after that. We average the weights of the model over 8 checkpoints spanning the final 1.5 epochs of train- ing. We then finetune our models on Lang-8 for 50 3We used the "transformer clean big tpu" setting. 4This prevents larger pages with more snapshots from overwhelming smaller pages, and reduces the total amount of data 20-fold. 5An alternative approach would have been to extract full sentences, but we decided against introducing the complexity of a model for identifying sentence boundaries. (Grundkiewicz and epochs, linearly increasing the learning rate from 0 to 3·10−5 over the first 20,000 steps and keeping the learning rate constant for the remaining steps. We stop the fine-tuning before the models start to overfit on a development set drawn from Lang-8. At evaluation time, we run iterative decoding using a beam size of 4. Finally, we apply a small set of regular expressions to match the tokeniza- tion to that of the dataset. Our ensemble models are obtained by decoding with 4 identical Trans- formers pretrained and finetuned separately. At each step of decoding, we average the logits from the 4 models. Following Junczys- Dowmunt, 2018; Junczys-Dowmunt et al., 2018), we preprocess JFLEG development and test sets with a spell-checking component but do not apply spelling correction to CoNLL sets. For CoNLL sets, we pick the iterative decoding threshold and number of iterations on a subset of the CoNLL'14 training set, sampled to have the same ratio of modified to unmodified sentences as the CoNLL'14 dev set. For JFLEG, we pick the best decoding threshold on the JFLEG dev set. We report performance of our models by measuring F0.5 with the M 2 scorer (Dahlmeier and Ng (2012b)) on the CoNLL'14 dev and test sets, and the GLEU+ metric (Napoles et al., 2016) on the JFLEG dev and test sets. The results of our method are shown in Table 5. On both CoNLL'14 and JFLEG, we achieve state- of-the-art for both single models and ensembles. In all cases, iterative decoding substantially out- performs single shot decoding. 6 Error Analysis In Table 4, we list example corrections proposed by the model pretrained on Wikipedia revisions and by the ensemble model finetuned on Lang-8. The changes proposed by the pretrained model of- ten appear to be improvements to the original sen- tence, but fall outside the scope of GEC. Models finetuned on Lang-8 learn to make more conserva- tive corrections. The finetuning on Lang-8 can be viewed as a domain adaptation technique that shifts the pre- trained model from the Wikipedia domain to the GEC domain. On Wikipedia, it is common to see substantial edits that make the text more concise and readable, e.g. replacing "which is RFID for short" with "(RFID)", or removing less important Original Pretrained Finetuned Original Pretrained Finetuned Recently, a new coming surveillance technology called radio-frequency identification which is RFID for short has caused heated discussions on whether it should be used to track people. Recently, a surveillance technology called radio frequency identification (RFID) has caused heated discussions on whether it should be used to track people. Recently, a new surveillance technology called radio-frequency identification, which is RFID for short, has caused heated discussions on whether it should be used to track people. Then we can see that the rising life expectancies can also be viewed as a challenge for us to face. The rising life expectancy can also be viewed as a challenge for people to face. Then we can see that the rising life expectancy can also be viewed as a challenge for us to face. Table 4: Corrections from the pretrained/finetuned-ensemble models on example sentences from the CoNLL'14 dev set. JFLEG dev F0.5 CoNLL14 test Precision Recall 23.7 33.1 60.9 65.5 41.5 42.9 5.7 33.2 38.0 42.9 39.3 45.0 63.0 61.9 66.8 63.0 56.8 64.3 62.2 67.9 67.5 38.9 40.2 34.5 7.2 30.3 29.7 37.8 31.6 37.8 (1) (2) (3) This work MLConvembed (4 ensemble) +EO +LM +SpellCheck MLConvembed Transformer (single) Transformer (4 ensemble) Transformer (4 ensemble) +LM Hybrid PBMT +NMT +LM Model Decoding Type Transformer (single, pretrained) Transformer (single, pretrained) Transformer (single, finetuned) Transformer (single, finetuned) Transformer (4 ensemble, finetuned) Transformer (4 ensemble, finetuned) single-shot iterative single-shot iterative single-shot iterative test dev GLEU+ 47.7 52.5 45.4 51.1 51.3 54.2 52.6 56.8 51.3 57.5 57.9 58.5 59.9 61.5 50.4 56.1 56.6 59.3 57.9 62.4 F0.5 46.4 54.8 53.0 56.1 55.8 56.3 24.6 48.2 52.2 54.9 55.2 58.3 Table 5: Comparison of our model with recent state-of-the-art models on the CoNLL'14 and JFLEG datsets. All single model results are averages of 4 models. (1): Chollampatt and Ng (2018), (2): Junczys-Dowmunt et al. (2018), (3): Grundkiewicz and Junczys-Dowmunt (2018). clauses like "Then we can see that". But these are not appropriate for GEC as they are editorial style fixes rather than grammatical fixes. 7 Related Work Progress in GEC has accelerated rapidly since the CoNLL'14 Shared Task (Ng et al., 2014). Rozovskaya and Roth (2016) combined a Phrase Based Machine Translation (PBMT) model trained on the Lang-8 dataset (Mizumoto et al., 2011) with error specific classifiers. Junczys- Dowmunt and Grundkiewicz (2016) combined a PBMT model with bitext features and a larger The first Neural Machine language model. Translation (NMT) model to reach the state of the art on CoNLL'14 (Chollampatt and Ng, 2018) used an ensemble of four convolutional sequence-to-sequence models followed by rescor- ing. The current state of the art (F0.5 of 56.25 on ConLL '14) was achieved by Grundkiewicz and Junczys-Dowmunt (2018) with a hybrid PBMT-NMT system. A neural-only result with an F0.5 of 56.1 on CoNLL '14 was reported by Junczys-Dowmunt et al. (2018) using an ensemble of neural Transformer models (Vaswani et al., 2017), where the decoder side of each model is pretrained as a language model. Our approach can be viewed as a direct extension of this last work, where our novel contributions include iterative decoding and the pretraining on a large amount of Wikipedia edits, instead of pretraining only the decoder as a language model. While pretraining on out-of-domain data has been employed previ- ously for neural machine translation (Luong and Manning, 2015), it has not been presented in GEC thus far. 8 Discussion We presented a neural Transformer model that ob- tains state-of-the-art results on CoNLL'14 and JF- LEG tasks6. Our contributions are twofold: we couple the use of publicly available Wikipedia re- visions at much larger scale than previously re- ported for GEC, with an iterative decoding strat- egy that is especially useful when using models trained on noisy bitext such as Wikipedia. Train- ing on Wikipedia revisions alone gives an F0.5 of 6Using non-public sentences crawled from Lang-8. com, Tao et al. (2018) recently obtained an F0.5 of 61.34 on CoNLL'14 and a GLEU of 62.4 on JFLEG. japanese error correction of second language learn- ers. In Proceedings of 5th International Joint Con- ference on Natural Language Processing, pages 147 -- 155. Courtney Napoles, Keisuke Sakaguchi, Matt Post, and Joel Tetreault. 2016. GLEU without tuning. arXiv:1605.02592. Hwee Tou Ng, Siew Mei Wu, Ted Briscoe, Christian Hadiwinoto, Raymond Hendy Susanto, and Christo- pher Bryant. 2014. The CoNLL-2014 shared task on grammatical error correction. In CoNLL Shared Task, pages 1 -- 14. Alla Rozovskaya and Dan Roth. 2016. Grammatical error correction: Machine translation and classifiers. In Proc. of ACL. Michael Schuster and Kaisuke Nakajima. 2012. Japanese and korean voice search. In Proceedings of the IEEE Conference on Acoustics, Speech and Signal Processing. Noam Shazeer and Mitchell Stern. 2018. Adafactor: Adaptive learning rates with sublinear memory cost. arXiv:1804.04235. Ge Tao, Furu Wei, and Ming Zhou. 2018. Reach- automatic ing grammar error correction: An empirical study. arXiv:1807.01270. performance human-level in Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Pro- cessing Systems, pages 6000 -- 6010. 48.2 on the CoNLL'14 task without relying on hu- man curated GEC data or non-parallel data. We also show that a model trained using Wikipedia re- visions can yield extra gains from finetuning using the Lang-8 corpus and ensembling. We expect our work to spur interest in methods for using noisy parallel data to improve NLP tasks. References Chris Brockett, William B Dolan, and Michael Gamon. 2006. Correcting ESL errors using phrasal SMT techniques. In Proceedings of the 21st International Conference on Computational Linguistics and the 44th annual meeting of the Association for Compu- tational Linguistics, pages 249 -- 256. Association for Computational Linguistics. Shamil Chollampatt and Hwee Tou Ng. 2018. A multilayer convolutional encoder-decoder neu- ral network for grammatical error correction. arXiv:1801.08831. Daniel Dahlmeier and Hwee Tou Ng. 2012a. A beam- search decoder for grammatical error correction. In Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning. Daniel Dahlmeier and Hwee Tou Ng. 2012b. Bet- In ter evaluation for grammatical error correction. Proc. of NAACL. Roman Grundkiewicz and Marcin Junczys-Dowmunt. 2014. The wiked error corpus: A corpus of correc- tive wikipedia edits and its application to grammat- In International Conference ical error correction. on Natural Language Processing, pages 478 -- 490. Springer. Roman Grundkiewicz and Marcin Junczys-Dowmunt. 2018. Near human-level performance in grammati- cal error correction with hybrid machine translation. arXiv:1804.05945. Marcin Junczys-Dowmunt and Roman Grundkiewicz. 2016. Phrase-based machine translation is state-of- the-art for automatic grammatical error correction. In Proc. of EMNLP. Marcin Junczys-Dowmunt, Roman Grundkiewicz, Shubha Guha, and Kenneth Heafield. 2018. Approaching neural grammatical error correc- tion as a low-resource machine translation task. arXiv:1804.05940. Minh-Thang Luong and Christopher D. Manning. 2015. Stanford neural machine translation systems for spoken language domain. In International Work- shop on Spoken Language Translation. Tomoya Mizumoto, Mamoru Komachi, Masaaki Na- gata, and Yuji Matsumoto. 2011. Mining revi- sion log of language learning SNS for automated
1503.01655
2
1503
2015-03-12T23:10:41
Studying the Wikipedia Hyperlink Graph for Relatedness and Disambiguation
[ "cs.CL" ]
Hyperlinks and other relations in Wikipedia are a extraordinary resource which is still not fully understood. In this paper we study the different types of links in Wikipedia, and contrast the use of the full graph with respect to just direct links. We apply a well-known random walk algorithm on two tasks, word relatedness and named-entity disambiguation. We show that using the full graph is more effective than just direct links by a large margin, that non-reciprocal links harm performance, and that there is no benefit from categories and infoboxes, with coherent results on both tasks. We set new state-of-the-art figures for systems based on Wikipedia links, comparable to systems exploiting several information sources and/or supervised machine learning. Our approach is open source, with instruction to reproduce results, and amenable to be integrated with complementary text-based methods.
cs.CL
cs
Studying the Wikipedia Hyperlink Graph for Relatedness and Disambiguation Eneko Agirre IXA NLP group UPV/EHU Ander Barrena IXA NLP group UPV/EHU Aitor Soroa IXA NLP group UPV/EHU [email protected] [email protected] [email protected] 5 1 0 2 r a M 2 1 ] L C . s c [ 2 v 5 5 6 1 0 . 3 0 5 1 : v i X r a Abstract Hyperlinks and other relations in Wikipedia are a extraordinary resource which is still not fully understood. In this paper we study the different types of links in Wikipedia, and con- trast the use of the full graph with respect to just direct links. We apply a well-known ran- dom walk algorithm on two tasks, word relat- edness and named-entity disambiguation. We show that using the full graph is more effec- tive than just direct links by a large margin, that non-reciprocal links harm performance, and that there is no benefit from categories and infoboxes, with coherent results on both tasks. We set new state-of-the-art figures for systems based on Wikipedia links, compara- ble to systems exploiting several information sources and/or supervised machine learning. Our approach is open source, with instruction to reproduce results, and amenable to be inte- grated with complementary text-based meth- ods. 1 Introduction Hyperlinks and other relations between concepts and instances in Wikipedia have been successfully used in semantic tasks (Milne and Witten, 2013). Still, many questions about the best way to leverage those links remain unanswered. For instance, meth- ods using direct hyperlinks alone would wrongly disambiguate Lions in Figure 1 to B&I Lions, a rugby team from Britain and Ireland, as it shares two direct links to potential referents in the context (Darrel Fletcher, a British football player, and Cape Town, the city where the team suffered some memo- rable defeats), while Highveld Lions, a cricket Figure 1: Simplified example motivating the use of the full graph. It shows the disambiguation of Lions in “Alan Kourie, CEO of the Lions franchise, had discussions with Fletcher in Cape Town”. Each mention is linked to the candidate entities by arrows, e.g. B&I Lions and Highveld Lions for Lions. Solid lines correspond to direct hyperlinks and dashed lines to a path of several links. An algorithm using direct links alone would incor- rectly output B&I Lions, while one using the full graph would correctly choose Highveld Lions. team from South Africa, has only one. When con- sidering the whole graph of hyperlinks we find that the cricket team is related to two cricketers named Alan Kourie and Duncan Fletcher and could thus pick the right entity for Lions in this context. In this paper we will study this and other questions about the use of hyperlinks in word relatedness (Gabrilo- vich and Markovitch, 2007) and named-entity dis- ambiguation, NED (Hachey et al., 2012). Previous work on this area has typically focused on novel algorithms which work on a specific mix of resource, information source, task and test dataset (cf. Sect. 7). In the case of NED, the evalua- tion of the disambiguation component is confounded by interactions with mention spotting and candidate generation. With very few exceptions, there is lit- tle analysis of components and alternatives, and it is very difficult to learn any insight beyond the fact that the mix under study attained certain performance on the target dataset1. The number of algorithms and datasets is growing by the day, with no well- established single benchmark, and the fact that some systems are developed on test data, coupled with reproducibility problems (Fokkens et al., 2013, on word relatedness), makes it very difficult to know where the area stands. There is a need for clear points of reference which allow to understand where each information source and algorithm stands with respect to other alternatives. We thus depart from previous work, seeking to set such a point of reference, and focus on a single knowledge source (hyperlinks in Wikipe- dia) with a clear research objective: given a well- established random walk algorithm (Personalized PageRank (Haveliwala, 2002)) we explore sources of links and filtering methods, and contrast the use of the full graph with respect to using just direct links. We follow a clear development/test/analysis methodology, evaluating on a extensive range of both relatedness and NED datasets. The results are confirmed in both tasks, yielding more support to the findings in this research. All software and data are publicly available, with instructions to obtain out-of- the-box replicability2. The contributions of our research are the follow- ing: (1) We show for the first time that performing random walks over the full graph is preferable than considering only direct links. (2) We study several sources of links, showing that non-reciprocal links hurt and that the contribution of the category struc- ture and links in infoboxes is residual. (3) We set the new state-of-the-art for systems based on Wikipe- dia links for both word relatedness and named-entity disambiguation. The results are close to the best sys- tems to date, which use several information sources and/or supervised machine learning techniques, and specialize on either relatedness or disambiguation. 1See (Hachey et al., 2012) and (Garc´ıa et al., 2014) for two exceptions on NED. The first is limited to a single dataset, the second explores methods based on direct links, which we extend to using the full graph. 2http://ixa2.si.ehu.es/ukb/README.wiki. txt Our work shows that a careful analysis of varieties of graphs using a well-known random walk algorithm pays off more than most ad-hoc algorithms. The article is structured as follows. We first present previous work, followed by the different op- tions to build hyperlink graphs. Sect. 4 reviews ran- dom walks for relatedness and NED. Sect. 5 sets the experimental methodology, followed by the analysis and results on development data (Sect. 6) and the comparison to the state of the art (Sect. 7). Finally, Sect. 8 draws the conclusions. 2 Previous work The irruption of Wikipedia has opened up enormous opportunities for natural language processing (Hovy et al., 2013), with many derived knowledge-bases, including DBpedia (Bizer et al., 2009), Freebase (Bollacker et al., 2008), and BabelNet (Navigli and Ponzetto, 2012a), to name a few. These resources have been successfully used on semantic process- ing tasks like word relatedness, named-entity disam- biguation (NED), also known as entity linking, and the closely related Wikification. Broadly speaking, Wikipedia-based approaches to those tasks can be split between those using the text in the articles (e.g., Gabrilovich and Markovitch, 2007) and those using the links between articles (e.g., Guo et al., 2011). Relatedness systems take two words and return a high number if the two words are similar or closely related3 (e.g. professor - student), and a low number otherwise (e.g. professor - cucumber). Evaluation is performed comparing the returned values to those by humans (Rubenstein and Goodenough, 1965). In NED (Hachey et al., 2012) the input is a men- tion of a named-entity in context and the output is the appropriate instance from Wikipedia, DBpedia or Freebase (cf. Figure 1). Wikification is simi- lar (Mihalcea and Csomai, 2007), but target terms include common nouns and only relevant terms are disambiguated. Note that the disambiguation com- ponent in Wikification and NED can be the same. Our work focuses on relatedness and NED. We favored NED over Wikification because of the larger number of systems and evaluation datasets, but our conclusions are applicable to Wikification, as well 3Relatedness is more general than similarity. For the sake of simplicity, we will talk about relatedness on this paper. as other Wikipedia-derived resources. In this section we will focus on previous work us- ing Wikipedia links for relatedness, NED and Wik- ification. Although relatedness and disambiguation are closely related (relatedness to context terms is an important disambiguation clue for NED), most of the systems are evaluated in either relatedness or NED, with few exceptions, like WikiMiner (Milne and Witten, 2013), KORE (Hoffart et al., 2012) and the one presented in this paper. Milne and Witten (2008a) are the first to use hy- perlinks between articles for relatedness. They com- pare two articles according to the number of incom- ing links that they have in common (i.e. overlap of direct-links) based on Normalized Google Distance (NGD), combined with several heuristics and col- location strength. In later work (Milne and Witten, 2013), they incorporated machine learning. The au- thors also apply their technique to NED (Milne and Witten, 2008b), using their relatedness measures to train a supervised classifier. Unfortunately they do not present results of their link-based method alone, so we decided to reimplement it (cf. Sect. 6). We show that, under the same conditions, using the full- graph is more effective in both tasks. We also run their out-of-the-box system4 on the same datasets as ours (cf. Sect. 7), with results below ours. Apart from hyperlinks between articles, other works on relatedness use the category structure (Strube and Ponzetto, 2006; Ponzetto and Strube, 2007; Ponzetto and Strube, 2011) to run path-based relatedness algorithms which had been successful on WordNet (Pedersen et al., 2004), or use rela- tions in infoboxes (Nastase and Strube, 2013). In all cases, they obtain performance figures well be- low hyperlink-based systems (cf. Sect. 7). We will explore the contribution of such relations (cf. Sect. 3), incorporating them to the hyperlink graph. Attempts to use the whole graph of hyperlinks for relatedness have been reported before. Yeh et al. (2009) obtained very low results on relatedness us- ing an algorithm based on random walks similar to ours. Similar in spirit, Yazdani and Popescu-Belis (2013) built a graph derived from the Freebase Wiki- pedia Extraction dataset, which is derived but richer 4https://sourceforge.net/projects/ wikipedia-miner/ than Wikipedia. Even if they mix hyperlinks with textual similarity, their results are lower than ours. One of the key differences with these systems is that we remove non-reciprocal links (cf. Sect. 3). Regarding link-based methods for NED, there is only one system which relies exclusively on hyper- links. Guo et al. (2011) use direct hyperlinks be- tween the target entity and the mentions in the con- text, counting the number of such links. We show that the use of the full graph produces better results. The rest of NED systems present complex combi- nations. Lemahnn et al. (2010) present a supervised system combining features based on hyperlinks, cat- egories, text similarity and relations from infoboxes. Despite their complex and rich system, we will show that they perform worse than our system. Hachey et al. (2011) explored hyperlinks beyond direct links for NED, building subgraphs for each context us- ing paths of length two departing from the context terms, combined with text-based relatedness. We will show that the full graph is more effective than limiting the distance to two, and report better results than their system. Several authors have included di- rect links using the aforementioned NGD in their combined systems (Ratinov et al., 2011; Hoffart et al., 2011). Unfortunately, they do no report separate results for the NGD component. In very recent work Garc´ıa et al. (2014) compare NGD with several other algorithms using direct links, but do not explore the full graph, or try to characterize links. We will see that their results are well below ours (cf. Sect. 7). Graph-based algorithms for relatedness and dis- ambiguation have been successfully used on other resources, particularly WordNet. Hughes and Ram- age (2007) were the first presenting a random walk algorithm over the WordNet graph. Agirre et al. (2010) improved over their results using a simi- lar random walk algorithm on several variations of WordNet relations, reporting the best results to date among WordNet-based algorithms. The same al- gorithm was used for word sense disambiguation (Agirre et al., 2014), also reporting state-of-the-art results. We use the same open source software in our experiments. As an alternative to random walks, Tsatsaronis et al. (2010) use a path-based system over the WordNet relation graph. In more recent work (Navigli and Ponzetto, 2012b; Pilehvar et al., 2013), the authors present two relatedness algorithms for BabelNet, an enriched version of WordNet including articles from Wikipe- dia, hyperlinks and cross-lingual relations from non- English Wikipedias. In related work, Moro et al. (2014) present a multi-step NED algorithm on Ba- belNet, building semantic graphs for each context. We will show that Wikipedia hyperlinks alone are able to provide similar performance on both tasks. 3 Building Wikipedia Graphs Wikipedia pages can be classified into main articles, category pages, redirects and disambiguation pages. Given a Wikipedia dump (a snapshot from April 4, 2013), we mine links between articles, between arti- cles and category pages, as well as the links between category pages (the category structure). Our graphs include a directed edge from one article to another iff the text of the first article contains a hyperlink to the second article. In addition, we also include hy- perlinks in infoboxes. The graph contains two types of nodes (articles and categories) and three types of directed edges: hyperlinks from article to article (H), infobox links from article to article (I), links from article to cate- gory and links from category to category (C). We constructed several graphs using different combinations of nodes and edges. In addition to the directed versions (D) we also constructed an undi- rected version (U), and a reduced graph which only contains links which are reciprocal (R), that is, we add a pair of edges between a1 and a2 if and only if there exists a hyperlink from a1 to a2 and from a2 to a1. Reciprocal links capture the intuition that both articles are relevant to each other, and tackle is- sues with links to low relevance articles, e.g. links to articles on specific years like 1984. Some authors weight links according to their relevance (Milne and Witten, 2013). Our heuristic to keep only reciprocal links can be seen as a simpler, yet effective, method to avoid low relevance links. Table 1 gives the number of nodes and edges in some selected graphs. The graph with less edges is the one with reciprocal hyperlinks HR, and the graphs with most edges are those with undirected edges, as each edge is modeled as two directed edges5. The number of nodes is similar in all, except Graph CD CU ID IU HD HU HR HRCU HRIU HRCUIU Edges Nodes RG 18,803K 4,873K 51.1 † ‡ 37,598K 4,873K 72.9 † ‡ 6,572K 1,860K 43.1 † ‡ 12,692K 1,860K 52.8 † ‡ 90,674K 4,103K 75.1 † ‡ 165,258K 4,103K 76.6 ‡ 16,338K 2,955K 88.4 53,005K 4,898K 78.2 ‡ 26,394K 3,273K 82.9 ‡ 63,184K 4,900K 75.6 † ‡ TAC09200 49.5 † ‡ 65.5 † ‡ 57.0 † ‡ 65.5 † ‡ 65.0 † ‡ 66.0 † ‡ 68.5 67.5 ‡ 68.0 ‡ 67.5 ‡ Table 1: Statistics for selected graphs and results on de- velopment data for relatedness (RG, Spearman) and NED (TAC09200, accuracy) with default parameters (see text). See Sect. 4.1 for abbreviations. † for stat. significant differences with HR in either RG or TAC09200. ‡ for stat. signif. when comparing on all relatedness or NED datasets. Article GOTHAM CITY GOTHAM (MAGAZINE) . . . NEW YORK CITY GOTHAM RECORDS Freq. 32 15 1 1 Prob. 0.38 0.18 0.01 0.01 Table 2: Partial view of dictionary entry for “gotham”. The probability is calculated as the ratio between the fre- quency and the total count. for the infobox graphs (infoboxes are only available for a few articles), and the reciprocal graph HR, as relatively few nodes have reciprocal edges. 3.1 Building the dictionary In order to link running text to the articles in the graph, we use a dictionary, i.e., a static association between string mentions with all possible articles the mention can refer to. We built our dictionary from the same Wikipedia dump, using article titles, redirections, disambigua- tion pages, and anchor text. Mention strings are lowercased and all text between parentheses is re- moved. If an anchor links to a disambiguation page, the text is associated with all possible articles the disambiguation page points to. Each association be- tween a mention and article is scored with the prior probability, estimated as the number of times that the mention occurs in an anchor divided by the to- 5This was done in order to combine undirected and recipro- cal edges, and could be avoided in other cases. Drink DRINK ALCOHOLIC BEVERAGE DRINKING COFFEE TEA .124 .036 .028 .020 .017 Alcohol ALCOHOL ALCOHOLIC BEVERAGE ETHANOL ALKENE ALCOHOLISM .145 .026 .018 .006 .006 Table 3: Sample of the probability distribution returned by PPR for two words. Top five articles shown. tal number of occurrences of the mention as anchor. Note that our dictionary can disambiguate any men- tion, just returning the highest-scoring article. Table 2 partially shows a sample entry in our dictionary. 4 Random Walks The PageRank random walk algorithm (Brin and Page, 1998) is a method for ranking the vertices in a graph according to their relative structural impor- tance. PageRank can be viewed as the result of a random walk process, where the final rank of node i represents the probability of a random walk over the graph ending on node i, at a sufficiently large time. Personalized PageRank (PPR) is a variation of PageRank (Haveliwala, 2002), where the query of the user defines the importance of each node, biasing the resulting PageRank score to prefer nodes in the vicinity of the query nodes. The query bias is also called the teleport vector. PPR has been successfully used on the WordNet graph for relatedness (Hughes and Ramage, 2007; Agirre et al., 2010) and WSD (Agirre and Soroa, 2009; Agirre et al., 2014). In our experiments we use UKB version 2.16, an open source software for relatedness and disambiguation based on PPR. For the sake of space, we will skip the details, and refer the reader to those papers. PPR has two parameters: the number of iterations, and the damping factor, which controls the relative weight of the teleport vector. 4.1 Random walks on Wikipedia Given a dictionary and graph derived from Wikipe- dia (cf. Sect. 3), PPR expects a set of mentions, i.e., a set of strings which can be linked to Wikipedia ar- ticles via the dictionary. The method first initializes the teleport vector: for each mention in the input, the articles in the respective dictionary entry are set with an initial probability, and the rest of articles are set to zero. We explored two options to set the initial prob- ability of each article: the uniform probability or the prior probability in the dictionary. When an article appears in the dictionary entry for two mentions, the initial probability is summed up. In a second step, we apply PPR for a number of iterations, producing a probability distribution over Wikipedia articles in the form of a PPR vector (PPV). The probability vector can be used for both re- latedness and NED. For relatedness we produce a PPV vector for each of the words to be compared, using the single word as input mention. The relat- edness between the target words is computed as the cosine between the respective PPV vectors. In order to speed up the computation, we can reduce the size of the PPV vectors, setting to zero all values below rank k after ordering the values in decreasing order. Table 3 shows the top 5 articles in the PPV vec- tors of two sample words. The relatedness between pairs Drink and Alcohol would be non-zero, as their respective vectors contain common articles. For NED the input comprises the target entity mention and its context, defined as the set of men- tions occurring within a 101 token window centered in the target. In order to extract mentions to articles in Wikipedia from the context, we match the longest strings in our dictionary as we scan tokens from left to right. We then initialize the teleport probability with all articles referred by the mentions. After com- puting Personalized PageRank, we output the article with highest rank in PPV among the possible articles for the target entity mention. Figure 1 shows an ex- ample of NED. If the prior is being used to initialize weights, we multiply the prior probability with the Pagerank probabilities before computing the final ranks. In the rare cases7 where no known mention is found in the context, we return the node with the highest prior. Note that our NED and relatedness algorithms are related. NED is using using relatedness, as Pagerank probabilities are capturing how related is each can- didate article to the context of the mention. Follow- ing the first-order and second-order co-occurrence abstraction (Islam and Inkpen, 2006; Agirre and Ed- monds, 2007, Ch. 6), we can interpret that we do NED using first-order relatedness, while our relat- 6http://ixa2.si.ehu.es/ukb 7Less than 3% of instances. 1. Graphs in Table 1 (default: Hr) 2. Number of iterations in PageRank 3. Damping factor in PageRank: i ∈ {1, 2, 3, 4, 5, 10, 15 . . . 50} (default: 30) α ∈ {0.75, 0.8, 0.85, 0.90, 0.95, 0.99} (de- fault: 0.85) 4. Initializing with prior or not (P or ¬P) (de- 5. Relatedness: number of values in PPV: fault: P) k ∈ {100, 200, 500, 1000, 2000, 5000, 10000} (default: 5000) Figure 2: Summary of variants and parameters as well as the default values for each of them. Name RG MC 353 TSA KORE TAC09 TAC10 TAC13 AIDA KORE Reference (Rubenstein and Goodenough, 1965) (Miller and Charles, 1991) (Gabrilovich and Markovitch, 2007) (Radinsky et al., 2011) (Hoffart et al., 2012) (McNamee et al., 2010) http://www.nist.gov/tac/ http://www.nist.gov/tac/ (Hoffart et al., 2011) (Hoffart et al., 2012) # 65 30 353 287 420 1675 1020 1183 4401 143 Table 4: Summary of relatedness (top) and NED (bottom) datasets. Rightmost column for number of instances. edness uses second-order relatedness. Figure 2 summarizes all parameters mentioned so far, as well as their default values, which were set following previous work (Agirre et al., 2010; Agirre et al., 2014). 5 Experimental methodology We summarize the datasets used in Table 4. RG, MC and 353 are the most used relatedness datasets to date, with TSA and KORE being more recent datasets where some top-ranking systems have been evaluated. Word relatedness datasets were lemma- tized and lowercased, except for KORE, which is an entity relatedness dataset where the input comprises article titles8. Following common practice rank- correlation (Spearman) was used for evaluation. 8We had to manually adjust the articles in KORE, as the exact title depends on the Wikipedia version. We missed 3 for our 2013 version, which could slightly degrade our results. Regarding NED, the TAC Entity Linking compe- tition is held annually. Due to its popularity it is use- ful to set the state of the art. We selected the datasets in 2009 and 2010, as they have been used to evalu- ate several top ranking systems, as well as the 2013 dataset, which is the most recent. In addition, we also provide results for AIDA, the largest and only dataset providing annotations for all entities in the documents, and KORE, a recent, very small dataset focusing on difficult mentions and short contexts. Evaluation was performed using accuracy, the ratio between correctly disambiguated instances and the total number of instances that have a link to an entity in the knowledge base9. Each dataset uses a different Wikipedia version, but fortunately Wikipedia keeps redirects from older article titles to the new version. As customary in the task, we automatically map the articles returned by our system to the version used in the gold standard. Following standard practice in NED, we do not evaluate mention detection10, that is, the datasets al- ready specify which are the target mentions. Note that TAC provides so called “queries” which can be substrings of the full mention, e.g. “Smith” for a mention like “John Smith”). Given a mention, we devised the following heuristics to improve can- didate generation: (1) remove substring contained in parenthesis from the mention, then check dictio- nary, (2) if not found, remove “the” if first token in the mention, then check dictionary, (3) if not found, remove middle token if mention contains three to- kens, then check dictionary, (4) if not found, search for a matching entity using the Wikipedia API11. The heuristics provide an improvement of around 4 points on development. Later analysis showed that these heuristics seem to be only relevant on the TAC datasets, because of the way the query strings are designed, but not on AIDA or KORE. 5.1 Development and test We wanted to follow a standard experimental design, with a clear development/test split for each task. Un- fortunately there is no standard split in the literature, 9Corresponds to non-NIL accuracy at TAC-KBP (also called KB accuracy) and Micro [email protected] in (Hoffart et al., 2011) 10See (Cornolti et al., 2013) for a framework to evaluate both mention detection and disambiguation. 11http://en.wikipedia.org/w/api.php and the choice is difficult: The development dataset should be representative enough to draw conclusions on different alternatives and parameters, but at the same time the most relevant datasets in the literature should be left for testing, in order to have enough points for comparison. In addition, some recent al- gorithms suposedly setting the state of the art are only tested on newly produced datasets. Note also that relatedness datasets are small, making it diffi- cult to find statistically significant differences. In order to strike a balance between the need for in-depth analysis and fair comparison to previous re- sults, we decided to focus on the two oldest datasets from each task for development and analysis: RG for relatedness and a subset of 200 polysemic instances from TAC09 for NED (TAC09200)12. The rest will be used for test, where the parameters have been set on development. Given the need for significant con- clusions, we re-checked the main conclusions drawn from development data using the aggregation of all test datasets, but only after the comparison to the state of the art had been performed. This way we ensure both a fair comparison with the state of the art and a well-grounded analysis. We performed significance tests using Fisher’s z- transformation for relatedness (Press et al., 2002, equation 14.5.10), and paired bootstrap resampling for NED (Noreen, 1989), accepting differences with p-value < 0.05. Given the small size of the datasets, when necessary, we also report statistical signifi- cance when joining all datasets as just mentioned. 6 Studying the graph and parameters In this section we study the performance of the dif- ferent graphs and parameters on the two develop- ment datasets, RG and TAC09200. The next section reports the results on the test sets for the best param- eters, alongside state-of-the-art system results. As mentioned in Sect. 4.1, PPR has several param- eters and variants (cf. Figure 2). We first checked exhaustively all possible combinations for different graphs, with the rest of parameters set to default values. We then optimized each of the parameters in turn, seeking to answer the following questions: Which links help most? Table 1 shows the 12The dataset in http://ixa2.si.ehu.es/ukb/ README.wiki.txt includes the subset. Graph HR HR HR HR HR Param. RG 88.4 default ¬P 87.0 88.4 α0.85 88.4 88.4 k5000 i30 Param. default ¬P α0.85 i15 – TAC09200 68.5 49.0 † 68.5 68.5 – Table 5: Parameters: Summary of results on development data for relatedness (RG, Spearman correlation) and NED (TAC09200, accuracy) for several parameters using HR graph. Parameters are set to default values (see text) ex- cept for the one noted explicitly. † for statistical signifi- cant differences with respect to default. results for selected graphs. The first seven rows present the results for each edge source in isola- tion, both using directed and undirected edges. Cat- egories and infoboxes suffer from producing smaller graphs, with the hyperlinks yielding the best results. The undirected versions improve over directed links in all cases, with the use of reciprocal edges for hy- perlinks obtaining the best results overall (the graphs with reciprocal edges for categories and infoboxes were too small and we omit them). The trend is the same in both relatedness and NED, highlighting the robustness of these results. Regarding combined graphs, we report the most significant combinations. The reciprocal graph of hyperlinks outperforms all combinations (including the combinations which were omitted), showing that categories and infoboxes do not help or even degrade slightly the results. The differences are statistically significant (either on the individual datasets or in the aggregation on all datasets) in all cases, confirming that HR is significantly better. The degradation or lack of improvement when us- ing infoboxes is surprising. We hypothesized that it could be caused by non-reciprocal links in HRIU. In fact, removing non-reciprocal links from HRIU improved results slightly on NED, matching those of HR. This lack of improvement with infoboxes, even when removing non-reciprocal links, can be explained by the fact that only 5% of reciprocal links in IU are not in HR. It seems that this additional 5% is not helping in this particular dataset. Re- garding categories, the category structure is mostly a tree, which is a structure where random walks do not seem to be effective, as already observed in (Agirre et al., 2014) for WordNet. Graph Method HR HR HR HR NGD PPR (1 iter.) PPR (2 iter.) PPR default RG 81.8 ‡ 43.4 † ‡ 78.3 ‡ 88.4 TAC09200 57.5† 60.5† ‡ 66.0† ‡ 68.5 Table 6: Result when using single links, compared to the use of the full graph on development data. We reimple- mented NGD. † for stat. signif. difference with PPR. ‡ for stat. signif. using all datasets. Graph Method HR HR HR PPR default PPR default PPR default Year 2010 2011 2013 RG 86.3 85.6 88.4 TAC09200 68.5 70.5 68.5 Table 7: PPR using different Wikipedia versions Is initialization of random walks important? The second row in Table 5 reports the result when using uniform distributions when initializing the random walks (instead of prior probabilities). The results degrade in both datasets, the difference be- ing significant only for NED. This was later con- firmed in the rest of relatedness and NED datasets: using prior probabilities for initialization improves results in all cases, but it is only significant in NED datasets. These results show that relatedness is less sensitive to changes in the distribution of meanings, that is, using the more informative prior distributions of meaning only improves results slightly. NED, on the contrary, is more sensitive, as the distribution of senses affects dramatically the performance. Is the value of α and i important? The best α on both datasets was obtained with default values (cf. Table 5), in agreement with related work using WordNet (Agirre et al., 2010). The lowest number of iterations where convergence was obtained were 30 and 15, respectively, although as few as 5 iterations yielded very similar performance (87.1 on related- ness, 68.0 on NED). Is the size of the vector, k, important for relat- edness? The best performance was attained for the default k, with minor variations for k > 1000. Is the full graph helping? When the PPR algo- rithm does a single iteration, we can interpret that it is ranking all entities using direct links. When do- ing two iterations, we can loosely say that it is using links at distance two, and so on. Table 6 shows that PPR is able to take profit from the full graph well be- yond 2 iterations, specially in relatedness. These re- sults were confirmed in the full set of datasets, with statistically significant differences in all cases. In addition, we reimplemented the relatedness and NED algorithms based on NGD over direct links (Milne and Witten, 2008a; Milne and Witten, 2008b), allowing to compare them to PPR on the same experimental conditions. We first developed the relatedness algorithm13. Table 6 reports the best variant, which outperforms the 0.64 on RG reported in their paper. We followed a similar methodol- ogy for NED14. Table 6 shows the results for NGD, which performs worse than PPR. This trend was con- firmed on the full set of datasets for relatedness and NED with statistical significance in all cases except KORE, which is the smallest NED dataset. Figure 1 illustrates why the use of longer paths is benefi- cial. In fact, NGD returns 0.14 for B&I Lions and 0.13 for Highveld Lions, but PPR correctly re- turns 0.05 and 0.75, respectively. How important is the Wikipedia version? Table 7 shows that the versions we tested are not affecting the results dramatically, and that using the last ver- sion does not yield better results in NED. Perhaps the larger size and number of hyperlinks of newer versions would only affect new articles and rare arti- cles, but not the ones present in TAC09200. We kept using 2013 for test. What is the efficiency of the algorithm? The initialization takes around 5 minutes15, where most of the time is spent loading the dictionary into mem- ory, 4m50s. Using a database instead, initializa- tion takes 10s. Memory requirements for HR were 13In order to replicate the NGD relatedness algorithm, we checked the open source code available, exploring the use of inlinks and outlinks and the use of maximum pairwise article relatedness. We also realized that the use of priors (“common- ness” according to the terminology in the paper) was hurting, so we dropped it. We checked both reciprocal and unidirectional versions of the hyperlink graph, with better results for the recip- rocal graph. 14We checked both reciprocal and undirected graphs with similar results, combined with prior (similar results), weighted terms in the context (with improvement) and checked the use of ambiguous mentions in the context (marginal improvement). Reported results correspond to reciprocal, combination with prior, weighting terms and using only monosemous mentions. 15Time measured in a single server with Xeon E7-4830 8 core processors, 2130 MHz, 64 GB RAM. Source Wiki11 Wiki13 Wiki13 Wiki09 Wiki13 WNet WNet WNet+Wiki12 (cl) WNet+Wiki13 Wiki13 WNet+Wiki13 (Ponzetto and Strube, 2011) (Nastase and Strube, 2013) (Milne and Witten, 2013) (Yeh et al., 2009) PPR default HR (Agirre et al., 2010) (Tsatsaronis et al., 2010) (Navigli and Ponzetto, 2012b) (Pilehvar et al., 2013) PPR default HR PPR default HR (Gabrilovich and Markovitch, 2007) Wiki07 (Hoffart et al., 2012) Wiki12 (Yazdani and Popescu-Belis, 2013) Freebase (Radinsky et al., 2011) (Baroni et al., 2014) (Agirre et al., 2009) (Milne and Witten, 2013) PPR default HR Time Corpus WNet+Corpus Wiki13 WNet+Wiki13 c ci la g g g g g g g t t gt C C g 353 TSA MC KORE 35.8r 77.2r 65.9r 1 64.1 1 81.0 1 66.2 45.4r 3 85.2r 1 90.0 1 64.1 4 81.0 1 66.2 2 62.9 2 87.6 1 66.2 59.0 73.0 0 69.8* 1 63.0 52.8r 81.3r 1 66.5r 2 62.9 2 87.6 2 66.2 RG 75.0* 67.0 69.5r 59.7r 48.5 0 88.4* 1 72.8 1 86.2r 68.5 61.0 86.1 65.0 g+CL 86.8* 0 88.4* 2 72.8 0 91.8* 1 78.5 75.0 82.0 84.0* Cg+SUP 0 96.0x 83.5r la+SUP 70.0* 1 80.0 71.0 78.0x 74.0x 0 91.8* 2 78.5 Table 8: Spearman results for relatedness systems. The source column includes codes for information used (t for article text, l for direct hyperlinks, g for hyperlink graph, c for categories, i for infoboxes, a for anchor text) and other information sources (CL for crosslingual links, C for corpora, SUP for supervised Machine Learning). The results include the following codes: * for best reported result among several variants, x for cross-validation result, r for third- party system ran by us. We also include the rank of our PPR system in each group or rows, including the systems above it (excluding * and x systems, which get rank 0 if they are top rank). 4.7 Gb, down to 1.1 Gb when using the database. The main bottleneck of our system is the computa- tion of Personalized PageRank, each iteration taking around 0.60 seconds. We are currently checking fast approximations for Pagerank, and plan to improve efficiency. 7 Comparison to related work In the previous section we presented several re- sults on the same experimental conditions. We now use the graph and parametrization which yield the best results on development (default parameters with HR). Comparison to the state of the art is compli- cated by many systems reporting results on differ- ent datasets, which causes the tables in this section to be rather sparse. The comparison for relatedness is straightforward, but, in NED, it is not possible to factor out the impact of the candidate generation step. Given the fact that our candidate generation procedure is not particularly sophisticated, we don’t think this is a decisive factor in favour of our results. Table 8 and 9 report the results of the best sys- tems on both tasks. Given that several systems were developed on test data, we also report our results on RG and TAC2009, marking all such results (see cap- tion of tables for details). We split the results in both tables in three sets: top rows for systems us- ing link and graph information alone, middle rows for link- and graph-based systems using WordNet and/or Wikipedia, and bottom rows for more com- plex systems. We report the results of our system re- peatedly in each set of rows, for easier comparison. Our main focus is on the top rows, which show the superiority of our results with respect to other sys- tems using Wikipedia links and graphs. The middle and bottom rows show the relation to the state of the art. For easier exposition, we will examine the results by row section simultaneously on relatedness and NED. The top rows in Table 8 report four related- ness systems which have already been presented in Sect. 2, showing that our system is best in all five datasets. Note that the (Milne and Witten, 2013) row was obtained running their publicly available system System Source TAC2009 TAC2010 TAC2013 AIDA KORE50 Wiki13 MFS baseline (Guo et al., 2011) Wiki10 (Milne and Witten, 2013) Wiki13 (Garc´ıa et al., 2014) Wiki12 PPR default HR Wiki13 WNet+Wiki13 (Moro et al., 2014) PPR default HR Wiki13 (Bunescu and Pasca, 2006) Wiki11 (Cucerzan, 2007) Wiki11 Wiki11 (Hachey et al., 2011) Wiki12 (Hoffart et al., 2012) Wiki11 (Hoffart et al., 2011) (Milne and Witten, 2013) Wiki13 Best TAC KBP system PPR default HR — Wiki13 l l la l g 68.3 1 74.0 57.4r 0 78.8* 73.7 74.1 58.5r 76.6 1 83.6 1 81.7 72.7 69.0 36.4 37.1r 56.0r 35.7r g+CL g tc tc tcg t 0 78.8* 0 83.8ra* 0 83.5ra* 1 83.6 1 81.7 68.4ra 78.4ra 79.8* tli+SUP la+SUP 57.5r — 1 76.5 0 78.8* g 63.4r 80.6 1 83.6 40.0r 77.7 1 81.7 1 80.0 1 82.1 2 80.0 1 60.8 1 71.5 2 60.8 51.0ro 0 81.8* 0 64.6* 0 81.8* 55.6r 37.1r 2 80.0 2 60.8 Table 9: Accuracy of NED systems, using the same codes as in in Table 8. Some early systems have been re- implemented and tested by others: ra for (Hachey et al., 2012), ro (Hoffart et al., 2011). We report rank of our PPR system in each group or rows, including systems above (excluding * systems, which get rank 0 if they are top rank). with the supervised Machine Learning component turned off (see below for the results using SUP). The top rows of table 9 report the most frequent baseline (as produced by our dictionary) and three link-based systems (cf. Sect. 2), showing that our method is best in all five datasets. These results show that the use of the full graph as devised in this paper is a winning strategy. The relatedness results in the middle rows of Ta- ble 8 include several systems using WordNet and/or Wikipedia (cf. Sect. 2), including the system in (Agirre et al., 2010), which we run out-of-the-box with default values. To date, link-based systems using WordNet had reported stronger results than their counterparts on Wikipedia, but the table shows that our Wikipedia-based results are the strongest on all relatedness datasets but one (MC, the smallest dataset, with only 30 pairs). In addition, the table shows our results when combining random walks on Wikipedia and WordNet16, which yields improve- ments in most datasets. In the counterpart for NED in Table 9, Moro et al. (2014) outperform our sys- tem, specially in the smaller KORE (143 instances), but note that they use a richer graph which com- bines WordNet, the English Wikipedia and hyper- links from other language Wikipedias. Finally, the bottom rows in both tables report the 16We multiply the scores of PPR on Wikipedia and WordNet. best systems to date. For lack of space, we cannot review systems not using Wikipedia links. Regard- ing relatedness, we can see that our combination of WordNet and Wikipedia would rank second in all datasets, with only one single system (based on cor- pora) beating our system in more than one dataset (Radinsky et al., 2011). Regarding NED, our system ranks first in the TAC datasets, including the best systems that participated in the TAC competitions (Varma et al., 2009; Lehmann et al., 2010; Cucerzan and Sil, 2013), and second to (Moro et al., 2014) on AIDA and KORE. 8 Conclusions and Future Work This work departs from previous work based on Wi- kipedia and derived resources, as it focuses on a single knowledge source (links in Wikipedia) with a clear research objective: given a well-established random walk algorithm we explored which sources of links and filtering methods are useful, contrast- ing the use of the full graph with respect to us- ing just direct links. We follow a clear develop- ment/test/analysis methodology, evaluating on a ex- tensive range of both relatedness and NED datasets. All software and data are publicly available, with in- structions to obtain out-of-the-box replicability17. 17http://ixa2.si.ehu.es/ukb/README.wiki. txt We show for the first time that random walks over the full graph of links improve over direct links. We studied several variations of sources of links, show- ing that non-reciprocal links hurt and that the con- tribution of the category structure and relations in infoboxes is residual. This paper sets a new state-of- the-art for systems based on Wikipedia links on both word relatedness and named-entity disambiguation datasets. The results are close to those of the best combined systems, which specialize on either relat- edness or disambiguation, use several information sources and/or supervised machine learning tech- niques. This work shows that a careful analysis of varieties of graphs using a well-known random walk algorithm pays off more than most ad-hoc al- gorithms proposed up to date. For the future, we would like to explore ways to filter out informative hyperlinks, perhaps weighting edges according to their relevance, and would also like to speed up the random-walk computations. This article showed the potential of the graph of hyperlinks. We would like to explore combinations with other sources of information and algorithms, perhaps using supervised machine learning. For re- latedness, we already showed improvement when combining with random walks over WordNet, but would like to explore tighter integration (Pilehvar et al., 2013). For NED, local methods (Ratinov et al., 2011; Han and Sun, 2011), global optimization strategies based on keyphrases in context like KORE (Hoffart et al., 2012) and doing NED jointly with word sense disambiguation (Moro et al., 2014), all are complementary to our method and thus promis- ing directions. Acknowledgements This work was partially funded by MINECO (CHIST-ERA READERS project – PCIN-2013- 002- C02-01) and the European Commission (QTLEAP – FP7-ICT-2013.4.1-610516). Ander Barrena is supported by a PhD grant from the Uni- versity of the Basque Country. References Eneko Agirre and Philip Edmonds. 2007. Word Sense Disambiguation: Algorithms and Applications. Springer Publishing Company, Incorporated, 1st edi- tion. E. Agirre and A. Soroa. 2009. Personalizing PageRank In Proceedings for Word Sense Disambiguation. of 14th Conference of the European Chapter of the Association for Computational Linguistics, Athens, Greece. E. Agirre, A. Soroa, E. Alfonseca, K. Hall, J. Kraval- ova, and M. Pasca. 2009. A Study on Similarity and Relatedness Using Distributional and WordNet-based Approaches. In Proceedings of annual meeting of the North American Chapter of the Association of Compu- tational Linguistics (NAAC), Boulder, USA, June. E. Agirre, M. Cuadros, G. Rigau, and A. Soroa. 2010. In Pro- Exploring Knowledge Bases for Similarity. ceedings of the Seventh conference on International Language Resources and Evaluation (LREC’10), Val- letta, Malta, May. European Language Resources As- sociation (ELRA). Eneko Agirre, Oier Lopez de Lacalle, and Aitor Soroa. 2014. Random walks for knowledge-based word Computational Linguistics, sense disambiguation. 40(1):57–88. Marco Baroni, Georgiana Dinu, and Germn Kruszewski. 2014. Don’t count, predict! A systematic compari- son of context-counting vs. context-predicting seman- tic vectors. In Proceedings of ACL. Christian Bizer, Jens Lehmann, Georgi Kobilarov, Soren Auer, Christian Becker, Richard Cyganiak, and Se- bastian Hellmann. 2009. Dbpedia - a crystallization point for the web of data. Web Semant., 7(3):154–165, September. Kurt Bollacker, Colin Evans, Praveen Paritosh, Tim Sturge, and Jamie Taylor. 2008. Freebase: A col- laboratively created graph database for structuring hu- In Proceedings of the 2008 ACM man knowledge. SIGMOD International Conference on Management of Data, SIGMOD ’08, pages 1247–1250, New York, NY, USA. ACM. S. Brin and L. Page. 1998. The Anatomy of a Large- In Proceed- scale Hypertextual Web Search Engine. ings of the seventh international conference on World Wide Web 7, WWW7, pages 107–117, Amsterdam, The Netherlands, The Netherlands. Elsevier Science Publishers B. V. Razvan C. Bunescu and Marius Pasca. 2006. Using en- cyclopedic knowledge for named entity disambigua- In EACL. The Association for Computer Lin- tion. guistics. Marco Cornolti, Paolo Ferragina, and Massimiliano Cia- ramita. 2013. A framework for benchmarking entity- In Proceedings of the 22Nd In- annotation systems. ternational Conference on World Wide Web, WWW ’13, page 249260, Republic and Canton of Geneva, Switzerland. International World Wide Web Confer- ences Steering Committee. Silviu Cucerzan and Avirup Sil. 2013. The msr systems for entity linking and temporal slot filling at tac 2013. In Proceedings of the Sixth Text Analysis Conference (TAC 2013), page 10. National Institute of Standards and Technology (NIST). S. Cucerzan. 2007. Large-Scale Named Entity Disam- In Proceedings biguation Based on Wikipedia Data. of EMNLP-CoNLL, volume June, pages 708–716. Antske Fokkens, Marieke van Erp, Marten Postma, Ted Pedersen, Piek Vossen, and Nuno Freire. 2013. Off- spring from reproduction problems: What replication failure teaches us. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguis- tics (Volume 1: Long Papers), pages 1691–1701, Sofia, Bulgaria, August. Association for Computational Lin- guistics. E. Gabrilovich and S. Markovitch. 2007. Computing Semantic Relatedness using Wikipedia-based Explicit Semantic Analysis. Proc of IJCAI, pages 6–12. Norberto Fern´andez Garc´ıa, Jes´us Arias-Fisteus, and Luis S´anchez Fern´andez. 2014. Comparative evalua- tion of link-based approaches for candidate ranking in link-to-wikipedia systems. J. Artif. Intell. Res. (JAIR), 49:733–773. Yuhang Guo, Wanxiang Che, Ting Liu, and Sheng Li. 2011. A graph-based method for entity linking. In Proceedings of 5th International Joint Conference on Natural Language Processing, page 10101018, Chi- ang Mai, Thailand, November. Asian Federation of Natural Language Processing. B. Hachey, W. Radford, and J.R. Curran. 2011. Graph- based Named Entity Linking with Wikipedia. In Proceedings of the 12th international conference on Web information system engineering, WISE’11, pages 213–226, Berlin, Heidelberg. Springer-Verlag. B. Hachey, W. Radford, J. Nothman, M. Honnibal, and J.R. Curran. 2012. Evaluating Entity Linking with Wikipedia. Artif. Intell., 194:130–150, January. X. Han and L. Sun. 2011. A Generative Entity-mention Model for Linking Entities with Knowledge Base. In Proceedings of the 49th Annual Meeting of the Asso- ciation for Computational Linguistics: Human Lan- guage Technologies, volume 1, pages 945–954. T.H. Haveliwala. 2002. Topic-sensitive PageRank. In Proceedings of the 11th international conference on World Wide Web (WWW’02), pages 517–526, New York, NY, USA. J. Hoffart, M.A. Yosef, I. Bordino, H. Furstenau, M. Pinkal, M. Spaniol, B. Taneva, S. Thater, and G. Weikum. 2011. Robust Disambiguation of Named In Conference on Empirical Meth- Entities in Text. ods in Natural Language Processing, Edinburgh, Scot- land, United Kingdom 2011, pages 782–792. Johannes Hoffart, Stephan Seufert, Dat Ba Nguyen, Mar- tin Theobald, and Gerhard Weikum. 2012. Kore: Keyphrase overlap relatedness for entity disambigua- In Proceedings of the 21st ACM international tion. conference on Information and knowledge manage- ment, page 545554. Eduard Hovy, Roberto Navigli, and Simone Paolo Ponzetto. 2013. Collaboratively built semi-structured content and artificial intelligence: The story so far. Ar- tif. Intell., 194:2–27, January. T. Hughes and D. Ramage. 2007. Lexical Semantic Re- latedness with Random Graph Walks. In Proceedings of EMNLP-CoNLL-2007, pages 581–589. 2006. A. Islam and D. Inkpen. Second order co- occurrence pmi for determining the semantic simi- In Proceedings of the International larity of words. Conference on Language Resources and Evaluation (LREC 2006), pages 1033–1038. J. Lehmann, S. Monahan, L. Nezda, A. Jung, and Y. Shi. 2010. LCC Approaches to Knowledge Base Popula- tion at TAC 2010. In Proceedings of the Text Analysis Conference. P. McNamee, H.T. Dang, H. Simpson, P. Schone, and S.M. Strassel. 2010. An Evaluation of Technologies for Knowledge Base Population. In Proceedings of the 7th International Conference on Language Resources and Evaluation, page 369372. Rada Mihalcea and Andras Csomai. 2007. Wikify!: link- In Pro- ing documents to encyclopedic knowledge. ceedings of the sixteenth ACM conference on Con- ference on information and knowledge management, pages 233–242. ACM. George A. Miller and Walter G. Charles. 1991. Contex- tual correlates of semantic similarity. Language and Cognitive Processes, 6(1):1–28. D. Milne and I.H. Witten. 2008a. An Effective, Low- Cost Measure of Semantic Relatedness Obtained from In Proceedings of the first AAAI Wikipedia Links. Workshop on Wikipedia and Artificial Intelligence. D. Milne and I.H. Witten. 2008b. Learning to Link with Wikipedia. In Proceeding of the 17th ACM conference on Information and knowledge mining - CIKM ’08, page 509, New York, New York, USA. ACM Press. David Milne and Ian H. Witten. 2013. An open-source toolkit for mining wikipedia. Artificial Intelligence, 194:222–239, January. Andrea Moro, Alessandro Raganato, and Roberto Nav- igli. 2014. Entity linking meets word sense dis- ambiguation: a unied approach. Transactions of the Association of Computational Linguistics, 2:231–244, May. Michael Strube and Simone Paolo Ponzetto. 2006. Wikirelate! computing semantic relatedness using wi- kipedia. In Proceedings of the National Conference on Artificial Intelligence, volume 21, pages 1419–1424. Menlo Park, CA; Cambridge, MA; London; AAAI Press. G. Tsatsaronis, I. Varlamis, and M. Vazirgiannis. 2010. Text Relatedness Based on a Word Thesaurus. J. Artif. Intell. Res. (JAIR), 37:1–39. V. Varma, V. Bharat, S. Kovelamudi, P. Bysani, S. GSK, K. Kumar N, K. Reddy, K. Kumar, and N. Maganti. 2009. IIIT Hyderabad at TAC 2009. Technical report. Majid Yazdani and Andrei Popescu-Belis. 2013. Com- puting text semantic relatedness using the contents and links of a hypertext encyclopedia. Artificial Intelli- gence, 194:176–202, January. E. Yeh, D. Ramage, C.D. Manning, E. Agirre, and A. Soroa. 2009. WikiWalk: Random walks on Wi- kipedia for Semantic Relatedness. In Proceedings of the 2009 Workshop on Graph-based Methods for Nat- ural Language Processing (TextGraphs-4), pages 41– 49, Suntec, Singapore, August. Association for Com- putational Linguistics. V. Nastase and M. Strube. 2013. Transforming Wikipe- dia into a large Scale Multilingual Concept Network. Artif. Intell., 194:62–85. R. Navigli and S.P. Ponzetto. 2012a. BabelNet: The Automatic Construction, Evaluation and Application of a Wide-Coverage Multilingual Semantic Network. Artificial Intelligence, 193:217–250. R. Navigli and S.P. Ponzetto. 2012b. BabelRelate! A Joint Multilingual Approach to Computing Semantic Relatedness. In Jorg Hoffmann and Bart Selman, edi- tors, AAAI. AAAI Press. E. W. Noreen. 1989. Computer-Intensive Methods for Testing Hypotheses. John Wiley & Sons. Ted Pedersen, Siddharth Patwardhan, and Jason Miche- 2004. Wordnet::similarity: Measuring the lizzi. In Demonstration Papers relatedness of concepts. at HLT-NAACL 2004, HLT-NAACL–Demonstrations ’04, pages 38–41, Stroudsburg, PA, USA. Association for Computational Linguistics. Mohammad Taher Pilehvar, David Jurgens, and Roberto Navigli. 2013. Align, Disambiguate and Walk: a Unified Approach for Measuring Semantic Similarity. In Proceedings of the 51st Annual Meeting of the As- sociation for Computational Linguistics, pages 1341– 1351, Sofia, Bulgaria. S.P. Ponzetto and M. Strube. 2007. Knowledge derived from Wikipedia for computing semantic relatedness. Journal of Artificial Intelligence Research, 30:181– 212. S.P. Ponzetto and M. Strube. 2011. Taxonomy Induction based on a Collaboratively built Knowledge Reposi- tory. Artificial Intelligence, 175:1737–1756. W.H. Press, S.A. Teukolsky, W.T. Vetterling, and B.P. Flannery. 2002. Numerical Recipes: The Art of Sci- entific Computing V 2.10 With Linux Or Single-Screen License. Cambridge University Press. Kira Radinsky, Eugene Agichtein, Evgeniy Gabrilovich, and Shaul Markovitch. 2011. A word at a time: com- puting word relatedness using temporal semantic anal- ysis. In Proceedings of the 20th international confer- ence on World wide web, WWW ’11, pages 337–346, New York, NY, USA. ACM. L.A. Ratinov, D. Roth, D. Downey, and M. Anderson. 2011. Local and Global Algorithms for Disambigua- In The 49th Annual Meeting of tion to Wikipedia. the Association for Computational Linguistics: Hu- man Language Technologies, Proceedings of the Con- ference, 19-24 June, 2011, Portland, Oregon, USA, pages 1375–1384. The Association for Computer Lin- guistics. H. Rubenstein and J.B. Goodenough. 1965. Contex- tual Correlates of Synonymy. Communications of the ACM, 8(10):627–633.
1911.11522
1
1911
2019-11-26T13:31:08
A Time Series Analysis of Emotional Loading in Central Bank Statements
[ "cs.CL" ]
We examine the affective content of central bank press statements using emotion analysis. Our focus is on two major international players, the European Central Bank (ECB) and the US Federal Reserve Bank (Fed), covering a time span from 1998 through 2019. We reveal characteristic patterns in the emotional dimensions of valence, arousal, and dominance and find---despite the commonly established attitude that emotional wording in central bank communication should be avoided---a correlation between the state of the economy and particularly the dominance dimension in the press releases under scrutiny and, overall, an impact of the president in office.
cs.CL
cs
A Time Series Analysis of Emotional Loading in Central Bank Statements Sven Buechel♣ Simon Junker♦ Thore Schlaak♦ Claus Michelsen♦ Udo Hahn♣ ♣ Jena University Language & Information Engineering (JULIE) Lab Friedrich-Schiller-Universität Jena Fürstengraben 27, D-07743 Jena, Germany https://julielab.de/ ♦ German Institute for Economic Research (DIW) Mohrenstrasse 58, D-10117 Berlin, Germany https://www.diw.de 9 1 0 2 v o N 6 2 ] L C . s c [ 1 v 2 2 5 1 1 . 1 1 9 1 : v i X r a Abstract We examine the affective content of central bank press statements using emotion analysis. Our focus is on two major international play- ers, the European Central Bank (ECB) and the US Federal Reserve Bank (Fed), covering a time span from 1998 through 2019. We reveal characteristic patterns in the emotional dimen- sions of valence, arousal, and dominance and find -- despite the commonly established atti- tude that emotional wording in central bank communication should be avoided -- a correla- tion between the state of the economy and par- ticularly the dominance dimension in the press releases under scrutiny and, overall, an impact of the president in office. Introduction 1 Central Bank (henceforth, CB) communication has become increasingly important in the past 20 years for the world economy (Blinder et al., 2008). Until the mid-1990s, there was consensus that cen- tral bankers should remain more or less silent and, if urged to make official statements, should try to hide their personal believes and assessments. This code of conduct changed fundamentally in re- cent years. Especially in times of unconventional monetary policy, central bankers are now trying to communicate proactively to economic agents, to give forward guidance and, thereby, try to increase the effectiveness of monetary policy (Lucca and Trebbi, 2009). This has led to a fast growing eco- nomic literature about the content, type and timing of CB communications and the observable effects on the economy (e.g. Ehrmann and Fratzscher, 2007b,a). CB communication and the reactions it causes are, in essence, verbally encoded -- both in terms of official statements being issued as well as their assessment by other economic players and infor- mation gate-keepers (e.g., journalists, lobbyists). Hence, more recent empirical work tries to in- corporate NLP methods into economic analyses, e.g., using topic modeling (e.g. Kawamura et al., 2019) or information theory-based scores (Lucca and Trebbi, 2009). However, these analyses are based on the assumption that statements by CBs are free from emotions and contain factual infor- mation only. But it is quite unlikely that even experienced communicators can fully hide their emotions in such a way that they cannot be traced by analytic means. Hence, NLP methods might help reveal latent emotional loadings in CB communiqués. Yet, if emotions can be identified, what is their added value for the interpretation of CB communi- cation? In this paper, we intend to gather prelim- inary evidence that once emotional traces can be unlocked from CB communication, this additional information might help to better understand purely quantitative time series data signalling economic development congruent with emotional moves in CB press releases. Regarding NLP, most previous work on emo- tion focused purely on polarity, a rather simpli- fied representation of the richness of human af- fective states in terms of positive -- negative distinc- tions. For example, Nopp and Hanbury (2015) deal with sentiment analysis for exploring atti- tudes and opinions about risk in textual disclosures issued by banks and derive sentiment scores that quantify uncertainty, negativity, and positivity in the analyzed documents (a collection of more than 500 CEO letters and outlook sections extracted from bank annual reports). The analysis of aggre- gated figures revealed strong and significant corre- lations between uncertainty or negativity in textual disclosures and the quantitative risk indicator's fu- ture evolution. In contrast, a growing number of researchers start focusing on more complex and informative representations of affective states, often follow- ing distinct psychological research traditions (Yu et al., 2016; Wang et al., 2016; Mohammad, 2018; Buechel and Hahn, 2018b). Studies applying NLP methods to various other fields seem to benefit strongly from such addi- tional information. For example, Kim et al. (2017) examine the relationship between literary genres and emotional plot development finding that, in contrast to other, more predictive emotion cate- gories, Joy as a common emotional category is only moderately helpful for genre classification. More closely related to us, Bollen et al. (2011) predict stock market prices based on Twitter data. They find evidence that more complex emotion measurements allow for more accurate predic- tions than polarity alone. The present study pro- vides further evidence for this general observa- tion focusing on the well-established emotional di- mensions of Valence, Arousal, Dominance (VAD) (Bradley and Lang, 1994) in CB statements. To the best of our knowledge, VAD measure- ments have neither been applied to analyzing ver- bal communication in the macro-economic field, in general, nor to CB communication, in partic- ular. We show in this paper -- based on the anal- ysis of the press statements of the U.S. Federal Reserve (Fed) and the European Central Bank (ECB) -- that CB communication is anything but free from emotions. We show that particularly the dimension of Dominance is of high relevance and heavily depends on the state of the economy. Furthermore, communication also along the Va- lence and Arousal dimensions is largely affected by the individual CB presidents in office. Over- all, this provides preliminary evidence that the presence of emotional loading in monetary pol- icy communication, which is of high importance to central bankers, correlates with quantitative macro-economic indicators. Our findings provide promising avenues for further research, as the real effects of emotions on CB communication have largely been neglected in economic research. Compared with the March 2019 ECB staff macroeco- nomic projections, the outlook for real GDP growth has been revised up by 0.1 percentage points for 2019 and has been revised down by 0.2 percentage points for 2020 and by 0.1 percentage points for 2021. The risks surrounding the euro area growth outlook remain tilted to the downside, on account of the prolonged presence of uncertainties, related to geopolitical fac- tors, the rising threat of protectionism and vulnerabili- ties in emerging markets. Figure 1: Excerpt of ECB statement from June 6, 2019. 2 Data We Web-scraped the policy statements issued by the ECB and the Fed from their Web pages, start- ing with the first communiqué by the ECB when it formally replaced the European Monetary In- stitute in June 1998. The most recent documents for both ECB and Fed have been issued in June 2019. These statements contain an assessment of the economic situation by the CB, its policy de- cisions and the main arguments underlying them. Altogether we assembled 230 documents from the ECB and 181 from the Fed that contain on aver- age 1583 and 417 tokens, respectively. We illus- trate the particular style of these documents with an excerpt in Figure 1. 3 Methods Measuring the emotional content of natural lan- guage utterances has become a particularly rich area of research. The choice of an adequate emo- tion representation format, i.e., the mathematical Figure 2: Affective space spanned by the Valence- Arousal-Dominance (VAD) model, together with the position of six basic emotions. Adapted from Buechel and Hahn (2016). −1.0−0.5 0.0 0.5 1.0−1.0−0.5 0.0 0.5 1.0−1.0−0.5 0.0 0.5 1.0●●●●●●AngerSurpriseDisgustFearSadnessJoyValenceDominance Figure 3: Scatterplot array of bivariate emotion distribution in ECB statements (blue circles) vs. Fed statements (orange triangles) with respect to Valence and Arousal (left), Valence and Dominance (center), and Arousal and Dominance (right). VAD scores are centered and scaled. Figure 4: Dominance series for ECB (blue line) and Fed (green). Vertical dotted lines indicate beginning of ECB presidency (Duisenberg: 1998, Trichet: 2003, Draghi: 2011). Red vertical (solid) lines indicate break dates. Shaded areas highlight Euro area recession periods. domain of the label space and its interpretation in terms of psychological theory, has become a crucial aspect of computational emotion analysis (in contrast to work focusing only on polarity) (Buechel and Hahn, 2017). The majority of prior work follows the so-called discrete approach to emotion representation where a small set of universal basic emotions (Ekman, 1992), such as Joy, Anger, and Sadness, is stipu- lated. Equally popular in psychology though is the dimensional approach which represents emotions as real-valued vectors, having components such as Valence (pleasure vs. displeasure), Arousal (calm- ness vs. excitement) and Dominance (being con- trolled by vs. having control over a social situa- tion; Bradley and Lang 1994). Figure 2 provides an illustration of these dimensions relative to com- mon emotional categories. In this work, we em- ploy the VAD format because of its greater flexi- bility, following our previous work (Buechel et al., 2016; Händschke et al., 2018). Given the relatively high average token number per document in our corpus, we adopted a compa- rably simple lexicon-based approach which mod- els document emotion based on word frequency combined with empirical measurements of lexical- ized word emotions.1 Such emotion lexicons have a long tradition in psychology (Stone et al., 1966) and are nowadays available for various emotion formats and many different language (Buechel and Hahn, 2018a). Roughly speaking, their creation follows a questionnaire study-like design. For En- glish VAD scores, the lexicon by Warriner et al. (2013) is a common choice due its large coverage (14k lexical units) which we adopt as well. For the computation of document-level VAD scores, we rely on the open-source tool JEMAS Buechel and Hahn (2016)).2 It estimates the emo- tion value of a document d, ¯e(d), as weighted av- erage of the empirical emotion values of the words in d, e(w): (cid:80) (cid:80) w∈d λ(w, d) × e(w) w∈d λ(w, d) ¯e(d) := (1) where e(w) is defined as the vector representing the neutral emotion, if w is not covered by the lex- icon, and λ denotes some term weighting function. Here, we use absolute term frequency. 1Although less reliable for individual sentences than neu- ral methods, lexicon-based methods still perform well on longer documents since the larger amount of word material improves predictions based on word frequency statistics (Sap et al., 2014). 2https://github.com/JULIELab/JEmAS For our subsequent time series study, we pro- cess the CB corpus (see Section 2) using JEMAS. The result is one three-dimensional VAD value per document. As both an exploratory analysis and sanity check, we center and scale the resulting data and visualize them as scatterplot array (see Fig- ure 3). ECB statements are higher in Valence and Dominance but lower in Arousal than Fed state- ments (in all cases p < .001; Mann -- Whitney U test). As often observed (Warriner et al., 2013), Valence and Dominance have a strong linear cor- relation (r = .758). Since neither the ECB nor the Fed hold monthly meetings, the corresponding time series of the emotion scores have missing values across the sample at a monthly frequency. A standard proce- dure to deal with this is linear interpolation. This appears appropriate for the ECB, since its meet- ings always took place at a frequent and regular pace, resulting in only 11% missing data points on a monthly basis. The Fed, however, successively increased the number of statements following their meetings. Initially, they only communicated after a policy change, but later decided to do so after each meeting. There are eight regular meetings per year plus additional sessions as required. This results in fewer data points than for the ECB, with roughly a third of data points missing. In order to avoid artifacts due to the interpola- tion procedure, we alternatively apply the method of Schumacher and Breitung (2006). They use the correlation between a series affected by missing values and another, complete time series to inter- polate the missing data points. The linearly in- terpolated series of the emotion scores are highly correlated with a broad set of economic data in their respective geographic area (see Table 1): we compiled data sets for the Euro area and the US covering a measure of the change in the real econ- omy (approximated by industrial production), in- flation, unemployment and interest rates. These C E B V A D V A D d e F production 0.32 -0.11 0.24 0.04 0.05 -0.03 inflation 0.19 0.24 -0.12 -0.03 0.52 -0.17 unemploy. -0.45 -0.34 -0.32 0.00 -0.56 0.10 services 0.42 -0.23 0.53 0.07 0.12 -0.03 Table 1: VAD scores and their correlation with a broad set of economic indicators (excerpt). are the main economic variables in most small- scale economic models. We add business and con- sumer survey data to incorporate forward looking elements and retail sales to complement the indus- try data with service sector-based information. As one may expect, the Valence measurements are correlated with all activity measures, at least for the ECB. This may be due to the description of the current state of the economy inherent in the statements, which necessarily apply words with a positive or negative connotation based on the business cycle phase. Interestingly, this does not hold for the Fed, and, moreover, the Arousal and Dominance scores are also highly correlated with economic variables, particularly with inflation and unemployment -- the CBs' main (direct or inter- mediate) target variables. The Schumacher/Breitung procedure generates VAD-time series which, for the ECB, look virtu- ally unchanged in comparison with the interpo- lated series, while the corresponding Fed scores are more volatile. For the latter reason, we stick to linear interpolation, while the results from the ECB case confirm that this method does not in- duce too much bias. Finally, to avoid interpola- tion altogether, we check whether the results per- sist under a qualitative perspective, if we repeat the following analysis on series aggregated to quar- terly frequency. 4 Results We perform standard break tests on the VAD scores; they are designed to detect endoge- nous changes in the underlying statistical pro- cess (which we model as auto-regressive, moving- average). Since Augmented-Dickey-Fuller tests indicate that these series are non-stationary, we use detrended data and find that the results also hold for the data in first differences. Focusing on the ECB, the break tests endogenously reveal three break points for each sentiment series. It has to be emphasized that the applied break tests return an endogenous break date without any restrictions by the researcher. Thus, a break date returned in proximity to a specific event makes it likely that the hypothesis of this event being causal for the break will not be rejected. A specific event study, however, is left for future research. Focusing on the ECB series, it turns out that, interestingly, in- dependent tests for the three series reveal neigh- bouring break dates -- either occurring around the change in presidency or key economic events (see Figure 4 for the dominance series). The first break, in 2003, is close for the Valence and Arousal series (in July and September, respec- tively) and somewhat earlier for the Dominance series (in February). The second break is detected in winter 2008/09; again the points are close for Valence and Arousal (January '09 and September '08, respectively) and earlier for Dominance (in November '07, just a month before the global cri- sis originated in the US). The third break appears unrelated between the VAD series: it occurs in Oc- tober 2011 for the Valence series, in February 2013 for the Arousal series and in September 2014 for the Dominance series. This illustrates that the breakpoints, by and large, either coincide with major economic turn- ing points, or the change in presidency of the re- spective CB: the first one, when Wim Duisenberg was followed by Jean-Claude Trichet in October 2003. The second break is close to the outbreak of the Great Recession, which is a common feature in most economic data due to the massive impact the global recession had on most variables. Hence, not only did the economy change drastically at that time, but also the emotions expressed by President Trichet became different. The Dominance series, in particular, expresses this phenomenon: With the outbreak of the crisis, the corresponding emotion scores decreased markedly and remained low un- til the change in presidency in fall 2011. Since Mario Draghi became ECB President this score started to recover, as evidenced by the clear up- trend; the third break point also tracks this; it oc- curred when the Dominance scores settled down on a new, higher level. 5 Conclusion The findings of our analysis are threefold: We showed that central bankers, assumed to be among the most technically talking economic agents (for reasons of an assumed and/or desired communica- tion efficiency), are prone to emotions which, in addition, are strongly influenced by the economic situation. The Great Recession also left its mark in the emotions of President Trichet who, according to emotion analysis coupled with standard econo- metric tools, switched to a markedly more submis- sive language. Interestingly, this attitude slowly recovered towards a more dominant stance once Mario Draghi took office. Thus, finally, our anal- ysis shows that CB communication depends much on the person presiding it, albeit the shift to a dif- ferent emotional stance, e.g. in Dominance, fades in only gradually. Acknowledgments We would like to thank the anonymous reviewers for their detailed and constructive comments. References Alan S Blinder, Michael Ehrmann, Marcel Fratzscher, Jakob De Haan, and David-Jan Jansen. 2008. Cen- tral bank communication and monetary policy: a survey of theory and evidence. Journal of Economic Literature, 46(4):910 -- 945. Johan Bollen, Huina Mao, and Xiaojun Zeng. 2011. TWITTER mood predicts the stock market. Journal of Computational Science, 2(1):1 -- 8. Margaret M. Bradley and Peter J. Lang. 1994. Measur- ing emotion: the Self-Assessment Manikin and the semantic differential. Journal of Behavior Therapy and Experimental Psychiatry, 25(1):49 -- 59. Sven Buechel and Udo Hahn. 2016. Emotion analy- sis as a regression problem: Dimensional models and their implications on emotion representation and metrical evaluation. In ECAI 2016 -- Proceedings of the 22nd European Conference on Artificial In- telligence. Including Prestigious Applications of Ar- tificial Intelligence (PAIS 2016). The Hague, The Netherlands, August 29 - September 2, 2016, num- ber 285 in Frontiers in Artificial Intelligence and Ap- plications, pages 1114 -- 1122, Amsterdam, Berlin, Washington, D.C. IOS Press. Sven Buechel and Udo Hahn. 2017. EMOBANK: studying the impact of annotation perspective and representation format on dimensional emotion anal- In EACL 2017 -- Proceedings of the 15th ysis. Conference of the European Chapter of the Associa- tion for Computational Linguistics. Valencia, Spain, April 3-7, 2017, volume 2: Short Papers, pages 578 -- 585. Association for Computational Linguistics (ACL). Sven Buechel and Udo Hahn. 2018a. Emotion repre- sentation mapping for automatic lexicon construc- tion (mostly) performs on human level. In COLING 2018 -- Proceedings of the 27th International Con- ference on Computational Linguistics: Main Con- ference. Santa Fe, New Mexico, USA, August 20-26, 2018, pages 2892 -- 2904. International Committee on Computational Linguistics (ICCL). Sven Buechel and Udo Hahn. 2018b. Word emotion induction for multiple languages as a deep multi- task learning problem. In NAACL-HLT 2018 -- Pro- ceedings of the 2018 Conference of the North Amer- ican Chapter of the Association for Computational Clemens Nopp and Allan Hanbury. 2015. Detect- ing risks in the banking system by sentiment anal- ysis. In EMNLP 2015 -- Proceedings of the 2015 Conference on Empirical Methods in Natural Lan- guage Processing. Lisbon, Portugal, 17-21 Septem- ber 2015, pages 591 -- 600, Red Hook/NY. Associ- ation for Computational Linguistics (ACL), Curran Associates, Inc. Maarten Sap, Gregory J. Park, Johannes C. Eichstaedt, Margaret L. Kern, David J. Stillwell, Michal Kosin- ski, Lyle H. Ungar, and Hansen Andrew Schwartz. 2014. Developing age and gender predictive lexica over social media. In EMNLP 2014 -- Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing. Doha, Qatar, Octo- ber 25-29, 2014, pages 1146 -- 1151. Association for Computational Linguistics (ACL). Christian Schumacher and Jörg Breitung. 2006. Real- time forecasting of GDP based on a large factor model with monthly and quarterly data. Discus- sion Paper Series 1: Economic Studies 2006/33, Deutsche Bundesbank. Philip J Stone, Dexter C Dunphy, and Marshall S Smith. 1966. The General Inquirer: A Computer Approach to Content Analysis. MIT Press. Jin Wang, Liang-Chih Yu, K. Robert Lai, and Xuejie Zhang. 2016. Dimensional sentiment analysis us- In ACL 2016 ing a regional CNN-LSTM model. -- Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics. Berlin, Germany, August 7-12, 2016, volume 2: Short Pa- pers, pages 225 -- 230, Stroudsburg, PA. Association for Computational Linguistics (ACL). Amy Beth Warriner, Victor Kuperman, and Marc Brys- baert. 2013. Norms of valence, arousal, and dom- inance for 13,915 English lemmas. Behavior Re- search Methods, 45(4):1191 -- 1207. Liang-Chih Yu, Lung-Hao Lee, Shuai Hao, Jin Wang, Yunchao He, Jun Hu, K. Robert Lai, and Xue- jie Zhang. 2016. Building Chinese affective re- sources in valence-arousal dimensions. In NAACL- HLT 2016 -- Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Tech- nologies. San Diego, California, USA, June 12-17, 2016, pages 540 -- 545, Stroudsburg/PA. Association for Computational Linguistics (ACL). Linguistics: Human Language Technologies, vol- ume 1, long papers, pages 1907 -- 1918, New Orleans, Louisiana, USA, June 1 -- 6, 2018. Sven Buechel, Udo Hahn, Jan Goldenstein, Sebastian G. M. Händschke, and Peter Walgenbach. 2016. Do enterprises have emotions? In WASSA 2016 -- Pro- ceedings of the 7th Workshop on Computational Ap- proaches to Subjectivity, Sentiment and Social Me- dia Analysis @ NAACL-HLT 2016. San Diego, Cal- ifornia, USA, June 16, 2016, pages 147 -- 153. Michael Ehrmann and Marcel Fratzscher. 2007a. Com- munication by central bank committee members: different strategies, same effectiveness? Journal of Money, Credit and Banking, 39(2-3):509 -- 541. Michael Ehrmann and Marcel Fratzscher. 2007b. The timing of central bank communication. European Journal of Political Economy, 23(1):124 -- 145. Paul Ekman. 1992. An argument for basic emotions. Cognition & Emotion, 6(3-4):169 -- 200. Sebastian G. M. Händschke, Sven Buechel, Jan Gold- enstein, Philipp Poschmann, Tinghui Duan, Peter Walgenbach, and Udo Hahn. 2018. A corpus of cor- porate annual and social responsibility reports: 280 million tokens of balanced organizational writing. In ECONLP 2018 -- Proceedings of the 1st Work- shop on Economics and Natural Language Process- ing @ ACL 2018. Melbourne, Victoria, Australia, July 20, 2018, pages 20 -- 31, Stroudsburg/PA. Asso- ciation for Computational Linguistics (ACL). Kohei Kawamura, Yohei Kobashi, Masato Shizume, and Kozo Ueda. 2019. Strategic central bank communication: discourse analysis of the Bank of Japan's monthly report. Journal of Economic Dy- namics and Control, 100:230 -- 250. Evgeny Kim, Sebastian Padó, and Roman Klinger. 2017. Investigating the relationship between lit- erary genres and emotional plot development. In LaTeCH-CLfL 2017 -- Proceedings of the 1st Joint SIGHUM Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humani- ties and Literature @ ACL 2017. Vancouver, British Columbia, Canada, August 4, 2017, pages 17 -- 26. Association for Computational Linguistics (ACL). David O. Lucca and Francesco Trebbi. 2009. Measur- ing central bank communication: an automated ap- proach with application to FOMC statements. Tech- nical Report Working Paper No. 15367, National Bureau of Economic Research (NBER), Cambridge, MA, USA. Saif M. Mohammad. 2018. Obtaining reliable hu- man ratings of valence, arousal, and dominance for In ACL 2018 -- Proceed- 20,000 english words. ings of the 56th Annual Meeting of the Association for Computational Linguistics. Melbourne, Victoria, Australia, July 15-20, 2018, volume 1: Long Papers, pages 174 -- 184.
1807.10311
1
1807
2018-07-26T18:31:08
Open Source Automatic Speech Recognition for German
[ "cs.CL" ]
High quality Automatic Speech Recognition (ASR) is a prerequisite for speech-based applications and research. While state-of-the-art ASR software is freely available, the language dependent acoustic models are lacking for languages other than English, due to the limited amount of freely available training data. We train acoustic models for German with Kaldi on two datasets, which are both distributed under a Creative Commons license. The resulting model is freely redistributable, lowering the cost of entry for German ASR. The models are trained on a total of 412 hours of German read speech data and we achieve a relative word error reduction of 26% by adding data from the Spoken Wikipedia Corpus to the previously best freely available German acoustic model recipe and dataset. Our best model achieves a word error rate of 14.38 on the Tuda-De test set. Due to the large amount of speakers and the diversity of topics included in the training data, our model is robust against speaker variation and topic shift.
cs.CL
cs
Open Source Automatic Speech Recognition for German Benjamin Milde1, Arne Köhn2 Language Technology1 and Natural language Systems2 group, FB Informatik, Universität Hamburg, Germany Email: {milde, koehn}@informatik.uni-hamburg.de.de Abstract High quality Automatic Speech Recognition (ASR) is a pre- requisite for speech-based applications and research. While state-of-the-art ASR software is freely available, the lan- guage dependent acoustic models are lacking for languages other than English, due to the limited amount of freely avail- able training data. We train acoustic models for German with Kaldi on two datasets, which are both distributed un- der a Creative Commons license. The resulting model is freely redistributable, lowering the cost of entry for German ASR. The models are trained on a total of 412 hours of German read speech data and we achieve a relative word error reduction of 26% by adding data from the Spoken Wikipedia Corpus to the previously best freely available German acoustic model recipe and dataset. Our best model achieves a word error rate of 14.38 on the Tuda-De test set. Due to the large amount of speakers and the diversity of topics included in the training data, our model is robust against speaker variation and topic shift. 1 Introduction Over the past years a lot of progress has been made to make Automatic Speech Recognition (ASR) more robust and practicable, mainly due to incoporating (deep) neural networks as central part of the recognition pipeline. There has also been a shift towards making the underlying recogni- tion software more accessible. With the introduction of the Kaldi toolkit [1], a state-of-the-art open source toolkit for speaker-independent large vocabulary ASR became avail- able for researchers and developers alike. Over the past years, it has evolved into a very popular open source ASR toolkit, either pushing state-of-the-art acoustic models or following their performance closely. For English, open source resources to train Kaldi acous- tic models as well as language models and a phoneme lex- icon exist, in sufficient quality and quantity: TED-LIUM [2, 3] and Librispeech (1000h) [4] allow large-scale train- ing of speech recognizers, with word error rates in the low single digits in their respective domains (6.5% WER for presentation speech, 3.2% WER for clean read speech [5]). These resources exist alongside proprietary resources, such as: TIMIT [6], Switchboard [7] and the Fisher corpus [8]. The latter two also enable low word error rates (WERs) on more difficult spontaneous conversational telephone speech test sets (e.g. for Switchboard 5.5% WER in [9], within close range of human performance). However, models trained from open source and freely available resources allow personal, academic and commer- cial use cases without licensing issues, lowering the bar- rier of entry. Having access to a locally running speech recognition software (or a private server instance) solves privacy issues of speech APIs from cloud providers. En- glish speech recognition models for Kaldi are available as pretrained packages or freely available training recipes and these models are used in the wild for down-stream NLP applications, e.g. [10, 11]. We would like to establish the Dataset Tuda-De SWC German (cons) SWC German (min) total (cons) total (min) Training hours Speakers 127h 141h 285h 268h 412h 147 363 363 510 510 Table 1: Amount of training data and speakers from our two open source datasets that we used to train our Kaldi models. cons: conservative pruning, min: minimal pruning models presented in this paper as go-to models for open source German speech recognition with Kaldi -- with freely available training recipes, making it easily extensible, as well as offering pre-trained models. In the remainder of the paper we discuss the freely available data resources for German and our recognition results. One of our data resources is automatically aligned data from the Spoken Wikipedia project. This is a very interest- ing resource, as new speech data is consistently added to the project by volunteers (see the growth rate in Figure 2) and the training process can be extended form time to time with new data. Our final model can deal with different microphone and unknown speakers in an open vocabulary setting. 2 Data Sets In the following, we briefly describe the data resources that we used to train our models. Also, in Table 1 we give an overview of the amount of available training data. All of the following resources are freely available and are published with permissive Creative Commons open source licenses (i.e. free for all, commercial use allowed). 2.1 Spoken Wikipedia Corpus The Spoken Wikipedia1 is a project run by volunteers to read and record Wikipedia articles. The audio files produced are linked to the Wikipedia articles, with semi-structured metadata attached. Sub-projects exist for many languages, but English, German, and Dutch are the largest ones, by a large margin. The Spoken Wikipedia Corpora [12] (SWC) are a collection of time-aligned spoken Wikipedia articles for Dutch, English and German using a fully automated pipeline to download, normalize and align the data. Cru- cially, the exact correspondences to original articles is pre- served in the alignment data. For German, both an align- ment of normalized words as well as a phone-based align- ment exists. We use word-based alignments. Being based on found data, the alignments are not per- fect: Parts of the articles are not aligned at all, e.g. because of incorrect normalization or pronunciation that deviates 1https://en.wikipedia.org/wiki/Wikipedia: WikiProject_Spoken_Wikipedia 8 1 0 2 l u J 6 2 ] L C . s c [ 1 v 1 1 3 0 1 . 7 0 8 1 : v i X r a do not need to be aligned. We call this approach minimal pruning, as it keeps much more training material than the conservative approach. The German Spoken Wikipedia has 363 speakers who committed 349h of audio to the project, of which 249h could be successfully aligned. Of these, 141h of audio is extracted with conservative pruning and 285h with minimal pruning. 2.2 Tuda-De In [14], an Open Source corpus of German utterances was described and publicly released, with a focus on distant speech recognition. Sentences were sourced from different text genres: Wikipedia, parliament speeches, simple com- mand and control prompts. Volunteers, mostly students, read the sentences into four different microphones, placed at a distance of one meter from the speaker. One of these microphones was a Microsoft Kinect. The corpus contains data from the beamformed signal of the Kinect, as well as mixed down single channel raw data from the microphone array (due to driver restrictions the raw multi channel data could not be recorded). Yamaha PSG-01S, a simple USB ta- ble microphone and a Samson C01U, a studio microphone, were also used to record audio simultaneously. A further simultaneous recording was made with a built-in laptop mi- crophone (Realtek), at a different position in the room and next to a very noisy fan. For nearly every utterance the cor- pus contains five sound files, apart from a few where driver hiccups resulted in fewer recordings. Four of these streams are fairly clean and comprehensible, the recordings from the Realtek microphone next to a noisy fan are very difficult to understand, even for humans. Female speakers make up about 30% of the data and most speakers are between 18 and 30 years old. We use version 2 of the corpus. 2.3 Lexicon MARY-TTS [15] is an open source Text-To-Speech (TTS) system. It also contains a manually created phoneme dic- tionary resource for German, containing 26,231 words and their phoneme transcriptions in a dialect of extended SAM- PA BAS [16]. We use Sequitur [17] to train a grapheme- to-phoneme (G2P) model, to be able to add automatically generated entries for out-of-vocabulary (OOV) words to the lexicon as needed. For the Tuda-De corpus the final lexicon size is 28,131 words; this includes all words from the MARY lexicon and automatically generated entries for all OOV words in the train set. When we combine the Tuda- De transcriptions with the SWC transcriptions, more OOV lexicon entries need to be automatically generated and the final lexicon size grows to 126,794 words using the conser- vatively pruned SWC data, respectively 182,784 words with minimally pruned SWC data. To measure the effects of an even larger vocabulary size, we also computed the 300,000 most frequent words in the German Wikipedia (April 2018) and generated additional phonetic entries. We merged the vocabulary with the previous lexicon and obtained a larger lexicon containing 350,029 words. 2.4 Language Models We used the same text sources as in [14] and trained similar baseline language models. In particular, we trained 3-gram and 4-gram language models with Kneser-Ney smoothing [18] and different vocabulary sizes on approximately 8 million German sentences. The sentences are selected from similar sources as the spoken data (Wikipedia, Parliament Figure 1: Distribution of speaker contribution and amount of aligned material for the SWC corpus. Figure 2: Growth of the English, German and Dutch Spo- ken Wikipedia resources over time. English and German both grow with about 33h of additional audio per year. from the expectation. For material such as tables or formu- las it is unknown how they will be read (or if they are read at all) and they are therefore excluded from the alignment process. Being recorded by volunteers reading complete articles, the data fits very well how a user naturally speaks, arguably better than a controlled recording in a lab. The vocabulary is quite large due to the encyclopedic nature of the articles. Topics of the articles are diverse and range from obscure technical articles like "Brainfuck" (an esoteric program- ming language) to a description of "Isar" (a river). To train Kaldi on the Spoken Wikipedia, we adapted the pre-existing pipeline from the Spoken Wikipedia Corpora which bootstraps the Sphinx speech recognizer [13] used for the SWC alignment by iteratively training new models on the data of the previous alignment. As a speech recognizer can not be trained on partly aligned long audio (some record- ings last several hours), the SWC pipeline contains a snippet extractor which searches for continuously aligned data of appropriate length. The snippet extractor generates training segments along Voice Activity Detection (VAD) boundaries and discards utterances that are too short (smaller than 0.6 seconds), have more than 20% of unaligned data, more than two consecutive unaligned words, an unaligned word at the beginning or end or pauses longer than 1.5 seconds. We call this approach conservative pruning, as it tries to minimize errors in the training data. In a second setting, we deviate from the pre-existing snippet extraction and extract all segments defined by VAD boundaries for which at least 65% of the words are aligned. There are no other restrictions, e. g. the start and end words 0.1 1 10 100 1000 10000 0 50 100 150 200 250 300 350minutesspeaker nr.recorded minutesaligned minutes 0 50 100 150 200 250 300 350 40020052006200720082009201020112012201320142015201620172018cumulative size in hoursEnglishGermanDutch Model Dataset Vocabulary LM WER GMM-HMM Tuda-De Tuda-De Tuda-De + SWC (cons. pruned) Tuda-De + SWC (min. pruned) Tuda-De + SWC (min. pruned) Tuda-De + SWC (min. pruned) TDNN-HMM Tuda-De Tuda-De Tuda-De + SWC (cons. pruned) Tuda-De + SWC (min. pruned) Tuda-De + SWC (min. pruned) Tuda-De + SWC (min. pruned) Tuda-De + SWC (min. pruned) 28,131 126,794 " " 182,784 350,029 28,131 126,794 " " 182,784 350,029 350,029 dev 45.31 3-gram KN 37.47 " 29.97 " 29.79 " 26.92 " 24.91 4-gram KN 35.53 3-gram KN 28.08 " 20.91 " 20.30 " 18.39 " 4-gram KN 15.32 + 2-layer LSTM LM 13.14 test 45.55 38.34 31.06 30.99 28.25 25.77 36.32 28.96 22.22 21.43 19.60 16.49 14.38 Table 2: WER results on the Tuda-De dev and test sets. The scores are for decoding combined data from Kinect (Beam and RAW), Samson and Yamaha microphones. and some crawled sentences). Also, they are already filtered, so that sentences from the development and test sets of the Tuda-De corpus are not included in LM training texts. All sentences were normalized using the frontend of the MARY TTS software [15], similarly to the normalization process of the SWC corpus. We also use the newly released Kaldi- RNNLM [19] to train a recurrent neural network based LM on the same text sources. We use the same parameters as in the Switchboard LSTM 1e example: two stacked LSTM layers with a cell width of 1024. 3 Experiments and Evaluation We use Gaussian Mixture Model (GMM) - Hidden Markov Models (HMM) and Time-Delayed Neural Networks (TDNNs) [20, 21] as acoustic models following the chain- recipe (s5_r2) of the TED-LIUM corpus [2] example in Kaldi. The TDNNs have a width of 1024 neurons. For GMM-HMM models, we adapted the Kaldi egs for the Switchboard corpus (swbd s5c, model tri4). As input to the TDNN we also use online i-vectors (helping with speaker adaptation, c.f. [22 -- 24]). As the TDNN-HMM chain models are sequence dis- criminatively trained on the utterances, they are more prone to overfitting and do not cope well with incorrect transcrip- tions [25]. Since the SWC transcriptions are aligned from found data, we expect that some of the transcriptions could be problematic, particularly when we apply only minimal pruning to SWC. We follow the recipe used in the Kaldi TED-LIUM TDNN example and clean the training data by decoding it and removing utterances which do not match their supposed transcriptions. While analyzing the cleaned utterances, we also noted that some of the Tuda-De utter- ances are wrongly annotated, mostly because of hiccups in the recording software [26] resulting in (completely) wrongly assigned utterance transcriptions. The cleanup re- moves about 1.6% of the Tuda-De data and 6.9% of the combined Tuda-De and conservatively pruned SWC data (268.5h → 250h). With minimally pruned SWC data, 8.8% of the combined training data is removed from 412 hours, resulting in 375 hours of cleaned training data. We use the dev and test set from the Tuda-De corpus to measure word error rates (WER). The experiments in [14] defined a closed vocabulary task with no out-of-vocabulary Model Microphone WER dev TDNN-HMM Kinect-RAW 13.82 14.19 Samson Yamaha 14.84 Kinect-Beam 19.12 Realtek 66.46 test 15.03 15.18 15.77 20.86 63.41 Table 3: WER results of models trained on combined data (Tuda-De and SWC) for the different microphones in the Tuda-De dev and train sets. All WER results above are with the lexicon of 350,029 words and without RNNLM rescoring. (OOV) words, as OOV words in test and dev were added to the lexicon. This makes WER rates somewhat lower in comparison, but a bit unrealistic. In Table 2 we show results for a more realistic open domain setting, where the dev and test vocabulary is not known a priori. Using only a 28,131 word vocabulary yields very high WER for GMM-HMM and TDNN-HMM models alike, because of a high OOV rate. Extending the vocabulary to 126,794 words reduces both GMM-HMM and TDNN-HMM WER by about 20% relative. Adding SWC data to the Tuda-De utterances im- proves these TDNN-HMM results significantly, even when we use the same vocabulary size. Using a minimal pruning strategy with the SWC data and subsequently relying more on Kaldi's cleaning scripts gives slightly better results: 26% relative reduction vs. 23.3 % relative reduction. Finally, we achieve our best WERs when we use a significantly larger vocabulary and a better LM. Our test score with an open domain vocabulary of 350,029 words is 16.49 WER and can be further improved by using lattice rescoring with an LSTM LM to 14.38 WER. This is a significant improve- ment over the 20.5 WER (without OOVs) reported in [14]. 3.1 OOV Rate Due to the type of text used in our data sets, the number of unseen words in the test set is quite high, with an OOV rate of 14% for the lexicon with 28k entries, 8% using 126k words and 3.2% using 350k words. The OOV rate poses a lower bound on achievable WER and also explains the large influence of vocabulary size on observed WERs. The largest problem the ASR model faced during evalu- ation was compounding. As German is a very productive language, compounds unknown to the language model are quite frequent, even though the acoustic model is clearly able to recover the information needed. Because the lan- guage model tends to create more tokens than in the original text when trying to recognize compounds not in the lexi- con, each of such errors is counted as at least two errors: a substitution and an insertion error. For example, the word "nachzumachen" is recognized as "nach zu machen", re- sulting in three recognition errors: two insertions and a substitution. Overall, about a quarter of the errors (2.6k of the 11.5k with the 350k vocabulary model) are part of a sequence of insertions followed by a substitution, indica- tive for an error as just described. We manually checked a sample of these errors and could verify that indeed most of them are compounds recognized as multiple word such as "Umweltvereinbarung", "Fusspfad", or "zweitausendzwölf". 3.2 Differences Between Microphones The dev and test set of Tuda-De is recorded using multiple microphones. In Table 3 we calculated WER individually on the dev and test sets per microphone. The differences in recognition accuracy are surprisingly small for Kinect- RAW, Samson and Yamaha recordings. The usual range of WER for TDNN-HMM models we observed for these microphones is between 15.03% and 15.77%. However, the beamformed WER result for the Kinect is significantly higher than decoding the raw (mixed down to one channel) data. The beamforming algorithm of the Microsoft Kinect is closed source, but a few observations are very noticable in the recorded signal. There is a very audible "tin can effect" in the audio signals, probably from a noise suppression algorithm. The beam also seems to get misdirected after pauses, too, c.f. Section 3 in [26]. The recordings were made with automatic gain control, in some of the utterances the beginning is difficult to understand as a result. An exception to the otherwise good results are also WERs from the Realtek microphone. It produced heavily distorted recordings due to a nearby laptop fan, making these recordings very challenging to decode. The data from this microphone is however not officially part of the dev and test set (it is also not included in Table 2). 3.3 Conversational Speech In the Verbmobil project (1993-2000), the goal was to es- tablish whether translation of spontaneous speech into other languages is possible [27]. Conversational speech data was recorded for German, English and Japanese, in the lim- ited domain of scheduling appointments. We used the dev and test data of the first revision of the German subset of the Verbmobil corpus (VM1). Since our acoustic models are trained exclusively on read speech, it provides a good test set showing how well our models cope with a more challenging conversational and spontaneous speaking style. In Table 4 we show results for decoding VM1 utterances with our acoustic models. We decode with two different vo- cabularies and FSTs, a general purpose vocabulary (as also used for the results in Table 2) and a domain specific vo- cabulary, using the lexicon words of the VM1 corpus (6851 words). For the latter we recomputed our LM with the re- duced vocabulary. We do not use the manual lexicon entries of the VM1 corpus and instead use the same lexicon we use in the general purpose case, reducing it and generating Model Vocabulary GMM-HMM General purp. (~350k) TDNN-HMM General purp. (~350k) GMM-HMM Domain specific (~7k) TDNN-HMM Domain specific (~7k) WER dev 46.42 33.69 27.18 18.17 test 50.56 38.23 29.12 20.04 Table 4: WER results on the Verbmobil (VM1) dev and test data, without RNNLM rescoring. automatic OOV phoneme lexicon entries as needed. The domain specific WER score with limited vocab- ulary is usually found in the literature for the Verbmobil corpus. A newer reference score for a DNN-HMM trained with Kaldi is 12.5% WER in [28]. Our score of 20.04% WER is probably due not using the optimized and man- ually generated lexicon as well as due to a mismatch in the training data for the acoustic model (read speech vs. conversational speech). The model in [28] is exclusively trained on in-domain audio data, while we excluded any proprietary VM1 speech training data and only used our freely available open source speech recordings. 4 Conclusions and Outlook We have introduced a freely available ASR model for Ger- man which improves upon the previously best one by a large margin, both due to improvements in algorithms and a significant increase of freely available data. The free acoustic model fosters replicable research, and lowers the cost of entry for (non-cloud based) ASR, as the model can be readily downloaded2. In light of the recent privacy de- bate on data handling, especially in the EU, freely available acoustic models for German have obvious advantages over cloud based or closed source models. Our models can be run locally and user-recorded speech data does not have to be transferred to a 3rd party cloud provider, where privacy concerns will arise. Our evaluation shows that the model performs well on new speakers, different microphones with around 14.4% WER for rescored TDNN-HMM models. The size of the general purporse vocabulary has a large effect on WERs - a large part of the remaining recognition errors are due to vocabulary problems and the underlying language model. We expect a subword unit or decompounding approach to work better than a fixed word approach for German read speech [29]. A remaining challenge is conversational speech, but reasonable performance can be achieved with a domain specific vocabulary. On the other hand, as more and more articles are spoken and recorded by volunteers for the Spoken Wikipedia project, we also expect benefits for our acoustic models through the use of the additional data. The recipes we built for German can also be adapted to other languages. A good candidate, due to data be readily available in the Spoken Wikipedia corpus, is Dutch. The availability of Dutch data outside the Spoken Wikipedia corpus is even more limited than of German data -- there are currently only ten hours available on Voxforge3, while up to 200 hours can potentially be used for model training from the SWC corpus. 2Training scripts and model files are currently available at: https://github.com/uhh-lt/kaldi-tuda-de/ 3http://www.voxforge.org/nl/Downloads [19] H. Xu, K. Li, Y. Wang, J. Wang, S. Kang, X. Chen, D. Povey, and S. Khudanpur, "Neural network language modeling with letter-based features and importance sampling," in Proc. ICASSP, (Calgary, Alberta, Canada), 2018. [20] A. Waibel, T. Hanazawa, G. Hinton, K. Shikano, and K. J. Lang, "Phoneme recognition using time-delay neural net- works," in Readings in speech recognition, pp. 393 -- 404, 1990. [21] V. Peddinti, D. Povey, and S. Khudanpur, "A time delay neu- ral network architecture for efficient modeling of long tem- poral contexts," in Proc. Interspeech, (Dresden, Germany), 2015. [22] G. Saon, H. Soltau, D. Nahamoo, and M. Picheny, "Speaker adaptation of neural network acoustic models using i- vectors.," in Proc. ASRU, (Olomouc, Czech Republic), pp. 55 -- 59, 2013. [23] A. Senior and I. Lopez-Moreno, "Improving dnn speaker independence with i-vector inputs," in Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on, (Florence, Italy), pp. 225 -- 229, 2014. [24] Y. Miao, H. Zhang, and F. Metze, "Speaker adaptive training of deep neural network acoustic models using i-vectors," IEEE/ACM Transactions on Audio, Speech and Language Processing (TASLP), vol. 23, no. 11, pp. 1938 -- 1949, 2015. [25] D. Povey, V. Peddinti, D. Galvez, P. Ghahremani, V. Manohar, X. Na, Y. Wang, and S. Khudanpur, "Purely sequence-trained neural networks for ASR based on lattice- free MMI," in Proc. Interspeech, (San Fransisco, USA), pp. 2751 -- 2755, 2016. [26] D. Schnelle-Walka, S. Radeck-Arneth, C. Biemann, and S. Radomski, "An open source corpus and recording soft- ware for distant speech recognition with the microsoft kinect," in Proc. ITG, (Erlangen, Germany), 2014. [27] W. Wahlster, Verbmobil: foundations of speech-to-speech translation. Springer-Verlag Berlin/Heidelberg, 2000. [28] C. Gaida, P. Lange, R. Petrick, P. Proba, A. Malatawy, and D. Suendermann-Oeft, "Comparing open-source speech recognition toolkits," Tech. Rep., DHBW Stuttgart, 2014. [29] P. Smit, S. Virpioja, M. Kurimo, et al., "Improved subword modeling for WFST-based speech recognition," in Proc. Interspeech, (Stockholm, Sweden), pp. 2551 -- 2555, 2017. References [1] D. Povey, A. Ghoshal, G. Boulianne, L. Burget, O. Glembek, N. Goel, M. Hannemann, P. Motlicek, Y. Qian, P. Schwarz, et al., "The Kaldi speech recognition toolkit," in Proc. ASRU, (Atlanta, USA), 2011. [2] A. Rousseau, P. Deléglise, and Y. Estève, "Enhancing the TED-LIUM corpus with selected data for language modeling and more TED talks," in Proc. LREC, (Reykjavik, Iceland), pp. 3935 -- 3939, 2014. [3] F. Hernandez, V. Nguyen, S. Ghannay, N. Tomashenko, and Y. Estève, "TED-LIUM 3: twice as much data and corpus repartition for experiments on speaker adaptation," arXiv preprint arXiv:1805.04699, 2018. [4] V. Panayotov, G. Chen, D. Povey, and S. Khudanpur, "Lib- rispeech: an ASR corpus based on public domain audio books," in Proc. ICASSP, (Brisbane, Australia), pp. 5206 -- 5210, 2015. [5] K. J. Han, A. Chandrashekaran, J. Kim, and I. Lane, "The CAPIO 2017 conversational speech recognition system," arXiv preprint arXiv:1801.00059, 2017. [6] J. S. Garofolo, L. F. Lamel, W. M. Fisher, J. G. Fiscus, and D. S. Pallett, "DARPA TIMIT acoustic-phonetic continous speech corpus CD-ROM. NIST speech disc 1-1.1," NASA STI/Recon technical report n, vol. 93, 1993. [7] J. J. Godfrey, E. C. Holliman, and J. McDaniel, "SWITCH- BOARD: Telephone speech corpus for research and develop- ment," in Proc. ICASSP, (San Francisco, CA, USA), pp. 517 -- 520, 1992. [8] C. Cieri, D. Miller, and K. Walker, "The Fisher corpus: a resource for the next generations of speech-to-text.," in LREC, vol. 4, (Lisbon, Portugal), pp. 69 -- 71, 2004. [9] G. Saon, G. Kurata, T. Sercu, K. Audhkhasi, S. Thomas, D. Dimitriadis, X. Cui, B. Ramabhadran, M. Picheny, L.- L. Lim, B. Roomi, and P. Hall, "English conversational telephone speech recognition by humans and machines," in Proc. Interspeech 2017, (Stockholm, Sweden), pp. 132 -- 136, 2017. [10] Y. Oualil, D. Klakow, G. Szaszák, A. Srinivasamurthy, H. Helmke, and P. Motlicek, "A context-aware speech recog- nition and understanding system for air traffic control do- main," in Proc. ASRU, (Okinawa, Japan), pp. 404 -- 408, 2017. [11] B. Milde, J. Wacker, S. Radomski, M. Mühlhäuser, and C. Biemann, "Ambient search: A document retrieval system for speech streams," in Proc. COLING 2016, (Osaka, Japan), pp. 2082 -- 2091, 2016. [12] T. Baumann, A. Köhn, and F. Hennig, "The spoken Wikipedia corpus collection: Harvesting, alignment and an application to hyperlistening," Language Resources and Evaluation, Jan 2018. [13] P. Lamere, P. Kwok, W. Walker, E. Gouvea, R. Singh, and P. Wolf, "Design of the CMU Sphinx-4 decoder," in Proceed- ings of Eurospeech, (Geneva, Switzerland), pp. 1181 -- 1184, 2003. [14] S. Radeck-Arneth, B. Milde, A. Lange, E. Gouvêa, S. Radomski, M. Mühlhäuser, and C. Biemann, "Open source german distant speech recognition: Corpus and acous- tic model," in Proc. Text, Speech, and Dialogue (TSD), (Pilsen, Czech Republic), pp. 480 -- 488, 2015. [15] M. Schröder and J. Trouvain, "The german text-to-speech synthesis system MARY: A tool for research, development and teaching," International Journal of Speech Technology, vol. 6, no. 4, pp. 365 -- 377, 2003. [16] Bavarian Archive "Extended http://www.bas.uni-muenchen.de/ for Speech Signals, sam-pa." forschung/Bas/BasSAMPA. [17] M. Bisani and H. Ney, "Joint-sequence models for grapheme- to-phoneme conversion," Speech communication, vol. 50, no. 5, pp. 434 -- 451, 2008. [18] R. Kneser and H. Ney, "Improved backing-off for m-gram language modeling," in Proc. ICASSP, (Detroit, MI, USA), pp. 181 -- 184, 1995.
1702.00700
1
1702
2017-02-02T14:44:17
Multilingual and Cross-lingual Timeline Extraction
[ "cs.CL", "cs.AI" ]
In this paper we present an approach to extract ordered timelines of events, their participants, locations and times from a set of multilingual and cross-lingual data sources. Based on the assumption that event-related information can be recovered from different documents written in different languages, we extend the Cross-document Event Ordering task presented at SemEval 2015 by specifying two new tasks for, respectively, Multilingual and Cross-lingual Timeline Extraction. We then develop three deterministic algorithms for timeline extraction based on two main ideas. First, we address implicit temporal relations at document level since explicit time-anchors are too scarce to build a wide coverage timeline extraction system. Second, we leverage several multilingual resources to obtain a single, inter-operable, semantic representation of events across documents and across languages. The result is a highly competitive system that strongly outperforms the current state-of-the-art. Nonetheless, further analysis of the results reveals that linking the event mentions with their target entities and time-anchors remains a difficult challenge. The systems, resources and scorers are freely available to facilitate its use and guarantee the reproducibility of results.
cs.CL
cs
Multi-lingual and Cross-lingual TimeLine Extraction∗ Egoitz Laparra†, Rodrigo Agerri, Itziar Aldabe, German Rigau IXA NLP group University of the Basque Country (UPV/EHU) Donostia-San Sebasti´an, Basque Country Abstract In this paper we present an approach to extract ordered timelines of events, their partic- ipants, locations and times from a set of multilingual and cross-lingual data sources. Based on the assumption that event-related information can be recovered from different documents written in different languages, we extend the Cross-document Event Ordering task presented at SemEval 2015 by specifying two new tasks for, respectively, Multilingual and Cross-lingual Timeline Extraction. We then develop three deterministic algorithms for timeline extraction based on two main ideas. First, we address implicit temporal relations at document level since explicit time-anchors are too scarce to build a wide coverage timeline extraction system. Second, we leverage several multilingual resources to obtain a single, interoperable, seman- tic representation of events across documents and across languages. The result is a highly competitive system that strongly outperforms the current state-of-the-art. Nonetheless, fur- ther analysis of the results reveals that linking the event mentions with their target entities and time-anchors remains a difficult challenge. The systems, resources and scorers are freely available to facilitate its use and guarantee the reproducibility of results. Keywords: Timeline extraction, Event ordering, Temporal processing, Cross-document event coreference, Predicate Matrix, Natural Language Processing 1 Introduction Nowadays, Natural Language Processing (NLP) may help professionals to access high quality, structured knowledge extracted from large amounts of unstructured, noisy, and multilingual textual sources (Vossen et al., 2016). As the knowledge required usually amounts to reconstructing a chain of previous events, building timelines constitutes an efficient and convenient manner of structuring the extracted knowledge. However, yielding timelines is a high level task that involves information extraction at multiple tiers, including named entities, events or time expressions. Furthermore, it should also be considered that the information required to construct the timeline must be gathered from different parts of a document, or even from different documents. Thus, coreferential mentions of entities and events must be properly identified. For example, a named entity can be mentioned using a great variety of surface forms (Barack Obama, President Obama, Mr. Obama, Obama, etc.) and the same surface form can refer to a variety of named entities 1. Furthermore, it is possible to refer to a named entity by means of ∗Preprint submitted to Knowledge Based Systems 17 January, 2017. †Corresponding author: [email protected] 1For example, see http://en.wikipedia.org/wiki/Europe_(disambiguation) 1 anaphoric pronouns and co-referent nominal expressions such as 'he', 'her', 'their', 'I', 'the 35 year old', etc. The same applies to event mentions, which can be verbal predicates or verbal nominaliza- tions. Thus, the following two sentences contain different mentions of the same event, namely, that a gas pipe exploded, via the two different predicates 'exploded' and 'blast'. Furthermore, while Ex- ample (1) allows us to explicitly time-anchor the event via the temporal expression 'yesterday', that does not occur in the second example. In this context, building a timeline amounts to detecting and temporal ordering and anchoring the events in which a target named entity participates. (1) A leak was the apparent cause of yesterday's gas blast in central London. (2) A gas pipe accidentally exploded in central London. Only material damage was reported. Temporal relation extraction has been the topic of different SemEval tasks (Verhagen et al., 2007, 2010; UzZaman et al., 2013; Llorens et al., 2015) and other challenges as the 6th i2b2 NLP Challenge (Sun et al., 2013). These tasks have focused mainly on the temporal relations of events with respect to other events or time expressions, and their goal is to discover which of them occur before, after or simultaneously with respect to others. Recently, SemEval 2015 included a novel task regarding temporal information extraction (Minard et al., 2015). The aim of SemEval 2015 task 4 was to order in a timeline the events in which a target en- tity is involved. The task presents some significant differences with respect to previous evaluation settings. First, temporal information must be recovered from different sources across documents. Second, timelines are focused on the events pertaining just to a single given target entity. Finally, unlike previous challenges, SemEval 2015 task 4 requires a complete time anchoring. In this work we build on the SemEval 2015 Timeline extraction task to present a system and framework to perform Multilingual and Cross-lingual Timeline Extraction. This is based on the assumption that timelines and events can be recovered from a variety of data sources across documents and across languages. In doing so, this paper presents a number of novel contributions. Contributions The original Cross-document event ordering task defined for SemEval 2015 (main Track A) is extended to present two novel tasks for two languages (English and Spanish) on Multilingual and Cross-lingual timeline extraction, respectively. The tasks also generated publicly available annotated datasets for trial and evaluation. Additionally, two new evaluation metrics improve the evaluation methodology of the SemEval 2015 task to address both the multilingual and cross-lingual settings. Interestingly, we also show that the temporal relations that explicitly connect events and time expressions are not enough to obtain a full time-anchoring annotation and, consequently, pro- duce incomplete timelines. We propose that for a complete time-anchoring the temporal analysis must be performed at a document level in order to discover implicit temporal relations. Fur- thermore, we show how to effectively leverage multilingual resources such as the PredicateMatrix (L´opez de Lacalle et al., 2014) and DBpedia2 to improve the performance in a more realistic set- ting of building cross-lingual timelines when no parallel data as input is available. We present a deterministic approach that obtains, by far, the best results on the main Track A of SemEval 2015 task 4. Our deterministic approach is fledged out via three different timeline extraction systems which extend an initial version presented in Laparra et al. (2015). To guarantee reproducibility of results we also make publicly available the systems, datasets and scripts used to perform the evaluations 3. 2http://wiki.dbpedia.org/. 3http://adimen.si.ehu.es/web/CrossTimeLines 2 Next section reviews related work, focusing on the SemEval 2015 Timeline extraction task. Next, Section 3 describes the two new Cross-lingual and Multilingual Timeline extraction tasks. The construction of the datasets for the new tasks occupies Section 4 and Section 5 formulates the evaluation methodology employed in this work. In section 7 we report the evaluation results obtained by the systems previously presented in Section 6. Finally, Section 8 provides an error analysis to discuss the results and contributions of our approach while Section 9 highlights the main aspects of our work and future directions. 2 Related work The present work is directly related to the SemEval 2015 task 4, Timeline: Cross-document event ordering (Minard et al., 2015). Its aim is to combine temporal processing and event coreference resolution to extract from a collection of documents a set of timelines of events pertaining to a specific target entity. The notion of event is based on the TimeML definition, namely, an event is considered to be a term that describes a situation or a state or circumstance that can be held as true (Pustejovsky et al., 2003b). In fact, the Timeline extraction task is in turn quite close to the TempEval campaigns (Verhagen et al., 2007, 2010; UzZaman et al., 2013; Llorens et al., 2015). Briefly, the problem is formulated as a classification task to decide the type of temporal link that connects two different events or an event and a temporal expression. For that reason, the task has been mainly addressed using supervised techniques. For example, Mani et al. (2006, 2007) trained a MaxEnt classifier using training data which was bootstrapped by applying temporal closure. Chambers et al. (2007) focused on event- event relations using previously learned event attributes. More recently, D´Souza and Ng (2013) combined hand-coded rules with some semantic and discourse features. Laokulrat et al. (2013) obtained the best results in TempEval 2013 annotating sentences with predicate-role structures, while Mirza and Tonelli (2014) state that using a simple feature set results in better performances. Other recent works such as Chambers et al. (2014) have pointed out that these tasks cover just a part of all the temporal relations that can be inferred from the documents. The SemEval 2015 timeline extraction task proposed two tracks, depending on the type of data used as input. The main track A for which only raw text sources were provided, and Track B, where gold event mentions were also annotated. For each of the two tracks a sub-track was also proposed in which the assignment of time anchoring was not taken into account for the evaluation. No training data was provided for any of the tracks. Track A received three runs from two participants: the WHUNLP and SPINOZAVU teams. Both approaches were based on applying a pipeline of linguistic processors including Named En- tity Recognition, Event and Nominal Coreference Resolution, Named Entity Disambiguation, and temporal processing (Minard et al., 2015). The SPINOZAVU system was further developed in Caselli et al. (2015). The Track B approaches, represented by the two participants HEIDELTOUL and GPLSIUA, substantially differ from those of Track A because the event mentions pertaining to the target entity are already provided as gold annotations. Therefore, those systems focused on event coreference res- olution and temporal processing (Minard et al., 2015). Two recent works have been recently pub- lished on Track B: an extension of the GPLSIUA system (Navarro-Colorado and Saquete, 2016), and a distant supervision approach using joint inference (Cornegruta and Vlachos, 2016). Track A is, in our opinion, the most realistic scenario as systems are provided a collection of raw text documents and their task is to extract the timeline of events for each of the target entities. More specifically, the input provided is a set of documents and a set of target entities (organization, people, product or financial entity) while the output should consist of one timeline 3 (events, time anchors and event order) for each target entity. Compared to previous works on Track A of the SemEval 2015 Timeline extraction task, our ap- proach differs in several important ways. Firstly, it addresses the extraction of implicit information to provide a better time-anchoring (Palmer et al., 1986; Whittemore et al., 1991; Tetreault, 2002). More specifically, we are inspired by recent works on Implicit Semantic Role Labelling (ISRL) (Gerber and Chai, 2012) and, specially, on Blanco and Moldovan (2014) who adapted ISRL to fo- cus on modifiers, including temporal arguments, instead of core arguments or roles. Given that not training data is provided, we developed a deterministic algorithm for timeline extraction loosely inspired by Laparra and Rigau (2013). Secondly, we extend the monolingual approach to make it multi- and cross-lingual, which constitutes a novel system on its own. Finally, our approach outperforms every other previous approach on the task, almost doubling the score of the next best system. 3 Multilingual and Cross-lingual Timeline Extraction Figure 1: Example of multilingual and cross-lingual timelines for the target entity Boeing. The Timeline Extraction definition was formulated as follows: "Given a set of documents and a target entity, the task is to build an event timeline related to that entity, i.e. to detect, anchor in time and order the events involving the target entity" (Minard et al., 2015). As we have already mentioned in the previous section, in this work we will focus on Track A (main track), which is the most demanding and realistic setting of the two: systems are given a set of raw text documents and the task is to extract the timelines. Furthermore, we contribute two novel extensions to the original task: • Multilingual Timeline Extraction: This task straightforwardly extends the SemEval 2015 task to cover new languages. Thus, a parallel set of documents and a set of target entities, common to all languages, are provided. The goal is to obtain a timeline for each target entity in each language independently. • Cross-lingual Timeline Extraction: For this task, the timelines are built from source data in different languages identifying those event mentions that are coreferent across languages. 4 However, unlike in the multilingual setting, every document in every language is considered together so that a single cross-lingual timeline is expected for each of the target entities. These two new tasks are presented here for two languages, namely, English and Spanish. Figure 1 shows an example of both multilingual and cross-lingual timelines for the target entity Boeing. The left-hand side column corresponds to an English timeline extracted from four sentences in two different English documents. On the right-hand side is shown an Spanish timeline obtained from two sentences contained in two different documents. Words in bold refer to the event mentions that compose the timeline. Finally, the box in the bottom depicts a cross-lingual timeline built from sources in both English and Spanish. Coreferent events across languages, such as unveils and revelado, are annotated in the same row, while events that are simultaneous but are no coreferent appear in different rows. The events relationship and acuerdo (in the last two rows) provide such an example. The following section describes in more detail the procedure used to build the datasets for both the Multilingual and Cross-lingual Timeline Extraction tasks. 4 Data Annotation In the original Timeline Extraction task at SemEval 2015 (Minard et al., 2015), the dataset was ex- tracted from the raw text of the English side of the MeanTime corpus (Minard et al., 2016). Given that MeanTime is a parallel corpus that includes manual translations from English to Spanish, Ital- ian and Dutch, it is straightforward to use its Spanish part for the Multilingual and Cross-lingual Timeline Extraction tasks. 4.1 Creation of multilingual and cross-lingual timelines In order to better understand the procedure to create the datasets for the multilingual and cross- lingual settings, a brief overview of the original annotation to create the gold standard timelines for English is provided. For full details of the original annotation, please check the SemEval 2015 task description (Minard et al., 2015). As already mentioned, the input to the task consisted of the target entities, the event mentions and the time anchors. In the following, each of these three aspects are described. Target Entities A set of target entities were selected that belong to type PERSON (e.g. Steve Jobs), ORGANISATION (e.g. Apple Inc.), PRODUCT (e.g. Airbus A380 ), and FINANCIAL (e.g. Nasdaq). The target entities must appear in at least two different documents and be involved in more than two events. Events The annotation of events was restricted by limiting the annotation to events that could be placed on a timeline. Adjectival events, cognitive events, counter-factual events, uncertain events and grammatical events were not annotated. Furthermore, timelines only contain events in which target entities explicitly participate as Agent or Patient. Time anchors A time anchor corresponds to a TIMEX3 of type DATE (Pustejovsky et al., 2003a). Its format follows the ISO-8601 standard: YYYY-MM-DD (i.e. Year, Month, and Day). The finest granularity for time anchor values is DAY; other granularities admitted are MONTH and YEAR (references to months are specified as YYYY-MM and references to years are expressed as YYYY). 5 Creation of multilingual timelines The process described above was followed to create time- lines in Spanish. In both cases, English and Spanish, timelines are represented in tabulated format. Each row contains one event representing an instance of an event occurring at a specific time. The first column of each row indicates the position of the event in the timeline. The second column specifies the time-anchor of the event. Additional columns in the row, if any, refer to the different mentions of that event in the dataset. Each event mention is identified with the document identi- fier, the sentence number and the textual extent of the mention. The document identifier is in turn composed of a prefix specifying the language in which the document is written and its numerical identifier. If two events have the same time-anchor but they are not coreferent, they are placed on different rows. An example of multilingual annotations for English and Spanish is provided by Figure 1. Creation of cross-lingual timelines We automatically cross the annotations from the English and Spanish parallel corpora. The resulting timelines have the same format as the original ones. More specifically, when two mentions of the same event in two different languages refer to the same event then they are included in the same row. The automatic mapping of annotations to construct the cross-lingual timelines was manually revised. A brief example of a cross-lingual dataset is illustrated by the box at the bottom of Figure 1. 4.2 Task dataset The English dataset released for the SemEval 2015 Timeline extraction task consists of 120 Wikinews4 articles containing 44 target entities. The Wikinews articles are focused mostly on four main topics, 30 documents per topic. A split of 30 documents and 6 target entities (each associated to a timeline) are provided as trial data, while the rest is left as evaluation set: 90 documents and 38 target entities (each associated to a timeline). Similarly, the Spanish dataset also contains 120 articles with 44 entities. The trial and test splits for this language are the same as in the English dataset. On the other hand, as the cross-lingual dataset arises from joining the English and Spanish datasets, it contains 240 articles containing same 44 target entities as in the English and Spanish datasets. In this case, the trial split includes 60 documents and 6 target entities while the test set contains the remaining 180 documents and 38 target entities. For all the cases, the trial data contains one ORGANISATION target entity, one PERSON, and 4 PRODUCT entities. With respect to the evaluation set, 18 entities are ORGANISATION, 10 FINANCIAL, 7 PERSON, and 3 of the PRODUCT class. The four topics are the following: (i) Apple Inc. for the trial corpus; (ii) Airbus and Boeing; (iii) General Motors, Chrysler and Ford; and (iv) Stock Market. Table 1 provides some more details about the datasets. It should be noted that although there are 38 target entities, 37 were used for the evaluation because one timeline contained no events. Furthermore, although the three evaluation corpora are quite similar, the timelines created from the Stock Market corpus contain a higher average number of events with respect to those created from the other corpora. Additionally, it can also be seen that the Stock Market timelines contain events from a higher number of different documents. It should also be noticed that although the English and Spanish corpora are parallel translations the number of event instances and mentions in both cases are not exactly the same. This is due to the fact that some of the events from the English corpus cannot be expressed in Spanish with events that comply with the restrictions explained in Section 4.1. For example, in the sentence "Apple Computer would not sell music branded with an apple.", branded can be included as an event mention in the Apple Computer timeline because 4http://en.wikinews.org 6 ) # documents 5 1 0 2 - l a v E m e S ( h s i l g n E h s i n a p S l a u g n i l - s s o r C # sentences # tokens # event mentions # event instances # target entities # timelines # event mentions / timeline # event instances / timeline # docs / timeline # documents # sentences # tokens # event mentions # event instances # target entities # timelines # event mentions / timeline # event instances / timeline # docs / timeline # documents # sentences # tokens # events mentions # event instance # target entities # timelines # events / timeline # event chains / timeline # docs / timeline Trial Test Apple Inc. Airbus 30 446 30 459 276 231 13 13 21.2 17.8 9.1 30 467 30 463 10,343 178 165 6 6 29.7 27.5 5.7 30 454 30 430 9,909 10,058 213 173 12 11 19.4 15.7 4.1 30 431 GM Stock Total 90 1,335 9,916 29,893 757 585 38 37 20.5 15.8 6.2 90 1,343 10,865 10,989 11,058 11,341 33,388 661 522 38 37 17.9 14.0 5.8 180 2,678 21,208 20,898 21,116 21,257 63,271 1,418 586 38 37 38.3 15.8 12.1 244 212 13 13 18.8 16.3 8.5 60 926 195 147 12 11 17.7 13.4 3.7 60 861 187 149 6 6 31.2 24.8 5.5 60 917 364 165 6 6 60.7 27.5 11.5 520 231 13 13 40.0 16.2 17.6 268 181 13 13 20.6 13.9 5.2 30 445 222 163 13 13 17.1 12.5 4.8 60 891 490 181 13 13 37.7 13.9 10.0 408 174 12 11 37.1 15.8 8.2 Table 1: Counts extracted from the Multilingual and Cross-lingual gold datasets. Apple Computer is the Agent of branded. However, in the corresponding translated sentence "Apple Computer no vender´ıa m´usica con una manzana por marca.", it is not possible to identify the Agent of marca, i.e. the translation of branded. 5 Evaluation Methodology The evaluation methodology proposed in SemEval 2015 was based on the evaluation metric used for TempEval3 (UzZaman et al., 2013). The metric aims at capturing the temporal awareness of an annotation by checking the identification and categorization of temporal relations. In order to do this, UzZaman et al. (2013) compare the graph formed by the relations given by a system (Sysrelation) and the graph of the reference (gold standard) annotations (Refrelation). From these graphs, their closures (Sys+ relation) are relation) and reduced forms (Sys− relation, Ref + relation, Ref − 7 obtained. The reduced form is created by removing redundant relations (those that can be inferred from other relations) from the original graph. In this setting, Precision and Recall metrics are then calculated as follows: P recision = Sys− relation Sys− relation ∩ Ref + relation relation ∩ Sys+ relation Ref − relation Recall = Ref − Precision is calculated by counting the number of relations in the reduced system graph relation) that can be found in the closure reference graph (Ref + relation) out of total number of (Sys− relation). Recall corresponds to the number of relations relations in the reduced system graph (Sys− relation) that can be verified from the closure system graph in the reduced reference graph (Ref − (Sys+ relation). At the original SemEval 2015 task the following steps were proposed to transform the timelines into graphs of temporal relations: relation) out of the total number of relations in the reduced reference graph (Ref − 1. Every time anchor is represented as a TIMEX3. 2. Each event is related to one TIMEX3 by means of the SIMULTANEOUS relation type. 3. If one event occurs before another one, a BEFORE relation type is created between both events. 4. If one event occurs at the same time as other event, a SIMULTANEOUS relation type links both events. Figure 2 shows the resulting graph after applying these four steps to the cross-lingual timeline in Figure 1. The doted lines represent the implicit relations that will be part of the closure, while the grey lines represent the redundant relations absent in the reduced graph. For example, the SIMULTANEOUS relation between en-unveils and es-revelado can be inferred from the fact that both events are linked to the same TIMEX3 anchor via a SIMULTANEOUS relation. Final scores are based on the micro-average of the individual F1 scores for each timeline, namely, the scores are averaged over the events of the timelines of each corpus. The micro-averaged precision and recall values are also provided. However, it is important to note that this evaluation method does not distinguish coreferent events, namely, mentions of the same event, from those that simply occur at the same time (simul- taneous). In this sense, in Figure 2, the same SIMULTANEOUS relation is used to connect two coreferent events such as en-unveils and es-revelado, and two events en-relationship and es-acuerdo, that simply occur at the same time (e.g., they are not coreferent). Hence, while this methodology is sufficient to check the temporal ordering of events, it is not adequate for cross-lingual timeline extraction, because it is crucial to identify that two event mentions refer to the same event across languages. In order to address this issue, this paper extends the original evaluation method from the Timeline Extraction SemEval 2015 task and proposes two alternative scoring methods. 5.1 Strict evaluation In the strict evaluation method a timeline must contain every mention of the events that can be found in the document set. Moreover, event mentions referring to the same event should be identified and distinguished from those that simply occur at the same time. With this aim in mind, the following changes are proposed: 8 Figure 2: Time graph produced by original SemEval 2015 evaluation. Grey lines represent redun- dant relations. • Coreferent events are not linked via the SIMULTANEOUS relation but by means of a new IDENTITY relation. • The IDENTITY relations are never removed from the reduced graphs. They are not redun- dant. The strict temporal graph depicted in Figure 3 shows the graph obtained applying our new methodology. Whereas in the original graph in Figure 2 the coreferent events en-unveils and es-revelado are linked by a redundant SIMULTANEOUS relation, in Figure 3 a non-redundant IDENTITY relation links those two events. Figure 3: Time graph produced by Strict evaluation. Grey lines represent redundant relations. 9 Note that this method is more demanding in terms of precision because it adds the extra difficulty of distinguishing between IDENTITY and SIMULTANEOUS relations. Moreover, the set of temporal relations that must be captured is larger because the IDENTITY relations will not be removed when producing the reduced graphs. Thus, this also makes the task more demanding in terms of recall. That is why this evaluation method is named strict evaluation. 5.2 Relaxed evaluation A second alternative stems from considering that, instead of using every event mention, a timeline could be composed of event types. Thus, coreferent events would be grouped as a single event by removing their temporal relations. The following changes are then performed with respect to the original SemEval 2015 evaluation: • Every relation between coreferent events is removed. • All the SIMULTANEOUS relations between coreferent events and a TIMEX3 anchor are reduced to a single relation. These changes are explicitly shown by Figure 4. It can be seen that there is no relation linking the en-unveils and es-revelado coreferent events. Furthermore, the SIMULTANEOUS relations that connected those event with their TIMEX3 have been reduced to one, namely, they are now linked to the event type (or to every mention of one specific event). Figure 4: Time graph produced by Relaxed evaluation. Grey lines represent redundant relations. In this method the number of relations that must be captured is smaller because detecting just one of the coreferent event mentions shall be enough. Thus, this evaluation is more relaxed in terms of recall. However, it is still required to properly detect coreferent events, otherwise they will be evaluated as different instances, consequently harming the precision. 10 6 Automatic Cross-lingual TimeLine extraction This section presents our approach for timeline extraction, including both multilingual and cross- lingual systems. Given a set of documents and a target entity, a three step process is applied. First, the mentions of the target entity are identified. Second, the events in which the target entity is involved are selected. Finally, those events are anchored to their respective normalized time expressions. Once this process is completed, the events are sorted and the timeline built. In the following we describe the three different systems for Timeline extraction applied to the tasks previously described. Section 6.1 introduces the baseline (BTE) system. BTE performs time- line extraction by combining the output of a NLP pipeline for both English and Spanish. The base- line system is then improved in section 6.2 by applying the algorithm presented in Laparra et al. (2015) to perform document level time-anchoring (DLT). While both BTE and DLT can be used for multilingual timeline extraction, their performance in the cross-lingual setting is not as good as in the English and Multilingual tasks. Thus, in section 6.3 we propose a new approach to obtain interoperable annotations across languages from the same NLP pipelines used for BTE in section 6.1. We can then use this approach to identify coreferent event mentions across languages which is crucial to build cross-lingual timelines. 6.1 BTE: Baseline TimeLine Extraction Detecting mentions of events, entities and time expressions in text requires the combination of various NLP tools. We apply the NewsReader NLP pipelines (Vossen et al., 2016) that includes, both for English and Spanish, Named Entity Recognition (NER) and Disambiguation (NED), Coreference Resolution (CR), Semantic Role Labelling (SRL), Time Expressions Identification (TEI) and Normalization (TEN), and Temporal Relation Extraction (TRE). Table 2 lists the specific tools used for English and Spanish. English Spanish Agerri and Rigau (2016) Bjorkelund et al. (2009) Daiber et al. (2013) Agerri et al. (2014) NER NED CR SRL TEI Mirza and Minard (2014) Strotgen et al. (2013) TEN Mirza and Minard (2014) Strotgen et al. (2013) TRE Mirza and Tonelli (2014) Llorens et al. (2010) Table 2: English and Spanish NLP tools. The extraction of target entities, events and time anchors is performed as follows: (1) Target entity identification: The target entities are identified by the NER and NED modules. As the surface form of the candidate entities can vary greatly, we use the redirect links contained in DBpedia to extend the search of the events involving those target entities. For example, if the target entity is Toyota the system would also include events involving the entities Toyota Motor Company or Toyota Motor Corp. In addition, as the NED does not always provide a link to DBpedia, we also check if the wordform of the head of the event argument matches with the head of the target entity. (2) Event selection: We use the output of the SRL module to extract the events that occur in a document. Given a target entity, we combine the output of the NER, NED, CR and SRL to obtain those events that have the target entity as filler of their ARG0 or ARG1. We also set some constraints to select certain events according to the specification of the SemEval task. 11 Specifically, we only return those events that are not within the scope of a negation and that are not accompanied by modal verbs (except will ). (3) Time-anchoring: The time-anchors are identified using the TRE and SRL output. From the TRE, we extract as time-anchors those relations between events and time expressions identified as SIMULTANEOUS. From the SRL those ARG-TMP related to time expressions. In both cases we use the time expression returned by the TEI module. The tests performed on the trial data showed that the best choice for time-anchoring results from combining both options. For each time-anchor we normalize the time expression using the annotations provided by the TEN module. 6.2 DLT: Document Level Time-anchoring Figure 5: Example of time-anchoring at document level. The explicit time anchors provided by the NLP tools presented in previous section 6.1 do not cover the full set of events involving a particular entity. In other words, most events do not have an explicit time anchor and therefore are not captured as part of the timeline of that entity. This means that we have to be able to also recover those time-anchors that are implicitly conveyed in the text. In Laparra et al. (2015) we devised a simple strategy to capture implicit time-anchors while maintaining the coherence of the temporal information in the document. The rationale behind the algorithm shown in Algorithm 1 is that, by default, the events of a specific entity that appear in a document tend to occur at the same time as previous events involving the same entity (unless explicitly stated). For example, in Figure 5 every event related to Steve Jobs, such as gave and announced, are anchored to the same time expression (Monday) even though it is only explicitly conveyed for the first event gave. This example also illustrates the fact that for those other events that occur at different times, their time-anchor is also explicit, as it can be seen for the Tiger and Mac OS X Leopard entities. The application of Algorithm 1 starts taking as input the annotation obtained by the NLP described in Section 6.1. For each entity a list of events (eventList) is created sorted by appearing order. Next, for each event in the list the DLT system checks whether that event already has assigned a time-anchor (eAnchor). If that is the case, that time-anchor is included in the list of default time-anchors (def aultAnchor) for any subsequent events of the entity in the same verb tense (eT ense). If the event does not yet have an explicit time-anchor assigned, but the system has found a time-anchor for a previous event in the same tense (def aultAnchor[eT ense]), this time-anchor is also assigned to the current event (eAnchor). If none of the previous conditions hold, then the algorithm anchors the event to the Document Creation Time (DCT) attribute 12 and sets this time-expression as the default time-anchor for any subsequent events in the same verbal tense. Algorithm 1 Implicit Time-anchoring 1: eventList = sorted list of events of an entity 2: for event in eventList do 3: 4: eAnchor = time anchor of event eT ense = verb tense of event if eAnchor not N U LL then def aultAnchor[eT ense] = eAnchor else if def aultAnchor[eT ense] not N U LL then eAnchor = def aultAnchor[eT ense] else eAnchor = DCT def aultAnchor[eT ense] = DCT 5: 6: 7: 8: 9: 10: 11: end if 12: 13: end for The DLT system build the timeline by ordering the events according to the explicit and implicit time-anchors. Note that Algorithm 1 strongly depends on the tense of the mentions of events appearing in the document. As this information can be only recovered from verbal predicates, this strategy cannot be applied to events conveyed by nominal predicates. Consequently, for these cases just explicit time-anchors are taken into account. 6.3 CLE: Cross-Lingual Event coreference As it has been already mentioned, cross-lingual timeline extraction crucially depends on being able to identify those events that are coreferent across languages (not only across documents). In order to address this issue, we propose a language independent knowledge representation for cross-lingual semantic inter-operability at three different annotation levels. First, we used interconnected links in the DBpedia entries to perform cross-lingual Named En- tity Disambiguation (NED). The NED module used in the NLP pipeline for BTE provides links to the English and Spanish versions of the DBpedia. Thus, a mention of New York in English should link as external reference to the the identifier http://dbpedia.org/page/New_York. Sim- ilarly, a mention of Nueva York in Spanish should produce as external reference the identifier http://es.dbpedia.org/page/Nueva_York. As both identifiers are connected within the DBpe- dia, we can just infer that those two pointers refer to the same target entity regardless of the language in which the mentions of that entity are expressed. Second, we obtain inter-operability across languages and Semantic Role Labeling annotations by means of the PredicateMatrix (L´opez de Lacalle et al., 2016a,b). The event representation provided by our SRL systems are based on PropBank, for English, and AnCora (Taul´e et al., 2008), for Spanish. The PredicateMatrix gathers knowledge bases that contain predicate and semantic role information in different languages, including links between PropBank and AnCora. Using these mappings, we can establish, for example, that the role arg0 of the Spanish predicate vender.1 is aligned to the role A0 of the PropBank predicate sell.01. Finally, the TEN modules normalize time expressions following the ISO 24617-1 standard (Pustejovsky et al., 2010). For example, if temporal expressions such as next Monday, tomor- row, and yesterday in English or ayer and el pr´oximo lunes in Spanish are referring to the same 13 exact date (let's say November 16th, 2015), then they will be normalized to the same TIMEX3 value corresponding to 2015-11-16. We can include these three levels of cross-lingual information to extend the multilingual system DLT presented in the previous section. When extracting the cross-lingual timeline for a given target entity, expressed as eE and eS in English and Spanish respectively, the system establishes that the English event pE and the Spanish event pS are coreferent if the following conditions are satisfied: 1. eE and eS are connected by DBpedia links to the same entity. 2. eE plays the role rE of pE, eS plays the role rS of pS, and rE and rS are linked by a mapping in the PredicateMatrix. 3. pE is anchored to a TIMEX3 tE, pS is anchored to a TIMEX3 tS and tE and tS are normalized to the same ISO 24617-1. The CLE system uses the same strategy as DLT to build timelines with the difference that cross-lingual coreferent events are identified. 7 Experimental Results In this section we present a set of experiments in order to evaluate the three timeline extraction systems presented in the previous section: (i) the BTE baseline system based on the analysis given by a pipeline of NLP tools; (ii) the DLT algorithm that aims at capturing implicit time- anchoring at document level; and (iii) the CLE system to address cross-lingual event co-reference. The evaluations are undertaken for the original English SemEval 2015 task as well as for the Multilingual and Cross-Lingual Timeline Extraction tasks proposed in section 3. Every result is evaluated using the original SemEval 2015 metric as well as the strict and relaxed metrics introduced in section 5. 7.1 Multilingual evaluation In this setting we evaluate both BTE and DLT systems on the Track A (main track) of the TimeLine Extraction task at SemEval 2015 and on the Multilingual task described in section 3. Track A at SemEval 2015 had just two participant teams, namely, WHUNLP and SPINOZAVU, which submitted three runs in total. Their scores in terms of Precision (P), Recall (R) and F1 are presented in Table 3. We also present in italics additional results of both systems obtained after the official evaluation task (Caselli et al., 2015). The best run was obtained by the corrected version of WHUNLP 1 with an F1 of 7.85%. The low figures obtained show the difficulty of the task. Table 3 also contains the results obtained by our systems. The results obtained by our baseline system, BTE, are similar to those obtained by WHUNLP 1. However, the results of the implicit time-anchoring approach (DLT) clearly outperforms our baseline and every other previous result in this task. This result would imply that a full time-anchoring annotation requires that a temporal analysis be carried out at document level. As expected, Table 3 also shows that the improvement of DLT over BTE is much more significant in terms of Recall. Table 4 provides the results obtained by BTE and DLT in the Multilingual Timeline extraction setting using also the strict and relaxed evaluation metrics described in Section 5. Predictably, the strict evaluation is the most demanding, specially in terms of Recall. With respect to the 14 System SPINOZAVU-RUN-1 SPINOZAVU-RUN-2 WHUNLP 1 OC SPINOZA VU WHUNLP 1 BTE DLT F1 P 3.15 7.95 1.05 8.16 7.28 14.10 7.12 - 7.85 14.59 24.56 7.39 21.00 11.01 14.45 R 1.96 0.56 4.90 - 5.37 4.35 Table 3: Results on the SemEval-2015 task English R 4.35 Spanish F1 R 7.39 12.07 4.25 Scorer SemEval-2015 strict-evaluation relaxed-evaluation P System P F1 BTE 24.56 6.29 DLT 21.00 11.01 14.45 12.77 8.60 10.28 5.55 BTE 24.56 DLT 21.00 9.28 BTE 24.12 7.15 DLT 19.39 12.95 15.53 11.47 9.72 10.52 3.62 6.32 12.07 3.60 9.18 12.77 12.77 7.29 5.32 8.71 11.55 5.18 Table 4: Results on the multilingual task. results obtained using the relaxed scorer, precision is lower whereas recall is higher with respect to the other two metrics. Furthermore, DLT outperforms BTE whatever the language and the evaluation methodology. It is also remarkable that the results obtained for English are always better than the results for Spanish. This can be explained by the differences in the performances of the English and Spanish NLP modules. 7.2 Cross-lingual evaluation The dataset for cross-lingual timelines contains 180 documents (see Section 4), of which half are Spanish translations of the other half written in English. This fact allows us to set different experiments by varying the percentage of documents written in each language that are provided as input. Three different experiments were performed in order to evaluate our systems on the Cross-lingual Timeline extraction task. Full data For the first experiment, we use as input the full collection (180 documents) inde- pendently of the language. As shown by Table 5, the results using the SemEval 2015 scoring method, as it was the case in the multilingual setting, the DLT system almost doubles the score of the baseline system BTE. Furthermore, DLT and CLE obtain exactly the same results because co-referent events are not taken into account. However, the strict and relaxed scoring methods proposed in this work make it possible to distinguish between the performances of the two sys- tems. Not surprisingly, the scoring by strict evaluation continues to be the lowest. Overall, CLE outperforms DLT being only in terms of precision (relaxed evaluation) or in both precision and recall (strict evaluation). 50-50 split As we believe that the availability of a set of parallel documents as input is not the most realistic scenario, we design another setting by choosing at random 50% of the documents in 15 Scorer SemEval-2015 strict-evaluation relaxed-evaluation R 4.68 F1 P System BTE 13.98 7.02 DLT 14.96 10.74 12.50 14.96 10.74 12.50 CLE BTE 13.98 5.10 3.12 7.14 DLT 14.96 9.67 8.47 11.22 16.59 CLE BTE 10.13 8.16 9.04 9.75 17.70 12.57 DLT 10.97 17.70 13.55 CLE Table 5: Results on the cross-lingual task each language, namely, 45 documents for English and 45 for Spanish respectively. The resulting input set would contain 90 non-parallel documents in two languages without the mentions of the events that belong to documents not included in the final collection of 90 documents. Furthermore, we automatically generate not just one but 1, 000 different 50-50 input sets of 90 documents at random, namely, each of the thousand sets contain 45 documents in each language. The box-plots in Figure 6 show the results obtained by our systems in this experiment applying the strict and relaxed evaluation methodologies to the one thousand evaluation sets. Following the trend of previous results, both DLT and CLE outperform the baseline system with CLE obtaining the best overall performance. The F1 score differences between DLT and CLE using both evaluation methods are significant with p < 0.001.5 In any case, the results show that performance between DLT and CLE has reduced with regard to the results obtained in the previous experiment reported by Table 5. Our hypothesis is that as the set of input documents in this experiment has been halved, the number of coreferent mentions in the gold-standard is much lower, which means that the advantage of CLE over DLT is not that meaningful. The most remarkable variation can be observed in the Recall values obtained using the relaxed evaluation. This is not that strange if we consider that in the relaxed evaluation detecting only one mention of an event is enough. Varying input per language This last experiment was designed to study how varying the number of documents per language affects the performance in the cross lingual setting. The line charts in Figure 7 show the results obtained varying the percentage of the documents being used. On the left-hand side plot we show the results of experiments using a range of 5% to 95% documents for both languages (Spanish on top, English at the bottom). Now, for each point in the range we randomly generate 30 input sets. For example, at the 10% Spanish and 90% English 30 different configurations are randomly generated each of which would contain 81 English documents and 9 Spanish documents (90 documents in total). In the experiments reported by the central and right-hand size plots, we use the above method to generate 30 input sets for each point in the range, but with two important differences. Firstly, every document in one language is alternatively used (English in the central plot and Spanish on the right-hand side) and we increase the number of documents in the other language from 5% up to 95% (when the 180 documents are used). Secondly, in these two cases parallel documents are allowed. For all three cases each point represents the arithmetic mean of the output given for the 30 5We have used the paired t-test to compare the F 1 obtained by the systems. 16 11.218 10.693 4 1 2 1 0 1 8 e r o c s F − o r c M i 6 5.721 i i n o s c e r P − o r c M i 14.531 14.704 15.081 8.939 8.41 0 1 8 6 4 l l a c e R − o r c M i 3.567 8 1 6 1 4 1 2 1 0 1 4 6 1 4 1 2 1 0 1 8 6 e r o c s F − o r c M i BTE DLT CLE BTE DLT CLE BTE DLT CLE 12.397 12.628 7.566 8 1 6 1 4 1 2 1 0 1 14.313 13.929 14.313 11.565 11.565 4 1 2 1 0 1 8 6 4 l l a c e R − o r c M i 5.154 i i n o s c e r P − o r c M i BTE DLT CLE BTE DLT CLE BTE DLT CLE Figure 6: Evaluation 50-50. The top row results are calculated using the strict metric whereas the results at the bottom row refer to the relaxed evaluation method. different input document sets generated without replacement. The evaluation method used is relaxed due to the fact that we start with the full set of possible events. Thus, varying or increasing the number of documents in the other language does not in fact increase the number of events, just (possibly) the number of event mentions. Therefore, the relaxed method allows us to focus on studying whether adding parallel documents in other language improves the overall F1 score, paying particular attention to the Recall. The results illustrate that the CLE F1 score keeps degrading as we include Spanish documents into the fold. This is somewhat explained by CLE results obtained in Table 4 where the performance 17 of the Spanish system is much worse that its English counterpart. Spanish English Spanish 0.95 0.85 0.75 0.65 0.55 0.45 0.35 0.25 0.15 0.05 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 F P R 0 2 5 1 0 1 5 0 F P R 0 2 5 1 0 1 5 0 F P R 0 2 5 1 0 1 5 0 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 English Spanish English Figure 7: Varying the number of input documents per language. The y axis en each box represents the percantage of documents used for each language. 8 Error Analysis As shown in Section 6.1, our baseline approach for timeline extraction (on which DLT and CLE build) is based on the output of a set of NLP modules. Now, although they are state-of-the-art tools on standard evaluation data, they still produce cascading errors, most notably when applied to out-of-domain data (see Table 8 at Vossen et al. (2016)). The aim of this section is to identify the main source of errors. full (BTE) full (DLT) SRL SRL+NER+NED SRL+NER+NED+CR SRL+TEI+TEN+TRE (BTE) SRL+TEI+TEN+TRE (DLT) English Spanish Cross-lingual 8.20 19.83 63.04 20.97 22.25 19.47 50.43 6.04 19.55 72.06 22.01 23.95 13.72 46.16 8.43 17.70 56.29 17.67 17.67 21.50 53.21 Table 6: Percentage of events captured by the pipelines. SRL+NER+NED+CR+TEI+TEN+TRE. The full rows correspond to In a first experiment we study the capability of our system for extracting those events that participate in the timelines, regardless of time ordering. The first two rows in Table 6 show that the DLT system is able to extract way more events than the BTE baseline system, however in both cases the percentage of events captured is still low. To study the causes of these figures we have repeated the same experiment with partial combinations of the NLP modules. As explained in Section 6.1, we use a SRL system to detect event mentions. Table 6 shows that for English the SRL module detects more events than for Spanish (72.06% vs 56.29%). This is largely due to the Spanish SRL not dealing correctly with verbal nominalizations. In order to extract only those events that are linked to the target entity, we use the combined output of the SRL, NER, NED and CR tools (see Section 6.1). Table 6 shows that this is a very 18 difficult step and that the percentage of events identified is rather low. Detecting and linking every mention of an entity is a very difficult task, specially in the case of pronouns. As it can be seen, the coreference module helps although not as much as it would have been expected. The final two rows of Table 6 report on the results obtained when only events with a time anchor are included in a timeline. The number of events linked to a explicit time-anchor by our BTE baseline system is very low whereas looking at the implicit anchors in the DLT system helps to substantially improve the results. Notice that in this case the figures are higher for Spanish (21.50% and 53.21%) than for English (13.72% and 46.16%). This means that time modules for Spanish try to anchor more events that the English modules. In a second experiment we study the quality of the time anchoring. Table 7 shows the accuracy of the time-anchors for the events that we know have been correctly identified. It makes sense that the accuracy of DLT be much lower than just taking into account explicit time-anchors as BTE does. However, it should be noted that number of events extracted by the DLT system is much higher than BTE (as per Table 6), which means that accuracy for DLT is calculated over a much larger number of correctly identified event mentions. As can be seen, the English systems perform better than the Spanish systems. As explained above, the Spanish modules try to time-anchor more events and this fact can explain that they obtain a lower accuracy. English Spanish Cross-lingual 68.70 62.59 69.49 51.31 50.70 46.98 BTE DLT Table 7: Accuracy of the time-anchoring for extracted events. 9 Concluding Remarks In this work we present a system to perform Multilingual and Cross-lingual Timeline Extraction (or Cross-document event ordering). In doing so, this paper presents a number of novel contributions. Firstly, the original Cross-document event ordering task defined for SemEval 2015 (main Track A) has been extended to present two novel tasks for two languages (English and Spanish) on Multilingual and Cross-lingual timeline extraction respectively. The annotated datasets for trial and evaluation are publicly available. Secondly, two new evaluation metrics improve the evaluation methodology of the SemEval 2015 task in two ways: (i) A new strict metric allows to evaluate timelines containing coreferent event mentions across both documents and languages; and (ii) a relaxed evaluation metric where event types (instead of mentions) can be considered, somewhat diminishing the importance of recall when evaluating the timelines. Thirdly, three deterministic Timeline extraction systems have been developed to address the three tasks. In fact, we have empirically demonstrated that addressing implicit time-anchors at document level (DLT system) crucially improves the performance in the three tasks, clearly out- performing previously presented systems in the (main) Track A of the original Timeline Extraction task at SemEval 2015. Furthermore, we have shown how to effectively use cross-lingual resources such as the PredicateMatrix and DBpedia along with time normalization to improve the perfor- mance of the DLT system in the most realistic setting of building cross-lingual timelines without parallel data as input (see Figure 6). Finally, we have analyzed the cascading errors produced by the NLP pipeline used to identify the entities, events and time-anchors. The results allow to conclude that the most difficult obstacles 19 reside in detecting and resolving every mention of entities related to the relevant mention events and the identification of time-anchors when they are not explicitly conveyed. These two aspects shall point out future work towards improving timeline extraction. Acknowledgments This work has been supported by the European projects QTLeap (EC-FP7-610516) and News- Reader (EC-FP7-316404) and by the Spanish Ministry for Science and Innovation (MICINN), SKATER (TIN2012-38584-C06-01) and TUNER (TIN2015-65308-C5-1-R). References Agerri, R., Bermudez, J., Rigau, G., 2014. IXA pipeline: Efficient and Ready to Use Multilingual NLP tools, in: Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC-2014). Agerri, R., Rigau, G., 2016. Robust multilingual named entity recognition with shallow semi- supervised features. Artificial Intelligence 238, 63–82. Bjorkelund, A., Hafdell, L., Nugues, P., 2009. Multilingual semantic role labeling, in: Proceedings of the Thirteenth Conference on Computational Natural Language Learning: Shared Task, pp. 43–48. Blanco, E., Moldovan, D., 2014. Leveraging verb-argument structures to infer semantic relations, in: Proceedings of the 14th Conference of the European Chapter of the Association for Compu- tational Linguistics, Gothenburg, Sweden. pp. 145–154. Caselli, T., Fokkens, A., Morante, R., Vossen, P., 2015. SPINOZA VU: An nlp pipeline for cross document timelines, in: Proceedings of the 9th International Workshop on Semantic Evaluation (SemEval 2015), Denver, Colorado. pp. 786–790. Chambers, N., Cassidy, T., McDowell, B., Bethard, S., 2014. Dense event ordering with a multi- pass architecture. Transactions of the Association for Computational Linguistics 2, 273–284. Chambers, N., Wang, S., Jurafsky, D., 2007. Classifying temporal relations between events, in: Proceedings of the 45th Annual Meeting of the ACL on Interactive Poster and Demonstration Sessions, Prague, Czech Republic. pp. 173–176. Cornegruta, S., Vlachos, A., 2016. Timeline extraction using distant supervision and joint inference, in: Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing (EMNLP 2016), pp. 1936–1942. Daiber, J., Jakob, M., Hokamp, C., Mendes, P.N., 2013. Improving efficiency and accuracy in multilingual entity extraction, in: Proceedings of the 9th International Conference on Semantic Systems (I-Semantics). D´Souza, J., Ng, V., 2013. Classifying temporal relations with rich linguistic knowledge, in: Proceed- ings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Atlanta, Georgia. pp. 918–927. 20 Gerber, M., Chai, J., 2012. Semantic role labeling of implicit arguments for nominal predicates. Computational Linguistics 38, 755–798. L´opez de Lacalle, M., Laparra, E., Rigau, G., 2014. Predicate matrix: extending semlink through wordnet mappings, in: The 9th edition of the Language Resources and Evaluation Conference (LREC 2014). Reykjavik, Iceland. Laokulrat, N., Miwa, M., Tsuruoka, Y., Chikayama, T., 2013. Uttime: Temporal relation classifi- cation using deep syntactic features, in: Second Joint Conference on Lexical and Computational Semantics (*SEM), Volume 2: Proceedings of the Seventh International Workshop on Semantic Evaluation (SemEval 2013), Atlanta, Georgia, USA. pp. 88–92. Laparra, E., Aldabe, I., Rigau, G., 2015. Document level time-anchoring for timeline extraction, in: Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (ACL-IJCNLP 2015), Beijing, China. Laparra, E., Rigau, G., 2013. Impar: A deterministic algorithm for implicit semantic role labelling, in: Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (ACL 2013), pp. 33–41. Llorens, H., Chambers, N., UzZaman, N., Mostafazadeh, N., Allen, J., Pustejovsky, J., 2015. Semeval-2015 task 5: Qa tempeval - evaluating temporal information understanding with ques- tion answering, in: Proceedings of the 9th International Workshop on Semantic Evaluation (SemEval 2015), Denver, Colorado. pp. 792–800. Llorens, H., Saquete, E., Navarro, B., 2010. Tipsem (english and spanish): Evaluating crfs and semantic roles in tempeval-2, in: Proceedings of the 5th International Workshop on Semantic Evaluation, Association for Computational Linguistics. pp. 284–291. L´opez de Lacalle, M., Laparra, E., Aldabe, I., Rigau, G., 2016a. A multilingual predicate matrix, in: Proceedings of the 10th international conference on Language Resources and Evaluation (LREC 2016), Tartu, Estonia. L´opez de Lacalle, M., Laparra, E., Aldabe, I., Rigau, G., 2016b. Predicate matrix. automatically extending the semantic interoperability between predicate resources. Language Resources and Evaluation 50. Mani, I., Verhagen, M., Wellner, B., Lee, C.M., Pustejovsky, J., 2006. Machine learning of temporal relations, in: Proceedings of the 21st International Conference on Computational Linguistics and the 44th Annual Meeting of the Association for Computational Linguistics, Sydney, Australia. pp. 753–760. Mani, I., Wellner, B., Verhagen, M., Pustejovsky, J., 2007. Three Approaches to Learning TLINKs in TimeML. Technical Report. Minard, A.L., Speranza, M., Agirre, E., Aldabe, I., van Erp, M., Magnini, B., Rigau, G., Urizar, R., 2015. Semeval-2015 task 4: Timeline: Cross-document event ordering, in: Proceedings of the 9th International Workshop on Semantic Evaluation (SemEval 2015), Denver, Colorado. pp. 778–786. Minard, A.L., Speranza, M., Urizar, R., Altuna, B., van Erp, M., Schoen, A., van Son, C., 2016. MEANTIME, the NewsReader Multilingual Event and Time Corpus, in: Proceedings of LREC 2016. 21 Mirza, P., Minard, A.L., 2014. FBK-HLT-time: a complete Italian Temporal Processing system for EVENTI-EVALITA 2014, in: Proceedings of the Fourth International Workshop EVALITA 2014. Mirza, P., Tonelli, S., 2014. Classifying temporal relations with simple features, in: Proceedings of the 14th Conference of the European Chapter of the Association for Computational Linguistics, Association for Computational Linguistics, Gothenburg, Sweden. pp. 308–317. Navarro-Colorado, B., Saquete, E., 2016. Cross-document event ordering through temporal, lexical and distributional knowledge. Knowledge-Based Systems 110, 244 – 254. Palmer, M.S., Dahl, D.A., Schiffman, R.J., Hirschman, L., Linebarger, M., Dowding, J., 1986. Recovering implicit information, in: Proceedings of the 24th annual meeting on Association for Computational Linguistics, New York, New York, USA. pp. 10–19. Pustejovsky, J., Hanks, P., Sauri, R., See, A., Gaizauskas, R., Setzer, A., Radev, D., Sundheim, B., Day, D., Ferro, L., Lazo, M., 2003a. The TIMEBANK corpus, in: Proceedings of Corpus Linguistics 2003, Lancaster. Pustejovsky, J., Lee, K., Bunt, H., Romary, L., 2010. ISO-TimeML: An International Standard for Semantic Annotation, in: Proceedings of the 7th International Conference on Language Resources and Evaluation (LREC'10), European Language Resources Association (ELRA), Val- letta, Malta. Pustejovsky, J., no, J.C., Ingria, R., Saur, R., Gaizauskas, R., Setzer, A., Katz, G., 2003b. Timeml: Robust specification of event and temporal expressions in text, in: in Fifth International Work- shop on Computational Semantics (IWCS-5). Strotgen, J., Zell, J., Gertz, M., 2013. Heideltime: Tuning english and developing spanish resources for tempeval-3, in: Proceedings of the Seventh International Workshop on Semantic Evaluation, SemEval '13, Association for Computational Linguistics, Stroudsburg, PA, USA. pp. 15-19. Sun, W., Rumshisky, A., Uzuner, O., 2013. Evaluating temporal relations in clinical text: 2012 i2b2 Challenge. Journal of the American Medical Informatics Association 20, 806–813. Taul´e, M., Mart´ı, M.A., Recasens, M., 2008. Ancora: Multilevel annotated corpora for catalan and spanish., in: LREC 2008. Tetreault, J.R., 2002. Implicit role reference, in: International Symposium on Reference Resolution for Natural Language Processing, Alicante, Spain. pp. 109–115. UzZaman, N., Llorens, H., Derczynski, L., Allen, J., Verhagen, M., Pustejovsky, J., 2013. Semeval- 2013 task 1: Tempeval-3: Evaluating time expressions, events, and temporal relations, in: Second Joint Conference on Lexical and Computational Semantics (*SEM), Volume 2: Proceedings of the Seventh International Workshop on Semantic Evaluation (SemEval 2013), Atlanta, Georgia, USA. pp. 1–9. Verhagen, M., Gaizauskas, R., Schilder, F., Hepple, M., Katz, G., Pustejovsky, J., 2007. Semeval- 2007 task 15: Tempeval temporal relation identification, in: Proceedings of the 4th International Workshop on Semantic Evaluations, Prague, Czech Republic. pp. 75–80. Verhagen, M., Saur´ı, R., Caselli, T., Pustejovsky, J., 2010. Semeval-2010 task 13: Tempeval-2, in: Proceedings of the 5th International Workshop on Semantic Evaluation, Los Angeles, California. pp. 57–62. 22 Vossen, P., Agerri, R., Aldabe, I., Cybulska, A., van Erp, M., Fokkens, A., Laparra, E., Minard, A.L., Aprosio, A.P., Rigau, G., Rospocher, M., Segers, R., 2016. Newsreader: Using knowledge resources in a cross-lingual reading machine to generate more knowledge from massive streams of news. Knowledge Based Systems 110, 60–85. Whittemore, G., Macpherson, M., Carlson, G., 1991. Event-building through role-filling and anaphora resolution, in: Proceedings of the 29th annual meeting on Association for Computa- tional Linguistics, Berkeley, California, USA. pp. 17–24. 23
1909.05192
3
1909
2019-09-26T09:25:44
The Longer the Better? The Interplay Between Review Length and Line of Argumentation in Online Consumer Reviews
[ "cs.CL", "cs.LG" ]
Review helpfulness serves as focal point in understanding customers' purchase decision-making process on online retailer platforms. An overwhelming majority of previous works find longer reviews to be more helpful than short reviews. In this paper, we propose that longer reviews should not be assumed to be uniformly more helpful; instead, we argue that the effect depends on the line of argumentation in the review text. To test this idea, we use a large dataset of customer reviews from Amazon in combination with a state-of-the-art approach from natural language processing that allows us to study argumentation lines at sentence level. Our empirical analysis suggests that the frequency of argumentation changes moderates the effect of review length on helpfulness. Altogether, we disprove the prevailing narrative that longer reviews are uniformly perceived as more helpful. Our findings allow retailer platforms to improve their customer feedback systems and to feature more useful product reviews.
cs.CL
cs
The Longer the Better? The Interplay Between Review Length and Line of Argumentation in Online Consumer Reviews Bernhard Lutz University of Freiburg, [email protected], Nicolas Prollochs University of Giessen, [email protected] Dirk Neumann University of Freiburg, [email protected] Review helpfulness serves as focal point in understanding customers' purchase decision-making process on online retailer platforms. An overwhelming majority of previous works find longer reviews to be more helpful than short reviews. In this paper, we propose that longer reviews should not be assumed to be uniformly more helpful; instead, we argue that the effect depends on the line of argumentation in the review text. To test this idea, we use a large dataset of customer reviews from Amazon in combination with a state-of-the-art approach from natural language processing that allows us to study argumentation lines at sentence level. Our empirical analysis suggests that the frequency of argumentation changes moderates the effect of review length on helpfulness. Altogether, we disprove the prevailing narrative that longer reviews are uniformly perceived as more helpful. Our findings allow retailer platforms to improve their customer feedback systems and to feature more useful product reviews. Key words : Consumer reviews, word-of-mouth, decision-making, text analysis, e-commerce Introduction Customer reviews on online retailer platforms provide a valuable information source for customers before making purchase decisions (Yin et al. 2016). An interesting feature of modern customer feed- back systems is that they also allow to rate the perceived helpfulness of a product review (Mudambi and Schuff 2010). Previous studies have demonstrated that more helpful customer reviews have a greater influence on retail sales (Dhanasobhon et al. 2007). Research on review helpfulness has received increasing attention lately, mainly because it serves as focal point for analyzing purchase decision-making (Mudambi and Schuff 2010). For example, previous works have found that the review rating is an important determinant of review helpfulness (e. g. Pavlou and Fygenson 2006). In addition to meta data, online customer reviews typically contain review texts detailing customer opinions or user experiences (Zimmermann et al. 2018). An overwhelming majority of previous 1 2 Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes works identify the length of the review text, e. g. the number of sentences, as a key explanatory variable and unanimously find longer reviews to be more helpful than short reviews (e. g. Mudambi and Schuff 2010, Pan and Zhang 2011, Yin et al. 2016). A plausible explanation is that longer reviews tend to be more diagnostic as they can provide more arguments about product quality and previous experiences (Korfiatis et al. 2012). In this paper, however, we propose that longer reviews should not be assumed to be uniformly more helpful. Instead, we argue that the effect depends on the line of argumentation in the review text. Specifically, we suggest that frequent changes between positive and negative arguments require greater cognitive effort and may result in situations of information overload (Jacoby 1977). As a result, it may become difficult for customers to comprehend the review; and thus the review is unlikely to facilitate the purchase decision-making process. For example, it is an intriguing notion to expect long reviews, jumping excessively between positive and negative arguments, to be not particularly for customers. In contrast, a review providing a clear-cut, one-sided opinion or a support-then-refute order of positive and negative arguments may be easier to comprehend and also more persuasive. Therefore, we expect a higher frequency of argumentation changes in reviews to decrease perceived helpfulness. Moreover, given increased complexity and consumers' limited cognitive capacities, the (positive) effect of review length on perceived review helpfulness should be moderated by the frequency of argumentation changes in the review text. To test these ideas, this paper examines the effects of review length and argumentation changes on review helpfulness. For this purpose, we use a large dataset of customer reviews from Amazon together with a state-of-the-art approach from natural language processing that allows us to study the line of argumentation on the basis of individual sentences. Given only the review label, the method uses distributed text representations in combination with multi-instance learning to infer sentence polarity labels. Specifically, our model learns to assign similar sentences in reviews to the same polarity label, whereas an opposite polarity is assigned to differing sentences. The order in which sentences with positive and negative polarity appear then allows us to detect argumentation changes. Concordant with our propositions, our analyses suggest that the frequency of argumentation changes moderates the effect of review length on helpfulness. Our findings have important implications for Information Systems research and practice: we challenge the prevalent narrative in IS research that longer reviews are perceived as more helpful in general. To the best of our knowledge, our paper is the first study demonstrating that argu- mentation patterns and review length are closely intertwined. From a practical perspective, our findings can directly assist retailers in presenting more helpful product reviews and optimizing their customer feedback systems. Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes 3 Research Hypotheses We now derive our research hypotheses, all of which are based on the notion that seeking helpful pre-purchase information plays an important role in consumers' decision-making processes (Engel et al. 1982). The goal of this information search is to reduce risk and uncertainty in order to make better purchase decisions (Murray 1991). A product review usually consists of a star rating and a textual description (Willemsen et al. 2011). The review text is commonly used to describe the product quality and previous experiences with the product (Zimmermann et al. 2018). Longer review texts are likely to contain more infor- mation (Mudambi and Schuff 2010). Tversky and Kahneman (1974) find that decision-makers are more confident when there are more justifications in favor of a decision. It has also been shown that managers' arguments are more persuasive if they provide more information in support of the advocated position (Schwenk 1986). There are multiple factors contributing to this preference for diagnostic information. For example, a consumer may be inclined to purchase a product, but he/she has not yet made the necessary cognitive effort of identifying pros and cons of this prod- uct (Mudambi and Schuff 2010). In this scenario, a detailed review that provides a wide range of convincing arguments is likely to help the consumer make the purchase decision. Furthermore, the length of a review may reflect the reviewer's expertise. The more effort the reviewer puts into writing the review, the more likely it is that he/she will provide high quality information that aids others in making their purchase decisions (Pan and Zhang 2011). Longer and more detailed reviews are also harder to fabricate, as a reviewer must have a certain degree of knowledge and experience to accurately describe different aspects of a product (Jensen et al. 2013). Hence, it is reasonable to assume that longer reviews contain more elaborate arguments presented by better- informed reviewers that are more helpful to other customers. A positive effect of the length of a review on helpfulness has been suggested by a vast number of previous works. Our first hypothesis thus simply tests this link as discussed in the existing literature: Hypothesis 1 (H1). Longer consumer reviews are perceived as more helpful. A particularly relevant aspect of a review is the extent to which it is written in favor of or against the product. Reviews can be one-sided, i. e., arguing strictly for or against a product, or two-sided, enumerating pros and cons of a product. Existing literature has found that two-sided reviews are perceived as more credible (Jensen et al. 2013) and more helpful (e. g. Lutz et al. 2018). Yet Crowley and Hoyer (1994) note that the persuasiveness of two-sided argumentation is likely to depend on the mixture of positive and negative information. In a similar vein, Jackson and Allen (1987) argue that a two-sided message can be structured in three ways: (i) by starting with sup- porting arguments followed by opposing arguments, (ii) by starting with opposing arguments and 4 Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes then providing supportive arguments, or (iii) by interweaving supportive and opposing arguments. Hence, we expect that a relevant feature of two-sided reviews is the rate of argumentation changes, i. e. how often the reviewer changes the line of argumentation from positive to negative and vice versa. Jackson and Allen (1987) find that a "support-then-refute order" is more persuasive than providing supporting and opposing arguments in an alternating manner. Providing arguments in an alternating manner also increases information entropy, i. e. messages are not sufficiently organized as to be easily recognized as significant (Hiltz and Turoff 1985). Altogether, we expect a higher rate of argumentation changes to present a less organized structure, which may make the review less helpful. Hypothesis 2 (H2). A higher rate of argumentation changes decreases perceived review help- fulness. Following the above reasoning, an important question is whether review length and the rate of argumentation changes exhibit isolated effects on review helpfulness or rather depend on each other. Most consumer reviews are very one-sided in favor of or against a particular product (Jensen et al. 2013). Strictly one-sided reviews do not change their line of argumentation from positive to negative or vice versa. Since a higher number of arguments in favor of a position makes a message more persuasive (e. g. O'Keefe 1998), we expect longer reviews to be more helpful in situations in which the line of argumentation does not change between positive and negative arguments. In contrast, two-sided reviews enumerating pros and cons of a product change their argumentation at least once. We expect that processing a review with a high rate of argumentation changes requires greater cognitive effort than processing a review in which arguments are provided in clearly separated parts. A vast number of previous studies found that consumers' cognitive capacities are limited (e. g. Bettman 1979). Information overload theory suggests that consumers can process a certain amount and complexity of information, and that information which exceeds these capacities leads to poorer purchase decisions (Jacoby 1977). Hence, we expect that frequent changes between positive and negative arguments in long reviews can make it more difficult for customers to comprehend the review, thus moderating the positive effect of review length on helpfulness. Hypothesis 3 (H3). The (positive) effect of review length on perceived review helpfulness is moderated by the rate of argumentation changes in the review text. Dataset and Methodology This section presents our dataset. Subsequently, we make use of state-of-the-art methods from natural language processing for sentence-level polarity classification of texts. The order in which positive and negative sentences appear then allows us to determine argumentation changes in reviews. Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes 5 Dataset To test our hypotheses, we use a large dataset of Amazon consumer reviews (He and McAuley 2016). Compared to alternative review sources, this dataset exhibits several favorable characteristics. For example, the reviews are verified by Amazon and it is ensured that reviewers have actually purchased the product. The Amazon platform also features a high number of retailer-hosted reviews per product due to a particularly active user base (Gu et al. 2012). In addition, Amazon reviews are the prevalent choice in the related literature when studying review helpfulness (see e. g. Gu et al. 2012, Mudambi and Schuff 2010). Our dataset1 contains product reviews, ratings, and reviewer meta data for different product categories. In order to reduce our dataset to a reasonable size, we follow previous research (e. g. Mudambi and Schuff 2010, Ghose and Ipeirotis 2011) by restricting our analysis to a subset of product categories. We include all reviews from low-involvement products listed in the categories Groceries, Music CDs, and Videos (Kannan et al. 2001). These products feature a lower perceived risk of poor purchase decisions due to a lower price and lesser durability (Gu et al. 2012). In addition, we include high-involvement product reviews listed in the categories Cell phones, Digital cameras, and Office electronics. These products feature a higher price and greater durability, and hence a higher perceived risk (Gu et al. 2012). Our complete dataset contains 51,837 Amazon customer reviews for 4647 low-involvement prod- ucts and 2335 high-involvement products. Each review includes the following information: (i) the star rating assigned to the product (ranging between 1-5), (ii) the number of helpful and the num- ber of unhelpful votes for the review, (iii) the review post date. Our reviews received between 0 and 4531 helpful votes, with a mean of 8.37. The mean star rating is 4.23. In addition, the corpus contains a textual description (the review text), which undergoes several preprocessing steps. First, we use the Stanford CoreNLP sentence-splitting tool (Manning et al. 2014) to split the review texts into sentences. The length varies between one and 384 sentences, with a mean of 10.9 sentences. Second, we use doc2vec (Le and Mikolov 2014) to create numerical representations of all sentences. This allows us to overcome some of the disadvantages of bag-of-words approach (e. g. Prollochs et al. 2016, 2019), such as missing context (Prollochs et al. 2018). The doc2vec library uses a deep learning model to create numeric feature representations of text, which capture semantic informa- tion. We use the hyperparameter settings as recommended by Lau and Baldwin (2016) and use the pre-trained word vectors from the Google News dataset to initialize the word vectors of the doc2vec model (Lutz et al. 2019).2 1 We use the Amazon 5-core dataset available from http://jmcauley.ucsd.edu/data/amazon/. To account for pos- sible imbalances, and to mitigate the effects of spammers, we focus on a review dataset which contains at most five reviews per reviewer. Moreover, we restrict our analysis to reviews that were created after 2010 and for which the helpfulness has been assessed at least once by other customers. 2 The pretrained Google News dataset is a common choice when generating vector representations of Amazon reviews (e. g. Kim et al. 2015) and has several advantages (Lau and Baldwin 2016, Kim et al. 2015): (1) tuning vector 6 Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes Sentence-Level Polarity Classification The learning problem is a multi-instance learning task (Dietterich et al. 1997, Kotzias et al. 2015), in which we have to predict the polarity labels for all sentences in a set of reviews. Let R denote the set of reviews, K the number of reviews, N the number of sentences, and X = {xi}, i = 1 . . . N the set of all sentences. Each review Rk = (Gk, lk) is represented by a multiset of sentences Gk ⊆ X with label lk, which equals 1 for positive reviews and 0 for negative reviews. Given only the labels of the reviews, we then aim to learn a classifier yθ with hyperparameters θ to predict individual sentence polarity labels yθ(xi). Our multi-instance learning problem can be solved by optimizing a tailored loss function L(θ). The loss function consists of two components: first, a term punishing different labels for similar sentences. Second, a term punishing misclassifications at the document (review) level. Formally, L(θ) = 1 N 2 S(xi, xj)(yθ(xi)− yθ(xj))2 + λ K (A(Rk, θ)− lk)2, (1) N(cid:88) N(cid:88) i=1 j=1 K(cid:88) k=1 where λ is a hyperparameter that scales the prediction error at document (review) level. The loss function is then minimized with respect to the classifier parameters θ. In Equation (1), S(xi, xj) denotes a similarity measure between the representations of two sentences xi and xj, (yθ(xi) − yθ(xj))2 denotes the squared error between the predicted polarity labels for sentences i and j, and A(Rk, θ) is the label that is predicted for review Rk. We adapt L(θ) to our problem of predicting sentence-level polarity labels by specifying the placeholders as follows: for measuring the similarity between two sentence representations, we use a radial basis function, i. e. S(xi, xj) = e−xi−xj2. While alternatives are possible, we use a logistic regression model for predicting yθ(xi) due to its interpretability and simplicity. Finally, A(Rk, θ) is defined as the average polarity label of all sentences in Gk. The result is a specific loss function L(θ), which we minimize by θ. Determining Argumentation Changes in Reviews We use the aforementioned multi-instance learning approach to train a classifier for out-of-sample prediction of polarity label of sentences in reviews. For training the model, we use a disjunct training dataset consisting of 5,000 positive and 5,000 negative reviews. The resulting classifier then allows us to predict a polarity label for each sentence in the dataset that is used in our later empirical analysis. As previously mentioned, we first transform each sentence in the corpus into its vector representation (xi). Subsequently, the logistic regression model is used to calculate yθ(xi). If yθ(xi) is equal or greater than 0.5 , sentence i is assigned to a positive label, i. e. yi = 1, and to a negative label otherwise. On an out-of-sample dataset of 1000 sentences (manually labeled), our representations to a given dataset requires a large amount of training data; (2) the results are particularly robust and more reproducible. Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes 7 approach achieves a classification accuracy of 81.20 %. This can be regarded as sufficiently accurate in the context of our study. We then measure the rate of argumentation changes RACk for review Rk as follows. If the review consists of only a single sentence, then RAC is defined as 0. For reviews that consist of at least two sentences, RAC is defined as the number of argumentation changes divided by the length of 0, 1Gk−1 i=2 the review in sentences minus 1, RACk = Gk(cid:80) I(yi (cid:54)= yi−1), ifGk = 1, otherwise, (2) where Gk denotes the number sentences of review Rk, and I(cond) is an indicator function which equals to 1, if cond is true and 0 otherwise. Hence, RAC is zero for one-sided reviews, and one for reviews in which the line of argumentation changes between each sentence. For example, a review consisting of five positive sentences followed by two negative sentences is mapped to the value 7−1 = 1 6 . 1 Preliminary Results Empirical Model The target variable of our analysis is RHV otes. This variable denotes the number of users who voted Yes in response to the question "Was this review helpful to you?". The total number of users who responded to this question is denoted by RV otes. Following Pan and Zhang (2011) and Yin et al. (2016), we model review helpfulness as a binomial variable with RV otes trials. Concordant with previous works (e. g. Mudambi and Schuff 2010, Korfiatis et al. 2012, Pan and Zhang 2011, Yin et al. 2016), we incorporate the following variables to explain review helpfulness. First, we include the star rating of the review between 1 and 5 stars (RStars) and the average rating of the product (P Avg). Second, we control for the product type by adding a dummy that equals 1 for high-involvement products and 0 for low-involvement products (P T ype). Third, we control for multiple characteristics of the review text that may influence review helpfulness. Specif- ically, we calculate the fraction of cognitive and emotive words (RCog and REmo) using LIWC 2015 and control for readability using the Gunning-Fog index (Gunning 1968) (RRead). The key explanatory variables for our research hypotheses are review length (RLength) and the rate of argumentation changes (RAC). To examine the interaction between review length and the rate of argumentation changes, we additionally incorporate an interaction term RLength× RAC into our model. Altogether, we model the number of helpful votes, RHV otes, as a binomial variable with probability parameter θ and RV otes trials, Logit(θ) = β0 + β1 P Avg + β2 P T ype + β3 RAge + β4 RCog + β5 REmo + β6 RRead + β7 RStars + β8 RLength + β9 RAC + β10 RLength× RAC + αP + ε, RHV otes ∼ Binomial[RV otes, θ], (3) (4) 8 Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes with intercept β0, a random intercept αP for each product, and error term ε. Hypotheses Tests We estimate our model using mixed effects generalized linear models and maximum likelihood estimation (Wooldridge 2010). The regression results are reported in Table 1. To facilitate the interpretability of our findings, we z-standardize all variables so that we can compare the effects of regression coefficients on the dependent variable measured in standard deviations. Column (a) of Table 1 presents a baseline model that only includes the control variables from previous studies. We find that more recent reviews, higher star ratings, and reviews with a higher readability index are perceived as more helpful. In contrast, higher average ratings and higher shares of cognitive and emotive words have a negative effect. In addition, we find that high-involvement products tend to receive more helpful reviews. Table 1 Regression Linking Review Length and Argumentation Changes to Helpfulness All Reviews Review Subsets P Avg P T ype RAge RCog REmo RRead RStars RLength RAC (a) −0.078*** (0.012) 0.479*** (0.029) −0.304*** (0.009) −0.022*** (0.006) −0.247*** (0.006) 0.084*** (0.005) 0.627*** (0.004) (b) −0.052*** (0.012) 0.349*** (0.028) −0.181*** (0.009) −0.028*** (0.006) −0.131*** (0.006) 0.111*** (0.005) 0.560*** (0.004) 0.282*** (0.003) (c) −0.052*** (0.012) 0.349*** (0.028) −0.181*** (0.009) −0.029*** (0.006) −0.130*** (0.006) 0.112*** (0.005) 0.560*** (0.004) 0.282*** (0.003) 0.010 (0.005) RLength × RAC Intercept 1.154*** (0.019) 1.155*** (0.018) 1.155*** (0.018) (d) −0.051*** (0.012) 0.360*** (0.028) −0.176*** (0.009) −0.027*** (0.006) −0.126*** (0.006) 0.115*** (0.005) 0.554*** (0.004) 0.293*** (0.003) −0.036*** (0.006) −0.169*** (0.008) 1.163*** (0.018) P T ype = 0 −0.001 (0.015) P T ype = 1 −0.099*** (0.021) −0.082*** (0.014) −0.060*** (0.009) −0.079*** (0.009) 0.106*** (0.009) 0.497*** (0.007) 0.393*** (0.014) −0.079*** (0.013) −0.182*** (0.023) 1.172*** (0.019) −0.235*** (0.011) −0.009 (0.007) −0.162*** (0.009) 0.121*** (0.006) 0.582*** (0.005) 0.281*** (0.003) −0.013 (0.007) −0.173*** (0.008) 1.497*** (0.021) Observations Log-likelihood Stated: standardized coefficient and standardized error in parentheses. Significance: ∗p<0.05; ∗∗p<0.01; ∗∗∗p<0.001. Product-level effects are included. 51,837 −83,474.8 51,837 −77,731.9 51,837 −77,972.8 51,837 −77,971.1 23,146 −26,359.2 28,691 −51,225.9 Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes 9 To test H1, we additionally include the review length (RLength) in our model. The results are reported in Column (b) of Table 1. We find that the coefficient of RLength is statistically significant and positive (β = 0.282, p < 0.001). This suggests that a one standard deviation increase in the length of the review text increases the probability of a helpful vote by e0.282 − 1 ≈ 32.6%. The other coefficients in the model remain stable. Therefore, we find support for H1. For testing H2, we add the rate of argumentation changes (RAC) to our model. As shown in column (c) of Table 1, RAC is not statistically significant. Hence, H2 is rejected. Next, we add the interaction RLength× RAC to our model. This allows us to examine whether there is a significant interaction between review length and argumentation changes. Column (d) of Table 1 shows the results. The coefficient of the interaction term is negative and statistically significant (β = −0.169, p < 0.001), and the coefficient of RAC became negative and significant (β = −0.036, p < 0.001). This suggests that the effects of review length and argumentation changes are interdependent. To shed light on the interaction, we plot the marginal effects of review length along with the 95 % confidence intervals. Figure 1 shows that (i) the perceived helpfulness of long customer reviews is higher if the rate of argumentation changes is small, and (ii) longer reviews are perceived as less helpful if the rate of argumentation changes is very high. We thus find support for H3, which states that the positive effect of review length is moderated by the rate of argumentation changes. Figure 1 Standardized Marginal Effects of Review Length on Helpfulness Ultimately, we perform several checks and complementary analyses. First, we estimate two sepa- rate regressions for low- and high-involvement products. The results are shown in columns (e) and (f) of Table 1. Concordant with our previous findings, we find that review length is moderated by the rate of argumentation changes. Interestingly, we further observe that the coefficient of RAC is only significant for low-involvement products. A possible explanation is that customers prefer clear-cut opinions for low-involvement products as these products typically exhibit a relatively low amount of perceived risk. Second, we tested an alternative variant for measuring RAC that −1.0−0.50.00.51.01.52.0−0.10.00.10.20.30.40.5Rate of Argumentation ChangesMarginal Effects of Review Length 10 Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes additionally accounts for neutral sentences (Ghose and Ipeirotis 2011). This approach yields qual- itatively identical results. Ultimately, we repeat our analysis using a mixed-effects tobit model as suggested by Mudambi and Schuff (2010). All regression estimates support our findings. Discussion and Future Research This work makes several contributions to research on electronic commerce and online word-of- mouth. Most importantly, we disprove the prevailing narrative in previous research (e. g. Mudambi and Schuff 2010, Yin et al. 2016) that longer reviews are uniformly perceived as more helpful. Instead, we propose that frequent changes between positive and negative arguments require greater cognitive effort, which can lead to information overload. This can make it less likely for customers to perceive longer reviews as helpful. Our work thereby extends the experimental study from Park and Lee (2008), which indicates that information overload can occur at product level such that consumers' involvement with a product is reduced if confronted with too many reviews. Our study provides evidence that information overload can also occur at the review level. Specifically, to the best of our knowledge, our paper is the first study demonstrating that, given increased complexity and consumers' limited cognitive capacities, the (positive) effect of the length of a review on helpfulness is moderated by the frequency of argumentation changes in the review text. In addition, our findings have important implications for practitioners in the field of electronic commerce. Retailers need to understand the determinants of review helpfulness in order to gain a better understanding of consumer information search behavior and purchase decision-making. Our findings and the proposed method for measuring the line of argumentation in reviews can help retailers to optimize their information systems towards a better shopping experience, e. g. by improving the ranking of the most helpful reviews. The order in which reviews appear plays a crucial role, since most online platforms prominently display the most helpful positive and negative reviews, before presenting other reviews (Yin et al. 2016). Our findings are also relevant for reviewers on retailer platforms, who can use our conclusions to write more helpful product reviews. Specifically, our study suggests that reviewers should avoid excessive alternation between positive and negative arguments, as this may make it more difficult to comprehend the review. Overall, this work allows to better understand the effects of review length and argumentation changes on the helpfulness of consumer reviews. In future work, we will expand this study in three directions. First, we plan to study the interplay between review length and argumentation changes in the context of refutational and non-refutational reviews. Second, we will conduct further analysis to better understand potential differences regarding the role of argumentation changes for high-involvement and low-involvement products. Third, it is an intriguing notion to validate our findings with data from other recommendation platforms, such as hotel or restaurant reviews. Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes 11 References Bettman, J. R. 1979. "Memory Factors in Consumer Choice: A Review," Journal of Marketing (43:2), pp. 37 -- 53. Crowley, A. E., and Hoyer, W. D. 1994. "An Integrative Framework for Understanding Two-sided Persua- sion," Journal of Consumer Research (20:4), pp. 561 -- 574. Dhanasobhon, S., Chen, P.-Y., and Smith, M. 2007. "An Analysis of the Differential Impact of Reviews and Reviewers at Amazon.com," in 28th International Conference on Information Systems. Dietterich, T. G., Lathrop, R. H., and Lozano-P´erez, T. 1997. "Solving the Multiple Instance Problem with Axis-Parallel Rectangles," Artificial Intelligence (89:1), pp. 31 -- 71. Engel, J. F., Blackwell, R. D., and Miniard, P. W. 1982. Consumer Behavior , New York: The Dryden Press. Ghose, A., and Ipeirotis, P. G. 2011. "Estimating the Helpfulness and Economic Impact of Product Reviews: Mining Text and Reviewer Characteristics," Transactions on Knowledge and Data Engineering (23:10), pp. 1498 -- 1512. Gu, B., Park, J., and Konana, P. 2012. "The Impact of External Word-of-Mouth Sources on Retailer Sales of High-Involvement Products," Information Systems Research (23:1), pp. 182 -- 196. Gunning, R. 1968. The Technique of Clear Writing, McGraw-Hill. He, R., and McAuley, J. 2016. "Ups and Downs: Modeling the Visual Evolution of Fashion Trends with One-class Collaborative Filtering," in 25th International Conference on World Wide Web, pp. 507 -- 517. Hiltz, S. R., and Turoff, M. 1985. "Structuring Computer-Mediated Communication Systems to Avoid Infor- mation Overload," Communications of the ACM (28:7), pp. 680 -- 689. Jackson, S., and Allen, M. 1987. "Meta-Analysis of the Effectiveness of One-Sded and Two-Sided Argumen- tation," in Annual Meeting of the International Communication Association, vol. 196, pp. 78 -- 92. Jacoby, J. 1977. "Information Load and Decision Quality: Some Contested Issues," Journal of Marketing Research (14:4), pp. 569 -- 573. Jensen, M. L., Averbeck, J. M., Zhang, Z., and Wright, K. B. 2013. "Credibility of Anonymous Online Product Reviews: A Language Expectancy Perspective," Journal of Management Information Systems (30:1), pp. 293 -- 324. Kannan, P. K., Chang, A.-M., and Whinston, A. B. 2001. "Wireless commerce: Marketing issues and possi- bilities," in 34th Hawaii International Conference on System Sciences, pp. 6 -- 16. Kim, J., Rousseau, F., and Vazirgiannis, M. 2015. "Convolutional Sentence Kernel from Word Embeddings for Short Text Categorization," in Conference on Empirical Methods in Natural Language Processing, pp. 775 -- 780. Korfiatis, N., Garc´ıa-Bariocanal, E., and S´anchez-Alonso, S. 2012. "Evaluating Content Quality and Helpful- ness of Online Product Reviews: The Interplay of Review Helpfulness Vs. Review Content," Electronic Commerce Research and Applications (11:3), pp. 205 -- 217. 12 Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes Kotzias, D., Denil, M., de Freitas, N., and Smyth, P. 2015. "From group to individual labels using deep features," in Proceedings of the 21st International Conference on Knowledge Discovery and Data Mining (SIGKDD), pp. 597 -- 606. Lau, J. H., and Baldwin, T. 2016. "An Empirical Evaluation of Doc2vec with Practical Insights into Docu- ment Embedding Generation," in 1st Workshop on Representation Learning for NLP , pp. 78 -- 86. Le, Q., and Mikolov, T. 2014. "Distributed Representations of Sentences and Documents," in 31st Interna- tional Conference on Machine Learning, pp. 1188 -- 1196. Lutz, B., Prollochs, N., and Neumann, D. 2018. "Understanding the Role of Two-Sided Argumentation in Online Consumer Reviews: A Language-Based Perspective," in 39th International Conference on Information Systems. Lutz, B., Prollochs, N., and Neumann, D. 2019. "Sentence-Level Sentiment Analysis of Financial News Using Distributed Text Representations and Multi-Instance Learning," in 52nd Hawaii International Conference on System Sciences, pp. 1117 -- 1125. Manning, C. D., Surdeanu, M., Bauer, J., Finkel, J., Bethard, S. J., and McClosky, D. 2014. "The Stanford CoreNLP Natural Language Processing Toolkit," in 52nd Annual Meeting of the ACL, pp. 55 -- 60. Mudambi, S. M., and Schuff, D. 2010. "What Makes a Helpful Online Review? A Study of Customer Reviews on Amazon.com," MIS Quarterly (34:1), pp. 185 -- 200. Murray, K. B. 1991. "A Test of Services Marketing Theory: Consumer Information Acquisition Activities," The Journal of Marketing (55:1), pp. 10 -- 25. O'Keefe, D. J. 1998. "Justification Explicitness and Persuasive Effect: A Meta-Analytic Review of the Effects of Varying Support Articulation in Persuasive Messages," Argumentation and Advocacy (35:2), pp. 61 -- 75. Pan, Y., and Zhang, J. Q. 2011. "Born Unequal: A Study of the Helpfulness of User-Generated Product Reviews," Journal of Retailing (87:4), pp. 598 -- 612. Park, D.-H., and Lee, J. 2008. "eWOM Overload and its Effect on Consumer Behavioral Intention Depending on Consumer Involvement," Electronic Commerce Research and Applications (7:4), pp. 386 -- 398. Pavlou, P. A., and Fygenson, M. 2006. "Understanding and Predicting Electronic Commerce Adoption: An Extension of the Theory of Planned Behavior," MIS Quarterly (30:1), pp. 115 -- 143. Prollochs, N., Feuerriegel, S., and Neumann, D. 2016. "Is Human Information Processing Affected by Emo- tional Content? Understanding The Role of Facts and Emotions in the Stock Market," in 37th Inter- national Conference on Information Systems. Prollochs, N., Feuerriegel, S., and Neumann, D. 2018. "Statistical Inferences for Polarity Identification in Natural Language," PloS one (13:12), pp. 1 -- 21. Lutz, Prollochs, and Neumann: Review Length and Argumentation Changes 13 Prollochs, N., Feuerriegel, S., and Neumann, D. 2019. "Learning Interpretable Negation Rules via Weak Supervision at Document Level: A Reinforcement Learning Approach," in Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 407 -- 413. Schwenk, C. H. 1986. "Information, Cognitive Biases, and Commitment to a Course of Action," Academy of Management Review (11:2), pp. 298 -- 310. Tversky, A., and Kahneman, D. 1974. "Judgment Under Uncertainty: Heuristics and Biases," Science (185:4157), pp. 1124 -- 1131. Willemsen, L. M., Neijens, P. C., Bronner, F., and de Ridder, J. A. 2011. ""Highly Recommended!": The Content Characteristics and Perceived Usefulness of Online Consumer Reviews," Journal of Computer- Mediated Communication (17:1), pp. 19 -- 38. Wooldridge, J. M. 2010. Econometric Analysis of Cross Section and Panel Data, Cambridge, MA: MIT Press. Yin, D., Mitra, S., and Zhang, H. 2016. "When Do Consumers Value Positive vs. Negative Reviews? An Empirical Investigation of Confirmation Bias in Online Word of Mouth," Information Systems Research (27:1), pp. 131 -- 144. Zimmermann, S., Herrmann, P., Kundisch, D., and Nault, B. R. 2018. "Decomposing the Variance of Con- sumer Ratings and the Impact on Price and Demand," Information Systems Research (29:4), pp. 984 -- 1002.
1807.01763
3
1807
2018-08-08T20:49:30
Seq2RDF: An end-to-end application for deriving Triples from Natural Language Text
[ "cs.CL", "cs.AI" ]
We present an end-to-end approach that takes unstructured textual input and generates structured output compliant with a given vocabulary. Inspired by recent successes in neural machine translation, we treat the triples within a given knowledge graph as an independent graph language and propose an encoder-decoder framework with an attention mechanism that leverages knowledge graph embeddings. Our model learns the mapping from natural language text to triple representation in the form of subject-predicate-object using the selected knowledge graph vocabulary. Experiments on three different data sets show that we achieve competitive F1-Measures over the baselines using our simple yet effective approach. A demo video is included.
cs.CL
cs
Seq2RDF: An end-to-end application for deriving Triples from Natural Language Text Yue Liu, Tongtao Zhang, Zhicheng Liang, Heng Ji, Deborah L. McGuinness Department of Computer Science, Rensselaer Polytechnic Institute Abstract. We present an end-to-end approach that takes unstructured textual input and generates structured output compliant with a given vocabulary. We treat the triples within a given knowledge graph as an independent graph language and propose an encoder-decoder framework with an attention mechanism that leverages knowledge graph embed- dings. Our model learns the mapping from natural language text to triple representation in the form of subject-predicate-object using the se- lected knowledge graph vocabulary. Experiments on three different data sets show that we achieve competitive F1-Measures over the baselines using our simple yet effective approach. A demo video is included. 1 Introduction Converting free text into usable structured knowledge for downstream applica- tions usually requires expert human curators, or relies on the ability of machines to accurately parse natural language based on the meanings in the knowledge graph (KG) vocabulary. Despite many advances in text extraction and seman- tic technologies, there is yet to be a simple system that generates RDF triples from free text given a chosen KG vocabulary in just one step, which we consider an end-to-end system. We aim to automate the process of translating a natural language sentence into a structured triple representation defined in the form of subject-predicate-object, s-p-o for short, and build an end-to-end model based on an encoder-decoder architecture that learns the semantic parsing pro- cess from text to triple without tedious feature engineering and intermediate steps. We evaluate our approach on three different datasets and achieve com- petitive F1-measures outperforming our proposed baselines, respectively. The system, data set and demo are publicly available12. 2 Our Approach Inspired by the sequence-to-sequence model[5] in recent Neural Machine Trans- lation, we attempt to use this model to bridge the gap between natural lan- guage and triple representation. We consider a natural language sentence X = [x1, . . . , xX] as a source sequence, and we aim to map X to an RDF triple Y = [y1, y2, y3] with regard to s-p-o as a target sequence that is aligned with 1 https://github.com/YueLiu/NeuralTripleTranslation 2 https://youtu.be/ssiQEDF-HHE a given KG vocabulary set or schema. Given DBpedia for example, we take a large amount of existing triples from DBpedia as ground truth facts for training. Our model learns how to form a compliant triple with appropriate terms in the existing vocabulary. Furthermore, the architecture of the decoder enables the model to capture the differences, dependencies and constraints when selecting s-p-o respectively, which makes the model a natural fit for this learning task. Fig. 1: Model Overview. Three colors (red, yellow, blue) represent the active attention during s-p-o decoding respectively. We currently only generate a single triple per sentence, leaving the generation of multiple triples per sentence for future work. As shown in Figure 1, the model consists of an encoder taking in a natural language sentence as sequence input and a decoder generating the target RDF triple. The model pursues the maximized conditional probability 3(cid:89) p(Y X) = p(yy<td , X), (1) td=1 Both encoder and decoder are recurrent neural networks3 with Long Short Term Memory (LSTM) cells. We apply the attention mechanism that forces the model to learn to focus on specific parts of the input sequence when decoding, instead 3 We use tf.contrib.seq2seq.sequence loss which is a weighted cross-entropy loss for a sequence of logits. We concatenate the last hidden output of forward and backward LSTM networks, the concatenated vector comes with fixed dimensions dbo:locationdbo:countrydbo:birthplacedbo:isPartOfLakeGeorgeisatthesoutheastbaseoftheAdirondackMountainsdbr:Adirondack_Mountainsdbr:Lake_George_(New_York)Bi-directional LSTMdbr:George_Lakedbr:Lake_George_(Florida)dbr:Lake_George_(New_South_Wales)<Start_of_Triple>yago:Mountain109359803dbr:Adirondacksdbr:Whiteface_MountainEncoderDecoderConcatenate of relying only on the last hidden state of the encoder. Furthermore, in order to capture the semantics of the entities and relations within our training data, we apply domain specific resources[2] to obtain the word embeddings and the TransE model[1] to obtain KG embeddings for entities and relations in the KG. We use these pre-trained Word embeddings and KG embeddings for entities and relations to initialize the encoder and decoder embedding matrix, respectively, and results show that this approach improves the overall performance. 3 Experiments Data Sets We ran experiments on two public datasets NYT4[4], ADE5 with se- lected vocabularies and a Wiki-DBpedia dataset that is produced by distant supervision6. For data obtained by distant supervision, the test set is manually labeled to ensure its quality. Each data set is an annotated corpus with corre- sponding triples in the form of either s-p-o or entity mentions and relation types at the sentence level. Details are available on our GitHub page. Text Berlin is the capital city of Germany. Triple dbr:Germany dbo:capital dbr:Berlin Table 1: Example annotated pair with distant supervision on Wiki-DBpedia Evaluation Metrics We consider pipeline-based approaches that combine En- tity Linking (EL) and Relation Classification (RC) as state of the art. We pro- pose several baselines with combined outputs from state-of-the-art EL7 and RC for evaluation. We use F1-measure to evaluate triple generation (an output is considered correct only if s-p-o are all correct) in comparison with the baselines. Baselines We implement multiple baselines including a classical supervised learning using simple Lexical features, a state-of-the-art recurrent neural net- work (RNN) approach with LSTM [3] and one with a Gate Recurrent Unit (GRU) variant. Then we evaluate the performance on triple generation with re- sults combining EL and RC. The hyper-parameters in our model are tuned with 10-fold cross-validation on the training set according to the best F1-scores. We applied the same settings to the baselines. The details regarding the parameters and settings are available on our GitHub page for replication purposes. 4 Result Analysis We achieve the best F1 Measure of 84.3 on the triple generation from Table 2. Note that the baseline approaches that we implemented are pipeline-based, and thus they are very likely to propagate errors to downstream components. How- ever, our model merges the two different tasks of EL and RC into one during the 4 New York Times articles: https://github.com/shanzhenren/CoType 5 Adverse drug events: https://sites.google.com/site/adecorpus 6 http://deepdive.stanford.edu/distant_supervision 7 Stanford, Domain specific NER decoding, which composes a major advantage over pipeline-based approaches that usually apply separate models on EL and RC. The most common errors are caused by Out of vocabulary and Noise from overlapping relations in text. As we do not cover all rare entity names or consider multiple triple situations, these errors are valid in some sense. Tasks Metric NYT ADE Wiki-DBpedia F1-Measure F1-Measure F1-Measure EL+Lexical EL+LSTM EL+GRU Seq2Seq S+A+W+G 36.8 58.7 59.8 64.2 71.4 61.4 70.3 73.2 73.4 79.5 37.8 65.5 67.0 73.5 84.3 Table 2: Cross-dataset comparison on triple generations. Seq2Seq denotes the imple- mentation of Seq2Seq without any attention mechanism and pre-trained embeddings; A denotes attention mechanism; W and G denote pre-trained word embeddings for the encoders and KG embeddings for the decoders, respectively. 5 Conclusions and Future Work We present an end-end system for translating a natural language sentence to its triple representation. Our system performs competitively on three different datasets and our assumption on enhancing the model with pre-trained KG em- beddings improves performance across the board. It is easy to replicate our work and use our system following the demonstration. In the future, we plan to re- design the decoder and enable the generation of multiple triples per sentence. Acknowledgement This work was partially supported by the NIEHS Award 0255-0236-4609 / 1U2CES026555-01. References 1. Bordes, A., Usunier, N., Garcia-Duran, A., Weston, J., Yakhnenko, O.: Translating embeddings for modeling multi-relational data. In: Advances in neural information processing systems. pp. 2787 -- 2795 (2013) 2. Liu, Y., Ge, T., Mathews, K., Ji, H., McGuinness, D.: Exploiting task-oriented resources to learn word embeddings for clinical abbreviation expansion. Proceedings of BioNLP 15 pp. 92 -- 97 (2015) 3. Miwa, M., Bansal, M.: End-to-end relation extraction using lstms on sequences and tree structures. arXiv preprint arXiv:1601.00770 (2016) 4. Ren, X., Wu, Z., He, W., Qu, M., Voss, C.R., Ji, H., Abdelzaher, T.F., Han, J.: Cotype: Joint extraction of typed entities and relations with knowledge bases. In: Proceedings of the 26th International Conference on World Wide Web. pp. 1015 -- 1024 (2017) 5. Sutskever, I., Vinyals, O., Le, Q.V.: Sequence to sequence learning with neural networks. In: Advances in neural information processing systems. pp. 3104 -- 3112 (2014)
1706.03610
2
1706
2017-06-15T15:16:18
Neural Domain Adaptation for Biomedical Question Answering
[ "cs.CL", "cs.AI", "cs.NE" ]
Factoid question answering (QA) has recently benefited from the development of deep learning (DL) systems. Neural network models outperform traditional approaches in domains where large datasets exist, such as SQuAD (ca. 100,000 questions) for Wikipedia articles. However, these systems have not yet been applied to QA in more specific domains, such as biomedicine, because datasets are generally too small to train a DL system from scratch. For example, the BioASQ dataset for biomedical QA comprises less then 900 factoid (single answer) and list (multiple answers) QA instances. In this work, we adapt a neural QA system trained on a large open-domain dataset (SQuAD, source) to a biomedical dataset (BioASQ, target) by employing various transfer learning techniques. Our network architecture is based on a state-of-the-art QA system, extended with biomedical word embeddings and a novel mechanism to answer list questions. In contrast to existing biomedical QA systems, our system does not rely on domain-specific ontologies, parsers or entity taggers, which are expensive to create. Despite this fact, our systems achieve state-of-the-art results on factoid questions and competitive results on list questions.
cs.CL
cs
Neural Domain Adaptation for Biomedical Question Answering Georg Wiese1,2, Dirk Weissenborn2 and Mariana Neves1 1 Hasso Plattner Institute, August Bebel Strasse 88, Potsdam 14482 Germany 2 Language Technology Lab, DFKI, Alt-Moabit 91c, Berlin, Germany 7 1 0 2 n u J 5 1 ] L C . s c [ 2 v 0 1 6 3 0 . 6 0 7 1 : v i X r a [email protected], [email protected], [email protected] Abstract Factoid question answering (QA) has re- cently benefited from the development of deep learning (DL) systems. Neural net- work models outperform traditional ap- proaches in domains where large datasets exist, such as SQuAD (≈ 100, 000 ques- tions) for Wikipedia articles. However, these systems have not yet been applied to QA in more specific domains, such as biomedicine, because datasets are gen- erally too small to train a DL system from scratch. For example, the BioASQ dataset for biomedical QA comprises less then 900 factoid (single answer) and list (multiple answers) QA instances. In this work, we adapt a neural QA system trained on a large open-domain dataset (SQuAD, source) to a biomedical dataset (BioASQ, target) by employing various transfer learning techniques. Our network architecture is based on a state-of-the- art QA system, extended with biomedical word embeddings and a novel mechanism to answer list questions. In contrast to ex- isting biomedical QA systems, our system does not rely on domain-specific ontolo- gies, parsers or entity taggers, which are expensive to create. Despite this fact, our systems achieve state-of-the-art results on factoid questions and competitive results on list questions. Introduction 1 Question answering (QA) is the task of retriev- ing answers to a question given one or more con- texts. It has been explored both in the open- domain setting (Voorhees et al., 1999) as well as domain-specific settings, such as BioASQ for the biomedical domain (Tsatsaronis et al., 2015). The BioASQ challenge provides ≈ 900 factoid and list questions, i.e., questions with one and several an- swers, respectively. This work focuses on answer- ing these questions, for example: Which drugs are included in the FEC-75 regimen? → fluorouracil, epirubicin, and cyclophosphamide. We further restrict our focus to extractive QA, i.e., QA instances where the correct answers can be represented as spans in the contexts. Contexts are relevant documents which are provided by an information retrieval (IR) system. Traditionally, a QA pipeline consists of named- entity recognition, question classification, and an- swer processing steps (Jurafsky, 2000). These methods have been applied to biomedical datasets, with moderate success (Zi et al., 2016). The cre- ation of large-scale, open-domain datasets such as SQuAD (Rajpurkar et al., 2016) have recently en- abled the development of neural QA systems, e.g., Wang and Jiang (2016), Xiong et al. (2016), Seo et al. (2016), Weissenborn et al. (2017), leading to impressive performance gains over more tradi- tional systems. However, creating large-scale QA datasets for more specific domains, such as the biomedical, would be very expensive because of the need for domain experts, and therefore not desirable. The recent success of deep learning based meth- ods on open-domain QA datasets raises the ques- tion whether the capabilities of trained models are transferable to another domain via domain adaptation techniques. Although domain adapta- tion has been studied for traditional QA systems (Blitzer et al., 2007) and deep learning systems (Chen et al., 2012; Ganin et al., 2016; Bousmalis et al., 2016; Riemer et al., 2017; Kirkpatrick et al., 2017), it has to our knowledge not yet been applied for end-to-end neural QA systems. To bridge this gap we employ various do- main adaptation techniques to transfer knowl- edge from a trained, state-of-the-art neural QA system (FastQA, Weissenborn et al. (2017)) to the biomedical domain using the much smaller BioASQ dataset. In order to answer list questions in addition to factoid questions, we extend FastQA with a novel answering mechanism. We evaluate various transfer learning techniques comprehen- sively. For factoid questions, we show that mere fine-tuning reaches state-of-the-art results, which can further be improved by a forgetting cost reg- ularization (Riemer et al., 2017). On list ques- tions, the results are competitive to existing sys- tems. Our manual analysis of a subset of the fac- toid questions suggests that the results are even better than the automatic evaluation states, reveal- ing that many of the "incorrect" answers are in fact synonyms to the gold-standard answer. 2 Related Work Traditional Question Answering Traditional factoid and list question answering pipelines can be subdivided into named-entity recognition, question classification, and answer processing components (Jurafsky, 2000). Such systems have also been applied to biomedical QA such as the OAQA system by Zi et al. (2016). Besides a num- ber of domain-independent features, they incorpo- rate a rich amount of biomedical resources, includ- ing a domain-specific parser, entity tagger and the- saurus to retrieve concepts and synonyms. A lo- gistic regression classifier is used both for question classification and candidate answer scoring. For candidate answer generation, OAQA employs dif- ferent strategies for general factoid/list questions, choice questions and quantity questions. Neural Question Answering Neural QA sys- tems differ from traditional approaches in that the algorithm is not subdivided into discrete steps. In- stead, a single model is trained end-to-end to com- pute an answer directly for a given question and context. The typical architecture of such systems (Wang and Jiang, 2016; Xiong et al., 2016; Seo et al., 2016) can be summarized as follows: 1. Embedding Layer: Question and context to- kens are mapped to a high-dimensional vec- tor space, for example via GloVe embed- dings (Pennington et al., 2014) and (option- ally) character embeddings (Seo et al., 2016). 2. Encoding Layer: The token vectors are pro- cessed independently for question and con- text, usually by a recurrent neural network (RNN). 3. Interaction Layer: This layer allows for in- teraction between question and context rep- resentations. Examples are Match-LSTM (Wang and Jiang, 2016) and Coattention (Xiong et al., 2016). 4. Answer Layer: This layer assigns start and end scores to all of the context tokens, which can be done either statically (Wang and Jiang, 2016; Seo et al., 2016) or by a dynamic de- coding process (Xiong et al., 2016). FastQA FastQA fits into this schema, but re- duces the complexity of the architecture by re- moving the interaction layer, while maintaining state-of-the-art performance (Weissenborn et al., 2017). Instead of one or several interaction lay- ers of RNNs, FastQA computes two simple word- in-question features for each token, which are ap- pended to the embedding vectors before the en- coding layer. We chose to base our work on this architecture because of its state-of-the-art perfor- mance, faster training time and reduced number of parameters. Unsupervised Domain Adaptation Unsuper- vised domain adaptation describes the task of learning a predictor in a target domain while la- beled training data only exists in a different source domain. In the context of deep learning, a com- mon method is to first train an autoencoder on a large unlabeled corpus from both domains and then use the learned input representations as in- put features to a network trained on the actual task using the labeled source domain dataset (Glorot et al., 2011; Chen et al., 2012). Another approach is to learn the hidden representations directly on the target task. For example, domain-adversarial training optimizes the network such that it com- putes hidden representations that both help pre- dictions on the source domain dataset and are indistinguishable from hidden representations of the unlabeled target domain dataset (Ganin et al., 2016). These techniques cannot be straightfor- wardly applied to the question answering task, be- cause they require a large corpus of biomedical question-context pairs (albeit no answers are re- quired). Supervised Domain Adaptation In contrast to the unsupervised case, supervised domain adapta- tion assumes access to a small amount of labeled training data in the target domain. The simplest approach to supervised domain adaptation for neu- ral models is to pre-train the network on data from the source domain and then fine-tune its param- eters on data from the target domain. The main drawback of this approach is catastrophic forget- ting, which describes the phenomenon that neu- ral networks tend to "forget" knowledge, i.e., its performance in the source domain drops signifi- cantly when they are trained on the new dataset. Even though we do not directly aim for good per- formance in the source domain, measures against catastrophic forgetting can serve as a useful regu- larizer to prevent over-fitting. Progressive neural networks combat this is- sue by keeping the original parameters fixed and adding new units that can access previously learned features (Rusu et al., 2016). Because this method adds a significant amount of new parame- ters which have to be trained from scratch, it is not well-suited if the target domain dataset is small. Riemer et al. (2017) use fine-tuning, but add an additional forgetting cost term that punishes devi- ations from predictions with the original parame- ters. Another approach is to add an L2 loss which punishes deviation from the original parameters. Kirkpatrick et al. (2017) apply this loss selectively on parameters which are important in the source domain. 3 Model Our network architecture is based on FastQA (Weissenborn et al., 2017), a state-of-the-art neu- ral QA system. Because the network architecture itself is exchangeable, we treat it as a black box, with subtle changes at the input and output layer as well as to the decoding and training procedure. These changes are described in the following. See Figure 3 for an overview of the system. Input Layer 3.1 In a first step, words are embedded into a high- dimensional vector space. We use three sources of embeddings, which are concatenated to form a single embedding vector: • GloVe embeddings: 300-dimensional GloVe vectors (Pennington et al., 2014). These are Figure 1: Network architecture of our system for biomedical question answering. At its core, it uses an extractive neural QA system as a black box (we use FastQA (Weissenborn et al., 2017)). The embedding layer is modified in order to in- clude biomedical word embeddings and question type features. The output layer is adjusted to add the ability to answer list questions in addition to factoid questions. open-domain word vectors trained on 840 bil- lion tokens from web documents. The vec- tors are not updated during training. • Character embeddings: As used in FastQA (Weissenborn et al., 2017) and proposed orig- inally by Seo et al. (2016), we employ a 1-dimensional convolutional neural network which computes word embeddings from the characters of the word. • Biomedical Word2Vec embeddings: 200- dimensional vectors trained using Word2Vec (Mikolov et al., 2013) on about 10 million PubMed abstracts (Pavlopoulos et al., 2014). These vectors are specific to the biomedi- cal domain and we expect them to help on biomedical QA. As an optional step, we add entity tag features to the token embeddings via concatenation. En- tity tags are provided by a dictionary-based entity tagger based on the UMLS Metathesaurus. The entity tag feature vector is a 127-dimensional bit vector that for each of the UMLS semantic types states whether the current token is part of an entity of that type. This step is only applied if explicitly End Probabilities p(es)End Probabilities p(es)End Scores e(s)End Scores e(s)......Biomedical EmbeddingsGloVe EmbeddingsCharacter EmbeddingsContext EmbeddingsQuestion EmbeddingsStart Scores ystartStart Probabilities pstartEnd Scores yendEnd Probabilities pendsigmoidsoftmaxExtractive QA SystemQuestion Type Features noted. Finally, a one-hot encoding of the question type (factoid or list) is appended to all the input vec- tors. With these embedding vectors as input, we invoke FastQA to produce start and end scores for each of the n context tokens. We denote start scores by yi start and end scores conditioned on a predicted start at position i by yi,j end, with start in- dex i ∈ [1, n] and end index j ∈ [i, n]. 3.2 Output Layer In our adapted output layer, we convert the start and end scores to span probabilities. The com- putation of these probabilities is independent of the question type. The interpretation, however, depends on the question type: While for factoid questions, the list of answer spans is interpreted as a ranked list of answer candidates, for list ques- tions, answers above a certain probability thresh- old are interpreted as the set of answers to the question. Given the start scores y1 scores yi,1 probabilities as follows: end, ..., yi,n start and end end, we compute the start and end start, ..., yn pi start = σ(yi start) end = softmax(yi,· pi,· end) (1) (2) where σ(x) is the sigmoid function. As a conse- quence, multiple tokens can be chosen as likely start tokens, but the network is expected to se- lect a single end token for a given start token, hence the softmax function. Finally, the proba- bility that a given span (i, j) answers the question is pi,j end. This extension general- izes the FastQA output layer such that multiple an- swer spans with different start positions can have a high probability, allowing us to retrieve multiple answers for list questions. start · pi,j span = pi 3.3 Decoding Given a trained model, start probabilities can be obtained by running a forward pass and comput- ing the start probability as in Equation 1. For the top 20 starts, we compute the end probabilities as given by Eq. 2. From the start and end probabil- ities, we extract the top 20 answer spans ranked by pi,j span. As a simple post-processing step, we re- move duplicate strings and retain only those with the highest probability. For factoid questions, we output the 5 most likely answer spans as our ranked list of answers. For list questions, we learn a probability cutoff threshold t that defines the set of list answers A = {(i, j)pi,j span ≥ t}. We choose t to be the threshold that optimizes the list F1 score on the respective development set. 3.4 Domain Adaptation Fine-tuning Our training procedure consists of two phases: In the pre-training phase, we train the model on SQuAD, using a token F1 score as the training objective as by Weissenborn et al. (2017). We will refer to the resulting parameters as the base model. In the fine-tuning phase, we initial- ize the model parameters with the base model and then continue our optimization on the BioASQ dataset with a smaller learning rate. Forgetting Cost Regularization To avoid catastrophic forgetting during fine-tuning as a means to regularize our model, we optionally add an additional forgetting cost term Lf c, as proposed by Riemer et al. (2017). It is defined as the cross-entropy loss between the current predictions and the base model's predictions. L2 Weight Regularization We also add an L2 loss term Ll2 which penalizes deviations from the base model's parameters. Note that a more ad- vanced approach would be to apply this loss se- lectively on weights which are particularly im- portant in the source domain (Kirkpatrick et al., 2017). The final loss is computed as Lf inal = Loriginal + Cf c · Lf c + Cl2 · Ll2 where Cf c and Cl2 are hyperparameters which are set to 0 unless otherwise noted. 4 Experimental Setup 4.1 Datasets SQuAD SQuAD (Rajpurkar et al., 2016) is a dataset of ≈ 100, 000 questions with relevant con- texts and answers that sparked research interest into the development of neural QA systems re- cently. The contexts are excerpts of Wikipedia articles for which crowd-source workers gener- ated questions-answer pairs. Because of the large amount of training examples in SQuAD, it lends itself perfectly as our source dataset. BioASQ The BioASQ challenge provides a biomedical QA dataset (Tsatsaronis et al., 2015) consisting of questions, relevant contexts (called snippets) from PubMed abstracts and possible an- swers to the question. It was carefully created with the help of biomedical experts. In this work, we focus on Task B, Phase B of the BioASQ challenge, in which systems must answer questions from gold-standard snippets. These questions can be either yes/no questions, summary questions, factoid questions, or list questions. Be- cause we employ an extractive QA system, we re- strict this study to answering factoid and list ques- tions by extracting answer spans from the pro- vided contexts. The 2017 BioASQ training dataset contains 1, 799 questions, of which 413 are factoid and 486 are list questions. The questions have ≈ 20 snippets on average, each of which are on aver- age ≈ 34 tokens long. We found that around 65% of the factoid questions and around 92% of the list questions have at least one extractable answer. For questions with extractable answers, answers spans are computed via a simple substring search in the provided snippets. All other questions are ignored during training and treated as answered incorrectly during evaluation. 4.2 Training We minimize the cross-entropy loss for the gold standard answer spans. However, for multi- ple answer spans that refer to the same answer (e.g. synonyms), we only minimize the loss for the span of the lowest loss. We use the ADAM (Kingma and Ba, 2014) for optimization on SQuAD with a learning rate starting at 10−3 which is halved whenever performance drops be- tween checkpoints. During the fine-tuning phase, we continue optimization on the BioASQ dataset with a smaller learning rate starting at 10−4. Dur- ing both phases, the model is regularized by vari- ational dropout of rate 0.5 (Gal and Ghahramani, 2015). 4.3 Evaluation The official evaluation measures from BioASQ are mean reciprocal rank (MRR) for factoid questions and F1 score for list questions 1. For factoid ques- tions, the list of ranked answers can be at most five entries long. The F1 score is measured on the gold standard list elements. For both measures, 1The details can http:// participants-area.bioasq.org/Tasks/b/ eval_meas/ be found at case-insensitive string matches are used to check the correctness of a given answer. A list of syn- onyms is provided for all gold-standard answers. If the system's response matches one of them, the answer counts as correct. For evaluation, we use two different fine- tuning datasets, depending on the experiment: BioASQ3B, which contains all questions of the first three BioASQ challenges, and BioASQ4B which additionally contains the test questions of the fourth challenge. BioASQ4B is used as the training dataset for the fifth BioASQ challenge whereas BioASQ3B was used for training during the fourth challenge. Because the datasets are small, we perform 5- fold cross-validation and report the average per- formance across the five folds. We use the larger BioASQ4B dataset except when evaluating the en- semble and when comparing to participating sys- tems of previous BioASQ challenges. All models were implemented using Tensor- Flow (Abadi et al., 2016) with a hidden size of 100. Because the context in BioASQ usually com- prises multiple snippets, they are processed in- dependently in parallel for each question. An- swers from all snippets belonging to a question are merged and ranked according to their individual probabilities. 5 Results 5.1 Domain Adaptation In this section, we evaluate various domain adap- tation techniques. The results of the experiments are summarized in Table 1. Baseline As a baseline without transfer learn- ing, Experiment 1 trains the model on BioASQ only. Because the BioASQ dataset by itself is very small, a dropout rate of 0.7 was used, be- cause it worked best in preliminary experiments. We observe a rather low performance, which is expected when applying deep learning to such a small dataset. Fine-tuning Experiments 2 and 3 evaluate the pure fine-tuning approach: Our base model is a system trained on SQuAD only and tested on BioASQ (Experiment 2). For Experiment 3, we fine-tuned the base model on the BioASQ4B train- ing set. We observe that performance increases significantly, especially on list questions. This in- crease is expected, because the network is trained Experiment (1) Training on BioASQ only (2) Training on SQuAD only (3) Fine-tuning on BioASQ (4) Fine-tuning on BioASQ w/o biomedical embeddings (5) Fine-tuning on BioASQ w/ entity features (6) Fine-tuning on BioASQ + SQuAD (7) Fine-tuning on BioASQ w/ forgetting cost (Cf c = 100.0) (8) Fine-tuning on BioASQ w/ L2 loss on original parameters (Cl2 = 0.3) Factoid MRR List F1 19.1% 17.9% 8.1% 20.0% 24.6% 23.6% 22.4% 21.3% 23.8% 23.3% 23.9% 23.8% 21.1% 26.2% 22.6% 20.4% Table 1: Comparison of various transfer learning techniques. In Experiment 1, the model was trained on BioASQ only. In Experiment 2, the model was trained on SQuAD and tested on BioASQ. We refer to it as the base model. In Experiment 3, the base model parameters were fine-tuned on the BioASQ training set. Experiments 4-5 evaluate the utility of domain dependent word vectors and features. Experiments 6-8 address the problem of catastrophic forgetting. All experiments have been conducted with the BioASQ4B dataset and 5-fold cross-validation. on biomedical- and list questions, which are not part of the SQuAD dataset, for the first time. Over- all, the performance of the fine-tuned model on both question types is much higher than the base- line system without transfer learning. Features In order to evaluate the impact of us- ing biomedical word embeddings, we repeat Ex- periment 3 without them (Experiment 4). We see a factoid and list performance drop of 3.3 and 1.2 percentage points, respectively, showing that biomedical word embeddings help increase per- formance. In Experiment 5, we append entity features to the word vector, as described in Section 3.1. Even though these features provide the network with domain-specific knowledge, we found that it actu- ally harms performance on factoid questions. Be- cause most of the entity features are only active during fine-tuning with the small dataset, we con- jecture that the performance decrease is due to over-fitting. Catastrophic Forgetting We continue our study with techniques to combat catastrophic forgetting as a means to regularize training during fine-tuning. In Experiment 6 of Table 1 we fine-tune the base model on a half-half mixture of BioASQ and SQuAD questions (BioASQ questions have been upsampled accordingly). This form of joint training yielded no significant performance gains. Experiment 7 regularizes the model via an additional forgetting cost term, as proposed by Riemer et al. (2017) and explained in Section 3.4. We generally found that this technique only increases performance for factoid questions where the performance boost was largest for Cf c = 100.0. The fact that the forget- ting loss decreases performance on list questions is not surprising, as predictions are pushed more towards the predictions of the base model, which has very poor performance on list questions. Experiment 8 adds an L2 loss which penalizes deviations from the base model's parameters. We found that performance decreases as we increase the value of Cl2 which shows that this technique does not help at all. For the sake of completeness we report results for Cl2 = 0.3, the lowest value that yielded a significant drop in performance. 5.2 Ensemble Model ensembles are a common method to tweak the performance of a machine learning system. Ensembles combine multiple model predictions, for example by averaging, in order to improve gen- eralization and prevent over-fitting. We evaluate the utility of an ensemble by training five mod- els on the BioASQ3B dataset using 5-fold cross- validation. Each of the models is evaluated on the 4B test data, i.e., data which is not included in BioASQ3B. During application, we run an ensemble by av- eraging the start and end scores of individual mod- els before they are passed to the sigmoid / soft- max functions as defined in Eq. 1 and 2. In Ta- ble 2 we summarize the average performance of Experiment Factoid MRR List F1 24.0% Average 27.7% Best Ensemble 28.6% 23.4% 24.3% 27.3% Table 2: Performance of a model ensemble. Five models have been trained on the BioASQ3B dataset and tested on the 4B test questions. We report the average and best single model perfor- mances, as well as the ensemble performance. the five models, the best performance across the five models, and the performance of the ensem- ble. We observe performance gains of 3 percent- age points on factoid questions and a less than 1 percentage point on list questions, relative to the best single model. This demonstrates a small per- formance gain that is consistent with the literature. 5.3 Comparison to competing BioASQ systems Because the final results of the fifth BioASQ chal- lenge are not available at the time of writing, we compare our system to the best systems in last year's challenge 2. For comparison, we use the best single model and the model ensemble trained on BioASQ3B (see Section 5.2). We then evaluate the model on the 5 batches of last year's challenge using the official BioASQ evaluation tool. Each batch contains 100 questions of which only some are factoid and list questions. Note that the re- sults underestimate our system's performance, be- cause our competing system's responses have been manually evaluated by humans while our system's responses are evaluated automatically using string matching against a potentially incomplete list of synonyms. In fact, our qualitative analysis in Sec- tion 5.4 shows that many answers are counted as incorrect, but are synonyms of the gold-standard answer. The results are summarized in Table 3 and compared to the best systems in the challenge in each of the batches and question type categories. With our system winning four out of five batches on factoid questions, we consider it state- of-the-art in biomedical factoid question answer- ing, especially when considering that our results might be higher on manual evaluation. The results on list questions are slightly worse, but still very 2Last year's results //participants-area.bioasq.org/results/ 4b/phaseB/ are available at http: competitive. This is surprising, given that the net- work never saw a list question prior to the fine- tuning phase. Due to small test set sizes, the sam- pling error in each batch is large, causing the sin- gle model to outperform the model ensemble on some batches. 5.4 Qualitative Analysis In order to get a better insight into the quality of the predictions, we manually validated the predic- tions for the factoid questions of batch 5 of the fourth BioASQ challenge as given by the best sin- gle model (see Table 3). There are in total 33 fac- toid questions, of which 23 have as the gold stan- dard answer a span in one of the contexts. Ac- cording to the official BioASQ evaluation, only 4 questions are predicted correctly (i.e., the gold standard answer is ranked highest). However, we identified 10 rank-1 answers which are not counted as correct but are synonyms to the gold standard answer. Examples include "CMT4D dis- ease" instead of "Charcot-Marie-Tooth (CMT) 4D disease", "tafazzin" instead of "Tafazzin (TAZ) gene", and "β-glucocerebrosidase" instead of "Beta glucocerebrosidase". In total, we labeled 14 questions as correct and 24 questions as hav- ing their correct answer in the top 5 predictions. In the following, we give examples of mistakes made by the system. Questions are presented in italics. In the context, we underline predicted an- swers and present correct answers in boldface. We identified eight questions for which the se- mantic type of the top answer differs from the question answer type. Some of these cases are completely wrong predictions. However, this cate- gory also includes subtle mistakes like the follow- ing: In which yeast chromosome does the rDNA cluster reside? The rDNA cluster in Saccharomyces cerevisiae is located 450 kb from the left end and 610 kb from the right end of chromosome XII... Here, it predicted a yeast species the rDNA cluster is located in, but ignored that the question is asking for a chromosome. Another type of mistakes is that the top answer is somewhat correct, but is missing essential in- formation. We labeled four predictions with this category, like the following example: Factoid MRR List F1 Batch Best Participant 1 2 3 4 5 Avg. 12.2% (fa1) 22.6% (LabZhu-FDU) 24.4% (oaqa-3b-3) 32.5% (oaqa-3b-4) 28.5% (oaqa-3b-5) 24.0% Single Ensemble Best Participant 25.2% 29.2% 16.4% 24.2% 24.7% 20.6% 34.0% 40.3% 23.7% 23.2% 24.8% 27.5% 16.8% (fa1) 15.5% (LabZhu-FDU) 48.3% (oaqa-3b-3) 31.2% (oaqa-3b-4) 29.0% (oaqa-3b-5) 28.1% Single Ensemble 29.1% 27.9% 25.8% 20.8% 31.8% 33.3% 29.0% 24.1% 23.5% 26.1% 27.8% 26.5% Table 3: Comparison to systems on last year's (fourth) BioASQ challenge for factoid and list questions. For each batch and question type, we list the performance of the best competing system, our single model and ensemble. Note that our qualitative analysis (Section 5.4) suggests that our factoid performance on batch 5 would be about twice as high if all synonyms were contained in the gold standard answers. How early during pregnancy does non-invasive cffDNA testing allow sex determination of the fetus? Gold Standard Answer: "6th to 10th week of gestation" or "first trimester of pregnancy" "6th-10th" Given Top Answer: In summary, to our judgment, 14 of 33 ques- tions (42.4%) are answered correctly, and 24 of 33 questions (72.7%) are answered correctly in one of the top 5 answers. These are surprisingly high numbers considering low MRR score of 23.7% of the automatic evaluation (Table 3). 6 Discussion and future work The most significant result of this work is that state-of-the-art results in biomedical question an- swering can be achieved even in the absence of domain-specific feature engineering. Most com- peting systems require structured domain-specific resources, such as biomedical ontologies, parsers, and entity taggers. While these resources are available in the biomedical domain, they are not available in most domains. Our system, on the other hand, requires a large open-domain QA dataset, biomedical word em- beddings (which are trained in an unsupervised fashion), and a small biomedical QA dataset. This suggests that our methodology is easily transfer- able to other domains as well. Furthermore, we explored several supervised domain adaptation techniques. In particular, we demonstrated the usefulness of forgetting cost for factoid questions. The decreased performance on list questions is not surprising, because the model's performance on those questions is very poor prior to fine-tuning which is due to the lack of list questions in SQuAD. We believe that large scale open-domain corpora for list questions would enhance performance further. Unsupervised domain adaptation could be an interesting direction for future work, because the biomedical domain offers large amounts of textual data, some of which might even contain questions and their corresponding answers. We believe that leveraging these resources holds potential to fur- ther improve biomedical QA. 7 Conclusion In this paper, we described a deep learning ap- proach to address the task of biomedical question answering by using domain adaptation techniques. Our experiments reveal that mere fine-tuning in combination with biomedical word embeddings yield state-of-the-art performance on biomedical QA, despite the small amount of in-domain train- ing data and the lack of domain-dependent fea- ture engineering. Techniques to overcome catas- trophic forgetting, such as a forgetting cost, can further boost performance for factoid questions. Overall, we show that employing domain adapta- tion on neural QA systems trained on large-scale, open-domain datasets can yield good performance in domains where large datasets are not available. Acknowledgments This research was supported by the German Federal Ministry of Education and Research (BMBF) through Software Campus project GeNIE (01IS12050). References Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. 2016. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467 . John Blitzer, Mark Dredze, Fernando Pereira, et al. 2007. Biographies, bollywood, boom-boxes and blenders: Domain adaptation for sentiment classi- fication. In ACL. volume 7, pages 440–447. Konstantinos Bousmalis, George Trigeorgis, Nathan Silberman, Dilip Krishnan, and Dumitru Erhan. 2016. Domain separation networks. In Advances in Neural Information Processing Systems. pages 343– 351. Minmin Chen, Zhixiang Xu, Kilian Weinberger, and Fei Sha. 2012. Marginalized denoising autoen- arXiv preprint coders for domain adaptation. arXiv:1206.4683 . Yarin Gal and Zoubin Ghahramani. 2015. Dropout as a bayesian approximation: Representing model arXiv preprint uncertainty in deep learning. arXiv:1506.02142 2. Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Lavi- olette, Mario Marchand, and Victor Lempitsky. 2016. Domain-adversarial training of neural net- Journal of Machine Learning Research works. 17(59):1–35. Xavier Glorot, Antoine Bordes, and Yoshua Bengio. 2011. Domain adaptation for large-scale sentiment In Pro- classification: A deep learning approach. ceedings of the 28th international conference on ma- chine learning (ICML-11). pages 513–520. Dan Jurafsky. 2000. Speech & language processing. Pearson Education India. Diederik Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980 . James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Ag- nieszka Grabska-Barwinska, et al. 2017. Overcom- ing catastrophic forgetting in neural networks. Pro- ceedings of the National Academy of Sciences page 201611835. Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Cor- rado, and Jeff Dean. 2013. Distributed representa- tions of words and phrases and their compositional- In Advances in neural information processing ity. systems. pages 3111–3119. vectors space word word2vec http://bioasq.lip6.fr/info/BioASQword2vec/. to abstracts of biomedical obtained by applying articles Jeffrey Pennington, Richard Socher, and Christo- pher D. Manning. 2014. Glove: Global vectors for word representation. In Empirical Methods in Nat- ural Language Processing (EMNLP). pages 1532– 1543. http://www.aclweb.org/anthology/D14-1162. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250 . Metthew Riemer, Elham Khabiri, and Richard Good- win. 2017. Representation stability as a regular- izer for improved text analytics transfer learning https://openreview.net/pdf?id=HyenWc5gx. Andrei A Rusu, Neil C Rabinowitz, Guillaume Des- jardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. 2016. Progressive neural networks. arXiv preprint arXiv:1606.04671 . Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. 2016. Bidirectional attention flow for machine comprehension. arXiv preprint arXiv:1611.01603 . George Tsatsaronis, Georgios Balikas, Prodromos Malakasiotis, Ioannis Partalas, Matthias Zschunke, Michael R Alvers, Dirk Weissenborn, Anastasia Krithara, Sergios Petridis, Dimitris Polychronopou- los, et al. 2015. An overview of the bioasq large- scale biomedical semantic indexing and question an- swering competition. BMC bioinformatics 16(1):1. Ellen M Voorhees et al. 1999. The trec-8 question an- swering track report. In Trec. volume 99, pages 77– 82. Shuohang Wang and Jing Jiang. 2016. Machine com- prehension using match-lstm and answer pointer. arXiv preprint arXiv:1608.07905 . Dirk Weissenborn, Georg Wiese, and Laura Seiffe. 2017. Making neural qa as simple as possible but not simpler. arXiv preprint arXiv:1703.04816 . Caiming Xiong, Victor Zhong, and Richard Socher. 2016. Dynamic coattention networks for question answering. arXiv preprint arXiv:1611.01604 . Yang Zi, Zhou Yue, and Eric Nyberg. 2016. Learning to answer biomedical questions: Oaqa at bioasq 4b. ACL 2016 page 23. Ioannis Pavlopoulos, Aris Kosmopoulos, Ion Androutsopoulos. 2014. and Continuous
1909.00502
1
1909
2019-09-02T01:33:08
An Empirical Study of Incorporating Pseudo Data into Grammatical Error Correction
[ "cs.CL" ]
The incorporation of pseudo data in the training of grammatical error correction models has been one of the main factors in improving the performance of such models. However, consensus is lacking on experimental configurations, namely, choosing how the pseudo data should be generated or used. In this study, these choices are investigated through extensive experiments, and state-of-the-art performance is achieved on the CoNLL-2014 test set ($F_{0.5}=65.0$) and the official test set of the BEA-2019 shared task ($F_{0.5}=70.2$) without making any modifications to the model architecture.
cs.CL
cs
An Empirical Study of Incorporating Pseudo Data into Grammatical Error Correction Shun Kiyono 1,2 Jun Suzuki 2,1 Masato Mita 1,2 Tomoya Mizumoto 1,2∗ Kentaro Inui 2,1 2 Tohoku University 1 RIKEN Center for Advanced Intelligence Project {shun.kiyono, masato.mita, tomoya.mizumoto}@riken.jp; {jun.suzuki,inui}@ecei.tohoku.ac.jp 9 1 0 2 p e S 2 ] L C . s c [ 1 v 2 0 5 0 0 . 9 0 9 1 : v i X r a Abstract The incorporation of pseudo data in the train- ing of grammatical error correction models has been one of the main factors in improving the performance of such models. However, con- sensus is lacking on experimental configura- tions, namely, choosing how the pseudo data should be generated or used. In this study, these choices are investigated through exten- sive experiments, and state-of-the-art perfor- mance is achieved on the CoNLL-2014 test set (F0.5 = 65.0) and the official test set of the BEA-2019 shared task (F0.5 = 70.2) without making any modifications to the model archi- tecture. Introduction 1 To date, many studies have tackled grammatical error correction (GEC) as a machine translation (MT) task, in which ungrammatical sentences are regarded as the source language and grammatical sentences are regarded as the target language. This approach allows cutting-edge neural MT models to be adopted. For example, the encoder-decoder (EncDec) model (Sutskever et al., 2014; Bahdanau et al., 2015), which was originally proposed for MT, has been applied widely to GEC and has achieved remarkable results in the GEC research field (Ji et al., 2017; Chollampatt and Ng, 2018; Junczys- Dowmunt et al., 2018). However, a challenge in applying EncDec to GEC is that EncDec requires a large amount of training data (Koehn and Knowles, 2017), but the largest set of publicly available parallel data (Lang-8) in GEC has only two million sentence pairs (Mizumoto et al., 2011). Consequently, the method of augmenting the data by incorporat- ing pseudo training data has been studied inten- sively (Xie et al., 2018; Ge et al., 2018; Lichtarge et al., 2019; Zhao et al., 2019). ∗Current affiliation: Future Corporation When incorporating pseudo data, several deci- sions must be made about the experimental con- figurations, namely, (i) the method of generating the pseudo data, (ii) the seed corpus for the pseudo data, and (iii) the optimization setting (Section 2). However, consensus on these decisions in the GEC research field is yet to be formulated. For exam- ple, Xie et al. (2018) found that a variant of the backtranslation (Sennrich et al., 2016b) method (BACKTRANS (NOISY)) outperforms the gener- ation of pseudo data from raw grammatical sen- tences (DIRECTNOISE). By contrast, the current state of the art model (Zhao et al., 2019) uses the DIRECTNOISE method. In this study, we investigate these decisions re- garding pseudo data, our goal being to provide the research community with an improved understand- ing of the incorporation of pseudo data. Through extensive experiments, we determine suitable set- tings for GEC. We justify the reliability of the proposed settings by demonstrating their strong performance on benchmark datasets. Specifically, without any task-specific techniques or architec- ture, our model outperforms not only all previous single-model results but also all ensemble results except for the ensemble result by Grundkiewicz et al. (2019)1. By applying task-specific techniques, we further improve the performance and achieve state-of-the-art performance on the CoNLL-2014 test set and the official test set of the BEA-2019 shared task. 2 Problem Formulation and Notation In this section, we formally define the GEC task discussed in this paper. Let D be the GEC train- ing data that comprise pairs of an ungrammatical source sentence X and grammatical target sentence 1The paper (Grundkiewicz et al. 2019) has not been pub- lished yet at the time of submission. Y , i.e., D = {(Xn, Yn)}n. Here, D denotes the number of sentence pairs in the dataset D. eter set (cid:98)Θ that minimizes the following objective Let Θ represent all trainable parameters of the model. Our objective is to find the optimal param- function L(D, Θ) for the given training data D: L(D, Θ) = − 1 D log(p(Y X, Θ)), (1) (cid:88) (X,Y )∈D where p(Y X, Θ) denotes the conditional proba- bility of Y given X. In the standard supervised learning setting, the parallel data D comprise only "genuine" parallel data Dg (i.e., D = Dg). However, in GEC, incor- porating pseudo data Dp that are generated from grammatical sentences Y ∈ T , where T represents seed corpus (i.e., a set of grammatical sentences), is common (Xie et al., 2018; Zhao et al., 2019; Grundkiewicz et al., 2019). Our interest lies in the following three nontrivial aspects of Equation 1. Aspect (i): multiple meth- ods for generating pseudo data Dp are available (Section 3). Aspect (ii): options for the seed cor- pus T are numerous. To the best of our knowledge, how the seed corpus domain affects the model per- formance is yet to be shown. We compare three corpora, namely, Wikipedia, Simple Wikipedia (SimpleWiki) and English Gigaword, as a first trial. Wikipedia and SimpleWiki have similar domains, but different grammatical complexities. Therefore, we can investigate how grammatical complexity affects model performance by comparing these two corpora. We assume that Gigaword contains the smallest amount of noise among the three cor- pora. We can therefore use Gigaword to investigate whether clean text improves model performance. Aspect (iii): at least two major settings for incor- porating Dp into the optimization of Equation 1 are available. One is to use the two datasets jointly by concatenating them as D = Dg ∪ Dp, which here- inafter we refer to as JOINT. The other is to use Dp for pretraining, namely, minimizing L(Dp, Θ) to acquire Θ(cid:48), and then fine-tuning the model by minimizing L(Dg, Θ(cid:48)); hereinafter, we refer to this setting as PRETRAIN. We investigate these aspects through our extensive experiments (Section 4). 3 Methods for Generating Pseudo Data In this section, we describe three methods for gener- ating pseudo data. In Section 4, we experimentally compare these methods. BACKTRANS (NOISY) and BACKTRANS (SAM- PLE) Backtranslation for the EncDec model was proposed originally by Sennrich et al. (2016b). In backtranslation, a reverse model, which generates an ungrammatical sentence from a given grammat- ical sentence, is trained. The output of the reverse model is paired with the input and then used as pseudo data. BACKTRANS (NOISY) is a variant of backtrans- lation that was proposed by Xie et al. (2018)2. This method adds rβrandom to the score of each hypoth- esis in the beam for every time step. Here, noise r is sampled uniformly from the interval [0, 1], and βrandom ∈ R≥0 is a hyper-parameter that controls the noise scale. If we set βrandom = 0, then BACK- TRANS (NOISY) is identical to standard backtrans- lation. BACKTRANS (SAMPLE) is another variant of backtranslation, which was proposed by Edunov et al. (2018) for MT. In BACKTRANS (SAMPLE), sentences are decoded by sampling from the distri- bution of the reverse model. DIRECTNOISE Whereas BACKTRANS (NOISY) and BACKTRANS (SAMPLE) generate ungram- matical sentences with a reverse model, DIRECT- NOISE injects noise "directly" into grammatical sentences (Edunov et al., 2018; Zhao et al., 2019). Specifically, for each token in the given sentence, this method probabilistically chooses one of the fol- lowing operations: (i) masking with a placeholder token (cid:104)mask(cid:105), (ii) deletion, (iii) insertion of a ran- dom token, and (iv) keeping the original3. For each token, the choice is made based on the categorical distribution (µmask, µdeletion, µinsertion, µkeep). 4 Experiments The goal of our experiments is to investigate aspect (i) -- (iii) introduced in Section 2. To ensure that the experimental findings are applicable to GEC in general, we design our experiments by using the following two strategies: (i) we use an off-the-shelf EncDec model without any task-specific architec- ture or techniques; (ii) we conduct hyper-parameter tuning, evaluation and comparison of each method or setting on the validation set. At the end of exper- iments (Section 4.5), we summarize our findings and propose suitable settings. We then perform a single-shot evaluation of their performance on the test set. 2referred as "random noising" in Xie et al. (2018) 3The detailed algorithm is described in Appendix A. Dataset #sent (pairs) #refs. Split BEA-train BEA-valid CoNLL-2014 JFLEG BEA-test SimpleWiki∗ Wikipedia∗ Gigaword∗ 561,410 2,377 1,312 1,951 4,477 1,369,460 145,883,941 131,864,979 1 1 2 4 5 - - - Scorer - ERRANT train valid test ERRANT & M 2 scorer test test ERRANT GLEU - - - - - - Table 1: Summary of datasets used in our experiments. Dataset marked with "*" is a seed corpus T . 4.1 Experimental Configurations Dataset The BEA-2019 workshop official dataset4 is the origin of the training and valida- tion data of our experiments. Hereinafter, we refer to the training data as BEA-train. We create val- idation data (BEA-valid) by randomly sampling sentence pairs from the official validation split5. As a seed corpus T , we use SimpleWiki6, Wikipedia7 or Gigaword8. We apply the noizing methods described in Section 3 to each corpus and generate pseudo data Dp. The characteristics of each dataset are summarized in Table 1. Evaluation We report results on BEA-valid, the official test set of the BEA-2019 shared task (BEA-test), the CoNLL-2014 test set (CoNLL- 2014) (Ng et al., 2014), and the JFLEG test set (JFLEG) (Napoles et al., 2017). All reported results (except ensemble) are the average of five distinct tri- als using five different random seeds. We report the scores measured by ERRANT (Bryant et al., 2017; Felice et al., 2016) for BEA-valid, BEA-test, and CoNLL-2014. As the reference sentences of BEA- test are publicly unavailable, we evaluate the model outputs on CodaLab9 for BEA-test. We also re- port results measured by the M 2 scorer (Dahlmeier and Ng, 2012) on CoNLL-2014 to compare them with those of previous studies. We use the GLEU metric (Napoles et al., 2015, 2016) for JFLEG. Model We adopt the Transformer EncDec model (Vaswani et al., 2017) using the fairseq toolkit (Ott et al., 2019) and use the "Transformer (big)" settings of Vaswani et al. (2017). Optimization For the JOINT setting, we opti- 4Details of the dataset is in Appendix B. 5The detailed data preparation process is in Appendix C. 6https://simple.wikipedia.org 7We used 2019-02-25 dump file at https://dumps. wikimedia.org/other/cirrussearch/. 8We used the English Gigaword Fifth Edition (LDC Cata- log No.: LDC2011T07). competitions/20228 Method Baseline BACKTRANS (SAMPLE) BACKTRANS (NOISY) DIRECTNOISE Prec. Rec. F0.5 46.6 38.8 39.6 44.6 39.7 42.5 48.9 41.4 23.1 27.4 31.3 25.7 Table 2: Performance of models on BEA-valid: a value in bold indicates the best result within the column. The seed corpus T is SimpleWiki. mize the model with Adam (Kingma and Ba, 2015). For the PRETRAIN setting, we pretrain the model with Adam and then fine-tune it on BEA-train using Adafactor (Shazeer and Stern, 2018)10. (NOISY), BACKTRANS 4.2 Aspect (i): Pseudo Data Generation We compare the effectiveness of the BACK- (SAMPLE), TRANS and DIRECTNOISE methods generat- ing pseudo data. In DIRECTNOISE, we set = (0.5, 0.15, 0.15, 0.2)11. We use βrandom = 6 for BACKTRANS (NOISY)12. In addition, we use (i) the JOINT setting and (ii) all of SimpleWiki as the seed corpus T throughout this section. (µmask, µdeletion, µinsertion, µkeep) for The results are summarized in Table 2. BACK- TRANS (NOISY) and BACKTRANS (SAMPLE) show competitive values of F0.5. Given this result, we exclusively use BACKTRANS (NOISY) and discard BACKTRANS (SAMPLE) for the rest of the exper- iments. The advantage of BACKTRANS (NOISY) is that its effectiveness in GEC has already been demonstrated by Xie et al. (2018). In addition, in our preliminary experiment, BACKTRANS (NOISY) decoded ungrammatical sentence 1.2 times faster than BACKTRANS (SAMPLE) did. We also use DI- RECTNOISE because it achieved the best value of F0.5 among all the methods. 4.3 Aspect (ii): Seed Corpus T We investigate the effectiveness of the seed corpus T for generating pseudo data Dp. The three cor- pora (Wikipedia, SimpleWiki and Gigaword) are compared in Table 3. We set Dp = 1.4M. The difference in F0.5 is small, which implies that the seed corpus T has only a minor effect on the model performance. Nevertheless, Gigaword consistently outperforms the other two corpora. In particular, 10The detailed hyper-parameters are listed in Appendix D. 11These values are derived from preliminary experiments (Appendix E). experiments (Appendix F). 9https://competitions.codalab.org/ 12βrandom = 6 achieved the best F0.5 in our preliminary Method Baseline BACKTRANS (NOISY) BACKTRANS (NOISY) BACKTRANS (NOISY) DIRECTNOISE DIRECTNOISE DIRECTNOISE Seed Corpus T N/A Wikipedia SimpleWiki Gigaword Wikipedia SimpleWiki Gigaword Prec. Rec. F0.5 46.6 23.1 38.8 30.8 40.4 43.8 31.3 39.7 42.5 33.1 40.6 43.1 48.3 25.5 41.0 25.7 41.4 48.9 48.3 26.9 41.7 Table 3: Performance on BEA-valid when changing the seed corpus T used for generating pseudo data (Dp = 1.4M). DIRECTNOISE with Gigaword achieves the best value of F0.5 among all the configurations. 4.4 Aspect (iii): Optimization Setting We compare the JOINT and PRETRAIN optimiza- tion settings. We are interested in how each setting performs when the scale of the pseudo data Dp compared with that of the genuine parallel data Dg is (i) approximately the same (Dp = 1.4M) and (ii) substantially bigger (Dp = 14M). Here, we use Wikipedia as the seed corpus T instead of SimpleWiki or Gigaword for two reasons. First, SimpleWiki is too small for the experiment (b) (see Table 1). Second, the fact that Gigaword is not freely available makes it difficult for other re- searchers to replicate our results. (a) Joint Training or Pretraining Table 4 presents the results. The most notable result here is that PRETRAIN demonstrates the properties of more pseudo data and better performance, whereas JOINT does not. For example, in BACKTRANS (NOISY), increasing Dp (1.4M → 14M) improves F0.5 on PRETRAIN (41.1 → 44.5). By contrast, F0.5 does not improve on JOINT (40.4 → 40.3). An intuitive explanation for this case is that when pseudo data Dp are substantially more than genuine data Dg, the teaching signal from Dp becomes dom- inant in JOINT. PRETRAIN alleviates this problem because the model is trained with only Dg during fine-tuning. We therefore suppose that PRETRAIN is crucial for utilizing extensive pseudo data. (b) Amount of Pseudo Data We investigate how increasing the amount of pseudo data affects the PRETRAIN setting. We pretrain the model with different amounts of pseudo data {1.4M, 7M, 14M, 30M, 70M}. The results in Figure 1 show that BACKTRANS (NOISY) has superior sample effi- ciency to DIRECTNOISE. The best model (pre- trained with 70M BACKTRANS (NOISY)) achieves Dp Prec. Rec. F0.5 Optimization Method N/A Baseline 0 46.6 23.1 38.8 PRETRAIN BACKTRANS (NOISY) 1.4M 49.6 24.3 41.1 PRETRAIN DIRECTNOISE 1.4M 48.4 21.2 38.5 BACKTRANS (NOISY) 1.4M 43.8 30.8 40.4 JOINT JOINT DIRECTNOISE 1.4M 48.3 25.5 41.0 PRETRAIN BACKTRANS (NOISY) 14M 50.6 30.1 44.5 PRETRAIN DIRECTNOISE 14M 49.8 25.8 42.0 BACKTRANS (NOISY) 14M 43.0 32.3 40.3 JOINT JOINT DIRECTNOISE 14M 48.7 23.5 40.1 Table 4: Performance of the model with different opti- mization settings on BEA-valid. The seed corpus T is Wikipedia. Figure 1: Performance on BEA-valid for different amounts of pseudo data (Dp). The seed corpus T is Wikipedia. F0.5 = 45.9. 4.5 Comparison with Current Top Models The present experimental results show that the fol- lowing configurations are effective for improving the model performance: (i) the combination of JOINT and Gigaword (Section 4.3), (ii) the amount of pseudo data Dp not being too large in JOINT (Section 4.4(a)), and (iii) PRETRAIN with BACK- TRANS (NOISY) using large pseudo data Dp (Sec- tion 4.4(b)). We summarize these findings and attempt to combine PRETRAIN and JOINT. Specif- ically, we pretrain the model using 70M pseudo data of BACKTRANS (NOISY). We then fine-tune the model by combining BEA-train and relatively small DIRECTNOISE pseudo data generated from Gigaword (we set Dp = 250K). However, the per- formance does not improve on BEA-valid. There- fore, the best approach available is simply to pre- train the model with large (70M) BACKTRANS (NOISY) pseudo data and then fine-tune using BEA- train, which hereinafter we refer to as PRETLARGE. We use Gigaword for the seed corpus T because it has the best performance in Table 3. We evaluate the performance of PRETLARGE on test sets and compare the scores with the current top models. Table 5 shows a remarkable result, that is, 010203040506070AmountofPseudoDataDp(M)40424446F0.5scoreBaselineBacktrans(noisy)DirectNoise Model Ensemble Prec. Rec. F0.5 Prec. Rec. F0.5 GLEU Prec. Rec. F0.5 CoNLL-2014 (M 2 scorer) CoNLL-2014 (ERRANT) JFLEG BEA-test (ERRANT) Chollampatt and Ng (2018) Junczys-Dowmunt et al. (2018) Grundkiewicz and Junczys-Dowmunt (2018) Lichtarge et al. (2019) Chollampatt and Ng (2018) Junczys-Dowmunt et al. (2018) Lichtarge et al. (2019) Zhao et al. (2019) Grundkiewicz et al. (2019) PRETLARGE PRETLARGE+SSE+R2L PRETLARGE+SSE+R2L+SED 60.9 - 66.8 65.5 23.7 - 34.5 37.1 (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) (cid:88) 65.5 61.9 66.7 71.6 - 67.9 72.4 73.3 33.1 40.2 43.9 38.7 - 44.1 46.1 44.2 46.4 53.0 56.3 56.8 54.8 55.8 60.4 61.2 64.2 61.3 65.0 64.7 - - - - - - - - - - - - - - - - - - - - - - - - - - - 61.2 67.3 68.1 42.0 44.0 42.1 56.0 60.9 60.6 51.3 57.9 61.5 61.6 57.5 59.9 63.3 61.0 61.2 59.7 61.4 61.2 - - - - - - - - 72.3 65.5 72.1 74.7 - - - - - - - - 60.1 59.4 61.8 56.7 - - - - - - - - 69.5 64.2 69.8 70.2 Table 5: Comparison of our best model and current top models: a bold value indicates the best result within the column. our PRETLARGE achieves F0.5 = 61.3 on CoNLL- 2014. This result outperforms not only all previous single-model results but also all ensemble results except for that by Grundkiewicz et al. (2019). To further improve the performance, we incorpo- rate the following techniques that are widely used in shared tasks such as BEA-2019 and WMT13: Synthetic Spelling Error (SSE) Lichtarge et al. (2019) proposed the method of probabilistically injecting character-level noise into the source sen- tence of pseudo data Dp. Specifically, one of the following operations is applied randomly at a rate of 0.003 per character: deletion, insertion, replace- ment, or transposition of adjacent characters. Right-to-left Re-ranking (R2L) Following Sen- nrich et al. (2016a, 2017); Grundkiewicz et al. (2019), we train four right-to-left models. The en- semble of four left-to-right models generate n-best candidates and their corresponding scores (i.e., con- ditional probabilities). We then pass each candidate to the ensemble of the four right-to-left models and compute the score. Finally, we re-rank the n-best candidates based on the sum of the two scores. Sentence-level Error Detection (SED) SED classifies whether a given sentence contains a gram- matical error. Asano et al. (2019) proposed incor- porating SED into the evaluation pipeline and re- ported improved precision. Here, the GEC model is applied only if SED detects a grammatical er- ror in the given source sentence. The motivation is that SED could potentially reduce the number of false-positive errors of the GEC model. We use the re-implementation of the BERT-based SED model (Asano et al., 2019). Table 5 presents the results of applying SSE, 13http://www.statmt.org/wmt19/ is noteworthy that PRET- R2L, and SED. It LARGE+SSE+R2L achieves state-of-the-art per- formance on both CoNLL-2014 (F0.5 = 65.0) and BEA-test (F0.5 = 69.8), which are better than those of the best system of the BEA-2019 shared task (Grundkiewicz et al., 2019). In addition, PRET- LARGE+SSE+R2L+SED can further improve the performance on BEA-test (F0.5 = 70.2). However, unfortunately, incorporating SED decreased the performance on CoNLL-2014 and JFLEG. This fact implies that SED is sensitive to the domain of the test set since the SED model is fine-tuned with the official validation split of BEA dataset. We leave this sensitivity issue as our future work. 5 Conclusion In this study, we investigated several aspects of incorporating pseudo data for GEC. Through ex- tensive experiments, we found the following to be effective: (i) utilizing Gigaword as the seed corpus, and (ii) pretraining the model with BACKTRANS (NOISY) data. Based on these findings, we pro- posed suitable settings for GEC. We demonstrated the effectiveness of our proposal by achieving state- of-the-art performance on the CoNLL-2014 test set and the BEA-2019 test set. Acknowledgements We thank the three anonymous reviewers for their insightful comments. We are deeply grateful to Takumi Ito and Tatsuki Kuribayashi for kindly sharing the re-implementation of BACKTRANS (NOISY). The work of Jun Suzuki was sup- ported in part by JSPS KAKENHI Grant Number JP19104418 and AIRPF Grant Number 30AI036-8. References Hiroki Asano, Masato Mita, Tomoya Mizumoto, and Jun Suzuki. 2019. The AIP-Tohoku System at the BEA-2019 Shared Task. In Proceedings of the Four- teenth Workshop on Innovative Use of NLP for Build- ing Educational Applications (BEA 2019), pages 176 -- 182. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- gio. 2015. Neural Machine Translation by Jointly Learning to Align and Translate. In Proceedings of the 3rd International Conference on Learning Rep- resentations (ICLR 2015). Roman Grundkiewicz and Marcin Junczys-Dowmunt. 2018. Near Human-Level Performance in Grammat- ical Error Correction with Hybrid Machine Transla- tion. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Com- putational Linguistics (NAACL 2018), pages 284 -- 290. Roman Grundkiewicz, Marcin Junczys-Dowmunt, and Kenneth Heafield. 2019. Neural grammatical error correction systems with unsupervised pre-training on synthetic data. In Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Ed- ucational Applications (BEA 2019), pages 252 -- 263. Christopher Bryant, Mariano Felice, and Ted Briscoe. 2017. Automatic Annotation and Evaluation of Er- ror Types for Grammatical Error Correction. In Pro- ceedings of the 55th Annual Meeting of the Asso- ciation for Computational Linguistics (ACL 2017), pages 793 -- 805. Jianshu Ji, Qinlong Wang, Kristina Toutanova, Yongen Gong, Steven Truong, and Jianfeng Gao. 2017. A Nested Attention Neural Hybrid Model for Gram- In Proceedings of the matical Error Correction. 55th Annual Meeting of the Association for Compu- tational Linguistics (ACL 2017), pages 753 -- 762. Shamil Chollampatt and Hwee Tou Ng. 2018. A Mul- tilayer Convolutional Encoder-Decoder Neural Net- work for Grammatical Error Correction. In Proceed- ings of the Thirty-Second AAAI Conference on Arti- ficial Intelligence (AAAI 2018), pages 5755 -- 5762. Daniel Dahlmeier and Hwee Tou Ng. 2012. Better Evaluation for Grammatical Error Correction. In Proceedings of the 2012 Conference of the North American Chapter of the Association for Computa- tional Linguistics (NAACL 2012), pages 568 -- 572. Daniel Dahlmeier, Hwee Tou Ng, and Siew Mei Wu. 2013. Building a Large Annotated Corpus of Learner English: The NUS Corpus of Learner En- In Proceedings of the 8th Workshop on glish. Building Educational Applications Using NLP (BEA 2013), pages 22 -- 31. Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018. Understanding Back-Translation at In Proceedings of the 2018 Conference on Scale. Empirical Methods in Natural Language Processing (EMNLP 2018), pages 489 -- 500. Mariano Felice, Christopher Bryant, and Ted Briscoe. 2016. Automatic Extraction of Learner Errors in ESL Sentences Using Linguistically Enhanced Alignments. In Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, pages 825 -- 835. Tao Ge, Furu Wei, and Ming Zhou. 2018. Fluency Boost Learning and Inference for Neural Grammati- cal Error Correction. In Proceedings of the 56th An- nual Meeting of the Association for Computational Linguistics (ACL 2018), pages 1055 -- 1065. Sylviane Granger. 1998. The computer learner corpus: A versatile new source of data for SLA research. In Sylviane Granger, editor, Learner English on Com- puter, pages 3 -- 18. Addison Wesley Longman, Lon- don and New York. Marcin Junczys-Dowmunt, Roman Grundkiewicz, Shubha Guha, and Kenneth Heafield. 2018. Ap- proaching Neural Grammatical Error Correction as a Low-Resource Machine Translation Task. In Pro- ceedings of the 2018 Conference of the North Amer- ican Chapter of the Association for Computational Linguistics (NAACL 2018), pages 595 -- 606. Diederik Kingma and Jimmy Ba. 2015. Adam: A In Proceed- Method for Stochastic Optimization. ings of the 3rd International Conference on Learn- ing Representations (ICLR 2015). Philipp Koehn and Rebecca Knowles. 2017. Six Chal- lenges for Neural Machine Translation. In Proceed- ings of the First Workshop on Neural Machine Trans- lation, pages 28 -- 39. Jared Lichtarge, Chris Alberti, Shankar Kumar, Noam Shazeer, Niki Parmar, and Simon Tong. 2019. Cor- pora Generation for Grammatical Error Correction. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computa- tional Linguistics (NAACL 2019). Tomoya Mizumoto, Mamoru Komachi, Masaaki Na- gata, and Yuji Matsumoto. 2011. Mining Revi- sion Log of Language Learning SNS for Auto- mated Japanese Error Correction of Second Lan- guage Learners. In Proceedings of the 5th Interna- tional Joint Conference on Natural Language Pro- cessing (IJCNLP 2011), pages 147 -- 155. Courtney Napoles, Keisuke Sakaguchi, Matt Post, and Joel Tetreault. 2015. Ground Truth for Grammati- cal Error Correction Metrics. In Proceedings of the 53rd Annual Meeting of the Association for Compu- tational Linguistics and the 7th International Joint Conference on Natural Language Processing (ACL & IJCNLP 2015), pages 588 -- 593. Courtney Napoles, Keisuke Sakaguchi, Matt Post, and Joel Tetreault. 2016. GLEU Without Tuning. arXiv preprint arXiv:1605.02592. Courtney Napoles, Keisuke Sakaguchi, and Joel JFLEG: A Fluency Corpus and Tetreault. 2017. Benchmark for Grammatical Error Correction. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Lin- guistics (EACL 2017), pages 229 -- 234. Toshikazu Tajiri, Mamoru Komachi, and Yuji Mat- sumoto. 2012. Tense and Aspect Error Correction In Pro- for ESL Learners Using Global Context. ceedings of the 50th Annual Meeting of the Asso- ciation for Computational Linguistics (ACL 2012), pages 198 -- 202. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention Is All You Need. In Advances in Neural Information Pro- cessing Systems 31 (NIPS 2017), pages 5998 -- 6008. Ziang Xie, Guillaume Genthial, Stanley Xie, Andrew Ng, and Dan Jurafsky. 2018. Noising and Denois- ing Natural Language: Diverse Backtranslation for In Proceedings of the 2018 Grammar Correction. Conference of the North American Chapter of the Association for Computational Linguistics (NAACL 2018), pages 619 -- 628. Helen Yannakoudakis, Øistein E. Andersen, Ardeshir Geranpayeh, Ted Briscoe, and Diane Nicholls. 2018. Developing an Automated Writing Placement sys- tem for ESL Learners. Applied Measurement in Ed- ucation, 31(3):251 -- 267. Helen Yannakoudakis, Ted Briscoe, and Ben Medlock. 2011. A New Dataset and Method for Automatically Grading ESOL Texts. In Proceedings of the 49th An- nual Meeting of the Association for Computational Linguistics (ACL 2011), pages 180 -- 189. Wei Zhao, Liang Wang, Kewei Shen, Ruoyu Jia, and Jingming Liu. 2019. Improving Grammatical Error Correction via Pre-Training a Copy-Augmented Ar- chitecture with Unlabeled Data. In Proceedings of the 2019 Conference of the North American Chap- ter of the Association for Computational Linguistics (NAACL 2019). Hwee Tou Ng, Siew Mei Wu, Ted Briscoe, Christian Hadiwinoto, Raymond Hendy Susanto, and Christo- pher Bryant. 2014. The CoNLL-2014 Shared Task on Grammatical Error Correction. In Proceedings of the Eighteenth Conference on Computational Natu- ral Language Learning: Shared Task, pages 1 -- 14. Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. fairseq: A Fast, Extensible Toolkit for Sequence Modeling. In Proceedings of the 2019 Conference of the North American Chap- ter of the Association for Computational Linguistics (NAACL 2019). Rico Sennrich, Alexandra Birch, Anna Currey, Ulrich Germann, Barry Haddow, Kenneth Heafield, An- tonio Valerio Miceli Barone, and Philip Williams. 2017. The university of Edinburgh's neural MT sys- In Proceedings of the Second tems for WMT17. Conference on Machine Translation (WMT 2017), pages 389 -- 399. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016a. Edinburgh neural machine translation sys- tems for WMT 16. In Proceedings of the First Con- ference on Machine Translation: Volume 2, Shared Task Papers (WMT 2016), pages 371 -- 376. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016b. Improving Neural Machine Translation Models with Monolingual Data. In Proceedings of the 54th Annual Meeting of the Association for Com- putational Linguistics (ACL 2016), pages 86 -- 96. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016c. Neural Machine Translation of Rare Words with Subword Units. In Proceedings of the 54th An- nual Meeting of the Association for Computational Linguistics (ACL 2016), pages 1715 -- 1725. Noam Shazeer and Mitchell Stern. 2018. Adafactor: Adaptive Learning Rates with Sublinear Memory Cost. In Proceedings of the 35th International Con- ference on Machine Learning (ICML 2018), pages 4603 -- 4611. Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to Sequence Learning with Neural Net- works. In Advances in Neural Information Process- ing Systems 28 (NIPS 2014), pages 3104 -- 3112. Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. 2016. Rethinking the inception architecture for computer vision. In 2016 IEEE Conference on Computer Vision and Pat- tern Recognition (CVPR 2016), pages 2818 -- 2826. A DIRECTNOISE Algorithm The DIRECTNOISE algorithm is described in Algorithm 1 Here, X consists of sequence of I tokens, namely, X = (x1, . . . , xI ) where xi denotes i-th token of X. Similarly, Y consists of sequence of J tokens, namely, Y = (y1, . . . , yJ ) where yj denotes j-th token of Y . // create empty set Algorithm 1: DIRECTNOISE Algorithm Data: Grammatical sentence Y ∈ T Result: Pseudo Corpus Dp 1 Dp = {} 2 µ = {µmask, µdeletion, µinsertion, µkeep} s.t. Σµ = 1 3 for Y ∈ T do X = ( ) for j ∈ (1, . . . , J) do 4 5 6 7 8 action ∼ Cat(actionµ) if action is keep then append yj to X 9 10 11 12 13 14 15 16 17 else if action is mask then append (cid:104)mask(cid:105)) to X else if action is deletion then continue else if action is insertion then append yj to X w = sample f rom unigram distribution(Dg) append w to X Dp = Dp ∪ {(X, Y )} B BEA-2019 Workshop Official Dataset The BEA-2019 Workshop official dataset consists of following corpora: the First Certificate in English corpus (Yannakoudakis et al., 2011), Lang-8 Corpus of Learner English (Lang-8) (Mizumoto et al., 2011; Tajiri et al., 2012), the National University of Singapore Corpus of Learner English (NUCLE) (Dahlmeier et al., 2013), and W&I+LOCNESS (Yannakoudakis et al., 2018; Granger, 1998). The data is publicly available at https://www.cl.cam.ac.uk/research/nl/bea2019st/. training data We (BEA-train) C Data Preparation Process The used en core web sm-2.1.0 model15. We remove sentence pairs that have identical source and target sentences from the training set, following (Chollampatt and Ng, 2018). Then we acquire subwords from target sentence through byte-pair-encoding (BPE) (Sennrich et al., 2016c) algorithm. We used subword-nmt implementation16. We apply BPE splitting to both source and target text. The number of merge operation is set to 8,000. using spaCy tokenizer14. is tokenized 14https://spacy.io/ 15https://github.com/explosion/spacy-models/releases/tag/en_core_web_sm-2.1.0 16https://github.com/rsennrich/subword-nmt D Hyper-parameter Settings Configurations Model Architecture Optimizer Learning Rate Schedule Number of Epochs Dropout Stopping Criterion Gradient Clipping Loss Function Beam Search Values Transformer (Vaswani et al., 2017) ("big" setting) Adam (Kingma and Ba, 2015) (β1 = 0.9, β2 = 0.98,  = 1 × 10−8) Same as described in Section 5.3 of Vaswani et al. (2017) 40 0.3 Train model for 40 epochs. During the training, save model parameter for every 500 updates. Then take average of last 20 checkpoints. 1.0 Label smoothed cross entropy (smoothing value: ls = 0.1) (Szegedy et al., 2016) Beam size 5 with length-normalization Table 6: Hyper-parameter for JOINT optimization Configurations Values Pretraining Model Architecture Optimizer Learning Rate Schedule Number of Epochs Dropout Gradient Clipping Loss Function Transformer (Vaswani et al., 2017) ("big" setting) Adam (Kingma and Ba, 2015) (β1 = 0.9, β2 = 0.98,  = 1 × 10−8) Same as described in Section 5.3 of Vaswani et al. (2017) 10 0.3 1.0 Label smoothed cross entropy (smoothing value: ls = 0.1) (Szegedy et al., 2016) Fine-tuning Model Architecture Transformer (Vaswani et al., 2017) ("big" setting) Optimizer Adafactor (Shazeer and Stern, 2018) Learning Rate Schedule Constant learning rate of 3 × 10−5 Number of Epochs Dropout Stopping Criterion Gradient Clipping Loss Function Beam Search 30 0.3 Use the model with the best validation perplexity on BEA-valid 1.0 Label smoothed cross entropy (smoothing value: ls = 0.1) (Szegedy et al., 2016) Beam size 5 with length-normalization Table 7: Hyper-parameter for PRETRAIN optimization E Mask Probability of DIRECTNOISE In this paper, we exclusively focused on the effectiveness of µmask, and therefore we deliberately fixed µkeep = 0.2, and used µinsertion = µdeletion = (1 − µkeep − µmask)/2 We investigated the effectiveness of changing mask probability µmask of BACKTRANS (NOISY) by evaluating the model performance on BEA-valid. We used entire SimpleWiki as the seed corpus T . The result is summarized in Figure 2. Here, increasing µmask within the range of 0.1 < µmask < 0.5 slightly improved the performance. Thus, used µmask = 0.5 in the experiment (Section 4). Figure 2: Performance of the model on BEA-valid as parameter of DIRECTNOISE (µmask) is varied. F Noise Strength of BACKTRANS (NOISY) We investigated the effectiveness of varying βrandom hyper-parameter of BACKTRANS (NOISY) by evaluating its performance on BEA-valid (Figure 3). We used entire SimpleWiki as the seed corpus T . The figure shows that the performance of backtranslation without noise (βrandom = 0) is worse than the baseline. We believe that when there is no noise, reverse-model becomes too conservative to generate grammatical error, as discussed by Xie et al. (2018). Thus, the generated pseudo data cannot provide useful teaching signal for the model. In terms of the scale of the noise, βrandom = 6 is the best value for BACKTRANS (NOISY). Thus, we used this value in the experiment (Section 4). Figure 3: Performance of the model on BEA-valid as parameter of BACKTRANS (NOISY) (βrandom) is varied. 0.10.30.50.7µmask40.640.841.041.241.4F0.50369121518βrandom353637383940F0.5Baseline BACKTRANS (NOISY): The cli@@ p is mix with images of Toronto streets during DIRECTNOISE: Original: DIRECTNOISE: Original: rea@@ ter London . (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) for (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) The cli@@ p is mixed with images of Toronto streets during power failure . power failure . The (cid:104)mask(cid:105) is mixed (cid:104)mask(cid:105) images si@@ of The (cid:104)mask(cid:105) streets large (cid:104)mask(cid:105) power R@@ failure place (cid:104)mask(cid:105) At the in@@ stitute , she introduced tis@@ sue culture methods that she had learned in the U.@@ S. G Examples of Noisy Sentences Figure 4 shows examples of noisy sentences that are generated by BACKTRANS (NOISY) and DIRECT- NOISE. Original: He died there , but the death date is not clear . BACKTRANS (NOISY): He died at there , but death date is not clear . (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) , 2 but (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) is not DIRECTNOISE: (cid:104)mask(cid:105) (cid:104)mask(cid:105) Original: On seeing her his joy knew no bounds . BACKTRANS (NOISY): On seeing her joyful knew no bounds . (cid:104)mask(cid:105) (cid:104)mask(cid:105) her crahis (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) bke (cid:104)mask(cid:105) . DIRECTNOISE: Original: Gre@@ en@@ space Information for G@@ rea@@ ter London . BACKTRANS (NOISY): The information for Gre@@ en@@ space information about G@@ BACKTRANS (NOISY): At in@@ stitute , She introduced tis@@ sue culture method that she learned in U.@@ S. (cid:104)mask(cid:105) the the (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) tis@@ culture R@@ methods , she P (cid:104)mask(cid:105) the s U.@@ (cid:104)mask(cid:105) DIRECTNOISE: Figure 4: Examples of sentences generated by BACKTRANS (NOISY) and DIRECTNOISE methods. Figure 5 shows examples generated by DIRECTNOISE, when changing the mask probability (µmask). Output Sentence He threw the sand@@ wi@@ ch at his wife . He ale threw , ch his ne@@ wife dar@@ (cid:104)mask(cid:105) µmask N/A 0.1 0.3 0.5 0.7 (cid:104)mask(cid:105) (cid:104)mask(cid:105) sand@@ (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) wife (cid:104)mask(cid:105) Figure 5: Examples generated when varying µmask. N/A denotes original text. (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) (cid:104)mask(cid:105) ch at ament his Research . He o threw the sand@@ ch (cid:104)mask(cid:105) his (cid:104)mask(cid:105) . H Performance of the Model without Fine-tuning PRETRAIN setting undergoes two optimization steps, namely, pretraining with pseudo data Dp and fine-tuning with genuine parallel data Dg. We report the performance of models with pretraining only (Figure 6). Figure 6: Performance on BEA-valid when varying the amount of pseudo data (Dp) 01020304050607080AmountofPseudoDataDp(M)01020304050F0.5scoreBaselineBacktrans(noisy)DirectNoise
1907.05854
1
1907
2019-07-12T17:23:30
The University of Edinburgh's Submissions to the WMT19 News Translation Task
[ "cs.CL" ]
The University of Edinburgh participated in the WMT19 Shared Task on News Translation in six language directions: English-to-Gujarati, Gujarati-to-English, English-to-Chinese, Chinese-to-English, German-to-English, and English-to-Czech. For all translation directions, we created or used back-translations of monolingual data in the target language as additional synthetic training data. For English-Gujarati, we also explored semi-supervised MT with cross-lingual language model pre-training, and translation pivoting through Hindi. For translation to and from Chinese, we investigated character-based tokenisation vs. sub-word segmentation of Chinese text. For German-to-English, we studied the impact of vast amounts of back-translated training data on translation quality, gaining a few additional insights over Edunov et al. (2018). For English-to-Czech, we compared different pre-processing and tokenisation regimes.
cs.CL
cs
The University of Edinburgh's Submissions to the WMT19 News Translation Task Rachel Bawden Nikolay Bogoychev Ulrich Germann Roman Grundkiewicz Faheem Kirefu Antonio Valerio Miceli Barone Alexandra Birch School of Informatics, University of Edinburgh, Scotland [email protected] Abstract For all The University of Edinburgh participated in the WMT19 Shared Task on News Translation in six language directions: English↔Gujarati, English↔Chinese, German→English, and English→Czech. translation direc- tions, we created or used back-translations of monolingual data in the target language as additional synthetic training data. For English↔Gujarati, we also explored semi- supervised MT with cross-lingual language model pre-training, and translation pivoting through Hindi. For translation to and from Chi- nese, we investigated character-based tokeni- sation vs. sub-word segmentation of Chinese text. For German→English, we studied the im- pact of vast amounts of back-translated train- ing data on translation quality, gaining a few additional insights over Edunov et al. (2018). For English→Czech, we compared different pre-processing and tokenisation regimes. Introduction 1 The University of Edinburgh participated in the WMT19 Shared Task on News Transla- tion in six language directions: English-Gujarati (EN↔GU), English-Chinese (EN↔ZH), German- English (DE→EN) and English-Czech (EN→CS). All our systems are neural machine translation (NMT) systems trained in constrained data condi- tions with the Marian1 toolkit (Junczys-Dowmunt et al., 2018). The different language pairs pose very different challenges, due to the characteristics of the languages involved and arguably more impor- tantly, due to the amount of training data available. Pre-processing For EN↔ZH, we investigate character-level pre-processing for Chinese com- pared with subword segmentation. For EN→CS, we show that it is possible in high resource settings to simplify pre-processing by removing steps. 1https://marian-nmt.github.io Exploiting non-parallel resources For all lan- guage directions, we create additional, synthetic parallel training data. For the high resource lan- guage pairs, we look at ways of effectively us- ing large quantities of backtranslated data. For example, for DE→EN, we investigated the most effective way of combining genuine parallel data with larger quantities of synthetic parallel data and for CS→EN, we filter backtranslated data by re- scoring translations using the MT model for the op- posite direction. The challenge for our low resource pair, EN↔GU, is producing sufficiently good mod- els for back-translation, which we achieve by train- ing semi-supervised MT models with cross-lingual language model pre-training (Lample and Conneau, 2019). We use the same technique to translate ad- ditional data from a related language, Hindi. NMT Training settings In all experiments, we test state-of-the-art training techniques, including using ultra-large mini-batches for DE→EN and EN↔ZH, implemented as optimiser delay. Results summary Official automatic evaluation results for all final systems on the WMT19 test set are summarised in Table 1. Throughout the paper, BLEU is calculated using SACREBLEU2 (Post, 2018) unless otherwise indicated. Our final EN-GU models are available for download.3,4 2 Gujarati ↔ English One of the main challenges for translation between English↔Gujarati is that it is a low-resource lan- guage pair; there is little openly available paral- lel data and much of this data is domain-specific 2https://github.com/mjpost/sacreBLEU 3See data.statmt.org/wmt19_systems/ for our released EN-GU models and running scripts. 4Note that following the discovery of a pre-processing error, the EN→GU and GU→EN models have been retrained and achieve BLEU scores of 16.3 and 22.3 respectively. 9 1 0 2 l u J 2 1 ] L C . s c [ 1 v 4 5 8 5 0 . 7 0 9 1 : v i X r a Lang. direction EN→GU GU→EN EN→ZH ZH→EN DE→EN EN→CS BLEU Ranking 1 2 7 6 9 3 16.4 21.4 34.4 27.7 35.0 27.9 Table 1: Final BLEU score results and system rank- ings amongst constrained systems according to auto- matic evaluation metrics. and/or noisy (cf. Section 2.1). Our aim was there- fore to experiment how additional available data can help us to improve translation quality: large quantities of monolingual text for both English and Gujarati, and resources from Hindi (a language re- lated to Gujarati) in the form of monolingual Hindi data and a parallel Hindi-English corpus. We ap- plied semi-supervised translation, backtranslation and pivoting techniques to create a large synthetic parallel corpus from these resources (Section 2.2), which we used to augment the small available par- allel training corpus, enabling us to train our final supervised MT models (Section 2.3). 2.1 Data and pre-processing We trained our models using only data listed for the task (cf. Table 2). Note that we did not have access to the corpora provided by the Technology Development for Indian Languages Programme, as they were only available to Indian citizens. We pre-processed all data using standard scripts from the Moses toolkit (Koehn et al., 2007): nor- malisation, tokenisation, cleaning (of training data only, with a maximum sentence length of 80 to- kens) and true-casing for English data, using a model trained on all available news data. The Gujarati data was additionally pre-tokenised using the IndicNLP tokeniser5 before Moses tokenisation was applied. We also applied subword segmenta- tion using BPE (Sennrich et al., 2016b), with joint subword vocabularies. We experimented with dif- ferent numbers of BPE operations during training. 2.2 Creation of synthetic parallel data Data augmentation techniques such as backtransla- tion (Sennrich et al., 2016a; Edunov et al., 2018), which can be used to produce additional synthetic parallel data from monolingual data, are standard in MT. However they require a sufficiently good 5 anoopkunchukuttan.github.io/indic_ nlp_library/ Wikipedia Wiki titles v1 Govin Bilingual dictionary Bible Emille Emille Bombay IIT 107,637 18,033 11,671 10,650 9,979 7,807 5,083 7,993 1.4M Monolingual data News Common crawl Emille Wiki-dump News Bombay IIT News 200M 3.7M 0.9M 0.4M 0.2M 45.1M 23.6M 7.0 21.1 2.1 17.0 1.5 26.4 19.1 19.1 13.4 23.6 21.9 16.6 17.7 15.4 18.7 17.0 Lang(s) Corpus #sents Ave. len. Parallel data EN-GU Software data GU-HI EN-HI EN GU HI Table 2: EN-GU Parallel training data used. Average length is calculated in number of tokens per sentence. For the parallel corpora, this is calculated for the first language indicated (i.e. EN, GU, then EN) intermediate MT model to produce translations that are of reasonable quality to be useful for training (Hoang et al., 2018). This is extremely hard to achieve for this language pair. Our preliminary attempt at parallel-only training yielded a very low BLEU score of 7.8 on the GU→EN devel- opment set using a Nematus-trained shallow RNN with heavy regularisation,6 and similar scores were found for a Moses phrase-based translation system. Our Traceback (most recent call last): File "/usr/bin/pdf2txt.py", line 115, in <module> if __name__ == '__main__': sys.exit(main(sys.argv)) File "/usr/bin/pdf2txt.py", line 109, in main interpreter.process_page(page) File "/usr/lib/python2.6/site-packages/pdfminer/pdfinterp.py", line 832, in process_page solution was to train models for the creation of synthetic data that exploit both monolingual and parallel data during training. 2.2.1 Semi-supervised MT with cross-lingual language model pre-training We followed the unsupervised training approach in (Lample and Conneau, 2019) to train two MT sys- tems, one for EN↔GU and a second for HI→GU.7 This involves training unsupervised NMT models with an additional supervised MT training step. Ini- tialisation of the models is done by pre-training parameters using a masked language modelling objective as in Bert (Devlin et al., 2019), individ- ually for each language (MLM, which stands for masked language modelling) and/or cross-lingually 6Learning rate: 5 × 10−4, word dropout (Gal and Ghahra- mani, 2016): 0.3, hidden state and embedding dropout: 0.5, batch tokens: 1000, BPE vocabulary threshold 50, label smoothing: 0.2. 7We used the code available at https://github. com/facebookresearch/XLM (TLM, which stands for translation language mod- elling). The TLM objective is the MLM objective applied to the concatenation of parallel sentences. See (Lample and Conneau, 2019) for more details. 2.2.2 EN and GU backtranslation We trained a single MT model for both language directions EN→GU and GU→EN using this ap- proach. For pre-training we used all available data in Table 2 (both the parallel and monolin- gual datasets) with MLM and TLM objectives. The same data was then used to train the semi- supervised MT model, which achieved a BLEU score of 22.1 for GU→EN and 12.6 for EN→GU on the dev set (See the first row in Table 5). This model was used to backtranslate 7.3M of mono- lingual English news data into Gujarati and 5.1M monolingual Gujarati sentences into English.8 System and training details We use default ar- chitectures for both pre-training and translation: 6 layers with 8 transformer heads, embedding dimen- sions of 1024. Training parameters are also as per the default: batch size of 32, dropout and attention dropout of 0.1, Adam optimisation (Kingma and Ba, 2015) with a learning rate of 0.0001. Degree of subword segmentation We tested the impact of varying degrees of subword segmenta- tion on translation quality (See Figure 1). Contrary to our expectation that a higher degree of segmen- tation (i.e. with a very small number of merge oper- ations) would produce better results, as is often the case with very low resource pairs, the best tested value was 20k joint BPE operations. The reason for this could be the extremely limited shared vocabu- lary between the two languages9 or that training on large quantities of monolingual data turns the low resource task into a higher one. 2.2.3 HI→GU translation Transliteration of Hindi to Gujarati script We first transliterated all of the Hindi characters into Gujarati characters to encourage vocabulary shar- ing. As there are slightly more Hindi unicode char- acters than Gujarati, Hindi characters with no cor- responding Gujarati characters and all non-Hindi characters were simply copied across. Once transliterated, there is a high degree of overlap between the transliterated Hindi (HG) and 8We were unable to translate all available monolingual data due to time constraints and limits to GPU resources. 9Except for occasional Arabic numbers and romanised proper names in Gujarati texts. 10 5 e r o c s U E L B 2k 10k 50k 5k 20k 80k 0 10 20 30 40 50 60 Iteration number Figure 1: The effect of the number of subword op- erations on BLEU score during training for EN→GU (calculated on the newsdev2019 dataset). the corresponding Gujarati sentence, which is demonstrated by the example in Figure 2. Our parallel Gujarati-Hindi data consisted of ap- proximately 8,000 sentences from the Emille cor- pus. After transliterating the Hindi, we found that 9% of Hindi tokens (excluding punctuation and English words) were an exact match to the corre- sponding Gujarati tokens. However, we did have access to large quantities of monolingual data in both Gujarati and Hindi (see Table 2), which we pre-processed in the same self.render_contents(page.resources, page.contents, ctm=ctm) File "/usr/lib/python2.6/site-packages/pdfminer/pdfinterp.py", line 845, in render_contents self.execute(list_value(streams)) File "/usr/lib/python2.6/site-packages/pdfminer/pdfinterp.py", line 870, in execute func(*args) File "/usr/lib/python2.6/site-packages/pdfminer/pdfinterp.py", line 808, in do_Do interpreter.render_contents(resources, [xobj], ctm=mult_matrix(matrix, self.ctm)) File "/usr/lib/python2.6/site-packages/pdfminer/pdfinterp.py", line 843, in render_contents self.init_resources(resources) File "/usr/lib/python2.6/site-packages/pdfminer/pdfinterp.py", line 347, in init_resources self.fontmap[fontid] = self.rsrcmgr.get_font(objid, spec) File "/usr/lib/python2.6/site-packages/pdfminer/pdfinterp.py", line 177, in get_font font = PDFType1Font(self, spec) File "/usr/lib/python2.6/site-packages/pdfminer/pdffont.py", line 575, in __init__ PDFSimpleFont.__init__(self, descriptor, widths, spec) File "/usr/lib/python2.6/site-packages/pdfminer/pdffont.py", line 534, in __init__ self.cid2unicode = EncodingDB.get_encoding(name, diff) File "/usr/lib/python2.6/site-packages/pdfminer/encodingdb.py", line 61, in get_encoding cid2unicode[cid] = name2unicode(x.name) File "/usr/lib/python2.6/site-packages/pdfminer/encodingdb.py", line 21, in name2unicode return unichr(int(m.group(0))) ValueError: unichr() arg not in range(0x110000) (wide Python build) way. The semi-supervised HI↔GU system was trained using the MLM pre-training objective de- scribed in Section 2.1 and the same model architec- ture as the EN↔GU model in Section 2.2.2. For the MT step, we trained on 6.5k parallel sentences, reserving the remaining 1.5k as a development set. As with the EN↔GU model, we investigated the effect of different BPE settings (5k, 10k, 20k and 40k merge operations) on the translation quality. Surprisingly, just as with EN↔GU, 20k BPE op- erations performed best (cf. Table 3), and so we used the model trained in this setting to translate the Hindi side of the IIT Bombay English-Hindi Corpus, which we refer to as HI2GU-EN. 5k BPE BLEU 15.4 10k 16.0 20k 16.3 40k 14.6 Table 3: The influence of number of BPE merge opera- tions on HI→GU BLEU score measured using BLEU scores on the development set
1906.05226
1
1906
2019-06-12T16:01:35
Continual and Multi-Task Architecture Search
[ "cs.CL", "cs.CV", "cs.LG" ]
Architecture search is the process of automatically learning the neural model or cell structure that best suits the given task. Recently, this approach has shown promising performance improvements (on language modeling and image classification) with reasonable training speed, using a weight sharing strategy called Efficient Neural Architecture Search (ENAS). In our work, we first introduce a novel continual architecture search (CAS) approach, so as to continually evolve the model parameters during the sequential training of several tasks, without losing performance on previously learned tasks (via block-sparsity and orthogonality constraints), thus enabling life-long learning. Next, we explore a multi-task architecture search (MAS) approach over ENAS for finding a unified, single cell structure that performs well across multiple tasks (via joint controller rewards), and hence allows more generalizable transfer of the cell structure knowledge to an unseen new task. We empirically show the effectiveness of our sequential continual learning and parallel multi-task learning based architecture search approaches on diverse sentence-pair classification tasks (GLUE) and multimodal-generation based video captioning tasks. Further, we present several ablations and analyses on the learned cell structures.
cs.CL
cs
Continual and Multi-Task Architecture Search Ramakanth Pasunuru and Mohit Bansal UNC Chapel Hill {ram, mbansal}@cs.unc.edu 9 1 0 2 n u J 2 1 ] L C . s c [ 1 v 6 2 2 5 0 . 6 0 9 1 : v i X r a Abstract Architecture search is the process of auto- matically learning the neural model or cell structure that best suits the given task. Re- cently, this approach has shown promising per- formance improvements (on language mod- eling and image classification) with reason- able training speed, using a weight sharing strategy called Efficient Neural Architecture Search (ENAS). In our work, we first in- troduce a novel continual architecture search (CAS) approach, so as to continually evolve the model parameters during the sequential training of several tasks, without losing perfor- mance on previously learned tasks (via block- sparsity and orthogonality constraints), thus enabling life-long learning. Next, we explore a multi-task architecture search (MAS) ap- proach over ENAS for finding a unified, single cell structure that performs well across mul- tiple tasks (via joint controller rewards), and hence allows more generalizable transfer of the cell structure knowledge to an unseen new task. We empirically show the effectiveness of our sequential continual learning and parallel multi-task learning based architecture search approaches on diverse sentence-pair classifica- tion tasks (GLUE) and multimodal-generation based video captioning tasks. Further, we present several ablations and analyses on the learned cell structures.1 1 Introduction Architecture search enables automatic ways of finding the best model architecture and cell struc- tures for the given task or dataset, as opposed to the traditional approach of manually choosing or tuning among different architecture choices, which introduces human inductive bias or is non- scalable. Recently, this idea has been successfully 1All our code and models publicly available at: https: //github.com/ramakanth-pasunuru/CAS-MAS applied to the tasks of language modeling and im- age classification (Zoph and Le, 2017; Zoph et al., 2018; Cai et al., 2018; Liu et al., 2017, 2018). The first approach of architecture search involved an RNN controller which samples a model ar- chitecture and uses the validation performance of this architecture trained on the given dataset as feedback (or reward) to sample the next architec- ture. Some recent attempts have made architecture search more computationally feasible (Negrinho and Gordon, 2017; Baker et al., 2017) via tree- structured search space or Q-learning with an - greedy exploration, and further improvements via a weight-sharing strategy called Efficient Neural Architecture Search (ENAS) (Pham et al., 2018). In this work, we extend the architecture search approach to an important paradigm of transfer learning across multiple data sources: continual learning. The major problem in continual learning is catastrophic forgetting. For this, we introduce a novel 'continual architecture search' (CAS) ap- proach, where the model parameters evolves and adapts when trained sequentially on a new task while maintaining the performance on the pre- viously learned tasks. For enabling such con- tinual learning, we formulate a two-step graph- initialization approach with conditions based on block sparsity and orthogonality. Another sce- nario of transfer learning or generalization that we explore is one in which we are given multiple tasks in parallel and have to learn a single cell that is good at all these tasks, and hence allows more gen- eralizable transfer of the cell structure knowledge to a new unseen task. This is inspired by the tradi- tional LSTM cell's reasonable performance across a wide variety of tasks, and hence we want to auto- matically search (learn) a better version of such a generalizable single cell structure, via multi-task architecture search (MAS). We achieve this by giving a joint reward from multiple tasks as feed- back to the controller. Hence, overall, we present two generalization approaches: CAS learns gen- eralizable model parameters over sequential train- ing of multiple tasks (continual learning), whereas MAS learns a generalizable cell structure which performs well across multiple tasks. For empirical evaluation of our two approaches of continual and multi-task cell learning, we choose three domains of natural language in- ference (NLI) bi-text classification tasks from the GLUE benchmark (Wang et al., 2018): QNLI, RTE, and WNLI, and three domains of multimodal-generation based video captioning tasks: MSR-VTT (Xu et al., 2016), MSVD (Chen and Dolan, 2011), and DiDeMo (Hendricks et al., 2017). Note that we are the first ones to use the architecture search approach for text classifi- cation tasks as well as multimodal conditioned- generation tasks, which achieves improvements on the strong GLUE and video captioning baselines. Next, for continual learning, we train the three tasks sequentially for both text classification and video captioning (through our continual archi- tecture search method) and show that this ap- proach tightly maintains the performance on the previously-learned domain (also verified via hu- man evaluation), while also significantly maxi- mizing the performance on the current domain, thus enabling life-long learning (Chen and Liu, 2016). For multi-task cell learning, we show that the cell structure learned by jointly training on the QNLI and WNLI tasks, performs significantly better on the RTE dataset than the individually- learned cell structures. Similarly, we show that the cell structure learned from jointly training on the MSR-VTT and MSVD video captioning datasets performs better on the DiDeMo dataset than the individually-learned cell structures. Finally, we also present various analyses for the evolution of the learned cell structure in the continual learning approach, which preserves the properties of cer- tain edges while creating new edges for new capa- bilities. For our multi-task learning approach, we observe that the joint-reward cell is relatively less complex than the individual-task cells in terms of the number of activation functions, which intu- itively relates to better generalizability. 2 Related Work Neural architecture search (NAS) has been re- cently introduced for automatic learning of the model structure for the given dataset/task (Zoph and Le, 2017; Zoph et al., 2018), and has shown good improvements on image classification and language modeling. NAS shares some similar- ity to program synthesis and inductive program- ming (Summers, 1986; Biermann, 1978), and it has been successfully applied to some simple Q&A tasks (Liang et al., 2010; Neelakantan et al., 2015; Andreas et al., 2016; Lake et al., 2015). NAS was made more computationally feasible via tree-structured search space or Q-learning with -greedy exploration strategy and experience re- play (Negrinho and Gordon, 2017; Baker et al., 2017), or a weight-sharing strategy among search space parameters called Efficient Neural Architec- ture Search (ENAS) (Pham et al., 2018). We ex- plore architecture search for text classification and video caption generation tasks and their integra- tion to two transfer learning paradigms of contin- ual learning and multi-task learning. The major problem in continual learning is catastrophic forgetting. Some approaches ad- dressed this by adding regularization to penalize functional or shared parameters' change and learn- ing rates (Razavian et al., 2014; Li and Hoiem, 2017; Hinton et al., 2015; Jung et al., 2016; Kirk- patrick et al., 2017; Donahue et al., 2014; Yosinski et al., 2014). Others proposed copying the pre- vious task and augmenting with new task's fea- tures (Rusu et al., 2016), intelligent synapses to accumulate task-related information (Zenke et al., 2017), or online variational inference (Nguyen et al., 2017). Also, Yoon et al. (2018) proposed a dynamically expandable network based on in- coming new data. In our work, we introduce 'continual architecture search' by extending the NAS paradigm to avoid catastrophic forgetting via block-sparsity and orthogonality constraints, hence enabling a form of life-long learning (Chen and Liu, 2016). To the best of our knowledge, our paper is the first to extend architecture search to a continual incoming-data setup. Elsken et al. (2019) and So et al. (2019) proposed evolutionary architecture search algorithms that dynamically al- locate more resources for promising architecture candidates, but these works are different from us in that they do not consider the case where we have continual incoming-data from different data sources, but instead focus on the continual evolu- tion of the model search for efficiency purposes. Multi-task learning (MTL) is primarily used to improve the generalization performance of a task by leveraging knowledge from related tasks (Caru- ana, 1998; Collobert and Weston, 2008; Girshick, 2015; Luong et al., 2015; Ruder et al., 2017; Au- genstein et al., 2018; Guo et al., 2018; Oh et al., 2017; Ruder and Plank, 2017). In similar gener- alization spirit of multi-task learning, we present multi-task architecture learning based on perfor- mance rewards from multiple tasks, so as to find a single cell structure which can generalize well to a new unseen task. 3 Architecture Search for Text Classification and Generation In this section, we first discuss how we adapt ENAS (Pham et al., 2018) for modeling our bi- text classification and multimodal video caption- ing tasks. Next, we introduce our continual and multi-task approaches of transfer learning leverag- ing architecture search. 3.1 ENAS Algorithm Our initial architecture search approach is based on the recent Efficient Neural Architecture Search (ENAS) method of Pham et al. (2018), but mod- eled for text classification and generation-based video captioning. Fig. 1 presents the ENAS con- troller for sampling an RNN cell structure, which we use to learn the two encoders of our text classi- fication model or encoder-decoder for our video captioning model. The controller is a simple LSTM-RNN and the classifier encoder's or video captioning encoder-decoder's RNN cell structure is based on the combination of N nodes indexed by h(t) N (edges between nodes repre- sent weight parameters) and activation functions (ReLU, tanh, sigmoid, identity), where t denotes the time step. For node h(t) 1 , there are two inputs: x(t) (input signal) and h(t−1) (output from previ- ous time-step), and the node computations are: 1 = sigmoid(x(t) · W (x,c) + h(t−1) · W (c) c(t) 1 (cid:12)f1(x(t)·W (x,h)+h(t−1) ·W (h) h(t) 1 = c(t) 2 , .., h(t) 0 ) (1) 1 , h(t) N N ) 1 N + (1 − c(t) 1 ) (cid:12) h(t−1) N (2) where f1 is the activation function. Node hl, where l ∈ {2, 3, .., N}, receives input from node jl where jl ∈ {h1, h2, .., hl−1}, and the computa- tion is defined as follows: c(t) l = sigmoid(h(t) jl · W (c) l,jl ) (3) (a) Text classification ENAS. (b) Video captioning ENAS. Figure 1: Architecture search models for bi-text classi- fication and video caption generation tasks. jl jl ·W (h) )+(1−c(t) l )(cid:12)h(t) l (cid:12)fl(h(t) l,jl (4) h(t) l = c(t) During training, we alternately train the model parameters and controller parameters. First, we sample a Directed Acyclic Graph (DAG) structure from the controller at every mini-batch and use it to update the weight parameters of the task's RNN nodes/parameters. Next, we sample a DAG from the controller and measure the (validation) perfor- mance of that structure based on this new updated state of the task model, and use this performance as a reward to allow the controller to update its own parameters. We repeat this alternate training procedure until the model converges. Later, we se- lect the DAG structure with the best performance and use it to retrain the model from scratch. 3.2 ENAS for Bi-Text Classification For our NLI text classification tasks, we are given the sentence pair as input, and we have to classify it as entailment or not. For a strong base model, we follow Conneau et al. (2017) model, and use bidi- rectional LSTM-RNN encoders to encode both the sentences and then we do max-pooling on the out- puts from these encoders. Let v represent the max- pooling output from the first sentence encoder and ReLUReLUtanhReLUReLUReLUtanh1122110CONTROLLERlabel distributionMax-poolingMax-poolingConcatenationSentence 1Sentence 2ReLUReLUtanhReLUReLUReLUtanh1122110CONTROLLERVideo EncoderCaption Decoder u represent the max-pooling output from the sec- ond sentence encoding. The joint representation h is defined as h = [u; v;u − v; u (cid:12) v]. The fi- nal representation is linearly projected to the label classes, and then fed through softmax to get the fi- nal class distribution. Fig. 1a presents an overview of our text classification model along with ENAS controller for sampling an RNN cell structure. We sample an RNN cell structure from the ENAS con- troller and use it in the two recurrent encoders of the bi-text classification model. In the first stage, we learn the best cell structure, by sampling mul- tiple cell structures and giving the corresponding validation accuracy as the feedback reward to the controller. In the second stage, we use the best cell structure from the stage-1 to retrain the text clas- sification model from scratch. 3.3 ENAS for Conditioned Generation Next, we go beyond text classification, and look at conditioned text generation with ENAS, where we choose the task of video-conditioned text gen- eration (also known as video captioning) so as to also bring in a multi-modality aspect. For a strong baseline, we use a sequence-to-sequence model with an attention mechanism similar to Pa- sunuru and Bansal (2017a), where we encode the video frames as a sequence into a bidirectional LSTM-RNN and decode the caption through an- other LSTM-RNN (see Fig. 1b). Our attention mechanism is similar to Bahdanau et al. (2015), where at each time step t of the decoder, the LSTM hidden state st is a non-linear function of previous time step's decoder hidden state st−1 and gener- ated word wt−1, and the context vector ct which is a weighted combination of the encoder hidden states {hi}. These weights αt, are defined as: (cid:80)n αt,i = exp(et,i) k=1 exp(et,k) (5) The attention function et,i = wT tanh(Wahi + Uast−1 + ba), where w, Wa, Ua, ba are learned parameters. Fig. 1b presents our video caption- ing model along with ENAS controller. Here, we sample an RNN cell structure from the ENAS con- troller and use it for both encoder and decoder, and rest of the ENAS procedure is similar to Sec. 3.2. 4 Continual Architecture Search (CAS) We introduce a novel continual learning paradigm on top of architecture search, where the RNN cell structure evolves when trained on new in- coming data/domains, while maintaining the per- formance on previously learned data/domains (via our block-sparsity and orthogonality conditions discussed below), thus enabling life-long learn- ing (Chen and Liu, 2016). Let θ1,k ∈ θ1 and θ2,k ∈ θ2 (where k denotes model parameters) be the learned model parameters for task T when in- dependently trained on datasets d1 and d2. Then, we can say that θ2,k = θ1,k + ψ2,k, where, ψ2,k is the change in the model parameters of θ1,k when trained independently on d2. There are in- finitely many possible local optimal solutions for ψ2,k, hence in our continual learning approach, we want to learn the parameters ψ2,k when training on dataset d2 such that it will not affect the perfor- mance of the task w.r.t. dataset d1. For this, we formulate two important conditions: Condition 1 When training the model on dataset d1, we constrain the model parameters θ1,k ∈ Rm×n to be sparse, specifically, to be block sparse, i.e., minimize(cid:80)m i=1 (θ1,k[i, :]2)1. Here, ·2 represents the l2 norm and ·1 repre- sents the l1 norm. l2 and l1 norms are efficient in avoiding over-fitting; however, they are not useful for compact representation of the network. Scarda- pane et al. (2017) proposed group sparsity in the neural networks to completely disconnect some neurons. Our block sparse condition is inspired from their work. This sparsity condition is also useful for our continual learning approach which we discuss in Condition 2. Condition 2 When training the model on dataset d2, we start from θ1,k, keep it constant, and update ψ2,k such that: is (cid:80)m i=1 (ψ2,k[i, :]2)1. i.e., minimize 1. ψ2,k sparse, is 2. θ1,k and ψ2,k are orthogonal. It important in the continual learning paradigm that we do not affect the previously learned knowledge. As stated in Condition 1, we find a block sparse solution θ1,k such that we find the solution θ2,k which is close to θ1,k and the new knowledge is projected in orthogonal direc- tion via ψ2,k so that it will not affect the previ- ously learned knowledge, and thus 'maintain' the performance on previously learned datasets. We constrain the closeness of θ2,k and θ1,k by con- straining ψ2,k to also be block sparse (Condition 2.1). Also, to avoid affecting previously learned block Figure 2: Continual architecture search (CAS) approach: green, solid edges (weight parameters) are shared, newly- learned edges are represented with red, dashed edges. 1,k · ψ2,k2 knowledge, we constrain θ1,k and ψ2,k to be or- thogonal (Condition 2.2). However, strictly im- posing this condition into the objective function is not feasible (Bousmalis et al., 2016), hence we add a penalizing term into the objective function as an approximation to the orthogonality condi- tion: Lp(θ2,k) = θT 2. Both Condition 2.1 and 2.2 are mutually dependent, because for two matrices' product to be zero, they share basis vectors between them, i.e., for an n-dimensional space, there are n basis vectors and if p of those vectors are assigned to one matrix, then the rest of the n − p vectors (or subset) should be assigned to the other matrix.2 If we fill the rest of the rows with zeros, then they are block sparse, which is the reason for using Condition 2.1. Our CAS con- dition ablation (see Sec. 7.1) shows that both these conditions are necessary for continual learning. Next, we describe the integration of our above continual learning approach with architecture search, where the model continually evolves its cell architecture so as to perform well on the new incoming data, while also tightly maintaining the performance on previously learned data (or do- mains). Fig. 2 presents an overview of our contin- ual learning integration approach into architecture search for sequential training on three datasets. Initially, given the dataset d1, we train the architec- ture search model to find the best Directed Acyclic Graph (DAG) structure for RNN cell and model parameters θ1,k under the block sparse condition described above in Sec. 4. We call this step-1, cor- responding to dataset d1. Next, when we have a new dataset d2 from a different domain, we fur- ther continue to find the best DAG and model parameters θ2,k for best performance on d2, but initialized the parameters with step-1's parame- ters θ1,k, and then trained on dataset d2 follow- ing Condition 2 (discussed in Sec. 4). We call this Figure 3: Multi-task cell structure learning using joint rewards from n datasets. step-2, corresponding to dataset d2. After the end of step-2 training procedure, for re-evaluating the model's performance back on dataset d1, we still use the final learned model parameters θ2,k, but with the learned DAG from step-1.3 This is be- cause we cannot use the old step-1 model parame- ters θ1,k since we assume that those model param- eters are not accessible now (assumption for con- tinual learning with large incoming data streams and memory limit for saving large parameter sets). 5 Multi-Task Architecture Search (MAS) In some situations of transfer learning, we are given multiple tasks at once instead of sequen- tially. In such a scenario, when we train archi- tecture search model on these multiple tasks sepa- rately, we get different cell structures on each task which overfit to that task and are not well gen- eralizable. So, instead, we should learn a com- mon cell for multiple tasks which should gener- alize better to an unseen task. Also, the stan- dard non-architecture search based LSTM-RNN cell performs well across different tasks which shows enough evidence that there exist such ar- chitectures that work well across different tasks. 2Note that it is not necessary for the matrix to contain all of the n − p basis vectors, if the matrix rank is less than n, then it may have less than n − p basis vectors. 3For evaluating the model's performance on dataset d2, we obviously use the final learned model parameters θ2,k, and the learned DAG from step-2. Avgdag1Avgdag2Dataset d1Step-2Step-1Dataset d2Avgdag3use dag3usedag1Step-3Dataset d3Testd1d2d3usedag2ControllerSharedModel1243AvgDataset d1Dataset d2Dataset dnSampledENAS DAGJoint Rewardfrom all datasetsr1r2r3 Hence, in our work, we aim to follow a data- driven route to find even better generalizable ar- chitectures that perform better than the traditional LSTM-RNN cell, via our multi-task architecture search (MAS) approach, described below. To learn a cell architecture on a task, we pro- vide the performance of the sampled cell structure on the validation set of the given task as reward to the controller. However, our aim is to find a generalizable cell structure which jointly performs well across different tasks/datasets {d1, d2, .., dn}. Hence, during the architecture search training, the joint reward to the controller is a combination of the performance scores of the sampled cell structure on the validation set of all the avail- able/candidate tasks, which is defined as rc = i=1 ri, where reward ri comes from the val- 1 n idation performance on task/dataset di. Next, for fair generalizability comparison of this multi-task cell structure with other individual task-learned cell structures, we choose a new unseen task which is different from the current candidate tasks and show that the multi-task cell performs better on this unseen task than all task-related cell structures (as well as a non-ENAS LSTM cell). (cid:80)n 6 Experimental Setup 6.1 Text Classification Datasets We choose the natural inference datasets of QNLI, RTE, and WNLI from the GLUE (Wang et al., 2018) benchmark to perform experiments for multi-task cell structure and continual architec- ture search. We use the standard splits provided by (Wang et al., 2018). QNLI Dataset: Question-Answering Natural Language Inference (QNLI) is extracted from the Stanford Question Answering Dataset (Rajpurkar et al., 2016), where they created sentence pair clas- sification task by forming a pair between each question and the corresponding sentence contain- ing the answer. Hence the task is to find whether the given sentence context contains the answer for the given question. In this dataset, we use the stan- dard splits, i.e., 108k examples for training, 5.7k for validation, and 5.7k for testing. RTE Dataset: Recognizing Textual Entailment (RTE) is collected from a series of annual chal- lenges on the task of textual entailment. This dataset spans the news and Wikipedia text. Here, the task is to predict whether the sentence pair is entailment or not. In this dataset, we use the stan- dard splits, i.e., 2.5k examples for training, 276 for validation, and 3k for testing. WNLI Dataset: Winograd Natural Language In- ference (WNLI) is extracted from the dataset of Winograd Schema Challenge for reading compre- hension task. Original dataset is converted into a sentence pair classification task by replacing the ambiguous pronoun with each possible referent, where the task is to predict if the sentence with the substituted pronoun is entailed by the original sentence. We use 634 examples for training, 71 for validation, and 146 for testing. 6.2 Video Captioning Datasets For the conditioned-generation paradigm, we use three popular multimodal video captioning datasets: MSR-VTT, MSVD, and DiDeMo to per- form experiments for continual architecture search and multi-task architecture search. MSR-VTT Dataset: MSR-VTT is a collection of 10, 000 short videos clips collected from a commercial search engine covering 41.2 hours of video and annotated through Amazon Mechanical Turk (AMT). Each video clip has 20 human an- notated captions. We used the standard splits fol- lowing previous work, i.e., 6, 513 video clips as training set, 497 as validation set, and 2, 990 as test set. MSVD Dataset: Microsoft Video Description Corpus (MSVD) is a collection of 1970 short video clips collected in the wild and annotated through Amazon Mechanical Turk (AMT) in dif- ferent languages. In this work, we use only En- glish language annotations. Each video clip on an average is 10 seconds in length and approximately 40 annotations. We use the standard splits follow- ing previous work, i.e., 1, 200 video clips as train- ing set, 100 as validation set, and 670 as test set. DiDeMo Dataset: Distinct Describable Moments (DiDeMo) is traditionally a video localization task w.r.t. given description query (Hendricks et al., 2017). In this work, we use it as a video descrip- tion task where given the video as input we have to generate the caption. We use the standard splits as provided by Hendricks et al. (2017). 6.3 Evaluation For GLUE tasks, we use accuracy as an evalu- ation metric following the previous work (Wang et al., 2018). For video captioning tasks, we report four diverse automatic evaluation met- rics: METEOR (Denkowski and Lavie, 2014), CIDEr (Vedantam et al., 2015), BLEU-4 (Papineni et al., 2002), and ROUGE-L (Lin, 2004). We use the standard evaluation code (Chen et al., 2015) to obtain these scores for our generated captions w.r.t. the reference captions. 6.4 Training Details In all our experiments, our hyperparameter choices are based on validation set accuracy for GLUE tasks and an average of the four automatic evaluation metrics (METEOR, CIDEr, BLEU-4, and ROUGE-L) for video captioning tasks. We use same settings for both normal and architecture search models, unless otherwise specified. More details in appendix. 7 Results and Analysis 7.1 Continual Learning on GLUE Tasks Baseline Models: We use bidirectional LSTM- RNN encoders with max-pooling (Conneau et al., 2017) as our baseline.4 Further, we used the ELMo embeddings (Peters et al., 2018) as input to the encoders, where we allowed to train the weights on each layer of ELMo to get a final repre- sentation. Table 1 shows that our baseline models achieve strong results when compared with GLUE benchmark baselines (Wang et al., 2018).5 On top of these strong baselines, we add ENAS approach. ENAS Models: Next, Table 1 shows that our ENAS models (for all three tasks QNLI, RTE, WNLI) perform better or equal than the non- architecture search based models.6 Note that we only replace the LSTM-RNN cell with our ENAS cell, rest of the model architecture in ENAS model is same as our baseline model.7 4We also tried various other models e.g., self-attention and cross-attention, but we found that the max-pooling ap- proach performed best on these datasets. 5We only report single-task (and not 9-task multi-task) re- sults from the GLUE benchmark for fair comparison to our models (even for our multi-task-cell learning experiments in Sec. 7.3, the controller uses rewards from two datasets but the primary task is then trained only on its own data). 6On validation set, our QNLI ENAS model is statisti- cally significantly better than the corresponding baseline with p < 0.01, and statistically equal on RTE and WNLI (where the validations sets are very small), based on the bootstrap test (Noreen, 1989; Efron and Tibshirani, 1994) with 100K samples. Since the test set is hidden, we are not able to cal- culate the statistical significance on it. 7Note that ENAS random search baseline vs. optimal search validation performance on QNLI, RTE, and WNLI are 73.3 (vs. 74.8), 58.8 (vs. 60.3), and 54.0 (vs. 55.6), re- spectively, suggesting that the learned optimal cell structure is better than the random cell structure. Models BiLSTM+ELMo (2018) BiLSTM+ELMo+Attn (2018) QNLI PREVIOUS WORK 69.4 61.1 BASELINES Baseline (with ELMo) ENAS (Architecture Search) CAS Step-1 (QNLI training) CAS Step-2 (RTE training) CAS Step-3 (WNLI training) CAS RESULTS 73.2 74.5 73.8 73.6 73.3 RTE WNLI 50.1 50.3 52.3 52.9 N/A 54.1 54.0 65.1 65.1 65.1 65.1 N/A N/A 64.4 Table 1: Test results on GLUE tasks for various mod- els: Baseline, ENAS, and CAS (continual architecture search). The CAS results maintain statistical equality across each step. CAS Models: Next, we apply our continual ar- chitecture search (CAS) approach on QNLI, RTE, and WNLI, where we sequentially allow the model to learn QNLI, RTE, and WNLI (in the order of decreasing dataset size, following standard trans- fer setup practice) and the results are as shown in Table 1. We train on QNLI task, RTE task, and WNLI task in step-1, step-2, and step-3, respec- tively. We observe that even though we learn the models sequentially, we are able to maintain per- formance on the previously-learned QNLI task in step-2 (74.1 vs. 74.2 on validation set which is sta- tistically equal, and 73.6 vs. 73.8 on test).8 Note that if we remove our sparsity and orthogonality conditions (Sec. 4), the step-2 QNLI performance drops from 74.1 to 69.1 on validation set, demon- strating the importance of our conditions for CAS (see next paragraph on 'CAS Condition Ablation' for more details). Next, we observe a similar pat- tern when we extend CAS to the WNLI dataset (see step-3 in Table 1), i.e, we are still able to maintain the performance on QNLI (as well as RTE now) from step-2 to step-3 (scores are sta- tistically equal on validation set).9 Further, if we compare the performance of QNLI from step-1 to step-3, we see that they are also stat. equal on val set (73.9 vs. 74.2). This shows that our CAS method can maintain the performance of a task in a continual learning setting with several steps. CAS Condition Ablation: We also performed important ablation experiments to understand the 8Note that there is a small drop in QNLI performance for CAS Step-1 vs. ENAS (74.5 vs. 73.8); however, this is not true across all experiments, e.g., in case of RTE, CAS Step-1 is in fact better than its corresponding ENAS model (ENAS: 52.9 vs. CAS Step-1: 53.8). 9On validation set, QNLI step-3 vs. step-2 performance is 73.9 vs. 74.1, which is stat. equal. Similarly, on RTE, step- 3 vs. step-2 performance is 61.0 vs. 60.6 on validation set, which is again statistically equal. Accuracy on QNLI Model No Condition with RTE DAG No Condition Only Condition 2.1 Only Condition 2.2 Full Model (Condition 2.1 & 2.2) Table 2: Ablation (val) results on CAS conditions. 54.1 69.1 71.5 69.4 74.1 importance of our block sparsity and orthogonal- ity conditions in the CAS approach (as discussed in Sec. 4). Table 2 presents the ablation results of QNLI in step-2 with CAS conditions. Our full model (with both Condition 2.1 and 2.2) achieves a validation performance of 74.1. Next, we sep- arately experimented with each of Condition 2.1 and 2.2 and observe that using only one condition at a time is not able to maintain the performance w.r.t. step-1 QNLI performance (the decrease in score is statistically significant), suggesting that both of these two conditions are important for our CAS approach to work. Further, we remove both conditions and observe that the performance drops to 69.1. Finally, we also replaced the QNLI cell structure with the RTE cell structure along with re- moving both conditions and the performance fur- ther drops to 54.1. This shows that using the cell structure of the actual task is important. Time Comparison: We compare QNLI training time on a 12GB TITAN-X Nvidia GPU. Our base- line non-ENAS model takes 1.5 hours, while our CAS (and MAS) models take approximately the same training time (4 hours) as the original ENAS setup, and do not add extra time complexity. 7.2 Continual Learning on Video Captioning Baselines Models: Our baseline is a sequence-to- sequence model with attention mechanism as de- scribed in Sec. 3.3. We achieve comparable results w.r.t. SotA (see Table 3), hence serving as a good starting point for the ENAS approach. ENAS Models: Table 3 also shows that our ENAS models (MSR-VTT, MSVD) perform equal/better than non-architecture search based models.10 CAS Models: Next, we apply our continual archi- tecture search (CAS) approach on MSR-VTT and MSVD, where we sequentially allow the model to learn MSR-VTT first and then MSVD, and the results are as shown in Table 3. We ob- serve that even though we learn the models se- 10Note that ENAS random search performance on MSR- VTT test set is C:43.3, B:37.0, R:58.7, M:27.3, AVG: 41.6; and on MSVD test set is C:83.7, B:47.4, R:71.1, M:33.6, AVG: 59.0, suggesting that these are lower than the learned optimal cell structures' performances shown in Table 3. quentially, we are able to maintain performance on the previously-learned MSR-VTT task in step-2, while also achieving greater-or-equal performance on the current task of MSVD in comparison with the general ENAS approach.11 Human Evaluation: We also performed human comparison of our CAS step-1 vs. step-2 via Ama- zon MTurk (100 anonymized test samples, Lik- ert 1-5 scale). This gave an overall score of 3.62 for CAS step-1 model vs. 3.55 for CAS step- 2, which are very close (statistically insignificant with p = 0.32), again showing that CAS step-2 is able to maintain performance w.r.t. CAS step-1. 7.3 Multi-Task Cell Learning on GLUE In these experiments, we first find the best ENAS cell structures for the individual QNLI and WNLI tasks, and use these for training the RTE task. Next, we find a joint cell structure by training ENAS via joint rewards from both QNLI and WNLI datasets. Later, we use this single 'multi- task' cell to train the RTE task, and the results are as shown in Table 4 (GLUE test results). We also include the LSTM cell and RTE-ENAS cell results for fair comparison. It is clear that the multi-task cell performs better than the single-task cells.12 This shows that a cell learned on multiple tasks is more generalizable to other tasks. 7.4 Multi-Task Cell on Video Captioning In these experiments, we first find the best ENAS cell structures for the individual MSR-VTT and MSVD tasks, and use these cell structures for training the DiDeMo task. Next, we find a sin- gle cell structure by training ENAS on both MSR- VTT and MSVD datasets jointly. Later, we use this single cell (we call it multi-task cell) to train the DiDeMo task, and the results are as shown in Table 5. It is clear that the multi-task cell per- forms better than other cell structures, where the multi-task cell performance is comparable w.r.t. the DiDeMo-ENAS cell and better than the other single-task and LSTM cell structures. This shows 11MSR-VTT performance in step-1 and step-2 are stat. equal on CIDEr and ROUGE-L metrics. 12Our multi-task cell and RTE cell performance are statisti- cally equal (61.4 vs. 60.3) and statistically better than the rest of the cells in Table 4, based on the validation set. Note that the multi-task cell does not necessarily need to be better than the RTE cell, because the latter cell will be over-optimized for its own data, while the former is a more generalized cell learned from two other datasets. Models Baseline (Pasunuru and Bansal, 2017b) ENAS CAS Step-1 (MSR-VTT training) CAS Step-2 (MSVD training) C 48.2 48.9 48.9 48.4 B 40.8 41.3 41.1 40.1 MSR-VTT R 60.7 61.2 60.5 59.9 M AVG 44.5 28.1 44.9 28.1 44.5 27.5 27.1 43.9 MSVD B 52.5 52.9 R 71.2 71.7 M AVG C 61.1 35.0 85.8 61.8 87.2 35.2 N/A N/A N/A N/A N/A 88.1 35.1 61.7 52.4 71.3 Table 3: Video captioning results with Baseline, ENAS, and CAS models. Baseline is reproduced numbers from github of Pasunuru and Bansal (2017b) which uses advanced latest visual features (ResNet-152 and ResNeXt-101) for video encoder. C, B, R, M: CIDEr, BLEU-4, ROUGE-L, and METEOR metrics. Cell Structure LSTM cell QNLI cell WNLI cell RTE cell Multi-Task cell Performance on RTE 52.3 52.4 52.2 52.9 53.9 Table 4: Comparison of MAS cell on RTE task. Cell Structure LSTM cell MSR-VTT cell MSVD cell DiDeMO cell Multi-Task cell Performance on DiDeMo M R 30.6 12.7 30.3 12.9 30.6 12.1 30.9 13.1 13.4 30.8 C 26.7 25.7 25.2 27.1 27.5 B 7.6 7.4 7.9 7.9 8.1 (a) Step-1 (b) Step-2 (c) Step-3 Figure 4: Learned cell structures for step-1, step-2, and step-3 of continual architecture search for GLUE tasks. Table 5: Comparison of MAS cell on DiDeMO task. that a cell learned on multiple tasks is more gener- alizable to other tasks. Human Evaluation: We performed a similar hu- man study as Sec. 7.2, and got Likert scores of 2.94 for multi-task cell vs. 2.81 for LSTM cell, which suggests that the multi-task cell is more generalizable than the standard LSTM cell. 7.5 Analysis Evolved Cell Structure with CAS Fig. 4 presents the cell structure in each step for the CAS approach, where we sequentially train QNLI, RTE, and WNLI tasks. Overall, we observe that the cell structures in CAS preserve the properties of certain edges while creating new edges for new capabilities. We notice that the cell structure in step-1 and step-2 share some common edges and activation functions (e.g., inputs to node 0) along with some new edge connections in step-2 (e.g., node 1 to node 3). Further, we observe that the step-3 cell uses some common edges w.r.t. the step-2 cell, but uses different activation functions, e.g., edge between node 0 and node 1 is the same, but the activation function is different. This shows that those edges are learning weights which are stable w.r.t. change in the activation functions. Multi-Task Cell Structure Fig. 5 presents our multi-task MAS cell structure (with joint rewards from QNLI and WNLI), versus the RTE-ENAS (a) MAS cell (b) RTE cell Figure 5: Learned multi-task & RTE cell structures. cell structure. We observe that the MAS cell is relatively less complex, i.e., uses several identity functions and very few activation functions in its structure vs. the RTE cell. This shows that the individual-task-optimized cell structures are com- plex and over-specialized to that task, whereas our multi-task cell structures are simpler for general- izability to new unseen tasks. 8 Conclusion We first presented an architecture search approach for text classification and video caption generation tasks. Next, we introduced a novel paradigm of transfer learning by combining architecture search with continual learning to avoid catastrophic for- getting. We also explore multi-task cell learning for generalizability. Acknowledgments We thank the reviewers for their helpful com- ments. This work was supported by DARPA (YFA17-D17AP00022), and faculty awards from Google, Facebook, and Salesforce. The views contained in this article are those of the authors and not of the funding agency. x[t]identity(0)identity(1)tanh(2)tanh(3)tanh(4)ReLU(5)avgh[t]h[t-1]x[t]identity(0)tanh(1)identity(2)ReLU(3)ReLU(4)avgReLU(5)h[t-1]h[t]x[t]identity(0)identity(1)identity(2)tanh(3)sigmoid(4)avgtanh(5)h[t]h[t-1]x[t]identity(0)tanh(1)identity(2)sigmoid(3)identity(4)identity(5)avgh[t]h[t-1]x[t]identity(0)ReLU(1)tanh(2)sigmoid(3)sigmoid(4)tanh(5)avgh[t]h[t-1] References Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. 2016. Learning to compose neural net- works for question answering. In NAACL. Isabelle Augenstein, Sebastian Ruder, and Anders Søgaard. 2018. Multi-task learning of pairwise sequence classification tasks over disparate label spaces. In NAACL. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- gio. 2015. Neural machine translation by jointly learning to align and translate. In ICLR. Bowen Baker, Otkrist Gupta, Nikhil Naik, and Ramesh Raskar. 2017. Designing neural network architec- tures using reinforcement learning. In ICLR. Alan W Biermann. 1978. The inference of regular lisp programs from examples. IEEE transactions on Systems, Man, and Cybernetics, 8(8):585 -- 600. Konstantinos Bousmalis, George Trigeorgis, Nathan Silberman, Dilip Krishnan, and Dumitru Erhan. 2016. Domain separation networks. In NIPS, pages 343 -- 351. Han Cai, Tianyao Chen, Weinan Zhang, Yong Yu, and Jun Wang. 2018. Efficient architecture search by network transformation. In AAAI. Rich Caruana. 1998. Multitask learning. In Learning to learn, pages 95 -- 133. Springer. David L Chen and William B Dolan. 2011. Collect- ing highly parallel data for paraphrase evaluation. In ACL. Xinlei Chen, Hao Fang, Tsung-Yi Lin, Ramakr- ishna Vedantam, Saurabh Gupta, Piotr Doll´ar, and C Lawrence Zitnick. 2015. Microsoft COCO cap- tions: Data collection and evaluation server. arXiv preprint arXiv:1504.00325. Zhiyuan Chen and Bing Liu. 2016. Lifelong machine Synthesis Lectures on Artificial Intelli- learning. gence and Machine Learning, 10(3):1 -- 145. Ronan Collobert and Jason Weston. 2008. A unified architecture for natural language processing: Deep In Pro- neural networks with multitask learning. ceedings of the 25th international conference on Machine learning, pages 160 -- 167. ACM. Alexis Conneau, Douwe Kiela, Holger Schwenk, Loic Barrault, and Antoine Bordes. 2017. Supervised learning of universal sentence representations from natural language inference data. In EMNLP. Michael Denkowski and Alon Lavie. 2014. Meteor universal: Language specific translation evaluation for any target language. In EACL. Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoff- man, Ning Zhang, Eric Tzeng, and Trevor Darrell. 2014. Decaf: A deep convolutional activation fea- ture for generic visual recognition. In ICML, pages 647 -- 655. Bradley Efron and Robert J Tibshirani. 1994. An intro- duction to the bootstrap. CRC press. Thomas Elsken, Jan Hendrik Metzen, and Frank Hut- ter. 2019. Efficient multi-objective neural architec- ture search via lamarckian evolution. In ICLR. Ross Girshick. 2015. Fast r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 1440 -- 1448. Han Guo, Ramakanth Pasunuru, and Mohit Bansal. 2018. Soft layer-specific multi-task summarization with entailment and question generation. In ACL. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual learning for image recog- nition. In CVPR, pages 770 -- 778. Lisa Anne Hendricks, Oliver Wang, Eli Shechtman, Josef Sivic, Trevor Darrell, and Bryan Russell. 2017. Localizing moments in video with natural language. In ICCV, pages 5803 -- 5812. Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531. Heechul Jung, Jeongwoo Ju, Minju Jung, and Junmo Kim. 2016. Less-forgetting learning in deep neural networks. arXiv preprint arXiv:1607.00122. Diederik Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In ICLR. James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Ag- nieszka Grabska-Barwinska, et al. 2017. Over- coming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521 -- 3526. Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. 2015. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332 -- 1338. Zhizhong Li and Derek Hoiem. 2017. Learning with- out forgetting. IEEE Transactions on Pattern Anal- ysis and Machine Intelligence. Percy Liang, Michael I Jordan, and Dan Klein. 2010. Learning programs: A hierarchical bayesian ap- proach. In ICML, pages 639 -- 646. Chin-Yew Lin. 2004. ROUGE: A package for auto- In Text Summa- matic evaluation of summaries. rization Branches Out: Proceedings of the ACL-04 workshop, volume 8. Chenxi Liu, Barret Zoph, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. 2017. Progressive neural archi- tecture search. arXiv preprint arXiv:1712.00559. Sebastian Ruder, Joachim Bingel, Isabelle Augenstein, and Anders Søgaard. 2017. Sluice networks: Learn- ing what to share between loosely related tasks. arXiv preprint arXiv:1705.08142. Hanxiao Liu, Karen Simonyan, Oriol Vinyals, Chrisan- tha Fernando, and Koray Kavukcuoglu. 2018. Hi- erarchical representations for efficient architecture search. In CVPR. Minh-Thang Luong, Quoc V Le, Ilya Sutskever, Oriol Vinyals, and Lukasz Kaiser. 2015. Multi-task arXiv preprint sequence to sequence learning. arXiv:1511.06114. Arvind Neelakantan, Quoc V Le, and Ilya Sutskever. Inducing latent pro- 2015. Neural programmer: grams with gradient descent. In ICLR. Renato Negrinho and Geoff Gordon. 2017. Deepar- chitect: Automatically designing and training deep architectures. In CVPR. Cuong V Nguyen, Yingzhen Li, Thang D Bui, and Richard E Turner. 2017. Variational continual learn- ing. arXiv preprint arXiv:1710.10628. Eric W Noreen. 1989. Computer-intensive methods for testing hypotheses. Wiley New York. Junhyuk Oh, Satinder Singh, Honglak Lee, and Push- meet Kohli. 2017. Zero-shot task generalization with multi-task deep reinforcement learning. arXiv preprint arXiv:1706.05064. Kishore Papineni, Salim Roukos, Todd Ward, and Wei- Jing Zhu. 2002. BLEU: a method for automatic In ACL, pages evaluation of machine translation. 311 -- 318. Ramakanth Pasunuru and Mohit Bansal. 2017a. Multi- task video captioning with video and entailment generation. In ACL. Ramakanth Pasunuru and Mohit Bansal. 2017b. Rein- forced video captioning with entailment rewards. In EMNLP. Mat thew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word rep- resentations. In NAACL. Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. 2018. Efficient neural architec- ture search via parameter sharing. arXiv preprint arXiv:1802.03268. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text. In EMNLP. Ali Sharif Razavian, Hossein Azizpour, Josephine Sul- livan, and Stefan Carlsson. 2014. Cnn features off- the-shelf: an astounding baseline for recognition. In Computer Vision and Pattern Recognition Work- shops (CVPRW), 2014 IEEE Conference on, pages 512 -- 519. IEEE. Sebastian Ruder and Barbara Plank. 2017. Learning to select data for transfer learning with bayesian opti- mization. arXiv preprint arXiv:1707.05246. Andrei A Rusu, Neil C Rabinowitz, Guillaume Des- jardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. 2016. Progressive neural networks. arXiv preprint arXiv:1606.04671. Simone Scardapane, Danilo Comminiello, Amir Hus- sain, and Aurelio Uncini. 2017. Group sparse regu- larization for deep neural networks. Neurocomput- ing, 241:81 -- 89. David R So, Chen Liang, 2019. The evolved transformer. arXiv:1901.11117. and Quoc V Le. arXiv preprint Phillip D Summers. 1986. A methodology for lisp program construction from examples. In Readings in artificial intelligence and software engineering, pages 309 -- 316. Elsevier. Ramakrishna Vedantam, C Lawrence Zitnick, and Devi Parikh. 2015. CIDEr: Consensus-based image de- scription evaluation. In CVPR, pages 4566 -- 4575. Alex Wang, Amapreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. 2018. GLUE: A multi-task benchmark and analysis plat- arXiv form for natural language understanding. preprint arXiv:1804.07461. Saining Xie, Ross Girshick, Piotr Doll´ar, Zhuowen Tu, and Kaiming He. 2017. Aggregated residual trans- In CVPR, formations for deep neural networks. pages 5987 -- 5995. IEEE. Jun Xu, Tao Mei, Ting Yao, and Yong Rui. 2016. MSR-VTT: A large video description dataset for bridging video and language. In CVPR, pages 5288 -- 5296. IEEE. Jaehong Yoon, Eunho Yang, Jeongtae Lee, and Sung Ju Hwang. 2018. Lifelong learning with dynamically expandable networks. arXiv preprint arXiv:1708.01547. Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. 2014. How transferable are features in deep neural networks? In NIPS, pages 3320 -- 3328. Friedemann Zenke, Ben Poole, and Surya Ganguli. 2017. Continual learning through synaptic intelli- gence. In ICML, pages 3987 -- 3995. Barret Zoph and Quoc V Le. 2017. Neural architecture search with reinforcement learning. In ICLR. Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. 2018. Learning transferable architec- tures for scalable image recognition. In CVPR. Appendix A Training Details We use Adam optimizer (Kingma and Ba, 2015) and a mini-batch size of 64. We set the dropout to 0.5. In all of our architecture search models, we use 6 nodes. For the controller's optimization, we again use Adam optimizer with a learning rate of 0.00035. For GLUE tasks, we use 256 dimensions for the hidden states of the RNNs, and for word embed- dings we use ELMo representations (Peters et al., 2018), where we down project the 1024 dimen- sions ELMo embeddings to 256. We use a learn- ing rate of 0.001, and both encoder RNNs are un- rolled to 50 steps. For CAS conditions, we set the coefficients for block-sparsity and orthogonal- ity conditions to 0.001 and 0.001, respectively. For video captioning tasks, we use hidden state size of 1024 and word embedding size of 512. For visual features, we use a concatenation of both ResNet-152 (He et al., 2016) and ResNeXt- 101 (Xie et al., 2017) image features. We use a learning rate of 0.0001, and we unroll the video encoder and caption decoder to 50 and 20 steps, respectively. For CAS conditions, we set both the coefficients of block-sparsity and orthogonal- ity conditions to 0.0001.
1902.01382
3
1902
2019-09-14T19:09:55
The FLoRes Evaluation Datasets for Low-Resource Machine Translation: Nepali-English and Sinhala-English
[ "cs.CL" ]
For machine translation, a vast majority of language pairs in the world are considered low-resource because they have little parallel data available. Besides the technical challenges of learning with limited supervision, it is difficult to evaluate methods trained on low-resource language pairs because of the lack of freely and publicly available benchmarks. In this work, we introduce the FLoRes evaluation datasets for Nepali-English and Sinhala-English, based on sentences translated from Wikipedia. Compared to English, these are languages with very different morphology and syntax, for which little out-of-domain parallel data is available and for which relatively large amounts of monolingual data are freely available. We describe our process to collect and cross-check the quality of translations, and we report baseline performance using several learning settings: fully supervised, weakly supervised, semi-supervised, and fully unsupervised. Our experiments demonstrate that current state-of-the-art methods perform rather poorly on this benchmark, posing a challenge to the research community working on low-resource MT. Data and code to reproduce our experiments are available at https://github.com/facebookresearch/flores.
cs.CL
cs
The FLORES Evaluation Datasets for Low-Resource Machine Translation: Nepali -- English and Sinhala -- English Francisco Guzm´an♥(cid:7) Peng-Jen Chen♥(cid:70) Myle Ott(cid:70) Juan Pino(cid:7) Guillaume Lample(cid:70)‡ Philipp Koehn(cid:4) Vishrav Chaudhary(cid:7) Marc'Aurelio Ranzato(cid:70) (cid:7)Facebook Applied Machine Learning (cid:70)Facebook AI Research ‡Sorbonne Universit´es (cid:4)Johns Hopkins University {fguzman,pipibjc,myleott,juancarabina,guismay,vishrav,ranzato}@fb.com [email protected] 9 1 0 2 p e S 4 1 ] L C . s c [ 3 v 2 8 3 1 0 . 2 0 9 1 : v i X r a Abstract For machine translation, a vast majority of language pairs in the world are considered low-resource because they have little paral- lel data available. Besides the technical chal- lenges of learning with limited supervision, it is difficult to evaluate methods trained on low- resource language pairs because of the lack of freely and publicly available benchmarks. In this work, we introduce the FLORES evalua- tion datasets for Nepali -- English and Sinhala -- English, based on sentences translated from Wikipedia. Compared to English, these are languages with very different morphology and syntax, for which little out-of-domain paral- lel data is available and for which relatively large amounts of monolingual data are freely available. We describe our process to col- lect and cross-check the quality of translations, and we report baseline performance using sev- eral learning settings: fully supervised, weakly supervised, semi-supervised, and fully unsu- pervised. Our experiments demonstrate that current state-of-the-art methods perform rather poorly on this benchmark, posing a challenge to the research community working on low- resource MT. Data and code to reproduce our experiments are available at https://github. com/facebookresearch/flores. Introduction 1 Research in Machine Translation (MT) has seen significant advances in recent years thanks to im- provements in modeling, and in particular neural models (Sutskever et al., 2014; Bahdanau et al., 2015; Gehring et al., 2016; Vaswani et al., 2017), as well as the availability of large parallel cor- pora for training (Tiedemann, 2012; Smith et al., ♥ Equal contribution. 2013; Bojar et al., 2017). Indeed, modern neural MT systems can achieve near human-level trans- lation performance on language pairs for which sufficient parallel training resources exist (e.g., Chinese -- English translation (Hassan et al., 2018) and English -- French translation (Gehring et al., 2016; Ott et al., 2018a). Unfortunately, MT systems, and in particular neural models, perform poorly on low-resource language pairs, for which parallel training data is scarce (Koehn and Knowles, 2017). Improv- ing translation performance on low-resource lan- guage pairs could be very impactful considering that these languages are spoken by a large fraction of the world population. Technically, there are several challenges to solve in order to improve translation for low- resource languages. First, in face of the scarcity of clean parallel data, MT systems should be able to use any source of data available, namely mono- lingual resources, noisy comparable data, as well as parallel data in related languages. Second, we need reliable public evaluation benchmarks to track progress in translation quality. Building evaluation sets on low-resource lan- guages is both expensive and time-consuming be- cause the pool of professional translators is lim- ited, as there are few fluent bilingual speakers for these languages. Moreover, the quality of profes- sional translations for low-resource languages is not on par with that of high-resource languages, given that the quality assurance processes for the low-resource languages are often lacking or un- der development. Also, it is difficult to verify the quality of the human translations as an non-native speaker, because the topics of the documents in these low-resource languages may require knowl- edge and context coming from the local culture. In this work, we introduce new evaluation benchmarks on two very low-resource language pairs: Nepali -- English and Sinhala -- English. Sen- tences were extracted from Wikipedia articles in each language and translated by professional translators. The datasets we release to the commu- nity are composed of a tune set of 2559 and 2898 sentences, a development set of 2835 and 2766 sentences, and a test set of 2924 and 2905 sen- tences for Nepali -- English and Sinhala -- English re- spectively. In §3, we describe the methodology we used to collect the data as well as to check the qual- ity of translations. The experiments reported in §4 demonstrate that these benchmarks are very challenging for current state-of-the-art methods, yielding very low BLEU scores (Papineni et al., 2002) even using all available parallel data as well as monolingual data or Paracrawl1 filtered data. This suggests that these languages and evaluation benchmarks can constitute a useful test-bed for developing and comparing MT systems for low- resource language pairs. 2 Related Work There is ample literature on low-resource MT. From the modeling side, one possibility is to de- sign methods that make more effective use of monolingual data. This is a research avenue that has seen a recent surge of interest, starting with semisupervised methods relying on back- translation (Sennrich et al., 2015), integration of a language model into the decoder (Gulcehre et al., 2017; Stahlberg et al., 2018) all the way to fully unsupervised approaches (Lample et al., 2018b; Artetxe et al., 2018), which use monolingual data both for learning good language models and for fantasizing parallel data. Another avenue of re- search has been to extend the traditional super- vised learning setting to a weakly supervised one, whereby the original training set is augmented with parallel sentences mined from noisy com- parable corpora like Paracrawl. In addition to the challenge of learning with limited supervi- sion, low-resource language pairs often involve distant languages that do not share the same al- phabet, or have very different morphology and syntax; accordingly, recent work has begun to 1https://paracrawl.eu/ explore language-independent lexical representa- tions to improve transfer learning (Gu et al., 2018). In terms of low-resource datasets, DARPA programs like LORELEI (Strassel and Tracey, 2016) have collected translations on several low- resource languages like English -- Tagalog. Unfor- tunately, the data is only made available to the pro- gram's participants. More recently, the Asian Lan- guage Treebank project (Riza et al., 2016) has in- troduced parallel datasets for several low-resource language pairs, but these are sampled from text originating in English and thus may not general- ize to text sampled from low-resource languages. In the past, there has been work on extract- ing high quality translations from crowd-sourced workers using automatic methods (Zaidan and Callison-Burch, 2011; Post et al., 2012). However, crowd-sourced translations have generally lower quality than professional translations. In contrast, in this work we explore the quality checks that are required to filter professional translations of low- resource languages in order to build a high quality benchmark set. In practice, there are very few publicly avail- able datasets for low-resource language pairs, and often times, researchers simulate learning on low- resource languages by using a high-resource lan- guage pair like English -- French, and merely lim- iting how much labeled data they use for train- ing (Johnson et al., 2016; Lample et al., 2018a). While this practice enables a framework for easy comparison of different approaches, the real prac- tical implications deriving from these methods can be unclear. For instance, low-resource languages are often distant and often times corresponding corpora are not comparable, conditions which are far from the simulation with high-resource Euro- pean languages, as has been recently pointed out by Neubig and Hu (2018). 3 Methodology & Resulting Datasets For the construction of our benchmark sets we chose to translate between Nepali and Sinhala into and out of English. Both Nepali and Sinhala are Indo-Aryan languages with a subject-object-verb (SOV) structure. Nepali is similar to Hindi in its structure, while Sinhala is characterized by exten- sive omissions of arguments in a sentence. Nepali is spoken by about 20 million people if we consider only Nepal, while Sinhala is spo- ken by about 17 million people just in Sri Lanka2. Sinhala and Nepali have very little publicly avail- able parallel data . For instance, most of the par- allel corpora for Nepali -- English originate from GNOME and Ubuntu handbooks, and account for about 500K sentence pairs.3 For Sinhala -- English, there are an additional 600K sentence pairs au- tomatically aligned from from OpenSubtitles (Li- son et al., 2018). Overall, the domains and quan- tity of the existing parallel data are very lim- ited. However, both languages have a rather large amount of monolingual data publicly available (Buck et al., 2014), making them perfect candi- dates to track performance on unsupervised and semi-supervised tasks for Machine Translation. 3.1 Document selection To build the evaluation sets, we selected and pro- fessionally translated sentences originating from Wikipedia articles in English, Nepali and Sin- hala from a Wikipedia snapshot of early May 2018. To select sentences for translation, we first selected the top 25 documents that contain the largest number of candidate sentences in each source language. To this end, we defined can- didate sentences4 as: (i) being in the intended source language according to a language-id classi- fier (Bojanowski et al., 2017)5, and (ii) having sen- tences between 50 and 150 characters. Moreover, we considered sentences and documents to be in- adequate for translation when they contained large portions of untranslatable content such as lists of entities6. To avoid such lists we used the following rules: (i) for English, sentences have to start with an uppercase letter and end with a period; (ii) for Nepali and Sinhala, sentences should not contain symbols such as bullet points, repeated dashes, re- peated periods or ASCII characters. The docu- ment set, along with the categories of documents 2See https://www.ethnologue.com/language/npi and https://www.ethnologue.com/language/sin. is 3Nepali has also Penn 4K Tree sentences at Bank translated http:// from English www.cle.org.pk/software/ling_resources/ UrduNepaliEnglishParallelCorpus.htm, which valuable parallel data. 4We first used HTML markup to split document text into paragraphs. We then used regular expressions to split on punctuation, e.g. full-stop, poorna virama (\u0964) and ex- clamation marks. 5This is a necessary step as many sentences in foreign lan- guage Wikipedias may be in English or other languages. 6For example, the Academy Awards page: https://en.wikipedia.org/wiki/Academy_Award_ for_Best_Supporting_Actor. is presented in the Appendix, Table 8. After the document selection process, we ran- domly sampled 2,500 sentences for each language. From English, we translated into Nepali and Sin- hala, while from Sinhala and Nepali, we only translated into English. We requested each string to be translated twice by different translators. 3.2 Quality checks Translating domain-specialized content such as Wikipedia articles from and to low-resource lan- guages is challenging: the pool of available trans- lators is limited, there is limited context available to each translator when translating one string at a time, and some of the sentences can contain code- switching (e.g. text about Buddhism in Nepali or Sinhala can contain Sanskrit or Pali words). As a result, we observed large variations in the level of translation quality, which motivated us to enact a series of automatic and manual checks to filter out poor translations. We first used automatic methods to filter out poor translations and sent them for rework. Once the reworked translations were received, we sent all translations (original or reworked) that passed the automatic checks to human quality checks. Translations which failed human checks, were dis- regarded. Only the translations that passed all checks were added to the evaluation benchmark, although some source sentences may have less than two translations. Below, we describe the au- tomatic and manual quality checks that we applied to the datasets. translations should be fluent Automatic Filtering. The guiding principles underlying our choice of automatic filters are: (i) (Zaidan and Callison-Burch, 2011), (ii) they should be suffi- ciently different from the source text, (iii) trans- lations should be similar to each other, yet not equal; and (iv) translations should not be translit- erations. In order to identify the vast majority of translation issues we filtered by: (i) applying a count-based n-gram language model trained on Wikipedia monolingual data and removing trans- lations that have perplexity above 3000.0 (English translations only), (ii) removing translations that have sentence-level char-BLEU score between the two generated translations below 15 (indicating disparate translations) or above 90 (indicating sus- piciously similar translations), (iii) removing sen- tences that contain at least 33% transliterated words, (iv) removing translations where at least 50% of words are copied from the source sentence, and (v) removing translations that contain more than 50% out-of-vocabulary words or more than 5 total out-of-vocabulary words in the sentences (English translations only). For this, the vocab- ulary was calculated on the monolingual English Wikipedia described in Table 2. Manual Filtering. We followed a setup similar to direct assessment (Graham et al., 2013). We asked three different raters to rate sentences from 0 -- 100 according to the perceived translation qual- ity. In our guidelines, the 0 -- 10 range represents a translation that is completely incorrect and in- accurate, the 70 -- 90 range represents a translation that closely preserves the semantics of the source sentence, while the 90 -- 100 range represents a per- fect translation. To ensure rating consistency, we rejected any evaluation set in which the range of scores among the three reviewers was above 30 points, and requested a fourth rater to break ties, by replacing the most diverging translation rating with the new one. For each translation, we took the average score over all raters and rejected transla- tions whose scores were below 70. To ensure that the translations were as fluent as possible, we also designed an Amazon Mechani- cal Turk (AMT) monolingual task to judge the flu- ency of English translations. Regardless of con- tent preservation, translations that are not fluent in the target language should be disregarded. For this task, we then asked five independent human an- notators to rate the fluency of each English trans- lation from 1 (bad) to 5 (excellent), and retained only those above 3.Additional statistics of auto- matic and manual filtering stages can be found in Appendix. 3.3 Resulting Datasets We built three evaluation sets for each language pair using the data that passed our automatic and manual quality checks: dev (tune), devtest (valida- tion) and test (test). The tune set is used for hyper- parameter tuning and model selection, the valida- tion set is used to measure generalization during development, while the test set is used for the final blind evaluation. To measure performance in both directions (e.g. Sinhala -- English and English -- Sinhala), we built test sets with mixed original-translationese (Ba- orig lang dev devtest test uniq tot uniq tot uniq tot Nepali -- English 693 English Nepali 825 1,518 Sinhala -- English 1,123 English Sinhala 565 1,688 1,181 1,378 2,559 800 800 1,600 1,393 1,442 2,835 850 850 1,700 1,462 1,462 2,924 1,913 985 2,898 800 800 1600 1,395 1,371 2,766 850 850 1700 1,465 1,440 2,905 Table 1: Number of unique sentences (uniq) and to- tal number of sentence pairs (tot) per FLORES test set grouped by their original languages. roni and Bernardini, 2005) on the source side. To reduce the effect of the source language on the quality of the resulting evaluation benchmark, di- rect and reverse translations were mixed at an ap- proximate 50-50 ratio for the devtest and test sets. On the other hand, the dev set was composed of the remainder of the available translations, which were not guaranteed to be balanced. Before selec- tion, the sentences were grouped by document, to minimize the number of documents per evaluation set. In Table 1 we present the statistics of the re- the test set sulting sets. For Sinhala -- English, is composed of 850 sentences originally in En- glish, and 850 originally in Sinhala. We have ap- proximately 1.7 translations per sentence. This yielded 1,465 sentence pairs originally in English, and 1,440 originally in Sinhalese, for a total of 2,905 sentences. Similarly, for Nepali -- English, the test set is composed of 850 sentences orig- inally in English, and 850 originally in Nepali. This yielded 1,462 sentence pairs originally in En- glish and 1,462 originally in Nepali, for a total of 2,924 sentence pairs. The composition of the rest of the sets can be found in Table 1. In Appendix Table 6, we present the aggre- gate distribution of topics per sentence for the datasets in Nepali -- English and Sinhala -- English, which shows a diverse representation of topics ranging from General (e.g. documents about tires, shoes and insurance), History (e.g. documents about history of the radar, the Titanic, etc.) to Law and Sports. This richness of topics increases the difficulty of the set, as it requires models that are rather domain-independent. The full list of docu- ments and topics is also in Appendix, Table 8. 4 Experiments In this section, we first describe the data used for training the models, we then discuss the learning settings and models considered, and finally we re- port the results of these baseline models on the new evaluation benchmarks. 4.1 Training Data Small amounts of parallel data are available for Sinhala -- English and Nepali -- English. Statis- tics can be found in Table 2. This data comes from different sources. Open Subtitles and GNOME/KDE/Ubuntu come from the OPUS repository7. Global Voices is an updated version (2018q4) of a data set originally created for the CASMACAT project8. Bible translations come from the bible-corpus9. The Paracrawl corpus comes from the Paracrawl project10. The filtered version (Clean Paracrawl) was generated using the LASER model (Artetxe and Schwenk, 2018) to get the best sentence pairs having 1 million English to- kens as specified in Chaudhary et al. (2019). We also contrast this filtered version with a randomly filtered version (Random Paracrawl) with the same number of English tokens. Finally, our multi- lingual experiments in Nepali use Hindi mono- lingual (about 5 million sentences) and English- Hindi parallel data (about 1.5 million parallel sen- tences) from the IIT Bombay corpus11. 4.2 Training Settings We evaluate models in four training settings. First, we consider a fully supervised training setting us- ing the parallel data listed in Table 2. Second, we consider a fully unsupervised set- ting, whereby only monolingual data on both the source and target side are used to train the model (Lample et al., 2018b). Third, we consider a semi-supervised setting where we also leverage monolingual data on the target side using the standard back-translation training protocol (Sennrich et al., 2015): we train a backward MT system, which we use to translate monolingual target sentences to the source lan- guage. Then, we merge the resulting pairs of noisy 7http://opus.nlpl.eu/ 8http://casmacat.eu/corpus/global-voices. html 9https://github.com/christos-c/ bible-corpus/ 10https://paracrawl.eu/ 11http://www.cfilt.iitb.ac.in/iitb_parallel/ Nepali -- English parallel Bible Global Voices Penn Tree Bank GNOME/KDE/Ubuntu comparable∗ Unfiltered Paracrawl Clean Paracrawl Random Paracrawl monolingual Wikipedia (en) Common Crawl (ne) Wikipedia (ne) Sinhala -- English parallel Open Subtitles GNOME/KDE/Ubuntu comparable∗ Paracrawl Clean Paracrawl Random Paracrawl monolingual Wikipedia (en) Common Crawl (si) Wikipedia (si) Sentences Tokens 62K 3K 4K 495K 2.2M 32.9K 55.3K 1.5M 75K 88K 2M 40.6M 1M 1M 67.8M 2.0B 3.6M 103.0M 92.3K 2.8M 601K 46K 3.4M 47K 74.2K 3.6M 151K 45.4M 1M 1M 67.8M 2.0B 5.2M 110.3M 4.7M 155.9K Table 2: Parallel, comparable, and monolingual data used in experiments in §4. The number of tokens for parallel and comparable corpora are reported over the English tokens. Monolingual and comparable corpora do not include any sentences from the evaluation sets. ∗Comparable data from Paracrawl is used only in the weakly-supervised experiments since alignments are noisy. (back-translated) source sentences with the orig- inal target sentences and add them as additional parallel data for training source-to-target MT sys- tem. Since monolingual data is available for both languages, we train backward MT systems in both directions and repeat the back-translation process iteratively (He et al., 2016; Lample et al., 2018a). We consider up to two back-translation iterations. At each iteration we generate back-translations us- ing beam search, which has been shown to per- form well in low-resource settings (Edunov et al., 2018); we use a beam width of 5 and individually tune the length-penalty on the dev set. Finally, we consider a weakly supervised setting by using a baseline system to filter out Paracrawl data using LASER (Artetxe and Schwenk, 2018) by following the approach similar to Chaudhary et al. (2019), in order to augment the original train- ing set with a possibly larger but noisier set of par- allel sentences. For Nepali only, we also consider training us- ing Hindi data, both in a joint supervised and semi-supervised setting. For instance, at each it- eration of the joint semi-supervised setting, we use models from the previous iteration to back- translate English monolingual data into both Hindi and Nepali, and from Hindi and Nepali mono- lingual data into English. We then concatenate actual parallel data and back-translated data of the same language pair together, and train a new model. We also consider using English-Hindi data in the unsupervised scenario. In that setting, a model is pretrained in an unsupervised way with English, Hindi and Nepali monolingual data using the unsupervised approach by Lample and Con- neau (2019), and it is then jointly trained on both the Nepali -- English unsupervised learning task and the Hindi-English supervised task (in both direc- tions). 4.3 Models & Architectures We consider both phrase-based statistical ma- chine translation (PBSMT) and neural machine translation (NMT) systems in our experiments. All hyper-parameters have been cross-validated using the dev set. The PBSMT systems use Moses (Koehn et al., 2007), with state-of-the- art settings (5-gram language model, hierarchical lexicalized reordering model, operation sequence model) but no additional monolingual data to train the language model. systems use the The NMT Trans- former (Vaswani et al., 2017) implementation in the Fairseq toolkit (Ott et al., 2019); preliminary experiments showed these to perform better than LSTM-based NMT models. More specifically, in the supervised setting, we use a Transformer architecture with 5 encoder and 5 decoder layers, where the number of attention heads, embedding dimension and inner-layer dimension are 2, 512 and 2048, respectively. In the semi-supervised setting, where we augment our small parallel training data with millions of back-translated sentence pairs, we use a larger Transformer architecture with 6 encoder and 6 decoder layers, where the number of attention heads, embedding dimension and inner-layer dimension are 8, 512 and 4096, respectively. When we use multilin- gual data, the encoder is shared in the {Hindi, Nepali} -- English direction, and the decoder is shared in the English -- {Hindi, Nepali}direction. We regularize our models with dropout, label smoothing and weight decay, with the correspond- ing hyper-parameters tuned independently for each language pair. Models are optimized with Adam (Kingma and Ba, 2015) using β1 = 0.9, β2 = 0.98, and  = 1e − 8. We use the same learning rate schedule as Ott et al. (2018b). We run experiments on between 4 and 8 Nvidia V100 GPUs with mini-batches of between 10K and 100K target tokens following Ott et al. (2018b). Code to reproduce our results can be found at https://github.com/facebookresearch/flores. 4.4 Preprocessing and Evaluation We tokenize Nepali and Sinhala using the Indic NLP Library.12 For the PBSMT system, we to- kenize English sentences using the Moses tok- enization scripts. For NMT systems, we instead use a vocabulary of 5K symbols based on a joint source and target Byte-Pair Encoding (BPE; Sen- nrich et al., 2015) learned using the sentencepiece library13 over the parallel training data. We learn the joint BPE for each language pair over the raw English sentences and tokenized Nepali or Sinhala sentences. We then remove training sentence pairs with more than 250 source or target BPE tokens. We report detokenized SacreBLEU (Post, 2018) when translating into English, and tokenized BLEU (Papineni et al., 2002) when translating from English into Nepali or Sinhala. 4.5 Results In the supervised setting, PBSMT performed quite worse than NMT, achieving BLEU scores of 2.5, 4.4, 1.6 and 5.0 on English -- Nepali, Nepali -- English, English -- Sinhala and Sinhala -- English, re- spectively. Table 3 reports results using NMT in all the other learning configurations described in §4.2. There are several observations we can make. First, these language pairs are very difficult, as even supervised NMT baselines achieve BLEU scores less than 8. Second and not surprisingly, the BLEU score is particularly low when translat- ing into the more morphologically rich Nepali and Sinhala languages. Third, unsupervised NMT ap- proaches seem to be ineffective on these distant language pairs, achieving BLEU scores close to 0. The reason for this failure is due to poor initializa- tion of the word embeddings. 12https://github.com/anoopkunchukuttan/ indic_nlp_library 13https://github.com/google/sentencepiece Supervised +mult. Unsupervised + mult. Semi-supervised Weakly supervised it. 1 it. 2 it 1. + mult. it 2. + mult. 4.3 7.6 1.2 7.2 8.3 18.8 English -- Nepali Nepali -- English English -- Sinhala Sinhala -- English Table 3: BLEU scores of NMT using various learning settings on devtest (see §3). We report detokenized Sacre- BLEU (Post, 2018) for {Ne,Si}→En and tokenized BLEU for En→{Ne,Si}. 6.8 12.7 0.1 0.5 0.1 0.1 6.8 15.1 6.5 15.1 5.8 9.6 3.1 10.9 6.9 14.2 - - 8.8 19.8 - - 8.8 21.5 - - - - 5.2 12.0 Poor initialization can be attributed to to the monolingual corpora used to train word embed- dings which do not have sufficient number of over- lapping strings, and are not comparable (Neubig and Hu, 2018; Søgaard et al., 2018). Fourth, the biggest improvements are brought by the semi-supervised approach using back- translation, which nearly doubles BLEU for Nepali -- English from 7.6 to 15.1 (+7.5 BLEU points) and Sinhala -- English from 7.2 to 15.1 (+7.9 BLEU points), and increases +2.5 BLEU points for English -- Nepali and +5.3 BLEU points for English -- Sinhala. Fifth, additional parallel data in English-Hindi further improves translation quality in Nepali across all settings. For instance, in the Nepali -- English supervised setting, we observe a gain of 6.5 BLEU points, while in the semi-supervised setting (where we back-translate also to and from Hindi) the gain is 6.4 BLEU points. Similarly, in the unsupervised setting, multilingual training with Hindi brings Nepali -- English to 3.9 BLEU and English -- Nepali to 2.5 BLEU; if however, the architecture is pretrained as prescribed by Lam- ple and Conneau (2019), BLEU score improves to 18.8 BLEU for Nepali -- English and 8.3 BLEU for English -- Nepali. Finally, the weakly supervised baseline using the additional noisy parallel data described in §4.1 improves upon the supervised baseline in all four directions. This is studied in more depth in Table 4 for Sinhala -- English and Nepali -- English. With- out any filtering or with random filtering, BLEU score is close to 0 BLEU. Applying the a fil- tering method based on LASER scores (Artetxe and Schwenk, 2018) provides an improvement over using the unfiltered Paracrawl, of +5.5 BLEU points for Nepali -- English and +7.3 BLEU points for Sinhala -- English. Adding Paracrawl Clean to the initial parallel data improves performance by +2.0 and +3.7 BLEU points, for Nepali -- English and Sinhala -- English, respectively. Corpora Parallel Unfiltered Paracrawl Paracrawl Random Paracrawl Clean Parallel + Paracrawl Clean BLEU ne -- en si -- en 7.6 0.4 0.1 5.9 9.6 7.2 0.4 0.4 7.7 10.9 Table 4: Weakly supervised experiments: Adding noisy par- allel data from filtered Paracrawl improves translation quality in some conditions. "Parallel" refers to the data described in Table 2. 5 Discussion In this section, we provide an analysis of the per- formance on the Nepali to English devtest set us- ing the semi-supervised machine translation sys- tem, see Figure 1. Findings on other language di- rections are similar. Fluency of references: we observe no correla- tion between the fluency rating of human refer- ences and the quality of translations as measured by BLEU. This suggests that the difficulty of the translation task is not related to the fluency of the references, at least at the current level of accuracy. Document difficulty: we observe that translation quality is similar across all document ids, with a difference of 10 BLEU points between the docu- ment that is the easiest and the hardest to trans- late. This suggests that the random sampling pro- cedure used to construct the dataset was adequate and that no single Wikipedia document produces much harder sentences than others. Original vs translationese: we noticed that docu- ments originating from Nepali are harder to trans- late than documents originating in English. This holds when performing the evaluation with the supervised MT system: translations of original Nepali sentences obtain 4.9 BLEU while Nepali translationese obtain 9.1 BLEU. This suggests that the existing parallel corpus is closer to English Wikipedia than Nepali Wikipedia. Figure 1: Analysis of the Ne→En devtest set using the semi-supervised machine translation system. Left: sentence level BLEU versus AMT fluency score of the reference sentences in English; source sentences that have received more fluent human translations are not easier to translate by machines. Right: average sentence level BLEU against Wikipedia document id from which the source sentence was extracted; sentences have roughly the same degree of difficulty across documents since there is no extreme difference between shortest and tallest bar. However, source sentences originating from Nepali Wikipedia (blue) are translated more poorly than those originating from English Wikipedia (red). Documents are sorted by BLEU for ease of reading. 5.1 Domain drift To better understand the effect of domain mis- match between the parallel dataset and the Wikipedia evaluation set, we restricted the Sinhala -- English training set to only the Open Sub- titles portion of the parallel dataset, and we held out 1000 sentences for "in-domain" evaluation of generalization performance. Table 5 shows that translation quality on in-domain data is between 10 and 16 BLEU points higher. This may be due to both domain mismatch as well as sensitivity of the BLEU metric to sentence length. Indeed, there are on average 6 words per sentences in the Open Sub- titles test set compared to 16 words per sentence in the FLORES devtest set. However, when we train semi-supervised models on back-translated Wikipedia data whose domain better matches the "Out-of-domain" devtest set, we see much larger gains in BLEU for the "Out-of-domain" set than we see on the "In-domain" set, suggesting that do- main mismatch is indeed a major problem. Open Subtitles FLORES (devtest) Sinhala -- English Supervised Semi-sup. English -- Sinhala Supervised Semi-sup. 23.5 28.1 (+20%) 7.2 15.1 (+210%) 11.0 11.8 (+7%) 1.2 6.5 (+542%) Table 5: In-domain vs. out-of-domain translation per- formance (BLEU) for supervised and semi-supervised NMT models. We report BLEU on a held-out subset of 1,000 sentences from the Open Subtitles training data (see Table 2) and on devtest (see §3). Semi-supervised models are trained on back-translated Wikipedia data. 6 Conclusions One of the biggest challenges in MT today is learning to translate low-resource language pairs. Research in this area not only faces formidable technical challenges, from learning with limited supervision to dealing with very distant languages, but it is also hindered by the lack of freely and publicly available evaluation benchmarks. In this work, we introduce and freely release to the community FLORES benchmarks for Nepali -- English and Sinhala -- English . Nepali and Sinhala are languages with very different syntax and mor- phology than English; also, very little parallel data in these language pairs is publicly available. How- ever, a good amount of monolingual data, paral- lel data in related languages, and Paracrawl data exist in both languages, making these two lan- guage pairs a perfect candidate for research on low-resource MT. Our experiments show that current state-of-the- art approaches perform rather poorly on these new evaluation benchmarks, with semi-supervised and in particular multi-lingual neural methods outper- forming all the other model variants and training settings we considered. We perform additional analysis to probe the quality of the datasets. We find no evidence of poor construction quality, yet observe that the low BLEU scores are partly due to the domain mismatch between the training and test datasets. We believe that these benchmarks will help the research community on low-resource MT make faster progress by enabling free access to evaluation data on actual low-resource languages and promoting fair comparison of methods. References Mikel Artetxe, Gorka Labaka, and Eneko Agirre. 2018. Unsupervised statistical machine translation. In Em- pirical Methods in Natural Language Processing (EMNLP). Mikel Artetxe and Holger Schwenk. 2018. Massively Multilingual Sentence Embeddings for Zero-Shot Cross-Lingual Transfer and Beyond. arXiv preprint arXiv:1812.10464. D. Bahdanau, K. Cho, and Y. Bengio. 2015. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations (ICLR). Marco Baroni and Silvia Bernardini. 2005. A new approach to the study of translationese: Machine- learning the difference between original and trans- Literary and Linguistic Computing, lated text. 21(3):259 -- 274. Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. 2017. Enriching word vectors with subword information. Transactions of the Associa- tion for Computational Linguistics, 5:135 -- 146. Ondrej Bojar, Rajen Chatterjee, Christian Federmann, Yvette Graham, Barry Haddow, Shujian Huang, Matthias Huck, Philipp Koehn, Qun Liu, Varvara Logacheva, et al. 2017. Findings of the 2017 confer- ence on machine translation (wmt17). In Proceed- ings of the Second Conference on Machine Transla- tion, pages 169 -- 214. Christian Buck, Kenneth Heafield, and Bas van Ooyen. 2014. N-gram counts and language models from the common crawl. In Proceedings of the Ninth In- ternational Conference on Language Resources and Evaluation (LREC-2014). European Language Re- sources Association (ELRA). Vishrav Chaudhary, Yuqing Tang, Francisco Guzmn, Holger Schwenk, and Philipp Koehn. 2019. Low- resource corpus filtering using multilingual sentence In Proceedings of the Fourth Con- embeddings. ference on Machine Translation (Volume 3: Shared Task Papers, Day 2), pages 263 -- 268, Florence, Italy. Association for Computational Linguistics. Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018. Understanding back-translation at scale. In Conference of the Association for Compu- tational Linguistics (ACL). Jonas Gehring, Michael Auli, David Grangier, and Yann N Dauphin. 2016. A convolutional encoder model for neural machine translation. arXiv preprint arXiv:1611.02344. Yvette Graham, Timothy Baldwin, Alistair Moffat, and Justin Zobel. 2013. Continuous measurement scales in human evaluation of machine translation. In Pro- ceedings of the 7th Linguistic Annotation Workshop and Interoperability with Discourse, pages 33 -- 41, Sofia, Bulgaria. Association for Computational Lin- guistics. Jiatao Gu, Yong Wang, Yun Chen, Victor OK Li, and Kyunghyun Cho. 2018. Meta-learning for low- In Proceed- resource neural machine translation. ings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3622 -- 3631. Caglar Gulcehre, Orhan Firat, Kelvin Xu, Kyunghyun Cho, and Yoshua Bengio. 2017. On integrating a language model into neural machine translation. Computer Speech & Language, 45:137 -- 148. Hany Hassan, Anthony Aue, Chang Chen, Vishal Chowdhary, Jonathan Clark, Christian Feder- mann, Xuedong Huang, Marcin Junczys-Dowmunt, William Lewis, Mu Li, Shujie Liu, Tie-Yan Liu, Renqian Luo, Arul Menezes, Tao Qin, Frank Seide, Xu Tan, Fei Tian, Lijun Wu, Shuangzhi Wu, Yingce Xia, Dongdong Zhang, Zhirui Zhang, and Ming Zhou. 2018. Achieving human parity on auto- matic chinese to english news translation. In arXiv:1803.05567. Di He, Yingce Xia, Tao Qin, Liwei Wang, Nenghai Yu, Tieyan Liu, and Wei-Ying Ma. 2016. Dual learn- ing for machine translation. In Advances in Neural Information Processing Systems, pages 820 -- 828. M. Johnson, M. Schuster, Q.V. Le, M. Krikun, Y. Wu, Z. Chen, N. Thorat, F. Vigas, M. Wattenberg, G. Corrado, M. Hughes, and J. Dean. 2016. Googles multilingual neural machine translation system: En- abling zero-shot translation. In Transactions of the Association for Computational Linguistics. Diederik P. Kingma and Jimmy Ba. 2015. Adam: In Inter- A Method for Stochastic Optimization. national Conference on Learning Representations (ICLR). Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Ondrej Bojar Chris Dyer, Alexandra Constantin, and Evan Herbst. 2007. Moses: Open source toolkit for statistical machine translation. In Annual Meeting of the Association for Computa- tional Linguistics (ACL), demo session. Philipp Koehn and Rebecca Knowles. 2017. Six chal- In Pro- lenges for neural machine translation. ceedings of the First Workshop on Neural Machine Translation, pages 28 -- 39. G. Lample, A. Conneau, L. Denoyer, and M. Ran- zato. 2018a. Unsupervised machine translation us- ing monolingual corpora only. In International Con- ference on Learning Representations (ICLR). Guillaume Lample and Alexis Conneau. 2019. Cross- lingual language model pretraining. arXiv preprint arXiv:1901.07291. Jason R Smith, Herve Saint-Amand, Magdalena Pla- mada, Philipp Koehn, Chris Callison-Burch, and Adam Lopez. 2013. Dirt cheap web-scale parallel text from the common crawl. In Proceedings of the 51st Annual Meeting of the Association for Compu- tational Linguistics (Volume 1: Long Papers), vol- ume 1, pages 1374 -- 1383. Anders Søgaard, Sebastian Ruder, and Ivan Vuli´c. 2018. On the limitations of unsupervised bilingual dictionary induction. In Conference of the Associa- tion for Computational Linguistics (ACL). Felix Stahlberg, James Cross, and Veselin Stoyanov. 2018. Simple fusion: Return of the language model. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 204 -- 211. As- sociation for Computational Linguistics. Stephanie Strassel and Jennifer Tracey. 2016. Lorelei language packs: Data, tools, and resources for technology development in low resource languages. LREC. Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural net- works. In Advances in Neural Information Process- ing Systems, pages 3104 -- 3112. Jrg Tiedemann. 2012. Parallel data, tools and inter- faces in opus. In Proceedings of the Eight Interna- tional Conference on Language Resources and Eval- uation (LREC'12), Istanbul, Turkey. European Lan- guage Resources Association (ELRA). Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. arXiv preprint arXiv:1706.03762. Omar F. Zaidan and Chris Callison-Burch. 2011. Crowdsourcing translation: Professional quality from non-professionals. In Proceedings of the 49th Annual Meeting of the Association for Computa- tional Linguistics: Human Language Technologies, pages 1220 -- 1229, Portland, Oregon, USA. Associa- tion for Computational Linguistics. Guillaume Lample, Myle Ott, Alexis Conneau, Lu- dovic Denoyer, and Marc'Aurelio Ranzato. 2018b. Phrase-based & neural unsupervised machine trans- lation. In Empirical Methods in Natural Language Processing (EMNLP). Pierre Lison, Jorg Tiedemann, and Milen Kouylekov. 2018. Opensubtitles2018: Statistical rescoring of sentence alignments in large, noisy parallel corpora. In LREC. European Language Resources Associa- tion (ELRA). Graham Neubig and Junjie Hu. 2018. Rapid adaptation of neural machine translation to new languages. In Conference on Empirical Methods in Natural Lan- guage Processing (EMNLP), Brussels, Belgium. Myle Ott, Michael Auli, David Granger, and Marc'Aurelio Ranzato. 2018a. Analyzing uncer- tainty in neural machine translation. arXiv preprint arXiv:1803.00047. Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. fairseq: A fast, extensible In Proceedings of toolkit for sequence modeling. NAACL-HLT 2019: Demonstrations. Myle Ott, Sergey Edunov, David Grangier, and Michael Auli. 2018b. Scaling neural machine trans- lation. In Proceedings of the Third Conference on Machine Translation: Research Papers. K. Papineni, S. Roukos, T. Ward, and W.J. Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meet- ing of the Association for Computational Linguis- tics. Matt Post. 2018. A call for clarity in reporting bleu scores. arXiv, 1804.08771. Matt Post, Chris Callison-Burch, and Miles Osborne. 2012. Constructing parallel corpora for six indian languages via crowdsourcing. In Proceedings of the Seventh Workshop on Statistical Machine Transla- tion, pages 401 -- 409, Montr´eal, Canada. Association for Computational Linguistics. Hammam Riza, Michael Purwoadi, Teduh Ulinian- syah, Aw Ai Ti, Sharifah Mahani Aljunied, Lu- ong Chi Mai, Vu Tat Thang, Nguyen Phuong Thai, Vichet Chea, Sethserey Sam, et al. 2016. Introduc- tion of the asian language treebank. In Coordination and Standardization of Speech Databases and As- sessment Techniques (O-COCOSDA), 2016 Confer- ence of The Oriental Chapter of International Com- mittee for, pages 1 -- 6. IEEE. Rico Sennrich, Barry Haddow, and Alexandra Birch. Improving neural machine translation mod- 2015. In Proceedings of the els with monolingual data. 54th Annual Meeting of the Association for Compu- tational Linguistics, pages 86 -- 96. A List of Topics topic General History Science Religion Social Sciences Biology Geography Art/Culture Sports Politics People Law proportion (%) si -- en ne -- en 18.3 24.1 15.1 6.5 12.7 7.4 10.5 8.9 6.9 10.2 6.3 9.1 4.6 10.6 8.3 6.7 6.7 5.8 N/A 8.1 7.4 N/A 2.0 3.9 Table 6: Distribution of the topics of the sentences in the dev, devtest and test sets according to the Wikipedia document they were sampled from. B Statistics of automatic filtering and manual filtering Figure 2: Histogram of averaged translation quality score. We ask three different raters to rate each sentence from 0 -- 100 according to the perceived translation quality. In our guidelines, the 0 -- 10 range represents a translation that is completely incorrect and inaccurate; the 11 -- 29 range represents a translation with few correct keywords, but the overall meaning is different from the source; the 30 -- 50 range represents a translation that contains translated fragments of the source string, with major mistakes; the 51 -- 69 range represents a translation which is understand- able and conveys the overall meaning of source string but contains typos or grammatical errors; the 70 -- 90 range represents a translation that closely preserves the semantics of the source sentence; and the 90 -- 100 range repre- sents a perfect translation. Translations with averaged translation score less than 70 (red line) are removed from the dataset. Figure 3: Histogram of averaged AMT fluency score of English translations. We ask five different raters to rate each sentence from 1 -- 5 according to its fluency. In our guidelines, the 1 -- 2 range represents a sentence that is not fluent, 3 is neutral, while the 4 -- 5 range is for fluent sentences that raters can easily understand. Translations with averaged fluency score less than 3 (red line) are removed from the dataset. Nepali -- English English -- Nepali Sinhala -- English English -- Sinhala Automatic filtering Manual filtering Translation quality Fluency 14% 10% 10% 18% 19% - 24% 13% 17% 7% 16% - Table 7: Percentage of translations that did not pass the automatic and manual filtering checks. We first use automatic methods to filter out poor translations and send those translations back for rework. We then collect translations that pass the automatic filtering and send them to two human quality checks, one for adequacy and the other for fluency. Note that the percentage of sentences that did not pass manual filtering is among those sentences that passed the automatic filtering. C List of Wikpedia Documents domain document/gloss en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org en.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org si.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org ne.wikipedia.org Astronomy History of radar Shoe Tire Indian cuisine IPhone Apollo program Chess Honey Police Desert Slavery Riddler Diving Cat Boxing White wine Creativity Capitalism Alaska Museum Lifeguard Tennis Writer Anatomy Qoran Dhammas Vegetation Names of Colombo Students Titanic The Heart The Ear Theravada WuZetian Psychoanalisis Angulimala Insurance Leafart Communication Science Pharaoh Neferneferuaten Nelson Mandela Parliament of India Kailali and Kanchanpur Bhuwan Pokhari COPD KaalSarp Yoga Research Methodology in Economics Essay Mutation Maoist Constituent Assembly Patna Federal rule systen Newari Community Raka's Dynasty Rice Breastfeeding Earthquake Motiram Bhatta Novel Magazine Vladimir Putin History of Nelali Literature Income tax Ravi Prasjal+ Yogchudamani Upanishads+ Sedai+ topic Science History General General Art/Culture General History General General Law Geography Social Sciences Art/Culture Sports Biology Sports General Social Sciences Social Sciences Geography General General Sports General Science Religion Religion Science History History Biology Biology Religion History Science Religion General Art/Culture Science History People Politics Geography Geography Biology Religion Social Sciences Social Sciences Science Politics Geography Law Art/Culture History Biology Biology Science People Art/Culture Politics History Law People Religion Religion Table 8: List of documents by Wikipedia domain, their document name or English translation, and corresponding topics. The document name has an hyper-reference to the original document. + denotes a page that has been removed or no longer available at the time of this submission. D Examples from devtest Table 9: Examples of sentences from the En-Ne, Ne-En, En-Si and Si-En devtest set. System hypotheses (System) are generated using the semi-supervised model described in the main paper using beam search decoding. EnNeSourceIt has automatic spell checking and correction, predictive word capabilities, and a dynamic dictionary that learns new words.ReferencesA\Ϊ\] [΅][ ΢ ΢]ΟέΪ [ , , ΢ [ΪΤγ Π\]΅ ।B\Ϊ\] ΜΝ] , Π]\έΠΉ , ΜΝ] Π\]΅ ।System\Ϊ\] [΅][ ΢ ΢]ΟέΪ , ΢ Π\]΅ [ ।SourceThe academic research tended toward the improvement of basic technologies, rather than their specific applications.ReferencesA Μή\΢]ΟΊ ^Γ΢]ΟέΪ [^Ι ।B\^ ΢]ΟέΪ [ , ।System Μή\΢]ΟΊ [γΧ] ।NeEnSource^Π]΢έ\ Ϊ\\\] ΢][]Τ]Ό Ϊ\] ' ΞΪΆΪ ' ।ReferencesAIn the past, the assembly that advised the king were called 'parliament'.BIn old times the counsil that gave advice to the king was called 'parliament'.SystemIn old times the council of counsel to the king was 'Senate'.Source ΤΠΨγΠ \Z ।ReferencesAAs a worker African Mandela joined the Congress party.BHe joined the African National Congress as a activist.SystemAs a worker, he joined the African National Congress.EnSiSourceIphone users can and do access the internet frequently, and in a variety of places.ReferencesA .BIphone .System . SourceIn Serious meets, the absolute score is somewhat meaningless.ReferencesA .B , .System , SiEnSource , , , .ReferencesAThreatening, physical violence, property damage, assault and execution are these punishments.BThreats, bodily violence, property damages, assaults and killing are these punishments.SystemThreats, physical harassment, property damage, strike and killing this punishment.Source .ReferencesAAfter education priests leave ordination in order to fulfill duties to the family or due to sickness.BSangha is often abandoned because of education or after fulfilling family responsibilities or because of illness.SystemAfter education or to fulfill the family's disease or disease conditions, the companion is often removed from substance.
1806.05482
1
1806
2018-06-14T11:44:48
Morphological and Language-Agnostic Word Segmentation for NMT
[ "cs.CL" ]
The state of the art of handling rich morphology in neural machine translation (NMT) is to break word forms into subword units, so that the overall vocabulary size of these units fits the practical limits given by the NMT model and GPU memory capacity. In this paper, we compare two common but linguistically uninformed methods of subword construction (BPE and STE, the method implemented in Tensor2Tensor toolkit) and two linguistically-motivated methods: Morfessor and one novel method, based on a derivational dictionary. Our experiments with German-to-Czech translation, both morphologically rich, document that so far, the non-motivated methods perform better. Furthermore, we iden- tify a critical difference between BPE and STE and show a simple pre- processing step for BPE that considerably increases translation quality as evaluated by automatic measures.
cs.CL
cs
Morphological and Language-Agnostic Word Segmentation for NMT(cid:63) Dominik Mach´acek , Jon´as Vidra , and Ondrej Bojar Charles University, Faculty of Mathematics and Physics, Institute of Formal and Applied Linguistics, Malostransk´e n´amest´ı 25, 118 00 Prague, Czech Republic {machacek,vidra,bojar}@ufal.mff.cuni.cz http://ufal.mff.cuni.cz Abstract. The state of the art of handling rich morphology in neural machine translation (NMT) is to break word forms into subword units, so that the overall vocabulary size of these units fits the practical limits given by the NMT model and GPU memory capacity. In this paper, we compare two common but linguistically uninformed methods of subword construction (BPE and STE, the method implemented in Tensor2Tensor toolkit) and two linguistically-motivated methods: Morfessor and one novel method, based on a derivational dictionary. Our experiments with German-to-Czech translation, both morphologically rich, document that so far, the non-motivated methods perform better. Furthermore, we iden- tify a critical difference between BPE and STE and show a simple pre- processing step for BPE that considerably increases translation quality as evaluated by automatic measures. 1 Introduction One of the key steps that allowed to apply neural machine translation (NMT) in unrestricted setting was the move to subword units. While the natural (target) vocabulary size in a realistic parallel corpus exceeds the limits imposed by model size and GPU RAM, the vocabulary size of custom subwords can be kept small. The current most common technique of subword construction is called byte- pair encoding (BPE) by Sennrich et al. [6].1 Its counterpart originating in the (cid:63) This work has been supported by the grants 18-24210S of the Czech Science Foun- dation, SVV 260 453 and "Progress" Q18+Q48 of Charles University, H2020-ICT- 2014-1-645452 (QT21) of the EU, and using language resources distributed by the LINDAT/CLARIN project of the Ministry of Education, Youth and Sports of the Czech Republic (projects LM2015071 and OP VVV VI CZ.02.1.01/0.0/0.0/16 013/0001781). We thank Jaroslava Hlav´acov´a for digitizing excerpts of [7] used as gold-standard data for evaluating the segmentation methods. 1 http://github.com/rsennrich/subword-nmt/ 2 Dominik Mach´acek, Jon´as Vidra, and Ondrej Bojar commercial field is wordpieces [10]. Yet another variant of the technique is im- plemented in Google's open-sourced toolkit Tensor2Tensor,2 namely the Sub- wordTextEncoder class (abbreviated as STE below). The common property of these approaches is that they are trained in an unsupervised fashion, relying on the distribution of character sequences, but disregarding any morphological properties of the languages in question. On the positive side, BPE and STE (when trained jointly for both the source and target languages) allow to identify and benefit from words that share the spelling in some of their part, e.g. the root of the English "legalization" and Czech "legalizace" (noun) or "legalizacn´ı" (adj). On the downside, the root of different word forms of one lemma can be split in several different ways and the neural network will not explicitly know about their relatedness. A morpholog- ically motivated segmentation method could solve this issue by splitting words into their constituent semantics- and syntax-bearing parts. In this paper, we experiment with two methods aimed at morphologically adequate splitting of words in a setting involving two morphologically rich lan- guages: Czech and German. We also compare the performance of several vari- ations of BPE and STE. Performance is analysed both by intrinsic evaluation of morphological adequateness, and extrinsically by evaluating the systems on a German-to-Czech translation task. 2 Morphological Segmentation Huck et al. [2] benefit from linguistically aware separation of suffixes prior to BPE on the target side of medium-size English to German translation task (overall improvement about 0.8 BLEU). Pinnis et al. [5] show similar improvements with analogical prefix and suffix splitting on English to Latvian. Since there are no publicly available morphological segmentation tools for Czech, we experimented with an unsupervised morpheme induction tool, Mor- fessor 2.0 [9], and we developed a simple supervised method based on derivational morphology. 2.1 Morfessor Morfessor [9] is an unsupervised segmentation tool that utilizes a probabilistic model of word formation. The segmentation obtained often resembles a linguistic morpheme segmentation, especially in compounding languages, where Morfessor benefits from the uniqueness of the textual representation of morphs. It can be used to split compounds, but it is not designed to handle phonological and orthographical changes as in Czech words "zen", "zne" ("harvest" in singular and plural). In Czech orthography, adding plural suffix "e" after "n" results in "ne". This suffix also causes phonological change in this word, the first "e" is dropped. Thus, "zen" and "zn" are two variants of the same morpheme, but Morfessor can't handle them appropriately. 2 http://github.com/tensorflow/tensor2tensor Morphological and Language-Agnostic Word Segmentation for NMT 3 2.2 DeriNet Our novel segmentation method works by exploiting word-to-word relations ex- tracted from DeriNet [11], a network of Czech lexical derivations, and MorfFlex [1], a Czech inflectional dictionary. DeriNet is a collection of directed trees of derivationally connected lemmas. MorfFlex is a list of lemmas with word forms and morphological tags. We unify the two resources by taking the trees from DeriNet as the basis and adding all word forms from MorfFlex as new nodes (leaves) connected with their lemmas. The segmentation algorithm works in two steps: Stemming of words based on their neighbours and morph boundary propagation. We approximate stemming by detecting the longest common substring of each pair of connected words. This segments both words connected by an edge into a (potentially empty) prefix, the common substring and a (potentially empty) suffix, using exactly two splits. For example, the edge "m´avat" (to be waving)→"m´avnout" (to wave) has the longest common substring of "m´av ", introducing the splits "m´av-at" and "m´av-nout" into the two connected words. Each word may get multiple such segmentations, because it may have more than one word connected to it by an edge. Therefore, the stemming phase itself can segment the word into its constituent morphs; but in the usual case, a multi-morph stem is left unsegmented. For example, the edge "m´avat" (to be waving)→"m´avaj´ıc´ı" (waving) has the longest common substring of "m´ava", introducing the splits "m´ava-t" and "m´ava-j´ıc´ı". The segmentation of "m´avat" is therefore "m´av-a-t", the union of its splits based on all linked words. To further split the stem, we propagate morph boundaries from connected words. If one word of a connected pair contains a split in their common substring the other word does not, the split is copied over. This way, boundaries are propagated through the entire tree. For example, we can split "m´ava-j´ıc´ı" further using the other split in "m´av-a-t" thanks to it lying in the longest common substring "m´ava". The segmentation of "m´avaj´ıc´ı" is therefore "m´av-a-j´ıc´ı". These examples also shows the limitations of this method: the words are often split too eagerly, resulting in many single-character splits. The boundaries between morphemes are fuzzy in Czech because connecting phonemes are often inserted and phonological changes occur. These cause spurious or misplaced splits. For example, the single-letter morph a in m´av-a-t and m´av-a-j´ıc´ı does not carry any information useful in machine translation and it would be better if we could detect it as a phonological detail and leave it connected to one of the neighboring morphs. 3 Data-Driven Segmentation We experimentally compare BPE with STE. As we can see in the left side of Figure 1, a distinct feature of STE seems to be an underscore as a zero suffix mark appended to every word before the subword splits are determined. This small trick allows to learn more adequate units compared to BPE. For example, 4 Dominik Mach´acek, Jon´as Vidra, and Ondrej Bojar Language agnostic Linguistically motivated Tokenized Bl´ız´ı se k tobe tramvaj . (*) Z tramvaje nevystoupili . Bl´ız´ı se k tobe tramvaj STE Z tramvaj e nevysto upil i Bl´ız´ı se k tobe tram@@ vaj . Z tram@@ va@@ je nevy@@ stoupili . BPE . . BPE und Bl´ız´ı se k tobe tram@@ vaj . Z tram@@ vaj@@ e nevyst@@ oup@@ ili . DeriNet Bl@@ ´ız@@ ´ı se k tobe tramvaj . (*) DeriNet Bl@@ ´ız@@ ´ı se k tobe tramvaj +STE Morfessor Bl´ız´ı se k tobe tramvaj . (*) Morfessor Bl´ız´ı se k tobe tramvaj Z tramvaj@@ e ne@@ vystoupil@@ i . Z tra m@@ vaj@@ e nevyst@@ oup@@ ili . . . Z tram@@ va@@ je nevy@@ stoupili . +STE Z tramvaj@@ e ne@@ vystoupil@@ i . BPE und Bl´ız´ı se k tobe tram@@ vaj non-final Z tram@@ va@@ je nevy@@ stoupili . . Fig. 1. Example of different kinds of segmentation of Czech sentences "You're being approached by a tram. They didn't get out of a tram." Segmentations marked with (*) are preliminary, they cannot be used in MT directly alone because they do not restrict the total number of subwords to the vocabulary size limit. the Czech word form "tramvaj " ("a tram") can serve as a subword unit that, combined with zero suffix (" ") corresponds to the nominative case or, combined with the suffix "e" to the genitive case "tramvaje". In BPE, there can be either "tramvaj " as a standalone word or two subwords "tramvaj@@" and "e" (or possibly split further) with no vocabulary entry sharing possible. To measure the benefit of this zero suffix feature, we modified BPE by ap- pending an underscore prior to BPE training in two flavours: (1) to every word ("BPE und"), and (2) to every word except of the last word in the sentence ("BPE und non-final"). Another typical feature of STE is to share the vocabulary of the source and target sides. While there are almost no common words in Czech and Ger- man apart from digits, punctuation and some proper names, it turns out that around 30% of the STE shared German-Czech vocabulary still appears in both languages. This contrasts to only 7% of accidental overlap of separate BPE vo- cabularies. 4 Morphological Evaluation 4.1 Supervised Morphological Splits We evaluate the segmentation quality in two ways: by looking at the data and finding typical errors and by comparing the outputs of individual systems with gold standard data from a printed dictionary of Czech morpheme segmentations [7]. We work with a sample of the book [7] containing 14 581 segmented verbs transliterated into modern Czech, measuring precision and recall on morphs and morph boundaries and accuracy of totally-correctly segmented words. 4.2 Results Figure 1 shows example output on two Czech sentences. The biggest difference between our DeriNet-based approach and Morfessor is that Morfessor does not segment most stems at all, but in contrast to our system, it reliably segments Morphological and Language-Agnostic Word Segmentation for NMT 5 Table 1. Morph segmentation quality on Czech as measured on gold standard data. Segmentation BPE BPE shared vocab STE STE+Morfessor STE+DeriNet 21.24 19.99 13.03 11.71 13.89 77.38 77.04 77.08 74.49 70.76 Morph Detection Boundary Detection Word Precision Recall F1 Precision Recall F1 Accuracy 0.77 0.69 0.23 0.23 0.35 52.44 62.52 51.49 61.72 51.77 61.93 52.85 61.83 55.00 61.89 12.74 15.93 11.75 14.80 7.79 9.75 7.59 9.21 10.44 11.92 inflectional endings and the most common affixes. The quality of our system depends on the quality of the underlying data. Unfortunately, trees in DeriNet are not always complete, some derivational links are missing. If a word belongs to such an incomplete tree, our system will not propose many splits. None of the methods handles phonological and orthographical changes, which also severely limits their performance on Czech. The results against golden Czech morpheme segmentations are in Table 1. The scores on boundary detection seem roughly comparable, with different systems making slightly different tradeoffs between precision and recall. Espe- cially the DeriNet-enhanced STE ("DeriNet+STE") system sacrifices some pre- cision for higher recall. The evaluation of morph detection varies more, with the best system being the standard BPE, followed by BPE with shared German and Czech vocab. This suggests that adding the German side to BPE decreases segmentation quality of Czech from the morphological point of view. The scores on boundary detection are necessarily higher than on morph de- tection, because a correctly identified morph requires two correctly identified boundaries - one on each side. Overall, the scores show that none of the methods presented here is linguisti- cally adequate. Even the best setup reaches only 62% F1 in boundary detection which translates to meagre 0.77% of all words in our test set without a flaw. 5 Evaluation in Machine Translation 5.1 Data Our training data consist of Europarl v7 [3] and OpenSubtitles2016 [8], after some further cleanup. Our final training corpus, processed with the Moses to- kenizer [4], consists of 8.8M parallel sentences, 89M tokens on the source side, 78M on the target side. The vocabulary size is 807k and 953k on the source and target, respectively. We use WMT3 newstest2011 as the development set and newstest2013 as the test set, 3k sentence pairs each. All experiments were carried out in Tensor2Tensor (abbreviated as T2T), version 1.2.9,4 using the model transformer big single gpu, batch size of 1500 and learning rate warmup steps set to 30k or 60k if the learning diverged. 3 http://www.statmt.org/wmt13 4 http://github.com/tensorflow/tensor2tensor 6 Dominik Mach´acek, Jon´as Vidra, and Ondrej Bojar Table 2. Data characteristics and automatic metrics after 300k steps of training. de cs % tokens de cs STE 97M 87M 54k 74k 29.89 18.78 STE STE Morfessor+STE 95M 98M 63k 63k 26.42 18.22 Morfessor+STE DeriNet+STE 138M 308M 63k 69k 36.82 16.99 Google Translate 16.66 94M 138M 80k 56k 35.58 15.31 STE 139M 86M 41k 84k 26.43 14.51 Morfessor+STE STE 95M 85M 56k 71k 26.78 13.79 types de cs shrd BLEU CharacTER chrF3 BEER 50.34 50.00 49.04 49.65 47.91 47.56 42.49 47.82 47.30 45.64 46.24 44.77 43.51 46.44 61.27 62.27 64.26 59.18 69.44 68.81 97.94 DeriNet+STE BPE shrd voc The desired vocabulary size of subword units is set to 100k when shared for both source and target and to 50k each with separate vocabularies. Since T2T SubwordTextEncoder constructs the subword model only from a sample of the training data, we had to manually set the file byte budget variable in the code to 100M, otherwise not enough distinct wordforms were observed to fill up the intended 100k vocabulary size. For data preprocessed by BPE, we used T2T TokenTextEncoder which allows to use a user-supplied vocabulary. Final scores (BLEU, CharacTER, chrF3 and BEER) are measured after re- moving any subword splits and detokenizing with Moses detokenizer. Each of the metric implementation handles tokenization on its own. Machine translation for German-to-Czech language pair is currently under- explored. We included Google Translate (as of May 2018, neural) into our eval- uation and conclude the latest Transformer model has easily outperformed it on the given test dataset. Due to a limited number of GPU cards, we cannot afford multiple training runs for estimating statistical significance. We at least report the average score of the test set as translated by several model checkpoints around the same number of training steps where the BLEU score has already flattened. This happens to be approximately after 40 hours of training around 300k training steps. 5.2 Experiment 1: Motivated vs. Agnostic Splits Table 2 presents several combinations of linguistically motivated and data-driven segmentation methods. Since the vocabulary size after Morfessor or DeriNet splitting alone often remains too high, we further split the corpus with BPE or STE. Unfortunately, none of the setups performs better than the STE baseline. 5.3 Experiment 2: Allowing Zero Ending Table 3 empirically compares STE and variants of BPE. It turns out that STE performs almost 5(!) BLEU point better than the default BPE. The underscore feature allowing to model zero suffix almost closes the gap and shared vocabulary also helps a little. As Figure 2 indicates, the difference in performance is not a straightforward consequence of the number of splits generated. There is basically no difference Morphological and Language-Agnostic Word Segmentation for NMT 7 Table 3. BPE vs STE with/without underscore after every (non-final) token of a sen- tence and/or shared vocabulary. Reported scores are avg±stddev of T2T checkpoints between 275k and 325k training steps. CharacTER, chrF3 and BEER are multiplied by 100. split underscore after every token STE BPE after non-final tokens BPE after non-final tokens BPE BPE BPE after every token - - shared vocab BLEU CharacTER chrF3 BEER 18.58±0.06 61.43±0.68 44.80±0.29 50.23±0.16 18.24±0.08 63.80±0.88 44.37±0.24 49.84±0.15 18.07±0.08 63.24±1.98 44.21±0.20 49.72±0.11 13.88±0.18 81.84±3.33 36.74±0.51 42.46±0.51 13.69±0.66 76.72±4.03 36.60±0.63 42.33±0.60 13.66±0.38 82.66±3.54 36.73±0.53 42.41±0.56 - - Fig. 2. Histogram of number of splits of words based on their frequency rank. The most common words (left) remain unsplit by all methods, rare words (esp. beyond the 50k vocabulary limit) are split to more and more subwords. between BPE with and without underscore but shared vocabulary leads to a lower number of splits on the Czech target side. We can see that STE in both languages splits words to more parts than BPE but still performs better. We conclude that the STE splits allow to exploit morphological behaviour better. 6 Discussion All our experiments show that our linguistically motivated techniques do not per- form better in machine translation than current state-of-the-art agnostic meth- ods. Actually, they do not even lead to linguistically adequate splits when evalu- ated against a dictionary of word segmentations. This can be caused by the fact that our new methods are not accurate enough in splitting words to morphs, maybe because of the limited size of DeriNet and small amount of training data for Morfessor, maybe because they don't handle the phonological and ortho- graphical changes, so the amount of resulting morphs is still very high and most of them are rare in the data. 3.54.04.55.05.56.0Log rank by occurrence1.01.52.02.53.03.54.0Average number of subwords50k -- vocab sizeBPE deBPE shrd deBPE und deBPE shrd und deSTE deBPE csBPE shrd csBPE und csBPE shrd und csSTE cs 8 Dominik Mach´acek, Jon´as Vidra, and Ondrej Bojar One new linguistically adequate feature, the zero suffix mark after all but final tokens in the sentence showed a big improvement, while adding the mark after every token did not. This suggests that the Tensor2Tensor NMT model benefits from explicit sentence ends perhaps more than from a better segmentation, but further investigation is needed. 7 Conclusion We experimented with common linguistically non-informed word segmentation methods BPE and SubwordTextEncoder, and with two linguistically-motivated ones. Neither Morfessor nor our novel technique relying on DeriNet, a deriva- tional dictionary for Czech, help. The uninformed methods thus remain the best choice. Our analysis however shows an important difference in STE and BPE, which leads to considerably better performance. The same feature (support for zero suffix) can be utilized in BPE, giving similar gains. References 1. Hajic, J., Hlav´acov´a, J.: MorfFlex CZ (2013), http://hdl.handle.net/11858/ 00-097C-0000-0015-A780-9, LINDAT/CLARIN dig. library, Charles University 2. Huck, M., Riess, S., Fraser, A.: Target-side word segmentation strategies for neural machine translation. In: WMT. pp. 56–67. ACL (2017) 3. Koehn, P.: Europarl: A Parallel Corpus for Statistical Machine Translation. In: MT Summit. pp. 79–86. AAMT, AAMT, Phuket, Thailand (2005) 4. Koehn, P., et al.: Moses: Open source toolkit for statistical machine translation. In: ACL Poster and Demonstration Sessions. pp. 177–180 (2007) 5. Pinnis, M., Krislauks, R., Deksne, D., Miks, T.: Neural Machine Translation for Morphologically Rich Languages with Improved Sub-word Units and Synthetic Data, pp. 237–245. Springer International Publishing, Cham (2017) 6. Sennrich, R., Haddow, B., Birch, A.: Neural machine translation of rare words with subword units. In: ACL. pp. 1715–1725 (2016) 7. Slav´ıckov´a, E.: Retrogr´adn´ı morfematick´y slovn´ık cestiny. Academia (1975) 8. Tiedemann, J.: News from OPUS - A collection of multilingual parallel corpora with tools and interfaces. In: RANLP, vol. V, pp. 237–248 (2009) 9. Virpioja, S., Smit, P., Gronroos, S.A., Kurimo, M.: Morfessor 2.0: Python imple- mentation and extensions for Morfessor baseline. Tech. rep. (2013), Aalto Univer- sity publication series SCIENCE + TECHNOLOGY; 25/2013 10. Wu, Y., et al.: Google's neural machine translation system: Bridging the gap be- tween human and machine translation. CoRR abs/1609.08144 (2016) 11. Zabokrtsk´y, Z., Sevc´ıkov´a, M., Straka, M., Vidra, J., Limbursk´a, A.: Merging data resources for inflectional and derivational morphology in Czech. In: LREC (2016)
1909.09031
1
1909
2019-09-19T15:01:46
Argumentative Relation Classification as Plausibility Ranking
[ "cs.CL" ]
We formulate argumentative relation classification (support vs. attack) as a text-plausibility ranking task. To this aim, we propose a simple reconstruction trick which enables us to build minimal pairs of plausible and implausible texts by simulating natural contexts in which two argumentative units are likely or unlikely to appear. We show that this method is competitive with previous work albeit it is considerably simpler. In a recently introduced content-based version of the task, where contextual discourse clues are hidden, the approach offers a performance increase of more than 10% macro F1. With respect to the scarce attack-class, the method achieves a large increase in precision while the incurred loss in recall is small or even nonexistent.
cs.CL
cs
Argumentative Relation Classification as Plausibility Ranking Leibniz ScienceCampus "Empirical Linguistics and Computational Language Modeling" Department for Computational Linguistics Juri Opitz Heidelberg University 69120 Heidelberg [email protected] 9 1 0 2 p e S 9 1 ] L C . s c [ 1 v 1 3 0 9 0 . 9 0 9 1 : v i X r a Abstract We formulate argumentative relation clas- sification (support vs. attack) as a text- plausibility ranking task. To this aim, we propose a simple reconstruction trick which enables us to build minimal pairs of plausible and implausible texts by simulat- ing natural contexts in which two argumen- tative units are likely or unlikely to appear. We show that this method is competitive with previous work albeit it is considerably simpler. In a recently introduced content- based version of the task, where contextual discourse clues are hidden, the approach offers a performance increase of more than 10% macro F1. With respect to the scarce attack-class, the method achieves a large in- crease in precision while the incurred loss in recall is small or even nonexistent. Introduction 1 Argumentative relation classification (ARC) is ded- icated to determining the class of the relation which may hold between two arguments or elementary argumentative units, EAUs1. For instance, consider the following premises given the topic or conclu- sion (0) "Overall, marijuana is detrimental to your health.": (1) Use of marijuana causes chronic bronchitis and airflow obstruction. (2) Cannabis does not need to be smoked to receive its potential health benefits. In this case, (1) has a positive stance towards the conclusion (0); in contrast to (2), which has a negative stance towards the conclusion. Addition- ally, but not less importantly, we can say that (2) 1Here, we use the term elementary argumentative units to denote clauses or small clause-complexes -- e.g., (0), (1) or (2)) -- which can be 'instantiated' in an argumentative debate. Figure 1: A small argumentation graph contain- ing two general types of relations: premise-topic relations (class: negative/positive) and premise- premise relations (class: supports/attacks). weakens (1) -- it casts doubt about its generality by hinting at cannabis application methods which do not involve combustion or inhalation. In this work, we summarize all relations which aim at under- mining or weakening another argument or premise ('undercut', 'rebuttal', etc.) as attack.2 The EAUs from our example and their connecting relations are outlined in the graph in Figure 1. In a rhetorically structured argumentative text3, (1) and (2) may appear in configurations such as On the one hand (1), on the other (2); (1), however, (2), etc. Under these circumstances, discourse con- text can predict argumentative relations very well. However, when moving from such 'closed scenario' to a more 'open-world setting', e.g., where EAUs have been mined from heterogeneous documents, we need to determine relations based on their con- tent. In this paper, we show that our method works well in both scenarios. In fact, it is in the more general and more difficult content-based setting, where our method provides the most benefits over previous work. Systems which have learned to predict general argumentative relations have a decisive advantage when compared to systems that have 'only' learned to predict argumentative stances: in an argumenta- 2For a more 'in-depth' view and discussion of argumen- tative relations we refer the reader to, e.g., Pollock (1995), Walton (2009) and Besnard and Hunter (2014). 3E.g., an argumentative essay. 021positiveattacksnegative tive debate, often a debater does not choose to bring forth any argument which supports their stance on the topic. Instead, or additionally, they may choose to select an argument which also attacks the oppo- nent's most recent argument. Therefore, we need not only knowledge about the stances of arguments towards topics, but also about relations to other ar- guments. Our experiments show that our approach is a step towards this goal. The remainder of this paper is structured as fol- lows: After discussing related work in Section 2, we propose a simple reconstruction trick which al- lows us to embed an argumentative source-target pair in a relational discourse context yielding a plausible and implausible text variant (Section 3). In Section 4, we conduct experiments and abla- tion studies using (i) a standard task setup, where systems are allowed to see EAUs in their docu- ment context and (ii) a more difficult 'content- focused' task setup where systems are only allowed to see the spans of the EAU clauses. The code for this paper is available at https://gitlab.cl. uni-heidelberg.de/opitz/pr4arc 2 Related work In this section, we first provide an overview of the data, and the data issues people are confronted with when developing argumentative relation classifica- tion (ARC) systems. We proceed with an overview of existing ARC approaches and conclude by touch- ing on other related tasks. Argumentative relation data For general argu- mentative relations, not many data sets have been developed. One of the largest data sets consists of 402 argumentative student essays and is henceforth denoted by ESSAY (Stab and Gurevych, 2014; Stab and Gurevych, 2017). It has been annotated, i.a., with EAU clauses and more than 3,000 relations which hold among them. By ESSAY-CONTENT, we denote a version of ESSAY from which dis- course context is stripped and systems can only access the spans of EAU clauses (Opitz and Frank, 2019b). This setup is more difficult since systems have to learn to model the content of two EAUs in order to successfully predict their relation. ESSAY and ESSAY-CONTENT will be more extensively de- scribed in Section 4.1, where we also show that our method is efficient across both setups. Another data set which is annotated with in- depth argumentative annotations is the Microtext corpus covering a variety of political debates in Germany (Peldszus and Stede, 2016). While it has been annotated with a more fine-grained set of re- lations (e.g., rebutting attack, undercutting attack, linked support, example support) it is rather small in size (the recently extended version (Skeppstedt et al., 2018) contains about 700 relation tuples). Similar to ESSAY-CONTENT, a variant of the Mi- crotext corpus exists where argumentative units are detached from discourse context (Wachsmuth et al., 2018). We believe that systems that have learned to predict argumentative relations based on the content of argumentative units have advantages over systems which focus too much on contextual discourse clues. For example, content-focused sys- tems can better be expected to solve large-scale cross-document tasks where EAUs are mined from many heterogeneous documents. Our reconstruc- tion trick provides one step towards this goal: it exploits potential discourse configurations without depending on seeing the true discourse context. A key reason for the data scarcity of annotated general argumentative relations is that creating high-quality data for 'premise-premise' relations is a challenging task. Perhaps, it is more challenging than creating data for argumentative stance detec- tion since topics or conclusions are often 'a-priori' well understood (e.g., Cannabis should be legal- ized) and always occur as the stance-relation target. In that sense, it may be easier and quicker to tell if an argument supports a conclusion compared to deciding whether an argument supports another argument. ARC systems A linear SVM classifier that is trained on a diverse set of features provides compet- itive performance on ESSAY (Stab and Gurevych, 2017). A subsequent joint global graph optimiza- tion step, similarly to (Peldszus and Stede, 2015; Hou and Jochim, 2017), yields no further improve- ment for classifying the relations in this data. The SVM classifier incorporates features extracted from the EAU spans as well as their context (e.g., leading or trailing words). On ESSAY-CONTENT, where systems only see the EAU clause spans, the perfor- mance of the SVM suffers a loss of more than 10 pp. macro F1 (Opitz and Frank, 2019b) -- an analysis indicates that the SVM focuses immoderately on features extracted from the EAU context and tends to neglect their actual content. This underpins the need for argumentative relation classification sys- tems with deeper understanding of argumentation, i.e., systems that base their prediction on the actual content of two EAUs -- the method we present in this paper aims at this. The first neural approach for ARC (Cocarascu and Toni, 2017) proposes a neural network with a Siamese structure (Koch et al., 2015; Mueller and Thyagarajan, 2016; Cocarascu and Toni, 2017). By means of a shared weight space it projects source and target EAU to a joint distributional vec- tor space. Finally, it classifies the vector offset using a softmax-function. The authors conduct ex- periments on a data set which comprises texts about movies, technology and politics. A similar model has been adopted recently where (symbolic) knowledge from large back- ground knowledge-graphs is injected into the Siamese model by concatenating highly abstracted multi-hop knowledge paths to the source-target off- set (Kobbe et al., 2019). Although there are con- sistent gains observed by including the knowledge, the gains appear to be relatively small. In this as- pect, we believe that incorporating knowledge of the right form could make it possible to further enhance the system we propose in this paper. How- ever, as of now, it is an active topic of discussion whether (symbolic) background knowledge may help in automatic argumentation and, even more so, which (form of) knowledge would be needed. Computational argument mining and analysis Argumentation is ubiquitous and argumentative structures can be recovered from a broad spectrum of texts. For example, they can be recovered from online dialogue (Swanson et al., 2015; Budzyn- ska et al., 2014) and scientific research articles (Lauscher et al., 2018a; Lauscher et al., 2018b), where, e.g., researchers may directly or indirectly convey arguments for why some method is better than another. By now, there exists a substantial body of research publications covering a variety of argument analysis topics. For a general overview, we refer the reader to Lippi and Torroni (2016) and Peldszus and Stede (2013). Plausibility ranking Another task that can be addressed as a text plausibility ranking task is the resolution of difficult pronouns in the Winograd Schema Challenge (Levesque et al., 2012; Opitz and Frank, 2018). To resolve shell nouns and ab- stract anaphora (e.g., 'I like that'.) Marasovi´c et al. (2017) utilize syntactic patterns to gather plausible candidate resolutions from a background corpus in order to extend the scarce training data. 3 Context reconstruction and model In this section, we first propose a simple reconstruc- tion trick which allows us to build minimal pairs of plausible and implausible argumentative texts. Then, we describe a Siamese neural sequence rank- ing model which addresses the task of ranking texts according to their plausibility. Constructing plausible and implausible argu- mentative discourse contexts Consider two EAU clauses a2 (source) and a1 (target) where we need to decide whether a2 supports a1 or a2 attacks a1. In the absence of contextual discourse clues4, a system must learn to predict this relation by con- sidering the semantic content of a1 and a2. We approach this task by offering two alternative con- text reconstructions and asking our model in what context a1 and a2 are more likely to appear. More precisely, our reconstruction trick is as follows: (a) a1. Additionally, a2 . (b) a1. Admittedly, a2. where (a) signals that two argumentative units likely stand in a support-relation and (b) sig- nals the opposite ('attack'). In our experiments (Section 4), we also examine other possible dis- course connectors for our reconstruction (e.g., moreover/however). From here, we ask our model which of the two reconstructions leads to a more plausible 'reading': (a) or (b)? E.g., consider the cannabis-example from Section 1; applying our re- construction trick yields the following implausible- plausible minimal pair (r−,r+): (3a) [r− Use of marijuana causes chronic bron- chitis and airflow obstruction. Additionally, cannabis does not need to be smoked to re- ceive its potential health benefits.] (3b) [r+ Use of marijuana causes chronic bron- chitis and airflow obstruction. Admittedly, cannabis does not need to be smoked to re- ceive its potential health benefits.] Clearly, (3b) constitutes a more plausible recon- struction compared with (3a). Exactly this is what we desire our model to learn: assessing the fine- grained differences between two texts which differ 4To name just one situation: consider a cross-document relation classification setup where a1 stems from a different document than a2. Any specific textual discourse context would not only be more or less unimportant, but also bears the potential to confuse the system. of a text sequence made up of words w1, ...wn. In our case, this function is instantiated with (i) a Siamese reading encoder (Reading Encoder, Figure 2) and a Siamese plausibility prediction layer for producing a plausibility score for any given text (Plausibility Prediction, Figure 2). Now, we will describe these two components more closely. Reading encoder First, we use a contextual lan- guage model5 to infer a sequence of word em- beddings: e1, ...,en, which correspond to words w1, ...wn. Here, we hope that already the contex- tual language model provides statistical informa- tion indicating whether a specific word sequence may be considered as rather plausible or rather implausible ('inductive bias'). The sequence of word embeddings e1, ...,en is further multiplied by a sequence of positive indicator coefficient embed- dings: e1 · c1, ...,en · cn.6 This allows the model to learn to better distinguish between the source, target and the connector text (we learn three cor- responding indicator embeddings). The resulting sequence is further processed by (ii) a Bi-LSTM (Hochreiter and Schmidhuber, 1997) to construct hidden states H = h1, ...,hn (we concatenate hid- den states of forward and backward read) and (iii) a four-headed scaled dot-product self-attention mech- anism (Vaswani et al., 2017), where in our case we use H = Q = K = V : Heads(Q,K,V ) = [head1; ...,head4]W O i ,KW K headi = Attention(QW Q QKT√ dk Attention(Q,K,V ) = so f tmax( )V, i ,VWV i ) where W (·) (·) are parameters of the model. Finally, we compute a weighted average of the final se- quence of hidden states to construct a vectorized reading representation v (Felbo et al., 2017): et = Heads(·)tW A at = exp(et) ∑T i=1 exp(ei) v = T ∑ i=1 aiHeads(·)i, where Heads(·)t is the vector corresponding to time step t computed by the previous scaled dot- 5We use BERT (Devlin et al., 2019) to infer the contextual embeddings. In our ablation experiments, we also present results based on ELMo embeddings (Peters et al., 2018) 6Similar to Opitz and Frank (2019a). Figure 2: Siamese model outline. Two competing reading-reconstructions are fed through a Siamese encoder (Reading Encoder). The vectors are then mapped by means of a (Siamese) linear combina- tion and a selu-activation onto two corresponding plausibility scores (Plausibility Prediction). By reducing the ranking loss, we force the model to assign higher scores to more plausible readings. in only one phrase. This phrase, however, deter- mines whether the text in its entirety is implausible or plausible. 3.1 Loss and model Ranking loss We argue that a ranking approach (which reading is more plausible?) is more suit- able for addressing our problem compared with a classification approach (plausible vs. implausi- ble). The reason is that ranking allows for a more relaxed and graded notion of textual plausibility: we want the model to prefer one variant and not to choose one variant. This is accomplished by reducing the margin ranking loss on the training data {(r+ i ,r− i=1: i )}n (cid:20) 1− scoreθ (r+ Lθ = 1 n n ∑ i=1 (cid:21) i ) + scoreθ (r− i ) , (1) where score(·) is a plausibility prediction model parameterized by θ. The plausibility-prediction model which we use is described in detail in the following paragraphs. Since Lθ is differentiable with respect to the model's parameters θ, we can learn them with gradient descent. Model overview We desire the score(·) function to return a number p ∈ R reflecting the plausibility Reading Encoder Use of marijuana causes chronic bronchitis (...). Additionally, cannabis does not need to be smoked (...).Use of marijuana causes chronic bronchitis (...). Admittedly, cannabis does not need to be smoked (...).Plausibility Prediction scorescorerank loss abbreviation A/A A/D M/H Y/N 'attack' 'support' Additionally, Admittedly, I disagree, I agree, However, Moreover, Yes, No, Table 1: Argumentative discourse connector sen- tence adverbials and the argumentative relation class which they are likely to signal. product attention step and v is a final vectorized representation of the input reading. Plausibility prediction At plausibility predic- tion time, the vector representation v, which we obtained by the previous step, is mapped to a sin- gle score by means of a linear combination with a weight vector. Lastly, a selu-function (Klambauer et al., 2017) produces the desired plausibility-score: p = selu(vT w). (2) This score, computed once for each of the two competing reconstructions, allows a comparison with respect to their (predicted) plausibility. For our ARC experiments, where we desire a final clas- sification, we predict the argumentative relation class by inspecting the discourse connector of the reconstruction which obtains a higher plausibility score. E.g., if score(EAU1,additionally,EAU2) ≥ score(EAU1,admittedly,EAU2) we predict the ar- gumentative 'support' relation -- otherwise we pre- dict the 'attack' relation. 4 Experiments We begin this section by describing the experimen- tal setup used to evaluate our neural plausibility ranker. Next, we present our main results and fi- nally perform several analyses and study the effects of ablating model components. 4.1 Setup Discourse links To construct plausible and im- plausible texts, we experiment with eight different discourse connectors which have the potential to 'signal' argumentative relation types. They make up, in total, four minimal pairs (Table 1). Data We use the student essay corpus v02 (Stab and Gurevych, 2017) in two versions: ESSAY and ESSAY-CONTENT. What is common to both is that they contain data from the same 402 argumenta- tive essays written by students about a variety of topics. The essays have been annotated with, i.a. spans of argumentative units and their relations with each other (support vs. attack). Since only the argumentative clauses have been annotated, we can clean EAUs from their discourse context, which yields ESSAY-CONTENT. For example, consider EAU1. To add on this, EAU2. While in ESSAY, a system is allowed to see EAU-surrounding tokens (to add on this), in ESSAY-CONTENT, systems are allowed to see only the spans of the EAUs to pre- dict their relation (i.e., EAU1,EAU2). In the easy case, to add on this may be enough to predict a support relation with high confidence and accu- racy without even seeing the content of the EAUs -- in the hard case, however, a system must learn to assess the actual content of the premises. In ESSAY-CONTENT, the performance of the feature- based SVM described by Stab and Gurevych (2017) drops by more than 23% macro F1 compared to the standard setup (ESSAY) where shallow discourse context is accessible (Opitz and Frank, 2019b). Baselines We display the results of a competitive feature based SVM. It requires, i.a., syntactic pars- ing, constituency-tree sentiment annotation (Socher et al., 2013) and discourse parsing (Lin et al., 2014) as pre-processing steps (Stab and Gurevych, 2017; Opitz and Frank, 2019b). In contrast, our method does not depend on any pre-processing. Model instantiation For each possible minimal pair, we instantiate a different model based on the pre-trained BERT model (the BERT model remains fixed during optimization). More specifically, we infer the word embeddings and average over the last four layers to produce a sequence of vectors with 1024 dimensions. Forward and backward LSTM have 256 neurons each. For development purposes we split off 1149 examples from the training data. The rank loss (Eq. 1) is minimized by performing stochastic gradient descent with Adam (Kingma and Ba, 2014)7. After each epoch, the model is evaluated on the development data. Finally, we se- lect the parameters from the epoch with maximum F1 score on the development data. each model is denoted ArgRankerdcs where dcs indicates which pair of discourse connectors was used for reconstruc- In our tables, 7The learning rate is set to 0.001, the mini-batch size to 64 and the maximum number of epochs to 25. System majority baseline SVM with features ArgRankerA/A ArgRankerA/D ArgRankerM/H ArgRankerY /N ArgRankervote ESSAY 47.8 68.0 67.2±1.0 69.2±2.4 68.8±1.7 67.3±0.8 70.9±0.7 ESSAY-CONTENT 47.8 57.3 58.6±1.4 59.2±0.7 63.8±2.1 58.3±1.8 60.7±1.7 Table 2: Macro F1 results. underlined: best re- sult; bold: improves against SVM withstanding standard deviation. tion. ArgRankervote denotes a model where we aggregate the predictions over the four different minimal-pair single models ('ensemble model'). All results are averaged over five runs. 4.2 Results Macro F1 results Table 2 lists the macro F1 re- sults8 of our experiments. On ESSAY, our method is competitive with the SVM that relies on extensive pre-processing. On ESSAY-CONTENT, where models are forced to learn to assess the content of EAUs, our method outperforms the feature-based SVM across all con- figurations. The best performance on this data is provided by ArgRankerM/H, which is trained on Moreover-However reconstructions (+6.5 pp. macro F1, relative improvement: 11%). Our ensem- ble model ArgRankervote, which aggregates the pre- dictions of the individual ArgRankers in a simple vote, achieves an improvement of +3.4 pp. macro F1 (relative improvement: 6%). More detailed results Table 3 indicates that our method offers other advantages besides raw macro F1 gains. The very rare attack-class is detected with a much greater precision compared with the SVM. The difference can range from an improve- ment of 5.6 pp. (ArgRankerY /N, relative improve- ment: 28%) up to a maximum improvement of 31.4 pp. (ArgRankervote, relative improvement: 157%). With such a large increase in precision, one might expect a drop in recall -- however, this is only the case to a very small extent. The greatest drop in recall is incurred by ArgRankervote (-5.2 pp.) and thus can be said to lie in the shadow of its precision gains (+31.4 pp.). Moreover, when 8Macro F1 in our case is defined as the unweighted mean over the F1 scores for our two classes. System majority SVM with features ArgRankerA/A ArgRankerA/D ArgRankerM/H ArgRankerY /N ArgRankervote Attack Precision Recall 0.00 20.0 31.0±5.9 28.0±4.4 39.9±9.4 25.6±5.8 51.4±7.3 0.00 22.9 18.2±2.1 22.8±3.2 30.0±6.8 23.7±5.1 17.7±3.4 Support Precision Recall 100.0 8.0 91.8 93.0 96.2±1.1 92.9±0.1 93.1±0.2 94.5±1.6 93.8±0.6 95.5±2.4 93.0±3.3 93.1±0.3 93.0±0.2 98.4±0.7 Table 3: Precision and recall scores for each class on ESSAY-CONTENT. underlined: best result; bold: improves against SVM withstanding stan- dard deviation. Figure 3: Scores for different models using BERT embeddings and SVM (left column) on ESSAY-CONTENT. Reconstruction with More- over/however offers the largest improvement. Non- linguistically motivated connectors result in re- duced performance ('+'/'-': no-disc, right column). we use the discourse connector minimal pairs A/D and M/H, our model outperforms the SVM in the attack-class both in precision and recall. Most no- tably, when we instantiate our reconstructions with Moreover/However, we see a large gain in preci- sion (+19.9 pp., relative improvement: 99.5%) but also an observable gain in recall (+7.1 pp., relative improvement: 31.0%). With regard to the majority class (support), we make two observations: (i) precision-wise, all of our models outperform or are on par with the SVM; (ii) recall-wise, all of our models outperform the SVM. The greatest gain in recall for support is achieved by ArgRankervote (+6.6 pp.). 4.3 Ablation experiments and analysis Linguistically motivated discourse reconstruc- tion What is the outcome of instantiating the dis- SVMA/AA/DM/HY/Nvoterno-discmodel5052545658606264macro F1 System majority SVM (Stab and Gurevych, 2017; Opitz and Frank, 2019b) ArgRankerA/A ArgRankerA/D ArgRankerM/H ArgRankerY /N ArgRankervote ArgRanker−discourse basic 47.8 57.3 58.6±1.4 59.2±0.7 63.8±2.1 58.3±1.8 60.7±1.7 57.3±0.4 model configuration ELMo - - 55.7±1.6 60.2±2.2 59.4±2.5 57.6±1.7 59.5±1.9 63.6±1.3 -coeff. - - 57.4±2.1 59.6±2.1 61.1±1.0 57.7±1.2 60.2±2.2 57.3±2.8 -att. - - 58.3±1.2 56.2±1.9 60.7±1.9 58.2±3.0 56.2 54.5 Table 4: Ablation experiments: Macro F1 results on ESSAY-CONTENT. ArgRanker−discourse: a system where we replace the natural discourse connectors with 'linguistically meaningless' placeholders (i.e., support: '+', attack: '-' instead of, e.g., support: 'Moreover', attack: 'However'). ELMo: we use ELMo instead of BERT; -coeff.: we abstain from learning source-target specific coefficients; -att.: we ablate the self-attention and use the last states of the Bi-LSTM (concatenation of each read) for prediction. course reconstructions with 'meaningless' connec- tors? I.e., instead of instantiating the attack/support context with linguistically motivated connectors, such as, e.g., I agree/I disagree, we instantiate the contexts with the meaningless tokens '+' and '-'. On one hand, this means that the new discourse configuration is still discriminative (either support- ing or attacking). On the other hand, however, the discriminating reconstruction is not any more lin- guistically motivated. Thus, we hypothesize that the linguistically motivated reconstructions better 'trigger' the contextual BERT model into giving a useful inductive bias about whether a certain read- ing is plausible or not. From Table 4 and Figure 3, we see that, indeed, our model functions better when provided with lin- guistically motivated reconstructions instead of the non-linguistically motivated reconstruction (Figure 3: columns A/A, A/D, M/H, Y/N vs. bottom row in Table 4 and right column in Figure 3). This holds true across all model configurations and all linguistically motivated discourse connector pairs.9 the More- over/However reconstruction appears to offer the most useful inductive bias (middle column, Fig- ure 3). Our ArgRanker based on this reconstruction outperforms all other configurations by more than 4 pp. macro F1 (compared with Agree/Disagree) and more than 6 pp. macro F1 compared with the More specifically, we find that 9An exception constitutes the model based on ELMo em- beddings, which appears to work better when provided with the non-linguistically motivated connector pair. non-linguistically motivated reconstruction. One reason could be located in the fact that BERT was trained, i.a., on the Wikipedia corpus: we com- pute a simple word frequency statistic over this corpus and see that the terms Moreover and How- ever appear more frequently in this corpus (e.g., however: appr. 29,900,000 occurrences) than, e.g., Admittedly (appr. 17,000 occurrences). Also, by manually inspecting a small amount of occurrences in Wikipedia, we find that moreover and however tend to occur in more 'argumentative' contexts, or, at least, connect two discourse units in a contrasting (however) or supporting (moreover) way. On the other hand, e.g., I agree tends to occur in less argu- mentative contexts, such as in I agree to the terms of service. We believe that contextual language models trained on interactive discourse texts (e.g., online discussion platforms) instead of encyclope- dic texts would greatly help to provide our model with better embeddings in the situations where we want to compose plausible and implausible texts by means of more 'interactive' connectors (I agree/I disagree; Yes/No; etc.). BERT vs. ELMo In our first experiment, we re- place the BERT embeddings with ELMo embed- dings -- we want to 'probe' which of the two em- bedding generators is better suited to rank argu- mentative texts according to their plausibility. First, we see that ELMo embeddings provide better per- formance than the feature based baseline, with one exception: ArgRankerA/A, where we reconstruct contexts by inserting Additionally and Admittedly (a) Target vs. source coefficients (b) Connector vs. source coefficients (c) Connector vs. target coefficients Figure 4: Investigation of the three contextual coefficient-embeddings which our model has learned. The coefficients are initialized with ones and assume, during training, a Gaussian-like distribution. By all appearances, the model uses some coefficients to 'deflate' the impact of an embedding dimension in, e.g., the text corresponding to the source EAU, while 'inflating' the impact of an embedding dimension in, e.g., the text corresponding to the target EAU (Figure 4a, regions on the upper left). (Table 4, ELMo). Second, the ELMo embeddings in most cases fall short in comparison to BERT embeddings -- again, however, with one exception: ArgRanker−discourse, which does not use the linguis- tically motivated reconstruction. Indicator embedding coefficients Now, we want to investigate if learning coefficients to better distinguish between source and target has helped our model. Recall, that the three coefficient indica- tor embeddings correspond to source/target EAU span and the discourse connector span and allow the model to highlight certain word embedding in- dices differently with respect to these three spans. For most connector pairs, learning the coefficients helps and their ablation leads to a performance drop (Table 4, -coeff; e.g. ArgRankerM/H: -2.7 pp. macro F1). Finally, we plot the learnt coefficients of the three different indicator embeddings against each other to analyze their appearance after training. Fig- ure 4 displays all values from all discourse connec- tor parameterizations ·/· of ArgRanker·/·. More specifically, we are interested in the following ques- tion: Have we learned that certain contextual word embedding indices are important to inflate (deflate) with respect to the source or the target? From in- specting Figure 4, we see that this appears to be the case. For example, there is a set of embedding indices where coefficients are used to magnify the corresponding values in the target EAU and deflate them in the source EAU (Figure 4a, top left re- gion) -- while for another set of embedding indices the opposite is true (Figure 4a, bottom right). Fur- thermore, the learnt coefficients have assumed a normal-like distribution after training (distribution plots on the sides of Figures 4a, 4b, 4c). Self-attention Finally, we want to investigate the effect of ablating the self-attention mechanisms from our model. More precisely, we predict the plausibility scores based on a concatenation of the last state of forward and backward read of the Bi- LSTM. Throughout all different discourse recon- struction strategies, we see drops in performance (Table 4, -att). However, while we see observ- able drops in some cases (ArgRankervote: -4.5 pp. macro F1), they are comparatively small in other cases (ArgRankerY /N: -0.1 pp.). 5 Conclusion We have treated argumentative relation classifica- tion in a new light, as a task where we learn to rank candidate texts according to their plausibility. To this aim, we have proposed a simple reconstruction trick which allows us to embed source and target argumentative units into plausible and implausible argumentative discourse contexts. In order to learn to rank such texts according to their plausibility, we have adapted a neural Siamese ranking model. Our experiments on an established data set have shown that the approach is competitive with previ- ous work albeit it does not require pre-processing. In the 'content-based' setting -- which is more diffi- cult because models cannot base their decisions on shallow clues in the discourse context -- the method 0.850.900.951.001.051.101.151.20src-embed-dim coef.0.850.900.951.001.051.101.15tgt-embed-dim coef.0.850.900.951.001.051.101.151.20src-embed-dim coef.0.800.850.900.951.001.051.101.151.20con-embed-dim coef.0.850.900.951.001.051.101.15tgt-embed-dim coef.0.800.850.900.951.001.051.101.151.20con-embed-dim coef. outperforms previous work by a considerable mar- gin. In particular with respect to the scarce class attack we observed substantial improvements in precision. Acknowledgments We are grateful to Anette Frank for valuable discus- sions and feedback on an earlier draft of this paper. This work has been supported by the Leibniz Sci- enceCampus "Empirical Linguistics and Computa- tional Language Modeling", supported by the Leib- niz Association grant no. SAS-2015-IDS-LWC and by the Ministry of Science, Research, and Art of Baden-Wurttemberg. References Philippe Besnard and Anthony Hunter. 2014. Con- structing argument graphs with deductive arguments: a tutorial. Argument & Computation, 5(1):5 -- 30. Katarzyna Budzynska, Mathilde Janier, Juyeon Kang, Chris Reed, Patrick Saint-Dizier, Manfred Stede, and Olena Yaskorska. 2014. Towards argument min- ing from dialogue. In COMMA, pages 185 -- 196. Oana Cocarascu and Francesca Toni. 2017. Identi- fying attack and support argumentative relations us- ing deep learning. In Proceedings of the 2017 Con- ference on Empirical Methods in Natural Language Processing, pages 1374 -- 1379. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language under- standing. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Tech- nologies, Volume 1 (Long and Short Papers), pages 4171 -- 4186, Minneapolis, Minnesota, June. Associa- tion for Computational Linguistics. Bjarke Felbo, Alan Mislove, Anders Søgaard, Iyad Rahwan, and Sune Lehmann. 2017. Using millions of emoji occurrences to learn any-domain represen- tations for detecting sentiment, emotion and sarcasm. In Proceedings of the 2017 Conference on Empiri- cal Methods in Natural Language Processing, pages 1615 -- 1625, Copenhagen, Denmark, September. As- sociation for Computational Linguistics. Sepp Hochreiter and Jurgen Schmidhuber. 1997. Neural computation, Long short-term memory. 9(8):1735 -- 1780. Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. Gunter Klambauer, Thomas Unterthiner, Andreas Mayr, and Sepp Hochreiter. 2017. Self-normalizing neural networks. CoRR, abs/1706.02515. Jonathan Kobbe, Juri Opitz, Maria Becker, Ioana Hulpus, Heiner Stuckenschmidt, and Anette Frank. 2019. Exploiting Background Knowledge for Ar- gumentative Relation Classification. In Maria Eske- vich, Gerard de Melo, Christian Fath, John P. Mc- Crae, Paul Buitelaar, Christian Chiarcos, Bettina Klimek, and Milan Dojchinovski, editors, 2nd Con- ference on Language, Data and Knowledge (LDK 2019), volume 70 of OpenAccess Series in Informat- ics (OASIcs), pages 8:1 -- 8:14, Dagstuhl, Germany. Schloss Dagstuhl -- Leibniz-Zentrum fuer Informatik. Gregory Koch, Richard Zemel, and Ruslan Salakhutdi- nov. 2015. Siamese neural networks for one-shot In ICML deep learning work- image recognition. shop, volume 2. Anne Lauscher, Goran Glavas, and Kai Eckert. 2018a. Arguminsci: A tool for analyzing argumentation and rhetorical aspects in scientific writing. In Proceed- ings of the 5th Workshop on Argument Mining, pages 22 -- 28. Anne Lauscher, Goran Glavas, and Simone Paolo Ponzetto. 2018b. An argument-annotated corpus of scientific publications. In Proceedings of the 5th Workshop on Argument Mining, pages 40 -- 46, Brus- sels, Belgium, November. Association for Computa- tional Linguistics. Hector J. Levesque, Ernest Davis, and Leora Mor- genstern. 2012. The winograd schema challenge. In Proceedings of the Thirteenth International Con- ference on Principles of Knowledge Representa- tion and Reasoning, KR'12, pages 552 -- 561. AAAI Press. Ziheng Lin, Hwee Tou Ng, and Min-Yen Kan. 2014. A pdtb-styled end-to-end discourse parser. Natural Language Engineering, 20(2):151 -- 184. Marco Lippi and Paolo Torroni. 2016. Argumenta- tion mining: State of the art and emerging trends. ACM Transactions on Internet Technology (TOIT), 16(2):10. Ana Marasovi´c, Leo Born, Juri Opitz, and Anette 2017. A mention-ranking model for ab- Frank. In Proceedings of the stract anaphora resolution. 2017 Conference on Empirical Methods in Natu- ral Language Processing, pages 221 -- 232, Copen- hagen, Denmark, September. Association for Com- putational Linguistics. Yufang Hou and Charles Jochim. 2017. Argument re- lation classification using a joint inference model. In Proceedings of the 4th Workshop on Argument Min- ing, pages 60 -- 66. Jonas Mueller and Aditya Thyagarajan. 2016. Siamese recurrent architectures for learning sentence similar- ity. In Thirtieth AAAI Conference on Artificial Intel- ligence. Empirical Methods in Natural Language Processing, pages 1631 -- 1642, Seattle, Washington, USA, Octo- ber. Association for Computational Linguistics. Christian Stab and Iryna Gurevych. 2014. Identify- ing argumentative discourse structures in persuasive essays. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 46 -- 56. Christian Stab and Iryna Gurevych. 2017. Parsing ar- gumentation structures in persuasive essays. Com- putational Linguistics, 43(3):619 -- 659. Reid Swanson, Brian Ecker, and Marilyn Walker. 2015. Argument mining: Extracting arguments from on- In Proceedings of the 16th annual line dialogue. meeting of the special interest group on discourse and dialogue, pages 217 -- 226. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Gar- nett, editors, Advances in Neural Information Pro- cessing Systems 30, pages 5998 -- 6008. Curran Asso- ciates, Inc. Henning Wachsmuth, Manfred Stede, Roxanne El Baff, Khalid Al-Khatib, Maria Skeppstedt, and Benno Stein. 2018. Argumentation synthesis following rhetorical strategies. In Proceedings of the 27th In- ternational Conference on Computational Linguis- tics, pages 3753 -- 3765, Santa Fe, New Mexico, USA, August. Association for Computational Linguistics. Douglas Walton. 2009. Objections, rebuttals and refu- tations. In Argument Cultures: Proceedings of the 8th OSSA Conference, pages 1 -- 10, Windsor, On- tario. Juri Opitz and Anette Frank. 2018. Addressing the Winograd schema challenge as a sequence ranking task. In Proceedings of the First International Work- shop on Language Cognition and Computational Models, pages 41 -- 52, Santa Fe, New Mexico, USA, August. Association for Computational Linguistics. Juri Opitz and Anette Frank. 2019a. An argument- marker model for syntax-agnostic proto-role label- ing. In Proceedings of the Eighth Joint Conference on Lexical and Computational Semantics (*SEM 2019), pages 224 -- 234, Minneapolis, Minnesota, June. Association for Computational Linguistics. Juri Opitz and Anette Frank. 2019b. Dissecting con- tent and context in argumentative relation analysis. In Proceedings of the 6th Workshop on Argument Mining, pages 25 -- 34, Florence, Italy, August. As- sociation for Computational Linguistics. Andreas Peldszus and Manfred Stede. 2013. From ar- gument diagrams to argumentation mining in texts: A survey. International Journal of Cognitive Infor- matics and Natural Intelligence (IJCINI), 7(1):1 -- 31. Andreas Peldszus and Manfred Stede. 2015. Joint pre- diction in mst-style discourse parsing for argumenta- tion mining. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Process- ing, pages 938 -- 948. Andreas Peldszus and Manfred Stede. 2016. An anno- tated corpus of argumentative microtexts. In D. Mo- hammed and M. Lewinski, editors, Argumentation and Reasoned Action - Proc. of the 1st European Conference on Argumentation, Lisbon, 2015. Col- lege Publications, London. Matthew Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word rep- resentations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 2227 -- 2237, New Orleans, Louisiana, June. Association for Computational Linguistics. John L. Pollock. 1995. Cognitive Carpentry: A Blueprint for How to Build a Person. MIT Press, Cambridge, MA, USA. Maria Skeppstedt, Andreas Peldszus, and Manfred Stede. 2018. More or less controlled elicitation of argumentative text: Enlarging a microtext corpus via crowdsourcing. In Proceedings of the 5th Work- shop on Argument Mining, pages 155 -- 163, Brussels, Belgium, November. Association for Computational Linguistics. Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment tree- In Proceedings of the 2013 Conference on bank.
1807.10948
1
1807
2018-07-28T15:04:53
Articulatory Features for ASR of Pathological Speech
[ "cs.CL" ]
In this work, we investigate the joint use of articulatory and acoustic features for automatic speech recognition (ASR) of pathological speech. Despite long-lasting efforts to build speaker- and text-independent ASR systems for people with dysarthria, the performance of state-of-the-art systems is still considerably lower on this type of speech than on normal speech. The most prominent reason for the inferior performance is the high variability in pathological speech that is characterized by the spectrotemporal deviations caused by articulatory impairments due to various etiologies. To cope with this high variation, we propose to use speech representations which utilize articulatory information together with the acoustic properties. A designated acoustic model, namely a fused-feature-map convolutional neural network (fCNN), which performs frequency convolution on acoustic features and time convolution on articulatory features is trained and tested on a Dutch and a Flemish pathological speech corpus. The ASR performance of fCNN-based ASR system using joint features is compared to other neural network architectures such conventional CNNs and time-frequency convolutional networks (TFCNNs) in several training scenarios.
cs.CL
cs
Articulatory Features for ASR of Pathological Speech Emre Yılmaz1,2, Vikramjit Mitra3, Chris Bartels4 and Horacio Franco4 2 Dept. of Electrical and Computer Engineering, National University of Singapore, Singapore 1CLS/CLST, Radboud University, Nijmegen, Netherlands 3University of Maryland, College Park, MD, USA 4STAR Lab, SRI International, Menlo Park, CA, USA [email protected], [email protected], {chris.bartels,horacio.franco}@sri.com 8 1 0 2 l u J 8 2 ] L C . s c [ 1 v 8 4 9 0 1 . 7 0 8 1 : v i X r a Abstract In this work, we investigate the joint use of articulatory and acoustic features for automatic speech recognition (ASR) of pathological speech. Despite long-lasting efforts to build speaker- and text-independent ASR systems for people with dysarthria, the performance of state-of-the-art systems is still considerably lower on this type of speech than on normal speech. The most prominent reason for the inferior performance is the high variability in pathological speech that is character- ized by the spectrotemporal deviations caused by articulatory impairments due to various etiologies. To cope with this high variation, we propose to use speech representations which uti- lize articulatory information together with the acoustic prop- erties. A designated acoustic model, namely a fused-feature- map convolutional neural network (fCNN), which performs fre- quency convolution on acoustic features and time convolution on articulatory features is trained and tested on a Dutch and a Flemish pathological speech corpus. The ASR performance of fCNN-based ASR system using joint features is compared to other neural network architectures such conventional CNNs and time-frequency convolutional networks (TFCNNs) in sev- eral training scenarios. Index Terms: pathological speech, automatic speech recog- nition, articulatory features, convolutional neural networks, dysarthria 1. Introduction Speech disorders causing deviations in articulation lead to de- creased speech intelligibility and communication impairment [1]. Recent developments show that therapy can be provided by employing computer-assisted speech training systems [2]. Ac- cording to the outcomes of the efficacy tests presented in [3], user satisfaction towards such a system appears to be quite high. However, most of these systems are not yet capable of auto- matically detecting problems at the level of individual speech sounds, which are known to have an impact on speech intelli- gibility [4 -- 8]. Our goal is to develop robust automatic speech recognition (ASR) systems for pathological speech and incor- porate the ASR technology to detect these problems. Training robust acoustic models to capture the within- and between-speaker variation in dysarthric speech is generally not feasible due to the limited size and structure of existing pathological speech databases. The number of recordings in dysarthric speech databases is much smaller compared to that The second author is currently working with Apple Inc. This re- search is funded by the NWO Project 314-99-101 (CHASING) and NWO Project 314-99-119 (Frisian Audio Mining Enterprise). in normal speech databases. Despite long-lasting efforts to build speaker- and text-independent ASR systems for people with dysarthria, the performance of state-of-the-art systems is still considerably lower on this type of speech than on normal speech [9 -- 17]. In previous work [18], we described a solution to train a bet- ter DNN-hidden Markov model (HMM) system for the Dutch language, a language that has fewer speakers and resources compared to English. In particular, we investigated combining non-dysarthric speech data from different varieties of the Dutch language to train more reliable acoustic models for a DNN- HMM ASR system. This work was conducted in the framework of the CHASING project1, in which a serious game employing ASR is being developed to provide additional speech therapy to dysarthric patients [19]. Moreover, we created a 6-hour Dutch dysarthric speech database that had been collected in a previous project (EST) [20] for training purposes and investigate the im- pact of multi-stage DNN training for pathological speech [21]. Using articulatory features (AF) together with acoustic fea- tures has been investigated and shown to be beneficial in the ASR of normal speech, e.g. [22 -- 27]. A subset of these ap- proaches learn a mapping between acoustic and articulatory spaces for the speech inversion, and use the learned articu- latory information in an ASR system for improved represen- tation of speech in a high-dimensional feature space. Rudz- icz [28] tried using AF together with conventional acoustic fea- tures for phone classification experiments on dysarhtric speech. More recently, [29] has proposed the use of convolutional neu- ral networks (CNN) for learning speaker independent articula- tory models for mapping acoustic features to the corresponding articulatory space. Later, a novel acoustic model designed to integrate the AF together with the acoustic features has been proposed [30]. In this work, we investigate the joint use of articulatory and acoustic features for the ASR of pathological speech. Specif- ically, we explore the use of vocal tract constriction variables (TVs) and standard filterbank features as input to fused-feature- map CNN (fCNN) acoustic models as described in [30]. In- corporating articulatory information in the features for the ASR of pathological speech is expected to increase the robustness against increased spectrotemporal deviations due to reduced ar- ticulatory capabilities of the speakers. To investigate the impact of articulatory knowledge for ASR of pathological speech, we train fCNN acoustic models using the concatenated acoustic and articulatory features and evaluate the ASR performance on two different pathological speech corpora with varying levels of dysarthria. The performance of this system is compared to other 1http://hstrik.ruhosting.nl/chasing/ NN-based acoustic models such as conventional deep neural networks (DNN), CNN and time-frequency CNNs (TFCNN). The rest of the paper is organized as follows. Section 2 ex- plains the selection of various speech corpora for the proposed training scheme. Section 3 describes how the AFs are extracted and used in an ASR system. Section 4 summarizes the acoustic models used in this work. The experimental setup is described in Section 5 and the recognition results are presented in Section 6. Section 7 concludes the paper. 2. Speech corpora selection Given the limited availability of dysarthric speech data, we in- vestigate to what extent already existing databases of Dutch nor- mal speech can be employed to train NN-based acoustic mod- els and optimize their performance on dysarthric speech. There have been multiple Dutch-Flemish speech data collection ef- forts [31, 32] which facilitate the integration of both Dutch and Flemish data in the present research. For training purposes, we used the CGN corpus [31], which contains representative col- lections of contemporary standard Dutch as spoken by adults in the Netherlands and Flanders. The CGN components with read speech, spontaneous conversations, interviews and discussions are used for acoustic model training. The duration of the nor- mal Dutch (NL) and Flemish (FL) speech data used training is 255 and 186.5 hours respectively. The combined training data (FL+NL) contains 441.5 hours in total. The EST Dutch dysarthric speech database [20] contains dysarthric speech from ten patients with Parkinson's Disease (PD), four patients who have had a Cerebral Vascular Acci- dent (CVA), one patient who suffered Traumatic Brain Injury (TBI) and one patient having dysarthria due to a birth defect. Based on the meta-information, the age of the speakers is in the range of 34 to 75 years with a median of 66.5 years. The level of dysarthria varies from mild to moderate. The dysarthric speech collection for this database was achieved in several ex- perimental contexts. The speech tasks presented to the patients in these contexts consist of numerous word and sentence lists with varying linguistic complexity. The database includes 12 Semantically Unpredictable Sentences (SUSs) with 6- and 13- word declarative sentences, 12 6-word interrogative sentences, 13 Plomp and Mimpen sentences, 5 short texts, 30 sentences with /t/, /p/ and /k/ in initial position and unstressed syllable, 15 sentences with /a/, /e/ and /o/ in unstressed syllables, produc- tion of 3 individual vowels /a/, /e/ and /o/, 15 bisyllabic words with /t/, /p/ and /k/ in initial position and unstressed syllable and 25 words with alternating vowel-consonant composition (CVC, CVCVCC, etc.). For testing purposes, we firstly use the sentence read- ing tasks of the CHASING01 Dutch dysarthric speech database [21]. This database contains speech of 5 patients who participated in speech training experiments and were tested at 6 different times during the treatment. For each set of audio files, the following material was collected: 12 SUSs, 30 /p/, /t/, /k/ sentences in which the first syllable of the last word is un- stressed and starts with /p/, /t/ or /k/, 15 vowel sentences with the vowels /a/,/e/ and /o/ in stressed syllables, appeltaarttekst (apple cake recipe) in 5 parts. Utterances that deviated from the reference text due to pronunciation errors (e.g. restarts, repeats, hesitations, etc.) were removed. After this subselection, the ut- terances from 3 male patients remained and were included in the test set. These speakers are 67, 62 and 59 years old, two of them having PD and the third having had a CVA. All sentence reading tasks with annotations from the CO- PAS pathological speech corpus [33], namely 2 isolated sen- tence reading tasks, 11 text passages with reading level diffi- culty of AVI 7 and 8 and Text Marloes, are also included as a second test set. The COPAS corpus contains recordings from 122 Flemish normal speakers and 197 Flemish speakers with speech disorders such as dysarthria, cleft, voice disorders, la- ryngectomy and glossectomy. The dysarthric speech compo- nent contains recordings from 75 Flemish patients affected by Parkinson's disease, traumatic brain injury, cerebrovascular ac- cident and multiple sclerosis who exhibit dysarthria at different levels of severity. Containing more speakers with more diverse etiologies, performing ASR on this corpus is found to more challenging compared to the CHASING01 dysarthric speech database (c.f. the ASR results in [18] and [21]). 3. Extracting Articulatory Features The task of estimating the articulatory trajectories (in this case, the vocal tract constriction variables (TVs)) from the speech sig- nal is commonly known as speech-to-articulatory inversion or simply speech-inversion. TVs [34,35] are continuous time func- tions that specify the shape of the vocal tract in terms of con- striction degree and location of the constrictors. During speech- inversion, the acoustic features extracted from the speech signal are used to predict the articulatory trajectories, where the in- verse mapping is learned by using a parallel corpus containing acoustic and articulatory pairs. The task of speech-inversion is a well-known, ill-posed inverse transform problem, which suf- fers from both the non-linearity and non-unique nature of the inverse transform [36, 37]. The articulatory dataset used to train the speech-inversion systems consists of synthetic speech with simultaneous tract variable trajectories. We used the Haskins Laboratories' Task Dynamic model (TADA) [38] along with HLsyn [39] to gener- ate a synthetic English isolated word speech corpus along with TVs. Altogether 534 322 audio samples were generated (ap- proximately 450 h of speech), out of which 88% of the data was used as the training set, 2% was used as the cross-validation set, and the remaining 10% was used as the test set. We further added fourteen different noise types (such as babble, factory noise, traffic noise, highway noise, crowd noise, etc.) to each of the synthetic acoustic waveforms with a signal-to-noise ratio (SNR) between 10 and 80 dB. We combined this noise-added data with the clean data, and the resulting combined dataset is used for learning a CNN-based speech inversion system. For further details, we refer the reader to [29]. In this work, we use speech subband amplitude mod- ulation features such as normalized modulation coefficients (NMCs) [40]. NMCs are noise-robust acoustic features ob- tained from tracking the amplitude modulations (AM) of fil- tered subband speech signals in the time domain. The features are Z-normalized before being used to train the CNN models. Further, the input features are contextualized by splicing mul- tiple frames. Given the linguistic similarity between English and Dutch, we assume that the speech inversion model trained on English speech would give a reasonably accurate acoustic- to-articulatory mapping in Dutch. For a detailed comparison of the articulatory setting in Dutch and English, please see Section 21 of [41]. 4. Acoustic Models The acoustic and articulatory (concatenated) features are fed to a fused-feature-map convolutional neural network (fCNN) which is illustrated in Figure 1. This architecture uses two types Figure 1: A fused-feature-map convolutional neural network (fCNN) [30] of convolutional layers. The first convolutional layer operates on the acoustic features, which are the filterbank energy fea- tures, and performs convolution across frequency. The other convolutional layer operates on AFs, which are the TV trajec- tories, and performs convolution across time. The output of the max-pooling layers are fed to a single NN after performing feature-map fusion. Time-frequency convolutional nets (TFCNN) are also a suitable candidate for the acoustic modeling of dysarthric speech. Performing convolution both on time and frequency axes, they exhibit increased robustness against the spectrotem- poral deviations due to background noise [42]. In the scope of this work, we use these models as one of the alternative ASR systems without delving into their advantages compared to other NN architectures. This investigation remains as a fu- ture work. We further train baseline DNN and CNN models using filterbank features as these architectures are found to pro- vide worse recognition performance using the concatenated fea- tures [30]. 5. Experimental Setup 5.1. Database details The CGN components with read speech, spontaneous conversa- tions, interviews and discussions were used for acoustic model training. The duration of the normal Flemish (FL) and north- ern Dutch (NL) speech data used for training is 186.5 and 255 hours, respectively. The EST Dutch dysarthric speech database (Dys. NL) con- tains 6 hours and 16 minutes of dysarthric speech material from 16 speakers [20]. The speech segments with pronunciation er- rors (e.g. restarts, repeats, hesitations, etc.) were excluded from the training set to maintain integrity of the results on ASR per- formance evaluation. Additionally, the segments including a single word and pseudoword were also excluded, since the sen- tence reading tasks are more relevant in our project context. The total duration of the dysarthric speech data eventually selected for training is 4 hours and 47 minutes. For testing purposes, we use two databases: (1) The CHAS- ING01 Dutch dysarthric speech data which contains 721 utter- ances (in total 6231 words) spoken by 3 dysarthric speakers with a total duration of 55 minutes, (2) The Flemish COPAS database which contains 212 different sentence tasks uttered by 103 dysarthric and 82 normal speakers. The sentence tasks ut- tered in the Flemish corpus by normal speakers (SentNor) and speakers with disorders (SentDys) consists of 1918 (15,149) and 1034 (8287) sentences (words) with a total duration of 1.5 and 1 hour, respectively. 5.2. Implementation Details We use CNNs for training speech inversion models, where con- textualized (spliced) acoustic features in the form of NMCs are used as input, and the TV trajectories were used as the targets. The network parameters and the splicing window were opti- mized by using a held-out development set. The convolution layer of the CNN had 200 filters, where max-pooling was per- formed over three samples. The CNN has three fully connected hidden layers with 2048 neurons in each layer. For further de- tails, we refer the reader to [29]. For ASR experiments, a conventional context dependent GMM-HMM system with 40k Gaussians was trained on the 39-dimensional MFCC features including the deltas and delta- deltas. We also trained a GMM-HMM system on the LDA- MLLT features, followed by training models with speaker adap- tive training using FMLLR features. This system was used to obtain the state alignments required for NN training. The input features to the acoustic models are formed by using a context window of 17 frames (8 frames on either side of the current frame). The acoustic models were trained by using cross-entropy (CE) on the alignments from the GMM-HMM system. The 40- dimensional log-mel filterbank (FB) features with the deltas and delta-deltas are used as acoustic features which are extracted us- ing the Kaldi [43] toolkit. The NN models are implemented in Theano. The NNs trained on dysarthric Dutch training data has 4 hidden layers, with 1024 nodes per hidden layer. The NNs trained on normal Dutch and Flemish data has 6 hidden lay- ers, with 2048 nodes per hidden layer, and the output layer in- cluded as many nodes as the number of CD states for the given dataset. The networks were trained by using an initial four iterations with a constant learning rate of 0.008, followed by learning-rate halving based on cross validation error decrease. Training stopped when no further significant reduction in cross- validation error was noted or when cross-validation error started to increase. Back-propagation was performed using stochastic gradient descent with a mini-batch of 256 training examples. All ASR systems use the Kaldi decoder. For CNN, TFCNN and fCNN, the acoustic space is learned using a 200 convolutional filters of size 8 were used in the convolutional layer, and the pooling size was set to 3 without Table 1: Word error rates in % obtained on the Dutch test set using different acoustic models Table 2: Word error rates in % obtained on the Flemish test sets using different acoustic models AM DNN CNN TFCNN fCNN DNN CNN TFCNN fCNN Features FB FB FB FB + TV FB FB FB FB + TV Train. Data WER (%) Dys. NL Dys. NL Dys. NL Dys. NL Nor. NL Nor. NL Nor. NL Nor. NL 22.9 21.1 20.3 19.1 15.0 14.9 14.1 15.0 overlap. For fCNN, the articulatory space is learned by using a time-convolution layer that contains 75 filters, followed by max-pooling over 5 samples. Further implementation details about the NN parameters are available in [30]. 5.3. ASR experiments We use two training setups for each test set during the ASR experiments. For the Dutch test data, the ASR system is ei- ther trained on normal or dysarthric Dutch speech. Training on combination of these databases has yielded very similar results to the system trained only the normal Dutch data in the pilot experiments. Therefore, we do not consider this training setup in this paper. For Flemish test data, we use normal Flemish and Dutch speech due to lack of training material in this language variety. In the first setting, we only use normal Flemish speech to train acoustic models, while both normal Flemish and Dutch speech is used in the second setting motivated by the improvements re- ported in [20]. The recognition performance of all ASR systems is quantified using the Word Error Rate (WER). 6. Results and Discussion The ASR results obtained on the Dutch test set are presented in Table 1. The WERs provided by different acoustic models trained on the dysarthric Dutch speech are given in the upper panel of this table. The best ASR performance of each panel is marked in bold. Only using 6 hours of in-domain speech, the designated ASR system using both the acoustic and articu- latory features provides the best ASR performance with a WER of 19.1%. The CNN and TFCNN models trained on filterbank features provide a WER of 21.1% and 20.3% respectively. The ASR performance of the acoustic models trained on normal Dutch speech is given in the lower panel. In this sce- nario, the TFCNN model has the best performance with a WER of 14.1%, while the other systems provide comparable recogni- tion accuracies. In this training setting, in which we use large amount of mismatched data for the ASR of mild-to-moderate pathological speech, using articulatory information does not turn out to be bring further improvements compared to an or- dinary CNN model. We test the proposed recognition scheme on the Flemish corpus which contains speech data from much more dysarthric speakers (103 speakers compared to the 3 of the Dutch corpus). The ASR results obtained on the Flemish test set are presented in Table 2. In the Flemish test set, we also present the per- formance on the control data which contains similar sentence tasks uttered by normal speakers. In the first training scenario, we only use normal Flemish speech. The fCNN model provides a WER of 32.2% which is considerably better than the 33.8% of TFCNN and 33.5% of CNN models. Consistent with [18], Train. Data Nor. VL Nor. VL Nor. VL Nor. VL AM Features DNN CNN TFCNN fCNN FB + TV DNN Nor. VL + Nor. NL CNN Nor. VL + Nor. NL TFCNN Nor. VL + Nor. NL fCNN FB + TV Nor. VL + Nor. NL FB FB FB FB FB FB SentDys SentNor 36.4 33.5 33.8 32.2 32.1 30.1 30.1 29.0 6.0 5.3 5.3 5.0 5.5 4.9 4.9 4.9 when we add normal Dutch speech to the training data, we get a general improvement in the ASR performance on the Flemish test set. The fCNN model outperforms the other models with a WER of 29.0%. Even though there is still a large gap with the performance on the control data, using articulatory features with a designated NN architecture provides consistently improved ASR perfor- mance on the Flemish test set which contains speech from 103 dysarthric speakers. In general, these results demonstrate the potential of jointly using AFs and acoustic features against the spectrotemporal deviations in the pathological speech. 7. Conclusions In this work, we investigate incorporating articulatory and acoustic features jointly in the ASR of pathological speech. The ASR systems operating on this kind of speech suffers from the increased speech variation due to the poor articulation capabili- ties of the speakers. We explore the impact of using articulatory information in a ASR system by training various acoustic mod- els in several scenarios and testing on a Dutch and a Flemish pathological speech corpus. The results demonstrate that us- ing AF features brings improvements using a limited amount of in-domain training data. Moreover, we observed consis- tent improvements in the ASR performance in more challenging testing conditions with considerably higher number of speakers with a speech pathology originating from more diverse etiolo- gies. 8. Acknowledgements We would like to thank Dimitra Vergyri and Helmer Strik for useful discussion, Aaron Lawson and Mitchell McLaren for the arrangements making this collaboration possible. 9. References [1] R. D. Kent and Y. J. Kim, "Toward an acoustic topology of motor speech disorders," Clin Linguist Phon, vol. 17, no. 6, pp. 427 -- 445, 2003. [2] L. J. Beijer and A. C. M. Rietveld, "Potentials of telehealth de- vices for speech therapy in Parkinson's disease, diagnostics and rehabilitation of Parkinson's disease," InTech, pp. 379 -- 402, 2011. [3] L. J. Beijer, A. C. M. Rietveld, M. B. Ruiter, and A. C. Geurts, "Preparing an E-learning-based Speech Therapy (EST) efficacy study: Identifying suitable outcome measures to detect within- subject changes of speech intelligibility in dysarthric speakers," Clinical Linguistics and Phonetics, vol. 28, no. 12, pp. 927 -- 950, 2014. [4] M. S. De Bodt, H. M. Hernandez-Diaz, and P. H. Van De Heyning, "Intelligibility as a linear combination of dimensions in dysarthric speech," Journal of Communication Disorders, vol. 35, no. 3, pp. 283 -- 292, 2002. [5] Y. Yunusova, G. Weismer, R. D. Kent, and N. M. Rusche, "Breath- group intelligibility in dysarthria: characteristics and underlying correlates," J Speech Lang Hear Res., vol. 48, no. 6, pp. 1294 -- 1310, 2005. [6] G. Van Nuffelen, C. Middag, M. De Bodt, and J.-P. Martens, "Speech technology-based assessment of phoneme intelligibility in dysarthria," International Journal of Language & Communica- tion Disorders, vol. 44, no. 5, pp. 716 -- 730, 2009. [7] D. V. Popovici and C. Buica-Belciu, "Professional challenges in computer-assisted speech therapy," Procedia - Social and Behav- ioral Sciences, vol. 33, pp. 518 -- 522, 2012. [8] M. Ganzeboom, M. Bakker, C. Cucchiarini, and H. Strik, "In- telligibility of disordered speech: Global and detailed scores," in Proc. INTERSPEECH, Sept. 2016, pp. 2503 -- 2507. [9] E. Sanders, M. B. Ruiter, L. J. Beijer, and H. Strik, "Automatic recognition of Dutch dysarthric speech: a pilot study," in Proc. INTERSPEECH, 2002, pp. 661 -- 664. [10] F. Rudzicz, "Comparing speaker-dependent and speaker-adaptive acoustic models for recognizing dysarthric speech," in Proc. of the 9th International ACM SIGACCESS Conference on Comput- ers and Accessibility, 2007, pp. 255 -- 256. [11] S.-O. Caballero-Morales and S. J. Cox, "Modelling errors in au- tomatic speech recognition for dysarthric speakers," EURASIP J. Adv. Signal Process, pp. 1 -- 14, Jan. 2009. [12] K. T. Mengistu and F. Rudzicz, "Adapting acoustic and lexical models to dysarthric speech," in Proc. ICASSP, may 2011, pp. 4924 -- 4927. [13] W. Seong, J. Park, and H. Kim, "Dysarthric speech recognition error correction using weighted finite state transducers based on context-dependent pronunciation variation," in Computers Help- ing People with Special Needs, ser. Lecture Notes in Computer Science, 2012, vol. 7383, pp. 475 -- 482. [14] H. Christensen, S. Cunningham, C. Fox, P. Green, and T. Hain, "A comparative study of adaptive, automatic recognition of disor- dered speech." in INTERSPEECH, 2012, pp. 1776 -- 1779. [15] S. R. Shahamiri and S. S. B. Salim, "Artificial neural net- works as speech recognisers for dysarthric speech: Identifying the best-performing set of MFCC parameters and studying a speaker-independent approach," Advanced Engineering Informat- ics, vol. 28, pp. 102 -- 110, 2014. [16] Y. Takashima, T. Nakashika, T. Takiguchi, and Y. Ariki, "Fea- ture extraction using pre-trained convolutive bottleneck nets for dysarthric speech recognition," in Proc. EUSIPCO, 2015, pp. 1426 -- 1430. [17] T. Lee, Y. Liu, P.-W. Huang, J.-T. Chien, W. K. Lam, Y. T. Yeung, T. K. T. Law, K. Y. Lee, A. P.-H. Kong, and S.-P. Law, "Automatic speech recognition for acoustical analysis and assessment of Can- tonese pathological voice and speech," in Proc. ICASSP, 2016, pp. 6475 -- 6479. [18] E. Yılmaz, M. Ganzeboom, C. Cucchiarini, and H. Strik, "Com- bining non-pathological data of different language varieties to im- prove DNN-HMM performance on pathological speech," in Proc. INTERSPEECH, Sept. 2016, pp. 218 -- 222. [19] M. Ganzeboom, E. Yılmaz, C. Cucchiarini, and H. Strik, "On the development of an ASR-based multimedia game for speech ther- apy: Preliminary results," in Proc. Workshop MM Health, Oct. 2016, pp. 3 -- 8. [20] E. Yılmaz, M. Ganzeboom, L. Beijer, C. Cucchiarini, and H. Strik, "A Dutch dysarthric speech database for individualized speech therapy research," in Proc. LREC, 2016, pp. 792 -- 795. [21] E. Yılmaz, M. Ganzeboom, C. Cucchiarini, and H. Strik, "Multi- stage DNN training for automatic recognition of dysarthric speech," in Proc. INTERSPEECH, Sept. 2017, pp. 2685 -- 2689. [22] I. Zlokarnik, "Adding articulatory features to acoustic features for automatic speech recognition," J. Acoust. Soc. Am., vol. 97 (5), p. 3246, 1995. [23] A. A. Wrench and K. Richmond, "Continuous speech recognition using articulatory data," in Proc. of the International Conference on Spoken Language Processing, 2000, pp. 145 -- 148. [24] T. A. Stephenson, H. Bourlard, S. Bengio, and A. C. Morris, "Automatic speech recognition using dynamic Bayesian networks with both acoustic and articulatory variables," in Proc. of the In- ternational Conference on Spoken Language Processing, 2000, pp. 951 -- 954. [25] K. Markov, J. Dang, and S. Nakamura, "Integration of articulatory and spectrum features based on the hybrid HMM/BN modeling framework," Speech Communication, vol. 48, no. 2, pp. 161 -- 175, 2006. [26] V. Mitra, N. H., C. Espy-Wilson, E. Saltzman, and L. Goldstein, "Recognizing articulatory gestures from speech for robust speech recognition," J. Acoust. Soc. Am., vol. 131 (3), p. 2270, 2012. [27] L. Badino, C. Canevari, L. Fadiga, and G. Metta, "Integrating ar- ticulatory data in deep neural network-based acoustic modeling," Computer Speech & Language, vol. 36, pp. 173 -- 195, 2016. [28] F. Rudzicz, "Articulatory knowledge in the recognition of dysarthric speech," IEEE Transactions on Audio, Speech, and Language Processing, vol. 19, no. 4, pp. 947 -- 960, May 2011. [29] V. Mitra, G. Sivaraman, C. Bartels, H. Nam, W. Wang, C. Espy- Wilson, D. Vergyri, and H. Franco, "Joint modeling of articulatory and acoustic spaces for continuous speech recognition tasks," in Proc. ICASSP, March 2017, pp. 5205 -- 5209. [30] V. Mitra, G. Sivaraman, H. Nam, C. Espy-Wilson, E. Saltzman, and M. Tiede, "Hybrid convolutional neural networks for articu- latory and acoustic information based speech recognition," Speech Communication, vol. 89, pp. 103 -- 112, 2017. [31] N. Oostdijk, "The spoken Dutch corpus: Overview and first eval- uation," in Proc. LREC, 2000, pp. 886 -- 894. [32] C. Cucchiarini, J. Driesen, H. Van hamme, and E. Sanders, "Recording speech of children, non-natives and elderly people for the JASMIN-CGN Corpus," in Proc. LREC, HLT applications: May 2008, pp. 1445 -- 1450. [33] C. Middag, "Automatic analysis of pathological speech," Ph.D. dissertation, Ghent University, Belgium, 2012. [34] V. Mitra, H. Nam, C. Y. Espy-Wilson, E. Saltzman, and L. Gold- stein, "Articulatory information for noise robust speech recogni- tion," IEEE Transactions on Audio, Speech, and Language Pro- cessing, vol. 19, no. 7, pp. 1913 -- 1924, Sept 2011. [35] B. C. P. and G. L., "Articulatory phonology: an overview." Pho- netica, vol. 49, no. 3-4, pp. 155 -- 180, 1992. [36] K. Richmond, "Estimating articulatory parameters from the acoustic speech signal," Ph.D. dissertation, University of Edin- burgh, UK, 2001. [37] V. Mitra, "Articulatory information for robust speech recogni- tion," Ph.D. dissertation, University of Maryland, College Park, 2010. [38] H. Nam and L. Goldstein, "TADA: An enhanced, portable task dynamics model in MATLAB," J. Acoust. Soc. Am., vol. 115, p. 2430, 2004. [39] H. M. Hanson and K. N. Stevens, "A quasiarticulatory approach to controlling acoustic source parameters in a Klatt-type formant synthesizer using HLsyn," J. Acoust. Soc. Am., vol. 112, p. 1158, 2002. [40] V. Mitra, G. Sivaraman, H. Nam, C. Espy-Wilson, and E. Saltz- man, "Articulatory features from deep neural networks and their role in speech recognition," in Proc. ICASSP, May 2014, pp. 3017 -- 3021. [41] B. Collins and I. Mees, The Phonetics of English and Dutch. Koninklijke Brill NV, 1996. [42] V. Mitra and H. Franco, "Time-frequency convolutional networks for robust speech recognition," in Proc. ASRU, Dec 2015, pp. 317 -- 323. [43] D. Povey, A. Ghoshal, G. Boulianne, L. Burget, O. Glembek, N. Goel, M. Hannemann, P. Motlicek, Y. Qian, P. Schwarz, J. Silovsky, G. Stemmer, and K. Vesely, "The Kaldi speech recog- nition toolkit," in Proc. ASRU, Dec. 2011.
1510.00618
2
1510
2015-10-05T08:11:07
Automatic Taxonomy Extraction from Query Logs with no Additional Sources of Information
[ "cs.CL" ]
Search engine logs store detailed information on Web users interactions. Thus, as more and more people use search engines on a daily basis, important trails of users common knowledge are being recorded in those files. Previous research has shown that it is possible to extract concept taxonomies from full text documents, while other scholars have proposed methods to obtain similar queries from query logs. We propose a mixture of both lines of research, that is, mining query logs not to find related queries nor query hierarchies, but actual term taxonomies that could be used to improve search engine effectiveness and efficiency. As a result, in this study we have developed a method that combines lexical heuristics with a supervised classification model to successfully extract hyponymy relations from specialization search patterns revealed from log missions, with no additional sources of information, and in a language independent way.
cs.CL
cs
Automatic Taxonomy Extraction from Query Logs with No Additional Sources of Information Fernandez-Fernandez, Miguel Gayo-Avello, Daniel Tuenti Technologies Universidad de Oviedo [email protected] [email protected] Abstract: Search engine logs store detailed information on Web users interactions. Thus, as more and more people use search engines on a daily basis, important trails of users common knowledge are being recorded in those files. Previous research has shown that it is possible to extract concept taxonomies from full text documents, while other scholars have proposed methods to obtain similar queries from query logs. We propose a mixture of both lines of research, that is, mining query logs not to find related queries nor query hierarchies, but actual term taxonomies that could be used to improve search engine effectiveness and efficiency. As a result, in this study we have developed a method that combines lexical heuristics with a supervised classification model to successfully extract hyponymy relations from specialization search patterns revealed from log missions, with no additional sources of information, and in a language independent way. Keywords: Web search, query log, hyponymy relations, query reformulation, query classification, au- tomatic taxonomy extraction. 1 Introduction Web search is becoming a common habit among internet users (Fallows, 2008). Hence, the amount of data in query logs is firmly increasing every day, recording a great deal of users’ common knowledge and interactions. As (Pasca and Van Durme, 2007) pointed out “If knowledge is generally prominent or relevant, people will (eventually) ask about it”. Nervertheless, searching is not a straightforward process, instead, the users gradually refine both their queries and their goals in a process referred by (Spink, 1998) as the successive search phenomenon. During this iterative process the users provide successive queries revealing different search patterns (Boldi et al., 2009). The most relevant ones for this proposal are the so-called Specialization pattern; and its antisymmetric operation, the Generalization pattern. Given a pair of queries (qi ,qi+1 ), Specialization occurs when a new query qi+1 is focused on increasing the precision of the previous query qi . In some cases a specialization can be automatically identified because qi is a substring of qi+1 (e.g. video game sales and arcade videogame sales), in others, some of the terms are shared among both queries and the difference is more specific in qi+1 (e.g. bird food and canary food); a specialization can even occur when none of the terms are shared among the query (e.g.: outdoor activities and camping). Generalization comes to increase the previous query recall by looking for more generic information (e.g.: white-water rafting and extreme sports). It must be noticed that when considering groups of queries we are not interested in all the queries issued by a user during one sitting (i.e. a searching episode) but in much shorter fragments where all the queries are topically related. The advantages of using such topical sessions are two-fold: (1) the data to be considered in order to find semantic relations between terms is much more focused on, and (2) such granularity level should dispel most of the privacy issues even if no de-identification was used (Xiong and Agichtein, 2007). In order to obtain such query log segmentation we have used a technique which has proved to attain similar results to those achieved by a human expert (Gayo-Avello, 2009). Such technique allows us to group topically related queries even when those queries do not share any common term. 2 Motivation Taxonomies are made up of terms connected by hyponymy relations. The deductive power of hyponymy allows the application of reasoning schemas based upons structural subsumption (Baader, 2003), and hence, by using taxonomies it should be possible to greatly improve search engine effectiveness and efficiency by means of term disambiguation, and semantic query suggestion and expansion. For these same purposes, other lexical databases such as Wordnet could be applied (e.g. WordNet (Miller, 1990)) but we feel they present several lacks in order to be really useful. First, because WordNet is an English language project, parallel projects for other languages have been developed, such as EuroWordNet (Ellman, 2003), BalkaNet (Greek), Hebrew WordNet, Hindi WordNet and Japanese WordNet among others (Vossen and Fellbaum, 2004). Certainly we could rely on such different wordnets but the task of identifying the language in which queries are written is not trivial given the small number of terms usually employed. Additionally, there exist a huge gap between the lexicon used by Web users and the developers of wordnets. For instance, (Mandala et al., 1999) and (Gabrilovich and Markovitch, 2007) pointed out that most domain-specific relationships between words cannot be found in WordNet, and some kind of words, such as proper names, jargon or slang are just not included. Besides, (Mihalcea, 2003) also explained that due to the fact that professional linguists recognize minimal differences in word senses, common words such as “make” have too many different senses to be useful for IR tasks. Of course, these wordnets could be automatically enriched (Hearst, 1992) but such approach require a great effort (usually carried out by linguists) and, hence, wordnets remain as quite static data sources. On the other hand, most of the previous studies aimed at building term taxonomies – e.g. (Hearst, 1992), (Berland and Charniak, 1999), (Caraballo, 1999), (Girju et al., 2003), (Morin and Jacquemin, 2004). not only need large text corpora but they are also tightly coupled to the grammar rules of the target language. This would make their application to query logs extremely difficult (if not totally unfeasible) given the nature of the queries which are short and, many times, simply ungrammatical. Thus, we feel that taxonomies of terms and noun phrases collecting the common knowledge of search engine users, including typos, jargon and slang are a real need in order to improve the performance of Web search engines. Besides, we think that the only way to obtain such users’ mental model is by mining the query logs collecting the users queries. As a consequence, the following research questions come to light: (q1) Is it possible to automatically generate term taxonomies containing the common vocabulary em- ployed by web users? (q2) If it is so, can it be done by using just the information contained in the query log, with no additional sources of information? (q3) Is it possible to do all the above in a language-independent way? Throughout the following sections we describe our method to mine hyponymy relations from query logs, how we have applied it to the AOL and MSN datasets, the results we have obtained from its application, and finally, the implications and future lines of research of the study. 3 Prior work The idea depicted in this paper is somehow related to previous and on-going works. We will briefly review those which are most relevant, then, we will point out the main differences between such works and our approach. First, it must be said that the idea of automatically building term taxonomies is not new and several approaches have already been proposed to work on full text documents. Works such as (Hearst, 1992) , (Berland and Charniak, 1999), (Caraballo, 1999), (Girju et al., 2003), (Morin and Jacquemin, 2004), among others, are extremely relevant but they cannot be straightforwardly applied to query logs, because most of these techniques require lexico-syntactic patterns and POS tagging which are hardly useful when applied to Web search queries. With regards to those works relying on query logs or folksonomies, there have been two main goals: (1) organizing the queries/tags in hierarchical arrangements (but not actual taxonomies), and (2) auto- matically obtaining similar queries/tags. Thus, (Clough et al., 2005) and (Schmitz, 2006) applied subsumption to image tags in order to obtain tag hierarchies. Such hierarchies, however, were not taxonomies because no hyponymy relations were established; instead, the tags were arranged with regards to their specificity (e.g. church ← tower ← bell tower, sanfrancisco ← goldengate). (Heymann and Garcia-Molina, 2006), (Mika, 2005), and (Schwarzkopf et al., 2007) developed rather similar works; they also employed tag collections (although not image tags) and described different techniques to obtain concept hierarchies. Again, such hierarchies were not proper taxonomies. With regards to the field of query suggestion there exist abundant literature; we will just refer to two recent works that could be confused with our proposal. For instance, (Shen et al., 2007) and (Baeza-Yates and Tiberi, 2007) describe two methods to generate related queries for a given one by exploiting the data within the query log; however, neither of such methods produces a proper taxonomy the way we suggest. Approaches by other authors could be wrongly considered similar to our approach. For instance, (Chuang and Chien, 2003) describe a method to classify query terms into a predefined category system; thus, it is much closer to query topic classification than to taxonomy bootstrapping. Other works by the same authors such as (Chuang and Chien, 2004) and (Chuang and Chien, 2005), describe methods to obtain term hierarchies but such hierarchies are, in fact, clusters and not taxonomies. There also exist interesting works in the field of information extraction. For instance, (Pasca et al., 2006) and (Pasca, 2007) describe a technique to obtain class attributes from query logs (e.g. finding that population, flag or president are attributes for Country). The same author also provides a method to find named-entities (Pasca and Van Durme, 2007) which is related to (Sekine and Suzuki, 2007) and (Komachi and Suzuki, 2008). None of these works, however, are related to our approach because they do not generate term taxonomies. Thus, our proposal, although somehow related to all the aforementioned research is different in several aspects. Different from classic works –e.g. (Hearst, 1992), (Berland and Charniak, 1999), (Caraballo, 1999), (Girju et al., 2003) and (Morin and Jacquemin, 2004) in that it does not rely on full text documents but on query logs. It also differs from (Clough et al., 2005), (Heymann and Garcia-Molina, 2006), (Schmitz, 2006), (Mika, 2005), (Baeza-Yates and Tiberi, 2007) and (Schwarzkopf et al., 2007) in the underlying goal: while those methods obtain tag or query hierarchies according to their specificity, we are interested in automatically building actual taxonomies (i.e. hierarchical arrangements according to hyponymy relations). We have also exposed that other works such as (Chuang and Chien, 2003), (Chuang and Chien, 2004), (Chuang and Chien, 2005), (Pasca et al., 2006), (Pasca and Van Durme, 2007), (Pasca, 2007), (Sekine and Suzuki, 2007) and (Komachi and Suzuki, 2008) are in fact dealing with problems which are totally unrelated to taxonomy construction. 4 Method applied Our method relies on extracting pairs of terms or noun phrases from a series of query specialization patterns identified from topical query sessions. Broadly, the outline of this process consists of the following three activities: 1. Sessionize and filter the log obtaining sets of non-navigational queries targeted at solving a par- ticular information need. 2. Identify query pairs revealing query specialization/generalization patterns from that sessions. 3. For each of the above pairs, point out a group of hyponymy candidates over which, at most, one instance will be chosen as a true hyponymy relation. During this work, we have developed two lines of experiments. The former was presented in (Fernandez-Fernandez and Gayo-Avello, 2009) and implemented the identification of specialization search patterns by only taking into account lexico-syntactic aspects about the queries – mainly, addition and subtraction of terms. The second one, evolved from the need of increasing the method’s performance, applies a supervised method devised by Bonchi et al. (Boldi et al., 2009) which takes into account the lexical and temporal features of query pairs, in addition to session-related information. Both lines of research are complementary: On the one side, lexical identification performs well in cases in which both queries of a pair share some terms – e.g. wild animal photographs and lion photographs, or naked celebrities and naked angelina jolie – yet it does not allow taxonomy extraction over query pairs that do not have any term in common, such as golden globe and film awards, that can be discovered using machine learning. 4.1 Sessionization and navigational query removal 4.1.1 Topical session detection Topical sessions, or missions (Boldi et al., 2009) are sets of queries submitted by the same user pursuing the resolution of a single information need. There exist a wide range of studies describing methods to reveal topical sessions from query logs. The work by Gayo-Avello (Gayo-Avello, 2009) surveys the state of the art on this field, and describes a new method that takes into account both the lexical and temporal dimensions of a pair of queries, in order to determine whether they belong to the same session or not. This method, called Geometric, performs better than the others surveyed by the author (F1.5 = 0.82), and hence it has been the one chosen to sessionized our data sets. Provided the character 3-gram vectors of a pair of queries, and their submission timestamps, our implementation calculates the (x, y) coordinates for the 2-dimensional space characterized by x) the lexical resemblance between both queries (cosine); and y) their temporal similarity, linearly normalized in the interval [0,1], given a maximum timespan of half-an-hour. Membership of the same session will be determined if the point (x,y) overtakes the boundaries of a circle with the center in (1,1) and radius being 1. (Figure 1). Figure 1: Geometric interpretation of the lexical and temporal dimensions of a pair of queries. Queries completely different but submitted at the same time (A), and similar queries submitted with at least half-an-hour of difference (B), belong to the same session. 4.1.2 Removal of navigational queries According to (Broder, 2002), there are three kinds of queries in relation to their intent: (1) Navigational, when the immediate intent is to reach a particular site; (2) Informational, when the intent is to acquire some information assumed to be present on one or more web pages; and (3) Transactional, when the intent is to perform some web-mediated activity (e.g. to buy a product, or download a file). We think that navigational queries can reduce the accuracy of the hyponym extraction process and, thus, such queries should be removed. Because the intent behind navigational queries is to reach a particular site, most of them are lexically similar to the URL of the referred site and so, a simple heuristic to detect them (Jansen et al., 2008) consists in marking a query as navigational if it matches at least one of the following criteria: • Contains company/business/organization/people names. • Contains domains suffixes. • Has “Web” as the source. • Its length (i.e., number of terms) is less than 3; and searcher clicked on the first results page. A straightforward application of this criteria leads to wrongly classify too many queries as naviga- tional. Because of this, we have relaxed the heuristic and filtered as navigational only those queries containing 1) well known website names (e.g. google, wikipedia, etc), 2) domain suffixes (e.g. com, net, ... , co.uk, etc), or 3) strings frequently present in URLs such as www. or http://. 4.2 Reformulation pattern identification The output of the previous activity is a collection of non-navigational topically-related sets of queries. Over them we identify pairs of queries in which one of its elements asks for more precise information. 4.2.1 Lexical identification A specialization occurs when a query q′ looks for information about the same topic as a previous query q, but in a more specific way. A generalization occurs when the user wants to increase search recall by reaching more relevant documents. Both patterns are antisymmetric, meaning that there exist a specialization in (q,q′) if, and only if (q′, q) make up a generalization. In order to detect such patterns, works like (He et al., 2002) rely on the lexical similarity between both queries in such a way that one query specializes another if it adds terms to it. A trivial scenario occurs when q is a substring of q’ (e.g. fish food and tropical fish food). A not so trivial scenario occurs when q′ not only adds some terms to q, but also removes others, as it happens in the case of the queries celebrity scandals and charly sheen scandals. This kind of specialization –we call it specialization with reformulation– can be seen as a parallel move on the session, because the second query could look for slightly different information than the former, but if we pay attention to their number of results (11M vs. 0.4M respectively) we can see that the second one is much more specific, and thus, it is subsumed by the first one. A different case is that of the pair electronic repairs and iphone repairs, whose number of results swings in the same order of magnitude (340M vs. 550M) 4.2.2 Supervised identification A third kind of specialization occurs when q and q′ do not share any term, but q′ looks for more specific information, as in the case of the pair outdoor activities and camping. These patterns cannot be identified by attending only to the lexical criteria described above. In (Bonchi et al., 2009), the authors describe a machine learning approach that applying a queue of binary classifiers in cascade, is able to classify a pair of queries into the following equivalence classes: generalization (lion, wild animals); specialization (ikea furniture, corner units), error correc- tion (califrnia, california); parallel move, when queries look for something related, but not similar (hotel in Dublin, flights to Dublin); and session shift, when both queries are not aimed at solv- ing the same information need and hence they do not belong to the same session. Given that our input in this task are queries that belong to the same session, and were not previously identified as either trivial specializations or specializations with reformulation, our problem is reduced to the application of only two of the binary classifiers (those targeted at identifying specialization and generalization). The moment the query does not match any of the former categories, it is discarded. (Figure 2). Figure 2: Flow diagram showing the decisions involved in the identification of specialization patterns. The classification algorithm used in our work is J48, an open source implementation of the well- known C4.5 decision tree induction algorithm (Quinlan, 1993). As in the original paper, the algorithm was trained with a manually labeled sample of 3000 query pairs, but in our case, we limited them to those that 1) do not share any term, and 2) belong to the same session. The labeling process was accomplished by three judges that assigned one category among a) generalization, b) specialization and c) undefined. The result of this process was 421 query pairs labeled as either generalizations or specializations. Again, 1/3 of the labeled sample was used to evaluate the classifier’s performance. To build the model from which the trees were induced, we calculated for each query pair the 27 lexical, temporal, and session related features proposed by Bonchi et al.with the exception of features [f21], [f22] y [f23], that in the original work were the cosine similarity, the Jaccard coefficient, and the overlapping of the stemmed query terms. We feel that applying stemming (Porter, 1980) ties the classifier to the language in which the queries were written, so we replaced that features in favor of the same measures applied to the Soundex codes of the terms, this way we obtain a set of similarity measures that are independent of, at least, all the occidental languages. 4.3 Hyponymy relation extraction The last step in the process consists in, given an specialization (q,q′), identifying which terms from q and q′ act respectively as the hypernym and hyponym in the final relations. To do it, we first identify a set of candidate pairs and then we choose the most relevant candidate provided that its relevance is above a certain threshold. Relevance in this case is defined as a weight that is proportional to the probability of finding the same candidate in other specialization patterns across the log. ( ) ( ) ( ) ( ) In the equation, P (t, t′) is the subset of the specialization patterns in which the term t appears in the more general query, and t′ in the more specific one; G(t′) is the subset of specialization patterns in which t′ appears only in the more general query; and finally S(t) is the subset in which t appears only in the more specific query. As a consequence, on the one side, a candidate relation appearing as it is in more patterns, will see its weight increased in a quadratic factor. On the other side, a candidate relation whose parts appear on the remaining set of specialization patterns, playing the opposite role (the hyponym in the more general query, and the hypernym in the more specific) will see its weight reduced by a linear factor. Depending on the kind of specialization pattern used as source, a concrete behavior is defined to select the candidate relations and, depending on the values of W assigned to it, to decide the instance that will be part of the taxonomy. 4.3.1 Harnessing specializations with reformulation This is the easiest case. A specialization with reformulation happens when in the pair (q,q′), some of the terms of qare replaced by others in q′(e.g. naked celebrities and naked angelina jolie). In this case, the intersection between both queries is removed, and the remaining terms in qand q′are taken as hyponym and hypernym of the candidate relation. Applying this to the previous example will give the relation celebrities ← angelina jolie as a result. It is easy to figure out that not all of this kind of specializations make up such a clear relation. (e.g. president bush, president of the united states). This is the reason why the candidate must have a positive weight (W > 0) in order to consider it as an actual hyponymy relation. 4.3.2 Harnessing trivial and disjoint specializations A trivial specialization on a pair of queries (q,q′) is that in which q′only adds terms to q, or in other words, in which q is a substring of q′ (e.g. luxury cars, american luxury cars). We talk about disjoint specialization when no terms are shared between the two queries, but according to temporal, lexical and session related clues, a classifier determines that q′ has a narrower meaning than that of q. (e.g. marvel superheroes, wolverine). The candidate selection heuristic is the same in both cases: 1. We compute the term n-gram vector for both queries. Following the luxury cars example, the gram vectors are g=[luxury, cars, luxury cars]; and g′=[american, luxury, cars, american luxury, luxury cars, american luxury cars]. 2. The set of candidates is built by combining each of the n-grams of g, with every n-gram of g′, provided that the n-gram coming from g is the hypernym (t), the one coming from g′ is the hyponym (t′), and t′ is not a substring of t. (Table 1). 3. For each candidate (t, t′) we compute W. 4. Finally, we choose the candidate with the highest positive weight, but we do not choose any –and so, the extraction is considered barren–, if for every candidate W < 0. Candidate relations luxury ← american luxury ← cars luxury ← american luxury luxury ← luxury cars luxury ← american luxury cars cars ← american cars ← luxury cars ← american luxury cars ← luxury cars cars ← american luxury cars luxury cars ← american luxury luxury cars ← american luxury cars W 0.66 -0.24 -0.84 0.0 1.00 0.11 0.66 0.66 4.00 1.00 1.00 1.00 Table 1: Candidate pairs from the combination of the n-grams in (luxury cars and american luxury cars). The candidate cars ← luxury cars has the highest weight. 5 Research design 5.1 Datasets used As described by (Silvestri, 2010): “[. . . ] one of the main challenges in doing research with query logs is that query logs, them- selves, are very difficult to obtain.” For this research we have used two of the latest, publicly available, logs: AOL 2006 (Pass et al., 2006) and MSN 2006 (Zhang and Moffat, 2006). On the one side, AOL 2006 contains more than 30 million records from about 650,000 users sampled from March to May 2006. Each record in the log contains 1) a user identifier, 2) the query string submitted by the user, 3) the timestamp of the submission; and if the user clicked on any result, then the record also includes 4) the position of the result clicked, and 5) the hostname portion of the visited URL. On the other side, the MSN 2006 log was released as part of the “Microsoft Live Labs: Accelerat- ing Search in Academic Research”1 incentive in 2006. This dataset contains about 15 million queries submitted by users from the United States during May 2006, as recorded by the MSN search engine. For each query, in addition to the same information provided by the AOL query log, this dataset also contains the number of search results that satisfied the query. One major difference between both logs is that, while AOL contains immutable user identifiers for every record originated by a certain user, the MSN log is anonymized in a way that user identifiers change each 30 minutes, preserving the users’ privacy. As it was previously explained, we rely on the number of results to check query subsumption and identify specialization with reformulation patterns. This data can appear in every query log (as it appears in MSN), but has been omitted from the AOL one. To recreate this information, we have resubmitted each query to the Yahoo! BOSS2 API. And to reduce impedances between the results gathered from Yahoo!, and those present in the MSN log, we did the same operation with the latter. At the end of this preprocessing activity, our dataset was comprised by near 45 million records containing 1) a user identifier, 2) the query string, 3) the submission timestamp, 4) the number of results of each query, and 5) click-through information. 5.2 Method implementation The experiments were applied by following a pipeline architecture in which the initial dataset is trans- formed into new data structures (figure 3). Some of the activities in the workflow are conceived to increase the method performance in two ways: 1) increasing effectiveness by reducing informational noise in the log; and 2) improving efficiency by generating new ad-hoc data structures that favor infor- mation extraction in the specialization detection, and in the relation extraction activities. 5.2.1 Noise filtering Besides navigational queries, there exist others that – because of their nature – are not valid to mine semantic relations from them. For instance, the most frequent query in the AOL log is the “ ” query, which is believed to be the result of a masking strategy by the search engine (Brenes and Gayo-Avello, 2009). In the MSN log, those queries belonging to the longest hundred sessions are recorded in an average of less than three seconds each, and there is no click information at all associated to them. This suggests that the queries were sent by a software agent through the search API (Zhang and Moffat, 2006). To reduce the amount of useless information in the log, we have defined the following criteria to consider a query as spam: • The number of characters for all the terms in the query is lower than 3. • The number of characters in any term in the query is greater than 25. • The number of terms in the query is greater than 5. • The average time between query submissions from the same user is lower than 7 seconds. 1http://research.microsoft.com/ur/us/fundingopps/RFPs/Search 2006 RFP.aspx 2http://developer.yahoo.com/search/boss Figure 3: The experiments workflow and the products generated in each activity A user who sends a query that matches at least one of the points above is considered a spammer, and the whole session where the query appears is invalidated. The product of this activity is in turn a set of sessions that are free of spam. 5.2.2 Additional data structures Applying some of the algorithms depicted in the method require additional data structures, like indices and relations. For instance, for the supervised detection of specialization patterns, there is the need to compute session related features such as The average number of clicks in search results since session begin, among all sessions containing (q,q′). For this sake, from the sessionized logs we create the following indexes: • q → [r, {s, [{i, t}]}] given a query q, its number of results, the list of sessions in which qappears, and inside the sessions, the position in which q appears and the time at which is has been submitted. • s → [{q, {p, url}}] given a session, the list of queries that make it up, and the information associ- ated to the visited results (position and target url). In addition, during the relation extraction activity, we need to calculate the weight assigned to each candidate. To do so, we need to know in which queries a given n-gram appears, and its length and offset inside a query (t → [q, p, o]). With this information we can reenter the query index and reveal which role it plays inside a certain n-gram. 5.3 Proposed evaluation method In order to measure the performance of the method developed, we must determine whether an extracted relation t ← t′ has hyponymy semantics or, in other words, if any of the following statements are true: “t’ is a t ”, or “t’ is an instance of t ”. In absence of another criterion of reference, we proposed a combined technique in which first, we test if a certain relation appears as an hyponymy relation in Wordnet (and therefore it is a valid one) or, if not, we delegate to a human judgement. To support this, we rely on the following assertions: • Most of AOL and MSN queries are written in English, the same language that Wordnet is built in. • Based on the previous one, we can apply stemming to cushion lexical deviations of the same term. • Some of the relations extracted capture common vocabulary of search engine users, in which is not unfrequent the use of jargon, slang, trade marks, and even typos. Although this kind of vocabulary does not appear in Wordnet, relations containing it can be identified by the judges. Once taken all the above into account, the following evaluation process is implemented: 1. We take a sample composed by an equal number of relations extracted (E), and discarded (D) in the relation extraction activity. As the extraction algorithm varies, and we want segmented performance numbers, the sample will also have an equal number of relations extracted from each kind of specialization pattern. 2. We create a directed graph with the hyponymy relations present in Wordnet. In that graph, the vertices are the result of applying stemming over the terms that appear in the hyponymy relations, and there is an arc that goes from an hyponym to its direct hypernym. 3. Given a candidate pair, we apply stemming to each side of the relation. Then we look whether there exists a path in that graph, going from the specific side of the relation to the general side. If it does exist, then we will have finished, and the relation is correct. 4. If the candidate pair is not present in Wordnet, two judges will evaluate if it is an actual hyponymy relation, and it it is not, they will classify the candidate as either a) synonyms (co-hyponyms), b) terms related by another kind of relationship, or c) completely unrelated terms. In case that the judges don not agree on the verdict, the following rules apply: • If both judges determine that the relation is not an hyponymy, but differ on the category assigned, the result will be c) – both terms are unrelated. • If only one of the judges determines that the relation is a proper hyponymy, the result will be the error category assigned by the other judge. 5. The last step is to calculate precision (P) and recall (R) measures in the context of classification. P is the portion of relations properly classified by the extraction algorithm (true positives) from the whole set of relations extracted (true positives + false positives). Recall on the other side, is the portion of relations properly classified (true positives) from the whole set of existing relations (true positives + false negatives). 6 Results For each specialization type from which the relations were extracted (trivial specialization, specialization with reformulation, and disjoint specialization), we have taken 500 instances identified as valid hyponimy relations (E), and 500 instances discarded by the extraction heuristic, counting for a total of 3000 instances. Then we have applied the evaluation method described above, and obtained the following results. trivial w/reformulation disjoint Aggregated Total 143 119 48 310 Wrong (false positives) co-hyponyms 6 11 3 20 other unrelated Total Wordnet 258 259 322 839 Correct (true positives) Judges 99 122 130 351 357 381 452 1190 135 105 43 283 2 3 2 7 Table 2: Results for the extracted subset (E). For the false positives, we display how many of them were judged as co-hyponymy relations, another – unspecified – type of relations, or as totally unrelated terms. trivial w/reformulation disjoint Aggregated Wrong (false negatives) Total Wordnet 25 3 24 52 Judges Total 419 486 415 1320 56 11 61 128 81 14 85 180 Correct (true negatives) co-hiponyms other unrelated 403 450 396 1249 16 31 18 65 0 5 1 6 Table 3: Results for the sample of discarded relations (D). For those wrongly classified (actual hyponymy relations) we show how many of them were present in Wordnet in contrast to those ones determined by the judges. trivial w/reformulation disjoint Aggregated E 500 500 500 1500 P R D TP FP FN 81 500 14 500 500 85 0,904 1500 0.714 0.815 0.762 0,964 0.842 180 0,793 0,868 357 381 452 1190 143 119 48 310 F1 F0,5 0.732 0.761 0.851 0.795 0.872 0,891 0.829 0,807 Table 4: Classification performance (microaveraged ). The following data is displayed: extracted and discarded set sizes (E and D respectively), true positives (TP), false positives (FP), false negatives (FN), precision (P), recall (R), balanced F-score (F1), and precision-emphasized F-score (F0.5). trivial w/reformulation disjoint Aggregated P ·Ni N 0.478 0.243 0.010 R·Ni N F1 ·Ni N F0,5 ·Ni N Ni 245.997 117.321 4.177 0.490 0.254 0.010 N = 367.495 P = 0,731 R = 0.863 F1 = 0,791 F0.5 = 0,754 0.509 0.272 0.010 0.546 0.308 0.010 Table 5: Classification performance (macroaveraged ). For each kind of specialization pattern, propor- tional contribution to the global precision, recall and F-measures are displayed, in addition to total the number of specializations found on the provided datasets. 7 Implications and future directions 7.1 Discussion From the initial dataset comprised of about 45 million queries, 367,495 were identified as specialization patterns. From these patterns, 51,300 hyponymy relations were extracted, from which only 7,714 were not repeated. This results show that only one out of 3,000 query pairs generate a valid hyponymy relation, and as a consequence a much bigger source of information is needed to effectively use this method in a large-scale search system. Despite all, a commercial search engine can serve up to 4,700 million queries a day (Comscore, 2012), and this is more than 100x the data we had for this study. We believe this vast amount of information is more than the necessary to build a useful taxonomy. Regarding performance, it can be seen that the method behaves better when dealing with disjoint specializations (P = 0.904). At the same time this is the less frequent kind of specializations, with less than 1% of contribution to the whole method’s performance (P = 0.731). This happens due to the fact that disjoint specializations do not share any term between the two queries, and as the sessionization algorithm takes into account query similarity, it is very uncommon that two dissimilar queries appear on the same topical-session, reducing the number of instances of this kind. Another interesting aspect is that the number of false positives derived from a wrong interpretation of co-hyponymy relations (e.g. bill clinton ← monica lewinsky) is consistently higher in specializations with reformulation. This happens because the number of results for one of queries in the pattern is much higher than the other (i.e. the subsumption algorithm will determine an specialization) (figure 4), and the terms also appear in a wide variety of other patterns playing the same role (e.g. clinton scandal, lewinsky scandal) increasing the weight W of the candidate. Those relations whose terms appear as other kind of relations different from the hyponymy and co-hyponymy can be considered marginal (less than 0.5%). Other relations whose terms are determined as unrelated (91.29%) appear in a proportional way for each specialization type, and are caused by the existence of stop words such as from, to or is, and also by others with an extremely high frequency (e.g. britney spears), which appear in different contexts increasing candidates’ weight. In order to cushion the impact of such terms, we could integratetf x idf measures into the weight calculus, thus reducing the overall score of a relation containing less relevant terms. This is left for future work. Finally, we can highlight the fact that a consistent ratio of the relations (29.6%) does not exist in Wordnet. Wordnet contains 155.287 words arranged in 117.000 sunsets Miller et al. (1990), covering almost an 85% of the lexicon in the Oxford Dictionary3. This ratio means that nearly 3 out of 10 relations contain terms that are common in users’ vocabulary, but do not appear in formal lexicons, such as brand names (e.g. briefs ← speedo); people names (celebrities ← angelina jolie), or even typos (britney spears ← brittney spears). This semantic information clearly serves to the purpose of increasing query suggestion and expansion effectiveness. Figure 4: Number of results for clinton white house and lewinsky white house 7.2 Conclusions Given the results shown and discussed above, we are now able to answer the research questions that motivated this study: (q1) Is it possible to automatically generate term taxonomies containing the common vocabulary em- ployed by web users? Yes, it is. And, in addition, our method has an acceptable performance (F0,5 = 0.754), and can be implemented for large scale deployments with minimum effort. (q2) If it is so, can it be done by using just the information contained in the query log, with no additional sources of information? Yes, it can. The only information that is not contained in the query log is the training set used in the supervised identification activity. This information, like the rest of the code for the algorithms used, is only required at design time and does not need any additional maintenance. Other sources of information like dictionaries, search result snippets, text corpora, or any kind of semantic repositories 3http://www.oup.com/online/oed/ are not used at all, so we can conclude that our method only operates on information contained in the query log. (q3) Is it possible to do all the above in a language-independent way? Most of the queries in our dataset are written in English. Due to this, we could not measure the performance of our method in other languages. However, we have no evidence that it cannot work for other languages in which queries can be split into terms and these, in turn, into character n-grams as this is the only lexical information actually used. There is no evidence either, that our method could not be applied to Chinese and other languages in which text is not segmented, as other scholars (Yang et al., 2000; Gao et al., 2005) have developed methods to deal with text segmentation in these languages. To sum up, we have developed a method for the automatic extraction of hyponoymy relations using query logs as the only source of information with independence of the language in which the queries are written –at least for the occidental ones– , and capturing the common vocabulary of web search users. This will allow: • To increase web search engines effectiveness and efficiency by improving query suggestion and expansion methods. • To organize the parole of web search users in a reasonable and fast way, reflecting everyday aspects of the language that are not covered by formal classification systems, such as linguistic dictionaries and wordnets. • To obtain term taxonomies for languages in which wordnets are scarce or do not even exist. • To serve as inspiration for future and ongoing works on semantic information extraction, and from other limited sources of information such as folksonomies or micro-posts. 7.3 Future work In the same research line, it would be interesting to: • Try to increase the ratio of disjoint specializations by applying supervised pattern identification also for revealing topical sessions. • Identify other kind of relationships different from hyponymy. • Study the literature on text segmentation and entity recognition and try to apply them both to extract taxonomies in other languages, and to increase the accuracy of our method. • Develop a model for related query recommendation. Other related lines of research, would be: • Enriching other existing datasources with semantic information (e.g Wikipedia, DBPedia, Free- base, etc.) • Filtering and curating taxonomies with the semantic information contained in the previous repos- itories. • Using taxonomies for semantic query tagging (i.e. determine which terms in the query describe a person, a place, or a product, among others). • Given proper tagged queries, determine the user’s intention behind each one. • The application of the points above (semantic query tagging and identification of user intention) to filter search results, and to provide new ways of arranging them, further than document lists. • Apply what we have learnt to new user generated data sources, such as Twitter. References Ricardo Baeza-Yates and Alessandro Tiberi. Extracting semantic relations from query logs. In Pro- ceedings of the 13th ACM SIGKDD international conference on Knowledge discovery and data mining, KDD ’07, page 7685, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-609-7. doi: 10.1145/1281192.1281204. URL http://doi.acm.org/10.1145/1281192.1281204. Matthew Berland and Eugene Charniak. Finding parts in very large corpora. In Proceedings of the 37th annual meeting of the Association for Computational Linguistics on Computational Linguistics, ACL ’99, pages 57–64, Stroudsburg, PA, USA, 1999. Association for Computational Linguistics. ISBN 1- 55860- 609-3. doi: 10.3115/1034678.1034697. URL http://dx.doi.org/10.3115/1034678.1034697. P. Boldi, F. Bonchi, C. Castillo, and S. Vigna. From dango to japanese cakes: Query reformulation models and patterns. In Web Intelligence and Intelligent Agent Technologies, 2009. WI-IAT’09. IEEE/WIC/ACM International Joint Conferences on, volume 1, pages 183–190. IEEE, 2009. David J. Brenes and Daniel Gayo-Avello. Stratified analysis of AOL query log. Infor- mation Sciences, 179(12):1844–1858, May 2009. doi: 10.1016/j.ins.2009.01.027. URL http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6V0C-4VJBTTF-1&_user= 10&_rdoc=1&_fmt=&_orig=search&_sort=d&_docanchor=&view=c&_acct=C000050221&_version= 1&_urlVersion=0&_userid=10&md5=7c7fa5cd6b6e1017500b4e7607393871. Andrei Broder. A taxonomy of web search. SIGIR Forum, 36(2):3–10, 2002. doi: 10.1145/792550.792552. URL http://portal.acm.org/citation.cfm?id=792552. S.A. Caraballo. Automatic construction of a hypernym-labeled noun hierarchy from text. In Proceed- ings of the 37th annual meeting of the Association for Computational Linguistics on Computational Linguistics, pages 120–126. Association for Computational Linguistics, 1999. Shui-Lung Chuang and Lee-Feng Chien. Enriching web taxonomies through subject categorization of query terms from search engine logs. Decision Support Systems, 35(1):113–127, April 2003. ISSN 0167-9236. doi: 10.1016/S0167-9236(02)00099-4. URL http://www.sciencedirect.com/science/ article/pii/S0167923602000994. Shui-Lung Chuang and Lee-Feng Chien. A practical web-based approach to generating topic hierarchy for text segments. In Proceedings of the thirteenth ACM international conference on Information and knowledge management, CIKM ’04, page 127136, New York, NY, USA, 2004. ACM. ISBN 1-58113- 874-1. doi: 10.1145/1031171.1031193. URL http://doi.acm.org/10.1145/1031171.1031193. Shui-Lung Chuang and Lee-Feng Chien. Taxonomy generation for text segments: A practical web-based approach. ACM Trans. Inf. Syst., 23(4):363396, October 2005. ISSN 1046-8188. doi: 10.1145/1095872. 1095873. URL http://doi.acm.org/10.1145/1095872.1095873. P. Clough, H. Joho, and M. Sanderson. Automatically organising images using concept hierarchies. In proceedings of the Multimedia Workshop running at ACM SIGIR conference, 2005. Comscore. comScore Releases December 2011 U.S. Search Engine Rankings, 2012. URL http://www.comscore.com/Press_Events/Press_Releases/2012/1/comScore_Releases_ December_2011_U.S._Search_Engine_Rankings/. J. Ellman. Eurowordnet: A multilingual database with lexical semantic networks: Edited by piek vossen. kluwer academic publishers. 1998. isbn 0792352955, 179 pages. Natural Language Engineering, 9(04): 427–430, 2003. D. Fallows. Almost half of all internet users now use search engines on a typical day. Pew Internet and American Life Project Memo, 2008. Miguel Fernandez-Fernandez and Daniel Gayo-Avello. Hierarchical taxonomy extraction by mining topical query sessions. In In proceedings of the International Conference of Knowledge Discovery and Information Retrieval 2009, pages 229–235, Funchal, Madeira (Portugal), 2009. E. Gabrilovich and S. Markovitch. Harnessing the expertise of 70,000 human editors: Knowledge-based feature generation for text categorization. Journal of Machine Learning Research, 8:2297–2345, 2007. Jianfeng Gao, Andi Wu, Mu Li, and Chang-ning Huang. Chinese word segmentation and named entity recognition: a pragmatic approach. COMPUTATIONAL LINGUISTICS, 31:574, 2005. URL http: //citeseer.uark.edu:8080/citeseerx/viewdoc/summary?doi=10.1.1.69.7099. Daniel Gayo-Avello. A survey on session detection methods in query logs and a proposal for future evaluation. Inf. Sci., 179(12):1822–1843, 2009. URL http://portal.acm.org/citation.cfm?id= 1523556. R. Girju, A. Badulescu, and D. Moldovan. Learning semantic constraints for the automatic discovery of part-whole relations. In Proceedings of the 2003 Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology-Volume 1, pages 1–8. Association for Computational Linguistics, 2003. Daqing He, Ayse Goker, and David Harper. Combining evidence for automatic web session identification. Inf. Process. Manage., 38(5):727–742, 2002. ISSN 0306-4573. URL http://dx.doi.org/10.1016/ S0306-4573(01)00060-7. Marti A. Hearst. Automatic acquisition of hyponyms from large text corpora. In Proceedings of the 14th conference on Computational linguistics - Volume 2, COLING ’92, page 539545, Stroudsburg, PA, USA, 1992. Association for Computational Linguistics. doi: 10.3115/992133.992154. URL http: //dx.doi.org/10.3115/992133.992154. Paul Heymann and Hector Garcia-Molina. Collaborative creation of communal hierarchical taxonomies in social tagging systems. http://ilpubs.stanford.edu:8090/775/?auth=basic, April 2006. URL http: //ilpubs.stanford.edu:8090/775/?auth=basic. Bernard J. Jansen, Danielle L. Booth, Am, and a Spink. Determining the informational, navigational, and transactional intent of web queries. Information Processing & Management, 44(3):1251–1266, May 2008. doi: 10.1016/j.ipm.2007.07.015. URL http://www.sciencedirect.com/science? _ob=ArticleURL&_udi=B6VC8-4PMT5X4-2&_user=10&_rdoc=1&_fmt=&_orig=search&_sort= d&_docanchor=&view=c&_searchStrId=1152600747&_rerunOrigin=scholar.google&_acct= C000050221&_version=1&_urlVersion=0&_userid=10&md5=07b115aab3727895f2274076aecb29ca. M. Komachi and H. Suzuki. Minimally supervised learning of semantic knowledge from query logs. In Proceedings of the 3rd International Joint Conference on Natural Language Processing, pages 358–365, 2008. R. Mandala, T. Tokunaga, and H. Tanaka. Complementing wordnet with roget’s and corpus-based thesauri for information retrieval. In Proceedings of the ninth conference on European chapter of the Association for Computational Linguistics, pages 94–101. Association for Computational Linguistics, 1999. R. Mihalcea. Turning wordnet into an information retrieval resource: Systematic polysemy and conver- sion to hierarchical codes. International journal of pattern recognition and artificial intelligence, 17 (5):689–704, 2003. Peter Mika. Ontologies are us: A unified model of social networks and semantics. In Yolanda Gil, Enrico Motta, V. Benjamins, and Mark Musen, editors, The Semantic Web ISWC 2005, volume 3729 of Lecture Notes in Computer Science, pages 522–536. Springer Berlin / Heidelberg, 2005. ISBN 978-3- 540-29754-3. URL http://www.springerlink.com/content/f68p442351736187/abstract/. George A Miller, Richard Beckwith, Christiane Fellbaum, Derek Gross, and Katherine Miller. WordNet: an on-line lexical database. International Journal of Lexicography, 3:235–244, 1990. doi: 10.1.1.88. 6804. URL http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.88.6804. Emmanuel Morin and Christian Jacquemin. Automatic acquisition and expansion of hypernym links. Computers and the Humanities, 38(4):363–396, 2004. ISSN 0010-4817. doi: 10.1007/ s10579-004-1926-2. URL http://www.springerlink.com/content/tn7h6gg278x05431/abstract/. M. Pasca. Weakly-supervised discovery of named entities using web search queries. In Proceedings of the sixteenth ACM conference on Conference on information and knowledge management, pages 683–690. ACM, 2007. M. Pasca and B. Van Durme. What you seek is what you get: Extraction of class attributes from query logs. In Proceedings of the 20th International Joint Conference on Artificial Intelligence (IJCAI-07), pages 2832–2837, 2007. M. Pasca, D. Lin, J. Bigham, A. Lifchits, and A. Jain. Organizing and searching the world wide web of facts-step one: the one-million fact extraction challenge. In Proceedings of the National Conference on Artificial Intelligence, volume 21, page 1400. Menlo Park, CA; Cambridge, MA; London; AAAI Press; MIT Press; 1999, 2006. Greg Pass, Abdur Chowdhury, and Cayley Torgeson. A picture of search. In Proceedings of the 1st international conference on Scalable information systems, InfoScale ’06, New York, NY, USA, 2006. ACM. ISBN 1-59593- 428-6. doi: 10.1145/1146847.1146848. URL http://doi.acm.org/10.1145/ 1146847.1146848. M. F. Porter. An algorithm for suffix stripping. Program: electronic library and information sys- tems, 14(3):130–137, December 1980. ISSN 0033-0337. doi: 10.1108/eb046814. URL http: //www.emeraldinsight.com/journals.htm?articleid=1670983&show=abstract. John Ross Quinlan. C4.5: Programs for Machine Learning. Morgan Kaufmann, 1993. ISBN 9781558602380. P. Schmitz. Inducing ontology from flickr tags. In Collaborative Web Tagging Workshop at WWW2006, Edinburgh, Scotland, pages 210–214, 2006. E. Schwarzkopf, D. Heckmann, D. Dengler, and A. Kroner. Mining the structure of tag spaces for user modeling. In Complete On-Line Proceedings of the Workshop on Data Mining for User Modeling at the 11th International Conference on User Modeling. Corfu, Griechenland, pages 63–75, 2007. Satoshi Sekine and Hisami Suzuki. Acquiring ontological knowledge from query logs. In Proceedings of the 16th international conference on World Wide Web, pages 1223–1224, Banff, Alberta, Canada, 2007. ACM. ISBN 978-1-59593-654-7. doi: 10.1145/1242572.1242777. URL http://portal.acm. org/citation.cfm?id=1242777. Dou Shen, Min Qin, Weizhu Chen, Qiang Yang, and Zheng Chen. Mining web query hierarchies from clickthrough data. Artificial Intelligence, pages 341–346, 2007. Fabrizio Silvestri. Mining query logs: Turning search usage data into knowledge. Foundations and Trends in Information Retrieval, 4(1-2):1–174, 2010. ISSN 1554-0669, 1554-0677. doi: 10.1561/1500000013. URL http://www.nowpublishers.com/product.aspx?product=INR&doi=1500000013. Amanda Spink. Modeling users” successive searches in digital Environments:A national science Foun- dation/British library funded study. Technical report, Corporation for National Research Initiatives, 1998. URL http://portal.acm.org/citation.cfm?id=865316. P. Vossen and C. Fellbaum. Wordnets in the world. Technical report, 2004. L. Xiong and E. Agichtein. Towards privacy-preserving query log publishing. In Query Log Analysis: So- cial And Technological Challenges. A workshop at the 16th International World Wide Web Conference (WWW2007)., 2007. Christopher C. Yang, Johnny W. K. Luk, Stanley K. Yung, and Jerome Yen. Combination and boundary detection approaches on chinese indexing. JOURNAL OF THE AMERICAN SOCI- ETY FOR INFORMATION SCIENCE, 51:340—351, 2000. URL http://citeseer.uark.edu: 8080/citeseerx/viewdoc/summary?doi=10.1.1.108.8593. Y. Zhang and A. Moffat. Some observations on user search behavior. In Proceedings of the 11th Aus- tralasian Document Computing Symposium, volume 11, pages 1–8, 2006.
1610.05652
2
1610
2016-10-19T14:25:42
Vietnamese Named Entity Recognition using Token Regular Expressions and Bidirectional Inference
[ "cs.CL" ]
This paper describes an efficient approach to improve the accuracy of a named entity recognition system for Vietnamese. The approach combines regular expressions over tokens and a bidirectional inference method in a sequence labelling model. The proposed method achieves an overall $F_1$ score of 89.66% on a test set of an evaluation campaign, organized in late 2016 by the Vietnamese Language and Speech Processing (VLSP) community.
cs.CL
cs
Vietnamese Named Entity Recognition using Token Regular Expressions and Bidirectional Inference Phuong Le-Hong College of Science Vietnam National University, Hanoi, Vietnam Email: [email protected] 6 1 0 2 t c O 9 1 ] L C . s c [ 2 v 2 5 6 5 0 . 0 1 6 1 : v i X r a Abstract-This paper describes an efficient approach to im- prove the accuracy of a named entity recognition system for Vietnamese. The approach combines regular expressions over tokens and a bidirectional inference method in a sequence labelling model. The proposed method achieves an overall F1 score of 89.66% on a test set of an evaluation campaign, organized in late 2016 by the Vietnamese Language and Speech Processing (VLSP) community. derived from our newly proposed token regular expressions. This section also presents an algorithm we develop to annotate every token of an input sentence with its regular expression type. Section IV introduces a bidirectional decoding scheme and a method to combine forward and backward models to get a better model. Section V gives experimental results and discussions. Finally, Section VI concludes the paper. I. INTRODUCTION Named entity recognition (NER) is a fundamental task in natural language processing and information extraction. It involves identifying noun phrases and classifying each of them into a predefined class. In 1995, the 6th Message Under- standing Conference (MUC) started evaluating NER systems for English, and in subsequent shared tasks of CoNLL 2002 and CoNLL 2003 conferences, language independent NER systems were evaluated. In these evaluation tasks, four named entity types were considered, including names of persons, organizations, locations, and names of miscellaneous entities that do not belong to these three types. More recently, the Vietnamese Language and Speech Pro- cessing (VLSP) community has organized an evaluation cam- paign to systematically compare NER systems for the Viet- namese language. Similar to the CoNLL 2003 share task, four named entity types are evaluated: persons (PER), organizations (ORG), locations (LOC), and miscellaneous entities (MISC). The data are collected from electronic newspapers published on the web. This paper presents the approach and experimental results of our participating system on this evaluation campaign. In summary, the overall F1 score of our system is 89.66% on a development set extracted from the training dataset provided by the organizing committee of the evaluation campaign. Three important properties of our approach include (1) use of token regular expressions to encode regularities of organization and location names, (2) an algorithm to annotate every token in an input sentence with their token regular expression types, and (3) a bidirectional decoding approach to boost the accuracy of the system. The remainder of this paper is structured as follows. Sec- tion II gives a brief introduction of multinomial logistic regression, the main machine learning model which is used in our system. Section III describes in detail the features used in our model, including common features used in NER and those II. MULTINOMIAL LOGISTIC REGRESSION Multinomial logistic regression (a.k.a maximum entropy model) is a general purpose discriminative learning method for classification and prediction which has been successfully applied to many problems of natural language processing, such as part-of-speech tagging, syntactic parsing and named entity recognition. In contrast to generative classifiers, discriminative classifiers model the posterior P (y x) directly. One of the main advantages of discriminative models is that we can integrate many heterogeneous features for prediction, which are not necessarily independent. Each feature corresponds to a constraint on the model. In this model, the conditional probability of a label y given an observation x is defined as P (y x) = exp(θ · φ(x, y)) Py∈Y exp(θ · φ(x, y)) , where φ(x, y) ∈ RD is a real-valued feature vector, Y is the set of labels and θ ∈ RD is the parameter vector to be estimated from training data. This form of distribution corresponds to the maximum entropy probability distribution satisfying the constraint that the empirical expectation of each feature is equal to its true expectation in the model: bE(φj(h, t)) = E(φj (h, t)), ∀j = 1, 2, . . . , D. The parameter θ ∈ RD can be estimated using iterative scaling algorithms or some more efficient gradient-based op- timization algorithms like conjugate gradient or quasi-Newton methods [1]. In this paper, we use the L-BFGS optimization algorithm [2] and L2-regularization technique to estimate the parameters of the model. This classification model is applied to build a classifier for the dependency parser where each observation x is a parsing configuration and each label y is a transition type. III. FEATURE REPRESENTATIONS In discriminative statistical classification models in general and the maximum entropy model in particular, features play an important role because they provide the discriminative ability to efficiently disambiguate classes. In order to facilitate the extraction of various feature types, each lexical token is associated with a surface word and an annotation map containing different information of the text in the form of key and value pairs. The current annotation map includes values for part-of-speech, chunk, token regular expression type and named entity label. In the context of named entity recognition, the information about surface word, part-of-speech and chunk tag are given; and in a training phrase, named entity tags are also provided. In the next subsection, we describe the regular expression types which are associated with each token to add some helpful semantic information for named entity disambiguation. A. Regular Expressions over Tokens We use regular expressions at both character level and token level to infer useful features for disambiguating named entities. While character-level regular expressions are used to detect word shape information, which was shown very important in NER, token-level regular expressions are very helpful to detect word sequence information in many long named entities [3]. Common word shape features that our system uses include: • is lower word, e.g., "tỉnh" • is capitalized word, e.g., "Tổng_cục" • contains all capitalized letters (allcaps), e.g., "UBND" • is mixed case letters, e.g., "iPhone" • is capitalized letter with period, e.g., "H.", "Th.", "U.S." • ends in digit, e.g., "A9", "B52" • contains hyphen, e.g., "H-P" • is number, e.g., "100" • is date, e.g., "20-10-1980", "10/10" • is code, e.g, "21B" • is name, where consecutive syllables are capitalized, e.g., "Hà_Nội", "Buôn_Mê_Thuột" Using the word shape features presented above, we then introduce regular expressions over a sequence of words to capture its regularity. Suppose that fPress(w) is a boolean function which returns true if w is in a set of predefined words related to press and newspaper domain, for example {"báo", "tờ", "tạp_chí", "đài", "thông_tấn_xã"}, and returns false otherwise. And suppose that fName(w) is a boolean function which returns true if w is a name or an allcaps, and returns false otherwise. Then, we can define the following token regular expressions to capture the name of a news agency: [fPress, fName] This sequence pattern matches many different, probably un- seen news agency names, such as "báo Tuổi_Trẻ, thông_tấn_xã Việt_Nam", or "tờ Batam". In a similar way, suppose that we have a function fProvince which matches common names of administrative structure at various levels such as "{tỉnh, xã,. . . }", we can build a sequence pattern thành_phố, quận, huyện, [fAllcaps, fProvince, fName] which matches many corresponding organization names such as "UBND thành_phố Đà_Nẵng", "HĐND huyện Mù_Căng_Chải", etc. Note that an elementary token pattern can be reused in mul- tiple sequence patterns. For example, the following sequence pattern [fProvince, fName] provincial names, which can match of type location, such as "tỉnh Quảng_Ninh", "thành_phố Hồ_Chí_Minh". are usually By examining the training data, we have manually built a dozen of regular expresions to match common organization names, and six regular expressions to match common location names. These regular expressions over tokens are shown to provide helpful features for classifying candidate named entities, as shown in the experiments. B. Regular Expression Type Annotation Once regular expressions over tokens have been defined, we add a regular expression type for each word of an input sentence by annotating its corresponding annotation map key. Together with word identity, word shape, part-of-speech and chunk tag information, regular expression types provide help- ful information for better classifying named entities, as shown in the latter experiments. We use a greedy algorithm to annotate regular expres- sion type for every word if it has. Basically, the algorithm works as follows. Given a sequence of T tokens (or words) [w1, w2, . . . , wT ] and a map of regular expressions over tokens, each key name defines a pattern sequence: (patternName, patternRegExp), we first search for all positions of the sentence which begins a pattern match, and select the longest match, say, pattern patternName which ranges from token wi to token wj , for 1 ≤ i < j ≤ T . Then, all the tokens wi, wi+1, . . . , wj are annotated with the same regular expression type pat- ternName. And finally, the algorithm recursively annotates types for tokens in the remaining two halves of the sequence [w1, w2, . . . , wi−1] and [wj+1, wj+2, . . . , wT ]. Note that this is a greedy method in that we always choose the longest pattern in each run. This is a plausible approach since if there are multiple matches, longer patterns tend to be more correct than shorter ones. For example, there are two matches on the token sequence "UBND tỉnh Đồng_Nai", one is an organization name over the entire sequence, and another is a location name over the last two tokens; the longer one is the correct match. C. Feature Set In this subsection, we describe the full feature set that is used in our system to classify a token at a position of a sentence. path on a lattice of size K × T where K = Y is the size of the tag set. Note that in the second-order Markov model as above, each context cj uses the two tags yj−2 and yj−1 which have been infered in the previous steps. That said, this is a left-to-right inference scheme. In the experiments, we use a greedy update at each position j where the tag yj is chosen as the best tag of each local probabilty distribution computed by the maximum entropy model. A reversed inference scheme does the same decoding proce- dure but in a right-to-left fashion, where two tags yj+2, yj+1 are infered before decoding yj. In essence, when performing backward decoding, we can use the same Viterbi decoding procedure as in the forward counterpart, but now using a backward maximum entropy model to compute the probability of a tag given its following tags. It turns out that both the training and decoding procedure for this model can be reused simply by reversing the word and tag sequences at both training and test stages. An important finding in our experiments is that the back- ward model is much better than the forward model in recog- nizing location names while it is much worse in recognizing person names. We therefore propose a method to combine the strength of the two models to boost the accuracy of the final model. The combination method will be presented in detail in the experiments. A. Datasets V. EXPERIMENTS We evaluate our system on the training dataset provided by the VLSP NER campaign.1 This dataset contains 16, 858 tagged sentences, totaling 386, 520 words. The dataset contains four different types of named entities: person (PER), loca- tion (LOC), organization (ORG), and miscellaneous (MISC). Since the real test set has not been released, we divide this training set into two parts, one for training and another for development. The training dataset has 306, 512 tokens (79.3% of the corpus), and the development dataset has 80, 007 tokens (20.7% of the corpus). The multinomial logistic regression models used in our system are trained by the L-BFGS optimization algorithm using the L2-regularization method with regularization param- eter fixed at 10−6.2 The convergence tolerance of objective function is also fixed at 10−6. The maximum number of iterations of the optimization algorithm is fixed at 300. That is, the training terminates either when the function value converges or when the number of iterations is over 300. We use the feature hashing technique as a fast and space-efficient method of vectorizing features. The number of features for our models are fixed at 262, 144 (that is, 218). These parameters values are chosen according to a series of experiments, for example, using a smaller number of features 1http://vlsp.org.vn/evaluation_campaign_NER 2Using a larger regularization parameter underfits the model. P (yjcj) = exp(θ · φ(cj , yj)) Pyj ∈Y exp(θ · φ(cj , yj)) , ∀j = 1, 2, . . . , T, B. Parameter Settings • Basic features: current word w0, current part-of-speech p0, current chunk tag c0, previous named entity tags t−1 and t−2 (or a special padding token "BOS" – begin of sentence); • Word shape features, as described in the previous sub- section; • Basic joint features: previous word w−1 (or "BOS"), joint of current and previous word w0 + w−1, next word w+1 (or "EOS" – end of sentence), joint of current and next word w0 + w+1, previous part-of-speech p−1, joint of current and previous part-of-speech p0 + p−1, next part- of-speech p+1, joint of current and next part-of-speech p0 + p+1, joint of previous and next part-of-speech p−1 + p+1, joint of current word and previous named entity tag w0 + t−1; • Regular expression types: current regular expression (reg- exp) type r0 (or "NA" – not available), previous regexp type r−1 (or "NA"/"BOS"), joint feature r0 + r−1, next regexp type r+1 (or "NA"/"EOS"), joint feature r0 + r+1, joint features between current word and regexp types w0 + r0, w0 + r−1, w0 + r+1, and lastly, joint features between current part-of-speech and regexp types p0 + r0, p0 + r−1, and p0 + r+1. IV. BIDIRECTIONAL DECODING The standard decoding algorithm for sequence labelling is the Viterbi algorithm, which is a dynamic programming algorithm for finding the most likely sequence of tags given a sequence of observations. In this work, we also use the Viterbi algorithm to find the best tag sequence for a given word sequence. However, we found a significant improvement of tagging accuracy when combining two decoding directions, both forward decoding and backward decoding. In this section, we describe our bidirectional decoding approach. Given a sequence of T words [w1, w2, . . . , wT ], for each word wj , a pre-trained multinomial logistic regression model computes a conditional probability distribution over possible tags yj ∈ Y: where φ(cj , yj) is the feature function which extract features from context cj containing known information up to position j. As described in the previous section, cj encodes useful features for predicting yj , including those extracted from a local word window wj−2, . . . , wj+2, two previous tags yj−1, yj−2, and joint features between them. The probability of a tag sequence given a word sequence is approximated by using the Markov property. In a log scale, we have log P (y1, . . . , yT w1, . . . , wT ) ≈ TX j=1 log P (yjcj). The Viterbi algorithm is then used to find the best tag sequence by1, by2, . . . ,byT corresponding to the max-probability (say, 217) reduces slightly the performance of the models, while using a larger number does not result in an improvement of accuracy but increase the training time. C. Main Results We train our proposed models on the training set and test them on the development set as described in the previous subsection. The performance of our system is evaluated on the development set by running the automatic evaluation script of the CoNLL 2003 shared task3. The main results are shown in Table I. Table I: Performance of our system Type All LOC MISC ORG PER Precision Recall F1 89.56% 89.75% 89.66 84.97% 94.13% 89.32 93.02% 81.63% 86.96 79.75% 52.72% 63.48 94.82% 92.75% 93.77 Our system achieves an F1 score of 89.66% overall. Organi- zation names are the most difficult entity type for the system, whose F1 is the lowest of 63.48%. Person names are the easiest type for the system whose both precision and recall ratios are high and the F1 score of this type is 93.77%. D. Effect of Bidirectional Inference In this subsection we report and discuss the results using unidirectional inference, either forward and backward. The performance of the forward model is shown in Table II and that of the backward model is shown in Table III. Table II: Performance of the forward model Type All LOC MISC ORG PER Precision Recall F1 88.08% 87.10% 87.59 81.61% 86.54% 84.00 97.67% 85.71% 91.30 79.75% 52.72% 63.48 94.38% 93.45% 93.91 Table III: Performance of the backward model Type All LOC MISC ORG PER Precision Recall F1 88.03% 87.94% 87.98 85.60% 91.80% 88.59 100.00% 83.67% 91.11 66.45% 43.10% 52.28 92.15% 92.54% 92.34 wn−1 and so on. We conjecture that this is due to the natural structure of Vietnamese location names. However, the backward model underperforms the forward model in recognizing the organization names by a large margin. Its F1 score of this type is only 52.28%, while that of the forward model is 63.48%. This is understandable because our token regular expressions are designed to capture regularities in many organization names, as described in the subsection III-A, but these expressions do not work anymore if an input token sequence is reversed. Either of the two unidirectional models achieves an overall F1 score of 88.00% but when they are combined, our system achieves an overal score of 89.66%, as presented in the previous subsection. The combined model has both the strong ability of recognizing location names of the backward model and is good at recognizing organization names of the forward model. E. Effect of Token Regular Expressions In this subsection, we report the effectiveness of token regular expressions to our model. We observe that using token regular expressions significantly improves the performance of the system. If the token regular expressions for ORG type are not used, its F1 score of the forward model is 62.94%. Adding token regular experessions for this type help boost this score to 65.01%. Similarly, when token regular expressions for LOC are not used, its score of the forward model is 82.19%. Adding six token regular expressions for this type improves its score to 83.07%. However, we observe that when all the regular expressions for this two named entity types are used together, they interact with each other and make their scores slightly different, as shown in the Table II. F. Software The named entity recognition system developed in this work has been integrated into the Vitk toolkit, which includes some fundamental tools for processing Vietnamese texts. The toolkit is developed in Java and Scala programming languages, which is open source and freely downloadable for research purpose.4 An interesting property of this toolkit is that it is an Apache Spark application, which is a fast and general engine for large scale data processing. As a result, Vitk is a very fast and scalable toolkit for processing big text data. VI. CONCLUSION We see that the backward model is better than the forward model by 4.6 point of F1 score in recognizing location names. This is surprising since the only difference between the two models is a reverse of input sentences. One possible explanation of this effect is that when recognizing location names of a token sequence w1, w2, . . . , wn, if we already know about the type of wn it is easier to predict its previous token We have introduced our approach and its experimental result in named entity recognition for Vietnamese text. We have shown the effectiveness of using token regular expressions, of bidirectional decoding method in a conditional Markov model for sequence labelling, and of combining the backward and forward models. Our system achieves the overall F1 score of 89.66% on a test corpus. 3http://www.cnts.ua.ac.be/conll2003/ner/ 4https://github.com/phuonglh/vn.vitk ACKNOWLEDGEMENTS This research is partly financially supported by Alt Inc.5, and in particular we thank Dr. Nguyen Tuan Duc, the head of Alt Hanoi office. We thank the developers of the Apache Spark software. REFERENCES [1] G. Andrew and J. Gao, "Scalable training of l1-regularized log-linear models," in Proceedings of ICML, Oregon State University, Corvallis, USA, 2007, pp. 33–40. [2] J. Nocedal and S. J. Wright, Numerical Optimization, 2nd ed. New York: Springer, 2006. [3] E. F. Tjong Kim Sang and F. De Meulder, "Introduction to the conll- 2003 shared task: Language-independent named entity recognition," in Proceedings of CoNLL-2003, W. Daelemans and M. Osborne, Eds. Edmonton, Canada, 2003, pp. 142–147. 5http://alt.ai/corporate
1809.06641
2
1809
2018-09-19T10:16:52
Talking to myself: self-dialogues as data for conversational agents
[ "cs.CL", "cs.AI" ]
Conversational agents are gaining popularity with the increasing ubiquity of smart devices. However, training agents in a data driven manner is challenging due to a lack of suitable corpora. This paper presents a novel method for gathering topical, unstructured conversational data in an efficient way: self-dialogues through crowd-sourcing. Alongside this paper, we include a corpus of 3.6 million words across 23 topics. We argue the utility of the corpus by comparing self-dialogues with standard two-party conversations as well as data from other corpora.
cs.CL
cs
Talking to myself: self-dialogues as data for conversational agents Joachim Fainberg Ben Krause Mihai Dobre Marco Damonte Emmanuel Kahembwe Daniel Duma Bonnie Webber Federico Fancellu School of Informatics University of Edinburgh Edinburgh, UK {j.fainberg,ben.krause,bonnie.webber,f.fancellu}@ed.ac.uk 8 1 0 2 p e S 9 1 ] L C . s c [ 2 v 1 4 6 6 0 . 9 0 8 1 : v i X r a Abstract Conversational agents are gaining popularity with the increasing ubiquity of smart devices. However, training agents in a data driven man- ner is challenging due to a lack of suitable corpora. This paper presents a novel method for gathering topical, unstructured conversa- tional data in an efficient way: self-dialogues through crowd-sourcing. Alongside this pa- per, we include a corpus of 3.6 million words across 23 topics. We argue the utility of the corpus by comparing self-dialogues with stan- dard two-party conversations as well as data from other corpora. 1 Introduction Open-domain conversational agents have recently gained significant attention from the machine learning community through competitions such as the Amazon Alexa Prize1. They have stoked pub- lic interest via devices such as the Amazon Echo and Google Home. By design, open-domain con- versational agents require the ability to converse about a broad set of topics in a fluid and uncon- strained manner while keeping dialogue with the end-user coherent, clear and engaging. These requirements make it difficult and of- ten impractical to use data-driven methods since the available conversational corpora are either too small, artificial, narrowly focused and often do not model any of the domain or the entities that a user may wish to talk about. Conversational corpora are also expensive to gather and require two peo- ple who have never met each other and may not have the same knowledge of a topic to hold a con- versation. This paper proposes a novel way to gather do- main specific, conversational data in an efficient, cost-saving way: self-dialogues through crowd- sourcing. Instead of a standard, two party conver- sation, self-dialogues are fictitious conversations orchestrated by one person who plays both parts in a dialogue. Using this technique we collect a corpus of approximately 3 million words across 23 topics via Amazon Mechanical Turk, that we make available alongside this paper2. We initially collected and used this corpus in our entry to the Amazon Alexa Prize 2017 (Krause et al., 2017), and present more detailed analysis of the dataset here. We report two preliminary analyses of the cor- pus. First, we compare our dataset with standard two-party conversations and find that our setup not only halves costs, since one person is paid per con- versation instead of two, but also leads to better coherence and engagement. We note here that the intended purpose of the dataset is to train conver- sational agents. Our discussions are limited to this scope and we make no claims about its linguistic properties. We build a simple retrieval agent to return a response given a user query and compare the re- sponses returned by our dataset against those re- turned by the OpenSubtitles corpus (Tiedemann, 2012). By qualitatively inspecting both general and topical queries, we find that our corpus is more suitable for open-domain human-bot conver- sational settings. 2 Related corpora In this Section we discuss some related, publicly available work, but refer to Serban et al. (2015) for a survey of existing dialogue corpora. However, we note that many of the corpora discussed therein 1developer.amazon.com/alexaprize 2github.com/jfainberg/self_dialogue_ corpus are not publicly available3. The Switchboard (Godfrey et al., 1992) corpus consists of roughly 3 million words of transcribed two-speaker phone conversations on 70 predefined topics. It is similar in the number of words to the work presented here, but consists of longer dia- logues spread across more topics. The Ubuntu di- alogue corpus (Lowe et al., 2015) is a large cor- pus of unstructured dialogues with approximately 100 million words. This corpus is collected from Ubuntu support chat logs and as such may have limited utility outside of that domain. The Dia- log State Tracking Challenge (DSTC) (Williams et al., 2013) aims to track what a user wants from an agent at each turn in a dialogue. The asso- ciated dataset is gathered using a slot-filling ap- proach with users conversing with an existing ma- chine. Some corpora, such as OpenSubtitles (Tiede- mann, 2012) and Movie-DiC (Banchs, 2012), gather conversational data from movie subtitles or scripts. While these corpora tend to be very large, they can be rather noisy, with multiple parties in conversations and occasionally the same party tak- ing consecutive turns. It is also possible to gather large amounts of un- structured data through services such as Reddit4 or Twitter (Ritter et al., 2010; Shang et al., 2015). These data streams have the advantage of being domain-specific (by selecting specific sub-reddits or hash tags). However, their properties may vary significantly in terms of the number of parties in a conversation, the response length, and the quality of language. Finally, the VisDial dataset (Abhishek and et al., 2016) contains dialogues between two humans discussing a particular image. Their task is closely related to the work presented here, in that the dataset is collected through crowd sourcing. How- ever, when adapting the task to fit our goal we found difficulties in managing the data collection. This is further discussed in Section 4. 3 Self-dialogue Corpus This corpus was collected using Amazon Mechan- ical Turk (AMT). To harvest self-dialogues, we asked Workers to create a fictitious two-party con- versation around a topic. For the majority of the 3The Dialogue Diversity Corpus lists a range of available task-oriented corpora: www-bcf.usc.edu/ billmann/diversity/DDivers-site.htm 4files.pushshift.io/reddit/comments tasks, the Workers were requested to fill 20 text boxes with a conversation on a particular topic. The setup required all 20 text boxes to be com- pleted in order to submit. In order to obtain conversations that were as natural as possible, we limited the number of con- straints set in the task descriptions. We aimed to present tasks that were simple to execute. The only rejection criteria related to abusing the sys- tem, such as submitting (near) duplicate entries or content with exaggerated bad language. To deal with the large amount of submissions, we auto- mated the rejection procedure by 1) comparing the cosine similarity between bags of words of two dialogues and 2) flagging conversations which contained a large number of words from a bad- words list. There is no monetary loss to reject- ing a submission, but wrongful rejection may lead to poor reviews as a Requester and consequently slow down future tasks. In total only eight out of 2,717 Workers were banned, and 145 conversa- tions (≈ 0.6%) were rejected. An example of the interface shown to Workers is shown in Figure 1. Figure 1: Amazon Mechanical Turk instructions for the general music task. Other tasks followed a similar pat- tern with dedicated examples. After experimenting with pay, region require- ments, and AMT credentials, we converged upon the following criteria which holds for the majority of the Workers in the corpus: • location: United States (and territories), United Kingdom; • HIT approval rate: greater than 95%; • number of HITs approved: greater than 500; • number of conversations per worker per batch: maximum 20; • pay per 10-turn conversation: US $0.70-0.80; 5-turn conversation: US $0.35-0.40. A summary of the statistics of the dataset is shown in Table 1 and counts per topic are shown in Table 2. Count 23 24,283 3,653,313 141,945 2,717 Category Topics Conversations Words Turns Unique users Avg. convos per user ∼9 Peak convos per day Unique tokens 2,307 117,068 Table 1: Summary statistics. Topic/subtopic Movies Action Comedy Fast & Furious Harry Potter Disney Horror Thriller Star Wars Superhero Music Pop Rap / Hip-Hop Rock The Beatles Lady Gaga Music and Movies Transition Mus-Mov Baseball Basketball Ice Hockey NFL Football Fashion # Conv. 4,126 414 414 343 414 2,331 414 828 1,726 414 4,911 684 684 684 679 558 216 198 496 485 174 2,801 210 # Words 814,842 37,037 36,401 33,964 44,220 232,573 428,33 77,975 178,351 40,967 924,993 62,383 66,376 63,349 68,396 49,313 37,303 4,287 99,298 95,264 34,288 562,801 46,099 # Turns 82,018 4,140 4,140 3,430 4,140 23,287 4,138 8,277 17,260 4,140 98,123 6,840 6,840 6,837 6,781 5,566 4,320 396 9,881 9,507 3,417 55,939 4,105 Table 2: Data collected divided by topic/tasks. 'Transi- tion Mus-Mov' refers to a short transition task, where Workers were asked to transition from any topic to ei- ther music or movies within one turn. The following example shows a self-dialogue in the 'Disney Movies' category5. 5See Appendix A for more examples. What is your favorite movie? I think Beauty and the Beast is my favorite. The new one? No, the cartoon. Something about it just feels magical. It is my favorite Disney movie. What's your favorite movie in general? I think my favorite is The Sound of Music. Really? Other than cartoons and stuff I can never get into musicals. I love musicals. I really liked Phantom of the Opera. 4 Comparison with two-speaker data How do self-dialogues compare with two-speaker conversations? To investigate the differences between our cor- pus and standard two-party conversations we adapted the VisDial framework (Abhishek and et al., 2016) to prompt two Workers to hold a conversation with one another. We collected 618 such conversations. The framework was modified by replacing the image with a set of popular top- ics from which the workers could choose: film, baseball, football, or fashion. The turn-based sys- tem was kept to enforce each party to wait for the other's reply as well as ensuring equal participa- tion. We used the same criteria as for the sin- gle speaker collection with the modification that each worker had to send 15 messages before end- ing their task and receive US $0.70. In cases where one Worker disconnected mid-task, we instructed the remaining Worker to imagine how the conver- sation would continue and finish their 15 messages accordingly in order to receive the payment. We label these conversations "partially" complete. We found the self-dialogue setting to present multiple benefits over the standard 2-speaker ap- proach. First, it is far simpler to set up, since the standard AMT interface can be used: coupling with a server to establish a connection between speakers is not required. Secondly, the setup of self-dialogues proved more efficient and conve- nient for the Worker. In the two-speaker setting, each participant must wait for the other party's re- ply. This led to a median time for a Worker to complete a HIT of roughly 14.9 minutes (average response time 37 seconds). This proved to be un- bearable for some of the workers and as a result the percentage of complete HITs was only 50.80%. In contrast, the median completion time for the self- dialogues was 6.5 minutes. Out of the 618 collected dialogues, a large por- tion was formed of either incomplete (31.71%) or partial submissions (34.95%). In the end the two speaker data contained a large number of self- dialogues with the added difficulty that the re- maining Worker had to make sure the continuation was coherent. Figure 2 compares the length of responses be- tween the two-speaker data and the self-dialogues. These resemble log-normal distributions and the long tails suggests there are some situations where Workers engaged in very lengthy descriptions. However, the majority of the replies contain 6-7 words, apart from a large number of one-word re- sponses ("hi", "yes", etc.). A closer inspection of the two types of data col- lected also show that the overall quality of the self- dialogue data exceeds that of the two-speaker con- versations. The majority of the two-speaker dia- logues contained either situations in which many clarifications from one of the participants were re- quired or where one of the participants would not be particularly interested in the chosen topic and did not have any useful input. We have included a small set of samples from the two-speaker conver- sations for comparison and to illustrate the issues described in this section as well as the expected upper bound in quality6. Figure 2: Histograms of response lengths from the two- speaker data (above) and self-dialogues (below). its most likely response. We analyze qualita- tively how well responses fetched from the self- dialogues pool are well fit to different types of queries by comparing with the OpenSubtitles cor- pus. Our retrieval agent measures the distance be- tween conversational queries q with all conversa- tional responses ri, where i is the response index. The closest match is found, and the next response, ri+1, corresponds to the next line of the conver- sation. This is given as the agent's response. Re- sponse vectors ri and query vectors q are given by a bag-of-words representation, with each word score given by the Inverse Document Frequency (IDF) score of that word. The IDF score of a word is given by the log of the total number of responses divided by the word's total frequency. Given conversational query q and response vector ri, the score of response ri+1 is S(q, ri+1) = qT ri√ rT r . (1) Our first set of queries are designed to be more general, whereas our second set of queries are spe- cific to the topics of data that we collected. We observed that whereas sometimes OpenSubtitles does return a well fitted response (see (1.1)), it often fails when named entities are mentioned in the conversation (see 1.2 and 1.3)7. OS denotes a response from OpenSubtitles and SD a response from the self-dialogues corpus. (1) 1. how was your day OS: fantastic SD: it is going good i have just been lis- tening to music all day 2. which harry potter movie did you like best OS: good one goyle SD: i loved all of them 3. who will win the superbowl OS: give me another magazine quick SD: indianapolis colts 5 Comparison with OpenSubtitles How do self-dialogues compare to other available corpora? In order to further assess how well our data dataset fits the task we build a retrieval based conversational agent that given a query returns 6 Conclusion In this work, we have proposed a novel approach to gathering data for open-domain conversation agents: self-dialogues through crowd sourcing, where a person is asked to create a fictitious two-party conversation. Analyses of the corpus 6See Appendix B for more examples. 7See Appendix C for more examples. have shown that self-dialogues present some ad- vantages over standard two-party conversations in terms of cost and quality. We also compare a re- trieval agent on OpenSubtitles and find the corpus presented here promising for comparisons when named entities are involved. References D. Abhishek and S. Kottur et al. 2016. Visual dialog. CoRR, abs/1611.08669. Rafael E Banchs. 2012. Movie-DiC: a movie dialogue corpus for research and development. In Proceed- ings of the 50th Annual Meeting of the Associa- tion for Computational Linguistics: Short Papers- Volume 2, pages 203 -- 207. Association for Compu- tational Linguistics. John J Godfrey, Edward C Holliman, and Jane Mc- Daniel. 1992. Switchboard: Telephone speech cor- In Acoustics, pus for research and development. Speech, and Signal Processing, 1992. ICASSP-92., 1992 IEEE International Conference on, volume 1, pages 517 -- 520. IEEE. Ben Krause, Marco Damonte, Mihai Dobre, Daniel Duma, Joachim Fainberg, Federico Fancellu, Em- manuel Kahembwe, Jianpeng Cheng, and Bonnie Webber. 2017. Edina: Building an open domain socialbot with self-dialogues. Alexa Prize Proceed- ings. Ryan Lowe, Nissan Pow, Iulian Serban, and Joelle Pineau. 2015. The Ubuntu Dialogue Corpus: A large dataset for research in unstructured multi-turn dialogue systems. pages 285 -- 294. Association for Computational Linguistics. Alan Ritter, Colin Cherry, and Bill Dolan. 2010. Un- supervised modeling of twitter conversations. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 172 -- 180. Association for Computational Linguis- tics. Iulian Vlad Serban, Ryan Lowe, Laurent Charlin, and Joelle Pineau. 2015. A survey of available corpora for building data-driven dialogue systems. arXiv preprint arXiv:1512.05742. Lifeng Shang, Zhengdong Lu, and Hang Li. 2015. Neural responding machine for short-text conversa- tion. arXiv preprint arXiv:1503.02364. Jorg Tiedemann. 2012. Parallel data, tools and in- In LREC, volume 2012, pages terfaces in OPUS. 2214 -- 2218. Jason Williams, Antoine Raux, Deepak Ramachan- dran, and Alan Black. 2013. The dialog state track- ing challenge. In Proceedings of the SIGDIAL 2013 Conference, pages 404 -- 413. A Example self-dialogues We present unedited example dialogues from a range of the topics listed in Table 2. A.1 Movies x What is your absolute favorite movie? y I think Beauty and the Beast is my favorite. x The new one? y No, the cartoon. Something about it just feels magical. x It is my favorite Disney movie. y What's your favorite movie in general? x I think my favorite is The Sound of Music. y Really? Other than cartoons and stuff I can never get into musicals. x I love musicals. I really liked Phantom of the Opera. A.2 Music x What do you think of Ed Sheeran? y I feel like he might be too overrated. x Are you kidding?? His voice is amazing! y Well I feel like the songs they place of his on the radio are catchy, but just not that great quality wise. x Well you definitely have to listen to his other music, because I would agree the songs on the radio are more overrated than they need to be. y Well what songs should I listen to then? x I would suggest listening to his new album, divide. y I've heard Shape of You. x But there are so many other amazing songs on the album! y Like what? x Well there's Galway Girl and Nancy Mulli- gan for starters. y I haven't even heard of those. x Exactly and those are the even better ones! y Which song is your favorite from the new al- bum. x Well Supermarket Flowers really is so sweet, but I'd have to say Perfect is my favorite. y Is that a really pop song? x Not at all, because it's slower. It feels more meaningful and powerful. y I'll have to give it a try, can I borrow your cd? x Of course! I'll bring it to work tomorrow! y Awesome, I'm excited to hear a different side of Ed Sheeran. A.3 NFL Football x What NFL team will have the best regular season record this year? y Hard not to go with the Patriots, right? x I'm not so sure, this year. y Why not? x Well, for one thing, I think the Dolphins might be a good team this year. y If their division gets more challenging, that will make it tougher for them to roll through the regular season, true. x Also, at SOME point Tom Brady's age will catch up to him. y Hasn't happened yet! The dude just won the Super Bowl. x But eventually, through injuries. A.4 Lady Gaga x What is your favorite Lady GAGA album? y I loved the Born this Way album. It had so many great hits on it. x Which Lady GAGA video is your favorite? y The Telephone video was great. It was like a mini-movie. x Do you prefer the older Lady GAGA music or the more recent singles? y I much prefer the older singles like Poker Face and Paparazzi. They had a more upbeat feel. x Which Lady GAGA tour was your favorite? y The Monster Ball Tour was amazing. She performed all her greatest hits and she was very inspiring. x How do you think the music in the upcom- ing movie A Star is Born will compare to her traditonal work? y I think Lady GAGA will do an amazing job in the movie. I'm really looking forward to how she will recreate the role and music for the origianl film. it will happen. Maybe A.5 Transition music/movies y Eventually, you'll be right about Brady, but I wouldn't bet on it this year. x I think the Seahawks have a really good chance to have the best record. y Hmm, I think they'll be good, but why do you say best record? x First of all, they have the best home field ad- vantage in the league. y Yep, no better home field advantage. x Second, I think their division is soft. y You're not a believer in the Cardinals? x I'm not sold on their QB situation, and I think both the Rams and the 49ers will be bad. y If all three teams are mediocre to bad, then Seattle should have a great record. x Yeah, that's just how I see it falling out this year. x I found an actual snake in my husband's boot. y That is like something out of a movie. Speak- ing of, have you watched any good westerns? B Example two-speaker conversations We present a small set of dialogues from the two speaker conversations. If a message is missing or the dialogue is short, then the worker(s) left the conversation. B.1 Corrections x who is your favorite nfl football team? y packers, you? x steelers y Ha, I'm talking to another Steelers fan now. You gonna tell me Rodgers has fallen off too? x we have an in-house division rivalry, my daughter likes the titans. y I hope it's not another Seattle/New England y oh yeah? That's cool. Ive been to a game in Super Bowl. I want some new talent! Nashville. lots of fun x i've been to a game in cincinnati as well as B.2 Conversation dying off pittsburgh. y Oh yeah? Ive never even been to the cities. I had a layover in Philly, thats about as close as I've gotten x my brother lives in bridgeville, just outside i've often thought about relo- pittsburgh ... cating just to be closer to my boys LOL y Well yeah. Packers and Steelers are very sim- ilar. Rich history x agreed....but steelers still have the most rings, thus far anyway lol y But the Packers have the most Champi- onships, and that's not getting caught x are you referring to division championships? y NFL Championships x steelers have 6 ... nobody else has 6, yet y 13 World Championships for the Packers, 6 for the Steelers, look it up x they've played 13 times, but have only won 4 y No. Before the Super Bowl x prior to 1933? y I cant copy and paste links. Google packers world championships and click on the first link x i just saw the info about world championships y Bingo. I mean it;s deadball era, but ill take it, haha x lol ... i suppose just like myself, a die-hard fan...nothing wrong with that! y Exactly, hmm, what happened last time we met in the Super Bowl? x hello y Hey , what do you think of the act of terror in Manchester? x i think it sucks.. y yea really sad all those children killed x the world is getting selfish y yea it's definetly more divided x its going downhill at an even pace.. y Well the US needs to protect itself x i agree, fav football team? y I like the vikings how about you x steelers all the way. but ben is getting old y yea he is a tough dude takes a ton of hits but it probably is working against him now x 2 more yrs tops, and he is done, sadly y well he had a great career x a fairy tale career for sure. y How about baseball? x im in Ga. I'M A BRAVES FAN, BUT NOT FALCONS...LOL... YOU? y I'm in New Jersey and I'm a Twins fan well Minnesota fan in every sport x TWINS ARE A GREAT BALL TEAM y Well there having a good start this year . Un- fortunately they always run into the Yankees in the playoffs x YANKEES ARE TOUGH... WE HAD OUR DAY WITH BOBBY COX, NOW WE SUCK y The braves and Twins played a classic world x lol yet again, another point proven, and series in 1991 one of the best ever taken! y Well good luck this year, Love Ben x i think he's a good quarterback.. but still be- lieve the quarterback is only as good as his offensive line y Very very smart. But when you have Ben, AB, and Bell, they do kinda make up for it x agreed....you'd think the steelers would have another ring or two with that trio y Bingo x I REMEMBER y How is the weather going to be for the Holi- day weekend? x rain, ughh and u? y - x ok y - x ok y - B.3 Failed continuation x so how about those Steelers y Ravens fan x oh boy, im sorry for you.. y Me too. They've been mediocre ever since the superbowl win x our nemisis y Big Ben is getting old though x it always seems to be a good game when they play each other though y If you like defense, definitely x i suspect he has 2 more seasons at best. y Yeah. I think so too. And then what? x then , Honestly I DONT KNOW, THEY HAVE BEEN PROSPECTING but nothing good yet.. y - x they will get someone y - x then it will need work y - x i still love them y - x they are my home team y - x they are skilled y - x the best y - x and play well y - x im confident y - x they will win superbowl this yr y - x hello y - B.4 Short acceptable but not very interesting conversation x Do you like fashion? y I don't like fashion. x whats your favorite movie y My favorite movie is idiocrazy. x Ive never seen it. what genre is it? y it is a political satire movie. x ahh ok. is satire your favorite genre? y yes, satire is funny so it is my favorite. x I prefer drama and true crime y Why do you like drama? x I like the more true to life storylines y Is that also why you like true crime? x Yes, I took criminal justice in school. y what makes true to life storylines good for movies? x I just feel like i get more engrossed. why do you like comedy? y Comedy is funny, i'm a simple person that can't understand much else. x SO do you like more slapstick comedy? or spoof films y I like all sorts of comedic films, I find all var- ious types of comedy to be funny. I'm easily amused. x I like comedy when i've had a bad day. easy to take your mind off life y Do you think your education has had an im- pact on how you view film? x I think so. It made me look at how people think so true crime lets me try to determine why they did what they did y Who is your favorite actor? x tom hiddleston. you? y Robert De Niro, why is tom your favorite? x I like his personality. Plus hes so cute. Why do you like DeNiro? y Because he was a major part of the movies I enjoyed learning about in school. x That makes sense. whats your favorite Deniro movie? y Mean streets, have you ever seen it? x I dont think I have y It is a good movie. B.5 Very good conversation x Hi. Logan was a great movie. y Well, it looks like the new Baywatch movie was a total flop. x It didn't know there was a new Baywatch movie. y Yeah, it stars The Rock. But they added lots and lots of guns and made it very un- Baywatchy. x The Rock normally does good stuff, but you can't have Baywatch without the Hoff. y So true. I want to see Logan. Can't believe I've not seen it yet. x Logan is a relentlessly brutal film, and very I was actually tearing up at the emotional. ending. y Oh wow, cool. I've about reached my limit on super hero movies, but I definitely want to see this one. Do you watch many of the super hero franchise movies? x Dr Strange is the last one I've seen. But I do try to keep up with Marvel's films. y Do you go to the theater or do you stream like on Netflix or Apple TV or something like that? x I stream, mostly. I avoid the theater. y Same here. Netflix is just unbelievable right now. My go-to places are Netflix, Hulu, and Amazon originals. So much quality there. x I need to watch the Amazon shows. I have Prime for the shipping, but haven't really watched their videos. y Oh wow, you're in for a treat. Great original programming, too. I just wrapped up the 3rd season of Bosch, which is an Amazon orig- inal. Sort of a modern Noir detective show. They have bunch of older HBO and Show- time stuff on Amazon Prime, too. So definit x I will. The great thing about streaming ser- vices is that they can take a lot more risks than traditional networks. through the corporate network executive fil- ter. Do you "binge" watch shows? x All the time. Mostly old 90s shows. y What are the good 90s shows? x It depends on what your personal taste are. I like the syndicated adventure shows, but that might just be nostalgia talking. Highlander: The Series was one of my favorites. Babylon 5 is also good, though it starts off really slow, and would have been c y Oh wow, I've forgotten about those. Those were Syfy Network, right? I need to remem- ber about that channel. Where you a fan of The Doom? Can't remember if that was Syfy on Amazon. x Highlander was originally in First Run Syn- dication. USA had reruns, then Syfy had some, too. Babylon 5 was on PTEN, which was Warner Brother's attempt to start their own network, but ended up being just a syn- dication package. It moved to TNT for the fi y Complicated route for both those shows. Oh, It might be an I mean The Dome. Hahah. Amazon Original. An invisible dome encap- sulates (?) this small town, trapping everyone on the inside. Fantastic first two season. Got a bit off the rails after that. My w x It was on CBS, and was based on a book by Stephen King. I've never watched it, I might check it out. y That's right. It was Stephen King. My daugh- ter (17) recently watched Stand By Me. She couldn't believe that was a Stephen King story. In fact, most of my favorite King movies aren't his horror stories. x Yeah. His horror stories tend to be pre- dictable, it's the non-horror stuff that gets in- teresting. y Was King's The Stand a movie or mini-series of some sort? Or am I just imagining images from the book? x There was a mini-series, on ABC I think. y Yeah, definitely. So many of the net- work shows just feeling like they've passed y Oh on ABC. Probably not so good. That show is not network adaptable. C Retrieval bot responses We present preliminary experimental results with a retrieval bot evaluated on a set of predefined queries. Q denotes a query, OS a response from OpenSubtitles and SD a response from the self- dialogues presented in this paper. See Section 5 for details. C.1 General queries Q hello OS what a surprise SD hi there Q how are you OS why is your pajama to on SD doing good and you Q what do you want to talk about OS why did you invite me to stay for the holidays SD let's talk about football Q how was your day OS fantastic SD it is going good i have just been listening to music all day C.2 Topical queries Q what is your favorite movie OS star wars of course SD oh that's a tough one i think the prestige Q which harry potter movie did you like best OS good one goyle SD i loved all of them Q what is your favorite band OS elvis costello SD i like acdc Q who will win the superbowl OS give me another magazine quick SD indianapolis colts
1906.01135
2
1906
2019-06-22T00:37:00
Simultaneous Translation with Flexible Policy via Restricted Imitation Learning
[ "cs.CL" ]
Simultaneous translation is widely useful but remains one of the most difficult tasks in NLP. Previous work either uses fixed-latency policies, or train a complicated two-staged model using reinforcement learning. We propose a much simpler single model that adds a `delay' token to the target vocabulary, and design a restricted dynamic oracle to greatly simplify training. Experiments on Chinese<->English simultaneous translation show that our work leads to flexible policies that achieve better BLEU scores and lower latencies compared to both fixed and RL-learned policies.
cs.CL
cs
Simultaneous Translation with Flexible Policy via Restricted Imitation Learning Baigong Zheng 1,∗ Renjie Zheng 2,∗ Mingbo Ma 1,∗ Liang Huang 1,2 1Baidu Research, Sunnyvale, CA, USA 2Oregon State University, Corvallis, OR, USA {baigongzheng, mingboma}@baidu.com [email protected] 9 1 0 2 n u J 2 2 ] L C . s c [ 2 v 5 3 1 1 0 . 6 0 9 1 : v i X r a Abstract Simultaneous translation is widely useful but remains one of the most difficult tasks in NLP. Previous work either uses fixed-latency poli- cies, or train a complicated two-staged model using reinforcement learning. We propose a much simpler single model that adds a "delay" token to the target vocabulary, and design a restricted dynamic oracle to greatly simplify training. Experiments on Chinese↔English simultaneous translation show that our work leads to flexible policies that achieve better BLEU scores and lower latencies compared to both fixed and RL-learned policies. Introduction 1 Simultaneous translation, which translates sen- tences before they are finished, is useful in many scenarios such as international conferences, sum- mits, and negotiations. However, it is widely con- sidered one of the most challenging tasks in NLP, and one of the holy grails of AI (Grissom II et al., 2014). A major challenge in simultaneous trans- lation is the word order difference between the source and target languages, e.g., between SOV languages (German, Japanese, etc.) and SVO lan- guages (English, Chinese, etc.). Simultaneous translation is previously studied as a part of real-time speech recognition sys- tem (Yarmohammadi et al., 2013; Bangalore et al., 2012; Fugen et al., 2007; Sridhar et al., 2013; Jaitly et al., 2016; Graves et al., 2013). Re- cently, there have been two encouraging efforts in this problem with promising but limited success. Gu et al. (2017) propose a complicated two-stage model that is also trained in two stages. The base model, responsible for producing target words, is a conventional full-sentence seq2seq model, and on top of that, the READ/WRITE (R/W) model decides, at every step, whether to wait for an- other source word (READ) or to emit a target word ∗These authors contributed equally. Chinese 我 得到 wo d´ed`ao pinyin gloss I receive wait-1 policy wait-5 policy I received adaptive policy I received 有关 yougu¯an relevant 方面 f¯angmi`an party 的 de 's 回应 hu´ıy`ıng response thanks from relevant parties I re- received sponses from relevant parties responses from relevant parties Table 1: A Chinese-to-English translation example. Wait-1 policy makes a mistake on guessing thanks from while wait-5 policy has high latency. The adaptive policy can wait for more information to avoid guesses while maintaining low latency. (WRITE) using the pretrained base model. This R/W model is trained by reinforcement learning (RL) method without updating the base model. Ma et al. (2018), on the other hand, propose a much simpler architecture, which only need one model and can be trained with end-to-end local training method. However, their model follows a fixed-latency policy, which inevitably needs to guess future content during translation. Table 1 gives an example which is difficult for the fixed- latency (wait-k) policy but easy for adaptive pol- icy. We aim to combine the merits of both ef- forts, that is, we design a single model end-to- end trained from scratch to perform simultaneous translation, as with Ma et al. (2018), which can decide on the fly whether to wait or translate as in Gu et al. (2017). There are two key ideas to achieve this: the first is to add a "delay" token (similar to the READ action in Gu et al. (2017), the empty token in Press and Smith (2018), and the 'blank' unit in Connectionist Temporal Classi- fication (CTC) (Graves et al., 2006)) to the target- side vocabulary, and if the model emits this de- lay token, it will read one source word; the second idea is to train the model using (restricted) imita- tion learning by designing a (restricted) dynamic oracle as the expert policy. Table 2 summarizes different approaches for simultaneous translation using neural machine translation (NMT) model. fixed policy adaptive policy seq-to-seq static Read-Write (Dalvi et al., 2018) test-time wait-k (Ma et al., 2018) RL (Gu et 2017) al., prefix-to-prefix wait-k (Ma et al., 2018) imitation learning (this work) Table 2: Different approaches for simultaneous trans- lation. 2 Preliminaries Let x = (x1, . . . , xn) be a sequence of words. For an integer 0 ≤ i ≤ n, we denote the sequence consisting of the first consecutive i− 1 words in x by x<i = (x1, . . . , xi−1). We say such a sequence x<i is a prefix of the sequence x, and define s (cid:22) x if sequence s is a prefix of x. Conventional Machine Translation Given a sequence x from the source language, the con- ventional machine translation model predicts the probability distribution of the next target word yj at the j-th step, conditioned on the full source se- quence x and previously generated target words y<j, that is p(yj x, y<j). The probability of the whole sequence y generated by the model will be p(y x) =(cid:81)y j=1 p(yj x, y<j). (cid:96)(D) = −(cid:80) To train such a model, we can maximize the probability of ground-truth target sequence condi- tioned on the corresponding source sequence in a parallel dataset D, which is equivalent to minimize the following loss: (x,y)∈D log p(y x). (1) In this work, we use Transformer (Vaswani et al., 2017) as our NMT model, which consists of an encoder and a decoder. The encoder works in a self-attention fashion and maps a sequence of words to a sequence of continuous representations. The decoder performs attention over the predicted words and the output of the encoder to generate next prediction. Both encoder and decoder take as input the sum of a word embedding and its corre- sponding positional embedding. Prefix-to-Prefix Framework Previous work (Gu et al., 2017; Dalvi et al., 2018) use seq2seq models to do simultaneous translation, which are trained with full sentence pairs but need to predict target words based on partial source sentences. (2018) proposed a prefix-to-prefix Ma et al. training framework to solve this mismatch. The key idea of this framework is to train the model to predict the next target word conditioned on the partial source sequence the model has seen, instead of the full source sequence. As a simple example in this framework, Ma et al. (2018) presented a class of policies, called wait-k policy, that can be applied with local train- ing in the prefix-to-prefix framework. For a pos- itive integer k, the wait-k policy will wait for the first k source words and then start to alter- nate generating a target word with receiving a new source word, until there is no more source words, when the problem becomes the same as the full- sequence translation. The probability of the j-th word is pk(yj x<j+k, y<j), and the probability (cid:81)y of the whole predicted sequence is pk(y x) = j=1 pk(yj x<j+k, y<j). 3 Model To obtain a flexible and adaptive policy, we need our model to be able to take both READ and WRITE actions. Conventional translation model already has the ability to write target words, so we introduce a "delay" token (cid:104)ε(cid:105) in target vocabulary to enable our model to apply the READ action. Formally, for the target vocabulary V , we define an extended vocabulary V+ = V ∪ {(cid:104)ε(cid:105)}. (2) Each word in this set can be an action, which is applied with a transition function δ on a sequence pair (s, t) for a given source sequence x where s (cid:22) x. We assume (cid:104)ε(cid:105) cannot be applied with the sequence pair (s, t) if s = x, then we have the transition function δ as follows, (cid:26)(s ◦ xs+1, t) (s, t ◦ a) if a = (cid:104)ε(cid:105) otherwise δ((s, t), a) = where s ◦ x represents concatenating a sequence s and a word x. Based on this transition function, our model can do simultaneous translation as follows. Given the currently available source sequence, our model continues predicting next target word until it pre- dicts a delay token. Then it will read a new source word, and continue prediction. Since we use Transformer model, the whole available source se- quence needs to be encoded again when reading in a new source word, but the predicted target se- quence will not be changed. Note that the predicted delay tokens do not pro- vide any semantic information, but may introduce ways keep the translation process in this band. For simplicity, we first assume the two full sequences x = y. Then we have the same lengths, i.e. can bound the difference d = s−t by two con- stants: α < d < β. The conservative bound (β) guarantees relatively small difference and low la- tency; while the aggressive bound (α) guarantees there are not too many target words predicted be- fore seeing enough source words. Formally, this dynamic oracle is defined as follows.  {(cid:104)ε(cid:105)} π(cid:63) x,y,α,β(s, t) = {yt+1} {(cid:104)ε(cid:105), yt+1} if s (cid:54)= x and s − t ≤ α if t (cid:54)= y and s − t ≥ β otherwise By this definition, we know that this oracle can always find an action sequence to obtain (x, y). When the input state does not satisfy any latency constraint, then this dynamic oracle will provide only one action, applying which will improve the length difference. Note that this dynamic oracle is restricted in the sense that it is only defined on the prefix pair instead of any sequence pair. And since we only want to obtain the exact sequence from data, this oracle can only choose the next ground- truth target word other than (cid:104)ε(cid:105). In many cases, the assumption x = y does not hold. To overcome this limitation, we can uti- lize the length ratio γ = x/y to modify the length difference: d(cid:48) = s − γt, and use this new difference d(cid:48) in our dynamic oracle. Although we cannot obtain this ratio during testing time, we may use the averaged length ratio obtained from training data (Huang et al., 2017). Training with Restricted Dynamic Oracle We apply imitation learning to train our translation model, using the proposed dynamic oracle as the expert policy. Recall that the prediction of our model depends on the whole generated prefix including (cid:104)ε(cid:105) (as the input contains the embedding of the number of (cid:104)ε(cid:105)), which is also an action sequence. If an action sequence a is obtained from our oracle, then applying this sequence will result in a prefix pair, say sa and ta, of x and y. Let p(a sa, ta) be the probability of choosing action a given the prefix pair obtained by applying action sequence a. Then the averaged probability of choosing the oracle actions conditioned on the action sequence a will be Figure 1: Illustration of our proposed dynamic oracle on a prefix grid. The blue right arrow represents choos- ing next ground-truth target word, and the red down- ward arrow represents choosing the delay token. The left figure shows a simple dynamic oracle without delay constraint. The right figure shows the dynamic oracle with delay constraints. some noise in attention layer during the translation process. So we propose to remove those delay to- ken in the attention layers except for the current input one. However, this removal may reduce the explicit latency information which will affect the predictions of the model since the model cannot observe previous output delay tokens. Therefore, to provide this information explicitly, we embed the number of previous delay tokens to a vector and add this to the sum of the word embedding and position embedding as the input of the decoder. 4 Methods 4.1 Training via Restricted Imitation Learning We first introduce a restricted dynamic ora- cle (Cross and Huang, 2016) based on our ex- tended vocabulary. Then we show how to use this dynamic oracle to train a simultaneous translation model via imitation learning. Note that we do not need to train this oracle. Restricted Dynamic Oracle Given a pair of full sequences (x, y) in data, the input state of our re- stricted dynamic oracle will be a pair of prefixes (s, t) where s (cid:22) x, t (cid:22) y and (s, t) (cid:54)= (x, y). The whole action set is V+ defined in the last sec- tion. The objective of our dynamic oracle is to obtain the full sequence pair (x, y) and maintain a reasonably low latency. For a prefix pair (s, t), the difference of the lengths of the two prefixes can be used to mea- sure the latency of translation. So we would like to bound this difference as a latency constraint. This idea can be illustrated in the prefix grid (see Fig- ure 1), where we can define a band region and al- TargetSourceTargetSourceaggressive bound 𝛼conserv. bound 𝛽 (cid:80) x,y,α,β (sa,ta) x,y,α,β(sa, ta) π(cid:63) p(a sa, ta) a∈π(cid:63) . f (a, π(cid:63) x,y,α,β) = To train a model to learn from the dynamic or- acle, we can sample from our oracle to obtain a set, say S(x, y), of action sequences for a sentence pair (x, y). The loss function for each sampled se- quence a ∈ S(x, y) will be (cid:96)(ax, y) = − a(cid:80) (cid:80) (cid:96)(D) = (cid:80) i=1 (x,y)∈D a∈S(x,y) log f (a<i, π(cid:63) x,y,α,β). S(x,y) (cid:96)(ax, y). 1 For a parallel text D, the training loss is Directly optimizing the above loss may require too much computation resource since for each pair of (x, y), the size of S(x, y) (i.e. the number of different action sequences) can be exponentially large. To reduce the computation cost, we propose to use two special action sequences as our sample set so that our model can learn to do translation within the two latency constraints. Recall that the latency constraints of our dynamic oracle π(cid:63) x,y,α,β are defined by two bounds: α and β. For each bound, there is a unique action sequence, which corresponds to a path in the prefix grid, such that following it can generate the most number of pre- fix pairs that make this bound tight. Let aα (aβ α (β). We replace S(x, y) with {aα then the above loss for dataset D becomes (x,y)) be such an action sequence for (x, y) and (x,y)}, (x,y), aβ (x,y) (cid:96)α,β(D) = (cid:80) (x,y)∈D (cid:96)(aα (x,y)x,y)+(cid:96)(aβ (x,y)x,y) 2 . This is the loss we use in our training process. Note that there are some steps where our oracle will return two actions, so for such steps we will have a multi-label classification problem where la- bels are the actions from our oracle. In such cases, Sigmoid function for each action is more appropri- ate than the Softmax function for the actions will not compete each other (Ma et al., 2017; Zheng et al., 2018; Ma et al., 2019). Therefore, we apply Sigmoid for each action instead of using Softmax function to generate a distribution for all actions. 4.2 Decoding We observed that the model trained on the two special action sequences occasionally violates the latency constraints and visits states outside of the designated band in prefix grid. To avoid such case, we force the model to choose actions such that it will always satisfy the latency constraints. That is, if the model reaches the aggressive bound, it must choose a target word other than (cid:104)ε(cid:105) with highest score, even if (cid:104)ε(cid:105) has higher score; if the model reaches the conservative bound, it can only choose (cid:104)ε(cid:105) at that step. We also apply a temperature con- stant et to the score of (cid:104)ε(cid:105), which can implicitly control the latency of our model without retrain- ing it. This improves the flexibility of our trained model so that it can be used in different scenarios with different latency requirements. 5 Experiments To investigate the empirical performance of our proposed method, we conduct experiments on NIST corpus for Chinese-English. We use NIST 06 (616 sentence pairs) as our development set and NIST 08 (691 sentence pairs) as our testing set. We apply tokenization and byte-pair encoding (BPE) (Sennrich et al., 2015) on both source and target languages to reduce their vocabularies. For training data, we only include 1 million sentence pairs with length larger than 50. We use Trans- former (Vaswani et al., 2017) as our NMT model, and our implementation is adapted from PyTorch- based OpenNMT (Klein et al., 2017). The archi- tecture of our Transformer model is the same as the base model in the original paper. We use BLEU (Papineni et al., 2002) as the translation quality metric and Average Lagging (AL) introduced by Ma et al. (2018) as our la- tency metrics, which measures the average de- layed words. AL avoids some limitations of other existing metrics, such as insensitivity to actual lag- ging like Consecutive Wait (CW) (Gu et al., 2017), and sensitivity to input length like Average Pro- portion (AP) (Cho and Esipova, 2016) . Results We tried three different pairs for α and β: (1, 5), (3, 5) and (3, 7), and summarize the results on testing sets in Figure 2. Figure 2 (a) shows the results on Chinese-to-English transla- tion. In this direction, our model can always achieve higher BLEU scores with the same la- tency, compared with the wait-k models and RL models. We notice the model prefers conservative policy during decoding time when t = 0. So we apply negative values of t to encourage the model to choose actions other than (cid:104)ε(cid:105). This can ef- fectively reduce latency without sacrificing much (a) Chinese-to-English (b) English-to-Chinese Figure 2: Translation quality (BLEU) against latency (AL) : wait-k models for k ∈ on testing sets. Markers {1, 3, 5, 7}, +: RL with CW = 5, ×: RL with CW = 8, (cid:70): full-sentence translation. Markers for our models are given in the right table. Training β α 5 1 3 5 7 3 wait-α wait-β t = −2 Decoding Policy t = −0.5 t = 0 t = 4.5 t = 9 translation quality, implying that our model can implicitly control latency during testing time. Figure 2 (b) shows our results on English-to- Chinese translation. Since the English source sen- tences are always longer than the Chinese sen- tences, we utilize the length ratio γ = 1.25 (de- rived from the dev set) during training, which is the same as using "catchup" with frequency c = 0.25 introduced by Ma et al. (2018). Different from the other direction, models for this direction works better if the difference of α and β is big- ger. Another difference is that our model prefers aggressive policy instead of conservative policy when t = 0. Thus, we apply positive values of t to encourage it to choose (cid:104)ε(cid:105), obtaining more con- servative policies to improve translation quality. Example We provide an example from the de- velopment set of Chinese-to-English translation in Table 3 to compare the behaviours of different models. Our model is trained with α = 3, β = 7 and tested with t = 0. It shows that our model can wait for information " ¯Oum´eng" to translates "eu", while the wait-3 model is forced to guess this in- formation and made a mistake on the wrong guess "us" before seeing " ¯Oum´eng". Ablation Study To analyze the effects of pro- posed techniques on the performance, we also pro- vide an ablation study on those techniques for our model trained with α = 3 and β = 5 in Chinese- to-English translation. The results are given in Ta- ble 4, and show that all the techniques are impor- tant to the final performance and using Sigmoid function is critical to learn adaptive policy. Model Wait-3 Wait-5 keep (cid:104)ε(cid:105) in attention no (cid:104)ε(cid:105) number embedding use Softmax instead of Sigmoid Full Decoding Policy Wait-3 Wait-5 BLEU AL 29.32 4.60 BLEU AL - - - - 29.55 4.50 30.97 30.68 6.30 6.49 t=0 BLEU AL - - - - 30.74 6.53 30.20 4.76 30.98 6.36 30.65 6.29 29.23 5.11 31.46 6.79 29.99 4.79 29.45 4.71 31.72 6.35 31.59 6.28 Table 4: Ablation study on Chinese-to-English devel- opment set with α = 3 and β = 5. 6 Conclusions We have presented a simple model that includes a delay token in the target vocabulary such that the model can apply both READ and WRITE actions during translation process without a explicit policy model. We also designed a restricted dynamic or- acle for the simultaneous translation problem and provided a local training method utilizing this dy- namic oracle. The model trained with this method can learn a flexible policy for simultaneous trans- lation and achieve better translation quality and lower latency compared to previous methods. 具名 j`um´ıng a - not willing named Chinese 一 名 不 愿 pinyin y`ı m´ıng b´u y`uan gloss wait-3 our work a a 的 de 's 欧盟 ¯Oum´eng EU 官员 g¯uany´uan official 指出 ... zhıch¯u point out us official who declined eu to official ... be named said that ... , who declined to be named , pointed out ... Table 3: A Chinese-to-English development set example. Our model is trained with α = 3 and β = 7. 468AL222426284-ref BLEU332468AL1012141-ref BLEU44 References Srinivas Bangalore, Vivek Kumar Rangarajan Srid- har, Prakash Kolan, Ladan Golipour, and Aura Jimenez. 2012. Real-time incremental speech-to- In Proc. of NAACL- speech translation of dialogs. HLT. Kyunghyun Cho and Masha Esipova. 2016. Can neu- ral machine translation do simultaneous translation? volume abs/1606.02012. James Cross and Liang Huang. 2016. Span-based con- stituency parsing with a structure-label system and provably optimal dynamic oracles. In Proceedings of EMNLP. Fahim Dalvi, Nadir Durrani, Hassan Sajjad, and Stephan Vogel. 2018. Incremental decoding and training methods for simultaneous translation in In Proceedings of the neural machine translation. 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Hu- man Language Technologies, Volume 2 (Short Pa- pers), pages 493 -- 499, New Orleans, Louisiana. As- sociation for Computational Linguistics. Christian Fugen, Alex Waibel, and Muntsin Kolss. Simultaneous translation of lectures and 2007. speeches. Machine translation, 21(4):209 -- 252. Alex Graves, Santiago Fern´andez, Faustino Gomez, and Jurgen Schmidhuber. 2006. Connectionist labelling unsegmented se- temporal classification: quence data with recurrent neural networks. In Pro- ceedings of the 23rd international conference on Machine learning, pages 369 -- 376. ACM. Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton. 2013. Speech recognition with deep recur- In 2013 IEEE international rent neural networks. conference on acoustics, speech and signal process- ing, pages 6645 -- 6649. IEEE. Alvin Grissom II, He He, Jordan Boyd-Graber, John Morgan, and Hal Daum´e III. 2014. Don't until the final verb wait: Reinforcement learning for simul- taneous machine translation. In Proceedings of the 2014 Conference on empirical methods in natural language processing (EMNLP), pages 1342 -- 1352. Jiatao Gu, Graham Neubig, Kyunghyun Cho, and Vic- tor O. K. Li. 2017. Learning to translate in real- In Proceed- time with neural machine translation. ings of the 15th Conference of the European Chap- ter of the Association for Computational Linguistics, EACL 2017, Valencia, Spain, April 3-7, 2017, Vol- ume 1: Long Papers, pages 1053 -- 1062. Liang Huang, Kai Zhao, and Mingbo Ma. 2017. When to finish? optimal beam search for neural text gen- eration (modulo beam size). In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2134 -- 2139. Navdeep Jaitly, David Sussillo, Quoc V Le, Oriol Vinyals, Ilya Sutskever, and Samy Bengio. 2016. An online sequence-to-sequence model using par- In Advances in Neural Informa- tial conditioning. tion Processing Systems, pages 5067 -- 5075. Guillaume Klein, Yoon Kim, Yuntian Deng, Jean Senellart, and Alexander M Rush. 2017. Opennmt: Open-source toolkit for neural machine translation. arXiv preprint arXiv:1701.02810. Mingbo Ma, Liang Huang, Bing Xiang, and Bowen Zhou. 2017. Group sparse CNNs for question clas- In Proceedings of the sification with answer sets. 55th Annual Meeting of the Association for Compu- tational Linguistics (Volume 2: Short Papers), pages 335 -- 340, Vancouver, Canada. Association for Com- putational Linguistics. Mingbo Ma, Liang Huang, Hao Xiong, Renjie Zheng, Kaibo Liu, Baigong Zheng, Chuanqiang Zhang, Zhongjun He, Hairong Liu, Xing Li, Hua Wu, and Haifeng Wang. 2018. STACL: Simultaneous trans- lation with integrated anticipation and controllable latency. arXiv preprint arXiv:1810.08398, to ap- pear ACL 2019. Mingbo Ma, Renjie Zheng, and Liang Huang. 2019. Learning to stop in structured prediction arXiv preprint for neural machine translation. arXiv:1904.01032, to appear NAACL 2019. Kishore Papineni, Salim Roukos, Todd Ward, and Wei- Jing Zhu. 2002. Bleu: a method for automatic eval- In Proceedings of uation of machine translation. ACL, pages 311 -- 318, Philadephia, USA. Ofir Press and Noah A. Smith. 2018. You may not need attention. arXiv preprint arXiv:1810.13409. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2015. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909. Vivek Kumar Rangarajan Sridhar, John Chen, Srinivas Bangalore, Andrej Ljolje, and Rathinavelu Chengal- varayan. 2013. Segmentation strategies for stream- ing speech translation. In Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 230 -- 238. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Pro- cessing Systems 30. Mahsa Yarmohammadi, Vivek Kumar Rangara- jan Sridhar, Srinivas Bangalore, and Baskaran Sankaran. 2013. Incremental segmentation and decoding strategies for simultaneous translation. In Proceedings of the Sixth International Joint Conference on Natural Language Processing. Renjie Zheng, Mingbo Ma, and Liang Huang. 2018. Multi-reference training with pseudo-references for neural translation and text generation. In Proceed- ings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3188 -- 3197.
1510.06342
1
1510
2015-10-21T17:11:13
Prevalence and recoverability of syntactic parameters in sparse distributed memories
[ "cs.CL", "cs.IT", "cs.IT" ]
We propose a new method, based on Sparse Distributed Memory (Kanerva Networks), for studying dependency relations between different syntactic parameters in the Principles and Parameters model of Syntax. We store data of syntactic parameters of world languages in a Kanerva Network and we check the recoverability of corrupted parameter data from the network. We find that different syntactic parameters have different degrees of recoverability. We identify two different effects: an overall underlying relation between the prevalence of parameters across languages and their degree of recoverability, and a finer effect that makes some parameters more easily recoverable beyond what their prevalence would indicate. We interpret a higher recoverability for a syntactic parameter as an indication of the existence of a dependency relation, through which the given parameter can be determined using the remaining uncorrupted data.
cs.CL
cs
PREVALENCE AND RECOVERABILITY OF SYNTACTIC PARAMETERS IN SPARSE DISTRIBUTED MEMORIES JEONG JOON PARK, RONNEL BOETTCHER, ANDREW ZHAO, ALEX MUN, KEVIN YUH, VIBHOR KUMAR, MATILDE MARCOLLI 5 1 0 2 t c O 1 2 ] L C . s c [ 1 v 2 4 3 6 0 . 0 1 5 1 : v i X r a Abstract. We propose a new method, based on Sparse Distributed Memory (Kanerva Networks), for studying dependency relations between different syntactic parameters in the Principles and Parameters model of Syntax. We store data of syntactic parameters of world languages in a Kanerva Network and we check the recoverability of corrupted parameter data from the network. We find that different syntactic parameters have different degrees of recoverability. We identify two different effects: an overall underlying relation between the prevalence of parameters across languages and their degree of recoverability, and a finer effect that makes some parameters more easily recoverable beyond what their prevalence would indicate. We interpret a higher recoverability for a syntactic parameter as an indication of the existence of a dependency relation, through which the given parameter can be determined using the remaining uncorrupted data. 1. Introduction 1.1. Syntactic Parameters of World Languages. The general idea behind the Principles and Parameters approach to Syntax, [2], [3], is the encoding of syntactic properties of natural languages as a string of binary variables, the syntactic parameters. This model is sometimes regarded as controversial, and some schools of Linguistics have, consequently, moved towards other possible ways of modeling syntax. However, syntactic parameters remain more suitable than other concurrent models from the point of view of a mathematical approach, as we set out to demonstrate in a series of related papers [19], [22], [26]. Among the shortcomings ascribed to the Principles and Parameters model (see for instance [10]) is the fact that it has not been possible, so far, to identify a complete set of such syntactic parameters, even though extensive lists of parameters are classified and recorded for a large number of natural languages. It is also unclear what relations exist between parameters and whether there is a natural choice of a set of independent variables among them. At present, sufficiently rich databases of syntactic parameters of world languages are available, most notably the ‘Syntactic Structures of the World’s Languages” (SSWL) database [29] (recently migrated to TerraLing [30]) and the “World Atlas of Language Structures” (WALS) [9]. This makes it possible to reconsider the problem of syntactic parameters, loosely formulated as understanding the geometry of the parameter space and how parameters are distributed across language families, with modern methods of data analysis. For example, topological data analysis was applied to syntactic parameters in [22]. In the present paper, the main tool of analysis we will employ to study relations between syntactic parameters will be Kanerva Networks. In this paper we selected a list of 21 syntactic parameters, mostly having to do with word order relations (see §2.1 below of a detailed discussion of the chosen parameters), and a list of 166 languages, for which the values of these parameters are recorded in the SSWL database (the languages used are listed in the Appendix). The parameters are selected so that they clearly are not an independent set of binary variables (see the discussion in §2.2 below). The languages are selected so that they cut across a broad range of different linguistic families. By storing the 1 2 J.J.PARK, R.BOETTCHER, A.ZHAO, A.MUN, K.YUH, V.KUMAR, M.MARCOLLI data of syntactic parameters for this group of languages in a Kanerva Network, we can test for recoverability when one of the binary variables is corrupted. We find an overall relation between recoverability and prevalence across languages, which depends on the functioning of the sparse distributed memory. Moreover, we also see a further effect, which deviates from a simple relation with the overall prevalence of a parameter. This shows that certain syntactic parameters have a higher degree of recoverability in a Kanerva Network. This property can be interpreted as a consequence of existing underlying dependence relations between different parameters. With this interpretation, one can envision a broader use of Kanerva Networks as a method to identify further, and less clearly visible, dependence relations between other groups of syntactic parameters. Another reason why it is interesting to analyze syntactic parameters using Kanerva Networks is the widespread use of the latter as models of human memory, [7], [13], [15]. In view of the problem of understanding mechanism of language acquisition, and how the syntactic structure of language may be stored in the human brain, sparse distributed memories appear to be a promising candidate for the construction of effective computational models. Acknowledgment. This work was performed as part of the activities of the last author’s Math- ematical and Computational Linguistics lab and CS101/Ma191 class at Caltech. The last author is partially supported by NSF grants DMS-1201512 and PHY-1205440. 2. Syntactic Parameters 2.1. Choice of parameters. For the purpose of this study, we focused on a list of 21 syntactic parameters, which are listed in the SSWL database as 01 Subject-Verb 02 Verb-Subject 03 Verb-Object 04 Object-Verb 05 Subject-Verb-Object 06 Subject-Object-Verb 07 Verb-Subject-Object 08 Verb-Object-Subject 09 Object-Subject-Verb 10 Object-Verb-Subject 11 Adposition-Noun-Phrase 12 Noun-Phrase-Adposition 13 Adjective-Noun 14 Noun-Adjective 15 Numeral-Noun 16 Noun-Numeral 17 Demonstrative-Noun 18 Noun-Demonstrative 19 Possessor-Noun 20 Noun-Possessor A01 Attributive-Adjective-Agreement The first 10 parameters on this list deal with word order properties. Subject-Verb has the value 1 when in a clause with an intransitive verb the order subject followed by verb can be used in a neutral context, and value 0 otherwise. Verb-Subject has value 1 when, in the same setting, the PREVALENCE AND RECOVERABILITY 3 order verb followed by subject can be used. For example: English has value 1 for Subject-Verb and value 0 for Verb-Subject while Italian has value 1 for both parameters. Verb-Object has value 1 when a main verb (not the auxiliary) can precede its object in a neutral context, and 0 otherwises; while Object-Verb has value 1 if the main verb can follow its object in a neutral context, and 0 otherwise. English has Verb-Object value 1 and Object-Verb value 0; German has value 1 for both; Japanese has Verb-Object set to 0 and Object-Verb value 1. The remaining 6 parameters in this group describe the different word order structures SVO, SOV, VSO, VOS, OSV, OVS: each of these parameters has value 1 when the corresponding word order can be used in a neutral context, and value 0 otherwise. These word order parameters have very different distribution among the world languages: of the six possible word orders listed above, it is estimated that around 45% of the world languages follow the SOV order, 42% the SVO, 9% have VSO, 3% have VOS, only 1% follow the OVS order, and the remaining possibility, OSV, is extremely rare, estimated at only 0.2%, see [28]. We will return to discuss how the relative frequencies of different parameters, within the group of languages that we consider in this paper, affect the behavior in the Kanerva Network. The frequencies of the 21 parameters within the group of languages used for this study (see the list in the Appendix) are reported in the table below. Parameter [01] Subject–Verb [02] Verb–Subject [03] Verb–Object [04] Object–Verb [05] Subject–Verb–Object [06] Subject–Object–Verb [07] Verb–Subject–Object [08] Verb–Object–Subject [09] Object–Subject–Verb [10] Object–Verb–Subject Frequency 0.64957267 0.31623933 0.61538464 0.32478634 0.56837606 0.30769232 0.1923077 0.15811966 0.12393162 0.10683761 0.58974361 0.2905983 0.41025642 0.52564102 0.48290598 0.38034189 0.47435898 0.38461539 0.38034189 0.49145299 [A 01] Attributive–Adjective–Agreement 0.46581197 [13] Adjective–Noun [14] Noun–Adjective [15] Numeral–Noun [16] Noun–Numeral [11] Adposition–Noun–Phrase [12] Noun–Phrase–Adposition [17] Demonstrative–Noun [18] Noun–Demonstrative [19] Possessor–Noun [20] Noun–Possessor The Adposition-Noun-Phrase parameter is set to 1 in a language, when there are adpositions that precede the noun phrase they occurs with, while the Noun-Phrase-Adposition parameter is set to 1 when there are adpositions that follow the noun phrase. Both Adposition-Noun-Phrase and Noun-Phrase-Adposition can have value 1 in a language that has both prepositions and postposi- tions. The pair of parameters Adjective-Noun and Noun-Adjective regulate whether an adjective can precede (respectively, follow) the noun it modifies in a neutral context. Similarly, Numeral- Noun and Noun-Numeral are set to 1 when there are, in the language, cardinal numerals that precede (respectively, follow) the noun they modify in a neutral context. The same for the pairs 4 J.J.PARK, R.BOETTCHER, A.ZHAO, A.MUN, K.YUH, V.KUMAR, M.MARCOLLI Demonstrative-Noun and Noun-Demonstrative, and Possessor-Noun and Noun-Possessor with re- spect to demonstratives (respectively, possessors) and the noun they modify. Finally, the parame- ter Attributive-Adjective-Agreement is set to 1 for a language when there are attributive adjectives that show agreement with (some of) the nouns they modify. For example, this parameter is 0 for English and 1 for Italian. A complete list of the syntactic parameters recorded in the SSWL database and their linguistic meaning is available at http://sswl.railsplayground.net/browse/properties and in TerraL- ing http://www.terraling.com/groups/9/properties This particular choice of languages from the SSWL database is motivated by the fact that, for this list, there is a complete mapping of the values of the 21 syntactic parameters listed above. This makes it possible to construct a Kanerva network with enough data points in it to carry out our intended analysis. 2.2. Parameters and Dependencies. There is clearly some degree of dependence between the 6 word order parameters SVO, SOV, VSO, VOS, OSV, OVS and the previous 4 parameters in the list, so that these cannot be all completely independent binary variables. However, this dependence relation is more subtle than it might appear at first. To illustrate the point with an example, consider the case of the languages English and Italian. Both have 1 for SVO and 0 for VSO, but as mentioned above English has value 1 for Subject-Verb and value 0 for Verb-Subject, while Italian has value 1 for both parameters. This means that the relation between these parameters is not simply a fixed algebraic dependence relation (unlike the entailment of parameters that we analyzed in [26], for example). Rather, there may be relations that are expressible probabilistically, in terms of frequencies and correlations. This is the type of relations that we seek to identify with the use of sparse distributed memories. Our purpose in this study is to determine how much the presence of dependencies between the syntactic parameters is detectable through a Kanerva Network model, by measuring recoverability of some parameters in terms of the remaining ones. 3. Sparse Distributed Memory Kanerva Networks (or Sparse Distributed Memory) were developed by Pentti Kanerva in 1988, [12], [13], as a mathematical model of human long term memory. The model allows for approximate accuracy storage and recall of data at any point in a high dimensional space, using fixed hard locations distributed randomly throughout the space. During storage of a datum, hard locations “close” to the datum encode information about the data point. Retrieval of information at a location in the space is performed by pooling nearby hard locations and aggregating their encoded data. The mechanism allows for memory addressability of a large memory space with reasonable accuracy in a sparse representation. Kanerva Networks model human memory in the following way: a human thought, perception, or experience is represented as an (input) feature vector – a point in a high dimensional space. Concepts stored by the brain are also represented as feature vectors, and are usually stored rela- tively far from each other in the high dimensional space (the mind). Thus, addressing the location represented by the input vector will yield, to a reasonable degree of accuracy, the concept stored near that location. Thus, Kanerva Networks model the fault tolerance of the human mind – the mind is capable of mapping imprecise input experiences to well defined concepts. For a short introduction to Kanerva Networks aimed at a general public, see §13 of [6]. the field F2 = {0, 1}, consider a vector space (Boolean space) FN More precisely, the functioning of Kanerva Network models can be summarized as follows. Over 2 of sufficiently large dimension N . PREVALENCE AND RECOVERABILITY 5 Inside FN 2 , choose a uniform random sample of 2k hard locations, with 2k << 2N . Compute the median Hamming distance between hard locations. The access sphere of a point in the space FN 2 is a Hamming sphere of radius slightly larger than this median value (see §6 of [12] for some precise estimates). When writing to the network at some location X in the space FN 2 , data is distributively stored by writing to all hard locations within the access sphere of that point X. Namely, each hard location stores N counters (initialized to 0), and all hard locations within the access sphere of X have their i-th counter incremented or decremented by 1, depending on the value of the i-th bit of X, see §3.3.1 of [13]. When the operation is performed for a set of locations, each hard location stores a datum whose i-th entry is determined by the majority rule of the corresponding i-th entries for all the stored data. One reads at a location Y in the network a new datum, whose i-th entry is determined by comparing 0 to the i-th counters of all the hard locations that fall within the access sphere of Y , that is, the i-th entry read at Y is itself given by the majority rule on the i-th entries of all the data stored at all the hard locations accessible from Y . For a more detailed account, see [12], [13], and the summary in §13 of [6]. The network is typically successful in reconstructing stored data, because intersections between access spheres are infrequent and small. Thus, copies of corrupted data in hard locations within the access sphere of a stored datum X are in the minority with respect to hard locations faithful to X’s data. When a datum is corrupted by noise (i.e. flipping bit values randomly), the network is sometimes capable of correctly reconstructing these corrupted bits. The ability to reconstruct certain bits hints that these bits are derived from the remaining, uncorrupted bits in the data. In addition to modeling human memory in applications to neuroscience and neural computation (see for instance [17]), Kanerva networks have been used in various other contexts, such as weather prediction [25], robotics [21], and as machine-learning tools, in comparison to other forms of associative memory, [4], [11], [15]. Most applications of Kanerva networks in the literature have focused on models of memory and of data storage and recovery. While some applications to Linguistics have been developed, for instance in the setting of speech recognition [24], Kanerva networks have not been previously used to analyze syntactic structures and identify dependencies between syntactic parameters. 3.1. Detecting Parameter Dependencies. Although Kanerva Networks were originally devel- oped for and motivated by human memory, they are also a valuable general tool for detecting dependencies in a high-dimensional data sets. The reasons for this can be found in the literature on Kanerva Networks, see for instance the discussion in [11]. In the present paper, we treat each language, and its corresponding list of syntactic parameters, as a single data point in the network. Concretely, each data point is a concatenated binary string of all the values, for that particular language, of the 21 syntactic parameters listed in §1.1. As we recalled above, a Kanerva network operates by writing to uniformly random hard loca- tions within a Hamming sphere of specified radius centered at the write location (specified by a bitstring), and reading from hard locations within a Hamming sphere centered at the read location, returning the majority rule derived from the data points for each of the individual bits. Regardless of how well this is representative of human memory, this system can demonstrate a clear correlation (i.e. dependence) between certain parameters. Observe that, if we had written to clusters of data points in the space, interpreted as separate syntactic families of languages, then reading from locations in the vicinity of the locations of these clusters would result in reading back a necessarily correlated set of parameter values, due to the each parameters being determined by the locally smaller set of hard locations. Here, by syntactic families, we do not necessarily mean historical-linguistic families, but rather families of languages whose data set cluster together in the Kanerva Network space. How well such groupings reflect historical-linguistic families remains an 6 J.J.PARK, R.BOETTCHER, A.ZHAO, A.MUN, K.YUH, V.KUMAR, M.MARCOLLI Figure 1. Prevalence and recoverability in a Kanerva Network (random data). issue for future investigation. If the original location came from a cluster or family of languages, then we would expect to see corrupted bits recovered, indicating that this particular subset of bits is dependent on the rest, i.e. that the parameters are not independent since there exists a non-zero correlation between their values. 4. Implementation Method We considered 166 languages from the SSWL database, which have a complete mapping of the 21 syntactic parameters discussed in §1.1. These provide 166 data points in a Kanerva Network with Boolean space F21 2 . The complete list of languages used is reported in the Appendix. The python/c sdm sparse distributed memory library1 was used to simulate the Kanerva net- work. The current state of the library at the time of the experiment was not functional, so the last working version from January 31, 2014 was used. The library was initialized with an access sphere of n/4, where n is the median hamming distance between items. This was the optimal value we could work with, because larger values resulted in an excessive number of hard locations being in the sphere, which the library was unable to handle. Three different methods of corruption were tested. First, the correct data was written to the Kanerva network, then reads at corrupted locations were tested. A known language bit-string, with 1https://github.com/msbrogli/sdm PREVALENCE AND RECOVERABILITY 7 Figure 2. Prevalence and recoverability for syntactic parameters in a Kanerva Network. a single corrupted bit, was used as the read location, and the result of the read was compared to the original bit-string in order to test bit recovery. The average Hamming distance resulting from the corruption of a given bit, corresponding to a particular syntactic parameter, was calculated across all languages. In order to test for relationships independent of the prevalence of the features, another test was run that normalized for this. For each feature, a subset of languages of fixed size was chosen randomly such that half of the languages had that feature. Features that had too few languages with or without the feature to reach the chosen fixed size were ignored for this purpose. For this test, a fixed size of 95 languages was chosen, as smaller sizes would yield less significant results, and larger sizes would result in too many languages being skipped. The languages were then written to the Kanerva network and the recoverability of that feature was measured. Finally, to check whether the different recovery rates we obtained for different syntactic param- eters were really a property of the language data, rather than of the Kanerva network itself, the test was run again with random data generated with an approximately similar distribution of bits. In this test, the general relationship of Figure 1 was observed. This indicates that the general shape of the curve may be a property of the Kanerva network. The magnitude of the values for the actual data, however, is very different, see Figure 2. This indicates that the recoverability 8 J.J.PARK, R.BOETTCHER, A.ZHAO, A.MUN, K.YUH, V.KUMAR, M.MARCOLLI rates observed for the syntactic parameters are begin influenced by the language data, hence they should correspond to actual syntactic properties. 5. Summary of Main Results Summarizing, the main results we obtained in the analysis of the selected data of languages and parameters identifies two different effects on the recoverability of syntactic parameters in Kanerva Networks. 5.1. Large scale structure: prevalence and recoverability. The first effect is a general relation between prevalence of parameters across languages and recoverability in sparse distributed memories. This is a general effect that depends on the functioning of Kanerva Networks and can be seen using random data with the same frequencies as the chosen set of parameters. The curve expressing recoverability as a function of prevalence using random data (Figure 1) indicates the overall underlying effect. This phenomenon seems in itself interesting, given ongoing investigations on how prevalence rates of different syntactic parameters may correlate to neuroscience models, see for instance [16]. 5.2. Smaller scale structures of recoverability. In addition to the large scale relationship be- tween prevalence of feature and recoverability mentioned above, the variation of the recoverability values from the general trend is consistent and indicates a second order relationship, which we see in the plot of the real data of syntactic parameters in Figure 2. A far smaller variation from a smooth curve was observed when using random input data as in Figure 1. The normalized test indicates a smaller but still significant variation in feature recoverability even when all features considered had the same prevalence among the dataset. 5.3. Recoverability scores. The resulting levels of recoverability of the syntactic parameters are listed in the table below, and displayed in Figure 3. The results of the normalized test are listed, for a selection of parameters, in the second table and displayed in Figure 4. To each parameter we assign a score, obtained by computing the average Hamming distance between the resulting bit-vector in the corruption experiment and the original one. The lower the score, the more easily recoverable a parameter is from the uncorrupted data, hence from the other parameters. PREVALENCE AND RECOVERABILITY 9 Figure 3. Corruption of syntactic parameters in a sparse distributed memory (non-normalized). Parameter [01] Subject-Verb [02] Verb-Subject [03] Verb-Object [04] Object-Verb [05] Subject-Verb-Object [06] Subject-Object-Verb [07] Verb-Subject-Object [08] Verb-Object-Subject [09] Object-Subject-Verb [10] Object-Verb-Subject [11] Adposition-Noun-Phrase [12] Noun-Phrase-Adposition [13] Adjective-Noun [14] Noun-Adjective [15] Numeral-Noun [16] Noun-Numeral [17] Demonstrative-Noun [18] Noun-Demonstrative [19] Possessor-Noun [20] Noun-Possessor [A01] Attributive-Adjective-Agreement Corruption (non-normalized) 1.50385541439 2.03638553143 1.56180722713 1.86186747789 1.6709036088 1.88596384645 1.7879518199 1.66993976116 1.46596385241 1.4907228899 1.52427710056 1.81512048125 1.82927711248 1.6037349391 1.74969880581 1.94036144018 1.87596385121 1.87463855147 1.91487951279 1.74102410674 1.79102409244 10 J.J.PARK, R.BOETTCHER, A.ZHAO, A.MUN, K.YUH, V.KUMAR, M.MARCOLLI Figure 4. Corruption (normalized test) of some syntactic parameters. Parameter [02] Verb-Subject [04] Object-Verb [06] Subject-Object-Verb [12] Noun-Phrase-Adposition [13] Adjective-Noun [15] Numeral-Noun [16] Noun-Numeral [17] Demonstrative-Noun [18] Noun-Demonstrative [19] Possessor-Noun [20] Noun-Possessor [A01] Attributive-Adjective-Agreement Corruption (normalized) 1.00494736842 0.910842105263 0.906736842105 0.853473684211 1.03157894737 1.14094736842 1.01378947368 1.14157894737 0.985789473684 1.04957894737 0.736105263158 0.818842105263 6. Further Questions and Directions We outline here some possible directions in which we plan to expand the present work on an approach to the study of syntactic parameters using Kanerva Networks. 6.1. Kanerva Networks and Language Families. Through our experiments of corrupting a syntactic parameter and checking whether the Kanerva Network can successfully reconstruct the original data, we have learned that the corruption of certain syntactic parameters is more fixable in the Kanerva Network. One interpretation of this result is that such parameters are dependent on the remaining ones. Indeed, for the set of syntactic parameters used in this study, we know a priori, for linguistic reasons, that there should be a certain degree of dependency between some of the parameters, for example in the case of the first group of ten parameters governing the word order relations between subject, verb, and object, with the caveat discussed in §2.2 above on how one should interpret such relations. A more detailed study of known relations between other groups of syntactic parameters and how they correlate to measures of recoverability in a Kanerva Network would be needed in order to better understand how syntactic dependencies affect PREVALENCE AND RECOVERABILITY 11 recoverability, and further develop Kanerva Networks as a possible approach to detect additional dependency relations between the binary variables of other syntactic parameters. As we have seen, the scalar score we obtain from the corruption experiments indicates how tractable is a variable, or syntactic parameter, in the context of data points in its vicinity. In other words, if the scalar score is small for a certain parameter, then the parameter is derivable from other correct bits. Yet, one limitation of our result is that this scalar score is simply computed as the average of the Hamming distance between the resultant bit-vector and the original bit-vector. The derivability of a certain parameter might vary depending on the family of languages that it belongs to. For example, when a certain language feature is not robust to corruption in certain regions of the Kanerva Network, which means the parameter is not depended on other parameters, but robust to corruption in all the other regions, we will get a low scalar score. While our present approach can provide some meaningful insight about whether a certain fea- ture is generally retrievable by analyzing other features, it does not shed light on identifying which feature is a determining feature in a family of languages. In other words, if a feature is very tractable (low scalar score) in one family of languages, this means that feature is a sharing characteristic of the language group. If it is not very tractable, then it might indicate that the feature is a changeable one in the group. Thus, by conducting the same experiments grouped by language families, we may be able to get some information about which features are important in which language family. It is reasonable to assume that languages belonging to the same historical-linguistic family are located near each other in the Kanerva Network. However, a more detailed study where data are broken down by different linguistic families will be needed to confirm this hypothesis. Under the assumption that closely related languages remain near in the Kanerva Network, the average of dependencies of a given parameter over the whole space might be less informative globally, because there is no guarantee that the dependencies would hold throughout all regions of the Kanerva Network. However, this technique may help identifying specific relations between syntactic parameters that hold within specific language families, rather than universally across all languages. The existence of such relations is consistent with the topological features identified in [22] which vary across language families, so we expect to encounter similar phenomena from the Kanerva Networks viewpoint as well. 6.2. Kanerva Networks and the Language–Neuroscience Connection. One of the main open frontiers in understanding human language is relating the structure of natural languages to the neuroscience of the human brain. In an idealized vision, one could imagine a Universal Grammar being hard wired in the human brain, with syntactic parameters being set during the process of language acquisition (see [1] for an expository account). This view is often referred to as the Chomskian paradigm, because it is inspired by some of Chomsky’s original proposals about Universal Grammar. There have been recent objections to the Universal Grammar model, see for instance [5]. Moreover, a serious difficulty lies in the fact that there is, at present, no compelling evidence from the neuroscience perspective that would confirm this elegant idea. Some advances in the direction of linking a Universal Grammar model of human language to neurobiological data have been obtained in recent years: for example, some studies have suggested Broca’s area as a biological substrate for Universal Grammar, [20]. Moreover, recent studies like [16] have found indication of a possible link between the cross linguistic prevalence of syntactic parameters relating to word order structure and neuroscience models of how action is represented in Broca’s area of the human brain. This type of results seems to cast a more positive light on the possibility of relating syntactic parameters to computational neuroscience models. 12 J.J.PARK, R.BOETTCHER, A.ZHAO, A.MUN, K.YUH, V.KUMAR, M.MARCOLLI Models of language acquisition based on neural networks have been previously developed, see for example the survey [23]. Various results, [4], [11], [14], [15], [17], have shown advantages of Kanerva’s sparse distributed memories over other models of memory based on neural networks. To our knowledge, Kanerva Networks have not yet been systematically used in models of language acquisition, although the use of Kanerva Networks is considered in the work [18] on emergence of language. Thus, a possible way to extend the present model will be storing data of syntactic parameters in Kanerva Network, with locations representing (instead of different world languages) events in a language acquisition process that contain parameter-setting cues. In this way, one can try to create a model of parameter setting in language acquisition, based on sparse distributed memories as a model of human memory. We will return to this approach in future work. Appendix: Languages The list of languages from the SSWL database that we considered for this study consists of: Acehnese, Afrikaans, Albanian, American Sign Language, Amharic, Ancient Greek, Arabic (Gulf), Armenian (Eastern), Armenian (Western), Bafut, Bajau (West Coast), Bambara, Bandial, Basaa, Bellinzonese, Beng, Bengali, Bole, Brazilian Portuguese, Breton, Bulgarian, Burmese, Calabrian (Northern), Catalan, Chichewa, Chol, Cypriot Greek, Czech, Dagaare, Digo, Digor Ossetic, Dutch, Eastern Armenian, English, English (Singapore), European Portuguese, Ewe, Farefari, Faroese, Finnish, French, Frisian (West Frisian), Ga, Galician, Garifuna, Georgian, German, Ghomala’, Greek, Greek (Cappadocian), Greek (Homeric), Greek (Medieval), Gungbe (Porto-Novo), Gurene, Gu´ebie, Haitian, Hanga, Hausa, Hebrew, Hindi, ’Hoan, Hungarian, Ibibio, Icelandic, Iha, Ilokano, Imbabura Quichua Indonesian, Irish, Iron Ossetic, Italian, Italian (Ancient Neapolitan), Japan- ese, K’iche’, Karachay, Kashaya, Kayan, Khasi, KiLega, Kinande, Kiswahili, Kiyaka, Kom, Ko- rean, Kuot, Kurdish (Sorani), Kusunda, Lango, Lani, Lao, Latin, Latin (Late), Lebanese Arabic, Lubukusu, Maasai (Kisongo), Malagasy, Mandarin, Maori, Marshallese, Masarak, Medumba, Mid- dle Dutch, Miya, Moroccan Arabic, Muyang, Nahuatl (Central Huasteca), Naki, Nawdm, Ndut, Nepali, Northern Thai, Norwegian, Nupe, Nweh, Okinawan, Old English, Old French, Old Saxon, Oluwanga, One, Palue, Panjabi, Papuan Malay, Pashto, Pima, Polish, Q’anjob’al, Romanian, Russian, Salasaca Quichua, Samoan, San Dionisio Ocotepec Zapotec, Sandawe, Saweru, Scot- tish Gaelic, Senaya, Shupamem, Sicilian, Skou, Slovenian, Spanish, Swedish, Tagalog, Taiwanese Southern Min, Thai, Tigre, Titan, Tlingit, Tommo-So, Tongan Triqui Copala, Tukang Besi, Tuki (Tukombo), Tupi (Ancient), Turkish, Twi, Ukrainian, Vata, West Flemish, Wolane, Wolof, Yawa, Yiddish, Yoruba, Zulu. References [1] M. Baker, The Atoms of Language, Basic Books, 2001. [2] N. Chomsky, Lectures on Government and Binding, Dordrecht: Foris Publications, 1982. [3] N. Chomsky, H. Lasnik, The theory of Principles and Parameters, in “Syntax: An international handbook of contemporary research”, pp.506–569, de Gruyter, 1993. [4] Ph.A. Chou, The capacity of the Kanerva associative memory, IEEE Trans. Inform. Theory, Vol. 35 (1989) N. 2, 281–298. [5] D.L. Everett, Cultural Constraints on Grammar and Cognition in Piraha: Another Look at the Design Features of Human Language, Current Anthropology 46 (2005) N.4, 621–646 [6] S. Franklin, Artificial Minds, MIT Press, 2001. [7] S.B. Furber, G. Brown, J. Bose, J.M. Cumpstey, P. Marshall, J.L. Shapiro, Sparse distributed memory using rank-order neural codes, IEEE Trans. on Neural Networks, Vol. 18 (2007) N. 3, 648–659. [8] C. Galves (Ed.) Parameter Theory and Linguistic Change, Oxford University Press, 2012. [9] M. Haspelmath, M.S. Dryer, D. Gil, B. Comrie, The World Atlas of Language Structures, Oxford University Press, 2005. http://wals.info/ PREVALENCE AND RECOVERABILITY 13 [10] M. Haspelmath, Parametric versus functional explanations of syntactic universals, in “The limits of syntactic variation”, pp. 75–107, John Benjamins, 2008. [11] T.A. Hely, D.J. Willshaw, G.M. Hayes, A New Approach to Kanerva’s Sparse Distributed Memory, IEEE Transactions on Neural Networks, Vol. 8 (1997) N. 3, 791–794. [12] P. Kanerva, Sparse Distributed Memory, MIT Press, 1988. [13] P. Kanerva, Sparse Distributed Memory and Related Models, in “Associative Neural Memories: Theory and Implementation”, M.H. Hassoun, Ed., pp. 50–76, Oxford University Press, 1993. http://www.rni.org/kanerva/sdmchapter-text.pdf [14] P. Kanerva, Encoding structure in Boolean space, in “ICANN 98: Perspectives in Neural Computing (Proceed- ings of the 8th International Conference on Artificial Neural Networks, Skoevde, Sweden)”, L. Niklasson, M. Boden, and T. Ziemke (eds.) 1, pp. 387–392, Springer 1998. [15] J.D. Keeler, Capacity for patterns and sequences in Kanerva’s SDM as compared to other associative memory models, in “Neural Information Processing Systems”, Ed. D.Z. Anderson, pp. 412–421, American Institute of Physics, 1988. [16] D. Kemmerer, The cross-linguistic prevalence of SOV and SVO word orders reflects the sequential and hierar- chical representation of action in Broca’s area, Language and Linguistics Compass, Vol.6 (2012) N.1, 50–66. [17] A. Knoblauch, G. Palm, F.T. Sommer, Memory capacities for synaptic and structural plasticity, Neural Com- putation, Vol. 22 (2010) 289–341. [18] B. MacWhinney, Models of the Emergence of Language, Annual Review of Psychology, 49 (1998) 199–227. [19] M. Marcolli, Principles and Parameters: a coding theory perspective, arXiv:1407.7169 [cs.CL] [20] G.F. Marcus, A. Vouloumanos, I.A. Sag, Does Broca’s play by the rules? Nature Neuroscience, Vol.6 (2003) N.7, 651–652. [21] M. Mendes, A.P. Coimbra, M. Cris´ostomo, AI and memory: Studies towards equipping a robot with a sparse distributed memory, IEEE Int. Conf. on Robotics and Biomimetics (ROBIO), pp. 1743–1750, Sanya, China, 2007. [22] A. Port, I. Gheorghita, D. Guth, J.M. Clark, C. Liang, S. Dasu, M. Marcolli, Persistent Topology of Syntax, arXiv:1507.05134 [cs.CL] [23] J. Poveda, A. Vellido, Neural network models for language acquisition: a brief survey, in “Intelligent Data Engineering and Automated Learning – IDEAL 2006”, Lecture Notes in Computer Science, Vol.4224, Springer, 2006, pp. 1346–1357. [24] R. Prager, F. Fallside, The modified Kanerva model for automatic speech recognition, Computer Speech and Language, Vol. 3 (1989) 61–81. [25] D. Rogers, Predicting Weather Using a Genetic Memory: a Combination of Kanerva’s Sparse Distributed Mem- ory with Holland’s Genetic Algorithms, in “Connectionist Models. Proceedings of the 1990 Summer School”, Ed. D.S. Touretzky, pp. 455–464, Morgan Kaufmann, 1990. [26] K. Siva, J. Tao, M. Marcolli, Spin Glass Models of Syntax and Language Evolution, arXiv:1508.00504 [cs.CL] [27] A. Taylor, The change from SOV to SVO in Ancient Greek, Language Variation and Change, Vol.6 (1994) 1–37. [28] R. Tomlin, Basic Word Order: Functional Principles, Croom Helm, 1986. [29] Syntactic Structures of World Languages (SSWL Database) http://sswl.railsplayground.net/ recently migrated to TerraLing [30] TerraLing Database http://www.terraling.com/ Division of Physics, Mathematics, and Astronomy, California Institute of Technology, 1200 E. California Blvd, Pasadena, CA 91125, USA E-mail address: [email protected] E-mail address: [email protected] E-mail address: [email protected] E-mail address: [email protected] E-mail address: [email protected] E-mail address: [email protected] E-mail address: [email protected]