⚖️ AI Regulation & Ethics

Algorithmic transparency

Algorithmic Transparency

Disclosing AI decision-making processes and logic so they can be understood. Closely related to explainable AI.

📖 Detailed Explanation

Algorithmic transparency is the principle of disclosing what data an AI system uses and what logic it uses to make decisions, so that stakeholders can understand it. Article 13 of the EU AI Act stipulates that high-risk AI systems "must be sufficiently transparent to enable users to interpret the system's output and use it appropriately." This goes beyond simply disclosing technical details and requires explanations at a level that non-experts can understand.

The level of transparency varies by audience. Regulators need technical details such as the model architecture, training data sources, and performance metrics. General users, on the other hand, are better served by easy-to-understand explanations such as "This decision was made based on your credit score and income level." The EU AI Act emphasizes this context-specific transparency, and Article 22 of Korea's AI Framework Act likewise specifies an obligation to "explain in a way that users can easily understand."

Technical approaches to implementing transparency include LIME (Local Interpretable Model-agnostic Explanations), SHAP (SHapley Additive exPlanations), and attention visualization. LIME generates an explanation for an individual prediction using a simple surrogate model, while SHAP calculates each feature's contribution based on game theory. However, such post-hoc explanations can differ from the model's actual internal workings, so it is recommended to use an inherently interpretable model from the design stage.

For violations of transparency requirements, the EU AI Act can impose fines of up to 15 million euros or 3% of worldwide turnover. In practice, documentation such as model cards, datasheets, and algorithm audit reports has become standard. Major companies such as Google and Microsoft publish model cards for their AI models, which is regarded as a best practice for ensuring transparency.

💻 Code Example

# SHAP을 이용한 모델 예측 설명 - 알고리즘 투명성 구현
# pip install shap scikit-learn pandas

import shap
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split

# 대출 승인 예측 모델 (예시 데이터)
data = pd.DataFrame({
    'credit_score': [720, 650, 580, 780, 620, 700, 550, 800],
    'annual_income': [75000, 45000, 35000, 120000, 42000, 85000, 28000, 150000],
    'debt_ratio': [0.25, 0.45, 0.55, 0.15, 0.50, 0.30, 0.65, 0.10],
    'employment_years': [8, 3, 1, 15, 2, 6, 0, 20],
    'approved': [1, 0, 0, 1, 0, 1, 0, 1]
})

X = data.drop('approved', axis=1)
y = data['approved']

# 모델 학습
model = RandomForestClassifier(n_estimators=100, random_state=42)
model.fit(X, y)

# SHAP Explainer 생성
explainer = shap.TreeExplainer(model)

# 신규 고객 예측 설명
new_customer = pd.DataFrame({
    'credit_score': [680],
    'annual_income': [55000],
    'debt_ratio': [0.35],
    'employment_years': [4]
})

prediction = model.predict(new_customer)[0]
prediction_proba = model.predict_proba(new_customer)[0]

# SHAP 값 계산
shap_values = explainer.shap_values(new_customer)

print("=" * 60)
print("🔍 AI 대출 심사 결과 투명성 보고서")
print("=" * 60)
print(f"\n예측 결과: {'승인' if prediction == 1 else '거절'}")
print(f"승인 확률: {prediction_proba[1]:.1%}")

print("\n📊 결정에 영향을 준 요인 (SHAP 기여도):")
print("-" * 40)

feature_importance = list(zip(
    X.columns,
    shap_values[1][0] if prediction == 1 else shap_values[0][0]
))
feature_importance.sort(key=lambda x: abs(x[1]), reverse=True)

for feature, importance in feature_importance:
    direction = "⬆️ 긍정" if importance > 0 else "⬇️ 부정"
    print(f"  {feature}: {direction} ({importance:+.3f})")

print("\n💡 사용자 친화적 설명:")
print("-" * 40)
print("""
이 결정은 다음 요인들을 종합적으로 고려하여 내려졌습니다:
- 신용점수 680점은 평균 수준입니다
- 연소득 대비 부채 비율 35%는 적정 범위입니다
- 4년의 근속연수는 안정성을 보여줍니다

※ 이 결정에 이의가 있으시면 인간 담당자 검토를 요청할 수 있습니다.
   (EU AI Act 제14조 인간 감독 권리)
""")

# 모델 카드 생성 (투명성 문서화)
model_card = """
=====================================
📋 모델 카드 (Model Card)
=====================================
모델명: 대출 승인 예측 모델 v1.0
개발일: 2026-01-26
개발자: KAITRUST AI팀

[모델 개요]
- 유형: Random Forest Classifier
- 목적: 대출 신청자의 승인/거절 예측
- 입력: 신용점수, 연소득, 부채비율, 근속연수
- 출력: 승인(1) / 거절(0) 및 확률

[성능 지표]
- 정확도: 85%
- 정밀도: 82%
- 재현율: 88%
- 공정성 지표: 성별 간 승인률 차이 < 5%

[제한사항]
- 학습 데이터 기간: 2020-2025
- 적용 대상: 개인 신용대출만 해당
- 자영업자 데이터 부족으로 해당 그룹 정확도 낮음

[윤리적 고려사항]
- 인종, 성별 등 민감 속성 직접 사용 안함
- 분기별 편향 감사 실시
- 이의 제기 시 인간 검토 보장
"""
print(model_card)

🗣️ How It's Said in Practice

PM: "Before launching in the EU market, we need to check whether we meet the AI Act's transparency requirements. What level is our recommendation system at right now?"

ML Engineer: "It's currently a black-box model, so it's hard to explain. We're adding a SHAP-based explanation module and writing a model card as well. To meet Article 13, we also need a UI that shows users 'why this content was recommended.'"

PM: "What goes into a model card?"

ML Engineer: "It covers the model's purpose, training data sources, performance metrics, limitations, and bias test results. We based it on Google's model card template and customized it for our situation."

Interviewer: "Please explain the difference between algorithmic transparency and explainable AI (XAI)."

Candidate: "Transparency is the broader concept, covering overall disclosure of how the model works, its training data, and its intended use. XAI is the technical part of it: techniques that generate explanations for individual predictions. For example, publishing a model card is transparency, while using LIME to explain 'why this customer was rejected' is XAI. The EU AI Act requires both and distinguishes between technical explanations and user-friendly explanations depending on the audience."

Senior: "This prediction API has no explanation feature. That could be a problem under the regulatory requirements."

Junior: "Would it be enough to return SHAP values along with it?"

Senior: "Technically yes, but general users need a natural-language explanation like 'your credit score had a positive effect on approval' rather than 'SHAP value 0.23.' We should separate the technical explanation from the user explanation and provide both."

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

⚠️ Cautions

📚 Learn More