# Paired inputs in deep neural network

Are there ways to handle paired inputs in the deep neural network (DNN)? First, I will describe my problem, and then I will describe an equivalent problem in the image.

We have many protein sequences (each distinct but equal length), and we don't know their functions (we know the function of some). To determine the function we need to determine the similarity between them, but we don't know how to define similarity. We want to use DNN to learn similarity/distance for two protein sequence. So input is two protein sequence and output is protein similarity/distance score.

The equivalent problem in images will be: There are images of multiple people in multiple backgrounds/angle, and we need to determine whether any two picture is the same person or not.

• You need to come up with a similarity measure here. In case of facial recognition it's relatively easy if not laborious: anyone can be asked to tag the same people on pictures. In case of proteins how are you going to judge the quality of the algorithm? You can't tell yourself what's similar. In that regard this problem is not like facial recognition, in my opinion – Aksakal Feb 16 '18 at 18:37
• @Aksakal I have some training data from in-vitro experiments that enable me to score if two proteins, which are tested, are similar or not. – avi Feb 16 '18 at 22:11
• Great then you may try to develop the similarity measure based on this set. – Aksakal Feb 16 '18 at 22:20

To summarize: Train on triplets of three training examples (A,P,N) such that (A,P) are similar and (A,N) are different, and choose a loss function to simultaneously reward similarity between (A,P) and penalize similarity between (A,N).