Most commonly sexual attraction is of the female student to the male sensei.Many women are attracted to men in positions of power and authority. Men know this and can exploit the position or handle it responsiblely. I have at least a dozen women or more develop a relationship for that reason. When they get too close I must put them at a distance. I am a sensei and have obligations as such and to all the other students. Usually I will not bring up the subject as I don't want to hurt feelings or feelings of rejection between us. I just place some distance between us which has always worked out. The credit is given to those women ro make that happen. Yes some odf those women are still my students today.
FWIW, after a few years I started having to put some distance between myself and junior men
for the same reason (though I seem to have aged out of that now
. I think that some people are so enthralled by the art that they mistake it for enthrallment with the person who is teaching the art - i.e., 'Sensei is so amazing/such an amazing person!' instead of 'Aikido is so amazing!' It leads to the potential, if a relationship happens, to the junior student falling out of love with the sensei and thinking that the problem is still with the art, and losing their ability or desire to train at that dojo because of it. I don't think that we do our students any sort of a favor by allowing that sort of displacement, regardless of the genders involved.