This article is relevant to software engineers, data engineers, and architects building on graph databases across use cases including network analysis, operations research, fraud detection, AI pipelines, and large-scale graph computation.
FalkorDB’s latest release addresses this directly. Three new capabilities algo.maxFlow, algo.harmonicCentrality, and graph.traverse accessible inside User-Defined Functions (UDFs) as well as through the CLI, bringing a meaningful class of graph computation into the query layer. Developers can now express constraint optimization, node importance ranking, and custom traversal logic without extracting data from the database.
The graph database market currently grows at a compound annual rate between 18 and 22 percent, driven by adoption across finance, telecommunications, logistics, and healthcare verticals. Teams in these domains increasingly require graph-layer analytics, not just graph-layer storage. The three algorithms this release introduces address that requirement directly.
Key Takeaways
-
1
algo.maxFlow runs constraint-based optimization directly inside Cypher queries, removing the need for external solvers.
-
2
algo.harmonicCentrality ranks node influence correctly on disconnected graphs, where closeness centrality breaks down and returns undefined scores.
-
3
graph.traverse() inside UDFs lets developers encode custom multi-source traversal logic close to the data, without externalizing graph computation.
algo.maxFlow: Network Flow Optimization Inside Cypher
What Max Flow Computes
The max flow algorithm determines the maximum volume of flow that can travel from one or more source nodes to one or more sink nodes in a directed, weighted graph, where each edge carries a capacity constraint. The algorithm answers a specific question: given the limits on each connection in this network, what is the maximum throughput the system can sustain?
The dual result, the minimum cut, identifies which edges are the binding bottlenecks. Both answers are operationally useful depending on the problem.
FalkorDB exposes this as algo.maxFlow with the following configuration options:
- Multi-source / multi-sink support : not restricted to single-pair flow computations
- Node label and relationship type filters : scopes computation to a subgraph inline, without preprocessing
- Configurable capacity property : you map any numeric relationship property as the capacity value
- Selectable outputs : returns nodes, edges, edgeFlows, and the maxFlow scalar independently
algo.maxFlow
Maximum throughput under edge capacity constraints, computed natively in Cypher.
Problems Max Flow Solves
Max flow applies to any system that moves resources through a constrained network. The problem structure recurs across domains:
Network and infrastructure engineering:
- Compute maximum data throughput between nodes under link bandwidth limits
- Identify saturated links before they cause incidents by inspecting the minimum cut
- Model failover scenarios by removing edges and recomputing flow
Logistics and supply chain:
- Route goods from multiple suppliers to multiple distribution centers under truck capacity and warehouse throughput constraints
- Locate bottleneck edges in a distribution graph, which the minimum cut surfaces directly
Operations research and scheduling:
- Solve assignment problems: workers to shifts, applicants to roles, guests to tables under mutual exclusion constraints
- These map to bipartite flow networks where the max flow value equals the size of the maximum valid assignment
Financial network analysis:
- Model transaction limits as edge capacities and trace how much capital can move between accounts under regulatory constraints
- Identify structuring patterns where flow splits deliberately to avoid capacity thresholds
Example Usage
CALL algo.maxFlow(
'source_node_id',
'sink_node_id',
{
capacityProperty: 'bandwidth',
nodeLabels: ['Router'],
relationshipTypes: ['CONNECTS']
}
)
YIELD nodes, edges, edgeFlows, maxFlow
Running this computation natively in Cypher, with filters scoping it to a subgraph, removes the need to extract data, invoke an external solver, and write results back. The data already lives in the graph. The computation now runs there as well.
algo.harmonicCentrality
Stable node importance scoring on disconnected graphs.
algo.harmonicCentrality: Stable Node Importance Ranking on Incomplete Graphs
What Harmonic Centrality Measures
Centrality algorithms rank nodes by their structural importance within a graph. Harmonic centrality defines importance as the sum of the reciprocals of shortest-path distances from a given node to all other reachable nodes.
The consequence is that unreachable nodes contribute zero to the sum, because the reciprocal of infinity is zero. Closeness centrality takes the inverse approach: it sums raw distances, so any unreachable pair drives the denominator toward infinity and collapses the score to zero or leaves it undefined.
As Marchiori and Latora established in the original formulation of this measure: “We suggest to use the sum of the reciprocals of the shortest distances in place of the mean of the distances. In the case of disconnected graphs the sum is finite, because the contribution of unreachable nodes is zero, and this solves the problem.”
Harmonic centrality degrades gracefully on disconnected graphs. Closeness centrality does not.
Why Disconnected Graphs Are the Default in Production
Running closeness centrality on these graphs produces silent failures: the algorithm returns scores, but those scores are incorrect or undefined for any node that cannot reach a disconnected component. Harmonic centrality returns meaningful, comparable scores for every node regardless of connectivity.
“Centrality measures, prized for their straightforwardness and effectiveness, are at the heart of network analysis. They help enterprises identify key actors and optimize information flows, critical for influence propagation, marketing, and crisis management.”
Where Harmonic Centrality Applies
Social and organizational network analysis:
- Identify brokers and hubs in communication graphs where not every employee connects to every component
- Score influencers in partially crawled social graphs without waiting for full connectivity
Fraud and risk networks:
- Rank accounts, entities, or devices by network centrality to surface high-connectivity nodes for investigation
- Produces correct scores even when the transaction graph contains isolated clusters from separate data sources
Recommendation and personalization:
- Score items or users by their position in a relationship graph to seed traversal for collaborative filtering
- Handles cold-start conditions where new nodes carry limited connections
Knowledge graph maintenance:
- Identify the most connected concepts or entities in a knowledge base to prioritize for enrichment or review
- Surface unexpectedly isolated nodes that indicate data quality gaps
FalkorDB’s implementation supports node label and relationship type filtering, and returns (node, score) pairs directly queryable in Cypher. The returned score is an approximation of the harmonicCentrality score computed using HyperLogLog.
CALL algo.harmonicCentrality({
nodeLabels: ['Person'],
relationshipTypes: ['KNOWS']
})
YIELD node, score
ORDER BY score DESC
LIMIT 25
graph.traverse() in UDFs: Custom Graph Logic Inside the Database
The Constraint Stateless UDFs Impose
User-Defined Functions extend a graph database with custom computation logic, encoding domain-specific scoring, filtering, or transformation that Cypher alone cannot express. Prior to this release, UDFs in FalkorDB were stateless: they accepted input parameters and returned computed values, but they had no access to the graph structure itself.
That constraint produced a predictable architectural pattern: extract the relevant subgraph from the database, pass it to application code, run the custom algorithm externally, and write results back. For workloads that run at scale or high frequency, this round-trip carries real cost in latency, serialization overhead, and operational complexity.
What the Graph Object Provides
The latest FalkorDB release introduces a graph object accessible within UDFs, exposing graph.traverse() as a programmable multi-source traversal API. The function accepts:
- One or more source nodes as traversal seeds
- Maximum traversal distance or depth
- Direction: inbound, outbound, or bidirectional
- Node label and relationship type filters
It returns the subgraph reachable under those parameters, directly inside the UDF execution context.
Migration note: This release removes falkor.traverse() and replaces it with graph.traverse(). Existing UDFs that call falkor.traverse() require migration before deploying this version.Release Summary
FalkorDB’s three new capabilities expand the algorithm layer available to developers building on the platform.
algo.maxFlow brings constraint-based network optimization into Cypher queries. It covers routing, allocation, scheduling, and assignment problems across logistics, infrastructure, finance, and operations research, and it removes the need to extract data for an external solver.
algo.harmonicCentrality provides stable, correct node importance scoring on graphs that are not fully connected. It produces meaningful scores where closeness centrality returns undefined results, making it a reliable choice for production workloads on real-world data.
graph.traverse() inside UDFs makes traversal logic programmable and co-located with the data. It removes a category of external infrastructure and makes complex multi-hop retrieval patterns expressible as reusable, Cypher-callable procedures.
FAQ
When should I use Harmonic Centrality instead of Closeness Centrality?
Use Harmonic Centrality when your graph has disconnected components. It handles unreachable nodes gracefully; Closeness Centrality becomes undefined.
What class of problem does algo.maxFlow solve in a graph database?
algo.maxFlow solves network flow optimization under edge capacity constraints, useful for routing, bandwidth allocation, and assignment problems.
What does the graph object in FalkorDB UDFs actually enable?
It lets UDFs call graph.traverse() for multi-source traversal, so custom graph algorithms run inside the database rather than in application code.
References and citations
- [1] Verified Market Research, “Graph Database Market Report: Size, Growth, Trends & Forecast (2025–2033),” 2025. https://www.verifiedmarketresearch.com/product/graph-database-market/
- [2] International Journal of Engineering Research, “Graph Algorithms for Network Analysis,” 2024. https://www.ijerjournal.com/wp-content/uploads/11.IJER24A543.pdf
- [4] Marchiori, M. and Latora, V., “Harmony in the small-world,” 2000. https://arxiv.org/abs/cond-mat/0008357
- [5] MDPI Entropy, “Unveiling Influence in Networks: A Novel Centrality Metric,” June 2024. https://www.mdpi.com/1099-4300/26/6/486
- [6] Enterprise Knowledge, “Graph Analytics in the Semantic Layer: Architectural Framework for Knowledge Intelligence,” 2024. https://enterprise-knowledge.com/graph-analytics-in-the-semantic-layer-architectural-framework-for-knowledge-intelligence/
- [7] FalkorDB, “FalkorDB Repository,” GitHub. https://github.com/FalkorDB/FalkorDB
- [8] FalkorDB, “Max flow,” PR #1713, GitHub, May 2026. https://github.com/FalkorDB/FalkorDB/pull/1713
- [9] FalkorDB, “Harmonic centrality,” PR #1694, GitHub, May 2026. https://github.com/FalkorDB/FalkorDB/pull/1694
- [10] FalkorDB, “Introduce graph object to UDFs,” PR #1558, GitHub, January 2026. https://github.com/FalkorDB/FalkorDB/pull/1558