SearcharxivSearch

arXiv subjects

Aman Sharma

Publications and source records attributed to Aman Sharma.

At least 19 recordsLinked to original sources

Trusting-Trust Attack against an Entire Linux Distribution through Binary Manipulation

Ken Thompson's trusting-trust attack, in which a compromised compiler backdoors the programs it builds and reproduces the backdoor in subsequent rebuilds of itself, is widely regarded as a threat specific to compilers. We show that it is not. We construct a complete trusting-trust attack around GNU strip, an ordinary build utility that neither inspects nor generates source code, using only manipulations of finished ELF files. In the bootstrap of the NixOS Linux distribution, a single tampered strip in the binary seed implants a payload that propagates from one generation of strip to the next and survives into the final standard environment after the seed leaves the dependency closure. On a real nixpkgs revision, the attack builds a complete graphical installer without failures and backdoors almost every one of its binaries, enabling arbitrary malicious behavior of the subverted packages.

cs.CR

Dependencies that Bundle Code and Execution

Applications are built from many dependencies. Each dependency is distributed by package registries but it only contains compiled code and does not ship execution state, so runtimes rebuild that state from scratch on every startup. Execution caching records this preparation result so subsequent starts can skip it, but no existing system publishes execution state to a registry for downstream consumers to reuse. We introduce LIBCACHE, the first system to distribute per-dependency execution caches through a package registry as first-class artifacts alongside compiled code. Each library maintainer produces an execution cache from the library's own test suite and publishes it to Maven Central alongside the JAR. At application build time, LIBCACHE merges all per-dependency caches into a single unified cache that covers the classes exercised across every dependency's test suite. We evaluate LIBCACHE on three real-world Java projects across twelve workloads. LIBCACHE speeds up application startup by up to 1.91x and outperforms a cache built from a single workload in 10 of 12 workloads, with the largest average gain for batik (1.60x vs. 1.27x). Cache production adds 10-47% to build time for applications, and execution caches average 18x the size of the corresponding JAR. Our main contribution is LIBCACHE, which establishes that execution caches are distributable supply chain artifacts and that merging per-dependency caches delivers broader startup coverage than any single observation run.

cs.SE

Discrepancy Modeling with Intermediate Variables: A New Framework for Robust Gaussian Process Calibration

Gaussian processes are widely used for surrogate modeling in computer experiments, which often produce numerous intermediate variables that are not explicitly used in standard calibration frameworks. Calibration of imperfect models can be challenging without leveraging these variables, while fitting the emulator and the discrepancy models separately also poses identifiability issues. In this work, we propose a robust Gaussian process calibration framework that leverages intermediate variables for discrepancy modeling. The framework integrates a structured intermediate variable selection process, a discretized scaled Gaussian stochastic process (S-GaSP) to constrain the discrepancy term, and a space-filling design strategy for selecting constraint points. This enables joint modeling of the emulator and discrepancy, improving predictive performance, providing principled uncertainty quantification, and alleviating identifiability risks. We demonstrate its efficacy on a nuclear physics application involving binding energies, where it outperforms baseline approaches.

stat.ME

Frontier Coding Agents Use Metaprogramming to Adapt to Unfamiliar Programming Languages

LLM-based coding agents are usually evaluated in familiar software settings: mainstream languages, common libraries, and public repositories. These benchmarks remain important, but they can hide how agents behave when the language itself is unfamiliar. We evaluate six contemporary coding agents on four esoteric programming languages using a sequential setup with file editing, local execution, and hidden-test grading. Our protocol exposes capability differences between these agents that mainstream coding and agentic benchmarks such as SWE-Bench Verified and Terminal-Bench 2.0 compress into much narrower bands. We observe that the strongest agents, Claude Opus 4.6 and GPT-5.4 xhigh, often avoid writing the target language directly. On Brainfuck and Befunge-98, they write Python programs that generate target-language code and debug those generators locally. Forbidding this metaprogramming strategy causes large performance drops. Text guidance distilled from this strategy does not materially improve weaker agents. In contrast, Opus-derived Python helper code for building generators, with no solved benchmark programs or hidden-test answers, sharply improves Sonnet 4.6 and GPT-5.4 mini on the same problems, while Haiku 4.5 remains low. More interpreter calls and output tokens improve stronger agents but leave weaker agents near their original performance, indicating that these resources amplify useful strategies rather than create them. Together, these results show that strong coding agents adapt to unfamiliar languages by using tools, feedback, and workspace state to build a working model of the target language. Metaprogramming is the clearest case, but the broader gap is constructing and debugging a strategy that works under the target language's rules.

cs.AI

When Can One Neuron Fix Repetition Loops in LLMs?

The Gemma 4 instruction-tuned models share a reproducible failure: on long factual enumeration prompts, such as TV episodes, the 88 IAU constellations, or the 151 original Pokemon, they collapse into repetition, either a tight verbatim loop or a list whose entries decay onto one answer. These loops reach 87.5% (7/8 generations) and survive prompt rewording and most sampling adjustments. In this paper, we explore whether edits to a few internal model components can directly reduce this failure, without relying on repetition penalties, which can distort valid repetition and degrade task performance. To locate such targets, we combine per-layer ablation with per-neuron or routed-expert attribution, then evaluate weight edits over complete generations. We find that these edits substantially reduce detected loops on the prompts and seeds used to select them; in Gemma 4 E2B, for example, one sign-inverted neuron suffices. Across all four Gemma models, detected loops fall from 46/384 to 12/384 on frozen held-out prompts and seeds, driven mainly by E4B and 31B, while general-purpose benchmarks show no statistically detectable regressions. Our attribution methodology identifies useful candidates, but rankings vary across examples. At longer generation budgets, edits remain effective for E2B and E4B, whereas remaining failures in 26B and 31B shift toward doom looping: non-convergent self-correction over facts the model cannot recall. In exploratory experiments on Qwen3.5 and LFM2.5, sparse edits also reduce repetition, providing preliminary cross-family evidence, although effect strength and selectivity vary. Overall, our results show the promise and limits of targeted, small-scale weight editing: it can suppress specific repetition failures and provide a training-free causal intervention, but does not reveal a universal loop circuit, guarantee clean termination, or supply missing knowledge.

cs.LG

Nuclear Reaction Data for Fission Products Off Stability

Neutron cross sections on fission products are relevant to a wide range of applications, including nuclear nonproliferation and forensics, spent-fuel assay, reactor burnup and design, as well as astrophysics. Evaluated nuclear data libraries generally fulfill application needs for isotopes on or near stability, however, for unstable fission products, theoretical descriptions of neutron-induced reactions often constitute the only available source of information. These models often make use of simplified assumptions, leading to unquantified impacts on predicted cross sections. In this work, we discuss possible approaches to addressing these issues, particularly by leveraging machine-learning methods, improved predictive reaction modeling, and experimental data to better constrain model parameters. Our goal is to eventually produce evaluated files for the most-produced nuclei off stability in the fission process of $^{235}$U and submit them to the ENDF/B for consideration in the future ENDF/B-IX.0 release. Here we present the methodology and discuss preliminary results comparing usual simplified approaches with a more realistic one accounting for nuclear deformation.

nucl-th

EDGE-OPD: Internalizing Privileged Context with Evidence Guided On-Policy Distillation

On-Policy Distillation (OPD) has gained wide attraction as an LLM post-training paradigm due to its effectiveness in improving capabilities without introducing model distribution drift, and consequently, regression in general tasks. On-Policy Self-Distillation (OPSD) is an efficient use-case of OPD, which is appealing as it requires only a single model as a student and teacher, and it also has the benefit of providing privileged context that is a absent at inference time (e.g. a persona, a private fact, or a worked solution) to the teacher during the training process. The challenge in this approach is that the privileged information can change model behavior more than intended: it can modify reasoning, degrade general capabilities, and affect performance indicators like response length, style, or local token preferences. Consequently, OPSD may train the student on side effects rather than a desired, transferable behavior. In this paper, we study this problem in a rare-token/identity setting and propose EviDence GuidEd On-Policy Distillation (EDGE-OPD), a modification of OPSD with two distinct characteristics: a) it uses guided rollouts to inject privileged-context behavior to the student at sampling time, so that the rare target behavior is actually present in the on-policy data, and b) it applies an evidence mask: the student is updated only at token positions where the privileged context supports the sampled token, rather than on every token in the rollout. We empirically show that OPSD (and its variant RLSD, with and without a verifier) completely fail to learn a target identity, while the integration of guided rollouts allows them to succeed. Additionally, mask-region ablations show that the persona signal is localized to the positive-evidence tail, allows us to draw valuable insights about efficient knowledge transfer and preservation of general purpose capabilities.

cs.AI

zkSBOM: Privacy-Preserving SBOM Sharing with Zero-Knowledge Sets

Software Bills of Materials (SBOMs) are increasingly mandated by regulators, yet existing sharing mechanisms impose a binary choice between full disclosure and full opacity. This exposes software suppliers to attacks that can be deduced from the SBOM only, such as the presence of a vulnerable dependency. Conversely, software consumers can be fooled by software suppliers who modify or misrepresent published SBOMs. We present zkSBOM, a privacy-preserving SBOM sharing mechanism designed to address these threats. zkSBOM uses zero-knowledge sets to cryptographically commit to the components within an SBOM. Software consumers can query for known vulnerabilities and receive a cryptographic proof confirming whether the artifact described by the SBOM is affected, without revealing any additional SBOM content. We conduct a security analysis of zkSBOM by quantifying expected leakage from inclusion and exclusion proofs. We demonstrate real-world feasibility by applying it to realistic scenarios and evaluating its operation requirements. Our evaluation demonstrates that zkSBOM is a strong, secure, and privacy-preserving mechanism for SBOM sharing, protecting software suppliers and software consumers from one another.

cs.CR

EsoLang-Bench: Evaluating Genuine Reasoning in Large Language Models via Esoteric Programming Languages

Large language models achieve near-ceiling performance on code generation benchmarks, yet most of the programming languages used by popular benchmarks such as SWE-bench and HumanEval (e.g. Python, JavaScript) are squarely in-distribution. They appear at scale in pre-training corpora and are heavily reinforced during post-training. To study LLM performance on unfamiliar programming languages, we introduce EsoLang-Bench, a benchmark using five esoteric programming languages (Brainfuck, Befunge-98, Whitespace, Unlambda, and Shakespeare). All five of our chosen esoteric languages are Turing-complete, so the same algorithmic problems that are solvable in Python or JavaScript are in principle solvable in each of them. Yet, they are unfamiliar to LLMs which makes them a good proxy for evaluating out-of-distribution performance. The unfamiliarity of esoteric languages comprises of: (i) the hard-by-design primitives comprising the language; (ii) substantially less representation in pre-training corpora (340x to over 60,000x fewer public GitHub repositories than Python); (iii) negligible deployment value, which makes targeted inclusion in post-training data economically irrational. We evaluate five frontier models across five prompting strategies and find a dramatic capability gap. The same 80 problems expressed in Python or JavaScript reach 100% accuracy on top frontier models, while the equivalent esoteric versions score only 0-11%. Few-shot learning and self-reflection also fail to close this gap. EsoLang-Bench therefore provides a contamination-resistant testbed for measuring how well frontier models generalise algorithmic problem-solving to programming languages outside their training distribution.

cs.AI

Measuring and Eliminating Refusals in Military Large Language Models

Military Large Language Models (LLMs) must provide accurate information to the warfighter in time-critical and dangerous situations. However, today's LLMs are imbued with safety behaviors that cause the LLM to refuse many legitimate queries in the military domain, particularly those related to violence, terrorism, or military technology. Our gold benchmark for assessing refusal rates, which was developed by veterans of the US Army and special forces, is to our knowledge the first dataset of its kind. We present results for refusal and deflection rates on 31 public models and 3 military models. We observe hard rejection rates as high as 98.2% and soft deflection rates ranging from 0% to 21.3%. We also present results on two additional synthetic datasets and show their correlations with the gold dataset. Finally, we perform abliteration using the Heretic library on a military-tuned gpt-oss-20b model, showing an absolute increase in answer rate of 66.5 points but an average relative decrease of 2% on other military tasks. In our concluding remarks, we argue for deeper specialization, including with mid-training and end-to-end post-training, to achieve zero refusals and maximum military task accuracy for closed military models.

cs.CL

The Sequential Edge: Inverse-Entropy Voting Beats Parallel Self-Consistency at Matched Compute

We revisit test-time scaling for language model reasoning and ask a fundamental question: at equal token budget and compute, is it better to run multiple independent chains in parallel, or to run fewer chains that iteratively refine through sequential steps? Through comprehensive evaluation across 5 state-of-the-art open source models and 3 challenging reasoning benchmarks, we find that sequential scaling where chains explicitly build upon previous attempts consistently outperforms the dominant parallel self-consistency paradigm in 95.6% of configurations with gains in accuracy upto 46.7%. Further, we introduce inverse-entropy weighted voting, a novel training-free method to further boost the accuracy of sequential scaling. By weighing answers in proportion to the inverse entropy of their reasoning chains, we increase our success rate over parallel majority and establish it as the optimal test-time scaling strategy. Our findings fundamentally challenge the parallel reasoning orthodoxy that has dominated test-time scaling since Wang et al.'s self-consistency decoding (Wang et al., 2022), positioning sequential refinement as the robust default for modern LLM reasoning and necessitating a paradigm shift in how we approach inference-time optimization.

cs.LG

EdgeRunner 20B: Military Task Parity with GPT-5 while Running on the Edge

We present EdgeRunner 20B, a fine-tuned version of gpt-oss-20b optimized for military tasks. EdgeRunner 20B was trained on 1.6M high-quality records curated from military documentation and websites. We also present four new tests sets: (a) combat arms, (b) combat medic, (c) cyber operations, and (d) mil-bench-5k (general military knowledge). On these military test sets, EdgeRunner 20B matches or exceeds GPT-5 task performance with 95%+ statistical significance, except for the high reasoning setting on the combat medic test set and the low reasoning setting on the mil-bench-5k test set. Versus gpt-oss-20b, there is no statistically-significant regression on general-purpose benchmarks like ARC-C, GPQA Diamond, GSM8k, IFEval, MMLU Pro, or TruthfulQA, except for GSM8k in the low reasoning setting. We also present analyses on hyperparameter settings, cost, and throughput. These findings show that small, locally-hosted models are ideal solutions for data-sensitive operations such as in the military domain, allowing for deployment in air-gapped edge devices.

cs.AI

Classport: Designing Runtime Dependency Introspection for Java

Runtime introspection of dependencies, i.e., the ability to observe which dependencies are currently used during program execution, is fundamental for Software Supply Chain security. Yet, Java has no support for it. We solve this problem with Classport, a blueprint and system that embeds dependency information into Java class files, enabling the retrieval of dependency information at runtime. We evaluate Classport on six real-world projects, demonstrating the feasibility in identifying dependencies at runtime.

cs.SE

Ripple Effect Protocol: Coordinating Agent Populations

Modern AI agents can exchange messages using protocols such as A2A and ACP, yet these mechanisms emphasize communication over coordination. As agent populations grow, this limitation produces brittle collective behavior, where individually smart agents converge on poor group outcomes. We introduce the Ripple Effect Protocol (REP), a coordination protocol in which agents share not only their decisions but also lightweight sensitivities - signals expressing how their choices would change if key environmental variables shifted. These sensitivities ripple through local networks, enabling groups to align faster and more stably than with agent-centric communication alone. We formalize REP's protocol specification, separating required message schemas from optional aggregation rules, and evaluate it across scenarios with varying incentives and network topologies. Benchmarks across three domains: (i) supply chain cascades (Beer Game), (ii) preference aggregation in sparse networks (Movie Scheduling), and (iii) sustainable resource allocation (Fishbanks) show that REP improves coordination accuracy and efficiency over A2A by 41 to 100%, while flexibly handling multimodal sensitivity signals from LLMs. By making coordination a protocol-level capability, REP provides scalable infrastructure for the emerging Internet of Agents

cs.AI

Think Just Enough: Sequence-Level Entropy as a Confidence Signal for LLM Reasoning

We introduce a simple, yet novel entropy-based framework to drive token efficiency in large language models during reasoning tasks. Our approach uses Shannon entropy from token-level logprobs as a confidence signal to enable early stopping, achieving 25-50% computational savings while maintaining task accuracy. Crucially, we demonstrate that entropy-based confidence calibration represents an emergent property of advanced post-training optimization present in modern reasoning models but notably absent in standard instruction-tuned and pre-trained models (Llama 3.3 70B). We show that the entropy threshold to stop reasoning varies from model to model but can be calculated easily in one shot using only a few examples from existing reasoning datasets. Our results indicate that advanced reasoning models often know that they've gotten a correct answer early on, and that this emergent confidence awareness can be exploited to save tokens and reduce latency. The framework demonstrates consistent performance across reasoning-optimized model families with 25-50% computational cost reduction while preserving accuracy, revealing that confidence mechanisms represent a distinguishing characteristic of modern post-trained reasoning systems versus their predecessors.

cs.LG

Confinement, deconfinement, and bound states in the spin-$1$ and spin-$3/2$ generalizations of the Majumdar--Ghosh chain

We investigate the nature of low-energy excitations in a spin chain with antiferrmomagnetic nearest-neighbor $J_1$, next-nearest-neighbor $J_2$, and three-site $J_3$ interactions using the time-dependent density matrix renormalization group and the single mode approximation techniques. In the absence of the $J_2$ interaction, we identify clear distinctions in the spectral functions in the fully dimerized phase across the exactly dimerized line for different magnitudes of the spins. In contrast to the spin-$1/2$ chain, where the spinon continuum dominates the spectral functions, the magnon modes are prominent in the spectral functions of the spin-$1$ and spin-$3/2$ chains. Through single mode approximation and valence bond solid approaches, we disentangle magnon and spinon contributions to the spectral functions. After including the $J_2$ interactions, for the spin-$1$ chain we trace the evolution of the dynamical structure factor along the phase transition line between the Haldane phase and the fully dimerized phase. We find that the excitation spectrum is a continuum along this line and the spectral gap closes as the order of the transition changes from first order to second order. Along the line of first-order transitions, the spinon-like domain walls are deconfined, and the model exhibits their confinement into discrete bound states away from the transition line. A similar phenomenon occurs in the spin-$3/2$ chain across the phase transition between partially dimerized to fully dimerized phases, revealing a universal spinon confinement phenomenon across first-order phase transitions. This study presents the dynamical structure factor corresponding to the ground state phase diagram and establishes a unified quasiparticle framework for understanding the fundamental nature of excitations across distinct quantum phases in frustrated $J_1$-$J_2$-$J_3$ Heisenberg spin chains.

cond-mat.str-el

DTRNet: Dynamic Token Routing Network to Reduce Quadratic Costs in Transformers

Transformers achieve state-of-the-art results across many tasks, but their uniform application of quadratic self-attention to every token at every layer makes them computationally expensive. We introduce DTRNet (Dynamic Token Routing Network), an improved Transformer architecture that allows tokens to dynamically skip the quadratic cost of cross-token mixing while still receiving lightweight linear updates. By preserving the MLP module and reducing the attention cost for most tokens to linear, DTRNet ensures that every token is explicitly updated while significantly lowering overall computation. This design offers an efficient and effective alternative to standard dense attention. Once trained, DTRNet blocks routes only ~10% of tokens through attention at each layer while maintaining performance comparable to a full Transformer. It consistently outperforms routing-based layer skipping methods such as MoD and D-LLM in both accuracy and memory at matched FLOPs, while routing fewer tokens to full attention. Its efficiency gains, scales with sequence length, offering significant reduction in FLOPs for long-context inputs. By decoupling token updates from attention mixing, DTRNet substantially reduces the quadratic share of computation, providing a simple, efficient, and scalable alternative to Transformers.

cs.LG

Excitations and dynamical structure factor of $J_1-J_2$ spin-$3/2$ and spin-$5/2$ Heisenberg spin chains

We study the dynamical structure factor of the frustrated spin-$3/2$ $J_1$-$J_2$ Heisenberg chains, with particular focus on the partially dimerized phase that emerges between two Kosterlitz-Thouless transitions. Using a valence bond solid ansatz corroborated by density matrix renormalization group simulations, we investigate the nature of magnon and spinon excitations through the single-mode approximation. We show that the magnon develops an incommensurate dispersion at $J_2 \approx 0.32J_1$, while the spinons, viewed as domain walls between degenerate valence bond solid states, become incommensurate at $J_2 \approx 0.4J_1$ beyond the Lifshitz point ($J_2 \approx 0.388J_1$). The dynamical structure factor exhibits rich spectral features shaped by the interplay between these excitations, with magnons appearing as resonances embedded in the spinon continuum. The spinon gap shows a nonmonotonic behavior, reaching a peak near the center of the partially dimerized phase and closing at the boundaries, suggesting the appearance of a floating phase as a result of the condensation of incommensurate spinons. Comparative analysis with the spin-$5/2$ case confirms the universality of these phenomena across half-integer higher-spin systems. Our results provide detailed insight into how fractionalization and incommensurate condensation govern the spectral properties of frustrated spin chains, offering a unified picture across different spin magnitudes.

cond-mat.str-el