Late Interaction Hopfield-Fenchel-Young Network for Sparse Retrieval of Language Model Hidden States

This work investigates the integration of Late Interaction and Hopfield-Fenchel-Young (HFY) Networks for associative retrieval and direct incorporation of external memories into large language models (LLMs). Unlike conventional retrieval approaches that compress sequences into single embeddings or provide retrieved documents as textual context, the proposed architecture stores complete sequences of contextualized token-level hidden states extracted from intermediate Transformer layers and allows retrieval. The proposed HFY network exposes how MaxSim can be incorporated into a HFY energy for matrix-valued memories and how hidden states from decoder models can be used as memories to provide neuronal information retrieval. Specifically, the experiments were done with hidden states extracted from Qwen3.5-4B and investigate whether retrieved associate memories can be ingested directly into the model’s internal representations to support context-grounded generation in one full language model inference. In particular, HFY-based retrieval improves the identification of relevant factual information compared with the unaugmented model and dense softmax-based memory integration in the evaluated example. ...

Date: November 11, 2026 · Estimated Reading Time: 30 min · Author: Oriol Alàs Cercós

From Words to Vectors: A Dive into Embedding Model Taxonomy

Embedding models are foundational in modern NLP, turning raw text into numerical vectors that preserve semantic significance. These representations power everything from semantic search to Retrieval-Augmented Generation or Prompt Engineering for LLM Agents. With growing demand for domain-specific applications, understanding which is the best fit for your system is more important than ever. Introduction In modern NLP, a text embedding is a vector that represents a piece of text in a mathematical space. The magic of embeddings is that they encode semantic meaning: texts with similar meaning end up with vectors that are close together. For example, an embedding model might place “How to change a tier” near “Steps to fix a flat tire” in its vector space, even though the wording is different. This property makes embedding models incredibly useful for tasks like search, clustering or recommendation, where we care about semantic similarity rather than exact keyword matches. By converting text into vectors, embedding models allow computers to measure meaning and relevance via distances in vector space. ...

Date: October 25, 2025 · Estimated Reading Time: 18 min · Author: Oriol Alàs Cercós

InnWater – AI-Augmented Water Governance Platform

AI-powered decision-support system for water governance assessment and policy optimization within the WEFE nexus.

Date: October 1, 2025 · Estimated Reading Time: 2 min · Author: Oriol Alàs Cercós

Introduction to Attention Mechanism and Transformers

Transformers have demonstrated excellent capabilities and they overcome challenges such NLP, Text-To-Image Generation or Image Completion with large datasets, great model size and enough compute. Talking about transformers nowadays is as casual as talking about CNNs, MLPs or Linear Regressions. Why not take a glance through this state-of-the-art architecture? In this post, we’ll introduce the Sequence-to-Sequence (Seq2Seq) paradigm, explore the attention mechanism, and provide a detailed, step-by-step explanation of the components that make up transformer architectures. ...

Date: February 17, 2025 · Estimated Reading Time: 10 min · Author: Oriol Alàs Cercós