Retrieving, sorting and feedback: why candidates disappear and why clicks are biased
Synthetic examples of binary scores, candidate overlays and location deviations are used to recall, sort, indicator and log selection mechanisms.
Learning objectives and first steps4 objectives 2 first repairs
Try to do it after reading
- Distinguishing recall coverage, sorting quality from system benefits
- Hand-counted vector fractions, Recall and NDCG
- Explains the meaning of the unexposed samples and location deviations
- Keep action probability and version information for offline assessment
Suggested first
- Vector Count & Probability
- Classification of indicators and validation of training
How many choices do you have behind a final sorting score
After the user has submitted the query, the system is not usually able to give the full volume of goods on a case-by-case basis to an expensive model rating. The search first selects the candidates from the large library, sorts them and utilizes more profiles, and may end up with stocks, rules, diversity and display constraints. Readers see results that are the result of multiple choices; Clicking on the log also describes only the results shown. To understand the search-and-advocacy model, it is important to observe simultaneously how candidates are generated, filtered and seen by users.
This chapter requires indicators of build-up, probability of conditions and sequencing. The goal is to calculate the coverage and quality of a small pool of candidates, and to use synthetic location deviations to indicate that a click is not a natural neutral label. The example does not contain real goods or user behaviour, and the program does only fixed array algorithms, does not run vector databases, TensorFlow training or on-line experiments.
The double tower scores guarantee a quick comparison in the big vault
Double towers get q with query or user encoder, v with candidate encoder, forming scores by point or other searchable measure. Candidate vectors can be calculated in advance and near-neighbour indexes can be established, only coded on the line to request applications, and the candidate can be checked. This relies on training and indexing using consistent vector versions, reclassification, distance measurement and filtering rules; It does not guarantee that all complex interactions can be expressed in a single volume.
YouTube Recommended Paper A case of first-hand industry where candidates are generated and sorted;TensorFlow Recommenders Retrieval Tutor The corresponding model and evaluation interface were shown. This paper uses this concept of organization without reproducing the benefit of the paper or implementing the curriculum framework.
Can not get folder: %s: %s
Sets q = (10,000), with four candidate vectors: A = (0.9,0.1), B = (0.8,0.9), C = (0.2,1), D = (0.01.02), and points points are 0.9, 0.8, 0.2, −0.1. Assuming that the complete synthetic relevance label is A irrelevant, B relevant, C relevant, D irrelevant. The first two candidates were selected and only A, B, with one of the two entries covered and Recall @0.5.
Even if the sorting model knows the true label, it can only rank B in front of A and cannot retrieve C, which does not exist in the candidate pool. If the candidate is expanded to the first three, the sorting has the opportunity to top B and C. One of the aims of multiple recall is to cover the coverage of different relevant mechanisms, but a larger number of candidates would also increase the computation and noise, which would need to be compared under fixed delays and resource budgets, rather than just the number of candidates.
Use NDCG to include rankings in the evaluation
Using binary correlation, DCG @k divided by log 2 (position + 1) and NDCG is normalized with the ideal sort of DCG. B 、 A It's... DCG @2 for 1 ideal B 、 C It's... DCG For 1+1/ log 23, so... NDCG About 0.613147. B and C were 1 when toped. If hierarchical correlation is used, the common gain is also written into two related degrees less one, and it is necessary to state which definition is used.
It is equally important that the denominator items are from which whole set. The missing C will disappear from the rating denominator and the indicator looks better if only "all relevant items" are defined within the current recall collection. When a true task is not able to obtain all labels from the full library, the tagging pool and sampling mechanism should be described, and not the full recall rate can be claimed. The assessment would also be carried out on request or in conjunction with users to avoid a disproportionate dominance of the results by the popularly requested multiple candidates.
Click on the tab to include exposure and location mechanisms
The probability of position one being viewed is 0.9 and position two is 0.3; Candidates for A and B are shown with a probability of 0.2 and 0.3, respectively. If A is in position one, B is in position two, observing CTR is 0.18 and 0.09, direct clicks will be mistaken for A. The click model here assumes that the click needs to be viewed first and that the view mechanism has a clear decomposition after the given relevance.
Original paper by Joachims et al Studying how to use pro-weighted treatment of biased feedback. Based on the known probability of viewing, 18 hits per 100 display in this case divided by 0.9 were 20, 9 by 0.3 were 30, and the number of exhibits was replaced by 0.2 and 0.3. This is an example of a mechanism that does not guarantee that random hits on logs can be corrected by a line division. Multiple hits, cascades, competition displays and undetected intentions may not satisfy simple models.
No exposure, no click, does not amount to irrelevant; It is also possible that no click after exposure is seen. Negative samples are taken from the whole library, from batch or from historical exposure, and the different denominators for training softmax change the target. Revisions to sampling probabilities also rely on clear sampling options and cannot be filled in with a `non-selective' weight when the sampling log is incomplete.
Actually implemented standard Python case
The following Python 3 program has been implemented by CPU, without third party dependency and without randomity.
import mathq=(1.,0.)items={'A':(.9,.1),'B':(.8,.9),'C':(.2,1.),'D':(-.1,.2)}relevant={'B','C'}scores={k:sum(a*b for a,b in zip(q,v)) for k,v in items.items()}retrieved=sorted(items,key=scores.get,reverse=True)
def ndcg(order,k=2): dcg=sum((name in relevant)/math.log2(j+2) for j,name in enumerate(order[:k])) ideal=sum(1/math.log2(j+2) for j in range(min(k,len(relevant)))) return dcg/ideal
recall=len(set(retrieved[:2]) & relevant)/len(relevant)print(retrieved,recall,round(ndcg(['B','A']),6))assert math.isclose(recall,.5)assert math.isclose(ndcg(['B','A']),.6131471927654584)assert math.isclose(ndcg(['B','C']),1)for clicks,views,propensity in [(18,100,.9),(9,100,.3)]: print(clicks/views,clicks/propensity/views)# [A,B,C,D] 0.5 0.613147;CTR .18/.09,调整后 .20/.30What needs to be left in the log
At least record the time requested, the time available, the candidate source, the search and sorting model version, the index version, the reasons for the filtering, the location of the display and the feedback mature window. In the case of random exploration, the probability of actual selection and the pool of then optional actions should also be preserved, and the probability of a real log policy cannot be replaced by a fraction of another model after the fact. Otherwise, the new strategy lacks coverage in the old logbook and the offline counterfactual evaluation is difficult to be credible.
Online comparisons also need to control delays, candidate freshness and index updating to avoid models becoming better but vectors remain old versions. CTR, stay, deal and user experience may be inconsistent; Maximizing short-term clicks as a complete goal changes the data-collection process, and feedback cycles further affect the heat and cold start-up. Offline quality, system stability and online experiments should be reported separately, rather than re-calling Recall to increase direct reporting of business returns.
Self-measure and answer
When only A and B are recalled, can the strongest sorting model allow this case NDCG to reach one?
Not if the denominator is defined as B, C, if it is still defined as a complete collection; C is not on the list, sorting cannot restore it.
Why can't the Recall denominators shrink with the current recall?
That would remove the omission and change the evaluation issue. A fixed pool or a sample set must be maintained.
This example of B observations of CTR is lower and does it make any difference?
Can't. B is viewed with only 0.3 probabilities, and it is known that the condition hits are higher than A.
Can undisclosed candidates be identified as negative?
It cannot be considered irrelevant. Sample targets can be used to define clearly, but assumptions and sampling distributions need to be explained.
The probability of propensity is very high. What are the risks of counter-probability weighting?
(a) The weight of the single sample is high and the range and sensitivity are increased; Cropping also introduces a compromise that requires reporting of coverage, thresholds and effective sample amounts.
What happens when you train the new Twin Towers and you use the old candidate index?
Query may not be consistent with candidate vector space, and the number of offline fractions and on-line retrievals cannot be compared; Versions need to be tied, reconstructed or explicitly compatible.
Next Causal recognition Understanding feedback options or returning to Vector with Jacobian Check points and downgrading.
Sources and reconciliations
Definitions, methods and interfaces are available.
- Covington et al. — Deep Neural Networks for YouTube Recommendations
- TensorFlow Recommenders — Recommending movies retrieval
- Joachims et al. — Unbiased Learning to Rank with Biased Feedback
Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.