A comprehensive Graph Neural Network (GNN) application for transforming tabular data into graph representations with rich feature embeddings for machine learning and network analysis.
- Araneos: A Dynamic Graph Intelligence Platform for GNN-Driven Data Modeling
This GNN-Application is a powerful tool designed for researchers and data scientists working with graph neural networks. It provides a seamless way to transform tabular data (CSV) into graph representations with rich feature embeddings that can be used for various machine learning tasks.
The application consists of:
- A Python backend that handles data processing, graph construction, and feature embedding generation
- A React frontend that provides an intuitive interface for data upload, graph configuration, and visualization
- Integration with PyTorch Geometric for implementing various GNN architectures
Whether you're exploring network structures, analyzing relationships in your data, or developing new GNN models, this application provides the tools you need to streamline your workflow.
- Dynamic Graph Construction: Convert CSV data into graph structures with configurable node and relationship mappings
- Advanced Feature Engineering: Generate rich feature embeddings using techniques like BERT, GloVe, or Word2Vec
- Interactive Visualization: Explore and manipulate graph structures through an intuitive React interface
- Multiple GNN Architectures: Implement and experiment with various GNN models including GCN, GraphSAGE, GAT, and more
- Customizable Processing Pipeline: Configure preprocessing steps, embedding methods, and dimensionality reduction techniques
- Real-time Graph Manipulation: Edit nodes, create relationships, and see changes reflected instantly
- Data Export Options: Download processed graph data in various formats for further analysis
The following diagram illustrates the overall system architecture, showing how the frontend and backend components interact:
flowchart TB
subgraph Frontend["Frontend (React)"]
UI[User Interface]
FC[File Component]
GC[Graph Configuration]
VZ[Visualization]
API[API Client]
end
subgraph Backend["Backend (FastAPI)"]
EP[API Endpoints]
DP[Data Processing]
GG[Graph Generation]
FE[Feature Embedding]
TG[PyTorch Geometric]
end
UI --> FC
FC --> GC
GC --> API
API --> EP
EP --> DP
DP --> GG
GG --> FE
FE --> TG
TG --> EP
EP --> API
API --> VZ
VZ --> UI
style Frontend fill:#61DAFB20,stroke:#61DAFB
style Backend fill:#EE4C2C20,stroke:#EE4C2C
The diagram below shows the data flow through the GNN application, from file upload to graph visualization:
flowchart LR
CSV[CSV Upload] --> DP[Data Parsing]
DP --> NC[Node Configuration]
NC --> RC[Relationship Configuration]
RC --> FG[Feature Generation]
subgraph Feature Engineering
FG --> TE[Text Embedding]
FG --> NE[Numerical Encoding]
FG --> CE[Categorical Encoding]
TE & NE & CE --> DR[Dimensionality Reduction]
end
DR --> GC[Graph Construction]
GC --> GNN[GNN Processing]
GNN --> VIS[Visualization]
style Feature Engineering fill:#00968820,stroke:#009688
- Python (v3.10.11)
- FastAPI: Modern, high-performance web framework
- PyTorch & PyTorch Geometric: Deep learning framework with GNN extensions
- NetworkX: Graph creation and manipulation
- Pandas: Data processing and manipulation
- Transformers: BERT and other embedding models
- Scikit-learn: Machine learning utilities
- UMAP: Dimensionality reduction
- React: UI library for building interactive interfaces
- React Flow: Interactive node-based UI
- D3.js: Data visualization library
- Material UI: Component library for modern UI design
- PapaParse: CSV parsing
- React Force Graph: Graph visualization
- Axios: HTTP client for API requests
- Python 3.10.11
- Node.js (v14+)
- Git
-
Clone the repository:
git clone https://github.com/MaLoskins/GNN-Application.git cd GNN-Application -
Create and activate a virtual environment:
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install backend dependencies:
cd backend pip install -r requirements.txt
-
Navigate to the frontend directory:
cd ../frontend -
Install frontend dependencies:
npm install
-
Start the backend server:
# From the backend directory uvicorn main:app --host 0.0.0.0 --port 8000 -
In a separate terminal, start the frontend development server:
# From the frontend directory npm start -
Open your browser and navigate to
http://localhost:3000
- Upload Data: Use the file uploader to import your CSV data
- Configure Graph: Select which columns should be treated as nodes and define relationships between them
- Feature Configuration: Enable advanced feature creation and select embedding methods (BERT, GloVe, Word2Vec)
- Process Graph: Send your configuration to the backend for processing
- Visualize & Analyze: Explore the resulting graph through the interactive visualization
- Export Results: Download the processed graph data for further analysis or use in GNN models
GNN-Application/
βββ backend/ # Python backend
β βββ data/ # Sample datasets
β βββ tests/ # Backend tests
β βββ DataFrameToGraph.py # CSV to graph conversion
β βββ FeatureSpaceCreator.py # Feature embedding generation
β βββ TorchGeometricGraphBuilder.py # PyTorch Geometric integration
β βββ main.py # FastAPI server
β βββ requirements.txt # Python dependencies
β
βββ frontend/ # React frontend
βββ src/
β βββ components/ # React components
β β βββ GraphNet-Tab/ # Graph visualization components
β βββ hooks/ # Custom React hooks
β βββ styles/ # CSS styles
β βββ App.js # Main application component
β βββ index.js # Application entry point
βββ package.json # Node.js dependencies
Matthew Haskins
University of Western Australia
This project is designed to facilitate research and development in the field of Graph Neural Networks. If you have any questions or suggestions, please feel free to reach out through any of the channels above.
