Endocannabinoid dynamics gate spike-timing dependent depression and potentiation

Synaptic plasticity is a cardinal cellular mechanism for learning and memory. The endocannabinoid (eCB) system has emerged as a pivotal pathway for synaptic plasticity because of its widely characterized ability to depress synaptic transmission on short- and long-term scales. Recent reports indicate that eCBs also mediate potentiation of the synapse. However, it is not known how eCB signaling may support bidirectionality. Here, we combined electrophysiology experiments with mathematical modeling to question the mechanisms of eCB bidirectionality in spike-timing dependent plasticity (STDP) at corticostriatal synapses. We demonstrate that STDP outcome is controlled by eCB levels and dynamics: prolonged and moderate levels of eCB lead to eCB-mediated long-term depression (eCB-tLTD) while short and large eCB transients produce eCB-mediated long-term potentiation (eCB-tLTP). Moreover, we show that eCB-tLTD requires active calcineurin whereas eCB-tLTP necessitates the activity of presynaptic PKA. Therefore, just like glutamate or GABA, eCB form a bidirectional system to encode learning and memory. DOI: http://dx.doi.org/10.7554/eLife.13185.001


Introduction
Bidirectional long-term plasticity of synaptic strength (LTD and LTP) underlies multiple forms of learning and memory (Citri and Malenka, 2008;Nabavi et al, 2014). Bidirectionality is of paramount functional importance since it allows LTP and LTD to reverse each other with time at a single synapse, thus enabling adaptive changes of the synaptic weight. Endocannabinoids (eCBs) have emerged as a major actor in learning and memory because of their powerful influence on synaptic plasticity (Chevaleyre et al., 2006;Heifets and Castillo, 2009;Kano et al., 2009;Katona and Freund, 2012). The eCB system is mainly composed of active biolipids (notably 2-arachidonylglycerol, 2-AG and anandamide, AEA) synthesized and released on-demand acting as retrograde neurotransmitters on presynaptic type-1 cannabinoid receptor (CB1R) and postsynaptic transient receptor potential vanilloid-type-1 (TRPV1) (Piomelli, 2003;Piomelli et al., 2007;Di Marzo, 2008;Alger and Kim, 2011).
The major neurotransmitter systems, glutamate and GABA, allow bidirectional synaptic plasticity (Citri and Malenka, 2008), i.e. the same signaling pathway in the same cell gates the neuron towards potentiation or depression depending on the activity pattern. In contrast, eCBs have been widely described as a powerful unidirectional system that depresses neuronal communication on a short or long timescale. However, recent reports challenge this view and indicate that eCBs could also act as a bidirectional system for synaptic plasticity. We recently reported the existence of an eCB-mediated spike-timing dependent LTP in the dorsal striatum induced by a low number of paired stimulations and dependent on the activation of CB1R and TRPV1 . We found that few coincident pre-and post-synaptic spikes (5-15) were sufficient to increase synaptic efficacy through a signaling pathway that relies on the activation of CB1R and TRPV1 and on 2-AG elevations. The latter are triggered by coupled postsynaptic rises of calcium and DAG lipase a (DAGLa) activity mediated by type-5 metabotropic glutamate receptors (mGluR5), muscarinic M1 receptors and voltage-sensitive calcium channels (VSCCs) . In addition, it has been reported an indirect role of eCBs in promoting LTP at mixed (chemical and electrical) synapses of the goldfish Mauthner cell via intermediary dopaminergic neurons (Cachope et al., 2007) or at hippocampal CA1 synapses via a GABA A receptor-mediated mechanism (Lin et al., 2011;Xu et al., 2012). Likewise, facilitation of LTP in the hippocampus via eCB-induced presynaptic depression of GABAergic transmission (Carlson et al., 2002;Chevaleyre and Castillo, 2004;Zhu and Lovinger, 2007), and mediation of heterosynaptic short-term potentiation via intermediary astrocytes (Navarrete and Araque, 2010) have been reported. There exists a growing body of evidence that paves the way for a bidirectional action of eCBs in synaptic plasticity depending on the activity pattern on either side of the synapse.
In the case of glutamate, the principal mechanism put forward to account for bidirectionality is the calcium-control hypothesis, which states that postsynaptic calcium levels and/or time courses decide the outcome of plasticity (LTP or LTD) (Shouval et al., 2002;Graupner and Brunel, 2012). However, how eCBs induce both LTD and LTP remains to be elucidated.
Here, combining experimental and computer modeling approaches, we show that the bidirectionality of eCB-dependent STDP in striatum is controlled by eCB-levels: moderate level and prolonged release of eCB lead to LTD while brief releases of high eCB concentration yield LTP. In this aspect, MAG-lipase appears as a key controller of synaptic plasticity. Our results considerably enlarge the spectrum of action of eCBs since they show that eCBs not only promote depression but also potentiation, i.e. they act as a bidirectional system, depending on the regime of activity pattern on either side of the synapse. eLife digest Learning and memory depend on processes that alter the connections -or synapses -between neurons in the brain. For example, molecules called endocannabinoids can alter synapses to decrease the influence that one neuron has on another neuron's activity. This "synaptic depression" is an important mechanism through which the brain can adapt to an experience.
However, recent research also suggests that endocannabinoids might also increase the influence one neuron has on another neuron's activity by strengthening the synaptic connection between neurons. This opposite process is known as synaptic potentiation, and is also important for learning from experience. But how do endocannabinoids manage to produce opposing effects?
Using a combination of electrophysiological recording experiments and mathematical modeling, Cui et al. have now deciphered the molecular mechanisms that govern the action of endocannabinoids at key synapses in rat brain slices. This revealed that both the levels and timing of endocannabinoid release control changes in the strength of the synaptic connections. Electrical stimulations that produced moderate amounts of endocannabinoids over a prolonged period led to synaptic depression. However, stimulation that produced short but large endocannabinoid peaks caused synaptic potentiation. The enzymes that control endocannabinoid levels thus play a crucial role in determining whether a given stimulation leads to the strengthening or weakening of a synaptic connection.
In the type of synapses studied by Cui et al., changes to synaptic strength also depend on another chemical called dopamine. Abnormal dopamine production is implicated in a number of disorders, including Parkinson's disease and addiction. Future work will therefore investigate how dopamine controls endocannabinoid-dependent changes to the strength of synapses.

Results
Endocannabinoids mediate spike-timing dependent LTD and LTP (eCB-tLTD and eCB-tLTP) depending on the number of pairings.

A mechanism accounting for eCB-LTP induction for low numbers of pairings
We then questioned how eCBs could mediate either potentiation or depression, depending on the activity pattern of either side of the synapse. To address this question, we built a realistic mathematical model of the molecular mechanisms of corticostriatal synaptic plasticity ( Figure 2A). Our model is based on the two signaling pathways involved in corticostriatal STDP induced by 100 pairings: NMDAR-and CB1R-signaling (Pawlak and Kerr, 2008;Shen et al., 2008;Paillé et al., 2013). NMDAR-tLTP is CaMKII-dependent since we found that pharmacological inhibition of CaMKII with KN62 (3 mM) blocked NMDAR-tLTP (88 ± 11%, p=0.3324, n=6) (Figure 1-figure supplement 1). We thus combined in the model a first signaling pathway leading from NMDAR to calmodulin and CaMKII with a second, distinct one that assembles mGluR and cytosolic calcium to eCB production and the resulting activation of CB1R ( Figure 2A). Most of the parameter values were restricted by previous experimental measurements (Supplementary file 1).
In the model, the total synaptic weight (W total ) is given by the product of presynaptic (W pre ) and postsynaptic (W post ) contributions (see Methods). The postsynaptic contribution to the synaptic weight, W post is taken proportional to the amount of CaMKII activated by the NMDAR pathway. This part of our model (from Graupner and Brunel, 2007) exhibits bistable dynamics between a down state where CaMKII is inactive and an up state where CaMKII is highly activated ( Figure 2B1). Transitions between those two states therefore emulate transitions between no plasticity (down state) and NMDAR-tLTP (up state). The time scale of CaMKII dephosphorylation after a pairing being larger than the period between two successive pairings (1 sec), the amounts of activated CaMKII progressively accumulates with the number of pairings. Importantly, the level of activated CaMKII needs 50-60 post-pre pairings (with Dt STDP =-15 ms) to reach the threshold between the up and down states ( Figure 2B1). As a result, W post converges to the up state (potentiation) only when N pairings >50 postpre pairings, thus emulating the experimental observations of NMDAR-dependent LTP and its dependence on the number of pairings . For pre-post pairings, the calcium response after each pairing activates less of the CaMKII-activating calmodulin ( Figure 2C) so the amount of activated CaMKII never reaches the threshold for the up state ( Figure 2B2). Thus, the  . As a consequence, DAGLa activation (color-coded in B) and the resulting CB1R activation, y CB1R (C) is larger too. The biphasic envelope of the calcium peak amplitude with the number of pairings (A) is amplified as a marked biphasic envelope for the amplitude of y CB1R . (C) As a result, whatever the stimulation, the amplitude of the y CB1R peaks first increases for the first 10-20 pairings, then decreases to converge to roughly constant amplitude. But y CB1R reaches large values only for short post-pre pairings (C1). This particular dynamics of y CB1R during the stimulations suggests a possible explanation to the bidirectional characteristics of eCB-dependent plasticity, where the presynaptic contribution to the synaptic model predicts no NMDAR-dependent for pre-post pairings (0<N pairings <100 at 1 Hz, Figure 2C2), in agreement with experimental observations . Within a wide parameter range, the amplitude of the calcium peaks triggered by each paired stimulation shows a peculiar biphasic envelope ( Figure 3A): calcium first increases for the first 10-20 pairings then decreases afterwards, until it reaches constant amplitude after 50 pairings. During the first 10-20 pairings, repeated activation of mGluRs progressively increases the quantity of IP 3 , which contributes an extra influx of calcium from the endoplasmic reticulum. This boost of cytoplasmic calcium however progressively disappears when N pairings increases further because the concentration of calcium in the endoplasmic reticulum decreases. Moreover, after each pairing, the width of the postsynaptic calcium peak in the model is larger with post-pre than pre-post pairings ( Figure 3B). As a consequence, the fraction of calcium-activated DAGLa is significant only for small values of |Dt STDP | (<25 ms) and larger for post-pre than pre-post pairings. As a result, the biphasic envelope of the calcium peak amplitude with N pairings (first increase, then decrease) is transmitted to the amplitude of eCB transients and, ultimately, to CB1R activation (y CB1R ). The biphasic envelope is even more marked at the level of CB1R activation because of CB1R desensitization that amplifies the decay above 20 pairings. Figure 3C illustrates the dynamics of CB1R activation in the model. In all cases, the amplitude of the CB1R activation peaks first increases for the first 10-20 pairings, then decreases to converge to constant amplitude. y CB1R reaches large values only for short post-pre pairings (Dt STDP around -15 ms) while even short pre-post pairings (0<Dt STDP <10 ms) do not give rise to such large amplitude peaks.
This peculiar dynamics of y CB1R brings a plausible explanation to the bidirectional features of eCB-dependent plasticity. Under this scenario, W pre depends on the magnitude of y CB1R so that whenever y CB1R reaches moderate amounts -i.e. when it is located between two threshold values, Q start LT D and Q stop LT D -W pre drops (LTD); whereas W pre rises (LTP) if y CB1R is larger than a third threshold, Q start LT P (see the dashed lines in Figure 3C1 and 3C2 and summary in Figure 3D). W pre remains unchanged outside those ranges, i.e. if y CB1R <Q start LT D or if stop LTD <y CB1R <Q start LT P . Combining this mechanism with the shape of y CB1R evolution upon N pairings explains the main characteristics of corticostriatal STDP. With short pre-post pairings (10<Dt STDP <40 ms), y CB1R reaches the LTD range (between Q start LT D and Q stop LT D Figure 3C2) during most of the 100 pairings: each pairing reduces W pre . Since pre-post pairings do not alter W post ( Figure 2B2), the net result is a progressive reduction of W total , i.e. the expression of eCB-tLTD. The situation is different for post-pre pairings. The amplitude of y CB1R peaks overcomes Q start LT P for 5 to 30 post-pre-pairings, resulting in an increase of W pre . Since more than 50 post-pre pairings are needed to alter W post ( Figure 2B2), this W post increase results in eCB-tLTP ( Figure 3C1). Above 30 post-pre pairings, the amplitude of y CB1R transients gets back below Q start LT P so that the W pre increase is no more triggered, thus explaining why eCB-tLTP is not expressed for N pairings >30. Finally, when N pairings >50, W post is predicted to trigger the rise of W total , thus reflecting NMDAR-tLTP.
In conclusion, the mechanism proposed by our mathematical model to account for eCB-STDP is the following: eCB-tLTD requires moderate levels of CB1R activation, which can be reached with pre-post pairings; eCB-tLTP demands higher levels of CB1R activation that are reached only with 5-30 post-pre pairings, where every component of the model contributes maximally to CB1R activation (maximal cytosolic calcium influx from NMDAR, VSCC, TRPV1 and maximal calcium efflux from internal stores, combined with a minimal CB1R desensitization). Beyond 30 post-pre pairings, calcium efflux from the internal calcium stores decreases while in parallel CB1R desensitization increases. CB1R activation becomes insufficient to maintain the elevation of the synaptic weight, so that eCB-tLTP vanishes.  The mathematical model accounts for bidirectional eCB-and NMDARmediated STDP We then tested whether the model generated correct qualitative predictions in agreement with experimental data for the plasticity outcome when both Dt STDP and N pairings were varied. The changes of the total synaptic weight for the whole range of Dt STDP and N pairings are illustrated in Figure 4A by the model-generated color-coded map. The outcome of plasticity according to the model is split along three domains: a first LTP domain for -3<Dt STDP <-25 ms and 3<N pairings <40, a second LTP domain for -10<Dt STDP <-25 ms and N pairings >50, and a LTD domain for 10<Dt STDP <25 ms and N pairings >20. Note that the model correctly accounts for a plasticity gap for 40-60 post-pre pairings that isolates the two LTP domains in agreement with experimental observations  and that the expression of plasticity does not change when N pairings >100 ( Figure 4A2 and A3 also show the average weight change predicted for -25<Dt STDP <-10 ms or 10<Dt STDP <25 ms. Even quantitatively, model predictions (full lines) are in agreement with the experimental data (full circles). Likewise, Figure 4A4 and A5 show the weight change predicted for STDP protocols featuring 10 or 100 pairings, with Dt STDP ranging from -40 to 40 ms, i.e. cross-sections of the color-coded map along the vertical dashed lines. Again, model prediction (full lines) matches experiments (full circles). Quantitative agreement is found for the amplitude and sign of plasticity, as well as for the dependence of plasticity on spike timing. To our knowledge, the present model is the first mathematical model able to account for the outcome of the plasticity when both Dt STDP and N pairings are varied.
We ran simulations of model variants where parts of the signaling pathways were removed (in-silico knock-out). In the NMDAR signaling knockout, we removed the whole signaling pathway downstream of NMDAR, i.e. calmodulin and CaMKII. Since W post relies entirely on CaMKII activation, the NMDAR signaling knockout corresponds to a situation where the contribution of W post is absent and only W pre contributes to W total . As expected, the post-pre NDMAR-dependent LTP is absent in this NMDAR signaling knockout model, but pre-post tLTD and post-pre tLTP (observed with low numbers of pairings: 5<N pairings <35) are conserved ( Figure 4B). Comparison with experimental data where NMDAR signaling was blocked with D-AP5 or CaMKI with KN62 confirms the match between model and experiments ( Figure 4B). Simulations of the CB1R in-silico knockout model, where CB1R activation remains null whatever eCB levels are shown in Figure 4C. Because W pre depends on CB1R activation, the CB1R in-silico knockout model actually reflects the case were only W post contributes to W total . In this case, the only remaining plasticity domain is the LTP expressed for post-pre pairings (N pairings >50). Again, averaging over -25<Dt STDP <-10 ms and 10<Dt STDP <25 ms with 10 or 100 pairings evidences the match of the model with experimental data in which CB1R was inhibited with AM251 ( Figure 4C).
We then analyzed how much the model outcome was sensitive to variations of the parameters. First, we changed the sharp thresholds for eCB-dependent plasticity into smooth thresholds. To this end, we replaced function in Equation 1 above by a smooth equivalent function whose graph is depicted in Figure 4-figure supplement 1B (the corresponding equation is given in Supplementary file 2, eq.S1-S2). In spite of the smooth thresholds, the model output is very similar to that obtained with sharp thresholds (compare the color map of Figure 4-figure supplement 1B with that of Figure 4A1). Therefore, our choice of a sharp thresholding for eCB-dependent plasticity is not crucial for the model output.
We further undertook sensitivity analysis of the model (Figure 4-figure supplement 1C). As expected, the most sensitive parameters were those related to reactions that are known from  pharmacological experiments to be indeed crucial to STDP: the total amount of Calmodulin or CaM-KII ( Figure 1-figure supplement 1), post-synaptic calcium buffering Cui et al., 2015), TRPV1 and NMDA channels Cui et al., 2015), DAGLipase activity  or FAAH and MAGLipase activity (see below). The model was also found sensitive to the dynamics of CB1R desensitization, in agreement with the importance of CB1R desensitization in the decay of eCB-LTP above 15-20 post-pre stimulations. The model was also sensitive to the value of the threshold for eCB-LTP induction (whether smooth or sharp). We suspect that this could explain the dispersion of the amplitudes of eCB-tLTP ( Figure 4A4). More surprising is the sensitivity of the model to the dynamics of glutamate in the synaptic cleft (decay rate t G ). Alterations of the dynamics of glutamate release and uptake can thus be expected to play an important role in the control of STDP at the corticostriatal synapse.

Frequency dependence of eCB-tLTP
In addition to spike timing and number of pairings, STDP is also known to be dependent on the pairing frequency. All our above results were obtained at 1 Hz. We now test the frequency dependence of plasticity induced by a low number of pairings. Figure 5A shows the prediction of the model for N pairings =10. When frequency increases above 1 Hz, the eCB-tLTP triggered by post-pre stimulations (Dt STDP <0) persists and is even observed for an increasingly large Dt STDP range. The model also predicts the expression of another tLTP, triggered by 10 pre-post stimulations (Dt STDP >0) for frequency larger than 2 Hz. To test the validity of these model predictions, we explored experimentally 10 pairings STDP for 0.1, 2.5 and 4 Hz (besides 1 Hz). 10 post-pre pairings at 0.1 Hz were able to induce tLTP (133±14, n=10, p=0.0386) ( Figure 5B), which was not significantly different from eCB-tLTP induced with 10 pairings at 1 Hz (p=0.1538) ( Figure 5C). This result is not predicted by the model, for which the tLTP induced by 10 post-pre pairings vanishes quickly below 1 Hz. At frequencies >1 Hz, we observed tLTP for 10 post-pre pairings at 2.5 Hz (161±15, n=23, p=0.0004) and 4 Hz (165±14, n=22, p=0.0001), but also for pre-post pairings at 2.5 Hz (130±14, n=12, p=0.0490 for Dt STDP <+50 ms; 119±9, n=20, p=0.060 for Dt STDP <+100 ms) and 4 Hz (139±13, n=10, p=0.0150). Moreover, the Dt STDP range for tLTP induction was considerably enlarged for post-pre pairings: from -30<Dt STDP <0 ms at 1 Hz to -100<Dt STDP <0 ms at 2.5 or 4 Hz. Note that for pre-post pairings, tLTP could be observed for Dt STDP <+50 ms ( Figure 5D and E). Therefore, when we increased the frequency of the pairings to 2.5 or 4 Hz, our experimental results show a very good match with the prediction of the model: we observed first a symmetric Hebbian plasticity, i.e. the induction of tLTP not only for post-pre but also for pre-post pairings, and, secondly an enlargement of the range of Dt STDP in which plasticity was observed.
We then investigated the signaling pathways involved in those two tLTP ( Figure 5-figure supplement 1A). We observed that for 2.5 and 4 Hz STDP, post-pre tLTP was not prevented with AM251 (3 mM) (150±11, n=6, p=0.0069) or with D-AP5 (50 mM) (135±12, n=11, p=0.013) but was precluded with a mixture of both AM251 and D-AP5 (96±3, n=9, p=01800). Similarly, for pre-post pairings at 2.5 and 4 Hz, tLTP was still observed with AM251 (149±15, n=7, p=0.0178) but was prevented with D-AP5 (134±27, n=5, p=0.2684) or a mixture of AM251 and D-AP5 (88±11, n=3, p=0.4090). The mathematical model with N pairings =10 does not show such a mixed NMDAR-and eCB-LTP (both tLTP are purely eCB-dependent). Remarkably, however, the tLTP in the model starts becoming mixed with N pairings >12. For 15 pairings (at 4 Hz), for instance (Figure 5-figure  Level and duration of 2-AG release control the eCB-plasticity polarity Based on the ability of our mathematical model to reproduce our experimental data, we explored further the biochemical mechanisms of eCB-dependent plasticity using a model-guided experimental strategy. Our strategy was to use the model to propose experiments that would question the role of the amplitude of CB1R activation to determine eCB-STDP polarity (LTP or LTD). We then systematically carried out the experiments necessary to test the validity of the model prediction.
We first tested experimentally the main prediction of the model: different levels of released 2-AG, low or high, would orientate the plasticity toward, respectively, eCB-tLTD or eCB-tLTP. For this purpose, we directly applied brief puffs (300 ms duration) of 2-AG (at low, 20 mM, or high, 100 mM, concentrations) either 100 or 10 times at 1 Hz, thus with the same total duration as the 100 and 10 pairings STDP protocol at 1 Hz.
Therefore, 100 puffs of low or high [2-AG] induce LTD while only high [2-AG] succeeds to trigger LTP, thus validating the model prediction.  Alterations of MAG-lipase activity evidence the key role of 2-AG concentration in gating eCB bidirectional plasticity To further substantiate the causal role of the amplitude of 2-AG transients in bidirectional eCB-plasticity, we boosted the endogenous levels of 2-AG during STDP protocols. Indeed, if the amplitude of CB1R activation controls the expression of eCB-STDP, the outcome of a given STDP protocol should change if one modifies the amount of CB1R activated by this very same STDP protocol. For this purpose, we inhibited the MAG lipase (MAGL), the major enzyme responsible for 2-AG degradation (Piomelli, 2003), to increase the endogenous level of 2-AG. We took advantage of the model to select three scenarios in which it should be possible in silico, by inhibiting MAGL, to 1) increase the magnitude of an existing eCB-tLTP, 2) induce an eCB-tLTP for a paradigm which normally exhibits neither eCB-tLTP nor NMDAR-LTP (i.e. 50 post-pre pairings; Figure 4A and Cui et al., 2015) and 3) convert an eCB-LTD (induced with 100 presynaptic stimulations without postsynaptic simulations) into eCB-LTP.
First, we tested the possibility to increase the eCB-LTP magnitude by inhibiting MAGL. For this purpose, we chose the minimal pairing protocol for which we detected eCB-LTP, which is five postpre pairings (Figure 7) ( Figure 4A3 and see Figure 6 in Cui et al., 2015). 5Five pairings appearas the lowest number of pairings needed to induce significant eCB-tLTP as illustrated by the representative and average STDP (134±13%, p=0.0190, n=17) ( Figure 7B and D); Note that the model also faithfully predicted eCB-tLTP for such number of pairings ( Figure 4A and 7A). In the model, we introduced noncompetitive inhibition of the MAGL by decreasing its maximal rate r MAGL (Supplementary file 1C). Simulation of the model with 5 post-pre pairings under MAGL inhibition predicts that such an inhibition increases the net level of 2-AG produced during the protocol and the amplitude of eCB-LTP ( Figure 7A). As predicted by the model, inhibition of the MAGL with JZL184 (1.5 mM) significantly increased the magnitude of eCB-tLTP (182±17%, p=0.0048, n=6; p=0.0294 when compared to 5 post-pre pairings in control conditions) (Figure 7: with an example of LTP induced by five 5 post-pre pairings at Dt STDP =-19 ms in B, with an example of LTP induced by five post-pre pairings at Dt STDP =-18 ms with JZL184 in C and the experiment summary in D). We confirmed that this amplification was CB1R-mediated since no plasticity was observed when CB1R were blocked by AM251 (3 mM) (96±8%, p=0.6123, n=5) ( Figure 7D). We also ensured that bathapplied JZL treatment in the absence of STDP pairings did not induce significant plasticity (96±7%, p=0.5943, n=5). It should be noted that the occurrence of eCB-tLTP was also higher with MAGL inhibition: in control, five post-pre pairings yielded 60% of eCB-tLTP (10/17 cells showed significant tLTP) while with MAGL inhibition, 100% of the recorded cells displayed eCB-tLTP (6/6 cells displayed significant tLTP).
Second, we tested the possibility to induce eCB-tLTP by inhibiting MAGL. Indeed, our model predicts that MAGL inhibition may turn a STDP protocol that yields no plastic change in control conditions into eCB-tLTP. For this purpose, we chose a STDP pairing for which we detected no plasticity in control conditions: i.e. 50 post-pre pairings ( Figure 4A3; Cui et al., 2015). Figure 4A3 and Figure 8 illustrates this 'plasticity gap' (the zone between 40 and 60 pre-post pairings that separates the two LTP domains). In silico the control STDP protocol (50 pairings with Dt STDP =-15 ms) does not trigger any plasticity but when MAG lipase is inhibited, eCB-tLTP emerges ( Figure 8A).

Figure 7 continued
(before pairings: 145±4 pA; 45-55 min after pairings: 247±5 pA; increase of 70%). Bottom, time courses of Ri (before, 165±1 MW; after, 170±1 MW; change of 3.0%) and injected current (Iinj) (before, 2±0.2 pA; after, 3±0.1 pA; change of 0.7%) for this cell. (C) MAGL inhibition by JZL184 (1.5 mM) led to an increase of tLTP magnitude. Example of tLTP induced by 10 post-pre pairings with bath-applied JZL184. Top, EPSC strength before and after pairings (before pairings: 180±6 pA; 45-55 min after pairings: 412±7 pA; increase of 129%). Bottom, time courses of Ri (before, 116±1 MW; after, 126±1 MW; change of 8.6%) and injected current (Iinj) (before, -13±1 pA; after, -8±1 pA; change of 2.8%) for this cell. (D) Summary of tLTP induced by 5 post-pre pairings in control conditions and with JZL184 treatment. 10/17 and 6/6 cells showed significant tLTP in control and in JZL184, respectively. Normality was assumed for the ctrl 5x post-pre data (test not passed). (E) Summary bar graph illustrates that tLTP magnitude was increased by MAGL inhibition (JZL184) while prevented by CB1R inhibition (JZL184 1.5 mM +AM251 3 mM). Representative traces are the average of 15 EPSCs during baseline (black traces) and 50 min after STDP protocol (grey traces). *p<0.05. ns: non-significant. . This tLTP was eCB-mediated since suppressed by AM251 (3 mM) (93±4%, p=0.3365, n=5) ( Figure 8D2). Therefore, by acting on the 2-AG levels, we were able to trigger eCB-tLTP for an activity pattern, which does not generate LTP in control conditions. Our third model prediction is that amplifying 2-AG production during STDP may even eliminate the need for a coincidence between presynaptic and postsynaptic activity to express eCB-LTP. In silico, pre-post pairing coincidence is needed for the model to express plasticity. Indeed, a protocol with 100 presynaptic stimulations only (i.e. in the absence of postsynaptic stimulation), does not change W total in the model ( Figure 9A). However, if we decrease the maximal rates of MAGL and DAG kinase activity (the major source of DAG consumption in the model), we obtain a robust eCB-tLTP, even in the absence of any postsynaptic stimulation. Experimentally, 100 presynaptic stimulations (without postsynaptic pairing) induced LTD (76±9%, p=0.0337, n=8), which was CB1R-mediated since prevented with AM251 (3 mM) (102±7%, p=0.8108, n=4) ( Figure 9B; with an example of LTD induced by 100 pre stimulations in B1 and the experiment summary in B2); note that this LTD was not predicted by the model. In agreement with the model, when 2-AG levels were amplified by MAGL inhibition with JZL184 (1.5 mM), 100 pre-synaptic stimulations triggered LTP (143±17%, p=0.0299, n=11) instead of LTD in control conditions ( Figure 9C; with an example of tLTP induced by 100 pre stimulations with JZL184 in C1 and the experiment summary in 9C2). This tLTP was eCBmediated since it was prevented when JZL184 was co-applied with AM251 (3 mM) (93±4%, p=0.1509, n=5) ( Figure 9C2).
To summarize, manipulating the activity of the MAGL was sufficient to (1) control the magnitude of eCB-tLTP, (2) induce eCB-tLTP or (3) even to reverse eCB-LTD into eCB-tLTP. These experimental validations of the model predictions thus support our model hypothesis that 2-AG levels control eCB plasticity in a bidirectional way, with large 2-AG levels yielding eCB-tLTP and lower levels eCB-tLTD.

eCB-LTP maintenance relies on presynaptic PKA/calcineurin activity
We next aimed at identifying which molecular actors are responsible for the modification of the presynaptic weight that is controlled by CB1R activation. In previous reports of eCB-dependent plasticity, W pre was found to rely on the phosphorylation state of a yet unknown target protein involved in glutamate exocytosis, controlled by PKA and calcineurin (CaN) (Heifets and Castillo, 2009). In particular, PKA and CaN inhibition upon CB1R activation is thought to be involved in eCB-LTD induced with high-frequency stimulation protocol (Heifets and Castillo, 2009).
We thus first tested the implication of PKA and CaN in eCB-tLTD. Inhibition of PKA by bathapplied inhibitor KT5720 (1 mM) during a STDP protocol that triggers eCB-tLTD in control condition (100 pre-post pairings) did not affect the expression of eCB-tLTD (74±10%, p=0.020, n=5; p=0.8752 compared to control tLTD) ( Figure 10A). We then tested the involvement of the phosphatase CaN activity in eCB-tLTD expression. We found that CaN inhibition by cyclosporin A (1 mM) prevented eCB-tLTD (122±18%, p=0.2560, n=6) ( Figure 10A2 and 10B) Note that cyclosporin A being cell-permeant, we cannot distinguish from those results the location (pre-or post-synaptic) of the implicated CaN. We then tested the involvement of PKA and CaN on eCB-tLTP induced with 10 post-pre pairings. Bath-applied CaN inhibitor cyclosporin A did not preclude the expression of eCB-tLTP (154±17%, p=0.0305, n=5) ( Figure 10C). Inhibition of PKA with KT5720 (1 mM) prevented plasticity with 10 post-pre pairings (98±2%, p=0.3203, n=4) ( Figure 10C) demonstrating that PKA activity is critically involved in eCB-tLTP. We then aimed at determining which pools of PKA (pre-and/or postsynaptic) were involved in eCB-tLTP. For this purpose, we restricted PKA inhibition to the postsynaptic neuron with intracellular application (through the patch-clamp pipette) of KT5720 (i-KT5720, 1 mM) or a cellnon-permeant PKA inhibitor PKI 6-22 (i-PKI 6-22, 20 mM). Both treatments did not significantly affect eCB-tLTP (with i-KT5720: 137±8%, p=0.0108, n=5; with i-PKI 6-22: 163±29%, p=0.03249, n=7) ( Figure 10C). We therefore conclude that the activity of presynaptic PKA is critical for the expression of eCB-tLTP.
Together, these results suggest that the expression of eCB-tLTD at the corticostriatal synapse depends on the activity of CaN ( Figure 10B) (and possibly on PKA inhibition), whereas the expression of eCB-tLTP is conditioned by the activity of presynaptic PKA ( Figure 10D). Therefore, intermediate levels of CB1R activation trigger eCB-tLTD through a combination of PKA inhibition and CaN activity, whereas high levels of CB1R activation leads to eCB-tLTP through the reverse combination: PKA activity combined to CaN inhibition.

Discussion
Long-term synaptic changes at corticostriatal synapses provide fundamental mechanisms for the function of the basal ganglia in action selection and in procedural learning (Yin et al., 2009) in which eCB plasticity have emerged as the major form underlying long-term synaptic strength changes (Mathur et al., 2012). We describe here a paired-activity dependent tLTP and tLTD, wherein eCB dynamics tightly control both the induction/maintenance and polarity of synaptic weight changes. Due to their on-demand intercellular signaling modus operandi (Alger and Kim, 2011), eCB biosynthesis and release are evoked by precisely timed physiological stimuli. Our study demonstrates that STDP, an important physiological form of Hebbian plasticity, efficiently triggers eCB signaling and that eCB signaling controls the STDP polarity in a bidirectional manner depending on the activity pattern.
Since its discovery, STDP has been attracting a lot of interest in computational neuroscience because it is based on the patterns of spike timing. Computational models of STDP can be clustered into two families. A first group of models aims at predicting the consequences of STDP on e.g. neuronal receptive fields or network dynamics (Clopath et al., 2010;Costa et al., 2015). In those models, the function describing weight changes with spike timing is usually given as hypothesis of the model. A second group of models starts from the signaling pathways implied in STDP and aims at understanding how the function describing weight changes with spike timing emerges from those signaling pathways (see e.g. Graupner and Brunel, 2010 for a review). In a number of models in this second group, intracellular signaling is actually restricted to cytoplasmic calcium variation, thus implementing calcium-control hypothesis (Shouval et al., 2002). The mathematical models that consider signaling downstream of calcium usually account for a single intracellular signaling pathway (i.e. a single coincidence detector), most often NMDAR-CAMKII (Rubin et al, 2005, Graupner andBrunel, 2007;Urakubo et al., 2008). Noticeable exceptions are for instance Karmarkar and Buonomano (2002), Evans et al., 2012or Paillé et al. (2013, where the calcium pool entering via NMDAR controls tLTP whereas the calcium pool entering though VSCCs controls tLTD, thus implementing two coincidence detectors. However those models do not consider the signaling pathways beyond calcium entry through NMDAR and VSCC. Our mathematical model belongs to the latter Figure 9 continued LTP induced by 100 presynaptic stimulations with MAGL inhibition. Top, EPSC strength before and after pairings (before pairings: 143±2 pA; 45-55 min after pairings: 224±2 pA; increase of 57%). Bottom, time courses of Ri (before, 131±1 MW; after, 131±2 MW; no significant change) and injected current (Iinj) (before, -3±1 pA; after, -12±1 pA; change of 6.3%) for this cell. (C2) Summary of LTP induced with 100 presynaptic stimulations; 7/11 cells showed significant LTP. This 2-AG-mediated LTD was prevented by AM251 (3 mM, n=5); 5/5 cells showed no significant plasticity. Representative traces are the average of 15 EPSCs during baseline (black traces) and 50 min after STDP protocol (grey traces group. To our knowledge, this is the first model to incorporate two detailed signaling pathways to account for STDP: NMDAR-CAMKII (with calmodulin, PKA, CaN and PP1) for tLTP and the eCB system for tLTD and tLTP. In the model, the eCB system comprises mGluR5, PLCb, DAGL, MAGL, DAG-Kinase, calcium-induced calcium release (IP3R channels, SERCA pumps), IP3 dynamics (PLCd, PI3K), VSCC, TRPV1R and CB1R (Figure 2A). Thank to this very fine grain description, the present mathematical model is able to predict the weight change when any of the STDP parameters is . eCB-tLTD was prevented with CaN (cyclosporin A) inhibition but unaffected with PKA inhibition (KT5720); 0/6 and 4/5 cells showed LTD with cyclosporin A and KT5720, respectively. (A2) Summary bar graphs illustrate that eCB-LTD maintenance involves the activation of presynaptic CaN by a CB1R-triggered signal and was independent of the activation of presynaptic PKA. (B) Main conclusion scheme: eCB-LTD is triggered by moderate prolonged levels of CB1 activations and requires active CaN. Normality was assumed for the cyclosporine A & KT5720 data (test not passed). (C-D) eCB-tLTP is PKA-dependent. (C1) Summary of plasticity induced by 10 post-pre pairings with bath applied KT5720 (1 mM) or with i-PKI6-22 (20 mM). eCB-tLTP was prevented with bath-applied KT5720 but unaffected with i-PKI6-22, a cell-impermeant PKA inhibitor applied intracellularly in the postsynaptic neuron; 0/4 and 6/7 cells showed LTP with KT5720 and i-PKI6-22, respectively. (C2) Summary bar graphs illustrate that eCB-tLTP depends on presynaptic PKA activation since it was prevented by bath-applied KT5720 but unaffected when KT5720 or PKI6-22, was applied intracellularly in the postsynaptic neuron (i-KT5720, i-PKI6-22). Cyclosporin A had no effect on eCB-tLTP, showing that it was CaN-independent. Thus, eCB-tLTP maintenance involves the activation of presynaptic PKA by a CB1R-triggered signal. Normality was assumed for the ctrl & KT5720 data (test not passed). (D) Main conclusion scheme: eCB-LTP is triggered by large levels of short duration of CB1R activation and requires presynaptic active PKA. Representative traces are the average of 15 EPSCs during baseline (black traces) and 50 min after STDP protocol (grey traces). Error bars represent SD. *p<0.05. ns: not significant. DOI: 10.7554/eLife.13185.015 The following figure supplement is available for figure 10: varied, that is, not only spike timing Dt STDP , but also N pairings and frequency. This capacity has allowed us to explore a novel form of plasticity, eCB-LTP, induced by a low number of post-pre pairings at 1 Hz ; the present study). Our mathematical model features 36 ordinary differential equations and roughly 150 parameters, among which more than one half is constrained by experimental data. A classical view assesses that with enough parameters, one can fit any data set, whatever the equations used. This view however does not apply in our case because we constrained the model with experimental data embedded in a three-dimensional parameter space (Dt STDP , N pairings and frequency). In these conditions of strong constraining by experimental data, our parameter estimations systematically converged to a unique scenario that features two fundamentals: (i) eCB-transients allow bidirectional eCB plasticity whereby tLTD is triggered by moderate levels of eCB while high-amplitude eCB transients yield LTP and (ii) large eCB-transients are obtained for low numbers of pairings (for 5<N pairings <20 at 1 Hz) while for larger number of pairings (N pairings >40 pairings at 1 Hz) reduced calcium influx from internal stores and/or CB1R desensitization curtails the amplitude of the eCB-transients. We confirmed this prediction experimentally by two means: eCB puffs with different concentrations and durations, and MAGL inhibition in various conditions. Highly concentrated short puffs of 2-AG indeed yielded LTP in the absence of any electrical stimulation whereas less concentrated prolonged 2-AG puffs produced LTD. By decreasing MAGL activity, thus favoring high 2-AG levels, we could increase the magnitude of eCB-tLTP (5 post-pre pairings), induce eCB-tLTP at 50 post-pre pairings or even switch eCB-LTD to eCB-tLTP (100 presynaptic stimulations). Therefore, under MAGL inhibition, the temporal coincidence between pre-and postsynaptic spikes is not mandatory anymore for the induction of longterm plasticity. This discovery may have far-reaching consequences, since it means that the manipulation of MAGL activity may bootstrap synaptic plasticity in synapses where the postsynaptic neuron is silent, thus rescuing possible pathological situations or waking up new local circuits. Further work is however needed to check the realism of this implication in vivo but it is noteworthy that recently, nerve growth factor (NGF) signaling in cholinergic projection neurons of fetal mice has been shown to control MAGL degradation in vivo and in vitro in a spatially specific way (Keimpema et al., 2013). In light of our findings, these results suggest that the regulation of MAGL activity may indeed be a potent mechanism to control synaptic plasticity and thus learning and memory.
Our experimental results showing that short puffs of highly concentrated 2-AG yields LTP in the absence of any electrical stimulation is a strong argument in favor of the model-derived hypothesis that eCB can support tLTP in addition to tLTD. Both the amplitude ('165%) and the pharmacology (suppression by CB1R antagonist AM251) of the LTP observed with these puffs are identical to those observed for tLTP triggered by 10 post-pre pairings. Moreover, it is important to note that when we applied 2-AG in the form of prolonged puffs (x100), we observed LTD instead of LTP. According to our mathematical model, this behavior would be due to desensitization of the CB1R that becomes prominent with prolonged puffs. 2-AG puff application is therefore generally expected to give rise to depression except if the puffs are of short duration, where potentiation can be observed. This feature may account for the widespread observation that prolonged applications of 2-AG systematically yielded to LTD and might explain why eCB-dependent potentiation has proven difficult to observe experimentally.
Our mathematical model in general shows very good agreement with experimental data, even for conditions for which the model was not fitted (stimulation frequency >1 Hz, alteration of MAGLipase activity). Some mismatches are however notable. Our focus here has mostly been on the signaling part of the system. In comparison, our modeling of the synaptic machinery and the electrophysiological response of the MSN neurons have been less sophisticated. For instance, Figure 9B shows that 100 presynaptic stimulations at 1 Hz, in the absence of post-synaptic stimulation, are sufficient to trigger eCB-LTD experimentally. This is likely due to the production of eCB resulting from the postsynaptic depolarization triggered by the 100 presynaptic stimulations (depolarization-induced LTD). In the model however, the postsynaptic depolarization triggered by 100 presynaptic stimulations at 1 Hz is not large enough to allow the entry of the minimal amount of calcium that is needed to overcome the eCB-LTD threshold, so no plasticity is observed.
The dynamics of glutamate release and binding are expected to be crucial for the expression of STDP, as illustrated by our sensitivity analysis (Figure 4). Several parts of the glutamate release and binding machinery at the corticostriatal synapse are known to display nontrivial frequency-dependence, including presynaptic glutamate release, uptake by transporters and receptor activation because of desensitization of AMPAR (Goubard et al., 2011). Since our mathematical model features none of these frequency dependencies, we cannot expect a precise quantitative match between experiments and model when frequency is varied. However, it is remarkable that the model still yields correct predictions of the main qualitative trends observed in the experiments. For instance, 10 post-pre pairings at very low frequency (0.1 Hz) are sufficient to trigger tLTP in the experiments, while the model predicts no plasticity at those frequencies ( Figure 5). At 4 Hz, the experimental pharmacology profile with 10 pairings is not matched by the model with 10 pairings, but with 15 pairings ( Figure 5). Nevertheless, the model predictions that increased frequency should witness i) an enlarged range for the expression of tLTP with post-pre 10 pairings and ii) the emergence of a new tLTP with 10 pre-post pairings turned out to be generally correct.
In the hippocampus, theta-burst stimulation induces eCB-dependent LTD at the synapse between inhibitory interneurons and pyramidal cells that is blocked when presynaptic CaN is inhibited (Heifets et al., 2008). Similarly, we found that eCB-tLTD triggered at the corticostriatal synapse also needs CaN activity. In our experiments, we could not estimate the localization of the CaN that mediated eCB-LTD (pre or postsynaptic) but it is likely that in analogy with theta-burst STDP in the hippocampus, the implied CaN would be presynaptic. The implication of PKA in eCB-LTD is less clear. In the hippocampus (Chevaleyre et al, 2007) and nucleus accumbens (Mato et al., 2008), the expression of frequency-dependent eCB-LTD is blocked when cAMP levels are increased by the adenylylcyclase activator forskolin. Since PKA is activated by cAMP, this indicates that reduced levels of PKA are necessary for eCB-LTD. In both cases however, direct inhibition of presynaptic PKA actually blocks the expression of eCB-LTD, thus showing that the implication of PKA in eCB-dependent plasticity is a complex and subtle phenomenon. In the case of tLTD in the dorsolateral striatum, we found that direct PKA inhibition does not obliterate eCB-tLTD. Our result is, therefore, in line with the notion that the expression of eCB-tLTD requires PKA inhibition. Strikingly, the eCB-tLTP triggered at the corticostriatal synapse by STDP protocols had the exact inverse dependence on PKA and CaN compared to eCB-tLTD. Indeed, we found that PKA inhibitors block eCB-tLTP expression whereas CaN inhibition has no effect. Therefore, our study of STDP protocols at the corticostriatal synapse shows that the expression of eCB-tLTD needs CaN (but not PKA) activity whereas the expression of eCB-tLTP demands PKA (but not CaN) activity. Whether the same or two separate pathways support eCB-tLTD and eCB-tLTP is still a pending question which resolution is rendered highly challenging by the difficult access to the molecular mechanisms occurring in the presynaptic compartment of the corticostriatal synapses. However, we can propose a simplified schematic mechanism ( Figure 10-figure supplement 1). CB1R activation inhibits PKA activity but also inhibits presynaptic VSCCs (Mato et al., 2008), which are expected to hamper calcium influx in the presynaptic compartment. Such a decrease in calcium levels reduces the CaN activity. CB1R activation is expected to reduce both CaN and PKA activity, although the shapes (kinetics parameters) of the decays of PKA and CaN activity with increasing CB1R activation are not necessarily identical. For example, in Figure 10-figure supplement 1, PKA activity dominates CaN when CB1R activation is large, whereas CaN dominates for a range of intermediate CB1R activations. Considering our experimental data, this putative mechanism suggests that eCB-STDP is gated by the ratio between PKA and CaN activities: large CB1R activation would produce high values of the PKA/CaN ratio yielding eCB-tLTP whereas intermediate CB1R activations would result in low values of the PKA/CaN ratio and, consequently, in eCB-tLTD. Future experimental investigation is needed to test the validity of this proposed mechanism.
The bidirectionality of synaptic plasticity is a key parameter since it allows LTP and LTD to reverse each another with time at a single synapse (probably at the same presynaptic side), thus enabling adaptive changes of the synaptic weight. Altogether, our results show that eCB bidirectional plasticity constitutes a versatile system, which operation may underlie a complex repertoire of learning abilities, depending on activity pattern at corticostriatal circuits and on the behavioral context.

Spike-timing-dependent plasticity induction protocols
Electrical stimulations were performed with a bipolar electrode (Phymep, Paris, France) placed in the layer 5 of the somatosensory cortex Cui et al., 2015). Electrical stimulations were monophasic at constant current (ISO-Flex stimulator, AMPI, Jerusalem, Israel).
Currents were adjusted to evoke 50-200pA EPSCs. Repetitive control stimuli were applied at 0.1 Hz. STDP protocols consisted in pairings of pre-and postsynaptic stimulations with the two events separated by a specific temporal interval (Dt). The paired stimulations were applied at 1 Hz throughout the study except in Figure 5 in which 0.1, 1.0, 2.5 and 4.0 Hz were tested. Presynaptic stimulations corresponded to cortical stimulations and the postsynaptic stimulation of an action potential evoked by a depolarizing current step (30 ms duration) in MSNs. MSNs were maintained all along the STDP experiments at a constant holding membrane potential which corresponds to their initial resting membrane potential (-75±0.5 mV, n=110). Thus, EPSCs during baseline or after STDP protocol were measured at the same membrane potential (in voltage-clamp mode); STDP pairings (performed in current-clamp mode) were conducted also at this same holding membrane potential. Neurons were recorded for 10 min during baseline and for at least 60 min after STDP protocol; long-term synaptic efficacy changes were measured from 45 to -50 min. Thirty successive EPSCs (at 0.1 Hz) were individually measured and then averaged. Variation of series resistance, measured every 10 sec all along the experiment, beyond 20% led to the rejection of the experiment. For pharmacology experiments, after recording of 10 min control baseline, drugs were applied in the bath. A new baseline with drugs was recorded after a time lapse of 10 min (to allow the drug to be fully perfused) for 10 min before the STDP protocol. Drugs were present until the end of the recording (except when specified for AM251*). In a subset of experiments (for i-KT5720 and i-PKI 6-22) drugs were applied intracellularly through the patch-clamp pipette. Once the cell was patched, drugs were allowed to diffuse into the cell during at least 15 min before starting recording of the baseline.

Electrophysiological data analysis
Off-line analysis was performed using Fitmaster (Heka Elektronik) and Igor-Pro 6.37 (Wavemetrics, Lake Oswego, OR, USA). Statistical analysis was performed using Prism 5.0 software (San Diego, CA, USA). In all cases 'n' refers to the number of repetitions of an experiment from single slice (each experiment being performed on different brain slices). All results were expressed as mean±s.e.m in the text and, for visualization purposes, as mean±s.d in the figures, and statistical significance was assessed using two-sided Student's t test or the one sample t test when appropriate at the significance level (p) indicated. We used the D'Agostino & Pearson omnibus normality test to test if the values come from a Gaussian distribution. All experimental data passed the normality test, except when indicated in the figure captions (where normality was assumed).

Mathematical model Equations of the Mathematical Model
The dimensions and values of all the parameters are given in Supplementary file 1A-C. A full implementation can directly be downloaded from the ModelDB database (http://senselab.med.yale.edu/ modeldb/), accession #187605. The model accounts for the signaling network depicted in Figure 2A, that gathers previous pharmacological evidence on STDP in MSN (Shen et al., 2008;Pawlak and Kerr, 2008;.

Synaptic plasticity and synaptic weights
In the model, we considered that the relative change in EPSC amplitude (synaptic weight, W total ) is the product of a pre-(W pre ) and a postsynaptic (W post ) component: W total =W pre W post . To implement our hypothesis of 2-AG dependent presynaptic plasticity, in the lack of detailed information on the presynaptic signaling pathways relating eCB signaling to plasticity, we choose a simple phenomenological mechanism. Essentially, we adapted the mechanism developed to describe the control of plasticity by calcium concentrations in Shouval et al. (2002), assuming instead that it is the amount of activation CB1R that controls W pre : where the function W sets the direction of plasticity (LTP, LTD or no plasticity); y CB1R = k CB1R x CB1R + D 1 describes the total eCB-dependent activation of the presynaptic signaling involved in plasticity and will be referred to as 'CB1R activation' below; x CB1R is the fraction of open CB1R (see below); D 1 is a constant that accounts for presynaptic plasticity modulation by, for example, tonic dopamine; the s are the threshold levels of y CB1R determining plasticity induction; A LTD and A LTP are parameters determining the rate of LTD and LTP induction respectively. The dynamics of W pre is then given by the functions proposed in Shouval et al. (2002): (2) t Wpre describes the time scale of presynaptic plasticity changes; D 2 is a constant that accounts for the modulation of plasticity time scales; P 1 -P 4 are constants chosen to yield rapid changes of W pre for large 2-AG values and very slow changes at very low 2-AG (memory). To account for experimental observation that the presynaptic weight ranges from about 50 to 300%, W pre was clipped to 3.0. The function W above (Equation 1) describes a sharp thresholding mechanism that we opted for for its simplicity in the absence of further supporting information. Smooth thresholding mechanisms can be used instead with no major alteration of our main results (see Results).
For W post , we referred to the NMDAR signaling pathway. The molecular steps along this pathway are well characterized from Glutamate to CaMKII activation but the downstream molecular mechanisms, leading from CaMKII activation to changes of the synaptic weights are still unclear, especially in MSNs. Therefore, we adopted the hypothesis, already used in Graupner and Brunel (2007) and others before, that the long-term (steady state) increase of W post is proportional to the fraction of activated (phosphorylated) CaMKII. We assumed that W post increases linearly with the concentration of phosphorylated CaMKII subunits (CaMKII act ). Since the largest postsynaptic LTP we observed experimentally was about 450%, we set: CaMKII act CaMKII max act (3)

CB1R activation and desensitization
We model CB1Rs activation with a simple three-state kinetic model: open (x CB1R ), desensitized (d CB1R ) and inactivated (i CB1R ): where eCB = 2-AG + 0.10 AEA accounts for the fact that AEA is a partial agonist of CB1R (Piomelli, 2003). We assumed here that AEA is 10-times less efficient than 2-AG; a CB1R , b CB1R , g CB1R and e CB1R are the rate constants for the transitions between states.

Postsynaptic element
We modeled the postsynaptic element as an isopotential compartment with membrane potential V that varies according to: g L and V L are leak conductance and reversal potential respectively; I AMPA , I NMDA , I VSCC and I TRPV1 are currents through AMPAR, NMDAR, VSCC and TRPV1R, respectively; I act is the action current accompanying the postsynaptic (somatic) stimulation (back-propagating action potential on top of a step-like depolarization) and is described below; G is the glutamate concentration in the synaptic cleft and AEA denotes anandamide concentration. NMDAR and AMPAR were modeled with twostate kinetic models and 1.0 mM Mg 2+ (Destexhe et al., 1995). L-type VSCCs are the main type of activated VSCCs in MSNs (Carter and Sabatini, 2004). We thus modeled VSCC currents using the model and parameters of the Ca v 1.3 currents (Wolf et al., 2005). We added TRPV1 current because blocking it inhibits eCB-dependent LTP . The TRPV1 current, including its dependence on AEA, was modeled as: where g TPRV1 is maximal conductance of TRPV1. The mathematical expression for the probability of TRPV1 to be in the open state, P open T RP V 1 was taken from Matta and Ahern (2007). Note that from a modeling perspective, the TRPV1 current can be ignored. The resulting model would essentially yield the same output as those presented below as long as absence of TRPV1 is compensated for by a slight increase of NMDAR or VSCC conductances.
To model the dynamics of the cytoplasmic concentration of Calcium, C, we transform the currents with a calcium component in Equation 5 to calcium fluxes by multiplying each of them by corresponding coefficient x ; where x is NMDA, VSCC, or TRPV1. We moreover take into account the dynamics resulting from calcium exchange with internal calcium stores (Calcium-Induced Calcium Release, CICR). The equation for cytosolic calcium reads: where where B T and K dB are constants and x = C or C ER . C ER , the Calcium concentration in the endoplasmatic reticulum (ER) is given by where ER is the ER to cytoplasm volume ratio. CaMKII phosphorylation was modeled according to Graupner and Brunel (2007). Originally, this model was developed to simulate hippocampal STDP, whereas our study is targeted to the striatum and MSNs in which protein phosphatase-1 (PP1) is inhibited by the striatum-specific subunit PPP1R1B (DARPP-32) rather than subunit PPP1R1A (Inhibitor-1). However, for the sake of simplicity (and since postsynaptic dopamine signaling is not explicitly considered here), we kept the equations and most of the parameters of Graupner and Brunel (2007). Our major change concerns PKA activation by calcium. Beyond the expression of DARPP-32, another specificity of MSNs is to express the B72 regulatory subunit of PP2A at high levels in lieu of B56. This striatum-specific regulatory subunit provides PP2A with calcium-activation properties (Ahn et al., 2007). Therefore, calcium elevations in MSNs are expected to activate B72-PP2A. Active PP2A then can dephosphorylate DARPP-32 (at Tyr75), which would in turn disinhibit PKA. This process results in an effective activation of PKA by calcium, that is modeled in the Graupner and Brunel (2007) model via a Hill function of calcium with exponent n PKA =8. More recent experimental evidence (Ahn et al., 2007) rather points to a lower value (2-3). We therefore changed for n PKA =3.
2-AG production occurs in the postsynaptic neuron where it is initiated by DAG production via mGluR-and M1R-activated PLCb. DAG-Lipase a (DAGLa) then produces 2-AG from DAG. DAG is co-produced together with IP3 by PLCb (thus follows the same production dynamics as IP3) and is consumed by DAGLa (yielding 2-AG) and DAG kinase (DAGK, yielding phosphatidic acid): dDAG dt ¼ R P ðC; IP 3 ; GÞ À r DGL ÁDAGLÁ' DAGL ÁDAG DAG þ K DAGL À r DAGK ÁDAG where R P (C, IP 3 , G) is the term that describes IP 3 production dynamics in De Pittà et al. (2009); IP 3 is IP 3 concentration; ' DAGL represents the fraction of activated DAGLa and DAGL its total (activated + not activated) concentration (see below), r DGL its maximal rate and K DAGL its Michaelis constant for DAG; r DAGK is the degradation rate by DAGK (that we assume linear for simplicity). 2-AG dynamics is obtained as the balance between postsynaptic synthesis (by DAGLa) and presynaptic degradation (by MAG-Lipase) upon retrograde transfer: where r MAGL lumps together both enzyme degradation by MAG-Lipase and 2-AG spillover out of the synapse. How DAGLa is activated in vivo is unknown, except for the calcium-dependence of its activation. We assumed DAGLa activation to rely on a single calcium activation step, modeled as a sigmoid function of the calcium concentration (DAGL þ n c Ca !DAGLÃ). Hence, the dynamics of the activated fraction of DAGL, ' DAGL is modeled here by: where n c , r k and r p are the constants of DAGL calcium-activation.
In vitro experiments suggest that DAGLa activation could be triggered by phosphorylation by a kinase (Rosenberger et al., 2007). An alternative, more complex, activation scheme could be that DAGLa is activated by a calcium-dependent kinase. Implementing this mechanism in our model (together with DAGL deactivation by a phosphatase) does not appreciably alter the results presented below. Finally, to model AEA synthesis, we considered the well-documented 2-step pathway (Starowicz et al., 2007):P E þ P C À! AT NAP E À! P LD AEAwith PE: phosphatidylethanolamine, PC: phosphatidylcholine, AT: N-acetyltransferase, NAPE: N-Arachidonyl-Phosphatidyl-ethanolamine and PLD: NAPE-selective phospholipase D. Note that alternative synthesis pathways exist, but because their relevance to neurons and MSNs is not clear yet (Starowicz et al., 2007), we did not consider them here. NAPE synthesis was modeled under the assumptions that i) PC and PE are in excess amounts and ii) the Ca 2+ concentrations necessary to reach half-maximal activation of AT (around 0.2 to 0.5 mM, Hansen et al., 1998) are well above the largest calcium levels in the model. Under those assumptions, dNAP E=dt ¼ AT C À r P LD NAP E=ðK P LD þ NAP EÞ where n AT =r AT [PE][PC]/K act with r AT the maximal rate of AT and K act its calcium activation constant. Likewise, the second step (AEA production) was modeled as dAEA=dt ¼ r P LD NAP E=ðK P LD þ NAP EÞ À r F AAH AEA=ðK F AAH þ AEAÞ where the latter summand represents AEA degradation by FAAH. Now, AEA synthesis is expected to proceed at a much faster rate than NAPE synthesis, so that NAPE is found at very low levels in cells (Hillard et al., 1997). The corresponding quasi-steady state assumption on NAPE concentration (dNAPE/dt » 0) then simplifies the expression of AEA dynamics to a single equation: where r FAAH and K FAAH represent FAAH enzyme activity and its Michaelis-Menten constant, respectively.

Stimuli
After each presynaptic spike at time t i pre , we model the time course of glutamate (G) as a single exponential decay with peak value G max and clearance rate t G : where H(x) is the Heaviside function H(x)=1 if x !0, 0 else. To model postsynaptic action current back-propagating from the soma, we use the sum of DC component of the current arising from the step-depolarization and a spike-induced transient that decays exponentially: I act t ð Þ ¼ ÀDC max P i Pðt; t i post ; DC dur Þ À AP max P i Hðt À d À t i post Þexp t À d À t i post t bAP 0 @ 1 A Pðt; t 0 ; LÞ ¼ Hðt À t 0 Þ À Hðt À t 0 À LÞ (15) where DC max and DC dur are the amplitude and the duration of step-current; AP max is the amplitude of the action current producing bAP, d is the delay between the outset of the step depolarization and that of the bAP and t bAP the time scale for bAP decay. The time difference between the onset of EPSC and peak depolarization of bAP is given by Dt ST DP ¼ t i post þ d À t i pre .

Parameters
The values of a large part of the parameters implicated in intracellular dynamics, eCB dynamics or electrophysiology in the model are restricted by previous experimental measurements (see Supplementary file 1A-C). To estimate the values of the parameters for which we lack previous experimental constraints, we used the experimental data shown in Figure 1 and in , that is, we optimized those parameter values so that the model emulates the synaptic weight changes triggered by STDP protocols with various spike timings Dt STDP and numbers of paired stimulations N.

Numerics
The ordinary differential equations of the model were integrated numerically with the LSODA solver from the ODEPACK fortran77 library (compiled for python with f2py) with absolute and relative tolerances both equal to 10 -7 . Initial conditions were set to the steady-state of each variable in the absence of stimulation. Numerical integration proceeded until the synaptic weights reach stable values (typically observed around t » 5min after the end of the stimulation protocol), and we kept the final value of the pre-and postsynaptic weights to compute the total synaptic weight change due to the stimulation protocol. Note that we also take into account that the experimental precision on the spike-timing delay (Dt STDP ) is around 2 to 5 ms. To emulate this, the simulation results were averaged (blurred) over this time window using convolution of W pre and W post with a normalized Gaussian function with s.d. = 3 ms.

Sensitivity analysis
We quantified the model sensitivity to variations of the 50 parameters p k ;k ¼ 1 . . . 50 whose values are not experimentally constrained ('free parameters', listed in Figure 4-figure supplement 1C).
To this end, we generated 2500 random parameter vectors p j ¼fp j k g j¼1. . .2500 by randomly sampling each component p k independently from an uniform distribution ranging from 0.1 to 1.9 of its best-fit value p ref,k (given in Supplementary file 1A-C). We partitioned the (Dt STDP , N pairings )-plane of Figure 4A1 (below) as a grid of N points and measured the mean squared distance D for each vector p j as: where W pre ðijp j Þ denotes the value of the presynaptic weight at point i of the (Dt STDP , N pairings )-grid when the values of the free parameters are given by the vector p j , and p ref denotes the best-fit values. We then fitted the resulting points with linear regression using ordinary least squares. Here b = (b 1 ,. . .,b M ) is the vector of regression coefficients and b 0 a constant. Note that we did not adapt the parameters of numerical integration of the model to each set of randomly chosen parameters. Parameters that led to integration failure were thus not taken into account. These rejections did not compromise uniformity of the distribution. We then computed for each parameter p k its standardized linear-regression coefficient (SRC) where Var(p k ) = 0.27 p ref,k 2 . SRC k is a measure of sensitivity of parameter k (Saltelli et al., 2002): when p k varies away from its best-fit value, the distance between the resulting model output and the reference output of figure 4A1 is proportional to SRC k .