lm_polygraph.estimators.eig_val_laplacian module
- class lm_polygraph.estimators.eig_val_laplacian.EigValLaplacian(similarity_score: Literal['NLI_score', 'Jaccard_score'] = 'NLI_score', affinity: Literal['entail', 'contra'] = 'entail', verbose: bool = False)[source]
Bases:
EstimatorEstimates the sequence-level uncertainty of a language model following the method of “Sum of Eigenvalues of the Graph Laplacian” as provided in the paper https://arxiv.org/abs/2305.19187. Works with both whitebox and blackbox models (initialized using lm_polygraph.utils.model.BlackboxModel/WhiteboxModel).
A continuous analogue to the number of semantic sets (higher values means greater uncertainty).