US 12,277,393 B2
Method of training ranking model, and electronic device
Lixin Zou, Beijing (CN)
Assigned to BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD., Beijing (CN)
Appl. No. 17/915,161
Filed by BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD., Beijing (CN)
PCT Filed Mar. 9, 2022, PCT No. PCT/CN2022/080007
§ 371(c)(1), (2) Date Sep. 28, 2022,
PCT Pub. No. WO2023/010847, PCT Pub. Date Feb. 9, 2023.
Claims priority of application No. 202110893524.8 (CN), filed on Aug. 4, 2021.
Prior Publication US 2024/0211692 A1, Jun. 27, 2024
Int. Cl. G06F 40/284 (2020.01); G06F 40/30 (2020.01); G06N 20/00 (2019.01)
CPC G06F 40/30 (2020.01) [G06F 40/284 (2020.01)] 20 Claims
OG exemplary drawing
 
1. A method of training a ranking model, implemented by one or more processors, the method comprising:
acquiring a plurality of first sample pairs and respective label information for the plurality of first sample pairs, wherein each of the first sample pairs comprises a first search text and a first candidate text corresponding to the first search text, and the label information describes a first relevance score between the first search text and the first candidate text;
for each first sample pair of the plurality of first sample pairs, determining a first target summary corresponding to the first candidate text in the each first sample pair, and inputting the first search text, a first title text of the first candidate text, and the first target summary into an initial language model to obtain a second relevance score corresponding to the each first sample pair; and
updating at least one network parameter of the initial language model according to the first relevance score and the second relevance score corresponding to each first sample pair, the updating comprising:
constructing a first loss function corresponding to each first sample pair according to the first relevance score and the second relevance score corresponding to the each first sample pair,
updating the at least one network parameter of the initial language model according to a first average loss function of first loss functions corresponding to the plurality of first sample pairs until the first average loss function converges, and
determining a language model corresponding to the convergence as the ranking model.