Masked Account Graph Autoencoder (MAGAE)
- The paper introduces MAGAE, a masked graph autoencoder for account-level graphs that uses double masking and scaled cosine error to accurately reconstruct node features.
- MAGAE leverages both GNN and transformer backbones with techniques like LABOR sampling to handle large-scale datasets such as Ethereum fraud detection graphs.
- The method’s adaptability supports various applications including fraud detection, synthetic graph evaluation, and heterogeneous account data processing.
Masked Account Graph Autoencoder (MAGAE) denotes a masked graph autoencoder specialized to account-level graphs, such as bank accounts, user profiles, merchant accounts, or Ethereum addresses. In its canonical GraphMAE-derived form, it learns account representations by masking account node features, encoding the partially observed graph with a graph neural network (GNN), re-masking masked-node latents before decoding, and reconstructing the original features with scaled cosine error, thereby using graph structure as contextual support rather than as the primary reconstruction target (Hou et al., 2022). In later work on Ethereum fraud detection, MAGAE becomes a concrete model family for account interaction graphs and is coupled with scalable layer-neighbor sampling for large-scale training (Jia et al., 4 Sep 2025).
1. Conceptual lineage and scope
MAGAE is best understood as a domain-specific instance of the broader graph masked autoencoder paradigm. One line of work defines masked graph autoencoding as generative self-supervised pretraining on graphs, with node-feature masking and reconstruction as the central pretext task; another line extends the same idea to transformer backbones; a later account-specific instantiation applies the method directly to Ethereum account graphs for node-level fraud detection (Hou et al., 2022, Zhang et al., 2022, Jia et al., 4 Sep 2025).
| Formulation | Masked content | Distinctive mechanism |
|---|---|---|
| GraphMAE | Node features | Re-masking and scaled cosine error |
| GMAE | Node features | Deep transformer encoder and shallow transformer decoder |
| MAGAE in LMAE4Eth | Account node features | LABOR sampling for large Ethereum graphs |
Within this lineage, MAGAE has both a narrow and a broad meaning. In the narrow sense, it refers to the Ethereum fraud-detection component in LMAE4Eth. In the broader sense, it refers to any masked graph autoencoder adapted to account graphs, including banking, customer, merchant, user-account, or blockchain settings. A related evaluation-oriented usage treats graph masked autoencoders as graph-level feature extractors for comparing real and generated graphs, rather than as downstream task models; this suggests that MAGAE can also function as a representation backbone for synthetic account-graph evaluation (Wang et al., 17 Mar 2025).
2. Core formulation and architectural pattern
The standard MAGAE formulation begins with a graph
where is the node set, is the adjacency matrix, and is the node feature matrix. For account graphs, nodes are accounts, while edges encode relationships such as transactions, co-ownership, shared devices, shared IPs, or merchant interactions (Hou et al., 2022).
GraphMAE-style MAGAE contains five components: a masking module that produces masked features , an encoder , a re-masking module in latent space, a decoder , and a reconstruction loss on masked nodes. Its central forward equations are
where is the latent code and is a re-masked version of 0 used only by the decoder (Hou et al., 2022).
Feature masking is performed at the node level. If 1 denotes the masked node set and 2 is a learnable mask token, then
3
After encoding, masked nodes are re-masked again in latent space with a decoder-mask token: 4 This double masking prevents trivial identity mapping. The encoder cannot directly copy raw features because masked inputs are replaced by a token, and the decoder cannot directly copy latent representations of masked nodes because those latents are overwritten before reconstruction. Reconstruction must therefore exploit neighborhood context through message passing (Hou et al., 2022).
In GNN-based implementations, encoder and decoder backbones are standard graph neural networks such as GCN, GAT, and GIN. GraphMAE typically uses a GAT encoder for node-level tasks, a GIN encoder for graph-level tasks, and a single-layer GNN decoder (Hou et al., 2022). Transformer-based variants replace the GNN backbone with Graphormer-style attention, preserve the full graph structure during masking, compute centrality encoding, spatial encoding, and edge encoding on the full graph, and use an asymmetric design in which the encoder is deep and the decoder shallow (Zhang et al., 2022).
3. Masking policies and reconstruction objectives
A central design choice in MAGAE is what to reconstruct. GraphMAE argues that explicit structure reconstruction is over-emphasized in conventional GAEs and VGAEs, which tend to learn topological proximity useful for link prediction and clustering but weaker for node and graph classification. On that basis, it abandons explicit adjacency reconstruction and focuses solely on masked feature reconstruction (Hou et al., 2022).
The reconstruction loss most closely associated with MAGAE is the scaled cosine error (SCE). For a masked node 5, original feature 6, reconstruction 7, and scaling exponent 8,
9
This choice is motivated by the sensitivity of MSE to vector norms and dimensionality, and by the need to suppress easy examples while retaining focus on harder masked nodes. In the GraphMAE experiments, replacing MSE with SCE produced gains of 1.5–8 percentage points in node classification (Hou et al., 2022).
Mask ratio is not fixed across the literature. Reported effective regimes include 0.2 in graph-evaluation pipelines that randomly choose node masking or edge masking with equal probability, approximately 0–1 or even 2–3 in transformer masked autoencoders, and 4–5 in Ethereum account graphs; this suggests that aggressive masking is feasible when sufficient structural context remains visible (Wang et al., 17 Mar 2025, Zhang et al., 2022, Jia et al., 4 Sep 2025).
For account graphs with mixed feature types, the blueprints associated with MAGAE propose extending pure SCE by splitting feature vectors into continuous and discrete parts. In that formulation, SCE is used on continuous components, while cross-entropy or BCE is used on categorical or binary components. This is not the canonical GraphMAE loss, but it is an explicit account-graph adaptation proposed in the MAGAE design literature (Hou et al., 2022, Wang et al., 17 Mar 2025).
4. Account-graph instantiation in Ethereum fraud detection
The most explicit MAGAE instantiation in the supplied literature appears in LMAE4Eth, where MAGAE is the graph-side core for Ethereum fraud detection. There, the account interaction graph 6 uses Ethereum accounts as nodes, transactional relationships as edges, and normalized transaction-count weights on edges. Node features are expert-engineered and fall into three groups: transaction statistics, transaction transfer behavior, and node importance measures. The listed features include node outdegree, node indegree, max and min outgoing amount, max and min incoming amount, average outgoing amount, average incoming amount, account balance, account lifetime, long-term incoming transfer frequency, short-term incoming transfer frequency, long-term outgoing transfer frequency, short-term outgoing transfer frequency, degree centrality, indegree centrality, outdegree centrality, betweenness centrality, closeness centrality, eigenvector centrality, Katz centrality, and clustering coefficient (Jia et al., 4 Sep 2025).
| Feature category | Examples | Role |
|---|---|---|
| Transaction statistics | Outdegree, indegree, max/min amounts, averages, balance, lifetime | Behavioral summary |
| Transfer behavior | Long-term and short-term incoming/outgoing transfer frequency | Temporal frequency |
| Centrality measures | Degree, betweenness, closeness, eigenvector, Katz, clustering coefficient | Structural importance |
LMAE4Eth couples MAGAE with Layer-Neighbor Sampling (LABOR) to scale to very large graphs. Nodes are partitioned into mini-batches 7, neighbors are sampled with probabilities 8, and the sampled neighbor set for 9 is defined as
0
where 1. MAGAE then masks a fraction 2 of target nodes in each batch, reconstructs masked features with SCE, and discards the decoder at inference time, retaining encoder embeddings as account representations. The reported Ethereum datasets are MulDiGraph with approximately 3M nodes and 4M edges, B4E with approximately 5M nodes and 6M edges, and SPN with approximately 7M nodes and 8M edges. Under a 3-layer GCN and fanout 9 on MulDiGraph, LABOR yields throughput of 0 iterations per second, compared with 1 for PLADIES and 2 for LADIES, while using markedly fewer deeper-layer edges. In replacement experiments on B4E, with TxCLM and CAFN fixed, MAGAE achieved Precision 3, Recall 4, F1 5, and BAcc 6; the strongest listed replacement, GATE, obtained Precision 7, Recall 8, F1 9, and BAcc 0. At the full-system level, LMAE4Eth was evaluated against 21 baselines on three datasets and outperformed the best baseline by over 10% in F1-score on two datasets (Jia et al., 4 Sep 2025).
5. Architectural variants and methodological extensions
MAGAE inherits a large extension space from masked graph autoencoders. These extensions do not redefine the account-graph setting, but they alter what is masked, what is reconstructed, and which invariances are imposed during pretraining.
| Variant | Main mechanism | Relevance to MAGAE |
|---|---|---|
| Transformer GMAE | Deep Graphormer encoder, shallow decoder, full structural encodings | Long-range account interactions (Zhang et al., 2022) |
| HGMAE | Metapath masking, adaptive attribute masking, target attribute restoration, positional feature prediction | Heterogeneous account-device-merchant-IP graphs (Tian et al., 2022) |
| StructMAE | Structure-based node scoring and easy-to-hard masking | Prioritized masking of structurally important accounts (Liu et al., 2024) |
| UGMAE | Adaptive masking, ranking-based structure reconstruction, bootstrapping similarity, consistency assurance | Multi-objective MAGAE pretraining (Tian et al., 2024) |
| DGMAE | Discrepancy reconstruction between nodes and neighbors | Heterophilic account graphs (Zheng et al., 24 Jun 2025) |
| RARE | Joint raw-space and latent-space masking with momentum encoder | Robustness under noisy or unstable neighborhoods (Tu et al., 2023) |
| Bandana | Non-discrete edge bandwidth masking and layer-wise bandwidth prediction | Continuous structural masking (Zhao et al., 2024) |
| GA1E | Subgraph meta-structure and adversarial discriminator | Unified node-, edge-, and graph-level account tasks (Hu et al., 2024) |
Several of these extensions are especially consequential for account graphs. Heterogeneous formulations are relevant when accounts interact with devices, merchants, cards, or IPs; HGMAE addresses this setting through metapath masking, adaptive attribute masking with dynamic mask rate, metapath-based edge reconstruction, target attribute restoration, and positional feature prediction (Tian et al., 2022). When account graphs are heterophilic, DGMAE reconstructs discrepancy information rather than only neighbor consistency, preserving distinctions between connected but dissimilar nodes (Zheng et al., 24 Jun 2025). When local neighborhoods are noisy or unstable, RARE adds masked latent feature completion and momentum-encoder alignment on top of raw-space reconstruction (Tu et al., 2023). StructMAE and UGMAE address a different weakness: uniform random masking. Both introduce adaptive or structure-guided masking so that pretraining focuses on nodes with greater structural significance or greater reconstruction difficulty (Liu et al., 2024, Tian et al., 2024).
These variants suggest that MAGAE is not a single fixed architecture but a family of account-graph masked autoencoders. The minimal GraphMAE-derived form reconstructs masked account features. Extended forms can also reconstruct metapath-based structure, discrepancy signals, or stabilized latent targets, and can shift from homogeneous GNNs to graph transformers, heterogeneous GNNs, or adversarial subgraph generators depending on the account-graph regime.
6. Applications, evaluation, and limitations
The application profile repeatedly associated with MAGAE includes fraud detection, credit scoring, user segmentation, and early detection of collusive rings or money-laundering structures. A central practical attraction is that masked autoencoding requires unlabeled account graphs for pretraining, which makes it suitable for regimes with severe label scarcity (Hou et al., 2022, Jia et al., 4 Sep 2025).
MAGAE can also serve as a graph representation extractor rather than as a downstream predictor. In graph generative model evaluation, masked autoencoders are trained on real graphs, graph-level embeddings are obtained by READOUT over node embeddings, and those embeddings feed Fréchet Distance, MMD, Precision/Recall, and Density/Coverage. The evaluation study emphasizes that no single method stands out consistently across all metrics and datasets, and that these metrics are not interchangeable because they capture different aspects of fidelity and diversity; a plausible implication is that MAGAE-based evaluation of synthetic account graphs should be reported with multiple metrics rather than with a single summary score (Wang et al., 17 Mar 2025).
The limitations of MAGAE follow directly from the limitations of its underlying graph MAE families. In its core GraphMAE form, the method was primarily evaluated on static, homogeneous graphs, it does not itself solve missing or poor node features, and it targets node and graph representation learning rather than explicit generative graph-structure modeling (Hou et al., 2022). In the Ethereum MAGAE instantiation, the method retains a batch or offline assumption, depends heavily on expert-engineered features, models temporal information only indirectly through summary statistics such as short-term and long-term transfer frequencies, and uses uniform random node masking rather than a task-aware masking policy (Jia et al., 4 Sep 2025).
The extension literature points to several active development directions. Heterogeneous and metapath-aware formulations broaden MAGAE beyond single-type account graphs (Tian et al., 2022). Structure-guided and adaptive masking attempt to decide where masking is most informative (Liu et al., 2024, Tian et al., 2024). Discrepancy-aware objectives target heterophilic graphs, where connected nodes may be semantically dissimilar (Zheng et al., 24 Jun 2025). Robust latent completion and momentum teachers mitigate instability under heavy masking (Tu et al., 2023). Adversarial and subgraph-based formulations seek a unified account-graph pretraining regime across node-, edge-, and graph-level tasks (Hu et al., 2024). Taken together, these developments suggest that MAGAE is evolving from a direct GraphMAE adaptation into a broader design space for account-centric graph self-supervision.