Heterogeneous graph attention classifier (HGAT)
Source:R/heterogeneous_hgat.R
heterogeneous_hgat.RdImplements Linmei et al.'s (2019) heterogeneous graph convolution and
dual-level attention. Node types retain separate input feature spaces and
transformation matrices. For every target node, type-level attention first
weighs the available neighboring information types; node-level attention
then weighs individual neighbors before their type-specific transformed
representations are combined. This is HGAT for heterogeneous information
networks, distinct from Ding et al.'s document-hypergraph text_hypergat().
Usage
heterogeneous_hgat(
adjacency,
node_types,
features,
labels,
hidden = 128L,
layers = 2L,
epochs = 200L,
lr = 0.005,
weight_decay = 5e-04,
dropout = 0.5,
validation = 0.1,
seed = 1L,
verbose = FALSE
)Arguments
- adjacency
Symmetric non-negative adjacency matrix with identical unique row and column names.
- node_types
Named character vector assigning every node a type.
- features
Named list with one numeric feature matrix per type. Rows are named nodes of that type; feature widths may differ across types.
- labels
Named character labels for a subset of nodes.
Common hidden dimension.
- layers
Number of dual-attention layers (paper default 2).
- epochs, lr, weight_decay, dropout, validation, seed, verbose
Training controls as in
hg_neural().