Bi-encoder and Cross-encoder: What step of interaction takes place

Bi-encoder encodes queries and documents, and points them with vector measures, which allow the candidate to be indexed in advance.

• Step by stepCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives 2 first fixes

Try to do it after reading

  • Comparing the calculation of stand-alone and joint codes
  • Designing an enhanced identification boundary for retrieval

Suggested first

  • Inner vectors & Parameters
  • Classified loss and gradient

The key difference is whether the candidate can be encoded in advance

Bi-encoder encodes queries and documents, and points them with vector measures, which allow the candidate to be indexed in advance. Cross-encoder combines queries with documents to allow more finer particle sizes to interact, but normally requires recalculations for each pair. Their differences are not just the size of models, but the timing of interaction is different from that of reusable calculations.

There are 1 million documents. Independent coding provides 1 million vectors offline, and only one query and search online; When the joint code is calculated for all pairs, one million pairs of forwards are required for each query, which is often unrealistic. 100 files can be retrieved first and 100 pairs jointly.

Calculations only indicate the size of the process and are not directly equivalent to delays. Batch processing, caches, document length and equipment affect actual time-consuming. Independent codes may also be subject to index construction, storage and updating costs and cannot be declared generally cheaper by counting only the number of online forwards.

Phase II relies on phase I coverage

If the document is truly relevant and does not enter 100 first-screens, the reorder does not have the opportunity to bring it up. It is therefore necessary to assess separately the sequencing of the coverage and re-allocation phases of the recall phase. Accuracy in re-enumerating candidates alone does not mean that the complete system is good for all documents.

The objectives of the training are also different. Independent vectors require space suitable for fixed metrics, and joint models can interact with more complex terms. Direct indexing of a hidden vector in Cross-encoder without automatically obtaining a high quality Bi-encoder indicates that appropriate training or distillation is required.

The input cut may also cause a discrepancy. The maximum length of the separate document code and the joint code are distributed differently, and the end of the document may be squeezed after the query has been added. The comparison should record the visible content range, avoiding the attribution of input coverage differences to the model structure.

This section refers to the original papers Sentence-BERT and DPR, the number of documents and the number of candidates are examples of composite sizes. The option should jointly consider relevance, updating frequency, memory and delay, rather than calling a structure the best for all scenarios.

Could Cross-encoder reorder the files that were not returned from the initial screening?

The first phase of coverage is one of the maximum constraints of the complete system, unless there is another recall path.

Why is a stand-alone code suitable for indexing in advance?

Document vectors are not dependent on this query and can be reused offline; Joint coding usually relies on specific pairings.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
  2. DPR: Dense Passage Retrieval

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.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.