arXiv Science⌕ Search

arXiv subjects

Matteo Forasassi

Publications and source records attributed to Matteo Forasassi.

5 recordsLinked to original sources

Tiny Recursive Message Passing

Message passing neural networks have shown remarkable performance in algorithmic and constraint reasoning, due to their ability to encode the structure of the task directly in the architecture. Recent work has, however, shown that better results can be achieved using recursive transformers trained with deep supervision and truncated recursion, which make extremely deep loops stable to train thanks to newly developed procedures such as adaptive halting and discrete deduction lattices. However, these models are tied to a fixed input size, and cannot generalize to inputs larger than those seen during training. In this work, we apply the same procedures to message passing networks, and show that graph structure and recursive training are complementary, leading to parameter-efficient models with strong zero-shot transfer to larger instances. First, we test our method on standard constraint satisfaction problems, where we reach $99\%$ test accuracy on Sudoku-Extreme with a model of $16$k parameters, $50\times$ fewer than the previous best; this model trains in about $10$ minutes on an H100, or in $9$ hours on a CPU. Second, we show that the graph structure allows zero-shot transfer to larger instances on mazes, N-Queens, and achieve state-of-the-art performance among neural methods on Boolean satisfiability.

cs.LG↗

Circular Predictive Coding Unlocks Effective Depth

Predictive coding networks perform credit assignment through an energy minimization process. Despite their ability to train models with arbitrary network topologies, they have mostly been used to train feedforward architectures to match the performance of backpropagation. However, they fail to do so when the models become too deep, because error signals become unstable or vanish as they travel through many layers. We address this limitation with circular networks, which get their depth directly from the energy minimization, rather than from stacking layers. Formally, we prove that convergence to an equilibrium of the energy functional of a circular predictive coding network approximates the fixed-point iteration process of a deep equilibrium model, showing that circularity alone suffices to unlock effective depth. Empirically, we show that circular models (i) outperform other predictive coding models of the same size on image classification tasks, matching the accuracy of state-of-the-art predictive coding ResNets and VGG networks despite having substantially fewer parameters; (ii) solve constraint satisfaction problems that require many steps of iterative reasoning, a task not feasible with feedforward models at all, reaching 99.3% test accuracy on Sudoku-hard via nested energy minimization loops; and (iii) scale to autoregressive language modeling by training a circular transformer on TinyStories and WikiText-103, before out of reach for predictive coding models. These results have direct implications for physical neural networks, where computational depth can be traded for recursion on a fixed-size circuit.

cs.LG↗

Prototype Transformer: Towards Language Model Architectures Interpretable by Design

While state-of-the-art language models (LMs) surpass most humans in certain domains, their reasoning remains largely opaque, reducing trust and increasing the risk of deception and hallucination. We introduce the Prototype Transformer (ProtoT), an autoregressive LM architecture that replaces the quadratic-cost self-attention module of the Transformer with a linear-cost module based on prototypes, which are learned parameter vectors. In ProtoT, prototypes create communication channels that aggregate contextual information at different time scales. We show that this structure leads prototypes to automatically capture nameable concepts, such as "woman", during training, offering a path toward interpreting model reasoning and making targeted edits to model behavior. Compared with baselines, ProtoT scales well with model and data size, is robust to input perturbations, and performs well on text generation and downstream tasks, including GLUE. These results suggest that ProtoT is a promising step toward autoregressive language models that are more interpretable by design.

cs.AI↗

Do You Understand How I Feel?: Towards Verified Empathy in Therapy Chatbots

Conversational agents are increasingly used as support tools along mental therapeutic pathways with significant societal impacts. In particular, empathy is a key non-functional requirement in therapeutic contexts, yet current chatbot development practices provide no systematic means to specify or verify it. This paper envisions a framework integrating natural language processing and formal verification to deliver empathetic therapy chatbots. A Transformer-based model extracts dialogue features, which are then translated into a Stochastic Hybrid Automaton model of dyadic therapy sessions. Empathy-related properties can then be verified through Statistical Model Checking, while strategy synthesis provides guidance for shaping agent behavior. Preliminary results show that the formal model captures therapy dynamics with good fidelity and that ad-hoc strategies improve the probability of satisfying empathy requirements.

cs.CL↗

Towards the Training of Deeper Predictive Coding Neural Networks

Predictive coding networks are neural models that perform inference through an iterative energy minimization process, whose operations are local in space and time. While effective in shallow architectures, they suffer significant performance degradation beyond five to seven layers. In this work, we show that this degradation is caused by exponentially imbalanced errors between layers during weight updates, and by predictions from the previous layers not being effective in guiding updates in deeper layers. Furthermore, when training models with skip connections, the energy propagated by the residuals reaches higher layers faster than that propagated by the main pathway, affecting test accuracy. We address the first issue by introducing a novel precision-weighted optimization of latent variables that balances error distributions during the relaxation phase, the second issue by proposing a novel weight update mechanism that reduces error accumulation in deeper layers, and the third one by using auxiliary neurons that slow down the propagation of the energy in the residual connections. Empirically, our methods achieve performance comparable to backpropagation on deep models such as ResNets, opening new possibilities for predictive coding in complex tasks.

cs.LG↗