Parameter Sharing

Parameter sharing means reusing the same learnable parameters across positions, tokens, nodes, edges, patches, or time steps.

For a generic local update:

is the representation at location , is context around that location, and the same function is reused for many .

Convolution Example

For a 1D convolution:

The same kernel weights are applied at every position . This creates translation equivariance and reduces the number of parameters compared with a fully connected map.

Graph Message Passing Example

For message passing:

is the neighborhood of node , is an edge feature, and the same message/update functions are reused across graph locations.

Why It Matters

  • It reduces parameter count.
  • It improves generalization when repeated structure exists.
  • It encodes inductive bias such as locality, recurrence, or permutation equivariance.
  • It makes models more reusable across variable input sizes.

Examples

  • CNN kernels share weights across image or grid positions.
  • RNN transition functions share weights across time.
  • Transformer attention projections share weights across token positions.
  • GNN message functions share weights across nodes and edges.
  • Mixture of experts shares routers and experts conditionally, but activates only a subset per token.

Checks

  • What axis uses shared parameters?
  • Does sharing match the true repeated structure of the input?
  • Does the model need positional or edge information to break unwanted symmetry?
  • Does sharing reduce capacity too much for the task?