Mosquito larvae live in water and perform a stereotyped escape response when a moving object projects its shadow on the water surface, indicating potential risk of predation. Repeated presentations of the shadow induce a decrease in the response as a result of habituation, a form of non-associative learning defined as the progressive and reversible decrease in response to a specific reiterative innocuous stimulus. Nevertheless, habituation can be context specific, which indicates an association between the context and the stimulus. The aim of this work was to study context specificity in habituation in mosquito larvae Aedes aegypti. Larvae were individually placed in Petri dishes positioned over black, white or black–white striped cardboard as background (visual context). Larvae were presented with a shadow produced by a cardboard square (training) over the course of 15 trials. After the 15th trial, the background was changed and the stimulus was presented once again (test). To analyse habituation in different contexts, we developed a series of learning curve models. We performed a Bayesian model selection procedure using those models and the data from the experiments to find which model best described the results. The selected model was a power law learning curve with six parameters (habituation rate; context-specific asymptotic habituation response, with one parameter per context, i.e. 3 parameters in total; response increase; and autocorrelation) describing the whole experimental setup with a generalised r2 of 0.96. According to the model, a single habituation rate would indicate that habituation was independent of the context, whilst asymptotic habituation would be context specific. If the background was changed after training, there was an increase in response in the test, evincing context specificity in habituation.