Skip to content

Commit e817745

Browse files
committed
update Readme.md
1 parent a88e3bd commit e817745

File tree

4 files changed

+8
-93
lines changed

4 files changed

+8
-93
lines changed

Readme.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ We also present a automation tool of generate graph.
55

66
### Running project
77
* To run program, use this command: python SmConVulDetector.py.
8-
* In addition, you can use specific hyperparameters to train the model. All the hyperparameters can be found in `parser.py`.
8+
* In addition, you can use specific hyper-parameters to train the model. All the hyper-parameters can be found in `parser.py`.
99

1010
Examples:
1111
```shell
@@ -27,10 +27,15 @@ Then, you can find the training results in the `logs/`.
2727
### Dataset
2828
Original smart contract source code:
2929

30-
Ethereum smart contracts: [Etherscan_contract](https://drive.google.com/open?id=1h9aFFSsL7mK4NmVJd4So7IJlFj9u0HRv)
30+
Ethereum smart contracts: [Etherscan_contract](https://drive.google.com/open?id=1h9aFFSsL7mK4NmVJd4So7IJlFj9u0HRv)
3131

3232
Vntchain smart contacts: [Vntchain_contract](https://drive.google.com/open?id=1FTb__ERCOGNGM9dTeHLwAxBLw7X5Td4v)
3333

3434
The train data after normalization:
3535

3636
`data/LOOP_CORENODES_1317`, `LOOP_FULLNODES_1317`, `REENTRANCY_CORENODES_1671`, `REENTRANCY_FULLNODES_1671`
37+
38+
39+
### Reference
40+
1. The code borrows from [Graph_unet](https://github.com/bknyaz/graph_nn)
41+
2. Thomas N. Kipf, Max Welling, Semi-Supervised Classification with Graph Convolutional Networks, ICLR 2017

SmConVulDetector.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from models.gcn_modify import GCN_MODIFY
1616
from models.gcn_origin import GCN_ORIGIN
1717
from models.gat import GAT
18-
from models.mgcn import MGCN
1918
from sklearn import metrics
2019

2120
print('using torch', torch.__version__)
@@ -211,15 +210,6 @@ def read_node_features(self, fpath, nodes, graphs, fn):
211210
n_hidden=64,
212211
n_class=loaders[0].dataset.num_classes,
213212
dropout=args.dropout).to(args.device)
214-
elif args.model == 'mgcn':
215-
model = MGCN(in_features=loaders[0].dataset.num_features,
216-
out_features=loaders[0].dataset.num_classes,
217-
n_relations=2,
218-
n_hidden=args.n_hidden,
219-
filters=args.filters,
220-
dropout=args.dropout,
221-
adj_sq=args.adj_sq,
222-
scale_identity=args.scale_identity).to(args.device)
223213
elif args.model == 'gat':
224214
model = GAT(nfeat=loaders[0].dataset.num_features,
225215
nhid=64,

models/mgcn.py

Lines changed: 0 additions & 80 deletions
This file was deleted.

parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def parameter_parser():
88
choices=['REENTRANCY_CORENODES_1671', 'REENTRANCY_FULLNODES_1671',
99
'LOOP_CORENODES_1317', 'LOOP_FULLNODES_1317'])
1010
parser.add_argument('-M', '--model', type=str, default='gcn_modify',
11-
choices=['gcn_modify', 'mgcn', 'gat', 'gcn_origin'])
11+
choices=['gcn_modify', 'gat', 'gcn_origin'])
1212
parser.add_argument('--lr', type=float, default=0.002, help='learning rate')
1313
parser.add_argument('--lr_decay_steps', type=str, default='1,3', help='learning rate')
1414
parser.add_argument('--wd', type=float, default=1e-4, help='weight decay')

0 commit comments

Comments
 (0)