Keyphrase Generation for Scientific Articles using GANs...Keyphrase Generation for Scientific...

1
Keyphrase Generation for Scientific Articles using GANs Avinash Swaminathan , Raj Kuwar Gupta , Haimin Zhang δ , Debanjan Mahata δ , Rakesh Gosangi δ , Rajiv Ratn Shah MIDAS, IIIT-Delhi, India δ Bloomberg, USA Keyphrase Generation for Scientific Articles using GANs Avinash Swaminathan , Raj Kuwar Gupta , Haimin Zhang δ , Debanjan Mahata δ , Rakesh Gosangi δ , Rajiv Ratn Shah MIDAS, IIIT-Delhi, India δ Bloomberg, USA Research Contributions We propose a GAN model, consisting of a generator and discriminator, which generates keyphrase sequences from scientific articles The Generator predicts a sequence of keyphrases given the title and abstract of the scientific article The Discriminator distinguishes between human-curated and machine-generated keyphrase sequences and provides rewards for partially-decoded sequences We evaluate our approach on 4 standard datasets on the basis of F1 scores and diversity of keyphrases Generator A Seq2Seq Encoder-Decoder model with attention mechanism to identify relevant com- ponents of the source text and generate keyphrases It also incorporate copy mechanism to copy words from source vocabulary to overcome the limited target vocabulary. Given a document d = {x 1 ,x 2 , ..., x n }, where x i is the i th token, the generator produces a sequence of keyphrases: y = {y 1 ,y 2 , ..., y m }, where each keyphrase y i is composed of tokens y 1 i ,y 2 i , ..., y l i i Discriminator Novel Discriminator based upon hierarchichal-attention made up of 2 layers. First Layer generates a representation for each keyphrase(k ) and word(h) in the source document. Context vector(C ) for each keyphrase built by calculating the weighted average over source document represen- tations. C paired with k passed to 2 nd layer alongside h to compute probability keyphrase sequence is human-curated Policy Gradient Discrete nature of text makes it difficult to backpropagate through entire discriminator-generator setup Training the GAN using policy gra- dient reinforcement learning helps overcome this problem where scores from the discriminator are rewards used to fine-tune the generator using RL Policy Gradient Update Training Workflow Equations 1. Discriminator Loss:Train Discriminator to distinguish between human-curated machine-generated keyphrase sequences D loss = -E y S r [log (D(y ))] - E y S f [log (1 - D(y ))] 2. Discriminator Reward: Reward for each keyphrase is the probability that it is human-curated. y i denotes i th keyphrase R(y i )= D(y i )= σ (W f s i+n ) 3. Reinforcement learning:Generator’s policy is to maximize the expected reward of all the keyphrases it generates. The corresponding gradient update is 5R G = m i=1 [D(y i ) - B ] 5 log Q l i j =1 G(y j i |y 1:j -1 i ,y 1:i-1 ,x) References 1.Chan, H. P.; Chen, W.; Wang, L.; and King, I. 2019. Neural keyphrase generation via reinforcement learning with adaptive rewards. In ACL. Experimental Results Results computed seperately for abstractive and extractive keyphrases Extractive keyphrases are present in the source text, while abstractive keyphrases are inferred from context of the source text Comparison Metrics include F1@5 and F1@M scores F1@5 computes F1 scores by sampling top 5 keyphrases from generator, while F1@M computes F1 score by taking all keyphrases predicted by the generator into account Proposed approach compared against 2 baseline models- CatSeq and CatSeq- RL[1] for all test datasets GAN model performs better than all baselines in case of abstractive keyphrases and is slightly worse than CatSeq-RL in case of extractive keyphrases Research Datasets Train - Kp20k, Val - Kp20k, Test - Inspec, Krapivin, NUS, Kp20k

Transcript of Keyphrase Generation for Scientific Articles using GANs...Keyphrase Generation for Scientific...

Page 1: Keyphrase Generation for Scientific Articles using GANs...Keyphrase Generation for Scientific Articles using GANs Avinash Swaminathany, Raj Kuwar Guptay, Haimin Zhang , Debanjan Mahata

Keyphrase Generation for Scientific Articles using GANs

Avinash Swaminathan†, Raj Kuwar Gupta†, Haimin Zhangδ, Debanjan Mahataδ,Rakesh Gosangiδ, Rajiv Ratn Shah †

† MIDAS, IIIT-Delhi, India δ Bloomberg, USA

Keyphrase Generation for Scientific Articles using GANs

Avinash Swaminathan†, Raj Kuwar Gupta†, Haimin Zhangδ, Debanjan Mahataδ,Rakesh Gosangiδ, Rajiv Ratn Shah †

† MIDAS, IIIT-Delhi, India δ Bloomberg, USA

Research Contributions

•We propose a GAN model, consisting of a generator and discriminator, which generateskeyphrase sequences from scientific articles

•The Generator predicts a sequence of keyphrases given the title and abstract of thescientific article

•The Discriminator distinguishes between human-curated and machine-generatedkeyphrase sequences and provides rewards for partially-decoded sequences

•We evaluate our approach on 4 standard datasets on the basis of F1 scores and diversity ofkeyphrases

Generator

•A Seq2Seq Encoder-Decoder model withattention mechanism to identify relevant com-ponents of the source text and generate keyphrases

• It also incorporate copy mechanism to copywords from source vocabulary to overcomethe limited target vocabulary.

•Given a document d = {x1, x2, ..., xn}, where xiis the ith token, the generator produces a sequenceof keyphrases: y = {y1, y2, ..., ym}, where eachkeyphrase yi is composed of tokens y1

i , y2i , ..., y

lii

Discriminator

•Novel Discriminator based upon hierarchichal-attentionmade up of 2 layers.

•First Layer generates a representation for eachkeyphrase(k) and word(h) in the source document.

•Context vector(C) for each keyphrase built by calculating theweighted average over source document represen-tations.

•C paired with k passed to 2nd layer alongside h to computeprobability keyphrase sequence is human-curated

Policy Gradient

•Discrete nature of text makes itdifficult to backpropagate through entirediscriminator-generator setup

•Training the GAN using policy gra-dient reinforcement learning helpsovercome this problem where scores fromthe discriminator are rewards used tofine-tune the generator using RL

Policy Gradient Update

Training Workflow

Equations

1. Discriminator Loss:Train Discriminator to distinguish between human-curatedmachine-generated keyphrase sequences

Dloss = −Ey∈Sr[log(D(y))]− Ey∈Sf [log(1−D(y))]

2. Discriminator Reward: Reward for each keyphrase is the probability that it ishuman-curated. yi denotes ith keyphrase

R(yi) = D(yi) = σ(Wfsi+n)

3. Reinforcement learning:Generator’s policy is to maximize the expected rewardof all the keyphrases it generates. The corresponding gradient update is

5RG =∑m

i=1[D(yi)−B]5 log∏li

j=1G(yji |y1:j−1i , y1:i−1, x)

References1. Chan, H. P.; Chen, W.; Wang, L.; and King, I. 2019. Neural

keyphrase generation via reinforcement learning with adaptiverewards. In ACL.

Experimental Results

•Results computed seperately for abstractive and extractive keyphrases

•Extractive keyphrases are present in the source text, while abstractive keyphrasesare inferred from context of the source text

•Comparison Metrics include F1@5 and F1@M scores

•F1@5 computes F1 scores by sampling top 5 keyphrases from generator, whileF1@M computes F1 score by taking all keyphrases predicted by the generatorinto account

•Proposed approach compared against 2 baseline models- CatSeq and CatSeq-RL[1] for all test datasets

•GAN model performs better than all baselines in case of abstractivekeyphrases and is slightly worse than CatSeq-RL in case of extractivekeyphrases

Research Datasets

Train - Kp20k, Val - Kp20k, Test - Inspec, Krapivin, NUS, Kp20k