Wi-Fringe 深度解读:WiFi CSI 零样本手势识别——文本语义驱动的无设备舱内感知

Wi-Fringe 深度解读:WiFi CSI 零样本手势识别

论文信息

项目 内容
标题 Wi-Fringe: Leveraging Text Semantics in WiFi CSI-Based Device-Free Named Gesture Recognition
会议 DCOSS 2019
核心 WiFi CSI + 文本语义 → 零样本识别
被试 4人
手势类别 20类
零样本准确率 90%(2类未训练)/ 61%(6类未训练)
推理速度 14ms(12ms特征+2ms投影)

1. 核心创新

首次将文本语义(词嵌入+动词属性)引入 WiFi CSI 手势识别,实现零样本学习——无需训练数据即可识别新手势。

1.1 与传统方案对比

方案 传感器 需要训练数据 零样本能力 隐私 成本
摄像头方案 RGB/IR 每类需大量
毫米波方案 60GHz 每类需大量
Wi-Fringe WiFi路由器 仅训练部分 零(复用现有WiFi)

1.2 核心发现

发现 说明
CSI+词嵌入有效 WiFi信号特征可投影到文本语义空间
属性空间互补 动作词属性+词嵌入联合投影最优
训练类别需语义关联 未训练类别需有语义近邻
14ms推理 可实时

2. 方法论

2.1 系统架构

graph TB
    A[WiFi路由器 CSI信号] --> B[STFT 频谱图]
    B --> C[CNN 局部特征提取]
    C --> D[Bi-LSTM 时序建模]
    D --> E[状态感知表示 SAR]
    
    E --> F[跨模态投影]
    F --> G[词嵌入空间<br/>Word2Vec]
    F --> H[属性空间<br/>动词属性]
    
    G & H --> I[两阶段分类器]
    I --> J{已训练?}
    J -->|是| K[标准分类]
    J -->|否| L[零样本推断<br/>语义最近邻]

2.2 核心实现

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
import torch
import torch.nn as nn
import numpy as np
from typing import Tuple

class StateAwareRepresentation(nn.Module):
"""
状态感知表示 (SAR)

CSI → STFT频谱图 → CNN局部特征 → Bi-LSTM时序
"""

def __init__(self, input_channels: int = 1, hidden_dim: int = 128):
super().__init__()

# CNN: 从STFT频谱图提取局部特征
self.cnn = nn.Sequential(
nn.Conv2d(input_channels, 32, 3, padding=1),
nn.ReLU(),
nn.MaxPool2d(2),
nn.Conv2d(32, 64, 3, padding=1),
nn.ReLU(),
nn.MaxPool2d(2),
nn.Conv2d(64, 128, 3, padding=1),
nn.ReLU(),
nn.AdaptiveAvgPool2d((1, None)), # (B, 128, 1, T')
)

# Bi-LSTM: 时序建模
self.lstm = nn.LSTM(
input_size=128,
hidden_size=hidden_dim,
num_layers=2,
batch_first=True,
bidirectional=True,
dropout=0.3,
)

self.projection = nn.Linear(hidden_dim * 2, hidden_dim)

def forward(self, stft_spectrogram: torch.Tensor) -> torch.Tensor:
"""
Args:
stft_spectrogram: (B, 1, F, T) CSI的STFT频谱图

Returns:
sar: (B, T', hidden_dim) 状态感知表示
"""
# CNN局部特征
cnn_out = self.cnn(stft_spectrogram) # (B, 128, 1, T')
cnn_out = cnn_out.squeeze(2).permute(0, 2, 1) # (B, T', 128)

# Bi-LSTM时序
lstm_out, _ = self.lstm(cnn_out) # (B, T', 2*hidden)

# 投影
sar = self.projection(lstm_out) # (B, T', hidden_dim)

# 全局表示(平均池化)
global_repr = sar.mean(dim=1) # (B, hidden_dim)

return global_repr


class CrossModalProjector(nn.Module):
"""
跨模态投影:CSI表示 → 文本语义空间

两个投影目标:
1. Word Embedding Space (Word2Vec)
2. Attribute Space (动词属性)
"""

def __init__(self, csi_dim: int = 128, word_dim: int = 300, attr_dim: int = 50):
super().__init__()

# CSI → 词嵌入投影
self.word_projector = nn.Sequential(
nn.Linear(csi_dim, 256),
nn.ReLU(),
nn.Linear(256, word_dim),
)

# CSI → 属性投影
self.attr_projector = nn.Sequential(
nn.Linear(csi_dim, 128),
nn.ReLU(),
nn.Linear(128, attr_dim),
nn.Sigmoid(), # 属性是二值化的
)

def forward(self, csi_repr: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:
"""
Returns:
word_proj: (B, word_dim) 词嵌入空间投影
attr_proj: (B, attr_dim) 属性空间投影
"""
word_proj = self.word_projector(csi_repr)
attr_proj = self.attr_projector(csi_repr)
return word_proj, attr_proj


class ZeroShotClassifier:
"""
零样本分类器

对未训练过的手势,通过语义最近邻分类
"""

def __init__(self, word_embeddings: dict, attr_vectors: dict):
"""
Args:
word_embeddings: {gesture_name: word2vec_vector}
attr_vectors: {gesture_name: attribute_vector}
"""
self.word_embeddings = word_embeddings
self.attr_vectors = attr_vectors

def classify(
self,
word_proj: torch.Tensor,
attr_proj: torch.Tensor,
candidate_gestures: list,
seen_gestures: list,
) -> str:
"""
零样本分类

Args:
word_proj: (word_dim,) 投影后的CSI
attr_proj: (attr_dim,)
candidate_gestures: 所有可能的手势名
seen_gestures: 已训练的手势名

Returns:
predicted_gesture: 预测的手势名
"""
unseen = [g for g in candidate_gestures if g not in seen_gestures]

if not unseen:
# 全部已训练,用标准分类
return self._nearest_neighbor(word_proj, attr_proj, seen_gestures)

# 零样本:在未训练类别中找语义最近邻
best_match = None
best_score = -float('inf')

for gesture in unseen:
# 联合相似度(词嵌入 + 属性)
word_sim = torch.cosine_similarity(
word_proj.unsqueeze(0),
self.word_embeddings[gesture].unsqueeze(0),
).item()

attr_sim = torch.cosine_similarity(
attr_proj.unsqueeze(0),
self.attr_vectors[gesture].unsqueeze(0),
).item()

joint_score = 0.5 * word_sim + 0.5 * attr_sim

if joint_score > best_score:
best_score = joint_score
best_match = gesture

return best_match

def _nearest_neighbor(self, word_proj, attr_proj, candidates):
"""标准最近邻分类"""
best_match = None
best_score = -float('inf')

for gesture in candidates:
word_sim = torch.cosine_similarity(
word_proj.unsqueeze(0),
self.word_embeddings[gesture].unsqueeze(0),
).item()

attr_sim = torch.cosine_similarity(
attr_proj.unsqueeze(0),
self.attr_vectors[gesture].unsqueeze(0),
).item()

score = 0.5 * word_sim + 0.5 * attr_sim

if score > best_score:
best_score = score
best_match = gesture

return best_match


# 测试
if __name__ == "__main__":
# 模拟20类手势的词嵌入和属性
gestures = ["walking", "sitting", "standing", "waving", "pushing",
"pulling", "clapping", "typing", "drinking", "eating",
"phone_call", "reading", "sleeping", "turning", "bending",
"kicking", "punching", "jumping", "opening_door", "closing_door"]

np.random.seed(42)
word_embeddings = {g: torch.randn(300) for g in gestures}
attr_vectors = {g: torch.rand(50) for g in gestures}

# 模型
sar = StateAwareRepresentation(input_channels=1, hidden_dim=128)
projector = CrossModalProjector(csi_dim=128, word_dim=300, attr_dim=50)
classifier = ZeroShotClassifier(word_embeddings, attr_vectors)

# 模拟CSI STFT输入
stft_input = torch.randn(4, 1, 64, 100) # (B, C, F, T)

# 前向
csi_repr = sar(stft_input) # (4, 128)
word_proj, attr_proj = projector(csi_repr)

# 零样本分类
seen = gestures[:14] # 训练14类
unseen = gestures[14:] # 零样本6类

for i in range(4):
pred = classifier.classify(word_proj[i], attr_proj[i], gestures, seen)
print(f"样本{i}: 预测={pred}")

print(f"\n训练类别: {len(seen)}, 零样本类别: {len(unseen)}")
print(f"零样本候选: {unseen}")

3. 关键结果

3.1 性能对比

方法 已训练准确率 零样本(2类) 零样本(6类) 推理时间
CNN 74%
SVM 62%
Wi-Fringe 82% 90% 61% 14ms

3.2 融合策略

策略 零样本准确率 说明
仅词嵌入 78% Word2Vec语义
仅属性 72% 动作词属性
联合投影 90% 互补最优

3.3 数据集

维度 数值
被试 4人
手势类别 20类
环境 公寓+办公室
传感器 WiFi路由器(CSI)

4. 舱内应用场景

4.1 车载WiFi手势识别

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CABIN_WIFI_GESTURE_CONFIG = {
"sensor": {
"type": "WiFi CSI",
"source": "车内WiFi路由器/热点",
"cost": "零(复用现有硬件)",
"privacy": "无影像采集",
},
"applicable_gestures": [
"挥手切歌", # swipe
"推拉调节音量", # push/pull
"点击确认", # tap
"握拳拒绝", # fist
"张开手掌", # open palm
],
"zero_shot_capability": "新手势无需重训模型,只需更新手势名列表",
"limitation": "需车内WiFi信号覆盖,多人场景需扩展",
}

4.2 与视觉手势的互补

场景 摄像头方案 WiFi CSI方案 融合
白天手势 ✅ 高精度 ⚠️ 中等
黑暗车内 ❌ RGB失效 ✅ 不受影响
被遮挡手势 ❌ 不可见 ✅ 穿透
新增手势 需重训 ✅ 零样本
隐私 分场景选择

5. IMS 开发启示

5.1 WiFi CSI 作为第三传感模态

优先级 传感器 功能 成本
P0 IR摄像头 DMS核心
P1 60GHz雷达 CPD/OMS
P2 WiFi CSI 手势/补充

5.2 融合三模态架构

graph TB
    A[IR摄像头] --> D[融合引擎]
    B[60GHz雷达] --> D
    C[WiFi CSI] --> D
    
    D --> E{场景判断}
    E -->|白天/正常| F[摄像头主导]
    E -->|黑暗/遮挡| G[雷达+WiFi]
    E -->|新手势| H[WiFi零样本]
    E -->|隐私模式| I[仅雷达+WiFi]

5.3 零样本能力价值

场景 传统方案 Wi-Fringe零样本
新增手势 收集数据→标注→重训 只需更新手势名列表
个性化手势 不支持 用户定义手势名即可
OTA更新 大模型包 轻量词表更新
A/B测试 需多版本模型 同一模型+不同词表

6. 局限性

局限 影响 缓解
4被试样本小 泛化不确定 需大规模验证
仅室内环境 车内多径更复杂 需车载验证
单人场景 多人干扰 需扩展多用户
需候选词表 不能完全开放 限制搜索空间
61%(6类) 多类零样本较低 足够用于启发式

7. 结论

Wi-Fringe 的核心贡献:

  1. 零样本手势识别:无需训练数据即可识别新手势(90%/61%)
  2. WiFi CSI零成本传感:复用车内WiFi路由器,无额外硬件
  3. 文本语义桥梁:词嵌入+属性双投影,CSI↔文本跨模态
  4. 14ms实时推理:可用于实时交互
  5. 隐私保护:无影像采集

IMS启示: WiFi CSI 是舱内感知的”第三传感模态”——零成本、零隐私风险、零样本可扩展。在已有摄像头+雷达的基础上,WiFi CSI可作为补充模态,特别是在黑暗场景和零样本新手势场景中。三模态融合(IR摄像头+60GHz雷达+WiFi CSI)是舱内感知的终极方案。


参考文献

  • Wi-Fringe: DCOSS 2019, OpenReview FO4Dca1aah
  • Word2Vec: Mikolov et al., 2013
  • CSI: Channel State Information, IEEE 802.11
  • WiFi Sensing: Ma et al., 2019

Wi-Fringe 深度解读:WiFi CSI 零样本手势识别——文本语义驱动的无设备舱内感知
https://dapalm.com/2026/09/16/2026-09-16-wi-fringe-wifi-csi-zero-shot-gesture-cabin-ims/
作者
Mars
发布于
2026年9月16日
许可协议