SearcharxivSearch

arXiv subjects

Haolin Pan

Publications and source records attributed to Haolin Pan.

At least 19 recordsLinked to original sources

Pronounced in-plane anomalous Hall effect with vanishing out-of-plane response in Cr1.2Te2

We report an unconventional anomalous Hall regime in the van der Waals ferromagnet Cr1.2Te2, in which the anomalous Hall effect (AHE) is present for in-plane magnetization but absent for out-of-plane magnetization. In this purely in-plane regime, the anomalous Hall signal exhibits a threefold angular dependence during both in-plane and out-of-plane rotations of the magnetization, which cannot be accounted for by the conventional dipolar contribution but instead requires an octupolar contribution. Although the octupolar term qualitatively captures the observed behavior, the experimentally extracted octupole differs quantitatively from first-principles calculations based solely on the intrinsic Berry-curvature mechanism, indicating an essential role for extrinsic scattering processes.

cond-mat.mtrl-sci

Toward Compiler World Models: Learning Latent Dynamics for Efficient Tensor Program Search

Tensor program optimization is essential for modern machine learning systems, but its search space is enormous. Existing auto-schedulers reduce measurement cost with learned cost models, yet they usually evaluate each candidate as a static code snapshot, ignoring the schedule trajectory that produced it. This makes them insensitive to action dependencies and vulnerable to superficial code variations. We propose a \emph{world-model-inspired} evaluator that models schedule evaluation as action-conditioned latent dynamics over program states. Starting from the initial program, it rolls out scheduling actions in a continuous latent space with a lightweight transition model, avoiding expensive AST mutation and repeated code encoding. The final dynamic representation is combined with action and hardware features to rank candidates. Implemented in TVM AutoScheduler, our method improves representative-subgraph latency over Ansor by 1.37$\times$ on GPU and 1.54$\times$ on CPU under the same 64-trial budget. It also matches Ansor-10K within 2.2% geometric mean using 10$\times$ fewer measurements, and accelerates full-model inference over PyTorch/PyTorch-opt(cuDNN) by 4.61$\times$/3.67$\times$ geometric mean.

cs.LG

ECCO: Evidence-Driven Causal Reasoning for Compiler Optimization

Compiler auto-tuning faces a dichotomy between traditional black-box search methods, which lack semantic guidance, and recent Large Language Model (LLM) approaches, which often suffer from superficial pattern matching and causal opacity. In this paper, we introduce ECCO, a framework that bridges interpretable reasoning with combinatorial search. We first propose a reverse engineering methodology to construct a Chain-of-Thought dataset, explicitly mapping static code features to verifiable performance evidence. This enables the model to learn the causal logic governing optimization decisions rather than merely imitating sequences. Leveraging this interpretable prior, we design a collaborative inference mechanism where the LLM functions as a strategist, defining optimization intents that dynamically guide the mutation operations of a genetic algorithm. Experimental results on seven datasets demonstrate that ECCO significantly outperforms the LLVM opt -O3 baseline, achieving an average 24.44% reduction in cycles.

cs.LG

Experimental Evidence of N\'eel-order-driven Magneto-optical Kerr Effect in an Altermagnetic Insulator

The magneto-optical Kerr effect (MOKE) is investigated in hematite, a collinear antiferromagnetic insulator, across a broad wavelength spectrum. By combining the optical measurements with magnetometry results, we unambiguously demonstrate that the N\'eel-order contribution dominates the MOKE signal, while contributions from net magnetization and external magnetic fields are negligible. This conclusion is quantitatively supported by first-principles calculations, and qualitatively by a symmetry analysis that the N\'eel contribution appears at the first order in spin-orbit coupling while the magnetization contribution starts only at the third order. This study clarifies the altermagnetic origin of the pronounced MOKE in hematite, underscoring the potential of altermagnets as a promising new class of magneto-optical materials.

cond-mat.other

A Hybrid, Knowledge-Guided Evolutionary Framework for Personalized Compiler Auto-Tuning

Compiler pass auto-tuning is critical for enhancing software performance, yet finding the optimal pass sequence for a specific program is an NP-hard problem. Traditional, general-purpose optimization flags like -O3 and -Oz adopt a one-size-fits-all approach, often failing to unlock a program's full performance potential. To address this challenge, we propose a novel Hybrid, Knowledge-Guided Evolutionary Framework. This framework intelligently guides online, personalized optimization using knowledge extracted from a large-scale offline analysis phase. During the offline stage, we construct a comprehensive compilation knowledge base composed of four key components: (1) Pass Behavioral Vectors to quantitatively capture the effectiveness of each optimization; (2) Pass Groups derived from clustering these vectors based on behavior similarity; (3) a Synergy Pass Graph to model beneficial sequential interactions; and (4) a library of Prototype Pass Sequences evolved for distinct program types. In the online stage, a bespoke genetic algorithm leverages this rich knowledge base through specially designed, knowledge-infused genetic operators. These operators transform the search by performing semantically-aware recombination and targeted, restorative mutations. On a suite of seven public datasets, our framework achieves an average of 11.0% additional LLVM IR instruction reduction over the highly-optimized opt -Oz baseline, demonstrating its state-of-the-art capability in discovering personalized, high-performance optimization sequences.

cs.SE

Behavioral Embeddings of Programs: A Quasi-Dynamic Approach for Optimization Prediction

Learning effective numerical representations, or embeddings, of programs is a fundamental prerequisite for applying machine learning to automate and enhance compiler optimization. Prevailing paradigms, however, present a dilemma. Static representations, derived from source code or intermediate representation (IR), are efficient and deterministic but offer limited insight into how a program will behave or evolve under complex code transformations. Conversely, dynamic representations, which rely on runtime profiling, provide profound insights into performance bottlenecks but are often impractical for large-scale tasks due to prohibitive overhead and inherent non-determinism. This paper transcends this trade-off by proposing a novel quasi-dynamic framework for program representation. The core insight is to model a program's optimization sensitivity. We introduce the Program Behavior Spectrum, a new representation generated by probing a program's IR with a diverse set of optimization sequences and quantifying the resulting changes in its static features. To effectively encode this high-dimensional, continuous spectrum, we pioneer a compositional learning approach. Product Quantization is employed to discretize the continuous reaction vectors into structured, compositional sub-words. Subsequently, a multi-task Transformer model, termed PQ-BERT, is pre-trained to learn the deep contextual grammar of these behavioral codes. Comprehensive experiments on two representative compiler optimization tasks -- Best Pass Prediction and -Oz Benefit Prediction -- demonstrate that our method outperforms state-of-the-art static baselines. Our code is publicly available at https://github.com/Panhaolin2001/PREP/.

cs.LG

GRACE: Cluster-Specific Sequence Reuse for Compiler Auto-Tuning

Compiler auto-tuning aims to improve optimization quality beyond fixed compiler heuristics, but existing approaches often face a trade-off between effectiveness and deployability. Iterative compilation can discover strong program-specific optimization sequences, yet its search cost is often prohibitive for practical reuse. Learning-based methods reduce tuning overhead, but their effectiveness depends on how well optimization knowledge transfers to unseen programs. Recent coreset-based methods improve this trade-off, but they typically either still rely on relatively large test-time search or assume that a single global coreset can serve all programs well. We present GRACE, a compiler auto-tuning framework based on \emph{cluster-specific sequence reuse}. GRACE constructs a small reusable sequence coreset for each group of similar programs by combining global pass synergy analysis, optimization-response-guided program organization, and cluster-specific evolutionary search. At deployment time, it evaluates a small coreset on the target program and optionally performs lightweight refinement within a restricted search space, yielding bounded overhead. We evaluate GRACE on seven benchmark datasets using LLVM 10.0.0 and LLVM 18.1.6. For code-size optimization, GRACE reduces LLVM IR instruction count by 9.92\% and 10.30\% on average relative to \texttt{opt -Oz}, while requiring less than 1\,s tuning time per program at deployment. Under an execution-oriented objective, GRACE reduces estimated cycle counts by 26.84\% and 27.54\% on average relative to \texttt{opt -O3}, and also yields measurable end-to-end speedups on runnable cBench and polybench programs. These results suggest that offline-constructed, cluster-specific sequence coresets provide a practical balance between optimization quality and cost.

cs.SE

Synergy-Guided Compiler Auto-Tuning of Nested LLVM Pass Pipelines

Compiler optimization relies on sequences of passes to improve program performance. Selecting and ordering these passes automatically, known as compiler auto-tuning, is challenging due to the large and complex search space. Existing approaches generally assume a linear sequence of passes, a model compatible with legacy compilers but fundamentally misaligned with the hierarchical design of the LLVM New Pass Manager. This misalignment prevents them from guaranteeing the generation of syntactically valid optimization pipelines. In this work, we present a new auto-tuning framework built from the ground up for the New Pass Manager. We introduce a formal grammar to define the space of valid nested pipelines and a forest-based data structure for their native representation. Upon this foundation, we develop a structure-aware Genetic Algorithm whose operators manipulate these forests directly, ensuring that all candidate solutions are valid by construction. The framework first mines synergistic pass relationships to guide the search. An optional refinement stage further explores subtle performance variations arising from different valid structural arrangements. We evaluate our approach on seven benchmark datasets using LLVM 18.1.6. The discovered pipelines achieve an average of 13.62% additional instruction count reduction compared to the standard opt -Oz optimization level, showing that our framework is capable of navigating this complex, constrained search space to identify valid and effective pass pipelines.

cs.SE

AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Framework

Compiler optimization is crucial for enhancing program performance by transforming the sequence of optimization passes while maintaining correctness. Despite the promising potential of large language models (LLMs)-based agent for software optimization, automating compiler optimization remains challenging due to: (1) semantic misalignment between abstract program representations and concrete optimization passes, (2) inefficient interaction mechanisms between agents and compiler environments, and (3) reward sparsity from the extensive decision-making process within large optimization spaces. This paper introduces \textbf{AwareCompiler}, an agentic framework for compiler optimization that addresses these challenges through three key innovations: structured knowledge integration and dataset construction, knowledge-driven adaptive pass generation, and data-driven hybrid training pipeline. Experimental results on standard benchmarks demonstrate that AwareCompiler significantly outperforms existing baselines in both performance and efficiency, highlighting the effectiveness of our synergistic knowledge-data-driven approach. Our code is publicly available at https://github.com/LHY-24/AwareCompiler.

cs.PL

FlowXpert: Context-Aware Flow Embedding for Enhanced Traffic Detection in IoT Network

In the Internet of Things (IoT) environment, continuous interaction among a large number of devices generates complex and dynamic network traffic, which poses significant challenges to rule-based detection approaches. Machine learning (ML)-based traffic detection technology, capable of identifying anomalous patterns and potential threats within this traffic, serves as a critical component in ensuring network security. This study first identifies a significant issue with widely adopted feature extraction tools (e.g., CICMeterFlow): the extensive use of time- and length-related features leads to high sparsity, which adversely affects model convergence. Furthermore, existing traffic detection methods generally lack an embedding mechanism capable of efficiently and comprehensively capturing the semantic characteristics of network traffic. To address these challenges, we propose a novel feature extraction tool that eliminates traditional time and length features in favor of context-aware semantic features related to the source host, thus improving the generalizability of the model. In addition, we design an embedding training framework that integrates the unsupervised DBSCAN clustering algorithm with a contrastive learning strategy to effectively capture fine-grained semantic representations of traffic. Extensive empirical evaluations are conducted on the real-world Mawi data set to validate the proposed method in terms of detection accuracy, robustness, and generalization. Comparative experiments against several state-of-the-art (SOTA) models demonstrate the superior performance of our approach. Furthermore, we confirm its applicability and deployability in real-time scenarios.

cs.CR

Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learning

Compiler auto-tuning optimizes pass sequences to improve performance metrics such as Intermediate Representation (IR) instruction count. Although recent advances leveraging Large Language Models (LLMs) have shown promise in automating compiler tuning, two significant challenges still remain: the absence of high-quality reasoning datasets for agents training, and limited effective interactions with the compilation environment. In this work, we introduce Compiler-R1, the first reinforcement learning (RL)-driven framework specifically augmenting LLM capabilities for compiler auto-tuning. Compiler-R1 features a curated, high-quality reasoning dataset and a novel two-stage end-to-end RL training pipeline, enabling efficient environment exploration and learning through an outcome-based reward. Extensive experiments across seven datasets demonstrate Compiler-R1 achieving an average 8.46% IR instruction count reduction compared to opt -Oz, showcasing the strong potential of RL-trained LLMs for compiler optimization. Our code and datasets are publicly available at https://github.com/Panhaolin2001/Compiler-R1.

cs.LG

Orthogonal Geometry of Magneto-Optical Kerr Effect Enabled by Magnetization Multipole of Berry Curvature

The Magneto-Optical Kerr Effect (MOKE) is a fundamental tool in magnetometry, pivotal for advancing research in optics, magnetism, and spintronics as a direct probe of magnetization. Traditional MOKE measurements primarily detect the magnetization components parallel to the Poynting vector, which can only access the magnitude but not the direction of the orthogonal component. In this study, we introduce an orthogonal MOKE geometry in which the Kerr signal detects both the magnitude and direction of the magnetization component perpendicular to the Poynting vector. We demonstrate the broad applicability of this orthogonal geometry through the MOKE measurements in cubic ferromagnets and van der Waals ferromagnet. We theoretically show that the orthogonal MOKE geometry is enabled by the multipolar structure of Berry curvature in the magnetization space, which generally induces a Voigt vector orthogonal to the magnetization, thereby accounting for the unique magnetization angle dependence distinct from conventional MOKE. The establishment of the orthogonal MOKE geometry not only introduces a new paradigm for magneto-optical measurements but also provides a framework for exploring the magnetization multipoles of Berry curvature across the electromagnetic spectrum.

physics.optics

Gap Preserving Distillation by Building Bidirectional Mappings with A Dynamic Teacher

Knowledge distillation aims to transfer knowledge from a large teacher model to a compact student counterpart, often coming with a significant performance gap between them. We find that a too-large performance gap can hamper the training process, which is also verified in recent studies. To address this, we propose a Gap Preserving Distillation (GPD) method that trains an additional dynamic teacher model from scratch along with training the student to bridge this gap. In this way, it becomes possible to maintain a reasonable performance gap between teacher and student during the whole distillation process. To further strengthen distillation from the dynamic teacher to the student, we develop a hard strategy by enforcing them to share parameters and encouraging parameter inheritance. Besides hard strategy, we also build the soft bidirectional mappings between them which are built on an Inverse Reparameterization (IR) method and a Channel-Branch Reparameterization (CBR) strategy. We highlight that our IR is able to initialize a larger dynamic teacher with an arbitrary expansion ratio, while preserving exactly the same accuracy as the given student model. In this way, it guarantees that the dynamic teacher and student start from the same point and avoid a too large gap in early stage of training. As for our CBR, with parameter-sharing, it directly extracts an effective student model from the well-learned dynamic teacher without any post-training, making our method highly flexible for model deployment. In the experiments, GPD significantly outperforms existing distillation methods on top of both CNNs and transformers architectures, achieving up to 1.58% accuracy improvement. Interestingly, GPD also generalizes well to the scenarios without a pre-trained teacher, including training from scratch and fine-tuning, yielding a large improvement of 1.80% and 0.89% on ResNet18, respectively.

cs.CV

Enhanced Long-Tailed Recognition with Contrastive CutMix Augmentation

Real-world data often follows a long-tailed distribution, where a few head classes occupy most of the data and a large number of tail classes only contain very limited samples. In practice, deep models often show poor generalization performance on tail classes due to the imbalanced distribution. To tackle this, data augmentation has become an effective way by synthesizing new samples for tail classes. Among them, one popular way is to use CutMix that explicitly mixups the images of tail classes and the others, while constructing the labels according to the ratio of areas cropped from two images. However, the area-based labels entirely ignore the inherent semantic information of the augmented samples, often leading to misleading training signals. To address this issue, we propose a Contrastive CutMix (ConCutMix) that constructs augmented samples with semantically consistent labels to boost the performance of long-tailed recognition. Specifically, we compute the similarities between samples in the semantic space learned by contrastive learning, and use them to rectify the area-based labels. Experiments show that our ConCutMix significantly improves the accuracy on tail classes as well as the overall performance. For example, based on ResNeXt-50, we improve the overall accuracy on ImageNet-LT by 3.0% thanks to the significant improvement of 3.3% on tail classes. We highlight that the improvement also generalizes well to other benchmarks and models. Our code and pretrained models are available at https://github.com/PanHaulin/ConCutMix.

cs.CV

Observation of the In-plane Anomalous Hall Effect induced by Octupole in Magnetization Space

The Anomalous Hall Effect (AHE) manifests as a transverse voltage proportional to magnetization in ferromagnetic materials under the application of a charge current, being an indispensable tool for probing magnetism, especially in nanoscale devices. However, the AHE primarily sensitizes to out-of-plane magnetization, thereby hindering its capacity to discern the in-plane magnetization, a characteristic prevalent in ferromagnetic films. Here we challenge this conventional understanding by demonstrating the in-plane magnetization-induced AHE in iron and nickel, two ubiquitous ferromagnets. This observation of the in-plane AHE is remarkable as it contradicts existing theories that forbid such phenomena in cubic crystal systems. We trace the origin of this unanticipated phenomenon to a hitherto unconsidered octupole of the anomalous Hall conductivity in the magnetization space, a mechanism we propose could enable the detection of in-plane AHE in a wide range of ferromagnetic materials. This work realizes the in-plane AHE in common ferromagnets by exploiting the anomalous Hall conductivity octupole, revealing a new physical origin of the AHE and promising to revolutionize the design of magnetic devices and sensors.

cond-mat.mtrl-sci

Infrared Imaging of Magnetic Octupole Domains in Non-collinear Antiferromagnets

Magnetic structure plays a pivotal role in the functionality of antiferromagnets (AFMs), which not only can be employed to encode digital data but also yields novel phenomena. Despite its growing significance, visualizing the antiferromagnetic domain structure remains a challenge, particularly for non-collinear AFMs. Currently, the observation of magnetic domains in non-collinear antiferromagnetic materials is feasible only in Mn$_{3}$Sn, underscoring the limitations of existing techniques that necessitate distinct methods for in-plane and out-of-plane magnetic domain imaging. In this study, we present a versatile method for imaging the antiferromagnetic domain structure in a series of non-collinear antiferromagnetic materials by utilizing the anomalous Ettingshausen effect (AEE), which resolves both the magnetic octupole moments parallel and perpendicular to the sample surface. Temperature modulation due to the AEE originating from different magnetic domains is measured by the lock-in thermography, revealing distinct behaviors of octupole domains in different antiferromagnets. This work delivers an efficient technique for the visualization of magnetic domains in non-collinear AFMs, which enables comprehensive study of the magnetization process at the microscopic level and paves the way for potential advancements in applications.

cond-mat.mtrl-sci

Boosting Semi-Supervised Learning with Contrastive Complementary Labeling

Semi-supervised learning (SSL) has achieved great success in leveraging a large amount of unlabeled data to learn a promising classifier. A popular approach is pseudo-labeling that generates pseudo labels only for those unlabeled data with high-confidence predictions. As for the low-confidence ones, existing methods often simply discard them because these unreliable pseudo labels may mislead the model. Nevertheless, we highlight that these data with low-confidence pseudo labels can be still beneficial to the training process. Specifically, although the class with the highest probability in the prediction is unreliable, we can assume that this sample is very unlikely to belong to the classes with the lowest probabilities. In this way, these data can be also very informative if we can effectively exploit these complementary labels, i.e., the classes that a sample does not belong to. Inspired by this, we propose a novel Contrastive Complementary Labeling (CCL) method that constructs a large number of reliable negative pairs based on the complementary labels and adopts contrastive learning to make use of all the unlabeled data. Extensive experiments demonstrate that CCL significantly improves the performance on top of existing methods. More critically, our CCL is particularly effective under the label-scarce settings. For example, we yield an improvement of 2.43% over FixMatch on CIFAR-10 only with 40 labeled data.

cs.CV

Improving Fine-tuning of Self-supervised Models with Contrastive Initialization

Self-supervised learning (SSL) has achieved remarkable performance in pretraining the models that can be further used in downstream tasks via fine-tuning. However, these self-supervised models may not capture meaningful semantic information since the images belonging to the same class are always regarded as negative pairs in the contrastive loss. Consequently, the images of the same class are often located far away from each other in learned feature space, which would inevitably hamper the fine-tuning process. To address this issue, we seek to provide a better initialization for the self-supervised models by enhancing the semantic information. To this end, we propose a Contrastive Initialization (COIN) method that breaks the standard fine-tuning pipeline by introducing an extra initialization stage before fine-tuning. Extensive experiments show that, with the enriched semantics, our COIN significantly outperforms existing methods without introducing extra training cost and sets new state-of-the-arts on multiple downstream tasks.

cs.CV