Introduction to GDS Library
Get an overview of the Neo4j Graph Data Science library, its features, and how it extends Neo4j's analytical capabilities.
Introduction to GDS Library is a free Neo4j Graph Database Fundamentals lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Neo4j Graph Database Fundamentals learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Welcome to Neo4j GDS!
Hello! In this lesson, we'll dive into the Neo4j Graph Data Science (GDS) library. It's a powerful toolkit for advanced graph analytics.
GDS helps you uncover hidden insights and patterns in your graph data that are difficult to find with standard queries alone.
What is the GDS Library?
The GDS library is a collection of optimized graph algorithms and machine learning pipelines built specifically for Neo4j.
- It's designed for scale and performance.
- It works directly with your graph data.
- It helps you answer complex questions about relationships and structures.
Why Use GDS?
While Cypher is great for querying, some analytical tasks require more computational power and specific algorithms. GDS steps in here.
It's used for things like identifying influential nodes, detecting communities, finding shortest paths, and even for feature engineering in machine learning.
Core GDS Concept: Graph Projection
Before running most GDS algorithms, you need to project your graph. This means creating an in-memory representation of a subset of your graph data.
Why? Algorithms run much faster on these optimized in-memory structures, especially for large datasets.
How Projection Works
When you project a graph, GDS identifies specific nodes and relationships from your Neo4j database and loads them into its own optimized memory space.
You define which node labels and which relationship types to include in your projection.
Simple Graph Projection Example
Let's see a basic example of projecting a graph. This Cypher command projects all Person nodes and their KNOWS relationships into an in-memory graph named 'myGraph'.
CALL gds.graph.project(
'myGraph',
'Person',
'KNOWS'
)Graph Catalog
Projected graphs are stored in the Graph Catalog. You can list them, manage them, and refer to them by name when running algorithms.
This catalog helps organize your in-memory graphs, making it easy to reuse them for different analyses.
GDS Algorithm Categories
The GDS library contains many algorithms, broadly categorized:
- Pathfinding: Finding shortest paths or all paths (e.g., A*, Dijkstra).
- Centrality: Identifying important nodes (e.g., PageRank, Betweenness Centrality).
- Community Detection: Grouping similar nodes (e.g., Louvain, Label Propagation).
- Link Prediction: Predicting missing relationships.
GDS vs. Standard Cypher Queries
While Cypher can do basic graph traversals, GDS is optimized for iterative, global graph computations.
- Cypher: Best for specific pattern matching, CRUD operations, small traversals.
- GDS: Best for complex analytical tasks, large-scale graph analysis, machine learning prep.
They complement each other beautifully!
Quick Check on GDS
What is the primary purpose of 'graph projection' in the Neo4j GDS library?
GDS Intro Recap
Great job! You've just learned about the Neo4j Graph Data Science library.
- GDS is a powerful tool for advanced graph analytics.
- It uses graph projection to create efficient in-memory graphs.
- It offers various algorithm categories like Pathfinding, Centrality, and Community Detection.
Next, we'll explore how to run these algorithms!
Frequently asked questions
Is the “Introduction to GDS Library” lesson free?
Yes — the full text of “Introduction to GDS Library” is free to read here on the web, and the Neo4j Graph Database Fundamentals course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Neo4j Graph Database Fundamentals course, upgrade to CoddyKit PRO.
What will I learn in “Introduction to GDS Library”?
Get an overview of the Neo4j Graph Data Science library, its features, and how it extends Neo4j's analytical capabilities. You practise Neo4j Graph Database Fundamentals with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Neo4j Graph Database Fundamentals?
No prior experience is required. Neo4j Graph Database Fundamentals on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Introduction to GDS Library” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Neo4j Graph Database Fundamentals lesson?
Yes. Every Neo4j Graph Database Fundamentals lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Introduction to GDS Library
- Running GDS Algorithms
- GDS Pipelines and Machine Learning
- Graph Embeddings with GDS