02
Hide a row. Keep its target.
Follow the original GraphMAE computation, including the second mask before the decoder.
One row, two paths
Let be the selected nodes. In the clean example, . The encoder receives a corrupted matrix , where B's row is replaced by a learned input mask token . The scoring path retains the original .
The token is a trainable vector, not the target and not a command to delete B. In the reviewed author code it starts at zero, then can be updated during learning. B remains a node with its edges.
WITHHELD TARGET PATH: original B = (1, 2) → final comparison only
- 1OriginalB: (1, 2)
Keep an untouched target on the scoring path.
- 2Corrupt featuresB: [MASK]
Learned input token replaces the selected row; graph retained.
- 3Graph encoderB: hB
Trainable encoder mixes available graph context.
- 4Project, then re-maskB: 0
Bias-free projection; zero the SAME selected rows for the graph decoder.
- 5Graph decoderB: predicted row
Aggregate representations and reconstruct two features per node.
- 6Select and scoreB only enters loss
Compare reconstructed B with its untouched target (1, 2).
Architecture trace, not an executed neural forward pass. Only selected feature rows are targets. In the reviewed core code the graph decoder is one layer and returns the original feature width. CL-003–005.
CL-003 · Author implementation, encoding_mask_noise and enc_mask_token
Why mask again?
The encoder computes . Each row is now a learned representation rather than a raw feature vector. A learned, bias-free projection maps the encoder output into the decoder's input space. In the graph-decoder path, the implementation overwrites the projected rows at the same nodes in M with zero.
Call that re-masked matrix . The graph decoder predicts , producing a feature row for each node. At B, it has a zero input row and can aggregate neighboring representations. This removes the direct route from B's own encoder row into B's decoder input.
That routing choice does not prove all information about B has vanished elsewhere. Message passing mixes information across connected nodes. Re-masking specifies which local decoder input is removed; it is not an information-theoretic guarantee against shortcuts.
CL-004 · MLP/linear alternatives do not follow this re-masking branch. This guide teaches the graph decoder path.
CL-004 · Author implementation, projection, re-mask and decoder, lines 246–260
The decoder emits more than the loss scores
All six reconstructed rows may exist, but this objective scores only the selected rows. With , an error at A does not enter this step's loss. With , the objective averages B's and D's terms. “Masked-only” describes which rows are scored, not which intermediate activations or weights can receive gradients.
The encoder, input token, projection and decoder participate in learning. Our interactive lab will do none of those updates: it evaluates the same loss selection on explicitly prescribed reconstructions.
CL-005 · Author implementation, recon[mask_nodes] and x[mask_nodes]
What differs from the all-token example?
The implementation can replace some selected rows with features sampled from other nodes instead of the token. Its command-line replacement default is zero, while constructor defaults and dataset configurations differ. Our walkthrough uses replacement zero and no edge dropout. These are not universal GraphMAE hyperparameters.
An optional encoder edge-dropout branch also exists; the decoder receives the pre-drop graph. Record settings explicitly in a real experiment, and check integer rounding before adapting large-graph corruption settings to six nodes.
CL-014 · Command-line defaults