---
title: "Layered Insights — paper by Alshomary et al. (2025)"
description: "Layered Insights tests whether using every Transformer layer improves authorship matching when training and test texts come from different…"
canonical: "https://research.elamur.ai/free/en/papers/alshomary-2025-layered-insights-generalizable-analysis-human/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/alshomary-2025-layered-insights-generalizable-analysis-human/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2025](https://md.research.elamur.ai/free/en/papers/2025/) / Layered Insights: Generalizable Analysis of Human Authorial Style by Leveraging All Transformer Layers

# Layered Insights: Generalizable Analysis of Human Authorial Style by Leveraging All Transformer Layers

Paper · 2025 · Milad Alshomary, Nikhil Reddy Varimalla, Vishal Anand et al.

**Authors:** [Milad Alshomary](https://md.research.elamur.ai/free/en/authors/milad-alshomary/), Nikhil Reddy Varimalla, Vishal Anand, [Smaranda Muresan](https://md.research.elamur.ai/free/en/authors/smaranda-muresan/) and [Kathleen McKeown](https://md.research.elamur.ai/free/en/authors/kathleen-mckeown/) · **Year:** 2025 · **Venue:** Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[**0** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4416036890|W7106791202) · [Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing](https://aclanthology.org/volumes/2025.emnlp-main/) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2025.emnlp-main.521/)
- [PDF](https://aclanthology.org/2025.emnlp-main.521.pdf)
- [DOI 10.18653/v1/2025.emnlp-main.521](https://doi.org/10.18653/v1/2025.emnlp-main.521)
- [OpenAlex](https://openalex.org/W4416036890)

Citations: OpenAlex, 2026-10-14.

## Summary

A person may write reviews, join online discussions, and publish fiction. Each setting invites a different kind of writing, so a system that learns to recognize someone in one setting may struggle in another. The authors study authorship attribution as a comparison between collections of writing. Each collection comes from a single writer, and the system scores how likely the collections are to share an author. This kind of comparison matters in areas such as forensic investigation and intellectual property, where the writing available for comparison may differ from the text in question.

The paper introduces LIGHT, a way of training an authorship system to read from several stages of a [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/). A Transformer processes text through successive layers, each of which produces its own numerical representation. Earlier systems studied in the paper used the last layer to build their representations of writing. LIGHT starts with the initial token representations and retains a separate view from every subsequent layer. During training, each view learns to place samples by the same author close together and samples by different authors farther apart. At evaluation time, the system compares the writings at each depth and combines the scores.

The authors apply the method to LUAR and Wegmann, using Reddit comments, Amazon reviews, and Fanfiction stories to test how well the systems transfer between domains. The paper reports improvements in 15 out of 16 out-of-domain scenarios across its two system families and two underlying encoders. In one example, RoBERTa-based LUAR trained on Fanfiction scores 9.49 in mean reciprocal rank on Reddit, while LIGHT-LUAR reaches 14.32. Mean reciprocal rank gives more credit when the correct match appears nearer the top of the candidate list. Results are mixed when training and testing use the same domain. On the Amazon split, for example, RoBERTa-based LIGHT-LUAR reaches 72.65 in mean reciprocal rank against 68.99 for LUAR, while the corresponding comparison on Reddit favors LUAR.

The authors also examine what the separate views contribute. Tests of linguistic information find that different depths are better at representing different aspects of language. Removing individual scores from LIGHT-LUAR shows a recurring pattern. Earlier layers often help when the system moves to another domain, while later layers tend to matter more when it stays in its training domain. These findings give a more precise account of the transfer gains. A layer can improve the ranking of unfamiliar writing even when including its score makes the ranking of familiar writing worse.

## Deep dive: Layered Insights: Generalizable Analysis of Human Authorial Style by Leveraging All Transformer Layers

Layered Insights tests whether using every Transformer layer improves authorship matching when training and test texts come from different domains. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What counts as a match

The task starts with two collections of text. The identity of the writer within each collection is consistent, and the question is whether the same person wrote both. A system can use the resulting score to rank candidates for a match. If one collection serves as the query, each candidate collection gets a score against it, and the order of those scores determines where the known match appears. This framing puts the emphasis on comparing evidence across samples of writing. The experimental outcome is a ranked list built from those comparisons.

A collection helps because the traits associated with an author can show up unevenly. One passage might make a preference in word choice apparent. Another might better show how the writer builds a sentence. At the scale of a story or a discussion, there can also be patterns in how a writer connects statements and develops a point. The authors' hypothesis starts from this range of signals. A representation suited to one kind of pattern may capture only part of the information that makes a comparison useful.

Topic complicates the task. Two different people who write about the same subject have a reason to use similar words. The same person can use quite different words when moving from a review to fiction. A system trained to match authors can benefit from topical overlap on its training data, especially while the topic and the writer tend to recur together. When the role of topic changes, a similarity score built around that overlap can rank the wrong candidate ahead of the correct one. The paper treats the interaction of topic and style as a reason to test across domains as well as within them.

A domain here is a source of writing with its own conventions. The three collections differ in the kinds of text authors produce. Reddit provides comments, Amazon provides reviews, and Fanfiction provides stories. A review gives its author a particular purpose, while a comment responds to a discussion and a story develops a narrative. The paper uses these differences to ask whether a system trained to recognize authors in one kind of writing can make useful comparisons in another. In a transfer test, the comparison takes place within the destination dataset. The method has learned on one kind of text and is being asked to rank author matches in another.

#### How authorship systems represented writing

The paper describes earlier stylometry as an approach that makes the choice of evidence explicit. A researcher can measure function-word frequencies or describe recurrent sentence patterns, then use those measurements to compare writing. The kinds of features can be named before training begins. Word choice, sentence construction, and the organization of a text suggest different ways to represent the same material. In a feature-based approach, those distinctions enter through the feature design. The paper relates sentence construction to [syntax](https://md.research.elamur.ai/free/en/topics/syntax-grammar/) and the organization of larger stretches of text to [discourse analysis](https://md.research.elamur.ai/free/en/concepts/discourse-analysis/).

The learned approaches that motivate LIGHT take another route. They represent text as an embedding, a vector of numbers on which a similarity calculation can operate. The evidence that matters is learned through author-labeled examples. The paper discusses LUAR as a system that learns to put writings by the same person in nearby regions of an embedding space. It discusses Wegmann as a system that puts more pressure on the distinction between subject matter and authorial style by deliberately choosing examples where the subject may make two different authors look similar.

The last layer of the encoder supplies the text representation in both of those starting points. Further processing can still happen after that layer. LUAR, for example, takes information from multiple excerpts to form a representation of a collection. The paper's question concerns an earlier choice in the processing chain. Once the encoder has produced several stages of representation, which stages should supply the evidence used to compare authors? Combining excerpts addresses the amount and distribution of evidence within a collection. Retaining earlier encoder outputs addresses the form in which that evidence is available.

#### Why look at intermediate layers?

A Transformer updates its representation of a text as information passes through its layers. An early and a late layer work on the same input sequence, but their outputs reflect different stages of processing. The paper uses the research summarized in [A Primer in BERTology](https://md.research.elamur.ai/free/en/papers/rogers-2020-primer-bertology-what-we-know/) to motivate taking those differences seriously. In the authors' account, surface and structural information can be prominent at some depths, with information about meaning and the task more prominent at others. Earlier work discussed in the paper also found differences in the contribution of layers to [question answering](https://md.research.elamur.ai/free/en/concepts/question-answering/). The relevant architecture is introduced in [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/).

The implication for authorship is that the last representation may make some distinctions easier to use while making others less accessible to a downstream comparison. A writer's choice of words, preference for a construction, and way of connecting ideas could all contribute to a useful match. The authors ask whether those cues can be learned and compared at the depths where they are available. This is a question about access to information in the encoder, followed by a question about how to use that information for authorship.

The related work also gives a reason to keep those questions separate. The paper cites work suggesting that a downstream task may depend heavily on a subset of layers. This leaves room for several possibilities in authorship attribution. Useful information might be concentrated at a particular depth. Different layers might matter in different domains. Several layers might contribute because their errors differ. LIGHT gives authorship supervision to the available depths and preserves their separate scores, so the authors can ask which of those scores matter under different evaluation conditions.

Generalization is the practical reason for investigating these alternatives. A system can learn a good ranking rule under the conventions of its training corpus. A move to another corpus changes the evidence the rule has available. The paper asks whether comparing the same pair of writings in several learned spaces gives the system more ways to find a reliable match when the strongest cue from the training domain becomes less useful.

### The method, step by step

#### From tokens to separate views of a text

An encoder takes a sequence of tokens, the units into which the input is divided. It first gives those tokens numerical representations. Each Transformer layer then processes the sequence and produces updated representations for its tokens. LIGHT keeps access to the sequence at the starting point and after each layer. The starting point matters because it offers a view before the sequence has passed through the Transformer layers. The other outputs reflect successive transformations of that view. The input units are determined by [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/).

Each depth supplies a separate authorship representation. In the general architecture, a learned projection turns the information available at a given depth into an embedding used for author comparison. The authors refer to feed-forward projections, which means that the transformation takes the representation from that depth as input and maps it into the space used to compare writings. The initial embeddings also receive a projection. In the distilled RoBERTa LIGHT-LUAR setup, the authors call this projection Layer 0 and refer to the projections from the encoder blocks as Layers 1 to 6.

The spaces serve the same task without having to organize every text in the same way. Two collections can have a close match in an early space and a weaker match in a late one. The system retains both observations. This design produces a score at each depth as well as a final combined score. Retaining the separate views is what later lets the authors rerun a ranking with an individual contribution left out.

How LIGHT learns and compares authorship representations The steps in order.

#### Train every view on the same authorship task

The training method is contrastive. It uses the relationship between pieces of writing to shape the space in which those pieces are compared. A positive comparison involves writing by the same author. A negative comparison involves different authors. The training objective encourages a representation in which positive comparisons are close and negative comparisons are separated. Once trained, the representation can be used with fresh collections of writing, where the system has to infer the relationship from the text.

LIGHT applies an authorship objective separately at each projection. This is stronger supervision than asking only for a useful combined comparison. Each projection receives a training signal for the quality of its own representation, and the shared encoder receives the combined training signal. In the paper's general architecture, the averaging described by the authors can be written as follows.

```
J = (∑ₖ₌₀ᴺ Jₖ) / (N + 1)
```

Here J is the training loss for the whole system on the current examples. Jₖ is the authorship loss at depth k, and ∑ adds those losses. N is the number of Transformer layers. The index k runs from 0 for the initial token representation through N for the last layer. The denominator N + 1 counts the starting view along with the outputs of the Transformer layers.

The average assigns the same weight to each loss term. The resulting gradients are propagated through the trainable projections and the shared encoder. This lets fitting at several depths alter the processing inside the encoder itself. A shallow view receives a direct signal about author comparisons. A deeper view receives a signal about the same task after the text has gone through further transformations. Both are optimized during the same training, so the layers in a trained LIGHT system reflect this shared objective.

An authorship loss can be defined in different ways as long as it supplies the relevant comparison at each depth. The paper illustrates this point by adapting LUAR and Wegmann. These systems differ in how they construct training examples and how they form a representation of writing. In both cases the change under study is the availability and supervision of representations across depth.

#### How LUAR builds a collection representation

LUAR works with collections of excerpts. After sampling brief passages from an author’s writing, it feeds them into the encoder. The baseline takes the final representation from the encoder for each excerpt. An attention mechanism helps combine information from the paper representations, and max pooling condenses the result. Pooling takes a variable collection of information and produces a representation of a fixed form. In max pooling, the largest value available for each pooled feature is retained. The output represents a collection instead of an individual excerpt.

This collection-level design matters for the task. An individual excerpt offers a local sample of a writer's choices. A collection gives the system more opportunities to observe a recurring trait. The training objective operates on the resulting representations, encouraging collections from the same writer to be close and collections from different writers to be farther apart. LIGHT-LUAR makes representations available from the various encoder depths, with the authorship objective applied to the resulting projection spaces.

The RoBERTa runs use the paraphrase-distilroberta checkpoint. The main setup reports 20 epochs for each training dataset and validation every five epochs. An epoch is a pass through the training data under the selected sampling procedure. In the RoBERTa setup the batch size is 84, and the authors sample 16 excerpts per author at 32 tokens each. The ModernBERT version uses 30 epochs and 32 excerpts, keeping each excerpt at 32 tokens and retaining the same validation interval. These settings describe the amount of sampled text the system receives from an author as well as the training schedule. The backbone families are described in [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/) and [ModernBERT](https://md.research.elamur.ai/free/en/papers/warner-2024-smarter-better-faster-longer-modern/).

The authors also report how the LUAR implementation handles the memory demands of training. It computes attention in smaller blocks of queries and of keys and values, with chunk sizes of 32 for each. Those are the components used by attention to compare positions and collect information from them. The implementation accumulates attention contributions across the blocks, using a normalization procedure designed to keep the intermediate calculations numerically stable. Activation checkpointing further reduces the amount of intermediate information stored by recomputing selected activations during the backward pass. The authors describe the attention routine as retaining quadratic time complexity with logarithmic memory complexity in the sequence length.

#### How Wegmann uses topic to shape training

Wegmann starts with sentence triplets. The anchor is the sentence against which the other members of the triplet are compared. The positive is by the anchor's author. The negative is by a different writer selected to make the comparison difficult because of topical similarity. Reddit's subreddit information provides a way to select related discussions. A negative chosen this way gives the system a reason to learn distinctions between writers even when their subject matter supplies a strong reason for their sentences to look alike.

The baseline takes the final-layer representation of the special classification token, written `[CLS]`. That token's representation serves as the sentence embedding. In the appendix's description of the layered implementation, the system exposes the hidden states and takes the `[CLS]` representation at each depth used by the triplet objective. A hidden state is the encoder's current numerical representation of the sequence. For every triplet there is an anchor vector, a positive vector, and a negative vector at each such depth. The underlying sentence-embedding framework is [Sentence-BERT](https://md.research.elamur.ai/free/en/papers/reimers-2019-sentence-bert-sentence-embeddings-siamese/).

The appendix gives the loss for this comparison explicitly.

```
(1/L) ∑ℓ₌₁ᴸ max(0, d_cos(aℓ, pℓ) − d_cos(aℓ, nℓ) + m)
```

Here L is the number of layers included in the objective, and ℓ is the index of a layer, running from 1 to L in the appendix's notation. The summation sign ∑ adds the contributions of those layers, and 1/L averages them. The vectors aℓ, pℓ, and nℓ are the anchor, positive, and negative `[CLS]` embeddings at layer ℓ. The function d_cos is cosine distance, so greater distance means that the vectors point in less similar directions. The margin m is set to 0.5. The function max selects the larger of 0 and the expression that compares the two distances with the margin added.

At a depth where the negative is farther from the anchor than the positive by at least the margin, the objective gives the triplet zero loss. When that gap is too small, the triplet contributes a positive loss. The same triplet can meet the margin at one depth and fall short at another. Averaging the per-layer penalties gives the system an incentive to make the author distinction accessible throughout its depth.

The main experiment description reports 58k triplets constructed from the Reddit training split. It specifies a batch size of 24 and a schedule of 20 epochs with either encoder. The appendix separately describes 59k Reddit-MUD triplets and 210k Wegmann conversation triplets, along with an early-stopping procedure. The paper gives these as distinct descriptions of the Wegmann training procedure. The main comparison uses a Reddit-trained Wegmann system, and the authors explain that the topic information needed for the construction was unavailable in their Amazon and Fanfiction setups.

#### Turn the separate comparisons into a ranking

At evaluation, LIGHT represents both sides of a comparison at the available depths. Within each learned space it computes cosine similarity. This measures how closely the directions of the two vectors agree. In particular, the calculation uses their dot product divided by the product of their lengths. For matched writings, it rewards similar directions in the representation space even if the vectors have different lengths.

LIGHT aggregates the similarity scores across depths to obtain a final comparison score. The training objective and the evaluation rule therefore combine different things. The former combines penalties for the quality of representation during fitting. The latter combines evidence for a particular match after the system has been fitted. A candidate can rank well because several views support the match. A view that is especially informative for one kind of writing can also affect the result even when the evidence from the other views is weaker.

The authors release the implementation as LIGHT-for-AA-analysis. The ranking experiments use the established dataset setup from the earlier LUAR study, and the later analyses examine the separate comparisons that the method preserves.

### Experiments and results

#### What the datasets ask the system to do

The evaluation uses Reddit comments, Amazon reviews, and Fanfiction stories. In single-domain training, the authors fit a system to one dataset and evaluate it on the test sets of all three. The test in the training domain measures performance on the same kind of writing. The other tests ask how well the learned comparison transfers to another kind. Wherever timestamps allow, evaluation writings are separated from training writings in time. The Reddit test material is described as disjoint from the training material and taken from a later period.

The Amazon collection includes 135K authors who wrote at least 100 reviews. The paper reports training on 100K authors and evaluation on 35K. Fanfiction contains 278,169 stories from 41K authors. The evaluation restricts that collection to 16,456 authors who each supply exactly two stories. Reddit includes 1 million authors in the dataset description. Those figures describe different parts of the experiment. The count of Fanfiction stories characterizes the corpus, for instance, while the count of authors with two stories specifies who enters evaluation. The earlier work linked for the review data is [Justifying Recommendations Using Distantly-Labeled Reviews and Fine-Grained Aspects](https://md.research.elamur.ai/free/en/papers/ni-2019-justifying-recommendations-distantly-labeled-reviews/).

The design makes the direction of transfer important. Training on reviews and ranking comments uses the conventions of reviewing as the source of supervision while judging the system on conversational writing. Training on comments and ranking reviews reverses those roles. Differences between those two results can reflect which regularities were available during learning and how informative they are in the destination. The two directions should therefore be read as distinct experiments even though they use the same pair of datasets.

#### The baselines and the meaning of the scores

The main comparison pairs LIGHT-LUAR with LUAR and LIGHT-Wegmann with Wegmann under the same underlying encoder. This keeps the layers intervention tied to the system it modifies. The authors repeat the comparison using RoBERTa and ModernBERT, and they also report a convolutional system and a document-vector baseline. The convolutional system learns representations with a network operating on sub-word units. The document-vector baseline weights words according to their frequency within a document and their rarity across documents. That baseline uses [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/).

Recall-at-8, written R@8, records whether the correct candidate appears among the top 8. Mean reciprocal rank, written MRR, gives each query credit equal to the reciprocal of the rank of its first correct candidate and then averages the credits. An early correct match contributes more to MRR because its rank has a smaller reciprocal denominator. R@8 counts every success within its cutoff in the same way. Together these measures show whether the right match reaches a useful portion of the list and how high it tends to appear. The paper follows an earlier ranking evaluation tradition represented by [The TREC-8 Question Answering Track](https://md.research.elamur.ai/free/en/papers/voorhees-2000-trec-8-question-answering-track/).

Reported scores depend on the destination split and candidate set, so the most direct comparison keeps both of those fixed. A larger score on Amazon than on Fanfiction describes the ranking outcomes in those two evaluations. It gives a different kind of evidence from raising the score on the same Amazon split by changing how the encoder layers are used. The latter comparison is the one that tests the architectural change more directly.

#### What changes with RoBERTa

For RoBERTa-based LUAR, every single-source cross-domain direction favors the layered version on the reported ranking measures. The Fanfiction-to-Reddit case shows what this improvement looks like when the authorship system has to move from stories to comments. R@8 is 21.11 for LIGHT-LUAR and 14.61 for LUAR, and MRR is 14.32 for LIGHT-LUAR and 9.49 for LUAR. The two conventional baselines score lower in that setting. The destination remains a difficult ranking task even for the strongest of these systems, so both the improvement over the baseline and the absolute level of the scores matter.

Fanfiction training and Reddit evaluation with RoBERTa, recall at 8 The layered LUAR system places the correct Reddit candidate within the cutoff more often after training on Fanfiction.

**The numbers**

| System or setting | R@8 |
| --- | --- |
| TF-IDF | 6.97 |
| Convolutional baseline | 5.74 |
| LUAR | 14.61 |
| LIGHT-LUAR (this paper) | 21.11 |

With Amazon as the training source and Reddit as the test set, RoBERTa-based LIGHT-LUAR reaches 26.92 R@8 and 18.03 MRR. LUAR scores 22.67 and 14.65 on those measures. Amazon training also supports transfer to Fanfiction. LIGHT-LUAR scores 39.21 R@8 and 29.98 MRR on that test, against LUAR's 34.56 and 25.04. These comparisons change the destination from reviews to either comments or stories while holding the source of authorship supervision fixed.

Reddit training gives a different pair of transfer results. On Amazon, LIGHT-LUAR reaches 72.63 R@8 and 60.74 MRR, compared with 71.84 and 58.51 for LUAR. On Fanfiction, LIGHT-LUAR reaches 43.26 R@8 and 33.96 MRR, compared with 42.50 and 32.30. The gains in these runs accompany stronger baseline scores than in the Fanfiction-to-Reddit example. The results show why it helps to read across both transfer directions. Improving a comparatively strong source-to-target pairing and improving a difficult one can yield very different absolute ranking scores.

Fanfiction training also transfers to Amazon. The RoBERTa-based LIGHT-LUAR obtains 56.69 R@8 and 44.36 MRR on Amazon, where LUAR obtains 37.12 and 26.39. In this comparison the improvement extends to both reaching the cutoff and placing the match early in the ranking. The resulting values still differ from those of a system trained directly on Amazon, which has access during fitting to the conventions of the review data.

Wegmann gives another test because its negative examples already put pressure on a system to avoid relying exclusively on topic. With RoBERTa and Reddit training, the layered version improves on the Fanfiction test. LIGHT-Wegmann scores 30.65 R@8 and 23.45 MRR, compared with 28.46 and 21.21 for Wegmann. The Amazon test goes the other way. LIGHT-Wegmann scores 75.77 R@8 and 70.18 MRR, compared with 79.49 and 72.26 for Wegmann. That Amazon comparison is the exception to the paper's broad out-of-domain pattern. It also shows that the effect of layering depends on the system being modified and the destination used to test it.

#### When training and testing share a domain

With RoBERTa, the in-domain LUAR comparisons divide by dataset. Amazon favors LIGHT-LUAR, which obtains 84.68 R@8 and 72.65 MRR against 82.54 and 68.99 for LUAR. Reddit favors LUAR, which reaches 69.67 R@8 and 54.78 MRR against 67.87 and 53.31 for LIGHT-LUAR. Fanfiction also favors LUAR. Its values there are 55.38 R@8 and 45.07 MRR, while LIGHT-LUAR scores 51.78 and 44.33.

For RoBERTa-based Wegmann, Reddit is the in-domain comparison. LIGHT-Wegmann scores 14.32 R@8 and 9.51 MRR, compared with 7.26 and 4.83 for Wegmann. This is a gain against the corresponding baseline, and the LUAR systems attain higher scores on the same test. The distinction is useful when reading the results. A result can show that a change helps a particular architecture even if a different architecture produces the strongest ranking.

The authors associate the Amazon gains with the relatively structured writing in reviews. They suggest that multiple depths can make finer patterns in that kind of text accessible. They also discuss the role of topic in a discussion forum and relate LIGHT-Wegmann's Reddit gain to the way Wegmann selects training triplets. These are interpretations of the domain patterns. The experiment directly measures the rankings on the different corpora, with each corpus bringing its own composition and writing conventions.

#### What changes with ModernBERT

The ModernBERT comparisons preserve the broad distinction between transfer and in-domain evaluation. For transfer from Fanfiction to Amazon, ModernBERT-based LIGHT-LUAR reaches 63.52 R@8 and 50.65 MRR, compared with 32.39 and 22.14 for ModernBERT-based LUAR. The transfer benefit also appears when the training corpus is Reddit and the destination is Amazon. There, LIGHT-LUAR reaches 87.65 R@8 and 80.79 MRR, while LUAR reaches 86.38 and 78.69. Reading the comparison within each encoder family is important because substituting ModernBERT also changes the starting encoder and, in LUAR, the training schedule.

The ModernBERT Wegmann results add an informative comparison. Its Reddit-to-Amazon transfer favors LIGHT-Wegmann, with 82.34 R@8 and 77.64 MRR against 79.72 and 71.99 for Wegmann. The corresponding RoBERTa comparison favors Wegmann. Thus the layering change has a different effect on the same transfer direction depending on the encoder. On the Fanfiction test after Reddit training, ModernBERT LIGHT-Wegmann scores 36.33 R@8 and 28.50 MRR against 24.39 and 18.14 for Wegmann.

The in-domain ModernBERT LUAR scores follow the same direction as their RoBERTa counterparts on the three corpora. Amazon favors LIGHT-LUAR, which reaches 96.70 R@8 and 92.07 MRR, compared with 95.90 and 89.12 for LUAR. On Reddit the layered version reaches 70.37 R@8 and 55.49 MRR, compared with 72.29 and 56.89 for LUAR. On Fanfiction the corresponding scores are 56.50 and 46.46 for LIGHT-LUAR, and 58.47 and 47.67 for LUAR. The ModernBERT version of LIGHT-Wegmann also improves against its own baseline on the Reddit test, reaching 13.91 R@8 and 9.44 MRR compared with 5.90 and 3.79.

Some cross-encoder comparisons favor the RoBERTa-based layered system. For example, Amazon-trained LIGHT-LUAR scores 18.03 MRR on Reddit with RoBERTa and 17.85 with ModernBERT. Fanfiction-trained LIGHT-LUAR scores 14.32 MRR on Reddit with RoBERTa and 10.86 with ModernBERT. The ModernBERT runs principally extend the evidence that layering helps relative to the matching last-layer baseline. The magnitude of the transfer gain and the relative performance of the encoders vary with the training and evaluation direction.

#### Training on a mixture of domains

The authors also fit LUAR and LIGHT-LUAR on pairs of domains. The experiment uses mini-batches of 256 sampled from the two sources in equal proportions. Authors are disjoint across the domains in these mixtures, so the positive examples come from the same domain. This arrangement gives the system examples of author similarity under different writing conventions during fitting. It tests transfer to the third, unseen domain as well as performance on tests from the sources included in the mixture.

The held-out Reddit test provides a direct example. With Amazon and Fanfiction in the training mixture, LIGHT-LUAR reaches 29.95 R@8 and 20.62 MRR on Reddit. LUAR reaches 20.40 and 13.11. In this setting, the system learns from reviews and fiction, and the test asks it to compare comments. The layered improvement is visible in both the cutoff measure and the quality of the ranking closer to its top.

A different pair, Reddit and Fanfiction, leaves Amazon as the held-out domain. LIGHT-LUAR reaches 69.43 R@8 and 57.04 MRR there, against 53.51 and 39.63 for LUAR trained on the same mixture. This comparison supports the layering method within a fixed mixture. Against the Reddit-only training condition, the Amazon result for the combined training set is lower for both LUAR versions. That distinction keeps the two experimental questions separate. Layering can improve the ranking for a given source mixture, while adding a source to an existing training set can shift performance in either direction.

Training mixtures and held-out test domains, mean reciprocal rank The layered system scores higher than its matching baseline in each held-out domain comparison.

**The numbers**

| System or setting | MRR |
| --- | --- |
| Amazon and Fanfiction training, Reddit test, LUAR | 13.11 |
| Amazon and Fanfiction training, Reddit test, LIGHT-LUAR | 20.62 |
| Reddit and Fanfiction training, Amazon test, LUAR | 39.63 |
| Reddit and Fanfiction training, Amazon test, LIGHT-LUAR (this paper) | 57.04 |
| Reddit and Amazon training, Fanfiction test, LUAR | 30.49 |
| Reddit and Amazon training, Fanfiction test, LIGHT-LUAR | 33.54 |

The tests on sources represented in training are more variable. Training on Reddit and Amazon gives LIGHT-LUAR 89.00 R@8 and 78.38 MRR on Amazon, where LUAR scores 84.84 and 72.09. Training on Reddit and Fanfiction gives LIGHT-LUAR 54.16 R@8 and 44.56 MRR on Fanfiction, while LUAR reaches 57.51 and 46.32. The inclusion of a domain in the training mixture gives the system some direct exposure to its writing conventions. Across the reported experiments, the clearest repeated benefit of layering is on the domain omitted from training.

### What the ablations show

#### Removing a layer from the comparison

The first ablation asks what happens if a trained LIGHT-LUAR system loses access to one of its similarity scores when making a prediction. An ablation changes a component or removes it so its contribution can be examined. In this case the other representations and their fitted parameters are held fixed. The system recomputes its final comparison from the remaining scores and the authors measure the change in test R@8. A positive value in the paper's figure denotes a drop after removal. A negative value denotes an improvement after removal.

This experiment targets the use of a score in the final ranking. An earlier encoder representation can still affect later representations because the text continues to pass through the underlying layers. The test isolates the extra contribution of taking a similarity measurement at a particular depth and including that measurement in the aggregate. Its answer is conditional on the other depth-specific comparisons already available to the system.

In the Fanfiction-trained system, removing scores from the early part of the encoder generally hurts the transfer to Reddit and Amazon. The paper identifies Layers 0–3 as important in those transfers. On the Fanfiction test, taking out early scores can improve the ranking. The later part behaves differently on that test. Removing scores from Layers 4, 5, and 6 harms the in-domain result. This separation within the same fitted system helps explain why a favorable cross-domain comparison can coexist with an in-domain loss.

For Amazon training, the authors again find that the last layers contribute to the in-domain evaluation. The scores from Layers 1 to 3 help on the Reddit transfer, yet the Amazon test improves when those scores are left out. This comparison has the same training and the same fitted representations across the two destinations. The usefulness of the direct evidence from those layers changes with the writing being evaluated.

The Reddit-trained system illustrates the role of the initial representation. Removing the Layer 0 score harms transfer to Amazon and Fanfiction, while its inclusion works against the in-domain ranking. Layer 6 supplies the largest beneficial contribution on the Reddit test in that analysis. Taken together, the ablations show a recurring difference between the early evidence that helps across domains and the later evidence most useful on the training domain. The particular scores that matter still depend on the source and destination.

#### Training without the initial projection

The appendix tests Layer 0 in a second way. It fits versions of LIGHT-LUAR without a projection from the initial token embeddings. In this setup the initial representation supplies neither a separate loss during training nor a separate similarity term during evaluation. The remaining depths can adapt during fitting. This answers a different question from removing a term after training, because the objective has changed for the entire run.

For Reddit training and Amazon evaluation, the version with Layer 0 reaches 26.92 R@8 and 18.03 MRR, compared with 26.76 and 17.94 for the version trained without that projection. On Fanfiction after Reddit training, the scores with Layer 0 are 21.11 and 14.32, against 19.38 and 12.73 without it. Both results favor including direct training and comparison at the initial representation, with the Fanfiction comparison showing the more pronounced separation in the reported scores.

With Amazon as the training source, using Layer 0 gives 56.69 R@8 and 44.36 MRR on Fanfiction, compared with 52.97 and 40.51 for the version without its projection. With Fanfiction as the source and Amazon as the destination, the corresponding scores are 39.21 and 29.98 with Layer 0, and 38.64 and 28.65 without it. The effect therefore appears across more than one direction of transfer. On Reddit in-domain, the result reverses. The version without the projection scores 68.55 R@8 and 53.7 MRR, while the version with it scores 67.87 and 53.31.

This evidence gives Layer 0 a specific architectural role. An initial token representation participates in the Transformer computation in either case. LIGHT can also give it its own authorship objective and a direct path into the comparison score. The appendix tests the value of adding that path. The reported rankings show that the information available at this point can help beyond the contributions learned at subsequent layers.

#### What the linguistic probes find

The authors use the Holmes benchmark to investigate what the learned representations make accessible. It comprises over 200 datasets and applies different probing methods. A probe tests whether a representation supplies enough information for an auxiliary linguistic assessment. The authors probe the separately projected outputs of Reddit-trained LIGHT-LUAR and the final output of Reddit-trained LUAR. That comparison keeps the source of authorship supervision fixed while asking how the linguistic information available to a probe varies with depth.

The paper reports results for syntax and discourse alongside [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/) and [semantics](https://md.research.elamur.ai/free/en/concepts/semantics/). Morphology concerns the structure of words and their forms. Semantics concerns meaning. In the authors' analysis, morphology is especially prominent in LUAR's final representation. For the other broad linguistic categories discussed, the best depth within LIGHT-LUAR scores higher than LUAR's final output. The resulting picture is of a broader distribution of accessible linguistic information across the projected views.

Syntax is strongest around Layers 2–3 in the probing analysis. Discourse information is prominent at later depths, identified in the paper as Layers 3–6, and also at Layer 0. The authors suggest that the initial representation may make discourse markers accessible. Words that signal a relationship between parts of a text could give a linguistic probe relevant information at that depth. The probe shows the accessibility of information relevant to the task. The inference about particular markers is the authors' proposed explanation for the pattern.

The best-layer comparison evaluates what can be recovered from the available views. It does not use the same operation as attribution, which combines similarity scores from the learned spaces. The result supports the existence of different linguistic strengths at different depths. The layer-removal experiment establishes that some of those depths matter to the final rankings. The connection from a particular linguistic category to a specific gain in author ranking remains an interpretation of the combined evidence.

#### Which layers give unusually strong scores?

The paper also studies the scores produced for individual pairs. For the relevant combinations of trained system and test dataset, the authors sample 5k pairs and compute their cosine similarities at all depths. They use a z-score to express how far a similarity lies from the average in units of standard deviation. For a positive pair, the analysis counts scores above 1.5. For a negative pair, it counts scores below -1.5. These thresholds pick out scores that are unusually high in the expected direction for a positive pair or unusually low in the expected direction for a negative pair.

The resulting percentages give a descriptive view of the comparisons. In the Amazon-trained system, the paper finds that Layers 0 and 6 stand out more on Amazon, while some early layers, including Layers 1 to 3, have a more visible role when testing on Reddit or Fanfiction. In the Fanfiction-trained system the contrast is clearer. Layer 6 stands out more for Fanfiction, and Layers 0 to 2 play a more visible part in the transfer tests. The authors report a similar tendency for intermediate evidence to become more prominent on transfer from Reddit.

An extreme-score percentage and an ablation can give different answers about the same layer. In the Reddit-trained system, Layer 0 stands out on Reddit in the pairwise score analysis. Leaving Layer 0 out of the aggregate nevertheless helps the Reddit ranking in the score-removal experiment. This is possible because the score analysis describes how often a layer gives especially distinctive pairwise evidence, while the ranking depends on the ordering of all candidates after the other layers have contributed. A depth can provide strong evidence for some pairs and still move enough other candidates in an unhelpful direction to lower aggregate recall.

Taken together, the analyses support a bounded explanation of the transfer results. Multiple depths supply distinct evidence, and the evidence from some early depths makes a direct difference to out-of-domain rankings. Later depths tend to supply more useful direct evidence for in-domain rankings. The probe results describe differences in available linguistic information that are consistent with that account. The ablations measure the contribution of the scores that actually enter the decision.

### Limitations

#### Limits the authors identify

The experiments focus on [English](https://md.research.elamur.ai/free/en/topics/english/). The proposed connection between writing style and information at different depths could be investigated in other languages, but the results reported here establish it only for the paper's English-language setup. The authors leave open whether the same design would yield similar gains with other linguistic systems and different pretraining resources.

Adding projections increases the number of trainable parameters and the work required for training. The added supervision becomes more costly as the number of layers grows. The authors therefore raise the question of whether a subset of projections could provide the strongest results. The comprehensiveness of LIGHT makes it possible to examine the available depths, while its resource requirements make the choice of which depths to use practically consequential. The appendix reports that on the stated LUAR hardware, RoBERTa-based Reddit training takes approximately 1 hour per epoch, while ModernBERT-based Reddit training takes approximately 4 hours per epoch. Those times describe the respective setups and capture the cost of changing the backbone along with its training configuration.

The authors also limit the depth of their analysis. The performance experiments cover LUAR and Wegmann, but the layer-removal studies and the linguistic probes focus on LUAR. The Holmes comparison focuses further on Reddit-trained systems. The same account of the roles of early and late layers would need its own evidence for Wegmann. The authors also caution that linguistic probes have limitations as measures of what a representation can do. Their concluding interpretation treats the separate views as a route towards more detailed [interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/).

The ethics discussion identifies the capacity to reveal an author's identity and the consequences of mistaken attribution. A false positive could wrongly connect an individual with a text in a criminal case. The authors also describe a risk of using attribution to censor speech. They flag out-of-domain use as a setting where false positives can become more frequent and present robustness and more detailed comparisons as reasons to investigate the method. These practical consequences are part of the paper's discussion of [bias, fairness and safety](https://md.research.elamur.ai/free/en/topics/bias-fairness-safety/).

#### Limits that follow from the setup

The cross-domain result concerns using learned authorship representations on a different corpus. Within a destination test, the comparisons are drawn from that destination's authors and writings. This makes the evidence relevant to transferring a ranking procedure from reviews to comments or stories. Following a particular writer across platforms would ask a different empirical question, with matched writing by the same person on both sides of a domain boundary. The multi-domain experiment explicitly uses disjoint authors across its domains, so it extends the range of training contexts without supplying that kind of cross-platform positive example.

Each domain also packages several variables together. Reviews, comments, and stories differ in their purposes, topic patterns, and conventions, and their dataset construction differs as well. The paper's explanation for the Amazon gains appeals to the structured style of reviews. The evidence supporting that explanation is an observed pattern across corpora. Isolating the effect of structure would require a comparison that varies the structure of writing while controlling the other properties of the data. Similarly, the paper's explanation for ModernBERT's results invokes both depth and context capacity. The LUAR setups vary the encoder and the paper count and schedule together, so they establish the performance of those configurations as a whole.

The layer-removal results give conditional contributions. Removing one score shows what the other scores can do in its absence. Several scores might support some of the same matches, or the value of a score might depend on a companion score being present. The observation that dropping an early contribution can improve an in-domain result motivates the authors' question about fewer projections. The experiments with individual removal and with retraining without Layer 0 leave the best jointly selected set of depths open.

The linguistic probes and similarity analyses also answer different questions from a direct explanation of an attribution in terms of language. The probes test what linguistic information is accessible from a representation. The score analyses test where similarity becomes especially strong or weak and how the rankings respond to removing a depth. Establishing that a particular sentence construction caused a correct attribution would require testing the role of that construction in the comparison itself. The paper provides evidence about layers and categories of linguistic information at the level of the reported experiments.

Finally, the ranking protocol measures performance in candidate sets with known correct matches. R@8 and MRR tell how the system orders those candidates. Operational decisions such as whether to attribute an isolated document to a particular person would require a way to deal with absent authors and to estimate the rate of erroneous identifications at a chosen decision threshold. Those questions matter especially in the forensic scenario the authors discuss. A transfer improvement in ranking supplies evidence about comparison quality under the benchmark conditions, while the reliability of a particular attribution depends on how the scores are used.

### What came after

There are no documented follow-up studies to discuss. The paper closes with two directions for extending the work. One is to test whether supervising a subset of depths can retain the transfer gains while reducing training costs. The other is to compare LIGHT more directly with classical stylometry, where the features used to compare writings are specified explicitly. The first question concerns which learned views carry the gains. The second concerns how those views relate to recognizable features of an author's writing.

## Cite

Cite as Milad Alshomary, Nikhil Reddy Varimalla, Vishal Anand, Smaranda Muresan and Kathleen McKeown. 2025. Layered Insights: Generalizable Analysis of Human Authorial Style by Leveraging All Transformer Layers. Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2025.emnlp-main.521](https://doi.org/10.18653/v1/2025.emnlp-main.521)

```bibtex
@inproceedings{alshomary2025layered,
  title = {{Layered Insights: Generalizable Analysis of Human Authorial Style by Leveraging All Transformer Layers}},
  author = {Milad Alshomary, Nikhil Reddy Varimalla, Vishal Anand, Smaranda Muresan and Kathleen McKeown},
  booktitle = {Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  doi = {10.18653/v1/2025.emnlp-main.521},
  url = {https://doi.org/10.18653/v1/2025.emnlp-main.521}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
