A node, also called a vertex, is an individual element of a graph. It represents an entity; an edge represents a relationship between entities. Nodes can carry features, such as a person’s age in a social network. Choose a graph representation when relationships matter alongside the properties of individual records. section 1.2.1 section 1.2.5
To turn data into a graph for a GNN:
- Decide what counts as an entity. A passenger might be one node, or a graph might also contain nodes for cabins and families. section 1.2.5
- Assign features to nodes and define edges from meaningful relationships. Passenger edges might represent family ties or a shared cabin; inferred ties may require assumptions or additional data. section 1.2.1 section 1.2.5
- Prepare the resulting graph for training and inference, including sampling, batching, and train/validation/test splits that preserve its structure. section 1.5.1
Candidates and referrals
In a staffing network, each job candidate is a node and each referral is an edge. Treating referrals as undirected and ignoring repeats produces an unweighted graph. Those choices simplify the representation, but they also discard referral direction and frequency. section 8.1.1
Table 1.1 The adjacency matrix for the simple graph in figure 1.1
|
A
|
B
|
C
|
D
|
E
|
|
|---|---|---|---|---|---|
|
A
|
0
|
1
|
0
|
0
|
1
|
|
B
|
1
|
0
|
1
|
1
|
1
|
|
C
|
0
|
1
|
0
|
1
|
0
|
|
D
|
0
|
1
|
1
|
0
|
1
|
|
E
|
1
|
1
|
0
|
1
|
0
|
The adjacency matrix lists nodes along both axes. An entry of 1 marks an edge between two nodes; its symmetry shows that the illustrated graph is undirected. section 1.2.1
A node need not correspond to an obvious row in a table. Investors can be nodes connected by co-investment; documents can be nodes connected by citations or shared topics. The useful test is whether the chosen entities and edges make relationships relevant to the task explicit. section 1.4.1


















