🤖 AI Summary
APT detection faces challenges including high stealthiness, scarce labeled data, and poor cross-scenario generalization; conventional methods suffer from class imbalance, high-dimensional features, and domain shift. This paper proposes a contrastive transfer learning framework based on a Siamese network, integrating behavioral sequence modeling, contrastive learning, and domain adaptation to enable knowledge transfer across heterogeneous APT attack domains. Its key contributions are: (i) an end-to-end Siamese architecture jointly optimizing feature discriminability and domain invariance; (ii) contrastive loss to enhance fine-grained behavioral pattern discrimination; and (iii) efficient cross-domain detection with only a few target-domain labels. Evaluated on multiple real-world APT datasets under few-shot settings, the method achieves an average 12.6% improvement in cross-domain detection accuracy over state-of-the-art baselines, demonstrating superior generalizability and practicality.