Neural codes are the patterns made by firing neurons. Individual neurons fire under particular stimuli, and the space of possible stimuli for a set of neurons is commonly modeled as some Euclidean space \(\mathbb{R}^d\). The region in this stimulus space in which an individual neuron \(i\) fires is called the receptive field \(U_i\) of that neuron.

Given a set of neurons \([n] = \{1, 2, \dots, n\}\), the collection of their receptive fields \(\mathcal{U} = \{U_i \}_{i=1}^n\) is called a cover, and the code of \(\mathcal{U}\) is defined as follows. Elements \(\sigma\) of the code are called codewords.

\[\textrm{code}(\mathcal{U}) =\{\sigma \subseteq [n] \, | \, ( \bigcap_{i \in \sigma} U_i ) \setminus (\bigcup_{j \not \in \sigma} U_j ) \neq \varnothing \}\]

For example, consider the cover \(\mathcal{U}\) on four neurons in the following image. For this cover, the code is \(\textrm{code}(\mathcal{U}) = \{ 1, 3, 12, 34, 123, 134\}\). For ease of reading, and when there can be no confusion, the codewords are written as strings instead of sets. For example, the codeword \(123\) is shorthand for \(\{1, 2, 3\}\).

An example of a cover

In practice, we want to go the other way. That is, given a particular code \(\mathcal{C} \subset 2^{[n]}\), what receptive fields are there which have \(\mathcal{C}\) as their code? A cover which has a specified code is called a realization of that code. Without extra assumptions on the structure of the individual receptive fields, any code is realizable by receptive fields in \(\mathbb{R}^1\). Neuroscientists often assume that receptive fields are convex regions of some Euclidean space. If a code is realizable by convex sets, then it is called a convex code.

Not all codes are convex, however, and detecting convexity of a code is an active area of research in mathematical neuroscience.