It is nitrogen in the heterocyclic ring that attaches to the surface AFAIK. And, they can stack up in groups called "J" aggregates based on the work of Dr. Jelley at Kodak. This shifts sensitivity to longer wavelengths.

So, a green sensitizer can form a "J" aggregate and become a red sensitizer. These types of dyes are well known for strong adhesion to the surface of an emulsion. I believe that the red sensitizer in Kodachrome is actually a green sensizer that has formed a "J" aggregate. At least, that is what I seem to remember.