Duration Modeling with Semi-Markov Conditional Random Fields for Keyphrase Extraction

Xiaolei Lu, Tommy W. S. Chow

TL;DR

This paper introduces DM-SMCRFs (Duration Modeling with semi-Markov Conditional Random Fields), a novel approach that treats keyphrase extraction as a sequence labeling task at the segment level rather than the word level. By explicitly modeling the expected length (duration) of keyphrases using Gaussian and Gamma distributions, the model significantly improves extraction accuracy and uses a "constrained Viterbi" algorithm to make decoding faster and more precise.

What Problem Does This Paper Address?

Extracting keyphrases—concise phrases that capture the essence of a document—is a foundational task in Information Retrieval and Natural Language Processing. Traditional methods usually fall into two camps: unsupervised ranking (like TextRank) or supervised classification.

However, both have flaws. Ranking methods often work at the word level and require messy post-processing to glue words back into phrases. Supervised methods often rely on "candidate generation," where you pre-select potential phrases (like all noun phrases) and then classify them. This is computationally expensive and prone to missing valid phrases.

While sequence labeling (like standard Conditional Random Fields or CRFs) avoids candidate generation, it struggles to capture "segment-level" features—the characteristics of a whole phrase rather than individual words. Standard Semi-CRFs exist to handle segments, but they ignore a crucial piece of information: how long a keyphrase is actually likely to be.

Methods

The authors propose DM-SMCRFs, which builds on the Semi-Markov framework with three key innovations:

  1. Explicit Duration Modeling: The model assumes that the length of a keyphrase (its "duration") is independent of the state transition. They use parametric distributions—specifically Gaussian and Gamma—to model the probability of a keyphrase being $d$ words long. This allows the model to "know" that a two-word phrase is often more likely to be a keyphrase than a five-word one.
  2. Segment-Level Features: Unlike standard CRFs that look at word-to-word transitions, DM-SMCRFs encode features for entire segments (e.g., "is this whole segment a noun phrase?").
  3. Constrained Viterbi Decoding: To find the best sequence of labels, the authors derived a specialized Viterbi algorithm. It uses two constraints to prune the search space:
  4. Syntactic Constraint: It forces the model to only consider noun phrases as potential keyphrases (based on a parse tree).
  5. Convexity Pruning: By exploiting the mathematical convexity of the duration distributions, the algorithm can safely ignore "subpaths" that have no mathematical chance of being part of the optimal solution, significantly reducing computational complexity.

Datasets

The researchers evaluated their model across four distinct domains to test its generalizability:

  • Hulth Dataset: A standard benchmark consisting of 1,500 abstracts from Computer Engineering.
  • History, Economics, and Psychology: Three new datasets curated by the authors, consisting of roughly 300–350 abstracts each from specialized academic journals (e.g., Journal of Eastern African Studies, Psychology Science).

Key Insights and Ideas

  • Length is a Signal: The "aha moment" here is that keyphrase length isn't random noise; it follows a predictable distribution. Interestingly, the authors found that the Gamma distribution fits Engineering, History, and Economics well, while the Gaussian distribution is a better fit for Psychology.
  • Convexity for Speed: Usually, adding complexity to a model (like duration modeling) makes it slower. However, because the duration features are convex, the authors turned a potential bottleneck into a pruning tool, making the "Constrained Viterbi" more efficient than the standard version.
  • Noun Phrase Priority: By incorporating a hard constraint that keyphrases must be noun phrases into the decoding process (rather than as a preprocessing filter), the model avoids "illegal" labels that plague word-level CRFs.

Key Results

  • Superior Accuracy: DM-SMCRFs achieved the best F1 scores across all four datasets, showing an approximate 10% improvement over baselines like Naive Bayes and standard CRFs.
  • Efficiency: The constrained Viterbi algorithm proved to be more efficient than traditional Viterbi, with the decoding time scaling linearly with the testing size but at a lower slope.
  • Robustness: The model remained effective even when training data was reduced (from 90% down to 50%), showing it doesn't require massive datasets to learn the underlying duration patterns of a domain.
  • Long-Form Success: The authors successfully applied the model (trained on short abstracts) to extract keyphrases from long-form texts like the Bible (Matthew 14) and long news articles, demonstrating its practical utility.

Limitations and Future Work

The authors note that the {isInTitle} feature—which tracks if a word appears in the document title—is highly effective but difficult to encode for certain types of articles (like those with abstract or "creative" titles).

For future work, they suggest:

  • Enriching the model with global features (features that look at the document as a whole rather than just local segments).
  • Developing a more general duration feature function that can adapt to various domains without needing to manually choose between Gaussian or Gamma distributions.

Summary updated

BibTeX
@article{lu2021duration,
  author = {Xiaolei Lu and Tommy W. S. Chow},
  title = {{Duration Modeling with Semi-Markov Conditional Random Fields for Keyphrase Extraction}},
  journal = {IEEE Trans. Knowl. Data Eng.},
  year = {2021},
  url = {https://openreview.net/forum?id=Jx3CAjwRE5x},
}

Loading related content...

Figure