SearcharxivSearch

arXiv subjects

Haoqi Wang

Publications and source records attributed to Haoqi Wang.

14 recordsLinked to original sources

OffQ: Taming Structured Outliers in LLM Quantization by Offsetting

Low-bit quantization has been widely adopted to accelerate the inference of large language models (LLMs) by significantly reducing computational cost and memory usage. However, activation outliers pose a major challenge to effective quantization, often leading to notable performance degradation. In this paper, we introduce OffQ, a method designed to mitigate activation outliers in low-bit quantization through a novel offsetting mechanism. Specifically, OffQ first identifies a low-dimensional outlier subspace in the activations using a proposed top-1 PCA, and then concentrates high-magnitude activations into 1 channel via rotation. OffQ then absorbs this concentrated outlier channel by converting its magnitude into a shared offset, thereby reducing the standard deviation of the activations. This offsetting strategy enables effective W4A4KV4 quantization of LLMs using deployment-friendly uniform-grid and uniform-precision quantization. Extensive experiments across diverse LLM architectures and benchmarks demonstrate that OffQ outperforms state-of-the-art baselines, consistently improving model accuracy while preserving low-bit efficiency.

cs.LG

Demystifying Singular Defects in Large Language Models

Large transformer models are known to produce high-norm tokens. In vision transformers (ViTs), such tokens have been mathematically modeled through the singular vectors of the linear approximations of layers. However, in large language models (LLMs), the underlying causes of high-norm tokens remain largely unexplored, and their different properties from those of ViTs require a new analysis framework. In this paper, we provide both theoretical insights and empirical validation across a range of recent models, leading to the following observations: i) The layer-wise singular direction predicts the abrupt explosion of token norms in LLMs. ii) The negative eigenvalues of a layer explain its sudden decay. iii) The computational pathways leading to high-norm tokens differ between initial and noninitial tokens. iv) High-norm tokens are triggered by the right leading singular vector of the matrix approximating the corresponding modules. We showcase two practical applications of these findings: the improvement of quantization schemes and the design of LLM signatures. Our findings not only advance the understanding of singular defects in LLMs but also open new avenues for their application. We expect that this work will stimulate further research into the internal mechanisms of LLMs. Code is released at https://github.com/haoqiwang/singular_defect.

cs.CL

OpenOOD v1.5: Enhanced Benchmark for Out-of-Distribution Detection

Out-of-Distribution (OOD) detection is critical for the reliable operation of open-world intelligent systems. Despite the emergence of an increasing number of OOD detection methods, the evaluation inconsistencies present challenges for tracking the progress in this field. OpenOOD v1 initiated the unification of the OOD detection evaluation but faced limitations in scalability and scope. In response, this paper presents OpenOOD v1.5, a significant improvement from its predecessor that ensures accurate and standardized evaluation of OOD detection methodologies at large scale. Notably, OpenOOD v1.5 extends its evaluation capabilities to large-scale data sets (ImageNet) and foundation models (e.g., CLIP and DINOv2), and expands its scope to investigate full-spectrum OOD detection which considers semantic and covariate distribution shifts at the same time. This work also contributes in-depth analysis and insights derived from comprehensive experimental results, thereby enriching the knowledge pool of OOD detection methodologies. With these enhancements, OpenOOD v1.5 aims to drive advancements and offer a more robust and comprehensive evaluation benchmark for OOD detection research.

cs.LG

Film Thickness Gauge Based on Interferometric Principle of Y-shaped Optical Fiber

In this paper, a thin film thickness gauge based on the interferometric principle of Y-shaped optical fiber is proposed to achieve accurate measurement of film thickness. In this paper, the optical fiber, the interferometric principle and the film thickness calculation principle are introduced, and the interferometric thickness measurement system based on Y-shaped optical fiber is constructed. The system uses the special structure of Y-shaped optical fiber to transmit the optical signal generated by the light source to the surface of the thin film, and obtains coherent optical signals of different wavelengths through reflection and interference. The spectrometer is used to receive and interpret these interference signals, and the thickness of the film is calculated according to the wavelength difference of the peak positions of the adjacent stages, combined with the refractive index of the film. In the specific design, the paper elaborates on the design of each part of the instrument, including the selection and parameter setting of the light source, Y-fiber and spectrometer. Among them, the Y-shaped optical fiber, as the core component of the instrument, has the function of transmitting optical signals and detecting optical signals on the surface of thin films. At the same time, the paper also introduces the housing packaging and internal assembly process of the instrument to ensure the portability and stability of the instrument. The results show that the thickness gauge has high measurement accuracy and stability, which can meet the needs of practical applications.

physics.optics

Multifunctional Portable Optical Measuring Instrument Based on Y-Fiber Optics

Based on grating diffraction principle, optical fiber transmission principle and optical interference principle, a multi-functional portable optical measuring instrument is constructed in this paper. The optical measurement visualization spectrometer based on CCD photoelectric image sensor is designed and assembled. The "Y" optical signal transmission fiber optical path suitable for multi-function measurement is improved and designed. The multi-function optical measurement system is built by combining with remote controlled multi-color LED lights. The spectral analysis, solution concentration monitoring and film thickness measurement are realized. The experimental results show that the observable wavelength range of the spectrometer is about 340-1050nm and the resolution is 1nm. The solution concentration can be obtained by measuring absorbance with optical fiber spectrometer. The film thickness measuring instrument can accurately measure the thickness of the micron film, and the measurement accuracy can reach 1.25 μm. It is proved that the instrument integrates multiple functions, has high measurement accuracy and wide range, and realizes non-contact measurement.

physics.optics

SINDER: Repairing the Singular Defects of DINOv2

Vision Transformer models trained on large-scale datasets, although effective, often exhibit artifacts in the patch token they extract. While such defects can be alleviated by re-training the entire model with additional classification tokens, the underlying reasons for the presence of these tokens remain unclear. In this paper, we conduct a thorough investigation of this phenomenon, combining theoretical analysis with empirical observations. Our findings reveal that these artifacts originate from the pre-trained network itself, specifically stemming from the leading left singular vector of the network's weights. Furthermore, to mitigate these defects, we propose a novel fine-tuning smooth regularization that rectifies structural deficiencies using only a small dataset, thereby avoiding the need for complete re-training. We validate our method on various downstream tasks, including unsupervised segmentation, classification, supervised segmentation, and depth estimation, demonstrating its effectiveness in improving model performance. Codes and checkpoints are available at https://github.com/haoqiwang/sinder.

cs.CV

Get the Best of Both Worlds: Improving Accuracy and Transferability by Grassmann Class Representation

We generalize the class vectors found in neural networks to linear subspaces (i.e.~points in the Grassmann manifold) and show that the Grassmann Class Representation (GCR) enables the simultaneous improvement in accuracy and feature transferability. In GCR, each class is a subspace and the logit is defined as the norm of the projection of a feature onto the class subspace. We integrate Riemannian SGD into deep learning frameworks such that class subspaces in a Grassmannian are jointly optimized with the rest model parameters. Compared to the vector form, the representative capability of subspaces is more powerful. We show that on ImageNet-1K, the top-1 error of ResNet50-D, ResNeXt50, Swin-T and Deit3-S are reduced by 5.6%, 4.5%, 3.0% and 3.5%, respectively. Subspaces also provide freedom for features to vary and we observed that the intra-class feature variability grows when the subspace dimension increases. Consequently, we found the quality of GCR features is better for downstream tasks. For ResNet50-D, the average linear transfer accuracy across 6 datasets improves from 77.98% to 79.70% compared to the strong baseline of vanilla softmax. For Swin-T, it improves from 81.5% to 83.4% and for Deit3, it improves from 73.8% to 81.4%. With these encouraging results, we believe that more applications could benefit from the Grassmann class representation. Code is released at https://github.com/innerlee/GCR.

cs.CV

OpenOOD: Benchmarking Generalized Out-of-Distribution Detection

Out-of-distribution (OOD) detection is vital to safety-critical machine learning applications and has thus been extensively studied, with a plethora of methods developed in the literature. However, the field currently lacks a unified, strictly formulated, and comprehensive benchmark, which often results in unfair comparisons and inconclusive results. From the problem setting perspective, OOD detection is closely related to neighboring fields including anomaly detection (AD), open set recognition (OSR), and model uncertainty, since methods developed for one domain are often applicable to each other. To help the community to improve the evaluation and advance, we build a unified, well-structured codebase called OpenOOD, which implements over 30 methods developed in relevant fields and provides a comprehensive benchmark under the recently proposed generalized OOD detection framework. With a comprehensive comparison of these methods, we are gratified that the field has progressed significantly over the past few years, where both preprocessing methods and the orthogonal post-hoc methods show strong potential.

cs.CV

ViM: Out-Of-Distribution with Virtual-logit Matching

Most of the existing Out-Of-Distribution (OOD) detection algorithms depend on single input source: the feature, the logit, or the softmax probability. However, the immense diversity of the OOD examples makes such methods fragile. There are OOD samples that are easy to identify in the feature space while hard to distinguish in the logit space and vice versa. Motivated by this observation, we propose a novel OOD scoring method named Virtual-logit Matching (ViM), which combines the class-agnostic score from feature space and the In-Distribution (ID) class-dependent logits. Specifically, an additional logit representing the virtual OOD class is generated from the residual of the feature against the principal space, and then matched with the original logits by a constant scaling. The probability of this virtual logit after softmax is the indicator of OOD-ness. To facilitate the evaluation of large-scale OOD detection in academia, we create a new OOD dataset for ImageNet-1K, which is human-annotated and is 8.8x the size of existing datasets. We conducted extensive experiments, including CNNs and vision transformers, to demonstrate the effectiveness of the proposed ViM score. In particular, using the BiT-S model, our method gets an average AUROC 90.91% on four difficult OOD benchmarks, which is 4% ahead of the best baseline. Code and dataset are available at https://github.com/haoqiwang/vim.

cs.CV

Semantically Coherent Out-of-Distribution Detection

Current out-of-distribution (OOD) detection benchmarks are commonly built by defining one dataset as in-distribution (ID) and all others as OOD. However, these benchmarks unfortunately introduce some unwanted and impractical goals, e.g., to perfectly distinguish CIFAR dogs from ImageNet dogs, even though they have the same semantics and negligible covariate shifts. These unrealistic goals will result in an extremely narrow range of model capabilities, greatly limiting their use in real applications. To overcome these drawbacks, we re-design the benchmarks and propose the semantically coherent out-of-distribution detection (SC-OOD). On the SC-OOD benchmarks, existing methods suffer from large performance degradation, suggesting that they are extremely sensitive to low-level discrepancy between data sources while ignoring their inherent semantics. To develop an effective SC-OOD detection approach, we leverage an external unlabeled set and design a concise framework featured by unsupervised dual grouping (UDG) for the joint modeling of ID and OOD data. The proposed UDG can not only enrich the semantic knowledge of the model by exploiting unlabeled data in an unsupervised manner, but also distinguish ID/OOD samples to enhance ID classification and OOD detection tasks simultaneously. Extensive experiments demonstrate that our approach achieves state-of-the-art performance on SC-OOD benchmarks. Code and benchmarks are provided on our project page: https://jingkang50.github.io/projects/scood.

cs.CV

Detect and remove watermark in deep neural networks via generative adversarial networks

Deep neural networks (DNN) have achieved remarkable performance in various fields. However, training a DNN model from scratch requires a lot of computing resources and training data. It is difficult for most individual users to obtain such computing resources and training data. Model copyright infringement is an emerging problem in recent years. For instance, pre-trained models may be stolen or abuse by illegal users without the authorization of the model owner. Recently, many works on protecting the intellectual property of DNN models have been proposed. In these works, embedding watermarks into DNN based on backdoor is one of the widely used methods. However, when the DNN model is stolen, the backdoor-based watermark may face the risk of being detected and removed by an adversary. In this paper, we propose a scheme to detect and remove watermark in deep neural networks via generative adversarial networks (GAN). We demonstrate that the backdoor-based DNN watermarks are vulnerable to the proposed GAN-based watermark removal attack. The proposed attack method includes two phases. In the first phase, we use the GAN and few clean images to detect and reverse the watermark in the DNN model. In the second phase, we fine-tune the watermarked DNN based on the reversed backdoor images. Experimental evaluations on the MNIST and CIFAR10 datasets demonstrate that, the proposed method can effectively remove about 98% of the watermark in DNN models, as the watermark retention rate reduces from 100% to less than 2% after applying the proposed attack. In the meantime, the proposed attack hardly affects the model's performance. The test accuracy of the watermarked DNN on the MNIST and the CIFAR10 datasets drops by less than 1% and 3%, respectively.

cs.MM

Influence of Ln elements (Ln = La, Pr, Nd, Sm) on the structure and oxygen permeability of Ca-containing dual-phase membranes

Developing good performance and low-cost oxygen permeable membranes for CO2 capture based on the oxy-fuel concept is greatly desirable but challenging. Despite tremendous efforts in exploring new CO2-stable dual-phase membranes, its presence is however still far from meeting the industrial requirements. Here we report a series of new Ca-containing CO2-resistant oxygen transporting membranes with composition 60wt.%Ce0.9Ln0.1O2-40wt.%Ln0.6Ca0.4FeO3(CLnO-LnCFO; Ln = La, Pr, Nd, Sm) synthesized via a Pechini one-pot method. Our results indicate all investigated compounds are composed of perovskite and fluorite phases, while the perovskite phases in the CNO-NCFO and CSO-SCFO membranes after sintering generates Ca-rich and Ca-less two kinds of grains with different morphologies, where the Ca-less small perovskite grains block the transport of oxygen ions and eventually result in poor oxygen permeability. Among our investigated CLnO-LnCFO membranes, CPO-PCFO exhibits the highest oxygen permeability and excellent CO2 stability, which were mainly associated with the improvement in crystal symmetry, non-negligible electronic conductivity of fluorite phase and the enhancement in electronic conductivity of perovskite. Our results establish Ca-containing oxides as candidate material platforms for membrane engineering devices that combine CO2 capture and oxygen separation.

physics.app-ph

High CO2-tolerance oxygen permeation dual-phase membranes Ce0.9Pr0.1O2-δ-Pr0.6Sr0.4Fe0.8Al0.2O3-δ

High stability and oxygen permeability are two prominent requirements for the oxygen transport membrane candidates used as industrialization. Herein, we report several composite membranes based on xwt.%Ce0.9Pr0.1O2(CPO)-(100-x)wt.%Pr0.6Sr0.4Fe0.8Al0.2O3(PSFAO) (x = 50, 60 and 75) prepared via a modified Pechini method. Oxygen permeability test reveals that the 60CPO-40PSFAO composition exhibits the highest oxygen permeability. The oxygen permeation flux through the optimal uncoated 0.33 mm-thickness 60CPO-40PSFAO composite can reach 1.03 mL cm-2 min-1 (over the general requirement value of 1 mL cm-2 min-1) in air/He atmosphere at 1000 °C. In situ XRD performance confirms the optimal 60CPO-40PSFAO sample shows excellent stability in CO2-containing atmospheres. The 60CPO-40PSFAO membrane still exhibits simultaneously excellent oxygen permeability and phase stability after operating for over 100 h at air/CO2 condition at 1000 °C, which further indicates that the 60CPO-40PSFAO composite is likely to be used for oxygen supply in CO2 capture

physics.app-ph

Effects of Al content on the oxygen permeability through dual-phase membrane 60Ce$_{0.9}$Pr$_{0.1}$O$_{2-δ}$-40Pr$_{0.6}$Sr$_{0.4}$Fe$_{1-x}$Al$_x$O$_{3-δ}$

Ceramic dual-phase oxygen transport membranes with the composition of 60wt.% Ce0.9Pr0.1O2-δ-40wt.%Pr0.6Sr0.4Fe1-xAlxO3-δ (x = 0.05, 0.1, 0.2, 0.3, 0.4, 0.6, 0.8, 1.0) (60CPO-40PSF1-xAxO) based on 60Ce0.9Pr0.1O2-δ-40Pr0.6Sr0.4FeO3-δ doped Al was successfully synthesized through a modified Pechini method. Crystal structure, surface microtopography and oxygen permeability are investigated systematically. The cell parameters of perovskite phase first increased and then decreased with the increase of Al content, which is related to the radius of the Al3+ and the formation of impurity phase. As x ranges from 0.1 to 0.8, the oxygen permeability of the materials first increases and then decreases, and the maximum value of oxygen permeation rate for 60CPO-40PSF1-xAxO membranes with 0.4mm thickness at 1000 °C is 1.12 mL min-1 cm-2 when x = 0.4. XRD measurements revealed high temperature stability and CO2-tolerant property of the dual-phase composites. The partial replacement of Fe$^{3+}$/Fe$^{4+}$ by Al$^{3+}$ causes the material not only to exhibit good stability, but also to increase the oxygen permeability of the membranes.

physics.app-ph