Hamid Kazemi
· 4 previous affiliations
- Apple (United States)Since 2024
- Senior Machine Learning Researcher · Since 2026
- Applied Machine Lerarning Engineer · 2024–2026
- Research Intern · 2022
- University of Maryland, College Park2018–2024
- Research Assistant · 2018–2024
- PhD student · 2018–2020
- TomanPay2018
- Software Engineer · 2018
- Sharif University of Technology2012–2017
- Undergrad student · 2012–2017
Research Overview
Hamid Kazemi focuses on the interpretability, safety, and generative capabilities of deep learning models, with a particular emphasis on Vision Transformers (ViTs), Contrastive Language-Image Pre-training (CLIP), and Large Language Models (LLMs). His work investigates the internal mechanisms of these architectures through visualization and model inversion techniques, while also developing methods to mitigate privacy and security risks, such as training data memorization, membership inference, and adversarial poisoning. Kazemi’s research trajectory reflects a transition from analyzing the fundamental learning patterns of computer vision models to addressing the complex safety and alignment challenges inherent in modern generative AI.
Research Trajectory
Kazemi’s early research, beginning around 2022, was primarily concerned with the interpretability of emerging vision architectures. At a time when Vision Transformers were beginning to challenge the dominance of Convolutional Neural Networks (CNNs), the internal logic of ViTs remained largely opaque. In What do Vision Transformers Learn? A Visual Exploration, Kazemi led an investigation into the obstacles preventing effective visualization of ViT features. This work identified that ViTs, particularly those trained with language-model supervision like CLIP, tend to activate based on semantic concepts rather than the low-level visual features (such as edges or textures) typically found in CNNs. This period of work also included the development of Plug-In Inversion: Model-Agnostic Inversion for Vision with Data Augmentations, where he contributed to a method for inverting models without the need for architecture-specific hyper-parameter tuning, facilitating a more standardized approach to visual analysis across diverse network types.
During this same period, Kazemi participated in foundational research regarding the mechanics of generative models. He was a contributor to the development of Cold Diffusion: Inverting Arbitrary Image Transforms Without Noise, which challenged the prevailing assumption that Gaussian noise is a necessary component of diffusion-based generation. By demonstrating that generative models could be constructed using deterministic degradations like blurring or masking, this work expanded the theoretical understanding of how image restoration operators can drive generative behavior.
In 2023 and 2024, Kazemi’s focus shifted toward the security and privacy implications of large-scale model training. He participated in research on membership inference, such as Canary in a Coalmine: Better Membership Inference with Ensembled Adversarial Queries, which utilized adversarial tools to improve the detection of training data leakage. He also contributed to work on data poisoning in Generating Potent Poisons and Backdoors from Scratch with Guided Diffusion, exploring how guided diffusion could be used to create more effective malicious samples for compromising model integrity.
Kazemi’s more recent work has concentrated on the safety and reliability of multimodal and language models. In What do we learn from inverting CLIP models?, he led an inquiry into the latent knowledge of CLIP encoders, revealing that model inversion can uncover significant gender biases and the potential for generating non-consensual or inappropriate content even from seemingly innocuous prompts. His latest research, exemplified by Reasoning's Razor: Reasoning Improves Accuracy but Can Hurt Recall at Critical Operating Points in Safety and Hallucination Detection, examines the trade-offs involved in Chain-of-Thought reasoning. This work identifies a critical tension where the same reasoning processes that improve average accuracy can simultaneously degrade a model's performance in high-precision safety contexts by polarizing confidence and masking errors.
Current Directions
Kazemi’s current research is centered on the intersection of model performance and safety constraints in LLMs. A primary area of interest is the mitigation of memorization in generative models to protect privacy and intellectual property. He has participated in the development of the "goldfish loss" objective, a training modification designed to prevent models from verbatim reproduction of training data without sacrificing downstream task performance.
Additionally, Kazemi is investigating the "polarization" effect in LLM reasoning. His work suggests that while reasoning improves the clarity of correct answers, it also makes incorrect answers appear more certain to the model, which poses significant risks for hallucination detection and safety filtering. This research aims to develop more robust evaluation metrics and training strategies that account for these non-linear performance trade-offs in critical deployment scenarios.
Representative Work
What do Vision Transformers Learn? A Visual Exploration As the lead author, Kazemi addresses the technical challenges of visualizing the internal representations of Vision Transformers. The paper demonstrates that ViTs process information fundamentally differently than CNNs, focusing on semantic concepts and background information. This work provided a foundational "looking glass" into the internal logic of transformer-based vision architectures, moving beyond the "black box" treatment of these models.
Plug-In Inversion: Model-Agnostic Inversion for Vision with Data Augmentations In this work, Kazemi contributed to the development of a simplified model inversion technique. By replacing complex, hand-tuned regularizers with a standardized set of data augmentations, the researchers created a method that works across various architectures, including ViTs and MLPs. This contribution streamlined the process of analyzing what different models learn from the same data.
What do we learn from inverting CLIP models? Leading this study, Kazemi utilized inversion techniques to probe the CLIP encoder. The research revealed that CLIP's latent space contains significant semantic biases and the capacity to generate NSFW content from benign prompts. The findings highlighted the risks of using CLIP as a foundational component in generative pipelines without rigorous safety auditing.
Reasoning's Razor: Reasoning Improves Accuracy but Can Hurt Recall at Critical Operating Points in Safety and Hallucination Detection In this first-author paper, Kazemi explores the unintended consequences of Chain-of-Thought reasoning in LLMs. The study shows that while reasoning boosts average accuracy, it degrades the model's ability to operate at low false-positive rates required for safety filtering. The paper introduces the concept of confidence polarization, where reasoning makes errors indistinguishable from correct answers in high-precision scenarios.
Be like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMs Kazemi participated in the development of the "goldfish loss" objective to address the privacy and copyright risks associated with LLM memorization. By randomly excluding subsets of tokens from the loss computation during training, the method prevents the model from memorizing long verbatim sequences. The work demonstrated that this technique significantly reduces extractable memorization in billion-scale models like LLaMA-2 with minimal impact on utility.
Canary in a Coalmine: Better Membership Inference with Ensembled Adversarial Queries In this collaborative work, Kazemi contributed to improving membership inference algorithms. The research moved beyond simple target sample analysis by using adversarial tools to optimize queries that reveal a model's familiarity with specific training data. This approach provides a more sensitive metric for tracing training data and enforcing data ownership rights.
Profile updated
Loading new papers…
Other researchers whose papers cluster into the same research directions — a proxy for overlapping technical interests and shared intellectual neighborhoods.
See something wrong? Report a mistake