What's in a prompt? Language models encode literary style in prompt embeddings

📅 2025-05-19
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This work investigates how large language models encode non-factual literary style—particularly authorial style—in deep prompt embeddings, beyond semantic or factual content representation. Methodologically, it leverages Transformer-based architectures and employs geometric analysis of embedding spaces, cross-text style clustering, and visualization to systematically characterize the distributional properties of short texts in high-dimensional latent space. The study reveals, for the first time, that deep embeddings of texts by the same author exhibit strong aggregation and entanglement, while those from different authors are markedly separated; moreover, the geometric structure of these embeddings stably encodes abstract stylistic features. These findings demonstrate that prompt embeddings serve not merely as compressed semantic representations but also as compact, structured encodings of stylistic information. Consequently, this work establishes a novel, interpretable, and computationally tractable paradigm for author attribution, stylometry, and related tasks.

Technology Category

Natural Language Processing: Sentiment Analysis, Stylistic Analysis, and Argument MiningMachine Learning: Large Multimodal Models (LMMs)Computer Vision: Large Vision Models

Application Category

Graph Algorithms and Modeling for the Web: Graph embeddings and representation learning for Web-related graphsWeb Mining and Content Analysis: Large pretrained models with web dataSemantics and Knowledge: Methods to enhance, augment, integrate or synergize semantic models such as knowledge graphs and LLMs
📝 Abstract
Large language models use high-dimensional latent spaces to encode and process textual information. Much work has investigated how the conceptual content of words translates into geometrical relationships between their vector representations. Fewer studies analyze how the cumulative information of an entire prompt becomes condensed into individual embeddings under the action of transformer layers. We use literary pieces to show that information about intangible, rather than factual, aspects of the prompt are contained in deep representations. We observe that short excerpts (10 - 100 tokens) from different novels separate in the latent space independently from what next-token prediction they converge towards. Ensembles from books from the same authors are much more entangled than across authors, suggesting that embeddings encode stylistic features. This geometry of style may have applications for authorship attribution and literary analysis, but most importantly reveals the sophistication of information processing and compression accomplished by language models.
Problem

Research questions and friction points this paper is trying to address.

How prompt embeddings encode literary style in language models
How transformer layers condense prompt information into embeddings
How latent space geometry reflects author-specific stylistic features
Innovation

Methods, ideas, or system contributions that make the work stand out.

Language models encode literary style in embeddings
Deep representations capture intangible prompt aspects
Latent space geometry reveals author-specific stylistic features
🔎 Similar Papers
R
Raphael Sarfati
Cornell University
H
Haley Moller
Yale University
T
Toni J. B. Liu
Cornell University
N
Nicolas Boull'e
Imperial College London