Skip to content

Add Rust optimization examples from squeeze library (HNSW + t-SNE)#7

Open
GeorgePearse wants to merge 3 commits intomainfrom
feature/squeeze-optimization-examples
Open

Add Rust optimization examples from squeeze library (HNSW + t-SNE)#7
GeorgePearse wants to merge 3 commits intomainfrom
feature/squeeze-optimization-examples

Conversation

@GeorgePearse
Copy link
Copy Markdown
Owner

Summary

This PR adds two new Genesis optimization examples targeting algorithms from the squeeze high-performance Rust library for dimensionality reduction:

  • HNSW Search Optimization: Targets the beam search algorithm in HNSW graphs for approximate nearest neighbor search
  • t-SNE Gradient Optimization: Targets the O(n²) gradient computation that dominates t-SNE embedding time
  • ROADMAP.md: Comprehensive language support documentation with execution backend matrix

Results

HNSW (100 generations, in progress)

Metric Baseline Best Found Improvement
Score 53.79 61.32 +14%
Key optimization HashSet visited Vec visited -

t-SNE (50 generations, in progress)

Metric Baseline Best Found Improvement
Score 149.50 155.08 +3.7%
Key optimization Standard loops Blocked unroll + symmetry -

Files Changed

New Examples

  • examples/squeeze_hnsw/initial.rs - Standalone HNSW implementation with EVOLVE-BLOCK markers
  • examples/squeeze_hnsw/evaluate.py - Fitness evaluation (recall@10 × speed)
  • examples/squeeze_tsne/initial.rs - Standalone t-SNE gradient implementation
  • examples/squeeze_tsne/evaluate.py - Fitness evaluation (trustworthiness × speed)

New Configs

  • configs/task/squeeze_hnsw.yaml - Task definition with optimization hints
  • configs/task/squeeze_tsne.yaml - Task definition with optimization hints
  • configs/variant/squeeze_hnsw_example.yaml - Local execution variant
  • configs/variant/squeeze_hnsw_e2b.yaml - E2B cloud execution variant
  • configs/variant/squeeze_tsne_example.yaml - Local execution variant

Documentation

  • ROADMAP.md - Language support matrix, execution backends, planned features
  • README.md - Added roadmap link to docs table

Test plan

  • HNSW evaluator runs locally
  • t-SNE evaluator runs locally
  • Genesis experiments launch successfully
  • Experiments show improvement over baseline

🤖 Generated with Claude Code

GeorgePearse and others added 3 commits November 23, 2025 18:34
This PR adds two new Genesis optimization examples targeting the squeeze
high-performance Rust library (https://github.com/GeorgePearse/squeeze):

## HNSW (Hierarchical Navigable Small World) Search
- Target: `search_layer` beam search algorithm
- Metric: recall@10 × speed_factor × 100
- Initial experiments show +14% improvement (53.79 → 61.32)
- Key optimization: Vec<bool> visited tracking vs HashSet

## t-SNE Gradient Computation
- Target: O(n²) gradient computation called 1000× per embedding
- Metric: trustworthiness × speed_factor × 100
- Initial experiments show +3.7% improvement (149.50 → 155.08)
- Key optimization: blocked loop unrolling with symmetry exploitation

## Files Added
- `examples/squeeze_hnsw/` - Standalone HNSW implementation
- `examples/squeeze_tsne/` - Standalone t-SNE gradient implementation
- `configs/task/squeeze_*.yaml` - Task configurations
- `configs/variant/squeeze_*.yaml` - Variant configurations (local + E2B)
- `ROADMAP.md` - Comprehensive language support roadmap

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant