HMM of Maternal Behavior Figure 2. Hidden Markov model labeling of maternal behavior. An HMM is characterized by a state transition probability matrix A, an observation probability matrix B, and a state probability matrix p. The Baum-Welch algorithm is used to calculate a final HMM from an initial HMM (with user-defined, estimated probabilities) by maximizing the likelihood of emitting the observed behavioral sequence data. The final HMM is then used to label the behavioral sequence of each subject by application of the Viterbi algorithm. A statistical assessment of the frequency, duration, composition, and transitions between these labels can then be used to document strain differences in behavior. doi:10.1371/journal.pone.0014753.g002 representative sequences of maternal behavior are shown with HMM state labelling apposed to observed behavior (Figure 3). Two features were apparent when comparing observed behavior with HMM states. First, HMM states were dominated by one behavior but tolerated occasional diversions to other related behaviors (e.g. self-grooming during EAT, blanket nursing during ABN). Second, a precursory analysis of the sequence of HMM states indicated a stereotypic order, with nursing bouts, for example, composed of relatively persistent stretches of ABN and BLN, and consistently beginning and ending with the LG state. On fewer occasions the GRO state intervened between nest and non-nest behavior. An analysis of the composition of HMM states confirmed the first observation. In the C57BL/6 strain, the BLN and ABN states were exclusively composed of maternal care-related behaviors with blanket nursing (76%) and arched-back nursing (79%) dominating, respectively (see Table S8). The LG state was dominated by licking/grooming pups (66%), but was occasionally interrupted by self- grooming (10%), arched-back nursing (8.0%), and blanket nursing (5.2%). The GRO state appeared to be the most diverse, with contributions from both nest and non-nest behaviors: self-grooming out of nest (34%), sniffing nest (21%), nest building (12%), licking/grooming pups (8.9%), and sniffing cage (8.1%). The ACT state, although dominated by sniffing cage (37%), digging (13%), and drinking (12%), encompassed a wide range of active behaviors. Finally, the EAT state was the most monotonous, being composed almost entirely of eating (93%). In addition to precisely clustering behaviors, HMM analysis also provided information on preferred behavioral transitions between states. A graphical representation of the frequency, duration, and transition probabilities of HMM states provided a summary of the highly stereotyped behavioral patterns of C57BL/6 mothers (Figure 4). Nursing behavior was dominated by persistent (,12–13 min) bouts of the ABN and BLN states which were equally favoured as initial nursing states. The major entry and exit point for nursing was a relatively short duration (,4 min) LG state. Non-nest behavior was characterized by a rapid interchange between ACT and EAT states (,4 min each), with ACT being the major entry and exit point for nest behavior. The GRO state served as an intermediate between nest and non-nest behavior. HMM analysis of maternal behavior in BALB/c mice Although the general structure of behavioral states in the BALB/c strain was grossly similar to that seen in the C57BL/6 strain, significant differences in HMM state frequency, composi- tion, and transition probabilities were apparent (Figure 5; for detailed values and statistical significance, see Tables S8, S9, and S10). As expected, BALB/c mothers spent significantly less time in the ABN (11% vs. 32%) and LG (4.9% vs. 12%) states and significantly more time in the BLN (49% vs. 29%), ACT (16% vs. 12%), and EAT (12% vs. 8.3%) states than C57BL/6 mothers, reflecting a more self-oriented, non-nest behavioral style in this strain. Interestingly, while sleeping outside the nest (SLP) was rare in C57BL/6 mothers (0.002%), it was relatively common in BALB/c mothers (1.6%) a feature that reflected the tendency of C57BL/6 mice to sleep while nursing. Several significant differences in HMM state composition were also seen (Table S8). In the BLN state, blanket nursing was less Figure 3. Labeling of observed behavioral sequences by HMM. The HMM formalism takes into account both the frequency and order of a series of observed behaviors to identify and label behavioral states. Examples of HMM state labeling for representative sequences of maternal behavior take from two C57BL/6 mothers (60 observations per hour). Note how bouts of nursing (A and N states) typically start and end with licking and grooming of pups (L). Also, while nursing states (A, N, L) generally last for over ten minutes, activity states (C and E) are much more brief. Observed behaviors: N = blanket nursing, R = rearing, M = moving pups, G = self-grooming in nest, Z = digging, W = sniffing nest, E = eating, D = drinking, A = arched-back nursing, U = sniffing pups, P = licking/grooming pups, S = sniffing cage, B = nest building, and V = self-grooming out of nest; HMM states: C = activity, E = eating, L = grooming pups, G = self-grooming, A = arched-back nursing, N = blanket nursing. doi:10.1371/journal.pone.0014753.g003 PLoS ONE | www.plosone.org 5 March 2011 | Volume 6 | Issue 3 | e14753