A comprehensive Python package for systematic exploration of autoencoder latent space discrimination capabilities across different datasets and architectures.
This project investigates how autoencoder neural networks represent different types of images and geometric features in latent space. The primary research goals are to:
- Understand latent space discrimination capabilities
- Determine when latent space breaks down for specific features
- Identify minimum latent features needed for effective discrimination
- Analyze how incrementally complex features are encoded
Phase 0: Migration from Jupyter Notebook to Python Package
- โ TaskMaster-AI project management initialized
- โ Git repository setup with comprehensive .gitignore
- โ GitHub repository created and connected
- โ Development environment configured
- โ Python package structure created
- ๐ Data module implementation (in progress)
notebook_mcp tools to prevent corruption:
- NEVER use standard file editing tools on
.ipynbfiles - ALWAYS use notebook_mcp tools for reading, editing, and creating notebooks
- Investigate notebook issues independently using available MCP tools
- File Operations: Create, delete, rename notebooks
- Cell Operations: Add, edit, delete, move, split, merge cells
- Content Reading: Read cells, metadata, outputs
- Validation: Validate notebook structure
- Export: Convert to other formats
- Use notebooks as interfaces to the
autoencoder_libpackage - Keep core logic in Python modules, not notebook cells
- Import and use package functions rather than defining in notebooks
- Maintain clean separation between package code and notebook interface
See .cursor/rules/jupyter-notebook-mcp.mdc for complete guidelines.
- Python 3.9+ (Anaconda recommended)
- Git
- GitHub account
-
Clone the repository:
git clone https://github.com/Zanzagar/AutoEncoder_Experimentation.git cd AutoEncoder_Experimentation -
Create and activate virtual environment:
# Windows python -m venv venv venv\Scripts\activate # macOS/Linux python -m venv venv source venv/bin/activate
-
Install dependencies:
pip install --upgrade pip pip install -r requirements.txt
-
Verify installation:
python -c "import torch, numpy, matplotlib; print('Environment setup successful!')"
- Machine Learning: PyTorch, NumPy, Scikit-learn
- Visualization: Matplotlib, Seaborn, Plotly
- Data Processing: Pandas, H5PY
- Development: Jupyter, Black, Flake8, Pytest
- Dimensionality Reduction: UMAP, t-SNE
AutoEncoder_Experimentation/
โโโ autoencoder_lib/ # Python package (to be created)
โ โโโ data/ # Dataset generation and loading
โ โโโ models/ # Autoencoder architectures
โ โโโ experiment/ # Training and evaluation
โ โโโ visualization/ # Plotting and analysis
โ โโโ utils/ # Helper functions
โโโ notebooks/ # Jupyter interface notebooks
โโโ scripts/ # Utility scripts and PRD
โโโ tasks/ # TaskMaster-AI task management
โโโ results/ # Experiment outputs
โโโ tests/ # Unit tests
- Geological Patterns: Layered geological structures with varying complexity
consistent_layers/: Regular geological patternsvariable_layers/: Irregular geological patterns
The framework is designed to handle any generic dataset with the following capabilities:
- Automatic dataset generation with visualization
- t-SNE projection analysis
- Class-based example visualization
- Configurable complexity levels
- BasicAutoEncoder: Simple encoder-decoder structure
- ConvolutionalAutoEncoder: CNN-based architecture for image data
- VariationalAutoEncoder: VAE for probabilistic latent representations
- DeepAutoEncoder: Multi-layer deep architecture
- Generic architecture interface
- Configurable latent dimensions
- Modular encoder/decoder components
- Support for custom architectures
The existing workflow consists of 5 sequential code blocks:
- Dataset Generation: Creates datasets with visualization and class examples
- Dataset Visualization: t-SNE projection of input datasets
- Model Definitions: Autoencoder architectures and dataset handling
- Experiment Execution: Systematic exploration with specified parameters
- Results Loading: Retrieval and visualization of saved experiments
- Dataset Generation Wrapper: Generate any generic dataset with visualization
- Dataset Visualization Wrapper: t-SNE projection and dataset analysis
- Experiment Runner Wrapper: Systematic exploration of autoencoder models
- Results Loader Wrapper: Load and visualize results from saved experiments
- Learning Rate: Optimizer learning rate
- Architectures: List of autoencoder architectures to test
- Random Seed: Consistent reproducibility
- Latent Dimensions: Range of latent space dimensions
- Dataset Path: Input dataset location
- Output Directory: Results storage location
- Dataset class examples
- t-SNE projections
- Training/validation loss curves
- Reconstruction quality comparisons
- Latent space analysis
- Performance grids
- Identical visualizations between run and load operations
- Consistent random seeds for reproducibility
- Same image selection for reconstruction examples
- Unified color schemes and layouts
- t-SNE projections use different seeds between run and load operations
- Training/test reconstruction visualizations show different images
- Performance grid missing training data (currently only shows test data)
- Run vs load visualizations are inconsistent
- Never commit directly to main branch
- Use feature branches:
feature/module-name - Create pull requests for all merges
- Follow commit message conventions
feature/migrate-data-module: Data module migrationfeature/migrate-models-module: Models module migrationfeature/migrate-experiment-module: Experiment module migrationfeature/migrate-visualization-module: Visualization module migrationbugfix/visualization-consistency: Fix visualization issues
- All development in Python files within
autoencoder_libpackage - Jupyter notebooks serve only as clean interfaces
- Preserve 100% of current functionality
- Fix visualization consistency issues
- Maintain reproducibility
This project uses TaskMaster-AI for project management:
- Comprehensive task breakdown and tracking
- AI-powered task complexity analysis
- Dependency management
- Progress monitoring
MIT License - see LICENSE file for details.
- Repository: https://github.com/Zanzagar/AutoEncoder_Experimentation
- Issues: https://github.com/Zanzagar/AutoEncoder_Experimentation/issues
- TaskMaster-AI: Integrated project management system
- โ Preserve 100% of current functionality
- ๐ Fix visualization consistency issues between run and load operations
- ๐ Support any generic dataset and autoencoder architecture
- ๐ Implement high-level parameter configuration
- ๐ Create clean, maintainable Python package structure
- Reproducibility: Consistent visualizations with explicit seed management
- Generalization: Abstract interfaces for datasets and architectures
- Maintainability: Modular code structure for future development
- Usability: Simple, intuitive interface for complex experiments
This project uses TaskMaster-AI for systematic task management:
- 15 main tasks organized by priority and dependencies
- AI-powered complexity analysis for task breakdown
- Research-backed task generation using Perplexity AI
- Comprehensive progress tracking and dependency management
View current tasks: task-master list
Get next task: task-master next
For questions about this research project, please open an issue or contact the development team.
Status: ๐ง Active Development - Migration Phase 0 Last Updated: 2025-05-27