Why Graphs? The World Is More Connected Than You Think
Why Graphs? The World Is More Connected Than You Think
The last time you searched for a restaurant on your phone, something remarkable happened in the span of a few milliseconds. Your phone didn't just look at the restaurant's name or its star rating in isolation. Behind the scenes, a sophisticated piece of software considered a web of relationships: which friends had dined there, how your past dining preferences compared to other patrons who loved that restaurant, the geographical proximity to your current location, the time of day, even the weather outside. By the time you saw that top recommendation, the system had traversed an intricate network of connections linking you, your friends, millions of other diners, thousands of restaurants, and countless behavioral patterns.
This is the reality of modern information processing: almost everything interesting happens in the relationships between things, not in the things themselves. Yet for decades, our most powerful artificial intelligence systems treated data as isolated points, processing each one without truly understanding its context. This chapter tells the story of why that approach is fundamentally limited and why graphs—mathematical structures that capture relationships as first-class citizens—represent not just another technical innovation but a profound shift in how we think about machine intelligence.
The Connected Reality Around Us
Walk through any city, and you are surrounded by graphs. The road network connecting intersections and destinations forms a graph. The power grid linking generators, substations, and consumers forms a graph. The financial system where banks, companies, and markets transact with each other forms a graph. Even your own brain—with its hundred billion neurons connected by a hundred trillion synapses—operates as one of the most complex graph structures in existence.
But graphs are not merely abstract mathematical concepts. They are the natural language for describing the world in which we live, work, and make decisions. Consider what happens when you post a photo on social media. You are not just uploading an image file; you are creating a node in an elaborate social graph, connecting yourself to friends, to their friends, to pages you follow, to groups you belong to, to content creators whose work you admire. The system that decides which posts appear in your feed must understand this web of connections to surface content that is genuinely relevant to you.
Or think about how your email inbox works. Every email exists within a network of sender-recipient relationships, temporal patterns, topic threads, and organizational hierarchies. When your email provider flags a message as potential spam, it isn't just analyzing the message content in isolation. It is examining the relationship between the sender and you, the relationship between this email and others in your inbox, and the broader patterns of suspicious communication in the system. The relationships carry as much—if not more—information than the content itself.
The pharmaceutical industry offers another compelling example. Drug discovery was once a linear process: identify a target protein, find a molecule that binds to it, test, iterate. Modern drug discovery understands that proteins don't work in isolation. They interact with each other, form signaling pathways, participate in complex biochemical networks. A drug that modulates one protein affects the entire network. Understanding these relationships—the protein-protein interaction graph, the metabolic network, the gene regulatory network—is now essential for predicting drug efficacy and side effects.
Even something as seemingly straightforward as recommendation systems has evolved to embrace relational thinking. The music streaming service that suggests your next favorite band isn't just analyzing acoustic features of songs. It is mapping a vast graph of user listening habits, social connections, playlist memberships, and collaborative patterns. Users who share similar friends often share similar taste, even before they've listened to the same music. The relationships encode preferences that individual listening histories cannot capture.
What Exactly Is a Graph?
Before we can appreciate why graphs are transforming artificial intelligence, we need to understand what we mean by the term. In mathematics and computer science, a graph is a collection of nodes (also called vertices) and edges (also called links or connections) that describe relationships between pairs of nodes. If we have a social network where Alice is friends with Bob, and Bob is friends with Carol, we have three nodes—Alice, Bob, and Carol—and two edges: one connecting Alice to Bob, and one connecting Bob to Carol.
This simplicity is deceptive. Graphs can represent an astonishing variety of structures. A road map is a graph where intersections are nodes and road segments are edges. The World Wide Web is a graph where web pages are nodes and hyperlinks are edges. A molecule is a graph where atoms are nodes and chemical bonds are edges. A neural network in your brain is a graph where neurons are nodes and synapses are edges.
Graphs can be directed or undirected. In a directed graph, edges have a direction: a Twitter follower relationship has a direction (you can follow someone without them following you back). In an undirected graph, edges are bidirectional: a Facebook friendship is symmetric (if Alice is friends with Bob, Bob is friends with Alice). Graphs can also be weighted, where edges carry numerical values indicating the strength or cost of connections. A transportation network might have weighted edges representing travel time or distance.
Perhaps most importantly, graphs can be attributed, meaning nodes and edges carry additional information. A user in a social network has a profile with interests, location, and demographic information. A web page has content, an author, and a publication date. These attributes enrich the graph structure with rich semantic information that any intelligent system should consider.
The power of graphs lies in their ability to capture structure. While a list of a million users tells you nothing about how they relate to each other, a graph of those same million users, with edges representing their interactions, reveals communities, influencers, bridges between different groups, and patterns of information flow. Structure is information, and graphs are the structure.
The Tabular Illusion: Why Traditional Approaches Fall Short
For most of the history of machine learning, the dominant paradigm treated data as tables. Each row represented an observation, and each column represented a feature. A patient record was a row with columns for age, blood pressure, cholesterol level, and so on. An email was a row with columns for word counts and metadata. A customer was a row with columns for purchase history and demographic attributes.
This tabular representation worked reasonably well for many problems. When the relationships between observations don't matter—when predicting whether a patient will develop a disease based on their individual characteristics, for instance—the tabular approach captures what we need. Traditional machine learning algorithms like logistic regression, random forests, and support vector machines excel at finding patterns within such feature vectors.
The deep learning revolution of the 2010s brought neural networks that could automatically learn useful features from raw data. Convolutional neural networks revolutionized image processing by learning hierarchical features from pixel values. Recurrent neural networks and their successors like transformers transformed natural language processing by learning contextual representations from text sequences. These advances were genuinely transformative, enabling systems that could see, hear, and understand language with unprecedented accuracy.
But there was an implicit as