nyu-dl / dl4marco-bert

BSD 3-Clause "New" or "Revised" License
476 stars 87 forks source link

What's the difference between this ranking and classify? #8

Closed feng-1985 closed 5 years ago

feng-1985 commented 5 years ago

The ranking loss function is the same as classification loss, what's makes it different? In the training stage, the loss calculation didn't consider the query groups(multiple document share the same query).

rodrigonogueira4 commented 5 years ago

The model is trained using a classification loss (cross entropy loss) to classify if a document is relevant or not for a given query. It outputs a probability of a document being relevant for a given query. The documents are re-ranked based on the probability assigned to each one of them. Since the documents are classified independently, the model and the loss do not consider multiple documents.

feng-1985 commented 5 years ago

Thanks for response, have you try the learning to rank?