Outline of a pitch controller

[From Peter Cariani (960510, 10 AM EST)]

[From Rick Marken (960509.1110)] [re pitch models]
I would feel more confidence in this assessment
if I saw an actual working
model of a pitch control system based on temporal coding of pitch.
Could you write up an example program to do this?

Ciao, Rick,
I normally do my analysis on spike trains from recorded auditory
nerve fibers, but analogous operations can be done on the
signals themselves. To simplify things, remove any DC components
in the signals, by subtracting their mean value.

The first strategy is an autocorrelation-based approach:
1. Compute the short-term autocorrelation of the signal by taking the
signal X(t) and multiplying it by itself X(t-delay), adding each
term as you go to corresponding delay term in the the
autocorrelation function AC(delay). Increment a counter for each
delay term every time you do this, and at the end divide
each delay term in the unnormalized autocorrelation function by its
corresponding counter to get the normalized autocorrelation function
(or 'unbiased short-time autocorrelation function'). You only need
to compute delays in the range that you're interested in, e.g.
0-15 msec covers all periodicities from 66 Hz up to the Nyquist
limit (half the sampling rate of your signal). Set all near-zero
delay terms to 0, e.g. 0-0.5 msec. The highest peak in this
autocorrelation function corresponds to the low pitch that is heard,
which for a harmonic complex tone will be the fundamental period. If
you want to match by fundamental, zero everything out except for the
highest peak(s), which correspond to 1/F0 and its multiples (2/F0,
3/F0, etc.). If you want to do general stimulus matching, don't
zero out anything (but you may match on common partials).
This operation is neurally roughly equivalent to
  a) the population interspike interval distribution at the level of
     the auditory nerve, for stimulus periodicities < 4-5 kHz and/or
  b) the exitation pattern for a (Lidklider-like) array of
     periodicity detectors.
2. Store this autocorrelation function in memory.
3. Get another incoming signal Y(t), and compute its short-term
autocorrelation function in the same way.
4. Compute the cross-correlation function of the two autocorrelation
functions, ACX(t)*ACY(t-delay) where delay ranges from -15 msec
(or max delay) to + 15 msec. The peak in this (cross-correlation of
autocorrelations) function will tell you how close the two pitches
are and which way to tune the system. If it is at 0 delay,
you are there. A maximum at a positive delay means you tune
F0 of the incoming sound downwards (which will
move the major peak in its AC function upwards, thereby reducing the
difference).

One could do this also with a simulated auditory nerve (cochlear
band-pass functions, hair cell models, auditory nerve fiber spike
generators and all of that, see Meddis & Hewitt, Lyon & Slaney's
papers listed below for details on these approaches),
but I think the essential operations are captured here.
The summed autocorrelations of a set of frequency
channels (after band-pass filtering) is formally equivalent to the
autocorrelation of the unfiltered signal.

Cross-correlation approach.
Here one can simply take the reference signal and store it in
memory. Get the second (test) signal. Compute a (normalized)
cross-correlation function for the two signals, CC(delay) =
Sum[X(t)*Y(t-delay)], finding the best delay (to take out any
absolute relative differences in onset times). For these
purposes, the "best delay" is the temporal alignment between
the two signals that yields the highest CC peak. Align the two
signals using this delay, and take the cross-correlation term
between them using this alignment, i.e. CC(t) = X(t)*Y'(t), where
Y'(t) is the aligned (delayed) Y(t). If the two signals have the
same F0, then all subsequent major peaks spaced at intervals
of 1/F0 (i.e. 2/F0, 3/F0, 4/F0) will be the same height as the
highest peak (now positioned at 0 delay). If their F0's are
slightly different, their heights will gradually decline as
time goes on (such that the slope of this decline gives you a
magnitude of the pitch error). If you take the autocorrelation
of the zero-delay cross-correlation (CC(t)), this can be compared
with the autocorrelation of the reference signal and adjusted
in the same manner as above, using off-zero terms.
The neural interpretation of this is that one has a temporal
memory trace (X(t) that one correlates with an incoming signal
Y(t). The autocorrelation of X(t) is the all-order interspike interval
distribution of X(t) and the autocorrelation of X(t)*Y'(t) is the
interspike interval distribution of the spike trains coming out
of the coincidence detector. Differences in intervals (the error
terms) can be computed easily using sets of tapped delay lines
with (slightly) different conduction times. Then the channel in
which one sees the maximum coindidence tells you the size and
direction of the error.

I hope this helps. I'm not sure when I'll get around to putting this
down in code (probably MATLAB). Despite all appearances, I'm really
swamped with other work..... I have pieces of it from our spike
train analysis, but that just entails analyzing which peaks are
highest in spike autocorrelation histograms. If you're interested
in trying to write a program, I could help you with the details.

References:

Lyon, R., and Shamma, S. Auditory representations of timbre
and pitch. In: Auditory Computation, edited by H. Hawkins,
T. McMullin, A.N. Popper, and R.R. Fay, New York:
Springer Verlag, 1995, p. 517.

Meddis, R., and Hewitt, M.J. Virtual pitch and phase sensitivity
of a computer model of the auditory periphery.
I. Pitch identification. II. Phase sensitivity.
J. Acoust. Soc. Am. 89: 2866-2894, 1991b.

Slaney, M., and Lyon, R.F. On the importance of time -
a temporal representation of sound.
In: Visual Representations of Speech Signals,
edited by M. Cooke, S. Beet, and M. Crawford,
New York: John Wiley, 1993, p. 95-118.

Ghitza, O. Auditory nerve representation as a basis
for speech processing. In: Advances in Speech Signal Processing,
edited by S. Furui and M.M. Sondhi, New York: Marcel Dekker,
1992, p. 453-485. Oded Ghitza isn't interested in pitch per se,
but he has a simple means of generating simulated spike trains
from signals, and his front end does very well at representing
all sorts of speech contrasts.

Good luck,
Peter Cariani

[From Rick Marken (960510.1000)]

Peter Cariani (960510, 10 AM EST) --

The first strategy is an autocorrelation-based approach:

If you take the autocorrelation of the zero-delay cross-correlation >(CC(t)), this can be compared with the autocorrelation of the >reference signal and adjusted in the same manner as above, using >off-zero terms.

I hope this helps.

It sounds like this is one PART of a control model; but it is not a
control model. A control model must turn the result of the comparison
between perception and reference variables into an output that
affects, via the environment, the perceptual representation of the
controlled environmental variable (tone frequency in this case).

I think it would be most worthwhile for you to try to develop a
control model based on an autocorrelation and cross correlation model
of the perceptual and comparison functions (respectively), as you
suggest. I think we would ALL learn a lot from it. It might even
suggest new phenomena to look for in your research.

Best

Rick

[From Bill Powers (960510.1100 MDT)]
(standing in for Rick Marken)

Peter Cariani (960510, 10 AM EST) --

Peter, your designs for a pitch-control system are almost enough by
themselves to convince me that the brain couldn't possibly do it this
way. There may be some element of credibility in your design, but there
is a lot that is left unsaid and unmodelled.

Here, for example, is a rough block diagram of the first method of
perception you describe.

                        --->------------ [TAPPED DELAY LINE]
                       > > > > ... |
incoming --> [GATE] -->--------------->[ARRAY OF MULTIPLIERS]
signal ^ | | | | ... |
               > > [ARRAY OPF SUMMERS] <-- reset
               > > > > > ... |
       reset --|--> [COUNTER] --division->[STORAGE ARRAY]
               > > > > > > ... |+
                -<--[LIMIT]---->-- perception

All of these functions have to be performed by the nervous system,
including the function of setting the count limit, performing the
division when the count limit is reached, and resetting the counter and
the summed outputs of the autocorrelation generator to start generating
the next perception. And what you get is a perceptual signal that
consists of an array of values represented in some unspecified way (as
more interval-coded signals?).

     If you want to match by fundamental, zero everything out except for
     the highest peak(s), which correspond to 1/F0 and its multiples
     (2/F0, 3/F0, etc.). If you want to do general stimulus matching,
     don't zero out anything (but you may match on common partials).

It's easy to say these things when you're talking about a computer
program, but just ask what functions would have to be present in the
nervous system to carry out these operations. Just ask what form the
variables are in (they're clearly not in hexadecimal bits represented by
voltages). Finding the highest peak and its harmonics is no trivial
task. It implies the ability of some neural function to scan the storage
array and measure the magnitude of the stored information to locate the
"highest" peak, then interpret the storage location as an interval,
divide its ordinal number by successive powers of two to find the
harmonics, and then sum just those indexed values while ignoring (or
"zeroing") the rest. And you still haven't said how the actual process
of comparison against a reference is carried out, or what neural form
the stored information or the error signal takes. I don't question that
YOU can perform these operations using the rule-driven methods of
programming and mathematics, but we're talking about low-level neural
processes where such computations don't happen, where discrete symbols
don't even exist.

The problem is that if you set no limits on the complexity of the
computations that these low-level systems can perform, you're going into
the system design business, not that of system analysis. And you're not
answering the critical question, which is "what is the SIMPLEST way the
process of perception could be accomplished?" There's a tendency in
computational neuroscience to forget about practical questions, and
assume that if there's SOME way to accomplish the result, that must be
THE way, regardless of how many theorems have to be proven and how many
thousands of unlikely symbol-handling computations are needed. In fact,
you end up exploring what a modern computer run by a mathematician can
accomplish, not what the nervous system does.

This approach is so complex that I have to be skeptical. I'm sure that
you're right about the necessity for some sorts of auto or cross-
correlation functions, but at some point the result has to be
expressible as a simple analog signal which can be compared by
subtraction with another analog signal. Doing the comparison as you
suggest is just too elborate and clumsy (not to mention too
intelligent), and you don't end up with a single clean representation of
error. Whatever is going on, it has to be FAR simpler than this.

···

-----------------------------------------------------------------------
Best,

Bill P.

[From Peter Cariani, May 10, 1996]

Richard Marken wrote:

It sounds like this is one PART of a control model; but it is not a
control model. A control model must turn the result of the comparison
between perception and reference variables into an output that
affects, via the environment, the perceptual representation of the
controlled environmental variable (tone frequency in this case).

I think it would be most worthwhile for you to try to develop a
control model based on an autocorrelation and cross correlation model
of the perceptual and comparison functions (respectively), as you
suggest. I think we would ALL learn a lot from it. It might even
suggest new phenomena to look for in your research.

I'm not sure what more you'd want. I've given two ways of
computing a signed, "continuous" error signal for adjusting
the fundamental of a harmonic complex tone (that a human being
would hear as its pitch) to match that of another
(or of a pure tone, for that matter).
If you invert this error signal and feed it to a voltage-controlled
motor that slowly turns a knob that changes
the fundamental frequency of the test signal, reference and
test fundamentals (F0's) will converge.

···

-------------------------------

[From Bill Powers (960510.1100 MDT)]
Peter, your designs for a pitch-control system are almost enough by
themselves to convince me that the brain couldn't possibly do it this
way. There may be some element of credibility in your design, but
there is a lot that is left unsaid and unmodelled.

It's incredible to me that you don't listen at all to the purpose
of the procedure that I was asked for and provided. Rick asked me
for a controller for pitch, not for a neural account, and I gave him
the simplest (digital) computational strategy I know of for computing
this from digitized signal. You're way, way off base if you think
I am (or would ever, EVER) propose this as the way that the brain does
it. Frankly, I would have expected a bit more reflection on your
part.

It's easy to say these things when you're talking about a computer
program, but just ask what functions would have to be present in the
nervous system to carry out these operations. Just ask what form the
variables are in (they're clearly not in hexadecimal bits
represented by voltages). Finding the highest peak and its
harmonics is no trivial task. It implies the ability of some
neural function to scan the storage array and measure
the magnitude of the stored information to locate the
"highest" peak, then interpret the storage location as an interval,
divide its ordinal number by successive powers of two to find the
harmonics, and then sum just those indexed values while ignoring (or
"zeroing") the rest. And you still haven't said how the actual process
of comparison against a reference is carried out, or what neural form
the stored information or the error signal takes.
I don't question that
YOU can perform these operations using the rule-driven methods of
programming and mathematics, but we're talking about low-level neural
processes where such computations don't happen, where discrete symbols
don't even exist.

Clue: we're not at all talking about low, level neural processes here.

Look, the autocorrelation function of the stimulus is embedded in the
population interspike interval distribution, and the most common
interval in that distribution corresponds to the pitch that is
heard. All a central processor need do is to find that most
common interval. It can be done by an array of "periodicity
detectors" a la Licklider or it can be done by a cross-correlation
sieve.

It is YOU who are oversimplifying the problem of the central
computation of pitch. Pitch is a "complex percept" -- the models
I am talking about deal with the pitches produced by complex tones
with many harmonics, and they can deal with pure tone pitches
below a few kHz (although they do not account for subtle (1-5%),
secondary and tertiary effects of pure tone pitches like
binaural diplacusis and level-dependent pitch shifts. MANY, VERY
DIFFERENT STIMULI WITH VERY, VERY DIFFERENT POWER SPECTRA give
rise to the same (low) pitch at their fundamental. This is a
big, big problem in form perception. You should
really look at what kinds of inputs and precise connections are
necessary to do this in your rate-place model, and whether they
can do this under different conditions, like at high levels.
This rate-based model that was proposed a couple of days ago
doesn't even deal with the "problem of pitch" and I don't see
how this even works for pure tone pitches:

From Bill Powers (960509.1330 MDT)]
In a rate-coded system, the specific model is
straightforward. Both the perceptual signal and
the reference signal are measured in impulses per
second. The reference signal is excitatory and the
perceptual signal is inhibitory; the error signal is
proportional to the excess of excitation over inhibition.
For two-way action, a duplicate comparator is required
with the signs of the inputs interchanged.

Nowhere in the auditory system has anyone seen any kind of code
where firing rate is a monotonic function of stimulus frequency.
I think there are some very basic misunderstandings here that
involve conflating "average rate of discharge" with "frequency
(periodicity) of discharge" -- in general firing rates do not
increase as pure tone frequencies increase (from 100-10kHz).
For spectrally-complex stimuli that give rise to low pitches,
one with a fundamental frequency of 200 Hz will not yield
more or fewer spikes than one at 220 Hz. The numbers of spikes
produced are a function of the level, not the fundamental
frequency! Those models for pitch that are not based on
interval distributions are based on very complex pattern
analysis on the relative rates of discharge in frequency
channels, and these models cannot explain 1) the pitch of
unresolved harmonics, when rates do not resolve the frequency
components that make up the pattern or 2) the pitch of
"spectrally-flat" stimuli, like AM noise (they have problems
with this unless they go to very short time windows, which
create other problems). Maybe you can explain to me how
a 160 Hz pure tone, harmonics 6-20 of a 160 Hz fundamental,
AM noise with Fm=160 Hz, and a click train with a 160 Hz
fundamental can all be matched within 1% to each other, using
a neurally-plausible rate-based processing.

The problem is that if you set no limits on the complexity of the
computations that these low-level systems can perform,
you're going into the system design business,
not that of system analysis. And you're not
answering the critical question,
which is "what is the SIMPLEST way the
process of perception could be accomplished?" There's a tendency in
computational neuroscience to forget about practical questions, and
assume that if there's SOME way to accomplish the result, that must be
THE way, regardless of how many theorems have to be proven
and how many thousands of unlikely symbol-handling computations are
needed. In fact, you end up exploring what a modern computer run
by a mathematician can accomplish, not what the nervous system does.

What galls me the most about these statements is how diametrically
opposed to the real-life situation they are, both for me in
particular and for "computational neuroscience" in general.
Nobody has proposed a physiologically-plausible way in
which the pitches of complex tones might be computed
by the auditory system using rate-place
patterns in auditory maps. The spectral pattern pitch models assume
that one can 1) resolve all the peaks of the component frequencies
2) estimate the absolute frequencies involved with high accuracies
and 3) do a harmonic analysis to infer the greatest common denominator
of the frequency peaks, and do this over huge ranges in level, in
noise, for auditory objects situated in various locations in
auditory space, etc, etc etc. Even if one uses spectral "templates",
these are complex, you'd need a hell-of-alot of them for all the
relative level, location, and s/n conditions that are encountered.
The spatial, template-matching process is far from trivial and
requires precise point-to-point mappings and adjustment of
synaptic weights (and for different levels!). It's an absolute
nightmare to deal with the real problem instead of postulating
some process that yields a "rate" that monotonically increases
with pitch. The interval-based models have harmonic structure
embedded within them, so that all of the complicated, precise
estimation of component frequencies and inference of the fundamental
is neurally taken care of in a very simple and elegant way.

This approach is so complex that I have to be skeptical. I'm sure that
you're right about the necessity for some sorts of auto or cross-
correlation functions, but at some point the result has to be
expressible as a simple analog signal which can be compared by
subtraction with another analog signal. Doing the comparison as you
suggest is just too elborate and clumsy (not to mention too
intelligent), and you don't end up with a single clean
representation of error. Whatever is going on,
it has to be FAR simpler than this.

I shouldn't go on, because it's apparent the whole boat was missed
way up at the beginning. You think of subtraction of signals,
but correlation between signals is also easy to do with analog
signals (whether you get anything out of your cross-correlator,
or whether there is "beating" in the output -- this is how
human beings tune musical instruments). I supplied a way to get the
error signals for a very complex problem, but you don't understand
the problem, so it seems more complex than the very simple
problem you do understand.

I really come away from this thinking that answering
questions here about either specific computational operations or about
possible neural mechanisms (or about anything, at this point)
is a total waste of time. Meditate on the significance of the
optical interferometry telescope and the difference between it and
those that look at photon "rates" in different channels. Think about
spike periodicities and spike counts in this context.
Pop guns, indeed.

Peter Cariani