Related Experiment Videos
Analyzing the impact of KV representation compression on explainability in lightweight transformer-based sentiment
1Department of Computer Engineering, Graduate School of AI Convergence, Sejong University, Seoul, South Korea. llmss2000@hanmail.net.
Scientific Reports
|June 24, 2026
Summary
Key-value compression in lightweight Transformers enhances memory efficiency for sentiment analysis. While preserving performance, its impact on explainability varies by dataset complexity.
Area of Science:
- Natural Language Processing
- Machine Learning Explainability
Background:
- Lightweight Transformer models like DistilBERT and MiniLM are crucial for efficient sentiment analysis.
- Understanding the explainability of these compressed models is essential for reliable deployment.
Purpose of the Study:
- To analyze the impact of key-value (KV) representation compression on the explainability of lightweight Transformer models.
- To evaluate how compression affects predictive performance and explanation fidelity across different datasets.
Main Methods:
- Utilized a two-stage compression framework to compress KV representations in DistilBERT and MiniLM.
- Evaluated models on sentiment analysis tasks using IMDB, SST-2, and TweetEval datasets.
- Assessed representational similarity, predictive performance (accuracy), and explanation preservation metrics (fidelity, stability, contrastive consistency).
Main Results:
- Achieved compression ratios of 2.46-3.05 with high representational similarity (>0.994).
- Maintained stable predictive performance with accuracy variations within 0.02.
- Explanation preservation varied by dataset: SST-2 showed high robustness (>0.90), while IMDB and TweetEval exhibited moderate reductions (0.53-0.74) but preserved core structures.
Conclusions:
- KV representation compression offers significant memory savings for lightweight Transformers without compromising predictive performance.
- Explainability is largely preserved, though the degree of preservation is dataset-dependent, influenced by factors like input length and structural complexity.
Related Concept Videos
Transformers
A device that transforms voltages from one value to another using induction is called a transformer. A transformer consists of two separate coils, or windings, wrapped around the same soft iron core. However, they are electrically insulated from each other.
The iron core has a substantial relative permeability. Therefore, the magnetic field lines generated due to the current in one winding are almost entirely confined within the core, such that the same magnetic flux permeates each turn of both...
The iron core has a substantial relative permeability. Therefore, the magnetic field lines generated due to the current in one winding are almost entirely confined within the core, such that the same magnetic flux permeates each turn of both...
Energy Losses in Transformers
In an ideal transformer, it is assumed that there are no energy losses, and, hence, all the power at the primary winding is transferred to the secondary winding. However, in reality, the transformers always have some energy losses, and, hence, the output power obtained at the secondary winding is less than the input power at the primary winding due to energy losses.
There are four main reasons for energy losses in transformers.
The first cause can be the high resistance of the copper windings...
There are four main reasons for energy losses in transformers.
The first cause can be the high resistance of the copper windings...
Types Of Transformers
Transformers can provide desired voltages to a circuit by modifying the number of turns in the secondary windings.
If the ratio of the number of turns in the secondary winding to that of the primary winding is greater than one, then the transformer is said to be a step-up transformer. In a step-up transformer, the voltage at the secondary winding is greater than the voltage applied at the primary winding.
However, if this ratio is less than one, the transformer is said to be a step-down...
If the ratio of the number of turns in the secondary winding to that of the primary winding is greater than one, then the transformer is said to be a step-up transformer. In a step-up transformer, the voltage at the secondary winding is greater than the voltage applied at the primary winding.
However, if this ratio is less than one, the transformer is said to be a step-down...
Improving Translational Accuracy
Base complementarity between the three base pairs of mRNA codon and the tRNA anticodon is not a failsafe mechanism. Inaccuracies can range from a single mismatch to no correct base pairing at all. The free energy difference between the correct and nearly correct base pairs can be as small as 3 kcal/ mol. With complementarity being the only proofreading step, the estimated error frequency would be one wrong amino acid in every 100 amino acids incorporated. However, error frequencies observed in...
Improving Translational Accuracy
Base complementarity between the three base pairs of mRNA codon and the tRNA anticodon is not a failsafe mechanism. Inaccuracies can range from a single mismatch to no correct base pairing at all. The free energy difference between the correct and nearly correct base pairs can be as small as 3 kcal/ mol. With complementarity being the only proofreading step, the estimated error frequency would be one wrong amino acid in every 100 amino acids incorporated. However, error frequencies observed in...
The Ideal Transformer
In single-phase two-winding transformers, two windings are coiled around a magnetic core characterized by cross-sectional area A and magnetic permeability μ. A phasor current i1 enters the left winding while i2 exits the right winding, establishing the fundamental working of the transformer through electromagnetic principles.
Ampere's Law forms the basis of understanding the magnetic field within the transformer. It states that the integral of the magnetic field intensity's tangential component...
Ampere's Law forms the basis of understanding the magnetic field within the transformer. It states that the integral of the magnetic field intensity's tangential component...