논문 해설
Clinical Prompt Learning with Frozen Language Models
동결된 언어 모델을 활용한 임상 프롬프트 학습
- 연구 문제 pre-training 언어 모델을 임상 텍스트에 적용할 때 전체 미세조정은 GPU 자원과 데이터 조건에 부담을 줍니다. 이 논문은 PLM을 고정한 프롬프트 학습이 전통적 미세조정과 비교해 임상 분류 성능을 어떻게 보이는지 확인합니다.
- 연구 방법 Bio-ClinicalBERT를 고정한 상태에서 혼합 템플릿과 soft verbalizer로 학습하는 프롬프트 학습을 MLP 헤드를 학습하는 전통적 미세조정과 비교합니다.
- 주요 결과 ICD-9 Triage 과제의 Frozen PLM 최적화 비교에서 프롬프트 학습은 Balanced accuracy 0.8698, 전통적 미세조정은 0.8162를 보였습니다. 소수 샘플 설정에서는 프롬프트 학습이 더 우수했습니다.
임상 현장에서 PLM 미세조정의 부담
pre-training 언어 모델(PLM)을 임상 텍스트에 적용하려면 보통 모델 전체와 작업별 헤드를 함께 미세조정해야 합니다. 이 방식은 대규모 GPU 자원을 요구하고, 임상 데이터는 병원과 지역 클리닉의 비GPU 환경에 흩어져 있어 실제 적용에 제약이 큽니다. 또한 과도한 미세조정은 pre-training 지식을 잊게 하고 소규모 도메인 데이터의 허위 상관에 과적합될 수 있다는 선행 연구의 우려가 인용됩니다. 이 논문은 이러한 상황에서 PLM을 고정한 채 프롬프트 학습을 전통적 미세조정과 직접 비교하는 질문을 다룹니다.
프롬프트 학습의 템플릿과 verbalizer
프롬프트 학습에서는 입력 임상 텍스트 x를 템플릿 f_p(x)로 감싸고, 마스크 토큰 위치의 출력 분포를 예측합니다. 이때 verbalizer는 PLM 어휘의 토큰을 클래스 라벨에 대응시키는 구성요소입니다. 수동 템플릿과 수동 verbalizer는 이산적이고 PLM 어휘에 묶여 추가 학습 파라미터가 없습니다. 반면 soft 방식은 템플릿 토큰이나 클래스별 벡터를 학습 가능한 임베딩으로 바꾸며, 혼합 템플릿은 수동 토큰과 soft 토큰을 함께 사용합니다. 본 논문의 soft verbalizer는 클래스별 벡터와 마스크 위치 은닉 표현의 내적으로 확률을 계산하며, PLM의 디코더 헤드는 제거됩니다.

Figure 2 : Illustration of manual template and verbalizer in prompt learning.
원문 · CC BY 4.0 · Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin · Clinical Prompt Learning with Frozen Language Models · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.![Figure 3: Illustration of soft template and verbalizer in prompt learning. If the <[soft]> tokenP2 is
not defined manually in advance, the embedding h(P2)∈ Rm w…](/papers/966bd022-bf16-42de-960c-67031dbf722e/figures/figure-324e10dfae09e61ff239d69c83235d70.png?thumb=512)
Figure 3 : Illustration of soft template and verbalizer in prompt learning. If the <[soft]> tokenP2 is not defined manually in advance, the embedding h(P2)∈ Rm will be randomly initialized in the hidden space.
원문 · CC BY 4.0 · Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin · Clinical Prompt Learning with Frozen Language Models · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.전통적 미세조정 헤드의 구조
전통적 미세조정은 PLM이 각 토큰의 임베딩을 만든 뒤 평균 등으로 풀링한 문장 임베딩 h(x)를 MLP 헤드 f_MLP에 입력하는 방식입니다. 헤드는 클래스 수만큼의 출력을 내고 소프트맥스로 클래스 확률을 계산합니다. 이 논문에서는 MLP 깊이를 d=2로 두었습니다. PLM과 MLP 블록은 모듈로 분리되어 있어, 두 파라미터 집합 중 하나를 고정할 수 있습니다.
![Figure 1: Illustration of conventional fine-tuning method, with an option to freeze the PLM, shown in
dotted line. Here [CLS] and [SEP] tokens are special token…](/papers/966bd022-bf16-42de-960c-67031dbf722e/figures/figure-efbcb92f8d40f59170820e4b1b7036b1.png?thumb=512)
Figure 1 : Illustration of conventional fine-tuning method, with an option to freeze the PLM, shown in dotted line. Here [CLS] and [SEP] tokens are special tokens for BERT-based models that are added to the beginning and end of sequences.
원문 · CC BY 4.0 · Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin · Clinical Prompt Learning with Frozen Language Models · 원문 그림 인용 · 원본 PDF 3쪽에서 그림 영역을 추출했습니다.MIMIC-III 기반 임상 과제 구성
데이터는 MIMIC-III의 자유 텍스트 노트를 사용합니다. 이 데이터셋은 약 38,597명의 중환자와 58,976건의 ICU 입원 기록을 포함합니다. 과제는 상위 50개 ICD-9 진단 코드 분류, 상위 20개 코드를 ICU 퇴실 후 7개 팀으로 묶은 Triage 과제, 병원 내 사망 예측, 그리고 ICU 재원 기간을 3개 구간으로 나눈 분류입니다. Triage 과제는 임상의와 함께 설계된 본 연구의 과제이며, 약 15,000개 노트를 7개 범주로 분류합니다. 소수 샘플 실험에서 샘플 수 s는 클래스당 개수로 정의되며, 검증과 테스트는 항상 전체 세트에서 수행됩니다.
프롬프트 구성 비교와 선택된 기준 설정
ICD-9 Triage 과제에서 여섯 가지 템플릿과 verbalizer 조합을 Fine-tuned와 Frozen 설정으로 비교했습니다. PLM을 미세조정한 경우 조합 간 차이는 작았지만, PLM을 고정하면 차이가 커졌습니다. Frozen 설정에서 (manual, soft) 조합의 Balanced accuracy는 0.7524였고 (soft, soft) 조합은 0.8900이었습니다. 저자들은 가장 높은 성능을 보인 soft 조합 대신 해석 가능성을 고려하여 혼합 템플릿과 soft verbalizer 조합을 이후 프롬프트 학습의 기준으로 선택했습니다. 이 기준 선택은 해당 과제의 비교 결과에 근거한 것입니다.

Table 1 : Table comparing different prompt learning setups on ICD9 Triage task.
원문 · CC BY 4.0 · Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin · Clinical Prompt Learning with Frozen Language Models · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.
Table 4 : Performance of the classification model on a test set for different mixed templates for the ICD9 triage task.
원문 · CC BY 4.0 · Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin · Clinical Prompt Learning with Frozen Language Models · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.프롬프트 학습과 미세조정의 과제별 비교
기준 설정인 프롬프트 학습과 전통적 미세조정은 같은 PLM을 사용하고, PLM을 미세조정한 경우와 고정한 경우를 각각 비교했습니다. 전체 학습 시나리오에서는 프롬프트 학습이 전통적 미세조정과 대등한 수준이었고, 소수 샘플 설정에서는 프롬프트 학습이 더 우수하다고 보고됩니다. 고정 PLM에서 두 방식의 성능 차이는 미세조정 PLM에서보다 작았습니다. 이 결과는 Bio-ClinicalBERT를 PLM으로 사용하고 MIMIC-III 기반 과제에서 얻은 것입니다.

Figure 4 : Balanced accuracy for prompt learning and traditional fine-tuning frameworks across the four clinical tasks. “LoS” refers to length of stay and “Full” refers to a full data set size which varies from task to task.
원문 · CC BY 4.0 · Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin · Clinical Prompt Learning with Frozen Language Models · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.하이퍼파라미터 최적화 후의 Triage 비교
두 방식을 같은 탐색 예산으로 비교하기 어렵다는 점을 고려해 ICD-9 Triage 과제에 대해 하이퍼파라미터 탐색을 수행했습니다. 탐색 공간은 학습률, 배치 크기, 그래디언트 누적 단계, 드롭아웃, 옵티마이저 등을 포함합니다. 고정 PLM에서 최적화된 결과는 프롬프트 학습의 Balanced accuracy 0.8698, weighted F1 0.9246, AUC 0.9889이고, 전통적 미세조정은 Balanced accuracy 0.8162, weighted F1 0.8919, AUC 0.9811입니다. 이 탐색은 해당 과제에서 수행되었으며 다른 과제에 확대되지 않았습니다.

Table 3 : Hyperparameter optimized model comparison with frozen PLM for ICD9 triage.
원문 · CC BY 4.0 · Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin · Clinical Prompt Learning with Frozen Language Models · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.학습 가능 파라미터 수와 성능의 관계
가장 적은 학습 가능 파라미터를 가진 프롬프트 학습 설정은 1,536개의 파라미터를 학습하며, 1,552,007개를 학습하는 전통적 미세조정 모델과 비교 가능한 성능을 보입니다. 이 비교는 클래스당 128개 샘플을 사용한 조건에서 이루어졌습니다. 전통적 미세조정의 헤드 크기를 바꾸는 방식과 프롬프트 학습의 soft 토큰 수를 바꾸는 방식을 함께 비교하여, 성능 차이가 단순한 과적합이나 과소적합 때문인지 검토했습니다.

Figure 5 : Balanced accuracy for prompt learning versus traditional fine-tuning across increasing number of trainable parameters with frozen PLM. For readability, logarithmic scale is used forx-axis.
원문 · CC BY 4.0 · Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin · Clinical Prompt Learning with Frozen Language Models · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.대체 PLM에서의 비교
부록 D에서는 Bio-ClinicalBERT 대신 PubMed 초록으로 처음부터 사전학습된 PubMedBERT를 사용해 Triage 과제를 다시 평가했습니다. 샘플 크기 16, 32, 64, 128에서 전통적 미세조정은 0.1554, 0.1521, 0.4048, 0.5621을 보였고, 프롬프트 학습은 0.2249, 0.3749, 0.4621, 0.7814를 보였습니다. 128 샘플 조건에서 두 값의 차이는 PubMedBERT에 대한 결과로만 읽어야 합니다.

Table D.1 : Balanced accuracy results for prompt learning and traditional fine-tuning using Microsoft’s PubMedBert
원문 · CC BY 4.0 · Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin · Clinical Prompt Learning with Frozen Language Models · 원문 그림 인용 · 원본 PDF 18쪽에서 그림 영역을 추출했습니다.데이터 유출과 과제 간 변동의 한계
저자들은 Bio-ClinicalBERT가 MIMIC-III 노트로 사전학습되어 하위 임상 과제와 데이터 유출 가능성이 있으며, 이 점이 두 방식에 모두 영향을 주었을 수 있다고 밝힙니다. 또한 Length of stay와 mortality 과제는 두 프레임워크 모두에서 성능이 낮아 프레임워크 간 차이를 해석하기 어렵다고 설명합니다. 본 연구에서는 Triage 과제에 대해서만 하이퍼파라미터 탐색을 수행했으며, 프롬프트 학습의 강건성은 더 넓은 탐색으로 확인할 필요가 있습니다.
논문 정보
- 저자
- Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2022년 5월 11일
- 등록일
- 2026년 11월 6일
- 수정일
- 2022년 5월 11일
- 버전
- v1
- arXiv
- 2205.05535
- 분류
- cs.CL
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
Prompt learning is a new paradigm in the Natural Language Processing (NLP) field which has shown impressive performance on a number of natural language tasks with common benchmarking text datasets in full, few-shot, and zero-shot train-evaluation setups. Recently, it has even been observed that large but frozen pre-trained language models (PLMs) with prompt learning outperform smaller but fine-tuned models. However, as with many recent NLP trends, the performance of even the largest PLMs such as GPT-3 do not perform well on specialized domains (e.g. medical text), and the common practice to achieve State of the Art (SoTA) results still consists of pre-training and fine-tuning the PLMs on downstream tasks. The reliance on fine-tuning large PLMs is problematic in clinical settings where data is often held in non-GPU environments, and more resource efficient methods of training specialized domain models is crucial. We investigated the viability of prompt learning on clinically meaningful decision tasks and directly compared with more traditional fine-tuning methods. Results are partially in line with the prompt learning literature, with prompt learning able to match or improve on traditional fine-tuning with substantially fewer trainable parameters and requiring less training data. We argue that prompt learning therefore provides lower computational resource costs applicable to clinical settings, that can serve as an alternative to fine-tuning ever increasing in size PLMs. Complementary code to reproduce experiments presented in this work can be found at: https://github.com/NtaylorOX/Public_Clinical_Prompt.
원문 인용
Niall Taylor, Yi Zhang, Dan Joyce, Alejo Nevado-Holgado, Andrey Kormilitzin (2022). Clinical Prompt Learning with Frozen Language Models. arXiv:2205.05535v1. https://arxiv.org/abs/2205.05535v1
BibTeX
@misc{taylor2022clinical,
title = {{Clinical Prompt Learning with Frozen Language Models}},
author = {Niall Taylor and Yi Zhang and Dan Joyce and Alejo Nevado-Holgado and Andrey Kormilitzin},
year = {2022},
eprint = {2205.05535},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2205.05535v1}
}