calibration class-imbalance temperature-scaling densenet121 swin-tiny tinyvit-5m bethesda-taxonomy ensemble-classification
Abstract
Cervical cytology classification models are typically evaluated on curated, class-balanced benchmarks, but real-world liquid-based cytology (LBC) collections are often small and class-imbalanced. This paper presents a class-imbalance-aware and calibration-aware ensemble classification study on the Mendeley LBC dataset, using its native four-class Bethesda taxonomy (NILM, LSIL, HSIL, SCC) rather than a collapsed binary formulation. Three lightweight architectures (Swin-Tiny, TinyViT-5M, DenseNet121) are trained directly on Mendeley LBC using weighted random sampling to counteract class imbalance, and compared against two soft-voting ensembles (Hybrid-2, Hybrid-3). Post-hoc temperature scaling is fit on a held-out calibration subset carved out of the training portion of each cross-validation fold, distinct from both the training data used to fit model weights and the evaluation fold used for final metrics, avoiding the optimistic calibration estimates that result when the same data is used for both purposes. Calibration substantially reduces expected calibration error, Brier score, and negative log-likelihood for every model and ensemble configuration tested, while discrimination metrics (accuracy, macro-F1, macro-AUROC) remain essentially unchanged. Ensemble size shows no consistent additional reliability benefit over the best individual model once all configurations are properly calibrated. Confusion matrices show that all classification errors, across every configuration, are confined to the boundary between high-grade lesions (HSIL) and carcinoma (SCC); no errors involve the negative (NILM) or low-grade (LSIL) categories. These results suggest that, for this dataset, calibration is the dominant lever for reliability, not ensemble size, though this conclusion should be read in light of the dataset's modest size.
한국어 요약
한 줄 요약
LBC 데이터셋에서 클래스 불균형과 신뢰도를 고려한 앙상블 분류 연구를 제시한다.
핵심 기여도
- Mendeley LBC 데이터셋의 원본 4클래스 베테사 분류를 사용하여 이진 분류 대신 다중 분류를 수행.
- 클래스 불균형에 대응하기 위해 가중치 랜덤 샘플링을 적용한 3개의 가벼운 모델(Swin-Tiny, TinyViT-5M, DenseNet121)을 제시.
- 교정(Calibration)을 위해 훈련 데이터와 별도의 검증 세트를 사용한 템퍼러처 스케일링을 적용.
- 교정이 신뢰도 지표(ECE, Brier score, NLL)를 개선하지만, 구분력 지표(정확도, macro-F1, macro-AUROC)는 거의 변하지 않음.
핵심 아이디어
기존 연구는 주로 클래스 균형이 잡힌 데이터셋에서 평가되지만, 실제 LBC 데이터는 클래스 불균형이 심하다. 본 연구는 이 문제를 해결하기 위해 가중치 랜덤 샘플링을 사용한 모델 훈련과 별도의 교정 세트를 활용한 템퍼러처 스케일링을 결합하였다. 특히, 교정 과정에서 훈련 데이터와 평가 데이터를 분리하여 과적합된 신뢰도 추정을 방지하는 것이 핵심이다. 이는 기존 연구에서 흔히 발생하는 교정 오류를 줄이는 데 기여한다.
기술적 접근법
- **모델**: Swin-Tiny, TinyViT-5M, DenseNet121
- **데이터셋**: Mendeley LBC (4클래스: NILM, LSIL, HSIL, SCC)
- **샘플링**: 가중치 랜덤 샘플링을 사용하여 클래스 불균형 대응
- **앙상블**: Hybrid-2, Hybrid-3의 소프트 보팅 앙상블
- **교정**: 훈련 세트에서 별도로 떼어낸 검증 세트를 사용한 템퍼러처 스케일링
주요 결과
- 모든 모델에서 교정 후 ECE, Brier score, NLL이 감소됨.
- Mendeley LBC 데이터셋에서 정확도, macro-F1, macro-AUROC는 교정 전후 거의 동일함.
- 혼동 행렬 분석 결과, 오분류는 HSIL과 SCC 사이에만 발생하며, NILM과 LSIL은 오분류되지 않음.
- 교정된 상태에서 앙상블 크기 증가가 신뢰도 향상에 추가적인 이점이 없음.
의의 및 한계
본 연구는 LBC 분류에서 클래스 불균형과 신뢰도를 동시에 고려한 체계적인 접근을 제시하며, 교정이 신뢰도 향상에 핵심 역할을 한다는 점을 입증한다. 그러나 Mendeley LBC 데이터셋의 크기가 제한적이기 때문에 일반화 가능성에 제약이 있을 수 있다. 또한, 오분류가 고도 병변 간에만 발생한다는 점은 병리학적 해석과의 연계 필요성을 시사한다.
실용적 활용
이 연구는 의료 영상 분류, 특히 병리학적 데이터 분석에서 신뢰도 높은 모델 개발에 활용될 수 있다. 특히, 클래스 불균형이 심한 의료 데이터셋에서 교정 기법을 적용한 모델이 임상 진단 시스템에 적합할 수 있다.