Avishree Khare

Avishree Khare

University of Pennsylvania
2 previous affiliations
8Machine learning papers tracked by Lacuna
Is this you?

Research Overview

Avishree Khare focuses on the intersection of machine learning and formal methods, specifically leveraging formal logic to enhance the reliability, robustness, and interpretability of artificial intelligence systems. Her work addresses critical challenges in how large-scale models follow complex rules, reason over temporal sequences in video and audio, and assist in software engineering tasks such as code editing and vulnerability detection. By integrating symbolic reasoning with neural architectures, Khare seeks to develop frameworks that provide formal guarantees for generative models and improve their performance in domains requiring strict adherence to logical constraints.

Research Trajectory

Khare’s research trajectory reflects a transition from foundational work in neural network efficiency to the application of formal methods for ensuring the correctness of large language models (LLMs). Her early contributions centered on model compression, specifically through the development of unified frameworks for knowledge distillation, pruning, and quantization. This initial focus on the structural optimization of neural networks provided a basis for her subsequent investigations into how these models process information and whether their internal representations can be systematically manipulated or verified.

Following her work on model efficiency, Khare shifted toward the application of LLMs in software engineering, particularly in the context of automated code modification and security auditing. During this period, she explored how generative models could be conditioned on developer intent and prior code changes to improve the accuracy of suggested edits. This work aligned with broader efforts in Surgical Code Transformation with Structured Edit Representations, where the goal is to move beyond simple code generation toward the precise resolution of issues within complex, multi-file repositories. Her research in this domain also examined the limitations of LLMs as security auditors, identifying a performance plateau when models are confronted with complex, non-local vulnerabilities that require a more holistic understanding of program state.

In her current doctoral research, Khare has increasingly focused on the formalization of model behavior. This involves treating rule-following as a logical inference problem, allowing for a more rigorous analysis of why models fail to adhere to instructions. Her work in this area addresses the "distraction phenomenon" and the need for Reducing Contextual Noise for Robust Reasoning, where models must distinguish between core logical rules and irrelevant or adversarial contextual information. This has led to the development of frameworks that model LLM inference through propositional logic and the creation of algorithms that use Linear Temporal Logic (LTL) to improve video understanding. Most recently, her work has moved into the realm of mechanistic interpretability and inference-time interventions, exploring how attention manipulation can be used to enforce strict instruction following without the need for extensive retraining.

Current Directions

Formal Logic and Rule-Following

A primary focus of Khare’s current work is the subversion of rule-based inference in LLMs. She investigates how models that are theoretically capable of following logical rules can be misled by adversarial prompts. By modeling these interactions through propositional Horn logic, she identifies specific vulnerabilities in the attention mechanisms of transformers that allow context to override established rules. This research aims to bridge the gap between formal logical systems and the empirical behavior of generative models, providing a theoretical foundation for understanding and preventing "jailbreak" attacks.

Temporal Reasoning in Video Understanding

Khare is also developing methods to improve how AI systems process and retrieve information from temporal data. This involves moving beyond frame-level predictions toward a more robust understanding of complex sequences. By applying temporal scores over prediction sequences, her research enables models to answer sophisticated queries that involve duration, order, and logical conditions (e.g., verifying if a specific sequence of events occurred in a video). This approach combines the rigor of formal temporal logics with the flexibility of probabilistic neural outputs, addressing the The Retrieval Bottleneck in Augmented Language Models by providing more precise mechanisms for matching and retrieval.

Instruction Following and Attention Manipulation

Another significant area of interest is the development of training-free interventions to ensure LLMs follow instructions. Khare explores attention steering as a method to bias models toward system prompts and user-defined rules. This work formalizes instruction following as a competition between instruction-derived rules and context-derived rules, using attention as the mediating factor. By theoretically and empirically analyzing how attention boosting can prevent context from overriding instructions, she contributes to the development of more reliable and adaptable AI systems that can strictly adhere to privacy constraints, refusal boundaries, and tool-use protocols.

Representative Work

Logicbreaks: A Framework for Understanding Subversion of Rule-based Inference In this work, Khare and her collaborators introduce a formal framework that models LLM rule-following as inference within propositional Horn logic. The paper defines core logical properties—such as monotonicity, maximality, and soundness—to analyze how models process rules of the form "if P and Q, then R." The research demonstrates that even when transformers are theoretically constructed to be perfect reasoners, they can be subverted by maliciously crafted prompts that manipulate internal attention. This provides a mathematical explanation for why models may "forget" facts or ignore rules when presented with distracting context.

LogSTOP: Temporal Scores over Prediction Sequences for Matching and Retrieval As the lead author, Khare developed LogSTOP, an algorithm designed to lift frame-level neural network predictions into robust scores for complex temporal queries. The method utilizes Linear Temporal Logic (LTL) combined with probabilistic smoothing to evaluate whether a sequence of events in video or audio data satisfies a specific logical condition. The approach is shown to outperform large vision-language models in both accuracy and efficiency, particularly for queries that require precise temporal reasoning rather than simple keyword or object detection.

Instruction Following by Boosting Attention of Large Language Models In this research, Khare explores inference-time interventions to improve how LLMs adhere to instructions. The paper compares attention manipulation—specifically boosting attention to instruction tokens—against established methods like latent steering and standard prompting. The work provides a theoretical formalization of instruction following as a rule-based competition and proves that attention boosting can effectively tilt this competition in favor of the user's instructions, making the model more resistant to contextual overrides.

Grace: Language Models Meet Code Edits Khare contributed to the development of Grace (Generation conditioned on Associated Code Edits), a method that enhances the ability of LLMs to predict and implement code changes. By providing models with knowledge of relevant prior edits, the framework helps capture latent developer intent that is often missing from the raw code alone. This research addresses the diversity of code changes in real-world software engineering and demonstrates how conditioning on edit history can improve the generative performance of models like Codex and CodeT5.

Understanding the Effectiveness of Large Language Models in Detecting Security Vulnerabilities In this study, Khare led an evaluation of 16 state-of-the-art LLMs to determine their efficacy as security auditors. The research found that while LLMs are proficient at identifying "local" vulnerabilities and tracing simple data flows, they struggle with complex, real-world code where vulnerabilities are distributed across multiple functions or files. The findings suggest that model size is not a definitive predictor of performance in security tasks and that current LLMs serve better as complements to, rather than replacements for, traditional static analysis tools.

KD-Lib: A PyTorch library for Knowledge Distillation, Pruning and Quantization Reflecting her early interest in model efficiency, Khare co-authored the development of KD-Lib, an open-source library for neural network compression. The library provides modular implementations of various algorithms for knowledge distillation, pruning, and quantization. By creating a model-agnostic framework with multiple abstraction layers, the work aimed to accelerate the adoption of compression techniques in both research and commercial applications, addressing the practical challenges of deploying large-scale neural networks on resource-constrained devices.

Profile updated

See something wrong? Report a mistake