The Westermarck effect, or reverse sexual imprinting, is a hypothetical psychological effect through which people who live in close domestic proximity during the first few years of their lives become desensitized to sexual attraction. This phenomenon was first hypothesized by Finnish anthropologist Edvard Westermarck in his book The History of Human Marriage (1891) as one explanation for the incest taboo.

In the case of the Israeli kibbutzim (collective farms), children were reared somewhat communally in peer groups, based on age, not biological relation. A study of the marriage patterns of these children later in life revealed that out of the nearly 3,000 marriages that occurred across the kibbutz system, only fourteen were between children from the same peer group. Of those fourteen, none had been reared together during the first six years of life. This result suggests that the Westermarck effect operates during the period from birth to the age of six.

When proximity during this critical period does not occur - for example, where a brother and sister are brought up separately, never meeting one another - they may find one another highly sexually attractive when they meet as adults or adolescents, according to the hypothesis of genetic sexual attraction. This supports the theory that the populations exhibiting the Westermarck effect became predominant because of the deleterious effects of inbreeding on those that didn't.

Contrasting Westermarck and Freud.

Freud argued that as children, members of the same family naturally lust for one another (See Oedipus complex), making it necessary for societies to create incest taboos, but Westermarck argued the reverse, that the taboos themselves arise naturally as products of innate attitudes.

***

Genetic sexual attraction (GSA) is sexual attraction between close relatives, such as siblings or half-siblings, a parent and offspring, or first and second cousins, who first meet as adults.

People tend to select mates that are like themselves; this is known as assortative mating. This holds both for physical appearances and mental traits. People commonly rank faces similar to their own as more attractive, trustworthy, etc. than average. However, Bereczkei (2004) attributes this in part to childhood imprinting on the opposite-sex parent.

GSA is rare between people raised together in early childhood due to a reverse sexual imprinting known as the Westermarck effect, which desensitizes them to later close sexual attraction. It is hypothesized that this effect evolved to prevent inbreeding.

In fiction.

In George R.R. Martin's book series A Song of Ice and Fire, two major characters, Cersei and Jaime Lannister, twins, have an incestuous relationship that results in Cersei giving birth to her three children. While the two were always close, the affair began after Jaime had been away for quite some time and had come back to find his sister betrothed.
In a third season episode of House, the team treats a married couple, Jeremy and Tracy, for similar symptoms. During treatment, the couple likens themselves to Romeo and Juliet, as Jeremy's father had forbidden him from becoming involved with Tracy, citing various reasons. When the team is able to diagnose both Jeremy and Tracy as having a rare hereditary condition, it is revealed that the true reason Jeremy's father was opposed to their union was an affair he had had with Tracy's mother, which resulted in Tracy's birth, thus making them half-siblings.
In the Showtime 2011 TV series The Borgias, an emotionally incestuous relationship between Cesare Borgia and his younger sister Lucrezia Borgia is hinted since the onset of the show. Their relationship finally became carnal in Season 3, Episode 3, Siblings.