Javier Ferrando

Javier Ferrando

Amazon (United States)
6 previous affiliations
21Machine learning papers tracked by Lacuna
Is this you?

Research Overview

Javier Ferrando focuses on the mechanistic interpretability of natural language processing systems, analyzing how transformer architectures process information and form predictions. His trajectory spans early work in neural machine translation analysis to the automated discovery of internal model circuits. Currently, his research investigates feature extraction and real-time hallucination detection in large language models using sparse autoencoders and agent-based frameworks.

Research Trajectory

Early in his career, his work involved applied machine learning for institutional digitization. In Improving Accuracy and Speeding Up Document Image Classification Through Parallel Systems, he and his collaborators demonstrated that lightweight EfficientNet models could outperform heavier convolutional networks on document classification tasks. This research highlighted transfer learning capabilities on specialized datasets and introduced an ensemble pipeline that boosted performance by combining image predictions with text features extracted via OCR and BERT.

His focus subsequently shifted toward understanding the internal mechanisms of transformer models, particularly in the domain of neural machine translation (NMT). In Attention Weights in Transformer NMT Fail Aligning Words Between Sequences but Largely Explain Model Predictions, he investigated the role of attention mechanisms, finding that while attention weights do not reliably align source and target words, they remain highly predictive of the model's ultimate outputs. This inquiry into internal representations expanded in Measuring the Mixing of Contextual Information in the Transformer and Towards Opening the Black Box of Neural Machine Translation: Source and Target Interpretations of the Transformer, where he analyzed how contextual information is integrated across network layers during translation tasks.

To better isolate how specific inputs influence outputs, he contributed to the research direction of Explaining Model Decisions via Contrastive Feature Attribution. This is exemplified by Explaining How Transformers Use Context to Build Predictions, which detailed the mechanisms by which transformers leverage surrounding context to shape their generations. Concurrently, he explored evaluation methodologies in Automating Behavioral Testing in Machine Translation, developing automated pipelines to assess the robustness and behavior of translation systems.

As language models scaled, his research transitioned deeply into mechanistic interpretability, aiming to reverse-engineer specific network behaviors. In Neurons in Large Language Models: Dead, N-gram, Positional, he examined the feed-forward networks of the OPT model family. This work categorized neurons by their specialized functions—such as tracking token positions or detecting specific n-grams—while also analyzing the phenomenon of "dead" parameters. To map these internal processes more systematically, he introduced a top-down attribution method in Information Flow Routes: Automatically Interpreting Language Models at Scale. This approach constructs graphs of token representations and operations to uncover computational circuits efficiently in a single forward pass, bypassing the need for manual activation patching or carefully designed prediction templates.

Addressing the broader area of Mechanistic Circuits and the Challenge of Model Scale, he investigated the universality of these internal structures across different linguistic settings. In On the Similarity of Circuits across Languages: a Case Study on the Subject-verb Agreement Task, he demonstrated that the Gemma 2B model utilizes highly consistent circuits for subject-verb agreement in both English and Spanish. The study revealed that these circuits are primarily driven by specific attention heads writing a grammatical number signal to the residual stream, which is subsequently read by a small set of neurons in the final layers. Recognizing the rapid expansion of this field, he also co-authored A primer on the Inner Workings of Transformer-based Language Models, providing a technical synthesis of current techniques for analyzing generative decoder-only architectures and mapping connections across active research approaches.

Current Directions

The most recent papers in the evidence address the practical application of mechanistic interpretability to model reliability, alongside efforts to automate the discovery of internal features. A major focus is the detection and mitigation of hallucinations, intersecting with the research area of Decomposing Neural Representations with Sparse Autoencoders. In Do I Know This Entity? Knowledge Awareness and Hallucinations in Language Models, recent work utilizes sparse autoencoders to isolate "knowledge awareness" features—internal directions indicating whether a model possesses factual knowledge about a specific entity. By manipulating these features, researchers demonstrated the ability to causally steer models to either hallucinate or refuse to answer questions.

Building on this understanding of internal states, Real-Time Detection of Hallucinated Entities in Long-Form Generation introduces a scalable method for identifying entity-level errors. By training lightweight probes on internal activations, this approach achieves high detection performance and enables streaming interventions to halt hallucinations during generation in models up to 70 billion parameters.

Additionally, his current research explores the automation of the interpretability process itself. Automated Interpretability and Feature Discovery in Language Models with Agents presents InterpAgent, a multi-agent framework that treats feature discovery as an iterative experimental loop. This direction moves beyond manual analysis and simple classification, deploying agents to systematically investigate and document the internal mechanisms of language models.

Profile updated

See something wrong? Report a mistake