Bear sample collection
We collected brown bear hair samples in south-central Sweden (~ N61°, E15°) as part of a long-term, individual-based monitoring project (Scandinavian Brown Bear Research Project; www.bearproject.info). Hair samples were collected from known individuals and their offspring during bear captures in spring (April - June) 1993–2016 after bears emerged from hibernation. Bears were immobilized from a helicopter (Arnemo & Fahlman, 2011). A vestigial premolar tooth was collected from all bears not captured as a yearling to estimate age based on the cementum annuli in the root 56. Bears were weighed in a stretcher suspended beneath a spring scale. Tissue samples (stored in 95% alcohol) were taken for DNA extraction to assign parentage and construct a genetic pedigree 52. Guard hairs and follicles were plucked with pliers from a standardized spot between the shoulder blades and archived at the Swedish National Veterinary Institute. All animal captures and handling were performed in accordance with relevant guidelines and regulations and were approved by the Swedish authorities and ethical committee (Uppsala Djurförsöksetiska Nämnd: C40/3, C212/9, C47/9, C210/10, C7/12, C268/12, C18/ 15. Statens Veterinärmediciniska Anstalt, Jordbruksverket, Naturvårdsverket: Dnr 35–846/03, Dnr 412-7093-08 NV, Dnr 412-7327-
09 Nv, Dnr 31-11102/12, NV-01758-14). We used data of adult bears (solitary or with offspring) and of offspring after separation from their mother. Bear cubs are born in January or February during winter hibernation and are typically first captured together with their mother as yearlings at the age of ~ 15 months. Cubs in this population separate from their mother during the mating season in May or June after 1.5 or 2.5 years 57. Only hair samples of solitary, independent offspring taken in spring and early summer at least 10 months after separation from the mother were included in this study. A hair sample taken in spring reflects the summer-fall diet of the bear in the previous active season (Fig. 1A).
Food sample collection
We collected samples of the natural foods most important for brown bear in the study area, including 21 samples of moose hair (Alces alces), the most common meat source in the brown bears’ diet in our study area 58, in the spring-autumn field season of 2014 (Fig S1). Samples were placed in a paper envelope and dried at ambient temperature.
Stable isotope analyses
Hair samples were rinsed with a 2:1 mixture of chloroform:methanol or washed with pure methanol to remove surface oils 59. Dried samples were ground with a ball grinder (Retsch model MM-301, Haan, Germany). We weighed 1 mg of ground hair into pre-combusted tin capsules and combusted at 1030°C in a Carlo Erba NA1500 elemental analyser. N2 and CO2 were separated chromatographically and introduced to an Elementar Isoprime isotope ratio mass spectrometer (Langenselbold, Germany). Two reference materials were used to normalize the results to VPDB and AIR: BWB III keratin (δ13C =- 20.18‰, δ15N = 14.31‰, respectively) and PRC gel (δ13C =-13.64‰, δ15N = 5.07‰, respectively). Measurement precisions as determined from both reference and sample duplicate analyses were ± 0.1‰ for both δ13C and δ15N.
Bear trophic position
We calculated the trophic position of each bear hair sample relative to the average δ15N value of moose (mean ± sd = 1.8 ± 1.26‰, n = 21, Fig S1). Trophic position is calculated as the discrepancy of δ15N in a secondary consumer and its food source divided by the enrichment of δ15N per trophic level, plus lambda, the trophic position of the food source (e.g. 1 for primary producers, 2 for primary consumers, 3 for secondary consumer, 4 for tertiary consumers) 60. We used an average trophic enrichment factor of 3.4‰ 60 and added a lambda of 2 given that the moose baseline trophic position as a strict herbivore.
Bear trophic position = (δ15NUrsus arctos – average(δ15NAlces alces)) / 3.4 + 2
Under an omnivorous diet including the consumption of herbivores (in particular moose but also ants such as Formica spp., Camponotus herculeanus with average δ15N indistinguishable from moose), bear trophic position values were expected to fall between 2 and 3. Values approaching 4 indicate a trophic enrichment through consumption of other omnivorous or carnivorous animals.
Genetic pedigree and parentage assignment
A genetic pedigree based on 16 microsatellite loci was available for the population including 1614 individual genotypes 61. Genotyping followed the protocols of Waits, Taberlet 62, Taberlet, Camarra 63, and Andreassen, Schregel 64. All female offspring in this study were genotyped and included in the population’s genetic pedigree. All females included in this study had a known mother that was also captured and followed. We used Cervus 3.0 65 for assignment of fathers and COLONY 66 for creating putative unknown mother or father genotypes and sibship reconstruction (see 61 for details).
Maternal trophic position
Based on repeated hair samples of 115 female (nfemale = 335) and 98 male (nmale = 219) bears, we fitted a basic linear mixed effects model for female and male bears respectively, to estimate sex-specific among individual variation in trophic position (Supplementary analysis 3). We modelled trophic position as a function of a quadratic relationship with age and we controlled for individual random intercepts. Female trophic position did not vary with age but was highly repeatable over multiple years. For all daughters, we extracted their mother’s (and father’s) trophic position as the median of the posterior distribution of their respective random intercept. The modelled posterior trophic position and the observed trophic position in a given sampling year were highly positively correlated (Pearson correlation coefficient r = 0.78, t = 22.63, df = 336, p < 0.001).
Environmental similarity
Resources may not be distributed evenly in space. For moose, population density and hunting quotas (which determine availability of slaughter remains) vary across the study area. For ants, the availability of old forests and clearcuts determine their abundance 67. Further, brown bear daughters are often philopatric with limited dispersal and settle close to their mother’s home range 23. Genetic, spatial, and maternal learning effects may therefore be confounded with related bears occupying adjacent ranges with similar environments and resource availability. Elsewhere, accounting for environmental similarity through spatial autocorrelation in animal models has revealed that a major portion of variance may be attributed to environmental similarity rather than genetic heritability 31, 32, 68, but see also 69. Here, we accounted for environmental similarity by extracting habitat composition in each bear’s lifetime home range. For individuals with sufficient locations (> 1000 GPS locations or VHF locations on at least 25 days) we constructed home ranges using a 95% kernel density estimator. We used a Corine landcover map (25 m resolution) which we updated annually with polygons of newly emerged clearcuts (data obtained from the Swedish Forest Agency). We extracted home range composition in the year when diet was assessed. When individuals were monitored for multiple years, we extracted the home range composition for the median year. We calculated the proportion of mid-aged and old forest and proportion of disturbed forest (clearcuts and regenerating young forest) within the 95% utilization distribution. Additionally, we calculated habitat diversity using the Simpson diversity index from the R package landscapemetrics 70. Following Thomson et al. 31 we calculated the Euclidean distance between scaled and centered habitat composition and habitat diversity in multivariate space, assuming equal importance of each component. Pairwise distances were scaled between 0 and 1, where increasing values indicated more similar habitat composition. In the supplementary material we provide an alternative analysis accounting for spatial autocorrelation in dietary specialization with a pairwise spatial distance matrix (S matrix; Supplementary analysis 5, Fig S5).
Statistical analysis
We applied a two-step modelling approach. First, we fitted a basic linear mixed effects model to estimate individual specialization as among individual variation in annual trophic position. We accounted for a nonlinear effect of age (second order polynomial) and for repeated measures of the same individual with individual random intercepts. We extracted the variance in fitted values (variance explained by fixed effects), among-individual, and residual variance and estimated the proportional contribution of fixed and random effects on the total phenotypic variance through variance standardization (i.e. repeatability 71, marginal and conditional R2-values 72). Second, we used a spatially explicit Bayesian hierarchical model (i.e. ‘animal model’) 31, 33 to partition among-individual variance in trophic position into environmental similarity (σ2env), additive genetic (σ2a), permanent among-individual (σ2ind), maternal (σ2mat), and residual within-individual effects (σ2r). Similar to the basic model, we accounted for a nonlinear effect of age on trophic position (fitted as time since separation of mother and daughter scaled by the standard deviation, true age and time since separation were perfectly correlated: Pearson correlation coefficient > 0.99). We tested for maternal effects on offspring trophic position by incorporating the mother’s trophic position as a covariate into the model. To account for a potential decrease of the maternal effect over time, we let maternal trophic position interact with the time since separation of mother and daughter (both scaled by their standard deviation and centered). We partitioned the variance explained by the two components of the fixed effect, the effect of maternal learning over time (i.e. maternal trophic position and the interaction between maternal trophic position and time since separation) and age (i.e. the main effect of time since separation), respectively, by calculating the independent contribution of each component to the total variance explained by the fixed effects, following the approach by Stoffel, Nakagawa 73 adapted to a Bayesian framework (see code under 74).
All models were fit using the R package “brms” 75 based on the Bayesian software Stan 76, 77. We ran four chains to evaluate convergence which were run for 6,000 iterations, with a warmup of 3,000 iterations and a thinning interval of 10. All estimated model coefficients and credible intervals were therefore based on 1200 posterior samples and had satisfactory convergence diagnostics with \(\widehat{R}\) < 1.01, and effective sample sizes > 400 78. Posterior predictive checks recreated the underlying Gaussian distribution of trophic position well. For all parameters, we report the median and 89% credible intervals, calculated as equal tail intervals, as measure of centrality and uncertainty 79. We deemed explained variance proportions as inconclusive when the lower credible interval limit was < 0.001 (i.e., < 0.1%) 80. All statistical analyses were performed in R 4.0.0 81. Primary data and code to reproduce all analyses are provided under (https://doi.org/10.17605/OSF.IO/68B9U, 74).