Animals find mates and food, and avoid predators by navigating to regions within a favorable range of available sensory cues. How are these ranges set and recognized? Here we show that male C. elegans exhibit strong concentration preferences for sex- specific small molecule cues secreted by hermaphrodites, and that these preferences emerge from the collective dynamics of a single male-specific class of neurons, the CEMs. Within a single worm, CEM responses are dissimilar, not determined by anatomical classification and can be excitatory or inhibitory. Response kinetics vary by concentration, suggesting a mechanism for establishing preferences. CEM responses are enhanced in the absence of synaptic transmission, and worms with only one intact CEM show non-preferential attraction to all concentrations of ascaroside for which CEM is the primary sensor, suggesting that synaptic modulation of CEM responses is necessary for establishing preferences. A heterogeneous concentration-dependent sensory representation thus appears to allow a single neural class to set behavioral preferences and recognize ranges of sensory cues.