-
One Size Does Not Fit All: Investigating Efficacy of Perplexity in Detecting LLM-Generated Code
Authors:
Jinwei Xu,
He Zhang,
Yanjing Yang,
Lanxin Yang,
Zeru Cheng,
Jun Lyu,
Bohan Liu,
Xin Zhou,
Alberto Bacchelli,
Yin Kia Chiam,
Thiam Kian Chiew
Abstract:
Large language model-generated code (LLMgCode) has become increasingly common in software development. So far LLMgCode has more quality issues than human-authored code (HaCode). It is common for LLMgCode to mix with HaCode in a code change, while the change is signed by only human developers, without being carefully examined. Many automated methods have been proposed to detect LLMgCode from HaCode…
▽ More
Large language model-generated code (LLMgCode) has become increasingly common in software development. So far LLMgCode has more quality issues than human-authored code (HaCode). It is common for LLMgCode to mix with HaCode in a code change, while the change is signed by only human developers, without being carefully examined. Many automated methods have been proposed to detect LLMgCode from HaCode, in which the perplexity-based method (PERPLEXITY for short) is the state-of-the-art method. However, the efficacy evaluation of PERPLEXITY has focused on detection accuracy. Yet it is unclear whether PERPLEXITY is good enough in a wider range of realistic evaluation settings. To this end, we carry out a family of experiments to compare PERPLEXITY against feature- and pre-training-based methods from three perspectives: detection accuracy, detection speed, and generalization capability. The experimental results show that PERPLEXITY has the best generalization capability while having limited detection accuracy and detection speed. Based on that, we discuss the strengths and limitations of PERPLEXITY, e.g., PERPLEXITY is unsuitable for high-level programming languages. Finally, we provide recommendations to improve PERPLEXITY and apply it in practice. As the first large-scale investigation on detecting LLMgCode from HaCode, this article provides a wide range of findings for future improvement.
△ Less
Submitted 9 July, 2025; v1 submitted 21 December, 2024;
originally announced December 2024.
-
Diffusion Models Enable Zero-Shot Pose Estimation for Lower-Limb Prosthetic Users
Authors:
Tianxun Zhou,
Muhammad Nur Shahril Iskandar,
Keng-Hwee Chiam
Abstract:
The application of 2D markerless gait analysis has garnered increasing interest and application within clinical settings. However, its effectiveness in the realm of lower-limb amputees has remained less than optimal. In response, this study introduces an innovative zero-shot method employing image generation diffusion models to achieve markerless pose estimation for lower-limb prosthetics, present…
▽ More
The application of 2D markerless gait analysis has garnered increasing interest and application within clinical settings. However, its effectiveness in the realm of lower-limb amputees has remained less than optimal. In response, this study introduces an innovative zero-shot method employing image generation diffusion models to achieve markerless pose estimation for lower-limb prosthetics, presenting a promising solution to gait analysis for this specific population. Our approach demonstrates an enhancement in detecting key points on prosthetic limbs over existing methods, and enables clinicians to gain invaluable insights into the kinematics of lower-limb amputees across the gait cycle. The outcomes obtained not only serve as a proof-of-concept for the feasibility of this zero-shot approach but also underscore its potential in advancing rehabilitation through gait analysis for this unique population.
△ Less
Submitted 12 December, 2023;
originally announced December 2023.
-
Synthetic data generation method for data-free knowledge distillation in regression neural networks
Authors:
Tianxun Zhou,
Keng-Hwee Chiam
Abstract:
Knowledge distillation is the technique of compressing a larger neural network, known as the teacher, into a smaller neural network, known as the student, while still trying to maintain the performance of the larger neural network as much as possible. Existing methods of knowledge distillation are mostly applicable for classification tasks. Many of them also require access to the data used to trai…
▽ More
Knowledge distillation is the technique of compressing a larger neural network, known as the teacher, into a smaller neural network, known as the student, while still trying to maintain the performance of the larger neural network as much as possible. Existing methods of knowledge distillation are mostly applicable for classification tasks. Many of them also require access to the data used to train the teacher model. To address the problem of knowledge distillation for regression tasks under the absence of original training data, previous work has proposed a data-free knowledge distillation method where synthetic data are generated using a generator model trained adversarially against the student model. These synthetic data and their labels predicted by the teacher model are then used to train the student model. In this study, we investigate the behavior of various synthetic data generation methods and propose a new synthetic data generation strategy that directly optimizes for a large but bounded difference between the student and teacher model. Our results on benchmark and case study experiments demonstrate that the proposed strategy allows the student model to learn better and emulate the performance of the teacher model more closely.
△ Less
Submitted 9 May, 2023; v1 submitted 11 January, 2023;
originally announced January 2023.
-
The size, shape, and dynamics of cellular blebs
Authors:
Fong Yin Lim,
Keng-Hwee Chiam,
L. Mahadevan
Abstract:
A cellular bleb grows when a portion of the cell membrane detaches from the underlying cortex under the influence of a cytoplasmic pressure. We develop a quantitative model for the growth and dynamics of these objects in a simple two-dimensional setting. In particular, we first find the minimum cytoplasmic pressure and minimum unsupported membrane length for a stationary bleb to nucleate and grow…
▽ More
A cellular bleb grows when a portion of the cell membrane detaches from the underlying cortex under the influence of a cytoplasmic pressure. We develop a quantitative model for the growth and dynamics of these objects in a simple two-dimensional setting. In particular, we first find the minimum cytoplasmic pressure and minimum unsupported membrane length for a stationary bleb to nucleate and grow as a function of the membrane-cortex adhesion. We next show how a bleb may travel around the periphery of the cell when the cytoplasmic pressure varies in space and time in a prescribed way and find that the traveling speed is governed by the speed of the pressure change induced by local cortical contraction while the shape of the traveling bleb is governed by the speed of cortical healing. Finally, we relax the assumption that the pressure change is prescribed and couple it hydrodynamically to the cortical contraction and membrane deformation. By quantifying the phase space of bleb formation and dynamics, our framework serves to delineate the range and scope of bleb-associated cell motility and synthesizes a variety of experimental observations.
△ Less
Submitted 11 June, 2012;
originally announced June 2012.
-
Enhanced tracer transport by the spiral defect chaos state of a convecting fluid
Authors:
K. -H. Chiam,
M. C. Cross,
H. S. Greenside,
P. F. Fischer
Abstract:
To understand how spatiotemporal chaos may modify material transport, we use direct numerical simulations of the three-dimensional Boussinesq equations and of an advection-diffusion equation to study the transport of a passive tracer by the spiral defect chaos state of a convecting fluid. The simulations show that the transport is diffusive and is enhanced by the spatiotemporal chaos. The enhanc…
▽ More
To understand how spatiotemporal chaos may modify material transport, we use direct numerical simulations of the three-dimensional Boussinesq equations and of an advection-diffusion equation to study the transport of a passive tracer by the spiral defect chaos state of a convecting fluid. The simulations show that the transport is diffusive and is enhanced by the spatiotemporal chaos. The enhancement in tracer diffusivity follows two regimes. For large Peclet numbers (that is, small molecular diffusivities of the tracer), we find that the enhancement is proportional to the Peclet number. For small Peclet numbers, the enhancement is proportional to the square root of the Peclet number. We explain the presence of these two regimes in terms of how the local transport depends on the local wave numbers of the convection rolls. For large Peclet numbers, we further find that defects cause the tracer diffusivity to be enhanced locally in the direction orthogonal to the local wave vector but suppressed in the direction of the local wave vector.
△ Less
Submitted 23 September, 2004;
originally announced September 2004.
-
Rayleigh-Benard Convection in Large-Aspect-Ratio Domains
Authors:
M. R. Paul,
K-H. Chiam,
M. C. Cross,
P. F. Fischer
Abstract:
The coarsening and wavenumber selection of striped states growing from random initial conditions are studied in a non-relaxational, spatially extended, and far-from-equilibrium system by performing large-scale numerical simulations of Rayleigh-Bénard convection in a large-aspect-ratio cylindrical domain with experimentally realistic boundaries. We find evidence that various measures of the coars…
▽ More
The coarsening and wavenumber selection of striped states growing from random initial conditions are studied in a non-relaxational, spatially extended, and far-from-equilibrium system by performing large-scale numerical simulations of Rayleigh-Bénard convection in a large-aspect-ratio cylindrical domain with experimentally realistic boundaries. We find evidence that various measures of the coarsening dynamics scale in time with different power-law exponents, indicating that multiple length scales are required in describing the time dependent pattern evolution. The translational correlation length scales with time as $t^{0.12}$, the orientational correlation length scales as $t^{0.54}$, and the density of defects scale as $t^{-0.45}$. The final pattern evolves toward the wavenumber where isolated dislocations become motionless, suggesting a possible wavenumber selection mechanism for large-aspect-ratio convection.
△ Less
Submitted 8 March, 2004;
originally announced March 2004.
-
Efficient Algorithm on a Non-staggered Mesh for Simulating Rayleigh-Benard Convection in a Box
Authors:
K. -H. Chiam,
M. -C. Lai,
H. S. Greenside
Abstract:
An efficient semi-implicit second-order-accurate finite-difference method is described for studying incompressible Rayleigh-Benard convection in a box, with sidewalls that are periodic, thermally insulated, or thermally conducting. Operator-splitting and a projection method reduce the algorithm at each time step to the solution of four Helmholtz equations and one Poisson equation, and these are…
▽ More
An efficient semi-implicit second-order-accurate finite-difference method is described for studying incompressible Rayleigh-Benard convection in a box, with sidewalls that are periodic, thermally insulated, or thermally conducting. Operator-splitting and a projection method reduce the algorithm at each time step to the solution of four Helmholtz equations and one Poisson equation, and these are are solved by fast direct methods. The method is numerically stable even though all field values are placed on a single non-staggered mesh commensurate with the boundaries. The efficiency and accuracy of the method are characterized for several representative convection problems.
△ Less
Submitted 26 February, 2003;
originally announced February 2003.
-
Mean flow and spiral defect chaos in Rayleigh-Benard convection
Authors:
K. -H. Chiam,
M. R. Paul,
M. C. Cross,
H. S. Greenside
Abstract:
We describe a numerical procedure to construct a modified velocity field that does not have any mean flow. Using this procedure, we present two results. Firstly, we show that, in the absence of mean flow, spiral defect chaos collapses to a stationary pattern comprising textures of stripes with angular bends. The quenched patterns are characterized by mean wavenumbers that approach those uniquely…
▽ More
We describe a numerical procedure to construct a modified velocity field that does not have any mean flow. Using this procedure, we present two results. Firstly, we show that, in the absence of mean flow, spiral defect chaos collapses to a stationary pattern comprising textures of stripes with angular bends. The quenched patterns are characterized by mean wavenumbers that approach those uniquely selected by focus-type singularities, which, in the absence of mean flow, lie at the zig-zag instability boundary. The quenched patterns also have larger correlation lengths and are comprised of rolls with less curvature. Secondly, we describe how mean flow can contribute to the commonly observed phenomenon of rolls terminating perpendicularly into lateral walls. We show that, in the absence of mean flow, rolls begin to terminate into lateral walls at an oblique angle. This obliqueness increases with Rayleigh number.
△ Less
Submitted 6 December, 2002;
originally announced December 2002.
-
Pattern Formation and Dynamics in Rayleigh-Bénard Convection: Numerical Simulations of Experimentally Realistic Geometries
Authors:
M. R. Paul,
K. -H. Chiam,
M. C. Cross,
P. F. Fischer,
H. S. Greenside
Abstract:
Rayleigh-Bénard convection is studied and quantitative comparisons are made, where possible, between theory and experiment by performing numerical simulations of the Boussinesq equations for a variety of experimentally realistic situations. Rectangular and cylindrical geometries of varying aspect ratios for experimental boundary conditions, including fins and spatial ramps in plate separation, a…
▽ More
Rayleigh-Bénard convection is studied and quantitative comparisons are made, where possible, between theory and experiment by performing numerical simulations of the Boussinesq equations for a variety of experimentally realistic situations. Rectangular and cylindrical geometries of varying aspect ratios for experimental boundary conditions, including fins and spatial ramps in plate separation, are examined with particular attention paid to the role of the mean flow. A small cylindrical convection layer bounded laterally either by a rigid wall, fin, or a ramp is investigated and our results suggest that the mean flow plays an important role in the observed wavenumber. Analytical results are developed quantifying the mean flow sources, generated by amplitude gradients, and its effect on the pattern wavenumber for a large-aspect-ratio cylinder with a ramped boundary. Numerical results are found to agree well with these analytical predictions. We gain further insight into the role of mean flow in pattern dynamics by employing a novel method of quenching the mean flow numerically. Simulations of a spiral defect chaos state where the mean flow is suddenly quenched is found to remove the time dependence, increase the wavenumber and make the pattern more angular in nature.
△ Less
Submitted 29 October, 2002;
originally announced October 2002.
-
Simulating Complex Dynamics In Intermediate And Large-Aspect-Ratio Convection Systems
Authors:
M. C. Lai,
K. H. Chiam,
M. C. Cross,
H. S. Greenside
Abstract:
Buoyancy-induced (Rayleigh-Benard) convection of a fluid between two horizontal plates is a central paradigm for studying the transition to complex spatiotemporal dynamics in sustained nonequilibrium systems. To improve the analysis of experimental data and the quantitative comparison of theory with experiment, we have developed a three-dimensional finite-difference code that can integrate the t…
▽ More
Buoyancy-induced (Rayleigh-Benard) convection of a fluid between two horizontal plates is a central paradigm for studying the transition to complex spatiotemporal dynamics in sustained nonequilibrium systems. To improve the analysis of experimental data and the quantitative comparison of theory with experiment, we have developed a three-dimensional finite-difference code that can integrate the three-dimensional Boussinesq equations (which govern the evolution of the temperature, velocity, and pressure fields associated with a convecting flow) efficiently in large box-shaped domains with experimentally appropriate lateral boundary conditions. We discuss some details of this code and present two applications, one to the occurrence of quasiperiodic dynamics with as many as 5 incommensurate frequencies in a moderate-aspect-ratio 10x5 convection cell, and one to the onset of spiral defect chaos in square cells with aspect ratios varying from Gamma=16 to 56.
△ Less
Submitted 26 May, 2000;
originally announced May 2000.