I fear there is an issue with the topology attack. From what I understand you initialize as many elements in self.adj_changes as the upper half of the adjacency matrix without the main diagonal. I agree that this is correct. However, in get_modified_adj(...) you get the indices including the main diagonal but exclude the node with the highest index. I believe tril_indices = torch.tril_indices(row=self.n, col=self.n, offset=-1) should fix it.
Hi,
I fear there is an issue with the topology attack. From what I understand you initialize as many elements in
self.adj_changes
as the upper half of the adjacency matrix without the main diagonal. I agree that this is correct. However, in get_modified_adj(...) you get the indices including the main diagonal but exclude the node with the highest index. I believetril_indices = torch.tril_indices(row=self.n, col=self.n, offset=-1)
should fix it.