9The visual system must make predictions to compensate for inherent delays in its processing, yet 10 little is unknown, mechanistically, about how prediction aids natural behaviors. Here we show that 11 despite a 30ms intrinsic processing delay, the vertical motion sensitive (VS) network of the blowfly 12 can achieve maximally efficient prediction. This prediction enables fine discrimination of input 13 motion direction during evasive flight maneuvers, which last just 40ms. Combining a rich database 14 of behavioral recordings with detailed compartmental modeling of the VS network, we further 15 show that the VS network implements this optimal prediction with a specific wiring architecture; 16 axonal gap junctions between the VS cells are crucial for optimal prediction during the short 17 timespan of the evasive maneuver. Furthermore, a subpopulation output of the VS network can 18 selectively convey predictive information about the future visual input to the downstream neck 19 motor center. Our work links prediction to behavior, via its neural implementation. 20 21 36Insects, especially diptera, are excellent models for exploring this problem because precise 37 measurements of their evasive behaviors are available, the neuronal circuits involved are known, 38 and responses can be modeled in rich detail. During an escape, the fly elicits an in-flight evasive 39 maneuver after 60 ms of visual-motor delay. This maneuver adjusts its heading, accelerating the fly 40 1 of 17 away from the threat via a banked turn followed by a counter-banked turn (Muijres et al., 2014). 41 Previous work has shown that banking is the fastest way to change heading (Dickinson and Muijres, 42 2016). The unique challenge in the fly's evasive maneuver is that it lasts only 40 ms, which is 43 roughly the time scale of the visual sensory delay (Land and Collett, 1974). Therefore, previous 44 work hypothesized that the dynamic control of the evasive maneuver is only possible through 45 mechanosensory feedback, i.e., via the haltere circuit (Dickinson and Muijres, 2016). However, to 46 date, there is no quantitative evidence showing that such feedback alone suffices to guide in-flight 47 escape responses. 48 Here we explore whether the fly can use an alternate strategy to control its evasive maneuver, 49 based on predictions of its future visual input. We hypothesize that if the fly can accurately predict 50 the future visual input that it will experience during the fluid banked and counter banked turns, 51 it can use such information to actively control evasive flight maneuvers. We focus on how this 52 visual prediction emerges in the vertical motion sensing (VS) network of the fly visual system, 53 which is organized in four consecutive layers: retina, lamina, lobula and lobula plate. The VS 54 network is located in the lobula plate; it contains 10 lobula plate tangential cells (the VS cells) in 55 each hemisphere that integrate local motion signals from upstream processing. The VS network 56 is dedicated to pr...