Contrastive Learning enhanced Author-Style Headline Generation

Hui Liu, Weidong Guo, Yige Chen, Xiang‐Yang LiarXiv 2022 · DOI · arXiv

Abstract

Headline generation is a task of generating an appropriate headline for a given article, which can be further used for machine-aided writing or enhancing the click-through ratio. Current works only use the article itself in the generation, but have not taken the writing style of headlines into consideration. In this paper, we propose a novel Seq2Seq model called CLH3G (Contrastive Learning enhanced Historical Headlines based Headline Generation) which can use the historical headlines of the articles that the author wrote in the past to improve the headline generation of current articles. By taking historical headlines into account, we can integrate the stylistic features of the author into our model, and generate a headline not only appropriate for the article, but also consistent with the author's style. In order to efficiently learn the stylistic features of the author, we further introduce a contrastive learning based auxiliary task for the encoder of our model. Besides, we propose two methods to use the learned stylistic features to guide both the pointer and the decoder during the generation. Experimental results show that historical headlines of the same user can improve the headline generation significantly, and both the contrastive learning module and the two style features fusion methods can further boost the performance.

1. Introduction

In professional writing and social media, a headline's success often depends on its style—whether it’s punchy, inquisitive, or sensational. While current AI models are great at summarizing an article's facts, they struggle to capture the stylistic nuances (like specific syntax or word preferences) of individual authors. Headline generation (HG) models typically treat every article as if it were written by the same person. To bridge this gap, we address the challenge of Author-Style Headline Generation, aiming to produce headlines that match the original writer's stylistic "fingerprint," thereby improving click-through rates and making machine-aided writing tools more useful.

2. Methodology

We propose CLH3G (Contrastive Learning enhanced Historical Headlines based Headline Generation), a novel Seq2Seq model designed to incorporate author style.

Architecture of the CLH3G model.

2.1 Style Encoding and Contrastive Learning

The model takes the current article and a set of the author’s past headlines as input. Historical headlines are processed through a BERT-based encoder and averaged into a single style vector. To ensure the model extracts stylistic features rather than just topical ones, we introduce a Contrastive Learning (CL) auxiliary task. During training, the model learns to group headlines from the same author closer together in the vector space while pushing those from different authors apart.

2.2 Dual Style Fusion

The learned style vector guides the generation process through two mechanisms:

  1. Decoder Fusion: It influences the decoder to maintain the author's preferred syntax and structure.
  2. Style-Guided Pointer: It assists the pointer-generator network in deciding whether to copy words from the article or generate words that align with the author's stylistic habits.

3. Dataset: H3G

As no existing public datasets linked articles to specific author histories, we introduced the H3G Dataset. Collected from Tencent QQBrowser, it contains over 380,000 news articles from more than 23,000 authors. We selected authors with a consistent publishing history (3 to 60 articles within two months) to provide a sufficient stylistic "paper trail."

4. Results and Analysis

CLH3G consistently outperformed standard headline generation models and other fusion baselines across both automated metrics and human evaluation.

Performance comparison of CLH3G against baselines.

4.1 Quantitative Performance

As shown in the results table, CLH3G achieved a ROUGE-L score of 42.12 and a BLEU score of 24.13, significantly higher than the "General HG" baseline. Ablation studies confirmed that the contrastive learning module is critical; its removal led to a noticeable performance drop, proving its efficacy in capturing style.

4.2 Human Evaluation and Stylistic Consistency

In blind tests, human evaluators ranked CLH3G headlines higher in Fluency (5.2/6), Relevance (5.18/6), and Attraction (5.28/6). Qualitatively, the model successfully mimicked the structure of past headlines, such as learning to produce two-clause headlines if that was the author's typical style.

5. Conclusion

CLH3G demonstrates that historical headlines can significantly improve headline generation by integrating author-specific stylistic features. While the current architecture requires internal modifications that may be challenging for "black-box" models, it opens new avenues for personalized content generation. Future work will explore integrating these stylistic features into larger pre-trained models more efficiently and addressing the "cold start" problem for authors with limited history.

Summary updated

Abstract

Headline generation is a task of generating an appropriate headline for a given article, which can be further used for machine-aided writing or enhancing the click-through ratio. Current works only use the article itself in the generation, but have not taken the writing style of headlines into consideration. In this paper, we propose a novel Seq2Seq model called CLH3G (Contrastive Learning enhanced Historical Headlines based Headline Generation) which can use the historical headlines of the articles that the author wrote in the past to improve the headline generation of current articles. By taking historical headlines into account, we can integrate the stylistic features of the author into our model, and generate a headline not only appropriate for the article, but also consistent with the author's style. In order to efficiently learn the stylistic features of the author, we further introduce a contrastive learning based auxiliary task for the encoder of our model. Besides, we propose two methods to use the learned stylistic features to guide both the pointer and the decoder during the generation. Experimental results show that historical headlines of the same user can improve the headline generation significantly, and both the contrastive learning module and the two style features fusion methods can further boost the performance.
BibTeX
@misc{liu2022contrastive,
  author = {Hui Liu and Weidong Guo and Yige Chen and Xiang‐Yang Li},
  title = {{Contrastive Learning enhanced Author-Style Headline Generation}},
  year = {2022},
  eprint = {2211.03305},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.03305},
}
Figure