Spaces:
Running on Zero
Running on Zero
File size: 2,222 Bytes
d686612 ee07e36 d686612 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | # EpiADR-Net Architectural Blueprint & Tensor Operations
This document outlines the detailed tensor dimensions, layer specifications, and mathematical operations across the EpiADR-Net neural pipeline.
---
## 📐 Tensor Operations Map
```
Input SMILES String
│
▼
Atom Feature Extraction ─────────► Node Matrix X : [N, 5]
Edge Connectivity ─────────► Edge Index E : [2, M]
GTEx Tissue Profile ─────────► Tissue Vector V: [B, 128]
│
▼
Linear Input Projection ─────────► h_0 : [N, 128]
│
▼
4-Layer GAT Backbone ─────────► h_4 : [N, 128]
Attention α_4 : [M]
│
▼
FiLM Modulation Layer ─────────► γ, β : [B, 128] -> [N, 128]
h_conditioned : [N, 128]
│
▼
Dual Graph Pooling ─────────► [Mean || Max] : [B, 256]
│
▼
10-Class Classification ─────────► Logits : [B, 10]
Probabilities μ : [B, 10]
Uncertainty σ : [B, 10]
```
---
## 🔬 Layer Specifications
| Layer Name | Input Shape | Output Shape | Parameters / Operations |
| :--- | :--- | :--- | :--- |
| **Input Linear** | `[N, 5]` | `[N, 128]` | $W_{\text{in}} \in \mathbb{R}^{5 \times 128}$, Bias |
| **GAT Layer 1-4** | `[N, 128]` | `[N, 128]` | $W_{\text{gat}} \in \mathbb{R}^{128 \times 128}, a \in \mathbb{R}^{256 \times 1}$, LeakyReLU |
| **Gene Pathway Cross-Attn**| `[N, 1536]` | `[N, 1536]` | $\text{MultiHeadCrossAttn}(\mathbf{Q}_{1536}, \mathbf{K}_{1024}, \mathbf{V}_{1024})$ |
| **FiLM Residual Update** | `[N, 1536]` | `[N, 1536]` | $h_i^{\text{cond}} = h_i \odot (1.0 + \gamma_{\text{nodes}}) + \beta_{\text{nodes}}$ |
| **Dual Graph Pool**| `[N, 128]` | `[B, 256]` | MeanPool `[B, 128]` \|\| MaxPool `[B, 128]` |
| **Classifier FC1** | `[B, 256]` | `[B, 128]` | Linear(256->128), ReLU, Dropout(0.2) |
| **Classifier FC2** | `[B, 128]` | `[B, 10]` | Linear(128->10) |
|