DGCNN (Wang, Sun, Liu, Sarma, Bronstein and Solomon, ACM Transactions on Graphics 2019) treats a point cloud as a graph. Its EdgeConv operator applies an MLP to each edge, combining a point's feature with the difference to a neighbour, and max-pools over neighbours. The key twist is that the k-nearest-neighbour graph is rebuilt after every layer in feature space, so points that look alike become neighbours even when far apart. This page covers EdgeConv, dynamic graphs, the architecture and its cost. In the exercises you implement kNN graphs and EdgeConv. You then test clouds made of two small motifs placed far apart, labelled 'same type' or 'different'. A random-weight two-layer EdgeConv network scored 1.00 when its second graph was rebuilt in feature space, against 0.56 with a fixed coordinate graph. Feature-space edges joined the two motifs 56% of the time when they matched and 27% when they differed.
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.
Neighbours that change as the network learns
DGCNN connects every point to its k nearest neighbours and passes messages along those edges, like a graph neural network. After each layer it rebuilds the neighbour lists, not by position but by learned features. Two wing tips on opposite sides of an aircraft can then become neighbours because they look alike. The demo shows a k-nearest-neighbour graph over positions; DGCNN’s later layers build the same kind of graph in feature space.
Geometric deep learning lab
42 directed edges (3 per point). DGCNN rebuilds this graph in feature space after every layer, so "neighbours" change as features evolve.
Why engineers care
DGCNN is a strong, simple baseline for point-cloud classification and part segmentation, used for lidar scenes, scanned parts and molecular point sets.
📝 Quick check (Level 0)
0/3 answered
1. DGCNN connects each point to…
2. After each layer the graph is rebuilt using…
3. So distant but similar points can become…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.
By hand
EdgeConv: x_i′ = max over j in N(i) of h_Θ(x_i, x_j − x_i).
x_i carries the global position or feature.
x_j − x_i carries the local geometry.
The max makes it permutation-invariant over neighbours (permutation-equivariant over points).
Edges: a kNN graph has n·k directed edges (1024 points, k = 20: 20,480).
Dynamic graph: layer l uses the kNN graph of layer l − 1’s features. Rebuilding it costs n² distances per layer (about a million for 1024 points).
Architecture (classification): 4 EdgeConv layers (64, 64, 128, 256), outputs concatenated (512) → 1 × 1 layer to 1024 → global max and average pooling → MLP.
Relation to others: with h(x_i, x_j − x_i) = h(x_i) it reduces to PointNet; with h(x_j − x_i) it is a PointNet++-style local operator.
📝 Quick check (Level 1)
0/3 answered
1. EdgeConv's input for edge (i, j) is…
2. Edges for 1024 points with k = 20:
3. With h depending on x_i only, EdgeConv reduces to…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.
DGCNN in code
Exercise 1.
kNN graphs and edge features [f_i, f_j − f_i] are simple to build.
EdgeConv is permutation-equivariant: permuting the points permutes the outputs.
Practice.
Use PyTorch Geometric’s DynamicEdgeConv (which rebuilds the kNN graph) or EdgeConv with a fixed graph.
k = 20 is the usual choice.
The n² kNN step dominates memory for large clouds; subsample to a few thousand points or use a static graph for the first layer.
from torch_geometric.nn import DynamicEdgeConv, global_max_poolmlp = lambda i, o: nn.Sequential(nn.Linear(2 * i, o), nn.ReLU())conv1, conv2 = DynamicEdgeConv(mlp(3, 64), k=20), DynamicEdgeConv(mlp(64, 64), k=20)x1 = conv1(pos, batch); x2 = conv2(x1, batch) # graph rebuilt from x1out = head(global_max_pool(torch.cat([x1, x2], 1), batch))
🐍 Exercise 1: kNN and EdgeConv
Build kNN indices, EdgeConv edge features and the EdgeConv operator.
📝 Quick check (Level 2)
0/3 answered
1. The usual neighbour count is…
2. The memory bottleneck is…
3. PyTorch Geometric's layer is…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.
Theory
Equivariance. EdgeConv is permutation-equivariant over points because the same h is applied to every edge and the max is symmetric over each neighbour set. The kNN graph itself is defined by distances, so it permutes with the points.
Why dynamic graphs. A fixed spatial graph limits information to travel a few hops per layer, as in any message-passing GNN. Rebuilding the graph in feature space lets a layer connect points whose features are similar. These can be parts of the same semantic class anywhere in the cloud. It is a learned, non-local receptive field, related to attention, which connects every pair with learned weights.
Limitations. The kNN graph is discontinuous in the features (neighbour sets change abruptly), and quadratic in n. Like PointNet++, EdgeConv is not rotation-invariant unless trained with rotation augmentation or given invariant inputs.
📝 Quick check (Level 3)
0/3 answered
1. EdgeConv is ___ over points:
2. A feature-space graph gives…
3. DGCNN's kNN step scales as…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.
Does rebuilding the graph in feature space connect distant similar parts?
History.
Y. Wang, Y. Sun, Z. Liu, S. E. Sarma, M. M. Bronstein and J. M. Solomon, “Dynamic graph CNN for learning on point clouds” (ACM Transactions on Graphics, 2019).
Reported 92.9% on ModelNet40.
Exercise 2.
Data: 2-D clouds of two randomly rotated motifs (16 points each, ring or plus sign), placed 1.2–2 apart.
Label: 1 if both motifs are the same type, 0 otherwise. This is an XOR-like task: the average of the two motif features cannot separate it linearly.
Network: random-weight EdgeConv with k = 8.
Layer 1 works on relative coordinates in the coordinate kNN graph.
Layer 2 uses either the same coordinate graph (static) or the kNN graph of layer-1 features (dynamic).
Classifier: linear, on averaged features.
graph in layer 2
test accuracy
static (coordinates)
0.557
dynamic (layer-1 features)
1.000
feature-space edges joining the two motifs
fraction
motifs of the same type
0.564
motifs of different types
0.265
The dynamic graph solves the task; the static graph cannot. In coordinate space every neighbour lies in the same motif, so no layer-2 feature compares the two motifs. The classifier is near chance (0.56).
Mechanism: in feature space, ring points find other ring points, including those in the far motif. When the motifs match, about 56% of edges cross between them, carrying large coordinate offsets into EdgeConv. When they differ, only 27% do. This difference is linearly readable.
Seeds: seeds 1 and 2 gave static 0.513/0.513 and dynamic 1.0/1.0.
Caveat: this task was designed so that similar parts are far apart; on tasks needing only local geometry the two graphs perform similarly.
🐍 Exercise 2 (research): does rebuilding the graph in feature space connect distant similar parts?
Classify same-or-different motif pairs with random-weight EdgeConv using a static coordinate graph or a dynamic feature-space graph; measure cross-motif edges.
DGCNN in AI, robotics and aerospace
Part segmentation: labelling wings, fuselage and tail in scanned aircraft models (ShapeNet-Part).
Lidar scenes: semantic segmentation of indoor and outdoor scans.
Molecules and materials: point-set representations of atoms.
Design lesson: let the network decide who its neighbours are when related parts are far apart.
References
Y. Wang, Y. Sun, Z. Liu, S. E. Sarma, M. M. Bronstein and J. M. Solomon (2019). “Dynamic graph CNN for learning on point clouds.” ACM Transactions on Graphics 38(5).
C. R. Qi et al. (2017). “PointNet++.” NeurIPS.
M. Fey and J. E. Lenssen (2019). “Fast graph representation learning with PyTorch Geometric.” ICLR Workshop.
Same-or-different motifs far apart: dynamic graph 1.00, static graph 0.56.
Practice
Show:
Level 0
Problem 1Level 0
Usual neighbour count k in DGCNN?
20.
Problem 2Level 0
kNN edges for 1024 points with k = 20?
20480.
Problem 3Level 0
EdgeConv input width for 64-D features?
128.
Level 1
Problem 4Level 1
Pairwise distances to rebuild the graph for 1024 points (n²)?
1048576.
Problem 5Level 1
Parameters of a 3 → 64 EdgeConv layer (2·3·64 + 64)?
448.
Problem 6Level 1
Concatenated width of EdgeConv layers 64, 64, 128, 256?
512.
Problem 7Level 1
Year DGCNN appeared in ACM Transactions on Graphics?
2019.
Level 2
Problem 8Level 2
Dynamic-graph accuracy in exercise 2?
1.
Problem 9Level 2
Static-graph accuracy in exercise 2?
0.557.
Problem 10Level 2
Fraction of feature-space edges joining matching motifs?
0.564.
Problem 11Level 2
Fraction joining motifs of different types?
0.265.
Problem 12Level 2
Neighbours k in exercise 2?
8.
Problem 13Level 2
Points per motif in exercise 2?
16.
Level 3
Problem 14Level 3
Prove that EdgeConv is permutation-equivariant.
Let π permute the points. Distances are unchanged, so the neighbour set of π(i) is π applied to the neighbour set of i. Each edge input [x_i, x_j − x_i] is unchanged by relabelling, the same h is applied to every edge, and the max over a set does not depend on its order. So the output at π(i) equals the original output at i. ∎
Problem 15Level 3
Explain why the static graph failed in exercise 2.
With k = 8 and motifs far apart, every coordinate neighbour of a point lies in its own motif. Two layers of local message passing never combine information from both motifs, so the averaged features are a sum of two independent motif descriptors. “Same type” is an XOR of the two types, which a linear classifier on such a sum cannot represent. ∎
Problem 16Level 3
Compare DGCNN with PointNet++.
PointNet++ groups by spatial balls around sampled centroids and downsamples hierarchically; neighbourhoods are fixed by geometry. DGCNN keeps all points, uses kNN groups, and rebuilds them in feature space, giving non-local connections, at n² cost per layer. PointNet++ scales better to large clouds; DGCNN captures long-range semantic similarity. ∎
Problem 17Level 3
Advise on segmenting parts in large aircraft scans with DGCNN.
Scans have millions of points, so tile the cloud or subsample to a few thousand points per block, run DGCNN per block and interpolate labels back. Use rotation augmentation, k around 20, and check that symmetric parts (left and right wings) get consistent labels, which the dynamic graph helps with. ∎
Level 4
Problem 18Level 4
Static-graph accuracy, seed 1?
0.513.
Problem 19Level 4
Number of EdgeConv layers in exercise 2?
2.
Problem 20Level 4
DGCNN’s reported ModelNet40 accuracy (%)?
92.9.
Coding practice
🐍 Code 1 (Level 0): kNN edges
n · k.
🐍 Code 2 (Level 0): distance matrix
n².
🐍 Code 3 (Level 0): edge width
2d.
🐍 Code 4 (Level 0): EdgeConv parameters
2 d_in d_out + d_out.
🐍 Code 5 (Level 0): concatenated width
Sum of layer widths.
Topic test
A timed test drawn at random from this topic's question bank. Each attempt gets new questions. For a longer test across the whole chapter, see the chapter test, or mix topics in the question bag.
DGCNN (Dynamic Graph CNN): topic test
10 questions, drawn at random from a bank of 21. Every attempt is different.
⏱ Time limit: 15 minutes. The test submits itself when time runs out.
Levels covered: 0, 1, 2, 3, 4. No hints or solutions until you submit.