Rhythm Switching in RNNs with Adaptive Time Constants
Analysis of multiple coexisting mechanisms by which RNNs with learnable neuron-specific time constants switch between frequency band rhythms (theta, alpha, beta, gamma).
Metadata
- Source: arXiv:2605.14388
- Authors: Yutaka Yamaguti, Shota Nakamura
- Published: 2026-05-14
Core Methodology
Key Innovation
RNNs trained on multi-band rhythm-switching tasks deploy multiple coexisting mechanisms for switching, not a single canonical approach. The mechanisms vary across independently trained runs, exposing a degeneracy of learned solutions.
Three Rhythm-Switching Mechanisms
Subpopulation Turnover
- Active neuron subpopulation changes between rhythm modes
- Different neurons dominate output for different frequency bands
Network-Wide Baseline Shifts
- Global shift in operating point repositions network near distinct unstable fixed points
- Each fixed point corresponds to a different rhythm mode
- Switching = jumping between basins of attraction
Inter-Neuronal Phase Reorganization
- Selective cancellation or support of band components in population output
- Phase relationships between neurons reorganize to favor specific frequencies
Time Constant-Frequency Relationship
- Negative correlation between neuron time constant and matched-mode amplitude
- Correlation strengthens monotonically with frequency
- Low-frequency rhythms: distributed participation of many neurons
- High-frequency rhythms: dominated by small subpopulation of short-time-constant neurons
Experimental Framework
- Train leaky integrator RNNs with neuron-specific learnable time constants
- Task: four-band (theta, alpha, beta, gamma) rhythm switching
- Analyze 20+ independently trained networks
- Identify switching mechanisms via spectral decomposition and phase analysis
Implementation Guide
Analysis Steps
- Train RNN with adaptive time constants on rhythm-switching task
- Spectral analysis: compute power spectra for each trained network
- Time constant mapping: correlate learned time constants with rhythm participation
- Mechanism identification:
- Subpopulation analysis: which neurons active per mode
- Fixed point analysis: linearize around operating points
- Phase analysis: compute phase relationships between neurons
Code Skeleton
import numpy as np
# Leaky integrator RNN with adaptive time constants
class AdaptiveTimeConstantRNN:
def __init__(self, n_units, dt=0.001):
self.tau = np.ones(n_units) # learnable time constants
self.W = np.random.randn(n_units, n_units) * 0.1
self.b = np.zeros(n_units)
def step(self, x, h, u):
# dh/dt = (-h + f(Wh + u)) / tau
pre = self.W @ h + u + self.b
dh = (-h + np.tanh(pre)) / self.tau
return h + dh * dt
def analyze_rhythm(self, output, fs):
from scipy.signal import welch
freqs, psd = welch(output, fs=fs)
bands = {'theta': (4,8), 'alpha': (8,13), 'beta': (13,30), 'gamma': (30,80)}
powers = {}
for band, (lo, hi) in bands.items():
mask = (freqs >= lo) & (freqs <= hi)
powers[band] = np.trapz(psd[mask], freqs[mask])
return powers, freqs, psd
Applications
- Interpreting frequency-band-specific functional differentiation in biological neural systems
- Understanding degeneracy in learned neural representations
- Designing RNNs with controllable rhythm generation capabilities
- Modeling cortical circuit mechanisms for multi-band neural oscillations
Pitfalls
- Mechanism degeneracy: different training runs yield different switching mechanisms
- Time constant initialization can bias which mechanism emerges
- Spectral analysis requires sufficient sequence length for reliable band estimates
- Biological plausibility of learned time constants may vary
Related Skills
- rhythm-snn-temporal-processing — complementary: Rhythm-SNN adds oscillatory dynamics to SNNs for temporal processing and noise robustness (Nature Communications 2025)
- neuromodulation-rhythmic-pattern-control
- neural-dynamics-decision-making
- working-memory-rsnn-delays
1---2name: rhythm-switching-adaptive-time-constants-rnn3description: "Methodology for analyzing how recurrent neural networks with neuron-specific adaptive time constants switch between multiple frequency band rhythms. Covers rhythm-switching mechanisms, time constant-frequency relationships, and degeneracy of learned solutions. Activation: rhythm switching RNN, adaptive time constants, frequency band switching, RNN neural dynamics, multi-band rhythms, cortical rhythm mechanisms."4metadata:5 source: https://skillmd.com/skills/hiyenwong/rhythm-switching-adaptive-time-constants-rnn6---78# Rhythm Switching in RNNs with Adaptive Time Constants910> Analysis of multiple coexisting mechanisms by which RNNs with learnable neuron-specific time constants switch between frequency band rhythms (theta, alpha, beta, gamma).1112## Metadata13- **Source**: arXiv:2605.1438814- **Authors**: Yutaka Yamaguti, Shota Nakamura15- **Published**: 2026-05-141617## Core Methodology1819### Key Innovation20RNNs trained on multi-band rhythm-switching tasks deploy **multiple coexisting mechanisms** for switching, not a single canonical approach. The mechanisms vary across independently trained runs, exposing a **degeneracy of learned solutions**.2122### Three Rhythm-Switching Mechanisms23241. **Subpopulation Turnover**25 - Active neuron subpopulation changes between rhythm modes26 - Different neurons dominate output for different frequency bands27282. **Network-Wide Baseline Shifts**29 - Global shift in operating point repositions network near distinct unstable fixed points30 - Each fixed point corresponds to a different rhythm mode31 - Switching = jumping between basins of attraction32333. **Inter-Neuronal Phase Reorganization**34 - Selective cancellation or support of band components in population output35 - Phase relationships between neurons reorganize to favor specific frequencies3637### Time Constant-Frequency Relationship38- **Negative correlation** between neuron time constant and matched-mode amplitude39- Correlation strengthens **monotonically with frequency**40- **Low-frequency rhythms**: distributed participation of many neurons41- **High-frequency rhythms**: dominated by small subpopulation of **short-time-constant neurons**4243### Experimental Framework44451. Train leaky integrator RNNs with neuron-specific learnable time constants462. Task: four-band (theta, alpha, beta, gamma) rhythm switching473. Analyze 20+ independently trained networks484. Identify switching mechanisms via spectral decomposition and phase analysis4950## Implementation Guide5152### Analysis Steps53541. **Train RNN** with adaptive time constants on rhythm-switching task552. **Spectral analysis**: compute power spectra for each trained network563. **Time constant mapping**: correlate learned time constants with rhythm participation574. **Mechanism identification**:58 - Subpopulation analysis: which neurons active per mode59 - Fixed point analysis: linearize around operating points60 - Phase analysis: compute phase relationships between neurons6162### Code Skeleton63```python64import numpy as np6566# Leaky integrator RNN with adaptive time constants67class AdaptiveTimeConstantRNN:68 def __init__(self, n_units, dt=0.001):69 self.tau = np.ones(n_units) # learnable time constants70 self.W = np.random.randn(n_units, n_units) * 0.171 self.b = np.zeros(n_units)72 73 def step(self, x, h, u):74 # dh/dt = (-h + f(Wh + u)) / tau75 pre = self.W @ h + u + self.b76 dh = (-h + np.tanh(pre)) / self.tau77 return h + dh * dt78 79 def analyze_rhythm(self, output, fs):80 from scipy.signal import welch81 freqs, psd = welch(output, fs=fs)82 bands = {'theta': (4,8), 'alpha': (8,13), 'beta': (13,30), 'gamma': (30,80)}83 powers = {}84 for band, (lo, hi) in bands.items():85 mask = (freqs >= lo) & (freqs <= hi)86 powers[band] = np.trapz(psd[mask], freqs[mask])87 return powers, freqs, psd88```8990## Applications91- Interpreting frequency-band-specific functional differentiation in biological neural systems92- Understanding degeneracy in learned neural representations93- Designing RNNs with controllable rhythm generation capabilities94- Modeling cortical circuit mechanisms for multi-band neural oscillations9596## Pitfalls97- Mechanism degeneracy: different training runs yield different switching mechanisms98- Time constant initialization can bias which mechanism emerges99- Spectral analysis requires sufficient sequence length for reliable band estimates100- Biological plausibility of learned time constants may vary101102## Related Skills103- rhythm-snn-temporal-processing — complementary: Rhythm-SNN adds oscillatory dynamics to SNNs for temporal processing and noise robustness (Nature Communications 2025)104- neuromodulation-rhythmic-pattern-control105- neural-dynamics-decision-making106- working-memory-rsnn-delays