Model training
By determining the correlation between the characteristic values of each dimension in the risk control model and the deviation, adjusting the characteristic values and generating supplementary sample data, and training the risk control model, the problem of insufficient robustness of the existing risk control model is solved and more efficient data processing capabilities are achieved.
Patent Information
- Application Number
- PCT/CN2024/128484
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-21
- Filing Date
- 2024-10-30
- Publication Date
- 2025-05-30
AI Technical Summary
The existing risk control model is less robust and it is difficult to effectively handle the complexity of the format and types of input data.
By obtaining sample data, the correlation between the eigenvalues of each dimension and the deviations in the pre-training process of the target model is determined, the eigenvalues are adjusted to generate supplementary sample data, and the target model is trained through these data.
It improves the robustness of the risk control model, enables it to process complex input data more effectively, and improves the performance of the model in practical applications.
Smart Images

Figure CN2024128484_30052025_PF_FP_ABST
Abstract
Description
Model training Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a model training method, device, storage medium, and electronic device. Background Art
[0002] With the development of Internet technology and artificial intelligence technology, various companies are paying more and more attention to the security of users' personal privacy data.
[0003] Typically, business platforms can use pre-trained risk control models to perform risk control on various user businesses, ensuring the security of users' personal privacy data. However, in actual applications, the formats and types of data input into risk control models are relatively complex, which places high demands on the robustness of risk control models.
[0004] Therefore, how to improve the robustness of risk control models is an urgent problem to be solved.
[0005] Summary of the Invention
[0006] This specification provides a model training method, device, storage medium and electronic device to partially solve the problem of low robustness of risk control models in the existing technology.
[0007] This manual adopts the following technical solutions.
[0008] This specification provides a model training method, including: obtaining sample data; for the eigenvalue of each dimension contained in the sample data, determining the correlation between the eigenvalue of the dimension and the deviation obtained by the target model for the sample data during a pre-training process, as the correlation corresponding to the dimension, wherein the deviation is the deviation between the output result of the target model for the sample data during the pre-training process and the actual result corresponding to the sample data, and the greater the correlation, the greater the impact of the change in the eigenvalue of the dimension on the output result of the target model; according to the correlation corresponding to each dimension, adjusting the eigenvalues of at least some dimensions contained in the sample data to obtain supplementary sample data; training the target model through the supplementary sample data to obtain a trained target model, so as to execute the target business through the trained target model.
[0009] Optionally, for the eigenvalue of each dimension contained in the sample data, determine the correlation between the eigenvalue of the dimension and the deviation obtained by the target model for the sample data during the pre-training process, specifically including: for the eigenvalue of each dimension contained in the sample data, judge whether the type of the eigenvalue of the dimension is a continuous feature; if so, determine the correlation between the eigenvalue of the dimension and the deviation based on the partial derivative result of the eigenvalue of the dimension obtained by the target model for the sample data during the pre-training process.
[0010] Optionally, for the eigenvalue of each dimension contained in the sample data, determine the correlation between the eigenvalue of the dimension and the deviation obtained by the target model for the sample data during the pre-training process, specifically including: for the eigenvalue of each dimension contained in the sample data, judge whether the type of the eigenvalue of the dimension is a discrete feature; if so, determine the correlation between the eigenvalue of the dimension and the deviation based on the differential result of the deviation obtained by the target model for the sample data during the pre-training process under the eigenvalue of the dimension.
[0011] Optionally, according to the correlation degree corresponding to each dimension, the eigenvalues of at least some dimensions contained in the sample data are adjusted to obtain supplementary sample data, specifically including: for the eigenvalue of each dimension contained in the sample data, according to the correlation degree corresponding to the eigenvalue of the dimension, determining the change step corresponding to the eigenvalue of the dimension as the change step corresponding to the dimension, wherein, if the correlation degree corresponding to the eigenvalue of the dimension is greater, the change step corresponding to the eigenvalue of the dimension is smaller; selecting at least some dimensions from the dimensions contained in the sample data as target dimensions, and adjusting the eigenvalue of each target dimension according to the change step corresponding to each target dimension to obtain supplementary sample data.
[0012] Optionally, according to the change step corresponding to each target dimension, the characteristic value of each target dimension is adjusted to obtain supplementary sample data, specifically including: according to the change step corresponding to each target dimension, the characteristic value of each target dimension is adjusted to obtain basic supplementary data; according to the change step corresponding to each target dimension, the probability that the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data is determined; according to the probability, whether the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data; if so, the actual result corresponding to the basic supplementary data is re-determined as the supplementary actual result, and the supplementary sample data is constructed based on the basic supplementary data and the supplementary actual result; otherwise, the supplementary sample data is constructed based on the basic supplementary data and the actual result corresponding to the sample data.
[0013] Optionally, the sample data includes: business data used in risk control business, the business data includes: at least one of: user attribute data, user behavior data, user account status data, and user history data, and the target business includes: risk control business.
[0014] This specification provides a model training device, including: an acquisition module for acquiring sample data; a determination module for determining, for each dimension contained in the sample data, a correlation between the characteristic value of the dimension and the deviation obtained by the target model for the sample data during a pre-training process, as the correlation corresponding to the dimension, wherein the deviation is the deviation between the output result of the target model for the sample data during the pre-training process and the actual result corresponding to the sample data, and the greater the correlation, the greater the impact of the change in the characteristic value of the dimension on the output result of the target model; an adjustment module for adjusting the characteristic values of at least some dimensions contained in the sample data according to the correlation corresponding to each dimension to obtain supplementary sample data; a training module for training the target model through the supplementary sample data to obtain a trained target model, so as to execute the target business through the trained target model.
[0015] Optionally, the determination module is specifically used to determine, for each dimension of the eigenvalue contained in the sample data, whether the type of the eigenvalue of the dimension is a continuous feature; if so, determining the correlation between the eigenvalue of the dimension and the deviation based on the partial derivative result of the eigenvalue of the dimension obtained by the target model for the sample data during the pre-training process and the deviation.
[0016] Optionally, the determination module is specifically used to determine, for each dimension of the eigenvalue contained in the sample data, whether the type of the eigenvalue of the dimension is a discrete feature; if so, determining the correlation between the eigenvalue of the dimension and the deviation based on the differential result of the deviation obtained for the sample data during the pre-training process of the target model under the eigenvalue of the dimension.
[0017] Optionally, the adjustment module is specifically used to determine, for the eigenvalue of each dimension contained in the sample data, based on the correlation corresponding to the eigenvalue of the dimension, the change step corresponding to the eigenvalue of the dimension, as the change step corresponding to the dimension, wherein, if the correlation corresponding to the eigenvalue of the dimension is greater, the change step corresponding to the eigenvalue of the dimension is smaller; select at least some dimensions from the dimensions contained in the sample data as target dimensions, and adjust the eigenvalue of each target dimension according to the change step corresponding to each target dimension to obtain supplementary sample data.
[0018] Optionally, the adjustment module is specifically used to adjust the characteristic value of each target dimension according to the change step corresponding to each target dimension to obtain basic supplementary data; determine the probability that the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data according to the change step corresponding to each target dimension; determine whether the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data according to the probability; if so, re-determine the actual result corresponding to the basic supplementary data as the supplementary actual result, and construct supplementary sample data based on the basic supplementary data and the supplementary actual result; otherwise, construct supplementary sample data based on the basic supplementary data and the actual result corresponding to the sample data.
[0019] Optionally, the sample data includes: business data used in risk control business, the business data includes: at least one of: user attribute data, user behavior data, user account status data, and user history data, and the target business includes: risk control business.
[0020] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned model training method is implemented.
[0021] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned model training method when executing the program.
[0022] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects.
[0023] In the model training method provided in this specification, a target model and sample data for training the target model are first obtained. For the eigenvalue of each dimension contained in the sample data, the correlation between the eigenvalue of the dimension and the deviation between the output result of the target model and the actual result corresponding to the sample data is determined. The greater the correlation, the greater the impact of the change in the eigenvalue of the dimension on the deviation between the output result of the target model and the actual result corresponding to the sample data. Then, according to the correlation, the eigenvalues of at least some dimensions contained in the sample data are adjusted to obtain supplementary sample data. The target model is trained with the supplementary sample data to obtain a trained target model.
[0024] It can be seen from the above method that supplementary sample data can be generated based on the degree of influence of changes in features of different dimensions input to the target model on the output results of the target model, so that the target model can be trained based on the supplementary sample data, thereby improving the robustness of the trained target model. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide further understanding of this specification and constitute a part of this specification. The illustrative embodiments of this specification and their descriptions are used to explain this specification and do not constitute improper limitations on this specification.
[0026] FIG1 is a flow chart of a model training method provided in this specification.
[0027] FIG2 is a schematic diagram of the process of the method for generating supplementary sample data provided in this specification.
[0028] FIG3 is a schematic diagram of a model training device provided in this specification.
[0029] FIG4 is a schematic diagram of an electronic device provided in this specification corresponding to FIG1 . DETAILED DESCRIPTION
[0030] To make the objectives, technical solutions, and advantages of this specification more clear, the following will clearly and completely describe the technical solutions of this specification in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this specification.
[0031] The technical solutions provided by the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0032] FIG1 is a flow chart of a model training method provided in this specification, which includes the following steps.
[0033] S100: Obtain sample data.
[0034] In this specification, the business platform can obtain a basic model and sample data for training the basic model, and then input the obtained sample data into the basic model to obtain the output results of the basic model for the sample data. The basic model can be trained with the optimization goal of minimizing the deviation between the output results of the basic model for the sample data and the actual results corresponding to the sample data to obtain a target model, wherein the above-mentioned basic model can be determined according to actual needs.
[0035] For example, the above-mentioned basic model can be a risk control model, and the above-mentioned sample data can be business data used in historical risk control business responses of the business platform. The business data obtained by the business platform can be input into the risk control model to obtain the output result of whether the input business data is a risky business through the risk control model for the input business data. Then, the risk control model can be trained with the optimization goal of minimizing the deviation between the output result of whether the business data output by the risk control model for the input business data is a risky business and the actual result of whether the input business data is a risky business. The above-mentioned business data includes at least one of: user attribute data (such as user name, user gender, etc.), user behavior data (such as the click frequency of the user's click behavior in the operation interface provided by the business platform, the dragging distance of the dragging behavior, the input time of the text input behavior, etc.), user account status data (such as the user account credit evaluation value, the user's network environment data, etc.), user history data (such as the number of risky businesses in the user's historical business initiation, etc.).
[0036] For another example: the above-mentioned basic model can be a search recommendation model, and the above-mentioned sample data can be the user's recommendation request data (the recommendation request data here can include: the search keywords entered by the user in the past and the user's user information, etc.). The business platform can input the recommendation request data into the search recommendation model, so as to obtain the recommendation results that match the recommendation request data through the search recommendation model for the input recommendation request data, and then the search recommendation model can be trained with the optimization goal of minimizing the deviation between the recommendation results that match the recommendation request data output by the search recommendation model for the input recommendation request data and the recommendation results actually clicked by the user.
[0037] Furthermore, after obtaining the above-mentioned target model and sample data, the business platform can generate supplementary sample data based on the sample data, and can re-train the target model based on the generated supplementary sample data to improve the robustness of the target model. The following will describe in detail the method for the business platform to generate supplementary sample data based on sample data.
[0038] In this specification, the execution entity used to implement the model training method can refer to a designated device such as a server set up on the business platform, or it can refer to a terminal device such as a desktop computer, a laptop computer, etc. For the sake of convenience of description, the model training method provided in this specification is explained below using the server as the execution entity as an example.
[0039] S102: For the eigenvalues of each dimension contained in the sample data, determine the correlation between the eigenvalues of the dimension and the deviation obtained by the target model for the sample data during the pre-training process as the correlation corresponding to the dimension, wherein the deviation is the deviation between the output result of the target model for the sample data during the pre-training process and the actual result corresponding to the sample data. The greater the correlation, the greater the impact of the change in the eigenvalue of the dimension on the output result of the target model.
[0040] Furthermore, after obtaining the sample data, the server can determine, for the eigenvalues of each dimension contained in the sample data, the correlation between the eigenvalue of the dimension and the deviation between the output result of the target model for the sample data during the pre-training process and the actual result corresponding to the sample data, as the correlation corresponding to the dimension. The greater the correlation between the determined eigenvalue of the dimension and the deviation between the output result of the target model for the sample data during the pre-training process and the actual result corresponding to the sample data, the greater the impact of the change in the eigenvalue of the dimension on the output result of the target model, and the greater the deviation between the output result of the target model for the sample data during the pre-training process and the actual result corresponding to the sample data, as shown in Figure 2.
[0041] FIG2 is a schematic diagram of the process of the method for generating supplementary sample data provided in this specification.
[0042] As can be seen from Figure 2, the server can determine whether the type of the eigenvalue of each dimension contained in the sample data is a continuous feature. If so, the server can determine the correlation between the eigenvalue of the dimension and the deviation between the output result of the target model for the sample data during the pre-training process and the actual result corresponding to the sample data based on the partial derivative result of the eigenvalue of the dimension. The deviation between the output result of the target model for the sample data during the pre-training process and the actual result corresponding to the sample data can be used. For details, please refer to the following formula.
[0043] In the above formula, s ij Indicates the sensitivity of the feature of the jth dimension of the i-th sample, i represents the sample subscript, j represents the dimension subscript, x ij represents the jth feature of the i-th sample, y i represents the actual result of the i-th sample, f(x i ,w) represents the output result of the target model for sample data during the pre-training process.
[0044] In addition, the server can also determine whether the type of the eigenvalue of each dimension contained in the sample data is a discrete feature. If so, the correlation between the eigenvalue of the dimension and the deviation can be determined based on the differential result of the deviation of the sample data obtained by the target model during the pre-training process under the eigenvalue of the dimension. For details, please refer to the following formula.
[0045] In the above formula, S ij Indicates the sensitivity of the feature of the jth dimension of the i-th sample, i represents the sample subscript, j represents the dimension subscript, f(x i ,w) represents the output result of the target model for sample data during pre-training, f(x i \x ij ,w) represents the output result of the target model during the pre-training process for the i-th sample that does not contain the features of the j-th dimension.
[0046] S104: According to the correlation degree corresponding to each dimension, the characteristic values of at least some dimensions included in the sample data are adjusted to obtain supplementary sample data.
[0047] S106: The target model is trained using the supplementary sample data to obtain a trained target model, so as to execute the target business using the trained target model.
[0048] Furthermore, the server can determine the change step corresponding to the eigenvalue of each dimension contained in the sample data according to the correlation corresponding to the eigenvalue of the dimension, as the change step corresponding to the dimension, and then select at least some dimensions from the dimensions contained in the sample data as target dimensions, and adjust the eigenvalue of each target dimension according to the change step corresponding to each target dimension to obtain supplementary sample data, wherein the greater the correlation corresponding to the eigenvalue of the dimension, the smaller the change step corresponding to the eigenvalue of the dimension.
[0049] In actual application scenarios, there is a high correlation between the eigenvalues of some dimensions and the deviations of the target model obtained for the sample data during the pre-training process, that is, the output results of the target model are greatly affected, which leads to that when the features of these dimensions are adjusted, the actual results corresponding to the obtained supplementary sample data may be changed compared with the actual results corresponding to the sample data. In other words, when the eigenvalue of a dimension is highly correlated with the deviations of the target model obtained for the sample data during the pre-training process, it means that when the eigenvalue of this dimension changes, the output results of the target model are greatly affected. At this time, when the eigenvalue of this dimension is adjusted, the actual results corresponding to the obtained supplementary sample data are more likely to change compared with the actual results corresponding to the sample data.
[0050] For example, in risk control business, after adjusting the value of user account status data included in sample data with an actual result of no risk, the actual result of the obtained supplementary sample data may be changed to risky.
[0051] Based on this, the server can adjust the characteristic value of each target dimension according to the change step corresponding to each target dimension to obtain basic supplementary data, and determine the probability that the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data according to the change step corresponding to each target dimension, and determine whether the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data according to the probability that the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data. If so, the actual result corresponding to the basic supplementary data can be re-determined as the supplementary actual result, and supplementary sample data can be constructed based on the basic supplementary data and the supplementary actual result. If not, supplementary sample data can be constructed based on the basic supplementary data and the actual results corresponding to the sample data.
[0052] In the above content, the change step corresponding to a dimension can be understood as the magnitude of each adjustment when adjusting the value of this dimension contained in the sample data to obtain supplementary sample data.
[0053] It is worth noting that the server determines whether the actual result corresponding to the basic supplementary data is changed compared to the actual result corresponding to the sample data based on the probability that the actual result corresponding to the basic supplementary data is changed compared to the actual result corresponding to the sample data. It can be understood that if the probability corresponding to a dimension is When the eigenvalue of this dimension is adjusted, the actual result corresponding to the basic supplementary data is different from the actual result corresponding to the sample data. The probability of a dimension changes. If the probability corresponding to a dimension is The probability corresponding to the other dimension is When the eigenvalue of this dimension is adjusted, the actual result corresponding to the basic supplementary data is different from the actual result corresponding to the sample data. (Right now, ) changes.
[0054] It should be noted that the server can determine the probability that the actual result corresponding to the basic supplementary data is changed compared to the actual result corresponding to the sample data based on the change step corresponding to each target dimension, which can be determined by methods such as a neural network model.
[0055] In addition, the server can also determine the specified probability corresponding to the sample data for the sample data, that is, the probability that the actual result corresponding to the supplementary sample data is changed compared to the actual result corresponding to the sample data after the characteristic value of any dimension in the sample data is adjusted.
[0056] Furthermore, based on the above-mentioned specified probability, the characteristic value of each dimension contained in the sample data can be determined, and according to the correlation corresponding to the characteristic value of the dimension, the change step corresponding to the characteristic value of the dimension can be determined as the change step corresponding to the dimension.
[0057] Furthermore, the server can adjust the characteristic value of each target dimension according to the change step corresponding to each target dimension to obtain basic supplementary data, and determine whether the actual result corresponding to the basic supplementary data is changed compared to the actual result corresponding to the sample data based on the above-mentioned specified probability. If so, the actual result corresponding to the basic supplementary data can be re-determined as the supplementary actual result, and supplementary sample data can be constructed based on the basic supplementary data and the supplementary actual result. If not, supplementary sample data can be constructed based on the basic supplementary data and the actual result corresponding to the sample data.
[0058] It can be understood that the probability that the actual result corresponding to the basic supplementary data changes compared with the actual result corresponding to the sample data when the eigenvalue of each dimension changes is set in advance to a specified probability, and then, on the basis of keeping the specified probability unchanged, the change step corresponding to the eigenvalue of each dimension can be determined according to the correlation corresponding to the eigenvalue of the dimension, as the change step corresponding to the dimension, and then, according to the specified probability, it can be determined whether the actual result corresponding to the basic supplementary data changes compared with the actual result corresponding to the sample data.
[0059] Furthermore, after obtaining each supplementary sample data, the server can train the target model using the supplementary sample data to obtain a trained target model, and execute the target business using the trained target model.
[0060] The above-mentioned target businesses can be determined according to actual needs, such as risk control business, search recommendation business, etc.
[0061] From the above content, it can be seen that the server can generate supplementary sample data based on the degree of influence of the changes in the features of different dimensions input to the target model on the output results of the target model, so that the target model can be trained based on the supplementary sample data, thereby improving the robustness of the trained target model.
[0062] The above is a model training method provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding model training device, as shown in Figure 3.
[0063] Figure 3 is a schematic diagram of a model training device provided in this specification, including: an acquisition module 301, used to acquire sample data; a determination module 302, used to determine, for each dimension contained in the sample data, the correlation between the characteristic value of the dimension and the deviation obtained by the target model for the sample data during the pre-training process, as the correlation corresponding to the dimension, wherein the deviation is the deviation between the output result of the target model for the sample data during the pre-training process and the actual result corresponding to the sample data, and the greater the correlation, the greater the impact of the change in the characteristic value of the dimension on the output result of the target model; an adjustment module 303, used to adjust the characteristic values of at least some dimensions contained in the sample data according to the correlation corresponding to each dimension, to obtain supplementary sample data; a training module 304, used to train the target model through the supplementary sample data to obtain a trained target model, so as to execute the target business through the trained target model.
[0064] Optionally, the determination module 302 is specifically used to determine, for each dimension of the eigenvalue contained in the sample data, whether the type of the eigenvalue of the dimension is a continuous feature; if so, then determine the correlation between the eigenvalue of the dimension and the deviation based on the partial derivative result of the eigenvalue of the dimension obtained by the target model for the sample data during the pre-training process and the deviation.
[0065] Optionally, the determination module 302 is specifically used to determine, for each dimension of the feature value contained in the sample data, whether the type of the feature value of the dimension is a discrete feature; if so, determining the correlation between the feature value of the dimension and the deviation based on the differential result of the deviation obtained for the sample data during the pre-training process of the target model under the feature value of the dimension.
[0066] Optionally, the adjustment module 303 is specifically used to determine, for the eigenvalue of each dimension contained in the sample data, according to the correlation corresponding to the eigenvalue of the dimension, the change step corresponding to the eigenvalue of the dimension as the change step corresponding to the dimension, wherein, if the correlation corresponding to the eigenvalue of the dimension is greater, the change step corresponding to the eigenvalue of the dimension is smaller; select at least some dimensions from the dimensions contained in the sample data as target dimensions, and adjust the eigenvalue of each target dimension according to the change step corresponding to each target dimension to obtain supplementary sample data.
[0067] Optionally, the adjustment module 303 is specifically used to adjust the characteristic value of each target dimension according to the change step corresponding to each target dimension to obtain basic supplementary data; determine the probability that the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data according to the change step corresponding to each target dimension; determine whether the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data according to the probability; if so, re-determine the actual result corresponding to the basic supplementary data as the supplementary actual result, and construct supplementary sample data based on the basic supplementary data and the supplementary actual result; otherwise, construct supplementary sample data based on the basic supplementary data and the actual result corresponding to the sample data.
[0068] Optionally, the sample data includes: business data used in risk control business, the business data includes: at least one of: user attribute data, user behavior data, user account status data, and user history data, and the target business includes: risk control business.
[0069] This specification also provides a computer-readable storage medium, which stores a computer program. The computer program can be used to execute a model training method provided in Figure 1 above.
[0070] This specification also provides a schematic structural diagram of an electronic device corresponding to Figure 1, as shown in Figure 4. As shown in Figure 4, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the model training method of Figure 1 above. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0071] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0072] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.
[0073] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0074] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0075] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0076] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0077] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0079] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0080] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0081] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0082] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0083] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0084] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.
[0085] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0086] The above are merely examples of the present invention and are not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
Claims
1. A model training method, comprising: Get sample data; For each eigenvalue of a dimension included in the sample data, determine the correlation between the eigenvalue of the dimension and the deviation obtained by the target model for the sample data during the pre-training process as the correlation corresponding to the dimension, wherein the deviation is the deviation between the output result of the target model for the sample data during the pre-training process and the actual result corresponding to the sample data, and the greater the correlation, the greater the influence of the change of the eigenvalue of the dimension on the output result of the target model; According to the correlation degree corresponding to each dimension, characteristic values of at least some dimensions included in the sample data are adjusted to obtain supplementary sample data; The target model is trained by using the supplementary sample data to obtain a trained target model, so as to execute the target business through the trained target model.
2. The method according to claim 1, for each eigenvalue of a dimension contained in the sample data, determining the correlation between the eigenvalue of the dimension and the deviation obtained by the target model for the sample data during the pre-training process, specifically comprising: For each feature value of a dimension contained in the sample data, determining whether the type of the feature value of the dimension is a continuous feature; If so, the correlation between the eigenvalue of the dimension and the deviation is determined based on the partial derivative result of the deviation of the target model obtained for the sample data during the pre-training process with respect to the eigenvalue of the dimension.
3. The method according to claim 1, for each eigenvalue of a dimension contained in the sample data, determining the correlation between the eigenvalue of the dimension and the deviation obtained by the target model for the sample data during the pre-training process, specifically comprising: For each dimensional feature value contained in the sample data, determining whether the type of the dimensional feature value is a discrete feature; If so, the correlation between the eigenvalue of the dimension and the deviation is determined according to the difference result of the deviation obtained for the sample data during the pre-training process of the target model under the eigenvalue of the dimension.
4. The method according to claim 1, wherein the characteristic values of at least some dimensions included in the sample data are adjusted according to the correlation degree corresponding to each dimension to obtain the supplementary sample data, specifically comprising: For each eigenvalue of a dimension contained in the sample data, according to the correlation degree corresponding to the eigenvalue of the dimension, determine the change step length corresponding to the eigenvalue of the dimension as the change step length corresponding to the dimension, wherein the greater the correlation degree corresponding to the eigenvalue of the dimension, the smaller the change step length corresponding to the eigenvalue of the dimension; At least some dimensions are selected from the dimensions included in the sample data as target dimensions, and the characteristic value of each target dimension is adjusted according to the change step corresponding to each target dimension to obtain supplementary sample data.
5. The method according to claim 4, wherein the characteristic value of each target dimension is adjusted according to the change step corresponding to each target dimension to obtain supplementary sample data, specifically comprising: According to the change step size corresponding to each target dimension, the characteristic value of each target dimension is adjusted to obtain basic supplementary data; Determine, according to the change step corresponding to each target dimension, the probability that the actual result corresponding to the basic supplementary data is changed compared to the actual result corresponding to the sample data; Determining, based on the probability, whether an actual result corresponding to the basic supplementary data is changed compared to an actual result corresponding to the sample data; If so, the actual result corresponding to the basic supplementary data is re-determined as the supplementary actual result, and the supplementary sample data is constructed based on the basic supplementary data and the supplementary actual result; otherwise, the supplementary sample data is constructed based on the basic supplementary data and the actual result corresponding to the sample data.
6. The method according to any one of claims 1 to 5, wherein the sample data comprises: The business data used in the risk control business includes: at least one of: user attribute data, user behavior data, user account status data, and user history data; the target business includes: risk control business.
7. A model training device, comprising: An acquisition module is used to acquire sample data; A determination module is used to determine, for each eigenvalue of a dimension included in the sample data, a correlation between the eigenvalue of the dimension and a deviation obtained by a target model for the sample data during a pre-training process, as the correlation corresponding to the dimension, wherein the deviation is a deviation between an output result of the target model for the sample data during the pre-training process and an actual result corresponding to the sample data, and the greater the correlation, the greater the degree of influence of a change in the eigenvalue of the dimension on the output result of the target model; An adjustment module, configured to adjust the characteristic values of at least some dimensions included in the sample data according to the correlation degree corresponding to each dimension, so as to obtain supplementary sample data; The training module is used to train the target model through the supplementary sample data to obtain a trained target model, so as to execute the target business through the trained target model.
8. In the device as described in claim 7, the determination module is specifically used to determine whether the type of the eigenvalue of each dimension contained in the sample data is a continuous feature; if so, determine the correlation between the eigenvalue of the dimension and the deviation based on the partial derivative result of the eigenvalue of the dimension obtained by the target model for the sample data during the pre-training process.
9. In the device as described in claim 7, the determination module is specifically used to determine whether the type of the characteristic value of each dimension contained in the sample data is a discrete feature; if so, determine the correlation between the characteristic value of the dimension and the deviation based on the differential result of the deviation obtained for the sample data during the pre-training process of the target model under the characteristic value of the dimension.
10. The device according to claim 7, wherein the adjustment module is specifically used to determine, for each dimension of the feature value contained in the sample data, a change step corresponding to the feature value of the dimension according to the correlation corresponding to the feature value of the dimension, as the change step corresponding to the dimension, wherein: If the correlation degree corresponding to the eigenvalue of the dimension is greater, the change step corresponding to the eigenvalue of the dimension is smaller; select at least some dimensions from the dimensions contained in the sample data as target dimensions, and adjust the eigenvalue of each target dimension according to the change step corresponding to each target dimension to obtain supplementary sample data.
11. In the device as described in claim 10, the adjustment module is specifically used to adjust the characteristic value of each target dimension according to the change step corresponding to each target dimension to obtain basic supplementary data; determine the probability that the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data according to the change step corresponding to each target dimension; determine whether the actual result corresponding to the basic supplementary data is changed compared with the actual result corresponding to the sample data according to the probability; if so, re-determine the actual result corresponding to the basic supplementary data as the supplementary actual result, and construct supplementary sample data according to the basic supplementary data and the supplementary actual result; otherwise, construct supplementary sample data according to the basic supplementary data and the actual result corresponding to the sample data.
12. The device according to any one of claims 7 to 11, wherein the sample data comprises: The business data used in the risk control business includes: at least one of: user attribute data, user behavior data, user account status data, and user history data; the target business includes: risk control business.
13. A computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 6 when executing the program.
Citation Information
Patent Citations
Data feature evaluation method, device and apparatus
CN110472802A
Model training method, business risk control method and device
CN116308738A
Model training method and device, storage medium and electronic equipment
CN117592581A
Method, device and computer readable storage medium for model training and data processing
US20220261691A1
Anomaly detection performance enhancement using gradient-based feature importance
US20230043993A1