AI Incident Reporting
AI Incident Reporting
The obligation to report to the relevant authorities when an incident caused by an AI system occurs. The EU AI Act requires reporting within 72 hours.
AI Incident Reporting
The obligation to report to the relevant authorities when an incident caused by an AI system occurs. The EU AI Act requires reporting within 72 hours.
AI Incident Reporting is a legal obligation to report to the competent authorities when a serious incident or malfunction occurs due to an AI system. Under Article 73 of the EU AI Act, providers and deployers of high-risk AI systems must report to the market surveillance authority of the relevant Member State within 72 hours of becoming aware of the incident.
Incidents subject to reporting are those that result in death or serious harm to health, a violation of fundamental rights, serious harm to property or the environment, or a violation of EU law. The reporting obligation arises only in the case of a 'Serious Incident', not a simple malfunction.
The report must include the identification information of the AI system, the date, time and place of the incident, the nature and severity of the incident, the scale of the harm, and the corrective measures taken. A detailed report must be submitted within 15 days after the initial report, and a final report is also required after the investigation is completed.
In practice, an incident detection system, an escalation process, and a legal team contact system must be established in advance. In Korea as well, there is an obligation to report a personal data breach within 24 hours (Personal Information Protection Act), and similar provisions may apply to AI-related incidents.
# AI 사고 보고 시스템 구현 예제
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from enum import Enum
from typing import Optional, List
import logging
class IncidentSeverity(Enum):
CRITICAL = "critical" # 사망, 심각한 건강 피해
HIGH = "high" # 기본권 침해, 심각한 재산 피해
MEDIUM = "medium" # 서비스 중단, 경미한 피해
LOW = "low" # 오작동, 피해 없음
class ReportStatus(Enum):
DETECTED = "detected"
INITIAL_REPORT = "initial_report" # 72시간 내 초기 보고
DETAILED_REPORT = "detailed_report" # 15일 내 상세 보고
FINAL_REPORT = "final_report" # 조사 완료 후 최종 보고
CLOSED = "closed"
@dataclass
class AIIncident:
"""AI 사고 기록"""
incident_id: str
ai_system_id: str
ai_system_name: str
detected_at: datetime
occurred_at: datetime
severity: IncidentSeverity
description: str
affected_parties: int
harm_type: List[str] # ["death", "health", "rights", "property", "environment"]
status: ReportStatus = ReportStatus.DETECTED
initial_report_deadline: datetime = None
detailed_report_deadline: datetime = None
def __post_init__(self):
# EU AI Act: 72시간 내 초기 보고
self.initial_report_deadline = self.detected_at + timedelta(hours=72)
# 15일 내 상세 보고
self.detailed_report_deadline = self.detected_at + timedelta(days=15)
class AIIncidentReporter:
"""EU AI Act 준수 사고 보고 시스템"""
def __init__(self, organization: str, contact_email: str):
self.organization = organization
self.contact_email = contact_email
self.logger = logging.getLogger("ai_incident_reporter")
self.incidents: List[AIIncident] = []
def report_incident(self, ai_system_id: str, ai_system_name: str,
description: str, severity: IncidentSeverity,
harm_type: List[str], affected_parties: int) -> AIIncident:
"""새 사고 등록 및 보고 프로세스 시작"""
incident = AIIncident(
incident_id=f"INC-{datetime.now().strftime('%Y%m%d%H%M%S')}",
ai_system_id=ai_system_id,
ai_system_name=ai_system_name,
detected_at=datetime.now(),
occurred_at=datetime.now(),
severity=severity,
description=description,
affected_parties=affected_parties,
harm_type=harm_type
)
self.incidents.append(incident)
# 심각도에 따른 즉시 알림
if severity in [IncidentSeverity.CRITICAL, IncidentSeverity.HIGH]:
self._trigger_immediate_alert(incident)
self._notify_legal_team(incident)
self.logger.critical(
f"AI 사고 감지: {incident.incident_id} | "
f"시스템: {ai_system_name} | "
f"심각도: {severity.value} | "
f"72시간 보고 기한: {incident.initial_report_deadline}"
)
return incident
def _trigger_immediate_alert(self, incident: AIIncident):
"""심각한 사고 발생 시 즉시 알림"""
alert_message = {
"type": "AI_SERIOUS_INCIDENT",
"incident_id": incident.incident_id,
"severity": incident.severity.value,
"deadline": incident.initial_report_deadline.isoformat(),
"action_required": "72시간 내 시장감시당국 보고 필수"
}
# Slack, Email, SMS 등으로 알림 발송
self.logger.warning(f"긴급 알림 발송: {alert_message}")
def _notify_legal_team(self, incident: AIIncident):
"""법무팀 자동 통보"""
notification = {
"to": "legal@company.com",
"subject": f"[긴급] AI 사고 보고 의무 발생 - {incident.incident_id}",
"body": f"""
AI 시스템: {incident.ai_system_name}
사고 유형: {', '.join(incident.harm_type)}
영향 범위: {incident.affected_parties}명
EU AI Act Art.73에 따라 72시간 내 보고 필요
보고 기한: {incident.initial_report_deadline}
"""
}
self.logger.info(f"법무팀 통보: {notification}")
def generate_initial_report(self, incident_id: str) -> dict:
"""72시간 내 초기 보고서 생성"""
incident = next((i for i in self.incidents if i.incident_id == incident_id), None)
if not incident:
raise ValueError(f"사고를 찾을 수 없음: {incident_id}")
report = {
"report_type": "INITIAL_NOTIFICATION",
"eu_ai_act_article": "Article 73",
"submission_deadline": incident.initial_report_deadline.isoformat(),
"organization": self.organization,
"contact": self.contact_email,
"ai_system": {
"id": incident.ai_system_id,
"name": incident.ai_system_name
},
"incident": {
"id": incident.incident_id,
"detected_at": incident.detected_at.isoformat(),
"occurred_at": incident.occurred_at.isoformat(),
"severity": incident.severity.value,
"description": incident.description,
"harm_type": incident.harm_type,
"affected_parties": incident.affected_parties
},
"immediate_actions": "조사 진행 중, 시스템 일시 중단",
"generated_at": datetime.now().isoformat()
}
incident.status = ReportStatus.INITIAL_REPORT
return report
# 사용 예시
reporter = AIIncidentReporter(
organization="KAITRUST Corp",
contact_email="compliance@kaitrust.ai"
)
# 심각한 사고 보고
incident = reporter.report_incident(
ai_system_id="MEDICAL-AI-001",
ai_system_name="AI 진단 보조 시스템",
description="잘못된 진단으로 인한 치료 지연 발생",
severity=IncidentSeverity.CRITICAL,
harm_type=["health"],
affected_parties=1
)
# 초기 보고서 생성
initial_report = reporter.generate_initial_report(incident.incident_id)
print(f"보고서 생성 완료: {initial_report['incident']['id']}")
Legal team: "If an AI incident occurs, it must be reported within 72 hours. There are no exceptions for weekends. We need to set up an on-call system for incident response."
Development team: "We've configured it so that the legal team and the DPO are notified automatically when an incident is detected, and we've also prepared an initial report template."
Interviewer: "Do you have experience responding to AI system incidents?"
Candidate: "I handled an incident in which inappropriate content was exposed due to a malfunction of a recommendation system. I completed a system rollback within 30 minutes, an assessment of the scope of impact within 2 hours, and a root cause analysis within 24 hours, and I was also in charge of writing the post-incident report."
Take a mock interview on this topic → WIA SOOM AI Interview · Start for free
Compliance: "Is this exception handling linked to the incident reporting system when a serious error occurs?"
Developer: "I've added an IncidentReporter hook. If severity is CRITICAL, it is automatically linked up to notifying the legal team."