{'fraction_non_alphanumeric': 0.03054192834100063, 'fraction_numerical': 0.00654742588810201, 'mean_word_length': 4.574970735341067, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Odor recognition and segmentation by a model olfactory bulb and cortex

We present a model of an olfactory system that performs odor segmentation. Based on the anatomy and physiology of natural olfactory systems, it consists of a pair of coupled modules, bulb and cortex. The bulb encodes the odor inputs as oscillating patterns. The cortex functions as an associative memory: When the input from the bulb matches a pattern stored in the connections between its units, the cortical units resonate in an oscillatory pattern characteristic of that odor. Further circuitry transforms this oscillatory signal to a slowly-varying feedback to the bulb. This feedback implements olfactory segmentation by suppressing the bulbar response to the pre-existing odor, thereby allowing subsequent odors to be singled out for recognition.


Introduction
An olfactory system must solve the problems of odor detection, recognition, and segmentation. Segmentation is necessary because the odor environment often contains two or more odor objects. The system must be able to identify these objects separately and signal their presence to higher brain areas. An odor object is defined as an odor entity (which, e.g., the smell of a cat, often contains fixed proportions of multiple types of odor molecules) that enters the environment independently of other odors. Therefore, two odor objects usually do not enter the environment at the same time although they often stay together in the environment afterwards. In cases when different odors do enter the environment together as a mixture, human subjects have great difficulty identifying the components [1]. In this paper we present a model which performs odor segmentation temporally. First one odor object is detected and recognized, then the system adapts to this specific odor so a subsequent one can be detected and recognized.
The odor specificity of this adaptation is the key feature of the operation of the system. This specificity can not be achieved with simple single-unit fatigue mechanisms [2,3] because of the highly distributed nature of odor pattern representations in the olfactory system: fatiguing neurons that respond to one odor would strongly reduce their response to another one, thereby distorting the pattern evoked by the second odor. In our model a delayed inhibitory feedback signal is directed to the input units in such a way as to cancel out the current input, leaving the system free to respond to new odors as if the first one were not there.
Our model is not intended as a faithful representation of any particular animal olfactory system. Present anatomical and physiological knowledge do not permit such detailed modelling. Rather, our focus is on the computations performed by different groups of neurons, based on general biological findings, which we review briefly here.
In animals, different odor molecules produce different, distributed activity patterns across the neurons of the olfactory nerve, which provide the input to the olfactory bulb [4,5]. We do not model this part of the processing. We will simply represent different odors as different but overlapping input patterns to the bulb. They are temporally modulated by the animal's sniff cycle (typically 2-4 sniffs per second), i.e., active only during and immediately after inhalation.
The main cell types of the mammalian bulb are the excitatory mitral cells and the inhibitory granule cells. The mitral cells receive the odor input and excite the granule cells, which in turn inhibit them. The outputs of the bulb are carried to the olfactory cortex by the mitral cell axons. In vertebrate animals, odors evoke oscillatory bulbar activity in the 35-90 Hz range, which may be detected by surface EEG electrodes [6,7]. Different parts of the bulb have the same dominant frequency but different amplitudes and phases [7,8], and this oscillation pattern is odor-specific [8,9]. These oscillations are an intrinsic property of the bulb, persisting after central connections to the bulb are cut [10,11]. (In invertebrates, oscillations exist without odor input but are modulated by odors [12].) Upon repeated presentation of a conditioned odor stimulus, the bulbar oscillations weaken markedly [13]. Since olfactory receptor neurons exhibit only limited adaptation [14,15], this adaptation must originate either in the bulb or in cortical structures.
The pyriform or primary olfactory cortex receives bulbar outputs via the lateral olfactory tract, which distibutes outputs from each mitral cell over many cortical locations [4]. The signals are conveyed to the (excitatory) pyramidal cells of the cortex, both directly and via feedforward inhibitory cells in the cortex. The pyramidal cells send axon collaterals to each other and to feedback interneurons which, in turn, inhibit them. There is thus excitatoryinhibitory circuitry as in the bulb, and oscillatory responses to odors are observed in the cortex, too. However, the cortex differs from the bulb in the much greater spatial range of the excitatory connections and in the presence (or at least the greater extent) of excitatoryto-excitatory connections. This anatomical structure has led a number of workers to model the olfactory cortex as an associative memory for odors [16,17,18,19,20,21]. Furthermore, the oscillations in the cortex require input from the bulb; they do not occur spontaneously. Cortical output, including the feedback to the bulb, is from pyramidal cells [4]. Some of the feedback is direct, while some of it is via other cortical centers, notably the entorhinal cortex. Most central feedback to the bulb is to the granule cells [5]. Cooling the cortex, presumably reducing or removing the central feedback, enhances the bulbar responses [22].
The basic features outlined here constrain our model: we employ coupled excitatory and inhibitory populations in both bulb and cortex, we wire the network so that odors evoke oscillations in the bulb, which drive similar cortical oscillations through excitatory and inhibitory connections, and we send the central feedback to reduce the bulbar responses.
We will neglect many known features of animal olfactory systems, such as (to name a few) the patterns of connectivity from receptors to mitral cells, the dendrodentritic character of the mitral-granule synapses, and the differing spatial range of connectivity in bulb and cortex. Indeed, the model has no geometry: "location" and "distance" have no meaning here. We retain only the basic elements necessary to illustrate the basic operation of the system, in order not to obscure the functions we focus on (detection, recognition, and segmentation).
We will also hypothesize features of the system, in particular the nature of the feedback signal from the cortex to the bulb, for which there is not yet experimental evidence (though they are not incompatible with present knowledge). These assumptions will be necessary in order to make an explicit model that can be tested computationally. Some details of its implementation are neither crucial to the computational function of the model nor intended as explicit neurophysiological predictions. However, the basic framework of the model and the dynamical properties we find for it are subject to experimental test.
In the next section we present the model: its equations of motion and how it detects, recognizes, and segments odor inputs. The following section demonstrates how it works in simulations. In the final section we discuss the implications of our work, including potential experimental tests for this and related models and how they can help us understand the functioning of the olfactory system. Our model consists of two modules, a bulb and a cortex, with feedforward and feedback connections between them. It is depicted schematically in Fig. 1. The bulb encodes odor inputs as patterns of oscillation. These form the input to the cortex, which acts as an associative memory for odor objects, recognizing them by resonant oscillation in an odorspecific pattern when the input from the bulb matches one of its stored odor memories. The odor-specific resonant cortical activity pattern is transformed to a feedback signal to the bulb, which approximately cancels the effect of the odor input that elicited it. The system is then able to respond to a newly arrived odor superposed on the previous one. In this way it segments temporally the different odor objects in the environment.

The model
The model is a rate-model network [23], in which we associate each unit with a local population of cells that share common synaptic input (mitral cells for the excitatory units, granule cells for the inhibitory ones). The output (activation) of a unit, representing the average firing rate within the corresponding population, is modeled as a sigmoidal function of the net synaptic input.
In both the bulb and cortex modules, the units occur in pairs, one unit excitatory and the other inhibitory. In the absence of coupling between different such pairs, they form independent damped local oscillators. The coupling between pairs leads to oscillation patterns across the modules, with specific amplitudes for the individual local oscillators and specific phase relations between them. The odor input makes these oscillatory patterns different from odor to odor; thus, these patterns form the internal encoding of the odors. The sizes of the local populations corresponding to our formal units are different for excitatory and inhibitory units; this difference is accounted for in the model by appropriate scaling of the synaptic strengths.
We turn now to the explicit mathematical description of the two modules and the coupling between them.

the bulb
The bulb model we employ was introduced by Li and Hopfield (1989) [24,25]. For completeness, we review it here.
The odor input to (mitral) unit i is denoted I i . (We will also use a vector notation, in which the entire input pattern is denoted I.) Adding to this the synaptic input from granule cells within the bulb, we obtain an equation of motioṅ for the (local population average) membrane potential x i . Here α −1 is the membrane time constant, g y (·) is the (sigmoidal) activation function of the granule units, y j is the membrane potential for granule unit j, and H 0 ij is the inhibitory synaptic strength from granule unit j to mitral unit i. All the H 0 ij are non-negative; the inhibitory nature of the granule cells is represented by the negative sign in the second term on the right-hand side. The signal the bulb sends on to the cortex is carried by the mitral unit outputs g x (x i ) (with g x (.) their activation function). We have not included mitral-mitral connections here, because the experimental evidence for them is weak, but including them would not change the properties of the model qualitatively.
For the inhibitory units, representing local populations of granule cells, we have, similarly to (1),ẏ with the mitral-to-granule synaptic matrix W 0 ij . Here the external input I c i represents the centrifugal input (from the cortex), which contains the feedback signal that implements the odor-specific adaptation. In describing the response to an initial odor, it can be neglected or taken as a constant background input.
To see how this network produces oscillatory excitation patterns in response to an odor, start by taking the input I to be static. It determines a fixed pointx i andȳ i of the equations, i.e.,ẋ i =ẏ i = 0 atx i andȳ i , which increase with odor input I. Taking the deviation from this fixed point as x i −x i → x i and y i −ȳ i → y i , linearizing and eliminating the y i leads tö where the matrix A = HW, with . This equation describes a coupled oscillator system, with a coupling matrix A. Denoting the eigenvectors and eigenvalues of this matrix by X k and λ k , respectively, (3) has solutions , with c k and φ k the amplitude and phase of the k th mode. If A is not symmetric (the general case), λ k is complex, and the mode has oscillation frequencies ω k ≡ Re( √ λ k ). The amplitude for mode k will grow exponentially (in this linearized theory) if ±Im( √ λ k ) > α. Its growth will be limited by nonlinearities, and it will reach a steady-state saturation value. In this spontaneously oscillating state, the fastestgrowing mode, call it the 1 st mode, will dominate the output. The whole bulb will oscillate with a single frequency ω 1 (plus its higher harmonics), and the oscillation amplitudes and phases may be approximated by the complex vector X 1 . Thus, the olfactory bulb encodes the olfactory input via the following steps: (1) the odor input I determines the fixed point (x,ȳ), which in turn (2) determines the matrix A, which then (3) determines whether the bulb will give spontanous oscillatory outputs and, if it does, the oscillation amplitude and phase pattern X 1 and its frequency ω 1 .
Strictly speaking, this description only applies to very small oscillations. For larger amplitudes, nonlinearities make the problem in general intractable. However, we will suppose that the present analysis gives a decent qualitative guide to the dynamics, checking this assumption later with simulations of the network.
In this model, oscillations arise strictly as a consequence of the asymmetry of the matrix A. The model could be generalized to add intrinsic single-unit oscillatory properties, and these might enhance the network oscillations. However, a model with symmetric A and intrinsic oscillatory properties only at the single-unit level can not support oscillation patterns in which the phase varies across the units in the network. We will return to this point in the Discussion section.
A word about timescales: The odor input varies on the timescale of a sniff: 300-500 ms. The oscillations are in the 40 Hz range, so the input I hardly changes at all over a few oscillation periods (∼ 25 ms). We may therefore treat periods of several oscillations as if the input were static within them, and do the above analysis separately for each such period (adiabatic approximation).
With inhalation, the increasing input I pushes the fixed point membrane potentialsx i from their initial values (where the activation function g(x) has low gain) through a range of increasing gains, thereby increasing the size of some of the elements of the matrix A (recall the definition of A above). This increases the magnitude of both the real and imaginary parts of the eigenvalues λ k , until the threshold where |Im( √ λ k )| = −α, where oscillations appear. These oscillations increase in amplitude as the input increases further, until the animal stops inhaling and the input I decreases. Then the oscillations shrink and disappear as the system returns toward its resting state. This rise and fall of oscillations within each sniff cycle give the bulb outputs both a slowly-varying component (2-4 Hz) and a high frequency (25-60 Hz) one, as observed experimentally [7].
It is not known how the synaptic connections represented in the model by the matrices H 0 and W 0 develop in the real olfactory bulb, and we do not attempt to model this process here. It is possible that the real bulb acts, to some degree, as an associative memory as a result of this learning. However, our conclusions will not depend on this. Similarly, our analysis does not depend on details of the synaptic matrices, such as their range and degree of connectivity. We require only that the connections lead to distinct oscillation patterns for different odors, with dissimilar patterns evoked by dissimilar odors.

the cortex
Our cortical module is structurally similar to that of the bulb. However, there are the following significant differences: (1) The cortex receives an oscillatory input from the bulb, while the bulb receives non-oscillatory (at the time scale of the cortical oscillation) input; (2) The cortex has excitatory-to-excitatory connections, while our bulb module does not.
We focus on the local excitatory (pyramidal) and feedback inhibitory interneuron populations. The units that represent them obey equations of motion similar to those for the mitral and granule units of the bulb: Here u i represent the the average membrane potentials of the local excitatory populations and v i those of the inhibitory populations. The synaptic matrix J 0 is excitatory-to-excitatory connections,H 0 is inhibitory-to-excitatory connections, andW 0 is excitatory-to-inhibitory connections. For later convenience, we have written the local terms (the effect of v i on u i and vice versa) explicitly, soH 0 andW 0 have no diagonal elements. We also assume J 0 ii = 0. I b i are the net inputs from the bulb, both directly and indirectly via the feedforward inhibitory units (see later for the description of this pathway). Like the bulb activity itself, these contain in general both a slow part I b0 i , varying with the sniff cycle, and an oscillating (γ-band) part δI b i , i.e., I b i ≡ I b0 i + δI b i . We can carry out the same analysis as in the bulb, taking the fixed point as (ū,v), which are determined by I b0 , i.e.,u =v = 0 at (ū,v) when Here . Thus this is a system of driven oscillators coupled by connections J,H, andW and driven by an external oscillatory signal δİ b + αδI b , which is proportional to δI b for a purely sinusoidal oscillation. A single dissipative oscillator driven by an oscillatory force will resonate to it if the frequency of the driving force matches the intrinsic frequency of the oscillator. A system of coupled oscillators has its intrinsic oscillation patterns -the normal modes determined by the coupling. Analogously, it will also resonate to the input when the driving force, a complex vector proportional to δI b , matches one of the intrinsic modes, also a complex vector, in frequency and in its pattern of oscillation amplitudes and phases.
It is apparent from Eq. (6) that the matricesH andW play the same roles. Therefore, for simplicity, we will drop the inhibitory-to-excitatory couplingsH from now on, thinking of the fact that the real anatomical long-range connections appear to come predominantly from excitatory cells.

Odor selectivity and sensitivity
In our model, the olfactory cortex functions as an associative memory, as described and modeled by a number of authors [16,17,18,19,20,21]. It is similar to a Hopfield model, but instead of stationary patterns it stores oscillating patterns which vary in phase as well as magnitude across the units of the network. The memory pattern for the µ th odor is described by a complex vector ξ µ , whose component ξ µ i describes both the relative amplitude and phase of the oscillation in the i th unit. The cortex stores the memories about the odours in the synaptic weights J 0 andW 0 , or, effectively, the coupling between oscillators. It then recognizes the input odors, as coded by the oscillating input patterns δI b (which are linearly related to the bulbar oscillatory outputs), by resonating to them, giving high-amplitude oscillatory responses itself. If, however, the input δI b does not match one of the stored odor patterns ξ µ closely enough, the cortex will fail to respond appreciably.
In the present model the memory pattern ξ µ i for odors µ = 1, 2, ... are designed into the synaptic connections J andW. Let ω be the oscillation frequency, δI b i ∝ e −iωt . Once the oscillation reaches a steady amplitude u i ∝ e −iωt , we haveu i = −iωu i ,ü i = −iωu i , so we geṫ The second term [...] on the right hand side gives an effective coupling between the oscillators. From now on in this analysis we will make the approximation that the different local oscillators have the same natural frequencies, i.e. β i γ i is independent of i. Assuming further that the oscillation frequencies for different odors are nearly the same, the odor patterns can then be stored in the matrices in a generalized Hebb-Hopfield fashion as or, with ξ µ i expressed in terms of amplitudes and phases as |ξ Note that here both kinds of connections, J (excitatory-to-excitatory) andW (excitatoryto-inhibitory), are used to store the amplitude and phase patterns of the oscillation. J is symmetric, whileW is not. These connections can be obtained by an online algorithm, a simplified version of the full Hebbian learning treated by Liljenström and Wu [20,21]. Suppose the cortex has effective oscillatory input δI b = ξ µ e −iωt + ξ µ * e iωt during learning of the µ th pattern. Here we make explicit the real nature of the signals. Suppose also that the J andW connections inactive, consistent with the picture proposed by Wilson, Bower and Hasselmo [17,19], who suggested that learning occurs when the long-range intracortical connections are weakened by neuromodulatory effects. Then the linearized (4) and (5) are simplẏ with solution where c.c. denotes complex conjugate. In other words, the cortical activities are clamped by the inputs.
For Hebbian learning,J ij ∝ u i (t)u j (t), and, after time averaging, δJ ij ∝ 2π/ω 0 Similarly (14) Then, if the relative learning rates for J andW are tuned appropriately, we simply recover the formulae (9) and (10). In actual online learning, we can use high-pass versions of u and v to learn J andW to remove the baseline value, i.e., the operation pointū andv, which does not contain odor information.
To see the selective resonance explicitly, suppose that different patterns ξ µ are orthogonal to each other. Let us denote the overlap (1/N) i δI b i ξ λ * i of the input δI b i with the stored pattern ξ λ i by δI λ . Then, multiplying (7) by ξ λ * i and summing on i, we find that at steady oscillatory state, the response This is like an oscillator with oscillation frequency (βγ + α 2 )/ω and an effective oscillation decay rate 2α − J. It resonates to external oscillatory input of frequency ω ≈ √ βγ + α 2 with a steady state amplitude However, for an input δI b i orthogonal to all the stored patterns, δI λ = 0 for all λ, and the resonance will be washed out when J < 2α. For J > 2α, the network will support spontaneous oscillations analogous to those in the bulb, but not as observed in the cortex. The effect of the long-range couplings, through the parameter J, is to reduce the damping in the circuit from 2α to 2α − J when the input matches a stored pattern, thereby sharpening the resonance as J → 2α while we keep J < 2α. On the other hand, the resonant driving frequency depends only on the single-oscillator parameters α, β and γ.
This oscillatory associative memory enjoys the usual properties that characterize Hopfield networks [26], including rapid convergence (a few oscillation cycles if the presented pattern has reasonable overlap with a stored one), robustness with respect to noise and corrupted input, and a storage capacity of the order of N random patterns, where N is the network size.

Coupling between bulb and cortex
The model has both feedforward (bulb-cortex) and feedback (cortex-bulb) connections. The former transmit the bulbar encoding of the input odors to the cortex for recognition, while the latter permit segmentation by producing adaptation to recognized odor objects.

bulb to cortex
As mentioned in the Introduction, in the real cortex, the excitatory cells receive input from the bulb both directly from the fibers of the lateral olfactory tract and in a slower pathway via feedforward inhibitory interneurons in the cortex. We model this in the following way. The synapses from local bulb populations j to local cortical populations i are specified by a matrix C b→c ij . The values of these connections are not important in the model, and very little is know about them, so we will take them to be random. The resulting signals are then fed to the excitatory cells, both directly and, with the opposite sign, through a parallel low-pass filter, representing the effect of the feedforward inhibitory cells; see Fig. 1. Details are given in the appendix.
The combination of the direct excitatory and low-pass filtered inhibitory signals makes the feedforward pathway act as a high-pass filter, partially cancelling the slow part I b0 of the bulb output from the cortical input. Consequently, the net input to the cortical excitatory units is dominated by the oscillatory component of the bulb activity, which encodes information about the odor input. (We do not know how well such a cancellation is actually achieved in real olfactory systems, but this could be tested experimentally.)

cortex to bulb
The odor-specific adaptation that forms the basis for odor segmentation in our model is implemented using a feedback signal from the cortex to the granule units of the bulb. We do not know how such a signal is generated in animals, or even whether it is, although anatomically such a pathway exists. If the signal does exist, it likely also involves areas such as entorhinal cortex, which contributes to the centrifugal input to the bulb. These areas lie outside the scope of the present model, so we will simply construct a suitable signal and explore the consequences.
In exploratory computations, we have found that this form of feedback control only works if the signal is slowly varying in time (on the order of the sniff cycle time or slower). Merely feeding back the oscillating cortical activities does not appear to permit any kind of robust stimulus-specific adaptation.
Thus, we generate the feedback signal in the following ad hoc fashion: First each excitatory cortical output g u (u i ) is run through a threshold-linear element to remove its nonoscillatory part, which carries no odor information. Then the output of this element is run through a low-pass filter. The time constants of this filter are on the order of the sniff cycle or longer. The net result is a signal pattern which takes a sniff-cycle time or so to grow to full strength. The signal component from excitatory unit i will be proportional to the amplitude of the oscillation of that unit, so this signal will contain information about the odor that evoked the cortical oscillation pattern. The explicit form of the equations used to generate the feedback signal in the simulations is given in the Appendix.
Since we rectify and low-pass only the excitatory cortical outputs g u (u i ), the feedback signal includes only the odor information coded in the amplitude but not in the phase pattern of the cortical oscillation. Phase information could be included by (for example) feeding the difference signals g u (u i ) − g u (u j ) through the rectification and low-pass processes. However, we have not explored such mechanisms in this work.
The granule units in the bulb respond to the feedback signals by changing their activities proportional to it. These changes are then transmitted to the mitral cells by the synaptic matrix H. As shown by Li [25], a feedback signal will, when transmitted onward to the mitral units, cancel the odor inputs to the bulb (in linear approximation). In our model we want to make this cancellation work for all the odor patterns stored in the cortex. Denoting by G µ j the rectified and low-passed cortical output when the system is stimulated by odor pattern I µ k , this can be achieved by a Hebbian feedback connection matrix C c→b that maps G µ to feedback signal F µ for each odor µ in a single layer network:

Simulations
We have simulated a network with bulb and cortical modules each consisting of 50 excitatory and 50 inhibitory units. They were coupled as described in Sect. 2.3 and the Appendix. The coupled differential equations were integrated using a fourth-order Runge-Kutta routine from Numerical Recipes [27]. We used three random odor input patterns I µ i . Their elements were drawn independently for each i and µ from a uniform distribution on (0,1]. The elements of the granule-to-mitral synaptic matrix H were taken to have the form H ij = const. · δ ij . We designed the mitral-togranule matrix W so as to make the bulb oscillate in response to the three input patterns, taking W ij ∝ Im 3 µ=1 ζ µ j ζ µ * j . Here the ζ µ i are complex, with amplitudes resembling the input odor patterns I µ i and with random phases. Since W should have non-negative elements, we simply zeroed out the negative W ij in the construction. 1 This dilution did not affect the 1 In the bulb model of Li and Hopfield [24,25], the idea was that extensive asymmetric random synapses would, for a large network, automatically generate a distributed encoding of odors in the amplitudes and phases of oscillation patterns in the network. Here we will be more concerned with how these patterns are processed by the cortex, so, for convenience, we have engineered particular amplitude patterns in through the bulbar W matrix in this fashion. However, the particular forms used for H and W are not important for the problem that we are studying here, as long as A ≡ HW is sufficiently asymmetric. bulb oscillations qualitatively. Other parameters were set as in [24], so the evoked oscillations were in the 40-Hz range. The cortical design followed Sect. 2.2. The local couplings β 0 and γ 0 were chosen so that the cortical oscillation frequency roughly matched the bulbar one, i.e., β 0 γ 0 + α 2 ≈ω 2 (see equation (16), whereω is the average oscillation frequency in the bulbar outputs. The inhibitory units had the sigmoidal activation function used in the model of the bulb [24]. In some of our simulations, the activation function of the excitatory units also had this form. In obtaining the results presented here, however, we used a piecewise linear activation function with gains of 1 and 2, respectively, in the low-and high-input regions above threshold. This choice was made only for convenience in analyzing the nonlinear dynamics and is not essential for the function of the network.
The cortical synaptic matrices J andW were designed to store oscillation patterns for two of the three odor input patterns, in the following way. For each of the two odors, we stimulated the bulb with its input pattern I µ i and fed the resulting oscillatory bulb output through the bulb-to-cortex matrix C b→c ij and the subsequent high-pass filtering operation to the cortex, with the intracortical connections J 0 andW 0 set to zero. The resulting oscillation patterns in the cortical units for the two odors were then used as ξ µ in constructing J and W.
We modified the Hebb rule (eq. (8) or eqs. (9) and (10)) slightly, using, instead, a pseudoinverse formula where i η µ * i ξ ν i = Nδ µν . This was done only to reduce finite-size effects due to mutual overlaps (of order √ N ) between patterns, and would be inessential in sufficiently large networks. As explained in section 2.3 and the Appendix, the slowly-varying feedback signal used for the odor-specific adaptation was generated by a threshold-linear rectification, followed by a pair of simple linear filters. The time constants of these (3 and 0.3 sec respectively) would made it take 10-12 256-ms sniff cycles to generate a full strength feedback signal if the cortical signal were held constant. Similarly, the adaptation takes just as long to wear off after the stimulus is removed.
Like the intracortical M matrix, the cortex-to-bulb matrix C c→b was modified using the projection-rule algorithm to eliminate finite-size overlap effects between the cortical oscillation patterns of different odors. Thus, in the formula (18), we replaced the rectified and low-pass-filtered cortical patterns G µ j byG µ j , whereG µ are vectors such thatG µ ·G ν = Nδ µν . Fig. 2 shows the bulbar and cortical oscillatory response patterns evoked on 5 of the 50 mitral or cortical excitatory units by three odors: A, B, and C. Only odors A and B are stored in the cortical memory in the J andW matrices. Different amplitude response patterns to different odors are apparent. The cortex resonates appreciably to only odors A or B, but not to C, demonstrating the selectivity of the cortical response. Fig. 3 demonstrates odor adaptation to odor A. The response amplitudes decay quicky in successive sniffs, although the oscillation patterns do not change appreciably before the amplitudes decay to zero. The way this comes about is that the feedback signal generated by A, when relayed by the granule cells to the mitral ones, creates an effective extra input signalĀ (anti-A), and by the third sniff A +Ā ≈ 0.
To quantify the similarity between oscillation patterns, we extract an N=50 dimensional complex vector O from the temporal Fourier transform of the activity of the cortical excitatory units during the sniff cycle, with the component O i specifying the amplitude and phase of the oscillations in excitatory unit i. We can measure the similarity between O and O ′ by the normalized overlap S OO ′ = | O|O ′ /(|O| · |O ′ |), which is 1 for O ∝ O ′ and near zero (O(1/ √ N)) for two unrelated patterns. Calling the pattern vectors A 0 , A 1 , A 2 , and A 3 for cortical response to odor A without adaptation and during the first, second, and third sniff cycles of the adaptation respectively, we find S A 0 A 1 = 0.9997, S A 0 A 2 = 0.992, and S A 0 A 3 = 0.74, with response amplitudes |A 1 |/|A 0 | = 0.97, |A 2 |/|A 0 | = 0.3, |A 3 |/|A 0 | = 0.08. Thus, the strength of the response is already significantly weakened after one sniff, but its cortical pattern of variation remains undistorted through several sniffs.
The way this adaptation varies in successive sniffs depends on both the time constants in the feedback circuitry (as discussed above) and the strength of the filtered signal fed back to the bulb. In the simulations shown here, the latter was strong enough that even after one sniff, a large fraction of the input signal is cancelled by the feedback, and after two sniffs the cancellation was nearly complete. A smaller feedback strength and a correspondingly longer time constant of the feedback circuitry would make it take longer for the adaptation to set in. Similarly, the time it takes for the adaptation, once established, to wear off is set by the same time constants (for the values used here, around 3 s or 12 sniff cycles).  are the responses to odor A alone during three successive sniffs. Note that the response magnitudes decay in successive sniffs, but the response pattern, in particular, the relative amplitude pattern, stays roughly the same from the first to second sniff before responses disappear at the third sniff. Fig. 4a demonstrates the segmentation capability of the system. The response B seg to the odor mixture A+B at the third sniff after the first 2 sniffs of odor A is quite similar to that, B 0 , to odor B alone: S B seg B 0 = 0.993, and |B seg |/|B 0 | = 0.91. Thus, although A is still present, so is the anti-A, so the net signal to the mitral units is A +Ā + B ≈ B. This demonstrates odor-specific adaptation in the model. The system responds with the activity pattern characterizing the new odor, essentially undistorted by the existing odors in the environment, thus effectively achieving odor segmentation. Odor B can be segmented as long as it enters after the adaptation to A is established, in this model at the 3rd or any subsequent sniffs.   Fig. 3, odor B is added, so the net input is A+B. The response is almost the same as that to B alone (Fig. 2, middle). b: Cross-adaption: response to odor B after odor A was present in two previous sniffs and then withdrawn. The response is weak and distorted. c: Same as b, except that an odor B 1.5 times as strong is used. This strength is sufficient to evoke a stronger, less distorted response.
However, if odor A is suddenly withdrawn at the start of the 3rd sniff, when odor B is introduced, the system response to odor B is weakened and distorted (this is particularly noticable in the bulbar responses). The reason for this is that the effective total input is now B +Ā ≈ B − A, which is not at all like B (Fig. 4, b and c). This corresponds to the psychophysically observed cross-adaptation -after sniffing one odor, another odor at next sniff smells less strong than it normally would and may even smell different [14]. In the normal olfactory environment, however, such sudden and near complete withdrawal of an odor seldom happens. Let B cross andB cross be the cortical response vectors to cross adapted odor B and odor 1.5B. Comparing with the response to odor B alone, we find S B 0 B cross = 0.94, |B cross |/|B 0 | = 0.23; S B 0Bcross = 0.97, |B cross |/|B 0 | = 0.74. We can understand these results in the following way. The feedback inputĀ ≈ −A acts to move the bulb operating pointx i to lower gain values (for units where I A i is strong), thereby weakening the overall response. For normal-strength B, most of the mitral units in the bulb do not respond much, so the cortical response is correspondingly weak and distorted relative to that to B in the absence of adaptation. The stronger input 1.5B evokes a stronger bulb response, however, and the cortical response is stronger and better (but still imperfectly) correlated with the unadapted pattern.
Since the olfactory bulb is nonlinear, the odor mixture A+B does not induce a bulbar response equal to the sum of the responses to A and B individually. Consequently, the unadapted cortical response to it (Fig. 5, left panel) is weaker than that to A or B (the bulb response to the mixture is not embedded in the cortical connections) and not strongly correlated with the responses to the pure odors. The situation is similar to that for any other unstored odor, such as C (Fig. 2, panel C), to which there is almost no adaptation in the bulb because there is almost no cortical signal to feed back. The unadapted cortical response to A+B is stronger than that to C because the nonlinearity in the bulb here is not strong enough to completely destroy correlations between its reponses to the individual odors A and B and that to their mixture. Nevertheless, the weakness of the cortical response reduces the feedback to the bulb significantly, and the system does not adapt to the mixture as effectively as to individual odors, as shown in the middle and right panels of Fig. 5. We also note that because the feedback is weak, the attenuation of the signals in both bulb and cortex, is also weaker than for pure stored odors (cf Fig. 3). Thus, the cortical response to the mixed odor, while initially weaker than that to pure stored ones, lasts longer.

Discussion
We have presented a computational model for an olfactory system that can detect, recognize and segment odors. Detection is performed in the bulb, which encodes odors in oscillatory activity patterns. Recognition is carried out by the cortex using a resonant associative memory mechanism. Finally, segmentation is implemented by a slowly-varying feedback signal which acts to cancel the specific input that evoked the resonant cortical response.
The model is constrained by a few basic anatomical and physiological facts: Odors evoke oscillatory activity in populations of excitatory and inhibitory neurons in both bulb and cortex, these two structures are coupled by both feedforward and feedback connections, reducing the cortical feedback enhances the bulbar responses, and the system exhibits odorspecific adaptation. Within these constraints, we have tried to build a minimal model. We have taken the bulb module from earlier work by one of us [24,25] and augmented it with a model of the pyriform cortex and with feedforward and feedback connections between it and the bulb. We have ignored many further known details of real olfactory systems that do not bear directly on the fundamental property of stimulus-specific adaptation, and when we have had to go beyond current knowledge (as in constructing the feedback signal) we have done so in a purely phenomenological way, avoiding hypothesizing specific details unrelated  Responses to this odor are shown for 3 successive sniff cycles. The cortical response, although initially weaker than that to pure A or B (Fig. 2) is still appreciable at the 3rd sniff (compare with adaptation to odor A in Fig. 3).
to the function of the system. From the analysis of the model and the simulations we can see how the basic computations necessary for olfactory segmentation might be carried out by the neural networks of the bulb and cortex.
But do real olfactory systems actually function in this way? This can be tested at the level of both the assumptions we put into the model and the properties we find for it. First of all, we have assumed that the feedback from cortex to bulb is slowly varying (i.e. that firing rates for the feedback fibers vary on the timescale of the sniff cycle, but not of the oscillations found in both the bulb and cortex). Furthermore, we have assumed that this feedback is odor-specific. While the existence of some feedback is well-established, neither of these specific hypotheses has been tested experimentally. However they both could be.
Properties we find in the model, beyond the fact that it successfully implements segmentation, can also be tested. These include the following: First, the fact that the feedback signal requires strong cortical activity to drive it means that unfamiliar (unlearnt) odors will not be adapted to as strongly as familiar ones, so they will not be so easily segmented from subsequently presented ones. As we saw in Fig. 5, this expectation also applies to unfamiliar mixtures of familiar odors. Furthermore, as we also noted, we expect the weakening of the (initially weaker) responses with adaptation to be slower for such mixtures than for familiar odors.
Second, cross-adaptation, as illustrated in Fig. 4, is a necessary consequence of the slow feedback: The effective bulb inputĀ ≈ −A, from the previous presence of the adapting stimulus, will be present for some time (depending on the time constants of the feedback circuitry) whether odor A remains in the environment or not. Thus the total input to the bulb with A still present will be very different from that with A suddenly removed. If there is odor-specific adaptation of the kind necessary to perform segmentation when A remains in the environment (A cancelled byĀ), then a different response must occur when A is withdrawn. Present evidence on cross-adaptation is rather limited, but psychophysical and electrophysiological investigation of this phenomenon would be helpful in pinning down quantitatively the time constants of the circuitry involved in segmentation.
If odor-specific adaptation is not implemented using our cortical feedback mechanism, how else might it be done? One possibility to consider is single-unit-level adaptation (or fatigue), which can be implemented in a network like ours by making the threshold for each unit dependent on its own recent activity. In a model with the structure of ours (with bulb and cortical modules) but without feedback, such fatigue would have to be implemented in the bulb; otherwise the activity there would not exhibit adaptation. This presents a problem if the activity patterns of different odors overlap significantly -it is not evident that one can avoid changing the response to a new odor when some of the units active in the normal response to it are to be fatigued. Indeed, in investigations of simple oscillatory associative memories with such adaptation [28], temporal segmentation has been found only for patterns with rather weak mutual overlap. This overlap will be weak for sparse patterns, but it is not clear how sparse real evoked bulb and cortical activity patterns are, when looked at at the level of resolution of the units in our model. This problem is not present for the mechanism we propose, in which bulb units themselves are not fatigued. Rather, the mechanism cancels the input to bulb units in exactly the degree that they receive input from the adapting odor. It is as if every receptor activated by an odor became adapted by an amount exactly equal to its initial response.
In our model, the feedback connections to the inhibitory bulb units have to have just the right values to produce the necessary cancellation. In real olfactory systems, the strengths of the centrifugal synapses on granule cells are presumably determined by some learning mechanism, and for our model to apply it is necessary that this mechanism find the right values for them. As we know nothing about this mechanism, here in our model we just assumed the necessary form. This form has a degree of plausibility because it is Hebbian, but very little is known yet about learning in these synapses. Investigations could shed important light on the validity of this key element of the model.
Another plausible mechanism, which could implement odor-specific adaptation in the bulb in more or less the right manner, is adaptation of receptor-bulb synapses in such a way that the inputs to bulb capture mainly the transient but not static odor inputs. This would reduce the input signal for the adapting odor directly, at just the right places, and so does not suffer from the problems that single-unit fatigue in the bulb does. However, there is a simple difference between the predictions of such a model and ours, since in ours the cortex, functioning as an associative memory, only sends its feedback to the bulb (or only sends it at full strength) for learnt odors. The receptor-mitral synaptic adaptation model would exhibit the same degree of odor-specific adaptation for all odors, learnt or not. Of course, both mechanisms could be present, and the difference could be large or small according to the relative size of the two contributions.
The fact that we have employed both excitatory-to-excitatory (J) and excitatory-toinhibitory (W) cortical connections enhances the associative memory function by permitting oscillation patterns which differ in phase as well as amplitude. This is of no help for selective adaptation in the model as described here, since phase information is lost in the generation of the feedback signal, but this information could be retained using more elaborate mechanisms, as mentioned in Sect. 2.3.
It is not clear whether real olfactory systems code odors in the phases of their oscillation patterns. However, in any case, a restricted version of our cortex, withoutW, could function with only amplitude-modulated patterns, similarly to the model of Wang et al [28]. The addition of intrinsic oscillatory properties for individual units or, implicitly, the individual neurons in the populations they represent, would not change the properties of such a network qualitatively.
The three tasks carried out by the system -detection, recognition, and segmentationare computationally linked. For example, even if an ambiguous or weak odor is "recognized" by the pyriform cortex in the sense that a characteristic oscillatory response is evoked there, that response may be too weak to suppress further bulbar response. Then the system will continue to respond to the odor in the same way as if it had not recognized it; that is, the odor-specific adaptation necessary for segmentation can be seen as part of the recognition process.
While our units correspond to functional groups of neurons in real olfactory systems, our model is of higher resolution than that of Ambros-Ingerson et al [18]. While we emphasize the coding of odor information in distributed oscillation patterns, their model contains no explicit treatment of dynamics on the 40-hz timscale or of the temporal segmentation problem. They address instead a higher-level problem (hierarchical odor classification) with a higher-level model. In such more complex situations, cortex-to-bulb feedback could be a more general, active phenomenon than in the limited-scope problem we consider, but we do not address such issues here.
Our network performs what might be called "the simplest cognitive computation". It is natural to expect that evolution has employed elaborations on this structure in other sensory systems and in central processing. For example, hippocampal processing also employs oscillations, long-range intra-area associative connections, and feedback [29,30]. In another context, work by one of us [31] on visual processing suggests a function for slow feedback to inhibitory neurons from higher areas in modulating the computations carried out in area V1. Our hope is that studying and modeling the olfactory system in the way we have done here will lead to insights into aspects of top-down/bottom-up interactions in other cognitive computations.
Appendix: Bulb-cortex coupling: implementation details Feedforward In the feedforward pathway from bulb to cortex, the mitral unit outputs g x (x i ) are fed both directly to the excitatory cortical units and in parallel, indirectly via feedforward inhibitory units. The process, as indicated schematically in Fig. 1, is described by the equations Here L i is the input signal to the cortical location i, C b→c is the connection matrix that transforms the mitral outputs to the cortical inputs, z i are the membrane potentials of the feedforward inhibitory units, g z (.) is their activation function and α −1 ff is their time constant. I b i is then the total input signal to the i-th cortical excitatory unit in Eqn. (4). In general, this input contains both slowly-varying and rapidly-oscillating components. The pathway via the inhibitory feedforward units acts like a low-pass filter. Thus, the net effect is that the rapidly-varying or high frequency components, which contain the odor information, are transmitted to the cortex.
In the simulations reported in Sect. 3, we took g z (.) to have two regions of different gain values, with a smaller gain at smaller input. We designed σ and the parameters of g z (.) so that the net slow component of I b i pushed the cortical operation pointsū i andv i to stable values close to, but below, their high gain region. Thus the cortex had a stable operating point, enabling it to carry out its associative memory function more cleanly that without this engineering refinement.
We make no claims about biological realism for the details of the feedfoward mechanism. However, some kind of effective high-pass filter is essential to the robust functioning of the model. Further experimental investigation of the dynamical properties of the feedfoward pathway would be important for understanding how it actually works. contain the odor information. This component is extracted by half-wave rectification by the p units. The oscillatory g p (p) is converted to slowly varying signals by two successive slow temporal integrating units q and r. The resulting signal r(t) is fed through the matrix C c→b and modulated with the breathing cycle by a signal m(t) to produce the odor-specific feedback signal to the bulbar granule units. The temporal characteristics of signals from different units are depicted schematically on the right.

Feedback
To generate the half-wave rectified, low-passed feedback signal to the bulb from the cortical excitatory unit outputs, we use three successive groups of units followed by a synaptic matrix, as shown in Fig. 6: p i = −α fast p i + g u (u i ),q i = −α slow q i + g p (p i ),ṙ i = −α ′ slow r i + q i , where m(t) is a modulating signal that synchronizes with breathing, increasing during inhalation and decreasing during exhalation. With a short time constant 1/α fast and a strong nonlinear g p , the p i unit has a output g p (p i ) which is effectively g u (u i ) thresholded above the average signal level. This "rectified" output is then transformed by the two subsequent units q i and r i , both with long time constants 1/α slow and 1/α ′ slow , into a slowly-varying signal, which is modulated by a function m(t) (representing the breathing rhythm of the animal) and fed back via the connections C c→b to produce the centrifugal input I c to the granule units in the bulb.
It is not necessary to use two low-pass filter operations; the model works qualitatively the same with just one. However, adding the second one delays the feedback signal somewhat, giving the oscillations time to establish themselves before the feedback begins to act.
In a more complete model, the large time constants 1/α slow and 1/α ′ slow could emerge as a dynamic network property of secondary olfactory areas. Similarly, the modulating signal m(t) could arise from additional signals from other parts of the brain.