Views
No views yet
| Property | Value |
|---|---|
| Architecture | 2-layer MLP (256 → 128 → 9) |
| Parameters | 361,993 |
| Input | CLAP audio (512-dim) + DeBERTa concept (768-dim) = 1280-dim |
| Output | Softmax probabilities over 9 colors (color_probs, shape [batch, 9]) |
| Format | ONNX (refractor_cdm.onnx, 1.4 MB) |
| Training data | 3,450 chunks from 78 full-mix songs across all 9 colors |
| Loss | CrossEntropyLoss with label smoothing (0.1) + inverse-frequency class weights |
Index Color CHROMATIC_TARGETS (temporal / spatial / ontological)
0 Red Past / Thing / Known
1 Orange Past / Thing / Imagined
2 Yellow Future / Place / Imagined
3 Green Future / Place / Forgotten
4 Blue Present / Person / Forgotten
5 Indigo Uniform / Uniform / Known+Forgotten [0.1, 0.4, 0.4]
6 Violet Present / Person / Known
7 White Uniform across all axes
8 Black Uniform across all axes
Targets are derived at runtime from `app/structures/concepts/chromatic_targets.py`,
which reads directly from the canonical `the_rainbow_table_colors` Pydantic model.
Previous versions had hand-rolled copies that diverged for 7 of 9 colours; this was
corrected in April 2026 (fix-chromatic-targets-canonical-source).staged_raw_material using 30s/5s-stride chunked scoring with confidence-weighted aggregation.| Color | Correct | Total | Accuracy |
|---|---|---|---|
| Red | 11 | 12 | 91.7% |
| Orange | 4 | 4 | 100.0% |
| Yellow | 10 | 10 | 100.0% |
| Green | 6 | 8 | 75.0% |
| Blue | 11 | 11 | 100.0% |
| Indigo | 10 | 11 | 90.9% |
| Violet | 11 | 12 | 91.7% |
| White | 9 | 10 | 90.0% |
| Overall | 72 | 78 | 92.3% |
Refractor wrapper. It auto-loads when refractor_cdm.onnx is present alongside refractor.onnx.1from training.refractor import Refractor
2
3scorer = Refractor() # CDM auto-detected
4
5result = scorer.score(
6 audio_emb=scorer.prepare_audio(waveform, sr=48000),
7 concept_emb=scorer.prepare_concept("A song about forgetting the future"),
8)
9# result: {"temporal": {...}, "spatial": {...}, "ontological": {...}, "confidence": 0.93}chunk_audio + aggregate_chunk_scores from score_mix.py to score in overlapping windows and pool results.1# Phase 1 — extract CLAP + concept embeddings from staged_raw_material/
2python training/extract_cdm_embeddings.py
3
4# Phase 2 — train on Modal (A10G GPU)
5modal run training/modal_train_refractor_cdm.py
6
7# Validate
8python training/validate_mix_scoring.py