The pathways for olfactory learning in the fruitfly Drosophila have been extensively investigated, with mounting evidence that that the mushroom body is the site of the olfactory associative memory trace (Heisenberg, Nature 4:266-275, 2003; Gerber et al., Curr Opin Neurobiol 14:737-744, 2004). Heisenberg's description of the mushroom body as an associative learning device is a testable hypothesis that relates the mushroom body's function to its neural structure and input and output pathways. Here, we formalise a relatively complete computational model of the network interactions in the neural circuitry of the insect antennal lobe and mushroom body, to investigate their role in olfactory learning, and specifically, how this might support learning of complex (non-elemental; Giurfa, Curr Opin Neuroethol 13:726-735, 2003) discriminations involving compound stimuli. We find that the circuit is able to learn all tested non-elemental paradigms. This does not crucially depend on the number of Kenyon cells but rather on the connection strength of projection neurons to Kenyon cells, such that the Kenyon cells require a certain number of coincident inputs to fire. As a consequence, the encoding in the mushroom body resembles a unique cue or configural representation of compound stimuli (Pearce, Psychol Rev 101:587-607, 1994). Learning of some conditions, particularly negative patterning, is strongly affected by the assumption of normalisation effects occurring at the level of the antennal lobe. Surprisingly, the learning capacity of this circuit, which is a simplification of the actual circuitry in the fly, seems to be greater than the capacity expressed by the fly in shock-odour association experiments (Young et al. 2010).