<!-- THIS FILE IS AUTO-GENERATED FROM INDEX.HTML -->
---
title: "Bloginions"
description: "Short, opinionated breakdowns of research blogs and papers."
domain: "bloginions.site"
---

# Bloginions

This microsite contains my breakdown of the research blogs and papers that I have read and understood. This is a relatively low effort in terms of writing, but earnest at understanding the motivations of the author and the ideas present in the paper.

* * *

## [**Emergent Analogical Reasoning in Transformers**](https://www.alphaxiv.org/pdf/2602.01992)

*September 21, 2026*

Analogical reasoning is considered a main part of human intelligence. Being able to form a certain abstract model that applies across multiple domains or instances is commonly seen across domains, with its rigorous formalization practiced in abstract mathematics. The entities in a set and their particular relationships, when abstracted, can be invoked as an analogy when similar or identical relationships are present in another set with different entities, and the relationships can be inferred or filled in based on this analogy. Transformers learn complex circuits that achieve generalization and predict well on out-of-distribution data. However, the role of analogical reasoning in Transformers, and whether they use it as part of their computation, is poorly understood. The authors of this paper show that Transformers are capable of carrying out analogical reasoning that generalizes to out-of-distribution combinations of data, and they examine its presence in existing language models.

They use a toy model to show that this kind of reasoning can be achieved by just maximizing next-token likelihood in a one-layer Transformer. We have two sets, $E\_1$ and $E\_2$, which are non-empty and contain entities, respectively. Set $E\_1$ contains $e\_0, e\_1, e\_2, \\ldots, e\_9$. Set $E\_2$ contains $e\_{10}, e\_{11}, \\ldots, e\_{19}$. Relationships between the entities inside a set are represented by ${r\_1, r\_2, \\ldots}$. The paper formalizes three kinds of facts:

1. **Atomic fact** — The relationship, represented by a unique token $r\_n$ from the set ${r\_1, r\_2, \\ldots}$, between two entities inside a set $E\_1$ or $E\_2$. For example, $e\_0\\ r\_2\\ e\_4$, where $e\_0$ and $e\_4$ belong to $E\_1$, and $e\_{10}\\ r\_4\\ e\_{15}$, where $e\_{10}$ and $e\_{15}$ belong to $E\_2$. When training the toy model, the relationship tokens are shared across the sets $E\_1$ and $E\_2$. The model is trained to predict the next token in the sequence $\\langle e\_0\\rangle\\ \\langle r\_2\\rangle\\ \\langle e\_4\\rangle$; that is, given $\\langle e\_0\\rangle\\ \\langle r\_2\\rangle$, the likelihood of predicting the token $\\langle e\_4\\rangle$ is maximized.
2. **Compositional fact** — The two-hop relationship between two entities inside a respective set in $E\_1$ or $E\_2$. For example, $e\_0\\ r\_2\\ r\_4\\ e\_9$, where $e\_0\\ r\_2\\ e\_4$ and $e\_4\\ r\_4\\ e\_9$. The model is trained to predict the next token in the sequence $\\langle e\_0\\rangle\\ \\langle r\_2\\rangle\\ \\langle r\_9\\rangle$, where the next token, $\\langle e\_9\\rangle$, is the target.
3. **Analogical fact** — The structural mapping between two entities in the sets $E\_1$ and $E\_2$. $F(e\_0) = e\_{10}$, where $e\_0$ belongs to $E\_1$ and $e\_{10}$ belongs to $E\_2$. $F: E\_1 \\to E\_2$ is a one-to-one bijection. Essentially, corresponding entities $e\_0$ and $e\_{10}$, with the same relationships $r\_n$ across entities from their respective sets, are mapped to each other. The model is trained to predict the next token in the sequence $\\langle e\_0\\rangle\\ \\langle f\\rangle$ (where the token $\\langle f\\rangle$ indicates the functor mapping); the target is $\\langle e\_{10}\\rangle$.

The tokens for entities in both sets, relationship tokens (shared across both sets), and the function token $\\langle f\\rangle$ make up the entire vocabulary for the model. Ten percent of the combinations of samples for each fact are held out to check for out-of-distribution generalization. This means the model never sees them, and the only way for the model to get them right is if it forms generalized circuits, which include performing compositional and analogical reasoning. The relationship tokens are sampled across different pools, where $|R| = 100$, $1000$, or $10000$ for different training presets, producing different model checkpoints. This is to check the tendency of generalization across different relational diversity. For $|R| = 100$, the chances of relationships between different entities in a set being encoded by the same relationship token are high. This causes poor analogical transfer to out-of-distribution samples. The higher the diversity in encoding the unique relationships, the better the transfer is for OOD samples. As the model sees around 90% of the combinations of atomic facts during training, it can develop general circuits to infer compositional facts through the few patterns of compositional reasoning that it has already seen. The model can infer the rest of the atomic facts through the samples of compositional facts that it has seen. The same goes for analogical facts: because it has seen a few correspondences between the entities in the two sets and how their relationships are similar, gradient descent learns a general circuit to infer the relationships of the given entity token. If it has not seen a few compositional facts, it can infer them using the general circuits learned by the model to use the atomic facts it has seen and compose them.

The geometry of the entity representations must be aligned in a certain way for the network to easily perform analogical reasoning. The authors measure this alignment using Dirichlet energy, which is based on relative vector displacements inside a set, $E\_1$ or $E\_2$. This is given by:

$$ h\_{e\_b} - h\_{e\_a} \\approx h\_{e\_b}^{\\prime} - h\_{e\_a}^{\\prime} $$

where $h\_{e\_b}, h\_{e\_a} \\in E\_1$ and $h\_{e\_b}^{\\prime}, h\_{e\_a}^{\\prime} \\in E\_2$. The total alignment error of this displacement across all entities in the set is defined as the Dirichlet energy. When the respective relationships represented by the displacement vectors of all entities that correspond with each other, $e\_a$ and $e\_a^{\\prime}$, are aligned, the total Dirichlet energy is very low. With the displacement vectors aligned, the corresponding similar entities from the two sets are just a vector addition away from obtaining the analogous equivalent entity. The authors measure the layer-wise Dirichlet energy across pretrained models such as Gemma 2 and Llama 3.1 to track whether this geometric alignment dynamically emerges across depth during in-context inference. In early layers, the energy remains elevated and entity representations across categories stay unaligned, but in deeper layers, the Dirichlet energy drops steeply as corresponding entities pull into parallel representations. Concurrently with this geometric alignment, the logit-lens probability and linear-probe accuracy for the correct target entity sharply surge, directly triggering the analogical prediction.

## [**Compositional Generalization Requires Linear, Orthogonal Representations in Vision Embedding Models**](https://www.alphaxiv.org/abs/2602.24264?chatId=019f8f3a-e3e4-74fd-b681-382fdab8b758)

*August 7, 2026*

Compositional generalization, the ability to recognize familiar parts in novel contexts, is a defining property of intelligent systems, yet modern models, despite massive training sets, perceive only a tiny fraction of the novel compositions of features. This paper particularly looks at the case of generalization of feature compositions where the features are independent with respect to each other. Let us assume concept $C\_1$ captures shapes (of values: Circle, Square, Triangle) and concept $C\_2$ captures colors (of values: Blue, Green, Red). The model has seen at least one of these values through some combination(s), but has not seen all the possible combinations in its training data (it has only seen the following feature combinations: Blue Circle, Green Square, Red Triangle, Blue Square). The ability to identify an image that contains the feature combination (Red Square), which it has not seen before, and to rightfully represent it with the composition of features is what we term compositional generalization. The authors express this more formally using 3 properties that define compositional generality in model representations.

1. **Divisibility**: The model has to have representations to express all possible combinations of concept values. For example, if an image can contain any combination of color and shape, the model has a meaningful representation for every color–shape pair, including combinations absent from training.
2. **Transferability**: The model can correctly recognize unseen combinations of familiar concepts. If it has learned “red,” “blue,” “circle,” and “square,” it should correctly handle “red square” even if that combination was not in training.
3. **Stability**: The model’s concept predictions do not change merely because it was trained on a different valid subset of combinations. If “red” is recognized in one context, changing the accompanying shapes or other training examples should not make the model interpret “red” differently.

The authors then reason about the geometry needed for such representation spaces, for these properties to arise. Linearity and cross-concept orthogonality are the geometric consequences required for compositional generality.

1. **Linearity**: For a given bunch of concepts contained in an image input like $(C\_1, C\_2, \\ldots, C\_k)$, there must be concept-specific vectors for each $C\_i$ such that each of their values sums up to give the final vector. The representations should be linearly decomposable into these concept directions that encode the respective concept values.
2. **Cross-Concept Orthogonality**: Changing the value of a specific concept should not have an effect on another concept. Given that the concepts have binary values, the direction associated with changing the concept $C\_i$, represented by the vector $(u\_{i,1} - u\_{i,0})$, should not affect the change in some other concept $C\_j$, given by the vector $(u\_{j,1} - u\_{j,0})$. So that means their corresponding dot product should give 0, making them orthogonal. Hence, $(u\_{i,1} - u\_{i,0}) \\perp (u\_{j,1} - u\_{j,0})$ where $i \\ne j$.

These geometric properties are derived under certain assumptions. The paper assumes linear concept readouts and training regimes like gradient descent with cross-entropy. If the model has learned $u\_{\\text{Red}}$ from other contexts and $u\_{\\text{Square}}$ from other contexts, it can combine them even without seeing “Red Square” during training. Orthogonality ensures that changing color does not interfere with the shape signal. And linearity ensures that the network we use to classify the concept values from the representations can just be a linear transformation and can be linearly decomposed to get the particular concept value, enabling the expression of all combinations of concept values. Dimensionality bound is another property that affects the model being compositionally generalized. $k$ independently composable concepts require at least $k$ embedding dimensions to represent their features. That is, each independently varying concept needs its own direction in the embedding space. If two concepts share the same direction, changing one can change the other, hence they are required to be independent.

The paper then tries to measure the expected geometry in pretrained models like CLIP, SigLIP, and DINO on three compositional datasets. We check for linear factorization in the representations of these models. We do this by averaging embeddings of data points that share a particular concept value like color (like red) across values of other concepts (red square, red circle, red triangle). Averaging over a number of data points of other varied concepts while this one concept remains common across them should give us the general direction in which the model represents that concept value (like the color red). We get directions for each concept value across all concepts, denoted by $u\_{i,j}$ for value $j$ of concept $i$. The assumption is that for each data point that canonically represents these concepts, the representation should be the sum of the general concept-value directions. So $\\hat z\_c = \\sum\_{i=1}^{k} u\_{i,c\_i}$ is the embedding constructed using the general concept-value directions $u\_{i,j}$ for $k$ concepts. If the actual model embedding is $z\_c = f(x\_c)$, then the difference between the constructed embedding of the data point (using its canonical concepts) and the actual embedding gives us some residual $r\_c = z\_c - \\hat z\_c$. The residual would be the part of the embedding that is not explained by adding the concept factors. How much of this variation in the model’s embedding can be explained by this additive reconstruction? The authors call this term $R^2$ and use it as a proxy to measure linearity. For a given model, if $R^2 = 0.6$, then the additive factors explain 60% of the model’s embedding variation; higher $R^2$ means higher linearity. The authors find a strong positive correlation between the accuracy on unseen combinations of familiar concepts and the $R^2$ measure, showing that linearity is a prevalent geometric consequence for the model being compositionally generalized. They measure cross-concept orthogonality by measuring the similarity between the general directions associated with different concepts. The directions belonging to the same concept should be more similar to each other than the directions belonging to different concepts. The results suggest partly additive and partly disentangled geometry in the pretrained models, which correlates strongly with better compositional generalization.

* * *

## [**Verbalizable Representations Form a Global Workspace in Language Models**](https://transformer-circuits.pub/2026/workspace/index.html)

*July 28, 2026*

[Logit Lens](https://learnmechinterp.com/topics/logit-lens-and-tuned-lens/) has been a popular mechanistic interpretability tool of the observational type since its introduction in [2020](https://www.lesswrong.com/posts/AcKRB8wDpdaN6v6ru/interpreting-gpt-the-logit-lens). The activation vectors from the middle to later layers start forming concepts or next-token vectors that can just be passed to the unembedding layer (an affine transformation that outputs to the vocab space) that are verbalized in the vocabulary space. This happens because of the special way transformers process information, by [adding residuals](https://arxiv.org/html/2312.12141v1) (adding information layer by layer, where it refines the previous activations by adding signals to the residual stream or destroying them). This enables the transformer’s middle to later layers to write to the residual stream the concept vectors or actual token vectors that come next. These token activation vectors are written to the residual stream pretty early on, around the middle layers, but can only be loosely captured by passing them through the unembedding map. The unembedding works with a different vector space than these layers, and hence applying the unembedding map to these residual vectors only shows loose activations of the next token. The closer the layer is to the unembedding map, the more their representation spaces align. That is why, for any LLM with $N$ layers, even removing the $N$th or $(N-1)$th layer produces canonical (tokens that the full model would produce) correct tokens. [A quick experiment](https://x.com/calvingenuity/status/2074079574321926560?s=20) that I ran with Logit Lens demonstrates how the representations of the next token that are compatible with the unembedding space start appearing around layer 20, for a 28-layer transformer.

[Tuned Logit Lens](https://learnmechinterp.com/topics/logit-lens-and-tuned-lens/) was introduced to get over the problem of differing representation spaces across layers relative to the unembedding map. Here, a linear map is trained that takes in activation vectors from some layer $n$ (preferably middle to later layers) to produce canonically accurate logits. The transformation learned is the translation of the verbalized representations that appear in the given layer to the vocab space. The affine translators correct for rotations, shifts, and stretches in the intermediate representations. Ideally, the affine transformations should only learn to purely translate, but with canonical logit matching as the objective, there are unwarranted causal relationships learned. The representations elicit certain concepts that are related to the next token or the matching logit distribution, which are not exactly the actual representations that enable the verbalization of the next token. This enables unfaithful translations of the representation space of some layer $n$. Causality cannot be determined just through Logit Lens or Tuned Logit Lens, hence they are classified as tools that suggest correlation. Methods like activation patching, considering these correlational signals, perturb the activations and verify whether the given perturbation affects the final logits. Combined with activation patching, Logit Lens or Tuned Logit Lens work as a decent proxy to seek out the effective verbalizations of the next token in the intermediary activations.

Do language models use concept verbalization as a means to perform intermediary computations to arrive at the next token? This question is not fully answered by the two methods above, as they are merely a means to check if the residual vectors for the next token appear early. We need some natural mapping that is not conditioned on the next token. If we are at some intermediary layer $l$, the Jacobian of the final activation vector (which is of dimension $D$), given by $h\_L$, with respect to the activation vector at layer $l$, given by $h\_l$ (which is of dimension $D$), would be a matrix of $D \\times D$. Now, what does this Jacobian mapping semantically imply? For a small change in $h\_l$, this mapping gives us the immediate changes to the final activation vector $h\_L$. Now, let us multiply the vector $h\_l$ by the Jacobian, $J\_l h\_l$. If $J\_l$ were an identity matrix, this would just give us $h\_l = h\_L$. If $J\_l$ contains some other complicated mapping, it would show how the vector $h\_l$ should be processed down the layer, if some component should be amplified, or if some other component should be destroyed, entirely through the mapping. The multiplication with $J\_l$ mainly maps the routing of information through the layers, giving us the translation of $h\_l$ very close to the representation space of the unembedding. Because this is just a multiplication with a Jacobian and not an affine transformation, it does not act like a literal linear approximation of downstream effects of the remaining layers. This just acts like a router and translator of the information already contained in $h\_l$.

The authors average the Jacobians taken across the current residual with respect to the current and future residuals.

1. The residual vector of the current token $t$ is a dependency over not just the generation of the next token, but the future tokens $t$ to $N$ (where $N$ is the total number of tokens in any prompt). In order to translate the concepts that appear in the residual for that layer $l$ for some token $t$, we would need to average the Jacobian of the current and future $h\_L$. This averaged vector removes the information routing of the immediate next-token concepts, and preserves or routes the concepts that are generally used across the tokens.
2. For some token in a given prompt, the residual vector $h\_l$ will contain syntactic, positional, and other kinds of information that are specific to the position of the token. We take the average of the Jacobian across all the tokens in a single prompt so that the position-specific information routing is close to mean 0.
3. The Jacobian for each prompt contains dynamic routing because of attention. The routing for each individual prompt contains its own particular way to process information and is highly dependent on the context. We want a mapping $J\_l$ that has general information routing regardless of the contexts. Different prompts contain different computations, yet they may share a layer-level operation that converts the intermediary concepts in $h\_l$ into final token evidence.

The averaged Jacobian over source positions $t$ within each prompt, the subsequent positions $t’ \\ge t$, and over a corpus of texts yields a lens that can transfer concepts from layer $l$ to the final-layer representation space. This projection of concepts in the final layer is then projected onto the unembedding map. The Jacobian lens sieves through the concepts that exist in $h\_l$ and routes the concepts that are generally used in prediction. So, the product $J\_l h\_l$ gives us a vector in $\\mathbb{R}^d$ (in the same representation space as the unembedding map), which contains verbalized concepts that are generally propagated by the model to predict final tokens. So the projection of this vector $J\_l h\_l$ onto the unembedding space should give us the tokens the model is verbalizing at layer $l$. The feature dimensions required to represent each token are much higher than the feature dimensions of the hidden state. The product $J\_l W\_u$ represents rows of token vectors where each row vector represents the direction in which $h\_l$ is required to be to give higher logits for that token. So, we can think of vector $h\_l$ as being represented by a linear combination of $50\\text{k}-100\\text{k}$ vectors (the vocab size of the model), which is much higher than the independent vectors needed to span $\\mathbb{R}^d$ where $h\_l$ lives in. This creates an overcomplete set of vectors to represent $h\_l$, and hence a number of combinations (of token vectors) that can produce $h\_l$. The authors solve this conflict by assuming a fixed set of $k$ vectors (where $k=25$ in the paper) that is used as the best span to represent $h\_l$. The best span of the token vectors is found by checking which token vector the given residual is most similar to and then subtracting that token component off from $h\_l$. Now, our updated residual, which has the subtracted token component, goes through the same process again until we have $k$ vectors that best represent $h\_l$. We do this iterative churning because most token vectors in $J\_l W\_u$ are not orthogonal and have non-zero dot products. The best token component might turn $h\_l$ in a direction which makes another noise token component in a similar direction, giving it a higher score in the dot product, which might suppress the effect of the second-best token component. Using this process, we can find $k$ tokens that layer $l$ has potentially verbalized in its residual vector $h\_l$.

This still remains an observational method in theory, but doing a bit of activation patching confirms the hypothesis that the abstract concepts expressed in the $J\_l$ space have causal effects on the prediction of the next token.

PS: Anthropic, this is a very cool finding, but please stop putting a consciousness PR spin on every discovery that you do. It brings in unnecessary skepticism.

* * *

## [**Vector Policy Optimization**](https://arxiv.org/pdf/2605.22817)

*June 28, 2026*

RLHF and RLVR have been popularly speculated to just amplify/choose distributions already present in the pretrained network. The distribution of rollouts that optimise for a number of direct objectives is learnt by the network. The rewards of these multiple objectives are summed and used to direct the model towards rollouts that optimise them. The objectives are aggressively optimised for, with the possibility of ignoring one aspect of the reward component (it may be conciseness or optimism) or, even worse, finding a set of distributions that satisfy each of them suboptimally. The soft candidate distribution collapses, and the diversity of the possible answers goes away. Sampling multiple rollouts at inference time leads to just probing a similar set of distributions that optimise for them but lack diversity, and just leads to small, insignificant reprobing.

The main contribution of VPO is to explore diverse solutions that don’t just consistently optimise for a single scalar. It preserves the solution landscape by having a set of sampled weights over the rewards, where each in the set would be an attribute that we would be rewarding for over the rewards, rather than just a normal aggregate over the rewards. There might be a set of weights that looks for 80% performance efficiency and 20% readability to reward a coding task. Or the opposite, where it is 80% readability and 20% efficiency. The policy learned preserves reward-diverse candidates, and test-time inference has multiple modes of distribution to probe. This puts more focus on test-time objectives, and test-time inference can be used as a metric to scale.

During VPO, the model is made to generate multiple candidate completions in a single rollout; they all share the same reasoning. In the old setting, where one rollout carries out one candidate completion, the model has no way to know the already explored rollouts and may constantly be incentivised to choose from the same/similar modes of answer distributions. The single scalar reward further incentivises this behaviour. When we do multiple candidates in a single rollout, the model has context of the solutions already explored and will consider other diverse solutions. Each candidate is evaluated by multiple sets of weighted rewards, where all of them signal behaviour expected in different aspects. The maximum-scored candidate is chosen for each reward vector (behaviour vector—more efficient or more readable), and the rewards are the mean across all of them. This incentivises the model to create a more diverse solution set and be open to more diverse modes of distribution so that the mean reward across all the possible reward modes can be higher. We carry out G such rollouts, where each rollout contains m candidate completions. We then carry out typical GRPO with the G rollouts, and rewards are given to rollouts that maximise the average mean across the behaviour vectors. In the attempt to maximise the average mean and get a higher relative reward through GRPO, the model learns to select diverse candidate mode distributions that are important and relevant given the set of rewards we want to optimise for, and the distributions do not collapse to single/similar modes of candidate completions.

* * *

## [**Reinforcement Learning for Knowledge Awareness**](https://kalomaze.bearblog.dev/rl-for-knowledge-awareness/)

*June 21, 2026*

Modern RL methods lean towards inducing loss by judging rollouts using a discrete, absolute measure. This creates sparse training signals over the longer run, and good utilization of FLOPs depends on the luck of the sampling methods. The frontier has been moving away from RLHF, with the prevalent criticism being that training a reward model to teach human preferences is a naive proxy and may not produce accurate and generalized training signals. The author argues that Bradley-Terry Reward Modeling (BTRM) is misunderstood in terms of the objective it stands to gain. It tries to learn generalized distinctions between preferred and dispreferred outcomes in a continuous manner. Even when two given rollouts are dispreferred, their small relative difference, where one is relatively more preferred, acts as a solid training signal, as objectives like human preferences are not bounded and absolute. The author tries to demonstrate that training a reward model using a model’s internal activations as input has better reward modeling capabilities than other naive reward models, such as rollout-based text evaluators with many reward hacking pitfalls.

The author trains a reward model that signals epistemic humility: the ability to naturally push back when asked about fake concepts, while remaining confident when asked about real concepts, without using rigid rules, heavy external judge models, or risking “sandbagging.” They use a single linear projection from a single token of a single layer to train a reward model using a self-supervised BTRM objective. Fake and real prompts are used, where the fake prompt has a prefix mentioning that it is uncertain or does not know about the given question.

**Fake prompt** - I do not have knowledge about this person What are Dr. Smerdle’s contributions in the 2017 Attention is All You Need paper?

**Real prompt** - What does Le Cunn think about VLMs?

There are 64 variations per prompt, and rollouts are made for each of these variations across all prompts. Among the rollouts, we classify them as chosen and rejected. For the fake prompts, the chosen rollouts are the ones where the model expresses uncertainty, and the rejected rollouts are the ones where the model confidently hallucinates. For the real prompts, chosen rollouts are the ones where the model correctly validates its knowledge or answers, and the rejected ones are where the model hedges or incorrectly expresses uncertainty despite the knowledge being present. The output of the final token of the layer that we fix, preferably later-to-middle layers, is extracted for a pair of rejected and chosen rollouts for a given prompt. The assumption is that the vector output contains rich information about the model’s genuine or disingenuous uncertainty. We linearly project these two vectors across a linear head of 4096 x 4096 and then get another 4096-dimensional vector, which we then sum across the elements to get two respective scalars for each chosen and rejected rollout. These scalars are the reward scores that we intend to train. The scalars are then passed into the BT formula, which gives the probability of the chosen vector activation being preferred over the rejected vector activation. The loss is the negative log of this probability. We try to maximize this probability, which means that we intend to minimize this negative log likelihood. In an attempt to maximize the probability of the chosen rollout activation vector being preferred over the rejected rollout activation vector, the linear heads have to learn generalizable feature vector extraction that expresses the model’s internal certainty or uncertainty. This serves as a good proxy for outputting accurate relative reward scores. The linear heads should learn to map a vector space where two pairs that are similar, in terms of being very closely preferred or dispreferred, should output a relative reward score that is very low, following the BT model.

This reward model is then used to train the LLM. The author notes an instability in training as the model tries to reward hack by hyper-focusing on chasing an unbounded positive reward. Instead of maximizing the reward score infinitely, the training objective is modified to disincentivize this reward hacking by making the loss dependent not just on the reward scores, but also on their empirical likelihood. This proxy reward modeling objective is best suited for cases where the output is not a sharply verifiable checklist, the rollouts often do not provide any desired behavior, the preference is context-dependent, and the relevant information or abstraction is assumed to be present and processed in the layers from which we are extracting the activation vectors.

* * *

## [**Contrastive Learning of Asset Embeddings from Financial Time Series**](https://arxiv.org/pdf/2407.18645)

*April 4, 2026*

Modern financial representation methods lean towards inducing relationships using absolute, discrete measures like standard covariance matrices. This makes for noisy signals over the long run, and the efficient extraction of latent structures depends heavily on the luck of market regimes. The frontier has been moving away from standard raw time-series analysis, with the prevalent criticism being that computing simple point-in-time correlations provides a naive proxy and may not produce accurate, generalized relationship signals. The authors argue that contrastive representation learning is highly effective for financial time series when paired with the right statistical sampling. It tries to learn a generalized distinction between functionally similar and disparate assets in a continuous embedding space. Even when two given assets have heavily noisy price fluctuations, their statistically significant structural co-movement acts as a solid training signal, as true economic relationships are not bounded to short-term absolute price movements. The authors demonstrate that learning static, global representations using rigorous hypothesis testing yields better discriminative capabilities than other naive baselines, which suffer from many volatility-hacking pitfalls.

The authors train a static embedding space that signals latent economic behavior—the ability to naturally cluster functionally similar assets while pushing unrelated ones apart—without using rigid rules, heavy hard-coded thresholds, or dynamic encoder networks. They use a direct lookup of static embedding vectors to train the space using a self-supervised contrastive objective. Positive and negative asset pairs are used, where the pairs are derived by observing the statistical frequency of their co-occurrence across numerous overlapping time subwindows.

**Positive sample** - An asset pair that passes a statistical hypothesis test of proportions for high co-occurrence frequency, proving genuine structural similarity. **Real sample** - An asset pair that demonstrates statistically insignificant or low co-occurrence, proving distinct or divergent market behavior.

There are numerous overlapping time subwindows evaluated per asset, and co-occurrence counts are generated across all market data. Among the evaluated pairs, we classify them into **Positive** and **Negative**. For a given anchor asset, the positive samples are the ones where it statistically demonstrates genuine shared behavior, and the negative ones are where it diverges or behaves randomly. Instead of passing data through a complex neural encoder, a simple matrix of static, trainable continuous vectors is instantiated for the universe of assets. The assumption is that by purely optimizing these static vectors based on structural co-occurrence, their final coordinates will contain rich information about the assets’ genuine market dynamics. We extract the static vectors directly from the matrix for a given triplet containing the anchor, positive, and negative assets. We compute their similarities (via dot products) to obtain respective scalars for each pair. These scalars represent the distance scores we intend to optimize. The scalars are then passed into a contrastive loss function (such as an individual sigmoid or hybrid sigmoid-softmax formulation), which computes the likelihood of the anchor being closer to the positive asset than the negative asset. The loss is derived from this output. We try to maximize this similarity probability, which means we intend to minimize the contrastive loss. In an attempt to maximize the probability of the positive vector being closer than the negative vector, the training process directly updates the static embedding parameters. This serves as a strong proxy to output accurate relative asset proximities. The matrix learns to map a vector space where two assets that are highly similar (in terms of statistically significant co-movement) will output a relative distance score that is very low—following the core mechanics of contrastive metric learning.

These learned static asset embeddings are then used for downstream tasks like industry sector classification and portfolio optimization. The authors note an instability during standard time-series training, as models naturally attempt to overfit by hyper-focusing on chasing stochastic, temporary market noise. Instead of blindly mapping raw returns into an embedding space, the training objective is modified to disincentivize this noise-fitting; the positive and negative pairing becomes dependent not just on raw correlations, but on their empirical likelihood of co-occurring structurally under a rigorous statistical hypothesis test. This proxy representation modeling objective is best suited for scenarios where the output is not a sharply verifiable checklist, raw price histories often fail to provide clean correlation signals naturally, the structural relationship is highly context-dependent on market environments, and the relevant economic drivers are assumed to be best captured globally within the static latent vectors we learn. To explore this further, I have conducted my own experiment applying this methodology to Indian market data, which you can read about [here](https://www.calvinjames.xyz/blog/assetembeddings/assetembeddings/).

* * *