Language models
I study how language models encode knowledge and how we can inspect their representations. My recent work also looks at planning, reasoning, and the evaluation of AI systems.
Related publications ↗Personal homepage
Physicist & AI research scientist
I work on machine learning and statistical physics, with a background in computational neuroscience. I’m interested in how complex systems organize information, from networks of brain regions to the internal representations of language models.
I’m currently a Senior AI Research Scientist at Ipazia and a core maintainer of skfolio, a Python library for portfolio optimization. This is where I collect my papers, software, and research notes.
My background
Ph.D. research and postdoctoral work at IIT
Much of my early research took place at the Istituto Italiano di Tecnologia in Rovereto. During my Ph.D. in Applied Physics at the University of Verona, and later as a postdoctoral researcher at IIT, I studied the organization of brain functional connectivity networks.
I worked on community detection and its resolution limits, then on spectral entropy as a way to study network structure at different scales. That work brought together neuroscience, graph theory, and statistical mechanics. It still informs how I approach questions about representations and information in AI.
Research
I study how language models encode knowledge and how we can inspect their representations. My recent work also looks at planning, reasoning, and the evaluation of AI systems.
Related publications ↗Entropy and statistical mechanics provide much of the language I use to think about complex systems. I work on network models, spectral methods, and information theory.
Research notes ↗Through skfolio, I work on optimization and risk modeling in Python. I’m particularly interested in how portfolio methods are estimated, compared, and tested on data they have not seen.
skfolio and related projects ↗Writing software has been part of my research since my work on stereoscopic tracking and computational psychophysics. I maintain tools that other researchers can inspect and reuse.
Software archive ↗Papers
Transactions on Machine Learning Research
Although the capabilities of large language models have been increasingly tested on complex reasoning tasks, their long-horizon planning abilities have not yet been extensively investigated. In this work, we provide a systematic assessment of the planning and long-horizon reasoning capabilities of state-of-the-art Large Reasoning Models (LRMs). We propose a novel benchmark based on Sokoban puzzles, intentionally simplified to isolate long-horizon planning from state persistence. Our findings reveal a consistent degradation in planning performance when more than 25 moves are required to reach the solution, suggesting a fundamental constraint on forward planning capacity. We show that equipping LRMs with Planning Domain Definition Language (PDDL) parsing, validation, and solving tools allows for modest improvements, suggesting inherent architectural limitations which might not be overcome by test-time scaling approaches alone.
Neuroimage
Functional connectivity is derived from inter-regional correlations in spontaneous fluctuations of brain activity, and can be represented in terms of complete graphs with continuous (real-valued) edges. The structure of functional connectivity networks is strongly affected by signal processing procedures to remove the effects of motion, physiological noise and other sources of experimental error. However, in the absence of an established ground truth, it is difficult to determine the optimal procedure, and no consensus has been reached on the most effective approach to remove nuisance signals without unduly affecting the network intrinsic structural features. Here, we use a novel information-theoretic approach, based on von Neumann entropy, which provides a measure of information encoded in the networks at different scales. We also define a measure of distance between networks, based on information divergence, and optimal null models appropriate for the description of functional connectivity networks, to test for the presence of nontrivial structural patterns that are not the result of simple local constraints. This formalism enables a scale-resolved analysis of the distance between a functional connectivity network and its maximally random counterpart, thus providing a means to assess the effects of noise and image processing on network structure. We apply this novel approach to address a few open questions in the analysis of brain functional connectivity networks. Specifically, we demonstrate a strongly beneficial effect of network sparsification by removal of the weakest links, and the existence of an optimal threshold that maximizes the ability to extract information on large-scale network structures. Additionally, we investigate the effects of different degrees of motion at different scales, and compare the most popular processing pipelines designed to mitigate its deleterious effect on functional connectivity networks. We show that network sparsification, in combination with motion correction algorithms, dramatically improves detection of large scale network structure.
Scientific Reports
The modular organization of brain networks has been widely investigated using graph theoretical approaches. Recently, it has been demonstrated that graph partitioning methods based on the maximization of global fitness functions, like Newman’s Modularity, suffer from a resolution limit, as they fail to detect modules that are smaller than a scale determined by the size of the entire network. Here we explore the effects of this limitation on the study of brain connectivity networks. We demonstrate that the resolution limit prevents detection of important details of the brain modular structure, thus hampering the ability to appreciate differences between networks and to assess the topological roles of nodes. We show that Surprise, a recently proposed fitness function based on probability theory, does not suffer from these limitations. Surprise maximization in brain co-activation and functional connectivity resting state networks reveals the presence of a rich structure of heterogeneously distributed modules, and differences in networks’ partitions that are undetectable by resolution-limited methods. Moreover, Surprise leads to a more accurate identification of the network’s connector hubs, the elements that integrate the brain modules into a cohesive structure.
Writing
Notes on using Jev and other decision models as branching oracles: Sudoku, A* tie-breaking, and the experiments needed to tell useful guidance from expe...
Read →A maintainer-facing cut: rebase universal_portfolio onto v1.0.0, the in-list and out-list, tests, gallery, naming, and the follow-up issues that must no...
Read →How the universal_portfolio branch implements COMID, EG/OGD, follow-the-loser PA, BCRP as a MeanRisk comparator, and which pieces belong in a first skfo...
Read →Teaching / Proposed programme
I’m putting together a programme of individual lessons for people getting started with AI or portfolio optimization. The idea is to work through the concepts together, then apply them in small Python experiments, with the pace adjusted to your background.
The proposed plans include optional preparation for people new to programming, followed by a choice of two learning routes.
See the lesson plans →For research questions, software discussions, or an enquiry about individual lessons, you can contact me on LinkedIn:
Carlo Nicolini on LinkedIn ↗