多可塑性协同脉冲神经网络训练方法论。结合多种突触可塑性机制(STDP、奖励调制、赫布学习)协同训练SNN,自适应机制分配。适用于脉冲神经网络、神经形态计算、低功耗AI。触发词:脉冲神经网络、SNN、多可塑性、STDP、突触可塑性、spiking neural network、multi-plasticity。
Scanned 9/11/2026
Install to Claude Code
npx -y skills add hiyenwong/ai_collection --skill multi-plasticity-snn-training --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Multi Plasticity Snn Training?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hiyenwong-multi-plasticity-snn-training)More formats (shields.io, HTML) on the badges page.
---
name: multi-plasticity-snn-training
description: 多可塑性协同脉冲神经网络训练方法论。结合多种突触可塑性机制(STDP、奖励调制、赫布学习)协同训练SNN,自适应机制分配。适用于脉冲神经网络、神经形态计算、低功耗AI。触发词:脉冲神经网络、SNN、多可塑性、STDP、突触可塑性、spiking neural network、multi-plasticity。
user-invocable: true
---
# Multi-Plasticity SNN Training - 多可塑性协同SNN训练
## 核心思想
大脑中存在多种突触可塑性机制并存,当前SNN训练通常只使用单一可塑性。本方法实现多种可塑性机制协同工作,提升适应性和表达能力。
**来源:** arXiv:2508.13673
**效用:** 0.93
---
## 方法论
### 大脑启发:多可塑性并存
| 可塑性类型 | 机制 | 功能 |
|-----------|------|------|
| STDP | 时序依赖 | 因果学习 |
| 奖励调制 | 多巴胺驱动 | 目标导向 |
| 赫布学习 | 激活相关 | 联想记忆 |
### 协同框架
```python
import torch
import torch.nn as nn
class MultiPlasticitySNN(nn.Module):
"""多可塑性协同SNN"""
def __init__(self, n_input, n_hidden, n_output):
super().__init__()
self.n_hidden = n_hidden
# 网络参数
self.W1 = nn.Parameter(torch.randn(n_input, n_hidden) * 0.1)
self.W2 = nn.Parameter(torch.randn(n_hidden, n_output) * 0.1)
# 可塑性追踪
self.stdp_traces = torch.zeros(n_input, n_hidden)
self.reward_traces = torch.zeros(n_input, n_hidden)
# 自适应机制分配
self.mechanism_weights = nn.Parameter(torch.ones(3) / 3) # 3种机制
def forward(self, x, duration=100):
"""前向传播"""
batch_size = x.shape[0]
# 膜电位
v = torch.zeros(batch_size, self.n_hidden)
spikes_hidden = []
dt = 1.0
tau_m = 20.0
v_thresh = 1.0
for t in range(duration):
# 输入电流
I = torch.matmul(x, self.W1)
# LIF 动力学
dv = (-v + I) / tau_m * dt
v = v + dv
# 发放
spike = (v > v_thresh).float()
spikes_hidden.append(spike)
# 重置
v = v * (1 - spike)
# 输出层
hidden_activity = torch.stack(spikes_hidden).sum(dim=0)
output = torch.matmul(hidden_activity.float(), self.W2)
return output, torch.stack(spikes_hidden)
def compute_multi_plasticity(self, pre_spikes, post_spikes, reward):
"""
计算多可塑性更新
Returns:
--------
updates: dict - 各种可塑性的更新量
"""
# STDP 更新
stdp_update = self._compute_stdp(pre_spikes, post_spikes)
# 奖励调制更新
reward_update = self._compute_reward_modulated(pre_spikes, post_spikes, reward)
# 赫布更新
hebbian_update = self._compute_hebbian(pre_spikes, post_spikes)
return {
'stdp': stdp_update,
'reward': reward_update,
'hebbian': hebbian_update
}
def _compute_stdp(self, pre, post, tau_plus=20.0, tau_minus=20.0, A_plus=0.1, A_minus=0.1):
"""STDP 计算"""
# 简化实现
pre_rate = pre.float().mean(dim=0)
post_rate = post.float().mean(dim=0)
correlation = torch.outer(pre_rate.mean(dim=1), post_rate.mean(dim=1))
return A_plus * correlation - A_minus * correlation.T
def _compute_reward_modulated(self, pre, post, reward, dopamine_factor=0.01):
"""奖励调制计算"""
pre_rate = pre.float().mean(dim=0)
post_rate = post.float().mean(dim=0)
correlation = torch.outer(pre_rate.mean(dim=1), post_rate.mean(dim=1))
return dopamine_factor * reward * correlation
def _compute_hebbian(self, pre, post, lr=0.01):
"""赫布学习计算"""
pre_rate = pre.float().mean(dim=0)
post_rate = post.float().mean(dim=0)
correlation = torch.outer(pre_rate.mean(dim=1), post_rate.mean(dim=1))
return lr * correlation
def adaptive_update(self, updates):
"""
自适应机制分配
根据当前任务动态调整各种可塑性的权重
"""
# 归一化机制权重
weights = torch.softmax(self.mechanism_weights, dim=0)
# 加权组合
total_update = (
weights[0] * updates['stdp'] +
weights[1] * updates['reward'] +
weights[2] * updates['hebbian']
)
# 更新权重
self.W1.data += total_update
return weights
```
---
## 应用场景
1. **神经形态计算** - 低功耗AI
2. **时序处理** - 动态数据
3. **在线学习** - 持续适应
---
## Activation Keywords
- 脉冲神经网络
- SNN
- 多可塑性
- STDP
- 突触可塑性
## Tools Used
- torch
- numpy
## Instructions for Agents
1. 理解多种可塑性机制
2. 设计协同更新规则
3. 实现自适应机制分配
## Examples
在神经形态数据集上训练多可塑性SNN。
## 参考文献
- arXiv:2508.13673Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!