Skip to content

EkleTony/Graph-Sketch

Repository files navigation

GraphSketch: Real-Time Anomaly Detection in Dynamic Graphs

GraphSketch is a memory-efficient anomaly detection system for dynamic graph streams. It leverages Count-Min Sketch with Conservative Update (CMSCU) to enable scalable, real-time anomaly detection under strict memory constraints.

This work was presented and published at IEEE ICKG 2025.

📄 Read the Paper (arXiv)

GraphSketch Framework Overview

GraphSketch Framework

Figure 1: End-to-end pipeline for streaming edge ingestion, multi-layer hashing, 3D tensor sketch construction (CMSCU), temporal decay with sliding windows, and Bayesian threshold-based anomaly detection.

Features

  • Streaming anomaly detection for large graphs
  • Low-memory footprint using Count-Min Sketch
  • Scalable & efficient processing
  • Flexible dataset support, including DARPA and custom data.

Project Structure

GraphSketch/
│── src/                   # Source files
│   ├── GraphSketchCMS.hpp   # Count-Min Sketch implementation
│   ├── GraphSketchCore.hpp  # Core anomaly detection
│   ├── GraphSketchFiltering.hpp  # Filtering logic
│   ├── main.cpp             # Program entry
│── data/                   # Dataset folder
│   ├── DARPA/              # DARPA datasets
│── README.md               # Documentation
│── graphsketch             # Compiled executable

Build & Run

Installation & Build

Prerequisites

  • C++11 or later
  • CMake
  • A C++ compiler (GCC, Clang, or MSVC)

Steps

cd GraphSketchProject
g++ -o graphsketch src/*.cpp -std=c++11
./graphsketch 

### Running the Program
```sh
./graphsketch data/DARPA/darpa_edges.csv

Contributing

Pull requests are welcome!

License

Apache License 2.0

References & Acknowledgments

GraphSketch is inspired by MIDAS (Microcluster-Based Detector of Anomalies in Edge Streams), an anomaly detection framework for streaming graphs. 📄 Read the Paper

📂 GitHub Repository

We acknowledge the contributions of MIDAS, as GraphSketch extends and builds upon their ideas with Count-Min Sketch with Conservative Update (CMSCU), Bayesian inference, and dynamic thresholding.

About

Real-time graph anomaly detection using CMSCU and Bayesian thresholding. Published at IEEE ICKG 2025.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors