Algorithm Library

Raphtory's intelligence capabilities powered by battle-tested graph algorithms.

Choose by Goal

What intelligence do you need?


All Algorithms

Centrality

Identify important nodes based on their position in the network.

AlgorithmWhat It FindsComplexityAPI
PageRankGlobal influence/authorityO(V + E) per iterationalgorithms.pagerank()
BetweennessBridge nodes, connectorsO(V 脳 E)algorithms.betweenness_centrality()
Degree CentralityDirectly connected hubsO(V)algorithms.degree_centrality()
HITSHubs and authoritiesO(V + E) per iterationalgorithms.hits()

Use Cases: Influencer identification, critical infrastructure detection, fraud ring leaders


Community Detection

Find groups, clusters, or coordinated behaviors.

AlgorithmDetection StyleComplexityAPI
LouvainModularity optimizationO(V log V)algorithms.louvain()
Label PropagationIterative label spreadingO(V + E)algorithms.label_propagation()

Use Cases: Customer segmentation, fraud ring detection, community health monitoring


Components

Identify connectivity structure and isolated groups.

AlgorithmWhat It FindsAPI
Weakly Connected ComponentsUndirected connectivityalgorithms.weakly_connected_components()
Strongly Connected ComponentsDirected connectivityalgorithms.strongly_connected_components()
In-ComponentsNodes that can reach targetalgorithms.in_components()
Out-ComponentsNodes reachable from sourcealgorithms.out_components()

Use Cases: Network fragmentation analysis, dependency mapping, service reachability


Temporal Algorithms

Analyze how networks evolve and spread over time.

AlgorithmTemporal InsightUse CaseAPI
Temporal ReachabilityWho can reach whom whenAttack chains, causalityalgorithms.temporal_reachability()
Temporal 3-Node Motifs3-node temporal patternsPattern discoveryalgorithms.temporal_three_node_motifs()
Temporal Rich ClubElite connectivity over timeCore group evolutionalgorithms.temporal_rich_club_coefficient()

Use Cases: Cybersecurity (attack reconstruction), social analytics (viral spread), fraud (coordinated timing)


Motifs & Patterns

Find recurring structural patterns.

AlgorithmPattern TypeAPI
Triangle Count3-node closed trianglesalgorithms.triangle_count()
Local Triangle CountPer-node trianglesalgorithms.local_triangle_count()
3-Node MotifsAll 3-node patternsalgorithms.three_node_motifs()
Triplet Count3-node open patternsalgorithms.triplet_count()

Use Cases: Structural analysis, fraud pattern detection, social network analysis


Metrics

Measure graph-level properties.

MetricWhat It MeasuresAPI
Clustering CoefficientTriangle densityalgorithms.global_clustering_coefficient()
Graph DensityEdge saturationalgorithms.directed_graph_density()
ReciprocityMutual connectionsalgorithms.global_reciprocity()
Average DegreeMean connectivityalgorithms.average_degree()

Use Cases: Network health monitoring, structural evolution tracking, benchmark metrics


Path Finding

Trace connections, routes, and accessibility.

AlgorithmWhat It FindsAPI
Single Source Shortest PathShortest paths from sourcealgorithms.single_source_shortest_path()
DijkstraWeighted shortest pathsalgorithms.dijkstra()

Use Cases: Money laundering path tracing, supply chain routing, social distance


Embeddings

Learn vector representations for ML integration.

AlgorithmOutputUse CaseAPI
FastRPNode vectorsGraph ML featuresalgorithms.fast_rp()

Use Cases: Feature engineering for ML models, similarity search, recommendations


By Industry

Financial Services

Fraud Detection:

Risk Scoring:

Cybersecurity

Threat Hunting:

Social Platforms

Community Health:

Operations

Infrastructure Monitoring:


Performance Guide

Algorithm Selection by Scale

Graph SizeFast AlgorithmsModerateExpensive
<1M edgesAny algorithm--
1M-10M edgesPageRank, Louvain, Label PropagationBetweennessFull motif enumeration
10M-100M edgesDegree, Label PropagationPageRank, Triangle CountBetweenness
>100M edgesStreaming/samplingPageRank (parallel)-

Optimization Tips

  1. Use temporal windows: Analyze recent data for real-time insights
  2. Parallelize: Most algorithms support multi-threading
  3. Sample strategically: Label propagation works on samples
  4. Cache centrality: Reuse scores across queries

Getting Started

Quick example:

Learn More


Need Help Choosing?

  1. Case Studies - Real-world algorithm combinations
  2. Community Slack - Ask the Raphtory team