--- license: other library_name: khaos tags: - khaos - graph - node-embedding - gcn - self-supervised pipeline_tag: feature-extraction --- # Khaos Node Embedding A graph convolutional autoencoder that turns every node of a graph into a 128-dimensional embedding, pre-trained by reconstructing masked node features (GraphMAE style) on social, citation and page-link graphs. `graph_node_embedding` **v1**, from Khaos (a local-first library of pre-trained models for domain-specific tasks). This is the first release of the artifact. ## Model - Architecture: GCNAutoencoder: 3 graph-convolution layers (hidden 128, output 128) on dense adjacency, with a feature decoder for pre-training - Parameters: 66,112 - Format: ONNX (`model.onnx`) plus PyTorch weights (`model.pt`) and `manifest.json` - Training data: [fletxcher/khaos-graph_node_embedding](https://huggingface.co/datasets/fletxcher/khaos-graph_node_embedding) ## Results Measured on the held-out test split of the training dataset. | Metric | Value | | --- | ---: | | probe_accuracy_mean | 0.6354 | | baseline_raw_features_accuracy_mean | 0.5417 | | graphs_probed | 8 | | final_mask_loss | 0.3603 | ### Linear-probe node classification A logistic regression on the center-node embedding, compared with the same probe on the raw 64 features. `unseen graph` rows use graphs never seen in training (the probe is fit on half of their subgraphs). | Graph | Type | Classes | Embedding probe | Raw-feature probe | Majority class | | --- | --- | ---: | ---: | ---: | ---: | | citeseer | unseen graph | 6 | 0.700 | 0.550 | 0.267 | | cora | seen | 7 | 0.800 | 0.600 | 0.317 | | ogbn_arxiv | seen | 37 | 0.683 | 0.300 | 0.250 | | pubmed | seen | 3 | 0.817 | 0.817 | 0.300 | | wikics | seen | 10 | 0.733 | 0.650 | 0.167 | | wikipedia_chameleon | seen | 5 | 0.533 | 0.483 | 0.200 | | wikipedia_crocodile | seen | 5 | 0.567 | 0.667 | 0.317 | | wikipedia_squirrel | unseen graph | 5 | 0.250 | 0.267 | 0.183 | ## Training ```json { "epochs": 60, "batch": 32, "lr": 0.001, "architecture": "GCNAutoencoder" } ``` Best epoch 41, trained in 1.7 minutes on a single consumer GPU (RTX 3050 8 GB). ## Intended use Node embeddings for classification, clustering and similarity search. Input is a subgraph of at most about 64 nodes with 64-dimensional features and its adjacency. ## Limitations - Features must be reduced to the 64-dimensional layout used in training (62 SVD components, log degree, constant). - Dense adjacency: run on sampled subgraphs of at most a few hundred nodes. - Embeddings of different graphs are not aligned. ## Usage ```bash pip install khaos khaos serve ./graph_node_embedding ``` ## License This model was trained on data with research-only, share-alike or mixed terms (see the training dataset card for each source). Treat it as research use and check the upstream data licenses before any commercial use.