Kun Fang
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Previous Organizations / Institutes
The organizations / institutes from the scholar's other articles in the past ten years
Research Subjects
Kun Fang has a total of 55 co-authors. Here are the top co-authors by number of shared publications:
- Jie Yang
Institute of Image Processing and Pattern Recognition, Shanghai Jiao Tong University, Shanghai 200240, China
8 shared publications - Xiaolin Huang
Shanghai Jiao Tong University
7 shared publications - Yingwen Wu
Shanghai Jiao Tong University
5 shared publications - Qinghua Tao
School of Automation, Beijing Institute of Technology, Beijing, China
4 shared publications - Tao Li
Shanghai Jiao Tong University
3 shared publications - Guohang Yan
Autonomous Driving Group, Shanghai AI Laboratory, Shanghai, People’s Republic of China
2 shared publications
Latest Publications
- 1 January 2026
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Pattern Analysis and Machine Intelligence
- Vol. 48 (10) , 1-16
Kernel PCA for out-of-Distribution Detection: Non-Linear Kernel Selection and Approximation
Out-of-Distribution (OoD) detection is vital for the reliability of deep neural networks, the key of which lies in effectively characterizing the disparities between OoD and In Distribution (InD) data. In this work, such disparities are exploited through a fresh perspective of non-linear feature sub spaces. That is, a discriminative non-linear subspace is learned from InD features to capture representative patterns of InD, while informative patterns of OoD features cannot be well captured in such a subspace due to their different distribution. Grounded on this perspective, we exploit the deviations of InD and OoD features in such a non-linear subspace for effective OoD detection. To be specific, we leverage the framework of Kernel Principal Component Analysis (KPCA) to attain the discriminative non linear subspace and deploy the reconstruction error on such subspace to distinguish InD and OoD data. Two challenges emerge: (i) the learning of an effective non-linear subspace, i.e., the selection of kernel function in KPCA, and (ii) the computation of the kernel matrix with large-scale InD data. For the former, we reveal two vital non-linear patterns that closely relate to the InD-OoD disparity, leading to the establishment of a Cosine Gaussian kernel for constructing the subspace. For the latter, we introduce two techniques to approximate the Cosine-Gaussian kernel with significantly cheap computations. In particular, our approximation is further tailored by incorporating the InD data confidence, which is demonstrated to promote the learning of discriminative subspaces for OoD data. Our study presents new insights into the non-linear feature subspace for OoD detection and contributes practical explorations on the associated kernel design and efficient computations, yielding a KPCA detection framework with distinctively improved efficacy and efficiency.
- 1 January 2026
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Pattern Analysis and Machine Intelligence
- Vol. 48 (10) , 1-16
Kernel PCA for out-of-Distribution Detection: Non-Linear Kernel Selection and Approximation
Out-of-Distribution (OoD) detection is vital for the reliability of deep neural networks, the key of which lies in effectively characterizing the disparities between OoD and In Distribution (InD) data. In this work, such disparities are exploited through a fresh perspective of non-linear feature sub spaces. That is, a discriminative non-linear subspace is learned from InD features to capture representative patterns of InD, while informative patterns of OoD features cannot be well captured in such a subspace due to their different distribution. Grounded on this perspective, we exploit the deviations of InD and OoD features in such a non-linear subspace for effective OoD detection. To be specific, we leverage the framework of Kernel Principal Component Analysis (KPCA) to attain the discriminative non linear subspace and deploy the reconstruction error on such subspace to distinguish InD and OoD data. Two challenges emerge: (i) the learning of an effective non-linear subspace, i.e., the selection of kernel function in KPCA, and (ii) the computation of the kernel matrix with large-scale InD data. For the former, we reveal two vital non-linear patterns that closely relate to the InD-OoD disparity, leading to the establishment of a Cosine Gaussian kernel for constructing the subspace. For the latter, we introduce two techniques to approximate the Cosine-Gaussian kernel with significantly cheap computations. In particular, our approximation is further tailored by incorporating the InD data confidence, which is demonstrated to promote the learning of discriminative subspaces for OoD data. Our study presents new insights into the non-linear feature subspace for OoD detection and contributes practical explorations on the associated kernel design and efficient computations, yielding a KPCA detection framework with distinctively improved efficacy and efficiency.
- 31 March 2025
- Published by Elsevier in Neural Networks
- Vol. 188, 107426
Multi-head ensemble of smoothed classifiers for certified robustness
- 31 March 2025
- Published by Elsevier in Neural Networks
- Vol. 188, 107426
Multi-head ensemble of smoothed classifiers for certified robustness
- 6 March 2025
- Published by Springer Nature in International Journal of Machine Learning and Cybernetics
- Vol. 16 (7-8) , 5195-5211
Adaptive distillation on hard samples benefits consistency for certified robustness
- 6 March 2025
- Published by Springer Nature in International Journal of Machine Learning and Cybernetics
- Vol. 16 (7-8) , 5195-5211
Adaptive distillation on hard samples benefits consistency for certified robustness
- 30 July 2024
- Published by IOP Publishing in Measurement Science and Technology
- Vol. 35 (10) , 105204
Online LiDAR-camera extrinsic parameters self-checking and recalibration
During production, smart cars are equipped with calibrated LiDARs and cameras. However, due to the vibrations that inevitably occur during driving, the sensors’ extrinsic parameters may change slightly over time. It is a significant challenge to ensure the ongoing security of these systems throughout the car’s lifetime. To address this issue, we propose a self-checking and recalibration algorithm that can continuously detect the sensor data of intelligent vehicles. If the sensor’s miscalibration is detected, the data can be repaired promptly to ensure the vehicle’s reliability. Our self-checking algorithm extracts features from the point cloud and image and performs pixel-wise comparisons. To improve feature quality, we utilize the patch-wise transformer to enhance local information exchange, which also benefits the subsequent extrinsic recalibration. To facilitate the study, we generate two customized datasets from the KITTI dataset and the Waymo Open Dataset. The experiments conducted on these datasets demonstrate the effectiveness of our proposed method in accurately calibrating the LiDAR and camera systems throughout the car’s lifetime. This study is the first to highlight the importance of continually checking the calibrated extrinsic parameters for autonomous driving. Our findings contribute to the broader goal of improving safety and reliability in autonomous driving systems. The dataset and code are available at https://github.com/OpenCalib/LiDAR2camera_self-check.
- 30 July 2024
- Published by IOP Publishing in Measurement Science and Technology
- Vol. 35 (10) , 105204
Online LiDAR-camera extrinsic parameters self-checking and recalibration
During production, smart cars are equipped with calibrated LiDARs and cameras. However, due to the vibrations that inevitably occur during driving, the sensors’ extrinsic parameters may change slightly over time. It is a significant challenge to ensure the ongoing security of these systems throughout the car’s lifetime. To address this issue, we propose a self-checking and recalibration algorithm that can continuously detect the sensor data of intelligent vehicles. If the sensor’s miscalibration is detected, the data can be repaired promptly to ensure the vehicle’s reliability. Our self-checking algorithm extracts features from the point cloud and image and performs pixel-wise comparisons. To improve feature quality, we utilize the patch-wise transformer to enhance local information exchange, which also benefits the subsequent extrinsic recalibration. To facilitate the study, we generate two customized datasets from the KITTI dataset and the Waymo Open Dataset. The experiments conducted on these datasets demonstrate the effectiveness of our proposed method in accurately calibrating the LiDAR and camera systems throughout the car’s lifetime. This study is the first to highlight the importance of continually checking the calibrated extrinsic parameters for autonomous driving. Our findings contribute to the broader goal of improving safety and reliability in autonomous driving systems. The dataset and code are available at https://github.com/OpenCalib/LiDAR2camera_self-check.
- 15 July 2024
- Published by Springer Nature in International Journal of Computer Vision
- Vol. 132 (12) , 6107-6126
Revisiting Deep Ensemble for Out-of-Distribution Detection: A Loss Landscape Perspective
- 15 July 2024
- Published by Springer Nature in International Journal of Computer Vision
- Vol. 132 (12) , 6107-6126
Revisiting Deep Ensemble for Out-of-Distribution Detection: A Loss Landscape Perspective
- 17 April 2024
- Published by IOP Publishing in Measurement Science and Technology
- Vol. 35 (7) , 075203
Automatic multi-LiDAR calibration and refinement method
Sensor-based environmental perception is a crucial component of autonomous driving systems. To perceive the surrounding environment better, an intelligent system would utilize multiple LiDARs (3D Light Detection and Ranging). The accuracy of the perception largely depends on the quality of the sensor calibration. This research aims to develop a robust, fast, automatic, and accurate calibration strategy for multiple LiDAR systems. Our proposed multi-LiDAR calibration method consists of two stages: rough and refinement calibration. In the first stage, sensors are roughly calibrated from an arbitrary initial position using a deep neural network that does not rely on prior information or constraints on the initial sensor pose. In the second stage, we propose the octree-based refinement, an optimization method that considers sensor noise and prioritization. Our strategy is robust, fast, and not restricted to any environment. Additionally, we collected two datasets consisting of both real-world and simulated scenarios. Our experimental results from both datasets demonstrate the reliability and accuracy of our method. All the related datasets and codes are open-sourced on the GitHub website at https://github.com/OpenCalib/LiDAR2LiDAR.
- 17 April 2024
- Published by IOP Publishing in Measurement Science and Technology
- Vol. 35 (7) , 075203
Automatic multi-LiDAR calibration and refinement method
Sensor-based environmental perception is a crucial component of autonomous driving systems. To perceive the surrounding environment better, an intelligent system would utilize multiple LiDARs (3D Light Detection and Ranging). The accuracy of the perception largely depends on the quality of the sensor calibration. This research aims to develop a robust, fast, automatic, and accurate calibration strategy for multiple LiDAR systems. Our proposed multi-LiDAR calibration method consists of two stages: rough and refinement calibration. In the first stage, sensors are roughly calibrated from an arbitrary initial position using a deep neural network that does not rely on prior information or constraints on the initial sensor pose. In the second stage, we propose the octree-based refinement, an optimization method that considers sensor noise and prioritization. Our strategy is robust, fast, and not restricted to any environment. Additionally, we collected two datasets consisting of both real-world and simulated scenarios. Our experimental results from both datasets demonstrate the reliability and accuracy of our method. All the related datasets and codes are open-sourced on the GitHub website at https://github.com/OpenCalib/LiDAR2LiDAR.
- Open Access
Revisiting Random Weight Perturbation for Efficiently Improving Generalization
Improving the generalization ability of modern deep neural networks (DNNs) is a fundamental challenge in machine learning. Two branches of methods have been proposed to seek flat minima and improve generalization: one led by sharpness-aware minimization (SAM) minimizes the worst-case neighborhood loss through adversarial weight perturbation (AWP), and the other minimizes the expected Bayes objective with random weight perturbation (RWP). While RWP offers advantages in computation and is closely linked to AWP on a mathematical basis, its empirical performance has consistently lagged behind that of AWP. In this paper, we revisit the use of RWP for improving generalization and propose improvements from two perspectives: i) the trade-off between generalization and convergence and ii) the random perturbation generation. Through extensive experimental evaluations, we demonstrate that our enhanced RWP methods achieve greater efficiency in enhancing generalization, particularly in large-scale problems, while also offering comparable or even superior performance to SAM. The code is released at https://github.com/nblt/mARWP.
Open AccessRevisiting Random Weight Perturbation for Efficiently Improving Generalization
Improving the generalization ability of modern deep neural networks (DNNs) is a fundamental challenge in machine learning. Two branches of methods have been proposed to seek flat minima and improve generalization: one led by sharpness-aware minimization (SAM) minimizes the worst-case neighborhood loss through adversarial weight perturbation (AWP), and the other minimizes the expected Bayes objective with random weight perturbation (RWP). While RWP offers advantages in computation and is closely linked to AWP on a mathematical basis, its empirical performance has consistently lagged behind that of AWP. In this paper, we revisit the use of RWP for improving generalization and propose improvements from two perspectives: i) the trade-off between generalization and convergence and ii) the random perturbation generation. Through extensive experimental evaluations, we demonstrate that our enhanced RWP methods achieve greater efficiency in enhancing generalization, particularly in large-scale problems, while also offering comparable or even superior performance to SAM. The code is released at https://github.com/nblt/mARWP.
- 12 January 2024
- Published by Elsevier in Pattern Recognition
- Vol. 149
Towards robust neural networks via orthogonal diversity
- 12 January 2024
- Published by Elsevier in Pattern Recognition
- Vol. 149
Towards robust neural networks via orthogonal diversity
- Open Access
Dynamic quantum circuit compilation
Quantum computing has shown tremendous promise in addressing complex computational problems, yet its practical realization is hindered by the limited availability of qubits for computation. Recent advancements in quantum hardware have introduced mid-circuit measurements and resets, enabling the reuse of measured qubits and significantly reducing the qubit requirements for executing quantum algorithms. In this work, we present a systematic study of dynamic quantum circuit compilation, a process that transforms static quantum circuits into their dynamic equivalents with a reduced qubit count through qubit-reuse. We establish the first general framework for optimizing the dynamic circuit compilation via graph manipulation. In particular, we completely characterize the optimal quantum circuit compilation using binary integer programming, provide efficient algorithms for determining whether a given quantum circuit can be reduced to a smaller circuit and present heuristic algorithms for devising dynamic compilation schemes in general. Furthermore, we conduct a thorough analysis of quantum circuits with practical relevance, offering optimal compilations for well-known quantum algorithms in quantum computation, ansatz circuits utilized in quantum machine learning, and measurement-based quantum computation crucial for quantum networking. We also perform a comparative analysis against state-of-the-art approaches, demonstrating the superior performance of our methods in both structured and random quantum circuits. Our framework lays a rigorous foundation for comprehending dynamic quantum circuit compilation via qubit-reuse, bridging the gap between theoretical quantum algorithms and their physical implementation on quantum computers with limited resources.
Open AccessDynamic quantum circuit compilation
Quantum computing has shown tremendous promise in addressing complex computational problems, yet its practical realization is hindered by the limited availability of qubits for computation. Recent advancements in quantum hardware have introduced mid-circuit measurements and resets, enabling the reuse of measured qubits and significantly reducing the qubit requirements for executing quantum algorithms. In this work, we present a systematic study of dynamic quantum circuit compilation, a process that transforms static quantum circuits into their dynamic equivalents with a reduced qubit count through qubit-reuse. We establish the first general framework for optimizing the dynamic circuit compilation via graph manipulation. In particular, we completely characterize the optimal quantum circuit compilation using binary integer programming, provide efficient algorithms for determining whether a given quantum circuit can be reduced to a smaller circuit and present heuristic algorithms for devising dynamic compilation schemes in general. Furthermore, we conduct a thorough analysis of quantum circuits with practical relevance, offering optimal compilations for well-known quantum algorithms in quantum computation, ansatz circuits utilized in quantum machine learning, and measurement-based quantum computation crucial for quantum networking. We also perform a comparative analysis against state-of-the-art approaches, demonstrating the superior performance of our methods in both structured and random quantum circuits. Our framework lays a rigorous foundation for comprehending dynamic quantum circuit compilation via qubit-reuse, bridging the gap between theoretical quantum algorithms and their physical implementation on quantum computers with limited resources.
- Open Access
- 14 November 2023
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Intelligent Systems and Technology
- Vol. 14 (6) , 1-16
Unifying Gradients to Improve Real-World Robustness for Deep Networks
The wide application of deep neural networks (DNNs) demands an increasing amount of attention to their real-world robustness, i.e., whether a DNN resists black-box adversarial attacks, among which score-based query attacks (SQAs) are the most threatening since they can effectively hurt a victim network with only access to model outputs. Defending against SQAs requires a slight but artful variation of outputs due to the service purpose for users, who share the same output information with SQAs. In this article, we propose a real-world defense by Unifying Gradients (UniG) of different data so that SQAs could only probe a much weaker attack direction that is similar for different samples. Since such universal attack perturbations have been validated as less aggressive than the input-specific perturbations, UniG protects real-world DNNs by indicating to attackers a twisted and less informative attack direction. We implement UniG efficiently by a Hadamard product module, which is plug-and-play. According to extensive experiments on 5 SQAs, 2 adaptive attacks and 7 defense baselines, UniG significantly improves real-world robustness without hurting clean accuracy on CIFAR10 and ImageNet. For instance, UniG maintains a model of 77.80% accuracy under a 2500-query Square attack while the state-of-the-art adversarially trained model only has 67.34% on CIFAR10. Simultaneously, UniG outperforms all compared baselines in terms of clean accuracy and achieves the smallest modification of the model output. The code is released at https://github.com/snowien/UniG-pytorch .
- 14 November 2023
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Intelligent Systems and Technology
- Vol. 14 (6) , 1-16
Open AccessUnifying Gradients to Improve Real-World Robustness for Deep Networks
The wide application of deep neural networks (DNNs) demands an increasing amount of attention to their real-world robustness, i.e., whether a DNN resists black-box adversarial attacks, among which score-based query attacks (SQAs) are the most threatening since they can effectively hurt a victim network with only access to model outputs. Defending against SQAs requires a slight but artful variation of outputs due to the service purpose for users, who share the same output information with SQAs. In this article, we propose a real-world defense by Unifying Gradients (UniG) of different data so that SQAs could only probe a much weaker attack direction that is similar for different samples. Since such universal attack perturbations have been validated as less aggressive than the input-specific perturbations, UniG protects real-world DNNs by indicating to attackers a twisted and less informative attack direction. We implement UniG efficiently by a Hadamard product module, which is plug-and-play. According to extensive experiments on 5 SQAs, 2 adaptive attacks and 7 defense baselines, UniG significantly improves real-world robustness without hurting clean accuracy on CIFAR10 and ImageNet. For instance, UniG maintains a model of 77.80% accuracy under a 2500-query Square attack while the state-of-the-art adversarially trained model only has 67.34% on CIFAR10. Simultaneously, UniG outperforms all compared baselines in terms of clean accuracy and achieves the smallest modification of the model output. The code is released at https://github.com/snowien/UniG-pytorch .