{"id":21107567,"url":"https://github.com/lbp2563/graph-classification-using-graph-convolutional-network-gcn-","last_synced_at":"2026-04-14T15:33:19.555Z","repository":{"id":247991869,"uuid":"827444006","full_name":"Lbp2563/GRAPH-CLASSIFICATION-USING-GRAPH-CONVOLUTIONAL-NETWORK-GCN-","owner":"Lbp2563","description":"This project implements a Graph Convolutional Network (GCN) using PyTorch Geometric for graph classification. The model is trained on the MUTAG dataset, which consists of chemical compounds labeled according to their mutagenicity.","archived":false,"fork":false,"pushed_at":"2024-07-18T06:06:28.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-01T16:33:44.156Z","etag":null,"topics":["compound-components","keras","mutagen-synthesis","neural-network","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lbp2563.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-11T16:54:21.000Z","updated_at":"2024-07-18T06:06:32.000Z","dependencies_parsed_at":"2024-07-11T19:27:48.442Z","dependency_job_id":"08799c6f-75f0-473e-83d3-7ca000689dd4","html_url":"https://github.com/Lbp2563/GRAPH-CLASSIFICATION-USING-GRAPH-CONVOLUTIONAL-NETWORK-GCN-","commit_stats":null,"previous_names":["lbp2563/graph-classification-using-graph-convolutional-network-gcn-"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lbp2563/GRAPH-CLASSIFICATION-USING-GRAPH-CONVOLUTIONAL-NETWORK-GCN-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lbp2563%2FGRAPH-CLASSIFICATION-USING-GRAPH-CONVOLUTIONAL-NETWORK-GCN-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lbp2563%2FGRAPH-CLASSIFICATION-USING-GRAPH-CONVOLUTIONAL-NETWORK-GCN-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lbp2563%2FGRAPH-CLASSIFICATION-USING-GRAPH-CONVOLUTIONAL-NETWORK-GCN-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lbp2563%2FGRAPH-CLASSIFICATION-USING-GRAPH-CONVOLUTIONAL-NETWORK-GCN-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lbp2563","download_url":"https://codeload.github.com/Lbp2563/GRAPH-CLASSIFICATION-USING-GRAPH-CONVOLUTIONAL-NETWORK-GCN-/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lbp2563%2FGRAPH-CLASSIFICATION-USING-GRAPH-CONVOLUTIONAL-NETWORK-GCN-/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31803424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compound-components","keras","mutagen-synthesis","neural-network","tensorflow"],"created_at":"2024-11-20T00:40:50.505Z","updated_at":"2026-04-14T15:33:19.539Z","avatar_url":"https://github.com/Lbp2563.png","language":"Jupyter Notebook","readme":"# Graph Classification using Graph Convolutional Network (GCN)\n\n## Introduction\nThis project implements a Graph Convolutional Network (GCN) using PyTorch Geometric for graph classification. The model is trained on the MUTAG dataset, which consists of chemical compounds labeled according to their mutagenicity.\n\n## Dataset\nThe MUTAG dataset is a collection of nitroaromatic compounds aimed at predicting their mutagenicity on *Salmonella typhimurium*. The dataset includes 188 samples of chemical compounds with 7 discrete node labels. The dataset files include:\n\n1. **DS_A.txt**: Sparse (block diagonal) adjacency matrix for all graphs.\n2. **DS_graph_indicator.txt**: Column vector of graph identifiers for all nodes of all graphs.\n3. **DS_graph_labels.txt**: Class labels for all graphs in the dataset.\n4. **DS_node_labels.txt**: Column vector of node labels.\n\nOptional files, if available:\n- **DS_edge_labels.txt**: Labels for the edges.\n- **DS_edge_attributes.txt**: Attributes for the edges.\n- **DS_node_attributes.txt**: Matrix of node attributes.\n- **DS_graph_attributes.txt**: Regression values for all graphs in the dataset.\n\n### Node Labels\n- 0: Carbon (C)\n- 1: Nitrogen (N)\n- 2: Oxygen (O)\n- 3: Fluorine (F)\n- 4: Iodine (I)\n- 5: Chlorine (Cl)\n- 6: Bromine (Br)\n\n### Edge Labels\n- 0: Aromatic\n- 1: Single\n- 2: Double\n- 3: Triple\n\n## Model Architecture\nThe Graph Convolutional Network (GCN) is designed with the following components:\n1. Input: Node features, edge index, and batch information.\n2. Layers:\n   - Three Graph Convolutional layers with ReLU activation function.\n   - Global Mean Pooling layer.\n   - Dropout layer (p=0.5).\n   - Linear classifier.\n\n### Algorithm\nThe GCN algorithm operates on graph-structured data:\n1. Input node features, edge indices, and batch information.\n2. Perform graph convolution using multiple GCN layers.\n3. Aggregate node-level features into a fixed-size representation for each graph using global pooling.\n4. Apply a linear classifier to predict the output class probabilities.\n\n## Training\n- **Optimizer**: Adam optimizer with learning rate 0.01.\n- **Loss Function**: Cross-Entropy Loss.\n- **Procedure**:\n  - Iterate over the training dataset in batches.\n  - Perform forward pass.\n  - Compute loss.\n  - Backpropagate gradients.\n  - Update parameters.\n\n## Testing\n- Evaluate the model on both training and test datasets.\n- Compute accuracy as the ratio of correct predictions to the total number of samples.\n\n## Code Structure\n1. **Data Loading**:\n   - Load MUTAG dataset using PyTorch Geometric.\n   - Split the dataset into training and test sets.\n2. **Model Definition**:\n   - Define the GCN model architecture using PyTorch Geometric.\n3. **Training and Evaluation**:\n   - Train the model using the training dataset.\n   - Evaluate the model on both training and test datasets.\n   - Display training and test accuracies for each epoch.\n\n## Results\n- **Training Accuracy**: 0.7933\n- **Test Accuracy**: 0.7632\n\n## References\nDebnath, A. K., Lopez de Compadre, R. L., Debnath, G., Shusterman, A. J., \u0026 Hansch, C. (1991). Structure-activity relationship of mutagenic aromatic and heteroaromatic nitro compounds. Correlation with molecular orbital energies and hydrophobicity. *Journal of Medicinal Chemistry*, 34(2), 786-797.\n\n## Dataset Link\n[MUTAG Dataset](https://paperswithcode.com/dataset/mutag)\n\n## Author\n\n[Krishi Desai](https://github.com/krishi-03)\n[Lakshit Pathak](https://github.com/Lakshit-25)\n[Lakshin Pathak](https://github.com/Lbp2563)\n\n## License\n\nThis project is licensed under the MIT License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbp2563%2Fgraph-classification-using-graph-convolutional-network-gcn-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbp2563%2Fgraph-classification-using-graph-convolutional-network-gcn-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbp2563%2Fgraph-classification-using-graph-convolutional-network-gcn-/lists"}