AI fairness is increasingly governed by legal and regulatory requirements. This chapter covers the regulatory landscape, compliance requirements, and documentation practices for AI systems aligned with 弘益人間 principles.
Different jurisdictions have different approaches to regulating AI fairness. Understanding these regulations is crucial for deploying compliant AI systems.
The EU AI Act classifies AI systems based on risk levels:
| Risk Level | Examples | Requirements |
|---|---|---|
| Unacceptable Risk | Social scoring, real-time biometric surveillance | Prohibited |
| High Risk | Hiring, credit scoring, law enforcement | Strict compliance requirements |
| Limited Risk | Chatbots, deepfakes | Transparency obligations |
| Minimal Risk | Spam filters, video games | No specific requirements |
High-risk AI systems must meet stringent requirements:
# EU AI Act Compliance Checklist
class EUAIActCompliance:
"""
Track compliance with EU AI Act requirements
"""
def __init__(self, system_name, risk_level):
self.system_name = system_name
self.risk_level = risk_level
self.compliance_checklist = self._initialize_checklist()
def _initialize_checklist(self):
"""
Initialize compliance requirements based on risk level
"""
if self.risk_level == "high":
return {
'risk_management': {
'required': True,
'completed': False,
'description': 'Establish risk management system'
},
'data_governance': {
'required': True,
'completed': False,
'description': 'Implement data governance practices'
},
'technical_documentation': {
'required': True,
'completed': False,
'description': 'Maintain comprehensive technical documentation'
},
'record_keeping': {
'required': True,
'completed': False,
'description': 'Automatic logging of events'
},
'transparency': {
'required': True,
'completed': False,
'description': 'Provide clear information to users'
},
'human_oversight': {
'required': True,
'completed': False,
'description': 'Ensure meaningful human oversight'
},
'accuracy_robustness': {
'required': True,
'completed': False,
'description': 'Demonstrate appropriate accuracy and robustness'
},
'cybersecurity': {
'required': True,
'completed': False,
'description': 'Implement cybersecurity measures'
},
'conformity_assessment': {
'required': True,
'completed': False,
'description': 'Undergo conformity assessment'
}
}
else:
return {}
def mark_completed(self, requirement):
"""
Mark requirement as completed
"""
if requirement in self.compliance_checklist:
self.compliance_checklist[requirement]['completed'] = True
print(f"✓ Marked '{requirement}' as completed")
def generate_compliance_report(self):
"""
Generate compliance status report
"""
print("\nEU AI ACT COMPLIANCE REPORT")
print("=" * 70)
print(f"System: {self.system_name}")
print(f"Risk Level: {self.risk_level}")
if not self.compliance_checklist:
print("\nNo specific requirements for this risk level")
return
total = len(self.compliance_checklist)
completed = sum(1 for r in self.compliance_checklist.values() if r['completed'])
print(f"\nCompliance Status: {completed}/{total} requirements met")
print("-" * 70)
for req_name, req_data in self.compliance_checklist.items():
status = "✓" if req_data['completed'] else "✗"
print(f"{status} {req_name}: {req_data['description']}")
if completed == total:
print("\n✓ FULLY COMPLIANT")
else:
print(f"\n⚠ {total - completed} requirements outstanding")
print("\n弘益人間 - Compliance ensures fairness for all users")
print("=" * 70)
return completed / total if total > 0 else 1.0
# Usage
# compliance = EUAIActCompliance("Hiring AI", "high")
# compliance.generate_compliance_report()
GDPR Article 22 gives individuals the right to explanation for automated decisions.
# GDPR-Compliant Explanation System
class GDPRExplanationSystem:
"""
Generate GDPR-compliant explanations for AI decisions
"""
def __init__(self, model, feature_names):
self.model = model
self.feature_names = feature_names
def generate_explanation(self, instance, prediction):
"""
Generate human-readable explanation for decision
"""
explanation = {
'decision': 'Approved' if prediction == 1 else 'Rejected',
'confidence': self.model.predict_proba([instance])[0][prediction],
'factors': self._get_influential_factors(instance),
'alternative_outcome': self._alternative_outcome_guidance(instance),
'appeal_process': 'Contact support@company.com to request human review'
}
return explanation
def _get_influential_factors(self, instance):
"""
Identify most influential factors in decision
"""
# Simplified - in practice would use SHAP or LIME
feature_importance = self.model.feature_importances_
instance_values = instance
factors = []
for i, (fname, fvalue, importance) in enumerate(
zip(self.feature_names, instance_values, feature_importance)
):
if importance > 0.1: # Significant factors
factors.append({
'factor': fname,
'value': fvalue,
'importance': importance,
'impact': 'positive' if fvalue > 0 else 'negative'
})
return sorted(factors, key=lambda x: x['importance'], reverse=True)[:5]
def _alternative_outcome_guidance(self, instance):
"""
Provide guidance on how to achieve alternative outcome
"""
# Identify what would need to change for different outcome
guidance = []
# This is simplified - actual implementation would use counterfactual explanation
guidance.append("Improving credit score by 50 points may change the outcome")
guidance.append("Reducing debt-to-income ratio to below 30% may help")
return guidance
def format_user_friendly_explanation(self, explanation):
"""
Format explanation for end user
"""
output = f"\nDECISION EXPLANATION\n"
output += "=" * 70 + "\n"
output += f"Decision: {explanation['decision']}\n"
output += f"Confidence: {explanation['confidence']:.0%}\n\n"
output += "Key Factors in This Decision:\n"
output += "-" * 70 + "\n"
for i, factor in enumerate(explanation['factors'], 1):
output += f"{i}. {factor['factor']}: {factor['value']} "
output += f"({factor['impact']} influence)\n"
output += "\nTo Achieve Different Outcome:\n"
output += "-" * 70 + "\n"
for guidance in explanation['alternative_outcome']:
output += f"• {guidance}\n"
output += f"\nAppeal Process:\n{explanation['appeal_process']}\n"
output += "\n" + "=" * 70
return output
# Usage
# explainer = GDPRExplanationSystem(model, feature_names)
# explanation = explainer.generate_explanation(instance, prediction)
# print(explainer.format_user_friendly_explanation(explanation))
ECOA prohibits discrimination in credit decisions based on protected characteristics.
# ECOA Compliance Checker
class ECOACompliance:
"""
Check compliance with ECOA requirements
"""
def __init__(self):
self.protected_attributes = [
'race', 'color', 'religion', 'national_origin',
'sex', 'marital_status', 'age'
]
def check_adverse_action_notice(self, decision, reasons):
"""
Verify adverse action notice requirements
"""
if decision == 'rejected':
required_elements = {
'specific_reasons': len(reasons) > 0,
'max_four_reasons': len(reasons) <= 4,
'applicant_rights': True, # Must inform of rights
'contact_info': True # Must provide contact for questions
}
compliance = all(required_elements.values())
if not compliance:
print("⚠️ Adverse action notice incomplete")
for element, satisfied in required_elements.items():
if not satisfied:
print(f" Missing: {element}")
return compliance
return True # No adverse action notice needed for approvals
def verify_prohibited_factors(self, model_features):
"""
Ensure protected attributes are not used (with exceptions)
"""
prohibited_found = []
for attr in self.protected_attributes:
if attr in model_features:
# Age is allowed for certain purposes
if attr == 'age' and self._age_allowed():
continue
prohibited_found.append(attr)
if prohibited_found:
print("⚠️ WARNING: Potentially prohibited factors found:")
for factor in prohibited_found:
print(f" • {factor}")
print("\nEnsure these are used legally or remove them")
return len(prohibited_found) == 0
def _age_allowed(self):
"""
Check if age usage is permitted (e.g., to favor elderly)
"""
# Simplified - actual implementation would check specific context
return False
# Usage
# ecoa = ECOACompliance()
# ecoa.check_adverse_action_notice('rejected', ['insufficient income', 'high debt ratio'])
Prohibits discrimination in housing-related decisions.
Equal Employment Opportunity Commission provides guidelines for fair employment practices.
# EEOC Compliance - Adverse Impact Analysis
class EEOCCompliance:
"""
Perform adverse impact analysis per EEOC guidelines
"""
def four_fifths_rule(self, selection_rates):
"""
Apply the 80% (four-fifths) rule
"""
print("\nEEOC FOUR-FIFTHS RULE ANALYSIS")
print("=" * 70)
groups = list(selection_rates.keys())
rates = list(selection_rates.values())
# Find highest selection rate
max_rate = max(rates)
max_group = groups[rates.index(max_rate)]
print(f"Highest selection rate: {max_group} ({max_rate:.1%})")
print(f"\nFour-fifths threshold: {max_rate * 0.8:.1%}")
print("-" * 70)
violations = []
for group, rate in selection_rates.items():
ratio = rate / max_rate
compliant = ratio >= 0.8
status = "✓ PASS" if compliant else "✗ FAIL"
print(f"{group:<20} {rate:.1%} {ratio:.2f} {status}")
if not compliant:
violations.append({
'group': group,
'rate': rate,
'ratio': ratio
})
if violations:
print(f"\n⚠️ ADVERSE IMPACT DETECTED")
print("EEOC may consider this evidence of discrimination")
print("\nRecommendations:")
print("1. Review selection criteria for bias")
print("2. Consider alternative selection methods")
print("3. Document business necessity if criteria maintained")
print("4. Implement measures to reduce adverse impact")
else:
print(f"\n✓ NO ADVERSE IMPACT DETECTED")
print("System meets four-fifths rule")
print("\n弘益人間 - Fair employment for all")
print("=" * 70)
return len(violations) == 0
# Usage
# eeoc = EEOCCompliance()
# selection_rates = {'male': 0.45, 'female': 0.32}
# eeoc.four_fifths_rule(selection_rates)
Standardized documentation of model characteristics and performance.
# Model Card Generator
class ModelCard:
"""
Generate comprehensive model card for documentation
"""
def __init__(self, model_name, version):
self.model_name = model_name
self.version = version
self.sections = {}
def add_model_details(self, details):
"""
Add basic model information
"""
self.sections['model_details'] = details
def add_intended_use(self, use_case, users, out_of_scope):
"""
Document intended use and limitations
"""
self.sections['intended_use'] = {
'primary_use': use_case,
'intended_users': users,
'out_of_scope_uses': out_of_scope
}
def add_training_data(self, description, size, demographics):
"""
Document training data characteristics
"""
self.sections['training_data'] = {
'description': description,
'size': size,
'demographics': demographics
}
def add_performance_metrics(self, overall, by_group):
"""
Document performance across groups
"""
self.sections['performance'] = {
'overall': overall,
'by_group': by_group
}
def add_fairness_assessment(self, metrics, mitigation):
"""
Document fairness evaluation and mitigation
"""
self.sections['fairness'] = {
'metrics': metrics,
'mitigation_strategies': mitigation
}
def add_ethical_considerations(self, considerations):
"""
Document ethical considerations and risks
"""
self.sections['ethical_considerations'] = considerations
def generate_card(self):
"""
Generate complete model card
"""
card = f"""
MODEL CARD: {self.model_name} v{self.version}
{'=' * 70}
MODEL DETAILS
{'-' * 70}
{self._format_section(self.sections.get('model_details', {}))}
INTENDED USE
{'-' * 70}
{self._format_section(self.sections.get('intended_use', {}))}
TRAINING DATA
{'-' * 70}
{self._format_section(self.sections.get('training_data', {}))}
PERFORMANCE METRICS
{'-' * 70}
{self._format_section(self.sections.get('performance', {}))}
FAIRNESS ASSESSMENT
{'-' * 70}
{self._format_section(self.sections.get('fairness', {}))}
ETHICAL CONSIDERATIONS
{'-' * 70}
{self._format_section(self.sections.get('ethical_considerations', {}))}
{'=' * 70}
弘益人間 - Transparent AI for All Humanity
Generated: {datetime.now().strftime('%Y-%m-%d')}
"""
return card
def _format_section(self, section_data):
"""
Format section data for display
"""
if isinstance(section_data, dict):
return '\n'.join(f"{k}: {v}" for k, v in section_data.items())
elif isinstance(section_data, list):
return '\n'.join(f"• {item}" for item in section_data)
else:
return str(section_data)
# Usage
# card = ModelCard("Credit Scoring Model", "2.1")
# card.add_model_details({'type': 'Random Forest', 'features': 25})
# card.add_fairness_assessment(
# metrics={'demographic_parity': 0.92},
# mitigation=['reweighting', 'threshold optimization']
# )
# print(card.generate_card())
# Comprehensive Audit Trail System
class AuditTrail:
"""
Maintain comprehensive audit trail for compliance
"""
def __init__(self, system_name):
self.system_name = system_name
self.records = []
def log_decision(self, decision_id, inputs, outputs, timestamp=None):
"""
Log individual decision with all details
"""
if timestamp is None:
timestamp = datetime.now()
record = {
'decision_id': decision_id,
'timestamp': timestamp,
'inputs': inputs,
'outputs': outputs,
'system_version': self.get_system_version()
}
self.records.append(record)
def log_model_update(self, old_version, new_version, changes):
"""
Log model updates and changes
"""
record = {
'type': 'model_update',
'timestamp': datetime.now(),
'old_version': old_version,
'new_version': new_version,
'changes': changes
}
self.records.append(record)
def log_fairness_audit(self, audit_results):
"""
Log fairness audit results
"""
record = {
'type': 'fairness_audit',
'timestamp': datetime.now(),
'results': audit_results
}
self.records.append(record)
def get_system_version(self):
"""
Get current system version
"""
return "v2.1.0" # Would be dynamically retrieved
def export_audit_trail(self, output_file):
"""
Export audit trail for regulatory review
"""
import json
with open(output_file, 'w') as f:
json.dump({
'system_name': self.system_name,
'export_date': datetime.now().isoformat(),
'total_records': len(self.records),
'records': self.records
}, f, indent=2, default=str)
print(f"Audit trail exported to {output_file}")
print(f"Total records: {len(self.records)}")
# Usage
# audit_trail = AuditTrail("Hiring AI System")
# audit_trail.log_decision("D123456", inputs, outputs)
# audit_trail.export_audit_trail("audit_trail_2025.json")
Korea operates its industrial ecosystem and standardization system through the following core infrastructure. Korea Top 5 Groups: Samsung, Hyundai Motor, LG, SK, Lotte. Each group operates standardization committees and ISO/IEC TC Korean secretariats. Samsung Electronics (semiconductors, displays, home appliances, telecom)·Hyundai Motor (automobiles, mobility)·LG Electronics (home appliances, displays, OLED)·SK hynix (memory)·LG Energy Solution·Samsung SDI (batteries)·POSCO Future M (materials)·Hyundai Mobis (parts). Korean IT Big Tech: NAVER (search, cloud, AI HyperCLOVA)·Kakao (messenger, payment, mobility, banking)·Coupang (e-commerce, logistics)·Karrot Market·Toss·Woowa Brothers. Korea Telcos: SK Telecom·KT·LG U+. 5G·5G dedicated networks·B2B cloud·AI businesses operating. Korea Top 7 Research Universities: Seoul National University·KAIST·POSTECH·Yonsei University·Korea University·UNIST·DGIST·GIST. All serve as standardization R&D bases and ISO/IEC/IEEE Korean chairs. Korea Government-affiliated National Research Institutes (26): KIST, KAERI, KIMM, KIER, KFRI, KRICT, KRIBB, KARI, KASI, KIGAM, KICT, KISTI, KETI, ETRI, NIMS, KIMS, KISDI, KOTRA, STEPI, KOEN, KICCE, KIET, KIPF, KIHASA, KICJ, KLRI. Korea Industrial Complexes / Tech Valleys: Pangyo Techno Valley·Dongtan·Gwanggyo·Songdo IBD·Yeouido·Gangnam·Sihwa·Banwol·Gumi·Ulsan·Changwon·Geoje·Yeosu·Onsan·Cheongju·Iksan·Gwangyang·POSCO Gwangyang Steel Mill·Asan Bay·Seosan·Songdo·Incheon Airport·Sejong·Cheongna·Geomdan. Korea Trade and Finance Infrastructure: Korea International Trade Association (KITA)·Korea Trade-Investment Promotion Agency (KOTRA)·Export-Import Bank of Korea (KEXIM)·Bank of Korea·Kookmin Bank·Shinhan·Hana·Woori·NH Nonghyup·IBK Industrial Bank·SC First Bank·Citi Bank Korea·HSBC Korea·DBS Korea — 14 Korean major banks and foreign banks. Korea K-POP / K-Content: HYBE·SM·YG·JYP 4 major entertainment companies·CJ ENM·tvN·MBC·KBS·SBS·EBS·YTN·Yonhap News TV·JTBC Korean broadcasting·NETFLIX Korea·Disney Plus·TVING·Wavve·Watcha·Coupang Play. Korea Gaming Industry: Nexon·NCsoft·Krafton·Netmarble·Kakao Games·Pearl Abyss·Com2uS·Gamevil·NHN·Smilegate·Webzen. Korea Automotive / Battery: Hyundai Motor·Kia·Genesis·LG Energy Solution·Samsung SDI·SK On·POSCO Future M·EcoPro·L&F battery cathode material suppliers. Korea Semiconductor: Samsung Electronics (HBM3E·HBM4)·SK hynix (HBM3E 12-Hi)·DB HiTek·SK siltron·SK Enpulse·Dongjin Semichem·Seoul Semiconductor·Simmtech·Samsung Display·LG Display.
Korea operates a comprehensive standards governance system through inter-ministerial cooperation. National Standards Council (under Prime Minister's Office, per Framework Act on National Standards Article 5) coordinates KATS (Korean Agency for Technology and Standards), MFDS (Ministry of Food and Drug Safety), MOTIE (Ministry of Trade, Industry and Energy), MSIT (Ministry of Science and ICT), MOIS (Ministry of the Interior and Safety), MOE (Ministry of Environment), MOHW (Ministry of Health and Welfare), MND (Ministry of National Defense), MCST (Ministry of Culture, Sports and Tourism), MOFA (Ministry of Foreign Affairs), MOJ (Ministry of Justice), and FSC (Financial Services Commission). Accreditation and Testing: KOLAS (Korea Laboratory Accreditation Scheme) accredits 800+ testing laboratories. KAS (Korea Accreditation System) accredits 50+ certification bodies. KTC (Korea Testing Certification), KTR (Korea Testing & Research Institute), KTL (Korea Testing Laboratory), and KCL (Korea Conformity Laboratories) provide conformance testing. Telecom and Cyber: KCC (Korea Communications Commission), KCA (Korea Communications Agency), TTA (Telecommunications Technology Association), IITP (Institute for Information & Communications Technology Planning & Evaluation), NIPA (National IT Industry Promotion Agency), KISA (Korea Internet & Security Agency), KCMVP (Korea Cryptographic Module Validation Program), NIS (National Intelligence Service), NSR (National Security Research Institute), and NCSC (National Cyber Security Center). National R&D Centers: KIST, ETRI, KAIST, Seoul National University, Yonsei University, Korea University, POSTECH, UNIST, GIST, DGIST, KISTI, KIER, KIMM, KRICT, KFRI, KRIBB. International Standards Cooperation: ISO TC/SC Korean secretariats, IEC TC/SC Korean secretariats, ITU-T Study Group Korean chairs, 3GPP RAN/SA Korean chairs, IEEE 802 Korean chairs, W3C Korea office, OASIS Korea office, IETF Korea cooperation, OECD CSTP, UN ESCAP, APEC SCSC Korean cooperation. Korean Industrial Standards (KS) Catalog: KS X (Information) 25,000+, KS A (Basic) 15,000+, KS B (Machinery) 25,000+, KS C (Electrical) 18,000+, KS D (Metallurgy) 12,000+, KS E (Mining) 5,000+, KS F (Construction) 18,000+, KS H (Food) 8,000+, KS I (Environment) 5,000+, KS J (Biology) 3,000+, KS K (Textile) 15,000+, KS L (Ceramics) 7,000+, KS M (Chemistry) 12,000+, KS P (Medical) 5,000+, KS Q (Quality Mgmt) 4,000+, KS R (Transport) 12,000+, KS S (Service) 3,000+, KS T (Packaging) 4,000+, KS V (Shipbuilding) 5,000+, KS W (Aerospace) 3,000+ — totaling 220,000+ Korean Industrial Standards. Key Acts: Personal Information Protection Act (Act 19234, effective Sept 15, 2024), Electronic Government Act, Electronic Signature Act, Act on Promotion of Information and Communications Network Utilization and Information Protection, Information and Communications Infrastructure Protection Act, Data Industry Act, Public Data Act, AI Framework Act (Act 20212, effective July 2026), Industrial Technology Innovation Promotion Act, Framework Act on Science and Technology — 70+ Korean standardization-related laws.
Korea operates digital transformation through a comprehensive governance system. Digital Government: Digital Platform Government Committee (established September 2022, under the President)·Ministry of the Interior and Safety Digital Government Bureau·e-Government Support Center·Gov.kr·National Citizen Service·KDIS (Korea Digital Information Society)·NIA (National Information Society Agency)·MOIS (Ministry of the Interior and Safety). K-DNS Infrastructure: Korea Internet & Security Agency (KISA) Korea Internet Center·KISA DNS Root Server·KRNIC (Korea Network Information Center)·BGP Korea·National Cyber Security Center (NCSC)·KCC (Korea Communications Commission)·MSIT (Ministry of Science and ICT)·NIA·NIPA. Korean Cloud Infrastructure: KT Cloud·NAVER Cloud (NCloud)·Samsung SDS Cloud·LG U+ Cloud·NHN Cloud·Kakao Enterprise Cloud·SK Telecom Cloud·KISA Cloud Security Assurance Program (CSAP)·KCMVP-validated cloud·ISMS-P (Information Security & Personal Information Management System). Korean Security Certifications: KISA ISMS-P certification·KCMVP (Korean Cryptographic Module Validation Program)·NIS (National Intelligence Service) "National Cryptographic Technology Operation Standards"·NCSC "National Cyber Security Strategy 2024-2028"·CC (Common Criteria) Korean evaluation bodies·EAL4·EAL5·KS X ISO/IEC 15408·19790·24759 Korean Profile. Korean Data Standards: NIA AI Hub·National Data Standardization Committee·Statistics Korea (KOSTAT)·MyData 4 Designated Combination Specialists (Samsung SDS, KICI, KOSTAT, KFTC)·National Institute of Korean Language·National Law Information Center·National Spatial Information Platform·National Spatial Data Center·Korean Spatial Information Standards. Finance and Fintech Standards: FSC (Financial Services Commission)·FSS (Financial Supervisory Service)·FIU (Financial Intelligence Unit)·BOK (Bank of Korea)·FSEC (Financial Security Institute)·KFTC (Korea Financial Telecommunications)·KSD (Korea Securities Depository)·KRX (Korea Exchange) 8-agency cooperation. 5G/6G Communications Infrastructure: 5G subscribers 35 million (2024)·5G base stations 350,000·6G commercialization target 2028·5G dedicated networks 16 operators·6G Acceleration Council (MSIT, 2024). K-Content: KOCCA (Korea Creative Content Agency)·MCST (Ministry of Culture, Sports and Tourism)·KCA (Korea Communications Agency)·Korea Culture Information Service Agency·Korean Film Archive·Korea Publishing Industry Promotion Agency. Data 3 Acts (Personal Information Protection Act·Credit Information Act·Telecommunications Network Act, 2020 enforcement)·Data Industry Act (2021)·Public Data Act (2013)·AI Framework Act (2026)·Digital Platform Government Framework Act (2024 proposed) — Korea digital transformation core legislation.