Skip to content

code for paper "Co2sum: contrastive learning for factual-consistent abstractive summarization"

Notifications You must be signed in to change notification settings

thinkwee/co2sum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CO2Sum

CO2Sum_LFN

  • Code for the LFN algorithm introduced in the paper
  • The process of LFN consists of three steps:
    • run get_next.py to get the context of summary
    • run ./LFN_LM/run.sh to get the fact fragments based on the article, summary and context
    • run LFN_construct.py to construct the negative samples based on the fact fragments

CO2Sum_train

  • We develop our method based on the fairseq. Since there is no model architecture modified, you can just extend the criterion, data, tasks by setting --user-dir to CO2Sum_train then start training and inference by using default fairseq-train and fairseq-generate
  • The loss function of CoEnc and CoDec are described in the ./criterions/label_smoothed_cross_entropy_with_position_triplet_contrastive.py
  • The data loading process for ground truth summary and negative samples is described in ./data/language_position_triplet_dataset.py

About

code for paper "Co2sum: contrastive learning for factual-consistent abstractive summarization"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published