## Abstract

Vascular networks continuously reorganize their morphology by growing new or shrinking existing veins to optimize function. Flow shear stress on vein walls has been set forth as the local driver for this continuous adaptation. Yet, shear feedback alone cannot account for the observed diversity of network dynamics – a puzzle made harder by scarce spatio-temporal data. Here, we resolve network-wide vein dynamics and shear during spontaneous reorganization in the prototypical vascular networks of *Physarum polycephalum*. Our experiments reveal a plethora of vein dynamics (stable, growing, shrinking) that are not directly proportional to local shear. We observe (a) that shear rate sensing on vein walls occurs with a time delay of 1 min to 3 min and (b) that *network architecture* dependent parameters – such as relative pressure or relative vein resistance – are key to determine vein fate. We derive a model for vascular adaptation, based on force balance at the vein walls. Together with the time delay, our model reproduces the diversity of experimentally observed vein dynamics, and confirms the role of network architecture. Finally, we observe avalanches of network reorganization events which cause entire clusters of veins to vanish. Such avalanches are consistent with architectural feedback as the vein connections perpetually change with reorganization. As these network architecture dependent parameters are intrinsically connected with the laminar fluid flow in the veins, we expect our findings to play a role across flow-based vascular networks.

Veins interwebbed in networks distribute resources across numerous forms of life, from the blood vasculature in animals [1–4], via the leaf venation in plants [5, 6] to the vein networks entirely making up fungi and slime molds [7, 8]. Integral to a vascular network’s success is its continuous reorganization, growing new veins and shrinking existing ones [3, 9, 10]. As vein dynamics are usually perceived as local adaptation of individual veins [1], reorganization patterns at the network scale remain a puzzle. However, understanding network reorganization is crucial to understand development [3], and combat widespread diseases [11, 12].

While the biological makeup of vasculature systems is quite diverse, the physics underlying pervading laminar fluid flows is the same [13]. Already almost a century ago Murray introduced the idea that flow shear stress drives vein radius adaptation [14]. Within his framework, at steady state, veins minimize viscous dissipation while constrained by a constant metabolic cost per vein volume. Since Murray derived his hypothesis, studies have been focused on *static* networks [6, 15, 16]. Data on optimal static network morphologies agrees very well with Murray’s predictions, strikingly across very different forms of life; from animals [17, 18], to plants [17, 19] and slime molds [20, 21], underlining the relevance of fluid flow physics for vascular morphologies.

How does flow shape network morphologies beyond the steady state, during reorganization? Data on vein *dynamics*, [3, 22–25], even during spontaneous reorganization, is limited due to the difficulty to acquire time resolved data covering entire networks. Observation of network excerpts suggests that flow shear stress alone can not account for the diversity of observed dynamics [26]. In light of scarce experimental observations, a number of vein adaptation models have been introduced [4, 10, 20, 22, 27–33]. Yet, the mechanisms that govern vein adaptation and thereby network reorganization can only be conclusively determined experimentally.

Here, the vascular networks formed by the slime mold *Physarum polycephalum* open up the unique possibility to quantify simultaneously vein dynamics and flow shear stress in the entire network, since the organisms’ body is reduced to two dimensions [8, 21, 22]. The flows pervading the vein networks’ arise from rhythmic contractions of the vein walls, due to acto-myosin activity in the vein cortex. As the flows oscillatory component changes rapidly (1 min to 2 min) [34, 35], average flows dominate long-term vein adaptation dynamics (10 min and more). Our aim, here, is to employ *P. polycephalum* to quantify experimentally and rationalize with minimal modelling ingredients, individual and global vein reorganization dynamics.

Our quantitative data reveals that shear rate indeed feeds back on vein radii, interestingly with a time delay. Importantly, the effect of shear rate is disparate: similar shear rate values may cause veins either to grow or to shrink. To reconcile these disparate dynamics, we derive a model of vein adaptation based on force balance on the vein wall. In agreement with experiments, our model predicts that vein adaptation is driven by shear rate, yet highlights that vein fate is also determined by *network architecture dependent parameters*, such as relative pressure and relative resistance. As veins shrink and grow, network architecture continuously changes. As a consequence, vein fate is not constant in time. We find that this dynamical perspective explains an avalanche of events resulting in connected clusters of veins vanishing within a network. Our analysis identifies network architecture dependent parameters that can be easily mapped out in living flow networks, thus providing a conceptual shift to be tested on other vascular systems with fluid flows.

## RESULTS

### Individual vein dynamics with complex shear-vein radius relation

We observe vein dynamics by tracking vein radius and shear rate in *P. polycephalum* specimen using two complementary imaging techniques, see Fig. 1. On the one hand, we use close-up vein microscopy over long time scales (Fig. 1-A.i). This allows us to directly measure radius dynamics *a* and fluid flow rate *Q* inside a selection of veins using particle image velocimetry (Fig. 1-A.ii). On the other hand, we observe full networks (Fig. 1-B.i). Here, radius dynamics *a* are measured and flows *Q* inside veins are subsequently calculated numerically integrating conservation of fluid volume, see Materials and Methods. Our imaging techniques resolve vein adaptation over a wide range of vein radii, (*a* = 5 *−* 70 *µ*m) showing rhythmic contractions, with a period of *T ≃* 1*−* 2 min (connected dots Fig. 1-iii). As the fluid shear rate is a nonlinear function of the vein radii, it oscillates with twice the contraction frequency (Fig. S1). To access veins’ long time behaviors, we average over fast oscillations (over *t*_{ave} ≃ *T*) and obtain the time-averaged radius ⟨ *a* ⟩ and shear rate ⟨ *τ* ⟩ (full lines in Fig. 1-iii). Relating time-averaged shear rate to time-averaged vein radius we find diverse, complex, yet reproducible vein trajectories (Fig. 1-iv). Particularly in shrinking veins the relation between shear and vein adaption is ambiguous. As the radius of a vein shrinks, the shear rate either monotonically decreases (pink in Fig. 1-iv), or, monotonically increases (dark pink), or, increases at first and decreases again, undergoing a non-monotonic trajectory (light pink). Disparate shrinking dynamics are reproduced for over 200 veins in the network (Methods). In contrast stable veins have a definite shear-radius relation: usually stable veins perform looping trajectories in the shear rate-radius space (blue arrows in Fig. 1-iv). In the full network, these loops circle in clockwise direction for 80% of the observed stable veins. Clockwise circling corresponds to an in/decrease in shear followed by an in/decrease in vein radius pointing to a shear feedback on local vein adaptation.

### Shearrate feedback occurs with a time delay

However, feedback between shear rate and radius adaptation is not immediate and clearly appears to occur with a time delay (Fig. 1-iii), ranging from 1 min to 10 min. We systematically investigate the time delay between shear rate and vein adaptation. For each vein segment, we calculate the cross correlation between averaged shear rate ⟨ *τ* ⟩ (*t* + Δ*t*) and average vein adaptation as a function of the delay Δ*t*. Time delays *t*_{delay}, corresponding to the correlation maximum, are recorded if the maximum is significant (Fig. S4). From entire networks with more than 10000 vein segments we obtain statistically relevant data of time delays *t*_{delay} (Fig. S5). We find time delays 1 min to 3 min are most common with an average of *t*_{delay} ≃2 min, strikingly similar across different full network specimen. The time delay observed is independent of the averaging window (Fig. S3). Our measurements are consistent with measured data on the contractile response of active fibers [36, 37], which exhibit a time delay of about 1 *−*5 s for *in vitro* gels [37] – that could accumulate in much longer time delays *in vivo* [38].

### Shear rate and resistance feedback alone can not account for the diversity of dynamics

Our experimental data clearly points to a feedback of shear rate on individual vein adaptation. From previous works [10, 27, 29, 31, 33] we expect that the magnitude of shear rate determines vein fate, i.e. lower shear resulting in a shrinking vein. Yet, this is not corroborated by our experimental measurements. In fact, despite displaying equal vein radii and comparable shear rate toward the beginning of our data acquisition, some veins are stable in time (blue in Fig. 1-iv), while others vanish (pink). Further, mapping out shear rate throughout the network at the beginning of our observation, see Fig. 1-B.ii, reveals that dangling ends have low shear rate, due to flow arresting at the very end of each dangling end. Yet, some dangling ends will grow (*i*.*e* red dot in Fig. 1-B.i.). In parallel, small veins located in the middle of the organism show high shear yet will vanish (yellow arrow in Fig. 1-B.ii, other examples in Fig. S6-A, Fig. S13-C and S14-C). Therefore, the hypothesis that veins with low shear should vanish, as they cannot sustain the mechanical effort [39, 40], cannot be reconciled with our data. Also, other purely geometrical vein characteristics such as vein resistance [22], , where *µ* is the fluid viscosity and *L* the vein length [41], clearly do not determine vein fate either, as they are directly related to vein radius. Therefore, additional feedback parameters must be identified.

### Model derived from force balance reproduces disparate individual vein dynamics

Our aim is now to identify other flow-based feedback parameters that drive vein adaptation on long timescales. As we focus on flow-based feedback, we explore theoretically the force balance on vein walls. Taking inspiration from previous works [27–31], we derive vein adaptation dynamics (Methods and SI Text Sec. 1). We consider force balance on a vein wall segment of radius *a* and length *L* and average out short time scales of vein contractions (1 *−*2 min, corresponding to elastic deformations [35]) to focus on longer time scales corresponding to growth or disassembly of the vein wall (10 *−*60 min, linked to *e*.*g* actin fiber rearrangements [42, 43]). In the force balance perspective, pressure, circumferential stress and active stresses are typically constant during an adaptation event [8] and vary smoothly throughout the network (Fig. S6). In contrast, shear stress (proportional to shear rate) is observed to change significantly over time and space throughout the network, and is therefore expected to contribute significantly to long time scale dynamics. Importantly, shear stress does not directly participate in radial dilatation or shrinkage, as it acts parallel to the vein wall. Rather, the cross-linked actin fiber cortex responds anisotropically to shear stress and hence tends to dilate or shrink vessels [36, 37] (Fig. S2). We thus arrive at the adaptation rule
where *τ*_{s} is shear stress sensed by the vessel wall, *τ*_{loc} is a shear rate reference and *t*_{adapt} is the adaptation time to grow or disassemble a vein wall. The quadratic dependence in (1) originates from fits of the experimental data on the anisotropic response of actin fibers in Ref. [37]. Alternatively, a linear dependence, as in the phenomenological model of Ref. [27], would not affect our results.

The force balance perspective (1) already brings insight into the mechanisms driving vein fate. In fact, the shear reference *τ*_{loc} typically measures the local fluid pressure relative to the rest of the network *τ*_{loc} ≃Δ*P*_{net}*/µ* (SI Text Sec. 1). It is therefore related to the network’s architecture as pressure senses the entire network’s morphology. Since *τ*_{loc} is spatially dependent, veins with similar shear magnitude may suffer different fates; a radical shift compared to previous works. The adaptation timescale *t*_{adapt}, that controls adaptation speed, is also spatially dependent.

Finally, we radically deviate from existing models [27–31] by incorporating explicitly the measured time delay *t*_{delay} between the shear sensed by a vein wall *τ*_{s} and fluid shear rate ⟨ *τ* ⟩ through the phenomenological first order equation
that correctly reproduces the experimentally measured time delay *t*_{delay} between time-averaged shear rate ⟨ *τ*⟩ and radius adaptation *d* ⟨ *a* ⟩ */dt* (Fig. S4). At steady state, we recover a constant shear rate ⟨ *τ* ⟩ = *τ*_{s} = *τ*_{loc}, corresponding to Murray’s law (see Methods)[14]. Thus, *τ*_{loc}, which also includes a contribution from active stress generation, can be viewed as a proxi for a vein’s metabolic cost in Murray’s law.

To analyse the non-linear dynamics of our model Eqs. (1-2) for a single vein, we need to specify the flow-driven shear rate ⟨ *τ* ⟩. The flow in a vein is coupled to the flows throughout the network. To take the entire network into account we consider a vein, connected at both ends to the remaining network, and map out the equivalent flow circuit representing the network, see Fig. 2-A. The flow circuit consists of two parallel resistances: for the vein and *R*_{net} corresponding to the remaining network resistance. The average net flow generated by the vein contractions is where is the relative contraction amplitude. *Q* thus measures the mass exchanges between the network and the vein. As mass is conserved, this results in an inflow *Q*_{net} = *−Q*, in the rest of the network. Flows generated by the rest of the network average out to *I* and the sum *I* + *Q* flows within the vein – see Fig. 2-A. ii. With Kirchhoff’s first and second circuit law, the time-averaged shear rate in the vein is

where *t*_{ave} is the typical averaging time. The coupled dynamics of {⟨ *τ* ⟩, *a*} are now fully specified through Eq. (1-3).

Our dynamic system {⟨ *τ* ⟩, *a*}reproduces the key features of the trajectories observed experimentally.First, sta-ble and unstable fixed point and hence v te, depend on the parameters *R/R*_{ne}, *Q*_{ne} and *τ*_{loc} ≃ Δ*P*_{net}*/µ* (SI Text Sec. 2), determining two stable fixed points at (0, 0) and (*τ*_{loc}, ⟨ *a* ⟩ _{stable}(*R/R*_{net}, *Q*_{n}, *τ*_{loc})), and an unstable fixed point (*τ*_{loc}, ⟨ *a* ⟩ _{unstable}(*R/R, Q* _{et}, *τ*_{loc})). Note that the stable fixed point with finite radius, (*τ*_{loc}, ⟨ *a* ⟩ _{stable}) corresponds to Murray’s steady state. Second, the time delay *t*_{delay} sets the dynamics observed. In fact, we find theoretically clockwise spiraling trajectories starting near the stable fixed point (*τ*_{loc}, ⟨ *a* ⟩ _{stable}) (blue in Fig. 2-B.i) as well as veins shrinking with monotonous (dark pink in Fig. 2-B.i) or with non-monotonous shear rate decrease (light pink Fig. 2-B.i). Without the time delay (3), instantaneous shear sensing as *τ*_{s} = ⟨ *τ* ⟩ (similarly as in *e*.*g*. Ref. [27]) can produce neither circling nor non-monotonous trajectories (Fig. 2-B.ii).

We further verify that our model quantitatively accounts for the observed dynamics with physiologially relevant parameters. We fit our 12 close-up data sets, as well as 12 randomly chosen veins of the full network in Fig. 1-B, for vein radius data ⟨ *a* ⟩ (*t*) from input shear rate data ⟨ *τ* ⟩ (*t*). This determines model constants *t*_{adapt} and *τ*_{loc}. The time delay *t*_{delay} is either set to an average value, to the best cross-correlation value for the specific vein, or fitted for, with no significant change in the results. Overall, we find a remarkable agreement between fit and data (Fig. 2-D, Figs. S8-11 and Tables S1-3), suggesting that the minimal ingredients of this model are sufficient to reproduce experimental data. In all samples, fitting parameters resulted in physical values [44], with *τ*_{loc} being on the order of magnitude of measured shear rates and *t*_{adapt} ≳ 10 min corresponding to long time scale adaptation of vein radii. Notably, for all fits to data with intermediate time frames (15 min to 40 min) corresponding to the time scale of vanishing events, we find constant *τ*_{loc} yields perfect agreement, while for longer time duration *τ*_{loc} has to change. This confirms that network architecture-dependent parameters, such as *τ*_{loc}, feed into the adaptation dynamics and - notably - change when network architecture changes.

### Network architecture determines vein dynamics and ultimate fate

Which vein and network specific parameters are the most important for vein adaptation? Our model Eqs. (1-3) highlight *R/R*_{net}, *Q*_{net}, *τ*_{loc} as potential candidates. The resistance ratio *R/R*_{net} varies over orders of magnitude (Fig. 3-A), with values that are not correlated with vein size (see Fig. S17). Rather, *R/R*_{net} depends on the network’s architecture – *e*.*g*. whether a vein is in the network center or on the outer rim. *R/R*_{net} reflects the relative cost to transport mass through the rest of the network, and is thus also intuitively a good candidate to account for individual vein adaptation. *Q*_{net} typically scales with the vein radius, with larger outflows observed in larger veins (Fig. 3-B). Hence *Q*_{net} provides similar information as the vein resistance *R*, namely information on local morphology, and is not an additional important feedback parameter. Finally, *τ*_{loc} *∝*Δ*P*_{net} is also network architecture dependent. We find that pressure maps of Δ*P*_{net} are mostly uniform, except towards dangling ends where relevant differences are observed (Fig. 3-C) and could influence vein adaptation. Our aim is now to investigate in more detail how these relevant, network architecture dependent, feedback parameters, *R/R*_{net} and Δ*P*_{net}, control vein dynamics on the basis of three key morphologies.

#### Dangling ends are unstable: disappearing or growing

As observed in our data, dangling ends are typical examples of veins that can start with very similar shear rate and radius and yet suffer radically different fates (Fig. 1-B.i and ii, Fig. 4-A). Dangling ends either vanish or grow but never show stably oscillating trajectories. Topologically, and unlike the mid veins considered in Fig. 2-A, dangling ends are only connected to the rest of the network by a single node. The relative resistance *R*_{net} therefore cannot be calculated in a dangling end and cannot play a role. Local pressure Δ*P*_{net} is thus the only remaining feedback parameter. We observe on the example of Fig. 4-A that large values of Δ*P*_{net} favor growth and small values prompt veins to vanish. These possible outcomes are also predicted with model equivalent flow circuits (Fig. S12 and SI Text Sec. 3). Local pressure feedback is thus connected to dangling end fate: it is a prime example of the importance of *network-based architectural information*.

#### Competition between parallel veins decided by resistance ratio

Parallel veins are another example in which initially very similar and spatially close veins may suffer opposite fates, see Fig. 4-B. Often, both parallel veins will eventually vanish (Fig. S15-A and S16-A), yet what determines which vanishes first? Eq. 3 highlights that the ratio of a vein’s resistance relative to the resistance of the remaining network *R/R*_{net} could be a determining factor. In fact, exploring *R/R*_{net} in our full network (Fig. 4-B) we find that a vein with a large resistance ratio *R/R*_{net} *>* 1 will vanish. In contrast, a vein with *R/R*_{net} *<* 1 will remain stable. In fact, if *R/R*_{net} *>* 1, it is energetically more favorable to transport mass through the rest of the network instead of through the vein. This is consistently observed and is also consistent with theoretical predictions on the equivalent flow circuit (Fig. S12 and SI Text Sec. 3) and coherent with Ref. [27]. The resistance ratio is thus a robust predictor for locally competing veins. Although it is somewhat similar to shear, as highlighted through Eq. 3, there is one main advantage to the investigation of *R/R*_{net}, namely that it is easily computed from global network architecture and does not require to resolve flows.

#### Loops shrink first in the middle

Finally, loopy structures *i*.*e*. a long vein connected at both ends to the remaining network, are often observed in *P. polycephalum*. Surprisingly, we experimentally observe loops to start shrinking in their very middle (Fig. 4-C.i, also Fig. S15-A and S16-A) despite the almost homogeneous vein diameter and shear rate along the entire loop. This is all the more surprising as quantities such as Δ*P*_{net} and *R/R*_{net} are also constant along the loop. This phenomenon again seems to lie in the architecture: when a vein segment in the loop shrinks, mass has to be redistributed to the rest of the network. This increases shear in the outer segments, preventing disappearance of the outer segments. Once the center segment has disappeared, both outer segments follow the dynamics of dangling ends, and their fate is again determined by network architecture (through the local pressure Δ*P*_{net}). This mechanism is consistently predicted within an equivalent flow circuit (Fig. S12 and SI Text Sec. 3). Importantly, we find that as soon as a vein disappears, the network’s architecture changes: flows must redistribute, vein connections are updated, and, hence, an initially stable vein may become unstable. Vein fates thus dramatically evolve over time, in line with network architecture evolution.

### Single vanishing vein triggers avalanche of vanishing events among neighboring veins

After focusing on individual vein dynamics, we now address global network reorganization. Observing a disappearing network region over time, reveals that vein vanishing events happen sequentially in time, see Fig. 5-A and B. Inspired by the importance of resistance ratios for parallel veins, we here map out resistance ratios *R/R*_{net} at subsequent time points in an entire region (Fig. 5-A). At the initial stage (Fig. 5-A, 2 min) the majority of veins are predicted to be stable by the resistance ratio *R/R*_{net}. Yet, the few veins with high resistance ratio (red arrows in Fig. 5-A, 2 min) are indeed successfully predicted to vanish first (black crosses in Fig. 5-A, 5 min). As a consequence of veins vanishing, the local architecture is altered and the resistance ratios undergo drastic changes. Veins that were stable before are now predicted to be unstable. This pattern, in which the vanishing of individual veins causes neighboring veins to become unstable, repeats until the entire region vanishes in an avalanche in less than 15 min (Fig. S15-A,D and S16-A,D show similar avalanches in other specimen). Note that a vanishing vein may rarely also stabilize a previously unstable vein (Fig. 5-A, 16 min, blue arrow).

The fundamental origin of vanishing avalanches can be narrowed down again to network architecture. We explore a model network region with a few veins of similar resistance *r* connected to the rest of the network, represented by an overall equivalent resistance *R*_{rest} (Fig. 5-C). We precondition all veins to be stable by assuming for each vein a resistance ratio *R/R*_{net ∼} *r/R*_{rest} ≲ 1. If a vein’s morphology is slightly perturbed, *e*.*g*. with a smaller radius, and therefore with a slightly higher resistance say 2*r* (purple in Fig. 5-C), the perturbed vein’s resistance ratio may become greater than 1, making the vein unstable and vanishing. Yet when two network nodes are removed from the network as the vein vanishes, individual veins previously connected through the node now become a single *longer* vein. A longer vein has a higher resistance. Hence, in our example, the “new” longer vein becomes unstable as well (blue in Fig. 5-C). Once this latter one vanishes, another neighboring vein can become longer and unstable yet again (green in Fig. 5-C). Reciprocally, vein growth and parallel vein disappearance can – more rarely – decrease *R/R*_{net}, and in turn stabilize a growing vein, as in Fig. 5-A at 16 min (see also Fig. S15-D and S16-D). In our simple mechanistic model, the series of events follows an avalanche principle, exactly similar to that observed in our experiments: a vanishing vein disturbs local architecture and that is enough to modify nearby resistance ratios and hence stability. The avalanche of disappearing veins eventually results in the removal of entire network regions.

## DISCUSSION

We here report highly resolved data of spontaneous network reorganization in *P. polycephalum* in which both individual vein dynamics and fluid flows pervading veins are quantified simultaneously. We observe disparate vein dynamics that originate from shear-driven feedback on vein size, with a time delay ranging from 1 min to 3 min. Our force balance model challenges previous concepts showing that vein fate is not only determined through shear magnitude but also through network architecture dependent parameters. In particular, dangling end fate is connected to relative pressure while inner network’s vein stability is tightly determined by the vein’s resistance ratio relative to the resistance associated with mass flows in the rest of the network, *R/R*_{net}. While *R/R*_{net} is directly related to shear, it has the advantage of being easily computed from network morphology, *without* needing to resolve flows. Network architecture strongly depends on time. As unstable veins vanish, the relative architecture of veins changes, inducing avalanches of vanishing veins, overall resulting in significant spontaneous reorganization.

While our experimental investigation is specific to *P. polycephalum*, we expect that the two key concepts unraveled here (time delay and network architecture feedback) may very well be at play in other vascular networks. First, the ubiquity of delayed shear feedback, beyond the contractile response of acto-myosin, suggests that a diversity of dynamics (circling, non-monotonous) may also occur in other vascular networks. In fact, also the turnover time for actin filaments in living cells ranges 10 s to 30 s, close to our measured time delay [45–47]. Other pathways, such as chemical pathways for sheared endothelial cells in blood vasculature, are processed with a time delay of a few minutes [48– 50], while reorganization occurs on longer timescales ranging from 15 min for individual cells to several days for blood vasculature [46, 51].

Second, network architecture feedback (through pressure and resistance ratio) is connected to laminar flows pervading the network. Thus, our perspective could be extended to investigate reorganization in other networks where laminar flows are an essential building block, in essence networks where Murray’s law holds at steady state. Particularly, our insight suggests simple parameters to map out, such as relative resistance and pressure. Likely these network architecture dependent parameters may explain discrepancies between shear and network reorganization in other vascular networks [3, 22–25]. Such systematic parameter search unravelled by our force balance approach could also be extended to the study of pathological states, *e*.*g*. with low oxygen levels [52, 53] or during tumor growth [54].

The fact that pervading flows and network architecture are so intermingled originates in the simple physical principle that flows are governed by Kirchhoff’s laws at nodes, and hence “autonomously” sense the entirety of the network’s architecture. Yet, Kirchhoff’s laws are not limited to flow networks, but also govern electrical [55], mechanical [56–59], thermal [60] and resistor-based neural networks [61, 62]. Having the physics of Kirchhoff-driven selforganization at hand may thus pave the way for autonomous artificial designs with specific material [56, 57] or learning properties [55, 61, 62].

## MATERIALS AND METHODS

Microscopic images of all the specimens used for this study are made available as movies in MP4 format.

### Preparation and Imaging of *P. polycephalum*

*P. polycephalum* (Carolina Biological Supplies) networks were prepared from microplasmodia cultured in liquid suspension in culture medium [63, 64]. For the full network experimental setup, as in Fig. 1-B of the main text, microplasmodia were pipetted onto a 1.5% (w/v) nutrient free agar plate. A network developed overnight in the absence of light. The fully grown network was trimmed in order to obtain a well-quantifiable network. The entire network was observed after 1 h with a Zeiss Axio Zoom V.16 microscope and a 1x/0.25 objective, connected to a Hamamatsu ORCA-Flash 4.0 camera. The organism was imaged for about an hour with a frame rate of 10 fpm.

In the close-up setup, as in Fig. 1-A of the main text, the microplasmodia were placed onto a 1.5% agar plate and covered with an additional 1 mm thick layer of agar. Conse- quently, the network developed between the two agar layers to a macroscopic network which was then imaged using the same microscope setup as before with a 2.3x/0.57 objective and higher magnification. The high magnification allowed us to observe the flow inside the veins for about one hour. Typical flow velocities range at up to 1 mm s^{−1} [65]. The flow velocity changes on much longer time scales of (50 s to 60 s). To resolve flow velocity over time efficiently 5 frames at a high rate (10 ms) were imaged separated by a long exposure frame of 2 s. As different objectives were required for the two setups, they could not be combined for simultaneous observation.

### Image Analysis

For both experimental setups, image analysis was performed using a custom-developed MATLAB (The MathWorks) code. This procedure extracts the entire network information of the observed organism [63]: single images were binarized to identify the network’s structure, using pixel intensity as well as pixel variance information, extracted from an interval of images around the processed image. As the cytoplasm inside the organism moves over time, the variance gives accurate information on which parts of the image belong to the living organism and which parts are biological remnants. The two features were combined and binarized using a threshold. The binarized images were skeletonized and the vein radius and the corresponding intensity of transmitted light were measured along the skeleton. The two quantities were correlated according to Beer-Lambert’s law and the intensity values were further used as a measure for vein radius, as intensity provides higher resolution. For the imaging with high magnification, in addition to the network information, the flow field was measured using a particle image velocimetry (PIV) algorithm inspired by [66–68], see Fig. 1-A.ii of the main paper. The particles necessary for the velocity measurements are naturally contained within the cytoplasm of *P. polycephalum*.

### Flow calculation from vein contractions

Building on the previously performed image analysis, we used a custom-developed MATLAB (The MathWorks) code to calculate flows within veins for the full network analysis, based on conservation of mass. The algorithm follows a two stage process.

Firstly, the network structure obtained from the images was carefully analyzed to construct a *dynamic* network structure. This structure consists in discrete segments that are connected to each other at node points. At every time point, the structure can evolve according to the detected vein radii: if a radius is lower than a certain threshold, the corresponding segment vanishes from the structure. Segments which are isolated due to vanishing segments are also removed. We carefully checked by eye that the threshold levels determining when a segment vanished agreed with bright-field observations. Note that we do not account for entirely new segments in the dynamic structure. As no substantial growth occurs in our data, this is a good approximation.

Secondly, flows in each vein were calculated building on Ref. [8]. In a nutshell, each vein segment *i* has an unknown inflow from neighboring segments, in addition to flow arising due to the segment’s contractions, , where *a*_{i} denotes the radius of segment *i*. Unknown inflows are related with Kirchhoff’s laws. Furthermore, pressure is determined at every network node from the segment resistances given by Poiseuille’s law where *L*_{i} is the length of a segment. Compared to Ref. [8], we introduced two major additions. On the one hand, the actual live contractions *a*_{i}(*t*) are used, as detected from sequential images. To ensure that Kirchhoff’s laws are solved with a good numerical accuracty, the radius traces *a*_{i}(*t*) were (1) adjusted at each time so that overall cytoplasmic mass is conserved (mass calculated from image analysis varied by less than 10% over the analysis time) and (2) overdiscretized in time by adding 2 linearly interpolated values between each frame. Hence the simulation time step Δ*t* = 2*s* is 3 times smaller than the acquisition time, and favors numerical convergence of all time dependent processes. Note that the results were found to be independent of the simulation time step Δ*t* when decreasing it by a factor 2. On the other hand, a segment (or several) that vanishes creates (just before disappearing) an added inflow of , where *a*_{i} the segment’s radius just before disappearing. This corresponds to radius retraction as observed in the movies.

### Data analysis

#### a. Time averages

For all data, we extract short time averages by using a custom-developed MATLAB (The MathWorks) routine. To determine the short time averages of the oscillating shear rate and vein radius, we used a moving average with a window size of *t*_{ave} ≃ 2 − 3*T* (*T ≃* 120 s). The *i*^{th} element of the smoothed signal is given by , where *N* is the window size. At the boundary where the averaging window and the signal do not overlap completely, a reflected signal was used as compensation. This can be done because the averaging window is relatively small and the average varies slowly in time. The determined trend (for the close-up data sets) was then smoothed with a Gaussian kernel to reduce artefacts of the moving average filter.

#### b. Statistical information on trajectories

Out of the 12 close-up veins investigated, 6 veins show stable clockwise feedback, 4 shrink and vanish, 1 shows stable anticlockwise feedback, and 1 is not classifiable. For the specimen of Fig. 1-B.i., out of 200 randomly picked veins, 80 show stable clockwise feedback, 80 shrink and vanish, 20 show stable anticlockwise feedback and 20 are not classifiable. Out of the 80 shrinking veins, monotonic decreased is observed for 25%, monotonic increase for 40%, and non-monotonic trajectories 15% of the time. The remaining 20% of vanishing veins are unclassified, as their recorded trajectories are too short to allow for any classification.

#### c. Fitting of the model

Fitting of the model to the data was performed using a non-linear least squares algorithm included in the SciPy optimize package [69], or a linear least squares algorithm, according to whether 2 or 3 model parameters had to be fitted. The relative fitting error is defined as , where *N* is the number of data points. To find the optimal time windows for fitting including fitting the time delay *t*, we chose close-up data sets forming loopy trajectories (#*G*, #*E*, #*F* and #*K*), as the loops are the characteristic feature ensuing from the time delayed dynamics. As stressed in the main text the model parameters are not expected to be constant over long times (on which loops are typically observable). To find suitable time frames where model parameters where approximately constant and loops observable we systematically varied the time windows of the data used for the fitting. The distribution of time delays fitted for different time windows was found to range from 1 min to 10 min (see Fig. S7). For fits including only 2 model parameters, *τ*_{loc} and *t*_{adapt}, we fixed the time delay either to a constant value *t*_{delay} = 120 s or to the value obtained by cross correlation, and fitted the remaining model parameters (Figs. S9-11 and Tables 1-3).

#### d. Equivalent resistances

Finally equivalent resistances (*R*_{net}) in our full network structures are calculated using an algorithm based on Kirchhoff’s laws [70], from the values of *R* for each vein segments directly evaluated from data. The algorithm was tested to yield correct results on simple geometries where analytic expressions may be found. For example, for a network consisting of a loop of 4 similar vein segments of resistance *R*, the relative resistance for any of the vein segment corresponds to the resistance of “the rest of the network”: here 3 resistances in series. Hence *R*_{net} = 3*R*.

##### Vascular adaptation from force balance

We briefly derive here our vascular adaptation model from force balance and provide more details for the derivation in SI Text Sec. 1. We consider the force balance equation on a small vein wall segment of radius *a*, length *L*, thickness *e*. As the motion is typically slow and occurring over microscopic scales we neglect inertial contributions and write
where *p − p*_{ext} is the hydrodynamic pressure difference between interior and exterior, *σ*_{circum} is the circumferential stress (or elastic tension), *σ*_{active} corresponds to active stresses from the acto-myosin cortex, and is the fric-tion force reflecting the long time scale for fiber rearrangement [42, 43]. Note that since the shear rate *τ* acts longitudinally on the walls, it does not contribute to the force balance on the radial direction. Yet, the vein walls consist of an anisotropic material, namely cross-linked fibers (the actin gel) such that radial stress *σ*_{r}(*µτ*_{s}) builds up as a result of longitudinal shear rate sensing (with a time delay) [36, 37, 48–50].

The general force balance (4) significantly simplifies when we average over the short time scales of vein contractions (1 *−* 2 min) [35], typically corresponding to elastic deformations, to focus on the longer time scales of 10 *−* 60 min corresponding to vein wall assembly or disassembly inheriting from *e*.*g*. actin fiber rearrangements [42, 43]. On these longer time scales, significant morphological vein adaptation of ⟨ *a* ⟩ occurs. ⟨ *σ*_{active} ⟩ is a constant as it is expected to vary only on short time scales in line with the periodic contractions. Note also that it is a negative stress, that tends to shrink the vein – this reflects the impact of metabolic cost, here induced by vein wall activity. ⟨ *σ*_{circum} ⟩ ≃0 over short time scales, as such forces are intrinsically elastic forces and hence do not pertain long time features. Finally, our numerical calculations of pressures within observed networks show that ⟨ (*p p*_{ext}) ⟩ depends smoothly on the location within the network, but barely varies in time [8] (see SI Fig. S6). We obtain a time-independent, yet position-specific constant . As we expect active stresses to be likely as important a term in this expression as pressure, we expect that.

Furthermore, we assume a phenomenological functional form for the radial stresses, as , in line with observations of sheared cross-linked actin fibers [36, 37] where *τ*_{c} is a positive constant. Importantly, this radial stress, acts in the positive direction, *i*.*e*. dilates vessels – see Fig. S2.

Finally to simplify the expressions we now introduce and a characteristic adaptation timescale for vascular rearrangement. This allows us to recover the vascular adaptation rule (1). Again, we refer the reader to more details on the derivation in the SI Text Sec. 1.

##### Agreement with Murray’s law

Our result is consistent with Murray’s steady state assumption. In fact, the (non-trivial) steady state of our model Eqs. (1-2) corresponds to a constant average shear in the vein ⟨ *τ* ⟩ = *τ*_{loc}. This corresponds exactly to Murray’s result of minimum work. In fact, Murray stipulates that the energy dissipation of a single vein (of radius *a* and length *L*) is given by flow dissipation associated with the vein’s resistance and energy expense to sustain the vein
where *R* = *πa*^{4}*/*8*µL* is the vein resistance assuming Poiseuille flow in the vein, *b* is a local metabolic constant per unit volume, *Q* the flow rate and *µ* viscosity. The principle of minimum energy expense suggests to search the minimum of *ε* with respect to the vein radius *a* which gives the relation . The shear rate *τ* can be expressed as and hence the optimal (or steady-state) shear rate is independent of radius and flow rate . This is consistent with our steady state where shear rate is constant ⟨ *τ* ⟩ = *τ*_{loc}. The constant *τ*_{loc} can thus also be interpreted as being related to the typical local energy expense to sustain the vein . Note that we bring further insight compared with Murray’s derivation, as our adaptation dynamics (4) originates from force balance on the vein wall, and hints that *τ*_{loc} (or the metabolic cost) also depends on local pressure.

## ACKNOWLEDGMENTS

The authors are indebted to Charles Puelz for enlightening discussions. S.M. was supported in part by the MRSEC Program of the National Science Foundation under Award Number DMR-1420073. This work was supported by the Max Planck Society and has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No. 947630, FlowMem).

## References

- [1].↵
- [2].
- [3].↵
- [4].↵
- [5].↵
- [6].↵
- [7].↵
- [8].↵
- [9].↵
- [10].↵
- [11].↵
- [12].↵
- [13].↵
- [14].↵
- [15].↵
- [16].↵
- [17].↵
- [18].↵
- [19].↵
- [20].↵
- [21].↵
- [22].↵
- [23].
- [24].
- [25].↵
- [26].↵
- [27].↵
- [28].
- [29].
- [30].
- [31].↵
- [32].
- [33].↵
- [34].↵
- [35].↵
- [36].↵
- [37].↵
- [38].↵
- [39].↵
- [40].↵
- [41].↵
- [42].↵
- [43].↵
- [44].↵
- [45].↵
- [46].↵
- [47].↵
- [48].
- [49].
- [50].
- [51].↵
- [52].↵
- [53].↵
- [54].↵
- [55].↵
- [56].↵
- [57].↵
- [58].
- [59].↵
- [60].↵
- [61].↵
- [62].↵
- [63].↵
- [64].↵
- [65].↵
- [66].↵
- [67].
- [68].↵
- [69].↵
- [70].↵