GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - AkandaAshraf/VirtualSoc: Dynamic Social Network Simulation Data with Ground Truth Labels and Features

BranchesTags
Open more actions menu

Latest commit

 

History

130 Commits
130 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
templates
templates
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
DNA.py
DNA.py
 
 
LICENSE
LICENSE
 
 
MultipleNetworksSimulation.py
MultipleNetworksSimulation.py
 
 
Networks.py
Networks.py
 
 
Node.py
Node.py
 
 
PetriDish.py
PetriDish.py
 
 
README.md
README.md
 
 
RealFeatures.py
RealFeatures.py
 
 
ScriptMultiNetwork.py
ScriptMultiNetwork.py
 
 
ScriptRealFeaturesNetwork.py
ScriptRealFeaturesNetwork.py
 
 
ScriptSingleNetwork.py
ScriptSingleNetwork.py
 
 
Socialiser.py
Socialiser.py
 
 
Transfer.py
Transfer.py
 
 
data_sample.zip
data_sample.zip
 
 
gpu.py
gpu.py
 
 
requirements.txt
requirements.txt
 
 
rscript
rscript
 
 
simulation_service.py
simulation_service.py
 
 
testScriptAkandaMain.py
testScriptAkandaMain.py
 
 
webapp.py
webapp.py
 
 

Repository files navigation

VirtualSoc

Simulate dynamic social networks — with ground-truth labels and realistic node features — so researchers can test algorithms and theories without accessing real social-network data.

VirtualSoc is the open-source simulation library of the paper Simulation and Augmentation of Social Networks for Building Deep Learning Models. Network topology is driven by latent node preferences (the social DNA, sDNA) which double as ground-truth class labels; features, labels and structure are generated coupled together, the way they are entangled in real social networks.

The simulation suite (web UI + API)

VirtualSoc simulation suite

pip install -r requirements.txt
python webapp.py          # open http://127.0.0.1:5000

Set the number of people, preference groups, time steps (snapshots with sDNA preference drift between them) and attributes — hit Simulate — watch live progress — download the dataset. Every download is a ready-to-use research bundle:

file contents
edges_t{K}.csv undirected edge list of snapshot K (dynamic networks)
labels.csv ground-truth node labels (sDNA groups)
features_typed.json realistic attribute values per node
features_encoded.csv numeric feature matrix (GCN-ready)
stats.json per-snapshot statistics incl. per-attribute homophily

The same functionality is scriptable over HTTP — POST /api/simulate, GET /api/jobs/<id> (progress), .../result, .../download — see the docstring in webapp.py for the request format. The web layer never executes user-supplied code and enforces hard parameter limits. All generated data is simulated: it contains no real individuals and is safe to share.

Realistic, typed features

Networks can be simulated with typed real-world attributes compared by type-aware dissimilarities inside the sDNA score (see RealFeatures.py):

type example dissimilarity
numeric age, education abs. difference / range
binary / categorical gender, city match / mismatch
geo (x, y) position euclidean distance
multihot interest sets 1 − Jaccard overlap
from RealFeatures import RealFeatureSchema
from Networks import RandomSocialGraphAdvanced

schema = RealFeatureSchema.default_social()   # age, gender, city, geo,
                                              # education, interests
G = RandomSocialGraphAdvanced(labelSplit=[50, 100, 150, 200],
                              realFeatureSchema=schema,
                              useGPU=False, createInGPUMem=False)

sDNA semantics are unchanged (per-feature prefer-similar/dissimilar and weight, mutation for dynamics, labels), and every node also carries a flat numeric encoding (node.features) so exports and GCN training work as before. A custom feature is one FeatureSpec(name, kind, sampler, ...). Full example: ScriptRealFeaturesNetwork.py.

Library usage

  • Abstract-feature simulation (as in the paper): ScriptSingleNetwork.py (single network) and ScriptMultiNetwork.py (batches).
  • CuPy/CUDA is optional: without CuPy everything runs on the CPU automatically; install cupy-cuda12x to enable GPU-accelerated scoring.
  • Tests: python -m pytest tests (19 tests).

Sample generated datasets: data_sample.zip in this repo and many more on Kaggle. To compute graph statistics for generated networks, the standalone rscript is included (R, with its own dependencies; not part of the library).

The paper

A. Wahid-Ul-Ashraf, M. Budka, K. Musial, Simulation and Augmentation of Social Networks for Building Deep Learning Models, arXiv:1905.09087.

Related: the gravitational link-prediction method by the same authors has its reference implementation at AkandaAshraf/akanda-method — including the GCN augmentation from this paper evaluated on Cora.

This work comes from the author's PhD research, funded by Bournemouth University, supervised by the paper's co-authors.

About

Dynamic Social Network Simulation Data with Ground Truth Labels and Features

Topics

datadatasetdataset-generationgrandomgraphgraph-algorithmsgraph-datasetgraphsnetworknetwork-analysisnetwork-datasetnetworksnapshotsimulationsocialsocial-network-analysissocial-network-datasetsocial-network-simulationsocialnetworkdatasetssocianetworkattributes

Resources

Readme
MIT license
Activity

Stars

14 stars

Watchers

2 watching

Forks

4 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.