검색 상세

딥러닝 기반 OCR 금융 문서와 원장 데이터 간 이상 탐지 모델 연구

A Study on Deep Learning-based Anomaly Detection Model between OCR Financial Documents and Ledger Data

초록(요약문)

본 논문은 금융기관에서 계약 체결 과정에 발생할 수 있는 계약서 작성 오류를 탐지하기 위해, 비정형 금융 계약서에서 OCR 처리한 데이터와 전산 원장(Ledger) 데이터를 비교 쌍으로 구성하여 양자 간 정합성을 탐지하는 딥러닝 기반 이상 탐지 모델을 제안한다. 금융 계약서의 오기재 및 누락은 법률적 분쟁이나 내부통제 리스크를 초래하며 계약 문서의 이상을 점검하는데 많은 비용이 발생한다. 본 논문은 이러한 리스크를 사전에 감지하여 비용 효율화를 목표로 한다. 기존의 이상 탐지 기법은 통계적 이상값이나 군집에서 벗어난 개체를 이상치로 찾았으나, 해당 데이터가 실제 이상 값인지 구분할 수 없다는 한계가 있었다. 본 논문은 금융 서류에서 OCR로 추출한데이터와전산원장에서추출한데이터를비교쌍으로생성하여,이를이용해양자간정합성을 판단하는 지도학습 기반 모델을 구성한다. 이를 위해 AI-HUB 금융 OCR 데이터를 기반으로 문서 이미지에서 OCR 텍스트를 추출하고, 이를 표준화된 스키마의 원장(DB) 데이터를 1:1로 매칭한 OCR-DB Pair 데이터셋을 구성하였다. 또, 이상 데이터 부족 문제를 완화하기 위해 SMOTE(Synthetic Minority Over-sampling Technique) 기법을 활용하였고 문자 기반 거리(Levenshtein, Jaro–Winkler 등)와 계층적 특징 등을 포함한 수치형 특징 (feature) 벡터를 생성하여 학습용 데이터셋을 구성하였다. 제안모델은 (1)규칙기반어휘적(lexical)거리를학습하는피처기반다층퍼셉트론(MLP)모델, (2) 문자 단위 CharCNN을 이용해 구조적 유사도를 학습하는 Siamese 인코더 모델, (3) 한국어 사전학습 언어모델인 klue/roberta-small을 기반으로 문맥적 의미를 학습하는 Transformer 기반 문장 인코더로 구성된다. 또한 이들 모델의 필드별 강점을 극대화하기 위해, 검증 데이터의 혼동행렬을 분석하여 필드별 최적의 모델을 선별 ·결합하는 필드-전문가 앙상블(Ensemble-CM)을 설계하고 Temperature Scaling을 통해 최종 예측 확률을 보정하였다. 문서 단위 PR-AUC, Log Loss, 신뢰도 보정 지표(ECE), 랭킹 기반 지표(Precision@K)를 활용하여 성능을 평가한 결과, 제안된 앙상블 모델은 문서 단위 PR-AUC 0.824를 달성하여, 단일 OCR 텍스트만을 활용한 BERT 기반 문서 분류기(PR-AUC 0.805)보다 우수한 이상 탐지 성능을 보였다. 확률 보정 지표 Log Loss는 0.59을 기록하여 예측 확률의 신뢰성이 높았으며, 상위 5% 위험 후보 문서를 대상으로 한 Precision@5%가 약 0.96으로 나타나, 인력이 한정된 실무 환경에서 유의미한 효율성을 확인하였다. 본연구를통해비정형서류기반금융업무에서발생하는오류를자동화된방식으로탐지하는것이 가능함을 실증적으로 보였으며, 내부통제 고도화 및 대출 심사 ·사후관리 자동화에 기여할 수 있고 비용 절감으로 인한 실무적 효용성에도 기여할 수 있을 것으로 기대된다.

more

초록(요약문)

This paper proposes a deep learning-based anomaly detection model to detect drafting errors in contracts during the execution process in financial institutions. It identifies inconsistencies between OCR-extracted data from unstructured financial contracts and digital Ledger data by forming comparison pairs. Errors and omissions in financial contracts can lead to legal disputes and internal control risks, incurring significant costs for document verification. This study aims to preemptively detect such risks and reduce operational costs. Existing anomaly detection methods typically identify anomalies as statistical outliers or instances deviating from clusters; however, they face limitations in distinguishing whether the data represents actual errors. This paper constructs a supervised learning-based model that evaluates consistency by generating comparison pairs from OCR-extracted document data and Ledger data. To achieve this, we constructed an OCR-DB Pair dataset by extracting text from document images using the AI-HUB financial OCR dataset and matching it 1-to-1 with Ledger (DB) data following a standardized schema. Furthermore, to mitigate the scarcity of anomaly data, we utilized the SMOTE technique and constructed a training dataset by generating numerical feature vectors that include character-based distances (e.g., Levenshtein, Jaro-Winkler) and hierarchical features. The proposed model consists of: (1) a feature-based Multi-Layer Perceptron (MLP) model that learns rule-based lexical distances; (2) a Siamese encoder model that learns structural similarity using character-level CNN; and (3) a Transformer-based sentence encoder that learns contextual semantics based on the pre-trained Korean language model, klue/roberta-small. In addition, to maximize the field-specific strengths of these models, we designed a Field-Expert Ensemble (Ensemble-CM) that selects and combines the optimal models for each field by analyzing the confusion matrix of validation data, and calibrated the final prediction probabilities using Temperature Scaling. Performance evaluation using document-level PR-AUC, Log Loss, Expected Calibration Error (ECE), and ranking-based metrics (Precision@K) showed that the proposed ensemble model achieved a document-level PR-AUC of 0.824, demonstrating superior anomaly detection performance compared to a BERT-based document classifier using only OCR text (PR-AUC 0.805), and recorded a Log Loss of 0.59, indicating high reliability in prediction probabilities. Additionally, it achieved a Precision@5% of approximately 0.96 for the top 5% of high-risk candidate documents, confirming significant efficiency for practical environments with limited human resources. This study empirically demonstrates the feasibility of automated error detection in unstructured document-based financial operations. It is expected to contribute to the advancement of internal controls and the automation of loan underwriting and post-management, while also providing practical utility through cost reduction.

more

목차

제 1장 서론 1
제1절 연구 배경 및 동기 1
제2절 연구 방법 및 목표 2
제3절 논문 구성 4
제 2장 기존 연구 및 관련 이론 5
제1절 기존 이상 탐지 모델 5
제2절 기존 문서 검증 이상 탐지 관련 선행 연구 8
제3절 본 연구 관련 이론 소개 10
(1) 문자열 유사도 측정 (String Similarity Measures) 10
(2) 딥러닝 기반 모델링 11
(3) 데이터 불균형 해소 15
제4절 제안 모델의 이론적 차별성 16
제 3장 데이터 구성 및 전처리 18
제1절 데이터 개요 18
제2절 OCR 처리 및 산출물 구조 20
제3절 데이터 정규화 및 데이터셋 구축 21
(1) ETL 파이프라인 구축 21
(2) OCR 전처리 22
(3) 텍스트 정규화 및 표준 스키마 23
제4절 이상 데이터 생성 및 데이터 Pair 구축 25
(1) 이상 데이터 생성 및 SMOTE 생성 25
(2) OCR-DB Pair 구성 27
(3) 어휘적(Lexical) 특징 벡터 27
(4) 계층적(Hierarchical) 주소 특징 벡터 28
제 4장 모델 설계 30
제1절 피처 기반 MLP 분류 모델 30
(1) 모델 개요 30
(2) 입력 피처 구성 31
(3) MLP 구조 및 하이퍼파라미터 설정 31
(4) 학습–예측 절차 33
제2절 Siamese 인코더 기반 유사도 모델 34
(1) Lexical 거리의 한계와 구조적 유사도 필요성 34
(2) 문자 단위 CharCNN 인코더 35
(3) Siamese 네트워크 구조 및 학습 36
(4) 주소 슬롯별 Siamese 인코더 37
(5) Lexical, Similarity 피처의 결합 및 후단 분류 37
제3절 소형 Transformer 기반 문장 인코더 모델 40
(1) CharCNN Siamese의 한계와 문맥 정보의 필요성 40
(2) 사전학습 언어모델: klue/roberta-small 개요 40
(3) Cross-Encoder 구조 및 문자열 유사도 피처 결합 41
(4) 분류 헤드, 학습 전략 및 하이퍼파라미터 42
제4절 혼동행렬 기반 필드-전문가 앙상블 모델(Ensemble-CM) 44
(1) 앙상블 설계 원칙 및 목표 45
(2) 구성 요소 45
(3) 혼동행렬 기반 필드 선택 및 가중 45
(4) 문서 단위 확률 집계 및 출력 보정 46
제 5장 실험 및 결과 해석 47
제1절 모델 평가 방법 47
(1) 문서 단위 이상 확률 산출 47
(2) 성능 지표 : PR-AUC(Average Precision) 48
(3) 확률 보정 지표: Log Loss와 ECE 49
(4) 랭킹 기반 지표: Precision@K 50
제2절 성능 평가 결과 및 해석 51
(1) 문서 단위 PR-AUC 비교 51
(2) 확률 보정(Log Loss, ECE) 관점 비교 52
(3) 랭킹 기반 지표(Precision@K) 및 실무적 효용 53
제3절 기존 BERT 문서 분류기와의 비교 54
(1) BERT Baseline 설정 54
(2) 성능 비교 및 해석 55
(3) 시사점 56
제 6장 결론 및 향후 과제 59
제1절 연구 내용 요약 59
제2절 연구의 기여 60
제3절 향후 연구 과제 61

more