๐Ÿ›ก๏ธ Stage 6 โ€” Heterogeneous Structural GNN (RGCN)

๐Ÿ” Multi-Cloud Threat Detection Pipeline โ€” Holistic Version

A schema-agnostic, relation-aware Graph Neural Network for detecting compromised entities across multi-cloud environments using Relational Graph Convolutional Networks (RGCN).

โš™๏ธ Core Design

  • Library: PyTorch Geometric (RGCNConv)
  • Graph Type: Heterogeneous (multi-node, multi-relation)
  • Design Goal: Fully schema-agnostic
  • Feature Handling: Supports any input dimension

๐Ÿ”— Additional Components

  • PEFT Adapters โ†’ Efficient fine-tuning
  • DistMult Edge Scoring โ†’ Relation-level anomaly detection
  • Threat Heads โ†’ Node-level classification

๐Ÿ”ฌ Ablation Study

Controlled experiment: identical data, seed, and hyperparameters
Only the GNN operator changes

Model Type Params User AUC User F1 User AP Role AUC Role F1 Role AP
RGCN โญ PRIMARY 8,515,599 0.5 0.0 0.5 0.5 0.0 0.5
GCN Baseline 5,219,855 0.5 0.0 0.5 0.5 0.0 0.5
GAT Baseline 5,320,207 0.5 0.0 0.5 0.5 0.0 0.5
SAGE Baseline 5,383,695 0.5 0.0 0.5 0.5 0.0 0.5

โš ๏ธ Note on Results

These metrics reflect Phase 1 conditions:

  • Small graph (~tens of nodes)
  • Limited feature signal (near-zero embeddings)
  • Class imbalance effects

โžก๏ธ As a result:

  • All models converge to random baseline (AUC โ‰ˆ 0.5)
  • This is expected behavior, not a failure

Performance becomes meaningful in Phase 2 with real embeddings.

๐Ÿ“ฆ Model Characteristics

Property Value
MAX_FDIM 1024
Hidden Dim 256
Output Dim 128
Relations 20
Layers 3
Adapter Rank 16

๐Ÿš€ Usage (Stage 7 Integration)

import torch
from huggingface_hub import hf_hub_download

ckpt = torch.load(
    hf_hub_download(
        repo_id="adarsh-aur/stage6-rgcn-security",
        filename="model_RGCN.pt"
    )
)

model = HeteroRGCN()
model.load_state_dict(ckpt['model_state_dict'])
model.eval()

with torch.no_grad():
    h_v, offsets, logits = model(graph_snapshot)

# h_v: [total_nodes, 128]
# โ†’ Feed into Stage 7 (GRU / temporal model)

๐Ÿงฉ Key Capabilities

  • โœ” Handles any node/edge schema
  • โœ” Supports future unseen cloud resources
  • โœ” Learns relation-specific transformations
  • โœ” Enables edge-level anomaly detection
  • โœ” Ready for temporal extension (Stage 7)

๐Ÿ“‰ Current Limitations

  • Phase 1 uses minimal feature signal
  • Small dataset limits generalization
  • Metrics do not yet reflect full capability

๐Ÿ”ฎ Next Stage

Stage 7 โ€” Temporal Graph Modeling

  • Sequence modeling over time (GRU / Transformer)
  • Detect evolving attack patterns
  • Improve recall on multi-step attacks

๐Ÿ‘ค Author

Adarsh
Multi-Cloud Security ML Research

โญ Summary

This stage establishes the structural backbone of the pipeline:
A flexible, relation-aware GNN that can scale to real-world cloud security graphs.

Downloads last month
113
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support