執法 AI 安全
執法中 AI 的安全測試:預測警政操縱、臉部辨識規避與偏誤、證據分析 AI 利用,以及監控系統攻擊。
執法 AI 運作於所有 AI 部署中風險最高的環境之一。這些系統影響警方調查誰、誰被逮捕、保釋如何設定、刑期如何裁定,以及誰受到監控。執法 AI 的錯誤可導致錯誤逮捕、公民自由侵害、歧視性警政以及社群信任的侵蝕。這些系統的安全因此同時是網路安全議題也是公民權利議題。
執法 AI 的紅隊測試必須面對一個根本張力:揭露安全弱點的對抗技術同樣可被罪犯用於規避偵測。本頁聚焦於改善系統安全而不創造規避攻略的防禦性測試方法。
預測警政 AI
回饋迴圈利用
預測警政系統(例如 PredPol/Geolitica、HunchLab 與機構自訂系統)使用歷史犯罪資料預測犯罪可能發生的地點與時間。這些系統容易受到回饋迴圈影響:在預測區域增加警力導致更多逮捕,產生該區域更多犯罪資料,強化預測,無論實際犯罪率為何。
對手可利用這些回饋迴圈操縱警政模式:
# Modeling feedback loop exploitation in predictive policing
def simulate_feedback_attack(predictive_system, target_area,
duration_days):
"""
Simulate how an adversary can amplify policing in a
target area by generating artificial crime signals.
"""
results = []
for day in range(duration_days):
artificial_signals = generate_artificial_signals(
area=target_area,
count=3,
crime_types=["suspicious_activity", "noise_complaint",
"loitering"],
)
predictions = predictive_system.predict(day)
real_data_from_presence = estimate_presence_effect(
patrol_hours=predictions[target_area].recommended_hours
)
results.append({
"day": day,
"artificial_signals": len(artificial_signals),
"predicted_risk_score": predictions[target_area].risk_score,
"estimated_patrol_hours":
predictions[target_area].recommended_hours,
})
return results地理偏誤放大
訓練於歷史逮捕資料的預測警政系統繼承並放大歷史警政偏誤。紅隊評估應衡量:
- 基準地理分佈 — 系統預測何處發生犯罪?如何對應至人口資料?
- 對資料操縱的敏感度 — 需要多少額外通報才能顯著改變預測?
- 衰減率 — 訊號來源移除後,人工訊號在預測中持續多久?
- 跨區域汙染 — 某一區域的操縱能否影響相鄰區域的預測?
臉部辨識系統
對抗性規避技術
執法用於身分識別、監控與存取控制的臉部辨識系統在多個層級上易受對抗性規避影響:
實體對抗攻擊:
| 技術 | 描述 | 有效性 | 可偵測性 |
|---|---|---|---|
| 對抗性化妝 | 干擾臉部地標偵測的幾何圖案 | 中等——有效性因系統而異 | 低——圖案可能細微 |
| 對抗性配件 | 印有對抗性圖案的眼鏡、帽子或圍巾 | 對目標系統高效 | 中——外觀異常 |
| IR 照明 | 以紅外 LED 壓制相機感測器但無可見光 | 對基於紅外的系統高效 | 低——人眼不可見 |
| 投影攻擊 | 將對抗性圖案投影至臉上 | 在受控環境中有效 | 高——需要設備 |
| 3D 列印面具 | 冒充他人身分的面具 | 視活體偵測而定 | 高——人類可察覺 |
# Testing facial recognition robustness
# NOTE: Use synthetic face data only
def test_facial_recognition_robustness(fr_system, synthetic_faces):
results = {
"baseline_accuracy": None,
"evasion_results": {},
}
baseline_correct = 0
for face in synthetic_faces:
match = fr_system.identify(face.image)
if match.identity == face.identity:
baseline_correct += 1
results["baseline_accuracy"] = baseline_correct / len(synthetic_faces)
evasion_techniques = [
"gaussian_noise",
"adversarial_patch",
"landmark_perturbation",
"color_channel_shift",
"geometric_transform",
]
for technique in evasion_techniques:
evaded = 0
for face in synthetic_faces:
modified = apply_evasion(face.image, technique)
match = fr_system.identify(modified)
if match.identity != face.identity:
evaded += 1
results["evasion_results"][technique] = {
"evasion_rate": evaded / len(synthetic_faces),
"technique": technique,
}
return results人口偏誤測試
臉部辨識偏誤已有充分文獻記錄:系統在深膚色臉部、女性與年長者上持續表現較差。紅隊測試必須量化此偏誤:
# Demographic bias assessment for facial recognition
def test_demographic_bias(fr_system, demographic_dataset):
"""
Measure accuracy across demographic groups using the
intersectional analysis methodology from Buolamwini & Gebru.
"""
accuracy_by_group = {}
for face in demographic_dataset:
group_key = f"{face.skin_tone}_{face.gender}_{face.age_range}"
if group_key not in accuracy_by_group:
accuracy_by_group[group_key] = {
"correct": 0, "total": 0,
"false_positive": 0, "false_negative": 0,
}
result = fr_system.identify(face.image)
accuracy_by_group[group_key]["total"] += 1
if result.identity == face.identity:
accuracy_by_group[group_key]["correct"] += 1
elif result.identity is not None:
accuracy_by_group[group_key]["false_positive"] += 1
else:
accuracy_by_group[group_key]["false_negative"] += 1
accuracies = {k: v["correct"] / v["total"]
for k, v in accuracy_by_group.items()}
best = max(accuracies.values())
worst = min(accuracies.values())
return {
"accuracy_by_group": accuracies,
"accuracy_gap": best - worst,
"disparity_ratio": worst / best if best > 0 else 0,
}錯誤辨識風險
執法臉部辨識最危險的失敗模式是錯誤辨識——錯誤地將某人比對為嫌犯或通緝犯。美國已有多起基於臉部辨識誤判的錯誤逮捕案例。
紅隊測試應衡量:
- 操作閾值下的偽陽性率 — 在機構用於調查線索的信心閾值下,錯誤比對率為何?
- 資料庫大小效應 — 準確度如何隨參考資料庫成長而衰減?
- 影像品質敏感度 — 準確度如何隨監控品質影像(低解析度、光線不佳、斜角)而衰減?
證據分析 AI
數位證據 AI 操縱
執法越來越常使用 AI 處理數位證據:分析通訊以尋找犯罪活動指標、處理財務紀錄以找出詐欺模式、辨識兒童剝削內容。這些系統可能被操縱以遺漏證據或捏造指標。
# Testing evidence analysis AI for manipulation
evidence_ai_tests = {
"evidence_suppression": {
"description": "Can communications be structured to evade "
"AI detection of criminal activity indicators?",
"technique": "Use code words, steganography, or adversarial "
"text that fools the AI while conveying meaning "
"to the human recipient",
"test_cases": [
"Substitution cipher in casual conversation",
"Meaning conveyed through sentence structure rather "
"than vocabulary",
"Information embedded in message metadata or timing",
],
},
"false_indicator_injection": {
"description": "Can an adversary plant communications that "
"trigger AI criminal activity indicators "
"against an innocent target?",
"technique": "Send messages to the target that contain "
"criminal activity language, causing AI to "
"flag the target's communications",
"severity": "Critical — could lead to wrongful investigation",
},
}AI 證據的保管鏈
當 AI 處理證據時,保管鏈必須包含 AI 系統本身。紅隊評估應驗證:
- 模型版本控制 — 用於處理證據的確切模型版本是否有記錄?
- 可重現性 — AI 分析能否以相同輸入與模型版本重現?
- 篡改偵測 — AI 系統或其輸出能否在未被察覺下被修改?
- 稽核軌跡完整性 — 稽核軌跡是否捕捉所有 AI 處理步驟、參數與中間結果?
監控系統攻擊
範圍擴張攻擊
AI 驅動的監控系統(自動車牌辨識、影像分析、通訊監控)有明確的法律範圍——授權其為特定目的收集特定資料。對手(或系統錯誤)可造成範圍擴張,使 AI 收集或分析超出授權範圍的資料。
紅隊測試應探查:
- AI 是否可被設定(或錯誤設定)以監控其法律權限外的通訊或個人
- 警示閾值能否被操縱以產生正當化擴大監控的誤報
- 資料保留政策是否由 AI 執行或可被繞過
- 跨系統資料共享是否受到適當限制
防禦建議
將偏誤稽核視為安全需求
要求所有執法 AI 定期進行人口偏誤稽核。將跨人口族群的準確度差異視為安全漏洞,而非僅是公平性疑慮。
人類決策權威
確保任何執法行動(逮捕、搜索、監控啟動)不得僅根據 AI 輸出執行。AI 應告知人類決策,而非取代之。
回饋迴圈監控
實作監控以偵測並打斷預測系統中的回饋迴圈。定期稽核預測是否反映實際犯罪模式或警政模式。
證據處理標準
為 AI 處理的證據建立保管鏈要求,包括模型版本、處理參數與可重現性驗證。
延伸閱讀
- 政府 AI 安全概覽 — 更廣泛的政府 AI 背景
- 公共服務 AI — 面向公民的政府 AI
- AI 的 FedRAMP — 聯邦合規框架
- AI 事件分類 — 如何分類 AI 安全事件