Introduction
Keyphrase generation (KG) is a fundamental task in natural language processing, aimed at distilling the core concepts of a document into a concise set of terms. Despite advancements in sequence-to-sequence models, traditional approaches often treat KG as a flat sequential task. This perspective leads to two primary issues: the "Fixed-Number Trap," where models struggle to adapt the number of generated phrases to document length, and the "Duplication Trap," where models generate redundant phrases (e.g., "machine learning [sep] machine learning").
Researchers from The Chinese University of Hong Kong and Tencent AI Lab addressed these challenges in their ACL 2020 paper by introducing ExHiRD (Exclusive Hierarchical Decoding). This framework models keyphrase generation as a hierarchical process—generating a set of phrases, where each phrase is a sequence of words—while implementing mechanisms to aggressively eliminate redundancy.
The ExHiRD Framework
The core of ExHiRD is a two-level hierarchical decoder designed to capture the natural structure of keyphrase sets.
Hierarchical Decoding Architecture
Unlike standard models that use a single decoder, ExHiRD employs two distinct Recurrent Neural Networks (RNNs):
- Phrase-level Decoder (PD): This high-level component manages the overall "state" of the keyphrase set. It determines which aspect of the document to focus on next and initializes the word-level decoder's hidden state.
- Word-level Decoder (WD): This low-level component generates the actual sequence of words for a specific keyphrase.
A critical feature of this architecture is Attention Rescaling. The attention weights of the word-level decoder are rescaled by the phrase-level decoder's attention. This ensures that the model maintains focus on the specific document region identified by the phrase-level "manager" throughout the generation of an individual phrase.
Exclusive Mechanisms
The authors observed that in the majority of cases (approx. 85% in the KP20k dataset), keyphrases for a single document begin with different words. Leveraging this "First Word" heuristic, ExHiRD introduces two exclusion mechanisms to prevent duplicates:
- Soft Exclusion (ExHiRD-s): During training, an "exclusive loss" is added to penalize the model if it attempts to start a new phrase with a word that appeared at the start of the previous $K$ phrases.
- Hard Exclusion (ExHiRD-h): During inference, the model is strictly prohibited from selecting a first word that has already been used to initiate a phrase within the current generation window.
Experimental Evaluation
The model was trained on the KP20k dataset and evaluated across four standard benchmarks: KP20k, Inspec, Krapivin, and SemEval.
Performance and Redundancy Reduction
ExHiRD-h consistently outperformed state-of-the-art baselines such as catSeq and catSeqD. On the KP20k dataset, ExHiRD-h achieved an $F_1@M$ score of 0.374, surpassing the best baseline of 0.368.
The most significant improvement was observed in the Duplication Ratio (DupRatio), which measures the frequency of redundant outputs. As shown in the table below, ExHiRD-h dramatically reduced redundancy compared to existing methods. For instance, on the Inspec dataset, the catSeqCorr baseline had a DupRatio of 0.352, whereas ExHiRD-h reduced this to 0.030.
Beyond accuracy and diversity, the model also demonstrated superior performance in generating "absent" keyphrases—terms that are conceptually relevant but do not appear verbatim in the source text.
Conclusion and Future Work
ExHiRD represents a significant step forward in keyphrase generation by explicitly modeling hierarchical structure and enforcing diversity at the phrase onset. By focusing on the diversity of the first word, the model achieves a computationally efficient way to boost set-level variety.
Future research may explore more sophisticated search strategies, such as integrating beam search into the hierarchical framework, and further refining the "exclusion window" hyperparameter to balance diversity with the generation of closely related, valid phrases.
Summary updated