Skip to content

Tabular, time-series, scientific, and geometric deep learning · Sets, point clouds, and geometric learning · SPE009 · Architecture

Dynamic Graph CNN (DGCNN)

DGCNN learns point-cloud features through EdgeConv and recomputes neighborhoods in learned feature space. Dynamic graphs let local relations change as representations become more semantic.

Needs a data type CodeSplash doesn't load yet Component demo, not a trained model CodeSplash's run and the reference's record

In CodeSplash

Running this needs images, audio, video, graphs or another data type CodeSplash doesn't load yet.

Availability
Needs a data type CodeSplash doesn't load yet
Code example
Component demo, not a trained model
Who ran it
CodeSplash's run and the reference's record
CodeSplash's run
The reference's example ran in Python and R here, and they agree.
The reference's record
Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.

Purpose

DGCNN learns point-cloud features through EdgeConv and recomputes neighborhoods in learned feature space. Dynamic graphs let local relations change as representations become more semantic.

Question / hypotheses

The operative question is whether the specified representation, symmetry, likelihood or physical constraint improves held-out behavior for this data domain. This is a learning framework, not a null-hypothesis test; losses, attention weights and predictive confidence are not statistical p-values.

Architecture / computational structure

A k-nearest-neighbor graph is formed from coordinates or current features. Shared edge functions combine a central feature and neighbor difference, aggregate over neighbors, and feed further graph-rebuilding layers.

Assumptions

Nearest-neighbor selection is discontinuous at distance ties. Feature-space neighbors may not remain physically local, and permutation invariance is distinct from rotation equivariance. Exact neighbor search can dominate runtime.

Formula / computational definition

hi′=max⁡j∈Nk(i)ϕ(hi,hj−hi)h_i^{\prime}=\max_{j\in N_k(i)}\phi(h_i,h_j-h_i). The componentwise maximum is symmetric over neighbors; recomputing NkN_k after each stage makes connectivity feature-dependent.

Parameters and notation

Learned or estimated: EdgeConv MLP weights, feature-transform blocks and classification/segmentation head; neighbor identities are recomputed discrete structures rather than gradient-trained edge parameters.

Hyperparameters and effects: Neighborhood size k, distance metric, feature widths, number of graph rebuilds, normalization and augmentation. Larger k expands context and cost, while small k can fragment sparse structures.

Fitting, fine-tuning, and adaptation

Fit task loss with the declared graph-rebuild schedule. Transfer by freezing early edge feature extractors and adapting later blocks/head, then unfreeze at lower learning rates. Revalidate k and scale handling on new sampling densities, and monitor source-domain behavior to detect forgotten geometric distinctions.

How to use and calibrate

Define the independent evaluation unit before preprocessing: row/entity, whole set/object, molecule/trajectory, input function or chronological forecasting origin. Keep target construction and normalization within permitted training data. Evaluate task accuracy/IoU, graph stability under noise, point-order invariance, density shifts and neighbor-search cost. Compare fixed-graph and dynamic-graph versions at matched compute.

Example application

Classify or segment point clouds where learned semantic neighborhoods complement physical proximity. This is a proposed use case, not a claim of validated performance on supplied real data.

Interpretation / pitfalls

Watch out

Assess model error against domain baselines and the stated assumptions. Component-level mathematical correctness does not establish paper reproduction or scientific validity. Invariance/equivariance checks validate transformation behavior; they do not establish correct physical dynamics or chemical accuracy.

Python and R code examples

Scope: One EdgeConv-style update using two nearest neighbors; later dynamic graph rebuilding omitted. Use the shared setup. Dependencies: NumPy / base R. Validation: Python executed; R unexecuted.

Full-model route: Python: authors’ DGCNN or graph/point libraries. R: native torch small graphs or bridge. The example performs one EdgeConv-style nearest-neighbor aggregation; it omits repeated graph rebuilding and training.

Python and R

The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.

Python

Component demo, not a trained model — One EdgeConv-style update using two nearest neighbors; later dynamic graph rebuilding omitted. Use the shared setup.

Shared setup for this chapter
import numpy as np
def sm(x):
    x=np.asarray(x); e=np.exp(x-x.max(axis=-1,keepdims=True)); return e/e.sum(axis=-1,keepdims=True)
H=np.array([[0.,0.],[.2,.1],[1.,0.],[.8,.9]])
D=((H[:,None,:]-H[None,:,:])**2).sum(-1); np.fill_diagonal(D,np.inf)
neighbors=np.argsort(D,axis=1)[:,:2]; W=np.arange(8.).reshape(4,2)/8
result=[]
for i,idx in enumerate(neighbors):
    edge=np.concatenate([np.repeat(H[i:i+1],len(idx),0),H[idx]-H[i]],axis=1)
    result.append(np.maximum(edge@W,0).max(0))
print(np.array(result))
R

Component demo, not a trained model — One EdgeConv-style update using two nearest neighbors; later dynamic graph rebuilding omitted. Use the shared setup.

Shared setup for this chapter
sm <- function(x) {
  if(is.null(dim(x))) { e<-exp(x-max(x)); return(e/sum(e)) }
  t(apply(x,1,function(v) { e<-exp(v-max(v)); e/sum(e) }))
}
H<-matrix(c(0,0,.2,.1,1,0,.8,.9),4,byrow=TRUE); D<-as.matrix(dist(H))^2; diag(D)<-Inf
neighbors<-t(apply(D,1,function(d) order(d)[1:2])); W<-matrix(0:7,4,byrow=TRUE)/8
result<-matrix(0,4,2)
for(i in 1:4) {
  edge<-cbind(matrix(H[i,],2,2,byrow=TRUE),sweep(H[neighbors[i,],],2,H[i,]))
  result[i,]<-apply(pmax(edge%*%W,0),2,max)
}
print(result)

Sources

From the CodeSplash reference, entry SPE009.