Neo4j GDS Certification study materials
Neo4j GDS Certification study resources

Neo4j GDS Certification cheat sheet

Neo4j GDS Certification · Keep the key ideas within reach.

Quick reference

Algorithms

  • Centrality measures rank node importance: Degree counts incident relationships, Betweenness counts shortest paths passing through a node, Closeness sums distances to all reachable nodes, PageRank weights incoming links by source importance.

  • PageRank formula: PR(u) = (1-d)/N + d * sum over v in in-neighbors of (PR(v)/outDegree(v)); default dampingFactor is 0.85 and maxIterations 20.

  • Betweenness centrality is computed on unweighted shortest paths by default; sampling (samplingSize, samplingSeed) approximates it on large graphs and results are estimates, not exact.

  • Community detection: Louvain (louvain) optimizes modularity via local moving and aggregation; Leiden (leiden) adds refinement and guarantees well-connected communities; both accept relationshipWeightProperty.

  • Similarity: nodeSimilarity uses Jaccard by default over neighbor sets; kNN (kNearestNeighbors) uses cosine or Euclidean over node property vectors and scales better for dense embeddings.

  • Pathfinding: Dijkstra requires non-negative weights and uses relationshipWeightProperty; A* adds latitude/longitude properties for a heuristic; Bellman-Ford tolerates negative weights; BFS finds hop-count shortest paths.

  • Label propagation (labelPropagation) assigns each node the most frequent label among neighbors; it is fast and non-deterministic unless a seed or concurrency of 1 is used.

  • Triangle count and local clustering coefficient measure local density: clustering coefficient = 2 * triangles through node / (degree * (degree - 1)).

  • Write-back modes: 'stream' returns rows, 'write' persists nodeProperties/relationshipProperties, 'mutate' creates an in-memory graph projection only; stats mode returns summary counts.

Quick reference

Workflows

  • Workflow order: create a graph projection (gds.graph.project or project Cypher/native), run algorithms via mutate or write, then gds.graph.drop to free heap.

  • gds.graph.project takes graphName, nodeProjection, relationshipProjection; relationshipProjection supports orientation NATURAL, REVERSE, or UNDIRECTED and aggregation DEFAULT, SINGLE, or NONE.

  • Native projection is faster than Cypher projection; Cypher projection requires nodeQuery and relationshipQuery returning id and source/target columns.

  • Estimation: gds.algorithm.write.estimate (or mutate.estimate) returns requiredMemory before execution; run gds.graph.nodeProperties.drop to release stored properties.

  • gds.graph.list and gds.graph.nodeProperty.stream inspect existing projections; gds.graph.exists checks presence before re-projecting to avoid duplicate-name errors.

  • In GDS 2.x, algorithms are invoked as gds..stream/mutate/write/stats with an optional configuration map; named graph is passed as the first argument string.

  • Model catalog: gds.beta.model.drop and gds.model.list manage trained models; pipeline is created with gds.beta.pipeline.linkPrediction.create for link prediction workflows.

  • Concurrency and job control: gds.beta.listProgress shows running jobs, gds.beta.job.cancel cancels by jobId; concurrency parameter caps threads per algorithm run.

  • Use separate projected graphs per algorithm when property requirements differ; dropping unused projections and properties prevents OutOfMemory errors on the GDS heap.

Quick reference

GDS Library

  • GDS installs as a Neo4j plugin: place the gds JAR in the plugins directory, set dbms.security.procedures.unrestricted=gds.* and allowlist gds.* in dbms.security.procedures.allowlist.

  • GDS runs in the same JVM as Neo4j but uses a separate off-heap page cache (gds.pageCache or dbms.memory.heap.* plus gds.memory.*), so heap sizing must account for both.

  • License: GDS Community is free with limited algorithms; GDS Enterprise requires a license key set via gds.enterprise.license_file or the gds.license key config.

  • Procedure namespaces: gds.graph.* for projections, gds..* for algorithms, gds.beta.pipeline.* and gds.beta.model.* for ML, gds.util.* for helpers like asNode and nodeProperty.

  • gds.version() returns the installed library version; gds.util.nodeProperty(graphName, nodeId, propertyKey) reads a projected property without streaming the whole graph.

  • Graph projections are catalog objects scoped to the database; they are not persisted across restarts and must be recreated after a Neo4j restart.

  • GDS supports both anonymous and named graphs; named graphs enable reuse across multiple algorithm calls and are required for write-back and pipelines.

  • gds.alpha procedures are experimental and may change between releases; use stable gds.* or gds.beta.* namespaces for production pipelines.