Berent's research has examined both possibilities.  One line of research has demonstrated that knowledge of language is governed by tacit algebraic rules, that are evident in adults (both speakersBerent, I. and S. Pinker, The dislike of regular plurals in compounds: Phonological familiarity or morphological constraint? The Mental Lexicon, 2007. 2(2): p. 129–181.Berent, I., S. Pinker, and J. Shimron, Default nominal inflection in Hebrew: Evidence for mental variables. Cognition, 1999. 72: p. 1-44.Berent, I. and G. Marcs, No integration without structured representations:  Reply to Pater. Language, 2019. 95: p. e75-e86.Berent, I., G.F. Marcus, J. Shimron, and A.I. Gafos, The scope of linguistic generalizations: evidence from Hebrew word formation. Cognition, 2002. 83(2): p. 113-39.   Berent, I., D.L. Everett, and J. Shimron, Do phonological representations specify variables? Evidence from the Obligatory Contour Principle. Cognitive Psychology, 2001. 42: p. 1-60. and signers.Berent, I., A. Dupuis, and D. Brentari, Phonological reduplication in sign language: Rules rule. Frontiers in Language Sciences, 2014. 5: p. 560.) and newborn infants.Gervain, J., I. Berent, and J. Werker, Binding at birth: Newborns detect identity relations and sequential position in speech. Journal of Cognitive Neuroscience, 2012. 24(3): p. 564-574. A complementary line of work has shown that speakers—adults and newborn infants—converge on the same abstract phonological rules even when these principles are unattested in their linguistic experience.Tamasi, K. and I. Berent, Sensitivity to phonological universals: The case of fricatives and stops. Journal of Psycholinguistic Research, 2015. 44(4): p. 59-81.Lennertz, T. and I. Berent, On the sonority levels of fricatives and stops. The mental lexicon, 2015. 10(1): p. 88-132.Berent, I., H. Pan, X. Zhao, J. Epstein, M.L. Bennett, V. Deshpande, R. Seethamraju, and E. Stern, Language universals engage Broca’s area. PLoS ONE, 2014. 9(4): p. e95155.Gomez, D.M.,, S. Benavides-Varela, Bion. R. A.H., F. Macagno, M. Nespor, I. Berent, and J. Mehler. Sonority hierarchy in one-month-old infants’ brains. in Boston University Conference on Language Development. 2011. Boston, MA.Berent, I., T. Lennertz, J. Jun, M.A. Moreno, and P. Smolensky, Language universals in human brains. Proceedings of the National Academy of Sciences, 2008. 105(14): p. 5321-5325. The possibility that these phonological restrictions are governed by abstract rules is further supported by the discovery that these rules are spared in individuals with dyslexia—a reading disorder known to compromise low levels of speech processing (phonetics).Leppänen, P.H.T., U. Richardson, E. Pihko, K.M. Eklund, T.K. Guttorm, M. Aro, and H. Lyytinen, Brain responses to changes in speech sound durations differ between infants with and without familial risk for dyslexia. Developmental Neuropsychology, 2002. 22(1): p. 407-422.Serniclaes, W., L. Sprenger-Charolles, R. Carré, and J.F. Demonet, Perceptual discrimination of speech sounds in developmental dyslexia. Journal Of Speech, Language, And Hearing Research: JSLHR, 2001. 44(2): p. 384-399. These results suggest that phonological knowledge is not solely due to experience with certain sound patterns.
