From pup to predator; generalized hidden Markov models reveal rapid development of movement strategies in a naïve long‐lived vertebrate

Sea Mammal Research Unit, Scottish Oceans Inst., Univ. of St Andrews, St Andrews, KY16 8LB, UK Centre for Research into Ecological and Environmental Modelling, Univ. of St Andrew, St Andrews, UK Marine Biology and Ecology Research Centre, School of Biological and Marine Sciences, Univ. of Plymouth, Plymouth, UK Marine Mammal Laboratory, Alaska Fisheries Science Center, NOAA NMFS, Seattle, USA School of Applied Sciences, Abertay Univ., Dundee, UK


Introduction
The period immediately following nutritional independence is one of the most vulnerable times in the life of an animal (Lindström 1999). Juvenile survival is a key determinant of population persistence, especially for long-lived species with protracted immaturity (Lindström 1999, Thomas et al. 2019. Although predation often poses a significant threat to newly-independent animals, their ability to learn how to locate food resources and to effectively exploit them is critical in determining their growth, survival and reproductive output (Sullivan 1989). Yet our understanding of the factors impacting the successful transition to independent feeding is limited. Starvation is a major cause of mortality for many species during this early life stage, and individuals have a finite window of opportunity in which to develop effective foraging strategies before energy reserves are depleted (Sullivan 1989, Orgeret et al. 2016). This critical learning period is most pertinent for species that have no experience of foraging at the point of nutritional independence. The young of many species learn where and how to forage with guidance from experienced conspecifics (Radford andRidley 2006, Rapaport andBrown 2008), and may be supported by continued provisioning as they begin to forage independently (Mendez et al. 2017).
However, the young of species that are abandoned abruptly at the natal site are naïve, and must learn to exploit their environment without such guidance or support (Costa 1991). Such species provide a unique opportunity to investigate the development of effective foraging strategies without the confounding influence of adult behaviour. For marine diving species with a terrestrial breeding strategy, such as penguins, turtles and seals, young animals have the additional challenge of learning to forage in a new environment, within the physiological constraints of breath-hold diving (Boyd 1997).
Optimal foraging theory (OFT) predicts that animals will minimise time in transit to, from, and between prey patches, and maximise time in profitable feeding areas (Stephens and Krebs 1986). However, an optimal foraging strategy requires knowledge of the spatial distribution of resources. For naïve animals, this knowledge is often acquired through early-life exploratory movements. According to the "exploration-refinement foraging hypothesis" (Votier et al. 2017), individuals transition from meandering exploratory movements to a more optimal movement strategy, exhibiting more directed repeatable trips to known foraging grounds, with age and experience. Osborne et al. (2013) found that young bumblebee Bombus terrestris foragers undergo this process of refinement within days of first emerging from the colony; individuals rapidly transition from looping exploratory flights to straighter travel paths once they learn the location of food resources. Early-life exploratory movements have also been reported in longlived species, such as seabirds (de Grissac et al. 2017) and phocid seals (McConnell et al. 2002).

Accepted Ar ticle
'This article is protected by copyright. All rights reserved.' However, for such species with delayed recruitment, this exploratory phase can be prolonged; for example, Votier et al. (2017) found that immature (2-3 years old) northern gannets Morus bassanus exhibit lower foraging site fidelity and more exploratory movements between foraging areas than adults (≥ 5 years old). The authors hypothesised that delayed recruitment in other long-lived vertebrates may be driven by the time required to develop such memory-based foraging strategies (Votier et al. 2017).
Many studies have investigated the ontogeny of foraging behaviour by comparing metrics (e.g. diet composition, stable isotopes, habitat use or activity budgets) between age classes in naïve long-lived vertebrates of diverse taxa, such as seabirds (Riotte-Lambert and Weimerskirch 2013, Grecian et al. 2018), fishes (Kim et al. 2012) and marine mammals (Breed et al. 2011, Jeglinski et al. 2012). However, comparatively few studies have been able to examine ontogenetic changes throughout the critical earlylife period (rather than between age classes), and thus elucidate when and how such changes occur. This is particularly true with regards to changes in the characteristics of behaviour-specific (i.e. foraging or travelling) movements that are key components of broad-scale movement strategies (de Grissac et al. 2017). Addressing this knowledge gap is crucial to quantifying foraging activity in naïve animals and understanding the factors that shape the emergence of behaviours and the development of optimal movement strategies. Investigating the timing and dynamics of the critical learning period is also key to identifying important foraging habitat, assessing the potential impacts of anthropogenic activity during this vulnerable life stage, and designing appropriate mitigation.
Observing early-life behaviour in highly-mobile species is challenging due to high mortality rates and unpredictable dispersal (Hazen et al. 2012). However, miniaturisation of remote tracking technologies has allowed researchers to track large numbers of young animals of a growing range of species (Hazen et al. 2012). Nevertheless, quantifying the behaviours of foraging and travelling, and how the associated movement characteristics change with age, remains a challenge. The development of analytical techniques that allow discrete behavioural states to be inferred from movement data has become an increasingly active area of research over the past two decades (Carter et al. 2016). Hidden Markov models (HMMs) are among the most commonly-used and flexible statistical tools available for such analysis (Langrock et al. 2012). HMMs are capable of identifying discrete movement patterns in the data, from which behavioural states can be inferred (Langrock et al. 2012). Large step lengths with small turn angles are commonly interpreted as travelling, and small step lengths with large turn angles as area-restricted search (ARS) associated with foraging activity (Carter et al. 2016). Moreover, HMMs have been used to investigate how covariates, including age class, affect the state transition probabilities (state-switching Accepted Ar ticle 'This article is protected by copyright. All rights reserved.' behaviour) (Morales et al. 2004, Grecian et al. 2018). However, a limitation of the HMM framework conventionally applied to animal movement is that it assumes the characteristics (e.g. the distribution of step lengths and turn angles) of each movement state (e.g. foraging and travelling) are constant, and thus not affected by covariates. Conventional HMMs therefore cannot be used to quantify how behaviourspecific movement strategies develop as a function of time and other covariates.
In this study we employ an extension of the conventional HMM framework to overcome the limitations outlined above. The assumption of stationarity implicit within conventional HMMs is relaxed by explicitly modelling covariates acting on the movement characteristics of the behavioural states. Although this extension to conventional HMMs is well-established in the econometrics literature (Hamilton 1989), and is outlined in Zucchini, MacDonald and Langrock (2016), it has rarely been employed in ecology (but see McKellar et al. (2015)). Following the nomenclature of generalized linear models, such HMMs can be referred to as "generalized HMMs" (McClintock and Michelot 2018).
Here, we use these generalized HMMs to investigate the ontogeny of behaviour-specific movement strategies in a naïve vertebrate predator, grey seal Halichoerus grypus pups. Adult grey seals are sexually dimorphic (Bonner 1989), and exhibit sex differences in diet (Beck et al. 2007) and activity budgets (Russell et al. 2015). Adult movement strategies are characterised by discrete foraging trips within shelf seas, commuting between preferred foraging grounds and terrestrial haul-out sites (Russell et al. 2015).
Pups are abruptly abandoned on the natal colony after a brief (15-21 days) suckling period, and undergo a post-weaning fast (usually on land) of between nine and 40 days (Bennett et al. 2007, Noren et al. 2008).
Recruitment to the breeding population occurs after a prolonged period of immaturity (females: ~5 years, males: ~10 years) (Harwood and Prime 1978). Starvation is a major cause of post-weaning mortality (Baker et al. 1998), and first year survival is typically low and variable (Hall et al. 2001), exerting a strong influence on population dynamics (Thomas et al. 2019). Pups show rapid changes in trip duration and dive behaviour within two months of first leaving the colony, but the timing and scale of changes varies between the sexes and regional sub-populations (Bennett et al. 2010, Carter et al. 2017. The initial months of life after nutritional independence are clearly critical for the development of foraging skills, but the ontogeny of foraging movement strategies from weaning remains unstudied. Using location and dive data from recently-weaned pups tagged on breeding colonies in two distinct regions of the United Kingdom (UK; Northeast Scotland, West Wales), we examine the movement characteristics of putative foraging and travelling throughout the first four months of nutritional independence at sea. The generalized HMM approach allows us to test whether (i) movement strategies Accepted Ar ticle 'This article is protected by copyright. All rights reserved.' become more adult-like with time, and if such changes are affected by (ii) intrinsic (sex) and (iii) extrinsic (environment) covariates. Finally, (iv) we test if inferred foraging locations differ from those of a conventional HMM (commonly used to infer behaviour from animal movement data), which assumes a single stationary distribution for each behavioural state through time and across sample groups.

Telemetry data
We deployed Fastloc® GPS phone tags (SMRU Instrumentation, St Andrews, UK) on 29 grey seal pups at five UK breeding sites in 2009 and 2010 (Table 1; Supplementary material Appendix 1 Fig. A1).
Recently-weaned pups were captured before they left the natal colony and devices were glued to the fur at the base of the skull (Carter et al. 2017).
Devices attempted to obtain a location estimate every 20 min. We identified and excluded erroneous GPS location estimates using the protocol from Russell et al. (2015). In addition to location fixes, devices transmitted two-hourly summaries of behavioural data, beginning at midnight (GMT), including percentage of time spent diving, as determined by the integrated pressure sensor. A dive started when the sensor recorded depth > 1.5 m for > 8 s, and ended when it recorded a depth of < 1.5 m. We interpolated location fixes to a constant time step of 2 h, synchronised with the end of each summary interval. Any interval with missing summary data, or for which there was a gap > 6 h between the observed location fixes surrounding an interpolated location, was flagged as "unreliable".
We calculated time since leaving colony (integer days) for each 2 h time interval. Tag transmission period varied among individuals (34 to 337 days). We clipped data to 120 days after first leaving the colony to ensure a comparable sample size for all sex-region groups throughout the time series (Fig. 1, Table 1).
Grey seal pups in the UK exhibit regional differences in the scale of at-sea movement during their initial months of life (Carter et al. 2017). We therefore grouped adjacent colonies into two geographically distinct regions (Northeast Scotland and West Wales) to investigate regional differences in the ontogeny of behaviour-specific movement characteristics (Table 1).

(i) State assignment
Accepted Ar ticle 'This article is protected by copyright. All rights reserved.' Previous work on grey seals has shown that HMMs can be applied to horizontal tracking data to effectively identify two discrete at-sea movement states (Breed et al. 2011). Models typically identify two distributions of movement metrics; high step lengths with low turn angles, which are commonly attributed to travelling behaviour, and low step lengths with high turn angles, which are commonly attributed to foraging (Carter et al. 2016). However, for diving predators, limited horizontal movements during prolonged resting at the surface may be conflated with ARS if only location data are used to determine movement states (McClintock et al. 2013). Grey seals dive to forage and travel, but also spend prolonged periods at the surface (Russell et al. 2015), most likely to rest and digest (Sparling et al. 2007).
Following Russell et al. (2015), we distinguished between time intervals ( ) spent at the surface, or hauled-out, (resting state; = ) and diving (foraging and travelling states; ∈ { , }) using the proportion of a time interval spent diving (ω , ) from tag summary data. Seals must periodically surface to breathe, thus pups spent a maximum of 88.8% of any 2 h time interval underwater. Based on previous work, we set the threshold for an interval to be assigned to diving states using a majority rule at half of the maximum possible proportion of time spent diving, such that = when ω , < 0.444 and ∈ { , } when ω , ≥ 0.444 (see Russell et al. (2015) for more details).
We fitted a three state multivariate, discrete-time HMM ( for ∈ { , , } . For turn angle, we assumed φ | = ~ wCauchy(0, γ ) : a wrapped Cauchy distribution with mean zero and state-dependent directional persistence parameter 0 < γ < 1 for ∈ { , , }. The mean angle parameter was set to zero to maintain biological interpretability, with the movement model limited to a correlated random walk (as the concentration parameter goes to 1) or a simple random walk (as the concentration parameter goes to zero). Following Russell et al. (2015), states were assigned for "unreliable" intervals based solely on the Markov property of the state transition probabilities, and not the step lengths or turn angles. State assignments for "unreliable" intervals were excluded from subsequent analyses. All analyses were performed in R version 3.5.0 (R Core Team; 2018) using a bespoke R package; an early version of momentuHMM (McClintock and Michelot 2018),

Accepted Ar ticle
'This article is protected by copyright. All rights reserved.' modified to allow the inclusion of an asymptote to state-dependent covariate effects (see below; (iii) Generalized movement HMM).

(ii) Conventional movement HMM
We fitted the HMM described above, allowing covariates to affect the state transition probabilities, but not the state-dependent probability distribution parameters of the movement characteristics ( , φ ). The most highly-parameterised ("maximal") model comprised a three-way interaction of covariatestime since leaving colony (continuous), region (two level factor) and sex (two level factor) -on the state transition probabilities (Supplementary material Appendix 4 Appendix 3), and verified that state characteristics were biologically interpretable in line with our observations of the data.

(iii) Generalized movement HMM
To test the impact of including covariate effects on the state-dependent probability distribution parameters for step lengths and turn angles, we fitted a generalized HMM, allowing covariates to affect both the state  Table A1). We fitted this maximal model with an asymptote on each of ∈ { , } and γ ∈ { , } (for implementation see Supplementary material Appendix 2). This was done to account for the possibility that state-specific movements may converge on an optimum (i.e. adult-like behaviour) within the study period. This assumption was later tested during model selection by removing the asymptote. As with the conventional HMM, we conducted backwards model selection to arrive at a minimal adequate model, and decoded the states for each 2 h time interval using the Viterbi algorithm (Zucchini et al. 2016). As resting was a known state, intervals were not assigned by the HMM in a probabilistic manner (Russell et al. 2015). Therefore, covariate effects on resting state-dependent parameters did not affect state assignment and were not investigated here. We tested if the proportion of state-assignments inferred as foraging (for the entire dataset, and at sex-region group level) was significantly different between the minimal adequate conventional and generalized HMMs using two-sample tests for equality of proportions (i.e. binomial tests).

Results
In both the conventional and generalized HMMs (three state models) the model converged on two movement states (besides the known resting state), which, based on the movement parameters, we inferred as foraging, and travelling (see "state assignment" in Material and methods section).

Accepted Ar ticle
'This article is protected by copyright. All rights reserved.'

Generalized movement HMM
The minimal adequate generalized HMM included covariate effects of time since leaving colony, sex and region in a three-way interaction on the; (i) mean step length, (ii) directional persistence parameter and (iii) state transition probabilities (Supplementary material Appendix 4 Table A1). An asymptotic relationship was retained for the effect of time since leaving colony on mean step length, but not on directional persistence. A full table of parameter estimates is presented in Supplementary material Appendix 5 Table A2. Parameter values given below are population means followed by lower and upper 95% confidence intervals in parentheses.
The mean speed (derived from step length) associated with inferred foraging remained constant in the foraging state for all sex-region groups, at around 0.31 m s -1 (0.28 -0.32), but increased with time since leaving colony for travelling ( Fig. 1a-d). in W Wales by the end of the time series (Fig. 1e,g). Upon leaving the colony, putative foraging movements of Scottish females were more directionally persistent than those of males, at 0.55 (0.39 -0.71), but declined to a similar value of 0.3 (0.14 -0.46) by the end of the time series (Fig. 1f). Putative foraging movements of Welsh females were the most directionally persistent of all sex-region groups at the beginning of the time series, at 0.79 (0.54 -1) and showed the steepest decline, to 0.14 (0 -0.36) (Fig. 1h). However, 95% CIs were much wider for Welsh females than for other sex-region groups.
Putative travelling movements became more directed with time since leaving the colony for all sex-region groups, indicated by an increase in γ values (Fig. 1e-h).  (Fig. 2b). The probability of remaining in a given state was > 0.6 throughout the time series for all three states.
Disregarding "unreliable" time intervals (n = 5183; 15.2%), the activity budget for foraging was 0.44 for the entire dataset, compared with 0.29 for travelling and 0.27 for resting, based on the minimal adequate generalized HMM. Example state predictions from the generalized HMM are shown in Fig. 3.

Comparison between conventional and generalized HMMs
According to the AIC score, the minimal adequate generalized HMM was vastly superior to the minimum adequate conventional HMM (Supplementary material Appendix 4 more). Intervals that were assigned as travelling by the conventional model, but as foraging by the generalized model, were often clustered in space (Fig. 4b).
Accepted Ar ticle 'This article is protected by copyright. All rights reserved.'

Model computation
Total computation time required to fit the HMMs was 114 mins for the maximal generalized model (Table A1), and 46 mins for the maximal conventional model (Table A1)

on a desktop computer with an
Intel® Core TM i1-6700 3.4 GHz processor and 32 GB of RAM.

Ontogenetic changes in movement strategies
In this study, we examined changes in foraging and travelling movement characteristics with age in a highly-mobile vertebrate by combining animal-borne telemetry with a generalized HMM technique. Grey seal pup putative travelling behaviour became faster and more directed over the first four months after leaving the colony (Fig. 1), indicating an increase in travel efficiency. Concurrently, putative foraging movements became more tortuous, suggesting a decrease in the spatial scale of ARS. Mean travel speed reached by female pups in this study after four months (~1 m s -1 ) is comparable that of adult grey seals (0.92 m s -1 ; Russell et al. (2015)). The increase compared to the point of leaving the colony was ~0.3 m s -1 ; equivalent to an extra third of a body length per second (Hall and McConnell 2007). A study using telemetry data showed that grey seals of mixed age classes (from 5 months old to adults) had similar movement characteristics across age groups on outbound segments of foraging trips (Breed et al. 2011).
By quantifying the changes in foraging and travelling movements of pups throughout their initial months of life, our study suggests that they switch from exploratory movements to directed foraging trips, supporting the exploration-refinement foraging hypothesis (Votier et al. 2017). Moreover, despite a protracted period of immaturity (≥ 5 years), grey seal pups demonstrate a relatively rapid acquisition of adult-like behaviour.
In addition to gaining experience, phocid seals undergo substantial changes in body composition after nutritional independence (Hall and McConnell 2007). Profound physiological development occurs during the initial months of life; oxygen storage capacity and muscle strength improves (Noren et al. 2005), and the ratio of blubber to denser lean mass decreases (Hall and McConnell 2007). This physiological development may be related to an observed rapid increase in maximum dive duration (Bennett et al. 2010) and proportion of the dive spent at foraging depth (Carter et al. 2017, Orgeret et al. 2018 Accepted Ar ticle 'This article is protected by copyright. All rights reserved.' et al. 2019). Increased time at depth likely leads to higher prey encounter rates, which may be a feature of the temporal changes in putative foraging movement characteristics reported here.
We suggest that rapidly developing knowledge of foraging areas, and optimising travel paths to, from and between these areas, during the initial months of nutritional independence is likely a critical factor influencing survival and long-term fitness in grey seals. Starvation is a major cause of mortality for weaned grey seal pups, but not for adults (Baker et al. 1998). Although predation is a limiting factor on survival of many newly-independent animals, such as cheetahs Ancinonyx jubatus (Laurenson 1994) and passerine birds (Sullivan 1989), and predation events on weaned grey seal pups have been recorded in the UK (Brownlow et al. 2016), there is little evidence that predation has a population-level impact on first- year survival in UK grey seals. Indeed, an age-structured Bayesian model revealed that the grey seal population in Orkney reached apparent carrying capacity in the early 2000s, driven by densitydependence acting on pup survival (Thomas et al. 2019), likely through processes at-sea related to food availability (Russell et al. 2019). Furthermore, it is estimated that newly-weaned pups have an average of 36 days to feed successfully before their protein reserves are critically depleted (Bennett et al. 2007). Votier et al. (2017) hypothesised that protracted immaturity in northern gannets, and potentially other long-lived species may be attributable to the time required for individuals to fully develop memory-based foraging strategies. However, although grey seals undergo a prolonged immature phase (≥ 5 years), the changes in behaviour-specific movement characteristics reported here suggest a transition from exploration towards a more optimal, memory-based foraging strategy (i.e. adult-like foraging trips) within four months of nutritional independence. Therefore, the development of memory-based foraging strategies is unlikely to be a driver of protracted immaturity in grey seals. Although the broad-scale behavioural patterns and movement characteristics at four months of independence resemble those of adults, it is likely that foraging efficiency is not yet fully developed. For example, young grey seals may continue to improve their prey selection, prey capture ability and diving capacity throughout immaturity.
Unlike many seabirds, grey seals undergo large increases in body size with age (adult males and females are ~5.8 and ~3.8 times heavier than newly-weaned pups, respectively (Bonner 1989)). The time required to develop the foraging efficiency necessary to support breeding mass is therefore potentially a key driver of delayed recruitment in grey seals, and possibly for other species with a large absolute range in body size between young and adults. Where possible, future studies of movement ontogeny should seek to combine high resolution biologging data (such as accelerometry) with location data to quantify how finescale foraging behaviour (i.e. prey capture) develops alongside broad-scale movement strategies (Orgeret

Accepted Ar ticle
'This article is protected by copyright. All rights reserved.' et al. 2018). Moreover, quantifying the development of movement strategies in the context of adult behaviour will help to elucidate drivers of delayed recruitment in long-lived species.

Sex differences in ontogeny
The generalized HMM revealed sex differences in the development of putative foraging and travelling movement strategies for grey seal pups in both regions (Fig. 1), and sex differences in activity budgets of Welsh pups (Fig. 2). Sex-specific foraging behaviour is common in adult long-lived vertebrates, such as non-human primates, terrestrial herbivores, birds and pinnipeds (Ruckstuhl and Neuhaus 2005). In social species, the development of sex-specific foraging in young animals is often attributed to cultural transmission from same-sex adult conspecifics (Lonsdorf et al. 2004). For example, young female chimpanzees Pan troglodytes spend longer alongside their mothers developing foraging skills, while young males invest more time in play (Lonsdorf et al. 2004). The level of conspecific interaction at-sea is unknown for most pinniped species, therefore, the role of cultural transmission remains ambiguous.
However, there is evidence that young grey seals are competitively excluded from the best foraging areas by older conspecifics (Breed et al. 2013). The onset of sex differences seen here is therefore unlikely to be attributable to learning by association with same-sex adult conspecifics. For many non-social species, sex-specific behaviours emerge with differences in body size and/or energetic demands of reproduction (Ruckstuhl and Neuhaus 2005). However, studies of grey seal pups have revealed little or no sex differences in mass or body composition at weaning or departure from the colony (Bowen et al. 1992, Bennett et al. 2010. Here, sex-specific foraging behaviour therefore precedes overt sexual size dimorphism and reproduction.
Previous studies have shown that female grey seals in both the northwest and northeast Atlantic populations spend more time foraging than males (Breed et al. 2011, Russell et al. 2015, and Carter et al. (2017) found sex differences in the diving behaviour of recently-weaned pups. Our results show that sexspecific ontogenetic trends in foraging and travelling behaviour emerge soon after departing the colony.
Females showed greater changes in behaviour-specific movement characteristics than males over time. In Wales, females consistently showed a higher probability of remaining in a foraging state than males, indicative of longer foraging bouts (Fig. 2a). Breeding grey seal females prioritise accumulation of lipid mass which they must convert into milk and also use to sustain their own metabolic needs while provisioning a pup, whereas males preferentially put on lean mass throughout the year in order to compete effectively for females during the breeding season (Beck et al. 2003). The sex differences

Accepted Ar ticle
'This article is protected by copyright. All rights reserved.' present in pup behaviour may be driven by sex-specific prey preferences that underpin different metabolic strategies in breeding adults. Sex differences in energy storage strategies have been described in preweaned otariids (Arnould et al. 1996) and juvenile phocids (Kelso et al. 2012). We suggest that female pups may adopt a risk-averse foraging strategy, targeting reliable but, possibly low-yield, environments to prioritise survival and fulfilment of their reproductive potential. Conversely, male pups may adopt a riskier strategy, investing more time in searching out productive foraging grounds to maximise food intake and growth, and ultimately achieve a large body size to compete for females. For grey seals in the UK, sex-specific ontogenetic trends may explain an observed sex difference in first year survival probability; for a given body condition at weaning, North Sea females are predicted to be > 3 times more likely to survive their first year than males (Hall et al. 2001). We suggest that further research is required to determine the onset of sex-specific foraging strategies in long-lived non-social species, and the impact this may have on survival probability and population dynamics.

Effect of region on sex-specific foraging strategies
Sex differences in activity budgets were not evident in Scottish pups, suggesting that sex-specific ontogenetic changes are not driven solely by physiological differences, but are likely also influenced by environmental factors. Similar regional sex differences in foraging behaviour have been reported for adult Weddell seals Leptonychotes weddellii (Langley et al. 2017), but a causal mechanism has not been identified. Such behavioural plasticity might be driven by regional and seasonal differences in the diversity of available foraging habitat or prey types. In this case, the areas used by Scottish pups, encompassing much of the north-western North Sea, represent a more homogeneous environment than the Celtic and Irish Seas off the coast of West Wales (Trevail et al. 2019) (Supplementary material Appendix 6 Fig. A5). Alternatively, sex differences in sensitivity to abiotic parameters, such as extreme weather, may result in region-specific sex differences in behaviour. The role of the environment in shaping sexspecific behaviour has been well documented in terrestrial mammals (Conradt et al. 2000). For example, it has been shown that sex differences in sensitivity to strong winds and low temperatures influence the winter distributions of male and female red deer Cervus elaphus (Conradt et al. 2000). This phenomenon is less well-studied in marine vertebrates, but a recent study of two long-lived sexually dimorphic seabird species demonstrated sex-specific influences of climate perturbations on survival probability as a result of sex-specific foraging strategies (Gianuca et al. 2019). We argue that more mechanistic research is required to elucidate the role of extrinsic factors in shaping sex-specific behavioural strategies in young Accepted Ar ticle 'This article is protected by copyright. All rights reserved.' animals. Studying individuals during early life, when sensitivity to environmental perturbations may be most acute, is likely key to understanding the consequences of environmental change on species demographics and population dynamics.

Methodological implications
Here we have demonstrated an extension of HMMs to investigate the development of behaviour-specific movement patterns. Not only was the generalized HMM overwhelmingly favoured to a conventional HMM by model selection (Supplementary material Appendix 4 Table A1), it revealed new ecological insights (discussed above) that would not have been detected within the conventional framework.
Moreover, we have shown that not considering intrinsic and extrinsic influences on behaviour-specific movements can impact state decoding, which may lead to inaccurate estimation of activity budgets and foraging locations (Fig. 4). In our study, up to 16% fewer time intervals were inferred as foraging with the conventional HMM. Conventional HMMs are increasingly used to identify important foraging areas, and inform conservation management (e.g. Maxwell et al. (2011), van Beest et al. (2019). Not accounting for covariate effects may therefore translate into sub-optimal designation of conservation resources where foraging areas are misclassified or under/over-estimated. Such inaccuracies may be especially problematic if important foraging habitat is overlooked, particularly for vulnerable life stages.
In addition to ontogenetic processes, many other covariates may influence the characteristics of behaviour-specific movements. For example, an individual's foraging or travelling movement patterns may vary as a function of intrinsic (e.g. sex, reproductive status and energetic requirements) (Pirotta et al. 2018), or extrinsic factors (e.g. aspects of the physical environment and seasonal prey distribution) (Palacios et al. 2019). Until now, animal movement HMMs typically assume that foraging characteristics will be the same among sample groups (e.g. males and females (McClintock et al. 2013)). Here we have demonstrated a case in which this assumption is violated. Moreover, the impact of environmental covariates on animal movement is of particular research interest (Hays et al. 2016, Cox et al. 2018a, and generalized HMMs will be useful to address such questions. Although conventional HMMs can uncover how habitat features affect behavioural state switching (Morales et al. 2004, Grecian et al. 2018, van Beest et al. 2019, incorporating extrinsic covariate effects on state-dependent parameters will allow a more mechanistic understanding of how animals optimise their movement strategies in response to environmental stimuli.

Accepted Ar ticle
'This article is protected by copyright. All rights reserved.' In the current study, the aim was to investigate broad-scale ontogenetic trends in movement characteristics at the sex and region level. Fine-scale spatial covariates that could also affect movement characteristics (e.g. tidal currents, habitat type) were not considered in addition to ontogeny to avoid unmanageable model complexity. Given the considerable variation in the areas and habitats used by individuals (Supplementary material Appendix 6 Fig. A5), any influence of such factors would generate "noise" rather than directional impacts that could be confounded with ontogeny. Season is the only extrinsic factor with a potential temporal influence on state-specific movement parameters. However, we would not necessarily expect any such influence to be monotonic (as seen in Fig. 1). Additionally, due to regional differences in pupping date, the pups were tagged in different seasons in the two regions. Given that the time covariate was input as days since leaving colony (rather than Julian day), if there were a seasonal component to the temporal trend, we would expect to see mismatched rather than the comparable trends we observe here between the two regions. Thus, the observed temporal trends can only be driven by ontogenetic changes relating to age and/or experience of the pups, as this is a common temporal feature between the two regional datasets.
There are various considerations when inferring behavioural states using HMMs, particularly (1) the temporal resolution on which to infer states, (2) the incorporation of individual and group-level variation in state-specific movements, and (3) the time taken to fit such models. Firstly, the temporal resolution on which states are inferred (here 2 h) was selected based on multiple factors including data resolution, computational burden, and biological rationale. While pups may occasionally exhibit more than one behaviour within a 2 h interval, the high probability of remaining in a given state reported here for all sexregion groups is evidence that pups predominantly exhibit one behavioural mode for > 2 h at a time.
Furthermore, analysis of grey seal dive data has revealed that dives are typically clustered in behaviourspecific bouts, and the average bout length is 3.4 ± 0.5 h (Austin et al. 2006

Conclusions
Our study quantifies rapid changes in foraging and travelling movement characteristics in a naïve longlived vertebrate with delayed recruitment. Our results suggest that grey seal pups develop adult-like movement strategies within four months of departing the natal colony. Moreover, the ontogenetic process is influenced by sex, before the onset of significant sexual size dimorphism. Our findings show that the emergence of sex-specific behaviour in long-lived species may not always be driven by cultural transmission or sex differences in body size. Instead, we hypothesise that sex differences in early-life metabolic strategies may lead to sex-specific foraging behaviour in young animals. Furthermore, we found that the emergence of sex-specific behaviours appears to be influenced by region. We call for further research to elucidate the role of the environment in shaping such sex-specific ontogenetic trends, and understand the potential consequences of environmental change on species demographics and population dynamics. Our work suggests that overlooking the impact of intrinsic and extrinsic factors on foraging behaviour may distort our understanding of foraging ecology, and have negative consequences for spatial conservation management where protected areas are designed based on inference of foraging areas from conventional HMMs. Such consequences may be particularly acute for young animals. The generalized HMM approach demonstrated here can be used to provide fresh insights into foraging ecology and, more broadly, help to maximise the potential of animal movement datasets.

Accepted Ar ticle
'This article is protected by copyright. All rights reserved.'

Declarations
Acknowledgements -We thank Scottish Natural Heritage (SNH), Natural Resources Wales (NRW), Bardsey Island Trust, the Royal Society for the Protection of Birds (RSPB), and the many individuals who participated in field work. Thanks also to Prof. Andy Russell (University of Exeter), Prof. Vincent Janik (University of St Andrews) and Joseph Onoufriou (University of St Andrews) for insightful comments, and to the two anonymous reviewers whose comments improved the manuscript. Data accessibility: Seal telemetry data will be made available from the Dryad data repository. Source code for the bespoke R package used in this analysis is available from the authors upon request.

Accepted Ar ticle
'This article is protected by copyright. All rights reserved.'