-
Quasiperiodic potential induced corner states in a quadrupolar insulator
Authors:
Srijata Lahiri,
Saurabh Basu
Abstract:
We systematically investigate the topological and localization properties of a quadrupolar insulator represented by the celebrated Benalcazar-Bernevig-Hughes model in presence of a quasiperiodic disorder instilled in its hopping amplitude. While disorder can be detrimental to the existence of the topological order in a system, we observe the emergence of a disorder driven topological phase where t…
▽ More
We systematically investigate the topological and localization properties of a quadrupolar insulator represented by the celebrated Benalcazar-Bernevig-Hughes model in presence of a quasiperiodic disorder instilled in its hopping amplitude. While disorder can be detrimental to the existence of the topological order in a system, we observe the emergence of a disorder driven topological phase where the original (clean) system demonstrates trivial behavior. This phenomenon is confirmed by the re-emergence of zero energy states in the bandstructure together with a non-zero bulk quadrupole moment, which in turn establishes the bulk boundary correspondence (BBC). Furthermore, the distribution of the excess electronic charge shows a pattern that is reminiscent of the bulk quadrupole topology. To delve into the localization properties of the mid-band states, we compute the inverse participation and normalized participation ratios. It is observed that the in-gap states become critical (multifractal) at the point that discerns a transition from a topological localized to a trivial localized phase. Finally, we carry out a similar investigation to ascertain the effect of the quasiperiodic disorder on the quadrupolar insulator when the model exhibits topological properties in the absence of disorder. Again, we note a multifractal behavior of the eigenstates in the vicinity of the transition.
△ Less
Submitted 19 June, 2024;
originally announced June 2024.
-
Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languages
Authors:
Shuvendu K. Lahiri
Abstract:
Verification-aware programming languages such as Dafny and F* provide means to formally specify and prove properties of programs. Although the problem of checking an implementation against a specification can be defined mechanically, there is no algorithmic way of ensuring the correctness of the user-intent formalization for programs -- that a specification adheres to the user's intent behind the…
▽ More
Verification-aware programming languages such as Dafny and F* provide means to formally specify and prove properties of programs. Although the problem of checking an implementation against a specification can be defined mechanically, there is no algorithmic way of ensuring the correctness of the user-intent formalization for programs -- that a specification adheres to the user's intent behind the program. The intent or requirement is expressed informally in natural language and the specification is a formal artefact. The advent of large language models (LLMs) has made strides bridging the gap between informal intent and formal program implementations recently, driven in large parts due to benchmarks and automated metrics for evaluation.
Recent work has proposed evaluating {\it user-intent formalization} problem for mainstream programming languages~\cite{endres-fse24}. However, such an approach does not readily extend to verification-aware languages that support rich specifications (containing quantifiers and ghost variables) that cannot be evaluated through dynamic execution. Previous work also required generating program mutants using LLMs to create the benchmark. We advocate an alternate approach of {\it symbolically testing specifications} to provide an intuitive metric for evaluating the quality of specifications for verification-aware languages. We demonstrate that our automated metric agrees closely with mostly GPT-4 generated and human-labeled dataset of roughly 150 Dafny specifications for the popular MBPP code-generation benchmark, yet demonstrates cases where the human labeling is not perfect. We believe our work provides a stepping stone to enable the establishment of a benchmark and research agenda for the problem of user-intent formalization for programs.
△ Less
Submitted 14 June, 2024;
originally announced June 2024.
-
LLM-Vectorizer: LLM-based Verified Loop Vectorizer
Authors:
Jubi Taneja,
Avery Laird,
Cong Yan,
Madan Musuvathi,
Shuvendu K. Lahiri
Abstract:
Vectorization is a powerful optimization technique that significantly boosts the performance of high performance computing applications operating on large data arrays. Despite decades of research on auto-vectorization, compilers frequently miss opportunities to vectorize code. On the other hand, writing vectorized code manually using compiler intrinsics is still a complex, error-prone task that de…
▽ More
Vectorization is a powerful optimization technique that significantly boosts the performance of high performance computing applications operating on large data arrays. Despite decades of research on auto-vectorization, compilers frequently miss opportunities to vectorize code. On the other hand, writing vectorized code manually using compiler intrinsics is still a complex, error-prone task that demands deep knowledge of specific architecture and compilers.
In this paper, we evaluate the potential of large-language models (LLMs) to generate vectorized (Single Instruction Multiple Data) code from scalar programs that process individual array elements. We propose a novel finite-state machine multi-agents based approach that harnesses LLMs and test-based feedback to generate vectorized code. Our findings indicate that LLMs are capable of producing high performance vectorized code with run-time speedup ranging from 1.1x to 9.4x as compared to the state-of-the-art compilers such as Intel Compiler, GCC, and Clang.
To verify the correctness of vectorized code, we use Alive2, a leading bounded translation validation tool for LLVM IR. We describe a few domain-specific techniques to improve the scalability of Alive2 on our benchmark dataset. Overall, our approach is able to verify 38.2% of vectorizations as correct on the TSVC benchmark dataset.
△ Less
Submitted 7 June, 2024;
originally announced June 2024.
-
Learning from Litigation: Graphs and LLMs for Retrieval and Reasoning in eDiscovery
Authors:
Sounak Lahiri,
Sumit Pai,
Tim Weninger,
Sanmitra Bhattacharya
Abstract:
Electronic Discovery (eDiscovery) involves identifying relevant documents from a vast collection based on legal production requests. The integration of artificial intelligence (AI) and natural language processing (NLP) has transformed this process, helping document review and enhance efficiency and cost-effectiveness. Although traditional approaches like BM25 or fine-tuned pre-trained models are c…
▽ More
Electronic Discovery (eDiscovery) involves identifying relevant documents from a vast collection based on legal production requests. The integration of artificial intelligence (AI) and natural language processing (NLP) has transformed this process, helping document review and enhance efficiency and cost-effectiveness. Although traditional approaches like BM25 or fine-tuned pre-trained models are common in eDiscovery, they face performance, computational, and interpretability challenges. In contrast, Large Language Model (LLM)-based methods prioritize interpretability but sacrifice performance and throughput. This paper introduces DISCOvery Graph (DISCOG), a hybrid approach that combines the strengths of two worlds: a heterogeneous graph-based method for accurate document relevance prediction and subsequent LLM-driven approach for reasoning. Graph representational learning generates embeddings and predicts links, ranking the corpus for a given request, and the LLMs provide reasoning for document relevance. Our approach handles datasets with balanced and imbalanced distributions, outperforming baselines in F1-score, precision, and recall by an average of 12%, 3%, and 16%, respectively. In an enterprise context, our approach drastically reduces document review costs by 99.9% compared to manual processes and by 95% compared to LLM-based classification methods
△ Less
Submitted 29 May, 2024;
originally announced May 2024.
-
Transition from laminar to turbulent pipe flow as a process of growing material instabilities
Authors:
Saptarshi Kumar Lahiri,
Konstantin Volokh
Abstract:
In this work, we simulate the transition to turbulence in the pipe flow based on the modified NS theory incorporating the viscous fluid strength in the constitutive equations. The latter concept enriches theory by allowing for material instabilities in addition to the kinematic ones. We present results of comparative numerical simulations based on the classical NS model and the NS model enhanced w…
▽ More
In this work, we simulate the transition to turbulence in the pipe flow based on the modified NS theory incorporating the viscous fluid strength in the constitutive equations. The latter concept enriches theory by allowing for material instabilities in addition to the kinematic ones. We present results of comparative numerical simulations based on the classical NS model and the NS model enhanced with the finite viscous strength. As expected, simulations based on the classical NS model exhibit stable laminar flow in contrast to experimental observations. Conversely, simulations based on the modified NS model with viscous strength exhibit instabilities and transition to turbulence per experimental observations. The transition to turbulence is triggered by the growing material instabilities.
△ Less
Submitted 10 May, 2024;
originally announced May 2024.
-
Towards Neural Synthesis for SMT-Assisted Proof-Oriented Programming
Authors:
Saikat Chakraborty,
Gabriel Ebner,
Siddharth Bhat,
Sarah Fakhoury,
Sakina Fatima,
Shuvendu Lahiri,
Nikhil Swamy
Abstract:
Proof-oriented programs mix computational content with proofs of program correctness. However, the human effort involved in programming and proving is still substantial, despite the use of Satisfiability Modulo Theories (SMT) solvers to automate proofs in languages such as F*.
Seeking to spur research on using AI to automate the construction of proof-oriented programs, we curate a dataset of 600…
▽ More
Proof-oriented programs mix computational content with proofs of program correctness. However, the human effort involved in programming and proving is still substantial, despite the use of Satisfiability Modulo Theories (SMT) solvers to automate proofs in languages such as F*.
Seeking to spur research on using AI to automate the construction of proof-oriented programs, we curate a dataset of 600K lines of open-source F* programs and proofs, including software used in production systems ranging from Windows and Linux, to Python and Firefox. Our dataset includes around 32K top-level F* definitions, each representing a type-directed program and proof synthesis problem -- producing a definition given a formal specification expressed as an F* type. We provide a program-fragment checker that queries F* to check the correctness of candidate solutions. We believe this is the largest corpus of SMT-assisted program proofs coupled with a reproducible program-fragment checker.
Grounded in this dataset, we investigate the use of AI to synthesize programs and their proofs in F*, with promising results. Our main finding in that the performance of fine-tuned smaller language models (such as Phi-2 or StarCoder) compare favorably with large language models (such as GPT-4), at a much lower computational cost. We also identify various type-based retrieval augmentation techniques and find that they boost performance significantly. With detailed error analysis and case studies, we identify potential strengths and weaknesses of models and techniques and suggest directions for future improvements.
△ Less
Submitted 2 May, 2024;
originally announced May 2024.
-
3DGen: AI-Assisted Generation of Provably Correct Binary Format Parsers
Authors:
Sarah Fakhoury,
Markus Kuppe,
Shuvendu K. Lahiri,
Tahina Ramananandro,
Nikhil Swamy
Abstract:
Improper parsing of attacker-controlled input is a leading source of software security vulnerabilities, especially when programmers transcribe informal format descriptions in RFCs into efficient parsing logic in low-level, memory unsafe languages. Several researchers have proposed formal specification languages for data formats from which efficient code can be extracted. However, distilling inform…
▽ More
Improper parsing of attacker-controlled input is a leading source of software security vulnerabilities, especially when programmers transcribe informal format descriptions in RFCs into efficient parsing logic in low-level, memory unsafe languages. Several researchers have proposed formal specification languages for data formats from which efficient code can be extracted. However, distilling informal requirements into formal specifications is challenging and, despite their benefits, new, formal languages are hard for people to learn and use.
In this work, we present 3DGen, a framework that makes use of AI agents to transform mixed informal input, including natural language documents (i.e., RFCs) and example inputs into format specifications in a language called 3D. To support humans in understanding and trusting the generated specifications, 3DGen uses symbolic methods to also synthesize test inputs that can be validated against an external oracle. Symbolic test generation also helps in distinguishing multiple plausible solutions. Through a process of repeated refinement, 3DGen produces a 3D specification that conforms to a test suite, and which yields safe, efficient, provably correct, parsing code in C.
We have evaluated 3DGen on 20 Internet standard formats, demonstrating the potential for AI-agents to produce formally verified C code at a non-trivial scale. A key enabler is the use of a domain-specific language to limit AI outputs to a class for which automated, symbolic analysis is tractable.
△ Less
Submitted 6 May, 2024; v1 submitted 16 April, 2024;
originally announced April 2024.
-
LLM-based Test-driven Interactive Code Generation: User Study and Empirical Evaluation
Authors:
Sarah Fakhoury,
Aaditya Naik,
Georgios Sakkas,
Saikat Chakraborty,
Shuvendu K. Lahiri
Abstract:
Large language models (LLMs) have shown great potential in automating significant aspects of coding by producing natural code from informal natural language (NL) intent. However, given NL is informal, it does not lend easily to checking that the generated code correctly satisfies the user intent. In this paper, we propose a novel interactive workflow TiCoder for guided intent clarification (i.e.,…
▽ More
Large language models (LLMs) have shown great potential in automating significant aspects of coding by producing natural code from informal natural language (NL) intent. However, given NL is informal, it does not lend easily to checking that the generated code correctly satisfies the user intent. In this paper, we propose a novel interactive workflow TiCoder for guided intent clarification (i.e., partial formalization) through tests to support the generation of more accurate code suggestions. Through a mixed methods user study with 15 programmers, we present an empirical evaluation of the effectiveness of the workflow to improve code generation accuracy. We find that participants using the proposed workflow are significantly more likely to correctly evaluate AI generated code, and report significantly less task-induced cognitive load. Furthermore, we test the potential of the workflow at scale with four different state-of-the-art LLMs on two python datasets, using an idealized proxy for a user feedback. We observe an average absolute improvement of 38.43% in the pass@1 code generation accuracy for both datasets and across all LLMs within 5 user interactions, in addition to the automatic generation of accompanying unit tests.
△ Less
Submitted 15 April, 2024;
originally announced April 2024.
-
Competing topological phases in a non-Hermitian time-reversal symmetry-broken Bernevig-Hughes-Zhang model
Authors:
Dipendu Halder,
Srijata Lahiri,
Saurabh Basu
Abstract:
The Bernevig-Hughes-Zhang (BHZ) model, which serves as a cornerstone in the study of the quantum spin Hall insulators, showcases robust spin-filtered helical edge states in a nanoribbon geometry. In the presence of an in-plane magnetic field, these (first-order) helical states gap out to be replaced by second-order corner states under suitable open-boundary conditions. Here, we show that the inclu…
▽ More
The Bernevig-Hughes-Zhang (BHZ) model, which serves as a cornerstone in the study of the quantum spin Hall insulators, showcases robust spin-filtered helical edge states in a nanoribbon geometry. In the presence of an in-plane magnetic field, these (first-order) helical states gap out to be replaced by second-order corner states under suitable open-boundary conditions. Here, we show that the inclusion of a spin-dependent non-Hermitian balanced gain/loss potential induces a competition between these first and second-order topological phases. Surprisingly, the previously dormant first-order helical edge states in the nanoribbon resurface as the non-Hermitian effect intensifies, effectively neutralizing the role played by the magnetic field. By employing the projected spin spectra and the spin Chern number, we conclusively explain the resurgence of the first-order topological properties in the time-reversal symmetry-broken BHZ model in presence of non-Hermiticity. Finally, the biorthogonal spin-resolved Berry phase, exhibiting a non-trivial winding, definitively establishes the topological nature of these revived edge states, emphasizing the dominance of non-Hermiticity over the magnetic field.
△ Less
Submitted 5 April, 2024;
originally announced April 2024.
-
Probabilistic Guarantees of Stochastic Recursive Gradient in Non-Convex Finite Sum Problems
Authors:
Yanjie Zhong,
Jiaqi Li,
Soumendra Lahiri
Abstract:
This paper develops a new dimension-free Azuma-Hoeffding type bound on summation norm of a martingale difference sequence with random individual bounds. With this novel result, we provide high-probability bounds for the gradient norm estimator in the proposed algorithm Prob-SARAH, which is a modified version of the StochAstic Recursive grAdient algoritHm (SARAH), a state-of-art variance reduced al…
▽ More
This paper develops a new dimension-free Azuma-Hoeffding type bound on summation norm of a martingale difference sequence with random individual bounds. With this novel result, we provide high-probability bounds for the gradient norm estimator in the proposed algorithm Prob-SARAH, which is a modified version of the StochAstic Recursive grAdient algoritHm (SARAH), a state-of-art variance reduced algorithm that achieves optimal computational complexity in expectation for the finite sum problem. The in-probability complexity by Prob-SARAH matches the best in-expectation result up to logarithmic factors. Empirical experiments demonstrate the superior probabilistic performance of Prob-SARAH on real datasets compared to other popular algorithms.
△ Less
Submitted 29 January, 2024;
originally announced January 2024.
-
Resource Leak Checker (RLC#) for C# Code using CodeQL
Authors:
Pritam Gharat,
Narges Shadab,
Shrey Tiwari,
Shuvendu Lahiri,
Akash Lal
Abstract:
Resource leaks occur when a program fails to release a finite resource after it is no longer needed. These leaks are a significant cause of real-world crashes and performance issues. Given their critical impact on software performance and security, detecting and preventing resource leaks is a crucial problem.
Recent research has proposed a specify-and-check approach to prevent resource leaks. In…
▽ More
Resource leaks occur when a program fails to release a finite resource after it is no longer needed. These leaks are a significant cause of real-world crashes and performance issues. Given their critical impact on software performance and security, detecting and preventing resource leaks is a crucial problem.
Recent research has proposed a specify-and-check approach to prevent resource leaks. In this approach, programmers write resource management specifications that guide how resources are stored, passed around, and released within an application. We have developed a tool called RLC#, for detecting resource leaks in C# code. Inspired by the Resource Leak Checker (RLC) from the Checker Framework, RLC# employs CodeQL for intraprocedural data flow analysis. The tool operates in a modular fashion and relies on resource management specifications integrated at method boundaries for interprocedural analysis.
In practice, RLC# has successfully identified 24 resource leaks in open-source projects and internal proprietary Azure microservices. Its implementation is declarative, and it scales well. While it incurs a reasonable false positive rate, the burden on developers is minimal, involving the addition of specifications to the source code.
△ Less
Submitted 5 December, 2023; v1 submitted 4 December, 2023;
originally announced December 2023.
-
Wannier charge center, spin resolved bulk polarization and corner modes in a strained quantum spin Hall insulator
Authors:
Srijata Lahiri,
Saurabh Basu
Abstract:
Topological invariants are a significant ingredient in the study of topological phases of matter that intertwines the supposedly contradicting concepts of bulk and boundary. The nature of the invariants differ depending on the dimension of the boundary at which the topological states manifest themselves. The primary motivation of this work is to study two distinct scenarios of topological phase, d…
▽ More
Topological invariants are a significant ingredient in the study of topological phases of matter that intertwines the supposedly contradicting concepts of bulk and boundary. The nature of the invariants differ depending on the dimension of the boundary at which the topological states manifest themselves. The primary motivation of this work is to study two distinct scenarios of topological phase, differing in the dimensionality of their boundary states and study the associated bulk topological invariants that characterize them. In this regard, we study the band engineered Kane Mele model which originally is a prototypical example of a system that hosts quantum spin Hall effect on a honeycomb lattice. Under a smooth band deformation caused by varying one of the nearest neighbor hopping amplitudes (say $t_1$) as compared to the other two (say $t$), we observe that the system transits from its first order topological insulating state (or quantum spin Hall state) to a second order topological insulating (SOTI) state via a gap closing transition. This transition occurs when the system crosses a particular threshold of the deformation parameter $t_1\mathbin{/}t$ (namely $t_1\mathbin{/}t=2$). We show the presence of edge and corner modes as a signature of first and second order topology respectively. Further, we observe the evolution of the Wannier charge center (WCC), a bulk property as a function of the deformation parameter ${t_1}\mathbin{/}{t}$. We also find that, while the $\mathbb{Z}_2$ invariant successfully characterizes the QSH state, it cannot characterize higher order topology (second order here). The model being mirror invariant, we also calculate mirror winding number to show that it is rendered trivial in the SOTI phase as well, while being non-trivial in the QSH phase. Finally, spin resolved bulk polarization establishes the SOTI phase as obstructed atomic insulator.
△ Less
Submitted 27 November, 2023;
originally announced November 2023.
-
Finding Inductive Loop Invariants using Large Language Models
Authors:
Adharsh Kamath,
Aditya Senthilnathan,
Saikat Chakraborty,
Pantazis Deligiannis,
Shuvendu K. Lahiri,
Akash Lal,
Aseem Rastogi,
Subhajit Roy,
Rahul Sharma
Abstract:
Loop invariants are fundamental to reasoning about programs with loops. They establish properties about a given loop's behavior. When they additionally are inductive, they become useful for the task of formal verification that seeks to establish strong mathematical guarantees about program's runtime behavior. The inductiveness ensures that the invariants can be checked locally without consulting t…
▽ More
Loop invariants are fundamental to reasoning about programs with loops. They establish properties about a given loop's behavior. When they additionally are inductive, they become useful for the task of formal verification that seeks to establish strong mathematical guarantees about program's runtime behavior. The inductiveness ensures that the invariants can be checked locally without consulting the entire program, thus are indispensable artifacts in a formal proof of correctness. Finding inductive loop invariants is an undecidable problem, and despite a long history of research towards practical solutions, it remains far from a solved problem. This paper investigates the capabilities of the Large Language Models (LLMs) in offering a new solution towards this old, yet important problem. To that end, we first curate a dataset of verification problems on programs with loops. Next, we design a prompt for exploiting LLMs, obtaining inductive loop invariants, that are checked for correctness using sound symbolic tools. Finally, we explore the effectiveness of using an efficient combination of a symbolic tool and an LLM on our dataset and compare it against a purely symbolic baseline. Our results demonstrate that LLMs can help improve the state-of-the-art in automated program verification.
△ Less
Submitted 14 November, 2023;
originally announced November 2023.
-
Ranking LLM-Generated Loop Invariants for Program Verification
Authors:
Saikat Chakraborty,
Shuvendu K. Lahiri,
Sarah Fakhoury,
Madanlal Musuvathi,
Akash Lal,
Aseem Rastogi,
Aditya Senthilnathan,
Rahul Sharma,
Nikhil Swamy
Abstract:
Synthesizing inductive loop invariants is fundamental to automating program verification. In this work, we observe that Large Language Models (such as gpt-3.5 or gpt-4) are capable of synthesizing loop invariants for a class of programs in a 0-shot setting, yet require several samples to generate the correct invariants. This can lead to a large number of calls to a program verifier to establish an…
▽ More
Synthesizing inductive loop invariants is fundamental to automating program verification. In this work, we observe that Large Language Models (such as gpt-3.5 or gpt-4) are capable of synthesizing loop invariants for a class of programs in a 0-shot setting, yet require several samples to generate the correct invariants. This can lead to a large number of calls to a program verifier to establish an invariant. To address this issue, we propose a {\it re-ranking} approach for the generated results of LLMs. We have designed a ranker that can distinguish between correct inductive invariants and incorrect attempts based on the problem definition. The ranker is optimized as a contrastive ranker. Experimental results demonstrate that this re-ranking mechanism significantly improves the ranking of correct invariants among the generated candidates, leading to a notable reduction in the number of calls to a verifier. The source code and the experimental data for this paper are available in \url{https://github.com/microsoft/NeuralInvariantRanker}.
△ Less
Submitted 12 February, 2024; v1 submitted 13 October, 2023;
originally announced October 2023.
-
Program Structure Aware Precondition Generation
Authors:
Elizabeth Dinella,
Shuvendu Lahiri,
Mayur Naik
Abstract:
We introduce a novel approach for inferring natural preconditions from code. Our technique produces preconditions of high quality in terms of both correctness (modulo a test generator) and naturalness. Prior works generate preconditions from scratch through combinations of boolean predicates, but fall short in readability and ease of comprehension. Our innovation lies in, instead, leveraging the s…
▽ More
We introduce a novel approach for inferring natural preconditions from code. Our technique produces preconditions of high quality in terms of both correctness (modulo a test generator) and naturalness. Prior works generate preconditions from scratch through combinations of boolean predicates, but fall short in readability and ease of comprehension. Our innovation lies in, instead, leveraging the structure of a target method as a seed to infer a precondition through program transformations. Our evaluation shows that humans can more easily reason over preconditions inferred using our approach. Lastly, we instantiate our technique into a framework which can be applied at scale. We present a dataset of ~18k Java (method, precondition) pairs obtained by applying our framework to 87 real-world projects. We use this dataset to both evaluate our approach and draw useful insights for future research in precondition inference.
△ Less
Submitted 3 October, 2023;
originally announced October 2023.
-
Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?
Authors:
Madeline Endres,
Sarah Fakhoury,
Saikat Chakraborty,
Shuvendu K. Lahiri
Abstract:
Informal natural language that describes code functionality, such as code comments or function documentation, may contain substantial information about a programs intent. However, there is typically no guarantee that a programs implementation and natural language documentation are aligned. In the case of a conflict, leveraging information in code-adjacent natural language has the potential to enha…
▽ More
Informal natural language that describes code functionality, such as code comments or function documentation, may contain substantial information about a programs intent. However, there is typically no guarantee that a programs implementation and natural language documentation are aligned. In the case of a conflict, leveraging information in code-adjacent natural language has the potential to enhance fault localization, debugging, and code trustworthiness. In practice, however, this information is often underutilized due to the inherent ambiguity of natural language which makes natural language intent challenging to check programmatically. The emergent abilities of Large Language Models (LLMs) have the potential to facilitate the translation of natural language intent to programmatically checkable assertions. However, it is unclear if LLMs can correctly translate informal natural language specifications into formal specifications that match programmer intent. Additionally, it is unclear if such translation could be useful in practice. In this paper, we describe nl2postcond, the problem of leveraging LLMs for transforming informal natural language to formal method postconditions, expressed as program assertions. We introduce and validate metrics to measure and compare different nl2postcond approaches, using the correctness and discriminative power of generated postconditions. We then use qualitative and quantitative methods to assess the quality of nl2postcond postconditions, finding that they are generally correct and able to discriminate incorrect code. Finally, we find that nl2postcond via LLMs has the potential to be helpful in practice; nl2postcond generated postconditions were able to catch 64 real-world historical bugs from Defects4J.
△ Less
Submitted 15 April, 2024; v1 submitted 3 October, 2023;
originally announced October 2023.
-
Efficiency of a microscopic heat engine subjected to stochastic resetting
Authors:
Sourabh Lahiri,
Shamik Gupta
Abstract:
We explore the thermodynamics of stochastic heat engines in presence of stochastic resetting. The set-up comprises an engine whose working substance is a Brownian particle undergoing overdamped Langevin dynamics in a harmonic potential with a time-dependent stiffness, with the dynamics interrupted at random times with a resetting to a fixed location. The effect of resetting to the potential minimu…
▽ More
We explore the thermodynamics of stochastic heat engines in presence of stochastic resetting. The set-up comprises an engine whose working substance is a Brownian particle undergoing overdamped Langevin dynamics in a harmonic potential with a time-dependent stiffness, with the dynamics interrupted at random times with a resetting to a fixed location. The effect of resetting to the potential minimum is shown to enhance the efficiency of the engine, while the output work is shown to have a non-monotonic dependence on the rate of resetting. The resetting events are found to drive the system out of linear response regime even for small differences in the bath temperatures. Shifting the reset point from the potential minimum is observed to reduce the engine efficiency. The experimental set-up for the realization of such an engine is briefly discussed.
△ Less
Submitted 23 January, 2024; v1 submitted 29 August, 2023;
originally announced August 2023.
-
Stationary equilibrium torus supported by Weyssenhoff ideal spin fluid in Schwarzschild spacetime -- I: Case of constant specific angular momentum distribution
Authors:
Sayantani Lahiri,
Claus Laemmerzahl
Abstract:
We consider a non-self-gravitating geometrically thick torus described by Weyssenhoff ideal spin fluid in a black hole spacetime. The Weyssenhof spin fluid shares the same symmetries of the background geometry, i,e. stationarity and axisymmetry and further describes circular orbital motion in the black hole spacetime. We further assume that assume the alignment of the spin is perpendicular to the…
▽ More
We consider a non-self-gravitating geometrically thick torus described by Weyssenhoff ideal spin fluid in a black hole spacetime. The Weyssenhof spin fluid shares the same symmetries of the background geometry, i,e. stationarity and axisymmetry and further describes circular orbital motion in the black hole spacetime. We further assume that assume the alignment of the spin is perpendicular to the equatorial plane. Under this setup, we determine the integrability conditions of the general relativistic momentum conservation equation of Weyssenhoff ideal spin fluid using the Frenkel spin supplementary condition. In the light of the integrability conditions, we then present stationary equilibrium solutions of the spin fluid torus with constant specific angular momentum distributions around the Schwarzschild black hole by numerically solving the general relativistic momentum conservation equation. Our study reveals that both the iso-pressure and iso-density surfaces of torus get significantly modified in comparison to the ideal fluid torus without a spin fluid, owing to the spin tensor and its coupling to the curvature of the Schwarzschild black hole. In fact, the size of the torus is also found to be enhanced (diminished) depending on positive (negative) magnitude of spin parameter $s_0$. We finally estimate the magnitude of $s_0$ by assuming the torus to be composed of spin-1/2 particles.
△ Less
Submitted 30 July, 2023;
originally announced July 2023.
-
Inference of Resource Management Specifications
Authors:
Narges Shadab,
Pritam Gharat,
Shrey Tiwari,
Michael D. Ernst,
Martin Kellogg,
Shuvendu Lahiri,
Akash Lal,
Manu Sridharan
Abstract:
A resource leak occurs when a program fails to free some finite resource after it is no longer needed. Such leaks are a significant cause of real-world crashes and performance problems. Recent work proposed an approach to prevent resource leaks based on checking resource management specifications. A resource management specification expresses how the program allocates resources, passes them around…
▽ More
A resource leak occurs when a program fails to free some finite resource after it is no longer needed. Such leaks are a significant cause of real-world crashes and performance problems. Recent work proposed an approach to prevent resource leaks based on checking resource management specifications. A resource management specification expresses how the program allocates resources, passes them around, and releases them; it also tracks the ownership relationship between objects and resources, and aliasing relationships between objects. While this specify-and-verify approach has several advantages compared to prior techniques, the need to manually write annotations presents a significant barrier to its practical adoption.
This paper presents a novel technique to automatically infer a resource management specification for a program, broadening the applicability of specify-and-check verification for resource leaks. Inference in this domain is challenging because resource management specifications differ significantly in nature from the types that most inference techniques target. Further, for practical effectiveness, we desire a technique that can infer the resource management specification intended by the developer, even in cases when the code does not fully adhere to that specification. We address these challenges through a set of inference rules carefully designed to capture real-world coding patterns, yielding an effective fixed-point-based inference algorithm.
We have implemented our inference algorithm in two different systems, targeting programs written in Java and C#. In an experimental evaluation, our technique inferred 85.5% of the annotations that programmers had written manually for the benchmarks. Further, the verifier issued nearly the same rate of false alarms with the manually-written and automatically-inferred annotations.
△ Less
Submitted 21 September, 2023; v1 submitted 20 June, 2023;
originally announced June 2023.
-
Guiding Language Models of Code with Global Context using Monitors
Authors:
Lakshya A Agrawal,
Aditya Kanade,
Navin Goyal,
Shuvendu K. Lahiri,
Sriram K. Rajamani
Abstract:
Language models of code (LMs) work well when the surrounding code provides sufficient context. This is not true when it becomes necessary to use types, functionality or APIs defined elsewhere in the repository or a linked library, especially those not seen during training. LMs suffer from limited awareness of such global context and end up hallucinating.
Integrated development environments (IDEs…
▽ More
Language models of code (LMs) work well when the surrounding code provides sufficient context. This is not true when it becomes necessary to use types, functionality or APIs defined elsewhere in the repository or a linked library, especially those not seen during training. LMs suffer from limited awareness of such global context and end up hallucinating.
Integrated development environments (IDEs) assist developers in understanding repository context using static analysis. We extend this assistance, enjoyed by developers, to LMs. We propose monitor-guided decoding (MGD) where a monitor uses static analysis to guide the decoding. We construct a repository-level dataset PragmaticCode for method-completion in Java and evaluate MGD on it. On models of varying parameter scale, by monitoring for type-consistent object dereferences, MGD consistently improves compilation rates and agreement with ground truth. Further, LMs with fewer parameters, when augmented with MGD, can outperform larger LMs. With MGD, SantaCoder-1.1B achieves better compilation rate and next-identifier match than the much larger text-davinci-003 model.
We also conduct a generalizability study to evaluate the ability of MGD to generalize to multiple programming languages (Java, C# and Rust), coding scenarios (e.g., correct number of arguments to method calls), and to enforce richer semantic constraints (e.g., stateful API protocols). Our data and implementation are available at https://github.com/microsoft/monitors4codegen .
△ Less
Submitted 3 November, 2023; v1 submitted 19 June, 2023;
originally announced June 2023.
-
Online Bootstrap Inference with Nonconvex Stochastic Gradient Descent Estimator
Authors:
Yanjie Zhong,
Todd Kuffner,
Soumendra Lahiri
Abstract:
In this paper, we investigate the theoretical properties of stochastic gradient descent (SGD) for statistical inference in the context of nonconvex optimization problems, which have been relatively unexplored compared to convex settings. Our study is the first to establish provable inferential procedures using the SGD estimator for general nonconvex objective functions, which may contain multiple…
▽ More
In this paper, we investigate the theoretical properties of stochastic gradient descent (SGD) for statistical inference in the context of nonconvex optimization problems, which have been relatively unexplored compared to convex settings. Our study is the first to establish provable inferential procedures using the SGD estimator for general nonconvex objective functions, which may contain multiple local minima.
We propose two novel online inferential procedures that combine SGD and the multiplier bootstrap technique. The first procedure employs a consistent covariance matrix estimator, and we establish its error convergence rate. The second procedure approximates the limit distribution using bootstrap SGD estimators, yielding asymptotically valid bootstrap confidence intervals. We validate the effectiveness of both approaches through numerical experiments.
Furthermore, our analysis yields an intermediate result: the in-expectation error convergence rate for the original SGD estimator in nonconvex settings, which is comparable to existing results for convex problems. We believe this novel finding holds independent interest and enriches the literature on optimization and statistical inference.
△ Less
Submitted 3 June, 2023;
originally announced June 2023.
-
Thermodynamics of one and two-qubit quantum refrigerators interacting with squeezed baths: a comparative study
Authors:
Ashutosh Kumar,
Sourabh Lahiri
Abstract:
We investigate the nonequilibrium refrigeration of one and two-qubit systems in a squeezed thermal bath. We characterize the performance of one and two-qubit refrigerators in the presence of squeezed heat baths, in terms of their coefficients of performance, cooling rates, and figures of merit. Our results show that the performance of the refrigerators is strongly influenced by the squeezing param…
▽ More
We investigate the nonequilibrium refrigeration of one and two-qubit systems in a squeezed thermal bath. We characterize the performance of one and two-qubit refrigerators in the presence of squeezed heat baths, in terms of their coefficients of performance, cooling rates, and figures of merit. Our results show that the performance of the refrigerators is strongly influenced by the squeezing parameter and the number of qubits. The performance of the two-qubit refrigerator is found to be better than that of the one-qubit refrigerator under the same operating conditions. Our findings suggest that a squeezed thermal bath can be a promising resource for the design of efficient quantum refrigerators in the non-equilibrium regime.
△ Less
Submitted 2 June, 2023;
originally announced June 2023.
-
Sustaining quasi de-Sitter inflation with bulk viscosity
Authors:
Sayantani Lahiri,
Luciano Rezzolla
Abstract:
We here investigate bulk-viscosity driven quasi de-Sitter inflation, that is, the period of accelerated expansion in the early universe during which $-\dot{H}\ll H^2$, with $H(t)$ being the Hubble expansion rate. We do so in the framework of a causal theory of relativistic hydrodynamics that takes into account non-equilibrium effects associated to bulk viscosity that may be present as the early un…
▽ More
We here investigate bulk-viscosity driven quasi de-Sitter inflation, that is, the period of accelerated expansion in the early universe during which $-\dot{H}\ll H^2$, with $H(t)$ being the Hubble expansion rate. We do so in the framework of a causal theory of relativistic hydrodynamics that takes into account non-equilibrium effects associated to bulk viscosity that may be present as the early universe undergoes an accelerated expansion. In this framework, the existence of a quasi de-Sitter universe emerges as a natural consequence of the presence of bulk viscosity, without requiring to introduce additional scalar fields. As a result, the equation of state, determined by numerically solving the generalized momentum-conservation equation involving bulk-viscosity pressure turns out to be time-dependent. The transition timescale characterising its departure from an exact de-Sitter phase is intricately related to the magnitude of the bulk viscosity. We examine the properties of the new equation of state, as well as the transition timescale in presence of bulk-viscosity pressure. In addition, we construct a fluid description of inflation and demonstrated that, in the context of the causal formalism, it is equivalent to the scalar field theory of inflation. Our analysis also shows that the slow-roll conditions are realised in the bulk-viscosity supported model of inflation. Finally, we examine the viability of our model by computing the inflationary observables, namely, the spectral index and the tensor-to-scalar ratio of the curvature perturbations, and compare them with a number of different observations finding good agreement in most cases.
△ Less
Submitted 20 February, 2024; v1 submitted 13 May, 2023;
originally announced May 2023.
-
Fast parameter estimation of Generalized Extreme Value distribution using Neural Networks
Authors:
Sweta Rai,
Alexis Hoffman,
Soumendra Lahiri,
Douglas W. Nychka,
Stephan R. Sain,
Soutir Bandyopadhyay
Abstract:
The heavy-tailed behavior of the generalized extreme-value distribution makes it a popular choice for modeling extreme events such as floods, droughts, heatwaves, wildfires, etc. However, estimating the distribution's parameters using conventional maximum likelihood methods can be computationally intensive, even for moderate-sized datasets. To overcome this limitation, we propose a computationally…
▽ More
The heavy-tailed behavior of the generalized extreme-value distribution makes it a popular choice for modeling extreme events such as floods, droughts, heatwaves, wildfires, etc. However, estimating the distribution's parameters using conventional maximum likelihood methods can be computationally intensive, even for moderate-sized datasets. To overcome this limitation, we propose a computationally efficient, likelihood-free estimation method utilizing a neural network. Through an extensive simulation study, we demonstrate that the proposed neural network-based method provides Generalized Extreme Value (GEV) distribution parameter estimates with comparable accuracy to the conventional maximum likelihood method but with a significant computational speedup. To account for estimation uncertainty, we utilize parametric bootstrapping, which is inherent in the trained network. Finally, we apply this method to 1000-year annual maximum temperature data from the Community Climate System Model version 3 (CCSM3) across North America for three atmospheric concentrations: 289 ppm $\mathrm{CO}_2$ (pre-industrial), 700 ppm $\mathrm{CO}_2$ (future conditions), and 1400 ppm $\mathrm{CO}_2$, and compare the results with those obtained using the maximum likelihood approach.
△ Less
Submitted 7 May, 2023;
originally announced May 2023.
-
Stochastic Heat Engine Using Multiple Interacting Active Particles
Authors:
Aradhana Kumari,
Md Samsuzzaman,
Arnab Saha,
Sourabh Lahiri
Abstract:
The area of stochastic heat engines using active particles has attracted a lot of attention recently. They have been shown to exhibit advantages over engines using passive particles. In this work, we use multiple self-propelling particles undergoing Vicsek-like aligning interaction as our working system. The particles are confined in a two-dimensional circular trap. The interplay between the confi…
▽ More
The area of stochastic heat engines using active particles has attracted a lot of attention recently. They have been shown to exhibit advantages over engines using passive particles. In this work, we use multiple self-propelling particles undergoing Vicsek-like aligning interaction as our working system. The particles are confined in a two-dimensional circular trap. The interplay between the confinement and the activity of the particles induces clustering. These clusters change their locations relative to the walls of the trap, when the wall steepness is varied with time. In this work we demonstrate that changing the steepness of the wall and the activity of the particles time-periodically can cause the system to act as an engine. In this setup, we study the variations in extracted work with the activity, rotational diffusion, and the Vicsek radius of individual particles. We also comment on the complications involved in the definition of the engine efficiency in accordance with the usual prescription of stochastic thermodynamics.
△ Less
Submitted 24 April, 2023;
originally announced April 2023.
-
Quantum phases of constrained bosons on a two-leg Bose-Hubbard ladder
Authors:
Ashirbad Padhan,
Rajashri Parida,
Sayan Lahiri,
Mrinal Kanti Giri,
Tapan Mishra
Abstract:
Bosons in periodic potentials with very strong local interactions, known as the constrained bosons often exhibit interesting physical behavior. We investigate the ground state properties of a two-leg Bose-Hubbard ladder by imposing three-body constraint in one leg and hardcore constraint in the other. By using the cluster-mean-field theory approximation and the density matrix renormalization group…
▽ More
Bosons in periodic potentials with very strong local interactions, known as the constrained bosons often exhibit interesting physical behavior. We investigate the ground state properties of a two-leg Bose-Hubbard ladder by imposing three-body constraint in one leg and hardcore constraint in the other. By using the cluster-mean-field theory approximation and the density matrix renormalization group method, we show that at unit filling, for strong two-body attraction among the three-body constrained bosons, the system becomes a gapped pair-Mott insulator where all the bosons form strong bound pairs and occupy the leg with three-body constraint. With increase in hopping strength this pair-Mott insulator phase undergoes a phase transition to the gapless superfluid phase for equal leg and rung hopping strengths. However, when the rung hopping is stronger compared to the leg hopping, we obtain a crossover to another gapped phase which is called the rung-Mott insulator phase where the bosons prefer to delocalize on the rungs than the legs. By moving away from unit filling, the system remains in the superfluid phase except for a small region below the gapped phase where a pair superfluid phase is stabilized in the regime of strong attractive interaction. We further extend our studies by considering three-body constraint on both the legs and find that the crossover from the gapped to gapped phase does not occur rather the system undergoes a transition from a pair-rung-Mott insulator phase to the superfluid phase at unit filling. Moreover, in this case we find the signature of the pair superfluid phase on either sides of this gapped phase.
△ Less
Submitted 23 April, 2023;
originally announced April 2023.
-
Higher order topology in a band deformed Haldane model
Authors:
Srijata Lahiri,
Saurabh Basu
Abstract:
Haldane model is a celebrated tight binding toy model in a 2D honeycomb lattice that exhibits quantized Hall conductance in the absence of an external magnetic field. In our work, we deform the bands of the Haldane model smoothly by varying one of its three nearest neighbour hopping amplitudes ($t_1$), while keeping the other two ($t$) fixed. This breaks the $C_3$ symmetry of the Hamiltonian, whil…
▽ More
Haldane model is a celebrated tight binding toy model in a 2D honeycomb lattice that exhibits quantized Hall conductance in the absence of an external magnetic field. In our work, we deform the bands of the Haldane model smoothly by varying one of its three nearest neighbour hopping amplitudes ($t_1$), while keeping the other two ($t$) fixed. This breaks the $C_3$ symmetry of the Hamiltonian, while the $M_x*T$ symmetry is preserved. The symmetry breaking causes the Dirac cones to shift from the K and the K' points in the Brillouin zone (BZ) to an intermediate M point. This is evident from the Berry curvature plots which show a similar shift in the corresponding values as a function of $\frac{t_1}{t}$. We observe two different topological phases, one being a topological insulator (TI) phase and the other is a higher order topological insulator (HOTI). The Chern number ($C$) remains perfectly quantized at a value of $C=1$ for the TI phase and goes to zero in the HOTI phase. Furthermore the evolution of the Wannier charge center (WCC) as the band is deformed shows a jump in the TI phase indicating a non-trivial bulk. We also study the HOTI phase and diagonalize the real space Hamiltonian on a rhombic supercell to show the presence of in-gap zero energy corner modes. The polarization of the system, namely $p_x$ and $p_y$, are evaluated, along the $x$ and the $y$ directions respectively. We see that both $p_x$ and $p_y$ are quantized in the HOTI phase owing to the presence of the inversion symmetry of the system.
△ Less
Submitted 20 April, 2023;
originally announced April 2023.
-
Exploring outputs from concatenated stochastic heat engines
Authors:
Aradhana Kumari,
Rahul Marathe,
Sourabh Lahiri
Abstract:
Recent works on the concatenation of two simple heat engines have shown that it may lead to non-monotonic variations in the efficiency and power with parameters like driving amplitudes and asymmetries in cycle periods. Motivated by this study, we investigate the effect of the concatenation between two stochastic heat engines where colloidal particles have been trapped in harmonic potentials. The s…
▽ More
Recent works on the concatenation of two simple heat engines have shown that it may lead to non-monotonic variations in the efficiency and power with parameters like driving amplitudes and asymmetries in cycle periods. Motivated by this study, we investigate the effect of the concatenation between two stochastic heat engines where colloidal particles have been trapped in harmonic potentials. The stiffness parameters of each engine are varied cyclically, but with different cycle periods, with a common thermal bath that acts as a sink for the first engine but as a source for the second. We consider two types of protocols, first where the trap strength undergoes sudden jumps, and the second where it varies linearly with time. In both we find several non-trivial effects, like the the non-monotonic functional dependence of the engine outputs on several parameters used in the setup. For a protocol that varies linearly with time, the concatenation leads to enhanced output power as compared to a single effective engine, in a suitable range of parameters. It has been shown that the output from the combined system shows a peak with respect to the asymmetry in cycle times of the engines that have been concatenated. A general relation of the efficiency of an arbitrary number of concatenated engines driven quasistatically has been provided.
△ Less
Submitted 11 August, 2023; v1 submitted 17 April, 2023;
originally announced April 2023.
-
Towards Generating Functionally Correct Code Edits from Natural Language Issue Descriptions
Authors:
Sarah Fakhoury,
Saikat Chakraborty,
Madan Musuvathi,
Shuvendu K. Lahiri
Abstract:
Large language models (LLMs), such as OpenAI's Codex, have demonstrated their potential to generate code from natural language descriptions across a wide range of programming tasks. Several benchmarks have recently emerged to evaluate the ability of LLMs to generate functionally correct code from natural language intent with respect to a set of hidden test cases. This has enabled the research comm…
▽ More
Large language models (LLMs), such as OpenAI's Codex, have demonstrated their potential to generate code from natural language descriptions across a wide range of programming tasks. Several benchmarks have recently emerged to evaluate the ability of LLMs to generate functionally correct code from natural language intent with respect to a set of hidden test cases. This has enabled the research community to identify significant and reproducible advancements in LLM capabilities. However, there is currently a lack of benchmark datasets for assessing the ability of LLMs to generate functionally correct code edits based on natural language descriptions of intended changes. This paper aims to address this gap by motivating the problem NL2Fix of translating natural language descriptions of code changes (namely bug fixes described in Issue reports in repositories) into correct code fixes. To this end, we introduce Defects4J-NL2Fix, a dataset of 283 Java programs from the popular Defects4J dataset augmented with high-level descriptions of bug fixes, and empirically evaluate the performance of several state-of-the-art LLMs for the this task. Results show that these LLMS together are capable of generating plausible fixes for 64.6% of the bugs, and the best LLM-based technique can achieve up to 21.20% top-1 and 35.68% top-5 accuracy on this benchmark.
△ Less
Submitted 7 April, 2023;
originally announced April 2023.
-
Higher order topology in a Creutz ladder
Authors:
Srijata Lahiri,
Saurabh Basu
Abstract:
A Creutz ladder, is a quasi one dimensional system hosting robust topological phases with localized edge modes protected by different symmetries such as inversion, chiral and particle-hole symmetries. Non-trivial topology is observed in a large region of the parameter space defined by the horizontal, diagonal and vertical hopping ampitudes and a transverse magnetic flux that threads through the la…
▽ More
A Creutz ladder, is a quasi one dimensional system hosting robust topological phases with localized edge modes protected by different symmetries such as inversion, chiral and particle-hole symmetries. Non-trivial topology is observed in a large region of the parameter space defined by the horizontal, diagonal and vertical hopping ampitudes and a transverse magnetic flux that threads through the ladder. In this work, we investigate higher order topology in a two dimensional extrapolated version of the Creutz ladder. To explore the topological phases, we consider two different configurations, namely a torus (periodic boundary) and a ribbon (open boundary) to look for hints of gap closing phase transitions. We also associate suitable topological invariants to characterize the non-trivial sectors. Further, we find that the resultant phase diagram hosts two different topological phases, one where the higher order topological excitations are realized in the form of robust corner modes, along with (usual) first order excitations demonstrated via the presence of edge modes in a finite lattice, for the other.
△ Less
Submitted 22 September, 2022;
originally announced September 2022.
-
Symbolic Execution for Randomized Programs
Authors:
Zachary Susag,
Sumit Lahiri,
Justin Hsu,
Subhajit Roy
Abstract:
We propose a symbolic execution method for programs that can draw random samples. In contrast to existing work, our method can verify randomized programs with unknown inputs and can prove probabilistic properties that universally quantify over all possible inputs. Our technique augments standard symbolic execution with a new class of \emph{probabilistic symbolic variables}, which represent the res…
▽ More
We propose a symbolic execution method for programs that can draw random samples. In contrast to existing work, our method can verify randomized programs with unknown inputs and can prove probabilistic properties that universally quantify over all possible inputs. Our technique augments standard symbolic execution with a new class of \emph{probabilistic symbolic variables}, which represent the results of random draws, and computes symbolic expressions representing the probability of taking individual paths. We implement our method on top of the \textsc{KLEE} symbolic execution engine alongside multiple optimizations and use it to prove properties about probabilities and expected values for a range of challenging case studies written in C++, including Freivalds' algorithm, randomized quicksort, and a randomized property-testing algorithm for monotonicity. We evaluate our method against \textsc{Psi}, an exact probabilistic symbolic inference engine, and \textsc{Storm}, a probabilistic model checker, and show that our method significantly outperforms both tools.
△ Less
Submitted 16 September, 2022;
originally announced September 2022.
-
Automated Synthesis of Asynchronizations
Authors:
Sidi Mohamed Beillahi,
Ahmed Bouajjani,
Constantin Enea,
Shuvendu Lahiri
Abstract:
Asynchronous programming is widely adopted for building responsive and efficient software, and modern languages such as C# provide async/await primitives to simplify the use of asynchrony. In this paper, we propose an approach for refactoring a sequential program into an asynchronous program that uses async/await, called asynchronization. The refactoring process is parametrized by a set of methods…
▽ More
Asynchronous programming is widely adopted for building responsive and efficient software, and modern languages such as C# provide async/await primitives to simplify the use of asynchrony. In this paper, we propose an approach for refactoring a sequential program into an asynchronous program that uses async/await, called asynchronization. The refactoring process is parametrized by a set of methods to replace with asynchronous versions, and it is constrained to avoid introducing data races. We investigate the delay complexity of enumerating all data race free asynchronizations, which quantifies the delay between outputting two consecutive solutions. We show that this is polynomial time modulo an oracle for solving reachability in sequential programs. We also describe a pragmatic approach based on an interprocedural data-flow analysis with polynomial-time delay complexity. The latter approach has been implemented and evaluated on a number of non-trivial C# programs extracted from open-source repositories
△ Less
Submitted 14 September, 2022;
originally announced September 2022.
-
Thermodynamics of one and two-qubit nonequilibrium heat engines running between squeezed thermal reservoirs
Authors:
Ashutosh Kumar,
Trilochan Bagarti,
Sourabh Lahiri,
Subhashish Banerjee
Abstract:
Quantum heat engines form an active field of research due to their potential applications. There are several phenomena that are unique to the quantum regime, some of which are known to give these engines an edge over their classical counterparts. In this work, we focus on the study of one and two-qubit finite-time Otto engines interacting with squeezed thermal baths, and discuss their important di…
▽ More
Quantum heat engines form an active field of research due to their potential applications. There are several phenomena that are unique to the quantum regime, some of which are known to give these engines an edge over their classical counterparts. In this work, we focus on the study of one and two-qubit finite-time Otto engines interacting with squeezed thermal baths, and discuss their important distinctions as well as the advantage of using the two-qubit engine. In particular, the two-qubit engine offers an interesting study of the interplay between the degree of squeezing and that of the coherence between the two qubits. We find that the two-qubit engine generally yields higher power than its one-qubit counterpart. The effective temperature of the squeezed baths can be calculated both for the one and two-qubit engines, and they tend to show an exponential growth with increase in squeezing parameters $r_h$ and $r_c$. It is also observed that by tuning the squeezing parameters, the machine can be made to work either in the engine or in the refrigerator mode. Additional effects due to the change in the inter-qubit separation have been studied.
△ Less
Submitted 14 September, 2022;
originally announced September 2022.
-
Interactive Code Generation via Test-Driven User-Intent Formalization
Authors:
Shuvendu K. Lahiri,
Sarah Fakhoury,
Aaditya Naik,
Georgios Sakkas,
Saikat Chakraborty,
Madanlal Musuvathi,
Piali Choudhury,
Curtis von Veh,
Jeevana Priya Inala,
Chenglong Wang,
Jianfeng Gao
Abstract:
Large language models (LLMs) have shown great potential in automating significant aspects of coding by producing natural code from informal natural language (NL) intent. However, when interacting with LLMs, users have no guarantees that the code suggestions produced correctly satisfy the intent they provided. In fact, it is hard to define a notion of correctness since natural language can be ambig…
▽ More
Large language models (LLMs) have shown great potential in automating significant aspects of coding by producing natural code from informal natural language (NL) intent. However, when interacting with LLMs, users have no guarantees that the code suggestions produced correctly satisfy the intent they provided. In fact, it is hard to define a notion of correctness since natural language can be ambiguous and lacks a formal semantics.
In this paper, we propose the workflow of {\it interactive test-driven code generation}, which leverages lightweight user feedback to (a) formalize the user intent using generated tests that can be useful for debugging, and (b) produce an improved set of code suggestions by pruning and ranking candidate code suggestions. We describe a language-agnostic abstract algorithm and a concrete implementation TiCoder. We perform an automated evaluation of TiCoder on the \emph{MBPP} and \emph{HumanEval} code generation benchmarks. Our results are promising with using the OpenAI Codex LLM: our best algorithm improves the \passk{1} code generation accuracy (in absolute percentages) between $22.49\%$ to $37.71\%$ for MBPP and between $24.79\%$ to $53.98\%$ for HumanEval using between 1 to 5 simulated user queries.
△ Less
Submitted 3 October, 2023; v1 submitted 11 August, 2022;
originally announced August 2022.
-
On optimal block resampling for Gaussian-subordinated long-range dependent processes
Authors:
Qihao Zhang,
Soumendra N. Lahiri,
Daniel J. Nordman
Abstract:
Block-based resampling estimators have been intensively investigated for weakly dependent time processes, which has helped to inform implementation (e.g., best block sizes). However, little is known about resampling performance and block sizes under strong or long-range dependence. To establish guideposts in block selection, we consider a broad class of strongly dependent time processes, formed by…
▽ More
Block-based resampling estimators have been intensively investigated for weakly dependent time processes, which has helped to inform implementation (e.g., best block sizes). However, little is known about resampling performance and block sizes under strong or long-range dependence. To establish guideposts in block selection, we consider a broad class of strongly dependent time processes, formed by a transformation of a stationary long-memory Gaussian series, and examine block-based resampling estimators for the variance of the prototypical sample mean; extensions to general statistical functionals are also considered. Unlike weak dependence, the properties of resampling estimators under strong dependence are shown to depend intricately on the nature of non-linearity in the time series (beyond Hermite ranks) in addition the long-memory coefficient and block size. Additionally, the intuition has often been that optimal block sizes should be larger under strong dependence (say $O(n^{1/2})$ for a sample size $n$) than the optimal order $O(n^{1/3})$ known under weak dependence. This intuition turns out to be largely incorrect, though a block order $O(n^{1/2})$ may be reasonable (and even optimal) in many cases, owing to non-linearity in a long-memory time series. While optimal block sizes are more complex under long-range dependence compared to short-range, we provide a consistent data-driven rule for block selection, and numerical studies illustrate that the guides for block selection perform well in other block-based problems with long-memory time series, such as distribution estimation and strategies for testing Hermite rank.
△ Less
Submitted 2 August, 2022;
originally announced August 2022.
-
Intrinsic nonlinear conductivities induced by the quantum metric
Authors:
Kamal Das,
Shibalik Lahiri,
Rhonald Burgos Atencia,
Dimitrie Culcer,
Amit Agarwal
Abstract:
The second-order nonlinear current originates from three physical mechanisms: extrinsic nonlinear Drude and Berry curvature dipole and intrinsic Berry connection polarizability. Here, we predict a new intrinsic contribution to the current related to the quantum metric, a quantum geometric property of the electronic wave function. This contribution manifests in systems that simultaneously break the…
▽ More
The second-order nonlinear current originates from three physical mechanisms: extrinsic nonlinear Drude and Berry curvature dipole and intrinsic Berry connection polarizability. Here, we predict a new intrinsic contribution to the current related to the quantum metric, a quantum geometric property of the electronic wave function. This contribution manifests in systems that simultaneously break the time-reversal and the inversion symmetry. Interestingly, the new contribution is dissipative in nature and contributes to both longitudinal and the dissipative nonlinear Hall response. The quantum metric-induced NL current dominates transport in parity-time reversal symmetric systems near the band edges, something we show explicitly for topological antiferromagnets.
△ Less
Submitted 12 December, 2023; v1 submitted 5 July, 2022;
originally announced July 2022.
-
Fault-Aware Neural Code Rankers
Authors:
Jeevana Priya Inala,
Chenglong Wang,
Mei Yang,
Andres Codas,
Mark Encarnación,
Shuvendu K Lahiri,
Madanlal Musuvathi,
Jianfeng Gao
Abstract:
Large language models (LLMs) have demonstrated an impressive ability to generate code for various programming tasks. In many instances, LLMs can generate a correct program for a task when given numerous trials. Consequently, a recent trend is to do large scale sampling of programs using a model and then filtering/ranking the programs based on the program execution on a small number of known unit t…
▽ More
Large language models (LLMs) have demonstrated an impressive ability to generate code for various programming tasks. In many instances, LLMs can generate a correct program for a task when given numerous trials. Consequently, a recent trend is to do large scale sampling of programs using a model and then filtering/ranking the programs based on the program execution on a small number of known unit tests to select one candidate solution. However, these approaches assume that the unit tests are given and assume the ability to safely execute the generated programs (which can do arbitrary dangerous operations such as file manipulations). Both of the above assumptions are impractical in real-world software development. In this paper, we propose CodeRanker, a neural ranker that can predict the correctness of a sampled program without executing it. Our CodeRanker is fault-aware i.e., it is trained to predict different kinds of execution information such as predicting the exact compile/runtime error type (e.g., an IndexError or a TypeError). We show that CodeRanker can significantly increase the pass@1 accuracy of various code generation models (including Codex, GPT-Neo, GPT-J) on APPS, HumanEval and MBPP datasets.
△ Less
Submitted 9 December, 2022; v1 submitted 4 June, 2022;
originally announced June 2022.
-
Fitting Sparse Markov Models to Categorical Time Series Using Regularization
Authors:
Tuhin Majumder,
Soumendra Lahiri,
Donald Martin
Abstract:
The major problem of fitting a higher order Markov model is the exponentially growing number of parameters. The most popular approach is to use a Variable Length Markov Chain (VLMC), which determines relevant contexts (recent pasts) of variable orders and form a context tree. A more general approach is called Sparse Markov Model (SMM), where all possible histories of order $m$ form a partition so…
▽ More
The major problem of fitting a higher order Markov model is the exponentially growing number of parameters. The most popular approach is to use a Variable Length Markov Chain (VLMC), which determines relevant contexts (recent pasts) of variable orders and form a context tree. A more general approach is called Sparse Markov Model (SMM), where all possible histories of order $m$ form a partition so that the transition probability vectors are identical for the histories belonging to a particular group. We develop an elegant method of fitting SMM using convex clustering, which involves regularization. The regularization parameter is selected using BIC criterion. Theoretical results demonstrate the model selection consistency of our method for large sample size. Extensive simulation studies under different set-up have been presented to measure the performance of our method. We apply this method to classify genome sequences, obtained from individuals affected by different viruses.
△ Less
Submitted 11 February, 2022;
originally announced February 2022.
-
Conditional Randomization Rank Test
Authors:
Yanjie Zhong,
Todd Kuffner,
Soumendra Lahiri
Abstract:
We propose a new method named the Conditional Randomization Rank Test (CRRT) for testing conditional independence of a response variable Y and a covariate variable X, conditional on the rest of the covariates Z. The new method generalizes the Conditional Randomization Test (CRT) of [CFJL18] by exploiting the knowledge of the conditional distribution of X|Z and is a conditional sampling based metho…
▽ More
We propose a new method named the Conditional Randomization Rank Test (CRRT) for testing conditional independence of a response variable Y and a covariate variable X, conditional on the rest of the covariates Z. The new method generalizes the Conditional Randomization Test (CRT) of [CFJL18] by exploiting the knowledge of the conditional distribution of X|Z and is a conditional sampling based method that is easy to implement and interpret. In addition to guaranteeing exact type 1 error control, owing to a more flexible framework, the new method markedly outperforms the CRT in computational efficiency. We establish bounds on the probability of type 1 error in terms of total variation norm and also in terms of observed Kullback-Leibler divergence when the conditional distribution of X|Z is misspecified. We validate our theoretical results by extensive simulations and show that our new method has considerable advantages over other existing conditional sampling based methods when we take both power and computational efficiency into consideration.
△ Less
Submitted 30 November, 2021;
originally announced December 2021.
-
Can Pre-trained Language Models be Used to Resolve Textual and Semantic Merge Conflicts?
Authors:
Jialu Zhang,
Todd Mytkowicz,
Mike Kaufman,
Ruzica Piskac,
Shuvendu K. Lahiri
Abstract:
Program merging is standard practice when developers integrate their individual changes to a common code base. When the merge algorithm fails, this is called a merge conflict. The conflict either manifests in textual merge conflicts where the merge fails to produce code, or semantic merge conflicts where the merged code results in compiler or test breaks. Resolving these conflicts for large code p…
▽ More
Program merging is standard practice when developers integrate their individual changes to a common code base. When the merge algorithm fails, this is called a merge conflict. The conflict either manifests in textual merge conflicts where the merge fails to produce code, or semantic merge conflicts where the merged code results in compiler or test breaks. Resolving these conflicts for large code projects is expensive because it requires developers to manually identify the sources of conflict and correct them.
In this paper, we explore the feasibility of automatically repairing merge conflicts (both textual and semantic) using k-shot learning with large neural language models (LM) such as GPT-3. One of the challenges in leveraging such language models is to fit the examples and the queries within a small prompt (2048 tokens). We evaluate LMs and k-shot learning for two broad applications: (a) textual and semantic merge conflicts for a divergent fork Microsoft Edge, and (b) textual merge conflicts for a large number of JavaScript projects in GitHub. Our results are mixed: one one-hand, LMs provide the state-of-the-art (SOTA) performance on semantic merge conflict resolution for Edge compared to earlier symbolic approaches; on the other hand, LMs do not yet obviate the benefits of fine-tuning neural models (when sufficient data is available) or the design of special purpose domain-specific languages (DSL) for restricted patterns for program synthesis.
△ Less
Submitted 23 November, 2021;
originally announced November 2021.
-
InspectJS: Leveraging Code Similarity and User-Feedback for Effective Taint Specification Inference for JavaScript
Authors:
Saikat Dutta,
Diego Garbervetsky,
Shuvendu Lahiri,
Max Schäfer
Abstract:
Static analysis has established itself as a weapon of choice for detecting security vulnerabilities. Taint analysis in particular is a very general and powerful technique, where security policies are expressed in terms of forbidden flows, either from untrusted input sources to sensitive sinks (in integrity policies) or from sensitive sources to untrusted sinks (in confidentiality policies). The ap…
▽ More
Static analysis has established itself as a weapon of choice for detecting security vulnerabilities. Taint analysis in particular is a very general and powerful technique, where security policies are expressed in terms of forbidden flows, either from untrusted input sources to sensitive sinks (in integrity policies) or from sensitive sources to untrusted sinks (in confidentiality policies). The appeal of this approach is that the taint-tracking mechanism has to be implemented only once, and can then be parameterized with different taint specifications (that is, sets of sources and sinks, as well as any sanitizers that render otherwise problematic flows innocuous) to detect many different kinds of vulnerabilities.
But while techniques for implementing scalable inter-procedural static taint tracking are fairly well established, crafting taint specifications is still more of an art than a science, and in practice tends to involve a lot of manual effort.
Past work has focussed on automated techniques for inferring taint specifications for libraries either from their implementation or from the way they tend to be used in client code. Among the latter, machine learning-based approaches have shown great promise.
In this work we present our experience combining an existing machine-learning approach to mining sink specifications for JavaScript libraries with manual taint modelling in the context of GitHub's CodeQL analysis framework. We show that the machine-learning component can successfully infer many new taint sinks that either are not part of the manual modelling or are not detected due to analysis incompleteness. Moreover, we present techniques for organizing sink predictions using automated ranking and code-similarity metrics that allow an analysis engineer to efficiently sift through large numbers of predictions to identify true positives.
△ Less
Submitted 18 November, 2021;
originally announced November 2021.
-
SolType: Refinement Types for Arithmetic Overflow in Solidity
Authors:
Bryan Tan,
Benjamin Mariano,
Shuvendu K. Lahiri,
Isil Dillig,
Yu Feng
Abstract:
As smart contracts gain adoption in financial transactions, it becomes increasingly important to ensure that they are free of bugs and security vulnerabilities. Of particular relevance in this context are arithmetic overflow bugs, as integers are often used to represent financial assets like account balances. Motivated by this observation, this paper presents SolType, a refinement type system for…
▽ More
As smart contracts gain adoption in financial transactions, it becomes increasingly important to ensure that they are free of bugs and security vulnerabilities. Of particular relevance in this context are arithmetic overflow bugs, as integers are often used to represent financial assets like account balances. Motivated by this observation, this paper presents SolType, a refinement type system for Solidity that can be used to prevent arithmetic over- and under-flows in smart contracts. SolType allows developers to add refinement type annotations and uses them to prove that arithmetic operations do not lead to over- and under-flows. SolType incorporates a rich vocabulary of refinement terms that allow expressing relationships between integer values and aggregate properties of complex data structures. Furthermore, our implementation, called Solid, incorporates a type inference engine and can automatically infer useful type annotations, including non-trivial contract invariants.
To evaluate the usefulness of our type system, we use Solid to prove arithmetic safety of a total of 120 smart contracts. When used in its fully automated mode (i.e., using Solid's type inference capabilities), Solid is able to eliminate 86.3% of redundant runtime checks used to guard against overflows. We also compare Solid against a state-of-the-art arithmetic safety verifier called VeriSmart and show that Solid has a significantly lower false positive rate, while being significantly faster in terms of verification time.
△ Less
Submitted 20 December, 2021; v1 submitted 1 October, 2021;
originally announced October 2021.
-
TOGA: A Neural Method for Test Oracle Generation
Authors:
Elizabeth Dinella,
Gabriel Ryan,
Todd Mytkowicz,
Shuvendu K. Lahiri
Abstract:
Testing is widely recognized as an important stage of the software development lifecycle. Effective software testing can provide benefits such as bug finding, preventing regressions, and documentation. In terms of documentation, unit tests express a unit's intended functionality, as conceived by the developer. A test oracle, typically expressed as an condition, documents the intended behavior of a…
▽ More
Testing is widely recognized as an important stage of the software development lifecycle. Effective software testing can provide benefits such as bug finding, preventing regressions, and documentation. In terms of documentation, unit tests express a unit's intended functionality, as conceived by the developer. A test oracle, typically expressed as an condition, documents the intended behavior of a unit under a given test prefix. Synthesizing a functional test oracle is a challenging problem, as it must capture the intended functionality rather than the implemented functionality.
In this paper, we propose TOGA (a neural method for Test Oracle GenerAtion), a unified transformer-based neural approach to infer both exceptional and assertion test oracles based on the context of the focal method. Our approach can handle units with ambiguous or missing documentation, and even units with a missing implementation. We evaluate our approach on both oracle inference accuracy and functional bug-finding. Our technique improves accuracy by 33\% over existing oracle inference approaches, achieving 96\% overall accuracy on a held out test dataset. Furthermore, we show that when integrated with a automated test generation tool (EvoSuite), our approach finds 57 real world bugs in large-scale Java programs, including 30 bugs that are not found by any other automated testing method in our evaluation.
△ Less
Submitted 20 April, 2022; v1 submitted 19 September, 2021;
originally announced September 2021.
-
Berry curvature induced nonlinear magnetoresistivity in two dimensional systems
Authors:
Shibalik Lahiri,
Tanmay Bhore,
Kamal Das,
Amit Agarwal
Abstract:
The band geometric properties of quantum materials play an elemental role in the linear and nonlinear transport of electrons. In this paper, we propose that the interplay of the Berry curvature, the orbital magnetic moment and the Lorentz force can induce a finite nonlinear resistivity in two dimensional systems in presence of a perpendicular magnetic field. The induced nonlinear magnetoresistivit…
▽ More
The band geometric properties of quantum materials play an elemental role in the linear and nonlinear transport of electrons. In this paper, we propose that the interplay of the Berry curvature, the orbital magnetic moment and the Lorentz force can induce a finite nonlinear resistivity in two dimensional systems in presence of a perpendicular magnetic field. The induced nonlinear magnetoresistivity scales linearly with the magnetic field and is purely quantum mechanical in origin. This novel transport signature can be used as an additional experimental probe for the geometric quantities in intrinsically time reversal symmetric systems.
△ Less
Submitted 29 September, 2021; v1 submitted 18 September, 2021;
originally announced September 2021.
-
Program Merge Conflict Resolution via Neural Transformers
Authors:
Alexey Svyatkovskiy,
Sarah Fakhoury,
Negar Ghorbani,
Todd Mytkowicz,
Elizabeth Dinella,
Christian Bird,
Jinu Jang,
Neel Sundaresan,
Shuvendu Lahiri
Abstract:
Collaborative software development is an integral part of the modern software development life cycle, essential to the success of large-scale software projects. When multiple developers make concurrent changes around the same lines of code, a merge conflict may occur. Such conflicts stall pull requests and continuous integration pipelines for hours to several days, seriously hurting developer prod…
▽ More
Collaborative software development is an integral part of the modern software development life cycle, essential to the success of large-scale software projects. When multiple developers make concurrent changes around the same lines of code, a merge conflict may occur. Such conflicts stall pull requests and continuous integration pipelines for hours to several days, seriously hurting developer productivity. To address this problem, we introduce MergeBERT, a novel neural program merge framework based on token-level three-way differencing and a transformer encoder model. By exploiting the restricted nature of merge conflict resolutions, we reformulate the task of generating the resolution sequence as a classification task over a set of primitive merge patterns extracted from real-world merge commit data. Our model achieves 63-68% accuracy for merge resolution synthesis, yielding nearly a 3x performance improvement over existing semi-structured, and 2x improvement over neural program merge tools. Finally, we demonstrate that MergeBERT is sufficiently flexible to work with source code files in Java, JavaScript, TypeScript, and C# programming languages. To measure the practical use of MergeBERT, we conduct a user study to evaluate MergeBERT suggestions with 25 developers from large OSS projects on 122 real-world conflicts they encountered. Results suggest that in practice, MergeBERT resolutions would be accepted at a higher rate than estimated by automatic metrics for precision and accuracy. Additionally, we use participant feedback to identify future avenues for improvement of MergeBERT.
△ Less
Submitted 29 November, 2022; v1 submitted 31 August, 2021;
originally announced September 2021.
-
DeepMerge: Learning to Merge Programs
Authors:
Elizabeth Dinella,
Todd Mytkowicz,
Alexey Svyatkovskiy,
Christian Bird,
Mayur Naik,
Shuvendu K. Lahiri
Abstract:
In collaborative software development, program merging is the mechanism to integrate changes from multiple programmers. Merge algorithms in modern version control systems report a conflict when changes interfere textually. Merge conflicts require manual intervention and frequently stall modern continuous integration pipelines. Prior work found that, although costly, a large majority of resolutions…
▽ More
In collaborative software development, program merging is the mechanism to integrate changes from multiple programmers. Merge algorithms in modern version control systems report a conflict when changes interfere textually. Merge conflicts require manual intervention and frequently stall modern continuous integration pipelines. Prior work found that, although costly, a large majority of resolutions involve re-arranging text without writing any new code. Inspired by this observation we propose the first data-driven approach to resolve merge conflicts with a machine learning model. We realize our approach in a tool DeepMerge that uses a novel combination of (i) an edit-aware embedding of merge inputs and (ii) a variation of pointer networks, to construct resolutions from input segments. We also propose an algorithm to localize manual resolutions in a resolved file and employ it to curate a ground-truth dataset comprising 8,719 non-trivial resolutions in JavaScript programs. Our evaluation shows that, on a held out test set, DeepMerge can predict correct resolutions for 37% of non-trivial merges, compared to only 4% by a state-of-the-art semistructured merge technique. Furthermore, on the subset of merges with upto 3 lines (comprising 24% of the total dataset), DeepMerge can predict correct resolutions with 78% accuracy.
△ Less
Submitted 6 September, 2021; v1 submitted 16 May, 2021;
originally announced May 2021.
-
Can Program Synthesis be Used to Learn Merge Conflict Resolutions? An Empirical Analysis
Authors:
Rangeet Pan,
Vu Le,
Nachiappan Nagappan,
Sumit Gulwani,
Shuvendu Lahiri,
Mike Kaufman
Abstract:
Forking structure is widespread in the open-source repositories and that causes a significant number of merge conflicts. In this paper, we study the problem of textual merge conflicts from the perspective of Microsoft Edge, a large, highly collaborative fork off the main Chromium branch with significant merge conflicts. Broadly, this study is divided into two sections. First, we empirically evalua…
▽ More
Forking structure is widespread in the open-source repositories and that causes a significant number of merge conflicts. In this paper, we study the problem of textual merge conflicts from the perspective of Microsoft Edge, a large, highly collaborative fork off the main Chromium branch with significant merge conflicts. Broadly, this study is divided into two sections. First, we empirically evaluate textual merge conflicts in Microsoft Edge and classify them based on the type of files, location of conflicts in a file, and the size of conflicts. We found that ~28% of the merge conflicts are 1-2 line changes, and many resolutions have frequent patterns. Second, driven by these findings, we explore Program Synthesis (for the first time) to learn patterns and resolve structural merge conflicts. We propose a novel domain-specific language (DSL) that captures many of the repetitive merge conflict resolution patterns and learn resolution strategies as programs in this DSL from example resolutions. We found that the learned strategies can resolve 11.4% of the conflicts (~41% of 1-2 line changes) that arise in the C++ files with 93.2% accuracy.
△ Less
Submitted 2 March, 2021;
originally announced March 2021.
-
Stationary models of magnetized viscous tori around a Schwarzschild black hole
Authors:
Sayantani Lahiri,
Sergio Gimeno-Soler,
José A. Font,
Alejandro Mus Mejías
Abstract:
We present stationary solutions of magnetized, viscous thick accretion disks around a Schwarzschild black hole. We assume that the tori are not self-gravitating, are endowed with a toroidal magnetic field, and obey a constant angular momentum law. Our study focuses on the role of the black hole curvature in the shear viscosity tensor and in their potential combined effect on the stationary solutio…
▽ More
We present stationary solutions of magnetized, viscous thick accretion disks around a Schwarzschild black hole. We assume that the tori are not self-gravitating, are endowed with a toroidal magnetic field, and obey a constant angular momentum law. Our study focuses on the role of the black hole curvature in the shear viscosity tensor and in their potential combined effect on the stationary solutions. Those are built in the framework of a causality-preserving, second-order gradient expansion scheme of relativistic hydrodynamics in the Eckart frame description which gives rise to hyperbolic equations of motion. The stationary models are constructed by numerically solving the general relativistic momentum conservation equation using the method of characteristics. We place constraints in the range of validity of the second-order transport coefficients of the theory. Our results reveal that the effects of the shear viscosity and curvature are particularly noticeable only close to the cusp of the disks. The surfaces of constant pressure are affected by viscosity and curvature and the self-intersecting isocontour - the cusp - moves to smaller radii (i.e. towards the black hole horizon) as the effects become more significant. For highly magnetized disks the shift in the cusp location is smaller. Our findings might have implications on the dynamical stability of constant angular momentum tori which, in the inviscid case, are affected by the runaway instability.
△ Less
Submitted 19 January, 2021; v1 submitted 12 December, 2020;
originally announced December 2020.
-
Diverse R-PPG: Camera-Based Heart Rate Estimation for Diverse Subject Skin-Tones and Scenes
Authors:
Pradyumna Chari,
Krish Kabra,
Doruk Karinca,
Soumyarup Lahiri,
Diplav Srivastava,
Kimaya Kulkarni,
Tianyuan Chen,
Maxime Cannesson,
Laleh Jalilian,
Achuta Kadambi
Abstract:
Heart rate (HR) is an essential clinical measure for the assessment of cardiorespiratory instability. Since communities of color are disproportionately affected by both COVID-19 and cardiovascular disease, there is a pressing need to deploy contactless HR sensing solutions for high-quality telemedicine evaluations. Existing computer vision methods that estimate HR from facial videos exhibit biased…
▽ More
Heart rate (HR) is an essential clinical measure for the assessment of cardiorespiratory instability. Since communities of color are disproportionately affected by both COVID-19 and cardiovascular disease, there is a pressing need to deploy contactless HR sensing solutions for high-quality telemedicine evaluations. Existing computer vision methods that estimate HR from facial videos exhibit biased performance against dark skin tones. We present a novel physics-driven algorithm that boosts performance on darker skin tones in our reported data. We assess the performance of our method through the creation of the first telemedicine-focused remote vital signs dataset, the VITAL dataset. 432 videos (~864 minutes) of 54 subjects with diverse skin tones are recorded under realistic scene conditions with corresponding vital sign data. Our method reduces errors due to lighting changes, shadows, and specular highlights and imparts unbiased performance gains across skin tones, setting the stage for making medically inclusive non-contact HR sensing technologies a viable reality for patients of all skin tones.
△ Less
Submitted 9 December, 2020; v1 submitted 24 October, 2020;
originally announced October 2020.
-
Exploring the extent of validity of quantum work fluctuation theorems in the presence of weak measurements
Authors:
Sourabh Lahiri,
Subhashish Banerjee,
A. M. Jayannavar
Abstract:
Quantum work fluctuation theorems are known to hold when the work is defined as the difference between the outcomes of projective measurements carried out on the Hamiltonian of the system at the initial and the final time instants of the experimental realization of the process. A recent study showed that the theorem breaks down if the measurement is of a more general nature, i.e. if a positive ope…
▽ More
Quantum work fluctuation theorems are known to hold when the work is defined as the difference between the outcomes of projective measurements carried out on the Hamiltonian of the system at the initial and the final time instants of the experimental realization of the process. A recent study showed that the theorem breaks down if the measurement is of a more general nature, i.e. if a positive operator valued measurement is used, and the deviation vanishes only in the limit where the operators become projective in nature. We study a simple two-state system subjected to a unitary evolution under a Hamiltonian that is linearly dependent on time, and verify the validity of the above statement. We further define a weak value of work and show that the deviation from the exact work fluctuation theorems are much less in this formalism.
△ Less
Submitted 14 September, 2020;
originally announced September 2020.