# 2333liubin/attsioff architecture

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

- Interactive diagram: https://gitdiagram.com/2333liubin/attsioff
- Repository: https://github.com/2333liubin/attsioff

## Overview

##### Project type and purpose
- This is a Python–based machine-learning research prototype for siRNA design, using a self-attention model to predict both inhibitory efficacy and off-target effects.
- Key indicators:
- Files named load_data.py, model.py, train.py, utils.py
- README title “AttSiOff: a self-attention-based approach on siRNA design with inhibition and off-target effect prediction.”

##### File structure
- All code is at the top level (no nested folders), indicating a simple pipeline-based layout:
- load_data.py: dataset loading and preprocessing
- model.py: definition of the self-attention architecture
- train.py: orchestration of training, validation, and potentially checkpointing
- utils.py: helper functions (metrics, logging, argument parsing, etc.)
- No explicit config directory, suggesting hyperparameters may be hard-coded or passed via command-line arguments.

##### Extract additional insights from the README
- Although brief, it makes clear the dual objectives:
- Predict inhibitory potency of candidate siRNA
- Predict and avoid off-target binding
- Datasets are available on request, so data ingestion is a core step.

##### Elements
Raw Data → Data Loader → Preprocessor → Batch Generator → Model → Loss & Metrics → Trainer → Checkpoint
Model → Inference → Predictions
- Data components (blue)
- Model component (green)
- Training controller (orange)
- Utilities & Logging (grey)
- Inference/Deployment (purple)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Project Overview"
        README["README.md"]:::docs
    end

    RawData["Raw siRNA Data (FASTA/CSV)"]:::data
    Load["Data Loader\n(load_data.py)"]:::data
    Preproc["Preprocessor"]:::data
    Batch["Batch Generator"]:::data
    Model["Self-Attention Model\n(model.py)"]:::model
    Trainer["Training Pipeline\n(train.py)"]:::train
    Utils["Utilities & Helpers\n(utils.py)"]:::utils
    Checkpoint["Checkpoint Storage"]:::train
    Inference["Inference Script"]:::inference
    Predictions["Predictions"]:::inference

    README --> RawData
    RawData -->|"FASTA/CSV"| Load
    Load -->|"tensors"| Preproc
    Preproc -->|"batches"| Batch
    Batch -->|"input tensors"| Model
    Model -->|"logits"| Trainer
    Trainer -->|"loss & metrics"| Model
    Trainer -->|"uses metrics & logging"| Utils
    Trainer -->|"saves model"| Checkpoint
    Checkpoint -->|"loads model"| Inference
    Inference -->|"predictions"| Predictions

    click Load "https://github.com/2333liubin/attsioff/blob/main/load_data.py"
    click Model "https://github.com/2333liubin/attsioff/blob/main/model.py"
    click Trainer "https://github.com/2333liubin/attsioff/blob/main/train.py"
    click Utils "https://github.com/2333liubin/attsioff/blob/main/utils.py"
    click README "https://github.com/2333liubin/attsioff/blob/main/README.md"

    classDef data fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef model fill:#90EE90,stroke:#333,stroke-width:1px
    classDef train fill:#FFA500,stroke:#333,stroke-width:1px
    classDef utils fill:#D3D3D3,stroke:#333,stroke-width:1px
    classDef inference fill:#DDA0DD,stroke:#333,stroke-width:1px
    classDef docs fill:#FFFFE0,stroke:#333,stroke-width:1px
```
