arXiv ScienceSearch

arXiv subjects

Konstantin Grotov

Publications and source records attributed to Konstantin Grotov.

16 recordsLinked to original sources

How to Speculate about Uncertainty in Agentic Coding? A Draft-Model Gate Method

LLM agents deployed for software engineering fail expensively: they act confidently wrong, and bad actions are recognized only after costly execution and retry. We present Speculative Uncertainty (SU), a method that recovers a predictive failure signal for a black-box agent from its output tokens alone, with no access to logits, weights, activations, or repeated sampling. Inverting speculative decoding, a small open-weight draft model scores the agent's already-generated trajectory in a single forward pass. From these speculative cross-likelihoods we extract phase-aware features by separating the reasoning and action spans, and calibrate them against a verifiable objective. SU produces a failure-likelihood score that any downstream policy, such as routing, human intervention, or extra test-time compute, can consume directly. To show the signal is actionable, we instantiate one such policy, a pre-execution veto gate, on software engineering agents Qwen3-Coder-480B and closed-source Claude 3.5 Sonnet, cutting execution error rate by 6-8 percentage points and token cost by 14-19% in deployment, transferring to out-of-distribution benchmarks without retraining, and generalizing across agent models.

cs.LG

Giant Rotational Meta-Doppler from Genetically Designed Superscatterers

The motion of a rigid body interacting with a wave leaves spectral signatures, with the Doppler shift as the dominant contribution. Since any motion can be decomposed into translational and rotational components, rotational Doppler provides additional information about the object's dynamics. In the electromagnetic domain, rotating objects generally produce rotational Doppler, or micro-Doppler, signals determined by the symmetry and spatial structure of the scattering process. For objects that are subwavelength or comparable in size to the wavelength, the response is typically dominated by the lowest dipolar scattering channel, so the leading spectral component commonly appears at twice the angular frequency. Here, we introduce the concept of artificially engineered rotational micro-Doppler by designing a compact, strongly scattering structure that operates through a high-order multipolar cascade of resonances, thereby producing a giant enhancement. Magneto-electric arrays composed of strongly coupled electric and magnetic resonators are optimized in the GHz range using a covariance matrix adaptation genetic algorithm to maximize the micro-Doppler frequency. Unlike conventional higher-order multipole designs used in superscatterers for a specific angle of incidence and polarization, our approach jointly optimizes excitation and scattering under radar-relevant conditions for a rotating blade. The resulting arrays exhibit a giant rotational meta-micro-Doppler response, exceeding the dipolar limit by two orders of magnitude and mapping rotations of tens of hertz into the kilohertz range. Beyond its fundamental significance, this mapping has practical value because it shifts rotor micro-Doppler signatures well above slow-moving radar clutter, thereby improving the detectability of slow motion.

physics.app-ph

Observing Fine-Grained Changes in Jupyter Notebooks During Development Time

In software engineering research, the analysis of fine-grained logs led to significant innovations in areas such as refactoring, security, and code completion. However, even though computational notebooks are a staple of data science and an important tool in machine learning, few similar studies have been conducted in this area. To help bridge this research gap, this paper makes three scientific contributions. (1) We introduce a toolset for collecting code changes in Jupyter notebooks during development time. (2) We use it to collect more than 100 hours of work related to a data analysis task and a machine learning task (carried out by 20 developers with different levels of expertise), resulting in a dataset containing 2,655 cells and 9,207 cell executions. (3) Finally, we use this dataset to investigate the dynamic nature of the notebook development process and the changes that take place in the notebooks. In our analysis of the collected data, we classified the changes made to the cells between executions and found that a significant number of these changes constituted code iteration modifications. We report a number of other insights and propose detailed future research directions on the novel data.

cs.SE

Diffusion-Based Electromagnetic Inverse Design of Scattering Structured Media

We present a conditional diffusion model for electromagnetic inverse design that generates structured media geometries directly from target differential scattering cross-section profiles, bypassing expensive iterative optimization. Our 1D U-Net architecture with Feature-wise Linear Modulation learns to map desired angular scattering patterns to 2x2 dielectric sphere structure, naturally handling the non-uniqueness of inverse problems by sampling diverse valid designs. Trained on 11,000 simulated metasurfaces, the model achieves median MPE below 19% on unseen targets (best: 1.39%), outperforming CMA-ES evolutionary optimization while reducing design time from hours to seconds. These results demonstrate that employing diffusion models is promising for advancing electromagnetic inverse design research, potentially enabling rapid exploration of complex metasurface architectures and accelerating the development of next-generation photonic and wireless communication systems. The code is publicly available at https://github.com/mikzuker/inverse_design_metasurface_generation.

cs.LG

PIPer: On-Device Environment Setup via Online Reinforcement Learning

Environment setup-the process of configuring the system to work with a specific software project-represents a persistent challenge in Software Engineering (SE). Automated environment setup methods could assist developers by providing fully configured environments for arbitrary repositories without manual effort. This also helps SE researchers to scale execution-based benchmarks. However, recent studies reveal that even state-of-the-art Large Language Models (LLMs) achieve limited success in automating this task. To address this limitation, we tune a specialized model for environment setup. We combine supervised fine-tuning for generating correct Bash scripts and Reinforcement Learning with Verifiable Rewards (RLVR) to adapt it to the task of environment setup. On EnvBench-Python, our method enables Qwen3-8B (a model runnable on consumer hardware) to perform on par with larger models-Qwen3-32B and GPT-4o. The training code and model checkpoints are available online: https://github.com/JetBrains-Research/PIPer.

cs.LG

Themisto: Jupyter-Based Runtime Benchmark

In this work, we present a benchmark that consists of Jupyter notebooks development trajectories and allows measuring how large language models (LLMs) can leverage runtime information for predicting code output and code generation. We demonstrate that the current generation of LLMs performs poorly on these tasks and argue that there exists a significantly understudied domain in the development of code-based models, which involves incorporating the runtime context.

cs.SE

Evolving the Computational Notebook: A Two-Dimensional Canvas for Enhanced Human-AI Interaction

Computational notebooks, while essential for data science, are limited by their one-dimensional interface, which poorly aligns with non-linear developer workflows and complicates collaboration and human-AI interaction. In this work, we focus on features of Computational Canvas, a novel two-dimensional interface that evolves notebooks to enhance data analysis and AI-assisted development within integrated development environments (IDEs). We present vital features, including freely arrangeable code cells, separate environments, and improved output management. These features are designed to facilitate intuitive organization, visual exploration, and natural collaboration with other users and AI agents. We also show the implementation of Computational Canvas with designed features as a Visual Studio Code plugin. By shifting from linear to two-dimensional spatial interfaces, we aim to significantly boost developers' productivity in data exploration, experimentation, and AI-assisted development, addressing the current limitations of traditional notebooks and fostering more flexible, collaborative data science workflows.

cs.SE

Debug Smarter, Not Harder: AI Agents for Error Resolution in Computational Notebooks

Computational notebooks became indispensable tools for research-related development, offering unprecedented interactivity and flexibility in the development process. However, these benefits come at the cost of reproducibility and an increased potential for bugs. With the rise of code-fluent Large Language Models empowered with agentic techniques, smart bug-fixing tools with a high level of autonomy have emerged. However, those tools are tuned for classical script programming and still struggle with non-linear computational notebooks. In this paper, we present an AI agent designed specifically for error resolution in a computational notebook. We have developed an agentic system capable of exploring a notebook environment by interacting with it -- similar to how a user would -- and integrated the system into the JetBrains service for collaborative data science called Datalore. We evaluate our approach against the pre-existing single-action solution by comparing costs and conducting a user study. Users rate the error resolution capabilities of the agentic system higher but experience difficulties with UI. We share the results of the study and consider them valuable for further improving user-agent collaboration.

cs.LG

3D Genetic Metamaterials for Scattering Maximization

The rapidly growing volume of drone air traffic demands improved radar surveillance systems and increased detection reliability in challenging conditions. The scattering cross-section, which characterizes a target's radar visibility, is a key element in detection schemes and thus becomes a primary objective in civilian applications. Here, we introduce a concept of genetically designed metamaterials, specifically engineered to enhance scattering for end-fire incidence scenarios. Multi-layer stacks of arrays, encompassing strongly coupled electric and magnetic resonators, demonstrated above 1 m^2 broadband scattering at 10 GHz, despite having an end-fire physical cross-section smaller than one squared wavelength. Those performances, crucial for effective civil radar air traffic monitoring, facilitate exploring highly scattering structures as labels for small airborne targets. This objective has been demonstrated with a set of outdoor experiments with the DJI Mini 2 drone. Lightweight, conformal add-ons with significantly high scattering cross-sections can serve as auxiliary tools to empower passive monitoring systems, thereby providing an additional layer of security in urban airspace.

physics.app-ph

Untangling Knots: Leveraging LLM for Error Resolution in Computational Notebooks

Computational notebooks became indispensable tools for research-related development, offering unprecedented interactivity and flexibility in the development process. However, these benefits come at the cost of reproducibility and an increased potential for bugs. There are many tools for bug fixing; however, they are generally targeted at the classical linear code. With the rise of code-fluent Large Language Models, a new stream of smart bug-fixing tools has emerged. However, the applicability of those tools is still problematic for non-linear computational notebooks. In this paper, we propose a potential solution for resolving errors in computational notebooks via an iterative LLM-based agent. We discuss the questions raised by this approach and share a novel dataset of computational notebooks containing bugs to facilitate the research of the proposed approach.

cs.SE

Hidden Gems in the Rough: Computational Notebooks as an Uncharted Oasis for IDEs

In this paper, we outline potential ways for the further development of computational notebooks in Integrated Development Environments (IDEs). We discuss notebooks integration with IDEs, focusing on three main areas: facilitating experimentation, adding collaborative features, and improving code comprehension. We propose that better support of notebooks will not only benefit the notebooks, but also enhance IDEs by supporting new development processes native to notebooks. In conclusion, we suggest that adapting IDEs for more experimentation-oriented notebook processes will prepare them for the future of AI-powered programming.

cs.SE

Micro-Doppler-Coded Drone Identification

The forthcoming era of massive drone delivery deployment in urban environments raises a need to develop reliable control and monitoring systems. While active solutions, i.e., wireless sharing of a real-time location between air traffic participants and control units, are of use, developing additional security layers is appealing. Among various surveillance systems, radars offer distinct advantages by operating effectively in harsh weather conditions and providing high-resolution reliable detection over extended ranges. However, contrary to traditional airborne targets, small drones and copters pose a significant problem for radar systems due to their relatively small radar cross-sections. Here, we propose an efficient approach to label drones by attaching passive resonant scatterers to their rotor blades. While blades themselves generate micro-Doppler rotor-specific signatures, those are typically hard to capture at large distances owing to small signal-to-noise ratios in radar echoes. Furthermore, drones from the same vendor are indistinguishable by their micro-Doppler signatures. Here we demonstrate that equipping the blades with multiple resonant scatterers not only extends the drone detection range but also assigns it a unique micro-Doppler encoded identifier. By extrapolating the results of our laboratory and outdoor experiments to real high-grade radar surveillance systems, we estimate that the clear-sky identification range for a small drone is approximately 3-5 kilometers, whereas it would be barely detectable at 1000 meters if not labeled. This performance places the proposed passive system on par with its active counterparts, offering the clear benefits of reliability and resistance to jamming.

physics.app-ph

Superradiant Broadband Magneto-electric Arrays Empowered by Meta-learning

Laws of electrodynamics constrain scattering cross-sections of resonant objects. Nevertheless, a fundamental bound that expresses how larger that scattering cross-section can be is yet to be found. Approaches based on cascading multiple resonances permitted to push the scattering responses of subwavelength structures and to exceed existing estimators, for which the Chu-Harrington criterion is, potentially, the most commonly considered one. The superradiant empirical limit, addressing scattering performances of near-field coupled resonator arrays, was subsequently developed to tighten existing estimates, setting a new bound that prompted efforts to find structures that exceed it. Here, we demonstrate that genetically designed superscattering structures, encompassing arrays of constructively interfering electric and magnetic dipoles, can build enormously high scatting cross-sections exceeding those imposed by existing criteria in electromagnetic theory including the superradiant empirical limit. After undergoing thousands of evolutionary generations, iterating sizes, mutual orientations, and locations of resonators, the structures approach their heuristically maximized performance, which is unlikely to be obtained by a random distribution given more than a billion trials. As an additional practically valuable parameter, the scattering bandwidth also underwent optimization. We demonstrate that flat wavelength-comparable structures can have significant backscattering alongside more than 40% fractional bandwidth. The result demonstrates the fundamental capability to untighten scattering cross-section from bandwidth limitations. New capabilities of genetic optimization algorithms, equipped with fast computational tools and constrained by experimentally obtainable electromagnetic parameters, allow chasing well-accepted traditional bounds, demonstrating ever-seen electromagnetic performances.

physics.app-ph

Optimizing Duplicate Size Thresholds in IDEs

In this paper, we present an approach for transferring an optimal lower size threshold for clone detection from one language to another by analyzing their clone distributions. We showcase this method by transferring the threshold from regular Python scripts to Jupyter notebooks for using in two JetBrains IDEs, Datalore and DataSpell.

cs.SE

Surpassing super-radiant scattering limit in a flat split-ring resonator

Electromagnetic scattering bounds on subwavelength structures play an important role in estimating performances of antennas, RFID tags, and other wireless communication devices. An appealing approach to increase a scattering cross-section is accommodating several spectrally overlapping resonances within a structure. However, numerous fundamental and practical restrictions have been found and led to the formulation of Chu-Harrington, Geyi, and other limits, which provide an upper bound to scattering efficiencies. Here we introduce a 2D array of near-field coupled split-ring resonators and optimize its scattering performances with the aid of a genetic algorithm, operating in 19th-dimensional space. Experimental realization of the device is demonstrated to surpass the theoretical single-channel limit by a factor of >2, motivating the development of tighter bounds of scattering performances. A super-radiant criterion is suggested to compare maximal scattering cross-sections versus the single-channel dipolar limit multiplied by the number of elements within the array. This new empirical criterion, which aims on addressing performances of subwavelength arrays formed by near-field coupled elements, was found to be rather accurate in application to the superscatterer, reported here. Furthermore, the super-radiant bound was empirically verified with a Monte-Carlo simulation, collecting statistics on scattering cross sections of a large set of randomly distributed dipoles. The demonstrated flat superscatterer can find use as a passive electromagnetic beacon, making miniature airborne and terrestrial targets to be radar visible.

physics.app-ph

A Large-Scale Comparison of Python Code in Jupyter Notebooks and Scripts

In recent years, Jupyter notebooks have grown in popularity in several domains of software engineering, such as data science, machine learning, and computer science education. Their popularity has to do with their rich features for presenting and visualizing data, however, recent studies show that notebooks also share a lot of drawbacks: high number of code clones, low reproducibility, etc. In this work, we carry out a comparison between Python code written in Jupyter Notebooks and in traditional Python scripts. We compare the code from two perspectives: structural and stylistic. In the first part of the analysis, we report the difference in the number of lines, the usage of functions, as well as various complexity metrics. In the second part, we show the difference in the number of stylistic issues and provide an extensive overview of the 15 most frequent stylistic issues in the studied mediums. Overall, we demonstrate that notebooks are characterized by the lower code complexity, however, their code could be perceived as more entangled than in the scripts. As for the style, notebooks tend to have 1.4 times more stylistic issues, but at the same time, some of them are caused by specific coding practices in notebooks and should be considered as false positives. With this research, we want to pave the way to studying specific problems of notebooks that should be addressed by the development of notebook-specific tools, and provide various insights that can be useful in this regard.

cs.SE