Source-linked AI summary
Artificial Entanglement in the Fine-Tuning of Large Language Models
Min Chen, Zihan Wang, Canyu Chen, Zeguan Wu, Manling Li, Junyu Liu
TL;DR
The paper investigates how PEFT and full fine-tuning structure LLM parameters and whether internal differences appear in attention representations. It uses MPS-based artificial-entanglement analysis across LoRA, FFT, and MPS Adaptation, finding distinct internal signatures but robust, coarse-grained attention-level behavior. These results support a no-hair-like account of low-rank adaptation’s effectiveness within the studied settings.
Problem
The paper asks how complex fine-tuning-induced internal parameter structures are and to what extent those complexities are reflected in attention.
Method
The study models parameter updates and attention matrices with MPS representations and computes entanglement entropy, using LLaMA models, two datasets, and an MPS Adaptation extension.
Results
LoRA projection updates show volume-law internal entanglement with an Entanglement Valley, while attention matrices show approximate area-law entanglement with logarithmic corrections and robust external behavior.
Takeaways & Limitations
The results suggest that attention acts as a coarse-graining operator, rendering LoRA and FFT’s distinct internal entanglement signatures indistinguishable in attention outputs.
Abstract
from arXiv · showhide
Large language models (LLMs) can be adapted to new tasks using parameter-efficient fine-tuning (PEFT) methods that modify only a small number of trainable parameters, often through low-rank updates. In this work, we adopt a quantum-information-inspired perspective to understand their effectiveness. From this perspective, low-rank parameterizations naturally correspond to low-dimensional Matrix Product States (MPS) representations, which enable entanglement-based characterizations of parameter structure. Thereby, we term and measure "Artificial Entanglement", defined as the entanglement entropy of the parameters in artificial neural networks (in particular the LLMs). We first study the representative low-rank adaptation (LoRA) PEFT method, alongside full fine-tuning (FFT), using LLaMA models at the 1B and 8B scales trained on the Tulu3 and OpenThoughts3 datasets, and uncover: (i) Internal artificial entanglement in the updates of query and value projection matrices in LoRA follows a volume law with a central suppression (termed as the "Entanglement Valley"), which is sensitive to hyper-parameters and is distinct from that in FFT; (ii) External artificial entanglement in attention matrices, corresponding to token-token correlations in representation space, follows an area law with logarithmic corrections and remains robust to LoRA hyper-parameters and training steps. Drawing a parallel to the No-Hair Theorem in black hole physics, we propose that although LoRA and FFT induce distinct internal entanglement signatures, such differences do not manifest in the attention outputs, suggesting a "no-hair" property that results in the effectiveness of low rank updates. We further provide theoretical support based on random matrix theory, and extend our analysis to an MPS Adaptation PEFT method, which exhibits qualitatively similar behaviors.
I. INTRODUCTION
The paper asks how fine-tuning methods structure internal parameters and whether those structures appear in attention representations. It defines artificial entanglement and studies LoRA, FFT, and MPS adaptation through this lens.
- The paper identifies an unresolved question: how complex internal parameter structures induced by fine-tuning methods are, and how much those complexities appear in attention.
- Artificial entanglement applies entanglement-entropy measures to classical neural-network parameters as a mathematical analysis tool.
- LoRA updates of query and value projections show volume-law internal entanglement with a central Entanglement Valley, hyperparameter sensitivity, and qualitative differences from FFT.
- External entanglement in attention matrices follows an approximate area law with logarithmic corrections and remains robust across some hyperparameters and training stages.
- MPS Adaptation exhibits qualitatively similar internal and external artificial-entanglement behaviors, extending the analysis beyond LoRA.
- Experiments use Llama 3 models at 1B and 8B scales with Tulu3 and OpenThoughts3 datasets targeting instruction following and reasoning.
A. FFT, LoRA and the Overall Framework for Artificial Entanglement Analysis
The framework compares FFT and LoRA updates by reshaping parameters into tensors, factorizing them as MPS, and computing entanglement entropy across bond partitions. The measure is mathematical and does not represent physical quantum entanglement.
- FFT and LoRA: FFT updates all pretrained-model parameters, whereas LoRA adds a low-rank update BA with rank r much smaller than the input and output dimensions.
- Overall framework: The analysis reshapes weight and attention-related matrices into higher-order tensors, factorizes them into MPS representations, and computes von Neumann entanglement entropy.
- Tensorization: Prime-factorizing input and output dimensions creates an Order-(n + m) tensor and the lattice for the MPS construction.
- MPS factorization: Sequential SVDs decompose the reshaped tensor into a chain of local Order-3 tensors.
- MPS interpretation: In LoRA, factorization reflects low-rank structure through a restricted bond dimension, while FFT is represented without that constraint.
- Entanglement profiling: Scanning entanglement entropy across MPS bonds produces an artificial-entanglement profile of correlation patterns.
- Interpretation: The entanglement measure is purely mathematical because the analyzed language models are classical systems without physical quantum entanglement.
B. Artificial Entanglement Profile in FFT and LoRA Fine-tuning
FFT and LoRA updates exhibit volume-law artificial entanglement with a central entanglement valley, but their training dynamics and hyperparameter sensitivity differ. Attention matrices instead show localized, approximately area-law entanglement that is robust to training steps and scaling choices.
- Internal artificial entanglement: MPS profiles of ∆WQ and ∆WV measure internal artificial entanglement across bipartition positions using von Neumann entropy.The MPS framework connects matrix updates to tensor-network bond entropies; random Gaussian matrices provide a Page-curve reference.
- Internal artificial entanglement: Both FFT and LoRA updates follow volume-law scaling with a central entanglement valley, but their entropy evolution during training differs.At small α = 16, LoRA deepens the valley, whereas FFT gradually lifts it; the contrast is especially strong for ∆WV.
- Rank and optimization: Increasing r improves test loss when rank is small, but performance saturates beyond a specific rank; LoRA also requires a larger learning rate than FFT at α = 16.These optimization patterns motivate examining how scaling α affects LoRA entanglement and training behavior.
- Rank and optimization: Increasing LoRA rank r raises early-time entropy, while late-time entropy quickly reaches a plateau, linking rank to effective MPS bond dimension.The plateau indicates that larger ranks do not continue increasing the measured late-time entanglement.
- Hyperparameter dependence: LoRA’s entanglement signatures are sensitive to α, training time, and rank, while increasing α = 256 mitigates the late-time valley in ∆WQ and lifts it in ∆WV.The resulting solution becomes closer to, but remains distinct from, the FFT solution.
- External artificial entanglement: Attention matrices exhibit area-law entanglement with logarithmic corrections and remain largely insensitive to training steps and α despite differing internal profiles.The paper attributes this robustness partly to low token-token entanglement and autoregressive masking after softmax.
C. A Perspective Based on Random Matrix Theory
The paper develops a random-matrix-theory account of artificial entanglement in attention matrices and outputs. It explains logarithmically corrected area-law scaling for attention entropy and vanishing output entropy under stable-rank collapse.
- The attention matrix is decomposed into a rank-1 mean-field component and a residual fluctuation component whose singular values converge to a quartercircular law.The rank-1 term captures mean-field behavior, while the residual governs fluctuations.
- The Attention Cardy Formula states that attention entropy scales logarithmically with sequence length T under the paper’s asymptotic assumptions.The result is presented for T →∞ and is compared with Cardy-formula scaling in critical quantum systems.
- The effective attention charge Cattn is determined by the bulk-spectrum spread parameter σ of the limiting quartercircular law.Larger σ corresponds to a more spread-out bulk singular-value distribution and higher entanglement entropy.
- The theoretical analysis links low output entropy to stable-rank collapse, where spectral weight concentrates on the dominant eigenvalue.A lemma bounds von Neumann entropy using the stable rank of Σ = XX⊤.
- When stable rank satisfies rstable(XX⊤) − 1 = O(T^-3), output entropy obeys S(X) = O((log T)/T) → 0.The corresponding Rényi-2 entropy scales as O(1/T) and vanishes even faster.
- Empirically, attention-head entanglement curves remain approximately invariant across scaling coefficients α ∈ {8, 16, 32, 64} and training steps.
D. Artificial Entanglement Profiling in MPS Adaptation
MPS adaptation directly parameterizes weight updates with MPS structure rather than merely using MPS for analysis. It shows qualitatively similar entanglement signatures to LoRA, while its optimal learning-rate region shifts with the parameterization and scaling coefficient.
- MPS adaptation directly parameterizes weight updates using MPS structure and is itself a parameter-efficient fine-tuning method.This differs from MPS modeling, which decomposes existing updates from LoRA or FFT for analysis.
- MPS adaptation exhibits qualitatively similar internal and external artificial-entanglement behavior to LoRA, including a no-hair property.
- Increasing α shifts MPS adaptation’s optimal learning rates toward smaller values, approaching the LoRA and FFT solutions.
- Despite different entanglement profiles, MPS adaptation does not produce an obvious test-loss decrease at its optimal setting.
III. METHODS
The method tensorizes parameter and attention matrices, factorizes them into MPS chains, and measures entanglement across chain bonds. This framework applies to projection updates, attention matrices, and attention-output operators in classical neural networks.
- III. METHODS: The framework reshapes weight updates and attention-related matrices into higher-order tensors, factorizes them into MPS representations, and computes von Neumann entanglement entropy.
- III. METHODS: Sequential SVDs decompose the reshaped tensor into local Order-3 tensors connected by virtual bonds.The virtual bonds represent latent coupling between subsystems in the MPS interpretation.
- III. METHODS: The MPS interpretation is mathematically analogous to quantum many-body states, although the underlying neural-network systems remain entirely classical.
- III. METHODS: The analysis applies the same MPS formalization to ΔWQ, ΔWV, attention matrices A, and attention-output operators O = XX⊤.
- III. METHODS: Prime-factorizing input and output dimensions produces a finest-grained Order-(n + m) tensorization suitable for tensor-network factorization.The factors are sorted in nondecreasing order before reshaping the original matrix.
- III. METHODS: LoRA updates are represented through their equivalent ΔWLoRA matrix, while FFT is treated with an analogous MPS representation.
- III. METHODS: At each MPS bond, the singular values define a bipartition between the left and right tensor sites, yielding an entropy profile across bond positions.
IV. DISCUSSION
The discussion interprets artificial entanglement as a mathematical tool for comparing LoRA and FFT, emphasizing distinct internal parameter signatures but similar external attention behavior. MPS decomposition and entropy profiles provide the framework for this comparison and for diagnosing PEFT behavior.
- Discussion: LoRA induces a fitted volume-law internal entanglement profile with an entanglement valley in the projection-matrix updates, unlike FFT.The profile is interpreted as evidence of high intrinsic correlation in LoRA updates.
- Discussion: Attention matrices instead exhibit approximate area-law scaling, while attention outputs remain remarkably invariant despite microscopic differences in projection-matrix entanglement.The discussion frames attention as an effective coarse-graining operation that suppresses redundant correlations while preserving task-relevant structure.
- Discussion: Entanglement-valley depth and evolution diagnose PEFT hyperparameters, with smaller α producing deeper valleys and larger α bringing solutions closer to FFT.The profile is also sensitive to rank r and training dynamics.
- MPS foundations: MPS represents high-dimensional tensors through a chain of lower-order tensors whose bond dimensions control compression and expressible entanglement.The representation is constructed through sequential reshaping and SVDs, with singular-value truncation controlling bond dimensions.
- Analysis scope: The framework applies to attention projections and outputs in LLaMA models, and relates entanglement patterns to parameter structure and token-level representation correlations.The paper compares LoRA and FFT while also discussing attention matrices and outputs as distinct analysis targets.
- MPS foundations: At each MPS cut, an SVD partitions the tensor into left and right subsystems, exposing singular values used to compute entanglement entropy.This connects the decomposition procedure to bipartite-state entanglement analysis.
C. Entanglement of the Attention Matrix
The attention-matrix analysis derives logarithmic entanglement growth from the singular-value structure of row-stochastic attention under an asymptotic random-matrix assumption. It also contrasts this result with conditional output-entanglement collapse under stable-rank collapse.
- Attention matrix entanglement: The von Neumann and Rényi-2 entropies converge to the logarithmic scaling predicted by the limiting singular-value distribution.Finite-rank perturbations alter only O(1) singular values, whose normalized contribution vanishes at rate O(1/T).
- Attention matrix entanglement: The leading singular value of row-stochastic attention approaches 1 while the orthogonal component has operator norm O(T^-1/2), producing the outlier–bulk spectrum used in the derivation.The assumptions determine the dominant rank-one component and the scale of the remaining singular values.
- Attention matrix entanglement: S(A)=C_attn log T+C_A+o(1), so attention-matrix entanglement typically grows logarithmically with sequence length T.The result remains possible even with a macroscopic singular-value outlier or eigenvalue gap.
- Output entanglement collapse: Stable-rank control bounds entanglement through the tail mass of the normalized spectrum.For δ defined from stable-rank excess, S(M) ≤ h2(δ)+δ log(T−1) and S2(M) ≤ 2 log(1+δ^-1).
- Output entanglement collapse: Under the conditional stable-rank-collapse regime, output entanglement vanishes as S(X)=O((log T)/T) and S2(X)=O(1/T).The theorem applies to X=AV and requires the stated asymptotic assumptions.
- Output entanglement collapse: The conditional collapse need not occur when isotropic initialization gives VV^T≈I_T, because then Σ≈AA^T and output scaling can mirror attention-matrix scaling.Stable-rank collapse is presented as a regime that may emerge after training or under other constraints and can be checked empirically.
- MPS adaptation: MPS modeling is used post hoc to analyze LoRA and FFT updates, whereas MPS adaptation directly parameterizes updates as a PEFT method.The distinction separates the paper’s analysis formalism from its trainable adaptation strategy.
A. Ablation Study on Causal Masking in Autoregressive Attention
The causal-masking ablation recomputes attention without excluding future positions and compares entanglement across heads. Removing the mask produces strongly head-dependent changes rather than a uniform effect.
- Motivation: The experiment tests whether low attention entanglement is intrinsic to learned patterns or instead an artifact of the autoregressive causal constraint.The comparison is motivated by the possibility that masking itself shapes the observed entanglement structure.
- Method: The unmasked attention matrix is obtained by applying softmax to logits recomputed without the causal mask.The procedure preserves the model’s numerical conventions while allowing future-position interactions.
- Results: Removing the causal mask substantially increases entanglement for some heads, including Head 10 and Head 25, when future positions become accessible.This indicates that the causal boundary had suppressed a higher effective Schmidt rank for those heads.
- Results: Other heads show nearly identical masked and unmasked entanglement, indicating intrinsically low-entangled correlation patterns.These heads remain weakly entangled even when the accessible interaction space is expanded.
B. The Entanglement Valley
The MPS profile of low-rank weight updates develops an entanglement valley at the row–column cut: entropy is volume-law away from the bottleneck but bounded by the factorization rank at it. The valley reflects both low-rank structure and a suppression of intermediate and small singular values near the middle cut.
- B. The Entanglement Valley: At the row–column cut ℓ = m, the Schmidt rank of vec(∆W) is at most r, giving Sℓ=m(∆W) ≤ log r.The bound follows from the rank-r factorization of the update matrix.
- B. The Entanglement Valley: Away from the bottleneck, internal entanglement typically follows volume-law scaling in both row and column interior regimes.The stated regimes exclude cuts too close to the bottleneck or boundaries, where local dimension or factorization rank limits the entropy.
- B. The Entanglement Valley: Because interior entropy exceeds the bottleneck bound, the profile is suppressed near ℓ = m, forming an entanglement valley that is central when m ≈ n.The same positional suppression is reported in the proposition’s consequence and its restatement.
- B. The Entanglement Valley: The valley’s position arises because the factorized form ∆W = BA singles out the row–column decomposition, unlike a generic full-rank matrix.This structural symmetry breaking distinguishes the preferred cut from other internal partitions.
- B. The Entanglement Valley: Near the mid-cut, the singular-value spectrum loses intermediate and small values, directly explaining the observed entropy dip.The spectra are obtained by SVD at each cut after normalization by their ℓ2 norm.
- B. The Entanglement Valley: The no-hair-like attention behavior holds only across a certain range of scaling coefficients and breaks down under extreme scaling.The passage contrasts this bounded robustness with stronger sensitivity in token embedding space.
D. Artificial Entanglement Profiling: LLaMA-3.2-1B, OpenThoughts3 Dataset
On LLaMA-3.2-1B fine-tuned with OpenThoughts3, attention matrices retain robust area-law behavior with logarithmic corrections, while embedding-space updates show a volume-law entanglement valley. LoRA and MPS adaptation also exhibit consistent optimization patterns on this dataset.
- D. Artificial Entanglement Profiling: LLaMA-3.2-1B, OpenThoughts3 Dataset: OpenThoughts3 reproduces the attention-matrix area law with logarithmic correction and robustness of normalized entropy to scaling coefficient α.The normalized entropy remains significantly below its theoretical maximum.
- D. Artificial Entanglement Profiling: LLaMA-3.2-1B, OpenThoughts3 Dataset: MPS adaptation on OpenThoughts3 exhibits the characteristic volume-law entanglement valley in embedding space.This matches the entanglement-valley structure reported in the main analysis.
- D. Artificial Entanglement Profiling: LLaMA-3.2-1B, OpenThoughts3 Dataset: The optimization dynamics and relative performance of LoRA and MPS adaptation mirror observations on Tulu3.The optimal learning-rate regions and their shifts with α follow the same patterns.
E. Artificial Entanglement Profiling: LLaMA-3.1-8B, Tulu3 Dataset
On LLaMA-3.1-8B fine-tuned with Tulu3, attention entanglement remains area-law-like and robust to α, whereas WQ and WV updates retain a training-deepened, α-sensitive entanglement valley. LoRA and MPS adaptation achieve comparable performance patterns.
- E. Artificial Entanglement Profiling: LLaMA-3.1-8B, Tulu3 Dataset: The 8B attention matrices show approximate area-law scaling with logarithmic correction, with normalized entropy robust to scaling coefficient α.Normalized entropy remains significantly below the theoretical maximum.
- E. Artificial Entanglement Profiling: LLaMA-3.1-8B, Tulu3 Dataset: The WQ and WV embedding-space profiles show volume-law behavior with an entanglement valley that deepens during LoRA training.The valley is sensitive to α, consistent with the 1B findings.
- E. Artificial Entanglement Profiling: LLaMA-3.1-8B, Tulu3 Dataset: LoRA and MPS adaptation achieve comparable performance, while optimal learning rates shift as α increases.This optimization behavior mirrors the 1B model.
F. Artificial Entanglement Profiling: LLaMA-3.1-8B, OpenThoughts3 Dataset
On LLaMA-3.1-8B fine-tuned with OpenThoughts3, the attention and embedding-space entanglement patterns remain consistent with the other model–dataset settings. Attention profiles preserve robust area-law behavior, while WQ and WV retain an α-sensitive entanglement valley.
- F. Artificial Entanglement Profiling: LLaMA-3.1-8B, OpenThoughts3 Dataset: Across model scales and dataset distributions, the reported entanglement structures and no-hair phenomena remain consistent.The OpenThoughts3 8B results are presented as confirming robustness across both axes.
- F. Artificial Entanglement Profiling: LLaMA-3.1-8B, OpenThoughts3 Dataset: Attention matrices on OpenThoughts3 retain area-law scaling with logarithmic correction and normalized entropy robustness across α.The normalized entropy remains significantly below the theoretical maximum.
- F. Artificial Entanglement Profiling: LLaMA-3.1-8B, OpenThoughts3 Dataset: The WQ and WV embedding-space profiles retain volume-law behavior with a characteristic entanglement valley.The valley deepens during LoRA training and remains sensitive to α.