Can Siamese networks be used for question response matching?


I’m trying to use Siamese network not for similarity score but for matching score, I’m training the network with shared encoder (same embedding and rnns), but I’m thinking that this might work well for sentence similarity, but not sure if it can work for question and response similarity, as a question is not similar to a response, and the same encoder can’t easily create similar features for two different statements.

To be precise, in case of question response matching, is it better to:
1- fine tune the matching task with the same encoder and concatenate the sentence embedding (avg, max, last rnn state) and feed it to the classifier (assuming that the first layer will perform as a transformation matrix to better match the sentence and the response)

2- fine tune the matching task with the different encoders hoping that after unfreezing the response model will be fine tune to better represent the response?

3- fine tune the matching task with a different head for both question and response to give flexibility for the network to transform each feature representation on its own and concatenate the final head layer together?

Also do you think that the BCEloss is suitable for this task?

I’d really appreciate your help in advance

1 Like