Machine learning classification method for subtyping precancerous lesions of colorectal cancer based on multiple factors

By generating patient baseline representations and differential features, and combining them with machine learning classification models for hierarchical aggregation, the problem of inherent patient differences and lesion feature deviations in the classification of colorectal precancerous lesion subtypes was solved, resulting in more stable subtype discrimination results.

CN123158403APending Publication Date: 2026-11-24PEOPLES HOSPITAL OF INNER MONGOLIA AUTONOMOUS REGION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611359283.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies cannot effectively distinguish between patients' inherent baseline differences and precancerous lesion subtypes in the classification of colorectal precancerous lesions, resulting in unstable classification results. In particular, when multiple lesions are present, the classification model cannot accurately reflect the intra-patient correlation information, leading to deviations in subtype discrimination results.

Method used

By acquiring longitudinal clinical data and lesion records of target patients, baseline characteristics and differential features of patients are generated. Hierarchical aggregation is performed using a machine learning classification model to correct the initial subtype probability. Combining patient-lesion association data and local morphological features of lesions, a relationship correction value is generated to determine the subtype category of each lesion.

Benefits of technology

It improves the stability and accuracy of colorectal precancerous lesion subtype classification, reduces probability drift caused by changes in population composition, enhances the discriminative consistency between adjacent subtypes, and reduces evaluation bias caused by data crossover.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123158403A_ABST
    Figure CN123158403A_ABST
Patent Text Reader

Abstract

This invention relates to the fields of medical data processing and machine learning classification technology, specifically a machine learning classification method for colorectal precancerous lesion subtypes based on multifactorial features. This method acquires longitudinal clinical data and colonoscopy records of multiple lesions from the subject, generates an individual baseline in chronological order, and differentiates the current clinical indicators from the individual baseline to form individual variation features. Based on lesion morphological features, it generates initial subtype probabilities for lesions, establishes patient nodes, lesion nodes, lesion attribution, anatomical location, and lesion co-occurrence relationships, and hierarchically aggregates individual variation features, location relationship encoding, and co-occurrence representations to obtain lesion relationship correction information. This corrects the initial subtype probabilities and outputs the subtype classification results. This invention separates the individual stable baseline from lesion-related changes, utilizes spatial and co-occurrence association constraints for classification of multiple lesions from the same subject, reduces classification bias caused by individual differences and independent lesion determination, and improves the consistency and stability of adjacent subtype classifications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical data processing and machine learning classification technology, specifically a machine learning classification method for colorectal precancerous lesion subtypes based on multifactorial features. Background Technology

[0002] The classification of colorectal precancerous lesions is typically based on data from colonoscopy, clinical records, and pathological findings of resected tissue. Medical institutions associate patient identification with demographic information, family history, lifestyle, underlying diseases, laboratory test data, and lesion location, size, morphology, surface mucus, color, vascular features, and crypt structure. Pathological findings such as tubular adenoma, tubulovillous or villous adenoma, sessile serrated lesions, and traditional serrated adenoma are set as classification labels. Before data enters the classification process, duplicate records are usually removed, missing values ​​are filled using the median or mode of the same population, units of measurement are standardized, continuous variables are standardized, and categorical variables are coded. Multifactorial features used in the calculation are then retained based on univariate tests, correlation analysis, or feature screening results. After data processing, logistic regression is used to generate risk scores or nomograms, or support vector classification, random forests, and gradient boosting trees are used to build classification models. Training data is used to learn the correspondence between various clinical indicators and pathological subtypes, and the lesion category is determined by the maximum probability among each subtype.

[0003] When dealing with cases of multiple polyps in the same patient, current processing typically copies patient-level data such as age, underlying diseases, test results, and lifestyle to each lesion record. The copied patient data is then concatenated with the corresponding lesion's local morphological data to form independent samples. Each lesion sample is input into a unified classification model to complete subtype discrimination. During model training, training and validation data are divided according to lesion records. Subtype conclusions in the pathology report are used to supervise the updating of classification parameters, and class weighting or sample resampling is used to address imbalances in the number of different subtype records. Some processing methods further categorize pathological types into two superordinate categories: conventional adenoma and serrated lesions. Specific subtypes are then distinguished within each category, and local classification probabilities are normalized or calibrated. During inference, multifactorial features of a single lesion are read, and the superordinate category probability, subordinate subtype probability, and final classification result are output sequentially. The location distribution, distance between, and subtype co-occurrence information of other lesions within the patient are not included in the probability calculation of the current lesion.

[0004] A unified feature space cannot form an individual reference corresponding to the patient's own stable state. At the same time, calculations based on independent lesion samples lead to the classification model's inability to distinguish between the patient's inherent baseline differences and feature deviations caused by precancerous lesion subtypes. The same laboratory or clinical indicator has different data meanings in patients with different ages, underlying diseases, medication history, and previous examination statuses. Directly using absolute values ​​will cause baseline differences between patients to enter the subtype discrimination boundary. Copying patient-level data to each lesion record cannot express the anatomical segment relationships and co-occurrence structures of multiple lesions within the same examination. When the local morphology of a single lesion is in the subtype boundary region, the classification process lacks intra-patient association information to constrain the initial probability. It is easy to interpret numerical changes caused by the host background as evidence of lesion subtype. This causes the classification boundary between sessile serrated lesions and proliferative lesions, and tubular adenomas and adenomas containing villous components to shift with the composition of the patient population, resulting in insufficient stability of subtype discrimination results. Summary of the Invention

[0005] The purpose of this invention is to provide a machine learning classification method for colorectal precancerous lesion subtypes based on multifactorial features, which can solve the problems in the background art mentioned above.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A machine learning classification method for colorectal precancerous lesion subtypes based on multifactorial features includes: acquiring longitudinal clinical data of the target patient and lesion records formed during this colonoscopy, and writing the patient identifier, examination time point, and lesion anatomical segment into the patient-lesion association data; Based on the longitudinal clinical data, a patient baseline profile is generated, and the current clinical data is converted into differential features relative to the patient baseline profile. Based on the lesion records, the local morphological features of each lesion are generated, and the initial subtype probability is obtained by calling the machine learning classification model trained with pathological subtype labels. The differential features, the segmental relationship encoding between lesions in the same examination, and the co-occurrence characterization are hierarchically aggregated to generate a relationship correction value. The relationship correction value is used to correct the initial subtype probability and determine the subtype category of each lesion.

[0007] Preferably, the generation of the patient baseline characterization includes: sorting the historical records of the same clinical indicator according to the collection time, and separating the records with accompanying medical event identifiers from the records without accompanying medical event identifiers; Records that are continuous and from the same source but without accompanying medical event identifiers are aggregated in time series to form individual longitudinal baselines; When historical records are insufficient to form the individual longitudinal baseline, matching records are retrieved from the pathological confirmed case database according to age group, gender, underlying disease category and examination source. The matching records are aggregated to form a stratified population baseline, and the individual longitudinal baseline or the stratified population baseline is written into the patient master record.

[0008] Preferably, the patient-lesion association data includes patient nodes, lesion nodes, and relationship edges; The patient node contains the patient baseline characterization and the differential features, and the lesion node contains the lesion location, size, shape, surface mucus, color, vascular features, and crypt structure. Establish the attribution edge between the patient node and the lesion node according to the same patient attribution relationship, establish the position edge between the lesion nodes according to the order of colonic anatomical segments, establish the co-occurrence edge between the lesion nodes according to the same examination identifier, and write the relationship type code for the attribution edge, the position edge and the co-occurrence edge respectively.

[0009] Preferably, the machine learning classification model includes a local classification branch and a relation correction branch; The local classification branch aligns the local morphological features of each lesion with the differential features of the corresponding patient, and outputs the initial subtype probability of each lesion for a preset pathological subtype set. The relationship correction branch performs hierarchical aggregation on the patient nodes, lesion nodes and relationship type codes in the patient-lesion association data, and outputs the relationship correction amount corresponding to each lesion. The relationship correction factor and the initial subtype probability are combined and normalized along the subtype dimension to generate the corrected subtype probability for each lesion.

[0010] Preferably, the time-series aggregation includes: merging historical records with the same-name indicators according to the inspection item code and unit of measurement, aligning the medication change, acute disease record or intervention operation time with the historical records, and forming an event association sequence and a baseline candidate sequence; For records with consistent origins in the baseline candidate sequence, calculate the temporal continuity identifier and the numerical stability identifier, determine the record contribution order based on the temporal continuity identifier and the numerical stability identifier, and aggregate them according to the record contribution order to form individual longitudinal baselines, while retaining the missing indicator identifier and the baseline source identifier.

[0011] Preferably, the construction of the location edge includes: mapping the anatomical segments of each lesion to an ordered colonic segment sequence, and generating segment distance codes based on the intervals of the lesion nodes in the ordered colonic segment sequence; Create intra-segment position edges for lesion nodes located in the same segment, and create cross-segment position edges for lesion nodes located in different segments. For each lesion node, the adjacent lesion features connected by the position edge within the segment and the adjacent lesion features connected by the position edge across the segment are collected respectively, and the two types of adjacent lesion features are combined with the corresponding segment distance encoding to form a multi-lesion spatial representation.

[0012] Preferably, the preset pathological subtype set is divided into upper category and lower subtype according to the pathological category hierarchy. The local classification branch first generates the upper category probability of conventional adenoma path and serrated lesion path based on the local morphological characteristics, and then generates the lower subtype probability of tubular adenoma, tubular villous or villous adenoma, sessile serrated lesion and traditional serrated adenoma within the corresponding path. The higher category probability and the corresponding lower subtype probability are combined by path to form an initial subtype probability that maintains the correspondence between category levels.

[0013] Preferably, the relationship correction branch includes a first aggregation process from lesion to patient and a second aggregation process from patient to lesion; During the first aggregation process, only the lesion node features whose upper category probability is consistent with the upper category of the lower subtype probability are written into the patient node context; In the second aggregation process, the patient node context, the local morphological features of the corresponding lesion, and the location edges and co-occurrence edges connected to the corresponding lesion are combined to generate the relationship correction quantity, and the local classification results of lesion nodes that did not participate in the first aggregation process are retained.

[0014] Preferably, a baseline confidence code is generated based on the missing indicator identifier, the baseline source identifier, the temporal continuity identifier, and the numerical stability identifier, and the baseline confidence code is written into the belonging edge between the patient node and each lesion node; The spatial representation of multiple lesions is split into intra-segment context and cross-segment context. The differential features in the patient node are encoded into patient background information. The baseline confidence code is converted into an effective bitmask and multiplied item by item with the patient background information. The resulting patient background information is then combined with the intra-segment context and the cross-segment context to form the relationship correction amount for the corresponding lesion.

[0015] Preferably, the training of the machine learning classification model includes: dividing the training data into groups based on patients, grouping lesions with the same pathological subtype label within the same patient into samples of the same subtype, and grouping lesions with different pathological subtype labels into samples of different subtypes. Local classification error is calculated based on the superordinate category label and the subordinate subtype label; relationship discrimination error is calculated based on the same subtype sample pair, the different subtype sample pair and the relationship type code; corrected classification error is calculated based on the corrected subtype probability and the pathological subtype label; and the three types of errors are combined into a joint training objective. Keep all lesion records of the same patient in the same data group.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. By merging the clinical indicators of the same patient according to the collection time, data source, and treatment events, a longitudinal baseline corresponding to the patient's own stable state is formed. The current clinical data is then converted into differential features relative to the longitudinal baseline. The baseline numerical deviations caused by patient age, chronic diseases, and long-term medication are no longer directly entered into the subtype classification boundary as raw absolute values. On this basis, patient-lesion association data are organized using patient nodes, lesion nodes, attribution edges, location edges, and co-occurrence edges. Differential features are written into patient nodes, and local morphological features are written into lesion nodes. Then, the segment relationship encoding and co-occurrence representation are hierarchically aggregated. The resulting relationship correction amount is used to correct the initial subtype probability generated by local classification branches. Baseline differential processing first compresses the data dispersion between patients that has no direct correspondence with lesion subtypes. The intra-patient relationship aggregation is then supplemented with spatial and co-occurrence evidence not included in individual lesion records. This allows the classification boundary to be established around the changes of lesions relative to the patient baseline and intra-patient lesion relationships, reducing probability drift caused by changes in population composition and improving the consistency of discrimination results between adjacent subtypes.

[0017] 2. When historical records are insufficient, a stratified population baseline is formed by retrieving confirmed pathological cases based on age, gender, underlying disease category, and examination source. A reliable baseline code is generated using missing indicator markers, baseline source markers, temporal continuity markers, and numerical stability markers. This ensures that patient background information with varying degrees of completeness participates in relational correction according to effective bitmasks, preventing missing indicators from being propagated to lesion nodes as true observations after uniform imputation. A hierarchical path combination is used between the higher-level category and the lower-level subtype. Only lesion nodes whose path corresponds to the higher-level category with the highest probability are included in the patient context aggregation, reducing the transmission of inconsistent local classification records to other lesion relational representations. Training data is grouped by patient, with all lesions of the same patient kept in the same data group. Relationship discrimination is trained using samples of the same subtype and samples of different subtypes, allowing the model to retain the expression space of different subtypes within the same patient, reducing evaluation bias caused by data crossover, and maintaining the correspondence between correction probabilities and pathological category levels. Attached Figure Description

[0018] Figure 1 A flowchart illustrating the overall classification of colorectal precancerous lesion subtypes; Figure 2 A schematic diagram of differential feature record values, moving averages, and attention lines; Figure 3 Generate flowcharts for individual baselines and differential characteristics; Figure 4 Flowchart for training a multi-lesion relationship correction and classification model; Figure 5 To correct the subtype probability and relationship, a correction intensity tracking plot was created. Detailed Implementation

[0019] In one embodiment, please refer to Figure 1 This paper provides a machine learning classification method for colorectal precancerous lesion subtypes based on multifactorial features, including: acquiring longitudinal clinical data of the target patient and lesion records formed during the colonoscopy; writing patient identification, examination time point, and lesion anatomical segment into patient-lesion association data; generating patient baseline representation based on longitudinal clinical data and converting the current clinical data into differential features relative to the patient baseline representation; generating local morphological features of each lesion based on the lesion record; calling a machine learning classification model trained with pathological subtype labels to obtain initial subtype probabilities; performing hierarchical aggregation on differential features, segmental relationship encoding between lesions in the same examination, and co-occurrence representation to generate relationship correction values; using relationship correction values ​​to correct the initial subtype probabilities and determine the subtype category of each lesion.

[0020] In this embodiment, the longitudinal clinical data is structured into a three-tiered record structure based on patients, medical events, and examination items. Patient records store patient identification, gender, date of birth, family history, and underlying disease category. Medical event records store the time of medical visit, disease record, medication changes, interventional procedures, and examination source. Examination item records store the item code, item name, sampling time, result value, unit of measurement, reference range, and data source. When the system reads data, it merges data of the same patient from outpatient records, inpatient records, health examination records, and laboratory records by patient identification, isolates records that cannot be uniquely associated with a patient, and retains only one record with complete source information for duplicate records with the same sampling time, the same item code, and the same result value. The position of clinical indicators in the patient's timeline is determined by the sampling time rather than the report generation time.

[0021] Specifically, the lesion records generated during this colonoscopy are based on a single examination event as the primary data object. Each lesion is identified and its anatomical segment in the colon, size, raised or flattened shape, surface mucus condition, color, vascular features, crypt structure, and corresponding sampling identifier are recorded. After the pathology system returns the diagnostic results, the histopathological conclusions are written into the corresponding lesion record through the sampling identifier, avoiding the overlap of pathology labels for different lesions from the same patient. When a sampling record contains multiple lesions, they are correlated based on the sampling container identifier, lesion location, and specimen description in the endoscopy report. Records where the correspondence cannot be determined are not used as lesion-level supervisory samples but are retained in the patient-level auxiliary information.

[0022] Furthermore, clinical indicators entering the classification model are merged using a unified item dictionary. The item dictionary stores synonyms, item codes, unit conversion relationships, and data types. Numerical indicators retain the original value, converted value, and conversion source after unit conversion. Categorical indicators are converted to discrete codes according to a fixed category dictionary. Text-based diagnostic records extract the underlying disease category through disease codes and negative states. For indicators with multiple source values ​​at the same time point, records with complete sampling information, unit information, and reference intervals are prioritized. If multiple records have the same level of completeness, all records are retained and a source consistency identifier is written, enabling subsequent baseline calculations to identify changes in the same indicator between different detection sources.

[0023] In this embodiment, the patient baseline representation is not a direct average of all historical records. Instead, the historical records are first divided into baseline candidate records and event-related records based on the diagnosis and treatment events. When the collection time of a clinical indicator falls within the duration of an event corresponding to a medication change, acute illness, or interventional procedure, it is written into the event-related sequence. When a clinical indicator does not coincide with the occurrence time of a diagnosis and treatment event and the source remains consistent, it is written into the baseline candidate sequence. Subsequently, each indicator is processed according to the examination item code. The records in the baseline candidate sequence are sorted by time, and the contribution order of records is generated based on the temporal continuity, numerical dispersion, and data source consistency of adjacent records. The records with the highest contribution order then form the individual longitudinal baseline.

[0024] Individual longitudinal baselines are stored separately for each indicator, including baseline center value, discrete scale, record quantity status, source status, and temporal continuity status. The baseline center value is formed using ordinal statistics that are insensitive to outlier records. The discrete scale is formed based on the deviation of candidate records from the baseline center value. The record quantity status distinguishes between no historical records, a single historical record, and multiple historical records. The source status distinguishes between single source and multiple sources. The temporal continuity status is generated based on whether the historical records cover adjacent examination cycles. When there is only one qualified historical record for a certain indicator, the historical record is used as a temporary individual baseline, and the record quantity status is written as a single record, so that subsequent reliable coding can limit the contribution of the temporary individual baseline to the patient's background information.

[0025] In a preferred embodiment, when historical records are insufficient to form an individual longitudinal baseline, reference cases matching the target patient are retrieved from the pathological confirmed case database. The retrieval criteria consist of age group, gender, underlying disease category, and examination source. The matching process first limits the examination source and the measurement unit of the indicator to be consistent, and then limits the underlying disease categories to be mutually exclusive. Subsequently, reference records are screened from the eligible cases according to age group and gender. For the same clinical indicator, the observation values ​​of the reference records at the corresponding examination stage are aggregated to form the stratified population baseline center value and the stratified population dispersion scale, and the baseline source is marked as the population source. When the target patient subsequently obtains sufficient longitudinal records, the individual longitudinal baseline replaces the corresponding population baseline but retains the historical version.

[0026] To ensure that clinical indicators from different dimensions and baseline sources are incorporated into a unified difference space, the difference characteristics of each indicator for the target patient are calculated in this embodiment as follows: ; in, This represents the difference feature when the patient index is 'a' and the clinical indicator index is 'r'. This indicates the availability status of the current indicator. The value is 1 when the indicator exists, and 0 when the indicator is missing. , This represents the clinical indicator values ​​after standardization by the unit. This represents the central value of an individual's longitudinal baseline or a stratified population baseline. This indicates the discrete scale of the corresponding indicator within the matched population. This indicates a positive number that prevents the denominator from being zero.

[0027] Please refer to Figure 2 , Figure 2The horizontal axis represents the sequence number of the differential feature record, arranged in the order of patient, clinical indicator, and sampling time. The vertical axis represents the differential feature value, used to express the direction and intensity of deviation of the current clinical indicator relative to the corresponding baseline. The black solid line represents the differential feature record value calculated for each record, the gray long dashed line represents the five-point moving average result, and the gray short dashed line and black dotted line represent the primary and secondary lines of concern, respectively, used in the engineering implementation to show the observable range of change of the differential feature before it enters the patient background information.

[0028] from Figure 2 As can be seen, the differential characteristic records fluctuate around zero, with some records showing significant positive peaks, indicating that the relevant clinical indicators, after unit standardization, are higher than the individual longitudinal baseline or the stratified population baseline; some records are below zero, indicating that the current value has decreased relative to the baseline. (Combined with symbols...) The meaning is that the curve does not directly represent the original test value, but rather the standardized deviation determined by the patient index a and the clinical index r. Therefore, indicators with different dimensions can be compared in the same coordinate system.

[0029] Figure 2 middle , , , and The key input in the calculation of the corresponding difference features. Used to distinguish whether the current indicator is available; missing records will not be misinterpreted as true zero deviation. A spike in the solid black line usually indicates... and The distance between them is and If the value is still too large after correction, further analysis should be conducted using baseline source identifiers, missing indicator identifiers, temporal continuity identifiers, and numerical stability identifiers to determine whether it is suitable for inclusion in the patient node.

[0030] For example, in the demonstration operation, the current indicator value that has achieved dimensional uniformity is set to 14, the corresponding patient baseline center value is set to 10, the discrete scale of the matched population is set to 3, a positive number with a denominator of zero is set to 1, and the available state is set to 1 when the indicator exists. Thus, the difference feature is 1, indicating that the deviation of the current value from the baseline is equal to the synthetic scale used. If the current indicator is missing, the available state is set to 0, the difference feature is set to 0, and the missing indicator label remains in the missing state. The classification model can thus distinguish between two data situations: the true difference value is zero and the indicator has not been observed. When the same current indicator value enters different patient records, different difference features are formed due to the different patient baseline center values, avoiding the mechanical mapping of the same absolute value to the same lesion subtype evidence.

[0031] In this embodiment, the local morphological features of the lesion are generated from structured endoscopic records. Numerical local features include lesion size and number, while categorical local features include anatomical segment, elevation morphology, surface mucus state, color type, vascular type, and crypt structure type. Anatomical segments simultaneously generate category codes and ordered segment codes. Category codes store the specific location identity, while ordered segment codes store the lesion's position in the continuous anatomical sequence of the colon. When a local morphological record is missing, an independent unknown category code is used instead of filling in other lesion records to prevent the cross-referencing of local morphological data among multiple lesions in the same patient. All local features are bound to lesion identifiers, and the corresponding differential features are located through patient identifiers and examination time points.

[0032] The local classification branch sets up numerical feature processing pathways and category feature processing pathways. The numerical feature processing pathway receives lesion size, patient differential features, and numerical status labels, and performs linear mapping and nonlinear transformation on the input values. The category feature processing pathway receives lesion location, morphology, mucus, color, blood vessels, and crypt structure codes, and maps each category code to a continuous representation. After scale alignment of the two types of representations, they are concatenated, and then the local scores of each higher category and lower subtype are generated through the lesion-level mapping layer. During training, the lesion-level labels returned by the pathology system constrain the local scores. During inference, the local classification branch independently outputs the initial subtype probability for each lesion. The initial subtype probability is retained in the lesion node as local evidence before relation correction.

[0033] Patient-lesion association data is stored in a graph structure, where patient nodes correspond to patient identifiers, and lesion nodes correspond to lesion identifiers from the current colonoscopy. Patient nodes are recorded with patient baseline characteristics, differential features, missing data markers, and baseline source markers, while lesion nodes are recorded with local morphological features, initial subtype probability, anatomical segment code, and tissue sampling association status. Each lesion node is connected to its corresponding patient node via an attribution edge, and lesion nodes from the same examination are connected to each other via co-occurrence edges. Lesion nodes with clearly defined anatomical segments are connected via positional edges based on the colonic segment order. Different relationship edges are encoded with relationship types, enabling the hierarchical aggregation process to use different mappings to handle patient attribution, co-occurrence, and anatomical position relationships.

[0034] Hierarchical aggregation first calculates local context between lesion nodes, and then calculates patient background context between patient nodes and lesion nodes. Local context is aggregated according to location edges and co-occurrence edges. Location edges convey the relative position of the lesion in the colonic segment sequence and the morphology of adjacent lesions, while co-occurrence edges convey the local scores and evidence consistency status of other lesions in the same examination. Patient background context conveys patient differential features and baseline confidence coding through attribution edges. For each type of relation edge, an independent relation mapping is used to convert the source node features to the same representation scale before aggregation. After aggregation, the relation type identity is preserved to prevent location relations, co-occurrence relations, and patient attribution relations from being confused into the same association during the summation process.

[0035] The relation correction branch receives the patient's background context, intra-segment local context, cross-segment local context, and the local morphological representation of the current lesion itself, and generates a relation correction value according to the subtype dimension. The relation correction value is combined item by item with the initial subtype score output by the local classification branch, and the combination result is normalized to obtain the corrected subtype probability. If the patient has only one lesion, the set of position edges and co-occurrence edges between lesions is empty, and the intra-segment local context and cross-segment local context use empty relation encoding. The relation correction branch generates the correction value only based on the patient's background context and the local morphological representation of the current lesion. If the patient has multiple lesions, each lesion obtains a correction value corresponding to its own segment position and adjacency relationship, and the final label of a certain lesion is not directly copied to other lesions.

[0036] In this embodiment, the output data includes patient identifier, examination time point, lesion identifier, anatomical segment, initial subtype probability, relation correction amount, corrected subtype probability, final subtype category, baseline source identifier, and evidence participation status. The final subtype category is determined by the largest term in the corrected subtype probability. The initial subtype probability and the corrected subtype probability are saved simultaneously to distinguish the contribution of local morphological evidence and intra-patient relational evidence to the classification results. When the upper category and lower subtype paths are inconsistent, or when the lesion lacks the records required to establish local morphological representation, the output data retains the candidate subtype probability without replacing the current lesion label with other lesion labels. The subsequent pathology results are written back through the lesion identifier.

[0037] In a preferred embodiment, please refer to Figure 3The generation of patient baseline characteristics further sorts the historical records of the same clinical indicator according to the collection time, separates the records with accompanying medical event identifiers from those without, and performs time-series aggregation on continuous records without accompanying medical event identifiers from the same source to form individual longitudinal baselines. The medical event identifier consists of event type, event start time, event end time and influencing indicator category. Event types include medication changes, acute disease records and interventional procedures. When the collection time of the historical record falls between the event start time and the event end time and the item category corresponds to the influencing indicator category, the historical record is included in the event association sequence; otherwise, it is included in the baseline candidate sequence.

[0038] Medication change records are represented by drug category, start time, stop time, and change type; acute illness records are represented by disease category, occurrence time, and release time; interventional procedure records are represented by procedure category, implementation time, and observation end time. When an event does not have a clear end time, the system generates an event end boundary based on the release records of the same event in subsequent medical records or subsequent medication status. Event records that cannot form an end boundary are not included in the individual baseline candidate screening. When the same historical indicator coincides with multiple diagnosis and treatment events, all event type codes are retained in the event association sequence so that subsequent analysis can distinguish the time correspondence between numerical changes and specific diagnosis and treatment events. However, event association records are not included in the calculation of the patient's stable baseline center value.

[0039] When performing temporal aggregation on baseline candidate sequences, the system first groups the records according to their data sources, and then calculates the sampling time interval arrangement and numerical deviation arrangement of adjacent records in each source group. The temporal continuity indicator is generated based on whether adjacent sampled records form a continuous time chain, and the numerical stability indicator is generated based on the deviation order of each record relative to the center value of the source group. Records with consistent sources that have both a continuous time chain and a stable deviation order are arranged at the beginning of the record contribution order. If multiple source groups meet the aggregation conditions, the source group consistent with the source of this check is selected to form an individual longitudinal baseline, and other source groups are saved as baseline verification records and are not directly mixed with the values ​​of the current source group.

[0040] In a preferred embodiment, the reference case retrieval for the stratified population baseline employs a multi-level index. The first-level index locates records of the same dimension according to the examination item code and examination source. The second-level index screens out background mismatch records according to the underlying disease category and gender. The third-level index forms a candidate set according to age group and examination stage. Records in the candidate set are deduplicated on a patient-by-patient basis. Each reference patient provides only one representative value for the same indicator corresponding to the target examination stage, preventing reference patients with a large number of examinations from occupying too many records in the aggregation. The pathological labels in the pathological confirmed case database are not directly written into the target patient baseline, but are only used to confirm that the source of the reference case data has completed the correspondence between lesions and pathology. The stratified population baseline maintains the clinical indicator reference attribute.

[0041] Furthermore, the merging of historical records with the same name is performed based on the inspection item code, unit of measurement, and specimen type. Records with the same item code but different specimen types are formed into independent sequences, while records with similar item names but different measurement objects are not merged. When there is a conversion relationship between units of measurement, the records are converted to the unified unit specified in the item dictionary, and the values ​​before conversion, the values ​​after conversion, and the conversion relationship are saved together. The time continuity indicator consists of the historical record coverage status, the order of adjacent records, and the interruption status, while the numerical stability indicator consists of the center deviation order, the outlier status, and the consistency status within the source. The two together determine the order in which records participate in baseline aggregation.

[0042] Missing indicator identifiers are generated based on the presence or absence of each clinical indicator in the patient's current record. Baseline source identifiers are generated based on individual longitudinal baselines, temporary individual baselines, or stratified population baselines. Temporal continuity identifiers and numerical stability identifiers are written to the patient node along with each baseline indicator. When a current clinical indicator is missing but a historical baseline exists, the difference feature remains at zero and the missing indicator identifier is set to missing. When a current clinical indicator exists but a historical baseline is missing, the stratified population baseline is called to complete the difference calculation and the baseline source identifier is set to population source. When neither the current indicator nor the available baseline exists, the difference feature remains at zero and the baseline source identifier is set to empty source, without replacing it with the average of all samples.

[0043] In another preferred embodiment, patient nodes, lesion nodes, and relational edges are implemented using typed association records. The patient node record uses the patient identifier as the primary key, and the lesion node record uses the patient identifier, examination time point, and lesion identifier as the combined primary key. The relational edge record stores the source node identifier, target node identifier, relation type, segment distance code, and same examination identifier. The belonging edge points from the patient node to the lesion node and establishes a reverse index. The position edge establishes a bidirectional connection between lesion nodes, and the two directions respectively retain the anatomical order. The co-occurrence edge only connects lesion nodes of the same patient and the same examination time point, and does not connect historical lesion nodes across examination time points.

[0044] The relation type encoding consists of relation identity encoding and relation attribute encoding. The relation identity encoding of the belonging edge indicates the transmission direction from the patient to the lesion or from the lesion to the patient, and the relation attribute encoding writes the baseline source and baseline confidence status. The relation identity encoding of the location edge indicates the intra-segment location relationship or cross-segment location relationship, and the relation attribute encoding writes the segment distance and anatomical direction. The relation identity encoding of the co-occurrence edge indicates the co-occurrence relationship in the same examination, and the relation attribute encoding writes the local evidence consistency status of the two lesions. The hierarchical aggregation reads the relation identity encoding, selects the corresponding feature mapping, and then combines the relation attribute encoding with the mapped source node features.

[0045] In this embodiment, the anatomical segments of each lesion are mapped to an ordered colonic segment sequence. The sequence is arranged according to a continuous anatomical path, and each segment obtains a unique sequential position. The segment distance code between lesion nodes is composed of the interval and direction between two sequential positions. Lesion nodes located in the same segment establish intra-segment position edges, and lesion nodes located in different segments establish cross-segment position edges. When the lesion site record can only be located to a larger anatomical range, the set of segment positions within the corresponding range is written into the position uncertainty code. No single segment position is arbitrarily assigned, and the position uncertainty code is retained during spatial representation aggregation.

[0046] For each lesion node, the intra-segment context is formed by aggregating the features of adjacent lesions connected by intra-segment position edges, and the cross-segment context is formed by aggregating the features of adjacent lesions connected by cross-segment position edges. The features of adjacent lesions include local morphological representation, initial subtype probability, and lesion evidence status. During aggregation, adjacent lesions are first grouped according to the segment distance encoding, then the feature center representation is calculated within each group, and then the representations of each group are combined according to the relationship encoding between the current lesion and each group. The intra-segment context and the cross-segment context are kept as two independent vectors until the relationship correction quantity is generated, at which point they are combined with the patient background information.

[0047] For cases where multiple lesions exist within the same segment, intra-segment aggregation retains the independent identifier of each lesion node and employs symmetrical aggregation, ensuring that changes in the input order of adjacent lesions do not alter the aggregation result. For lesions spanning multiple segments, the aggregation process simultaneously reads the anatomical direction code, enabling lesions located proximal and distal to the current lesion to form different relational representations. For lesion nodes lacking a clearly defined segment, the lesion node can receive patient background information and co-occurrence information, but does not send location information to lesions with a defined segment. The resulting multi-lesion spatial representation does not require multiple lesions from the same patient to have the same subtype, but only preserves the anatomical and co-occurrence conditions between lesions.

[0048] In a preferred embodiment, please refer to Figure 4The machine learning classification model consists of a local classification branch and a relation correction branch. The local classification branch aligns the local morphological features of each lesion with the corresponding patient differential features. Numerical differential features are converted into patient state vectors through shared numerical mapping, and local morphological category codes are converted into lesion state vectors through category mapping. The patient state vector and lesion state vector are concatenated at the lesion identifier to generate the initial lesion representation. The relation correction branch reads the patient-lesion association data, performs mapping and aggregation on patient nodes, lesion nodes, and relation type codes respectively, and outputs the relation correction amount corresponding to each lesion.

[0049] The preset pathological subtype set is divided into superordinate categories and subordinate subtypes according to the pathological category hierarchy. Superordinate categories include conventional adenoma path and serrated lesion path. The conventional adenoma path includes tubular adenoma and tubulovillous or villous adenoma. The serrated lesion path includes sessile serrated lesion and traditional serrated adenoma. When pathological labels are written into the training record, superordinate category labels and subordinate subtype labels are saved simultaneously. Local classification branches first generate superordinate category scores, and then generate subordinate subtype scores in the local branches corresponding to each superordinate category. Subtypes that do not belong to the current superordinate category path do not participate in the conditional probability normalization of the path.

[0050] The local classification branch combines the probability of the superordinate category with the conditional probability of the subordinate subtype within the corresponding path to obtain the initial subtype probability of each lesion for all subordinate subtypes. For example, the initial subtype probability of tubular adenoma is formed by combining the probability of conventional adenoma path with the conditional probability of tubular adenoma within that path, and the initial subtype probability of sessile serrated lesion is formed by combining the probability of serrated lesion path with the conditional probability of sessile serrated lesion within that path. After the path combination, a consistency check is performed on all subordinate subtype probabilities to confirm that each subordinate subtype belongs to its corresponding superordinate category, and the path to which the superordinate category's largest item and the subordinate subtype's largest item belong is written into the lesion evidence status.

[0051] The relational correction branch includes a first aggregation process from lesion to patient and a second aggregation process from patient to lesion. In the first aggregation process, the superordinate category maximum and the subordinate subtype maximum of each lesion node are read. Only when the two are consistent are the local morphological representation, initial subtype probability, and segment code of the lesion node written into the patient node context. Lesion nodes that are inconsistent are retained in the graph structure but are not used as patient-level aggregation evidence for other lesions to prevent the propagation of local results of category-level conflicts through patient nodes. The patient node context uses symmetric aggregation to process lesion nodes that meet the conditions, so that the order of lesion records does not change the patient node representation.

[0052] In the second aggregation process, the patient node context is returned to the corresponding lesion node along the belonging edge, and the local morphological representation, intra-segment context, cross-segment context, and co-occurrence edge encoding of the current lesion are read. The patient node context and the baseline confidence encoding of the current lesion are combined to form the patient background message, the intra-segment context and the intra-segment location edge encoding are combined to form the near segment message, and the cross-segment context and the cross-segment location edge encoding are combined to form the cross-segment message. The three types of messages are concatenated with the current lesion representation after relation mapping, and the relation correction branch generates the relation correction amount for each pathological subtype based on the concatenation result.

[0053] The corrected subtype probability is calculated using the following formula: ; in, This represents the corrected subtype probability when the lesion index is v and the subtype index is k. This represents the local score generated by the local classification branch for the lesion and subtype. This indicates the relational correction amount generated by the relational correction branch for the lesion and subtype. Let represent the set of all subtypes, and c represent the subtype index in the set to be summed. This represents the local fraction with respect to subtype c. This represents the relational correction for subtype c. The exponential operation converts the combination fraction to a positive value, and the denominator normalizes the combination fractions for all subtypes.

[0054] Please refer to Figure 5 , Figure 5 The horizontal axis represents the lesion number, and the vertical axis represents the probability or relational correction strength. Gray dashed lines with square markers indicate the highest probability of a local branch, black solid lines with dots indicate the highest probability after correction, and black dotted lines with triangle markers indicate the relational correction strength. The highest probability of a local branch reflects the initial classification tendency given by local evidence such as the morphology, location, size, and endoscopic features of a single lesion; the highest probability after correction represents the final subtype judgment strength obtained by overlaying patient background information, segmental positional relationships, and co-occurrence relationships from the same examination.

[0055] from Figure 5 As can be seen, the highest probability after correction for some lesions is higher than that for local branches, indicating that the relation correction enhances the output of the subtype in terms of the corresponding lesion and subtype dimensions. For some lesions, the two probability curves are close, indicating that the lesion is mainly determined by local morphological branches, with other lesions within the patient and the patient background having a relatively small impact. When the relation correction intensity of the black dotted line reaches a peak, it usually indicates strong evidence of segmental adjacency, cross-segmental connection, or co-occurrence in the same examination between the lesion and other lesions within the same patient.

[0056] Figure 5The process of calculating the corrected subtype probability in the corresponding text. Figure 5 Instead of displaying the complete formula repeatedly, the paper uses three curves to illustrate the relationship between local scores, relational corrections, and normalized probability results: local branches provide the basic ranking, relational corrections change the combination scores of different subtypes, and the final probability reflects the result after competition among all subordinate subtypes.

[0057] For example, following the order of tubular adenoma, tubulovillous or villous adenoma, sessile serrated lesion, and traditional serrated adenoma, the local score of a lesion is taken as [12,8,10,3]. The largest term corresponding to the local classification branch is tubular adenoma. The relation correction branch generates relation correction values ​​[-3,-1,4,0] based on the patient's differential characteristics, the distribution of lesions in the proximal segment, and co-occurrence characteristics. The combined score becomes [9,7,14,3]. After normalization, the term corresponding to sessile serrated lesion becomes the largest term. The operation does not copy the subtype labels of other lesions to the current lesion. Instead, it converts the intra-patient relation into the score correction of each candidate subtype of the current lesion, so that lesions with local morphology in the boundary area can accept the constraints of patient background and spatial relation while maintaining their own local evidence.

[0058] Lesion nodes that do not participate in the first aggregation process retain their local classification branch output and receive the patient node context formed by lesions consistent with other evidence during the second aggregation process, but their own local results do not enter the patient node context. When all lesions of a patient have path conflicts between the superordinate category and the subordinate subtype, the patient node context uses an empty lesion context formed only by the patient's differential features, and the relation correction branch does not aggregate the initial subtype probabilities between conflicting lesions. When the path conflict disappears in subsequent model versions, the corresponding lesion node re-satisfies the first aggregation condition, and its local representation can participate in the patient node context update. The entire process controls the direction of information propagation with the lesion evidence state.

[0059] In another preferred embodiment, a baseline confidence code is generated based on the missing indicator identifier, baseline source identifier, temporal continuity identifier, and numerical stability identifier. The missing indicator identifier corresponds to whether the current clinical indicator exists; the baseline source identifier corresponds to an individual longitudinal baseline, a temporary individual baseline, a stratified population baseline, or an empty source; the temporal continuity identifier corresponds to whether the historical records constitute a continuous time chain; and the numerical stability identifier corresponds to whether the baseline candidate sequence remains stable within the source. The identifiers are concatenated into a baseline confidence code according to the order of clinical indicators and are passed along the belonging edge between the patient node and the lesion node, so that each differential feature has a corresponding source and complete state.

[0060] Differential features in patient nodes are mapped to patient background messages. Baseline reliable encoding is converted into effective bitmasks corresponding to the dimensions of the patient background messages. The encoding positions of individual longitudinal baselines where the current indicator exists retain complete messages. The corresponding positions of temporary individual baselines or stratified population baselines retain messages with source status. The encoding positions with empty sources or missing current indicators mask the corresponding messages. The patient background messages processed by effective bitmasks are combined with intra-segment context and cross-segment context features. During the combination process, the source boundaries of the three types of messages are retained. Then, the relation correction branch generates the relation correction amount of the current lesion to avoid missing states being mistakenly identified as real observations with zero values ​​after splicing.

[0061] When the target patient has a complete longitudinal record, the patient background information is mainly formed by the individual longitudinal baseline difference, and the intra-segment context and cross-segment context supplement the location relationship of multiple lesions. When the target patient has only a small amount of historical records, the temporary individual baseline and the stratified population baseline generate source identifiers respectively, and the relationship correction branch distinguishes the two types of background information based on the source identifiers. When the target patient has no available historical records, the stratified population baseline provides a differential reference. If the corresponding indicator is still not found in the matching case database, the corresponding effective bit mask position is kept hidden, and the classification process continues to use the existing local morphology and spatial relationship, without directly replacing the target patient's missing value with a single indicator record from other patients.

[0062] In one embodiment for model training, training data, validation data, and test data are divided into groups based on patients. All examination events and all lesion records of the same patient are kept in the same data group. Before entering the model, the patient identifier is converted into an internal identifier used only for grouping and association, and is not used as a classification feature input. Each lesion in the training data has a definite association between the sampling identifier and the pathology label. The higher category label and the lower subtype label are generated from the same pathological conclusion. Examination events that cannot be completed to correspond to both the lesion and the pathology do not participate in the lesion-level classification error calculation, but their unlabeled patient clinical records can be retained for subsequent baseline formation.

[0063] Lesion nodes with the same pathological subtype label within the same patient form a homo-subtype sample pair, while lesion nodes with different pathological subtype labels form a hetero-subtype sample pair. Each sample pair simultaneously stores the local morphological representation, anatomical segment encoding, segment distance encoding, and relation type encoding of the two lesions. Homo-subtype sample pairs do not require the lesions to be located in the same segment, and hetero-subtype sample pairs are not rewritten as homo-subtype relationships due to belonging to the same patient. The relation correction branch learns the expression boundary of the lesion co-occurrence relationship based on the two types of sample pairs, so that the co-occurrence information within the patient can change the candidate subtype score, but does not form a hard constraint that multiple lesion labels must be consistent.

[0064] During training, the classification error of the superordinate category is calculated based on the superordinate category label, and the classification error of the subordinate subtype within the path is calculated based on the subordinate subtype label. The two are combined into a local classification error. The relationship discrimination error is calculated based on the same subtype sample pairs, different subtype sample pairs, and relationship type encoding, so that the relationship correction branch can distinguish between the co-occurrence of the same subtype and the co-occurrence of different subtypes within the same patient. The correction classification error is calculated based on the correction subtype probability and the pathological subtype label. The three types of errors together constitute the joint training objective. When updating parameters, the local classification branch, the mapping corresponding to each relationship type, and the relationship correction branch are updated simultaneously. However, the patient baseline calculation rules, lesion association rules, and pathological hierarchy dictionary are saved independently as data processing rules.

[0065] For training data with uneven sample sizes across different subtypes, local classification errors are configured with category contributions based on the occurrence of subtypes in patient-level groupings. Relationship discrimination errors are calculated separately for samples of the same subtype and samples of different subtypes to avoid the dominance of relationship parameters by a single patient with a large number of lesions. Training batches are loaded according to patients, with each batch carrying complete patient-lesion association data. If not all lesions can be accommodated, lesions from the same patient are kept in the same batch segment, and the segment association status is saved. During the validation phase, confusion records are generated according to lesion subtypes, and the category changes of the initial subtype probability and the corrected subtype probability are compared to verify whether the relationship correction comes from the corresponding patient and the corresponding examination event.

[0066] After training, the model saves the project dictionary version, pathology hierarchy dictionary version, baseline formation rule version, relation encoding version, local classification parameters, and relation correction parameters. During inference, it reads the same version of the data dictionary to complete the clinical indicator merging and lesion encoding. When pathology results are returned after inference, they are written into the confirmed case database through patient identification, examination time point, lesion identification, and tissue sampling identification. New records are only included in subsequent training data when the association is complete, the pathology hierarchy is mappable, and the data source status is clear. Model version updates do not overwrite existing inference records. Existing records save the baseline version, model version, and initial and correction probabilities used at that time to maintain the traceability of classification data.

[0067] In one specific implementation scenario, the target patient has multiple clinical examination records and multiple lesion records formed during the current colonoscopy. The system aligns historical clinical indicators with medication changes, acute illnesses, and interventional procedure times, forming an individual longitudinal baseline from records that have never been accompanied by any treatment events and are from the same source. The current indicators are converted into differential features. Each lesion forms local morphological features based on anatomical segment, size, shape, surface mucus, color, vascular features, and crypt structure. Local classification branches generate initial subtype probabilities. The patient node is connected to multiple lesion nodes through belonging edges. Co-occurrence edges and location edges are established between lesion nodes based on the same examination and anatomical segment. The relationship correction branch aggregates differential features, intra-segment context, and cross-segment context and corrects the probabilities of each lesion respectively.

[0068] In another specific embodiment, if there are insufficient longitudinal records for the target patient, the system retrieves reference records from the pathological confirmed case database according to age group, gender, underlying disease category, and examination source, forming a stratified population baseline and writing a population source identifier. The clinical indicators present in this case form differential features, and the clinical indicators missing in this case form zero-value differences and missing indicator identifiers. If only one lesion is found in this examination, the patient-lesion association data only includes the patient node, the single lesion node, and the belonging edge. The local classification branch generates the initial subtype probability, and the relationship correction branch corrects the probability according to the patient background information with effective bitmasks. Empty positional relationships will not generate fictitious adjacent lesions. After the pathology results are returned, the corresponding records are entered into the case database and become candidate data for subsequent stratified population baseline retrieval and model training.

[0069] In this embodiment, patient baseline differential characterization and multi-lesion relationship correction form a continuous data processing chain. The longitudinal baseline separates the patient's inherent baseline state from the current observation value. The differential feature records the direction and scale of the current index relative to the baseline state. The multi-lesion spatial characterization records the segmental relationship and co-occurrence conditions of lesions within the same examination. The local classification branch retains the morphological evidence of each lesion itself. The relationship correction branch converts the patient background and lesion relationship into subtype dimension correction amount without copying the lesion label. The hierarchical path examination restricts the propagation of conflicting local evidence to the patient context. The baseline credibility coding restricts the degree of participation of patient messages that are missing or insufficient in source. Thus, a closed processing process is completed from longitudinal data processing, individual reference establishment, independent lesion classification, intra-patient relationship aggregation to lesion subtype output.

Claims

1. A machine learning classification method for colorectal precancerous lesion subtypes based on multifactorial features, characterized in that, include: Acquire longitudinal clinical data of the target patient and lesion records formed during this colonoscopy, and write the patient identification, examination time point and lesion anatomical segment into the patient-lesion association data; Based on the longitudinal clinical data, a patient baseline profile is generated, and the current clinical data is converted into differential features relative to the patient baseline profile. Based on the lesion records, the local morphological features of each lesion are generated, and the initial subtype probability is obtained by calling the machine learning classification model trained with pathological subtype labels. The differential features, the segmental relationship encoding between lesions in the same examination, and the co-occurrence characterization are hierarchically aggregated to generate a relationship correction value. The relationship correction value is used to correct the initial subtype probability and determine the subtype category of each lesion.

2. The machine learning classification method for colorectal precancerous lesion subtypes based on multi-factor features according to claim 1, characterized in that, The generation of the patient baseline characterization includes: sorting the historical records of the same clinical indicator according to the collection time, and separating the records with accompanying medical event identifiers from the records without accompanying medical event identifiers; Records that are continuous and from the same source but without accompanying medical event identifiers are aggregated in time series to form individual longitudinal baselines; When historical records are insufficient to form the individual longitudinal baseline, matching records are retrieved from the pathological confirmed case database according to age group, gender, underlying disease category and examination source. The matching records are aggregated to form a stratified population baseline, and the individual longitudinal baseline or the stratified population baseline is written into the patient master record.

3. The machine learning classification method for colorectal precancerous lesion subtypes based on multi-factor features according to claim 1, characterized in that, The patient-lesion association data includes patient nodes, lesion nodes, and relationship edges; The patient node contains the patient baseline characterization and the differential features, while the lesion node contains the lesion location, size, shape, surface mucus, color, vascular features, and crypt structure. Establish the attribution edge between the patient node and the lesion node according to the same patient attribution relationship, establish the position edge between the lesion nodes according to the order of colonic anatomical segments, establish the co-occurrence edge between the lesion nodes according to the same examination identifier, and write the relationship type code for the attribution edge, the position edge and the co-occurrence edge respectively.

4. The machine learning classification method for colorectal precancerous lesion subtypes based on multi-factor features according to claim 1, characterized in that, The machine learning classification model includes a local classification branch and a relation correction branch; The local classification branch aligns the local morphological features of each lesion with the differential features of the corresponding patient, and outputs the initial subtype probability of each lesion for a preset pathological subtype set. The relationship correction branch performs hierarchical aggregation on the patient nodes, lesion nodes and relationship type codes in the patient-lesion association data, and outputs the relationship correction amount corresponding to each lesion. The relationship correction factor and the initial subtype probability are combined and normalized along the subtype dimension to generate the corrected subtype probability for each lesion.

5. The machine learning classification method for colorectal precancerous lesion subtypes based on multi-factor features according to claim 2, characterized in that, The time-series aggregation includes: merging historical records with the same-name indicators according to the inspection item code and unit of measurement, aligning the medication change, acute disease record or interventional operation time with the historical records, and forming event association sequences and baseline candidate sequences; For records with consistent origins in the baseline candidate sequence, calculate the temporal continuity identifier and the numerical stability identifier, determine the record contribution order based on the temporal continuity identifier and the numerical stability identifier, and aggregate them according to the record contribution order to form individual longitudinal baselines, while retaining the missing indicator identifier and the baseline source identifier.

6. The machine learning classification method for colorectal precancerous lesion subtypes based on multi-factor features according to claim 3, characterized in that, The construction of the location edge includes: mapping the anatomical segments of each lesion to an ordered colonic segment sequence, and generating segment distance codes based on the intervals of the lesion nodes in the ordered colonic segment sequence; Create intra-segment position edges for lesion nodes located in the same segment, and create cross-segment position edges for lesion nodes located in different segments. For each lesion node, the adjacent lesion features connected by the position edge within the segment and the adjacent lesion features connected by the position edge across the segment are collected respectively, and the two types of adjacent lesion features are combined with the corresponding segment distance encoding to form a multi-lesion spatial representation.

7. The machine learning classification method for colorectal precancerous lesion subtypes based on multi-factor features according to claim 4, characterized in that, The preset pathological subtype set is divided into upper category and lower subtype according to the pathological category hierarchy. The local classification branch first generates the upper category probability of conventional adenoma path and serrated lesion path based on the local morphological characteristics, and then generates the lower subtype probability of tubular adenoma, tubular villous or villous adenoma, sessile serrated lesion and traditional serrated adenoma within the corresponding path. The higher category probability and the corresponding lower subtype probability are combined by path to form an initial subtype probability that maintains the correspondence between category levels.

8. The machine learning classification method for colorectal precancerous lesion subtypes based on multi-factor features according to claim 7, characterized in that, The relationship correction branch includes a first aggregation process from lesion to patient and a second aggregation process from patient to lesion; During the first aggregation process, only the lesion node features whose upper category probability is consistent with the upper category of the lower subtype probability are written into the patient node context; In the second aggregation process, the patient node context, the local morphological features of the corresponding lesion, and the location edges and co-occurrence edges connected to the corresponding lesion are combined to generate the relationship correction quantity, and the local classification results of lesion nodes that did not participate in the first aggregation process are retained.

9. The machine learning classification method for colorectal precancerous lesion subtypes based on multi-factor features according to claim 5, characterized in that, A baseline reliability code is generated based on the missing indicator identifier, the baseline source identifier, the temporal continuity identifier, and the numerical stability identifier, and the baseline reliability code is written into the belonging edge between the patient node and each lesion node; The spatial representation of multiple lesions is split into intra-segment context and cross-segment context. The differential features in the patient node are encoded into patient background information. The baseline confidence code is converted into an effective bitmask and multiplied item by item with the patient background information. The resulting patient background information is then combined with the intra-segment context and the cross-segment context to form the relationship correction amount for the corresponding lesion.

10. The machine learning classification method for colorectal precancerous lesion subtypes based on multi-factor features according to claim 4, characterized in that, The training of the machine learning classification model includes: dividing the training data into groups based on patients, grouping lesions with the same pathological subtype label within the same patient into samples of the same subtype, and grouping lesions with different pathological subtype labels into samples of different subtypes. Local classification error is calculated based on the superordinate category label and the subordinate subtype label; relationship discrimination error is calculated based on the same subtype sample pair, the different subtype sample pair and the relationship type code; corrected classification error is calculated based on the corrected subtype probability and the pathological subtype label; and the three types of errors are combined into a joint training objective. Keep all lesion records of the same patient in the same data group.