MCPcopy Create free account

hub / github.com/LFhase/GIA-HAO / functions

Functions151 in github.com/LFhase/GIA-HAO

↓ 17 callersMethodreset_parameters
(self)
models/model_pyg.py:33
↓ 10 callersMethod__init__
(self, in_channels, hidden_channels, out_channels, num_layers, dropout, layer_norm_first=Fals
models/model_pyg.py:16
↓ 7 callersMethodreset
(self)
attacks/utils.py:65
↓ 6 callersFunctioninit_feat
(num, features, device, style="sample", feat_lim_min=-1, feat_lim_max=1)
attacks/attack.py:9
↓ 6 callersFunctionrandom_injection
(adj, n_inject, n_edge_max, target_idx, device)
attacks/injection.py:99
↓ 5 callersFunctiongia_update_features
(attacker, model, adj_attack, features, features_attack, origin_labels, target_idx, homophily=None, hinge=Fals
attacks/attack.py:173
↓ 5 callersFunctionsep_test
(model, x, adj_t, y, target_idx, evaluator)
gnn_misg.py:92
↓ 4 callersFunctionadj_to_tensor
r""" Description ----------- Convert adjacency matrix in scipy sparse format to torch sparse tensor. Parameters ---------- a
attacks/utils.py:70
↓ 3 callersFunctiongcn_norm
(adj_t, order=-0.5, add_self_loops=True)
attacks/attack.py:54
↓ 3 callersFunctionnode_sim_estimate
estimate the mean and variance from the observed data points
attacks/attack.py:73
↓ 3 callersFunctionsample_mask
Create mask.
utils.py:390
↓ 2 callersFunctionagia_injection
(attacker, model, adj, n_inject, n_edge_max, features, features_attack, target_idx, origin_labels,
attacks/injection.py:464
↓ 2 callersMethodatt_coef
(self, features, adj)
models/model_pyg.py:612
↓ 2 callersMethodatt_coef
(self, features, adj)
models/model_pyg.py:768
↓ 2 callersMethodattack
(self, model, adj, features, target_idx, labels=None)
attacks/vanilla.py:47
↓ 2 callersFunctioneval_robustness
(model, features, adj, target_idx, labels, device, args, run)
gnn_misg.py:107
↓ 2 callersFunctiongcn_norm
(adj_t, order=-0.5, add_self_loops=True)
models/model_pyg.py:388
↓ 2 callersFunctiongenerate_grb_split
(data,mode='full')
load_graph.py:214
↓ 2 callersFunctionset_rand_seed
(rand_seed)
utils.py:247
↓ 2 callersFunctiontrain
(model, x, adj_t, y, train_idx, optimizer)
gnn_misg.py:36
↓ 1 callersFunctionatdgia_injection
(adj, n_inject, n_edge_max, origin_labels, current_pred, target_idx, device, self_connect_ratio=0
attacks/injection.py:219
↓ 1 callersFunctionatdgia_ranking_select
(adj, n_inject, n_edge_max, origin_labels, current_pred, target_idx, ratio=0.5, neg=False, weight1=0.9, weight
attacks/injection.py:340
↓ 1 callersFunctionedge_sim_analysis
(edge_index, features)
attacks/attack.py:26
↓ 1 callersFunctionfeat_normalize
r""" Description ----------- Feature normalization function. Parameters ---------- features : torch.FloatTensor Featu
utils.py:61
↓ 1 callersFunctionfeat_normalize
(feat, norm=None)
attacks/utils.py:202
↓ 1 callersFunctionflag
(model_forward, clean, y, args, optimizer, device, criterion)
attacks/flag.py:42
↓ 1 callersFunctiongenerate_percent_split
(dataset, seed=0, train_percent=10, val_percent=10)
load_graph.py:172
↓ 1 callersFunctionget_index_induc
r""" Description ----------- Get index under the inductive training setting. Parameters ---------- index_a : tuple T
utils.py:180
↓ 1 callersFunctioninductive_split
inductive split adjs for PyG graphs will automatically use relative ids for splitted graphs
utils.py:231
↓ 1 callersMethodinjection
(self, adj, n_inject, n_node, target_idx, target_node=None, mode='random-inter')
attacks/speit.py:112
↓ 1 callersMethodinjection
r""" Description ----------- Randomly inject nodes to target nodes. Parameters ---------- adj : scip
attacks/pgd.py:105
↓ 1 callersMethodinjection
r""" Description ----------- Randomly inject nodes to target nodes. Parameters ---------- adj : scip
attacks/rnd.py:64
↓ 1 callersFunctionload_cora
(self_loop=True)
load_graph.py:59
↓ 1 callersFunctionload_dblp
(pyg=True, self_loop=True)
load_graph.py:138
↓ 1 callersFunctionload_grb
(name, mode="full", self_loop=True)
load_graph.py:36
↓ 1 callersFunctionload_heter_g
(dataset_name, pyg=False, splits_file_path=None, train_percentage=0.48, val_percentage=0.32, embedding_mode=No
load_graph.py:271
↓ 1 callersFunctionload_ogb
(name, self_loop=True, undirected=True)
load_graph.py:81
↓ 1 callersFunctionload_reddit
(self_loop=True)
load_graph.py:70
↓ 1 callersFunctionmain
()
gnn_misg.py:243
↓ 1 callersFunctionmeta_injection
(attacker, model, adj, n_inject, n_edge_max, features, features_attack, target_idx, origin_labels,
attacks/injection.py:590
↓ 1 callersFunctionnode_sim_analysis
(adj, x)
attacks/attack.py:66
↓ 1 callersFunctionnormalize_adj
Symmetrically normalize adjacency matrix.
utils.py:476
↓ 1 callersMethodopt_adj_attack
(self, model, adj, features, features_attack, target_idx, origin_labels, n_epoch=1e9, homophily=None)
attacks/agia.py:94
↓ 1 callersFunctionparse_index_file
Parse index file.
utils.py:382
↓ 1 callersFunctionprune_graph
(adj_test, target_idx, k)
utils.py:17
↓ 1 callersFunctionrandom_class_injection
(adj, n_inject, n_edge_max, origin_labels, target_idx, device, not_full=False)
attacks/injection.py:52
↓ 1 callersFunctionreproduction_info
()
gnn_misg.py:235
↓ 1 callersMethodreset_parameters
(self)
models/model_pyg.py:71
↓ 1 callersFunctionsmooth_update_features
(attacker, model, adj_attack, features, features_attack, origin_labels, target_idx, homophily=None, n_inject_c
attacks/attack.py:242
↓ 1 callersFunctiontarget_select
(model,adj,features,labels,target_idx,num)
utils.py:25
↓ 1 callersFunctiontdgia_injection
(adj, n_inject, n_edge_max, origin_labels, current_pred, target_idx, device, self_connect_ratio=0
attacks/injection.py:133
↓ 1 callersFunctiontest
(model, x, adj_t, y, split_idx, evaluator)
gnn_misg.py:70
↓ 1 callersFunctiontrain_flag
(model, x, adj_t, y, train_idx, optimizer, device, args)
gnn_misg.py:51
↓ 1 callersMethodupdate_features
r""" Description ----------- Adversarial feature generation of injected nodes. Parameters ----------
attacks/speit.py:257
↓ 1 callersMethodupdate_features
r""" Description ----------- Update features of injected nodes. Parameters ---------- model : torch.
attacks/pgd.py:161
FunctionGCNAdjNorm
(adj, order=-0.5)
models/model_pyg.py:370
Method__call__
r""" Parameters ---------- score : float Value of attack acore.
attacks/utils.py:46
Method__init__
(self, train_mask, val_mask, test_mask)
load_graph.py:167
Method__init__
(self, *args, **kwargs)
utils.py:340
Method__init__
(self, epsilon, n_epoch, n_inject_max, n_e
attacks/speit.py:50
Method__init__
r""" Parameters ---------- patience : int, optional Number of epoch to wait if no further improvement. Default: `
attacks/utils.py:29
Method__init__
(self, epsilon, n_epoch, n_inject_max, n_e
attacks/gia.py:23
Method__init__
(self, epsilon, n_epoch, a_epoch, n_inject
attacks/seqgia.py:23
Method__init__
(self, epsilon, n_epoch, n_inject_max, n_e
attacks/pgd.py:47
Method__init__
(self, epsilon, n_epoch, n_inject_max, n_e
attacks/vanilla.py:18
Method__init__
(self, epsilon, n_epoch, a_epoch, n_inject
attacks/agia.py:24
Method__init__
(self, epsilon, n_epoch, n_inject_max, n_e
attacks/rnd.py:19
Method__init__
(self, in_channels, hidden_channels, out_channels, num_layers, dropout, layer_norm_first=Fals
models/model_pyg.py:53
Method__init__
(self, in_channels, hidden_channels, out_channels, num_layers, dropout, layer_norm_first=Fals
models/model_pyg.py:107
Method__init__
(self, in_channels, hidden_channels, out_channels, num_layers, dropout, layer_norm_first=Fals
models/model_pyg.py:126
Method__init__
(self, in_channels, hidden_channels, out_channels, num_layers, dropout, layer_norm_first=Fals
models/model_pyg.py:164
Method__init__
(self, in_channels, hidden_channels, out_channels, num_layers, dropout, layer_norm_first=Fals
models/model_pyg.py:203
Method__init__
(self, in_channels: Union[int, Tuple[int, int]], out_channels: int, heads: int = 1, threshold
models/model_pyg.py:250
Method__init__
(self, in_channels, hidden_channels, out_channels, num_layers, dropout)
models/model_pyg.py:418
Method__init__
(self, in_features, out_features, act0=F.elu, act1=F.relu, initial=False, dropout=0.5)
models/model_pyg.py:496
Method__init__
(self, in_channels, hidden_channels, out_channels, num_layers, dropout, layer_norm_first=Fals
models/model_pyg.py:561
Method__init__
(self, in_channels, hidden_channels, out_channels, num_layers, dropout, layer_norm_first=Fals
models/model_pyg.py:677
Functionadj_preprocess
r""" Description ----------- Preprocess the adjacency matrix. Parameters ---------- adj : scipy.sparse.csr.csr_matrix or a t
attacks/utils.py:125
Methodattack
(self, model, adj, features, target_idx, labels=None)
attacks/speit.py:81
Methodattack
(self, model, adj, features, target_idx, labels=None)
attacks/gia.py:55
Methodattack
(self, model, adj, features, target_idx, labels=None)
attacks/seqgia.py:69
Methodattack
(self, model, adj, features, target_idx, labels=None)
attacks/pgd.py:76
Methodattack
(self, model, adj, features, target_idx, labels=None)
attacks/agia.py:68
Methodattack
(self, model, adj, features, target_idx, labels=None)
attacks/rnd.py:48
Functioncheck_feat_range
r""" Description ----------- Check if the generated features are within the limited range. Parameters ---------- features :
attacks/utils.py:591
Functioncheck_symmetry
r""" Description ----------- Check if the adjacency matrix is symmetric. Parameters ---------- adj : scipy.sparse.csr.csr_ma
attacks/utils.py:568
Methodcon_forward
(self,x,adj_t,layers=-1)
models/model_pyg.py:92
Functiondeg_estimate
(adj, num, style='sample')
attacks/attack.py:92
Functiondice_injection
(adj, n_inject, n_edge_max, origin_labels, target_idx, device)
attacks/injection.py:11
Functiondownload
r""" Description ----------- Download dataset from URL. Parameters ---------- url : str URL to the dataset. save
attacks/utils.py:428
Functionedge_sim_estimate
estimate the mean and variance from the observed data points
attacks/attack.py:35
Functioneval_acc
r""" Description ----------- Accuracy metric for node classification. Parameters ---------- pred : torch.Tensor Outp
attacks/metric.py:7
Functioneval_f1multilabel
r""" Description ----------- F1 score for multi-label node classification. Parameters ---------- pred : torch.Tensor
attacks/metric.py:85
Functioneval_rocauc
r""" Description ----------- ROC-AUC score for multi-label node classification. Parameters ---------- pred : torch.Tensor
attacks/metric.py:40
Functionextra_misg_ids
sample misclassified training samples and save to args.misg_path
utils.py:255
Functionfeat_preprocess
r""" Description ----------- Preprocess the features. Parameters ---------- features : torch.Tensor or numpy.array F
attacks/utils.py:179
Functionfix_seed
r""" Description ----------- Fix random process by a seed. Parameters ---------- seed : int, optional Random seed. D
attacks/utils.py:255
Functionflag_biased
(model_forward, perturb_shape, y, args, optimizer, device, criterion, training_idx)
attacks/flag.py:9
Methodforward
(self, x, adj_t)
models/model_pyg.py:40
Methodforward
(self, x, adj_t, layers=-1)
models/model_pyg.py:77
next →1–100 of 151, ranked by callers