Skip to content

Repository files navigation

🎡 EchoFind

A retrieval and synthesis engine built using SimCLR (Contrastive Learning)

Built for the Impulse'26 Hackathon

Python PyTorch SimCLR


✨ Overview

EchoFind is an advanced retrieval and synthesis engine powered by SimCLR (Contrastive Learning). Designed to understand complex audio representations, it bridges the gap between raw spectrograms and highly discriminative latent spaces.

Built modularly, optimized for scale, and engineered for high-fidelity audio search.


πŸ—οΈ Architecture

EchoFind leverages a dual-stage architecture for maximum retrieval accuracy:

  • Backbone: ResNet-18 (Provides an optimal balance of feature extraction and speed).
  • Projector: A robust 128-dimensional discriminative head (z), specifically optimized for retrieval tasks.
  • Learning Objective: SimCLR Contrastive Loss.

Note: We initially experimented with a ResNet-50 backbone. While highly scalable, ResNet-18 proved significantly more efficient for our accuracy targets under current training cycle constraints. Detailed experimental logs can be found in BENCHMARK_LOGS.txt.


πŸš€ Quick Start & Evaluation

Want to run the acid test and verify our search robustness instantly?

# Run the evaluation suite
python -m src.test_acid

For final evaluations, submission.py acts as the primary entry point, housing the core AudioEncoder and predict_track methods.


πŸ“Š Benchmarks & Performance

Our models have been rigorously tested and benchmarked:

Model Version Architecture Peak Search Acc F1 Score Notes
V1 (Current) ResNet-18 36% 45% Highly stable, optimal retrieval
V2 (Experimental) ResNet-50 ~20% ~31% Requires further training cycles
πŸ” View Proof of Results Detailed proof, including t-SNE visualizations and confusion matrices, are available in RESULTS_PROOF.md and the docs/results/ directory. Full terminal outputs of our high-water benchmarks are recorded in BENCHMARK_LOGS.txt.

πŸ“‚ Repository Structure

β”œβ”€β”€ submission.py       # Primary entry point for evaluation
β”œβ”€β”€ src/                # Modular source code spanning all phases
β”œβ”€β”€ weights/            # Final model weights (best_simclr.pt)
β”œβ”€β”€ notebooks/          # Experimental documentation & insights
└── docs/results/       # Visual proofs, t-SNE plots, and matrices

πŸ—ΊοΈ Phase Mapping

EchoFind was developed in structured phases, from core caching to generative morphing:

Core Pipelines

  • src/preprocess.py ➑️ Phase 1: High-speed Spectrogram Cache
  • src/train.py ➑️ Phase 2: SimCLR Representation Learning
  • src/index_db.py ➑️ Phase 3: FAISS Vector DB Generation
  • src/eval_phase4.py ➑️ Phase 4: Full Suite Evaluation (F1 + t-SNE)

Advanced Extensions

  • src/synthesis.py ➑️ Ext A: GenAI Latent Audio Morphing
  • src/ood.py ➑️ Ext B: Out-of-Distribution Density Estimation
  • src/test_variable.py ➑️ Ext C: Variable Length Robustness

Project submission for the Impulse'26 Hackathon

About

🎡 Audio retrieval & synthesis engine using contrastive learning (SimCLR + ResNet18) and FAISS Vector DB. Built for the Impulse'26 Hackathon.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages