CN111027709B - Information recommendation method and device, server and storage medium - Google Patents

Information recommendation method and device, server and storage medium Download PDF

Info

Publication number
CN111027709B
CN111027709B CN201911206442.0A CN201911206442A CN111027709B CN 111027709 B CN111027709 B CN 111027709B CN 201911206442 A CN201911206442 A CN 201911206442A CN 111027709 B CN111027709 B CN 111027709B
Authority
CN
China
Prior art keywords
parameter
hyper
current iteration
target
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911206442.0A
Other languages
Chinese (zh)
Other versions
CN111027709A (en
Inventor
赵沛霖
黄俊洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911206442.0A priority Critical patent/CN111027709B/en
Publication of CN111027709A publication Critical patent/CN111027709A/en
Application granted granted Critical
Publication of CN111027709B publication Critical patent/CN111027709B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Abstract

The embodiment of the invention discloses an information recommendation method, an information recommendation device, a server and a storage medium. The information recommendation method comprises the following steps: acquiring a hyper-parameter performance data set; iteratively updating the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set; determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration; and recommending information according to the optimal hyper-parameter. The embodiment of the invention can improve the optimization effect and the optimization efficiency of the hyper-parameters and improve the accuracy of information recommendation.

Description

Information recommendation method and device, server and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to an information recommendation method, an information recommendation device, a server and a storage medium.
Background
In the machine learning process, the machine learning model can improve the performance and effect of machine learning by optimizing the hyper-parameters. And the relation function between the hyper-parameters of the model and the model performance data is a black box function, so that the optimization of the hyper-parameters cannot be realized by adopting the traditional numerical optimization algorithm.
In order to solve the problem, methods such as grid search and bayesian optimization are adopted in the prior art. The Bayesian optimization is a sequence optimization strategy designed for global optimization of black box functions without calculating gradients. Since the objective function (black box function) is unknown, bayesian optimization treats it as a random function first and places a prior function on it that expresses a belief about the behavior of the unknown objective function. After collecting the function estimates, which are considered as data, the prior functions are updated to form a posterior distribution over the objective function.
However, in the prior art, a fixed acquisition function is generally used to express the posterior of an objective function, and a fixed acquisition function does not have a good effect on all objective functions, so that in order to find an acquisition function suitable for an objective function, different acquisition functions need to be tried, and each time an acquisition function is tried, due to the complexity of calculation, a large amount of time is required, so that the efficiency of optimizing hyper-parameters of a model is low, the optimization effect is poor, and the accuracy of information recommendation is low.
Disclosure of Invention
The invention provides an information recommendation method, an information recommendation device, a server and a storage medium, which can improve the optimization effect and the optimization efficiency of hyper-parameters and further improve the recommendation accuracy.
In a first aspect, the present invention provides an information recommendation method, including:
acquiring a hyper-parameter performance data set;
iteratively updating the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set;
determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration;
and recommending information according to the optimal hyper-parameter.
In some embodiments of the present invention, the determining the selected parameter in the current iteration specifically includes:
calculating the selection probability of each acquisition function in the acquisition function set in the current iteration;
and determining the selection parameters in the current iteration according to the selection probability of each acquisition function in the current iteration.
In some embodiments of the present invention, the calculating the selection probability of each acquisition function in the acquisition function set in the current iteration specifically includes:
respectively taking each acquisition function in the acquisition function set as a target function, and calculating the accumulated weight of the target function in the current iteration;
and calculating the selection probability of the target function in the current iteration according to the accumulated weight of the target function in the current iteration.
In some embodiments of the present invention, the calculating the cumulative weight of the objective function in the current iteration specifically includes:
acquiring the accumulated performance parameters of the objective function in the current iteration;
and calculating the accumulated weight of the objective function in the current iteration according to the accumulated performance parameter and a preset weight distribution balance parameter.
In some embodiments of the present invention, the calculating, according to the accumulated weight of the objective function in the current iteration, the selection probability of the objective function in the current iteration specifically includes:
calculating the cumulative weight sum of all the collection functions in the collection function set;
and calculating the selection probability of the target function in the current iteration according to the accumulated weight of the target function in the current iteration, the accumulated weight sum, preset weight distribution balance parameters and the number of functions in the acquisition function set.
In some embodiments of the present invention, the obtaining the hyper-parameter in the current iteration by enabling the target acquisition function to reach a preset threshold according to the hyper-parameter performance data set in the current iteration specifically includes:
optimizing a pre-constructed super-parameter performance approximate model according to the super-parameter performance data set in the current iteration;
and enabling the target acquisition function to reach a preset threshold value according to the optimized super-parameter performance approximate model to obtain the super-parameter in the current iteration.
In some embodiments of the invention, the hyperparametric performance approximation model is a gaussian process model;
enabling the target acquisition function to reach a preset threshold value according to the optimized super-parameter performance approximate model to obtain the super-parameter in the current iteration, and specifically comprising the following steps:
randomly generating at least one candidate hyper-parameter within a preset hyper-parameter range;
respectively taking each candidate hyper-parameter in the at least one candidate hyper-parameter as a target candidate hyper-parameter, and predicting the performance Gaussian distribution corresponding to the target candidate hyper-parameter according to the optimized Gaussian process model;
solving the target acquisition function according to the performance Gaussian distribution to obtain a function value corresponding to the target candidate hyperparameter;
after function values corresponding to all the target candidate hyper-parameters are obtained, determining a target function value reaching a preset threshold value from the function values corresponding to all the target candidate hyper-parameters;
and taking the target candidate hyper-parameter corresponding to the objective function value as the hyper-parameter in the current iteration.
In some embodiments of the invention, the method further comprises:
in each iteration process, verifying the hyper-parameter in the current iteration to obtain performance data corresponding to the hyper-parameter;
and updating the hyper-parameter performance data set in the current iteration according to the hyper-parameters and the corresponding performance data, and taking the updated hyper-parameter performance data set as the hyper-parameter performance data set in the next iteration.
In some embodiments of the invention, the method further comprises:
in each iteration process, verifying the hyper-parameter in the current iteration to obtain performance data corresponding to the hyper-parameter;
and updating the accumulated performance parameters of the target acquisition function in the current iteration according to the performance data corresponding to the hyper-parameters, and taking the updated accumulated performance parameters as the accumulated performance parameters of the target acquisition function in the next iteration.
In some embodiments of the present invention, the determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration specifically includes:
and when the iteration times reach the preset times, determining that the iteration is finished, and selecting the hyper-parameter with the optimal performance data from the hyper-parameter set as the optimal hyper-parameter.
In some embodiments of the invention, the method further comprises:
saving the optimal hyper-parameters in a blockchain in the form of blocks.
In a second aspect, the present invention provides an information recommendation apparatus, including:
the acquisition module is used for acquiring a hyper-parameter performance data set;
the iteration module is used for carrying out iteration updating on the hyper-parameter performance data set and determining a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set;
the determining module is used for determining the optimal hyper-parameter from the hyper-parameter set when the iteration is finished; and the number of the first and second groups,
and the recommending module is used for recommending information according to the optimal hyper-parameter.
In some embodiments of the invention, the iteration module is further configured to:
in each iteration process, calculating the selection probability of each acquisition function in the acquisition function set in the current iteration;
and determining the selection parameters in the current iteration according to the selection probability of each acquisition function in the current iteration.
In a third aspect, the present invention provides a server comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a hyper-parameter performance data set;
iteratively updating the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set;
determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration;
and recommending information according to the optimal hyper-parameter.
In a fourth aspect, the present invention provides a storage medium storing a plurality of instructions, the instructions being suitable for being loaded by a processor to perform the steps of the information recommendation method according to any one of the first aspect.
In the embodiment of the invention, in each iteration updating process of the hyper-parameter performance data set, a selected parameter in the current iteration is determined, a target acquisition function is selected from a preset acquisition function set according to the selected parameter, the target acquisition function reaches a preset threshold value according to the hyper-parameter performance data set in the current iteration, the hyper-parameter in the current iteration is obtained, and when the iteration is finished, the optimal hyper-parameter is determined from the obtained hyper-parameters, so that information recommendation is carried out according to the optimal hyper-parameter. According to the embodiment of the invention, the selection parameters are adjusted in each iteration to select the optimal acquisition function in a self-adaptive manner, and different acquisition functions do not need to be calculated and verified, so that the calculation complexity is reduced, the selection time of the optimal acquisition function is shortened, the optimization effect and the optimization efficiency of the hyper-parameters are effectively improved, and the recommendation accuracy is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic view of a scenario of an information recommendation system according to an embodiment of the present invention;
FIG. 2 is an alternative structural diagram of the distributed system applied to the blockchain system according to the embodiment of the present invention;
FIG. 3 is an alternative block structure provided in the embodiments of the present invention;
FIG. 4 is a flowchart illustrating an embodiment of an information recommendation method provided in an embodiment of the present invention;
FIG. 5 is a flowchart illustrating an information recommendation method according to another embodiment of the present invention;
FIG. 6 is a schematic diagram of a hyper-parametric optimization of an object model in an embodiment of the invention;
fig. 7 is a schematic structural diagram of an embodiment of an information recommendation device provided in an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description that follows, specific embodiments of the present invention are described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the invention have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, but on the contrary, it is to be understood that various steps and operations described hereinafter may be implemented in hardware.
The term "module" or "unit" as used herein may be considered a software object executing on the computing system. The various components, modules, engines, and services described herein may be viewed as objects implemented on the computing system. The apparatus and method described herein are preferably implemented in software, but may also be implemented in hardware, and are within the scope of the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
The embodiment of the invention provides an information recommendation method, an information recommendation device, a server and a storage medium.
Artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
Machine Learning (ML) is a multi-domain cross discipline, and relates to a plurality of disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and the like. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Machine learning is the core of artificial intelligence, is the fundamental approach for computers to have intelligence, and is applied to all fields of artificial intelligence. Machine learning and deep learning generally include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and formal education learning.
The scheme provided by the embodiment of the invention can be an information recommendation method related to artificial intelligence, namely, the embodiment of the invention provides an information recommendation method based on artificial intelligence, which comprises the following steps: acquiring a hyper-parameter performance data set; iteratively updating the hyper-parameter performance data set by using a machine learning algorithm to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set; determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration; and recommending information according to the optimal hyper-parameter.
Referring to fig. 1, fig. 1 is a schematic view of a scenario of an information recommendation system according to an embodiment of the present invention, where the information recommendation system may include a server 10, and an information recommendation device is integrated in the server 10. In the embodiment of the invention, the server 10 is mainly used for acquiring a hyper-parameter performance data set; iteratively updating the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set; determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration; and recommending information according to the optimal hyper-parameter.
In this embodiment of the present invention, the server 10 may be an independent server, or may be a server network or a server cluster composed of servers, for example, the server 10 described in this embodiment of the present invention includes, but is not limited to, a computer, a network host, a single network server, a plurality of network server sets, or a cloud server composed of a plurality of servers. Among them, the Cloud server is constituted by a large number of computers or web servers based on Cloud Computing (Cloud Computing).
Those skilled in the art will appreciate that the application environment shown in fig. 1 is only one application scenario related to the present invention, and does not constitute a limitation to the application scenario of the present invention, and that other application environments may further include more or less servers than those shown in fig. 1, or a network connection relationship of servers, for example, only 1 server is shown in fig. 1, and it is understood that the hyper-parameter optimization system of the model may further include one or more other servers, or/and one or more clients connected to a network of servers, and is not limited herein.
In addition, as shown in fig. 1, the information recommendation system may further include a memory 20 for storing data, such as a hyper-parameter performance database, in which historical hyper-parameters of different models and corresponding performance data are stored, the memory 20 may further include an acquisition function database, in which acquisition functions adapted to the different models are stored, and the memory 20 may further include an optimal hyper-parameter database, in which optimal hyper-parameters corresponding to the different models are stored.
It should be noted that the scene schematic diagram of the information recommendation system shown in fig. 1 is only an example, and the information recommendation system and the scene described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention.
The information recommendation system related to the embodiment of the invention may be a distributed system formed by connecting a plurality of nodes (any form of computing devices in an access network, such as the server 10 and the like) in a network communication manner.
Taking a distributed system as an example of a blockchain system, referring To fig. 2, fig. 2 is an optional structural schematic diagram of the distributed system 100 applied To the blockchain system, which is formed by a plurality of nodes 200 (computing devices in any form in an access network, such as servers) and clients 300, and a Peer-To-Peer (P2P, Peer To Peer) network is formed between the nodes, and the P2P Protocol is an application layer Protocol operating on a Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or a terminal, can join to become a node, and the node comprises a hardware layer, a middle layer, an operating system layer and an application layer. In the embodiment of the present invention, the servers 10 are each a node in the blockchain system.
Referring to the functions of each node in the blockchain system shown in fig. 2, the functions involved include:
1) routing, a basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node may also have the following functions:
2) the application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization functions to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain system, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
For example, the services implemented by the application include:
2.1) wallet, for providing the function of transaction of electronic money, including initiating transaction (i.e. sending the transaction record of current transaction to other nodes in the blockchain system, after the other nodes are successfully verified, storing the record data of transaction in the temporary blocks of the blockchain as the response of confirming the transaction is valid; of course, the wallet also supports the querying of the remaining electronic money in the electronic money address;
and 2.2) sharing the account book, wherein the shared account book is used for providing functions of operations such as storage, query and modification of account data, record data of the operations on the account data are sent to other nodes in the block chain system, and after the other nodes verify the validity, the record data are stored in a temporary block as a response for acknowledging that the account data are valid, and confirmation can be sent to the node initiating the operations.
2.3) Intelligent contracts, computerized agreements, which can enforce the terms of a contract, implemented by codes deployed on a shared ledger for execution when certain conditions are met, for completing automated transactions according to actual business requirement codes, such as querying the logistics status of goods purchased by a buyer, transferring the buyer's electronic money to the merchant's address after the buyer signs for the goods; of course, smart contracts are not limited to executing contracts for trading, but may also execute contracts that process received information.
3) And the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain system are recorded in the blocks.
Referring to fig. 3, fig. 3 is an optional schematic diagram of a Block Structure (Block Structure) according to an embodiment of the present invention, where each Block includes a hash value of a transaction record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a Block chain. The block may include information such as a time stamp at the time of block generation. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using cryptography, and each data block contains related information for verifying the validity (anti-counterfeiting) of the information and generating a next block.
When the information recommendation system in the embodiment of the invention is a blockchain system, and the server in the embodiment of the invention is a node in the blockchain system, the optimal hyper-parameter of the target model can be stored in the blockchain. Specifically, in the embodiment of the present invention, the method further includes: saving the optimal hyper-parameters in a blockchain in the form of blocks. For a specific way of adding blocks, reference may be made to the description of the above-mentioned blockchain system, which is not described herein again.
The following is a detailed description of specific embodiments.
In the present embodiment, description will be made from the viewpoint of an information recommendation apparatus, which may be specifically integrated in the server 10.
The invention provides an information recommendation method, which comprises the following steps: acquiring a hyper-parameter performance data set; iteratively updating the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set; determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration; and recommending information according to the optimal hyper-parameter.
Referring to fig. 4, a schematic flow chart of an embodiment of an information recommendation method according to an embodiment of the present invention is shown, where the information recommendation method includes:
401. a hyper-parametric performance dataset is obtained.
In the embodiment of the invention, the hyper-parameter performance data set is a set of hyper-parameters of the target model and target model performance data. The target model is a machine learning model, such as a video recommendation model, a music recommendation model, and the like. The hyper-parameters are parameters set by the target model before the learning process is started, namely the hyper-parameters need to be defined in advance and are not obtained through training, such as the learning rate of a video recommendation model, the coefficients of regular terms in a ridge regression model, the step length of a random gradient descent model and the like. The target model has different learning performance and effect due to different set hyper-parameters, so that the learning performance and effect of the target model can be improved by optimizing the hyper-parameters of the target model.
In order to enable the target model to have the optimal model performance, the optimal hyper-parameter needs to be set for the target model, namely the corresponding hyper-parameter when the target model has the optimal performance is the optimal hyper-parameter of the target model. The hyper-parameter performance data set is a historical data set of the target model and can comprise a plurality of historical hyper-parameters and performance data of the target model corresponding to each historical hyper-parameter. The historical hyper-parameters refer to hyper-parameters which are verified on the target model, and the performance data corresponding to the historical hyper-parameters refer to performance data obtained when the target model verifies the historical hyper-parameters.
According to the embodiment of the invention, the variable value corresponding to the maximum function value, namely the optimal hyper-parameter, can be obtained by constructing the relation function between the hyper-parameter of the target model and the performance data of the target model, solving the maximum function value of the relation function, namely the optimal model performance data. For example, the relation function between the hyper-parameter of the target model and the performance of the target model is f (theta): theta → R, where theta represents the hyper-parameter of the target model, f (theta) represents the performance data of the target model, theta is the feasible range of the hyper-parameter, and R is the range of the performance of the target model, e.g., the range of [0,1] when the performance data of the target model is accuracy.
After the relation function between the hyper-parameters of the target model and the model performance data is constructed, the optimal corresponding to the optimal performance data needs to be searched according to the relation functionHyper-parameter, i.e. argmaxθ∈Θf (theta). However, since the relation function between the hyper-parameter and the performance of the target model is a black box function, it cannot be derived, that is, the optimal performance data cannot be solved by using the conventional numerical optimization algorithm, the embodiment of the present invention finds the optimal performance data by constructing an approximate model of the relation function between the hyper-parameter and the performance data of the target model, that is, a hyper-parameter performance approximate model, through the hyper-parameter performance data set, thereby obtaining the optimal hyper-parameter.
For example, for r historical hyper-parameters, r corresponding performance data may be obtained, i.e. r
Figure BDA0002297037050000111
θkDenotes the kth historical hyper-parameter, f (θ)k) And representing the performance data corresponding to the kth historical hyperparameter.
The hyperparametric performance approximation model may be a Gaussian process model, for example, a Gaussian process model GP constructed from r historical hyperparameters and corresponding performance datarThe following were used:
Figure BDA0002297037050000121
wherein the content of the first and second substances,
Figure BDA0002297037050000122
denotes f (θ)i) A posteriori of the mean value of (a), thetaiIs the ith hyperparameter, θjIs the jth hyperparameter, θ*Is any one of the hyper-parameters, c is a kernel function, e.g.
Figure BDA0002297037050000123
Kij=c(θij) Being the element of the ith row and jth column of the matrix K,
Figure BDA0002297037050000124
k*i=c(θi*),k**=c(θ**),k*iis a vector k*To (1) ai elements, k**Is a vector k*Is determined by the value of (a) in (b),
Figure BDA0002297037050000125
in constructing a Gaussian process model GPrThen, the parameter θ can be set for any one of the hyper-parameters*Predicting the hyper-parameter θ*Corresponding target model performance f (theta)*) Is given by the mean value mu (theta)*) Sum variance σ2*) To express, i.e. Gaussian process model GPrIt can be predicted that:
f(θ*)~N(μ(θ*),σ2*))
Figure BDA0002297037050000126
wherein, mu (theta)*) Is f (theta)*) Mean value of (a)2*) Is f (theta)*) The variance of (c).
402. Iteratively updating the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set.
Because the quantity of historical hyper-parameters and corresponding performance data of the target model is limited, the constructed hyper-parameter performance approximation model has low approximation degree, and a hyper-parameter performance data set needs to be updated iteratively, so that the hyper-parameter performance approximation model is optimized iteratively according to the updated hyper-parameter performance data set, and the hyper-parameter performance approximation model gradually approximates to a relation function between the performance of the hyper-parameter and the performance of the target model.
In each iteration process, an Acquisition Function (Acquisition Function) is adopted to search for optimal performance data corresponding to the hyperparameter performance approximation model in the current iteration so as to obtain the hyperparameter corresponding to the optimal performance data.
Specifically, the obtaining of the hyper-parameter in the current iteration by making the target acquisition function reach a preset threshold according to the hyper-parameter performance data set in the current iteration includes: optimizing a pre-constructed super-parameter performance approximate model according to the super-parameter performance data set in the current iteration; and enabling the target acquisition function to reach a preset threshold value according to the optimized super-parameter performance approximate model to obtain the super-parameter in the current iteration.
And when the target acquisition function reaches a preset threshold value, determining the corresponding optimal performance data of the hyperparametric performance approximate model in the current iteration, acquiring the variable value in the target acquisition function, and taking the variable value as the hyperparameter in the current iteration. And simultaneously using the hyper-parameters in the current iteration as input data of the hyper-parameter performance approximate model in the next iteration optimization.
Different acquisition functions are suitable for different algorithms and scenes, so that a proper acquisition function needs to be selected for the hyper-parametric performance approximation model of the target model. Wherein, the approximate hyper-parametric performance model can be a Gaussian process model GPrThe acquisition function may include the following:
(1)PI(Probability of Improvement)
the calculation formula of PI is:
Figure BDA0002297037050000131
wherein f is+=maxif(θi) I is equal to {1, …, r }, xi is equal to or larger than 0 and is used for encouraging exploration in an hyperparametric performance approximation model, phi is a cumulative distribution function of standard positive-theta distribution, and mu (theta) is f (theta)i) σ (θ) is f (θ)i) Standard deviation of (2).
(2)EI(Expected Improvement)
The calculation formula of EI is as follows:
Figure BDA0002297037050000132
wherein d ═ μ (θ) -f+-ξ,f+=maxif(θi) I is equal to {1, …, r }, xi is more than or equal to 0 and is used for encouraging exploration in an hyperparametric performance approximate model, phi is a probability density function of standard positive-theta distribution, and mu (theta) is f (theta)i) σ (θ) is f (θ)i) Standard deviation of (2).
(3)UCB(Upper Confidence Bound)
The calculation formula of UCB is: UCB (θ) ═ μ (θ) + ξσ (θ).
Wherein xi is more than or equal to 0 and is used for adjusting the degree of exploration and utilization in the hyperparametric performance approximation model, and mu (theta) is f (theta)i) σ (θ) is f (θ)i) Standard deviation of (2).
The collection function may also include other types of functions, such as poi (usability of improvement), etc., as long as the collection function can be applied to the hyper-parametric performance approximation model, and is not specifically limited herein.
The embodiment of the invention integrates the acquisition functions suitable for different algorithms and models to form an acquisition function set. In the multi-iteration process of the hyper-parameter performance approximation model, the selection of the collection function set collection function can be adjusted by continuously adjusting the selection parameters in each iteration, and the optimal collection function of the hyper-parameter performance approximation model suitable for the target model is selected in a self-adaptive mode.
Specifically, in each iteration process, the determining of the selected parameter in the current iteration includes: calculating the selection probability of each acquisition function in the acquisition function set in the current iteration; and determining the selection parameters in the current iteration according to the selection probability of each acquisition function.
In each iteration process, the selection parameter is changed according to the change of the selection probability of each acquisition function in the acquisition function set, wherein the selection probability of the acquisition function refers to the probability of selecting the acquisition function. With the increase of the iteration times, the selection probability of the optimal acquisition function suitable for the super-parameter performance approximate model is gradually increased, the selection probabilities of other acquisition functions are gradually reduced, and the subsequent iteration is gradually biased to the selection of the optimal acquisition function by adjusting the selection parameters.
The selection probability of each acquisition function in the acquisition function set can be obtained by calculating the cumulative weight of the corresponding acquisition function. Specifically, in each iteration process, the calculating the selection probability of each acquisition function in the acquisition function set in the current iteration includes: respectively taking each acquisition function in the acquisition function set as a target function, and calculating the accumulated weight of the target function in the current iteration; and calculating the selection probability of the target function in the current iteration according to the accumulated weight of the target function in the current iteration.
It should be noted that the cumulative weight of each acquisition function in the first iteration is 1, and the cumulative weight of each acquisition function changes as the number of iterations increases. In each iteration process, the cumulative weight of the selected acquisition function in the next iteration is increased, and the cumulative weight of the unselected acquisition function in the next iteration is decreased. After multiple iterations, the cumulative weight of the acquisition function with the higher number of selections is greater than the cumulative weight of the acquisition function with the lower number of selections.
The calculation of the cumulative weight for each acquisition function in the set of acquisition functions may be performed by its cumulative performance parameter. Specifically, in each iteration process, the calculating the cumulative weight of the objective function in the current iteration includes: acquiring the accumulated performance parameters of the objective function in the current iteration; and calculating the accumulated weight of the objective function in the current iteration according to the accumulated performance parameter and a preset weight distribution balance parameter.
It should be noted that, each time the acquisition function is selected, the cumulative performance parameter of the acquisition function is increased, and further, the cumulative weight of the acquisition function in the next iteration is increased. Since the cumulative weight of the acquisition function is also related to the overall cumulative performance parameter of all acquisition functions, the cumulative performance parameters of other unselected acquisition functions are unchanged, but the overall cumulative performance parameters of all acquisition functions increase, resulting in a decrease in the cumulative weight of other unselected acquisition functions in the next iteration.
In addition, the magnitude of the cumulative weight of the acquisition function is also related to a preset weight distribution balance parameter, and the weight distribution balance parameter is used for controlling the uniformity degree of the cumulative weight distribution. In a preferred embodiment, the cumulative weight of each acquisition function in the current iteration, i.e. the flexible maximum (softmax), is calculated according to the cumulative performance parameter of each acquisition function in the current iteration, the overall cumulative performance parameter of all acquisition functions in the current iteration, and the weight assignment balancing parameter. The calculation formula of the cumulative weight of each acquisition function in the current iteration is as follows:
Figure BDA0002297037050000151
wherein, wiCumulative weight, g, for the ith acquisition functioniThe cumulative performance parameter of the ith acquisition function is assigned with the balance parameter by eta which belongs to (0, 1)]N is the number of functions in the collection function set, gjIs initialized to 0.
After the cumulative weight of each acquisition function in the current iteration is calculated, the selection probability of each acquisition function in the current iteration can be calculated according to the cumulative weight. Specifically, the calculating the selection probability of the objective function in the current iteration according to the accumulated weight of the objective function in the current iteration includes: calculating the cumulative weight sum of all the collection functions in the collection function set; and calculating the selection probability of the target function in the current iteration according to the accumulated weight of the target function in the current iteration, the accumulated weight sum, preset weight distribution balance parameters and the number of functions in the acquisition function set.
The selection probability of each acquisition function is also related to the cumulative weight sum of all the acquisition functions in the acquisition function set, and each selected acquisition function increases the cumulative weight of the acquisition function in the next iteration and reduces the cumulative weight of other unselected acquisition functions in the next iteration, so that the selection probability of the selected acquisition function in the next iteration is increased, namely the probability that the selected acquisition function is selected in the next iteration is further increased, and the selection probability of other unselected acquisition functions in the next iteration is reduced, namely the probability that other unselected acquisition functions are selected in the next iteration is further reduced, so that the optimal acquisition function is selected in a self-adaptive manner through multiple iterations.
In a preferred embodiment, the calculation formula of the selection probability of each acquisition function in the current iteration is as follows:
Figure BDA0002297037050000161
wherein p isiThe probability of selection for the ith acquisition function.
In each iteration process, after calculating the selection probability of each acquisition function in the acquisition function set in the current iteration, the selection parameter in the current iteration may be set to the selection probability of each acquisition function in the current iteration, so as to select a target acquisition function from the acquisition function set according to the selection probability of each acquisition function.
For example, the hyperparametric performance approximation model is the Gaussian process model GPrThe collection function set is provided with N collection functions, and the selection probability of the N collection functions in the current iteration is p1,…,pNAccording to the selection probability p1,…,pNSelecting the kth acquisition function alpha from the set of acquisition functionsk(θ,GPr) And carrying out subsequent treatment.
After multiple iterations, the probability of selecting the optimal acquisition function in the acquisition function set suitable for the hyperparametric performance approximation model is the maximum, so that the probability of selecting the optimal acquisition function in each iteration process is the maximum. In addition, probabilities are assigned to all acquisition functions
Figure BDA0002297037050000162
Thereby leading the super-parameter performance approximation model to have the opportunity of exploring other acquisition functions with general accumulative performance expressionAnd (4) counting to avoid the algorithm from falling into local optimization. Compared with the prior art that only one fixed acquisition function is adopted in each iteration, the method and the device can approach the optimal acquisition function and exceed the performance which can be achieved by a single optimal acquisition function.
In each iteration process, one acquisition function is selected to measure the utility of the hyperparameter, and the acquisition function depends on the hyperparameter performance approximation model, so that the selected acquisition function is optimized, the optimal performance data corresponding to the hyperparameter performance approximation model in the current iteration can be obtained, and the hyperparameter in the current iteration is determined. When the approximate hyper-parameter performance model is a Gaussian process model, the selected target acquisition function reaches a preset threshold value by maximizing the selected acquisition function on the feasible domain of the hyper-parameter, so that the hyper-parameter in the current iteration can be determined, and the hyper-parameter in the current iteration is the next hyper-parameter to be evaluated, namely thetar+1=argmaxθα (θ). Since the acquisition function can be derived, a numerical algorithm, such as gradient descent, can be used to optimize the acquisition function.
Specifically, when the super-parameter performance approximation model is a gaussian process model, the obtaining the super-parameter in the current iteration by making the target acquisition function reach a preset threshold according to the optimized super-parameter performance approximation model includes: randomly generating at least one candidate hyper-parameter within a preset hyper-parameter range; respectively taking each candidate hyper-parameter in the at least one candidate hyper-parameter as a target candidate hyper-parameter, and predicting the performance Gaussian distribution corresponding to the target candidate hyper-parameter according to the optimized Gaussian process model; solving the target acquisition function according to the performance Gaussian distribution to obtain a function value corresponding to the target candidate hyperparameter; after function values corresponding to all the target candidate hyper-parameters are obtained, determining a target function value reaching a preset threshold value from the function values corresponding to all the target candidate hyper-parameters; and taking the target candidate hyper-parameter corresponding to the objective function value as the hyper-parameter in the current iteration.
In the embodiment of the invention, the hyper-parameter range is a numerical range of the hyper-parameter defined by a user, a specified number of candidate hyper-parameters are randomly generated in the hyper-parameter range, for example, 1000 candidate hyper-parameters are generated by default, and meanwhile, the randomly generated candidate hyper-parameters are ensured not to include the verified hyper-parameters. The model performance Gaussian distribution corresponding to each candidate hyper-parameter can be represented by the mean value and the variance of the model performance, and the predicted mean value and the predicted variance of the target model performance are substituted into the selected acquisition function aiming at each candidate hyper-parameter to obtain the corresponding function value. And selecting an objective function value reaching a preset threshold value, wherein the objective function value can be the maximum function value in function values corresponding to all candidate hyper-parameters, the objective function value corresponds to the optimal performance data of the Gaussian process model in the current iteration, and the candidate hyper-parameter corresponding to the objective function value is the hyper-parameter in the current iteration.
After the hyper-parameters in the current iteration are obtained, the performance data corresponding to the hyper-parameters can be verified to update the hyper-parameter performance data set, and then the hyper-parameter performance approximation model is optimized. Specifically, the method further comprises: in each iteration process, verifying the hyper-parameter in the current iteration to obtain performance data corresponding to the hyper-parameter; and updating the hyper-parameter performance data set in the current iteration according to the hyper-parameters and the corresponding performance data, and taking the updated hyper-parameter performance data set as the hyper-parameter performance data set in the next iteration.
In the embodiment of the invention, the hyper-parameter in the current iteration is set as the hyper-parameter of the target model, the target model is trained, and the performance data of the trained target model is evaluated, wherein the performance data is the performance data obtained by verifying the hyper-parameter in the current iteration. After verification is completed, the hyper-parameters and the corresponding performance data in the current iteration are added into the hyper-parameter performance data set of the target model, so that the hyper-parameter performance approximation model is optimized, and the optimized hyper-parameter performance approximation model is closer to a relation function between the hyper-parameters of the target model and the target model performance data.
After the hyper-parameter in the current iteration is obtained, the performance data corresponding to the hyper-parameter may be verified to update the cumulative performance parameter of the acquisition function. Specifically, the method further comprises: in each iteration process, verifying the hyper-parameter in the current iteration to obtain performance data corresponding to the hyper-parameter; and updating the accumulated performance parameters of the target acquisition function in the current iteration according to the performance data corresponding to the hyper-parameters, and taking the updated accumulated performance parameters as the accumulated performance parameters of the target acquisition function in the next iteration.
In the embodiment of the invention, the cumulative performance parameters of the selected acquisition functions in the next iteration are increased, and the cumulative performance parameters of the unselected acquisition functions in the next iteration are unchanged. The cumulative performance parameters increased by the acquisition function are related to the performance data corresponding to the hyper-parameters in the current iteration, if the performance data corresponding to the hyper-parameters in the current iteration is excellent, the increase range of the cumulative performance parameters of the acquisition function is large, the increase range of the cumulative weight is large, and the increase range of the selection probability is large; if the performance data corresponding to the hyper-parameter in the current iteration is poor, the increment of the cumulative performance parameter of the acquisition function is small, the increment of the cumulative weight is small, and the increment of the selection probability is small. Therefore, the embodiment of the invention can quickly approach the optimal acquisition function through multiple iterations.
In addition, the increase range of the cumulative performance parameter of the acquisition function is also related to the number of the functions in the acquisition function set and the selection probability of the acquisition function in the current iteration. For example, in the current iteration, the kth acquisition function is selected from the acquisition function set, and the kth acquisition function reaches a preset threshold value according to the hyperparameter performance approximation model to obtain the hyperparameter theta in the current iterationr+1For the over parameter thetar+1Verifying to obtain the hyperparameter thetar+1Corresponding performance data f (theta)r+1) From the performance data f (θ)r+1) Updating the accumulated performance parameters of the kth acquisition function in the current iteration to obtain the accumulated performance parameters of the kth acquisition function in the next iteration, namely:
Figure BDA0002297037050000181
wherein N is the number of functions in the collection function set, pkFor the selection probability, g, of the kth acquisition function in the current iterationkIs the cumulative performance parameter, g ', of the k-th acquisition function in the current iteration'kThe cumulative performance parameter for the kth acquisition function in the next iteration.
403. At the end of the iteration, an optimal hyper-parameter is determined from the hyper-parameter set.
In the embodiment of the invention, an iteration ending condition can be preset, when the iteration ending condition is met, iteration is ended, and the optimal hyper-parameter is selected from the hyper-parameters obtained by each iteration as the final hyper-parameter of the target model. The iteration ending condition may include that the iteration number reaches a preset number, or the iteration time reaches a preset time, and the like.
Specifically, the determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration includes: and when the iteration times reach the preset times, determining that the iteration is finished, and selecting the hyper-parameter with the optimal performance data from the hyper-parameter set as the optimal hyper-parameter.
It should be noted that when a hyper-parameter is obtained in each iteration, the hyper-parameter is verified, performance data corresponding to the hyper-parameter can be obtained, the performance data corresponding to all the hyper-parameters in the hyper-parameter set are compared, and optimal performance data is obtained, wherein the hyper-parameter corresponding to the optimal performance data is the optimal hyper-parameter of the target model.
404. And recommending information according to the optimal hyper-parameter.
In the embodiment of the invention, the optimal hyper-parameter is set in the target model to realize information recommendation, for example, the target model is a video recommendation model, the hyper-parameter of the video recommendation model is a learning rate, the optimal learning rate is set in the video recommendation model, the video recommendation model is trained, and after the video recommendation model is trained, the trained video recommendation model is adopted to recommend video information to a user.
To sum up, in each iteration updating process of the hyper-parameter performance data set, the embodiment of the invention determines the selection parameter in the current iteration, selects a target acquisition function from the preset acquisition function set according to the selection parameter, and makes the target acquisition function reach the preset threshold value according to the hyper-parameter performance data set in the current iteration to obtain the hyper-parameter in the current iteration, so that when the iteration is finished, the optimal hyper-parameter is determined from the obtained hyper-parameter, and information recommendation is performed according to the optimal hyper-parameter. According to the embodiment of the invention, the selection parameters are adjusted in each iteration to select the optimal acquisition function in a self-adaptive manner, and different acquisition functions do not need to be calculated and verified, so that the calculation complexity is reduced, the selection time of the optimal acquisition function is shortened, the optimization effect and the optimization efficiency of the hyper-parameters are effectively improved, and the recommendation accuracy is improved.
The information recommendation method in the embodiment of the present invention is described below with reference to a specific application scenario.
Referring to fig. 5, a schematic flow chart of another embodiment of an information recommendation method according to an embodiment of the present invention is shown, where the information recommendation method is applied to a server, and the information recommendation method includes:
501. and acquiring a hyper-parametric performance data set of the target model.
The original hyper-parametric performance data set comprises r samples, each sample comprising a hyper-parameter θ of the object modelnAnd corresponding performance data f (theta)n) That is, the original hyper-parametric performance data set may be represented as
Figure BDA0002297037050000201
The super-parameter performance data set is collected and maintained and can be used as data for super-parameter optimization modeling.
For example, the target model is a music recommendation model, the hyper-parameter is a learning rate of the music recommendation model, the learning rate is set in the music recommendation model before the music recommendation model is trained, and the performance data is a recommendation rate of the music recommendation model.
502. And constructing a Gaussian process model according to the hyper-parameter performance data set.
And modeling P (f (theta) | theta) by adopting a Gaussian process to construct a Gaussian process model, wherein theta is a hyper-parameter of the target model, and f (theta) is the model performance. The gaussian process model is a method of inert learning that uses a measure of homogeneity between points as a kernel function to predict values of unknown points from input training data. The prediction result of the gaussian process model contains not only the value of the point but also uncertainty-the one-dimensional gaussian distribution of the point (i.e., the marginal distribution of the point). In the gaussian process, each point in the continuous input space is associated with a normally distributed random variable. In addition, each finite set of these random variables has a multivariate normal distribution. As shown in FIG. 6, a Gaussian process model 601 is constructed from the hyper-parametric performance data set.
503. And randomly generating a plurality of candidate hyper-parameters within the hyper-parameter range.
As shown in FIG. 6, a plurality of candidate hyper-parameters, e.g., 1000 candidate hyper-parameters { θ } are randomly generated within a user-defined hyper-parameter range using a candidate hyper-parameter generator 602iI |, 1, …,1000}, and the 1000 candidate superparameters are not repeated with superparameters in the superparameter performance dataset.
504. And predicting the performance Gaussian distribution corresponding to each candidate hyper-parameter according to the Gaussian process model.
As shown in fig. 6, each candidate hyper-parameter generated by the candidate hyper-parameter generator 602 is input to the gaussian process model 601 in turn, and the performance gaussian distribution of the target model 604 is estimated, wherein the performance gaussian distribution is expressed by a mean and a variance. The gaussian distribution of performance is passed to the collection function set 603 as the basis for selecting the final hyper-parameters.
505. And selecting a target acquisition function from the acquisition function set according to the selection probability of each acquisition function in the acquisition function set.
As shown in fig. 6, the collection function set 603 includes N collection functions, i.e., collection function 1, collection functions 2, …, and collection function N, where the N collection functions are generally the mainstream collection functions in the prior art, such as EI, ES (entry Search), lcb (lower Confidence bound), and so on. The N acquisition functions have different selection probabilities, the acquisition function with the high selection probability is more likely to be selected, and the acquisition function with the low selection probability is less likely to be selected. The selection probability of each acquisition function is related to the cumulative weight thereof, and after the super parameters are recommended and verified in the subsequent acquisition functions, the weight of each acquisition function can be updated, so that the selection probability of each acquisition function is updated.
506. And acquiring the hyperparameters recommended by the target acquisition function according to the performance Gaussian distribution corresponding to each candidate hyperparameter.
For example, the performance gaussian distribution, i.e., the mean and the variance, corresponding to each candidate hyper-parameter is respectively substituted into the selected collection function, the function values of the collection function are obtained through calculation, all the obtained function values are compared, and the candidate hyper-parameter corresponding to the maximum function value is used as the hyper-parameter recommended by the collection function. As shown in fig. 6, after selecting an acquisition function (e.g., acquisition function 2) from the acquisition function set 603, the acquisition function 2 is maximized according to the gaussian distribution of performance corresponding to each candidate hyper-parameter, so as to obtain the corresponding hyper-parameter.
It should be noted that, in the initial stage, the selection probability of each acquisition function in the acquisition function set is relatively average, the hyper-parameters recommended by each acquisition function can be respectively obtained, and one hyper-parameter is randomly selected from the obtained hyper-parameters for subsequent verification. And when the selection probabilities among the collection functions in the collection function set are different, selecting the collection functions according to the selection probabilities, and acquiring the hyper-parameters recommended by the collection functions for subsequent verification.
507. And verifying the hyper-parameters to obtain performance data corresponding to the hyper-parameters, and adding the performance data into the hyper-parameter performance data set.
As shown in fig. 6, the hyper-parameters recommended by the collection function are set in the target model 604, the target model 604 is trained to verify the performance data corresponding to the hyper-parameters, and the hyper-parameters and the corresponding performance data may also be added to the hyper-parameter performance data set to optimize the gaussian process model 601.
For example, the learning rate recommended by the collection function is set into the music recommendation model, the music recommendation model is trained, the recommendation rate of the music recommendation model is evaluated, and meanwhile, the learning rate recommended by the collection function and the evaluated recommendation rate are added into the hyper-parameter performance data set of the music recommendation model.
508. And judging whether the performance data corresponding to the hyper-parameter meets a preset condition, if so, executing a step 509, and if not, returning to the step 501.
If the performance data corresponding to the hyper-parameter meets the preset condition, the performance data corresponding to the hyper-parameter is the optimal performance data, the hyper-parameter is the optimal hyper-parameter of the target model, and other hyper-parameters do not need to be searched; if the performance data corresponding to the hyper-parameter does not meet the preset condition, it is indicated that the performance data corresponding to the hyper-parameter is not the optimal performance data, and the hyper-parameter is not the optimal hyper-parameter of the target model, and the method also needs to return to step 501 to optimize the Gaussian process model and continue to search for the optimal hyper-parameter of the target model.
509. And taking the hyper-parameter as the optimal hyper-parameter of the target model.
For example, when the recommendation rate of the music recommendation model is verified to meet the preset condition, the learning rate corresponding to the recommendation rate is used as the optimal learning rate of the music recommendation model.
510. And recommending information according to the optimal hyper-parameter.
For example, the optimal learning rate is set in a music recommendation model, and the music recommendation model is trained to recommend music to the user according to the trained music recommendation model.
According to the embodiment, the learning rate of the music recommendation model is optimized, the optimization effect and the optimization efficiency of the learning rate are improved, so that the accuracy of the recommendation rate of the music recommendation model is improved, the accuracy of music recommendation is improved, the satisfaction degree of a user on a product is improved, and the overall competitiveness of the product is further improved.
In order to better implement the information recommendation method provided by the embodiment of the invention, the embodiment of the invention also provides a device based on the information recommendation method. The meanings of the nouns are the same as those in the information recommendation method, and specific implementation details can refer to the description in the method embodiment.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an information recommendation device according to an embodiment of the present invention, where the information recommendation device may include:
an obtaining module 701, configured to obtain a hyper-parameter performance data set;
an iteration module 702, configured to iteratively update the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set;
a determining module 703, configured to determine an optimal hyper-parameter from the hyper-parameter set when the iteration is finished; and the number of the first and second groups,
and a recommending module 704, configured to recommend information according to the optimal hyper-parameter.
In some embodiments of the present invention, the iteration module 702 is further configured to:
calculating the selection probability of each acquisition function in the acquisition function set in the current iteration;
and determining the selection parameters in the current iteration according to the selection probability of each acquisition function.
In some embodiments of the present invention, the iteration module 702 is further configured to:
respectively taking each acquisition function in the acquisition function set as a target function, and calculating the accumulated weight of the target function in the current iteration;
and calculating the selection probability of the target function in the current iteration according to the accumulated weight of the target function in the current iteration.
In some embodiments of the present invention, the iteration module 702 is further configured to:
acquiring the accumulated performance parameters of the objective function in the current iteration;
and calculating the accumulated weight of the objective function in the current iteration according to the accumulated performance parameter and a preset weight distribution balance parameter.
In some embodiments of the present invention, the iteration module 702 is further configured to:
calculating the cumulative weight sum of all the collection functions in the collection function set;
and calculating the selection probability of the target function in the current iteration according to the accumulated weight of the target function in the current iteration, the accumulated weight sum, preset weight distribution balance parameters and the number of functions in the acquisition function set.
In some embodiments of the present invention, the iteration module 702 is further configured to:
optimizing a pre-constructed super-parameter performance approximate model according to the super-parameter performance data set in the current iteration;
and enabling the target acquisition function to reach a preset threshold value according to the optimized super-parameter performance approximate model to obtain the super-parameter in the current iteration.
In some embodiments of the invention, the hyperparametric performance approximation model is a gaussian process model; the iteration module 702 is further configured to:
randomly generating at least one candidate hyper-parameter within a preset hyper-parameter range;
respectively taking each candidate hyper-parameter in the at least one candidate hyper-parameter as a target candidate hyper-parameter, and predicting the performance Gaussian distribution corresponding to the target candidate hyper-parameter according to the optimized Gaussian process model;
solving the target acquisition function according to the performance Gaussian distribution to obtain a function value corresponding to the target candidate hyperparameter;
after function values corresponding to all the target candidate hyper-parameters are obtained, determining a target function value reaching a preset threshold value from the function values corresponding to all the target candidate hyper-parameters;
and taking the target candidate hyper-parameter corresponding to the objective function value as the hyper-parameter in the current iteration.
In some embodiments of the present invention, the apparatus further comprises a first update module, the first update configured to:
in each iteration process, verifying the hyper-parameter in the current iteration to obtain performance data corresponding to the hyper-parameter;
and updating the hyper-parameter performance data set in the current iteration according to the hyper-parameters and the corresponding performance data, and taking the updated hyper-parameter performance data set as the hyper-parameter performance data set in the next iteration.
In some embodiments of the present invention, the apparatus further comprises a second updating module, the second updating module is configured to:
in each iteration process, verifying the hyper-parameter in the current iteration to obtain performance data corresponding to the hyper-parameter;
and updating the accumulated performance parameters of the target acquisition function in the current iteration according to the performance data corresponding to the hyper-parameters, and taking the updated accumulated performance parameters as the accumulated performance parameters of the target acquisition function in the next iteration.
In some embodiments of the present invention, the determining module 703 is specifically configured to:
and when the iteration times reach the preset times, determining that the iteration is finished, and selecting the hyper-parameter with the optimal performance data from the hyper-parameter set as the optimal hyper-parameter.
In some embodiments of the present invention, the apparatus further comprises a storage module configured to:
saving the optimal hyper-parameters in a blockchain in the form of blocks.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
In the embodiment of the invention, in each iteration updating process of the hyper-parameter performance data set, a selected parameter in the current iteration is determined, a target acquisition function is selected from a preset acquisition function set according to the selected parameter, the target acquisition function reaches a preset threshold value according to the hyper-parameter performance data set in the current iteration, the hyper-parameter in the current iteration is obtained, and when the iteration is finished, the optimal hyper-parameter is determined from the obtained hyper-parameters, so that information recommendation is carried out according to the optimal hyper-parameter. According to the embodiment of the invention, the selection parameters are adjusted in each iteration to select the optimal acquisition function in a self-adaptive manner, and different acquisition functions do not need to be calculated and verified, so that the calculation complexity is reduced, the selection time of the optimal acquisition function is shortened, the optimization effect and the optimization efficiency of the hyper-parameters are effectively improved, and the recommendation accuracy is improved.
An embodiment of the present invention further provides a server, as shown in fig. 8, which shows a schematic structural diagram of the server according to the embodiment of the present invention, specifically:
the server may include components such as a processor 801 of one or more processing cores, memory 802 of one or more computer-readable storage media, a power supply 803, and an input unit 804. Those skilled in the art will appreciate that the server architecture shown in FIG. 8 is not meant to be limiting, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Wherein:
the processor 801 is a control center of the server, connects various parts of the entire server using various interfaces and lines, and performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 802 and calling data stored in the memory 802, thereby performing overall monitoring of the server. Alternatively, processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor, which mainly handles operations of storage media, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 801.
The memory 802 may be used to store software programs and modules, and the processor 801 executes various functional applications and data processing by operating the software programs and modules stored in the memory 802. The memory 802 may mainly include a storage program area and a storage data area, wherein the storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for operating a storage medium, at least one function, and the like; the storage data area may store data created according to the use of the server, and the like. Further, the memory 802 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 access to the memory 802.
The server further comprises a power supply 803 for supplying power to each component, and preferably, the power supply 803 can be logically connected with the processor 801 through a power management storage medium, so that functions of charging, discharging, power consumption management and the like can be managed through the power management storage medium. The power supply 803 may also include any component of one or more dc or ac power sources, rechargeable storage media, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The server may further include an input unit 804, and the input unit 804 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the server may further include a display unit and the like, which will not be described in detail herein. Specifically, in this embodiment, the processor 801 in the server loads the executable file corresponding to the process of one or more application programs into the memory 802 according to the following instructions, and the processor 801 runs the application programs stored in the memory 802, thereby implementing various functions as follows:
acquiring a hyper-parameter performance data set;
iteratively updating the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set;
determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration;
and recommending information according to the optimal hyper-parameter.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present invention provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the information recommendation methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
acquiring a hyper-parameter performance data set;
iteratively updating the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set;
determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration;
and recommending information according to the optimal hyper-parameter.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any information recommendation method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any information recommendation method provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The information recommendation method, apparatus, server and storage medium provided by the embodiments of the present invention are described in detail above, and the principles and embodiments of the present invention are explained herein by applying specific examples, and the descriptions of the above embodiments are only used to help understanding the method and the core ideas of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. An information recommendation method, comprising:
acquiring a hyper-parameter performance data set;
iteratively updating the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set, wherein the determination of the selection parameter in the current iteration comprises the following steps: respectively taking each acquisition function in the acquisition function set as a target function, calculating the cumulative weight of the target function in the current iteration, calculating the selection probability of the target function in the current iteration according to the cumulative weight of the target function in the current iteration, and determining the selection parameters in the current iteration according to the selection probability of each acquisition function in the current iteration;
determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration;
and setting the optimal hyper-parameter as an optimal learning rate in a target model, and training the target model to recommend information according to the trained target model.
2. The information recommendation method according to claim 1, wherein the calculating the cumulative weight of the objective function in the current iteration specifically comprises:
acquiring the accumulated performance parameters of the objective function in the current iteration;
and calculating the accumulated weight of the objective function in the current iteration according to the accumulated performance parameter and a preset weight distribution balance parameter.
3. The information recommendation method according to claim 1, wherein the calculating the selection probability of the objective function in the current iteration according to the cumulative weight of the objective function in the current iteration specifically comprises:
calculating the cumulative weight sum of all the collection functions in the collection function set;
and calculating the selection probability of the target function in the current iteration according to the accumulated weight of the target function in the current iteration, the accumulated weight sum, preset weight distribution balance parameters and the number of functions in the acquisition function set.
4. The information recommendation method according to claim 1, wherein the obtaining of the hyper-parameter in the current iteration by making the target acquisition function reach a preset threshold according to the hyper-parameter performance data set in the current iteration specifically comprises:
optimizing a pre-constructed super-parameter performance approximate model according to the super-parameter performance data set in the current iteration;
and enabling the target acquisition function to reach a preset threshold value according to the optimized super-parameter performance approximate model to obtain the super-parameter in the current iteration.
5. The information recommendation method according to claim 4, wherein the hyperparametric performance approximation model is a Gaussian process model;
enabling the target acquisition function to reach a preset threshold value according to the optimized super-parameter performance approximate model to obtain the super-parameter in the current iteration, and specifically comprising the following steps:
randomly generating at least one candidate hyper-parameter within a preset hyper-parameter range;
respectively taking each candidate hyper-parameter in the at least one candidate hyper-parameter as a target candidate hyper-parameter, and predicting the performance Gaussian distribution corresponding to the target candidate hyper-parameter according to the optimized Gaussian process model;
solving the target acquisition function according to the performance Gaussian distribution to obtain a function value corresponding to the target candidate hyperparameter;
after function values corresponding to all the target candidate hyper-parameters are obtained, determining a target function value reaching a preset threshold value from the function values corresponding to all the target candidate hyper-parameters;
and taking the target candidate hyper-parameter corresponding to the objective function value as the hyper-parameter in the current iteration.
6. The information recommendation method of claim 1, further comprising:
in each iteration process, verifying the hyper-parameter in the current iteration to obtain performance data corresponding to the hyper-parameter;
and updating the hyper-parameter performance data set in the current iteration according to the hyper-parameters and the corresponding performance data, and taking the updated hyper-parameter performance data set as the hyper-parameter performance data set in the next iteration.
7. The information recommendation method of claim 2, further comprising:
in each iteration process, verifying the hyper-parameter in the current iteration to obtain performance data corresponding to the hyper-parameter;
and updating the accumulated performance parameters of the target acquisition function in the current iteration according to the performance data corresponding to the hyper-parameters, and taking the updated accumulated performance parameters as the accumulated performance parameters of the target acquisition function in the next iteration.
8. The information recommendation method according to claim 6, wherein the determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration specifically comprises:
and when the iteration times reach the preset times, determining that the iteration is finished, and selecting the hyper-parameter with the optimal performance data from the hyper-parameter set as the optimal hyper-parameter.
9. The information recommendation method of claim 1, further comprising:
saving the optimal hyper-parameters in a blockchain in the form of blocks.
10. An information recommendation apparatus, comprising:
the acquisition module is used for acquiring a hyper-parameter performance data set;
the iteration module is used for carrying out iteration updating on the hyper-parameter performance data set and determining a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set, wherein the determination of the selection parameter in the current iteration comprises the following steps: respectively taking each acquisition function in the acquisition function set as a target function, calculating the cumulative weight of the target function in the current iteration, calculating the selection probability of the target function in the current iteration according to the cumulative weight of the target function in the current iteration, and determining the selection parameters in the current iteration according to the selection probability of each acquisition function in the current iteration; and the number of the first and second groups,
the determining module is used for determining the optimal hyper-parameter from the hyper-parameter set when the iteration is finished; and the number of the first and second groups,
and the recommendation module is used for setting the optimal hyper-parameter as the optimal learning rate in a target model, training the target model and recommending information according to the trained target model.
11. A server comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a hyper-parameter performance data set;
iteratively updating the hyper-parameter performance data set to determine a hyper-parameter set; in each iteration process, determining a selection parameter in the current iteration, selecting a target acquisition function from a preset acquisition function set according to the selection parameter, enabling the target acquisition function to reach a preset threshold value according to a hyper-parameter performance data set in the current iteration, obtaining a hyper-parameter in the current iteration, and adding the hyper-parameter into the hyper-parameter set, wherein the determination of the selection parameter in the current iteration comprises the following steps: respectively taking each acquisition function in the acquisition function set as a target function, calculating the cumulative weight of the target function in the current iteration, calculating the selection probability of the target function in the current iteration according to the cumulative weight of the target function in the current iteration, and determining the selection parameters in the current iteration according to the selection probability of each acquisition function in the current iteration;
determining an optimal hyper-parameter from the hyper-parameter set at the end of the iteration;
and setting the optimal hyper-parameter as an optimal learning rate in a target model, and training the target model to recommend information according to the trained target model.
12. A storage medium storing a plurality of instructions, the instructions being adapted to be loaded by a processor to perform the steps of the information recommendation method according to any one of claims 1 to 9.
CN201911206442.0A 2019-11-29 2019-11-29 Information recommendation method and device, server and storage medium Active CN111027709B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911206442.0A CN111027709B (en) 2019-11-29 2019-11-29 Information recommendation method and device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911206442.0A CN111027709B (en) 2019-11-29 2019-11-29 Information recommendation method and device, server and storage medium

Publications (2)

Publication Number Publication Date
CN111027709A CN111027709A (en) 2020-04-17
CN111027709B true CN111027709B (en) 2021-02-12

Family

ID=70207682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911206442.0A Active CN111027709B (en) 2019-11-29 2019-11-29 Information recommendation method and device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111027709B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562837B (en) * 2020-05-02 2023-05-05 桂林理工大学 Power consumption control method of multi-CPU/GPU heterogeneous server

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9864953B2 (en) * 2013-05-30 2018-01-09 President And Fellows Of Harvard College Systems and methods for Bayesian optimization using integrated acquisition functions
CN109063266B (en) * 2018-07-05 2023-05-05 西安电子科技大学 Skin antenna electromechanical collaborative design method based on parallel Bayesian optimization
CN109902222B (en) * 2018-11-30 2022-05-13 华为技术有限公司 Recommendation method and device
CN109657805B (en) * 2018-12-07 2021-04-23 泰康保险集团股份有限公司 Hyper-parameter determination method, device, electronic equipment and computer readable medium
CN109376869A (en) * 2018-12-25 2019-02-22 中国科学院软件研究所 A kind of super ginseng optimization system of machine learning based on asynchronous Bayes optimization and method
CN109857804B (en) * 2018-12-26 2021-05-18 同盾控股有限公司 Distributed model parameter searching method and device and electronic equipment
CN109740757A (en) * 2019-01-25 2019-05-10 电子科技大学 A kind of Bayes's optimization method based on sequential Monte Carlo method
CN110413494B (en) * 2019-06-19 2022-05-13 浙江工业大学 LightGBM fault diagnosis method for improving Bayesian optimization
CN110443364A (en) * 2019-06-21 2019-11-12 深圳大学 A kind of deep neural network multitask hyperparameter optimization method and device
CN110472545B (en) * 2019-08-06 2022-09-23 中北大学 Aerial photography power component image classification method based on knowledge transfer learning

Also Published As

Publication number Publication date
CN111027709A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
Dhote et al. Hybrid geometric sampling and AdaBoost based deep learning approach for data imbalance in E-commerce
Nseef et al. An adaptive multi-population artificial bee colony algorithm for dynamic optimisation problems
Lee et al. A multiagent approach to $ q $-learning for daily stock trading
Mavrovouniotis et al. A memetic ant colony optimization algorithm for the dynamic travelling salesman problem
Sivagaminathan et al. A hybrid approach for feature subset selection using neural networks and ant colony optimization
Helbig et al. Population-based metaheuristics for continuous boundary-constrained dynamic multi-objective optimisation problems
US20200311556A1 (en) Process and System Including an Optimization Engine With Evolutionary Surrogate-Assisted Prescriptions
JP7287397B2 (en) Information processing method, information processing apparatus, and information processing program
Peng et al. Lifelong property price prediction: A case study for the toronto real estate market
CN111612528A (en) Method, device and equipment for determining user classification model and storage medium
CN111445020A (en) Graph-based convolutional network training method, device and system
Barlow et al. Multiobjective memetic algorithm applied to the optimisation of water distribution systems
CN111967971A (en) Bank client data processing method and device
CN111967271A (en) Analysis result generation method, device, equipment and readable storage medium
CN112990958A (en) Data processing method, data processing device, storage medium and computer equipment
Jafar et al. High-speed hyperparameter optimization for deep ResNet models in image recognition
Chen et al. Cloud–edge collaboration task scheduling in cloud manufacturing: An attention-based deep reinforcement learning approach
Banati et al. Memetic collaborative filtering based recommender system
CN111027709B (en) Information recommendation method and device, server and storage medium
Baker et al. Machine learning: factorization machines and normalized discounted cumulative gain for tourism recommender system optimisation
Sadeghiram et al. Multi-objective distributed Web service composition—A link-dominance driven evolutionary approach
CN115345303A (en) Convolutional neural network weight tuning method, device, storage medium and electronic equipment
CN112052386A (en) Information recommendation method and device and storage medium
CN110727705A (en) Information recommendation method and device, electronic equipment and computer-readable storage medium
Mahmudy et al. Genetic algorithmised neuro fuzzy system for forecasting the online journal visitors

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40021025

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant