liveBook · Manning

Intra-timestep edge

As explained in Graph Neural Networks in Action

An edge connecting nodes within the same time-step layer of a temporal graph.

An intra-timestep edge connects nodes within the same temporal graph layer. It preserves the graph’s spatial or relational structure before temporal links are added. section 6.3.1

Build a spatiotemporal graph in a short pipeline:

  • Treat each timestep as a separate graph layer containing node features such as location and velocity. section 6.3.1
  • Repeat the within-layer edge pattern for every timestep, then offset node indices by the number of nodes per layer. section 6.3.1
  • Add inter-timestep edges separately when the model must propagate information across adjacent layers. section 6.3.1

Pose prediction

For pose data, solid intra-timestep edges connect entities in each frame. Corresponding nodes can then be linked across frames, allowing earlier unmasked frames to inform predictions for masked nodes at the final timestep. section 6.3.1

Listing 6.6 Constructing the adjacency matrix
       total_timesteps = self.\
window_size + self.mask_size  #1
       edge_index = np.repeat(self.edges[None, :],\
 total_timesteps, axis=0) 

       shift = np.arange(total_timesteps)[:, None, \
None] * num_nodes_per_timestep  #2
       edge_index += shift  #3
       edge_index = edge_index.reshape(2, -1)  #4

Inspect the NumPy procedure that repeats per-timestep edges, shifts their node indices, and reshapes them into a graph adjacency representation. section 6.3.1

How Graph Neural Networks in Action covers it

How deep it goes
Defines the edge and gives an adjacency-building procedure, stopping short of deeper edge-semantic analysis.
Examples
Uses pose-estimation frames whose nodes carry location and velocity features.
What you can do after
Build it from scratch by repeating and index-shifting within-timestep edges into a spatiotemporal adjacency matrix.
How it connects
Links temporal graph layers with inter-timestep edges, node features, node prediction, and graph attention networks.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Neural Networks in Action. The section links point to the parts of the book it draws on.