# Tracing Contextual Token Representations Through Transformer Layers

DevFeed: [Tracing Contextual Token Representations Through Transformer Layers](<https://devfeed.tech/articles/tracing-contextual-token-representations-through-transformer-layers-100885.md>)

Original publisher: [Read original article](<https://hackernoon.com/tracing-contextual-token-representations-through-transformer-layers?source=rss>)

Author: Lian Kim

Published: 2026-10-26T17:22:30Z

Content type: article

Language: en

Sources: [HackerNoon](<https://devfeed.tech/sources/hackernoon.md>)

Topics: [Language models](<https://devfeed.tech/topics/language-models.md>), [Representation learning](<https://devfeed.tech/topics/representation-learning.md>), [Embeddings](<https://devfeed.tech/topics/embeddings.md>), [vector embeddings in AI](<https://devfeed.tech/topics/vector-embeddings-in-ai.md>), [model architecture](<https://devfeed.tech/topics/model-architecture.md>), [mlp](<https://devfeed.tech/topics/mlp.md>), [bert](<https://devfeed.tech/topics/bert.md>), [Data visualization](<https://devfeed.tech/topics/data-visualization.md>), [Temperature settings in AI](<https://devfeed.tech/topics/temperature-settings-in-ai.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [2019](<https://devfeed.tech/tags/2019.md>), [2020](<https://devfeed.tech/tags/2020.md>), [2023](<https://devfeed.tech/tags/2023.md>), [2025](<https://devfeed.tech/tags/2025.md>), [22](<https://devfeed.tech/tags/22.md>), [3](<https://devfeed.tech/tags/3.md>), [about](<https://devfeed.tech/tags/about.md>), [absolute](<https://devfeed.tech/tags/absolute.md>), [accounting](<https://devfeed.tech/tags/accounting.md>), [activation](<https://devfeed.tech/tags/activation.md>), [ai](<https://devfeed.tech/tags/ai.md>), [classification](<https://devfeed.tech/tags/classification.md>), [contextual-embeddings](<https://devfeed.tech/tags/contextual-embeddings.md>), [experiments](<https://devfeed.tech/tags/experiments.md>), [hackernoon-top-story](<https://devfeed.tech/tags/hackernoon-top-story.md>), [hidden](<https://devfeed.tech/tags/hidden.md>), [hidden-states](<https://devfeed.tech/tags/hidden-states.md>), [intent-classification](<https://devfeed.tech/tags/intent-classification.md>), [layers](<https://devfeed.tech/tags/layers.md>), [pythia-160m](<https://devfeed.tech/tags/pythia-160m.md>), [structured](<https://devfeed.tech/tags/structured.md>), [token](<https://devfeed.tech/tags/token.md>), [token-embeddings](<https://devfeed.tech/tags/token-embeddings.md>), [transformer](<https://devfeed.tech/tags/transformer.md>), [transformer-models](<https://devfeed.tech/tags/transformer-models.md>)

## AI overview

In a six-context Pythia-160M experiment, the same token `Ġlight` starts from an identical embedding, then shows a within-group distinction by recorded state 3 that persists through intermediate layers. Direction-based separation shrinks at the final state, while raw Euclidean separation grows alongside vector norms; the six selected contexts do not isolate word sense or establish semantic understanding. A separate banking-intent comparison shows interface-level trade-offs: on 320 eight-category messages, JEV had the highest strict accuracy and full label validity but the longest mean client latency; Claude was fastest but produced 22 invalid labels, and a post hoc normalization improved its score without surpassing JEV. The systems use different underlying models, runs, and billing units, so results do not isolate interface effects or establish direct cost or production-latency comparisons. Together, the experiments show why representation metrics and application outputs should be evaluated against the specific task and output contract.

## Source excerpt

Explore two AI experiments investigating contextual token representations, Transformer hidden states, and the accuracy of structured classification outputs.