Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNN Model with 93% Accuracy for Facebook Page-Page Network Node Classification with TSNE Visualization #169

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

liammulhern
Copy link

GNN Model with 93% Accuracy for Facebook Page-Page Network Node Classification with TSNE Visualization

This project introduces a multi-layer graph neural network (GNN) for semi-supervised, multi-class node classification on the Facebook Large Page-Page Network dataset, achieving 93.14% accuracy. The network classifies nodes (representing Facebook pages) into four categories: Politicians, Government Organizations, Television Shows, and Companies.

Key features of PR:

Modules:

  • dataset.py: Loads and preprocesses data.
  • main.py: CLI for training and inference.
  • modules.py: Defines GNN architecture.
  • train.py: Manages training, validation, and metric logging.
  • predict.py: Runs model inference and visualizations.

Execution:

Supports training (--train --save --load), inference (--inference <index>), and visualization (--display) through CLI.

GNN Architecture:

  1. Uses multilayer perceptrons (MLPs) and sparse layers, transforming node features into learned embeddings for classification.
  2. Incorporates ReLU activation and log softmax for output.

Training:

  • Learning Rate: 1e-4
  • Epochs: 100
  • Optimizer: Adam
  • Loss: Cross-Entropy

Results:

Achieves 93.14% accuracy; training and validation metrics show potential overfitting.
TSNE visualizations show clearer clustering post-training, indicating successful categorization.

@gayanku
Copy link
Collaborator

gayanku commented Nov 4, 2024

This is an initial inspection, no action is required at this point
GNN FB Page-Page Network dataset ---- Normal Difficulty

Category Marks Comments
Algorithm solves the problem 5 4.5 Some overfitting seen. No early stop
Implementation functions as intended 3 3 2 layer GCN, torch_geometric/GCNConv
Good design 1 1 Modular, Reusable
Commenting 1 1 Meaningful docstrings and comments
Algorithm above Normal Difficulty 5 5
Algorithm is Hard difficulty 5 0 Normal Difficulty
Section IV : Max mark 15 from 20 14.5

TSNE / UMAP:
Good, though would have expected to see a bit more separation at the reported accuracy.

  • Discussion: Good, with a bit more depth useful.

Suggestions:
Redundant code in repo - SparseLayer. Is this needed?
Also doc mentions the use of the sparse layer, though the implemented model does not use this layer.
Code can have some early stop, ex: train loop should save best model by keeping track of current best accuracy.
Could add a hyper parameter search or discuss how the values were obtained.

@gayanku
Copy link
Collaborator

gayanku commented Nov 13, 2024

Marking

Good/OK/Fair Practice (Design/Commenting, TF/Torch Usage)
Adequate design and implementation. Redundant code in repo - SparseLayer. -1
Spacing and comments.
Header blocks.
Recognition Problem
OK solution to problem. Some overfitting seen. No early stop-2
Driver Script present.
File structure present.
Good Usage & Demo & Visualisation & Data usage.
Module present.
Commenting present.
No Data leakage found.
Difficulty : Normal. GNN Task.-5
Commit Log
Good Meaningful commit messages.
Good Progressive commits.
Documentation
Readme :Good.
Model/technical explanation :Acceptable. -1
Description and Comments :Good.
Markdown used and PDF NOT submitted. -2
Pull Request
Successful Pull Request (Working Algorithm Delivered on Time in Correct Branch). -2
Feedback action required: Feedback marks possible +2 if the requested changes are made. Update PR to correct branch. -2
Request Description is good.
TOTAL-15

Marked as per the due date and changes after which aren't necessarily allowed to contribute to grade for fairness.
Subject to approval from Shakes

@gayanku gayanku added Preliminary Grade To be confirmed after review. help wanted Extra attention is needed Feedback Needed Feedback needed for completion. labels Nov 13, 2024
@gayanku
Copy link
Collaborator

gayanku commented Nov 13, 2024

Feedback marks possible +2 if the requested changes are made (see above).

@shakes76 shakes76 added Completed and removed help wanted Extra attention is needed labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BB Completed Feedback Needed Feedback needed for completion. _GNN Preliminary Grade To be confirmed after review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants