LexRank is an unsupervised, graph-based approach to extractive summarization inspired by Google's PageRank. It models a document as a fully connected graph where vertices represent sentences and edge weights represent pairwise cosine similarity between TF-IDF vector representations. The algorithm computes eigenvector centrality to identify the most salient sentences, selecting those that are both highly central and minimally redundant to form the summary.
Glossary
LexRank

What is LexRank?
LexRank is a stochastic, graph-based algorithm for extractive text summarization that computes sentence importance using eigenvector centrality within a sentence similarity graph.
The algorithm applies a stochastic threshold to the similarity matrix, retaining only connections above a user-defined cosine threshold, which introduces randomness and prevents the graph from being fully connected. A degree centrality computation or a power method iteration over the similarity matrix then ranks sentences. To ensure diversity, LexRank employs a greedy maximum marginal relevance (MMR) post-processing step, penalizing sentences too similar to those already selected.
Key Features of LexRank
LexRank is a stochastic, graph-based algorithm for extractive summarization that computes sentence importance using eigenvector centrality, modeled after Google's PageRank but applied to intra-document sentence similarity graphs.
Eigenvector Centrality for Salience
LexRank models a document as a similarity graph where vertices represent sentences and edges are weighted by TF-IDF cosine similarity. It then applies eigenvector centrality—the same mathematical principle behind PageRank—to compute a stationary distribution over sentences. A sentence is deemed salient not merely by its own content, but by the number and importance of other sentences that are similar to it. This captures the intuition that a central, representative sentence will be heavily connected within the graph. The algorithm computes the principal eigenvector of the sentence adjacency matrix, yielding a probability distribution where higher scores indicate greater centrality to the document's core themes.
Stochastic Thresholding for Diversity
To prevent the summary from being dominated by a single highly-connected cluster of near-duplicate sentences, LexRank incorporates a stochastic selection process. After computing the stationary distribution, sentences are selected using a greedy algorithm with a cosine similarity threshold. Once a sentence is chosen for the summary, all sentences too similar to it are temporarily suppressed. This threshold is applied stochastically, meaning the algorithm can produce different summaries on different runs, introducing controlled diversity. This mechanism directly addresses the Maximum Marginal Relevance (MMR) trade-off between centrality and redundancy without requiring an explicit query.
Degree Centrality Baseline
The original LexRank paper by Erkan and Radev (2004) defines a simpler variant called Degree Centrality LexRank. Instead of computing the principal eigenvector, this baseline simply counts the number of sentences that exceed a similarity threshold for each candidate. The sentence with the highest degree—the most neighbors in the similarity graph—is selected first. While computationally cheaper, this method lacks the recursive reinforcement of eigenvector centrality, where a sentence gains importance from being similar to other important sentences. The full eigenvector method consistently outperforms degree centrality on ROUGE evaluation benchmarks.
Multi-Document Summarization
LexRank naturally extends to multi-document summarization by constructing a unified similarity graph across all sentences from all source documents. In this cross-document graph, sentences from different documents that discuss the same event or fact will cluster together. The eigenvector centrality computation then identifies sentences that are representative of the entire document set, not just a single document. This makes LexRank particularly effective for tasks like timeline generation from news articles or multi-case legal synthesis, where the goal is to identify the most central facts across a corpus of related legal opinions or filings.
Legal Domain Application
In legal text summarization, LexRank excels at identifying ratio decidendi—the binding legal reasoning—by surfacing sentences that are structurally central to the opinion's argument graph. Legal documents exhibit high lexical repetition and formal citation structures that create dense similarity clusters around core holdings. LexRank's graph-based approach naturally identifies these clusters. However, it is limited to extractive output only; it cannot paraphrase or synthesize novel legal conclusions. For this reason, modern legal AI pipelines often use LexRank as a pre-processing step to identify salient passages before passing them to an abstractive model for final summary generation.
Comparison to TextRank
LexRank and TextRank are both graph-based extractive summarization algorithms inspired by PageRank, but they differ in key details. TextRank uses a weighted, undirected graph with edge weights based on lexical overlap and applies a modified PageRank formula with a damping factor. LexRank uses a cosine similarity matrix with a threshold to binarize edges and computes the stationary distribution via eigenvector decomposition. LexRank's stochastic thresholding step explicitly addresses redundancy, while TextRank relies on the graph structure alone. Empirically, LexRank tends to produce more diverse summaries, while TextRank is often more computationally efficient for very large document sets.
Frequently Asked Questions
Clear, technical answers to the most common questions about LexRank, its mechanisms, and its application in legal text summarization.
LexRank is a graph-based extractive summarization algorithm that computes sentence importance using eigenvector centrality in a similarity graph. It works by first representing every sentence in a document as a TF-IDF vector in a high-dimensional space. The algorithm then calculates the cosine similarity between every pair of sentences, constructing a fully connected similarity graph where nodes are sentences and edge weights represent semantic likeness. A threshold is applied to prune weak edges, and the remaining graph is treated as a stochastic matrix. LexRank then applies a variant of the PageRank algorithm, iteratively computing the stationary distribution of a random walk over this graph. Sentences that are highly similar to many other sentences receive high centrality scores, identifying them as the most salient and representative content for the extractive summary. The final summary is assembled by selecting the top-ranked sentences, typically with a redundancy penalty like Maximum Marginal Relevance (MMR) to ensure diversity.
LexRank vs. Other Summarization Approaches
A comparative analysis of LexRank against alternative extractive and abstractive summarization methodologies for legal document processing.
| Feature | LexRank | Maximum Marginal Relevance | Abstractive (BART/LED) |
|---|---|---|---|
Summarization Paradigm | Extractive | Extractive | Abstractive |
Core Mechanism | Graph-based eigenvector centrality on sentence similarity matrix | Greedy selection balancing query relevance and redundancy | Sequence-to-sequence generation with encoder-decoder Transformer |
Query Independence | |||
Generates Novel Text | |||
Handles Multi-Document Input | |||
Factual Consistency Guarantee | High (verbatim extraction) | High (verbatim extraction) | Low (hallucination risk) |
Redundancy Handling | Implicit via centrality (diverse high-centrality nodes) | Explicit via penalty term in selection objective | Implicit via cross-attention and beam search decoding |
Computational Complexity | O(n²) for similarity matrix construction | O(n²) for pairwise redundancy computation | O(n²) with quadratic self-attention; O(n) with sparse attention |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
LexRank operates within a broader ecosystem of graph-based, frequency-based, and semantic methods for identifying salient content. These related concepts define the technical landscape of extractive summarization.
LexRank with Thresholding
The original LexRank paper introduces a threshold parameter that converts the fully-connected similarity graph into a sparse graph by removing edges below a cosine similarity cutoff. This has profound algorithmic implications:
- Computational Efficiency: Sparse matrices enable faster eigenvector computation via power iteration
- Topic Segmentation: The graph may naturally partition into connected components representing distinct subtopics
- Robustness to Noise: Low-similarity edges that introduce noise into centrality scores are eliminated In legal documents with clear section boundaries, thresholding can produce implicit segmentation where each component represents a distinct legal issue. The threshold value is a critical hyperparameter requiring domain-specific tuning.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us