FDUDSDE / MAGIC

Codes and data for USENIX Security 24 paper "MAGIC: Detecting Advanced Persistent Threats via Masked Graph Representation Learning"
MIT License
64 stars 10 forks source link

Question about the calculation of mask feature reconstruction loss in the code #15

Closed zmkzmkzmkzmkzmk closed 2 months ago

zmkzmkzmkzmkzmk commented 3 months ago

When I was debugging the code I found that x_init was not equal to the node's original one-hot encoding: image image

I think the problem may occur in self.encoding_mask_noise(g, self._mask_rate), because after executing the code self.encoding_mask_noise(g, self._mask_rate), the value of g.ndata['attr'][mask_nodes] will be changes happened. Will this problem affect the calculation of loss = self.criterion(x_rec, x_init)

Jimmyokok commented 3 months ago

This looks like a rather covert but important bug, and if someone might find and report it earlier, we would definitely going to investigate it. However, we are going to release a new version of MAGIC in this month (or probably next month), which focus on entity-level detection task, and is more stable, bug-free and easier to reproduce. In this case, we are not going to fix this particular bug you found.