Method and apparatus for inference of machine learning model for numerical prediction based on multi-variable input

KR103032086B1Active Publication Date: 2026-10-13TODAYS CAR CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
KR1020250199527
Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-10-13
Estimated Expiration
2045-12-15

Smart Images

  • Figure 112025141709429-PAT00005_ABST
    Figure 112025141709429-PAT00005_ABST
Patent Text Reader

Abstract

A method and apparatus for inferring a machine learning model for numerical prediction based on multivariate input are provided. A method for inferring a machine learning model for numerical prediction based on multivariate input according to one embodiment of the present invention may include the steps of receiving a plurality of input variables including a numerical variable, a categorical variable, and a time series variable; generating first to third feature vectors through a type-specific encoder; generating a combined feature vector by connecting the feature vectors; calculating an attention score through a multi-head self-attention layer; generating a weighted summed integrated feature vector based on the attention score; calculating a predicted value through a first fully connected layer; and calculating a variance value and a confidence interval through a second fully connected layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present invention relates to a machine learning-based numerical prediction technology, and more specifically, to a method and apparatus for inferring a machine learning model that generates feature vectors by encoding heterogeneous types of input variables, including numerical variables, categorical variables, and time series variables, by type, and dynamically determines weights for each variable based on multi-head self-attention to simultaneously output predicted values ​​and confidence intervals. Background Technology

[0002] Conventional machine learning-based numerical prediction models used a method of calculating predicted values ​​by applying fixed weights to input variables. However, this approach reflected the importance of each variable equally regardless of the combination of input variables, leading to a problem where prediction accuracy deteriorated for specific input combinations.

[0003] Furthermore, conventional prediction models had limitations in that they processed different types of variables—such as numeric, categorical, and time series—using a single encoding method, failing to sufficiently reflect the unique characteristics of each variable type. For example, information loss occurred because the temporal dependence of time series variables or the discrete nature of categorical variables were not properly handled.

[0004] Meanwhile, conventional prediction models had a limitation in that they output only a single predicted value, making it impossible to assess the reliability of the prediction. As a result, users could not perceive the uncertainty of the predicted value, and it was difficult to properly manage risk when making decisions regarding the prediction results.

[0005] Therefore, there is a need for a technology capable of encoding heterogeneous types of input variables in an optimized manner, dynamically adjusting variable weights based on input combinations, and quantifying prediction uncertainty by providing confidence intervals along with predicted values. The problem to be solved

[0006] The present invention has been devised to solve the above-mentioned problems, and aims to provide a method and apparatus for inferring a machine learning model that converts heterogeneous types of input variables, including numerical variables, categorical variables, and time series variables, into feature vectors through type-specific encoders, and dynamically determines the weights of each variable based on multi-head self-attention to simultaneously output predicted values ​​and confidence intervals. means of solving the problem

[0007] A method for inferring a machine learning model for numerical prediction based on multivariate input according to an embodiment of the present invention for achieving the above objective comprises: receiving a plurality of input variables, wherein the plurality of input variables include a numeric variable, a categorical variable, and a time series variable; inputting the numeric variable into a normalization layer to generate a first feature vector, inputting the categorical variable into an embedding layer to generate a second feature vector, and inputting the time series variable into a sequence encoder to generate a third feature vector; connecting the first to third feature vectors to generate a combined feature vector; inputting the combined feature vector into a multihead self-attention layer to calculate an attention score for each of the plurality of input variables; applying weights to each of the first to third feature vectors based on the attention score and then performing weighted summation to generate an integrated feature vector; and inputting the integrated feature vector into a first fully connected layer to calculate a prediction value. and input the integrated feature vector into a second fully connected layer to calculate the variance of the predicted value, and may include a step of determining a confidence interval based on the variance value.

[0008] In addition, the step of calculating the attention score may be characterized by generating a query vector, a key vector, and a value vector from the combined feature vector, respectively, and calculating the attention score through an inner product operation between the query vector and the key vector.

[0009] Additionally, after the step of determining the confidence interval, the method may further include the step of calculating the width of the confidence interval, and if the width is greater than or equal to a first threshold and less than a second threshold, applying a correction coefficient to the predicted value to output a corrected predicted value, and if the width is greater than or equal to the second threshold, calculating the variance contribution of each of the plurality of input variables, identifying the variable with the highest variance contribution, and requesting additional data input for the corresponding variable.

[0010] Additionally, the method may further include: a step of receiving an actual value after a predetermined period has elapsed following the output of the predicted value; a step of calculating an error rate between the predicted value and the actual value; a step of analyzing the attention score to identify an input variable with a high error contribution when the error rate exceeds a threshold; and a retraining step of preferentially updating the weights of an encoder or attention layer corresponding to the identified input variable.

[0011] In addition, the method may further include a step of visualizing and providing weights for each input variable calculated in the step of generating the integrated feature vector through a user interface.

[0012] Additionally, prior to the step of generating the feature vector, the method may further include the step of identifying a variable among the plurality of input variables that has a missing value; and the step of generating and inserting a replacement value based on the distribution of other variables of the same type for the variable that has a missing value.

[0013] Additionally, the method may further include the step of identifying an input variable whose attention score calculated in the step of calculating the attention score is less than a preset lower threshold; and the step of excluding the identified input variable from the weighted summation or setting the weight of the identified input variable to 0.

[0014] Additionally, the method may further include the step of generating a time series prediction result by repeatedly calculating the predicted value and the confidence interval for a plurality of time points; and the step of identifying and marking a point in the time series prediction result where the width of the confidence interval increases rapidly as a prediction instability interval.

[0015] An apparatus for numerical prediction based on multivariable input according to another embodiment of the present invention for achieving the above objective comprises: a memory in which at least one program is recorded; and a processor for executing said program, wherein the program receives a plurality of input variables, wherein the plurality of input variables include a numeric variable, a categorical variable, and a time series variable; input said numeric variable into a normalization layer to generate a first feature vector, input said categorical variable into an embedding layer to generate a second feature vector, and input said time series variable into a sequence encoder to generate a third feature vector; connect said first to third feature vectors to generate a combined feature vector; input said combined feature vector into a multihead self-attention layer to calculate an attention score for each of said plurality of input variables; apply weights to each of said first to third feature vectors based on said attention score and then perform weighted summation to generate an integrated feature vector; input said integrated feature vector into a first fully connected layer to calculate a predicted value. and may include instructions for inputting the integrated feature vector into a second fully connected layer to calculate the variance of the predicted value and determining a confidence interval based on the variance value.

[0016] An apparatus for numerical prediction based on multivariable input according to another embodiment of the present invention for achieving the above objective may include: an input unit that receives a plurality of input variables, wherein the plurality of input variables include a numeric variable, a categorical variable, and a time series variable; a feature extraction unit that includes a normalization layer that normalizes the numeric variable to generate a first feature vector, an embedding layer that embedding the categorical variable to generate a second feature vector, and a sequence encoder that encodes the time series variable to generate a third feature vector; an attention operation unit that performs a multihead self-attention operation on a combined feature vector formed by connecting the first to third feature vectors to calculate an attention score and generates a weighted summed integrated feature vector based on the attention score; a prediction unit that includes a first fully connected layer that calculates a prediction value from the integrated feature vector; and a confidence calculation unit that includes a second fully connected layer that calculates a variance value of the prediction value from the integrated feature vector and determines a confidence interval based on the variance value. Effects of the invention

[0017] According to the present invention as described above, by processing numeric, categorical, and time-series variables with an optimized encoder, information loss is minimized compared to a single encoding method, and the unique characteristics of each variable type can be preserved.

[0018] In addition, by dynamically adjusting the weights of input variables based on multi-head self-attention, it is possible to improve prediction accuracy for various input combinations compared to the conventional fixed-weight method.

[0019] In addition, by providing variance-based confidence intervals along with predicted values, users can perceive prediction uncertainty and improve the quality of decision-making. Brief explanation of the drawing

[0020] FIG. 1 is a block diagram of a multivariable input-based numerical prediction device according to one embodiment of the present invention. FIG. 2 is a diagram showing the detailed configuration of a feature extraction unit according to one embodiment of the present invention. FIG. 3 is a diagram showing the detailed configuration of an attention operation unit according to an embodiment of the present invention. FIG. 4 is a diagram showing a dual output structure according to one embodiment of the present invention. FIG. 5 is an overall flowchart of an inference method according to one embodiment of the present invention. FIG. 6 is a confidence interval-based processing flowchart according to one embodiment of the present invention. FIG. 7 is a diagram showing a computer system according to one embodiment of the present invention. Specific details for implementing the invention

[0021] The advantages and features of the present invention and the methods for achieving them will become clear by referring to the embodiments described below in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below but may be implemented in various different forms. These embodiments are provided merely to ensure that the disclosure of the present invention is complete and to fully inform those skilled in the art of the scope of the present invention, and the present invention is defined only by the scope of the claims.

[0022] The terms used in this specification are for describing embodiments and are not intended to limit the invention. In this specification, the singular form includes the plural form unless specifically stated otherwise in the text. The terms "comprises" and / or "comprising" used in this specification do not exclude the presence or addition of one or more other components in addition to the components mentioned. Throughout the specification, the same reference numerals refer to the same components, and "and / or" includes each of the mentioned components and all combinations of one or more. Although terms such as "first," "second," etc., are used to describe various components, these components are not limited by these terms. These terms are used merely to distinguish one component from another. Therefore, the first component mentioned below may be the second component within the technical scope of the invention.

[0023] Unless otherwise defined, all terms used herein (including technical and scientific terms) may be used in a meaning commonly understood by those skilled in the art to which the present invention pertains. Additionally, terms defined in commonly used dictionaries are not to be interpreted ideally or excessively unless explicitly and specifically defined otherwise.

[0024] Spatially relative terms such as "below," "beneath," "lower," "above," and "upper" may be used to facilitate the description of the relationship between one component and other components as illustrated in the drawings. Spatially relative terms should be understood as encompassing different orientations of components during use or operation, in addition to the orientations depicted in the drawings. For example, if a component depicted in a drawing is inverted, a component described as "below" or "beneath" of another component may be placed "above" of that component. Therefore, the exemplary term "below" may encompass both the lower and upper directions. Components may also be oriented in other directions, and accordingly, spatially relative terms may be interpreted according to the orientation.

[0025] Hereinafter, embodiments of the present invention will be described in detail with reference to the attached drawings.

[0026] FIG. 1 is a block diagram of a multivariable input-based numerical prediction device according to one embodiment of the present invention.

[0027] Referring to FIG. 1, a multivariable input-based numerical prediction device (100) according to one embodiment of the present invention may include an input unit (110), a feature extraction unit (120), an attention operation unit (130), a prediction unit (140), and a reliability calculation unit (150).

[0028] The input unit (110) receives a plurality of input variables. The plurality of input variables include numeric variables, categorical variables, and time series variables.

[0029] As an optional embodiment, numeric variables may include continuous numeric data. For example, inventory quantity, financial interest rates, credit scores, etc., may correspond to numeric variables.

[0030] As an optional embodiment, the categorical variable may include discrete categorical data. For example, vehicle type category, region code, customer grade, etc. may correspond to the categorical variable.

[0031] As an optional embodiment, the time series variable may include a continuous sequence of data in chronological order. For example, past demand trends, seasonal pattern data, etc., may correspond to the time series variable.

[0032] As an optional embodiment, the input unit (110) may identify a variable among a plurality of input variables that has missing values, and generate and insert a replacement value for the variable that has missing values ​​based on the distribution of other variables of the same type. For example, if a numeric variable has missing values, the average or median of other numeric variables of the same type may be inserted as a replacement value.

[0033] As an optional embodiment, the present invention may be applied to various fields requiring resource allocation or service fee calculation. For example, numerical variables may include the quantity of available resources, financial costs, user credit indicators, etc., categorical variables may include resource types, service areas, user grades, etc., and time series variables may include past usage demand trends, seasonal pattern data, etc.

[0034] The feature extraction unit (120) generates a feature vector by encoding a plurality of input variables received from the input unit (110) by type. The feature extraction unit (120) may include a normalization layer, an embedding layer, and a sequence encoder.

[0035] As an optional embodiment, a normalization layer normalizes a numeric variable to generate a first feature vector. Normalization may include a process of scaling the value of the numeric variable to a predetermined range (e.g., 0 to 1).

[0036] As an optional embodiment, the embedding layer generates a second feature vector by embedding a categorical variable. The embedding may include a process of converting discrete categorical values ​​into a continuous vector space.

[0037] As an optional embodiment, the sequence encoder encodes time series variables to generate a third feature vector. The sequence encoder may be implemented as any one of a Long Short-Term Memory (LSTM), a Gated Recurrent Unit (GRU), or a Transformer encoder.

[0038] The attention operation unit (130) concatenates the first to third feature vectors generated by the feature extraction unit (120) to generate a combined feature vector, and performs a multi-head self-attention operation on the combined feature vector to calculate an attention score. The attention operation unit (130) generates a weighted summed integrated feature vector based on the attention score.

[0039] As an optional embodiment, the attention operation unit (130) can generate a query vector, a key vector, and a value vector from the combined feature vector, respectively, and calculate an attention score through an inner product operation between the query vector and the key vector.

[0040] As an optional embodiment, the attention operation unit (130) may identify an input variable whose calculated attention score is less than a preset lower threshold, and exclude the identified input variable from the weighted summation or set the weight of the input variable to 0. This allows the prediction accuracy to be improved by excluding the influence of a variable that contributes little to the prediction.

[0041] The prediction unit (140) calculates a prediction value from the integrated feature vector generated by the attention operation unit (130). The prediction unit (140) includes a first fully connected layer and inputs the integrated feature vector to the first fully connected layer to output a prediction value.

[0042] The confidence calculation unit (150) calculates the variance of the predicted value from the integrated feature vector generated by the attention operation unit (130) and determines a confidence interval based on the variance. The confidence calculation unit (150) includes a second fully connected layer and inputs the integrated feature vector into the second fully connected layer to output the variance.

[0043] As an optional embodiment, the output value of the second fully connected layer may be transformed through a non-negative transformation function so that the variance value is 0 or greater. For example, at least one of a softplus function, an exponential function, or an absolute value function may be applied to the output of the second fully connected layer so that the variance value σ² is 0 or greater.

[0044] As an optional embodiment, the confidence interval may be determined as an upper and lower limit by adding or subtracting the value obtained by multiplying the square root of the variance value by a coefficient (Z coefficient or t coefficient) corresponding to a preset confidence level around the predicted value. For example, when applying a 95% confidence level under the assumption of a normal distribution, the coefficient may be 1.96.

[0045] As an optional embodiment, the multivariable input-based numerical prediction device (100) may provide the weights for each calculated input variable by visualizing them through a user interface. This allows the user to intuitively understand how much each input variable contributed to the prediction result.

[0046] FIG. 2 is a diagram showing the detailed configuration of a feature extraction unit according to one embodiment of the present invention.

[0047] Referring to FIG. 2, the feature extraction unit (120) generates a feature vector by processing numeric variables, categorical variables, and time series variables through different encoders, respectively.

[0048] Numerical variables are input into the normalization layer and converted into first feature vectors. The normalization layer adjusts the scale of the numerical variables to improve the stability of the model application.

[0049] As an optional embodiment, the normalization layer may use any one of Min-Max normalization, Z-score normalization, or log transformation.

[0050] Categorical variables are input into the embedding layer and converted into secondary feature vectors. The embedding layer converts discrete categorical values ​​into low-dimensional continuous vectors.

[0051] As an optional embodiment, the embedding layer can map each category value to a fixed-dimensional vector through a learnable lookup table.

[0052] Time series variables are input into a sequence encoder and converted into third-party feature vectors. The sequence encoder captures temporal dependencies and compresses the patterns of the time series data into vectors.

[0053] As an optional embodiment, if the sequence encoder is implemented as an LSTM, it can effectively learn the long-term dependencies of the time series data. If the sequence encoder is implemented as a transformer encoder, parallel processing is possible, which can improve the learning speed.

[0054] The generated first feature vector, second feature vector, and third feature vector are concatenated to form a combined feature vector. The combined feature vector is then passed to the attention operation unit (130).

[0055] FIG. 3 is a diagram showing the detailed configuration of an attention operation unit according to an embodiment of the present invention.

[0056] Referring to FIG. 3, the attention operation unit (130) receives a combined feature vector and performs a multi-head self-attention operation.

[0057] First, a query vector, a key vector, and a value vector are generated from the combined feature vector, respectively. The query vector, key vector, and value vector are each generated by linearly transforming the combined feature vector through a learnable weight matrix.

[0058] Next, an inner product operation (indicated by ? in Fig. 3) is performed between the query vector and the key vector to calculate the attention score. The attention score represents the relative importance of each input variable in contributing to the prediction.

[0059] As an optional embodiment, a softmax function may be applied to the result of the inner product operation so that the attention score can be normalized to a probability distribution between 0 and 1.

[0060] Next, a weighted summation between the calculated attention scores and value vectors (indicated by ? in Fig. 3) is performed to generate an integrated feature vector. Weighted summation is an operation that sums value vectors using the attention scores as weights.

[0061] As an optional embodiment, multi-head self-attention may include multiple attention heads. Each attention head captures correlations between input variables from different perspectives, and the outputs of multiple attention heads are combined to generate a final integrated feature vector.

[0062] Through this attention operation, unlike conventional fixed-weight methods, the importance of each variable is dynamically adjusted according to the input combination, thereby improving prediction accuracy for various input situations.

[0063] FIG. 4 is a diagram showing a dual output structure according to one embodiment of the present invention.

[0064] Referring to FIG. 4, the integrated feature vector is input to the prediction unit (140) and the reliability calculation unit (150), respectively, to form a dual output structure.

[0065] The prediction unit (140) inputs the integrated feature vector into the first fully connected layer to produce a predicted value. The first fully connected layer reduces the dimensionality of the integrated feature vector and outputs a predicted value that is a single numerical value.

[0066] The confidence calculation unit (150) inputs the integrated feature vector into the second fully connected layer to calculate the variance value. The second fully connected layer outputs a variance value representing the uncertainty of the predicted value. A confidence interval is determined based on the calculated variance value.

[0067] As an optional embodiment, the confidence interval may be calculated using the formula: predicted value ± (square root of the variance × confidence coefficient). The confidence coefficient is determined according to a preset confidence level and distribution assumption, and, for example, may be 1.96 when applying a 95% confidence level under the assumption of a normal distribution.

[0068] Through this dual output structure, unlike conventional methods that output only a single predicted value, a confidence interval is provided along with the predicted value, allowing users to perceive the uncertainty of the prediction and improve the quality of decision-making.

[0069] FIG. 5 is an overall flowchart of an inference method according to one embodiment of the present invention.

[0070] Referring to FIG. 5, the inference method of a machine learning model for numerical prediction based on multivariate input according to one embodiment of the present invention consists of a 7-step process.

[0071] First, a multivariable input-based numerical prediction device (100) receives multiple input variables (S510). The multiple input variables include numeric variables, categorical variables, and time series variables.

[0072] As an optional embodiment, a preprocessing step may be performed prior to step S510 to identify variables among a plurality of input variables that have missing values, and to generate and insert replacement values ​​for variables that have missing values ​​based on the distribution of other variables of the same type.

[0073] Next, the multivariable input-based numerical prediction device (100) generates type-specific feature vectors (S520). Numerical variables are converted into a first feature vector through a normalization layer, categorical variables into a second feature vector through an embedding layer, and time series variables into a third feature vector through a sequence encoder.

[0074] Next, the multivariable input-based numerical prediction device (100) generates a combined feature vector (S530). The combined feature vector is generated by concatenating the first to third feature vectors.

[0075] Next, the multivariate input-based numerical prediction device (100) calculates an attention score (S540). An attention score for each of the multiple input variables is calculated by inputting a combined feature vector into a multihead self-attention layer.

[0076] As an optional embodiment, input variables whose attention score calculated in step S540 is less than a preset lower threshold are identified, and the identified input variables may be excluded from subsequent weighted summation or have their weights set to 0.

[0077] Next, the multivariable input-based numerical prediction device (100) generates an integrated feature vector (S550). The integrated feature vector is generated by applying weights to each of the first to third feature vectors based on the attention score and then summing them by weights.

[0078] Next, the multivariable input-based numerical prediction device (100) calculates a predicted value (S560). The predicted value is calculated by inputting the integrated feature vector into the first fully connected layer.

[0079] Finally, the multivariate input-based numerical prediction device (100) calculates a variance value and a confidence interval (S570). The variance value of the prediction value is calculated by inputting the integrated feature vector into the second fully connected layer, and a confidence interval is determined based on the variance value.

[0080] As an optional embodiment, when applied to the calculation of service usage fees, the predicted value may be calculated as the optimal usage fee, and the confidence interval may represent an appropriate range for said usage fee. For example, if the predicted value is a predetermined amount and the confidence interval is within ±10% of said amount, the system may recommend setting the usage fee within that range.

[0081] As an optional embodiment, a time series prediction result can be generated by repeatedly calculating the prediction value calculated in step S560 and the confidence interval determined in step S570 for multiple time points. In this case, a point in the time series prediction result where the width of the confidence interval increases rapidly may be identified and displayed as a prediction instability interval.

[0082] As an optional embodiment, the weights for each input variable calculated in step S550 may be visualized and provided through a user interface. This allows the user to intuitively understand the basis of the prediction results and improves the explainability of the model.

[0083] FIG. 6 is a confidence interval-based processing flowchart according to one embodiment of the present invention.

[0084] Referring to Fig. 6, the confidence interval-based processing performs different subsequent processing depending on the width of the confidence interval.

[0085] First, the confidence interval width is calculated (S610). The confidence interval width is calculated as the difference between the upper and lower limits of the confidence interval.

[0086] Next, it is determined whether the confidence interval width is less than the first threshold (S620). If the confidence interval width is less than the first threshold, the predicted value is bypassed and output as is (S621). This means that the confidence of the prediction is sufficiently high and no separate correction is required.

[0087] If the confidence interval width is greater than or equal to the first threshold, it is further determined whether the confidence interval width is less than the second threshold (S630). If the confidence interval width is greater than or equal to the first threshold and less than the second threshold, a correction coefficient is applied to the predicted value and a corrected predicted value is output (S631).

[0088] As an optional embodiment, the correction factor may be determined in proportion to the confidence interval width. For example, a correction factor that conservatively adjusts the predicted value as the confidence interval width increases may be applied.

[0089] If the confidence interval width is greater than or equal to the second threshold, the contribution of each of the multiple input variables to the variance value is calculated, and the variable with the highest contribution to the variance value is identified (S632).

[0090] As an optional embodiment, the variance contribution may be calculated using a gradient-based method or a masking-based method. In the case of the gradient-based method, each input variable x i The absolute value of the partial derivative of the variance output σ² for |∂σ² / ∂x i | can be defined as the contribution. In the case of the masking-based method, each input variable x i The change in the confidence interval width ΔW when masked (e.g., excluding the variable, replacing it with a proxy value, or setting the variable's weight to 0). i It can be defined as a contribution.

[0091] The variable with the highest contribution to variance is the variable that contributes most significantly to prediction uncertainty, and prediction reliability can be improved by securing additional data for that variable.

[0092] Next, additional data input for the identified variables is requested (S633). This allows the user to be prompted to input additional information to resolve the uncertainty of the prediction.

[0093] As an optional embodiment, a request for additional data input may be provided through a user interface in the form of a message such as "Additional information is needed" along with the corresponding variable name.

[0094] As an optional embodiment, when applied to a resource allocation service, if the confidence interval width is greater than or equal to a second threshold, input of additional information, such as the quantity of available resources, competitive service prices, or demand forecast data, may be requested. This can reduce the uncertainty of the forecast.

[0095] Through this confidence interval-based processing, the reliability of prediction results can be improved by adaptively responding to the level of uncertainty in the prediction.

[0096] Meanwhile, a multivariable input-based numerical prediction device (100) according to one embodiment of the present invention receives an actual value after a predetermined period has elapsed since the output of a predicted value, calculates an error rate between the predicted value and the actual value, and can perform selective relearning if the error rate exceeds a threshold value.

[0097] As an optional embodiment, when applied to the calculation of service usage fees, the measured value may be the actual usage fee concluded or whether service usage was successful. If the error rate between the predicted usage fee and the actual concluded usage fee exceeds a threshold, the weights of the sequence encoder corresponding to the variable with a high error contribution (e.g., demand trend data) may be updated preferentially.

[0098] As an optional embodiment, if the error rate exceeds a threshold, the attention score is analyzed to identify input variables with a high contribution to the error. Input variables with a high contribution to the error may be determined to be variables that significantly contributed to the prediction error, even though they have a high attention score.

[0099] As an optional embodiment, the weights of the encoder (e.g., normalization layer, embedding layer, or sequence encoder) or attention layer corresponding to the identified input variable are updated preferentially. This allows for more efficient improvement of prediction accuracy than retraining the entire model.

[0100] FIG. 7 is a diagram showing a computer system according to one embodiment of the present invention.

[0101] A method for inferring a machine learning model for numerical prediction based on multivariable input according to one embodiment of the present invention can be implemented in a computer system (1000), such as a computer-readable recording medium.

[0102] Referring to FIG. 7, a computer system (1000) may include one or more processors (1010), memory (1030), user interface input device (1040), user interface output device (1050), and storage (1060) that communicate with each other via a bus (1020). Additionally, the computer system (1000) may further include a network interface (1070) connected to a network (1080). The processor (1010) may be a central processing unit or a semiconductor device that executes processing instructions stored in memory (1030) or storage (1060). Memory (1030) and storage (1060) may be various forms of volatile or non-volatile storage media. For example, memory may include ROM (1031) or RAM (1032).

[0103] The specific embodiments described in this invention are examples and do not limit the scope of the invention in any way. For the sake of brevity of the specification, descriptions of prior electronic configurations, control systems, software, and other functional aspects of said systems may be omitted. Additionally, the connections of lines or connecting members between components shown in the drawings are illustrative of functional connections and / or physical or circuit connections, and may be replaced or additionally represented as various functional connections, physical connections, or circuit connections in actual devices. Furthermore, unless specifically stated as “essential,” “importantly,” etc., a component may not be strictly necessary for the application of the invention.

[0104] Accordingly, the scope of the present invention should not be limited to the embodiments described above, and all scopes equivalent to or equivalently modified from the claims set forth below, as well as the claims set forth below, shall be considered to fall within the scope of the concept of the present invention.

[0105] The steps of the method or algorithm described in connection with embodiments of the present invention may be implemented directly in hardware, implemented as a software module executed by hardware, or implemented by a combination thereof. The software module may reside in RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable ROM), EEPROM (Electrically Erasable Programmable ROM), Flash Memory, a hard disk, a removable disk, a CD-ROM, or any form of computer-readable recording medium well known in the art to which the present invention belongs.

[0106] Although embodiments of the present invention have been described above with reference to the attached drawings, those skilled in the art will understand that the present invention may be implemented in other specific forms without altering its technical concept or essential features. Therefore, the embodiments described above should be understood as illustrative in all respects and not restrictive. Explanation of the symbols

[0107] 100: Multivariable input-based numerical prediction device 110: Input section 120: Feature extraction unit 130: Attention operation unit 140: Prediction unit 150: Reliability calculation unit 1000: Computer System 1010: Processor 1020: Bus 1030: Memory 1031: ROM 1032: RAM 1040: User interface input device 1050: User interface output device 1060: Storage 1070: Network Interface 1080: Network

Claims

Claim 1 A method for inferring a machine learning model for numerical prediction based on multivariate inputs, comprising: (a) receiving a plurality of input variables, wherein the plurality of input variables include a numeric variable, a categorical variable, and a time series variable; (b) inputting the numeric variable into a normalization layer to generate a first feature vector, inputting the categorical variable into an embedding layer to generate a second feature vector, and inputting the time series variable into a sequence encoder to generate a third feature vector; (c) concatenating the first to third feature vectors to generate a combined feature vector; (d) inputting the combined feature vector into a multihead self-attention layer to calculate an attention score for each of the plurality of input variables; (e) applying weights to each of the first to third feature vectors based on the attention score and then performing weighted summation to generate an integrated feature vector; (f) inputting the integrated feature vector into a first fully connected layer to calculate a prediction value; and (g) input the integrated feature vector into a second fully connected layer to calculate the variance of the predicted value and determine a confidence interval based on the variance value; comprising a method. Claim 2 A method according to claim 1, wherein step (d) is characterized by generating a query vector, a key vector, and a value vector from the combined feature vector, respectively, and calculating an attention score through an inner product operation between the query vector and the key vector. Claim 3 A method according to claim 1, further comprising the step of, after step (g), calculating the width of the confidence interval, and if the width is greater than or equal to a first threshold and less than a second threshold, applying a correction coefficient to the predicted value to output a corrected predicted value, and if the width is greater than or equal to the second threshold, calculating the variance contribution of each of the plurality of input variables, identifying the variable with the highest variance contribution, and requesting additional data input for the corresponding variable. Claim 4 delete Claim 5 A method according to claim 1, further comprising the step of visualizing and providing the weights for each input variable calculated in step (e) through a user interface. Claim 6 A method according to claim 1, further comprising, prior to step (b), a step of identifying a variable among the plurality of input variables that has a missing value; and a step of generating and inserting a replacement value based on the distribution of other variables of the same type for the variable that has a missing value. Claim 7 A method according to claim 1, further comprising: a step of identifying an input variable in which the attention score calculated in step (d) is less than a preset lower threshold; and a step of excluding the identified input variable from the weighted summation of step (e) or setting the weight of the identified input variable to 0. Claim 8 A method according to claim 1, further comprising: a step of generating a time series prediction result by repeatedly calculating the prediction value calculated in step (f) and the confidence interval determined in step (g) for a plurality of time points; and a step of identifying and marking a time point in the time series prediction result where the width of the confidence interval increases rapidly as a prediction instability interval. Claim 9 An apparatus for numerical prediction based on multivariate input, comprising: a memory on which at least one program is recorded; and a processor for executing said program, wherein the program comprises the steps of: receiving a plurality of input variables, wherein the plurality of input variables include a numeric variable, a categorical variable, and a time series variable; inputting the numeric variable into a normalization layer to generate a first feature vector, inputting the categorical variable into an embedding layer to generate a second feature vector, and inputting the time series variable into a sequence encoder to generate a third feature vector; connecting the first to third feature vectors to generate a combined feature vector; inputting the combined feature vector into a multihead self-attention layer to calculate an attention score for each of said plurality of input variables; applying weights to each of the first to third feature vectors based on the attention scores and then performing weighted summation to generate an integrated feature vector; and inputting the integrated feature vector into a first fully connected layer to calculate a prediction value. A device comprising instructions for performing the step of inputting the integrated feature vector into a second fully connected layer to calculate the variance of the predicted value and determining a confidence interval based on the variance value. Claim 10 An apparatus for numerical prediction based on multivariate input, comprising: an input unit that receives a plurality of input variables, wherein the plurality of input variables include a numeric variable, a categorical variable, and a time series variable; a feature extraction unit comprising a normalization layer that normalizes the numeric variable to generate a first feature vector, an embedding layer that embedding the categorical variable to generate a second feature vector, and a sequence encoder that encodes the time series variable to generate a third feature vector; an attention operation unit that performs a multihead self-attention operation on a combined feature vector formed by connecting the first to third feature vectors to calculate an attention score and generates a weighted summed integrated feature vector based on the attention score; a prediction unit comprising a first fully connected layer that calculates a prediction value from the integrated feature vector; and a confidence calculation unit comprising a second fully connected layer that calculates a variance value of the prediction value from the integrated feature vector and determines a confidence interval based on the variance value.

Citation Information

Patent Citations

  • Automatic feature learning from a relational database for predictive modelling

    US20190095515A1

  • Deep embedded self-taught learning system and method for detecting suspicious network behaviours

    US20220070195A1

  • Multimodal Learning from Structured and Unstructured Data

    US20240386321A1

  • Demand forecasting tool for food establishments

    US20240394622A1

  • Processing a sequence of data items

    US20250126027A1