← All questions
System DesignHard· Fusion· Attention· Latency

Design the fusion stage for a system retrieving text pa...

The decision hinges on the trade-off between computational cost and the need for cross-modal reasoning. Score fusion is highly efficient (O(1) per candidate), whereas attention fusion is significantly more expensive (O(N^2) over the concatenated token sequence). You should only incur the cost of attention fusion if the relationship between the modalities is required to answer the user’s query correctly.

Code playground (Python)