Green hexagons depict ascaroside pheromones; triangles represent sensory neurons. Blue triangles indicate the male state of the shared neuron ADF (ADFm) and the male-specific CEM neurons. The red triangle indicates the hermaphrodite state of ADF (ADFh). Gray triangles depict shared neurons in which genetic sex does not appear to have a prominent role. Blue and red ovals show the genetic mechanism that links chromosomal sex to the regulation of ascaroside detection by ADF in its male and hermaphrodite states, respectively. In males, genetic sex acts through mab-3 to confer the ability to detect ascarosides onto ADF. In turn, this likely engages shared circuitry to promote attraction, overcoming a non-sex-specific repulsion to ascarosides, likely generated by ADL. In other behavioral contexts, the ASK and CEM neurons promote ascaroside attraction, though their roles in the assay used here appear to be secondary. In hermaphrodites, tra-1 represses mab-3, preventing ADF from detecting ascaroside stimuli and allowing repulsion, likely driven by ADL, to prevail.