Sparse models for Computer Vision

ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

The central nervous system is a dynamical, adaptive organ which constantly evolves to provide optimal decisions1 for interacting with the environment. The early visual pathways provides with a powerful system for probing and modeling these mechanisms. For instance, the primary visual cortex of primates (V1) is absolutely central for most visual tasks. There, it is observed that some neurons from the input layer of V1 present a selectivity for localized, edge-like features -as represented by their "receptive fields" [START_REF] Hubel | Receptive fields and functional architecture of monkey striate cortex[END_REF]. Crucially, there is experimental evidence for sparse firing in the neocortex [START_REF] Barth | Experimental evidence for sparse firing in the neocortex[END_REF][START_REF] Willmore | Sparse coding in striate and extrastriate visual cortex[END_REF] and in particular in V1. A representation is sparse when each input signal is associated with a relatively small sub-set of simultaneously activated neurons within a whole population. For instance, orientation selectivity of simple cells is sharper than the selectivity that would be predicted by linear filtering. Such a procedure produces a rough "sketch" of the image on the surface of V1 that is believed to serve as a "blackboard" for higher-level cortical areas [START_REF] Marr | Vision: A Computational Investigation into the Human Representation and Processing of Visual Information[END_REF]. However, it is still largely unknown how neural computations act in V1 to represent the image. More specifically, what is the role of sparseness -as a generic neural signature-in the global function of neural computations?

A popular view is that such a population of neurons operates such that relevant sensory information from the retino-thalamic pathway is transformed (or "coded") efficiently. Such efficient representation will allow decisions to be taken optimally in higher-level areas. In this framework, optimality is defined in terms of information theory [START_REF] Attneave | Some informational aspects of visual perception[END_REF][START_REF] Atick | Could information theory provide an ecological theory of sensory processing? Network[END_REF][START_REF] Wolfe | Sparse and powerful cortical spikes[END_REF]. For instance, the representation produced by the neural activity in V1 is sparse: It is believed that this reduces redundancies and allows to better segregate edges in the image [START_REF] Field | What is the goal of sensory coding?[END_REF][START_REF] Froudarakis | Population code in mouse V1 facilitates readout of natural scenes through increased sparseness[END_REF]. This optimization is operated given biological constraints, such as the limited bandwidth of information transfer to higher processing stages or the limited amount of metabolic resources (energy or wiring length). More generally it allows to increase the storage capacity of associative memories before memory patterns start to interfere with each other [START_REF] Palm | Neural associative memories and sparse coding[END_REF]. Moreover, it is now widely accepted that this redundancy reduction is achieved in a neural population through lateral interactions. Indeed, a link between anatomical data and a functional connectivity between neighboring representations of edges has been found [START_REF] William | Orientation selectivity and the arrangement of horizontal connections in tree shrew striate cortex[END_REF], though their conclusions were more recently refined to show that this process may be more complex [START_REF] Hunt | Statistical structure of lateral connections in the primary visual cortex[END_REF]. By linking neighboring neurons representing similar features, one allows thus a more efficient representation in V1. As computer vision systems are subject to similar constraints, applying such a paradigm therefore seems a promising approach towards more biomimetic algorithms.

It is believed that such a property reflects the efficient match of the representation with the statistics of natural scenes, that is, to behaviorally relevant sensory inputs. Indeed, sparse representations are prominently observed for cortical responses to natural stimuli [START_REF] Field | Relations between the statistics of natural images and the response properties of cortical cells[END_REF][START_REF] Vinje | Sparse coding and decorrelation in primary visual cortex during natural vision[END_REF][START_REF] Michael | Binary spiking in auditory cortex[END_REF][START_REF] Baudot | Animation of natural scene by virtual eye-movements evokes high precision and low noise in V1 neurons[END_REF]. As the function of neural systems mostly emerges from unsupervised learning, it follows that these are adapted to the input which are behaviorally the most common and important. More generally, by being adapted to natural scenes, this shows that sparseness is a neural signature of an underlying optimization process. In fact, one goal of neural computation in low-level sensory areas such as V1 is to provide relevant predictions [START_REF] Rao | Predictive coding in the visual cortex: a functional interpretation of some extra-classical receptive-field effects[END_REF][START_REF] Spratling | A single functional model accounts for the distinct properties of suppression in cortical area V1[END_REF]. This is crucial for living beings as they are often confronted with noise (internal to the brain or external, such as in low light conditions), ambiguities (such as inferring a three dimensional slant from a bi-dimensional retinal image). Also, the system has to compensate for inevitable delays, such as the delay from light stimulation to activation in V1 which is estimated to be of 50 ms in humans. For instance, a tennis ball moving at 20 m s -1 at one meter in the frontal plane elicits an input activation in V1 corresponding to around 45 • of visual angle behind its physical position [START_REF] Perrinet | Active inference, eye movements and oculomotor delays[END_REF]. Thus, to be able to translate such knowledge to the computer vision community, it is crucial to better understand why the neural processes that produce sparse coding are efficient.

Sparseness induces neural organization

A breakthrough in the modeling of the representation in V1 was the discovery that sparseness is sufficient to induce the emergence of receptive fields similar to V1 simple cells [START_REF] Olshausen | Natural image statistics and efficient coding[END_REF]. This reflects the fact that, at the learning time scale, coding is optimized relative to the statistics of natural scenes such that independent components of the input are represented [START_REF] Olshausen | Sparse coding with an overcomplete basis set: A strategy employed by V1?[END_REF][START_REF] Bell | The 'independent components' of natural scenes are edge filters[END_REF]. The emergence of edge-like simple cell receptive fields in the input layer of area V1 of primates may thus be considered as a coupled coding and learning optimization problem: At the coding time scale, the sparseness of the representation is optimized for any given input while at the learning time scale, synaptic weights are tuned to achieve on average an optimal representation efficiency over natural scenes. This theory has allowed to connect the different fields by providing a link between information theory models, neuromimetic models and physiological observations.

In practice, most sparse unsupervised learning models aim at optimizing a cost defined on prior assumptions on the sparseness of the representation. These sparse learning algorithms have been doi:10.1002/9783527680863.ch14 applied both for images [START_REF] Fyfe | Finding compact and sparse-distributed representations of visual images[END_REF][START_REF] Olshausen | Natural image statistics and efficient coding[END_REF][START_REF] Zibulevsky | Blind Source Separation by sparse decomposition[END_REF][START_REF] Perrinet | Coding static natural images using spiking event times: Do neurons cooperate[END_REF][START_REF] Rehn | A model that uses few active neurones to code visual input predicts the diverse shapes of cortical receptive fields[END_REF][START_REF] Doi | Robust coding over noisy overcomplete channels[END_REF][START_REF] Perrinet | Role of homeostasis in learning sparse representations[END_REF] and sounds [START_REF] Lewicki | Learning overcomplete representations[END_REF][START_REF] Smith | Efficient auditory coding[END_REF]. Sparse coding may also be relevant to the amount of energy the brain needs to use to sustain its function. The total neural activity generated in a brain area is inversely related to the sparseness of the code, therefore the total energy consumption decreases with increasing sparseness. As a matter of fact the probability distribution functions of neural activity observed experimentally can be approximated by so-called exponential distributions, which have the property of maximizing information transmission for a given mean level of activity [START_REF] Baddeley | Responses of neurons in primary and inferior temporal visual cortices to natural scenes[END_REF]. To solve such constraints, some models thus directly compute a sparseness cost based on the representation's distribution. For instance, the kurtosis corresponds to the 4th statistical moment (the first three moments being in order the mean, variance and skewness) and measures how the statistics deviates from a Gaussian: A positive kurtosis measures if this distribution has an "heavier tail" than a Gaussian for a similar variance -and thus corresponds to a sparser distribution. Based on such observations, other similar statistical measures of sparseness have been derived in the neuroscience literature [START_REF] Vinje | Sparse coding and decorrelation in primary visual cortex during natural vision[END_REF].

A more general approach is to derive a representation cost. For instance, learning is accomplished in the SparseNet algorithmic framework [START_REF] Olshausen | Sparse coding with an overcomplete basis set: A strategy employed by V1?[END_REF] on image patches taken from natural images as a sequence of coding and learning steps. First, sparse coding is achieved using a gradient descent over a convex cost. We will see later in this chapter how this cost is derived from a prior on the probability distribution function of the coefficients and how it favors the sparseness of the representation. At this step, the coding is performed using the current state of the "dictionary" of receptive fields. Then, knowing this sparse solution, learning is defined as slowly changing the dictionary using Hebbian learning [START_REF] Hebb | The organization of behavior: A neuropsychological theory[END_REF]. As we will see later, the parameterization of the prior has a major impact on the results of the sparse coding and thus on the emergence of edge-like receptive fields and requires proper tuning. Yet, this class of models provides a simple solution to the problem of sparse representation in V1.

However, these models are quite abstract and assume that neural computations may estimate some rather complex measures such as gradients -a problem that may also be faced by neuromorphic systems. Efficient, realistic implementations have been proposed which show that imposing sparseness may indeed guide neural organization in neural network models, see for instance [START_REF] Zylberberg | A sparse coding model with synaptically local plasticity and spiking neurons can account for the diverse shapes of V1 simple cell receptive fields[END_REF][START_REF] Hunt | Sparse coding can predict primary visual cortex receptive field changes induced by abnormal visual input[END_REF]. Additionally, it has also been shown that in a neuromorphic model, an efficient coding hypothesis links sparsity and selectivity of neural responses [START_REF] Blättler | An efficient coding hypothesis links sparsity and selectivity of neural responses[END_REF]. More generally, such neural signatures are reminiscent of the shaping of neural activity to account for contextual influences. For instance, it is observed that -depending on the context outside the receptive field of a neuron in area V1-the tuning curve may demonstrate a modulation of its orientation selectivity. This was accounted for instance as a way to optimize the coding efficiency of a population of neighboring neurons [START_REF] Seriès | Tuning curve sharpening for orientation selectivity: coding efficiency and the impact of correlations[END_REF]. As such, sparseness is a relevant neural signature for a large class of neural computations implementing efficient coding.

Outline: Sparse models for Computer Vision

As a consequence, sparse models provide a fruitful approach for computer vision. It should be noted that other popular approaches for taking advantage of sparse representations exist. The most popular is compressed sensing [START_REF] Ganguli | Compressed sensing, sparsity, and dimensionality in neuronal information processing and data analysis[END_REF], for which it has been proven that -assuming sparseness in the input, it is possible to reconstruct the input from a sparse choice of linear coefficients computed from randomly drawn basis functions. Note also that some studies also focus on temporal sparseness. Indeed, by computing for a given neuron the relative numbers of active events relative to a given time window, one computes the so-called lifetime sparseness (see for instance [START_REF] Willmore | Sparse coding in striate and extrastriate visual cortex[END_REF]). We will see below that this measure may be related to population sparseness. For a review of sparse modeling approaches, we refer to [START_REF] Elad | Sparse and Redundant Representations: From Theory to Applications in Signal and Image Processing[END_REF]. Herein, we will focus on the particular sub-set of such models based on their biological relevance.

Indeed, we will rather focus on biomimetic sparse models as tools to shape future computer vision algorithms [START_REF] Benoit | Using human visual system modeling for bioinspired low level image processing[END_REF][START_REF] Serre | A neuromorphic approach to computer vision[END_REF]. In particular, we will not review models which mimic neural activity, but rather on algorithms which mimic their efficiency, bearing in mind the constraints that are linked to neural systems (no central clock, internal noise, parallel processing, metabolic cost, wiring length). For that purpose, we will complement some previous studies [START_REF] Perrinet | Coding static natural images using spiking event times: Do neurons cooperate[END_REF]Fischer et al., 2007a;[START_REF] Perrinet | Adaptive sparse spike coding : applications of neuroscience to the compression of natural images[END_REF][START_REF] Perrinet | Role of homeostasis in learning sparse representations[END_REF] (for a review see [START_REF] Perrinet | Modeling spatial integration in the ocular following response using a probabilistic framework[END_REF]) by putting these results in light of most recent theoretical and physiological findings.

This chapter is organized as follows. First, in Section 14.2 we will outline how we may implement the unsupervised learning algorithm at a local scale for image patches. Then we will extend in Section 14.3 such an approach to full scale natural images by defining the SparseLets framework. Such formalism will then be extended in Section 14.4 to include context modulation, for instance from higher-order areas. These different algorithms (from the local scale of image patches to more global scales) will each be accompanied by a supporting implementation (with the source code) for which we will show example usage and results. We will in particular highlight novel results and then draw some conclusions on the perspective of sparse models for computer vision. More specifically, we will propose that bio-inspired approaches may be applied to computer vision using predictive coding schemes, sparse models being one simple and efficient instance of such schemes.

14.2 What is sparseness? Application to image patches

Definitions of sparseness

In low-level sensory areas, the goal of neural computations is to generate efficient intermediate representations as we have seen that this allows more efficient decision making. Classically, a representation is defined as the inversion of an internal generative model of the sensory world, that is, by inferring the sources that generated the input signal. Formally, as in [START_REF] Olshausen | Sparse coding with an overcomplete basis set: A strategy employed by V1?[END_REF], we define a Generative Linear Model (GLM) for describing natural, static, grayscale image patches I (represented by column vectors of dimension L pixels), by setting a "dictionary" of M images (also called "atoms" or "filters") as the L × M matrix Φ = {Φ i } 1≤i≤M . Knowing the associated "sources" as a vector of coefficients a = {a i } 1≤i≤M , the image is defined using matrix notation as a sum of weighted atoms:

I = Φa + n (14.1)
where n is a Gaussian additive noise image. This noise, as in [START_REF] Olshausen | Sparse coding with an overcomplete basis set: A strategy employed by V1?[END_REF], is scaled to a variance of σ 2 n to achieve decorrelation by applying Principal Component Analysis to the raw input images, without loss of generality since this preprocessing is invertible. Generally, the dictionary Φ may be much larger than the dimension of the input space (that is, if M L) and it is then said to be over-complete. However, given an over-complete dictionary, the inversion of the GLM leads to a combinatorial search and typically, there may exist many coding solutions a to Eq. 14.1 for one given input I. The goal of efficient coding is to find, given the dictionary Φ and for any observed signal I, the "best" representation vector, that is, as close as possible to the sources that generated the signal. Assuming that for simplicity, each individual coefficient is represented in the neural activity of a single neuron, this would justify the fact that this activity is sparse. It is therefore necessary to define an efficiency criterion in order to choose between these different solutions.

Using the GLM, we will infer the "best" coding vector as the most probable. In particular, from the physics of the synthesis of natural images, we know a priori that image representations are sparse: They are most likely generated by a small number of features relatively to the dimension M of the representation space. Similarly to [START_REF] Lewicki | Learning overcomplete representations[END_REF], this can be formalized in the probabilistic framework defined by the GLM (see Eq. 14.1), by assuming that knowing the prior distribution of the coefficients a i for natural images, the representation cost of a for one given natural image is:

C(a|I, Φ) def = -log P (a|I, Φ) = log P (I) -log P (I|a, Φ) -log P (a|Φ) = log P (I) + 1 2σ 2 n I -Φa 2 - i log P (a i |Φ) (14.2)
where P (I) is the partition function which is independent of the coding (and that we thus ignore in the following) and • is the L 2 -norm in image space. This efficiency cost is measured in bits if the logarithm is of base 2, as we will assume without loss of generality thereafter. For any representation a, the cost value corresponds to the description length [START_REF] Rissanen | Modeling by shortest data description[END_REF]: On the right hand side of Eq. 14.2, the second term corresponds to the information from the image which is not coded by the representation (reconstruction cost) and thus to the information that can be at best encoded using entropic coding pixel by pixel (that is, the negative log-likelihood -log P (I|a, Φ) in Bayesian terminology, see chapter 009_series for Bayesian models applied to computer vision). The third term S(a|Φ) =i log P (a i |Φ) is the representation or sparseness cost: It quantifies representation efficiency as the coding length of each coefficient of a which would be achieved by entropic coding knowing the prior and assuming that they are independent. The rightmost penalty term (see Equation 14.2) gives thus a definition of sparseness S(a|Φ) as the sum of the log prior of coefficients.

In practice, the sparseness of coefficients for natural images is often defined by an ad hoc parameterization of the shape of the prior. For instance, the parameterization in [START_REF] Olshausen | Sparse coding with an overcomplete basis set: A strategy employed by V1?[END_REF] yields the coding cost:

C 1 (a|I, Φ) = 1 2σ 2 n I -Φa 2 + β i log(1 + a 2 i σ 2 ) (14.3)
where β corresponds to the steepness of the prior and σ to its scaling (see Figure 13.2 from [START_REF] Olshausen | Sparse codes and spikes[END_REF]). This choice is often favored because it results in a convex cost for which known numerical optimization methods such as conjugate gradient may be used. In particular, these terms may be put in parallel to regularization terms that are used in computer vision. For instance, a L2-norm penalty term corresponds to Tikhonov regularization [START_REF] Tikhonov | Solutions of Ill-Posed Problems[END_REF] or a L1-norm term corresponds to the Lasso method. See chapter 003_holly_gerhard for a review of possible parametrization of this norm, for instance by using nested L p norms. Classical implementation of sparse coding rely therefore on a parametric measure of sparseness. Let's now derive another measure of sparseness. Indeed, a non-parametric form of sparseness cost may be defined by considering that neurons representing the vector a are either active or inactive. In fact, the spiking nature of neural information demonstrates that the transition from an inactive to an active state is far more significant at the coding time scale than smooth changes of the firing rate. This is for instance perfectly illustrated by the binary nature of the neural code in the auditory cortex of rats [START_REF] Michael | Binary spiking in auditory cortex[END_REF]. Binary codes also emerge as optimal neural codes for rapid signal transmission [START_REF] Bethge | Second order phase transition in neural rate coding: Binary encoding is optimal for rapid signal transmission[END_REF][START_REF] Nikitin | Neural population coding is optimized by discrete tuning curves[END_REF]. This is also relevant for neuromorphic systems which transmit discrete events (such as a network packet). With a binary event-based code, the cost is only incremented when a new neuron gets active, regardless to the analog value.

Stating that an active neuron carries a bounded amount of information of λ bits, an upper bound for the representation cost of neural activity on the receiver end is proportional to the count of active neurons, that is, to the 0 pseudo-norm a 0 :

C 0 (a|I, Φ) = 1 2σ 2 n I -Φa 2 + λ a 0 (14.4)
This cost is similar with information criteria such as the Akaike Information Criteria [START_REF] Akaike | A new look at the statistical model identification[END_REF] or distortion rate (Mallat, 1998, p. 571). This simple non-parametric cost has the advantage of being dynamic: The number of active cells for one given signal grows in time with the number of spikes reaching the target population. But Eq. 14.4 defines a harder cost to optimize (in comparison to Equation 14.3 for instance) since the hard 0 pseudo-norm sparseness leads to a non-convex optimization problem which is NP-complete with respect to the dimension M of the dictionary (Mallat, 1998, p. 418).

Learning to be sparse: the SparseNet algorithm

We have seen above that we may define different models for measuring sparseness depending on our prior assumption on the distribution of coefficients. Note first that, assuming that the statistics are stationary (more generally ergodic), then these measures of sparseness across a population should necessary imply a lifetime sparseness for any neuron. Such a property is essential to extend results from electro-physiology. Indeed, it is easier to record a restricted number of cells than a full population (see for instance [START_REF] Willmore | Sparse coding in striate and extrastriate visual cortex[END_REF]). However, the main property in terms of efficiency is that the representation should be sparse at any given time, that is, in our setting, at the presentation of each novel image. Now that we have defined sparseness, how could we use it to induce neural organization? Indeed, given a sparse coding strategy that optimizes any representation efficiency cost as defined above, we may derive an unsupervised learning model by optimizing the dictionary Φ over natural scenes. On the one hand, the flexibility in the definition of the sparseness cost leads to a wide variety of proposed sparse coding solutions (for a review, see [START_REF] Arthur | The problem of sparse image coding[END_REF]) such as numerical optimization [START_REF] Olshausen | Sparse coding with an overcomplete basis set: A strategy employed by V1?[END_REF], non-negative matrix factorization [START_REF] Lee | Learning the parts of objects by non-negative matrix factorization[END_REF][START_REF] Marc | Efficient learning of sparse overcomplete representations with an Energy-Based model[END_REF] or Matching Pursuit [START_REF] Perrinet | Coding static natural images using spiking event times: Do neurons cooperate[END_REF][START_REF] Smith | Efficient auditory coding[END_REF][START_REF] Rehn | A model that uses few active neurones to code visual input predicts the diverse shapes of cortical receptive fields[END_REF][START_REF] Perrinet | Role of homeostasis in learning sparse representations[END_REF]. They are all derived from correlation-based inhibition since this is necessary to remove redundancies from the linear representation. This is consistent with the observation that lateral interactions are necessary for the formation of elongated receptive fields [START_REF] Bolz | The role of horizontal connections in generating long receptive fields in the cat visual cortex[END_REF][START_REF] Wolfe | Sparse and powerful cortical spikes[END_REF].

On the other hand, these methods share the same GLM model (see Eq. 14.1) and once the sparse coding algorithm is chosen, the learning scheme is similar. As a consequence, after every coding sweep, we increased the efficiency of the dictionary Φ with respect to Eq. 14.2. This is achieved using the online gradient descent approach given the current sparse solution, ∀i:

Φ i ← Φ i + η • a i • (I -Φa) (14.5)
where η is the learning rate. Similarly to Eq. 17 in [START_REF] Olshausen | Sparse coding with an overcomplete basis set: A strategy employed by V1?[END_REF] or to Eq. 2 in [START_REF] Smith | Efficient auditory coding[END_REF], the relation is a linear "Hebbian" rule [START_REF] Hebb | The organization of behavior: A neuropsychological theory[END_REF] since it enhances the weight of neurons proportionally to the correlation between pre-and post-synaptic neurons. Note that there is no learning for non-activated coefficients. The novelty of this formulation compared to other linear Hebbian learning rule such as [START_REF] Oja | A Simplified Neuron Model as a Principal Component Analyzer[END_REF] is to take advantage of the sparse representation, hence the name Sparse Hebbian Learning (SHL). The class of SHL algorithms are unstable without homeostasis, that is, without a process that maintains the system in a certain equilibrium. In fact, starting with a random dictionary, the first filters to learn are more likely to correspond to salient features [START_REF] Perrinet | Coding static natural images using spiking event times: Do neurons cooperate[END_REF] and are therefore more likely to be selected again in subsequent learning steps. In SparseNet, the homeostatic gain control is implemented by adaptively tuning the norm of the filters. This method equalizes the variance of coefficients across neurons using a geometric stochastic learning rule. The underlying heuristic is that this introduces a bias in the choice of the active coefficients. In fact, if a neuron is not selected often, the geometric homeostasis will decrease the norm of the corresponding filter, and therefore -from Eq. 14.1 and the conjugate gradient optimization-this will increase the value of the associated scalar. Finally, since the prior functions defined in Eq. 14.3 are identical for all neurons, this will increase the relative probability that the neuron is selected with a higher relative [START_REF] Olshausen | Natural image statistics and efficient coding[END_REF] with first, random dictionaries (respectively 'ssc-init' and 'cg-init') and second, with the dictionaries obtained after convergence of respective learning schemes (respectively 'ssc' and 'cg'). At convergence, sparse coefficients are more sparsely distributed than initially, with more kurtotic probability distribution functions for 'ssc' in both cases, as can be seen in the "longer tails"of the distribution. (C) We evaluate the coding efficiency of both methods by plotting the average residual error (L 2 norm) as a function of the 0 pseudo-norm. This provides a measure of the coding efficiency for each dictionary over the set of image patches (error bars represent one standard deviation). Best results are those providing a lower error for a given sparsity (better compression) or a lower sparseness for the same error.

value. The parameters of this homeostatic rule have a great importance for the convergence of the global algorithm. In [START_REF] Perrinet | Role of homeostasis in learning sparse representations[END_REF], we have derived a more general homeostasis mechanism derived from the optimization of the representation efficiency through histogram equalization which we will describe later (see Section 14.4.1).

Results: efficiency of different learning strategies

The different SHL algorithms simply differ by the coding step. This implies that they only differ by first, how sparseness is defined at a functional level and second, how the inverse problem corresponding to the coding step is solved at the algorithmic level. Most of the schemes cited above use a less strict, parametric definition of sparseness (like the convex L 1 -norm), but for which a mathematical formulation of the optimization problem exists. Few studies such as [START_REF] Liu | Hebbian-based mean shift for learning the diverse shapes of V1 simple cell receptive fields[END_REF][START_REF] Peharz | Sparse nonnegative matrix factorization with l0-constraints[END_REF] use the stricter 0 pseudo-norm as the coding problem gets more difficult. A thorough comparison of these different strategies was recently presented in [START_REF] Charles | A common network architecture efficiently implements a variety of Sparsity-Based inference problems[END_REF]. See also [START_REF] Aharon | On the uniqueness of overcomplete dictionaries, and a practical way to retrieve them[END_REF] for properties of the coding solutions to the 0 pseudo-norm. Similarly, in [START_REF] Perrinet | Role of homeostasis in learning sparse representations[END_REF], we preferred to retrieve an approximate solution to the coding problem to have a better match with the measure of efficiency Eq. 14.4. doi:10.1002/9783527680863.ch14

Such an algorithmic framework is implemented in the SHL-scripts package2 . These scripts allow the retrieval of the database of natural images and the replication of the results of [START_REF] Perrinet | Role of homeostasis in learning sparse representations[END_REF] reported in this section. With a correct tuning of parameters, we observed that different coding schemes show qualitatively a similar emergence of edge-like filters. The specific coding algorithm used to obtain this sparseness appears to be of secondary importance as long as it is adapted to the data and yields sufficiently efficient sparse representation vectors. However, resulting dictionaries vary qualitatively among these schemes and it was unclear which algorithm is the most efficient and what was the individual role of the different mechanisms that constitute SHL schemes. At the learning level, we have shown that the homeostasis mechanism had a great influence on the qualitative distribution of learned filters [START_REF] Perrinet | Role of homeostasis in learning sparse representations[END_REF].

Results are shown in Figure 14.1. This figure represents the qualitative results of the formation of edge-like filters (receptive fields). More importantly, it shows the quantitative results as the average decrease of the squared error as a function of the sparseness. This gives a direct access to the cost as computed in Equation 14.4. These results are comparable with the SparseNet algorithm. Moreover, this solution, by giving direct access to the atoms (filters) that are chosen, provides with a more direct tool to manipulate sparse components. One further advantage consists in the fact that this unsupervised learning model is non-parametric (compare with Eq. 14.3) and thus does not need to be parametrically tuned. Results show the role of homeostasis on the unsupervised algorithm. In particular, using the comparison of coding and decoding efficiency with and without this specific homeostasis, we have proven that cooperative homeostasis optimized overall representation efficiency (see also Section 14.4.1).

It is at this point important to note that in this algorithm, we achieve an exponential convergence of the squared error (Mallat, 1998, p. 422), but also that this curve can be directly derived from the coefficients' values. Indeed, for N coefficients (that is, a 0 = N ), we have the squared error equal to:

E N def = I -Φa 2 / I 2 = 1 - 1≤k≤N a 2 k / I 2 (14.6)
As a consequence, the sparser the distributions of coefficients, then quicker is the decrease of the residual energy. In the following section, we will describe different variations of this algorithm. To compare their respective efficiency, we will plot the decrease of the coefficients along with the decrease of the residual's energy. Using such tools, we will now explore if such a property extends to full-scale images and not only to image patches, an important condition for using sparse models in computer vision algorithms.

14.3 SparseLets: a multi scale, sparse, biologically inspired representation of natural images 14.3.1 Motivation: architecture of the primary visual cortex

Our goal here is to build practical algorithms of sparse coding for computer vision. We have seen above that it is possible to build an adaptive model of sparse coding that we applied to 12 × 12 image patches. Invariably, this has shown that the independent components of image patches are edge-like filters, such as is found in simple cells of V1. This model has shown that for randomly chosen image patches, these may be described by a sparse vector of coefficients. Extending this result to full-field natural images, we can expect that this sparseness would increase by a degree of order. In fact, except in a densely cluttered image such as a close-up of a texture, natural images tend to have wide areas which are void (such as the sky, walls or uniformly filled areas). However, applying directly doi:10.1002/9783527680863.ch14

the SparseNet algorithm to full-field images is impossible in practice as its computer simulation would require too much memory to store the over-complete set of filters. However, it is still possible to define a priori these filters and herein, we will focus on a full-field sparse coding method whose filters are inspired by the architecture of the primary visual cortex. The first step of our method involves defining the dictionary of templates (or filters) for detecting edges. We use a log-Gabor representation, which is well suited to represent a wide range of natural images (Fischer et al., 2007a). This representation gives a generic model of edges parameterized by their shape, orientation, and scale. We set the range of these parameters to match with what has been reported for simple-cell responses in macaque primary visual cortex (V1). Indeed log-Gabor filters are similar to standard Gabors and both are well fitted to V1 simple cells [START_REF] Daugman | Two-dimensional spectral analysis of cortical receptive field profiles[END_REF]. Log-Gabors are known to produce a sparse set of linear coefficients [START_REF] Field | Wavelets, vision and the statistics of natural scenes[END_REF]. Like Gabors, these filters are defined by Gaussians in Fourier space, but their specificity is that log-Gabors have Gaussians envelopes in log-polar frequency space. This is consistent with physiological measurements which indicate that V1 cell responses are symmetric on the log frequency scale. They have multiple advantages over Gaussians: In particular, they have no DC component, and more generally, their envelopes more broadly cover the frequency space [START_REF] Fischer | Selfinvertible 2D log-Gabor wavelets[END_REF]. In this chapter, we set the bandwidth of the Fourier representation of the filters to 0.4 and π/8 respectively in the log-frequency and polar coordinates to get a family of relatively elongated (and thus selective) filters (see [START_REF] Fischer | Selfinvertible 2D log-Gabor wavelets[END_REF] and Figure 14.2-A for examples of such edges). Prior to the analysis of each image, we used the spectral whitening filter described by [START_REF] Olshausen | Sparse coding with an overcomplete basis set: A strategy employed by V1?[END_REF] to provide a good balance of the energy of output coefficients [START_REF] Perrinet | Coding static natural images using spiking event times: Do neurons cooperate[END_REF]Fischer et al., 2007a). Such a representation is implemented in the LogGabor package3 .

This transform is linear and can be performed by a simple convolution repeated for every edge type. Following [START_REF] Fischer | Selfinvertible 2D log-Gabor wavelets[END_REF], convolutions were performed in the Fourier (frequency) domain for computational efficiency. The Fourier transform allows for a convenient definition of the edge filter characteristics, and convolution in the spatial domain is equivalent to a simple multiplication in the frequency domain. By multiplying the envelope of the filter and the Fourier transform of the image, one may obtain a filtered spectral image that may be converted to a filtered spatial image using the inverse Fourier transform. We exploited the fact that by omitting the symmetrical lobe of the envelope of the filter in the frequency domain, we obtain quadrature filters. Indeed, the output of this procedure gives a complex number whose real part corresponds to the response to the symmetrical part of the edge, while the imaginary part corresponds to the asymmetrical part of the edge (see [START_REF] Fischer | Selfinvertible 2D log-Gabor wavelets[END_REF] for more details). More generally, the modulus of this complex number gives the energy response to the edge -as can be compared to the response of complex cells in area V1, while its argument gives the exact phase of the filter (from symmetric to non-symmetric). This property further expands the richness of the representation.

Given a filter at a given orientation and scale, a linear convolution model provides a translationinvariant representation. Such invariance can be extended to rotations and scalings by choosing to multiplex these sets of filters at different orientations and spatial scales. Ideally, the parameters of edges would vary in a continuous fashion, to a full relative translation, rotation, and scale invariance. However this is difficult to achieve in practice and some compromise has to be found. Indeed, though orthogonal representations are popular in computer vision due to their computational tractability, it is desirable in our context that we have a relatively high over-completeness in the representation to achieve this invariance. For a given set of 256 × 256 images, we first chose to have 8 dyadic levels (that is, by doubling the scale at each level) with 24 different orientations. Orientations are measured as a non-oriented angle in radians, by convention in the range from -π 2 to π 2 (but not including -π 2 ) with respect to the x-axis. Finally, each image is transformed into a pyramid of coefficients. This Here we show a tiling of the different scales according to a Golden Pyramid [START_REF] Perrinet | Adaptive sparse spike coding : applications of neuroscience to the compression of natural images[END_REF]. The hue gives the orientation while the value gives the absolute value (white denotes a low coefficient). Note the redundancy of the linear representation, for instance at different scales.

φ =0 φ = π 4 φ = π 2 φ =-π 4 θ =0 θ = π 2 θ =π θ = 3π
pyramid consists of approximately 4/3 × 256 2 ≈ 8.7 × 10 4 pixels multiplexed on 8 scales and 24 orientations, that is, approximately 16.7 × 10 6 coefficients, an over-completeness factor of about 256. This linear transformation is represented by a pyramid of coefficient, see Figure 14.2-B.

The SparseLets framework

The resulting dictionary of edge filters is over-complete. The linear representation would thus give a dense, relatively inefficient representation of the distribution of edges, see Figure 14.2-B. Therefore, starting from this linear representation, we searched instead for the most sparse representation. As we saw above in Section 14.2, minimizing the 0 pseudo-norm (the number of non-zero coefficients) leads to an expensive combinatorial search with regard to the dimension of the dictionary (it is NP-hard). As proposed by [START_REF] Perrinet | Coding static natural images using spiking event times: Do neurons cooperate[END_REF], we may approximate a solution to this problem using a greedy approach. Such an approach is based on the physiology of V1. Indeed, it has been shown that inhibitory interneurons decorrelate excitatory cells to drive sparse code formation [START_REF] Bolz | The role of horizontal connections in generating long receptive fields in the cat visual cortex[END_REF][START_REF] King | Inhibitory interneurons decorrelate excitatory cells to drive sparse code formation in a spiking model of V1[END_REF]. We use this local architecture to iteratively modify the linear representation (Fischer et al., 2007a).

In general, a greedy approach is applied when the optimal combination is difficult to solve globally, but can be solved progressively, one element at a time. Applied to our problem, the greedy approach corresponds to first choosing the single filter Φ i that best fits the image along with a suitable coefficient a i , such that the single source a i Φ i is a good match to the image. Examining every filter Φ j , we find the filter Φ i with the maximal correlation coefficient ("Matching" step), where:

i = argmax j I I , Φ j Φ j , (14.7)
doi:10.1002/9783527680863.ch14

•, • represents the inner product, and • represents the L 2 (Euclidean) norm. The index ("address") i gives the position (x and y), scale and orientation of the edge. We saw above that since filters at a given scale and orientation are generated by a translation, this operation can be efficiently computed using a convolution, but we keep this notation for its generality. The associated coefficient is the scalar projection:

a i = I, Φ i Φ i 2 (14.8)
Second, knowing this choice, the image can be decomposed as

I = a i Φ i + R (14.9)
where R is the residual image ("Pursuit" step). We then repeat this 2-step process on the residual (that is, with I ← R) until some stopping criterion is met. Note also that the norm of the filters has no influence in this algorithm on the matching step or on the reconstruction error. For simplicity and without loss of generality, we will thereafter set the norm of the filters to 1: ∀j, Φ j = 1 (that is, that the spectral energy sums to 1). Globally, this procedure gives us a sequential algorithm for reconstructing the signal using the list of sources (filters with coefficients), which greedily optimizes the 0 pseudo-norm (i.e., achieves a relatively sparse representation given the stopping criterion).

The procedure is known as the Matching Pursuit (MP) algorithm [START_REF] Mallat | Matching Pursuit with time-frequency dictionaries[END_REF], which has been shown to generate good approximations for natural images [START_REF] Perrinet | Coding static natural images using spiking event times: Do neurons cooperate[END_REF][START_REF] Perrinet | Role of homeostasis in learning sparse representations[END_REF].

We have included two minor improvements over this method: First, we took advantage of the response of the filters as complex numbers. As stated above, the modulus gives a response independent of the phase of the filter, and this value was used to estimate the best match of the residual image with the possible dictionary of filters (Matching step). Then, the phase was extracted as the argument of the corresponding coefficient and used to feed back onto the image in the Pursuit step. This modification allows for a phase-independent detection of edges, and therefore for a richer set of configurations, while preserving the precision of the representation.

Second, we used a "smooth" Pursuit step. In the original form of the Matching Pursuit algorithm, the projection of the Matching coefficient is fully removed from the image, which allows for the optimal decrease of the energy of the residual and allows for the quickest convergence of the algorithm with respect to the 0 pseudo-norm (i.e., it rapidly achieves a sparse reconstruction with low error). However, this efficiency comes at a cost, because the algorithm may result in non-optimal representations due to choosing edges sequentially and not globally. This is often a problem when edges are aligned (e.g. on a smooth contour), as the different parts will be removed independently, potentially leading to a residual with gaps in the line. Our goal here is not necessarily to get the fastest decrease of energy, but rather to provide with the best representation of edges along contours. We therefore used a more conservative approach, removing only a fraction (denoted by α) of the energy at each pursuit step (for MP, α = 1). Note that in that case, Equation 14.6 has to be modified to account for the α parameter:

E N = 1 -α • (2 -α) • 1≤k≤N a 2 k / I 2 (14.10)
We found that α = 0.8 was a good compromise between rapidity and smoothness. One consequence of using α < 1 is that, when removing energy along contours, edges can overlap; even so, the correlation is invariably reduced. Higher and smaller values of α were also tested, and gave representation results similar to those presented here. In summary, the whole coding algorithm is given by the following nested loops in pseudo-code:

1. draw a signal I from the database; its energy is E = I 2 , 2. initialize sparse vector s to zero and linear coefficients ∀j, a j =< I, Φ j >, 3. while the residual energy E = I 2 is above a given threshold do:

(a) select the best match: i = ArgMax j |a j |, where | • | denotes the modulus, (b) increment the sparse coefficient:

s i = s i + α • a i , (c) update residual image: I ← I -α • a i • Φ i , (d) update residual coefficients: ∀j, a j ← a j -α • a i < Φ i , Φ j >, 4
. the final set of non-zero values of the sparse representation vector s constitutes the list of edges representing the image as the list of couples π i = (i, s i ), where i represents an edge occurrence as represented by its position, orientation and scale and s i the complex-valued sparse coefficient.

This class of algorithms gives a generic and efficient representation of edges, as illustrated by the example in Figure 14.3-A. We also verified that the dictionary used here is better adapted to the extraction of edges than Gabors (Fischer et al., 2007a). The performance of the algorithm can be measured quantitatively by reconstructing the image from the list of extracted edges. All simulations were performed using Python (version 2.7.8) with packages NumPy (version 1.8.1) and SciPy (version 0.14.0) [START_REF] Oliphant | Python for scientific computing[END_REF] on a cluster of Linux computing nodes. Visualization was performed using Matplotlib (version 1.3.1) [START_REF] Hunter | Matplotlib: A 2D graphics environment[END_REF]).4 Measuring the ratio of extracted energy in the images, N = 2048 edges were enough to extract an average of approximately 97% of the energy of images in the database. To compare the strength of the sparseness in these full-scale images compared to the image patches discussed above (see Section 14.2), we measured the sparseness values obtained in images of different sizes. To be comparable, we measured the efficiency with respect to the relative 0 pseudo-norm in bits per unit of image surface (pixel): This is defined as the ratio of active coefficients times the numbers of bits required to code for each coefficient (that is, log 2 (M ), where M is total number of coefficients in the representation) over the size of the image. For different image and framework sizes, the lower this ratio, the higher the sparseness. As shown in Figure 14.3-B, we indeed see that sparseness increases relative to an increase in image size. This reflects the fact that sparseness is not only local (few edges coexist at one place) but is also spatial (edges are clustered, and most regions are empty). Such a behavior is also observed in V1 of monkeys as the size of the stimulation is increased from a stimulation over only the classical receptive field to 4 times around it [START_REF] Vinje | Sparse coding and decorrelation in primary visual cortex during natural vision[END_REF]. Note that by definition, our representation of edges is invariant to translations, scalings, and rotations in the plane of the image. We also performed the same edge extraction where images from the database were perturbed by adding independent Gaussian noise to each pixel such that signalto-noise ratio was halved. Qualitative results are degraded but qualitatively similar. In particular, edge extraction in the presence of noise may result in false positives. Quantitatively, one observes that the representation is slightly less sparse. This confirms our intuition that sparseness is causally linked to the efficient extraction of edges in the image. We controlled the quality of the reconstruction from the edge information such that the residual energy is less than 3% over the whole set of images, a criterion met on average when identifying 2048 edges per image for images of size 256 × 256 (that is, a relative sparseness of ≈ 0.01% of activated coefficients). (B) Efficiency for different image sizes as measured by the decrease of the residual's energy as a function of the coding cost (relative 0 pseudonorm). (B, inset) This shows that as the size of images increases, sparseness increases, validating quantitatively our intuition on the sparse positioning of objects in natural images. Note, that the improvement is non significant for a size superior to 128. The SparseLets framework thus shows that sparse models can be extended to full-scale natural images, and that increasing the size improves sparse models by a degree of order (compare a size of 16 with that of 256).

Efficiency of the SparseLets framework

To examine the robustness of the framework and of sparse models in general, we examined how results changed when changing parameters for the algorithm. In particular, we investigated the effect of filter parameters B f and B θ . We also investigated how the over-completeness factor could influence the result. We manipulated the number of discretization steps along the spatial frequency axis N f (that is, the number of layers in the pyramid) and orientation axis N θ . Results are summarized in Figure 14.4 and show that an optimal efficiency is achieved for certain values of these parameters. These optimal values are in the order of what is found for the range of selectivities observed in V1. Note that these values may change across categories. Further experiments should provide with an adaptation mechanism to allow finding the best parameters in an unsupervised manner.

These particular results illustrate the potential of sparse models in computer vision. Indeed, one main advantage of these methods is to explicitly represent edges. A direct application of sparse models is the ability of the representation to reconstruct these images and therefore to use it for compression [START_REF] Perrinet | Coding static natural images using spiking event times: Do neurons cooperate[END_REF]. Other possible applications are image filtering or edge manipulation for texture synthesis or denoising [START_REF] Portilla | A parametric texture model based on joint statistics of complex wavelet coefficients[END_REF]. Recent advances have shown that such representations could be used for the classification of natural images (see chapter 013_theriault or for instance [START_REF] Perrinet | Edge co-occurrences can account for rapid categorization of natural versus animal images[END_REF]) or of medical images of emphysema [START_REF] Nava | Advances in Texture Analysis for Emphysema Classification[END_REF]. Classification was also used in a sparse model for the quantification of artistic style through sparse coding analysis in the drawings of Pieter Bruegel the Elder [START_REF] Hughes | Quantification of artistic style through sparse coding analysis in the drawings of Pieter Bruegel the Elder[END_REF]. These examples illustrate the different applications of sparse representations and in the following we will illustrate As we tested different parameters for the filters, we measured the gain in efficiency for the algorithm as the ratio of the code length to achieve 85% of energy extraction relative to that for the default parameters (white bar). The average is computed on the same database of natural images and error bars denote the standard deviation of gain over the database. First, we studied the effect of the bandwidth of filters respectively in the (A) spatial frequency and (B) orientation spaces. The minimum is reached for the default parameters: this shows that default parameters provide an optimal compromise between the precision of filters in the frequency and position domains for this database. We may also compare pyramids with different number of filters. Indeed from Equation 14.4, efficiency (in bits) is equal to the number of selected filters times the coding cost for the address of each edge in the pyramid. We plot here the average gain in efficiency which shows an optimal compromise respectively for respectively (C) the number of orientations and (D) the number of spatial frequencies (scales). Note first that with more than 12 directions, the gain remains stable. Note also that a dyadic scale ratio (that is of 2) is efficient but that other solutions -such as using the golden section φprove to be significantly more efficient, though the average gain is relatively small (inferior to 5%). doi:10.1002/9783527680863.ch14 some potential perspectives to further improve their representation efficiency.

14.4 SparseEdges: introducing prior information 14.4.1 Using the prior in first-order statistics of edges

In natural images, it has been observed that edges follow some statistical regularities that may be used by the visual system. We will first focus on the most obvious regularity which consists in the anisotropic distribution of orientations in natural images (see chapter 003_holly_gerhard for another qualitative characterization of this anisotropy). Indeed, it has been observed that orientations corresponding to cardinals (that is, to verticals and horizontals) are more likely than other orientations [START_REF] Ganguli | Implicit encoding of prior probabilities in optimal neural populations[END_REF][START_REF] Ahna | Cardinal rules: visual orientation perception reflects knowledge of environmental statistics[END_REF]. This is due to the fact that our point of view is most likely pointing toward the horizon while we stand upright. In addition, gravity shaped our surrounding world around horizontals (mainly the ground) and verticals (such as trees or buildings). Psychophysically, this prior knowledge gives rise to the oblique effect [START_REF] Keil | Separating the chaff from the wheat: possible origins of the oblique effect[END_REF]. This is even more striking in images of human scenes (such as a street, or inside a building) as humans mainly build their environment (houses, furnitures) around these cardinal axes. However, we assumed in the cost defined above (see Eq. 14.2) that each coefficient is independently distributed.

It is believed that an homeostasis mechanism allows one to optimize this cost knowing this prior information [START_REF] Laughlin | A simple coding procedure enhances a neuron's information capacity[END_REF][START_REF] Perrinet | Role of homeostasis in learning sparse representations[END_REF]. Basically, the solution is to put more filters where there are more orientations [START_REF] Ganguli | Implicit encoding of prior probabilities in optimal neural populations[END_REF] such that coefficients are uniformly distributed. In fact, since neural activity in the assembly actually represents the sparse coefficients, we may understand the role of homeostasis as maximizing the average representation cost C(a|Φ). This is equivalent to saying that homeostasis should act such that at any time, and invariantly to the selectivity of features in the dictionary, the probability of selecting one feature is uniform across the dictionary. This optimal uniformity may be achieved in all generality by using an equalization of the histogram [START_REF] Atick | Could information theory provide an ecological theory of sensory processing? Network[END_REF]. This method may be easily derived if we know the probability distribution function dP i of variable a i (see Figure 14.5-A) by choosing a non-linearity as the cumulative distribution function (see Figure 14.5-B) transforming any observed variable āi into:

z i (ā i ) = P i (a i ≤ āi ) = āi -∞ dP i (a i ) (14.11)
This is equivalent to the change of variables which transforms the sparse vector a to a variable with uniform probability distribution function in [0, 1] M (see Figure 14.5-C). This equalization process has been observed in the neural activity of a variety of species and is, for instance, perfectly illustrated in the compound eye of the fly's neural response to different levels of contrast [START_REF] Laughlin | A simple coding procedure enhances a neuron's information capacity[END_REF]. It may evolve dynamically to slowly adapt to varying changes, for instance to luminance or contrast values, such as when the light diminishes at twilight. Then, we use these point non-linearities z i to sample orientation space in an optimal fashion (see Figure 14.5-D). This simple non-parametric homeostatic method is applicable to the SparseLets algorithm by simply using the transformed sampling of the orientation space. It is important to note that the MP algorithm is non-linear and the choice of one element at any step may influence the rest of the choices. In particular, while orientations around cardinals are more prevalent in natural images (see Figure 14.6-A), the output histogram of detected edges is uniform (see Figure 14.6-B). To quantify the gain in efficiency, we measured the residual energy in the SparseLets framework with or without including this prior knowledge. Results show that for a similar number of extracted edges, residual energy is not significantly changed (see Figure 14.6-C). This is again due to the exponential convergence of the squared error (Mallat, 1998, p. 422) on the space spanned by the representation basis. As the tiling of the Fourier space by the set of filters is complete, one is assured of the convergence of the representation in both cases. However thanks to the use of first-order statistics, [START_REF] Laughlin | A simple coding procedure enhances a neuron's information capacity[END_REF]. (C) We draw a uniform set of scores on the y-axis of the cumulative function (black horizontal lines), for which we select the corresponding orientations (red vertical lines). Note that by convention these are wrapped up to fit in the (-π/2, π/2] range. (D) This new set of orientations is defined such that they are a priori selected uniformly. Such transformation was found to well describe a range of psychological observations [START_REF] Ganguli | Implicit encoding of prior probabilities in optimal neural populations[END_REF]) and we will now apply it to our framework.

the orientation of edges are distributed such as to maximize the entropy, further improving the efficiency of the representation.

This novel improvement to the SparseLets algorithm illustrates the flexibility of the Matching Pursuit framework. This proves that by introducing the prior on first-order statistics, one improves the efficiency of the model for this class of natural images. Of course, this gain is only valid for natural images and would disappear for images where cardinals would not dominate. This is the case for images of close-ups (microscopy) or where gravity is not prevalent such as aerial views. Moreover, this is obviously just a first step as there is more information from natural images that could be taken into account. (B) We show the histogram with the new set of orientations that has been used. Each bin is selected approximately uniformly. Note the variable width of bins. (C) We compare the efficiency of the modified algorithm where the sampling is optimized thanks to histogram equalization described in Figure 14.5 as the average residual energy with respect to the number of edges. This shows that introducing a prior information on the distribution of orientations in the algorithm may also introduce a slight but insignificant improvement in the sparseness.

Using the prior statistics of edge co-occurences

A natural extension of the previous result is to study the co-occurrences of edges in natural images. Indeed, images are not simply built from independent edges at arbitrary positions and orientations but tend to be organized along smooth contours that follow for instance the shape of objects.

In particular, it has been shown that contours are more likely to be organized along co-circular shapes [START_REF] Sigman | On a common circle: Natural scenes and Gestalt rules[END_REF]. This reflects the fact that in nature, round objects are more likely to appear than random shapes. Such a statistical property of images seems to be used by the visual system as it is observed that edge information is integrated on a local "association field" favoring co-linear or co-circular edges (see chapter 013_theriault section 5 for more details and a mathematical description). In V1 for instance, neurons coding for neighboring positions are organized in a similar fashion. We have previously seen that statistically, neurons coding for collinear edges seem to be anatomically connected [START_REF] William | Orientation selectivity and the arrangement of horizontal connections in tree shrew striate cortex[END_REF][START_REF] Hunt | Statistical structure of lateral connections in the primary visual cortex[END_REF] while rare events (such as perpendicular occurrences) are functionally inhibited [START_REF] Hunt | Statistical structure of lateral connections in the primary visual cortex[END_REF].

Using the probabilistic formulation of the edge extraction process (see Section 14.2), one can also apply this prior probability to the choice mechanism (Matching) of the Matching Pursuit algorithm. Indeed at any step of the edge extraction process, one can include the knowledge gained by the extraction of previous edges, that is, the set I = {π i } of extracted edges, to refine the log-likelihood of a new possible edge π * = ( * , a * ) (where * corresponds to the address of the chosen filter, and therefore to its position, orientation and scale). Knowing the probability of co-occurences p(π * |π i ) from the statistics observed in natural images (see Figure 14.7), we deduce that the cost is now at any coding step (where I is the residual image -see Equation 14.9): The relationship between a pair of edges can be quantified in terms of the difference between their orientations θ, the ratio of scale σ relative to the reference edge, the distance d = AB between their centers, and the difference of azimuth (angular location) φ of the second edge relative to the reference edge. Additionally, we define ψ = φ -θ/2 as it is symmetric with respect to the choice of the reference edge, in particular, ψ = 0 for cocircular edges. (B) The probability distribution function p(ψ, θ) represents the distribution of the different geometrical arrangements of edges' angles, which we call a "chevron map". We show here the histogram for natural images, illustrating the preference for co-linear edge configurations. For each chevron configuration, deeper and deeper red circles indicate configurations that are more and more likely with respect to a uniform prior, with an average maximum of about 4 times more likely, and deeper and deeper blue circles indicate configurations less likely than a flat prior (with a minimum of about 0.7 times as likely). Conveniently, this "chevron map" shows in one graph that natural images have on average a preference for co-linear and parallel angles (the horizontal middle axis), along with a slight preference for co-circular configurations (middle vertical axis).

C(π * |I, I) = 1 2σ 2 n I -a * Φ * 2 -η i∈I a i • log p(π * |π i ) (14.12) B A φ θ ψ ⇡ 2 0 ⇡ 2 azimuth difference
where η quantifies the strength of this prediction. Basically, this shows that, similarly to the association field proposed by [START_REF] Grossberg | Outline of A Theory of Brightness, Color, and form Perception[END_REF] which was subsequently observed in cortical neurons [START_REF] Der Heydt | Illusory contours and cortical neuron responses[END_REF] and applied by [START_REF] Field | Contour integration by the human visual system: evidence for a local "association field[END_REF], we facilitate the activity of edges knowing the list of edges that were already extracted. This comes as a complementary local interaction to the inhibitory local interaction implemented in the Pursuit step (see Equation 14.9) and provides a quantitative algorithm to the heuristics proposed in (Fischer et al., 2007a). Note that though this model is purely sequential and feed-forward, this results possibly in a "chain rule" as when edges along a contour are extracted, this activity is facilitated along it as long as the image of this contour exists in the residual image. Such a "chain rule" is similar to what was used to model psychophysical performance [START_REF] Geisler | Edge co-occurence in natural images predicts contour grouping performance[END_REF] or to filter curves in images [START_REF] August | A markov process using curvature for filtering curve images[END_REF]. Our novel implementation provides with a rapid and efficient solution that we illustrate here on a segmentation problem (see Figure 14.8). There is a clear match of the edge extraction with the circle, as would be predicted by psychophysical results of hand segmentation of contours. This shows that second-order information as introduced in this feed-forward chain may be sufficient to account for contour grouping and may not necessitate a recursive chain rule such as implemented in [START_REF] Geisler | Edge co-occurence in natural images predicts contour grouping performance[END_REF].

Indeed, sparse models have been shown to foster numerous applications in computer vision. Among these are algorithms for segmentation in images (Spratling, 2013a) or for classification [START_REF] Spratling | Classification using sparse representations: a biologically plausible approach[END_REF][START_REF] Dumoulin | Contour extracting networks in early extrastriate cortex[END_REF]. We may use the previous application of our algorithm to evaluate the probability of edges belonging to the same contour. We show in Figure 14.8 the application of such a formula (in panel C versus classical sparse edge extraction in panel B) on a synthetic image of a circle embedded in noise (panel A). It shows that, while some edges from the background are extracted in the plain SparseLets framework (panel B), edges belonging to the same circular contour pop-out from the computation similarly to a chain rule (panel C). Note that contrary to classical hierarchical models, these results are done with a simple layer of edge detection filters which communicate through local diffusion. An important novelty to note in this extension of the SparseLets framework is that there is no recursive propagation, as the greedy algorithm is applied in a sequential manner. doi:10.1002/9783527680863.ch14

These types of interaction have been found in area V1. Indeed, the processing may be modulated by simple contextual rules such as favoring co-linear versus co-circular edges [START_REF] Mcmanus | Adaptive shape processing in primary visual cortex[END_REF]. Such type of modulation opens a wide range of potential applications to computer vision such as robust segmentation and algorithms for the autonomous classification of images [START_REF] Perrinet | Edge co-occurrences can account for rapid categorization of natural versus animal images[END_REF]. More generally, it shows that simple feed-forward algorithms such as the one we propose may be sufficient to a account for the sparse representation of images in lower-level visual areas.

Conclusion

In this chapter, we have shown sparse models at increasing structural complexities mimicking the key features of the primary visual cortex in primates. By focusing on a concrete example, the SparseLets framework, we have shown that sparse models provide an efficient framework for biologically-inspired computer vision algorithms. In particular, by including contextual information, such as prior statistics on natural images, we could improve the efficiency of the sparseness of the representation.

Such an approach allows to implement a range of practical concepts (such as the good continuity of contours) in a principled way. Indeed, we based our reasoning on inferential processes such as they are reflected in the organization of neural structures. For instance, there is a link between co-circularity and the structure of orientation maps [START_REF] Hunt | Natural scene statistics and the structure of orientation maps in the visual cortex[END_REF]. This should be included in further perspectives of these sparse models.

As we saw, the (visual) brain is not a computer. Instead of using a sequential stream of semantic symbols, it uses statistical regularities to derive predictive rules. These computations are not written explicitly, as it suffices that they emerge from the collective behavior in populations of neurons. As such, these rules are massively parallel, asynchronous and error prone. Luckily, such neuromorphic computing architectures begin to emerge -yet, we lack a better understanding of how we may implement computer vision algorithms on such hardware.

As a conclusion, this drives the need for more biologically-driven computer vision algorithm and of a better understanding of V1. However, such knowledge is largely incomplete [START_REF] Olshausen | How close are we to understanding V1?[END_REF] and we need to develop a better understanding of results from electro-physiology. A promising approach in that sense is to include model-driven stimulation of physiological studies [START_REF] Sanz-Leon | Motion Clouds: model-based stimulus synthesis of natural-like random textures for the study of motion perception[END_REF][START_REF] Simoncini | More is not always better: adaptive gain control explains dissociation between perception and action[END_REF] as they systematically test neural computations for a given visual task.

  Figure 14.1: Learning a sparse code using Sparse Hebbian Learning. (A) We show the results at convergence (20000 learning steps) of a sparse model with unsupervised learning algorithm which progressively optimizes the relative number of active (non-zero) coefficients ( 0 pseudo-norm) (Per-rinet, 2010). Filters of the same size as the image patches are presented in a matrix (separated by a black border). Note that their position in the matrix is arbitrary as in ICA. These results show that sparseness induces the emergence of edge-like receptive fields similar to those observed in the primary visual area of primates. (B) We show the probability distribution function of sparse coefficients obtained by our method compared to[START_REF] Olshausen | Natural image statistics and efficient coding[END_REF] with first, random dictionaries (respectively 'ssc-init' and 'cg-init') and second, with the dictionaries obtained after convergence of respective learning schemes (respectively 'ssc' and 'cg'). At convergence, sparse coefficients are more sparsely distributed than initially, with more kurtotic probability distribution functions for 'ssc' in both cases, as can be seen in the "longer tails"of the distribution. (C) We evaluate the coding efficiency of both methods by plotting the average residual error (L 2 norm) as a function of the 0 pseudo-norm. This provides a measure of the coding efficiency for each dictionary over the set of image patches (error bars represent one standard deviation). Best results are those providing a lower error for a given sparsity (better compression) or a lower sparseness for the same error.

  Figure 14.2: The log-Gabor pyramid (A) A set of log-Gabor filters showing first in different rows different orientations and second in different columns different phases. Here we have only shown one scale. Note the similarity with Gabor filters. (B) Using this set of filter, one can define a linear representation that is rotation-, scaling-and translation-invariant. Here we show a tiling of the different scales according to a Golden Pyramid[START_REF] Perrinet | Adaptive sparse spike coding : applications of neuroscience to the compression of natural images[END_REF]. The hue gives the orientation while the value gives the absolute value (white denotes a low coefficient). Note the redundancy of the linear representation, for instance at different scales.

Figure 14

 14 Figure14.3-A, shows the list of edges extracted on a sample image. It fits qualitatively well with a rough sketch of the image. To evaluate the algorithm quantitatively, we measured the ratio of extracted energy in the images as a function of the number of edges on a database of 600 natural images of size 256 × 256 5 , see Figure14.3-B. Measuring the ratio of extracted energy in the images, N = 2048 edges were enough to extract an average of approximately 97% of the energy of images in the database. To compare the strength of the sparseness in these full-scale images compared to the image patches discussed above (see Section 14.2), we measured the sparseness values obtained in images of different sizes. To be comparable, we measured the efficiency with respect to the relative 0 pseudo-norm in bits per unit of image surface (pixel): This is defined as the ratio of active coefficients times the numbers of bits required to code for each coefficient (that is, log 2 (M ), where M is total number of coefficients in the representation) over the size of the image. For different image and framework sizes, the lower this ratio, the higher the sparseness. As shown in Figure14.3-B, we indeed see that sparseness increases relative to an increase in image size. This reflects the fact that sparseness is not only local (few edges coexist at one place) but is also spatial (edges are clustered, and most regions are empty). Such a behavior is also observed in V1 of monkeys as the size of the stimulation is increased from a stimulation over only the classical receptive field to 4 times around it[START_REF] Vinje | Sparse coding and decorrelation in primary visual cortex during natural vision[END_REF].Note that by definition, our representation of edges is invariant to translations, scalings, and rotations in the plane of the image. We also performed the same edge extraction where images from the database were perturbed by adding independent Gaussian noise to each pixel such that signalto-noise ratio was halved. Qualitative results are degraded but qualitatively similar. In particular, edge extraction in the presence of noise may result in false positives. Quantitatively, one observes that the representation is slightly less sparse. This confirms our intuition that sparseness is causally linked to the efficient extraction of edges in the image.

  Figure 14.3: SparseLets framework. (A) An example reconstructed image with the list of extracted edges overlaid. As in Geisler et al. (2001), edges outside the circle are discarded to avoid artifacts. Parameters for each edge are the position, , orientation, scale (length of bar) and scalar amplitude (transparency) with the phase (hue). We controlled the quality of the reconstruction from the edge information such that the residual energy is less than 3% over the whole set of images, a criterion met on average when identifying 2048 edges per image for images of size 256 × 256 (that is, a relative sparseness of ≈ 0.01% of activated coefficients). (B) Efficiency for different image sizes as measured by the decrease of the residual's energy as a function of the coding cost (relative 0 pseudonorm). (B, inset) This shows that as the size of images increases, sparseness increases, validating quantitatively our intuition on the sparse positioning of objects in natural images. Note, that the improvement is non significant for a size superior to 128. The SparseLets framework thus shows that sparse models can be extended to full-scale natural images, and that increasing the size improves sparse models by a degree of order (compare a size of 16 with that of 256).

  Figure14.4: Effect of filters' parameters on the efficiency of the SparseLets framework As we tested different parameters for the filters, we measured the gain in efficiency for the algorithm as the ratio of the code length to achieve 85% of energy extraction relative to that for the default parameters (white bar). The average is computed on the same database of natural images and error bars denote the standard deviation of gain over the database. First, we studied the effect of the bandwidth of filters respectively in the (A) spatial frequency and (B) orientation spaces. The minimum is reached for the default parameters: this shows that default parameters provide an optimal compromise between the precision of filters in the frequency and position domains for this database. We may also compare pyramids with different number of filters. Indeed from Equation14.4, efficiency (in bits) is equal to the number of selected filters times the coding cost for the address of each edge in the pyramid. We plot here the average gain in efficiency which shows an optimal compromise respectively for respectively (C) the number of orientations and (D) the number of spatial frequencies (scales). Note first that with more than 12 directions, the gain remains stable. Note also that a dyadic scale ratio (that is of 2) is efficient but that other solutions -such as using the golden section φprove to be significantly more efficient, though the average gain is relatively small (inferior to 5%).

  Figure14.5: Histogram equalization From the edges extracted in the images from the natural scenes database, we computed sequentially (clockwise, from the bottom left): (A) the histogram and (B) cumulative histogram of edge orientations. This shows that as was reported previously (see for instance[START_REF] Ahna | Cardinal rules: visual orientation perception reflects knowledge of environmental statistics[END_REF]), cardinals axis are over-represented. This represents a relative inefficiency as the representation in the SparseLets framework represents a priori orientations in an uniform manner. A neuromorphic solution is to use histogram equalization, as was first shown in the fly's compound eye by[START_REF] Laughlin | A simple coding procedure enhances a neuron's information capacity[END_REF]. (C) We draw a uniform set of scores on the y-axis of the cumulative function (black horizontal lines), for which we select the corresponding orientations (red vertical lines). Note that by convention these are wrapped up to fit in the (-π/2, π/2] range. (D) This new set of orientations is defined such that they are a priori selected uniformly. Such transformation was found to well describe a range of psychological observations[START_REF] Ganguli | Implicit encoding of prior probabilities in optimal neural populations[END_REF]) and we will now apply it to our framework.

  Figure 14.6: Including prior knowledge on the orientation of edges in natural images.(A) Statistics of orientations in the database of natural images as shown by a polar bar histogram (the surface of wedges is proportional to occurrences). As for Figure14.5-A, this shows that orientations around cardinals are more likely than others (the dotted red line shows the average occurrence rate). (B) We show the histogram with the new set of orientations that has been used. Each bin is selected approximately uniformly. Note the variable width of bins. (C) We compare the efficiency of the modified algorithm where the sampling is optimized thanks to histogram equalization described in Figure14.5 as the average residual energy with respect to the number of edges. This shows that introducing a prior information on the distribution of orientations in the algorithm may also introduce a slight but insignificant improvement in the sparseness.

  Figure 14.7: Statistics of edge co-occurences (A)The relationship between a pair of edges can be quantified in terms of the difference between their orientations θ, the ratio of scale σ relative to the reference edge, the distance d = AB between their centers, and the difference of azimuth (angular location) φ of the second edge relative to the reference edge. Additionally, we define ψ = φ -θ/2 as it is symmetric with respect to the choice of the reference edge, in particular, ψ = 0 for cocircular edges. (B) The probability distribution function p(ψ, θ) represents the distribution of the different geometrical arrangements of edges' angles, which we call a "chevron map". We show here the histogram for natural images, illustrating the preference for co-linear edge configurations. For each chevron configuration, deeper and deeper red circles indicate configurations that are more and more likely with respect to a uniform prior, with an average maximum of about 4 times more likely, and deeper and deeper blue circles indicate configurations less likely than a flat prior (with a minimum of about 0.7 times as likely). Conveniently, this "chevron map" shows in one graph that natural images have on average a preference for co-linear and parallel angles (the horizontal middle axis), along with a slight preference for co-circular configurations (middle vertical axis).

  Figure14.8: Application to rapid contour segmentation We applied the original sparse edge framework to (A) the synthetic image of a circle embedded in noise. This noise is synthesized by edges at random positions, orientations and scales with a similar first-order statistics as natural scenes. (B) We overlay in red the set of edges which were detected by the SparseLets framework. (C) Then, we have introduced second-order information in the evaluation of the probability in the sparse edges framework (with η = 0.15). This modified the sequence of extracted edges as shown in blue. There is a clear match of the edge extraction with the circle, as would be predicted by psychophysical results of hand segmentation of contours. This shows that second-order information as introduced in this feed-forward chain may be sufficient to account for contour grouping and may not necessitate a recursive chain rule such as implemented in[START_REF] Geisler | Edge co-occurence in natural images predicts contour grouping performance[END_REF].

Decisions are defined in their broader sense of elementary choices operated in the system at associative or motor levels(Friston et al.,

2012).

These scripts are available at https://github.com/bicv/SHL_scripts and documented at https://pythonhosted. org/SHL_scripts.

Python scripts are available at https://github.com/bicv/LogGabor and documented at https://pythonhosted. org/LogGabor.

These python scripts are available at https://github.com/bicv/SparseEdges and documented at https:// pythonhosted.org/SparseEdges.

This database is publicly available at http://cbcl.mit.edu/software-datasets/serre/ SerreOlivaPoggioPNAS07.

Laurent.Perrinet@univ-amu.fr

Acknowledgments

The author was supported by EC IP project FP7-269921, "BrainScaleS". Correspondence and requests for materials should be addressed to the author 6 . Code and supplementary material available at http://invibe.net/LaurentPerrinet/Publications/Perrinet15bicv.