GALR implementation verified (aura/neural_acoustics/galr_teacher.py):
- Time-domain masks: 2D conv → tanh/sigmoid beam-forming → ReLU (paper Eq. 12)
- Stereo support:
in_channels: int = 2inGalrSeparatorConfig - PIT: Implemented via
itertools.permutations - Decoder: One transposed 1D conv per source output
Stereo input contract: (B, 2, T) → encoder → segment → blocks → mask head → (B, n_sources, T)
DEMAND has separate mono WAV files per channel (ch01.wav through ch16.wav), not interleaved stereo.
# demand.py line 47: channels: str = "ch01" — loads single channel
# demand.py line 102: if f.endswith(f"{self.channels}.wav")
# demand.py line 133: data = data.mean(axis=1) — never hits (each WAV is mono)- Multi-channel selection API: Load 2+ specific channels and stack:
# channels="all" → stack all 16 channels → shape (16, T) # channels=[1,3,5] → select subset → shape (3, T) # channels="mean" → load all, mean across → shape (1, T)
- DEMAND → stereo loader: Load any 2 channels and present as
(2, T)for GALR
| File | Change |
|---|---|
shared/data/loaders/demand.py |
Multi-channel selection API (channels param accepts str/list) |
aura/neural_acoustics/galr_teacher.py |
Already stereo-capable via in_channels=2 |
Files audited:
recurrentgemma/torch/layers.py— RGLRU, Conv1D, RMSNormrecurrentgemma/torch/modules.py— RecurrentBlock, MLPBlock, ResidualBlockrecurrentgemma/torch/griffin.py— Griffin model assemblyrecurrentgemma/jax/layers.py— JAX reference implementations
Finding: All implementations operate in time-domain only. The RecurrentGemma Griffin architecture uses:
RGLRU— Real-Gated Linear Recurrent Unit (time-domain recurrent)Conv1D— 1D temporal convolution (time-domain)- No STFT/FFT operations on audio signals anywhere in these modules
Conclusion: DeepONet/FiLM implementations in aura/neural_acoustics/ are
time-domain aligned with the PNAS paper — no changes needed.
The PNAS paper (DOI 10.1073/pnas.2312159120) uses Fourier encoding on spatial-temporal coordinates (x, y, z, t), not audio spectral transforms:
# In fourierFeatureExpansion_f0 (feature_expansion.py):
# Input: (..., 4) for (x, y, z, t) coordinates
# Output: [..., 4 + 2*len(fs)] with cos/sin of frequencies fsThis is positional encoding for the DeepONet trunk net, not a spectral transform on audio waveforms. The DeepONet operator learns acoustic wave propagation from initial condition (pressure field on a spatial mesh) to query points.
For multi-scale time-domain analysis, aum/wavelet/analysis.py provides:
wavelet_filter_bank()— undecimated Db4 multi-scale decompositionwavelet_coherence()— signal coherence measure across scales
These can be used as alternatives to FFT-based feature extraction when frequency-domain analysis is needed without the ROCm FFT instability issues.
Both sources verified working:
- HF Transformers RecurrentGemma —
recurrentgemmapip package from kryptodogg fork - In-repo
models/recurrentgemma/recurrentgemma/torch/— PyTorch implementations
Numerical parity tests (layers_test.py, modules_test.py, griffin_test.py) confirm
both paths produce equivalent outputs. This allows benchmarking HF Transformers variants
against Hawk and paper Griffin implementations.
Implemented in shared/data/loaders/demand.py:
_resolve_channels()— parseschannelsparam (str/list) → list of channel names_discover_files()— groups files by base key, collects paths per channel_load_audio()— loads and stacks multiple channels →(n_channels, T)shape
API:
# channels="ch01" (default) → single channel, shape (1, T)
# channels=[1, 3, 5] → select channels, shape (3, T)
# channels="all" → stack all 16, shape (16, T)
# channels="mean" → load all, mean across, shape (1, T)Tests: tests/shared/data/test_demand_loader.py validates all channel specs.
room_loader.pystereo preservation — separate task