# gauravbh1010tt/deeplearn architecture

> Architecture diagram of the GitHub repository gauravbh1010tt/deeplearn, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gauravbh1010tt/deeplearn
- Repository: https://github.com/gauravbh1010tt/deeplearn

## Overview

This DeepLearn repository is a multi-project research hub for deep learning, NLP, CV, and ML implementations. Each project folder corresponds to a research paper’s experimental code – from attention-based CNNs (ABCNN) for sentence matching to Siamese LSTM models for sentence similarity, and even specialized models like CorrNet, neural tensor networks, and fake news stance identification. The overall design is modular: each project is self-contained with its own main script, model definitions, and dependency listing, while shared code and utilities (under _deeplearn_utils) support data processing, feature extraction, and deep learning layer definitions.

##### Main components
- Projects/Experiments: Represent each research implementation as a separate module. For example:
- Attention_Based_CNN (ABCNN)
- Attention_recurrent_models
- CorrNet
- MaLSTM (Siamese)
- TrecQA_CNN+Sim
- WikiQA_CNN+Feat
- convolution neural tensor network
- corrMCNN
- neural tensor network
- fake news challenge (FNC-1)
- Shared Utility Modules: Capture the _deeplearn_utils folder that includes:
- Extracted Features (for different datasets such as Trec and WikiQA)
- Data directories holding training and test CSV/TSV files, numpy arrays, and pickle files
- Deep learning layers and text utilities (dl_layers, dl_text, various utility scripts)
- External Dependencies and Integrations:
- Requirements.txt files that list dependencies for each project
- The use of external modules such as DL-text (as noted in the README) that prepare datasets and possibly handle other NLP utilities.

##### Out the relationships and interactions
- Each project (represented as its own component) has a “main.py” that drives the execution. This, in turn, calls the corresponding model definition (for example, model_abcnn.py, model_Siam_LSTM.py, etc.).
- Data flow starts from the raw data files present under _deeplearn_utils/data. They are pre-processed (possibly via scripts in dl_text or utility scripts) and then fed into model training and evaluation pipelines in the project modules.
- Each project’s configuration (requirements.txt, README instructions) aligns with external deep learning libraries, so denote dependency flow (external libraries → projects).

##### Architectural Patterns/Design Principles
- Modularity: Each experiment is encapsulated in its own directory, adhering to separation-of-concerns.
- Reusability: The _deeplearn_utils module is designed to be reused across different implementations.
- Experiment Isolation: By utilizing separate main scripts and requirements for each research paper implementation, the design supports concurrent experimentation with differing architectures and models.
- Data Pipeline: There is a distinct flow from raw data to extracted features and then model ingestion, supporting a clear separation between data handling and model computation.

- Experiment modules (e.g., rounded rectangles for projects)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Dependencies
    subgraph "External Dependencies"
        ED["External Libraries<br/>(DL-text, NumPy, etc.)"]:::external
    end

    %% Shared Utility Modules
    subgraph "Shared Utility Modules"
        U0["Shared Utility Modules (_deeplearn_utils)"]:::utility
        UT1["Raw Data (CSV/TSV, Pickles)"]:::utility
        UT2["Feature Extraction"]:::utility
        UT3["Deep Learning Layers"]:::utility
        UT4["Text Utilities"]:::utility
    end

    %% Research Projects / Experiments
    subgraph "Research Projects/Experiments"
        P1["Attention_Based_CNN (ABCNN)"]:::experiment
        P2["Attention_recurrent_models"]:::experiment
        P3["CorrNet"]:::experiment
        P4["MaLSTM (Siamese)"]:::experiment
        P5["TrecQA_CNN+Sim"]:::experiment
        P6["WikiQA_CNN+Feat"]:::experiment
        P7["convolution neural tensor network"]:::experiment
        P8["corrMCNN"]:::experiment
        P9["fake news challenge (FNC-1)"]:::experiment
        P10["neural tensor network"]:::experiment
    end

    %% Connections among Shared Utility Modules
    U0 --> UT1
    U0 --> UT2
    U0 --> UT3
    U0 --> UT4
    UT1 -->|"preprocess"| UT2

    %% Data flow: Shared Utilities to Projects
    UT2 -->|"features"| P1
    UT2 -->|"features"| P2
    UT2 -->|"features"| P3
    UT2 -->|"features"| P4
    UT2 -->|"features"| P5
    UT2 -->|"features"| P6
    UT2 -->|"features"| P7
    UT2 -->|"features"| P8
    UT2 -->|"features"| P9
    UT2 -->|"features"| P10

    %% External Dependencies to Projects (dependency injection)
    ED -->|"libraries"| P1
    ED -->|"libraries"| P2
    ED -->|"libraries"| P3
    ED -->|"libraries"| P4
    ED -->|"libraries"| P5
    ED -->|"libraries"| P6
    ED -->|"libraries"| P7
    ED -->|"libraries"| P8
    ED -->|"libraries"| P9
    ED -->|"libraries"| P10

    %% Styling Classes
    classDef external fill:#ffcccc,stroke:#cc0000,stroke-width:2px;
    classDef utility fill:#ccffcc,stroke:#008800,stroke-width:2px;
    classDef experiment fill:#ccccff,stroke:#0000cc,stroke-width:2px;

    %% Click Events for Projects / Utility
    click U0 "https://github.com/gauravbh1010tt/deeplearn/tree/master/_deeplearn_utils/"
    click P1 "https://github.com/gauravbh1010tt/deeplearn/tree/master/Attention_Based_CNN (ABCNN)/"
    click P2 "https://github.com/gauravbh1010tt/deeplearn/tree/master/Attention_recurrent_models/"
    click P3 "https://github.com/gauravbh1010tt/deeplearn/tree/master/CorrNet/"
    click P4 "https://github.com/gauravbh1010tt/deeplearn/tree/master/MaLSTM (Siamese)/"
    click P5 "https://github.com/gauravbh1010tt/deeplearn/tree/master/TrecQA_CNN+Sim/"
    click P6 "https://github.com/gauravbh1010tt/deeplearn/tree/master/WikiQA_CNN+Feat/"
    click P7 "https://github.com/gauravbh1010tt/deeplearn/tree/master/convolution neural tensor network/"
    click P8 "https://github.com/gauravbh1010tt/deeplearn/tree/master/corrMCNN/"
    click P9 "https://github.com/gauravbh1010tt/deeplearn/tree/master/fake news challenge (FNC-1)/"
    click P10 "https://github.com/gauravbh1010tt/deeplearn/tree/master/neural tensor network/"
```
