WO2024096307A1 - Method for operating medical artificial intelligence model, and electronic device for performing same - Google Patents

Method for operating medical artificial intelligence model, and electronic device for performing same Download PDF

Info

Publication number
WO2024096307A1
WO2024096307A1 PCT/KR2023/013928 KR2023013928W WO2024096307A1 WO 2024096307 A1 WO2024096307 A1 WO 2024096307A1 KR 2023013928 W KR2023013928 W KR 2023013928W WO 2024096307 A1 WO2024096307 A1 WO 2024096307A1
Authority
WO
WIPO (PCT)
Prior art keywords
medical
sequence
diagnosis
data
diagnostic
Prior art date
Application number
PCT/KR2023/013928
Other languages
French (fr)
Korean (ko)
Inventor
김영학
전태준
김민경
강희준
안임진
권한슬
김윤하
서혜람
조하나
최희정
한지예
기가은
박서현
Original Assignee
재단법인 아산사회복지재단
울산대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 재단법인 아산사회복지재단, 울산대학교 산학협력단 filed Critical 재단법인 아산사회복지재단
Publication of WO2024096307A1 publication Critical patent/WO2024096307A1/en

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/20ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/70ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for mining of medical data, e.g. analysing previous cases of other patients

Definitions

  • EMR electronic medical records
  • data such as diagnosis codes, which are important for describing a patient's condition and other characteristics, are often not in the easiest or simplest format for analysis. Due to this, interest in applying an effective representation method to efficiently utilize medical information in the form of code in artificial intelligence (AI)-based prediction research is increasing.
  • AI artificial intelligence
  • OOE One-hot Encoding
  • NLP Natural Language Processing
  • W2V skip-gram
  • An operating electronic device for a medical artificial intelligence model includes a memory storing computer-executable instructions; and a processor that accesses the memory and executes the instructions, wherein the instructions are sorted according to sorting criteria from a plurality of diagnosis codes included in the patient's electronic medical record (EMR, electronic medical record). Based on this, a diagnosis code sequence is generated, and the generated diagnosis code sequence is applied to a medical data preprocessing model to obtain converted sequence data with a dimension reduced from that of the diagnosis code sequence. And, by operating the medical artificial intelligence model based on the input of the converted sequence data to the medical artificial intelligence model, predicted diagnostic data for the patient can be generated.
  • EMR electronic medical record
  • the processor obtains a plurality of partial sequences by dividing the electronic medical record into time periods having a predetermined length, and for each of the plurality of partial sequences, one part included in each partial sequence.
  • the above diagnostic codes can be sorted.
  • the processor may delete overlapping diagnostic codes among diagnostic codes included in the partial sequence from the partial sequence.
  • the processor may sort one or more diagnostic codes included in the partial sequence based on the frequency of the diagnostic codes recorded in the electronic medical record.
  • the processor may obtain the converted sequence data from a transfer layer of the medical data preprocessing model.
  • the processor may fine tune the medical data preprocessing model based on diagnosis codes sorted by the frequency of the diagnosis codes at predetermined periods.
  • FIG. 1 is a diagram illustrating an electronic device that operates a medical artificial intelligence model according to an embodiment.
  • Figure 2 is a flowchart showing a method of operating a medical artificial intelligence model according to an embodiment.
  • FIG. 3 is a diagram illustrating a diagnosis code in an electronic medical record (EMR) according to an embodiment.
  • FIG. 4 is a diagram illustrating a method of obtaining converted sequence data by applying a diagnosis code sequence to a medical data preprocessing model according to an embodiment.
  • FIG. 5 is a diagram illustrating a method of generating a plurality of diagnostic code sequences according to a sorting method according to an embodiment.
  • FIG. 6 is a diagram illustrating a method of generating a medical data preprocessing model by fine-tuning the BERT model according to an embodiment.
  • FIG. 7 is a diagram illustrating application of sequence data generated by one-hot encoding (OHE) to a medical artificial intelligence model according to an embodiment.
  • OOE one-hot encoding
  • FIG. 8 is a diagram illustrating application of sequence data converted by a medical data preprocessing model to a medical artificial intelligence model according to an embodiment.
  • FIG. 9 is a diagram illustrating the performance of a medical data preprocessing model according to a method for sorting diagnosis code sequences according to an embodiment.
  • FIG. 10 is a diagram illustrating the performance of one-hot encoding (OHE) and a medical data preprocessing model according to an embodiment.
  • first or second may be used to describe various components, but these terms should be interpreted only for the purpose of distinguishing one component from another component.
  • a first component may be named a second component, and similarly, the second component may also be named a first component.
  • a or B “at least one of A and B”, “at least one of A or B”, “A, B or C”, “at least one of A, B and C”, and “A Each of phrases such as “at least one of , B, or C” may include any one of the items listed together in the corresponding phrase, or any possible combination thereof.
  • FIG. 1 is a diagram illustrating an electronic device that operates a medical artificial intelligence model according to an embodiment.
  • the electronic device 100 may include a processor 110 and a memory 120.
  • the electronic device 100 may be a device that generates predicted diagnostic data for a patient's electronic medical record (EMR).
  • EMR electronic medical record
  • the electronic device 100 may generate a diagnosis code sequence by sorting diagnosis codes included in the electronic medical record.
  • the electronic device 100 may obtain converted sequence data by applying the diagnosis code sequence to a medical data preprocessing model.
  • the electronic device 100 may apply the converted sequence data to a medical artificial intelligence model to generate predicted diagnosis data for the patient's electronic medical record.
  • the processor 110 may, for example, execute software to control at least one other component (e.g., hardware or software component) of the electronic device 100 connected to the processor 110, and process various data. Alternatively, calculations can be performed. According to one embodiment, as at least part of data processing or computation for operating a medical artificial intelligence model, the processor 110 stores instructions or data in the memory 120, and stores the instructions or data stored in the memory 120. Processing is performed, and the resulting data can be stored in the memory 120.
  • the processor 110 stores instructions or data in the memory 120, and stores the instructions or data stored in the memory 120. Processing is performed, and the resulting data can be stored in the memory 120.
  • Memory 120 may include instructions executable by a computer.
  • the memory 120 may temporarily and/or permanently store various data and/or information required to operate at least one of a medical data preprocessing model and/or a medical artificial intelligence model.
  • the memory 120 may store at least one of a patient's electronic medical record, a diagnosis code sequence, converted sequence data, or diagnosis data.
  • Figure 2 is a flowchart showing a method of operating a medical artificial intelligence model according to an embodiment.
  • an electronic device may generate a diagnostic code sequence.
  • the diagnostic code sequence may be an ordered sequence of diagnostic codes.
  • the diagnosis code may be a code included in the patient's electronic medical record that indicates the patient's diagnosis result.
  • the electronic device can generate a partial sequence by sorting diagnosis codes in an electronic medical record.
  • the electronic device can generate a diagnostic code sequence by combining partial sequences.
  • Electronic medical records may be records that input, manage, and store medical records prepared by medical personnel, such as medical records, as electronic documents with electronic signatures.
  • Diagnosis codes may represent the International Statistical Classification of Diseases and Related Health Problems (ICD), including the patient's death, disease, injury, or health condition.
  • Diagnosis codes may include codes written in parallel with alphabets and numbers.
  • the diagnosis code may include codes divided into alphabets and numbers by classifying each patient's disease into 21 chapters according to the source of infection, anatomical region, and other factors.
  • the partial sequence may include diagnosis codes sorted by period. For example, partial sequences may be divided into time periods with a predetermined time length, and a partial sequence corresponding to a certain period may include diagnostic codes belonging to that period.
  • the electronic device may generate partial sequences by dividing the entire period from the visit date (INDT) to the discharge date (OUDT) into 1-year units in the patient's electronic medical record.
  • the electronic device may add a predetermined parameter to each partial sequence.
  • the electronic device may generate a diagnostic code sequence by combining partial sequences to which a parameter (eg, a delimiter that separates partial sequences) is added. A method of generating a diagnostic code sequence will be described later in FIG. 5.
  • the electronic device may obtain converted sequence data by applying the diagnosis code sequence to the medical data preprocessing model.
  • the electronic device may obtain converted sequence data from the transfer layer of the medical data preprocessing model.
  • a description of the transfer layer is provided later in FIG. 4.
  • the medical data preprocessing model may be a pre-trained BERT (bidirectional encoder representations from transformer) language expression model that performs bidirectional encoder representations from a transformer.
  • the electronic device can create a medical data preprocessing model by fine-tuning a pre-trained BERT model. While the pre-trained BERT model is specialized for natural language processing, it may not be suitable for processing unstructured data such as diagnostic codes. Therefore, the electronic device can fine-tune the BERT model by applying diagnostic code sequences to the pre-trained BERT model. Electronic devices can use the fine-tuned BERT model as a medical data preprocessing model. For reference, a method of fine-tuning the BERT model to create a medical data preprocessing model is described later in FIG. 6.
  • the converted sequence data may be data that abstracts the relationship between a plurality of diagnosis codes existing in the diagnosis code sequence.
  • the converted sequence data may include feature vectors in which the features of the diagnosis code are expressed as numbers. A description of the converted sequence data will be provided later in FIG. 8.
  • the electronic device may operate the medical artificial intelligence model based on input of converted sequence data to the medical artificial intelligence model.
  • a medical artificial intelligence model may be a machine learning model that generates predicted diagnostic data for a patient based on input of converted sequence data.
  • Medical artificial intelligence models can be created through machine learning. Learning algorithms may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but It is not limited.
  • a medical artificial intelligence model may include multiple artificial neural network layers.
  • Artificial neural networks include deep neural network (DNN), convolutional neural network (CNN), recurrent neural network (RNN), restricted boltzmann machine (RBM), belief deep network (DBN), bidirectional recurrent deep neural network (BRDNN), It may be one of deep Q-networks or a combination of two or more of the above, but is not limited to the examples described above.
  • the medical artificial intelligence model is described as a machine learning model for convenience of explanation, but it is not limited to this.
  • a medical artificial intelligence model may be a classification model composed of a decision tree to predict diagnostic data.
  • the medical artificial intelligence model may be an extreme gradient boosting (XGB) model.
  • a medical artificial intelligence model may include one or more decision trees.
  • a medical artificial intelligence model can ensemble the results of one or more decision trees.
  • a medical artificial intelligence model may ensemble the results of one or more decision trees to generate predicted diagnostic data for a patient.
  • Diagnostic data includes diagnostic data regarding the possibility of discharge of an inpatient, diagnostic data regarding the possibility of death during hospitalization of a heart failure patient, and a patient's reading result sheet (e.g., X-ray reading result sheet, CT reading result) It may include at least one of diagnostic data related to a search for a similar reading result sheet (e.g., MRI reading result sheet, or ultrasound reading result sheet), or diagnostic data relating to a treatment guide for a sepsis patient.
  • MRI reading result sheet e.g., MRI reading result sheet, or ultrasound reading result sheet
  • FIG. 3 is a diagram illustrating a diagnosis code in an electronic medical record (EMR) according to an embodiment.
  • the electronic medical record 300 may include at least one of the patient's personal information, the patient's hospital visit type, clinical data, or a diagnosis code 310.
  • the patient's personal information may include the patient's gender, patient's date of birth, and hospital visit ID.
  • the patient's hospital visit type may include visit types based on outpatient treatment and inpatient treatment.
  • Diagnosis code 310 may include multiple classifications.
  • diagnosis codes H00 to H59 may include information related to diseases of the eye and eye appendages.
  • Diagnosis codes H25 through H28 may include information related to disorders of the lens.
  • H25 contains information related to senile cataracts, and H25.8 may contain information related to other senile cataracts.
  • the electronic medical record 300 may include a diagnosis code 310 indicating disease information about senile cataracts corresponding to the 'H25' code.
  • the 10th International Classification of Diseases (ICD-10) will be mainly described as the diagnosis code 310, but it is not limited thereto, and the diagnosis code 310 is the 11th International Classification of Diseases (ICD).
  • the electronic device e.g., the electronic device 100 in FIG. 1
  • the electronic device has a diagnostic code excluding the decimal number of the diagnostic code 310 (e.g., 8 in the diagnostic code of H25.8). Sequences can be created.
  • FIG. 4 is a diagram illustrating a method of obtaining converted sequence data by applying a diagnosis code sequence to a medical data preprocessing model according to an embodiment.
  • An electronic device may perform first preprocessing 435 and second preprocessing 455.
  • the electronic device may obtain the diagnosis code sequence 430 through first preprocessing 435.
  • the electronic device may apply the diagnosis code sequence 430 to the medical data preprocessing model 440.
  • the medical data preprocessing model 440 may be a fine-tuned BERT model.
  • the electronic device may obtain the converted sequence data 460 through the second preprocessing 455.
  • the electronic device can apply the converted sequence data 460 to the medical artificial intelligence model 470.
  • the first preprocessing 435 may include generating a diagnosis code sequence 430 from the electronic medical record 400.
  • the electronic device may perform first preprocessing 435 to generate a diagnosis code sequence 430 including sorted diagnosis codes from the electronic medical record 400.
  • the diagnosis code sequence 430 may include a plurality of diagnosis codes 420 for the patient 410 .
  • Diagnostic code sequence 430 may include diagnostic codes sorted based on sorting criteria.
  • the electronic device may apply the diagnosis code sequence 430 obtained through the first preprocessing 435 to the medical data preprocessing model 440.
  • the electronic device may apply the diagnosis code sequence 430 to the medical data preprocessing model 440 to obtain at least one of the mask code probability 446 or the converted sequence data 460.
  • the electronic device can measure accuracy by applying the diagnosis code sequence 430 to the medical data preprocessing model 440.
  • the electronic device may apply the mask code sequence 442 to the medical data pre-processing model 440 to measure the accuracy of the medical data pre-processing model 440.
  • the mask code sequence 442 may represent a sequence in which an arbitrary diagnosis code in the diagnosis code sequence 430 is obscured by a mask token.
  • the electronic device may obtain the mask code probability 446 by applying the mask code sequence 442 to the medical data preprocessing model 440.
  • Mask code probability 446 may include prediction results for the diagnostic code masked by the mask token in mask code sequence 442.
  • the electronic device may obtain at least one prediction probability value among the prediction probability value of diagnosis code I10, the prediction probability value of I20, the prediction probability value of C22, or the prediction probability value of J45.
  • the electronic device can measure the accuracy of the medical data preprocessing model 440 based on the mask code probability 446.
  • the second preprocessing 455 may include generating converted sequence data 460 by applying the diagnosis code sequence 430 to the medical data preprocessing model 440.
  • the electronic device may perform second preprocessing 455 to obtain converted sequence data 460 by applying the diagnosis code sequence 430 to the medical data preprocessing model 440.
  • the electronic device may acquire sequence data 460 converted from the transfer layer 450 of the medical data preprocessing model 440.
  • the transfer layer 450 may be at least one layer among one or more layers included in the medical data preprocessing model 440.
  • the medical data preprocessing model 440 may include a transformer block and a classification block.
  • the transformer block may be a block that outputs an intermediate output (e.g., converted sequence data 460) for input data (e.g., mask code sequence 442) of the medical data preprocessing model 440.
  • the classification block may be a block that outputs a prediction result (e.g., mask code probability 446) for input data (e.g., mask code sequence 442) of the medical data preprocessing model 440.
  • the electronic device may obtain converted sequence data 460 from the transfer layer 450 of the transformer block.
  • the converted sequence data 460 may include data converted into a numeric vector that abstracts the relationship between clinical information and diseases of the plurality of diagnosis codes 420 present in the diagnosis code sequence 430.
  • FIG. 5 is a diagram illustrating a method of generating a plurality of diagnostic code sequences according to a sorting method according to an embodiment.
  • An electronic device may generate a diagnostic code sequence 530 from the first code set 510 and the second code set 520.
  • the electronic device may generate the second code set 520 by removing overlapping diagnostic codes from the first code set 510 of the patient 500.
  • the first code set 510 may include diagnosis codes divided by one year based on the date of visit of the patient 500.
  • the first code set 520 may include one or more diagnosis codes per year based on the date of visit of the patient 500.
  • the second code set 520 may include diagnostic codes in which overlapping diagnostic codes are removed from the first code set 510 on a one-year basis. Additionally, the second code set 520 may include diagnosis codes in which decimal numbers of the diagnosis code have been removed.
  • the electronic device may generate a partial sequence including a plurality of diagnostic codes on a yearly basis from the second code set 520. That is, the partial sequence may include a plurality of diagnosis codes that the patient 500 was diagnosed with during one year. For example, referring to FIG. 5, the partial sequence corresponding to year 1 in the second code set 520 may include the diagnosis code 'J45'. Additionally, the partial sequence corresponding to the second year in the second code set 520 may include diagnosis codes 'J45', 'N40', and 'I20'.
  • the electronic device can generate a partial sequence containing diagnostic codes for a period of one year.
  • the electronic device can generate the diagnosis code sequence 530 by combining the above-described partial sequences.
  • the electronic device may generate the diagnostic code sequence 530 by combining a plurality of partial sequences generated from the second code set 520.
  • the electronic device may generate a diagnosis code sequence 530 in which partial sequences are combined by adding a separator (e.g., a period ('.')) in units of one year in the second code set 520. .
  • a separator e.g., a period ('.')
  • the diagnosis code sequence 530 includes diagnosis codes corresponding to the first year (e.g., 'J45') to diagnosis codes corresponding to the fourth year (e.g., R60, Z85, J45, I20, etc.) may contain sequences combined by delimiters. However, in this specification, for convenience of explanation, the period will mainly be explained as a parameter to distinguish one year, but it is not limited thereto.
  • the electronic device may obtain a diagnosis code sequence in which diagnosis codes are sorted according to an alignment standard.
  • the sorting criteria may include at least one of random sorting, alphabetical order sorting, or frequency sorting.
  • Random sorting may be sorting diagnostic codes based on a random probability generated through random numbers.
  • Alphabetical ordering may be sorting according to the alphabet order included in the diagnosis code.
  • Frequency sorting may be sorting based on the number of occurrences of each diagnostic code in the second code set 520. For example, the electronic device may calculate the number of occurrences for all diagnostic codes present in the second code set 520. The electronic device may generate a partial sequence for a corresponding period by arranging a diagnostic code with a second frequency of occurrence greater than the first frequency of occurrence in advance of a diagnostic code with a first frequency of occurrence in each period. For example, the electronic device may sort diagnostic codes so that diagnostic codes with a greater number of occurrences are sorted in descending order.
  • the electronic device may generate a partial sequence containing diagnostic codes arranged sequentially for a certain period of time, from the diagnostic code with the greatest frequency of occurrence to the diagnostic code with the least frequency of occurrence. there is. If two or more of the diagnostic codes have the same frequency of occurrence, the electronic device may sort the diagnostic codes based on the order of occurrence. For example, the electronic device may place the diagnostic code that occurs first among diagnostic codes with the same frequency of occurrence as precedence.
  • the electronic device may align one or more diagnostic codes included in each partial sequence for each of the plurality of partial sequences.
  • the first diagnosis code sequence 540 may represent a diagnosis code sequence generated by combining partial sequences in which diagnosis codes are sorted according to a random sorting standard.
  • the second diagnosis code sequence 550 may represent a diagnosis code sequence generated by combining partial sequences in which diagnosis codes are sorted according to an alphabet ordering standard.
  • the third diagnosis code sequence 560 may represent a diagnosis code sequence generated by combining partial sequences in which diagnosis codes are sorted according to a frequency sorting criterion.
  • the electronic device may apply the first diagnosis code sequence 540 to the first medical data preprocessing model 542.
  • the electronic device may apply the second diagnosis code sequence 550 to the second medical data preprocessing model 552.
  • the electronic device may apply the third diagnosis code sequence 560 to the third medical data preprocessing model 562.
  • the first medical data preprocessing model 542 to the third medical data preprocessing model 562 may be a finely tuned BERT model.
  • the medical data preprocessing models e.g., the first medical data preprocessing model 542, the second medical data preprocessing model 552, and the third medical data preprocessing model 562) are separate models. Although shown, it is not limited to this.
  • a single medical data preprocessing model may be used repeatedly in operations that apply multiple diagnostic code sequences.
  • FIG. 6 is a diagram illustrating a method of generating a medical data preprocessing model by fine-tuning the BERT model according to an embodiment.
  • An electronic device may generate a medical data preprocessing model by fine-tuning (630) the pre-trained BERT model (620).
  • the electronic device may generate masking input 610 from a diagnostic code sequence 600.
  • the diagnosis code sequence 600 may be a sequence including diagnosis codes sorted based on frequency.
  • the masking input 610 may include diagnostic codes in which an arbitrary diagnostic code (for example, I40 in FIG. 6) in the diagnostic code sequence 600 is obscured by a mask token.
  • the electronic device may perform fine tuning (630) by applying the masking input (610) to the pre-trained BERT model (620).
  • the pre-trained BERT model 620 may be a model that does not have excellent prediction performance for diagnostic codes. Therefore, the electronic device creates a masking input 610 and performs fine-tuning 630 of the pre-trained BERT model 620, so that the prediction performance regarding medical data is improved compared to the model before fine-tuning 630.
  • a data preprocessing model can be obtained.
  • the above-described BERT model 620 includes a masking input 610 and a prediction output mapped to the masking input 610 (e.g., masking input 610). It can be fine-tuned based on data containing pairs of diagnostic code prediction probabilities in a form masked by a mask token. For example, BERT model 620 can be fine-tuned to output a prediction output from masking input 610. The BERT model 620 during fine tuning can generate a temporary output in response to the masking input 610 and can be fine-tuned to minimize loss between the temporary output and the fine tuning target.
  • parameters of the BERT model 620 may be updated depending on the loss. This fine adjustment may be performed, for example, in the electronic device itself where the BERT model 620 is performed, or may be performed through a separate server.
  • the fine-tuned BERT model e.g., medical data preprocessing model
  • FIG. 7 is a diagram illustrating application of sequence data generated by one-hot encoding (OHE) to a medical artificial intelligence model according to an embodiment.
  • OOE one-hot encoding
  • An electronic device converts the diagnostic code sequence 700 into sequence data 720 through one-hot encoding (OHE) 710.
  • OOE one-hot encoding
  • one-hot encoding 710 may be an encoding that generates a vector by adding the number '1' to the word to be expressed (eg, a diagnosis code).
  • the sequence data 720 includes the number of rows corresponding to the number of patients included in the diagnosis code sequence 700 and the number of columns corresponding to the number of diagnosis codes of the International Classification of Diseases. Can include numbers.
  • the sequence data 720 may include an element value of '1' for the index of the word to be expressed or the diagnosis code included in the diagnosis code sequence 700.
  • the electronic device may apply the sequence data 720 to the medical artificial intelligence model 730.
  • the sequence data 720 obtained by one-hot encoding 710 is the converted sequence data generated by the medical data preprocessing model (e.g., the converted sequence data 460 of FIG. 4) compared to the diagnostic code. It can be a matrix expressed only in terms of presence or absence.
  • FIG. 8 is a diagram illustrating application of sequence data converted by a medical data preprocessing model to a medical artificial intelligence model according to an embodiment.
  • An electronic device may acquire sequence data 830 converted from the transfer layer of the medical data preprocessing model 820.
  • the medical data preprocessing model 820 may be a BERT model fine-tuned through a sequence of diagnosis codes sorted based on the frequency 810 of the diagnosis codes.
  • the converted sequence data 830 may include a reduced dimension than the number of International Classification of Diseases diagnosis codes (e.g., the number of rows of the sequence data 720 of FIG. 7). You can.
  • the electronic device may apply the converted sequence data 830, in which the characteristics of the diagnosis code sequence 800 are reduced to a low dimension, to the medical artificial intelligence model 840.
  • the converted sequence data 830 may include data that abstracts the relationship between clinical information and diseases of the diagnosis codes of the diagnosis code sequence 800, compared to sequence data (e.g., sequence data 720 of FIG. 7).
  • sequence data e.g., sequence data 720 of FIG. 7
  • the electronic device can provide a positive influence on improving the performance of the medical artificial intelligence model 840 through the converted sequence data 830 described above.
  • FIG. 9 is a diagram illustrating the performance of a medical data preprocessing model according to a method for sorting diagnosis code sequences according to an embodiment.
  • An electronic device may obtain a predicted probability result by applying a diagnosis code sequence to a medical data preprocessing model.
  • the first medical data preprocessing model 900 to the third medical data preprocessing model 920 may be a fine-tuned BERT model.
  • the first medical data preprocessing model 900 may be a fine-tuned model based on diagnosis code sequences sorted by random sorting.
  • the second medical data preprocessing model 910 may be a fine-tuned model based on diagnosis code sequences sorted in alphabetical order.
  • the third medical data preprocessing model 920 may be a fine-tuned model based on diagnosis code sequences sorted by frequency sorting.
  • the prediction probability result may represent the result of a medical data preprocessing model predicting the correct diagnosis code of a mask token in an example of a diagnosis code sequence.
  • the electronic device can replace any diagnostic code with a mask token in the example diagnostic code sequence shown in FIG. 9.
  • the electronic device can obtain a predicted probability result by applying the diagnosis code sequence including the mask token to the medical data preprocessing model. For example, the electronic device may obtain a higher prediction probability result from the third medical data preprocessing model 920 than from the first medical data preprocessing model 900 and the second data preprocessing model 910.
  • FIG. 10 is a diagram illustrating the performance of one-hot encoding (OHE) and a medical data preprocessing model according to an embodiment.
  • An electronic device e.g., the electronic device 100 of FIG. 1 may obtain the ROC curve graph 1000.
  • the ROC curve graph 1000 may include an ROC curve.
  • the ROC curve can be a measure to evaluate results based on sensitivity and specificity.
  • the graph 1010 represents converted sequence data (e.g., converted sequence data 830 in FIG. 8) obtained through a medical data preprocessing model (e.g., medical data preprocessing model 820 in FIG. 8). , can be applied to a medical artificial intelligence model (e.g., medical artificial intelligence model 840 in FIG. 8) to represent the results of diagnostic data predicted for the patient.
  • the graph 1020 is a medical artificial intelligence model (e.g., sequence data 720 of FIG. 7) obtained through one-hot encoding (e.g., one-hot encoding 710 of FIG. 7). By applying it to the medical artificial intelligence model 730 of FIG. 7, the results of the predicted diagnostic data for the patient can be displayed.
  • results obtained using the medical data preprocessing model for diagnosis code G20 show better performance than the results obtained using one-hot encoding.
  • the results obtained using the medical data preprocessing model can show excellent performance in many diagnosis codes included in the International Classification of Diseases.
  • the embodiments described above may be implemented with hardware components, software components, and/or a combination of hardware components and software components.
  • the devices, methods, and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, and a field programmable gate (FPGA).
  • ALU arithmetic logic unit
  • FPGA field programmable gate
  • It may be implemented using a general-purpose computer or a special-purpose computer, such as an array, programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions.
  • the processing device may execute an operating system (OS) and software applications running on the operating system. Additionally, a processing device may access, store, manipulate, process, and generate data in response to the execution of software.
  • OS operating system
  • a processing device may access, store, manipulate, process, and generate data in response to the execution of software.
  • a single processing device may be described as being used; however, those skilled in the art will understand that a processing device includes multiple processing elements and/or multiple types of processing elements. It can be seen that it may include.
  • a processing device may include multiple processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are possible.
  • Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing unit to operate as desired, or may be processed independently or collectively. You can command the device.
  • Software and/or data may be used on any type of machine, component, physical device, virtual equipment, computer storage medium or device to be interpreted by or to provide instructions or data to a processing device. , or may be permanently or temporarily embodied in a transmitted signal wave.
  • Software may be distributed over networked computer systems and stored or executed in a distributed manner.
  • Software and data may be stored on a computer-readable recording medium.
  • the method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium.
  • a computer-readable medium may include program instructions, data files, data structures, etc., singly or in combination, and the program instructions recorded on the medium may be specially designed and constructed for the embodiment or may be known and available to those skilled in the art of computer software. It may be possible.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks.
  • Examples of program instructions include machine language code, such as that produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc.
  • the hardware devices described above may be configured to operate as one or multiple software modules to perform the operations of the embodiments, and vice versa.

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Public Health (AREA)
  • Data Mining & Analysis (AREA)
  • Primary Health Care (AREA)
  • General Health & Medical Sciences (AREA)
  • Epidemiology (AREA)
  • Biomedical Technology (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Pathology (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)

Abstract

An electronic device for operating a medical artificial intelligence model, according to one embodiment, comprises: a memory for storing computer-executable instructions; and a processor, which accesses the memory and executes the instructions, wherein the instructions generate a diagnosis code sequence on the basis of sorting criteria from a plurality of diagnosis codes included in an electronic medical record (EMR) of a patient, apply the generated diagnosis code sequence to a medical data pre-processing model so as to acquire converted sequence data having a dimension lower than that of the diagnosis code sequence, and operate the medical artificial intelligence model on the basis of the input, into the medical artificial intelligence model, of the converted sequence data, so as to generate predicted diagnosis data about the patient.

Description

의료 인공지능 모델 동작 방법 및 이를 수행하는 전자 장치Method of operating a medical artificial intelligence model and electronic devices that perform it
이하, 의료 인공지능 모델 동작 방법 및 이를 수행하는 전자 장치에 관한 기술이 제공된다.Hereinafter, technology related to a method of operating a medical artificial intelligence model and an electronic device that performs the same is provided.
전자의무기록(EMR, electronic medical record) 내 환자 정보는 대부분 비정형 데이터로 기록되어 있으며 질병, 약물, 및 처치 등 다양한 코드들이 포함되어 있다. 특히, 진단 코드와 같은 데이터에는 환자의 상태 및 기타 특성을 설명하는 데 중요하지만 분석을 위한 가장 쉽고 간단한 형식이 아닌 경우가 많다. 이로 인해, 인공지능(AI, artificial intelligence) 기반 예측 연구에서 코드 형태의 의료 정보를 효율적으로 활용하기 위한 효과적인 표현(representation) 방식 적용에 대한 관심이 증가하고 있다. 그러나 현재 보편적으로 사용되는 One-hot Encoding(OHE) 방식은 코드의 카디널리티(cardinality)가 크면 활용이 어렵고 코드의 유사도를 계산하는 것 또한 불가능하다는 단점이 있다. 이를 보완하기 위해 전자의무기록에 NLP(Natural Language Processing) 모델을 직접 적용하는 경우 또한 증가하고 있지만 W2V(skip-gram)과 같은 모델은 데이터의 문맥을 반영하지 못한다는 한계가 있다. 따라서 PLM(Pre-trained language model)을 사용하여 전처리한 방식이 기존의 OHE 방식에 비해 모델 성능에 긍정적인 영향을 미치는지 확인해 볼 필요성이 있다.Most patient information in electronic medical records (EMR) is recorded as unstructured data and includes various codes such as disease, medication, and treatment. In particular, data such as diagnosis codes, which are important for describing a patient's condition and other characteristics, are often not in the easiest or simplest format for analysis. Due to this, interest in applying an effective representation method to efficiently utilize medical information in the form of code in artificial intelligence (AI)-based prediction research is increasing. However, the currently commonly used One-hot Encoding (OHE) method has the disadvantage that it is difficult to utilize when the cardinality of the code is large and it is also impossible to calculate the similarity of the codes. To complement this, the number of cases where NLP (Natural Language Processing) models are directly applied to electronic medical records is also increasing, but models such as W2V (skip-gram) have the limitation that they do not reflect the context of the data. Therefore, there is a need to check whether the preprocessing method using PLM (Pre-trained language model) has a positive effect on model performance compared to the existing OHE method.
위에서 설명한 배경기술은 발명자가 본원의 개시 내용을 도출하는 과정에서 보유하거나 습득한 것으로서, 반드시 본 출원 전에 일반 공중에 공개된 공지기술이라고 할 수는 없다.The background technology described above is possessed or acquired by the inventor in the process of deriving the disclosure of the present application, and cannot necessarily be said to be known technology disclosed to the general public before this application.
일 실시예에 따른 의료 인공지능 모델의 동작 전자 장치는, 컴퓨터로 실행 가능한 명령어들(computer-executable instructions)이 저장된 메모리; 및 상기 메모리에 액세스(access)하여 상기 명령어들을 실행하는 프로세서를 포함하고, 상기 명령어들은, 환자의 전자의무기록(EMR, electronic medical record)에 포함된 복수의 진단 코드들로부터 정렬(sorting) 기준에 기초하여 진단 코드 시퀀스(diagnosis code sequence)를 생성하고, 상기 생성된 진단 코드 시퀀스를 의료 데이터 전처리 모델에 적용하여, 상기 진단 코드 시퀀스의 차원(dimension)보다 감소된 차원을 가지는 변환된 시퀀스 데이터를 획득하고, 상기 의료 인공지능 모델에 대한 상기 변환된 시퀀스 데이터의 입력에 기초하여 상기 의료 인공지능 모델을 동작시킴으로써, 상기 환자에 대해 예측된 진단 데이터를 생성할 수 있다.An operating electronic device for a medical artificial intelligence model according to an embodiment includes a memory storing computer-executable instructions; and a processor that accesses the memory and executes the instructions, wherein the instructions are sorted according to sorting criteria from a plurality of diagnosis codes included in the patient's electronic medical record (EMR, electronic medical record). Based on this, a diagnosis code sequence is generated, and the generated diagnosis code sequence is applied to a medical data preprocessing model to obtain converted sequence data with a dimension reduced from that of the diagnosis code sequence. And, by operating the medical artificial intelligence model based on the input of the converted sequence data to the medical artificial intelligence model, predicted diagnostic data for the patient can be generated.
상기 프로세서는, 상기 전자의무기록을 미리 결정된(predetermined) 길이를 가지는 기간(time period)으로 구분함으로써 복수의 부분 시퀀스들을 획득하고, 상기 복수의 부분 시퀀스들 각각에 대하여, 각 부분 시퀀스에 포함된 하나 이상의 진단 코드들을 정렬할 수 있다.The processor obtains a plurality of partial sequences by dividing the electronic medical record into time periods having a predetermined length, and for each of the plurality of partial sequences, one part included in each partial sequence. The above diagnostic codes can be sorted.
상기 프로세서는, 상기 부분 시퀀스에 포함된 진단 코드들 중 중복되는 진단 코드들을 상기 부분 시퀀스에서 삭제할 수 있다.The processor may delete overlapping diagnostic codes among diagnostic codes included in the partial sequence from the partial sequence.
상기 프로세서는, 상기 진단 코드들의 상기 전자의무기록에서 기록된 빈도 (frequency)에 기초하여, 상기 부분 시퀀스에 포함된 하나 이상의 진단 코드들을 정렬할 수 있다.The processor may sort one or more diagnostic codes included in the partial sequence based on the frequency of the diagnostic codes recorded in the electronic medical record.
상기 프로세서는, 상기 의료 데이터 전처리 모델의 트랜스퍼 레이어(transfer layer)에서 상기 변환된 시퀀스 데이터를 획득할 수 있다.The processor may obtain the converted sequence data from a transfer layer of the medical data preprocessing model.
상기 프로세서는, 미리 결정된 기간마다 상기 진단 코드의 빈도(frequency)에 의해 정렬된 진단 코드들에 기초하여, 상기 의료 데이터 전처리 모델을 미세 조정(fine tuning)할 수 있다.The processor may fine tune the medical data preprocessing model based on diagnosis codes sorted by the frequency of the diagnosis codes at predetermined periods.
도 1은 일 실시예에 따른 의료 인공지능 모델을 동작시키는 전자 장치를 도시한 도면이다.FIG. 1 is a diagram illustrating an electronic device that operates a medical artificial intelligence model according to an embodiment.
도 2는 일 실시예에 따른 의료 인공지능 모델을 동작시키는 방법을 도시한 흐름도이다.Figure 2 is a flowchart showing a method of operating a medical artificial intelligence model according to an embodiment.
도 3은 일 실시예에 따른 전자의무기록(EMR, electronic medical record)에서 진단 코드를 도시한 도면이다.Figure 3 is a diagram illustrating a diagnosis code in an electronic medical record (EMR) according to an embodiment.
도 4는 일 실시예에 따른 진단 코드 시퀀스를 의료 데이터 전처리 모델에 적용하여 변환된 시퀀스 데이터를 획득하는 방법을 도시한 도면이다.FIG. 4 is a diagram illustrating a method of obtaining converted sequence data by applying a diagnosis code sequence to a medical data preprocessing model according to an embodiment.
도 5는 일 실시예에 따른 정렬(sorting) 방법에 따라 복수의 진단 코드 시퀀스들을 생성하는 방법을 도시한 도면이다.FIG. 5 is a diagram illustrating a method of generating a plurality of diagnostic code sequences according to a sorting method according to an embodiment.
도 6은 일 실시예에 따른 BERT 모델을 미세 조정(fine-tuning)하여 의료 데이터 전처리 모델을 생성하는 방법을 도시한 도면이다.FIG. 6 is a diagram illustrating a method of generating a medical data preprocessing model by fine-tuning the BERT model according to an embodiment.
도 7은 일 실시예에 따른 OHE(one-hot encoding)에 의해 생성된 시퀀스 데이터를 의료 인공지능 모델에 적용하는 것을 도시한 도면이다.FIG. 7 is a diagram illustrating application of sequence data generated by one-hot encoding (OHE) to a medical artificial intelligence model according to an embodiment.
도 8은 일 실시예에 따른 의료 데이터 전처리 모델에 의해 변환된 시퀀스 데이터를 의료 인공지능 모델에 적용하는 것을 도시한 도면이다.FIG. 8 is a diagram illustrating application of sequence data converted by a medical data preprocessing model to a medical artificial intelligence model according to an embodiment.
도 9는 일 실시예에 따른 진단 코드 시퀀스의 정렬 방법에 따라 의료 데이터 전처리 모델의 성능을 도시한 도면이다.FIG. 9 is a diagram illustrating the performance of a medical data preprocessing model according to a method for sorting diagnosis code sequences according to an embodiment.
도 10은 일 실시예에 따른 OHE(one-hot encoding) 및 의료 데이터 전처리 모델의 성능을 도시한 도면이다.FIG. 10 is a diagram illustrating the performance of one-hot encoding (OHE) and a medical data preprocessing model according to an embodiment.
실시예들에 대한 특정한 구조적 또는 기능적 설명들은 단지 예시를 위한 목적으로 개시된 것으로서, 다양한 형태로 변경되어 구현될 수 있다. 따라서, 실제 구현되는 형태는 개시된 특정 실시예로만 한정되는 것이 아니며, 본 명세서의 범위는 실시예들로 설명한 기술적 사상에 포함되는 변경, 균등물, 또는 대체물을 포함한다.Specific structural or functional descriptions of the embodiments are disclosed for illustrative purposes only and may be changed and implemented in various forms. Accordingly, the actual implementation form is not limited to the specific disclosed embodiments, and the scope of the present specification includes changes, equivalents, or substitutes included in the technical idea described in the embodiments.
제1 또는 제2 등의 용어를 다양한 구성요소들을 설명하는데 사용될 수 있지만, 이런 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 해석되어야 한다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.Terms such as first or second may be used to describe various components, but these terms should be interpreted only for the purpose of distinguishing one component from another component. For example, a first component may be named a second component, and similarly, the second component may also be named a first component.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다.When a component is referred to as being “connected” to another component, it should be understood that it may be directly connected or connected to the other component, but that other components may exist in between.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 설명된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함으로 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, terms such as "comprise" or "have" are intended to designate the presence of the described features, numbers, steps, operations, components, parts, or combinations thereof, but are not intended to indicate the presence of one or more other features or numbers, It should be understood that this does not exclude in advance the possibility of the presence or addition of steps, operations, components, parts, or combinations thereof.
본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다.As used herein, “A or B”, “at least one of A and B”, “at least one of A or B”, “A, B or C”, “at least one of A, B and C”, and “A Each of phrases such as “at least one of , B, or C” may include any one of the items listed together in the corresponding phrase, or any possible combination thereof.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 해당 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by a person of ordinary skill in the art. Terms as defined in commonly used dictionaries should be interpreted as having meanings consistent with the meanings they have in the context of the related technology, and unless clearly defined in this specification, should not be interpreted in an idealized or overly formal sense. No.
이하, 실시예들을 첨부된 도면들을 참조하여 상세하게 설명한다. 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조 부호를 부여하고, 이에 대한 중복되는 설명은 생략하기로 한다.Hereinafter, embodiments will be described in detail with reference to the attached drawings. In the description with reference to the accompanying drawings, identical components will be assigned the same reference numerals regardless of the reference numerals, and overlapping descriptions thereof will be omitted.
도 1은 일 실시예에 따른 의료 인공지능 모델을 동작시키는 전자 장치를 도시한 도면이다.FIG. 1 is a diagram illustrating an electronic device that operates a medical artificial intelligence model according to an embodiment.
일 실시예에 따른 전자 장치(100)는 프로세서(110) 및 메모리(120)를 포함할 수 있다. 예를 들어, 전자 장치(100)는 환자의 전자의무기록(EMR, electronic medical record)에 대한 예측된 진단 데이터를 생성하는 장치일 수 있다. 구체적으로, 전자 장치(100)는 전자의무기록에 포함된 진단 코드들을 정렬(sorting)하여 진단 코드 시퀀스를 생성할 수 있다. 전자 장치(100)는 진단 코드 시퀀스를 의료 데이터 전처리 모델에 적용하여 변환된 시퀀스 데이터를 획득할 수 있다. 전자 장치(100)는 변환된 시퀀스 데이터를 의료 인공지능 모델에 적용하여 환자의 전자의무기록에 대한 예측된 진단 데이터를 생성할 수 있다.The electronic device 100 according to one embodiment may include a processor 110 and a memory 120. For example, the electronic device 100 may be a device that generates predicted diagnostic data for a patient's electronic medical record (EMR). Specifically, the electronic device 100 may generate a diagnosis code sequence by sorting diagnosis codes included in the electronic medical record. The electronic device 100 may obtain converted sequence data by applying the diagnosis code sequence to a medical data preprocessing model. The electronic device 100 may apply the converted sequence data to a medical artificial intelligence model to generate predicted diagnosis data for the patient's electronic medical record.
프로세서(110)는, 예를 들면, 소프트웨어를 실행하여 프로세서(110)에 연결된 전자 장치(100)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일 실시예에 따르면, 의료 인공지능 모델을 동작 시키기 위한 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(110)는 명령 또는 데이터를 메모리(120)에 저장하고, 메모리(120)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 메모리(120)에 저장할 수 있다.The processor 110 may, for example, execute software to control at least one other component (e.g., hardware or software component) of the electronic device 100 connected to the processor 110, and process various data. Alternatively, calculations can be performed. According to one embodiment, as at least part of data processing or computation for operating a medical artificial intelligence model, the processor 110 stores instructions or data in the memory 120, and stores the instructions or data stored in the memory 120. Processing is performed, and the resulting data can be stored in the memory 120.
메모리(120)는 컴퓨터로 실행 가능한 명령어들을 포함할 수 있다. 메모리(120)는 의료 데이터 전처리 모델 및/또는 의료 인공지능 모델 중 적어도 하나를 동작 시키기 위해 요구되는 다양한 데이터 및/또는 정보를 임시적으로 및/또는 영구적으로 저장할 수 있다. 예를 들어, 메모리(120)는 환자의 전자의무기록, 진단 코드 시퀀스, 변환된 시퀀스 데이터, 또는 진단 데이터 중 적어도 하나 이상을 저장할 수 있다. Memory 120 may include instructions executable by a computer. The memory 120 may temporarily and/or permanently store various data and/or information required to operate at least one of a medical data preprocessing model and/or a medical artificial intelligence model. For example, the memory 120 may store at least one of a patient's electronic medical record, a diagnosis code sequence, converted sequence data, or diagnosis data.
도 2는 일 실시예에 따른 의료 인공지능 모델을 동작시키는 방법을 도시한 흐름도이다.Figure 2 is a flowchart showing a method of operating a medical artificial intelligence model according to an embodiment.
단계(210)에서, 전자 장치(예: 도 1의 전자 장치(100))는 진단 코드 시퀀스를 생성할 수 있다. 진단 코드 시퀀스는 정렬된 진단 코드들의 시퀀스일 수 있다. 진단 코드는, 환자의 전자의무기록에 포함된, 환자의 진단 결과를 지시하는 코드일 수 있다. 예를 들어, 전자 장치는, 전자의무기록에서 진단 코드들을 정렬하여 부분 시퀀스를 생성할 수 있다. 전자 장치는 부분 시퀀스들을 결합하여 진단 코드 시퀀스를 생성할 수 있다.In step 210, an electronic device (eg, electronic device 100 of FIG. 1) may generate a diagnostic code sequence. The diagnostic code sequence may be an ordered sequence of diagnostic codes. The diagnosis code may be a code included in the patient's electronic medical record that indicates the patient's diagnosis result. For example, the electronic device can generate a partial sequence by sorting diagnosis codes in an electronic medical record. The electronic device can generate a diagnostic code sequence by combining partial sequences.
전자의무기록은 진료기록부 등 의료인이 작성하는 의무기록을 전자서명이 기재된 전자문서로 입력, 관리, 및 저장하는 기록일 수 있다. 진단 코드는 환자의 사망, 질병, 손상, 또는 건강 상태를 포함하는 국제질병분류(ICD, International Statistical Classification of Diseases and Related Health Problems)를 나타낼 수 있다. 진단 코드는 알파벳 및 숫자를 병행하여 기재되는 코드들을 포함할 수 있다. 예를 들어, 진단 코드는 환자의 각 질병을 감염원이나 해부학적 부위 및 기타 요인에 따라 21개 장으로 분류하여 알파벳 및 숫자로 구분되는 코드들을 포함할 수 있다.Electronic medical records may be records that input, manage, and store medical records prepared by medical personnel, such as medical records, as electronic documents with electronic signatures. Diagnosis codes may represent the International Statistical Classification of Diseases and Related Health Problems (ICD), including the patient's death, disease, injury, or health condition. Diagnosis codes may include codes written in parallel with alphabets and numbers. For example, the diagnosis code may include codes divided into alphabets and numbers by classifying each patient's disease into 21 chapters according to the source of infection, anatomical region, and other factors.
부분 시퀀스는 기간 단위로 정렬된 진단 코드들을 포함할 수 있다. 예를 들어, 부분 시퀀스들은 미리 결정된 시간 길이를 가지는 기간(time period) 단위로 구분될 수 있고, 임의의 기간에 대응하는 부분 시퀀스는 해당 기간에 속하는 진단 코드들을 포함할 수 있다. 예를 들어, 전자 장치는 환자의 전자의무기록에서 내원일자(INDT)를 시작으로 퇴원일자(OUDT)까지 해당하는 전체 기간을 1년 단위로 구분하여 부분 시퀀스들을 생성할 수 있다. 전자 장치는 미리 결정된 파라미터(parameter)를 부분 시퀀스들 마다 추가할 수 있다. 전자 장치는 파라미터(예를 들어, 부분 시퀀스를 구분하는 구분자(delimiter))가 추가된 부분 시퀀스들을 결합하여 진단 코드 시퀀스를 생성할 수 있다. 진단 코드 시퀀스를 생성하는 방법은 하기 도 5에서 후술한다.The partial sequence may include diagnosis codes sorted by period. For example, partial sequences may be divided into time periods with a predetermined time length, and a partial sequence corresponding to a certain period may include diagnostic codes belonging to that period. For example, the electronic device may generate partial sequences by dividing the entire period from the visit date (INDT) to the discharge date (OUDT) into 1-year units in the patient's electronic medical record. The electronic device may add a predetermined parameter to each partial sequence. The electronic device may generate a diagnostic code sequence by combining partial sequences to which a parameter (eg, a delimiter that separates partial sequences) is added. A method of generating a diagnostic code sequence will be described later in FIG. 5.
단계(220)에서, 전자 장치는 진단 코드 시퀀스를 의료 데이터 전처리 모델에 적용하여 변환된 시퀀스 데이터를 획득할 수 있다. 예를 들어, 전자 장치는 의료 데이터 전처리 모델의 트랜스퍼 레이어(transfer layer)에서 변환된 시퀀스 데이터를 획득할 수 있다. 참고로, 트랜스퍼 레이어에 관한 설명은 하기 도 4에서 후술한다.In step 220, the electronic device may obtain converted sequence data by applying the diagnosis code sequence to the medical data preprocessing model. For example, the electronic device may obtain converted sequence data from the transfer layer of the medical data preprocessing model. For reference, a description of the transfer layer is provided later in FIG. 4.
의료 데이터 전처리 모델은, 트랜스포머(transformer)로부터 양방향 인코더 표현들을 수행하는 사전 학습(pre-training)된 BERT(bidirectional encoder representations from transformer) 언어 표현 모델일 수 있다. 구체적으로, 전자 장치는 사전 학습된 BERT 모델을 미세 조정(fine-tuning)하여 의료 데이터 전처리 모델을 생성할 수 있다. 사전 학습된 BERT 모델은, 자연어(natural language) 처리에 특화된 반면, 진단 코드와 같은 비정형 데이터 처리에 적합하지 않을 수 있다. 그러므로, 전자 장치는 진단 코드 시퀀스를 사전 학습된 BERT 모델에 적용하여 BERT 모델을 미세 조정할 수 있다. 전자 장치는 미세 조정된 BERT 모델을 의료 데이터 전처리 모델로 사용할 수 있다. 참고로, BERT 모델을 미세 조정하여 의료 데이터 전처리 모델을 생성하는 방법은 하기 도 6에서 후술한다.The medical data preprocessing model may be a pre-trained BERT (bidirectional encoder representations from transformer) language expression model that performs bidirectional encoder representations from a transformer. Specifically, the electronic device can create a medical data preprocessing model by fine-tuning a pre-trained BERT model. While the pre-trained BERT model is specialized for natural language processing, it may not be suitable for processing unstructured data such as diagnostic codes. Therefore, the electronic device can fine-tune the BERT model by applying diagnostic code sequences to the pre-trained BERT model. Electronic devices can use the fine-tuned BERT model as a medical data preprocessing model. For reference, a method of fine-tuning the BERT model to create a medical data preprocessing model is described later in FIG. 6.
변환된 시퀀스 데이터는 진단 코드 시퀀스에 존재하는 복수의 진단 코드들의 관계를 추상화한 데이터일 수 있다. 예를 들어 변환된 시퀀스 데이터는, 진단 코드의 특징이 숫자로 표현되는 특징 벡터들을 포함할 수 있다. 변환된 시퀀스 데이터에 관한 설명은 하기 도 8에서 후술한다.The converted sequence data may be data that abstracts the relationship between a plurality of diagnosis codes existing in the diagnosis code sequence. For example, the converted sequence data may include feature vectors in which the features of the diagnosis code are expressed as numbers. A description of the converted sequence data will be provided later in FIG. 8.
단계(230)에서, 전자 장치는 의료 인공지능 모델에 대한 변환된 시퀀스 데이터의 입력에 기초하여 의료 인공지능 모델을 동작 시킬 수 있다. 예를 들어, 의료 인공지능 모델은 변환된 시퀀스 데이터의 입력에 기초하여, 환자에 대해 예측된 진단 데이터를 생성하는 기계 학습 모델(machine learning model)일 수 있다. 의료 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 의료 인공지능 모델은, 복수의 인공 신경망 레이어들을 포함할 수 있다. 인공 신경망은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 본 명세서에서는 설명의 편의를 위해 의료 인공지능 모델이 기계 학습 모델로서 설명하였으나, 이로 한정하는 것은 아니다. 예를 들어, 의료 인공지능 모델은 진단 데이터를 예측하기 위해 결정 트리(decision tree)로 구성되는 분류 모델(classification model)일 수 있다. 구체적으로 의료 인공지능 모델은 XGB(extreme gradient boosting) 모델일 수 있다. 의료 인공지능 모델은 하나 이상의 의사결정 트리(decision tree)들을 포함할 수 있다. 의료 인공지능 모델은 하나 이상의 의사결정 트리의 결과들을 앙상블(ensemble)할 수 있다. 의료 인공 지능 모델은 하나 이상의 의사결정 트리의 결과들을 앙상블하여, 환자에 대해 예측된 진단 데이터를 생성할 수 있다. 진단 데이터는 입원환자(inpatient)의 퇴원 가능성에 관한 진단 데이터, 심부전(heart failure) 환자의 입원 중 사망 가능성에 관한 진단 데이터, 환자의 판독결과지(예: X-ray 판독결과지, CT 판독결과지, MRI 판독결과지, 또는 초음파 판독결과지)에 대한 유사한 판독결과지 검색에 관한 진단 데이터, 또는 패혈증(sepsis) 환자의 치료 가이드에 관한 진단 데이터 중 적어도 하나 이상을 포함할 수 있다.In step 230, the electronic device may operate the medical artificial intelligence model based on input of converted sequence data to the medical artificial intelligence model. For example, a medical artificial intelligence model may be a machine learning model that generates predicted diagnostic data for a patient based on input of converted sequence data. Medical artificial intelligence models can be created through machine learning. Learning algorithms may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but It is not limited. A medical artificial intelligence model may include multiple artificial neural network layers. Artificial neural networks include deep neural network (DNN), convolutional neural network (CNN), recurrent neural network (RNN), restricted boltzmann machine (RBM), belief deep network (DBN), bidirectional recurrent deep neural network (BRDNN), It may be one of deep Q-networks or a combination of two or more of the above, but is not limited to the examples described above. In this specification, the medical artificial intelligence model is described as a machine learning model for convenience of explanation, but it is not limited to this. For example, a medical artificial intelligence model may be a classification model composed of a decision tree to predict diagnostic data. Specifically, the medical artificial intelligence model may be an extreme gradient boosting (XGB) model. A medical artificial intelligence model may include one or more decision trees. A medical artificial intelligence model can ensemble the results of one or more decision trees. A medical artificial intelligence model may ensemble the results of one or more decision trees to generate predicted diagnostic data for a patient. Diagnostic data includes diagnostic data regarding the possibility of discharge of an inpatient, diagnostic data regarding the possibility of death during hospitalization of a heart failure patient, and a patient's reading result sheet (e.g., X-ray reading result sheet, CT reading result) It may include at least one of diagnostic data related to a search for a similar reading result sheet (e.g., MRI reading result sheet, or ultrasound reading result sheet), or diagnostic data relating to a treatment guide for a sepsis patient.
도 3은 일 실시예에 따른 전자의무기록(EMR, electronic medical record)에서 진단 코드를 도시한 도면이다.Figure 3 is a diagram illustrating a diagnosis code in an electronic medical record (EMR) according to an embodiment.
일 실시예에 따른 전자의무기록(300)은 환자의 개인정보, 환자의 병원 방문 종류, 임상 데이터, 또는 진단 코드(310) 중 적어도 하나 이상을 포함할 수 있다. 환자의 개인 정보는 환자의 성별, 환자의 생년월일, 및 병원 방문 ID 등을 포함할 수 있다. 환자의 병원 방문 종류는 외래 진료 및 입원 진료에 따른 방문 종류를 포함할 수 있다.The electronic medical record 300 according to one embodiment may include at least one of the patient's personal information, the patient's hospital visit type, clinical data, or a diagnosis code 310. The patient's personal information may include the patient's gender, patient's date of birth, and hospital visit ID. The patient's hospital visit type may include visit types based on outpatient treatment and inpatient treatment.
진단 코드(310)는 복수의 분류를 포함할 수 있다. 예를 들어, H00 내지 H59 진단 코드는 눈 및 눈 부속기의 질환과 관련된 정보를 포함할 수 있다. H25 내지 H28 진단 코드는 수정체의 장애와 관련된 정보를 포함할 수 있다. H25는 노년백내장과 관련된 정보를 포함하며, H25.8은 기타 노년백내장과 관련된 정보를 포함할 수 있다. 예를 들어, 전자의무기록(300)은 'H25' 코드에 대응되는 노년백내장(senile cataract)에 관한 질병 정보를 나타내는 진단 코드(310)를 포함할 수 있다. 본 명세서에서는 설명의 편의를 위해 진단 코드(310)로서 제10차 국제질병분류(ICD-10)를 주로 설명하겠으나, 이로 한정하는 것은 아니고, 진단 코드(310)는 제11차 국제질병분류(ICD-11)를 나타낼 수도 있다. 하기 도 5에서 후술하겠으나, 전자 장치(예: 도 1의 전자 장치(100))는 진단 코드(310)의 소수 점이하의 숫자(예: H25.8의 진단 코드에서 8)를 제외하고 진단 코드 시퀀스를 생성할 수 있다. Diagnosis code 310 may include multiple classifications. For example, diagnosis codes H00 to H59 may include information related to diseases of the eye and eye appendages. Diagnosis codes H25 through H28 may include information related to disorders of the lens. H25 contains information related to senile cataracts, and H25.8 may contain information related to other senile cataracts. For example, the electronic medical record 300 may include a diagnosis code 310 indicating disease information about senile cataracts corresponding to the 'H25' code. In this specification, for convenience of explanation, the 10th International Classification of Diseases (ICD-10) will be mainly described as the diagnosis code 310, but it is not limited thereto, and the diagnosis code 310 is the 11th International Classification of Diseases (ICD). It can also represent -11). As will be described later in FIG. 5, the electronic device (e.g., the electronic device 100 in FIG. 1) has a diagnostic code excluding the decimal number of the diagnostic code 310 (e.g., 8 in the diagnostic code of H25.8). Sequences can be created.
도 4는 일 실시예에 따른 진단 코드 시퀀스를 의료 데이터 전처리 모델에 적용하여 변환된 시퀀스 데이터를 획득하는 방법을 도시한 도면이다.FIG. 4 is a diagram illustrating a method of obtaining converted sequence data by applying a diagnosis code sequence to a medical data preprocessing model according to an embodiment.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100))는 제1 전처리(435) 및 제2 전처리(455)를 수행할 수 있다. 전자 장치는 제1 전처리(435)를 통해 진단 코드 시퀀스(430)를 획득할 수 있다. 전자 장치는 진단 코드 시퀀스(430)를 의료 데이터 전처리 모델(440)에 적용할 수 있다. 여기서, 의료 데이터 전처리 모델(440)은 미세 조정된 BERT 모델일 수 있다. 전자 장치는 제2 전처리(455)를 통해 변환된 시퀀스 데이터(460)를 획득할 수 있다. 전자 장치는 변환된 시퀀스 데이터(460)를 의료 인공지능 모델(470)에 적용할 수 있다.An electronic device (e.g., the electronic device 100 of FIG. 1) according to an embodiment may perform first preprocessing 435 and second preprocessing 455. The electronic device may obtain the diagnosis code sequence 430 through first preprocessing 435. The electronic device may apply the diagnosis code sequence 430 to the medical data preprocessing model 440. Here, the medical data preprocessing model 440 may be a fine-tuned BERT model. The electronic device may obtain the converted sequence data 460 through the second preprocessing 455. The electronic device can apply the converted sequence data 460 to the medical artificial intelligence model 470.
제1 전처리(435)는 전자의무기록(400)으로부터 진단 코드 시퀀스(430)를 생성하는 과정을 포함할 수 있다. 예를 들어, 전자 장치는 전자의무기록(400)으로부터 정렬된 진단 코드를 포함하는 진단 코드 시퀀스(430)를 생성하는 제1 전처리(435)를 수행할 수 있다. 진단 코드 시퀀스(430)는 환자(410)에 대한 복수의 진단 코드(420)들을 포함할 수 있다. 진단 코드 시퀀스(430)는 정렬 기준에 기초하여 정렬된 진단 코드들을 포함할 수 있다. 전자 장치는 제1 전처리(435)를 통해 획득된 진단 코드 시퀀스(430)를 의료 데이터 전처리 모델(440)에 적용할 수 있다. 구체적으로, 전자 장치는 진단 코드 시퀀스(430)를 의료 데이터 전처리 모델(440)에 적용하여, 마스크 코드 확률(446) 또는 변환된 시퀀스 데이터(460) 중 적어도 하나를 획득할 수 있다.The first preprocessing 435 may include generating a diagnosis code sequence 430 from the electronic medical record 400. For example, the electronic device may perform first preprocessing 435 to generate a diagnosis code sequence 430 including sorted diagnosis codes from the electronic medical record 400. The diagnosis code sequence 430 may include a plurality of diagnosis codes 420 for the patient 410 . Diagnostic code sequence 430 may include diagnostic codes sorted based on sorting criteria. The electronic device may apply the diagnosis code sequence 430 obtained through the first preprocessing 435 to the medical data preprocessing model 440. Specifically, the electronic device may apply the diagnosis code sequence 430 to the medical data preprocessing model 440 to obtain at least one of the mask code probability 446 or the converted sequence data 460.
전자 장치는 진단 코드 시퀀스(430)를 의료 데이터 전처리 모델(440)에 적용하여 정확도를 측정할 수 있다. 예를 들어, 전자 장치는, 의료 데이터 전처리 모델(440)의 정확도를 측정하기 위해, 마스크 코드 시퀀스(442)를 의료 데이터 전처리 모델(440)에 적용할 수 있다. 마스크 코드 시퀀스(442)는 진단 코드 시퀀스(430)에서 임의의 진단 코드가 마스크 토큰(mask token)에 의해 가려진 시퀀스를 나타낼 수 있다. 전자 장치는 마스크 코드 시퀀스(442)를 의료 데이터 전처리 모델(440)에 적용하여 마스크 코드 확률(446)을 획득할 수 있다. 마스크 코드 확률(446)은 마스크 코드 시퀀스(442)에서 마스크 토큰에 의해 가려진 진단 코드에 대한 예측 결과들을 포함할 수 있다. 전자 장치는 마스크 코드 확률(446)로서 진단 코드 I10의 예측 확률 값, I20의 예측 확률 값, C22의 예측 확률 값, 또는 J45의 예측 확률 값 중 적어도 하나 이상의 예측 확률 값을 획득할 수 있다. 여기서, 전자 장치는 마스크 코드 확률(446)에 기초하여, 의료 데이터 전처리 모델(440)의 정확도를 측정할 수 있다.The electronic device can measure accuracy by applying the diagnosis code sequence 430 to the medical data preprocessing model 440. For example, the electronic device may apply the mask code sequence 442 to the medical data pre-processing model 440 to measure the accuracy of the medical data pre-processing model 440. The mask code sequence 442 may represent a sequence in which an arbitrary diagnosis code in the diagnosis code sequence 430 is obscured by a mask token. The electronic device may obtain the mask code probability 446 by applying the mask code sequence 442 to the medical data preprocessing model 440. Mask code probability 446 may include prediction results for the diagnostic code masked by the mask token in mask code sequence 442. As the mask code probability 446, the electronic device may obtain at least one prediction probability value among the prediction probability value of diagnosis code I10, the prediction probability value of I20, the prediction probability value of C22, or the prediction probability value of J45. Here, the electronic device can measure the accuracy of the medical data preprocessing model 440 based on the mask code probability 446.
제2 전처리(455)는 진단 코드 시퀀스(430)를 의료 데이터 전처리 모델(440)에 적용하여 변환된 시퀀스 데이터(460)를 생성하는 과정을 포함할 수 있다. 예를 들어, 전자 장치는 진단 코드 시퀀스(430)를 의료 데이터 전처리 모델(440)에 적용하여 변환된 시퀀스 데이터(460)를 획득하는 제2 전처리(455)를 수행할 수 있다. 전자 장치는, 의료 데이터 전처리 모델(440)의 트랜스퍼 레이어(transfer layer)(450)에서 변환된 시퀀스 데이터(460)를 획득할 수 있다. 트랜스퍼 레이어(450)는 의료 데이터 전처리 모델(440)에 포함된 하나 이상의 레이어 중 적어도 하나의 레이어일 수 있다. 구체적으로, 의료 데이터 전처리 모델(440)은 트랜스포머 블록(transformer block) 및 분류 블록(classification block)을 포함할 수 있다. 트랜스포머 블록은 의료 데이터 전처리 모델(440)의 입력 데이터(예: 마스크 코드 시퀀스(442))에 대한 중간 출력(예: 변환된 시퀀스 데이터(460))을 출력하는 블록일 수 있다. 분류 블록은 의료 데이터 전처리 모델(440)의 입력 데이터(예: 마스크 코드 시퀀스(442))에 대한 예측 결과(예: 마스크 코드 확률(446))를 출력하는 블록일 수 있다. 전자 장치는 트랜스포머 블록의 트랜스퍼 레이어(450)에서 변환된 시퀀스 데이터(460)를 획득할 수 있다. 변환된 시퀀스 데이터(460)는 진단 코드 시퀀스(430)에 존재하는 복수의 진단 코드(420)들의 임상 정보 및 질병 간의 관계를 추상화한 수치형 벡터로 변환된 데이터들을 포함할 수 있다.The second preprocessing 455 may include generating converted sequence data 460 by applying the diagnosis code sequence 430 to the medical data preprocessing model 440. For example, the electronic device may perform second preprocessing 455 to obtain converted sequence data 460 by applying the diagnosis code sequence 430 to the medical data preprocessing model 440. The electronic device may acquire sequence data 460 converted from the transfer layer 450 of the medical data preprocessing model 440. The transfer layer 450 may be at least one layer among one or more layers included in the medical data preprocessing model 440. Specifically, the medical data preprocessing model 440 may include a transformer block and a classification block. The transformer block may be a block that outputs an intermediate output (e.g., converted sequence data 460) for input data (e.g., mask code sequence 442) of the medical data preprocessing model 440. The classification block may be a block that outputs a prediction result (e.g., mask code probability 446) for input data (e.g., mask code sequence 442) of the medical data preprocessing model 440. The electronic device may obtain converted sequence data 460 from the transfer layer 450 of the transformer block. The converted sequence data 460 may include data converted into a numeric vector that abstracts the relationship between clinical information and diseases of the plurality of diagnosis codes 420 present in the diagnosis code sequence 430.
도 5는 일 실시예에 따른 정렬(sorting) 방법에 따라 복수의 진단 코드 시퀀스들을 생성하는 방법을 도시한 도면이다.FIG. 5 is a diagram illustrating a method of generating a plurality of diagnostic code sequences according to a sorting method according to an embodiment.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100))는 제1 코드 집합(510) 및 제2 코드 집합(520)으로부터 진단 코드 시퀀스(530)를 생성할 수 있다. 예를 들어, 전자 장치는 환자(500)의 제1 코드 집합(510)에서 중복되는 진단 코드들을 제거하여 제2 코드 집합(520)을 생성할 수 있다. 제1 코드 집합(510)은 환자(500)의 내원일자를 기준으로 1년 단위로 구분되는 진단 코드들을 포함할 수 있다. 도 5를 참조하면, 제1 코드 집합(520)은 환자(500)의 내원일자를 기준으로 1년 마다 하나 이상의 진단 코드들을 포함할 수 있다.An electronic device (e.g., the electronic device 100 of FIG. 1) according to an embodiment may generate a diagnostic code sequence 530 from the first code set 510 and the second code set 520. For example, the electronic device may generate the second code set 520 by removing overlapping diagnostic codes from the first code set 510 of the patient 500. The first code set 510 may include diagnosis codes divided by one year based on the date of visit of the patient 500. Referring to FIG. 5 , the first code set 520 may include one or more diagnosis codes per year based on the date of visit of the patient 500.
제2 코드 집합(520)은 제1 코드 집합(510)에서 1년 단위로 중복되는 진단 코드들이 제거된 진단 코드들을 포함할 수 있다. 또한, 제2 코드 집합(520)은 진단 코드의 소수 점이하의 숫자가 제거된 진단 코드들을 포함할 수 있다. 전자 장치는 제2 코드 집합(520)에서 1년 단위로 복수의 진단 코드들을 포함하는 부분 시퀀스를 생성할 수 있다. 즉, 부분 시퀀스는 환자(500)의 1년동안 진단받은 복수의 진단 코드들을 포함할 수 있다. 예를 들어, 도 5를 참조하면, 제2 코드 집합(520)에서 1년 차에 해당하는 부분 시퀀스는, 진단 코드 'J45'를 포함할 수 있다. 또한, 제2 코드 집합(520)에서 2년 차에 해당하는 부분 시퀀스는, 진단 코드 'J45', 'N40', 및 'I20'을 포함할 수 있다. 그러므로, 전자 장치는 1년 기간의 진단 코드들을 포함하는 부분 시퀀스를 생성할 수 있다. 전자 장치는 상술한 부분 시퀀스들을 결합하여 진단 코드 시퀀스(530)를 생성할 수 있다. 예를 들어, 전자 장치는 제2 코드 집합(520)으로부터 생성된 복수의 부분 시퀀스들을 결합하여 진단 코드 시퀀스(530)를 생성할 수 있다. 구체적으로, 전자 장치는 제2 코드 집합(520)에서 1년 단위로 구분자(예를 들어, 마침표('.'))를 추가하여 부분 시퀀스들이 결합된 진단 코드 시퀀스(530)를 생성할 수 있다. 진단 코드 시퀀스(530)는 환자(500)의 내원일자를 기준으로 1년차에 해당하는 진단 코드(예: 'J45') 내지 4년 차에 해당하는 진단 코드들(예: R60, Z85, J45, I20 등)이 구분자에 의해 결합된 시퀀스를 포함할 수 있다. 다만, 본 명세서에서는 설명의 편의를 위하여 1년 단위를 구분하는 파라미터로서 마침표를 주로 설명하겠으나, 이로 한정하는 것은 아니다.The second code set 520 may include diagnostic codes in which overlapping diagnostic codes are removed from the first code set 510 on a one-year basis. Additionally, the second code set 520 may include diagnosis codes in which decimal numbers of the diagnosis code have been removed. The electronic device may generate a partial sequence including a plurality of diagnostic codes on a yearly basis from the second code set 520. That is, the partial sequence may include a plurality of diagnosis codes that the patient 500 was diagnosed with during one year. For example, referring to FIG. 5, the partial sequence corresponding to year 1 in the second code set 520 may include the diagnosis code 'J45'. Additionally, the partial sequence corresponding to the second year in the second code set 520 may include diagnosis codes 'J45', 'N40', and 'I20'. Therefore, the electronic device can generate a partial sequence containing diagnostic codes for a period of one year. The electronic device can generate the diagnosis code sequence 530 by combining the above-described partial sequences. For example, the electronic device may generate the diagnostic code sequence 530 by combining a plurality of partial sequences generated from the second code set 520. Specifically, the electronic device may generate a diagnosis code sequence 530 in which partial sequences are combined by adding a separator (e.g., a period ('.')) in units of one year in the second code set 520. . The diagnosis code sequence 530 includes diagnosis codes corresponding to the first year (e.g., 'J45') to diagnosis codes corresponding to the fourth year (e.g., R60, Z85, J45, I20, etc.) may contain sequences combined by delimiters. However, in this specification, for convenience of explanation, the period will mainly be explained as a parameter to distinguish one year, but it is not limited thereto.
일 실시예에 따른 전자 장치는 정렬 기준에 따라 진단 코드들이 정렬된 진단 코드 시퀀스를 획득할 수 있다. 예를 들어, 정렬 기준은 무작위(random) 정렬, 알파벳순의 순서(alphabetical order) 정렬, 또는 빈도(frequency) 정렬 중 적어도 하나를 포함할 수 있다.The electronic device according to one embodiment may obtain a diagnosis code sequence in which diagnosis codes are sorted according to an alignment standard. For example, the sorting criteria may include at least one of random sorting, alphabetical order sorting, or frequency sorting.
무작위 정렬은 난수(random number)를 통해 생성된 임의의 확률을 기초로 진단 코드들을 정렬하는 것일 수 있다.Random sorting may be sorting diagnostic codes based on a random probability generated through random numbers.
알파벳순의 순서 정렬은 진단 코드가 포함하는 알파벳의 순서에 따라 정렬하는 것일 수 있다.Alphabetical ordering may be sorting according to the alphabet order included in the diagnosis code.
빈도 정렬은 제2 코드 집합(520)에서 각 진단 코드들 마다 발생된 횟수에 기초하여 정렬하는 것일 수 있다. 예를 들어, 전자 장치는 제2 코드 집합(520)에 존재하는 모든 진단 코드들에 대해 각각 발생된 횟수를 계산할 수 있다. 전자 장치는 각 기간에서 제1 발생 빈도를 가지는 진단 코드에 대해, 제1 발생 빈도보다 큰 제2 발생 빈도를 가지는 진단 코드를 선행하게 배열함으로써, 해당 기간에 대한 부분 시퀀스를 생성할 수 있다. 예를 들어, 전자 장치는 발생된 횟수가 큰 진단 코드가 내림차순으로 정렬되도록 진단 코드를 정렬할 수 있다. 예를 들어, 전자 장치는, 임의의 기간 동안 가장 큰 발생 빈도를 가지는 진단 코드부터 가장 작은 발생 빈도를 가지는 진단 코드까지, 해당 기간에 대해 순차적으로 정렬된 진단 코드들을 포함하는 부분 시퀀스를 생성할 수 있다. 전자 장치는 진단 코드들 중 둘 이상의 진단 코드들이 같은 발생 빈도를 가지는 경우, 해당 진단 코드들을 발생 순서에 기초하여 정렬할 수 있다. 예를 들어, 전자 장치는 같은 발생 빈도를 가지는 진단 코드들 중 먼저 발생한 진단 코드를 선행(precede)하게 배치할 수 있다.Frequency sorting may be sorting based on the number of occurrences of each diagnostic code in the second code set 520. For example, the electronic device may calculate the number of occurrences for all diagnostic codes present in the second code set 520. The electronic device may generate a partial sequence for a corresponding period by arranging a diagnostic code with a second frequency of occurrence greater than the first frequency of occurrence in advance of a diagnostic code with a first frequency of occurrence in each period. For example, the electronic device may sort diagnostic codes so that diagnostic codes with a greater number of occurrences are sorted in descending order. For example, the electronic device may generate a partial sequence containing diagnostic codes arranged sequentially for a certain period of time, from the diagnostic code with the greatest frequency of occurrence to the diagnostic code with the least frequency of occurrence. there is. If two or more of the diagnostic codes have the same frequency of occurrence, the electronic device may sort the diagnostic codes based on the order of occurrence. For example, the electronic device may place the diagnostic code that occurs first among diagnostic codes with the same frequency of occurrence as precedence.
전자 장치는, 복수의 부분 시퀀스들 각각에 대하여, 각 부분 시퀀스에 포함된 하나 이상의 진단 코드들을 정렬할 수 있다.The electronic device may align one or more diagnostic codes included in each partial sequence for each of the plurality of partial sequences.
제1 진단 코드 시퀀스(540)는, 무작위 정렬 기준에 의해 진단 코드들이 정렬된 부분 시퀀스들을 결합하여 생성된 진단 코드 시퀀스를 나타낼 수 있다. 제2 진단 코드 시퀀스(550)는, 알파벳의 순서 정렬 기준에 의해 진단 코드들이 정렬된 부분 시퀀스들을 결합하여 생성된 진단 코드 시퀀스를 나타낼 수 있다. 제3 진단 코드 시퀀스(560)는, 빈도 정렬 기준에 의해 진단 코드들이 정렬된 부분 시퀀스들을 결합하여 생성된 진단 코드 시퀀스를 나타낼 수 있다.The first diagnosis code sequence 540 may represent a diagnosis code sequence generated by combining partial sequences in which diagnosis codes are sorted according to a random sorting standard. The second diagnosis code sequence 550 may represent a diagnosis code sequence generated by combining partial sequences in which diagnosis codes are sorted according to an alphabet ordering standard. The third diagnosis code sequence 560 may represent a diagnosis code sequence generated by combining partial sequences in which diagnosis codes are sorted according to a frequency sorting criterion.
전자 장치는 제1 진단 코드 시퀀스(540)를 제1 의료 데이터 전처리 모델(542)에 적용할 수 있다. 전자 장치는 제2 진단 코드 시퀀스(550)를 제2 의료 데이터 전처리 모델(552)에 적용할 수 있다. 전자 장치는 제3 진단 코드 시퀀스(560)를 제3 의료 데이터 전처리 모델(562)에 적용할 수 있다. 여기서, 제1 의료 데이터 전처리 모델(542) 내지 제3 의료 데이터 전처리 모델(562)은 미세 조정된 BERT 모델일 수 있다. 참고로, 도 5에서는 의료 데이터 전처리 모델들(예: 제1 의료 데이터 전처리 모델(542), 제2 의료 데이터 전처리 모델(552), 및 제3 의료 데이터 전처리 모델(562))이 별개 모델인 것처럼 도시하였으나, 이로 한정하는 것은 아니다. 하나의 의료 데이터 전처리 모델이 여러 진단 코드 시퀀스를 적용하는 연산들에서 반복적으로 사용될 수도 있다.The electronic device may apply the first diagnosis code sequence 540 to the first medical data preprocessing model 542. The electronic device may apply the second diagnosis code sequence 550 to the second medical data preprocessing model 552. The electronic device may apply the third diagnosis code sequence 560 to the third medical data preprocessing model 562. Here, the first medical data preprocessing model 542 to the third medical data preprocessing model 562 may be a finely tuned BERT model. For reference, in Figure 5, the medical data preprocessing models (e.g., the first medical data preprocessing model 542, the second medical data preprocessing model 552, and the third medical data preprocessing model 562) are separate models. Although shown, it is not limited to this. A single medical data preprocessing model may be used repeatedly in operations that apply multiple diagnostic code sequences.
도 6은 일 실시예에 따른 BERT 모델을 미세 조정(fine-tuning)하여 의료 데이터 전처리 모델을 생성하는 방법을 도시한 도면이다.FIG. 6 is a diagram illustrating a method of generating a medical data preprocessing model by fine-tuning the BERT model according to an embodiment.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100))는, 사전 학습된 BERT 모델(620)을 미세 조정(630)하여, 의료 데이터 전처리 모델을 생성할 수 있다. 예를 들어, 전자 장치는 진단 코드 시퀀스(600)로부터 마스킹 입력(610)을 생성할 수 있다. 여기서, 진단 코드 시퀀스(600)는 빈도에 기초하여 정렬된 진단 코드들을 포함하는 시퀀스 일 수 있다. 마스킹 입력(610)은 진단 코드 시퀀스(600)에서 임의의 진단 코드(예를 들어, 도 6에서는 I40)가 마스크 토큰(mask token)에 의해 가려진 형태의 진단 코드들을 포함할 수 있다. 전자 장치는 마스킹 입력(610)을 사전 학습된 BERT 모델(620)에 적용하여 미세 조정(630)을 수행할 수 있다. 사전 학습된 BERT 모델(620)은 진단 코드들에 대해 예측 성능이 우수하지 않은 모델일 수 있다. 그러므로, 전자 장치는 마스킹 입력(610) 생성하여 사전 학습된 BERT 모델(620)의 미세 조정(630)을 수행함으로써, 의료 데이터에 관해 예측 성능이, 미세 조정(630) 수행 전 모델 대비 개선된 의료 데이터 전처리 모델을 획득할 수 있다.An electronic device (e.g., the electronic device 100 of FIG. 1) according to an embodiment may generate a medical data preprocessing model by fine-tuning (630) the pre-trained BERT model (620). For example, the electronic device may generate masking input 610 from a diagnostic code sequence 600. Here, the diagnosis code sequence 600 may be a sequence including diagnosis codes sorted based on frequency. The masking input 610 may include diagnostic codes in which an arbitrary diagnostic code (for example, I40 in FIG. 6) in the diagnostic code sequence 600 is obscured by a mask token. The electronic device may perform fine tuning (630) by applying the masking input (610) to the pre-trained BERT model (620). The pre-trained BERT model 620 may be a model that does not have excellent prediction performance for diagnostic codes. Therefore, the electronic device creates a masking input 610 and performs fine-tuning 630 of the pre-trained BERT model 620, so that the prediction performance regarding medical data is improved compared to the model before fine-tuning 630. A data preprocessing model can be obtained.
참고로 BERT 모델(620)을 미세 조정하는 방법의 경우, 상술한 BERT 모델(620)은 마스킹 입력(610) 및 해당 마스킹 입력(610)에 매핑된 예측 출력(예를 들어, 마스킹 입력(610)에서 마스크 토큰(mask token)에 의해 가려진 형태의 진단 코드 예측 확률)의 쌍을 포함하는 데이터에 기초하여 미세 조정될 수 있다. 예를 들어, BERT 모델(620)은 마스킹 입력(610)으로부터 예측 출력을 출력하도록 미세 조정될 수 있다. 미세 조정 중의 BERT 모델(620)은 마스킹 입력(610)에 응답하여 임시 출력을 생성할 수 있고, 임시 출력 및 미세 조정 타깃 간의 손실이 최소화되도록 미세 조정될 수 있다. 미세 조정 동안 BERT 모델(620)의 파라미터(예를 들어, BERT 모델(620)에서 노드들/레이어들 간의 연결 가중치)가 손실에 따라 업데이트될 수 있다. 이러한 미세 조정은, 예를 들어, BERT 모델(620)이 수행되는 전자 장치 자체에서 수행될 수 있고, 별도의 서버를 통해 수행될 수도 있다. 미세 조정된 BERT 모델(예를 들어, 의료 데이터 전처리 모델)은 메모리에 저장될 수 있다.For reference, in the case of a method of fine-tuning the BERT model 620, the above-described BERT model 620 includes a masking input 610 and a prediction output mapped to the masking input 610 (e.g., masking input 610). It can be fine-tuned based on data containing pairs of diagnostic code prediction probabilities in a form masked by a mask token. For example, BERT model 620 can be fine-tuned to output a prediction output from masking input 610. The BERT model 620 during fine tuning can generate a temporary output in response to the masking input 610 and can be fine-tuned to minimize loss between the temporary output and the fine tuning target. During fine-tuning, parameters of the BERT model 620 (e.g., connection weights between nodes/layers in the BERT model 620) may be updated depending on the loss. This fine adjustment may be performed, for example, in the electronic device itself where the BERT model 620 is performed, or may be performed through a separate server. The fine-tuned BERT model (e.g., medical data preprocessing model) may be stored in memory.
도 7은 일 실시예에 따른 OHE(one-hot encoding)에 의해 생성된 시퀀스 데이터를 의료 인공지능 모델에 적용하는 것을 도시한 도면이다.FIG. 7 is a diagram illustrating application of sequence data generated by one-hot encoding (OHE) to a medical artificial intelligence model according to an embodiment.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100))는 진단 코드 시퀀스(700)를 원-핫 인코딩(OHE, one-hot encoding)(710)을 통해 시퀀스 데이터(720)를 생성할 수 있다. 예를 들어, 원-핫 인코딩(710)은 표현하고 싶은 단어(예를 들어, 진단 코드)에 대해 숫자 '1'을 부가하여 벡터를 생성하는 인코딩일 수 있다. 도 7을 참조하면, 시퀀스 데이터(720)는 진단 코드 시퀀스(700)에 포함된 환자의 수에 대응되는 행(row)의 개수와 국제질병분류인 진단 코드의 개수에 대응되는 열(column)의 개수를 포함할 수 있다. 또한, 시퀀스 데이터(720)는 표현하고 싶은 단어 또는 진단 코드 시퀀스(700)에 포함되어 있는 진단 코드의 인덱스에 대해서는 '1'인 원소 값을 포함할 수 있다.An electronic device (e.g., the electronic device 100 of FIG. 1) according to an embodiment converts the diagnostic code sequence 700 into sequence data 720 through one-hot encoding (OHE) 710. can be created. For example, one-hot encoding 710 may be an encoding that generates a vector by adding the number '1' to the word to be expressed (eg, a diagnosis code). Referring to FIG. 7, the sequence data 720 includes the number of rows corresponding to the number of patients included in the diagnosis code sequence 700 and the number of columns corresponding to the number of diagnosis codes of the International Classification of Diseases. Can include numbers. Additionally, the sequence data 720 may include an element value of '1' for the index of the word to be expressed or the diagnosis code included in the diagnosis code sequence 700.
전자 장치는 시퀀스 데이터(720)를 의료 인공지능 모델(730)에 적용할 수 있다. 후술하겠으나, 원-핫 인코딩(710)에 의해 획득된 시퀀스 데이터(720)는 의료 데이터 전처리 모델에 의해 생성된 변환된 시퀀스 데이터(예: 도 4의 변환된 시퀀스 데이터(460)) 대비 진단 코드의 존재 여부에 대해서만 표현된 행렬일 수 있다.The electronic device may apply the sequence data 720 to the medical artificial intelligence model 730. As will be described later, the sequence data 720 obtained by one-hot encoding 710 is the converted sequence data generated by the medical data preprocessing model (e.g., the converted sequence data 460 of FIG. 4) compared to the diagnostic code. It can be a matrix expressed only in terms of presence or absence.
도 8은 일 실시예에 따른 의료 데이터 전처리 모델에 의해 변환된 시퀀스 데이터를 의료 인공지능 모델에 적용하는 것을 도시한 도면이다.FIG. 8 is a diagram illustrating application of sequence data converted by a medical data preprocessing model to a medical artificial intelligence model according to an embodiment.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100))는 의료 데이터 전처리 모델(820)의 트랜스퍼 레이어(transfer layer)에서 변환된 시퀀스 데이터(830)를 획득할 수 있다. 예를 들어, 의료 데이터 전처리 모델(820)은 진단 코드의 빈도(810)에 기초하여 정렬된 진단 코드 시퀀스를 통해 미세 조정된 BERT 모델일 수 있다. 도 8을 참조하면, 변환된 시퀀스 데이터(830)는 국제질병분류인 진단 코드의 개수(예를 들어, 도 7의 시퀀스 데이터(720)의 열(row)의 개수)보다 감소된 차원을 포함할 수 있다. 전자 장치는 진단 코드 시퀀스(800)의 특성이 저차원으로 감소된 변환된 시퀀스 데이터(830)를 의료 인공지능 모델(840)에 적용할 수 있다. 변환된 시퀀스 데이터(830)는 시퀀스 데이터(예: 도 7의 시퀀스 데이터(720)) 대비, 진단 코드 시퀀스(800)의 진단 코드들의 임상 정보 및 질병 간의 관계를 추상화한 데이터를 포함할 수 있다. 전자 장치는 상술한 변환된 시퀀스 데이터(830)를 통해 의료 인공지능 모델(840)의 성능 개선에 긍정적인 영향을 제공할 수 있다.An electronic device (e.g., the electronic device 100 of FIG. 1) according to an embodiment may acquire sequence data 830 converted from the transfer layer of the medical data preprocessing model 820. For example, the medical data preprocessing model 820 may be a BERT model fine-tuned through a sequence of diagnosis codes sorted based on the frequency 810 of the diagnosis codes. Referring to FIG. 8, the converted sequence data 830 may include a reduced dimension than the number of International Classification of Diseases diagnosis codes (e.g., the number of rows of the sequence data 720 of FIG. 7). You can. The electronic device may apply the converted sequence data 830, in which the characteristics of the diagnosis code sequence 800 are reduced to a low dimension, to the medical artificial intelligence model 840. The converted sequence data 830 may include data that abstracts the relationship between clinical information and diseases of the diagnosis codes of the diagnosis code sequence 800, compared to sequence data (e.g., sequence data 720 of FIG. 7). The electronic device can provide a positive influence on improving the performance of the medical artificial intelligence model 840 through the converted sequence data 830 described above.
도 9는 일 실시예에 따른 진단 코드 시퀀스의 정렬 방법에 따라 의료 데이터 전처리 모델의 성능을 도시한 도면이다.FIG. 9 is a diagram illustrating the performance of a medical data preprocessing model according to a method for sorting diagnosis code sequences according to an embodiment.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100))는 진단 코드 시퀀스를 의료 데이터 전처리 모델에 적용하여 예측 확률 결과를 획득할 수 있다. 예를 들어, 제1 의료 데이터 전처리 모델(900) 내지 제3 의료 데이터 전처리 모델(920)은 미세 조정된 BERT 모델일 수 있다. 제1 의료 데이터 전처리 모델(900)은 무작위(random) 정렬에 의해 정렬된 진단 코드 시퀀스에 기초하여 미세 조정된 모델일 수 있다. 제2 의료 데이터 전처리 모델(910)은 알파벳순의 순서(alphabetical order) 정렬에 의해 정렬된 진단 코드 시퀀스에 기초하여 미세 조정된 모델일 수 있다. 제3 의료 데이터 전처리 모델(920)은 빈도(frequency) 정렬에 의해 정렬된 진단 코드 시퀀스에 기초하여 미세 조정된 모델일 수 있다. 예측 확률 결과는, 의료 데이터 전처리 모델이 진단 코드 시퀀스의 예시에서 마스크 토큰의 정확한 진단 코드를 예측하는 결과를 나타낼 수 있다.An electronic device (e.g., the electronic device 100 of FIG. 1) according to an embodiment may obtain a predicted probability result by applying a diagnosis code sequence to a medical data preprocessing model. For example, the first medical data preprocessing model 900 to the third medical data preprocessing model 920 may be a fine-tuned BERT model. The first medical data preprocessing model 900 may be a fine-tuned model based on diagnosis code sequences sorted by random sorting. The second medical data preprocessing model 910 may be a fine-tuned model based on diagnosis code sequences sorted in alphabetical order. The third medical data preprocessing model 920 may be a fine-tuned model based on diagnosis code sequences sorted by frequency sorting. The prediction probability result may represent the result of a medical data preprocessing model predicting the correct diagnosis code of a mask token in an example of a diagnosis code sequence.
전자 장치는, 도 9에 도시된 진단 코드 시퀀스의 예시에서 임의의 진단 코드를 마스크 토큰으로 교체할 수 있다. 전자 장치는 마스크 토큰이 포함된 진단 코드 시퀀스를 의료 데이터 전처리 모델에 적용하여 예측 확률 결과를 획득할 수 있다. 예를 들어, 전자 장치는 제3 의료 데이터 전처리 모델(920)에서 제1 의료 데이터 전처리 모델(900) 및 제2 데이터 전처리 모델(910) 대비 높은 예측 확률 결과를 획득할 수 있다.The electronic device can replace any diagnostic code with a mask token in the example diagnostic code sequence shown in FIG. 9. The electronic device can obtain a predicted probability result by applying the diagnosis code sequence including the mask token to the medical data preprocessing model. For example, the electronic device may obtain a higher prediction probability result from the third medical data preprocessing model 920 than from the first medical data preprocessing model 900 and the second data preprocessing model 910.
도 10은 일 실시예에 따른 OHE(one-hot encoding) 및 의료 데이터 전처리 모델의 성능을 도시한 도면이다.FIG. 10 is a diagram illustrating the performance of one-hot encoding (OHE) and a medical data preprocessing model according to an embodiment.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100))는 ROC 커브 그래프(1000)를 획득할 수 있다. ROC 커브 그래프(1000)는 ROC 커브를 포함할 수 있다. ROC 커브는 민감도(sensitivity) 및 특이도(specificity)를 기초로 결과를 평가하는 척도일 수 있다.An electronic device (e.g., the electronic device 100 of FIG. 1) according to an embodiment may obtain the ROC curve graph 1000. The ROC curve graph 1000 may include an ROC curve. The ROC curve can be a measure to evaluate results based on sensitivity and specificity.
예를 들어, 그래프(1010)는 의료 데이터 전처리 모델(예: 도 8의 의료 데이터 전처리 모델(820))을 통해 획득된 변환된 시퀀스 데이터(예: 도 8의 변환된 시퀀스 데이터(830))를, 의료 인공지능 모델(예: 도 8의 의료 인공지능 모델(840))에 적용하여 환자에 대해 예측된 진단 데이터의 결과를 나타낼 수 있다. 그래프(1020)는 원-핫 인코딩(예: 도 7의 원-핫 인코딩(710))을 통해 획득된 시퀀스 데이터(예: 도 7의 시퀀스 데이터(720))를, 의료 인공지능 모델(예: 도 7의 의료 인공지능 모델(730))에 적용하여 환자에 대해 예측된 진단 데이터의 결과를 나타낼 수 있다.For example, the graph 1010 represents converted sequence data (e.g., converted sequence data 830 in FIG. 8) obtained through a medical data preprocessing model (e.g., medical data preprocessing model 820 in FIG. 8). , can be applied to a medical artificial intelligence model (e.g., medical artificial intelligence model 840 in FIG. 8) to represent the results of diagnostic data predicted for the patient. The graph 1020 is a medical artificial intelligence model (e.g., sequence data 720 of FIG. 7) obtained through one-hot encoding (e.g., one-hot encoding 710 of FIG. 7). By applying it to the medical artificial intelligence model 730 of FIG. 7, the results of the predicted diagnostic data for the patient can be displayed.
도 10을 참조하면, 진단 코드 G20에 대해 의료 데이터 전처리 모델을 사용하여 획득된 결과가 원-핫 인코딩을 사용하여 획득된 결과보다 우수한 성능을 나타내는 것을 확인할 수 있다. 다만, 진단 코드 G20으로 한정하는 것은 아니라, 국제질병분류에 포함된 다수의 진단 코드에서, 의료 데이터 전처리 모델을 사용하여 획득된 결과가 우수한 성능을 나타낼 수 있다.Referring to FIG. 10, it can be seen that the results obtained using the medical data preprocessing model for diagnosis code G20 show better performance than the results obtained using one-hot encoding. However, it is not limited to the diagnosis code G20, and the results obtained using the medical data preprocessing model can show excellent performance in many diagnosis codes included in the International Classification of Diseases.
이상에서 설명된 실시예들은 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치, 방법 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 컨트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The embodiments described above may be implemented with hardware components, software components, and/or a combination of hardware components and software components. For example, the devices, methods, and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, and a field programmable gate (FPGA). It may be implemented using a general-purpose computer or a special-purpose computer, such as an array, programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and software applications running on the operating system. Additionally, a processing device may access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, a single processing device may be described as being used; however, those skilled in the art will understand that a processing device includes multiple processing elements and/or multiple types of processing elements. It can be seen that it may include. For example, a processing device may include multiple processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are possible.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing unit to operate as desired, or may be processed independently or collectively. You can command the device. Software and/or data may be used on any type of machine, component, physical device, virtual equipment, computer storage medium or device to be interpreted by or to provide instructions or data to a processing device. , or may be permanently or temporarily embodied in a transmitted signal wave. Software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored on a computer-readable recording medium.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있으며 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. A computer-readable medium may include program instructions, data files, data structures, etc., singly or in combination, and the program instructions recorded on the medium may be specially designed and constructed for the embodiment or may be known and available to those skilled in the art of computer software. It may be possible. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -Includes optical media (magneto-optical media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, etc. Examples of program instructions include machine language code, such as that produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc.
위에서 설명한 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 또는 복수의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The hardware devices described above may be configured to operate as one or multiple software modules to perform the operations of the embodiments, and vice versa.
이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 이를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with limited drawings, those skilled in the art can apply various technical modifications and variations based on this. For example, the described techniques are performed in a different order than the described method, and/or components of the described system, structure, device, circuit, etc. are combined or combined in a different form than the described method, or other components are used. Alternatively, appropriate results may be achieved even if substituted or substituted by an equivalent.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents of the claims also fall within the scope of the claims described below.

Claims (13)

  1. 의료 인공지능 모델의 동작 전자 장치에 있어서,In the operating electronic device of the medical artificial intelligence model,
    컴퓨터로 실행 가능한 명령어들(computer-executable instructions)이 저장된 메모리; 및Memory storing computer-executable instructions; and
    상기 메모리에 액세스(access)하여 상기 명령어들을 실행하는 프로세서A processor that accesses the memory and executes the instructions.
    를 포함하고,Including,
    상기 명령어들은,The above commands are:
    환자의 전자의무기록(EMR, electronic medical record)에 포함된 복수의 진단 코드들로부터 정렬(sorting) 기준에 기초하여 진단 코드 시퀀스(diagnosis code sequence)를 생성하고,Generating a diagnosis code sequence based on sorting criteria from a plurality of diagnosis codes included in the patient's electronic medical record (EMR),
    상기 생성된 진단 코드 시퀀스를 의료 데이터 전처리 모델에 적용하여, 상기 진단 코드 시퀀스의 차원(dimension)보다 감소된 차원을 가지는 변환된 시퀀스 데이터를 획득하고,Applying the generated diagnosis code sequence to a medical data preprocessing model to obtain converted sequence data having a reduced dimension than that of the diagnosis code sequence,
    상기 의료 인공지능 모델에 대한 상기 변환된 시퀀스 데이터의 입력에 기초하여 상기 의료 인공지능 모델을 동작시킴으로써, 상기 환자에 대해 예측된 진단 데이터를 생성하는Generating predicted diagnostic data for the patient by operating the medical artificial intelligence model based on the input of the converted sequence data to the medical artificial intelligence model.
    전자 장치.Electronic devices.
  2. 제1항에 있어서,According to paragraph 1,
    상기 프로세서는,The processor,
    상기 전자의무기록을 미리 결정된(predetermined) 길이를 가지는 기간(time period)으로 구분함으로써 복수의 부분 시퀀스들을 획득하고,Obtaining a plurality of partial sequences by dividing the electronic medical record into time periods with a predetermined length,
    상기 복수의 부분 시퀀스들 각각에 대하여, 각 부분 시퀀스에 포함된 하나 이상의 진단 코드들을 정렬하는For each of the plurality of partial sequences, sorting one or more diagnostic codes included in each partial sequence.
    전자 장치.Electronic devices.
  3. 제2항에 있어서,According to paragraph 2,
    상기 프로세서는,The processor,
    상기 부분 시퀀스에 포함된 진단 코드들 중 중복되는 진단 코드들을 상기 부분 시퀀스에서 삭제하는Deleting duplicate diagnostic codes among the diagnostic codes included in the partial sequence from the partial sequence.
    전자 장치.Electronic devices.
  4. 제2항에 있어서,According to paragraph 2,
    상기 프로세서는,The processor,
    상기 진단 코드들의 상기 전자의무기록에서 기록된 빈도(frequency)에 기초하여, 상기 부분 시퀀스에 포함된 하나 이상의 진단 코드들을 정렬하는Sorting one or more diagnostic codes included in the partial sequence based on the frequency recorded in the electronic medical record of the diagnostic codes.
    전자 장치.Electronic devices.
  5. 제1항에 있어서,According to paragraph 1,
    상기 프로세서는,The processor,
    상기 의료 데이터 전처리 모델의 트랜스퍼 레이어(transfer layer)에서 상기 변환된 시퀀스 데이터를 획득하는Obtaining the converted sequence data from the transfer layer of the medical data preprocessing model
    전자 장치.Electronic devices.
  6. 제1항에 있어서,According to paragraph 1,
    상기 프로세서는,The processor,
    미리 결정된 기간마다 상기 진단 코드의 빈도(frequency)에 의해 정렬된 진단 코드들에 기초하여, 상기 의료 데이터 전처리 모델을 미세 조정(fine tuning)하는Fine tuning the medical data preprocessing model based on diagnosis codes sorted by the frequency of the diagnosis codes at predetermined periods.
    전자 장치.Electronic devices.
  7. 프로세서에 의하여 수행되는 의료 인공지능 모델의 동작 방법에 있어서,In a method of operating a medical artificial intelligence model performed by a processor,
    환자의 전자의무기록(EMR, electronic medical record)에 포함된 복수의 진단 코드들로부터 정렬(sorting) 기준에 기초하여 진단 코드 시퀀스(diagnosis code sequence)를 생성하는 단계;Generating a diagnosis code sequence based on sorting criteria from a plurality of diagnosis codes included in a patient's electronic medical record (EMR);
    상기 생성된 진단 코드 시퀀스를 의료 데이터 전처리 모델에 적용하여, 상기 진단 코드 시퀀스의 차원(dimension)보다 감소된 차원을 가지는 변환된 시퀀스 데이터를 획득하는 단계; 및applying the generated diagnosis code sequence to a medical data preprocessing model to obtain converted sequence data having a dimension reduced than that of the diagnosis code sequence; and
    상기 의료 인공지능 모델에 대한 상기 변환된 시퀀스 데이터의 입력에 기초하여 상기 의료 인공지능 모델을 동작시킴으로써, 상기 환자에 대해 예측된 진단 데이터를 생성하는 단계Generating predicted diagnostic data for the patient by operating the medical artificial intelligence model based on input of the converted sequence data to the medical artificial intelligence model.
    를 포함하는 방법.How to include .
  8. 제7항에 있어서,In clause 7,
    상기 진단 코드 시퀀스를 생성하는 단계는,The step of generating the diagnostic code sequence is,
    상기 전자의무기록을 미리 결정된(predetermined) 길이를 가지는 기간(time period)으로 구분함으로써 복수의 부분 시퀀스들을 획득하는 단계; 및Obtaining a plurality of partial sequences by dividing the electronic medical record into time periods having a predetermined length; and
    상기 복수의 부분 시퀀스들 각각에 대하여, 각 부분 시퀀스에 포함된 하나 이상의 진단 코드들을 정렬하는 단계For each of the plurality of partial sequences, aligning one or more diagnostic codes included in each partial sequence.
    를 포함하는 방법.How to include .
  9. 제8항에 있어서,According to clause 8,
    상기 복수의 부분 시퀀스들을 획득하는 단계는,The step of obtaining the plurality of partial sequences includes:
    상기 복수의 부분 시퀀스들 각각에 대하여, 각 부분 시퀀스에 포함된 진단 코드들 중 중복되는 진단 코드들을 상기 부분 시퀀스에서 삭제하는 단계For each of the plurality of partial sequences, deleting overlapping diagnostic codes among the diagnostic codes included in each partial sequence from the partial sequence.
    를 포함하는 방법.How to include .
  10. 제8항에 있어서,According to clause 8,
    상기 진단 코드들을 정렬하는 단계는,The step of sorting the diagnostic codes is,
    상기 진단 코드들의 상기 전자의무기록에서 기록된 빈도(frequency)에 기초하여, 상기 부분 시퀀스에 포함된 하나 이상의 진단 코드들을 정렬하는 단계Sorting one or more diagnostic codes included in the partial sequence based on the frequency of the diagnostic codes recorded in the electronic medical record.
    를 포함하는 방법.How to include .
  11. 제7항에 있어서,In clause 7,
    상기 변환된 시퀀스 데이터를 획득하는 단계는,The step of acquiring the converted sequence data is,
    상기 의료 데이터 전처리 모델의 트랜스퍼 레이어(transfer layer)에서 상기 변환된 시퀀스 데이터를 획득하는 단계Obtaining the converted sequence data from a transfer layer of the medical data preprocessing model
    를 포함하는 방법.How to include .
  12. 제7항에 있어서,In clause 7,
    상기 변환된 시퀀스 데이터를 획득하는 단계는,The step of acquiring the converted sequence data is,
    미리 결정된 기간마다 상기 진단 코드의 빈도(frequency)에 의해 정렬된 진단 코드들에 기초하여, 상기 의료 데이터 전처리 모델을 미세 조정(fine tuning)하는 단계Fine tuning the medical data preprocessing model based on diagnosis codes sorted by the frequency of the diagnosis codes at predetermined periods.
    를 포함하는 방법.How to include .
  13. 하드웨어와 결합되어 제7항 내지 제12항 중 어느 하나의 항의 방법을 실행시키기 위하여 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램.A computer program combined with hardware and stored in a computer-readable recording medium to execute the method of any one of claims 7 to 12.
PCT/KR2023/013928 2022-11-01 2023-09-15 Method for operating medical artificial intelligence model, and electronic device for performing same WO2024096307A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020220143646A KR20240067148A (en) 2022-11-01 2022-11-01 Method for operating medical artificial intelligence model and electronic device performing the same
KR10-2022-0143646 2022-11-01

Publications (1)

Publication Number Publication Date
WO2024096307A1 true WO2024096307A1 (en) 2024-05-10

Family

ID=90930725

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/013928 WO2024096307A1 (en) 2022-11-01 2023-09-15 Method for operating medical artificial intelligence model, and electronic device for performing same

Country Status (2)

Country Link
KR (1) KR20240067148A (en)
WO (1) WO2024096307A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190208354A1 (en) * 2007-07-03 2019-07-04 Eingot Llc Records access and management
KR20190123609A (en) * 2018-04-24 2019-11-01 네이버 주식회사 Method and system for predicting disease prognosis from patient medical history using deep attention network
US20200043579A1 (en) * 2018-08-06 2020-02-06 David McEwing Diagnositic and treatmetnt tool and method for electronic recording and indexing patient encounters for allowing instant search of patient history
KR20210068713A (en) * 2019-12-02 2021-06-10 주식회사 피디젠 System for predicting disease progression using multiple medical data based on deep learning
KR20220011979A (en) * 2020-07-22 2022-02-03 삼성전자주식회사 Language model and electronic device including the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190208354A1 (en) * 2007-07-03 2019-07-04 Eingot Llc Records access and management
KR20190123609A (en) * 2018-04-24 2019-11-01 네이버 주식회사 Method and system for predicting disease prognosis from patient medical history using deep attention network
US20200043579A1 (en) * 2018-08-06 2020-02-06 David McEwing Diagnositic and treatmetnt tool and method for electronic recording and indexing patient encounters for allowing instant search of patient history
KR20210068713A (en) * 2019-12-02 2021-06-10 주식회사 피디젠 System for predicting disease progression using multiple medical data based on deep learning
KR20220011979A (en) * 2020-07-22 2022-02-03 삼성전자주식회사 Language model and electronic device including the same

Also Published As

Publication number Publication date
KR20240067148A (en) 2024-05-16

Similar Documents

Publication Publication Date Title
Canayaz MH-COVIDNet: Diagnosis of COVID-19 using deep neural networks and meta-heuristic-based feature selection on X-ray images
Nguyen et al. $\mathtt {Deepr} $: a convolutional net for medical records
US20240203599A1 (en) Method and system of for predicting disease risk based on multimodal fusion
US20210034813A1 (en) Neural network model with evidence extraction
WO2019164064A1 (en) System for interpreting medical image through generation of refined artificial intelligence reinforcement learning data, and method therefor
Lee et al. Machine learning in relation to emergency medicine clinical and operational scenarios: an overview
US11244755B1 (en) Automatic generation of medical imaging reports based on fine grained finding labels
CN113688248B (en) Medical event identification method and system under condition of small sample weak labeling
Lyu et al. A multimodal transformer: Fusing clinical notes with structured EHR data for interpretable in-hospital mortality prediction
Kale et al. Causal phenotype discovery via deep networks
Nigam Applying deep learning to ICD-9 multi-label classification from medical records
CN110534185A (en) Labeled data acquisition methods divide and examine method, apparatus, storage medium and equipment
US11763081B2 (en) Extracting fine grain labels from medical imaging reports
Jin et al. Automatic detection of hypoglycemic events from the electronic health record notes of diabetes patients: empirical study
Yu et al. Rare disease detection by sequence modeling with generative adversarial networks
Waheeb et al. An efficient sentiment analysis based deep learning classification model to evaluate treatment quality
Nguyen et al. Deep bidirectional LSTM for disease classification supporting hospital admission based on pre-diagnosis: a case study in Vietnam
Funkner et al. Negation Detection for Clinical Text Mining in Russian.
WO2024096307A1 (en) Method for operating medical artificial intelligence model, and electronic device for performing same
Wang et al. Deeptriager: a neural attention model for emergency triage with electronic health records
Zhang et al. Section classification in clinical notes with multi-task transformers
Valmianski et al. Evaluating robustness of language models for chief complaint extraction from patient-generated text
US11809826B2 (en) Assertion detection in multi-labelled clinical text using scope localization
Yogarajan Domain-specific language models for multi-label classification of medical text
Yuan et al. Numerical Feature Transformation-Based Sequence Generation Model for Multi-Disease Diagnosis

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23886004

Country of ref document: EP

Kind code of ref document: A1