I've encountered a bug with the summarization example, where the underlying Lexrank function would not converge, and iterate forever.
The root cause of this behavior seems to be a problem of the assumption of Lexrank; any (similarity) matrix supplied must follow the simple principle of representing a "stochastic, irreducible and non-periodic [Markov chain] matrix." (see the paper, Algorithm 2).
While this holds true for similarity matrixes generated with graph degrees (as in the original paper), the "transition probabilities" in the case of sentence-transformers correspond to the cosine similarity -- which can be negative.
This negative value violates the reducibility and periodicity criteria, which can cause the iterative power method to diverge (which is used to compute the dominant eigenvaluem, eventually forming the centrality distribution).
I'm proposing a simple fix by normalizing slightly differently soon!
Best,
Dennis
I've encountered a bug with the summarization example, where the underlying Lexrank function would not converge, and iterate forever.
The root cause of this behavior seems to be a problem of the assumption of Lexrank; any (similarity) matrix supplied must follow the simple principle of representing a "stochastic, irreducible and non-periodic [Markov chain] matrix." (see the paper, Algorithm 2).
While this holds true for similarity matrixes generated with graph degrees (as in the original paper), the "transition probabilities" in the case of
sentence-transformers
correspond to the cosine similarity -- which can be negative. This negative value violates the reducibility and periodicity criteria, which can cause the iterative power method to diverge (which is used to compute the dominant eigenvaluem, eventually forming the centrality distribution).I'm proposing a simple fix by normalizing slightly differently soon! Best, Dennis