Aquatic vertebrates have a lateral-line sense, which detects ration moving along the animal’s head and trunk. Some fish have a similar electrical field sense, but the electro-sense has disappeared and re-evolved several times, while the lateral-line is primitive, existing for the earliest vertebrates. The lateral-line system is important for rheotaxis (swimming against the current), avoiding predators, detecting prey, schooling, and avoiding obstacles [Saccomanno et al 2021].
In an empty region of water, a drifting fish would not detect water movement because the water current moves together. However, obstacles such as a wall impede water movement on one side, producing a net rotation around the fish [Oteiza et al 2017]. Comparing lateral-line senses to the opposite side can detect curl/vorticity and measure changes in the left-right water motion gradient. If the gradient decreases, the fish can swim straight, but if the gradient increases, the first can turn in the direction of rotation to automatically avoid obstacles [Oteiza et al 2017]
Although the lateral line system is composed of many neuromast sensors along the animal’s entire length, for many behaviors the senses can be pooled into two subgroups: head and trunk [Chagnaud et al 2017] without using fine details about individual sensors, at least for rheotaxis [Valera et al 2021]. The rheotaxis circuit is almost entirely calculated by the hindbrain, primarily from N.ll (lateral line sensors) to R.mon (medial octavo lateral nucleus), before projecting to the midbrain M.ts (torus semicircular) and OT (optic tectum) [Valera et al 2021]. The Valera paper provides a detailed circuit model for rheotaxis.
R.mon is a long hindbrain nucleus extending along several hindbrain rhombomeres from R1 near the midbrain-hindbrain-boundary to R6 [Fame et al 2006] and is a cerebellum-like structure [Bell et al 2008], [Montgomery et al 2012], which is particularly important here because the animal’s own movement produces water motion. To sense external obstacles or possible predators or prey, the animal’s own movement needs to be subtracted from the sense. Cerebellum-like structures are adaptive filters that learn the effects of the animal’s own movement on a sense, such as the lateral line [Bell et al 2008], [Montgomery et al 2012]. R.mon provides the main lateral-line projections, providing filtered, more useful information, not the raw data from the lateral-line neuromasts.
Lateral-line projections from R.mon
In zebrafish the lateral-line projections from R.mon are highly stereotyped and vary according to rhombomeric source, since R.mon extends from R1-R6 [Fame et al 2006].

The diagram above shows three of the lateral-line circuits. The most reflex-like circuit N.ll (lateral-line sensors) projects directly to the R4.mc (Mauthner cell) startle cells to provide directionality to a startle escape. An intermediate circuit projects from R.mon to M.pt (pretectal area) and specifically to M.nmlf (nucleus of the mlf – medial lateral fasciculus). The mlf is the reticulospinal motor tract, which drives motor neurons. Although most of the neurons that drive mlf are R.rs (reticulospinal) neurons in the hindbrain, M.nmlf is a midbrain motor command nucleus and is the primary output of M.pt. The least reflexive, most processed circuit goes through M.ts (torus semicircularis – inferior colliculus), which does scene analysis of sound and lateral and, and to OT.d (deep layers of the optic tectum), which integrates visual image maps with other senses like the lateral.
This essay will focus on the M.pt circuit. Note that M.pt is an area with multiple subsystems, not a single nucleus. Although M.pt and OT.d are both responsive to visual and lateral-line senses, M.pt is more necessary for obstacle avoidance. For example, disabling OT in frogs leaves obstacle avoidance intact [Krauzlis et al 2018]. Also, as a benefit for the essay, this lateral-line circuit through M.nmlf is relatively straightforward.
In an earlier essay 34, I used diamond as an obstacle avoidance sense. When an animal rapidly nears an obstacle, like will dim on the side nearest the obstacle. A simple dimming circuit can provide rudimentary obstacle avoidance. That essay’s circuit used retinal vision to M.pt to M.nmlf. If we simply replace the dimming input with lateral-line distance input, the same circuit can avoid obstacles using the lateral line. In frog tadpoles, the earliest sensory projections are skin touch and the pineal eye, which is photoreceptive and active in tadpoles. Lateral-line development immediately follows those senses, with head neuromasts (lateral-line sensors) appearing before trunk neuromasts [Saccomanno et al 2022]. So, it’s possible that in evolution, lateral line connected to ordering dimming circuits, where dimming to M.pt to M.nmlf is replace by lateral-line to M.pt to M.nmlf.

The bilateral comparison of R.mon is highly organized in the M.pt, M.nmlf area. Ipsilateral R.mon projections are dorsal to contralateral R.mon projections with a sharp partition [Fame et al 2006]. This organization is ideal for a left-right decision that compare the strength or the nearness of left vs right lateral-line sensors.
Simulation
The simulation implements an extremely simplified model of the lateral line because it completely avoids the complexity of fluid dynamics, which is the entire basis for the lateral line. Instead, the simulation simply polls a set of points around the animal, detecting whether any of this points intercepts an object such as a wall. For the animal, the sense reports only four values: head left, head right, trunk left and trunk right. Any further details about the object location isn’t passed to the animal. This limited data tries to approximate the limited precision avoidable to zebrafish such as in [Oteiza et al 2017] without giving the simulated animal more detailed information.
It’s important to notice just how simplified this model is. In particular, the simulation avoids self-motion entirely, because the self-motion doesn’t affect the point collisions at all, very unlike the real lateral line being swamped by water current signals driven by the animal’s own swimming. So, this model is only valuable in locating obstacle avoidance as a simple circuit in M.pt, not as a model of the lateral line itself.

The screenshot above shows the animal approaching the top wall of the arena. The crescent-moon-like diagram is the lateral line, showing obstacles to the front and to the right side of the animal.
Discussion
For this essay the lateral line is mainly an improvement to using dimming for obstacle avoidance in M.pt. Although dimming does seem to enable obstacle avoidance for some clear situations like nearing a dark-colored wall, dimming would be less effective for lighter walls, or in the dark. Dimming is also coarse and doesn’t provide a distance measurement. It’s better than nothing, but not particularly reliable. Even a primitive lateral line improves this obstacle avoidance. Even if the lateral line were only as reliable as dimming, having a second, independent sense to confirm or disconfirm the first measurement would improve reliability.
Dimming almost certainly existed as a sense before lateral line, because ascidian larva can use dimming but these tunicates don’t have a lateral-line sense. It seems plausible that a simple lateral-line sense could initially improve dimming-based obstacle or predator avoidance and later could become more effective when adaptive filtering from the cerebellum-like R.mon became available.
This essay used M.pt as the main path for the lateral line, but OT is also a major candidate, with major lateral-line input through M.ts. The OT input is from a broader range of R.mon, the full R1-R6 instead of the R1-R2 subset for M.pt. This broader input to OT might imply that OT is more important, which combines with OT being the largest or one of the largest areas is most vertebrate brains.
Both M.pt and OT are best know for their visual image processing. M.pt is best known for its optic flow, which drives OMR (optomotor reflex), OKR (optokinetic reflex), and can be used for navigation and obstacle avoidance, like optic flow processing in insects, used for flight navigation. Before jaws developed, vertebrates were primarily filter feeders, so a hunting function for OT is unlikely. And looming, while important for predator avoidance, doesn’t seem quite important enough to drive the enormous size of the OT even in the lamprey.
In mammals, the lateral OT is a key node in decision making, part of a drift-diffusion system for deciding left or right turns, even for complex or abstract noisy input. The decision system incorporates the thalamus, basal ganglia including the subthalamic nucleus in a recurrent loop. In mammals, this decision loops also incorporates the frontal premotor areas, but the OT can make decisions even when the frontal cortex is disable. OT is also a key node in orientation: selecting an object to attend and seek.
The primitive pre-vertebrate animal as represented in the essay does not have image-forming eyes. The larval lamprey is the same: its image-forming eye only develops later as an adult. The larval OT is correspondingly poorly developed. This raises a question: what did the OT or M.pt do before the retina expanded to become image-forming? Or, for that matter, because paired eyes are a vertebrate innovation, did an early M.pt or OT exist before the paired eye? Phototaxis and a dimming startle response almost certainly existed, because those exist in tunicates. Because M.pt has a simpler input from senses like the lateral line, and it handles some phototaxis and basic obstacle avoidance, it seems like a likely candidate as a more primitive system. Perhaps with OT specialized for escape dimming, which would be very simple with only a single set of dimming photoreceptors.
OT is also known for its multisensory integration, and in this lateral line path it receives more sophisticated processed input from M.pt in contrast to the simple, direct input to M.pt. So perhaps, an original OT function might be more closely related to more sophisticated decision-making, which may tie in with an orientation function.
References
Bell, Curtis C., Victor Han, and Nathaniel B. Sawtell. Cerebellum-like structures and their implications for cerebellar function. Annu. Rev. Neurosci. 31 (2008): 1-24.
Chagnaud BP, Engelmann J, Fritzsch B, Glover JC, Straka H. Sensing External and Self-Motion with Hair Cells: A Comparison of the Lateral Line and Vestibular Systems from a Developmental and Evolutionary Perspective. Brain Behav Evol. 2017;90(2):98-116.
Fame RM, Brajon C, Ghysen A. Second-order projection from the posterior lateral line in the early zebrafish brain. Neural Dev. 2006 Nov 29;1:4.
Krauzlis RJ, Bogadhi AR, Herman JP, Bollimunta A. Selective attention without a neocortex. Cortex. 2018 May;102:161-175.
Montgomery, John C., David Bodznick, and Kara E. Yopak. The cerebellum and cerebellum-like structures of cartilaginous fishes. Brain Behavior and Evolution 80.2 (2012): 152-165.
Oteiza P, Odstrcil I, Lauder G, Portugues R, Engert F. A novel mechanism for mechanosensory-based rheotaxis in larval zebrafish. Nature. 2017 Jul 27;547(7664):445-448.
Saccomanno V, Love H, Sylvester A, Li WC. The early development and physiology of Xenopus laevis tadpole lateral line system. J Neurophysiol. 2021 Nov 1;126(5):1814-1830.
Valera G, Markov DA, Bijari K, Randlett O, Asgharsharghi A, Baudoin JP, Ascoli GA, Portugues R, López-Schier H. A neuronal blueprint for directional mechanosensation in larval zebrafish. Curr Biol. 2021 Apr 12;31(7):1463-1475.e6.






