Comments (5)
Hi,
The input adjacency matrix already contains the injected nodes. Please see the file below.
DeepRobust/examples/graph/test_nipa.py
Lines 60 to 62 in fb047ac
from deeprobust.
Thank you very much for your answer!
The input adjacency matrix does indeed include injection nodes, but at this point, the degree of the injected nodes is 0 because the injection nodes have not yet been connected to the nodes in the original graph (the "injecting_nodes" function in the "deeprobust/examples/graph/test_nipa. py" file seems to have only changed the shape of the initial adjacency matrix). However, the variable "N" in the "deeprobust/graph/rl/nipa_env. py" file represents the number of nodes with a degree greater than 0, which is the number of nodes in the original graph (the degree of all nodes in the graph I chose to attack is greater than 0), and the variable "self. all_nodes" should represent the index of all nodes in the original graph. I also debugged the code, which confirms my point.
In the above figure, I printed the shapes of the feature matrices before and after injecting nodes. Before injecting nodes, the number of nodes was 2708, and after injecting nodes, the number of nodes was 2735. Therefore, the index of the injected nodes should be 2708-2734. However, I checked the index stored in the variable "self.injected_nodes" in the "deeprobust/graph/rl/nipa_env. py" file, and it looks like this:
The value of the variable "self.injected_nodes" is actually stored between 2681 and 2707.
I hope you can check it out and correct me if I'm wrong.
from deeprobust.
Hi,
The input adjacency matrix already contains the injected nodes. Please see the file below.
DeepRobust/examples/graph/test_nipa.py
Lines 60 to 62 in fb047ac
Hi,
The input adjacency matrix already contains the injected nodes. Please see the file below.
DeepRobust/examples/graph/test_nipa.py
Lines 60 to 62 in fb047ac
Hello, could you please reply to me?
from deeprobust.
Hi mmdhhhh,
Thank you for pointing out. I agree that there is a bug in this file. Can you help me fix this issue and submit a pull request to this repo? I appreciate your help.
from deeprobust.
Thank you for your answer!
I will submit a pull request soon.
from deeprobust.
Related Issues (20)
- The problem of graph adversarial attacks HOT 4
- why the cora dataset in deeprobust have 2485 nodes,and cora dataset in pyg have 2708 nodes? which one is correct? HOT 1
- How targeted_attack attack a subset of nodes? HOT 2
- The problem of NIPA HOT 1
- Issue With Dataset library in deeprobust for Setting as prognn and for Windows Platform. HOT 2
- Does deeprobust support ImageNet dataset and how to set parameters for attack algorithms when using it?
- AttributeError: 'Dataset' object has no attribute 'root' Dataset of deeprobust HOT 2
- error during installation windows 11 HOT 6
- Dose deeprobust support image segmentation models such as FCN? how to use it
- A source code error when using deeprobust.graph.data.Dataset under windows (have solved) HOT 3
- Custom Dataset HOT 1
- About Random Seeds HOT 2
- Getting scipy error on running test_pgdtraining.py
- Question about PGD graph global attack with CE/CW loss
- Can this support GraphSAGE?
- About the sparse matrix
- An error in the installation process HOT 1
- 关于graph是否使用lcc版本的设置问题 HOT 1
- why the accuracy in pubmed is so high?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deeprobust.