Differentially Private Stochastic Gradient Descent (DP-SGD) is a leading approach for privacy-preserving fine-tuning of large language models (LLMs). Many decoder-only LLMs employ weight tying between input and output embeddings, a design choice originally introduced for parameter efficiency and improved language modeling performance in the non-private setting. However, the impact of weight tying under differentially private training remains largely unexplored. In this work, we investigate the role of weight tying in the DP setting using GPT2 and DistilGPT2 as representative decoder-only architectures. Interestingly, we find that untied embeddings consistently outperform weight-tied models under DP-SGD, achieving gains of up to 4.74% points in accuracy on SST-2, QNLI, and QQP. Beyond improved utility, untying embeddings enables the use of memory-efficient ghost clipping for DP-SGD. By contrast, weight tying introduces shared-parameter interactions that complicate standard ghost norm computation and largely negate its computational advantages. As a result, untied models achieve over 60% lower memory usage while preserving the benefits of ghost clipping. Our results indicate that untied embeddings provide a more effective and scalable design for differentially private training of decoder-only LLMs and highlight the need to revisit standard LLM architectural choices in the privacy-preserving setting.
Figures & tables
Fig. 1: The core problem of weight tying that breaks ghost clipping’s assumption.
Model
Setting: SGD
Accuracy (%)
GPU Memory (MB)
Trainable Params
DistilGPT2
WT
86.77±0.76
3676.64
81,912,576
No-WT
86.77±0.76
3824.64
120,509,952
GPT2
WT
89.09±0.69
5390.99
124,439,808
No-WT
89.09±0.69
5538.99
163,037,184
TABLE I: Effect of Weight Tying under Standard Non-Private Training on SST-2. Weight tying preserves predictive utility while improving parameter efficiency, reducing GPU memory usage, and slightly shortening runtime across both decoder-only models.
Model
Setting: DP-SGD with normal clipping
Accuracy (%)
Peak GPU Memory (MB)
DistilGPT2
WT
80.61±1.32
13813.55
No-WT
83.23±0.25
14256.41
GPT2
WT
78.44±1.73
18530.09
No-WT
81.48±1.07
18973.67
TABLE II: Effect of Weight Tying under DP-SGD with normal clipping on SST-2. Untying embeddings consistently improves utility and optimization stability under DP across both DistilGPT2 and GPT2.
Model
Clipping Strategy (No WT)
Accuracy (%)
Peak GPU Memory (MB)
DistilGPT2
ghost clipping
83.23±0.25
4747.19
normal clipping
83.23±0.25
14256.41
GPT2
ghost clipping
81.48±1.07
6786.90
normal clipping
81.48±1.07
18973.67
TABLE III: Comparison between ghost clipping and standard DP-SGD normal clipping under untied embeddings (No-WT) on SST-2. When the additive gradient separability assumption remains valid, ghost clipping preserves identical utility and optimization stability while substantially reducing GPU memory consumption across both DistilGPT2 and GPT2.
TABLE IV: Comparison of weight tying and clipping strategies under DP-SGD on SST-2 (DistilGPT2). The best utility is achieved with untied weights, while the most efficient configuration in terms of memory is Ghost Clipping with untied weights.
TABLE V: Comparison of weight tying and clipping strategies under DP-SGD on SST-2 (GPT2). The best utility is achieved with untied weights, while the most efficient configuration in terms of memory is Ghost Clipping with untied weights.
Training Setting
Embedding
DistilGPT2
GPT2
Accuracy (%)
Std. Dev.
Accuracy (%)
Std. Dev.
Standard SGD
WT
86.77
0.76
89.09
0.69
No-WT
86.77
0.76
89.09
0.69
DP-SGD (Normal)
WT
80.61
1.32
78.44
1.73
No-WT
83.23
0.25
81.48
1.07
DP-SGD (Ghost)
No-WT
83.23
0.25
81.48
1.07
TABLE VI: Overall comparison of standard and differentially private training under weight tying (WT) and untied embeddings (No-WT) on SST-2 For DistilGPT2 and GPT2. Best DP utility is shown in bold.
Dataset
Task Type
Split
Size (MB)
#Samples
SST-2
Sentiment Analysis
Train
11.82
67,349 (59,560 bal.)
Validation
0.15
872
Test
0.32
1,821
QQP
Paraphrase Detection
Train
63.85
363,846 (268,756 bal.)
Validation
7.09
40,430
Test
68.61
390,965
TABLE VII: GLUE Dataset Statistics with Task Types and Balanced Training Sizes
TABLE VIII: Comparison of weight tying and clipping strategies under DP-SGD on QNLI (DistilGPT2). Untied embeddings improve utility, while Ghost Clipping preserves these gains with substantially lower memory usage.
TABLE IX: Comparison of weight tying and clipping strategies under DP-SGD on QNLI (GPT2). Untied embeddings improve utility, while Ghost Clipping preserves these gains with substantially lower memory usage.
TABLE X: Comparison of weight tying and clipping strategies under DP-SGD on QQP (DistilGPT2). Untied embeddings improve utility, while Ghost Clipping preserves these gains with substantially lower memory usage.
TABLE XI: Comparison of weight tying and clipping strategies under DP-SGD on QQP (GPT2). Untied embeddings improve utility, while Ghost Clipping preserves these gains with substantially lower memory usage..
TABLE XII: Comparison of weight tying and clipping strategies under DP-SGD on SST-2 (DistilGPT2) with ϵ=1 . The best utility is achieved with untied weights, while the most efficient configuration in terms of memory is Ghost Clipping with untied weights.
TABLE XIII: Comparison of weight tying and clipping strategies under DP-SGD on SST-2 (DistilGPT2) with ϵ=5 . The best utility is achieved with untied weights, while the most efficient configuration in terms of memory is Ghost Clipping with untied weights.