minchen00 / graph-unlearning Goto Github PK
View Code? Open in Web Editor NEWOfficial implementation of "Graph Unlearning" (ACM CCS 2022)
Official implementation of "Graph Unlearning" (ACM CCS 2022)
Traceback (most recent call last):
File "/home/gfq/code/privacy/Graph-Unlearning-main/lib_gnn_model/node_classifier.py", line 203, in
graphsage.train_model()
File "/home/gfq/code/privacy/Graph-Unlearning-main/lib_gnn_model/node_classifier.py", line 80, in train_model
out = self.model(self.data.x[n_id], adjs, self.edge_weight)
File "/home/gfq/anaconda3/envs/unlearning/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/gfq/code/privacy/Graph-Unlearning-main/lib_gnn_model/gcn/gcn_net_batch.py", line 20, in forward
x = self.convs[i]((x, x_target), edge_index, edge_weight=edge_weight[e_id])
File "/home/gfq/anaconda3/envs/unlearning/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/gfq/code/privacy/Graph-Unlearning-main/lib_gnn_model/gcn/gcn_conv_batch.py", line 22, in forward
out = torch.matmul(out, self.weight) #报错拉!
File "/home/gfq/anaconda3/envs/unlearning/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'GCNConvBatch' object has no attribute 'weight'
进程已结束,退出代码为 1
If we change out = torch.matmul(out, self.weight) to out = self.lin(out) in Graph-Unlearning-main/lib_gnn_model/gcn/gcn_net_batch.py, it works, but by default citeseer training set set the accuracy is only about 40%.
Is there any further explanation about the parameters?
I have some questions when I run it, for example, "partition_method" defaults to sage_km, but under this parameter I need to load the model, and I haven't noticed where to train it.
Also, after I change "partition_method" to "random", it runs successfully. At the time of "unlearning", the following error is reported:
Traceback (most recent call last):
File "/home/gfq/code/privacy/Graph-Unlearning-main/main.py", line 54, in
main(args, args['exp'])
File "/home/gfq/code/privacy/Graph-Unlearning-main/main.py", line 42, in main
ExpUnlearning(args)
File "/home/gfq/code/privacy/Graph-Unlearning-main/exp/exp_unlearning.py", line 32, in init
self.train_target_models(run)
File "/home/gfq/code/privacy/Graph-Unlearning-main/exp/exp_unlearning.py", line 74, in train_target_models
for shard in range(self.num_shards):
AttributeError: 'ExpUnlearning' object has no attribute 'num_shards'
File "/home/gfq/code/privacy/Graph-Unlearning-main/exp/exp_attack_unlearning.py", line 166, in attack_graph_unlearning
with open(config.MODEL_PATH + self.args['dataset_name'] + "/" + self.args['target_model'] +"_unlearned_indices") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'temp_data/models/citeseer/GAT_unlearned_indices'
I am experimenting under '--exp' is 'attack_unlearning', what are the parameters under which this file was created?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.