arXiv:2607.15926v1 Announce Type: new
Abstract: Indefinite causal order is a characteristic phenomenon in quantum computation, with examples including the quantum SWITCH and the OCB process. Not all such processes are believed to be physically realizable: while some implementations of the quantum SWITCH have been proposed, the OCB process is suspected to be unrealizable. This difference in realizability is commonly attributed to constraints imposed by physical causality.
This paper studies such a causality issue in a higher-order setting, proposing a typed lambda calculus with quantum control and its categorical semantics. Our calculus extends pure quantum computation with higher-order functions and quantum conditional branching, and it is equipped with a type system based on intuitionistic BV logic to enforce causality. We also present a novel model that is closely related to the Caus construction, by which we prove that some physically-unrealizable processes are not definable in our language.
Science Journals
arXiv:2411.11380v3 Announce Type: replace
Abstract: To safeguard sensitive user data, web developers typically rely on implicit access-control policies, which they implement using access checks and query filters. This ad hoc approach is error-prone as these scattered checks and filters are easy to misplace or misspecify, and the lack of an explicit policy precludes external access-control enforcement. More critically, it is difficult for humans to discern what policy is embedded in application code (i.e., what data the application may access) -- an issue that worsens as development teams evolve.
This paper tackles policy extraction: the task of extracting the access-control policy embedded in an application by summarizing its data queries. An extracted policy, once vetted for errors, can stand alone as a specification for the application's data access, and can be enforced to ensure compliance as code changes over time. We introduce Ote, a policy extractor for Ruby on Rails web applications. Ote uses concolic execution to explore execution paths through the application, generating traces of SQL queries and conditions that trigger them. It then merges and simplifies these traces into a final policy that aligns with the observed behaviors. We applied Ote to three real-world applications and compared extracted policies to handwritten ones, revealing several errors in the latter.
arXiv:2412.10125v2 Announce Type: replace
Abstract: We consider a fully discretized numerical scheme for parabolic stochastic partial differential equations with multiplicative noise. Our abstract framework can be applied to formulate a non-iterative domain decomposition approach. Such methods can help to parallelize the code and therefore lead to a more efficient implementation. The domain decomposition is integrated through the Douglas-Rachford splitting scheme, where one split operator acts on one part of the domain. For an efficient space discretization of the underlying equation, we chose the discontinuous Galerkin method as this suits the parallelization strategy well. For this fully discretized scheme, we provide a strong space-time convergence result. We conclude the manuscript with numerical experiments validating our theoretical findings.
arXiv:2501.07811v2 Announce Type: replace
Abstract: Code generation aims to produce code that fulfills requirements written in natural language automatically. Large Language Models (LLMs) like ChatGPT have demonstrated promising effectiveness in this area. Nonetheless, the LLMs often fail to ensure the syntactic and semantic correctness of the generated code. Recently, researchers proposed multi-agent frameworks that guide LLMs with different prompts to analyze programming tasks, generate code, and perform testing in a sequential workflow. However, the performance of the workflow is not robust as code generation depends on the performance of each agent. To address this challenge, we propose CodeCoR, a multi-agent framework that prunes intermediate outputs at different stages to reduce error propagation in sequential code generation workflows. Specifically, for a given task description, four agents in CodeCoR generate prompts, code, test cases, and repair advice, respectively. Each agent generates more than one output and prunes away the low-quality ones. The generated code is tested in the local environment: the code that fails to pass the generated test cases is sent to the repair agent, and the coding agent re-generates the code based on repair advice. Finally, the code that passes the highest number of generated test cases is returned to the users. Our experiments on four widely used datasets, HumanEval, HumanEval-ET, MBPP, and MBPP-ET, demonstrate that CodeCoR outperforms existing baselines (e.g., CodeCoT and MapCoder), achieving an average Pass@1 score of 77.13%.
arXiv:2501.08247v4 Announce Type: replace
Abstract: Diffusion through tubular networks with variable radius arises in a wide range of biological, engineering, and physical applications. The Fick-Jacobs equation is the standard one-dimensional reduction of this problem, briefly derived nearly a century ago in a classical textbook, but was shown to be unstable and inaccurate when the radial gradient is large by Zwanzig in 1992. Three decades of subsequent modifications have failed to resolve this instability because they all inherit a common structural inconsistency introduced by truncation in the original derivation - one that becomes immediately apparent from novel elementary analysis. In this work, we return to the foundations of the Fick-Jacobs derivation and treat it as a locally defined Taylor expansion, recovering a model with geometry-independent error that contrasts directly with the geometry-dependent instability of past corrections. The result is a new geometry-aware expansion of the Fick-Jacobs model, with a numerical discretization that is provably stable and convergent, and the first method known to the authors to converge spatially to the correct geometry-aware solution. Analysis shows that standard corrections from the literature cannot converge to this solution regardless of spatial refinement. We derive efficient numerical schemes for branched networks at equivalent computational cost, and demonstrate that a geometry-aware one-dimensional reduction can faithfully reproduce full three-dimensional results of a neurobiologically relevant problem that the standard reduction cannot achieve.
arXiv:2502.00345v2 Announce Type: replace
Abstract: The critical role of division of labor (DOL) in enhancing cooperation is well-recognized in real-world applications. Consequently, many cooperative multi-agent reinforcement learning (MARL) methods have incorporated DOL mechanisms to improve cooperation among agents. However, the lack of benchmark tasks specifically designed to evaluate and promote DOL and cooperation has limited the effective development and deployment of such mechanisms in cooperative MARL. This gap between current cooperative MARL methods and practical applications underscores the need for evaluation tasks that explicitly require DOL and cooperation. To address this gap, we propose the Composite Tasks Challenge (CTC), a suite of tasks explicitly designed to require both DOL and cooperation for successful task completion. The CTC tasks are constructed based on two core design principles: 1) DOL is a necessary condition for task success; 2) Failure in any atomic subtask results in failure of the overall task. The first principle emphasizes the necessity of DOL, while the second enforces the importance of cooperation, making both components essential for success in CTC tasks. We evaluate nine representative cooperative MARL methods on the proposed CTC tasks. Experimental results show that all methods consistently achieve zero test winning rates across all CTC tasks, highlighting the challenge of CTC tasks and the limitations of current methods. To facilitate future research, we also introduce a guiding solution that achieves non-zero test winning rates on all tasks, thereby demonstrating the solvability of the CTC tasks. However, the performance of this guiding solution remains suboptimal, further underscoring the value of CTC tasks as a challenging and meaningful testbed for advancing cooperative MARL research.
arXiv:2502.00400v4 Announce Type: replace
Abstract: Rogue wave formation and enhancement over coastal areas have been documented over the last decade. However, this recent knowledge is in apparent contradiction with the established observation of sub-Gaussian wave statistics near shallow water. Current theories and experiments describe the rogue wave amplification near shallow water regimes, but only for small-amplitude waves, and thus, not accounting for wave-breaking processes. To address this gap, we perform experiments to probe inhomogeneous wave fields nearing the wave-breaking regime. We also show that by increasing the significant wave height towards the breaking limit, the kinetic energy grows faster than the variance of the surface elevation due to nonlinearity, providing a physical explanation why the occurrence of rogue wave first increases in shallower waters and suddenly decreases further shorewards.
arXiv:2502.07524v2 Announce Type: replace
Abstract: The study investigates hip-hop music producer Scott Storch's approach to tonality, where the song's key is transposed to fit the Roland TR-808 bass drum instead of tuning the drums to the song's key. This process, involving the adjustment of all tracks except the bass drum, suggests significant production motives. The primary constraint stems from the limited usable pitch range of the TR-808 bass drum if its characteristic sound is to be preserved. The research examines drum tuning practices, the role of the Roland TR-808 in music, and the sub-bass qualities of its bass drum. Analysis of TR-808 samples reveals their characteristics and their integration into modern genres like trap and hip-hop. The study also considers the impact of loudspeaker frequency response and human ear sensitivity on bass drum perception. The findings suggest that Storch's method prioritizes the spectral properties of the bass drum over traditional pitch values to enhance the bass response. The need to maintain the unique sound of the TR-808 bass drum underscores the importance of spectral formants and register in contemporary popular music production.
arXiv:2502.11068v3 Announce Type: replace
Abstract: Anchors is a popular local model-agnostic explanation technique whose applicability is limited by its computational inefficiency. To address this limitation, we propose a memorization-based framework that accelerates Anchors while preserving explanation fidelity and interpretability. Our approach leverages the iterative nature of Anchors' algorithm which gradually refines an explanation until it is precise enough for a given input by storing and reusing intermediate results obtained during prior explanations. Specifically, we maintain a memory of low-precision, high-coverage rules and introduce a rule transformation framework to adapt them to new inputs: the horizontal transformation adapts a pre-trained explanation to the current input by replacing features, and the vertical transformation refines the general explanation until it is precise enough for the input. We evaluate our method across tabular, text, and image datasets, demonstrating that it significantly reduces explanation generation time while maintaining fidelity and interpretability, thereby enabling the practical adoption of Anchors in time-sensitive applications.
arXiv:2503.16592v2 Announce Type: replace
Abstract: Robust and precise robotic assembly entails insertion of constituent components. Insertion success is hindered when noise in scene understanding exceeds tolerance limits, especially when fabricated with tight tolerances. In this work, we propose ContactFusion which combines global mapping with local contact information, fusing point clouds with force sensing. Our method entails a Rejection Sampling based contact occupancy sensing procedure which estimates contact locations on the end-effector from Force/Torque sensing at the wrist. We demonstrate how to fuse contact with visual information into a Stochastic Poisson Surface Map (SPSMap) - a map representation that can be updated with the Stochastic Poisson Surface Reconstruction (SPSR) algorithm. We first validate the contact occupancy sensor in simulation and show its ability to detect the contact location on the robot from force sensing information. Then, we evaluate our method in a peg-in-hole task, demonstrating an improvement in the hole pose estimate with the fusion of the contact information with the SPSMap.
arXiv:2505.00100v2 Announce Type: replace
Abstract: Background and Context. Generative AI (GenAI) tools are increasingly used in programming courses, but we have limited evidence about how brief instruction can foster responsible, learning-oriented use.
Objectives. We evaluate "AI-Lab", a scaffolded GenAI literacy intervention, asking how students' self-reported GenAI usage and their openness and comfort using GenAI for conceptual, debugging, and homework tasks change after participation.
Methods. Across two semesters in three CS courses and one first-year engineering course at a U.S. university, we deployed the "AI-Lab" (pre-lab orientation, in-class critique of GenAI outputs, and a required homework reflection), collecting paired pre/post surveys (Perception N=831; Usage N=826) and six post-intervention focus groups; primary inferential analyses used the three CS courses (N=778 and 773, respectively). We analyzed survey shifts with paired non-parametric tests and focus groups via thematic analysis.
Findings. Openness increased for conceptual questions and homework help, and comfort increased for conceptual, debugging, and homework scenarios; self-reported frequency of GenAI use for homework and projects remained stable, while self-reported use for debugging increased. Focus group participants described adopting more iterative prompting strategies, becoming more skeptical of correctness, and articulating clearer boundaries around integrity and dependence.
Implications. A short, structured intervention can shift students' reported comfort with and willingness to use GenAI and influence the strategies they describe for engaging with it without increasing overall self-reported use on graded work. These results motivate future work triangulating surveys with behavioral traces and learning measures.
arXiv:2505.16121v3 Announce Type: replace
Abstract: Recommender system is one of the most critical technologies for large internet companies such as Amazon and TikTok. Although millions of users use recommender systems globally everyday, and indeed, much data analysis work has been done to improve the technical accuracy of the system, to our limited knowledge, there has been little attention paid to analysis of users' emotion in recommender systems. In this paper, we create a new theory and metrics that could capture users' emotion when they are interacting with recommender systems. We also provide effective and efficient visualization techniques for visualization of users' emotion and its change in the customers' lifetime cycle. In the end, we design a framework for emotion-based recommendation algorithms, illustrated in a straightforward example with experimental results to demonstrate the effectiveness of our new theory.
arXiv:2506.00693v3 Announce Type: replace
Abstract: This paper presents a study of human visual attention during localization of memory bugs in C. Human visual attention refers to the mechanical processes by which we selectively process and prioritize information. Visual attention is important to study because it is central to what information people (who are sighted) use to solve a particular problem. Meanwhile, memory bugs are among the most common types of bugs in C programs that manifest as a variety of program faults. In this paper, we study human visual attention while people attempt to locate memory bugs in code. We recruit 21 programmers to locate between one and eight memory bugs in three C programs for 1.5-2 hours each. In total we collected observations of 31 hours of programmer effort. The bugs in our study cover memory leaks, overflows, and double frees, which are among the most common memory bugs. We analyze the task outcomes in terms of success rate and related factors, patterns of visual attention overall such as what lines and functions are read, and finally we explore differences of visual attention patterns during success versus failure cases.
arXiv:2506.04147v5 Announce Type: replace
Abstract: Building capable household and industrial robots requires mastering the control of versatile, high-degree-of-freedom (DoF) systems such as mobile manipulators. While reinforcement learning (RL) holds promise for autonomously acquiring robot control policies, scaling it to high-DoF embodiments remains challenging. Direct RL in the real world demands both safe exploration and high sample efficiency, which are difficult to achieve in practice. Sim-to-real RL, on the other hand, is often brittle due to the reality gap. This paper introduces SLAC, a method that renders real-world RL feasible for complex embodiments by leveraging a low-fidelity simulator to pretrain a task-agnostic latent action space. SLAC trains this latent action space via a customized unsupervised skill discovery method designed to promote temporal abstraction, disentanglement, and safety, thereby facilitating efficient downstream learning. Once a latent action space is learned, SLAC uses it as the action interface for a novel off-policy RL algorithm to autonomously learn downstream tasks through real-world interactions. We evaluate SLAC against existing methods on a suite of bimanual mobile manipulation tasks, where it achieves state-of-the-art performance. Notably, SLAC learns contact-rich whole-body tasks in under an hour of real-world interactions, without relying on any demonstrations or hand-crafted behavior priors. More information and robot videos at robo-rl.github.io
arXiv:2506.13107v5 Announce Type: replace
Abstract: Causal forests estimate how treatment effects vary across individuals, guiding personalized interventions in areas like marketing, operations, and public policy. A standard practice is honest estimation: dividing the data into two samples, one to define subgroups and another to estimate treatment effects within them. This is intended to reduce overfitting and is the default in many software packages. But is it the right choice? We show that honest estimation can reduce the accuracy of estimates of individual treatment effects, especially when effect heterogeneity is substantial and datasets are large enough to detect it. The reason is a bias-variance trade-off: honesty lowers the risk of overfitting but increases the risk of underfitting by limiting the data available to detect and model heterogeneity. Across more than 7,000 benchmark datasets, we find that the cost of using honesty by default can be as high as requiring 27% more data to match the performance of models trained without it. Honesty is best understood as a form of regularization. Whether to adopt it should depend on the goals of the application and its empirical performance, not on reflexive default use.
arXiv:2607.15388v1 Announce Type: new
Abstract: Many math- and science-oriented agent systems use hierarchical designs with specialized reviewer roles, assuming that a dedicated review stage should help turn wrong candidates into correct ones. We test this assumption on 4,181 verifier-grounded Omni-MATH problems using matched gpt-oss-120b actors. Collaboration adds little on the easiest tiers, but from tier 4 onward the gains open sharply; in this harder regime, broadcast-style peer discussion reaches higher final accuracy than a planner-executor-reviewer pipeline (PER). We ask whether this gap is explained by reviewer quality or by whether critique changes the next answer the protocol carries forward. It is not explained by reviewer precision alone: PER's reviewer is more precise than broadcast's (0.861 vs. 0.644), yet evaluator-verified useful critique is much less likely to change the next candidate and produces lower reviewer-guided repair. These results show that reviewer detection quality and critique uptake are empirically separable. Within matched PER interventions, forcing explicit acknowledgment lowers final accuracy, while embedding reviewer guidance directly in the solver's working context partially improves follow-through without closing the gap. Overall, reviewer-centric evaluation can overstate system quality: a protocol may spot errors well yet still fail to solve more problems if it does not act on those critiques.
arXiv:2607.15572v1 Announce Type: new
Abstract: Battery energy storage systems (BESSs) are widely used in smart grids. However, power consumed by inner impedance and the capacity degradation of each battery unit become particularly severe, which has resulted in an increase in operating costs. The general economic dispatch (ED) algorithm based on marginal cost (MC) consensus is usually a proportional (P) controller, which encounters the defects of slow convergence speed and low control accuracy. In order to solve the distributed ED problem of the isolated BESS network with excellent dynamic and steady-state performance, we attempt to design a proportional integral (PI) controller with a reset mechanism (PI+R) to asymptotically promote MC consensus and total power mismatch towards 0 in this paper. To be frank, the integral term in the PI controller is reset to 0 at an appropriate time when the proportional term undergoes a zero crossing, which accelerates convergence, improves control accuracy, and avoids overshoot. The eigenvalues of the system under a PI+R controller is well analyzed, ensuring the regularity of the system and enabling the reset mechanism. To ensure supply and demand balance within the isolated BESSs, a centralized reset mechanism is introduced, so that the controller is distributed in a flow set and centralized in a jump set. To cope with Zeno behavior and input delay, a dwell time that the system resides in a flow set is given. Based on this, the system with input delays can be reduced to a time-delay free system. Considering the capacity limitation of the battery, a modified MC scheme with PI+R controller is designed. The correctness of the designed scheme is verified through relevant simulations.
arXiv:2607.15594v1 Announce Type: cross
Abstract: High-resolution energy data is increasingly central to Industry 4.0, where electrical signals such as three-phase voltage and current carry rich information about machine condition, tool wear, and process dynamics. Capturing this information in practice remains difficult: commercial power analysis are largely proprietary, offer limited or no access to high-sampling rate data for transient analysis, restrict access to raw waveform data, and offer no customization, while general-purpose open hardware lacks the front-end accuracy, isolation, and robustness required for industrial measurement. This paper presents Autonomous Energy Monitoring System (AEMS), an open-source, low-cost, and modular platform supported by a host, edge-gateway, and optional cloud software stack that enables autonomous, long-duration acquisition independent of a continuously connected host and thereby closes this gap by combining research-grade fidelity with industrial deployability. The system acquires three-phase voltage and current through an isolated front-end and a 24-bit, simultaneously sampling analog-to-digital converter, managed by a dual-core architecture that separates deterministic acquisition and on-board logging from host communication and control. Industrial interfaces (Ethernet, RS-485/Modbus, and BLE) together with hardware-level synchronization enable scalable, time-aligned acquisition across multiple machines, supported by a complete host, edge-gateway, and optional cloud software stack. We validate the platform on a three-axis CNC machining center, where it resolves spindle, feed-drive, rapid-traverse, and material-removal energy states and detects feed-rate changes as small as 50 mm/min. By releasing the full hardware and firmware openly, this work aims to democratize access to high-fidelity energy monitoring for both researchers and small and medium-sized manufacturers.
arXiv:2506.13552v2 Announce Type: replace
Abstract: Video Scene Parsing (VSP) studies dense video understanding, where every pixel in each frame must be segmented, each region must be named, and each object identity must remain coherent over time. This survey reviews recent progress in VSP across five tasks, spanning Video Semantic Segmentation (VSS), Video Instance Segmentation (VIS), Video Panoptic Segmentation (VPS), Video Tracking \& Segmentation (VTS), and Open-Vocabulary Video Segmentation (OVVS). We organize the literature as one architectural arc, running from hand-crafted motion and appearance cues through fully convolutional, attention-based and query-based designs to recent foundation-model approaches, and we trace how each family models temporal context, preserves identity, and balances accuracy against efficiency. We then compare the datasets, metrics and benchmark trends that shape current evaluation. Beyond cataloguing methods, we foreground the design trade-offs and recurring failure modes that cut across the field, namely temporal flicker, occlusion-induced identity switches, long-tail categories, and the annotation--capacity--latency tension. We close with open directions towards robust, efficient and open-world VSP systems.
arXiv:2507.00600v3 Announce Type: replace
Abstract: Understanding the functional roles of financial institutions within interconnected markets is critical for effective supervision, systemic risk assessment, and resolution planning. We propose an interpretable role-based clustering approach for multi-layer financial networks, designed to identify the functional positions of institutions across different market segments. Our method follows a general clustering framework defined by proximity measures, cluster evaluation criteria, and algorithm selection. We construct explainable node embeddings based on egonet features that capture both direct and indirect trading relationships within and across market layers. Using transaction-level data from the ECB's Money Market Statistical Reporting (MMSR), we demonstrate how the approach uncovers heterogeneous institutional roles such as market intermediaries, cross-segment connectors, and peripheral lenders or borrowers. The results highlight the flexibility and practical value of role-based clustering in analyzing financial networks and understanding institutional behavior in complex market structures.
arXiv:2507.03766v2 Announce Type: replace
Abstract: We present an algorithm for a class of $n$-fold ILPs whose existing algorithms in literature are often either (1) based on the \textit{augmentation framework} where one starts with an arbitrary solution and then iteratively moves towards an optimal solution by solving appropriate programs; or (2) require solving a linear relaxation of the program; or (3) are based on decomposition/proximity based arguments. Combinatorial $n$-fold ILPs is a class of $n$-fold ILPs introduced and studied by Knop et al. [MP2020] that captures several other problems in a variety of domains. We present a simple and direct algorithm that solves combinatorial $n$-fold ILPs with unbounded non-negative variables via an application of the Steinitz lemma. Depending on the structure of the input ILP, we also improve upon the existing algorithms in the literature in terms of the running time, thereby showing an improvement that mirrors the one shown by Rohwedder [ICALP2025] contemporaneously and independently.
arXiv:2507.14011v2 Announce Type: replace
Abstract: Artificial General Intelligence (AGI) is interpreted as an emergent property of autonomous and self-organizing systems, grounded in the principles of autopoiesis and embodied cognition, overcoming the structural limitations of current Large Language Models (LLMs). We introduce EGO (Environment Generative Operator), a software architecture based on the formal E-language, capable of self-referentiality and of maintaining its internal organization, thereby realizing Maturana's autopoiesis and providing a bridge between artificial intelligence and biological theories of cognition. For further details, please refer to the technical document on arXiv.
arXiv:2507.15356v3 Announce Type: replace
Abstract: Offline reinforcement learning (RL) learns policies from fixed datasets, thereby avoiding costly or unsafe environment interactions. However, its reliance on finite static datasets inherently restricts the ability to generalize beyond the training distribution. Prior solutions based on synthetic data augmentation often fail to generalize to unseen scenarios in the (augmented) dataset. To address these challenges, we propose Retrieval High-quAlity Demonstrations (RAD) for decision-making, which innovatively introduces a retrieval mechanism into offline RL. Specifically, RAD retrieves high-return and reachable states from the offline dataset as target states, and leverages a generative model to generate sub-trajectories conditioned on these targets for planning. Since the targets are high-return states, once the agent reaches such a target, it can continue to obtain high returns by following the associated high-return actions, thereby improving policy generalization. Extensive experiments confirm that RAD achieves competitive or superior performance compared to baselines across diverse benchmarks, validating its effectiveness. Our code is available at https://github.com/LeahGL/RAD.
arXiv:2607.15943v1 Announce Type: new
Abstract: The objective of the Photo-HASPIDE experiment is the construction and test of an indirect a-Si:H (Hydrogenated Amorphous Silicon) photo-detector plus scintillator device on a flexible substrate for the detection and measurement of particles fluxes (X-rays, electrons and protons) and for dosimetric measurements. The idea behind this experimental project lies in the utilization of Hydrogenated Amorphous Silicon (a-Si:H) as photodiode material; owing to its notable attributes of radiation hardness, light detection capability and mechanical flexibility. After the implementation of the HASPIDE experiment, which explored direct radiation detection using a-Si:H devices on a polyimide (PI) substrate, we aim to delve into indirect detection by employing these devices in conjunction with flexible and rad-hard scintillators like polysiloxane. The indirect detector design holds promise for improved responsiveness to low radiation fluxes compared to direct detection methods. The indirect a-Si:H detector should be composed of arrays of small (about 5 x 5 mm2) scintillator crystals read by a-Si:H photodiodes. Through optimization of the scintillator and detector thicknesses, we expect to achieve a better performance for low minimum detectable fluxes compared to direct detection methodologies. This new detector will find application in in-vivo dosimetry during radiotherapy or hadron-therapy and also, due to its expected fast response, in FLASH therapy. Another important application will be also in Solar Physics using these devices to measure particle fluxes in solar energetic particle events.
arXiv:2607.15936v1 Announce Type: new
Abstract: With the increasing demand for reusing paper documents in educational and office settings, accurate segmentation of handwritten and printed text has become a crucial step in document digitization. Although numerous deep learning models have been developed for this task, their high computational cost limits deployment on resource-constrained edge devices. To address this challenge, we present a lightweight framework optimized for efficient performance on devices with severely limited computational capacity. Our approach begins with the Sentence-level Connected Component Segmentation algorithm, aimed at extracting coherent sentence-level segments from document images. We then design a novel Region-aware Handwriting Descriptor (RHD) to capture the intrinsic variability of human handwriting at the sentence level. A simple conventional classifier can then be seamlessly integrated with our designed descriptor, demonstrating strong classification performance for distinguishing handwritten and printed sentence-level text images, highlighting that the proposed descriptor is agnostic to the choice of classifier. Extensive experiments are performed on our self-constructed Multilingual High-Quality Annotated Dataset for Handwritten and Printed Text Segmentation (MAD-HPTS) and a public benchmark PHD-AS, and the experimental results demonstrate that the proposed framework outperforms current state-of-the-art methods in both accuracy and computational efficiency. On MAD-HPTS, our method sacrifices only 1.4% accuracy compared to the leading deep neural network baseline, yet achieves more than 8 times speedup in inference, making it well-suited for lightweight deployment.