How ogunlao/saint works
Main Components
a) Data Processing Layer:
• Data input flow starting from raw tabular data
• Preprocessing components (z-transform, label encoding)
• Data segregation (categorical vs. numerical columns)
b) Model Architecture Layer:
• Three main model variants: SAINT, SAINT-I (Intersample), and SAINT-S
• Embedding layer for categorical and numerical features
• Transformer architecture components
• Attention mechanisms (Self-attention and Intersample attention)
c) Training Components:
• Supervised learning path
• Self-supervised learning path
• Loss functions (Contrastive Loss, Denoising Loss)
• Data augmentation methods (Mixup, CutMix)
Component Relationships
[Raw Data] → [Preprocessing] → [Data Loader] → [Model Architecture] → [Training Loop] → [Predictions]
Specific Implementation Details
• Configuration Management (Hydra)
• Training Framework (PyTorch Lightning)
• Model Variants (SAINT, SAINT-I, SAINT-S)
• Data Augmentation Techniques
• Loss Functions
Key Elements to Highlight
a) Data Flow:
• How data moves from raw input through preprocessing
• Split between categorical and numerical features
• How data augmentation is applied
b) Model Architecture:
• Embedding layer structure
• Transformer architecture
• Attention mechanism flow
c) Training Flow:
• Separate paths for supervised and self-supervised training
• How loss functions are integrated
• Validation and prediction paths
Technical Details
• Input Layer: Show categorical and numerical feature handling
• Embedding Layer: Indicate separate embeddings for different feature types
• Transformer Block: Show self-attention and intersample attention mechanisms
• Output Layer: Show classification head
Implementation Notes
configs/ → Data and experiment configurations
models/ → Model implementations
src/ → Core functionality
utils/ → Helper functions