02

Hide a row. Keep its target.

Follow the original GraphMAE computation, including the second mask before the decoder.

One row, two paths

Let MM be the selected nodes. In the clean example, M={B}M=\{B\}. The encoder receives a corrupted matrix X~\widetilde X, where B's row is replaced by a learned input mask token min∈R2m_{\rm in}\in\mathbb{R}^{2}. The scoring path retains the original xB=(1,2)x_B=(1,2).

x~i={mini∈Mxii∉M\widetilde x_i=\begin{cases}m_{\rm in}&i\in M\\x_i&i\notin M\end{cases}

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.

FIG-002Trace B through original GraphMAE's graph-decoder path.

WITHHELD TARGET PATH: original B = (1, 2) → final comparison only

  1. 1
    Original

    Keep an untouched target on the scoring path.

    B: (1, 2)
  2. 2
    Corrupt features

    Learned input token replaces the selected row; graph retained.

    B: [MASK]
  3. 3
    Graph encoder

    Trainable encoder mixes available graph context.

    B: hB
  4. 4
    Project, then re-mask

    Bias-free projection; zero the SAME selected rows for the graph decoder.

    B: 0
  5. 5
    Graph decoder

    Aggregate representations and reconstruct two features per node.

    B: predicted row
  6. 6
    Select and score

    Compare reconstructed B with its untouched target (1, 2).

    B only enters loss

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 H=fθ(G,X~)H=f_\theta(G,\widetilde X). Each row hih_i 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 H~\widetilde H. The graph decoder predicts X^=gϕ(G,H~)\widehat X=g_\phi(G,\widetilde H), 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 M={B}M=\{B\}, an error at A does not enter this step's loss. With M={B,D}M=\{B,D\}, 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

CL-016 · Corruption and encoder edge-dropout branches