Sensory systems, both in the living and in machines, have to be optimized with respect to their environmental conditions. The pheromone subsystem of the olfactory system of moths is a particularly well-defined example in which rapid variations of odor content in turbulent plumes require fast, concentration-invariant neural representations. It is not clear how cellular and network mechanisms in the moth antennal lobe contribute to coding efficiency. Using computational modeling, we show that intrinsic potassium currents (I A and I SK ) in projection neurons may combine with extrinsic inhibition from local interneurons to implement a dual latency code for both pheromone identity and intensity. The mean latency reflects stimulus intensity, whereas latency differences carry concentration-invariant information about stimulus identity. In accordance with physiological results, the projection neurons exhibit a multiphasic response of inhibition-excitation-inhibition. Together with synaptic inhibition, intrinsic currents I A and I SK account for the first and second inhibitory phases and contribute to a rapid encoding of pheromone information. The first inhibition plays the role of a reset to limit variability in the time to first spike. The second inhibition prevents responses of excessive duration to allow tracking of intermittent stimuli. To prevent crossattraction, the pheromone blend is distinguishable not only by the identity of the individual components but also by their precise ratio. Behavioral experiments revealed that male moths are tuned to the specific proportions emitted by their conspecific females. Slight changes in component ratios, for example, can inhibit the anemotactic response of males of one species, while attracting males from another species (4-6). Pheromones are passively transported in the air and mixed by atmospheric turbulence, and therefore, during flight, male moths encounter pheromone filaments with all components present in the same proportions as released (7) but over a broad range of concentrations (8, 9). In the race for mating, flying male moths have to solve a difficult pattern recognition problem (i.e., recognize, in real time, pheromone compounds and their proportions independently of blend concentration). To do so, the information delivered by olfactory receptor neurons (ORNs) is integrated in the antennal lobe by a neural network involving inhibitory local neurons (LNs) and excitatory projection neurons (PNs). All synaptic connections between these neurons take place in a subset of enlarged, sexually dimorphic glomeruli, the macroglomerular complex (MGC). The circuitry of the MGC is similar to the one of the generalist olfactory subsystem. In the generalist subsystem, prolonged odor stimulations (up to several seconds) create local field potential oscillations and transient PN assemblies that synchronize to them and evolve in time in a stimulus-specific manner (10-12). Using time in such a manner as a coding dimension, however, poses a serious problem for a flying insect. In nat...