Source-linked AI summary
Where Does Authorship Signal Emerge in Encoder-Based Language Models?
Francis Kulumba, Guillaume Vimont, Laurent Romary, Florian Cafiero
TL;DR
Authorship attribution models can differ four-fold despite sharing their encoder, data, and loss, raising whether the gap lies in representations or their scoring. Using mechanistic interpretability, the paper finds that stylistic features are broadly available but scoring mechanisms determine where authorship signal is consolidated and used.
Problem
Models with the same pretrained encoder, data, and contrastive loss can show a four-fold performance gap based only on the scoring mechanism.
Method
The paper combines linear probes, causal activation patching, gradient analysis, and training-dynamics analysis across mean-pooling and interaction-based scorers.
Results
Mean pooling consolidates authorship signal by mid layers, while late interaction defers consolidation to later layers, although stylistic features remain linearly readable across layers and models.
Takeaways & Limitations
The effective depth and information available to an authorship-attribution model depend on whether its scoring mechanism preserves and exploits token-level structure.
Takeaways & Limitations
The study’s qualitative consolidation result should be tested with a second backbone for architectural generality, while fine-grained LI-versus-PLI distinctions remain statistically unresolved.
Abstract
from arXiv · showhide
Authorship attribution models fine-tuned with the same pretrained encoder, data, and loss can differ four-fold in performance depending only on their scoring mechanism. We use mechanistic interpretability tools to explain this gap. Stylistic features such as word length, punctuation density, and function-word frequency are similarly available at every layer in every model we probe, including an off-the-shelf control encoder, suggesting that the gap is not explained by their linear readability. Instead, causal intervention shows that the scorer appears to determine where the encoder consolidates authorship signal. Mean pooling forces consolidation by early to mid layers, while late interaction defers it to later layers. We further derive this difference from the gradient structure of each scorer, and training dynamics reveal distinct learning trajectories that follow from that difference.
1 Introduction
Authorship attribution models sharing an encoder, data, and loss can differ substantially because their scoring mechanisms differ. The paper investigates whether this gap reflects different encoded features or different readout and consolidation of authorship signal.
- Task background: Authorship attribution uses stylistic traces such as sentence length, punctuation habits, function-word preferences, and word-length distributions.The task decides whether two passages were written by the same person or group.
- The scoring-function puzzle: Four-fold performance gaps arise from the scoring mechanism despite shared pretrained backbone, training data, and contrastive loss.Mean pooling averages token representations before scoring, whereas late interaction compares token representations directly.
- The scoring-function puzzle: The paper distinguishes whether scoring mechanisms produce different internal representations or merely read out similar representations differently.Mechanistic interpretability tools are used to test these alternatives.
- Availability versus use: Stylistic features remain linearly readable at every layer across models, including an off-the-shelf control encoder.The features include word length, capitalization, and punctuation density.
- Availability versus use: Mean pooling forces early-to-mid-layer consolidation of authorship signal, whereas interaction defers consolidation to later layers.The scoring mechanism appears to determine where the encoder consolidates authorship information.
2 Background
The paper defines contrastive authorship attribution, compares mean pooling, late interaction, and patch-level interaction, and introduces probes and causal interventions to study feature use across encoder layers.
- Contrastive authorship attribution: Contrastive training uses anchor, same-author positive, and different-author negative passages to learn similarity scores.InfoNCE pushes anchors closer to positives and farther from in-batch negatives.
- Scoring mechanisms: Mean pooling compresses all token embeddings into one d-dimensional vector before cosine-similarity scoring.It is presented as the standard authorship-attribution baseline.
- Scoring mechanisms: Late interaction retains the full token sequence and sums each anchor token’s maximum cosine similarity to candidate tokens.Unlike mean pooling, it preserves per-token structure through the scoring function.
- Scoring mechanisms: Patch-level late interaction partitions tokens into contiguous patches, mean-pools each patch, and applies MaxSim at patch level.The study uses patches of size n=2.
- Causal interventions: Residual-stream patching estimates each encoder layer’s contribution by restoring clean activations into a corrupted forward pass.Recovery indicates whether the layer carries information needed for correct authorship scoring.
- Recovery metrics: Rank recovery tests whether patching preserves the positive-over-negative ranking, avoiding percentage-recovery instability when score differences are near zero.Rank recovery ranges from 0 to 1, with 0.5 representing chance.
- LISA probes: Linear probes regress stylistic features from mean-pooled hidden states at each encoder layer and report held-out R2.The probe features include word length, capitalization, punctuation density, and function-word frequency; readability is necessary but not sufficient for use.
3 Gradient Structure and the Consolidation Bottleneck
The paper derives consolidation depth from scorer-specific gradient structure. Mean pooling distributes updates uniformly across tokens, creating an intermediate-layer bottleneck, whereas interaction scoring preserves selective token-level refinement and defers consolidation.
- Theory: The theory predicts that scoring-function gradients determine where authorship signal is consolidated in the encoder.The analysis derives this prediction before experimentation.
- Gradient decomposition: The InfoNCE gradient focuses on hard negatives, while the scorer term determines how updates distribute across tokens.The InfoNCE component is shared across scoring mechanisms; token-level allocation is where they diverge.
- Mean pooling: Mean pooling gives every token the same gradient magnitude, preventing selective strengthening of discriminative tokens.Function words, punctuation marks, and content words receive the same gradient signal under the 1/m factor.
- Late interaction: Late interaction updates only argmax-selected tokens, allowing the encoder to learn which tokens carry discriminative authorship signal.Most tokens receive no gradient in this regime.
- Consolidation bottleneck: Mean pooling must compress authorship-relevant information into a sequence-wide mean, creating a consolidation bottleneck at an intermediate layer.The bottleneck arises because the scorer accesses only the mean representation.
- Predicted causal signature: MaxSim accesses individual token representations directly, so consolidation can be deferred while upper layers refine richer contextual features.The predicted causal signature is an earlier recovery inflection for mean pooling and a later one for MaxSim.
- Information perspective: Mean pooling can lose authorship information when order differs despite identical function-word frequencies, whereas MaxSim preserves positional distinctions.This follows from mean pooling’s permutation invariance and MaxSim’s preservation of positional structure.
- Embedding geometry: Mean pooling has the best uniformity but weakest alignment, while LI has the tightest alignment but weakest uniformity.Both alignment and uniformity are lower-is-better measures in Table 1.
4 Experimental Setup
The experiments isolate scoring mechanism by holding the backbone, corpus, and loss constant while varying token-to-score aggregation. A controlled 148-triplet probe set and four analyses test feature availability, causal layer contributions, score sensitivity, and training trajectories.
- Controlled comparison: Every model shares one backbone, corpus, and loss, differing only in how token representations become a scalar similarity.This design isolates the scoring mechanism as the experimental variable.
- Models and data: The shared encoder is ModernBERT-base with 23 transformer layers, 149M parameters, and hidden size 768.The base-4 HALvest-Contrastive split decorrelates topical similarity from authorship signal.
- Scoring mechanisms: Layerwise uses attention pooling followed by mean pooling and cosine scoring, while LI uses masked token-level MaxSim and PLI uses bigram patch-level MaxSim.E5 zero-shot is included as an off-the-shelf retrieval control.
- Motivating result: A four-fold Recall@20 gap between mean pooling and LI is the empirical observation motivating the analysis.Table 2 reports retrieval performance on HALvest-Contrastive base-4.
- Probe set construction: The probe set contains 148 controlled triplets targeting 130 tokens, with positive and negative passages differing by at most five tokenized tokens.Triplets are stratified into three tiers to test disjoint authorship, shared-author confounds, and cross-domain recognition.
- Probe tiers: Tier A contrasts same-author positives with topically similar negatives from disjoint author-sets, requiring reliance on stylistic signal.Tier B introduces a partially overlapping author-set confound.
- Patching criterion: Residual patching is restricted to correctly ranked triplets, so effective sample sizes vary by tier and model.The restriction is reported alongside the failure-rate and sample-size analysis.
- Analyses: The study combines layerwise linear probes, residual-stream patching, score sensitivity, and checkpointed training-dynamics analysis.These analyses measure feature availability, causal rank recovery, output responsiveness, and how depth profiles develop during fine-tuning.
5 Results
Across probes, causal patching, score sensitivity, and training dynamics, the models encode similar stylistic features but consolidate and use authorship signal at different depths depending on the scorer.
- Overall result: Together, the analyses indicate that the performance gap reflects where and how scoring mechanisms read out authorship signal rather than which stylistic features the encoder makes linearly readable.The probe, patching, sensitivity, and training-dynamics results converge on this readout-based explanation.
- Feature availability: The three fine-tuned models produce nearly identical stylistic-feature probe heatmaps, with word length most readable at R2 ≈0.57.Capitalization rate, type–token ratio, punctuation density, and function-word frequency follow similar layerwise patterns across models.
- Causal patching: Mean pooling crosses chance near layer 9, whereas late interaction crosses near layers 14–16 across all three tiers.The six-layer separation is consistent across tiers, indicating scorer-dependent causal depth profiles.
- Causal patching: Using a 0.75 rank-recovery threshold, mean pooling consolidates at layer 10, compared with layers 16 for LI and 15 for PLI.The result matches the prediction that dense gradients favor earlier consolidation while sparse gradients permit later consolidation.
- Score sensitivity: LI is most score-sensitive, PLI is intermediate, and mean pooling is an order of magnitude less sensitive to restoring a single layer.PLI falls 10–20% below LI, while mean pooling’s averaging makes layer-level restoration produce much smaller score changes.
- Training dynamics: Mean pooling recruits earlier layers over training, while late interaction shifts from shallow lexical matches toward deeper contextualized representations.Mean pooling’s recovery inflection moves from upper layers at step 500 to layer 9 at the final checkpoint; late interaction initially spikes at layers 5–10.
6 Related Work
This work situates authorship attribution within contrastive learning and distinguishes probing from causal analysis. It uses mechanistic interpretability to examine whether stylistic information is merely readable or necessary for model behavior.
- Neural authorship attribution has evolved from classification toward contrastive learning, with increasing attention to topic confounding.
- Probing versus causal analysis: Linear probes reveal what information representations encode, but probe accuracy does not necessarily predict model behavior.
- Probing versus causal analysis: Activation patching provides a causal alternative by testing whether information is necessary rather than merely decodable.
- Probing versus causal analysis: All probed stylistic features are similarly available across models with substantially different task performance.
7 Discussion
The discussion reframes authorship attribution as an information readout problem: stylistic features are already readable, but scoring mechanisms differ in how and when they exploit them. The evidence converges on later consolidation for interaction-based scorers and a bottleneck under mean pooling.
- The pretrained encoder already makes stylistic features linearly readable, while scoring mechanisms determine whether they can be accessed at the right depth and capacity.
- Availability against use: All four models show nearly identical probe heatmaps despite dramatically different retrieval performance, separating information availability from effective use.
- Why interaction beats pooling: Mean pooling consolidates authorship signal at layer 9, whereas interaction-based scorers consolidate it around layers 15–16.
- Why interaction beats pooling: Gradient analysis and information-theoretic arguments attribute the difference to mean pooling’s compression of higher-order structure versus MaxSim’s preservation of token-level granularity.
- PLI in the interaction regime: PLI with n = 2 falls in the same causal regime as LI, with nearly identical recovery inflections and geometry closer to LI than mean pooling.
- The main bottleneck is whether the scoring mechanism can preserve and exploit stylistic information, rather than whether that information exists in the encoder.
Limitations
The study fixes ModernBERT to isolate scoring-mechanism effects, so exact consolidation layers may vary across architectures. It also studies only n = 2 PLI and has limited probe-set resolution for fine-grained comparisons.
- Backbone choice: ModernBERT is fixed as the backbone to isolate how scoring mechanisms shape signal consolidation.
- Backbone choice: The observed inflection layers may shift in other architectures, although the qualitative early-versus-late consolidation gap is expected to transfer.
- Patch-level interaction: PLI experiments use only n = 2, leaving larger patch sizes as an extension predicted to move consolidation toward the pooling regime.
- Probe set size: The 148-triplet probe set resolves the six-layer gap but lacks statistical resolution for fine-grained LI-versus-PLI distinctions.
- Probe set size: Tier B has only 28 to 33 correctly ranked triplets, making its curves noisier than those for Tiers A and C.
- Probe set size: Probe findings support linear accessibility of the studied stylistic features, not equivalence of full hidden representations across model families.
A Top LISA features across models
Across all four models, the top LISA features are nearly identical and are dominated by mean word length, followed by function-word frequencies and punctuation density.
- All four models surface the same top-five LISA feature family with highly similar probe performance.
- Mean word length dominates in all four models, with peak R2 values of approximately 0.576–0.580.
- Function-word frequencies and punctuation density follow mean word length in the feature rankings.
- The off-the-shelf control E5 encoder achieves the same R2 values as the three fine-tuned models.