SearcharxivSearch

arXiv subjects

Harsh Shah

Publications and source records attributed to Harsh Shah.

14 recordsLinked to original sources

LogJack: Indirect Prompt Injection Through Cloud Logs Against LLM Debugging Agents

LLM debugging agents that consume cloud logs and execute remediation commands are vulnerable to indirect prompt injection through log content. We present LogJack, a benchmark of 42 payloads across 5 cloud log categories, and evaluate 8 foundation models under 3 prompt conditions with 5 independent trials each (n = 160 per model per condition on 32 attack payloads). Under the active condition, verbatim command execution rates range from 0% (Claude Sonnet 4.6) to 86.2% (Llama 3.3 70B). Passive instructions ("do not execute fixes") reduce most models to 0% but Llama still executes at 30.0%. Remote code execution via curl | bash succeeds on 6 of 8 models. Guardrails from AWS, GCP, and Azure largely fail to detect log-embedded injections-Azure Prompt Shield detected only the most obvious payload (1/32), while GCP Model Armor detected none-though they detect identical payloads in isolation. We also observe a novel "sanitize and execute" behavior where a model detects and removes an obvious malicious component but still executes the remaining injected command. Benchmark and harness available at github.com/HarshShah1997/logjack.

cs.CR

SpecAttn: Speculating Sparse Attention

Large Language Models (LLMs) face significant computational bottlenecks during inference due to the quadratic complexity of self-attention mechanisms, particularly as context lengths increase. We introduce SpecAttn, a novel training-free approach that seamlessly integrates with existing speculative decoding techniques to enable efficient sparse attention in pre-trained transformers. Our key insight is to exploit the attention weights already computed by the draft model during speculative decoding to identify important tokens for the target model, eliminating redundant computation while maintaining output quality. SpecAttn employs three core techniques: KL divergence-based layer alignment between draft and target models, a GPU-optimized sorting-free algorithm for top-p token selection from draft attention patterns, and dynamic key-value cache pruning guided by these predictions. By leveraging the computational work already performed in standard speculative decoding pipelines, SpecAttn achieves over 75% reduction in key-value cache accesses with a mere 15.29% increase in perplexity on the PG-19 dataset, significantly outperforming existing sparse attention methods. Our approach demonstrates that speculative execution can be enhanced to provide approximate verification without significant performance degradation.

cs.CL

SITCOM: Scaling Inference-Time COMpute for VLAs

Learning robust robotic control policies remains a major challenge due to the high cost of collecting labeled data, limited generalization to unseen environments, and difficulties in planning over long horizons. While Vision-Language-Action (VLA) models offer a promising solution by grounding natural language instructions into single-step control commands, they often lack mechanisms for lookahead and struggle with compounding errors in dynamic tasks. In this project, we introduce Scaling Inference-Time COMpute for VLAs (SITCOM), a framework that augments any pretrained VLA with model-based rollouts and reward-based trajectory selection, inspired by Model Predictive Control algorithm. SITCOM leverages a learned dynamics model to simulate multi-step action rollouts to select the best candidate plan for real-world execution, transforming one-shot VLAs into robust long-horizon planners. We develop an efficient transformer-based dynamics model trained on large-scale BridgeV2 data and fine-tuned on SIMPLER environments to bridge the Real2Sim gap, and score candidate rollouts using rewards from simulator. Through comprehensive evaluation across multiple tasks and settings in the SIMPLER environment, we demonstrate that SITCOM when combined with a good reward function can significantly improve task completion rate from 48% to 72% using trained dynamics model.

cs.RO

Online Convex Optimization with Switching Cost with Only One Single Gradient Evaluation

Online convex optimization with switching cost is considered under the frugal information setting where at time $t$, before action $x_t$ is taken, only a single function evaluation and a single gradient is available at the previously chosen action $x_{t-1}$ for either the current cost function $f_t$ or the most recent cost function $f_{t-1}$. When the switching cost is linear, online algorithms with optimal order-wise competitive ratios are derived for the frugal setting. When the gradient information is noisy, an online algorithm whose competitive ratio grows quadratically with the noise magnitude is derived.

math.OC

Analysis of cost-efficiency of serverless approaches

In this paper, we present a survey of research studies related to the cost-effectiveness of serverless approach and corresponding cost savings. We conducted a systematic literature review using Google Scholar search engine, covering the period from 2010 to 2024. We identified 34 related studies, from which we extracted 17 parameters that might influence the relative cost savings of applying the serverless approach.

cs.SE

Transformer-Based Extraction of Statutory Definitions from the U.S. Code

Automatic extraction of definitions from legal texts is critical for enhancing the comprehension and clarity of complex legal corpora such as the United States Code (U.S.C.). We present an advanced NLP system leveraging transformer-based architectures to automatically extract defined terms, their definitions, and their scope from the U.S.C. We address the challenges of automatically identifying legal definitions, extracting defined terms, and determining their scope within this complex corpus of over 200,000 pages of federal statutory law. Building upon previous feature-based machine learning methods, our updated model employs domain-specific transformers (Legal-BERT) fine-tuned specifically for statutory texts, significantly improving extraction accuracy. Our work implements a multi-stage pipeline that combines document structure analysis with state-of-the-art language models to process legal text from the XML version of the U.S. Code. Each paragraph is first classified using a fine-tuned legal domain BERT model to determine if it contains a definition. Our system then aggregates related paragraphs into coherent definitional units and applies a combination of attention mechanisms and rule-based patterns to extract defined terms and their jurisdictional scope. The definition extraction system is evaluated on multiple titles of the U.S. Code containing thousands of definitions, demonstrating significant improvements over previous approaches. Our best model achieves 96.8% precision and 98.9% recall (98.2% F1-score), substantially outperforming traditional machine learning classifiers. This work contributes to improving accessibility and understanding of legal information while establishing a foundation for downstream legal reasoning tasks.

cs.CL

Market-Neutral Strategies in Mid-Cap Portfolio Management: A Data-Driven Approach to Long-Short Equity

Mid-cap companies, generally valued between \$2 billion and \$10 billion, provide investors with a well-rounded opportunity between the fluctuation of small-cap stocks and the stability of large-cap stocks. This research builds upon the long-short equity approach (e.g., Michaud, 2018; Dimitriu, Alexander, 2002) customized for mid-cap equities, providing steady risk-adjusted returns yielding a significant Sharpe ratio of 2.132 in test data. Using data from 2013 to 2023, obtained from WRDS and following point-in-time (PIT) compliance, the approach guarantees clarity and reproducibility. Elements of essential financial indicators, such as profitability, valuation, and liquidity, were designed to improve portfolio optimization. Testing historical data across various markets conditions illustrates the stability and resilience of the tactic. This study highlights mid-cap stocks as an attractive investment route, overlooked by most analysts, which combine transparency with superior performance in managing portfolios.

q-fin.PM

Blotto on the Ballot: A Ballot Stuffing Blotto Game

We consider the following Colonel Blotto game between parties $P_1$ and $P_A.$ $P_1$ deploys a non negative number of troops across $J$ battlefields, while $P_A$ chooses $K,$ $K < J,$ battlefields to remove all of $P_1$'s troops from the chosen battlefields. $P_1$ has the objective of maximizing the number of surviving troops while $P_A$ wants to minimize it. Drawing an analogy with ballot stuffing by a party contesting an election and the countermeasures by the Election Commission to negate that, we call this the Ballot Stuffing Game. For this zero-sum resource allocation game, we obtain the set of Nash equilibria as a solution to a convex combinatorial optimization problem. We analyze this optimization problem and obtain insights into the several non trivial features of the equilibrium behavior. These features in turn allows to describe the structure of the solutions and efficient algorithms to obtain then. The model is described as ballot stuffing game in a plebiscite but has applications in security and auditing games. The results are extended to a parliamentary election model. Numerical examples illustrate applications of the game.

cs.GT

Group Testing for Accurate and Efficient Range-Based Near Neighbor Search for Plagiarism Detection

This work presents an adaptive group testing framework for the range-based high dimensional near neighbor search problem. Our method efficiently marks each item in a database as neighbor or non-neighbor of a query point, based on a cosine distance threshold without exhaustive search. Like other methods for large scale retrieval, our approach exploits the assumption that most of the items in the database are unrelated to the query. However, it does not assume a large difference between the cosine similarity of the query vector with the least related neighbor and that with the least unrelated non-neighbor. Following a multi-stage adaptive group testing algorithm based on binary splitting, we divide the set of items to be searched into half at each step, and perform dot product tests on smaller and smaller subsets, many of which we are able to prune away. We show that, using softmax-based features, our method achieves a more than ten-fold speed-up over exhaustive search with no loss of accuracy, on a variety of large datasets. Based on empirically verified models for the distribution of cosine distances, we present a theoretical analysis of the expected number of distance computations per query and the probability that a pool will be pruned. Our method has the following features: (i) It implicitly exploits useful distributional properties of cosine distances unlike other methods; (ii) All required data structures are created purely offline; (iii) It does not impose any strong assumptions on the number of true near neighbors; (iv) It is adaptable to streaming settings where new vectors are dynamically added to the database; and (v) It does not require any parameter tuning. The high recall of our technique makes it particularly suited to plagiarism detection scenarios where it is important to report every database item that is sufficiently similar item to the query.

cs.DS

The dynamic hadronization of charm quarks in heavy-ion collisions

The PYTHIA8/ANGANTYR model for heavy ion collisions was recently updated with a mechanism for \textit{global colour reconnection}. The colour reconnection model used is QCD colour algebra inspired and enhances baryon production due to the formation of string junctions. In this paper, we present updates to the junction formation and string fragmentation mechanisms, connected to heavy quark fragmentation. This allows for the simulation of heavy quark fragmentation, using junction formation, in heavy ion collisions. The framework is validated for proton collisions, and we show results for charm baryon production in proton-lead collisions.

hep-ph

Baryon correlations in Pythia

We present the results from our investigation of angular correlations between baryon pairs in the PYTHIA8 event generator. We show how colour reconnection models and hadronization mechanisms influence such angular correlations and in particular address the effect of gluons on the baryon production mechanism in the Lund string fragmentation model. We conclude by discussing the new theoretical ideas in comparison with the ALICE pp collision results for the baryon angular correlations. We propose a hypothesis for suppressing baryons produced in gluon jets and show how that may influence the angular correlations.

hep-ph

A spatially constrained QCD colour reconnection in pp, pA, and AA collisions in the PYTHIA8/Angantyr model

We present an updated version of the QCD-based colour reconnection model in PYTHIA8, where we constrain the range in impact parameter for which reconnections are allowed. In this way, we can introduce more realistic colour reconnections in the Angantyr model for heavy ion collisions, where previously only reconnections within separate nucleon sub-collisions have been allowed. We investigate how the new impact parameter constraint influences final states in pp collisions, and retune parameters of the multi-parton interaction parameters in PYTHIA to compensate so that minimum bias data are reproduced. We also study multiplicity distributions in pA collisions and find that, in order to counteract the loss in multiplicity due to the introduction of global colour reconnections, we need to modify some parameters in the Angantyr model while keeping the parameters tuned to pp fixed. With Angantyr we can then extrapolate to AA collisions without further parameter tuning and retaining a reasonable description of the basic multiplicity distributions.

hep-ph

Artificial Intelligence-based Eosinophil Counting in Gastrointestinal Biopsies

Normally eosinophils are present in the gastrointestinal (GI) tract of healthy individuals. When the eosinophils increase beyond their usual amount in the GI tract, a patient gets varied symptoms. Clinicians find it difficult to diagnose this condition called eosinophilia. Early diagnosis can help in treating patients. Histopathology is the gold standard in the diagnosis for this condition. As this is an under-diagnosed condition, counting eosinophils in the GI tract biopsies is important. In this study, we trained and tested a deep neural network based on UNet to detect and count eosinophils in GI tract biopsies. We used connected component analysis to extract the eosinophils. We studied correlation of eosinophilic infiltration counted by AI with a manual count. GI tract biopsy slides were stained with H&E stain. Slides were scanned using a camera attached to a microscope and five high-power field images were taken per slide. Pearson correlation coefficient was 85% between the machine-detected and manual eosinophil counts on 300 held-out (test) images.

q-bio.QM

The Angantyr model for Heavy-Ion Collisions in PYTHIA8

We present a new model for building up complete exclusive hadronic final states in high energy nucleus collisions. It is a direct extrapolation of high energy pp collisions (as described by PYTHIA), and thus bridges a large part of the existing gap between heavy ion and high energy physics phenomenology. The model is inspired by the old Fritiof model and the notion of wounded nucleons. Two essential features are the treatment of multi-parton interactions and diffractive excitation in each NN sub-collision. Diffractive excitation is related to fluctuations in the nucleon partonic sub-structure, and fluctuations in both projectile and target are here included for the first time. The model is able to give a good description of general final-state properties such as multiplicity and transverse momentum distributions, both in pA and AA collisions. The model can therefore serve as a baseline for understanding the non-collective background to observables sensitive to collective behaviour. As PYTHIA does not include a mechanism to reproduce the collective effects seen in pp collisions, such effects are also not reproduced by the present version of Angantyr. Effects of high string density, shown to be able to reproduce e.g. higher strangeness ratios and the ridge in pp, will be added in future studies

hep-ph