TextRank: Bringing Order into Text

Rada Mihalcea, Paul Tarau

Abstract

TextRank is a fully unsupervised, graph-based ranking model designed for natural language processing tasks such as keyword extraction and document summarization. By adapting the logic of Google’s PageRank algorithm, TextRank treats text units—such as words or sentences—as nodes in a graph, with edges representing their relationships. This global approach identifies the most "important" units based on structural connectivity rather than simple local statistics. Experimental results on standard benchmarks demonstrate that TextRank achieves performance levels that rival or exceed state-of-the-art supervised systems, offering a robust solution for domains where labeled data is scarce.

Introduction

In the early 2000s, the dominant paradigm for high-performance Natural Language Processing (NLP) tasks, including keyword extraction and document summarization, relied heavily on supervised learning. These models required extensive, hand-labeled datasets, creating a significant bottleneck when adapting to new languages or specialized domains. Mihalcea and Tarau (2004) addressed this challenge by proposing TextRank, a "global" ranking model that determines the importance of a text unit based solely on its relationship with the rest of the document, eliminating the need for training data.

Methodology

The core of TextRank is a graph-based ranking algorithm that implements a "voting" mechanism similar to PageRank. In this framework, a link between two text units acts as a recommendation, where the importance of a node is determined by the number and quality of its incoming links.

Graph Construction and Edge Definition

The algorithm proceeds through several stages:

  1. Vertex Identification: Text units (words for keyword extraction, sentences for summarization) are identified as vertices.
  2. Edge Creation:
    • Keywords: Edges are formed between word-vertices if they co-occur within a specified "sliding window" (typically 2 to 10 words).
  3. Sentences: Edges are formed based on content similarity, calculated by the number of overlapping words normalized by sentence length.
  4. Iterative Ranking: The algorithm iterates until convergence, typically within 20–30 iterations. A vertex gains importance if it is connected to other highly-ranked vertices.
A sample keyword graph illustrating how word-vertices are connected based on co-occurrence within the text.

Syntactic Filtering and Post-processing

For keyword extraction, the authors observed that filtering for specific parts of speech—specifically nouns and adjectives—significantly improved results by removing semantic noise. After ranking, adjacent top-ranked words are collapsed into multi-word phrases to form final keywords.

Experimental Evaluation

TextRank was evaluated on two primary benchmarks:

  • Keyword Extraction: Using 500 abstracts from the Inspec database.
  • Sentence Extraction: Using 567 news articles from the DUC 2002 summarization task, evaluated via ROUGE scores.

Key Results

TextRank demonstrated remarkable efficacy for an unsupervised model. In keyword extraction, using a window size of 2, the system achieved an F-measure of 36.2, surpassing the leading supervised system of the era (Hulth 2003).

Performance comparison of TextRank variants against the supervised Hulth (2003) model, showing TextRank's superior F-measure.

In the DUC 2002 summarization task, TextRank consistently ranked among the top three of 15 competing systems, outperforming the lead-based baseline and remaining competitive with complex supervised models.

Discussion and Conclusion

The success of TextRank lies in its ability to capture the "recommendation" power of a text's structure. Unlike frequency-based methods, TextRank identifies nodes that are central to the document's semantic web. While the model shows slightly lower recall compared to generative human-assigned keywords—as it is limited to extractive methods—its precision and lack of training requirements make it highly versatile. Future work suggests that more sophisticated similarity measures (e.g., semantic kernels) and hybrid models combining keyword and sentence extraction could further enhance performance.

TextRank remains a foundational unsupervised method in NLP, proving that structural connectivity is a powerful proxy for semantic importance.

Summary updated

BibTeX
@inproceedings{mihalcea2004textrank,
  author = {Rada Mihalcea and Paul Tarau},
  title = {{TextRank: Bringing Order into Text}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2004},
}
Figure