Optimal coding principles are implemented in many large sensory systems. They include the systematic transformation of external stimuli into a sparse and decorrelated neuronal representation, enabling a flexible readout of stimulus properties. Are these principles also applicable to size-constrained systems, which have to rely on a limited number of neurons and may only have to fulfill specific and restricted tasks? We studied this question in an insect system-the early auditory pathway of grasshoppers. Grasshoppers use genetically fixed songs to recognize mates. The first steps of neural processing of songs take place in a small three-layer feedforward network comprising only a few dozen neurons. We analyzed the transformation of the neural code within this network. Indeed, grasshoppers create a decorrelated and sparse representation, in accordance with optimal coding theory. Whereas the neuronal input layer is best read out as a summed population, a labeled-line population code for temporal features of the song is established after only two processing steps. At this stage, information about song identity is maximal for a population decoder that preserves neuronal identity. We conclude that optimal coding principles do apply to the early auditory system of the grasshopper, despite its size constraints. The inputs, however, are not encoded in a systematic, map-like fashion as in many larger sensory systems. Already at its periphery, part of the grasshopper auditory system seems to focus on behaviorally relevant features, and is in this property more reminiscent of higher sensory areas in vertebrates.metric | invertebrates | information theory T o increase their fitness, most animals strive to evaluate sensory signals that reveal the quality of a potential mate. What if an animal has only a few dozen neurons to preprocess this extremely important information? Optimal coding theory suggests that the creation of a sparse, decorrelated representation would be a wise investment of scarce neuronal resources (1).That is indeed what has been found in many sensory modalities and species under natural conditions (2-4).These early sensory networks often comprise large numbers of cells and organize information in a map-like fashion, where spatial proximity of neurons reflects similarity in the selectivity for fundamental stimulus features (5, 6). These maps tend to have a complete representation of sensory space and enable subsequent processing steps to select relevant features based on attention or associative learning. Reading out such a representation by "blind" summation of responses across different neurons would be highly inefficient to recover information, because stimulus features are not only encoded by neuronal activity per se but also by neuronal identity. This type of population code is referred to as labeled-line code (7,8). Accordingly, higher-order sensory areas need to take into account which neurons are active when producing more specific representations of behaviorally relevant stimulus aspects (9). Do the...