# selfcontrol7/korean_voice_phishing_detection architecture

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

- Interactive diagram: https://gitdiagram.com/selfcontrol7/korean_voice_phishing_detection
- Repository: https://github.com/selfcontrol7/korean_voice_phishing_detection

## Overview

##### Interactions and Data Flow
- How the processed dataset feeds into the various modeling pipelines:

- For each modeling pipeline, illustrate the internal data flow:
- For ML/DL models, indicate stages like feature extraction, model training, and performance evaluation.
- For hybrid models (Attention), mark that the model uses a blend of CNN, BiLSTM, and a FastText embedding approach.
- For KoBERT and FL, indicate that these components build on language models with potential external libraries (like HuggingFace) and possibly specialized configuration for federated training across distributed centers.

##### Architectural Patterns and Design Principles
- Separation of Concerns: Clearly show that data preprocessing is decoupled from model training.
- Modularity: Each approach (ML/DL, KoBERT, Attention, Federated) is implemented in its own module/directory, allowing for independent development and testing.
- Extensibility: Indicate possibilities for further enhancement (e.g., incorporating additional language models or federated strategies), especially noted by the presence of various experimental directories (e.g., “Multilingual_BT_approach”).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global Nodes
    RAW["Raw Audio/Transcripts"]:::raw

    subgraph "Data Layer"
        DATA_PROC["Data Collection & Preprocessing"]:::data
        DATASET["KorCCVi Dataset"]:::dataset
    end

    RAW -->|"ingestion"| DATA_PROC
    DATA_PROC -->|"processed_to"| DATASET

    subgraph "Modeling Pipelines"
        %% ML/DL Models Subgraph
        subgraph "ML/DL Models"
            ML_DL["ML/DL Models"]:::model
            subgraph "ML/DL Pipeline"
                ML_Feature["Feature Extraction"]:::model_internal
                ML_Training["Model Training"]:::model_internal
                ML_Evaluation["Performance Evaluation"]:::model_internal
            end
            ML_DL -->|"initiate"| ML_Feature
            ML_Feature -->|"proceed"| ML_Training
            ML_Training -->|"finalize"| ML_Evaluation
        end

        %% Language Models Subgraph
        subgraph "Language Models"
            KOBERT["KoBERT"]:::model
        end

        %% Hybrid/Attention-based Models Subgraph
        subgraph "Hybrid/Attention Models"
            ATTENTION["Attention-based Models"]:::model
            subgraph "Attention Pipeline"
                ATT_CNN_BiLSTM["Att-Based CNN-BiLSTM"]:::model_internal
                ATT_CNN["CNN"]:::model_internal
                ATT_BiLSTM["BiLSTM"]:::model_internal
                ATT_FastText["FastText Embedding"]:::model_internal
                ATT_Report["Performance Reports"]:::model_internal
            end
            ATTENTION -->|"process"| ATT_CNN_BiLSTM
            ATT_CNN_BiLSTM -->|"extract"| ATT_CNN
            ATT_CNN -->|"analyze"| ATT_BiLSTM
            ATT_BiLSTM -->|"embed"| ATT_FastText
            ATT_FastText -->|"report"| ATT_Report
        end

        %% Federated Learning Subgraph
        subgraph "Federated Learning"
            FEDERATED["Federated Learning"]:::model
        end
    end

    %% Data flow from Dataset to Modeling Pipelines
    DATASET -->|"feeds"| ML_DL
    DATASET -->|"feeds"| KOBERT
    DATASET -->|"feeds"| ATTENTION
    DATASET -->|"feeds"| FEDERATED

    %% Experimental/Supporting Modules
    subgraph "Experimental/Supporting"
        MULTILINGUAL["Multilingual BT Approach"]:::exp
        OPTIMIZED["Optimized Models"]:::exp
    end

    DATASET -->|"feeds"| MULTILINGUAL
    DATASET -->|"feeds"| OPTIMIZED

    %% External Tooling
    EXTERNAL["Mecab Tokenizer"]:::external
    ATTENTION -->|"uses"| EXTERNAL

    %% Click Events
    click DATA_PROC "https://github.com/selfcontrol7/korean_voice_phishing_detection/tree/main/Data_Collection_Preprocessing"
    click ML_DL "https://github.com/selfcontrol7/korean_voice_phishing_detection/tree/main/ML_DL_models"
    click KOBERT "https://github.com/selfcontrol7/korean_voice_phishing_detection/tree/main/KoBERT"
    click ATTENTION "https://github.com/selfcontrol7/korean_voice_phishing_detection/tree/main/Attention"
    click FEDERATED "https://github.com/selfcontrol7/korean_voice_phishing_detection/tree/main/Federated_Learning"
    click MULTILINGUAL "https://github.com/selfcontrol7/korean_voice_phishing_detection/tree/main/Multilingual_BT_approach"
    click OPTIMIZED "https://github.com/selfcontrol7/korean_voice_phishing_detection/tree/main/Optimized_models"

    %% Styles
    classDef raw fill:#FFD700,stroke:#333,stroke-width:2px;
    classDef data fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef dataset fill:#87CEEB,stroke:#333,stroke-width:2px;
    classDef model fill:#98FB98,stroke:#333,stroke-width:2px;
    classDef model_internal fill:#90EE90,stroke:#333,stroke-width:1px;
    classDef exp fill:#FFC0CB,stroke:#333,stroke-width:2px;
    classDef external fill:#FFA07A,stroke:#333,stroke-width:2px;
```
