정형 데이터 특화 딥러닝(TabNet)과 거대언어모델(LLM) 기반 XAI-RAG를 활용한 설명 가능한 신용 평가 및 사용자 맞춤형 리포트 생성 : 어텐션-SHAP 융합 컨텍스트와 다중 평가 프레임워크 적용
Explainable Credit Scoring and Customer-Tailored Reports via Tabular-Specialized Deep Learning (TabNet) and LLM-based XAI-RAG : An Application of Attention-SHAP Fusion Context and a Multi-Tier Evaluation Framework
- 주제(키워드) 설명 가능한 인공지능 , SHAP , TabNet 어텐션 , 신용 평가 , 거대언어모델 , 검색 증강 생성 , 공정성 보정 , 교차 LLM 평가 , 자연어 추론 , Explainable Artificial Intelligence (XAI) , SHAP , TabNet attention , Credit Scoring , Large Language Model (LLM) , Retrieval-Augmented Generation (RAG) , Fairness Mitigation , Cross-Judge Evaluation , Natural Language Inference (NLI) , Reweighing
- 발행기관 서강대학교 AI.SW대학원
- 지도교수 박운상
- 발행년도 2026
- 학위수여년월 2026. 8
- 학위명 석사
- 학과 및 전공 AI.SW대학원 데이터사이언스 · 인공지능
- 세부분야 해당없음
- 실제URI http://www.dcollection.net/handler/sogang/000000083186
- UCI I804:11029-000000083186
- 본문언어 한국어
- 저작권 논문은 저작권에 의해 보호받습니다.
초록(요약문)
본 연구는 정형 데이터 특화 딥러닝 모델인 TabNet의 인스턴스 어텐션과 트리 부스팅 모델인 XGBoost의 SHAP 지역 기여도를 동의 기반(agreement-aware) 으로 인스턴스 수준에서 융합한 신규 컨텍스트를 설계하고, 이를 거대언어모델(LLM)의 검색 증강 생성(Retrieval-Augmented Generation, RAG) 파이프라인에 입력하여 신용평가 결과의 자연어 설명 리포트를 자동 생성하는 시스템을 제안한다. 융합 컨텍스트는 SHAP 상위 변수와 어텐션 상위 변수를 동의 그룹(agreed)·SHAP 단독(shap_only)·어텐션 단독(attention_only) 의 세 그룹으로 분해한 JSON 형식으로 구성되며, Anthropic Claude Sonnet 4.5와 Google Gemini 2.5 Flash 두 LLM에 동시 입력되어 한국어 자연어 설명을 생성한다. 본 연구는 Kaggle Home Credit Default Risk(307,511명, 214 변수)를 주 데이터셋으로 활용하고, UCI German Credit(1,000명, 63 변수)에 동일 파이프라인을 이식하여 일반화 가능성을 검증한다. 평가 체계는 룰 기반 충실성·환각률 측정, mDeBERTa 다국어 자연어 추론(NLI) 모델 기반 함의도, Anthropic과 Google 두 모델의 교차 LLM G-Eval (factual·completeness·sensitive·style 4차원), 그리고 신용 전문가·고객·규제기관 3-페르소나 LLM 대리 평가의 4-tier 구조로 설계되며, Kamiran-Calders Reweighing 기반의 공정성 보정 또한 함께 적용한다. 주요 결과는 다음과 같다. 첫째, 융합 컨텍스트는 두 데이터셋 모두에서 NLI 함의도 1위(0.625 / 0.711)를 달성하였으며 no_shap 〈 generic_rag 〈 shaponly 〈 fusion 의 단조 증가 패턴이 일관되게 관찰되었다. 둘째, hard constraint 조건에서 모든 모드의 환각률은 0%이지만 사실 기반 충실성과 값 정확 인용은 융합 모드에서만 일관되게 우월하였다. 셋째, Reweighing 공정성 보정은 보호 속성 4가지 조합 모두에서 4/5 규칙을 통과하면서 AUROC 손실은 0.004 이내에 머물렀다. 넷째, 페르소나 평가에서 사실성 1위는 fusion이지만 고객 명료성 1위는 generic_rag이며(2.67 vs 4.93), G-Eval 충실성은 데이터 복잡도에 따라 우월 모드가 정반대로 갈리는 응용 시나리오 × 평가 차원 × 데이터 복잡도 의 3차원 trade-off가 정량 입증되었다. 본 연구는 (1) 동의 기반 융합 컨텍스트의 신규 설계, (2) 4-tier 평가 프레임워크 구축, (3) 환각 차단과 fact-grounded 충실성의 분리 입증, (4) 두 데이터셋 일반화 검증, (5) 무손실 공정성 보정의 다섯 가지 학술적 기여를 제시하며, 모든 코드는 GitHub 공개 저장소(Tim-Green0/tabnet-xai-rag-credit)에 공개하여 재현 가능성을 확보한다.
more초록(요약문)
Machine learning credit-scoring models often face a dual demand of high predictive accuracy and transparent justification for downstream regulatory and customer-facing applications. While SHAP and attention-based explanations have emerged separately, their fusion in a single context for downstream large language model (LLM) based natural-language reports remains under-explored. This thesis proposes an agreement-aware fusion context that combines local SHAP values from XGBoost with TabNet attention masks at the instance level, classifying drivers into three groups — agreed, shap_only, and attention_only — and feeding the structured JSON to a retrieval-augmented generation (RAG) pipeline based on Anthropic Claude Sonnet 4.5 and Google Gemini 2.5 Flash. We evaluate the proposed system on Kaggle Home Credit Default Risk (307K samples, 214 features) and validate generalization on UCI German Credit (1K samples, 63 features). A four-tier evaluation framework — rule-based faithfulness and hallucination, mDeBERTa-NLI entailment for semantic faithfulness, cross-judge G-Eval (Claude × Gemini) over four dimensions, and a three-persona (Credit Expert / Customer / Regulator) LLM-proxy pilot — together with Reweighing-based fairness mitigation, demonstrates the following findings. First, the fusion mode achieves the highest NLI entailment in both datasets (0.625 / 0.711), with a consistent monotonic increase across the four modes (no_shap 〈 generic_rag 〈 shaponly 〈 fusion). Second, hallucination is eliminated in all modes via hard constraints, but only fusion achieves fact-grounded faithfulness in semantic and value-citation dimensions. Third, Reweighing-based fairness mitigation passes the 4/5 rule on all four protected-attribute combinations with negligible AUROC change (loss within 0.004). Fourth, mode selection follows an application × evaluation-dimension × data-complexity trade-off — fusion fits audit/regulation in complex-domain settings while generic_rag fits customer-facing in simpler domains. This thesis contributes (a) a novel agreement-aware fusion context schema for SHAP × attention integration, (b) a four-tier evaluation framework combining rule-based, NLI-based, cross-judge LLM, and persona-based measures, (c) generalization evidence on a second dataset with consistent Spearman ρ ≈ 0.11 and monotonic NLI patterns, (d) a Reweighing-based fairness solution preserving model performance, and (e) an honest reporting of customer-clarity weakness and data-complexity dependence. All code is released as an open-source repository at Tim-Green0/tabnet-xai-rag-credit on GitHub for reproducibility.
more목차
목 차 5
표 차례. 6
그림 차례 7
초록 / Abstract 8
English Abstract 8
국문 초록 9
제 1 장. 서론 11
1.1 연구 배경 및 목적 11
1.2 연구 동기 및 연구 질문 12
1.3 본 논문의 기여 14
1.4 논문 구성 15
제 2 장. 이론적 배경 17
2.1 신용평가 시스템의 이론적 배경 17
2.2 머신러닝딥러닝 기반 신용 리스크 예측 연구 동향 17
2.3 설명 가능한 인공지능(XAI) 18
2.3.1 SHAP 18
2.3.2 TabNet의 인스턴스 수준 어텐션 19
2.3.3 SHAP과 어텐션의 일관성에 관한 선행 연구 19
2.4 거대언어모델 기반 자연어 설명과 RAG 20
2.4.1 LLM과 검색 증강 생성(RAG) 20
2.4.2 환각의 정의와 정량 평가 20
2.5 신용평가의 공정성 21
2.5.1 4/5 규칙과 Disparate Impact 21
2.5.2 공정성 보정 기법 21
2.6 LLM 평가 방법론 22
2.6.1 G-Eval과 LLM-as-a-Judge 22
2.6.2 NLI 기반 의미적 충실성 평가 22
2.6.3 페르소나 기반 평가 23
제 3 장. 연구 방법론 24
3.1.1 데이터셋 개요 24
3.1.2 탐색적 데이터 분석 26
3.1.3 전처리 정책 28
3.2.1 시스템 전체 구조 30
3.2.2 예측 모델 학습 32
3.2.3 모델 해석 33
3.2.4 Agreement-aware Fusion Context ( 본 연구의 핵심 기여) 34
3.2.5 LLM-RAG 자연어 설명 생성 36
3.2.6 공정성-aware 학습 38
3.3.1 모델 성능 지표 39
3.3.2 룰 기반 평가 39
3.3.3 NLI 기반 의미적 충실성 평가 40
3.3.4 G-Eval (LLM-as-a-Judge) 42
3.3.5 Pilot Human-Proxy 평가. 43
3.3.6 공정성 평가 44
3.3.7 평가 프레임워크 통합 45
제 4 장. 분석 결과 46
4.1 모델 성능 비교 46
4.1.1 Home Credit Default Risk 5-fold CV 결과 46
4.1.2 보조 테이블 추가 효과 47
4.1.3 UCI German Credit 5-fold CV 결과 47
4.1.4 신용평가 산업 벤치마크 및 실무 수준 평가 47
4.2 SHAP 어텐션 일관성 50
4.2.1 Home Credit 일관성 분석 50
4.2.2 인스턴스 수준 동의 통계 51
4.3 4-mode 자연어 설명 비교 51
4.3.1 4-mode 정의와 평가 대상 51
4.3.2 환각률 (Hallucination Rate) 52
4.3.3 NLI Entailment Rate 53
4.3.4 Value Match Rate 54
4.3.5 G-Eval (Cross-judge) 결과 55
4.3.6 Counterfactual baseline (Step 1) 55
4.4 Persona 평가 결과 56
4.4.1 페르소나별 trade-off 56
4.5 공정성 mitigation 결과 58
4.5.1 Reweighing 4/4 통과 58
4.5.2 Fairlearn ExpGrad 비교 59
4.5.3 Day 5 결론의 갱신 60
4.6 일반화 검증 (UCI German Credit) 60
4.6.1 SHAP 어텐션 일관성의 데이터셋 간 일관 60
4.6.2 4-mode NLI Entailment의 데이터셋 간 일관 60
4.6.3 G-Eval Completeness의 데이터셋별 차이 61
4.6.4 일반화 검증의 종합 평가 61
4.7 분석 결과 종합 62
제 5 장. 결론 및 시사점 64
5.1.1 본 연구의 핵심 발견 64
5.1.2 응용 시사점 65
5.1.3 본 연구의 한계 (Honest Reporting) 66
5.1.4 향후 연구 방향 68
5.1.5 종합 정리 69
5.2.1 연구 요약 70
5.2.2 본 연구의 학술적 기여 71
5.2.3 산업적 시사점 72
5.2.4 마무리 73
참고문헌 (References, IEEE Style) 74
한국어 문헌 76
부록 (Appendix) 77
부록 A. SHAP Global Importance Top-50 (Home Credit) 77
부록 B. 보호 속성 분포 (양 데이터셋) 77
B.1 Home Credit 77
B.2 UCI German Credit 78
부록 C. LLM 프롬프트 전문 (4-mode) 78
C.1 no_shap 모드 프롬프트 78
C.2 generic_rag 모드 프롬프트 79
C.3 shaponly 모드 프롬프트 79
C.4 fusion 모드 프롬프트 79
부록 D. G-Eval Rubric과 NLI 라벨 79
D.1 G-Eval Rubric (전문) 79
D.2 mDeBERTa NLI 모델 라벨 매핑 80
부록 E. 4-mode 자연어 설명 예시 80
E.1 no_shap 모드 출력 (요약) 80
E.2 generic_rag 모드 출력 (요약) 80
E.3 shaponly 모드 출력 (요약) 81
E.4 fusion 모드 출력 (요약) 81
부록 F. 코드 저장소 안내 81

