Codex Mentis: Science and technology to study cognition

Pablo Bernabeu

Codex Mentis, produced by Dr Pablo Bernabeu, offers an exploration into cognitive science and its technologies with the assistance of advanced artificial intelligence. This podcast delves deep into how we think, perceive and interact with the world, dissecting both the profound mysteries of the human mind and the cutting-edge science and technology that illuminate its inner workings. Each episode presents a fascinating journey through diverse aspects of cognition. Beyond the theoretical, Codex Mentis demystifies the methodologies driving cognitive research. Contact: pcbernabeu@gmail.com

Episodes

  1. Beyond the cloud: Reclaiming data sovereignty in speech transcription

    9H AGO

    Beyond the cloud: Reclaiming data sovereignty in speech transcription

    🪄 Created using Google Gemini and NotebookLM.In this episode of Codex Mentis, we explore the critical intersection of generative AI and research methodology, focusing on a production-ready, open-source workflow for secure speech transcription developed by Dr Pablo Bernabeu. While OpenAI’s Whisper models have set a new gold standard for speech-to-text accuracy, relying on consumer-grade cloud interfaces like ChatGPT or Google Gemini often proves incompatible with the rigorous demands of academic and clinical research. We dissect the three primary limitations of these cloud-based tools—restrictive file size caps, a lack of methodological reproducibility, and the significant privacy and GDPR risks inherent in transmitting sensitive human data to third-party servers. The discussion highlights a sophisticated alternative that leverages high-performance computing environments to achieve complete data sovereignty by running transcription entirely offline within a secure institutional perimeter. We break down the engineering behind this transition, including the use of SLURM job scheduling for unlimited scalability across GPU nodes and the implementation of advanced quality controls to fix common AI hallucinations such as spurious repetitions and accidental language switching. Furthermore, we examine the system's intelligent, multi-tiered approach to personal name masking and speaker diarisation, which ensures participant anonymity and structured dialogue without compromising the semantic integrity of the research data. This episode provides a comprehensive look at how researchers can balance the power of modern AI with the non-negotiable requirements of ethical compliance and long-term scientific sustainability.Sources and related content can be consulted at https://pablobernabeu.github.io/2025/speech-transcription-python

    32 min
  2. 11/11/2025

    The modular mini-grammar: Building testable and reproducible artificial languages using FAIR principles

    🪄 Created using Google Gemini and NotebookLM. In the high-stakes world of scientific inquiry, methods and findings are inextricable. Yet, issues of reproducibility remain a challenge, especially in experimental linguistics and cognitive science. As the old adage goes, "To err is human", but when creating research materials, adhering to best practices can significantly reduce mistakes and enhance long-term efficiency. In this episode of Codex Mentis, we explore the crucial application of the FAIR Guiding Principles—making materials Findable, Accessible, Interoperable, and Reusable—to the creation of stimuli and experimental workflows. Drawing on research presented by Bernabeu and colleagues, we delve into a complex study on multilingualism using artificial languages, designed specifically to ensure the materials are reproducible, testable, modifiable, and expandable. Unlike many previous artificial language studies that showed low to medium accessibility, this methodology emphasizes high standards for scientific data management. What you will learn: • The Power of Open Source: We discuss the importance of using free, script-based, open-source software, such as R and OpenSesame, to augment the credibility and reliability of research. • Modular Frameworks: Discover how creating a modular workflow based on minimal components in R facilitates the expansion of materials to new languages or within the same language set. • Rigour and Reproducibility: We examine crucial testing steps exerted throughout the preparation workflow—including checking if all experimental elements appear equally often—to prevent blatant disparities and spurious effects. • Detailed Experimentation: Hear how custom Python code within OpenSesame was implemented to manage complex procedures across multiple sessions, including assigning participant-specific parameters (like mini-language or resting-state order). • Measuring the Brain: We look at the technical challenge of accurately time-locking electroencephalographic (EEG) measurements. The episode details the custom Python script used in OpenSesame to send triggers to the serial port, enabling precise Event-Related Potential (ERP) recording. • Generous Documentation: Why detailed documentation, using formats like README.txt that are universally accessible, is essential for allowing collaborators and future researchers (or even your future self) to understand, reproduce, and reuse the materials. Adhering to FAIR standards ensures that the investment in research materials facilitates researchers' work beyond the shortest term, contributing to the best use of resources and increasing scientific reliability. Sources and related content can be consulted at ⁠https://pablobernabeu.github.io/presentation/making-research-materials-findable-accessible-interoperable-reusable-fair

    36 min
  3. 10/23/2025

    Third language learning and morphosyntactic transfer

    🪄 Created using Google Gemini and NotebookLM. Many of us know how difficult it is to master a second language (L2). But what happens when you decide to go for a third? You might assume the process gets easier once your brain is "warmed up," but the reality is far more complex and far more fascinating.In this insightful episode of Codex Mentis, we explore the burgeoning science of Third Language Acquisition, or L3 acquisition. We reveal why learning an L3 presents a fundamentally different cognitive puzzle than learning an L2.The Two-Blueprint Problem: When an L3 learner approaches a new language, their brain has two prior linguistic blueprints—the native language (L1) and the second language (L2)—instead of just one. This means they already have experience managing two co-existing, often competing, language systems. This difference has profound, measurable consequences on the learning process, documented clearly in studies like the one involving L1 English/L2 Spanish speakers learning French, where they preferentially borrowed the complicating Spanish grammar instead of the helpful English one. This phenomenon, known as Cross-Linguistic Influence or 'transfer,' forces the L3 learner's brain to run a rapid, high-stakes cost-benefit analysis about which existing knowledge base to deploy. This effort reflects a fundamental principle of human cognition: cognitive economy, where the brain avoids redundancy by reusing existing knowledge.The Great Debate: How Does the Brain Choose its Blueprint? The field is split over how transfer occurs:1. Typological Primacy Model: Argues for a 'wholesale' transfer—the brain makes a quick-and-dirty assessment of the new language's overall structure (its typology) and copies the entire grammatical system of the most similar known language (L1 or L2). This is the 'big picture first' approach.2. Linguistic Proximity Model and Scalpel Model: Suggest a continuous, granular, property-by-property negotiation. Influence is exerted by the language (L1 or L2) that has the most similar feature to the specific feature currently being processed in the L3.Building Languages in the Lab: To test these competing theories and study the initial state of learning, scientists employ ingenious methodology: the artificial language paradigm. These miniature, custom-designed languages provide total control over input and allow researchers to create perfectly unambiguous contrasts between the learner's L1, L2, and the new L3. By using familiar words but new grammar (semi-artificial languages), researchers bypass the time-consuming process of memorizing vocabulary (the 'lexico-semantic bottleneck') and get straight to processing morphosyntax.Learning vs. Acquisition: The Neural Evidence: This leads to a critical question rooted in Stephen Krashen’s work: are these lab studies capturing subconscious, intuitive acquisition (like a child absorbing their native tongue) or conscious, effortful learning (like cramming rules for an exam)?Using EEG brain scans to measure neural activity, researchers look for the P600—the brain's automatic, implicit signature for grammatical errors in a native language. Surprisingly, early studies on artificial languages did not find the P600. Instead, they observed the P300. The P300 is a domain-general signal linked to attention, working memory, and processing unexpected patterns.This means the brain’s initial response to a new grammar is not an automatic 'copy-and-paste' of a prior language; rather, L3 acquisition begins with the conscious recruitment of domain-general pattern-matching and attention.The Next Frontier: We detail the sophisticated, large-scale, longitudinal study currently underway, designed to bridge the gap between conscious learning and subconscious acquisition. Sources and related content can be consulted at ⁠https://pablobernabeu.github.io/publication/third-language-longitudinal-data-artificial-language-learning-eeg

    32 min
  4. 09/08/2025

    Behind the curtains: Methods used to investigate conceptual processing

    🪄 Created using Google Gemini and NotebookLM.How do scientists measure a thought? While the great philosophical questions about the nature of meaning have been debated for centuries, the last few decades have seen the development of a sophisticated scientific toolkit designed to turn these abstract queries into concrete, measurable data. In this episode of Codex Mentis, we go behind the curtains of cognitive science to explore the very methods used to investigate how the human brain processes language and constructs meaning.Moving from the 'what' to the 'how', this programme offers a detailed review of the modern psycholinguist's toolkit. The journey begins with the foundational behavioural paradigms that capture cognition in milliseconds. Discover the logic behind the Lexical Decision Task, where a simple button press reveals the speed of word recognition, and the Semantic Priming paradigm, which uses subtle manipulations of time to dissociate the mind's automatic reflexes from its controlled, strategic operations.From there, the discussion delves into the neuro-cognitive instruments that allow us to eavesdrop on the brain at work. Learn how Electroencephalography (EEG) and its famous N400 component provide a precise electrical timestamp for the brain's "sense-making" effort. Explore how Functional Magnetic Resonance Imaging (fMRI) creates detailed maps of the brain's "semantic system," showing us where meaning is processed. And see how Eye-Tracking in the Visual World Paradigm provides a direct, observable trace of the brain making predictions in real time.Finally, the episode demystifies the complex statistical techniques required to analyse this intricate data. We delve into the shift from older statistical methods to modern Linear Mixed-Effects Models, which are designed to handle the inherent variability between people and words. The conversation concludes with a crucial look at the foundations of trustworthy research, examining how scientists determine the sensitivity of their experiments and calculate the required sample sizes to ensure their findings are robust and reproducible. This episode provides a comprehensive guide to the ingenious procedures scientists employ to understand one of the most fundamental aspects of human experience: how we make sense of the world, one word at a time.Sources and related content can be consulted at ⁠https://pablobernabeu.github.io/publication/pablo-bernabeu-2022-phd-thesis

    40 min
  5. The architecture of meaning: Inside the words we use

    07/05/2025

    The architecture of meaning: Inside the words we use

    🪄 Created using Google Gemini and NotebookLM. What happens in your brain when you understand a simple word? It seems instantaneous, but this seemingly simple act is at the heart of one of the deepest mysteries of the human mind and has sparked one of the longest-running debates in cognitive science. In this AI-enhanced episode of Codex Mentis, we journey deep into the architecture of meaning to explore the battle between two powerful ideas. For decades, scientists were divided. Is your brain a vast, abstract dictionary, processing words like "kick" by looking up amodal symbols and their connections to other symbols? Or is it a sophisticated simulator, where understanding "kick" involves partially re-enacting the physical experience in your motor cortex? We begin with a landmark finding—the "object orientation effect"—that seemed to provide a knockout punch for the simulation theory, only to see this cornerstone of embodied cognition crumble under the immense rigor of a massive, multi-lab replication study involving thousands of participants across 18 languages. This "failed" replication didn't end the debate; it forced the entire field to evolve, moving beyond simple dichotomies and toward a more nuanced and profound understanding of the mind. This episode unpacks the state-of-the-art "hybrid" model of conceptual processing, which is at the forefront of modern cognitive science. Discover how your brain pragmatically and flexibly uses two complementary systems in a dynamic partnership. The first is a fast, efficient language system that operates on statistical patterns, much like a modern AI, providing a "shallow" but rapid understanding of a word's context. The second is a slower, more resource-intensive sensorimotor system that provides "deep" grounding by simulating a word's connection to our lived, bodily experience. The episode delves into the research from Pablo Bernabeu's 2022 thesis, which reveals that the interplay between these two systems is not fixed but constantly adapts based on three critical levels: 1. The task: The brain strategically deploys simulation only when a task demands deep semantic processing, conserving cognitive energy for shallower tasks. 2. The word: Concrete concepts like "hammer" rely more heavily on sensorimotor simulation than abstract concepts like "justice". 3. The individual: We explore the fascinating "task-relevance advantage," a consistent finding that a larger vocabulary isn't just about knowing more words, but about possessing the cognitive finesse to flexibly and efficiently deploy the right mental system for the job at hand. We also pull back the curtain on the science itself, discussing the "replication crisis" and the immense statistical power needed to reliably detect these subtle cognitive effects—often requiring over 1,000 participants for a single experiment. This methodological deep dive reveals why the science of the mind requires massive, collaborative efforts to move forward. Finally, we look to the future, exploring how the recent explosion of Large Language Models (LLMs) provides a fascinating test case for these theories, and how new frontiers like interoception—our sense of our body's internal state—are expanding the very definition of embodiment to help explain our grasp of abstract concepts like "anxiety" or "hope". This is a comprehensive exploration of the intricate, context-dependent dance between language and body that creates meaning in every moment. It will fundamentally change the way you think about the words you use every day. Sources and related content can be consulted at ⁠https://pablobernabeu.github.io/publication/pablo-bernabeu-2022-phd-thesis

    38 min

About

Codex Mentis, produced by Dr Pablo Bernabeu, offers an exploration into cognitive science and its technologies with the assistance of advanced artificial intelligence. This podcast delves deep into how we think, perceive and interact with the world, dissecting both the profound mysteries of the human mind and the cutting-edge science and technology that illuminate its inner workings. Each episode presents a fascinating journey through diverse aspects of cognition. Beyond the theoretical, Codex Mentis demystifies the methodologies driving cognitive research. Contact: pcbernabeu@gmail.com