fully connected readout layer

[[concept]]
fully connected readout layer

In a fully connected readout layer we define

y=ρ(C.vec(x))

Where

  • CRd×ndL
  • vec(x)RndL
    • in general vec() vectorizes Rm×n matrices into Rmn vectors
  • ρ can be the identity or some other pointwise nonlinearity (ReLU, softmax, etc)
Note

There are some downsides of a fully connected readout layer

  • The number of parameters depends on n - adding ndLd learning parameters, which grows with the graph size. This is not amenable to groups of large graphs
  • No longer permutation invariant because of the vec() operation
Exercise

Verify that fully connected readout layers are no longer permutation invariant

  • No longer transferrable across graphs.
    • unlike in GNNs, C depends on n. So if the number of nodes n changes, we have to relearn C

These make this a not-so-attractive option, so we usually use an aggregation readout layer

Mentions

File
aggregation readout layer
fully connected readout layer
2025-02-19 graphs lecture 9