Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install hiyenwong-ai-collection-collection-skills-kuramoto-phase-encoding-vision-transformergit clone https://github.com/hiyenwong/ai_collection.gitcp ai_collection/SKILL.MD ~/.claude/skills/hiyenwong-ai-collection-collection-skills-kuramoto-phase-encoding-vision-transformer/SKILL.md--- name: Kuramoto Oscillatory Phase Encoding for Vision Transformers description: > Neuro-inspired phase encoding using Kuramoto oscillators (KoPE) applied to Vision Transformers, combining oscillatory dynamics with attention mechanisms for improved learning efficiency. Based on ICLR 2025 paper by Xiao et al. (Microsoft Research). --- # Kuramoto Oscillatory Phase Encoding for Vision Transformers ## Overview This skill covers the **Kuramoto Oscillatory Phase Encoding (KoPE)** method, introduced as an additional evolving phase state for Vision Transformers (ViTs). KoPE bridges neuroscience-inspired oscillatory dynamics with modern deep learning by incorporating the Kuramoto synchronization model into transformer architectures. The approach addresses a fundamental gap: while biological neural systems jointly exploit firing rate and oscillatory phase for information encoding, most deep learning architectures rely solely on activation values, neglecting the joint dynamics of rate and phase. Published at **ICLR 2025**, the work demonstrates that neuro-inspired synchronization can advance scalable neural networks for improved learning efficiency without requiring fundamental architectural redesigns. **Authors:** Mingqing Xiao, Yansen Wang, Dongqi Han, Caihua Shan, Dongsheng Li (Microsoft Research) ## Key Concepts ### Kuramoto Model - Mathematical model describing the synchronization behavior of coupled oscillators - Each oscillator evolves according to phase dynamics governed by natural frequencies and coupling strengths - Kuramoto updates apply forces to connected oscillators, encouraging them to become **aligned or anti-aligned** - Synchronization emerges as a collective phenomenon from local pairwise interactions ### Phase Encoding in Neuroscience - Biological neural systems encode information through both firing **rate** and oscillatory **phase** - Phase relationships between neural oscillations support binding, attention, and memory - Oscillatory synchronization is linked to feature binding and perceptual grouping - Most artificial neural networks neglect this phase-based information channel ### KoPE (Kuramoto Oscillatory Phase Encoding) - Introduces an **additional evolving phase state** alongside standard token representations in ViTs - Phase states evolve according to Kuramoto dynamics integrated into transformer layers - Synchronization acts as **distributed and continuous clustering** of representations - Networks with KoPE tend to **compress representations via synchronization**, improving efficiency ## Methodology ### Architecture Integration 1. **Phase State Initialization:** Each token/patch in the Vision Transformer is augmented with an initial phase state 2. **Kuramoto Updates:** Phase states evolve through learned Kuramoto dynamics at each transformer layer 3. **Coupling Mechanism:** Learnable coupling weights determine how oscillators influence each other, enabling adaptive synchronization patterns 4. **Joint Rate-Phase Processing:** The standard attention mechanism operates on both activation values and synchronized phase information ### Key Design Principles - **Non-destructive augmentation:** KoPE adds phase states as supplementary information without removing or replacing existing transformer components - **Learnable dynamics:** Natural frequencies and coupling strengths are learned end-to-end through backpropagation - **Scalable integration:** The phase encoding module is lightweight and can be added to existing ViT variants (e.g., DeiT) ### Synchronization as Representation Compression - The Kuramoto synchronization process naturally groups similar representations together - This acts as a form of **distributed, continuous clustering** - Compressed representations reduce redundancy and improve downstream task performance - Analogous to neural binding in neuroscience where synchronized firing links related features ## Applications - **Image Classification:** Improved accuracy on ImageNet and CIFAR benchmarks when applied to DeiT and ViT models - **Efficient Training:** Phase synchronization reduces the number of training epochs needed to reach target accuracy - **Representation Learning:** Enhanced feature representations through synchronized phase dynamics - **Neuro-Inspired AI:** Demonstrates that biological principles (oscillatory phase coding) can be practically integrated into large-scale deep learning - **Model Compression:** Synchronization-based compression offers a pathway to more parameter-efficient architectures ## Key Insights 1. **Phase matters:** Neural information processing exploits both rate and phase; ignoring phase leaves a powerful computational channel unused in deep learning 2. **Synchronization as computation:** Kuramoto synchronization is not just a physical phenomenon but a useful computational primitive for grouping and compressing representations 3. **Minimal architectural disruption:** KoPE demonstrates that neuro-inspired mechanisms can be added as lightweight modules to existing architectures without major redesigns 4. **Bridging neuroscience and deep learning:** The work provides a concrete, scalable pathway for incorporating oscillatory dynamics from computational neuroscience into modern transformer architectures 5. **Learning efficiency gains:** The additional phase dynamics provide inductive biases that accelerate convergence and improve generalization 6. **Binding via oscillatory dynamics:** The mechanism replicates a key neuroscience principle — feature binding through synchronized oscillations — in an artificial system ## References - **Primary Paper:** Xiao, M., Wang, Y., Han, D., Shan, C., & Li, D. (2025). *Kuramoto Oscillatory Phase Encoding: Neuro-inspired Synchronization for Improved Learning Efficiency*. ICLR 2025. - arXiv: [https://arxiv.org/abs/2604.07904](https://arxiv.org/abs/2604.07904) - PDF: [https://arxiv.org/pdf/2604.07904](https://arxiv.org/pdf/2604.07904) - **Related Work (AKOrN):** The same group published on Artificial Kuramoto Oscillatory Neurons (AKOrN), exploring broader applications of Kuramoto dynamics in neural networks. - OpenReview: [https://openreview.net/pdf?id=nwDRD4AMoN](https://openreview.net/pdf?id=nwDRD4AMoN) - **Background on Kuramoto Model:** Kuramoto, Y. (1975). *Self-entrainment of a population of coupled non-linear oscillators.* International Symposium on Mathematical Problems in Theoretical Physics. - **Vision Transformer:** Dosovitskiy, A. et al. (2021). *An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale.* ICLR 2021. - **DeiT:** Touvron, H. et al. (2021). *Training data-efficient image transformers & distillation through attention.* ICML 2021.