Cookie Consent by Free Privacy Policy Generator The Visual Cortex as a Contact Manifold | Igor Moiseev
Part 1 of the "Geometry of Seeing" series

The Visual Cortex as a Contact Manifold

Your brain fills in contours that do not exist. Jean Petitot showed in 2003 that this visual completion is equivalent to finding shortest paths on the Lie group SE(2) — the group of rigid motions of the plane — equipped with a sub-Riemannian metric whose geodesics are Euler's elastica, parametrised by Jacobi elliptic functions.

By Igor Moiseev · 25 April 2026 · arXiv:0807.4731 · with Yu. L. Sachkov
Geometry of Seeing
  1. The Visual Cortex as a Contact Manifold ← you are here
  2. Euler's Elastica and Jacobi Elliptic Functions (draft)
  3. Maxwell Strata: When Optimal Paths Fork
  4. The Open Problem: Exact Cut Time on SE(2)
What this article covers
Why the primary visual cortex computes shortest paths in a non-Euclidean geometry. We develop the mathematical model step by step — from the illusion that motivates it, through the neuroscience, to the sub-Riemannian structure on SE(2) whose geodesics are Euler's elastica. The payoff: those geodesics are parametrised by Jacobi elliptic functions $\mathrm{sn}(s\mid k^2)$, and their spatial period is $4K(k^2)$ — the complete elliptic integral of the first kind.

The Illusion That Started Everything

Look at the figure below. You see a bright white equilateral triangle floating above three black discs. The triangle has sharp edges and appears slightly brighter than the background. None of that is actually printed on the page.

Kanizsa (1955) — the white triangle does not exist

Three "Pac-Man" shapes arranged so their open mouths point inward. Your visual system perceives a bright equilateral triangle with sharp edges — a modal completion of contours that are absent in the image. This is not a trick or an error; it is a fundamental feature of how V1 processes local orientation information into global contour structure.

This is the Kanizsa triangle (Kanizsa 1955), the canonical example of modal completion — the visual system’s tendency to infer the presence of a bounding contour from a set of locally consistent cues. The phenomenon is not subtle: the perceived edges are sharp, the interior surface appears measurably lighter than the background (Cornsweet 1970), and the effect survives rotation, scaling, and partial occlusion.

The question is: what is the computational rule that produces this completion? A satisfying answer did not arrive until 2003.

Orientation Columns in V1

The primary visual cortex (V1, also called area 17 or the striate cortex) is the first cortical stage of visual processing. Hubel and Wiesel (1959, 1962) received the Nobel Prize for discovering that neurons in V1 respond selectively to oriented edges: a neuron fires most vigorously when a bar of light oriented at a particular angle passes through a small region of the visual field.

Each V1 neuron can be characterised by three numbers: \(\text{position }(x, y) \in \mathbb{R}^2 \quad\text{and}\quad \text{preferred orientation }\theta \in [0, \pi).\)

Neurons with the same preferred orientation cluster in orientation columns running perpendicular to the cortical surface. Mapped over a patch of cortex, the preferred orientations rotate continuously — completing a full $\pi$-rotation over a distance of about 1 mm. The resulting pattern of orientation preferences is called an orientation map, and it exhibits a characteristic structure of pinwheels: point singularities around which the preferred orientation rotates by $\pm\pi/2$.

The figure below shows a schematic orientation map: each short line segment represents one cortical location $(x,y)$, oriented at the local preferred angle $\theta(x,y)$. Colours encode the orientation angle on a $[0, \pi)$ hue wheel.

Hover a cell:
Schematic orientation map of a patch of V1. Each line segment represents one neuron at position $(x,y)$, oriented at its preferred angle $\theta$ (colour encodes $\theta$ via a hue wheel); the orientation field is smooth almost everywhere, with a pinwheel singularity near the centre of the patch. Tick the boxes to overlay true sub-Riemannian geodesics on $\mathrm{SE}(2)$, integrated from the SR control ODE $(\dot x, \dot y, \dot\theta) = (\cos\theta, \sin\theta, \kappa(s))$ — each curve is a real elastica solving the SR boundary-value problem from the source neuron to the target neuron's $(x, y, \theta)$, with the target-tangent residual driven to $0$ (mod $\pi$) by a damped Newton. All four start at the blue source neuron, tangent to the source's preferred orientation, and end exactly tangent to the target neuron's stroke. The endpoint of each curve is highlighted with the family's colour, and the label gives the modulus and the SR length $L = \int\!\sqrt{u_1^2 + u_2^2}\,dt$ in pixels. The four families exhaust the regimes of the SE(2) geodesic flow: inflectional ($-1\!<\!E\!<\!1$) — $\kappa(s) = 2k\,\mathrm{sn}(s\mid k^{2})$, generic S-shaped curve; non-inflectional ($E\!>\!1$) — $\kappa(s) = 2\,\mathrm{dn}(s\mid m)$, one-signed curvature, wavy-circle shape; Euler spiral ($E = 1$) — $\kappa(s) = 2\,\mathrm{sech}\,s$, the separatrix between the two regimes; Maxwell pair — the two geodesics $\kappa$ and $-\kappa$ related by the SE(2) symmetry $\sigma$, with provably equal SR length, demonstrating the non-uniqueness of optimal completions that Part 3 makes precise.

A key discovery from Bosking et al. (1997) is that the long-range horizontal connections in V1 — axons that reach across several millimetres of cortex — connect neurons with the same preferred orientation that lie roughly along the direction of that orientation. In other words, a neuron at $(x,y)$ preferring angle $\theta$ connects strongly to neurons at $(x’, y’)$ where the displacement $(x’-x, y’-y)$ is approximately parallel to $\theta$.

This is the empirical association field (Field, Hayes & Hess 1993): two oriented line elements are perceptually grouped together if they lie along a smooth curve that is tangent to both elements.

Petitot’s Insight: V1 Is a Contact Bundle

Jean Petitot (1999, 2003) made the key observation: the data $(x, y, \theta)$ encoding every neuron in V1 — together with the horizontal connectivity pattern just described — is not a 2D image map. It is a 3-dimensional contact manifold.

Specifically: the set of triples $(x, y, \theta) \in \mathbb{R}^2 \times S^1$ is the total space of a circle bundle over the retinal plane. It carries a contact structure $\xi = \ker(\sin\theta\,dx - \cos\theta\,dy)$: the constraint that a curve $(x(t), y(t), \theta(t))$ can only move horizontally (forward in direction $\theta$, or rotate in place) — it cannot slide sideways.

This constraint is satisfied by any curve whose position $(x,y)$ moves in the direction the neuron prefers: \(\dot x = u_1 \cos\theta, \quad \dot y = u_1 \sin\theta, \quad \dot\theta = u_2.\)

The bundle $(\mathbb{R}^2 \times S^1, \xi)$ is canonically isomorphic (as a contact manifold) to the unit cotangent bundle $ST^*\mathbb{R}^2$, and its symmetry group is SE(2) — the Lie group of orientation-preserving rigid motions of the plane.

The Lie Group SE(2)

What SE(2) is, concretely

A point of $\mathrm{SE}(2)$ is a triple $(x, y, \theta)$: a position $(x, y) \in \mathbb{R}^2$ together with an orientation $\theta \in S^1$. This is exactly the data describing one V1 neuron in Figure 2 — its retinal position and its preferred edge orientation. As a $3\times3$ matrix the configuration $g$ acts on the plane as a rotation followed by a translation:

\[g \;=\; \begin{pmatrix} \cos\theta & -\sin\theta & x \\ \sin\theta & \cos\theta & y \\ 0 & 0 & 1 \end{pmatrix}.\]

The two motions that are directly available

The horizontal connectivity of V1 (Bosking et al. 1997) lets the cortex move its neural locus in only two ways:

In $(x, y, \theta)$ coordinates these are the two left-invariant vector fields

\[X_1 \;=\; \cos\theta\,\partial_x + \sin\theta\,\partial_y, \qquad X_2 \;=\; \partial_\theta.\]

The third direction — sliding the locus perpendicular to the current orientation — is forbidden:

\[X_3 \;:=\; -\sin\theta\,\partial_x + \cos\theta\,\partial_y \;\notin\; \mathrm{span}\{X_1, X_2\}.\]

V1 has no “move my edge sideways” connection at this level.

How sideways motion still happens — the Lie bracket

The cortex can nevertheless reach a perpendicularly-displaced neuron, by a short loop of the two moves it does have. The figure below shows the canonical four-step manoeuvre

\[+\varepsilon X_1 \;\to\; +\varepsilon X_2 \;\to\; -\varepsilon X_1 \;\to\; -\varepsilon X_2 .\]

Each leg is small (length $\varepsilon$). The net effect is to leave the orientation unchanged but to displace the position by an amount of order $\varepsilon^2$ in the perpendicular direction:

\[\Phi^{X_2}_{-\varepsilon} \!\circ\! \Phi^{X_1}_{-\varepsilon} \!\circ\! \Phi^{X_2}_{\varepsilon} \!\circ\! \Phi^{X_1}_{\varepsilon}\;(g_0) \;=\; g_0 \,+\, \varepsilon^2\, X_3 \,+\, O(\varepsilon^3).\]

The infinitesimal limit of this loop is exactly the Lie bracket of $X_1$ and $X_2$:

\[[X_1, X_2] \;=\; X_3 \;=\; -\sin\theta\,\partial_x + \cos\theta\,\partial_y.\]
θ(s) = +0.0° κ(s) = dθ/ds = +0.000 /unit cell field θ at (x,y) = +0.0° Δθ = θ(s) − cell = +0.0°
Figure 3. The moving Frenet–Serret frame along an $\mathrm{SE}(2)$ sub-Riemannian geodesic. Drag the slider to advance the arc-length parameter $s \in [0, L]$ along one of the BVP-solved trajectories (use the dropdown to switch). At every $s$ the figure shows the planar position $(x(s), y(s))$ on the orientation field and the moving frame $\{T(s), N(s)\}$ — both arrows always labelled: $T = (\cos\theta(s), \sin\theta(s)) = X_1\!\restriction_{\gamma(s)}$, the horizontal direction the SR control law drives along, and $N = (-\sin\theta(s), \cos\theta(s)) = X_3\!\restriction_{\gamma(s)}$, the perpendicular direction that is only reachable through the Lie bracket $[X_1, X_2]$.

Why the green field stroke is tangent at the endpoints but not in between. The green stroke at the moving point is $\theta_{\mathrm{field}}(x(s), y(s))$ — the orientation that the cortex assigns to the neuron sitting at the planar position $(x(s), y(s))$. The blue arrow $T$ is the orientation that the geodesic happens to have at this $s$. These are two different things:
  • The orientation field $\theta_{\mathrm{field}}$ is a fixed scalar function on the $(x, y)$ retinal plane — it labels each cortical column with its preferred orientation.
  • The geodesic's tangent $\theta(s)$ is the third coordinate of a curve in the 3-D contact bundle $\mathrm{SE}(2)$. It is determined by Pontryagin's maximum principle (i.e. by the SR Hamiltonian flow, which gives $\kappa(s) = d\theta/ds$ as one of the elastica functions) — not by what the field happens to read at $(x(s), y(s))$.
The boundary value problem only forces equality at the two ends: $\theta(0) = \theta_{\mathrm{field}}(\text{source})$ and $\theta(L) = \theta_{\mathrm{field}}(\text{target})$, because that is what "connect these two neurons" means — start and finish on the cortical columns the field assigns. In between the two ends, the geodesic is free to leave the field's prescription. Watching $\Delta\theta$ as you drag the slider, you see it go from $0°$ at $s = 0$ to a non-zero excursion in the middle and back to $0°$ at $s = L$ — that excursion is the cost of horizontality: the curve has to keep $\dot\theta = \kappa$, $\dot x = u\cos\theta$, $\dot y = u\sin\theta$ consistent with the SR ODE, and the cortical orientation field plays no role in that constraint.

Maxwell-pair mode. When the dropdown is set to the Maxwell pair, two frames advance in lock-step along the two members of the pair $\gamma_A, \gamma_B$ (frame labels become $T_A, N_A$ and $T_B, N_B$). Both close back to the source after the same arc length $L = 4K(k_c^2)/\omega$, but their final tangents differ by exactly $\pi$: $\theta_A(L) - \theta_B(L) = \pi \pmod{2\pi}$. That is the whole point of the pair. The two geodesics are reversed-heading partners — they leave the source in opposite directions and traverse $\sigma$-mirrored figure-8 loops. Because a V1 neuron's preferred orientation is a line, identified mod $\pi$, both endpoint headings $+\theta_{\mathrm{src}}$ and $-\theta_{\mathrm{src}}$ represent the same neuron. The pair therefore gives two genuinely distinct closed SR-shortest paths from the source neuron to itself, with identical arc length — a Maxwell pair on $\mathrm{SE}(2)$ (Sachkov, ESAIM:COCV 2008, Fig. 34).

Hörmander condition ⇒ V1 is a contact manifold

Because $X_3 = [X_1, X_2]$ is not in $\mathrm{span}{X_1, X_2}$ but the three together ${X_1,\, X_2,\, [X_1, X_2]}$ span the full tangent space $T_g\,\mathrm{SE}(2) \cong \mathbb{R}^3$ at every $g$, the 2-plane field

\[\mathcal{H} \;:=\; \mathrm{span}\{X_1, X_2\}\]

satisfies the Hörmander (bracket-generating) condition. By the Chow–Rashevskii theorem (1938, 1938) any two configurations in $\mathrm{SE}(2)$ can therefore be joined by a horizontal path — a curve whose velocity lies in $\mathcal{H}$ at every point. Geometrically, $\mathcal{H}$ is a contact structure on $\mathrm{SE}(2)$, and Petitot’s key insight is that the V1 cortex is this contact manifold.

The Sub-Riemannian Metric and the Minimisation Problem

We equip the horizontal distribution $\mathcal{H}$ with the left-invariant inner product: \(\langle u_1 X_1 + u_2 X_2,\; u_1 X_1 + u_2 X_2 \rangle = u_1^2 + u_2^2.\)

This defines a sub-Riemannian (SR) metric on SE(2): the length of a horizontal curve is $\int_0^T \sqrt{u_1^2 + u_2^2}\,dt$, and the SR distance between two points is the infimum of lengths over all horizontal paths.

The visual completion problem now takes a precise form:

Problem (Petitot 2003)
Given two neurons $(x_0, y_0, \theta_0)$ and $(x_1, y_1, \theta_1)$ in V1, find the horizontal curve $(x(t), y(t), \theta(t))$ in SE(2) of minimum length connecting them.

The spatial projection $(x(t), y(t))$ of the solution is the perceptually completed contour that the visual system infers between two oriented line elements $(x_0,\theta_0)$ and $(x_1,\theta_1)$.

The simplification $u_1 = 1$ (unit forward speed) reduces the problem to minimising \(\int_0^L \kappa^2(s)\,ds\) where $L$ is arc length and $\kappa = u_2/u_1 = \dot\theta$ is the signed curvature. This is the Euler elastica functional: the total squared bending energy of the projected curve.

$k\!<\!1$ inflectional  ·  $k\!=\!1$ Euler spiral  ·  $k\!>\!1$ non-inflectional
Figure 4. Family of SE(2) geodesics starting from the same position with the same initial heading. The single control parameter $k$ traverses all three elastica regimes: $k \in (0, 1)$ — inflectional, $\kappa(s) = 2k\,\mathrm{sn}(s\mid k^{2})$; $k = 1$ — the Euler / Cornu spiral, the separatrix $\kappa(s) = 2\,\mathrm{sech}\,s$; $k > 1$ — non-inflectional, parametrised by $m = 2 - k \in (0, 1)$ with $\kappa(s) = 2\,\mathrm{dn}(s\mid m)$ (closed-loop curves with one-signed curvature). Drag the slider to set the maximum $k$ rendered; the vertical bar on the right is the colour scale, with the red tick marking the separatrix $k = 1$. As $k \to 1$ the period $4K(k^{2})$ diverges and the inflectional curve spirals inward; as $k$ increases past 1 the non-inflectional curves close up into deformed circles (Part 2).

From Petitot’s Model to the Open Problem

Petitot’s paper established the model. The subsequent mathematical programme — carried out primarily by Sachkov and collaborators — aimed to characterise the global structure of this SR geometry: which geodesics are actually optimal (globally length-minimising), and up to what arc length?

In every statement that follows, “length” means the sub-Riemannian length — the only length the visual cortex’s contact-bundle geometry actually defines. For a horizontal curve $\gamma : [0, T] \to \mathrm{SE}(2)$ with controls $(u_1, u_2)$ along the horizontal frame ${X_1, X_2}$,

\[L_{\mathrm{SR}}(\gamma) \;=\; \int_{0}^{T} \sqrt{u_1^{2} + u_2^{2}}\,dt.\]

Under the standard unit-speed parametrisation $u_1^{2} + u_2^{2} = 1$, this collapses to $L_{\mathrm{SR}}(\gamma) = T$ — the SR arc-length parameter. Crucially, Euclidean arc length on the projected plane curve $(x(s), y(s))$ is not what gets minimised; only horizontal motion (forward + rotation) costs anything, and “sliding sideways” is forbidden, not free.

This requires understanding two geometric loci, both defined with respect to $L_{\mathrm{SR}}$:

For a sub-Riemannian manifold as symmetric as SE(2), the cut and Maxwell loci coincide (this is part of what Sachkov and I proved in arXiv:0807.4731). The first point on the cut locus along a given geodesic is the cut time $t_\mathrm{cut}$, and it equals the first time the exponential map is no longer injective.

The beautiful — and still incomplete — result is:

Open Problem
For the SR problem on SE(2), the first Maxwell time along an extremal with modulus $k$ is $$t_{\mathrm{MAX}} = \frac{4K(k^2)}{\omega_0(k)},$$ where $K(k^2)$ is the complete elliptic integral of the first kind and $\omega_0$ is the linearised oscillation frequency. It is conjectured — and verified numerically — that $t_\mathrm{cut} = t_\mathrm{MAX}$ for all extremals. A complete proof in all degenerate cases (the boundary of the abnormal locus) remains open.

The four parts of this series develop the full story:

  1. This article: the model, the geometry, the problem statement.
  2. Part 2 (Euler’s Elastica): deriving the pendulum equation and solving it with Jacobi elliptic functions $\mathrm{sn}(s\mid k^2)$, $\mathrm{cn}(s\mid k^2)$, $\mathrm{dn}(s\mid k^2)$.
  3. Part 3 (Maxwell Strata): characterising the locus where two geodesics of equal length meet; the role of the discrete symmetry group of SE(2); proof that the first Maxwell time is $4K(k^2)/\omega_0$.
  4. Part 4 (The Open Problem): what is proved, what is conjectured, and the remaining analytic difficulty near the boundary of the abnormal set.

References

  1. J. Petitot (2003). "The neurogeometry of pinwheels as a sub-Riemannian contact structure." Journal of Physiology–Paris 97(2–3): 265–309.
  2. I. Moiseev & Yu. L. Sachkov (2010). "Maxwell strata in sub-Riemannian problem on the group of motions of a plane." ESAIM: COCV 16(2): 380–399. arXiv:0807.4731
  3. G. Citti & A. Sarti (2006). "A cortical based model of perceptual completion in the roto-translation space." J. Math. Imaging Vision 24(3): 307–326.
  4. D. H. Hubel & T. N. Wiesel (1962). "Receptive fields, binocular interaction and functional architecture in the cat's visual cortex." J. Physiology 160: 106–154.
  5. D. J. Field, A. Hayes & R. F. Hess (1993). "Contour integration by the human visual system: Evidence for a local 'association field'." Vision Research 33(2): 173–193.
  6. W. H. Bosking et al. (1997). "Orientation selectivity and the arrangement of horizontal connections in tree shrew striate cortex." J. Neuroscience 17(6): 2112–2127.
  7. G. Kanizsa (1955). "Margini quasi-percettivi in campi con stimolazione omogenea." Rivista di Psicologia 49: 7–30.
  8. Yu. L. Sachkov (2011). "Cut locus and optimal synthesis in the sub-Riemannian problem on the group of motions of a plane." ESAIM: COCV 17(4): 293–321. arXiv:0903.0727