Variations of the Similarity Function of TextRank for Automated Summarization

Federico Lopez, Federico Barrios, Federico López 0003, Luis Argerich, Rosa WachenchauzerarXiv 2016

Introduction

Extractive summarization aims to produce a concise version of a document by selecting its most representative sentences. Among unsupervised methods, the TextRank algorithm is widely utilized due to its domain-independent nature. TextRank conceptualizes a document as a graph where sentences serve as nodes and the relationships between them are represented as weighted edges. The importance of a sentence is then determined by its centrality within this graph, calculated using the PageRank algorithm.

While the graph-based framework is robust, the original implementation relied on a simplistic similarity measure: the count of overlapping words between two sentences, normalized by their lengths. This paper identifies this similarity function as a primary bottleneck and proposes replacing it with more sophisticated ranking functions derived from Information Retrieval (IR).

Methodology

The authors maintain the fundamental TextRank architecture but introduce four alternative similarity measures to calculate edge weights:

  1. Longest Common Substring (LCS): This measure calculates the length of the longest identical sequence of characters shared by two sentences, providing a more granular look at textual overlap than word-level counts.
  2. Cosine Similarity (TF-IDF): A staple in vector-space modeling, this approach represents sentences as vectors of TF-IDF weights and measures the cosine of the angle between them.
  3. BM25 (Okapi BM25): A state-of-the-art probabilistic ranking function. It treats one sentence as a "query" and the other as a "document," accounting for term saturation—the principle that the marginal importance of a word decreases with its frequency.
  4. BM25+: An extension of BM25 designed to mitigate the over-penalization of longer sentences, ensuring that length normalization does not unfairly bias the centrality scores.

A significant technical challenge addressed is the potential for negative values in the standard BM25 formula when a term appears in more than half of the sentences. Since PageRank requires non-negative edge weights to converge correctly, the authors introduced a correction factor to maintain positive, meaningful weights across the graph.

Experimental Evaluation

The proposed variations were evaluated using the DUC 2002 dataset, comprising 567 documents. The task involved generating a summary equivalent to 20% of the original document length. Performance was benchmarked using ROUGE (Recall-Oriented Understudy for Gisting Evaluation) metrics, specifically ROUGE-1, ROUGE-2, and ROUGE-SU4.

Key Results

The experimental results demonstrate that modern IR functions consistently outperform the original TextRank similarity measure. As shown in the visual comparison below, the BM25-based modifications achieve higher scores across both ROUGE-1 and ROUGE-2 metrics compared to the standard TextRank and the DUC baseline.

Comparison of ROUGE-1 and ROUGE-2 scores across different similarity functions.

The quantitative analysis confirms that BM25-based variations provide the most significant gains. Specifically, BM25 with a parameter $\epsilon = 0.25$ achieved a 2.92% improvement over the baseline TextRank.

Detailed performance table showing ROUGE scores and percentage improvements over the original TextRank implementation.

Discussion and Insights

Several critical insights emerged from this study:

  • Orthogonality of Similarity: The similarity function is "orthogonal" to the TextRank model. Significant performance improvements can be achieved by simply updating the mathematical definition of sentence connection without altering the underlying graph-based ranking logic.
  • Superiority of Probabilistic Models: BM25 and its variants are more effective at capturing sentence relationships because they incorporate term saturation and document frequency, which simple overlap measures ignore.
  • Efficiency and Scalability: Despite the increased mathematical complexity, the optimized variations were more efficient. The authors reported a 16% reduction in processing time for the DUC 2002 dataset compared to the original implementation.
  • Community Impact: To ensure broad accessibility, the authors integrated their BM25-TextRank implementation into Gensim, a popular open-source Python library for natural language processing.

Limitations and Future Directions

While the results are promising, the authors acknowledge certain limitations:

  • Parameter Tuning: The performance of BM25 is sensitive to parameters like $k_1, b,$ and $\epsilon$. While standard defaults work well, specific domains (e.g., social media or legal text) might require further tuning.
  • Lexical Constraints: These methods remain lexical, meaning they rely on exact word matches. They do not inherently account for semantic similarities (synonyms). Future work could involve integrating word embeddings to bridge this gap.
  • Scope: The study focused on single-document summarization. The effectiveness of these functions in multi-document scenarios, where redundancy management is more critical, remains an area for further investigation.

Conclusion

This research demonstrates that the performance of the TextRank algorithm can be significantly enhanced by adopting modern similarity functions from the IR field. By providing a nearly 3% boost in ROUGE scores and improving computational efficiency, these variations solidify TextRank's position as a powerful, unsupervised tool for automated summarization.

Summary updated

BibTeX
@misc{lopez2016variations,
  author = {Federico Lopez and Federico Barrios and Federico López and Luis Argerich and Rosa Wachenchauzer},
  title = {{Variations of the Similarity Function of TextRank for Automated Summarization}},
  year = {2016},
  eprint = {1602.03606},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1602.03606},
}
Figure