⚖️ AI Regulation & Ethics

Code of Conduct

Code of Conduct

Ethical guidelines voluntarily applied to low-risk AI. Encouraged under the EU AI Act.

Detailed Explanation

A Code of Conduct is a voluntary ethical guideline defined in Article 95 of the EU AI Act, a set of norms that providers of low-risk AI systems can voluntarily comply with. Unlike the mandatory provisions that apply to high-risk AI, a code of conduct encourages self-regulation by the industry in the form of "soft law."

The EU AI Act encourages the AI Office to work with industry associations and civil society to develop codes of conduct. These include environmental sustainability, accessibility, diversity, and stakeholder participation. In particular, a draft of the code of conduct for generative AI (GPAI) was prepared by September 2024.

In practice, a code of conduct is implemented in the form of a company's AI ethics policy, developer guidelines, and internal audit checklists. It is common to draft one by referring to the AI ethics principles of international standardization bodies such as IEEE, ISO, and OECD. In Korea, the Ministry of Science and ICT (MSIT)'s 'AI Ethics Standards' play a similar role.

Compliance with a code of conduct is not a legal obligation, but it helps improve brand trust and mitigate regulatory risk. Companies that adopt a voluntary code of conduct before the EU AI Act takes full effect (2027) can secure an advantageous position in responding to regulation.

Code Example

# AI 행동 강령 준수 체크리스트 자동화
from dataclasses import dataclass
from enum import Enum
from typing import List
from datetime import datetime

class ComplianceLevel(Enum):
    FULLY_COMPLIANT = "fully_compliant"
    PARTIALLY_COMPLIANT = "partially_compliant"
    NON_COMPLIANT = "non_compliant"
    NOT_APPLICABLE = "not_applicable"

@dataclass
class CodeOfConductItem:
    """행동 강령 항목"""
    id: str
    category: str  # transparency, fairness, sustainability, accessibility
    requirement: str
    evidence: str = ""
    status: ComplianceLevel = ComplianceLevel.NON_COMPLIANT

class AICodeOfConductChecker:
    """EU AI Act 제95조 기반 행동 강령 체커"""

    def __init__(self, system_name: str):
        self.system_name = system_name
        self.items: List[CodeOfConductItem] = []
        self.checked_at = None
        self._init_checklist()

    def _init_checklist(self):
        """행동 강령 체크리스트 초기화"""
        self.items = [
            # 투명성
            CodeOfConductItem("T1", "transparency", "AI 시스템 사용 사실 고지"),
            CodeOfConductItem("T2", "transparency", "의사결정 로직 설명 제공"),
            CodeOfConductItem("T3", "transparency", "학습 데이터 출처 문서화"),

            # 공정성
            CodeOfConductItem("F1", "fairness", "편향성 테스트 수행"),
            CodeOfConductItem("F2", "fairness", "보호 그룹별 성능 평가"),
            CodeOfConductItem("F3", "fairness", "차별적 결과 모니터링"),

            # 환경 지속가능성
            CodeOfConductItem("S1", "sustainability", "탄소 배출량 측정"),
            CodeOfConductItem("S2", "sustainability", "에너지 효율 최적화"),

            # 접근성
            CodeOfConductItem("A1", "accessibility", "장애인 접근성 지원"),
            CodeOfConductItem("A2", "accessibility", "다국어 지원"),
        ]

    def check_item(self, item_id: str, status: ComplianceLevel, evidence: str = ""):
        """개별 항목 체크"""
        for item in self.items:
            if item.id == item_id:
                item.status = status
                item.evidence = evidence
                break

    def generate_report(self) -> dict:
        """준수 보고서 생성"""
        self.checked_at = datetime.now()

        total = len(self.items)
        compliant = sum(1 for i in self.items
                       if i.status == ComplianceLevel.FULLY_COMPLIANT)
        partial = sum(1 for i in self.items
                     if i.status == ComplianceLevel.PARTIALLY_COMPLIANT)

        return {
            "system_name": self.system_name,
            "checked_at": self.checked_at.isoformat(),
            "compliance_rate": f"{(compliant / total) * 100:.1f}%",
            "summary": {
                "fully_compliant": compliant,
                "partially_compliant": partial,
                "non_compliant": total - compliant - partial
            },
            "by_category": self._group_by_category(),
            "recommendations": self._generate_recommendations()
        }

    def _group_by_category(self) -> dict:
        categories = {}
        for item in self.items:
            if item.category not in categories:
                categories[item.category] = []
            categories[item.category].append({
                "id": item.id,
                "requirement": item.requirement,
                "status": item.status.value
            })
        return categories

    def _generate_recommendations(self) -> List[str]:
        recommendations = []
        non_compliant = [i for i in self.items
                        if i.status == ComplianceLevel.NON_COMPLIANT]
        for item in non_compliant[:3]:  # Top 3 우선순위
            recommendations.append(f"[{item.id}] {item.requirement} 준수 필요")
        return recommendations

# 사용 예시
checker = AICodeOfConductChecker("추천 시스템 v2.0")
checker.check_item("T1", ComplianceLevel.FULLY_COMPLIANT, "약관에 AI 사용 고지 포함")
checker.check_item("F1", ComplianceLevel.PARTIALLY_COMPLIANT, "분기별 편향성 테스트 진행 중")
checker.check_item("S1", ComplianceLevel.NON_COMPLIANT)

report = checker.generate_report()
print(f"준수율: {report['compliance_rate']}")

How It's Said in Practice

Head of Legal: "Our chatbot is low-risk AI, so the mandatory provisions of the EU AI Act don't apply to it, but I think we should adopt a code of conduct voluntarily. If regulations tighten later, it will be easier to respond."

Head of Development: "Should we create internal guidelines based on the IEEE or OECD AI principles?"

Head of Legal: "Yes, and let's add an environmental sustainability item as well. The EU also encourages disclosure of carbon footprints."

Interviewer: "What is the role of a code of conduct in relation to AI ethics?"

Candidate: "A code of conduct is a voluntary norm rather than a legal obligation, and it is a framework through which companies manage the transparency, fairness, and sustainability of their AI systems on their own. Article 95 of the EU AI Act recommends it for low-risk AI, and it helps with regulatory response and building brand trust."

Take a mock interview on this topic → WIA SOOM AI Interview · Start for free

Compliance Team: "This PR includes a feature that explains AI decision-making logic, so please document it in connection with the transparency requirements of the code of conduct."

Developer: "Okay, I'll add a transparency item mapping table to the XAI module README."

Cautions

Learn More