arXiv:2609.40335cs.LGSep 2026

Manuscript Offprint

arXiv:2609.40335

Is Weight Tying Still Beneficial for Decoder-Only LLMs in Private Settings Under DP-SGD?

Razan El Mais, Ali Chehab, Ibrahim Issa, Razane Tajeddine

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Razan El Mais, Ali Chehab, Ibrahim Issa, Razane Tajeddine

Department of Electrical and Computer Engineering

American University of Beirut

Beirut, Lebanon

{rre30, chehab, ibrahim.issa, razane.tajeddine}@aub.edu.lb

Abstract—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.

Index Terms—differential privacy, differentially private stochastic gradient descent, ghost clipping, large language models, weight tying, gradient Clipping, privacy-preserving machine learning, Transformer Architectures.

I. INTRODUCTION

Large Language Models (LLMs) have rapidly emerged as foundational components of modern digital infrastructure, with transformative applications spanning healthcare, finance, education [1], [2]. Advances in model scale, training methodologies, and architectural design [3]–[5] have further accelerated their deployment, enabling increasingly capable LLM-based agents that support a wide range of communication, reasoning, and decision-assistance tasks [6]–[9]. As these models become deeply integrated into user-facing and data-sensitive applications, ensuring the privacy of training data has become a critical challenge.

A growing body of research has demonstrated that LLMs can memorize and unintentionally reveal sensitive information contained in their training corpora through model outputs [10]−[12][10]-[12]. To mitigate this risk, differential privacy (DP) has emerged as one of the most principled frameworks for privacy-preserving machine learning to provide formal privacy guarantees. In particular, DP-SGD [13][13] works by clipping per-example gradients and injecting calibrated noise during training. However, applying DP-SGD to modern Transformer-based LLMs remains computationally demanding because per-example gradient clipping incurs substantial memory and runtime overhead. Recent techniques such as ghost clipping [17][17] alleviate this bottleneck by computing clipping norms without explicitly materializing individual gradients, significantly improving the scalability of DP training for large models.

A sequence of works has progressively improved the efficiency of per-example gradient computation across various neural architectures spanning fully connected networks, convolutional architectures, and reweighted-loss formulations [13]−[16][13]-[16]. Building on these advances, ghost clipping [17][17] enables memory-efficient differentially private training of Transformer-based LLMs by avoiding explicit per-example gradient instantiation. Despite its effectiveness, ghost clipping implicitly relies on an important structural assumption: namely, that gradient contributions across parameter groups remain block-separable and can therefore be independently decomposed when computing per-example gradient norms. While this assumption holds for architectures with disjoint parameter blocks, modern decoder-only LLMs such as GPT-style models commonly employ weight tying [18][18], [19][19], where the input embedding and output projection layers share the same parameter matrix.

Weight tying has become a standard architectural choice in many language models because it reduces the number of trainable parameters and often improves generalization performance in non-private training settings. Despite its widespread adoption, its interaction with differentially private optimization techniques remains poorly understood. In particular, existing work on ghost clipping implicitly assumes parameter independence across layers and does not examine the consequences of parameter sharing introduced by tied embeddings. This raises an important question: does weight tying remain beneficial under DP-SGD, and is it fully compatible with the assumptions underlying ghost clipping?

In this paper, we investigate the interaction between weight tying and DP-SGD for fine-tuning decoder-only language models with tied input and output embeddings. We consider two representative architectures, GPT2 and DistilGPT2, together with corresponding untied variants, and evaluate them on three GLUE benchmark tasks: SST-2, QNLI, and QQP. Our study spans non-private SGD, DP-SGD with standard clipping, and DP-SGD with ghost clipping, allowing us to analyze the effects of weight tying on both utility and computational efficiency under differential privacy. Our main contributions are as follows:

  • We show that untied input and output embeddings consistently improve utility and optimization stability under DP-SGD. At the same time, untying enables memory-efficient ghost clipping, yielding substantial reductions in memory usage.

  • We characterize ghost clipping in the presence of weight tying. Specifically, we show that shared input-output embeddings violate the implicit block-separability assumption underlying ghost norm computation by introducing an additional cross-term in the per-example gradient norm, and we derive the corresponding exact clipping norm.

The rest of the paper is organized as follows: section II presents the background and related work. Section III introduces our main finding and provides the corresponding analysis. Section IV describes the experimental setup and implementation details. Section V presents and discusses the experimental results. Section VI outlines the limitations of this work and directions for future research. Finally, section VII concludes the paper.

References (33)