Outlier Detection

Returns outliers detected based on the community structure of the graph.

The algorithm detects nodes that don’t have a particular strong connection to their assigned community and rather tend to connect multiple communities. The algorithm runs an instance of LPA on the graph, initially, and then defines an outlier score based on a node’s community membership and how it compares to its neighbors community memberships.


  • top (Int) – Defines number of nodes with high outlier score to be returned. (Default: 0) If not specified, Raphtory will return the outlier score for all nodes.
  • weight (String) – Edge property (Default: ""). To be specified in case of weighted LPA.
  • cutoff (Double) – Outlier score threshold. (Default: 0.0) Identifies the outliers with an outlier score > cutoff.
  • maxIter (Int) – Maximum iterations for algorithm to run. (Default: 500)


  • total (Int) – Number of detected outliers.
  • outliers Map(Long, Double) – Map of (node, outlier score) sorted by their outlier score. If specified, returns top nodes with outlier score higher than cutoff.

See also