spamosaic.architectures.hg_lgcn.HG_LGCN

class spamosaic.architectures.hg_lgcn.HG_LGCN(*args: Any, **kwargs: Any)[source]

Full Heterogeneous Graph LightGCN network with encoder-decoder architecture.

This module uses HG_LGCN_vanilla for graph feature encoding and a customizable decoder for reconstruction.

Parameters:
  • input_size (int) – Dimensionality of input node features.

  • output_size (int) – Dimension of the latent embedding.

  • K (int, default=8) – Number of LightGCN layers.

  • dec_l (int, default=1) – Number of layers in the decoder (1 = linear decoder).

  • hidden_size (int, default=512) – Size of hidden layer in the MLP head.

  • dropout (float, default=0.2) – Dropout rate used in MLP head.

forward(feature, edge_index, edge_weight, edge_type)[source]

Returns: - Latent embedding (L2-normalized). - Reconstructed feature from decoder.