VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

How Artificial Intelligence AI Works | How AI Uses Graphs to Understand Connections

Did you know? Two books can share a topic without sharing a title. Two train stations can be linked by a route even when they are far apart on a map. A webpage can cite another webpage. When the important information concerns relationships, AI researchers often represent it as a graph.

In graph mathematics, a graph is not necessarily a bar chart or a line plot. It is a collection of items and the relationships between them. AI systems can use this structure to recommend content, study networks and learn patterns that ordinary rows and columns may not capture easily.

Quick answer: identify items → record meaningful links → represent each item with useful features → combine information from connected items → make a prediction → check whether it reflects real evidence. That is the intuition behind graph machine learning.

The 30-second explanation

  • Node: an item such as a book, document, station or product.
  • Edge: a relationship or connection between two nodes.
  • Node features: numerical information describing an individual item.
  • Graph neural network (GNN): a model that learns from node features and the graph’s structure.
  • Message passing: a common process for combining information from neighbouring nodes.
  • Link prediction: estimating whether a relationship may exist between two nodes.

Graphs are mathematical representations. They do not automatically establish why two things are related, whether a connection is safe or whether a suggested relationship is true.

Start with four fictional library books

Imagine a miniature collection: Book A is about algebra, Book B about fractions, Book C about introductory physics and Book D about literature. A librarian records that A and B share a mathematics-learning connection and that A and C share a mathematics-in-science connection.

Draw four circles labelled A, B, C and D. Connect A to B and A to C with lines. Leave D alone. You now have a simple graph containing four nodes and two edges.

Notice what this means—and what it does not. B and C are both connected to A, but that does not prove B and C have a direct relationship. A two-step path is a possible clue, not a missing edge that must be treated as established.

Step 1: Define the meaning of a node

Before building a graph, decide what each circle represents. For a book recommender, it might represent an article or a learning topic. For a transport system, it might represent a station. For scientific research, it might represent an observed entity or a defined type of interaction.

Mixing these meanings without care creates confusion. A node labelled “Clementi” might refer to a residential area, a station name, an organisation or something else, depending on the data source.

Consistent identifiers and definitions matter. Two similarly named records should not be merged automatically merely because their text looks alike.

Step 2: Decide what counts as a connection

An edge must have a specified meaning. In a library graph, “cites the same source,” “shares a chapter topic” and “was borrowed by the same person” are different kinds of relationships.

Some graphs use directed edges: A points to B, but B does not necessarily point to A. A webpage linking to another webpage is a familiar example. Other graphs use undirected edges for relationships treated as symmetric.

Edges may also carry labels, dates, weights or confidence values. A transport connection available only during certain hours should not be treated as permanently available without the relevant context.

Step 3: Represent node information numerically

A node can have features in addition to its connections. A book might have a subject category, reading level and publication year. A station might have an accessibility attribute or operating status.

Features often become numerical vectors that a model can process. Text may be represented with an embedding; categories may be encoded in a suitable format. The graph provides structural information about which items are connected.

The two sources of information complement each other. Similar titles do not always imply a relationship, and connected items can have very different textual content.

Step 4: Learn from neighbours

A common graph neural network operation lets a node receive information from its neighbours. A node combines its own features with transformed information from nearby nodes and uses the result to update its representation.

For example, Book A might combine information from Books B and C. After an update, its representation can reflect not only its own algebra topic but also the kinds of learning material linked to it.

This process is called message passing. The messages are mathematical feature transformations; the books are not actually sending emails to one another.

The central idea: A graph model can learn from relationships, but the usefulness of its conclusions depends on how those relationships were defined and verified.

Step 5: What happens after several message-passing rounds?

With one message-passing layer, a node typically combines information from direct neighbours. With additional layers, information can influence the representation from farther away along paths in the graph.

In our four-book example, B and C can indirectly affect each other through their shared neighbour A when suitable multiple layers are used. That does not mean a direct B–C edge has suddenly been observed.

Too many layers or repeated averaging can create problems in some GNN architectures, including representations becoming overly similar, a phenomenon often called oversmoothing. Different models use different mechanisms and have different limits.

Step 6: Choose which kind of prediction is needed

  • Node classification: predict a category for an item, such as a document’s topic.
  • Link prediction: estimate whether a relationship between two items may exist.
  • Graph classification: predict a property of an entire network or structured object.
  • Ranking: recommend relevant items using both features and links.
  • Anomaly detection: investigate unusual patterns of connections.

These tasks are not interchangeable. A model that predicts a missing citation link is not thereby proving the citation exists. A system that finds a cluster in a network has not necessarily explained the cause of those relationships.

How graph relationships can help recommendations

Imagine a student recently read a lesson about algebraic fractions. A content recommender could consider linked concepts such as simplifying expressions, fractions and equations. A graph gives the system a structured way to explore those relations.

A different recommender might only look at which articles had similar words. Combining a concept graph with textual information can help discover useful but differently worded material.

The model still needs an educational goal. Sending a learner along every connected topic could create distraction. A good recommendation should match their prerequisite knowledge and learning needs, not just the number of graph edges.

A document search system locates passages relevant to a question. A graph can represent explicit relationships such as “this article explains that concept” or “this experiment used this instrument.”

A question answering workflow may combine retrieved documents with graph-based relations. But edges should be traceable to their source if they are being used as factual evidence.

For example, a graph connecting one scientific paper to another does not prove their claims are both correct. Citation links, topical similarity and factual support are separate concepts.

Why a predicted link is not a discovered fact

Suppose a model predicts that Books B and C should be connected because both link to A. That can be a useful suggestion for a librarian to review. But the model may have found an accidental common neighbour.

This is particularly important in graphs involving people, institutions or private records. An algorithm must not invent personal associations and then treat those guesses as verified facts.

The meaning and status of each link should remain clear: observed, manually verified, algorithmically suggested or disputed.

Step 7: Test graph models without data leakage

Training and evaluation are subtle when examples share neighbours or when some edges are deliberately hidden for testing. A careless split can let information from the final test leak into the graph construction or feature preparation.

For link prediction, the held-out edges need to be handled according to a well-defined protocol. For time-dependent networks, future relationships should not be used to justify predictions made in an earlier period.

A model that appears excellent because it saw information it should not have seen may disappoint on genuinely new links. Use independent evaluation, meaningful baselines and careful documentation of graph construction.

Step 8: Watch for incomplete and unfair networks

Not all relationships are equally visible. A social network graph may omit people who are offline, while a citation graph may overrepresent material that is easy to access or published in widely indexed venues.

Models can reproduce these gaps. A highly connected item may receive more recommendations simply because it was already prominent. A sparsely connected but valuable item may be ignored.

Good governance asks what data the graph leaves out, whether edges encode questionable assumptions and how a prediction could affect someone. Graph structure does not turn biased input into neutral truth.

What about privacy in graphs?

Even if nodes use pseudonymous IDs, relationships can reveal information. A person’s unusual pattern of contacts or activities may make identification possible when linked with outside records.

Graph projects involving people should limit unnecessary data, use appropriate access controls and consider re-identification and inference risks. A recommendation system has no blanket right to expose relationships merely because the algorithm can calculate them.

Try it: build a four-node learning graph

Draw circles labelled A, B, C and D. Write “Algebra” beside A, “Fractions” beside B, “Physics” beside C and “Poetry” beside D. Connect A to B and A to C.

Ask which nodes are direct neighbours of A: B and C. Next ask whether B and C are directly connected: not in this graph. They have a two-step path through A.

Now consider adding a B–C edge labelled “uses ratios.” Before drawing it, ask what evidence would justify the new relation. You have practised the distinction between predicting a useful link and recording an established one.

Five mistakes to avoid

  • Confusing a graph with a chart: graph machine learning is built around nodes and edges, not necessarily plotted numerical series.
  • Assuming every link is equally meaningful: edge definitions matter.
  • Treating predictions as observed connections: suggested links still need verification.
  • Ignoring missing parts of the network: incomplete coverage can skew results.
  • Using future or private relationships carelessly: evaluation and access boundaries must be preserved.

Frequently asked questions

Is graph machine learning the same as a knowledge graph?

No. A knowledge graph represents entities and relationships, often with typed meanings. Graph machine learning is a family of methods that learns patterns from graph-structured data. They can be combined.

Does every graph use a neural network?

No. Classical graph algorithms can find paths, connected components and other properties without machine learning.

What is message passing?

It is a family of operations that combine a node’s representation with information from relevant neighbouring nodes.

Can a GNN prove that two people are connected?

No. A predicted or indirect relationship is not proof of a direct real-world link. Sensitive claims require appropriate evidence.

Why use a graph instead of a spreadsheet?

Spreadsheets can store relationships, but graph representations make connectivity and neighbourhood structure central to modelling. The better form depends on the task.

Your one-minute takeaway

  • Graphs represent items as nodes and relationships as edges.
  • Graph neural networks can combine information from connected neighbours.
  • Predicted connections, factual evidence and private relationships must remain carefully distinguished.

Trusted resources and the AI learning series

Discover more from eduKate Singapore

Subscribe now to keep reading and get access to the full archive.

Continue reading