![38% of CISOs Fear They’re Not Moving Fast Enough on AI](https://cdn.sanity.io/images/cgdhsj6q/production/faa0bc28df98f791e11263f8239b34207f84b86f-1024x1024.webp?w=400&fit=max&auto=format)
Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
GSLB is a Graph Structure Learning (GSL) library and benchmark based on DGL and PyTorch. We integrate diverse datasets and state-of-the-art GSL models.
Graph Structure Learning (GSL) aims to optimize both the parameters of Graph Neural Networks (GNNs) and the computation graph structure simultaneously. GSL methods start with input features and an optimal initial graph structure. Its corresponding computation graph is iteratively refined through a structure learning module. With the refined computation graph ,GNNs are used to generate graph representations. Then parameters of the GNNs and the structure modeling module are jointly updated, either simultaneously or alternatively, util a preset stopping condition is satisfied.
If you want to explore more information about GSL, please refer to our survey and paper collection.
GSLB needs the following requirements to be satisfied beforehand:
If you want to quickly run an existing GSL model on a graph dataset:
python main.py --dataset dataset_name --model model_name -n num_trails -g 0 --use_knn -k 5 --use_mettack --sparse --metric acc -p 0. --drop_rate 0. --add_rate 0.
Optional arguments:
--dataset
: the name of graph dataset
--model
: the name of GSL model
--ntrail -n
: repetition count of experiments
--use_knn
: whether to use knn graph instead of the original graph
--k
: the number of the nearest neighbors
--drop_rate
: the probability of randomly edge deletion
--add_rate
: the probability of randomly edge addition
--use_mettack
: whether to use the structure after being attacked by mettack
--ptb_rate -p
: the perturbation rate
--metric
: the evaluation metric
--gpu_num -g
: the selected GPU number
Example: Train GRCN on Cora dataset, with the evaluation metric is accuracy.
python main.py --dataset cora --model GRCN --metric acc
Step 1: Load datasets
from GSL.data import *
# load a homophilic or heterophilic graph dataset
data = Dataset(root='/tmp/', name='cora')
# load a perturbed graph dataset
data = Dataset(root='/tmp/', name='cora', use_mettack=True, ptb_rate=0.05)
# load a heterogeneous graph dataset
data = HeteroDataset(root='/tmp/', name='acm')
# load a graph-level dataset
data = GraphDataset(root='/tmp/', name='IMDB-BINARY', model='GCN')
Step 2: Initialize the GSL model
from GSL.model import *
from GSL.utils import accuracy, macro_f1, micro_f1
model_name = 'GRCN'
metric = 'acc'
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# the hyper-parameters are recorded in config
config_path = './configs/{}_config.yaml'.format(model_name.lower())
# select a evaluation metric
eval_metric = {
'acc': accuracy,
'macro-f1': macro_f1,
'micro-f1': micro_f1
}[metric]
model = GRCN(data.num_feat, data.num_class, evel_metric,
config_path, dataset_name, device)
Step 3: Train GSL model
model.fit(data)
Currently, we have implement the following GSL algorithms:
Candidate algorithms
FAQs
GSLB: Graph Structure Learning Benchmark
We found that GSLB demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.