Edge computing, with its low latency, dynamic scalability, and location awareness, along with the convergence of computing and communication paradigms, has been successfully applied in critical domains such as industrial IoT, smart healthcare, smart homes, and public safety. This paper provides a comprehensive survey of open-source edge computing simulators and emulators, presented in our GitHub repository (https://github.com/qijianpeng/awesome-edge-computing), emphasizing the convergence of computing and networking paradigms. By examining more than 40 tools, including CloudSim, NS-3, and others, we identify the strengths and limitations in simulating and emulating edge environments. This survey classifies these tools into three categories: packet-level, application-level, and emulators. Furthermore, we evaluate them across five dimensions, ranging from resource representation to resource utilization. The survey highlights the integration of different computing paradigms, packet processing capabilities, support for edge environments, user-defined metric interfaces, and scenario visualization. The findings aim to guide researchers in selecting appropriate tools for developing and validating advanced computing and networking technologies.
Saturday, May 17. 2025
Surveys
Introductions
An Introduction to Discrete Variational Autoencoders
Variational Autoencoders (VAEs) are well-established as a principled approach to probabilistic unsupervised learning with neural networks. Typically, an encoder network defines the parameters of a Gaussian distributed latent space from which we can sample and pass realizations to a decoder network. This model is trained to reconstruct its inputs and is optimized through the evidence lower bound. In recent years, discrete latent spaces have grown in popularity, suggesting that they may be a natural choice for many data modalities (e.g. text). In this tutorial, we provide a rigorous, yet practical, introduction to discrete variational autoencoders -- specifically, VAEs in which the latent space is made up of latent variables that follow a categorical distribution. We assume only a basic mathematical background with which we carefully derive each step from first principles. From there, we develop a concrete training recipe and provide an example implementation, hosted at https://github.com/alanjeffares/discreteVAE.
A Practical Introduction to Deep Reinforcement Learning
Deep reinforcement learning (DRL) has emerged as a powerful framework for solving sequential decision-making problems, achieving remarkable success in a wide range of applications, including game AI, autonomous driving, biomedicine, and large language models. However, the diversity of algorithms and the complexity of theoretical foundations often pose significant challenges for beginners seeking to enter the field. This tutorial aims to provide a concise, intuitive, and practical introduction to DRL, with a particular focus on the Proximal Policy Optimization (PPO) algorithm, which is one of the most widely used and effective DRL methods. To facilitate learning, we organize all algorithms under the Generalized Policy Iteration (GPI) framework, offering readers a unified and systematic perspective. Instead of lengthy theoretical proofs, we emphasize intuitive explanations, illustrative examples, and practical engineering techniques. This work serves as an efficient and accessible guide, helping readers rapidly progress from basic concepts to the implementation of advanced DRL algorithms.
Friday, May 16. 2025
Network Security
GPML: Graph Processing for Machine Learning
The dramatic increase of complex, multi-step, and rapidly evolving attacks in dynamic networks involves advanced cyber-threat detectors. The GPML (Graph Processing for Machine Learning) library addresses this need by transforming raw network traffic traces into graph representations, enabling advanced insights into network behaviors. The library provides tools to detect anomalies in interaction and community shifts in dynamic networks. GPML supports community and spectral metrics extraction, enhancing both real-time detection and historical forensics analysis. This library supports modern cybersecurity challenges with a robust, graph-based approach.
Self-Supervised Transformer-based Contrastive Learning for Intrusion Detection Systems
As the digital landscape becomes more interconnected, the frequency and severity of zero-day attacks, have significantly increased, leading to an urgent need for innovative Intrusion Detection Systems (IDS). Machine Learning-based IDS that learn from the network traffic characteristics and can discern attack patterns from benign traffic offer an advanced solution to traditional signature-based IDS. However, they heavily rely on labeled datasets, and their ability to generalize when encountering unseen traffic patterns remains a challenge. This paper proposes a novel self-supervised contrastive learning approach based on transformer encoders, specifically tailored for generalizable intrusion detection on raw packet sequences. Our proposed learning scheme employs a packet-level data augmentation strategy combined with a transformer-based architecture to extract and generate meaningful representations of traffic flows. Unlike traditional methods reliant on handcrafted statistical features (NetFlow), our approach automatically learns comprehensive packet sequence representations, significantly enhancing performance in anomaly identification tasks and supervised learning for intrusion detection. Our transformer-based framework exhibits better performance in comparison to existing NetFlow self-supervised methods. Specifically, we achieve up to a 3% higher AUC in anomaly detection for intra-dataset evaluation and up to 20% higher AUC scores in inter-dataset evaluation. Moreover, our model provides a strong baseline for supervised intrusion detection with limited labeled data, exhibiting an improvement over self-supervised NetFlow models of up to 1.5% AUC when pretrained and evaluated on the same dataset. Additionally, we show the adaptability of our pretrained model when fine-tuned across different datasets, demonstrating strong performance even when lacking benign data from the target domain.
A Representation Learning Approach to Feature Drift Detection in Wireless Networks
AI is foreseen to be a centerpiece in next generation wireless networks enabling enabling ubiquitous communication as well as new services. However, in real deployment, feature distribution changes may degrade the performance of AI models and lead to undesired behaviors. To counter for undetected model degradation, we propose ALERT; a method that can detect feature distribution changes and trigger model re-training that works well on two wireless network use cases: wireless fingerprinting and link anomaly detection. ALERT includes three components: representation learning, statistical testing and utility assessment. We rely on MLP for designing the representation learning component, on Kolmogorov-Smirnov and Population Stability Index tests for designing the statistical testing and a new function for utility assessment. We show the superiority of the proposed method against ten standard drift detection methods available in the literature on two wireless network use cases.
Wednesday, May 14. 2025
Machine Learning
Intelligent Load Balancing Systems using Reinforcement Learning System
Load Balancing is a fundamental technology for scaling cloud infrastructure. It enables systems to distribute incoming traffic across backend servers using predefined algorithms such as round robin, weighted round robin, least connections, weighted least connections, resource based, weighted response time, source IP hash, and URL hash.
However, traditional traffic balancing techniques are increasingly becoming inadequate in optimizing distribution times. Existing algorithms are struggling to meet the rising demands of internet traffic, often resulting in degraded user experiences. To proactively address these issues particularly in areas like response time, distribution latency, and system uptime, we need to rethink how load balancing is implemented. Key challenges include traffic management, congestion control, intelligent scheduling, and the ability to determine when and when not to apply load balancing.
Efficient Telecom Specific LLM: TSLAM-Mini with QLoRA and Digital Twin Data
General-purpose large language models (LLMs), despite their broad capabilities accrued from open-world data, frequently exhibit suboptimal performance when confronted with the nuanced and specialized demands inherent in real-time telecommunications applications. This investigation addresses this critical limitation through the meticulous fine-tuning of TSLAM-Mini developed by NetoAI, a compact (3.8-billion parameter) causal language model architecturally derived from Phi-4 Mini Instruct 4B. The fine-tuning regimen leverages a bespoke dataset comprising 100,000 samples, strategically engineered to address 20 pivotal telecommunications use-cases, encompassing domains such as Network Fundamentals, IP Routing, MPLS, Network Security, Automation, OSS/BSS, RAN, Mobile Core, Satellite Communications, and Ethical AI. This dataset was curated utilizing NetoAI's DigiTwin platform, enriched with granular insights from venerated network Subject Matter Experts (SMEs) and authoritative RFC documents, thereby capturing high-fidelity representations of real-world network dynamics through simulations inspired by digital twin paradigms. Employing Quantized Low-Rank Adaptation (QLoRA), a state-of-the-art Parameter Efficient Fine-Tuning (PEFT) technique, we achieved substantial training efficiency and enabled prospective deployment on resource-constrained hardware. A novel evaluation framework, predicated on a high-capacity LLM (Qwen3-235B-A22B) functioning as an automated adjudicator, was instituted to rigorously assess instruction-following fidelity and response quality across the specified telecom use-cases. Empirical results unequivocally demonstrate TSLAM-Mini's superior aptitude in telecom-centric applications, underscoring the profound efficacy of domain-specific datasets and PEFT methodologies for advancing intelligent network management.
Graph-Based Floor Separation Using Node Embeddings and Clustering of WiFi Trajectories
Indoor positioning systems (IPSs) are increasingly vital for location-based services in complex multi-storey environments. This study proposes a novel graph-based approach for floor separation using Wi-Fi fingerprint trajectories, addressing the challenge of vertical localization in indoor settings. We construct a graph where nodes represent Wi-Fi fingerprints, and edges are weighted by signal similarity and contextual transitions. Node2Vec is employed to generate low-dimensional embeddings, which are subsequently clustered using K-means to identify distinct floors. Evaluated on the Huawei University Challenge 2021 dataset, our method outperforms traditional community detection algorithms, achieving an accuracy of 68.97%, an F1- score of 61.99%, and an Adjusted Rand Index of 57.19%. By publicly releasing the preprocessed dataset and implementation code, this work contributes to advancing research in indoor positioning. The proposed approach demonstrates robustness to signal noise and architectural complexities, offering a scalable solution for floor-level localization.
Tuesday, May 13. 2025
Machine Learning Interesting Concepts
In the complex landscape of traditional futures trading, where vast data and variables like real-time Limit Order Books (LOB) complicate price predictions, we introduce the FutureQuant Transformer model, leveraging attention mechanisms to navigate these challenges. Unlike conventional models focused on point predictions, the FutureQuant model excels in forecasting the range and volatility of future prices, thus offering richer insights for trading strategies. Its ability to parse and learn from intricate market patterns allows for enhanced decision-making, significantly improving risk management and achieving a notable average gain of 0.1193% per 30-minute trade over state-of-the-art models with a simple algorithm using factors such as RSI, ATR, and Bollinger Bands. This innovation marks a substantial leap forward in predictive analytics within the volatile domain of futures trading.
Biological brains demonstrate complex neural activity, where the timing and interplay between neurons is critical to how brains process information. Most deep learning architectures simplify neural activity by abstracting away temporal dynamics. In this paper we challenge that paradigm. By incorporating neuron-level processing and synchronization, we can effectively reintroduce neural timing as a foundational element. We present the Continuous Thought Machine (CTM), a model designed to leverage neural dynamics as its core representation. The CTM has two core innovations: (1) neuron-level temporal processing, where each neuron uses unique weight parameters to process a history of incoming signals; and (2) neural synchronization employed as a latent representation. The CTM aims to strike a balance between oversimplified neuron abstractions that improve computational efficiency, and biological realism. It operates at a level of abstraction that effectively captures essential temporal dynamics while remaining computationally tractable for deep learning. We demonstrate the CTM's strong performance and versatility across a range of challenging tasks, including ImageNet-1K classification, solving 2D mazes, sorting, parity computation, question-answering, and RL tasks. Beyond displaying rich internal representations and offering a natural avenue for interpretation owing to its internal process, the CTM is able to perform tasks that require complex sequential reasoning. The CTM can also leverage adaptive compute, where it can stop earlier for simpler tasks, or keep computing when faced with more challenging instances. The goal of this work is to share the CTM and its associated innovations, rather than pushing for new state-of-the-art results. To that end, we believe the CTM represents a significant step toward developing more biologically plausible and powerful artificial intelligence systems.
A critical assessment of reinforcement learning methods for microswimmer navigation in complex flows
Navigating in a fluid flow while being carried by it, using only information accessible from on-board sensors, is a problem commonly faced by small planktonic organisms. It is also directly relevant to autonomous robots deployed in the oceans. In the last ten years, the fluid mechanics community has widely adopted reinforcement learning, often in the form of its simplest implementations, to address this challenge. But it is unclear how good are the strategies learned by these algorithms. In this paper, we perform a quantitative assessment of reinforcement learning methods applied to navigation in partially observable flows. We first introduce a well-posed problem of directional navigation for which a quasi-optimal policy is known analytically. We then report on the poor performance and robustness of commonly used algorithms (Q-Learning, Advantage Actor Critic) in flows regularly encountered in the literature: Taylor-Green vortices, Arnold-Beltrami-Childress flow, and two-dimensional turbulence. We show that they are vastly surpassed by PPO (Proximal Policy Optimization), a more advanced algorithm that has established dominance across a wide range of benchmarks in the reinforcement learning community. In particular, our custom implementation of PPO matches the theoretical quasi-optimal performance in turbulent flow and does so in a robust manner. Reaching this result required the use of several additional techniques, such as vectorized environments and generalized advantage estimation, as well as hyperparameter optimization. This study demonstrates the importance of algorithm selection, implementation details, and fine-tuning for discovering truly smart autonomous navigation strategies in complex flows.
Large Wireless Localization Model (LWLM): A Foundation Model for Positioning in 6G Networks
Accurate and robust localization is a critical enabler for emerging 5G and 6G applications, including autonomous driving, extended reality (XR), and smart manufacturing. While data-driven approaches have shown promise, most existing models require large amounts of labeled data and struggle to generalize across deployment scenarios and wireless configurations. To address these limitations, we propose a foundation-model-based solution tailored for wireless localization. We first analyze how different self-supervised learning (SSL) tasks acquire general-purpose and task-specific semantic features based on information bottleneck (IB) theory. Building on this foundation, we design a pretraining methodology for the proposed Large Wireless Localization Model (LWLM). Specifically, we propose an SSL framework that jointly optimizes three complementary objectives: (i) spatial-frequency masked channel modeling (SF-MCM), (ii) domain-transformation invariance (DTI), and (iii) position-invariant contrastive learning (PICL). These objectives jointly capture the underlying semantics of wireless channel from multiple perspectives. We further design lightweight decoders for key downstream tasks, including time-of-arrival (ToA) estimation, angle-of-arrival (AoA) estimation, single base station (BS) localization, and multiple BS localization. Comprehensive experimental results confirm that LWLM consistently surpasses both model-based and supervised learning baselines across all localization tasks. In particular, LWLM achieves 26.0%--87.5% improvement over transformer models without pretraining, and exhibits strong generalization under label-limited fine-tuning and unseen BS configurations, confirming its potential as a foundation model for wireless localization.
Friday, May 9. 2025
Installing LibTorch with Cuda on NVIDIA GeForce RTX 4070
For trying out some LSTM Machine Learning algorithms with my TradeFrame Algorithmic Trading Library, I wanted to install LibTorch with NVidia/Cuda support for hardware accelerating learning.
I used Installing C++ Distributions of PyTorch as a starting point. However, their example is CPU based. My desire is for a Cuda based installation. This meant going to the CUDA Zone and start the Download process. My configuration options were: Linux, x86_64, Debian, 12, deb (local).
Using the "deb (local)" with a complete file seemed to be the only way to ensure all components were available.
The steps, as of this writing, were:
wget https://developer.download.nvidia.com/compute/cuda/12.9.0/local_installers/cuda-repo-debian12-12-9-local_12.9.0-575.51.03-1_amd64.deb sudo dpkg -i cuda-repo-debian12-12-9-local_12.9.0-575.51.03-1_amd64.deb sudo cp /var/cuda-repo-debian12-12-9-local/cuda-*-keyring.gpg /usr/share/keyrings/ sudo apt-get update sudo apt-get -y install cuda-toolkit-12-9
Since I have the nvidia binary video driver installed, I chose the non-nouveau flavour of Cuda Drivers. This could be run prior to the previous steps.
sudo apt-get install -y cuda-drivers
There is also the NVIDIA CUDA Installation Guide for Linux for further information.
The PyTorch LibTorch library can be downloaded from PyTorch Start Locally. Choose the C++/Java option with Cuda 12.8 (as of this writing). An appropriate link is presented. Download and expand the file into a development directory. LibTorch doesn't have at this moment a build for Cuda 12.9, but is referenced as 12.8.
The most recent can be found at https://download.pytorch.org/libtorch/nightly/cu128/libtorch-shared-with-deps-latest.zip.
It is probably advised to NOT use the Debian package, as it may be out of date: pytorch-cuda.
To test out the installation, I then created a subdirectory containing a couple of files. The first is the test code example-app.cpp:
#include <torch/torch.h> #include <iostream> int main() { torch::Tensor tensor = torch::rand({2, 3}); std::cout << tensor << std::endl; }
The second file is the CMakeLists.txt file. This is my version:
cmake_minimum_required(VERSION 3.18 FATAL_ERROR) cmake_policy(SET CMP0104 NEW) cmake_policy(SET CMP0105 NEW) project(example-app) find_package(Torch REQUIRED) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}") set(CMAKE_CUDA_STANDARD 17) add_executable(example-app example-app.cpp) target_link_libraries(example-app "${TORCH_LIBRARIES}") set_property(TARGET example-app PROPERTY CXX_STANDARD 17)
Then to build the example:
mkdir build cmake \ -DCMAKE_PREFIX_PATH=~/data/projects/libs-build/libtorch \ -DCMAKE_CUDA_ARCHITECTURES=native \ -DCMAKE_BUILD_TYPE=DEBUG \ -DCMAKE_CUDA_COMPILER=/etc/alternatives/cuda/bin/nvcc \ -Dnvtx3_dir=/usr/local/cuda/targets/x86_64-linux/include/nvtx3 \ .. make ./example-app
Notes:
- PREFIX_PATH points to the directory of your expanded libtorch download
- CMAKE_CUDA_ARCHITECTURES provides a 'native' cuda solution, the build process will determine the specific gpu for which to build
- CMAKE_BUILD_TYPE can be DEBUG or RELEASE
- CMAKE_CUDA_COMPILER needs to be set, by using /etc/alternatives, these are softlinks to the version you desire (as were installed by the cuda installation)
- nvtx3_dir is required, as the current libtorch library seems to still refer to nvtx and not nvtx3
If you get output along the lines of:
-- Automatic GPU detection failed. Building for common architectures. -- Autodetected CUDA architecture(s): 5.0;8.0;8.6;8.9;9.0;9.0a;10.0;10.0a;10.1a;12.0;12.0a
Even though you may have the nvidia driver installed:
$ dpkg -l |grep nvidia-driv ii nvidia-driver 575.51.03-1 amd64 NVIDIA metapackage ii nvidia-driver-cuda 575.51.03-1 amd64 NVIDIA driver CUDA integration components ii nvidia-driver-libs:amd64 575.51.03-1 amd64 NVIDIA metapackage (OpenGL/GLX/EGL/GLES libraries)
See if the nouveau driver is installed.
$ lsmod |grep nouveau
If so, then run these commands to enable the nvidia driver and to blacklist the nouveau driver and reboot:
sudo mv /etc/modprobe.d/nvidia.conf.dpkg-new /etc/modprobe.d/nvidia.conf sudo update-initramfs -u
My system has two RTX 4070 cards, and can be verified with (an extract is shown with important parts, noticing that the nvidia driver is properly shown):
$ sudo lshw -c video *-display product: Arrow Lake-S [Intel Graphics] configuration: depth=32driver=i915 latency=0 mode=3840x2160 resolution=3840,2160 visual=truecolor xres=3840 yres=2160 *-display product: AD103 [GeForce RTX 4070] configuration:driver=nvidia latency=0 *-display product: AD103 [GeForce RTX 4070] configuration:driver=nvidia latency=0
Therefore, the output of my cmake process will include gpu specific selections:
-- Autodetected CUDA architecture(s): 8.9 8.9 -- Added CUDA NVCC flags for: -gencode;arch=compute_89,code=sm_89
And running the generated binary results in valid output:
Continue reading "Installing LibTorch with Cuda on NVIDIA GeForce..." »$ ./example-app 0.7141 0.9744 0.3179 0.7794 0.9281 0.7529 [ CPUFloatType{2,3} ]
Thursday, May 8. 2025
ML in Finance
A Deep Learning Approach to Anomaly Detection in High-Frequency Trading Data
his paper proposes an algorithm based on a staged sliding window Transformer architecture to detect abnormal behaviors in the microstructure of the foreign exchange market, focusing on high-frequency EUR/USD trading data. The method captures multi-scale temporal features through a staged sliding window, extracts global and local dependencies by combining the self-attention mechanism and weighted attention mechanism of the Transformer, and uses a classifier to identify abnormal events. Experimental results on a real high-frequency dataset containing order book depth, spread, and trading volume show that the proposed method significantly outperforms traditional machine learning (such as decision trees and random forests) and deep learning methods (such as MLP, CNN, RNN, LSTM) in terms of accuracy (0.93), F1-Score (0.91), and AUC-ROC (0.95). Ablation experiments verify the contribution of each component, and the visualization of order book depth and anomaly detection further reveals the effectiveness of the model under complex market dynamics. Despite the false positive problem, the model still provides important support for market supervision. In the future, noise processing can be optimized and extended to other markets to improve generalization and real-time performance.
This project addresses the challenge of automated stock trading, where traditional methods and direct reinforce- ment learning (RL) struggle with market noise, complex- ity, and generalization. Our proposed solution is an in- tegrated deep learning framework combining a Convolu- tional Neural Network (CNN) to identify patterns in tech- nical indicators formatted as images, a Long Short-Term Memory (LSTM) network to capture temporal dependen- cies across both price history and technical indicators, and a Deep Q-Network (DQN) agent which learns the optimal trading policy (buy, sell, hold) based on the features ex- tracted by the CNN and LSTM. The CNN and LSTM act as sophisticated feature extractors, feeding processed in- formation to the DQN, which learns the optimal trading policy (buy, sell, hold) through RL. We trained and evalu- ated this model on historical daily stock data, using distinct periods for training, testing, and validation. Performance was assessed by comparing the agent’s returns and risk on out-of-sample test data against baseline strategies, includ- ing passive buy-and-hold approaches. This analysis, along with insights gained from explainability techniques into the agent’s decision-making process, aimed to demonstrate the effectiveness of combining specialized deep learning archi- tectures, document challenges encountered, and potentially uncover learned market insights
Predicting Stock Prices Using Permutation Decision Trees And Strategic Trailing
Qe explore the application of Permutation Decision Trees (PDT) and strategic trailing for predicting stock market movements and executing profitable trades in the Indian stock market. We focus on high-frequency data using 5-minute candlesticks for the top 50 stocks listed in the NIFTY 50 index. We implement a trading strategy that aims to buy stocks at lower prices and sell them at higher prices, capitalizing on short-term market fluctuations. Due to regulatory constraints in India, short selling is not considered in our strategy. The model incorporates various technical indicators and employs hyperparameters such as the trailing stop-loss value and support thresholds to manage risk effectively. Our results indicate that the proposed trading bot has the potential to outperform the market average and yield returns higher than the risk-free rate offered by 10-year Indian government bonds. We trained and tested data on a 60 day dataset provided by Yahoo Finance. Specifically, 12 days for testing and 48 days for training. Our bot based on permutation decision tree achieved a profit of 1.3468% over a 12-day testing period, where as a bot based on LSTM gave a return of 0.1238% over a 12-day testing period and a bot based on RNN gave a return of 0.3096% over a 12-day testing period. All of the bots outperform the buy-and-hold strategy, which resulted in a loss of 2.2508%
Deep Q-Network (DQN) multi-agent reinforcement learning (MARL) for Stock Trading
This project addresses the challenge of automated stock trading, where traditional methods and direct reinforcement learning (RL) struggle with market noise, complexity, and generalization. Our proposed solution is an integrated deep learning framework combining a Convolutional Neural Network (CNN) to identify patterns in technical indicators formatted as images, a Long Short-Term Memory (LSTM) network to capture temporal dependencies across both price history and technical indicators, and a Deep Q-Network (DQN) agent which learns the optimal trading policy (buy, sell, hold) based on the features extracted by the CNN and LSTM.
Evolution of Reinforcement Learning in Quantitative Finance: A Survey
Reinforcement Learning (RL) has experienced significant advancement over the past decade, prompting a growing interest in applications within finance. This survey critically evaluates 167 publications, exploring diverse RL applications and frameworks in finance. Financial markets, marked by their complexity, multi-agent nature, information asymmetry, and inherent randomness, serve as an intriguing test-bed for RL. Traditional finance offers certain solutions, and RL advances these with a more dynamic approach, incorporating machine learning methods, including transfer learning, meta-learning, and multi-agent solutions. This survey dissects key RL components through the lens of Quantitative Finance. We uncover emerging themes, propose areas for future research, and critique the strengths and weaknesses of existing methods.
LLM4FTS: Enhancing Large Language Models for Financial Time Series Prediction
LLM4FTS: Enhancing Large Language Models for Financial Time Series Prediction
Predicting financial time series presents significant challenges due to inherent low signal-to-noise ratios and intricate temporal patterns. Traditional machine learning models exhibit limitations in this forecasting task constrained by their restricted model capacity. Recent advances in large language models (LLMs), with their greatly expanded parameter spaces, demonstrate promising potential for modeling complex dependencies in temporal sequences. However, existing LLM-based approaches typically focus on fixed-length patch analysis due to the Transformer architecture, ignoring market data's multi-scale pattern characteristics. In this study, we propose $LLM4FTS$, a novel framework that enhances LLM capabilities for temporal sequence modeling through learnable patch segmentation and dynamic wavelet convolution modules. Specifically,we first employ K-means++ clustering based on DTW distance to identify scale-invariant patterns in market data. Building upon pattern recognition results, we introduce adaptive patch segmentation that partitions temporal sequences while preserving maximal pattern integrity. To accommodate time-varying frequency characteristics, we devise a dynamic wavelet convolution module that emulates discrete wavelet transformation with enhanced flexibility in capturing time-frequency features. These three modules work together to improve large language model's ability to handle scale-invariant patterns in financial time series. Extensive experiments on real-world financial datasets substantiate the framework's efficacy, demonstrating superior performance in capturing complex market patterns and achieving state-of-the-art results in stock return prediction. The successful deployment in practical trading systems confirms its real-world applicability, representing a significant advancement in LLM applications for financial forecasting.
Sunday, March 23. 2025
Intel Wireless BE200 Firmware Installation
I picked up an Intel Z890 chipset based Asus ProArt Z890-CREATOR WIFI motherboard. It has a relatively new Wifi card:
# lspci |grep -i wi-fi 85:00.0 Network controller: Intel Corporation Wi-Fi 7(802.11be) AX1775*/AX1790*/BE20*/BE401/BE1750* 2x2 (rev 1a)
With the Trixie based install, Bluetooth mice have a few problems with connecting and maintaining connection. Maybe these dmesg fail messages might point to a solution:
[ 2.806746] iwlwifi 0000:85:00.0: firmware: failed to load iwlwifi-gl-c0-fm-c0-93.ucode (-2) [ 2.806750] iwlwifi 0000:85:00.0: firmware: failed to load iwlwifi-gl-c0-fm-c0-93.ucode (-2) [ 2.806751] iwlwifi 0000:85:00.0: Direct firmware load for iwlwifi-gl-c0-fm-c0-93.ucode failed with error -2 [ 2.811678] iwlwifi 0000:85:00.0: firmware: failed to load iwl-debug-yoyo.bin (-2) [ 2.811681] iwlwifi 0000:85:00.0: firmware: failed to load iwl-debug-yoyo.bin (-2)
Linux Wireless Documentation suggests an updated firmware package from linux-firmware.git, and then an installation with:
# cp iwlwifi-*.{ucode,pnvm} /lib/firmware/
The following may be required to load the firmware during boot:
# update-initramfs -u -k all
I also upgraded the kernel from 6.12.6 to 6.12.19
/debian/pool/non-free-firmware/f/firmware-nonfree has latest packaged firmware, which may not be as recent as the git repository.
I used this to attempt to load a more recent firmware, but the kernel module seems to be limiting it to v92, and v93 is not available, for some reason. I hope the 6.13.8 series kernel, when it comes out of experimental might alleviate that.
# ln -s /lib/firmware/iwlwifi-gl-c0-fm-c0-96.ucode /lib/firmware/iwlwifi-gl-c0-fm-c0-93.ucode
Intel Wireless WiFi Link, Wireless-N, Advanced-N, Ultimate-N devices - iwlwifi mentions:
You may try to switch power management scheme from balanced (default) into active by adding the following to /etc/modprobe.d/iwlmvm.conf and reboot:options iwlmvm power_scheme=1
The following command will identify the firmware files for which a driver is looking. In this case, the driver looks for -93, but it isn't in the firmware files:
# modinfo iwlwifi |grep firmware ... firmware: iwlwifi-gl-c0-fm-c0.pnvm firmware: iwlwifi-gl-c0-fm-c0-93.ucode ... parm: fw_restart:restart firmware in case of error (default true) (bool)
Additional references:
Tuesday, February 18. 2025
OpenSSH - Man-in-the-Middle and DoS Attacks
Two security vulnerabilities have been discovered in the OpenSSH secure networking utility suite that, if successfully exploited, could result in an active machine-in-the-middle (MitM) and a denial-of-service (DoS) attack, respectively, under certain conditions.
The vulnerabilities, detailed by the Qualys Threat Research Unit (TRU), are listed below -
- CVE-2025-26465 - The OpenSSH client contains a logic error between versions 6.8p1 to 9.9p1 (inclusive) that makes it vulnerable to an active MitM attack if the VerifyHostKeyDNS option is enabled, allowing a malicious interloper to impersonate a legitimate server when a client attempts to connect to it (Introduced in December 2014)
- CVE-2025-26466 - The OpenSSH client and server are vulnerable to a pre-authentication DoS attack between versions 9.5p1 to 9.9p1 (inclusive) that causes memory and CPU consumption (Introduced in August 2023)
InteractiveBrokers TWS Sound on Linux
Reddit has an elegant solution to the sound issue. Simply convert .mp3 files to .wav files. The .mp3 files in the TWS sound directory can be manipulated this way:
ffmpeg -i FILE.mp3 -acodec pcm_s16le -ar 44100 FILE.wav # or as a oneliner for all at once find . -iname '*.mp3' -exec sh -c 'ffmpeg -i $1 -acodec pcm_s16le -ar 44100 $1.wav' sh {} ';'
The sounds directory has voice based sounds. For the actual sound oriented sounds, you'll need to supply your own, or pull from the original distribution and convert. An example extraction from the article:
jar xf ~/Jts/1019/jars/jts4launch-1019.jar $(jar tf ~/Jts/1019/jars/jts4launch-1019.jar | grep '\.mp3$')
Monday, February 17. 2025
Lets Encrypt Certificate Examinination
At the beginning of February, Lets Encrypt sent out an email saying they were no longer sending emails prior to certificate expiration. That means I'm going to have to track my own certificate expiration dates.
As an example command line to get things started:
</dev/null openssl s_client -connect ounl.bm:443 -servername www.ounl.bm | \ openssl x509 -text -noout | grep 'Not After'
- </dev/null - send an empty connection (otherwise the client will not disconnect)
- -text - expands the content of the certificate
- -noout - does not show the encoded certificate
Some other links if I want to do this programmatically:
- cseelye/ssl.cpp> - git gist to extract contents, notably a way to extract the expiry date/time
- RaymiiOrg/openssl-modern-cpp - Modern C++ OpenSSL examples
- libs/beast/example/websocket/server/coro-ssl/websocket_server_coro_ssl.cpp - maybe this beast example has the basics of acquiring the certificate, then the other code snippets can be used to decode it
- Boost ASIO SSL - this is probably an easier way to acquire a certificate and then use the other code segments to decode it
Sunday, February 9. 2025
how to build kernel .deb from modified git tree
git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git cd linux/ git checkout v6.1.113 cp /boot/config-$(uname -r) .config make oldconfig scripts/config --set-str SYSTEM_REVISION "$(git rev-parse --short HEAD)" scripts/config --set-str SYSTEM_SERIAL "$(date +%s)" git revert COMMITID export CONCURRENCY_LEVEL=$(nproc) fakeroot make -j$(nproc) deb-pkg LOCALVERSION=-revertCOMMITID git reset HEAD^ --hard
Sunday, January 12. 2025
Talos Install in Preparation for Kubernetes
On my ProxMox machine, I need a more dynamic way of handling containers rather than being limited to the LXC flavour offered by ProxMox. There was a question on reddit to which I supplied an answer about why to use full virtualization for Kubernetes vs running in a container. In summary:
- proxmox is a virtualization engine which enables LXC containers and QEMU/KVM guest virtual machines
- LXC containers are compartmentalized and share direct access to the kernel
- containers are used so as not to pollute your based proxmox installation with more packages and runtimes
- typically, you don't want to nest containers inside containers
- virtual machines run their own kernel/operating system, and are more secure (failure/security) and independent
- since k8s manages docker containers (not LXC containers), and you don't want to run containers of any fashion in containers of another fashion (docker inside lxc), you run a virtual machine with k8s to keep k8s packages and runtime separate from the core proxmox runtime environment
- hence the container inside virtual machine on hypervisor platform
- for security and compartmentalization
I built a basic LXC management container to take a look at talosctl, then used these instructions to perform a few tests:
apt update apt upgrade apt install --no-install-recommends curl # based upon https://www.talos.dev/v1.9/talos-guides/install/talosctl/ curl -sL https://talos.dev/install | sh # based upon https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256" echo "$(cat kubectl.sha256) kubectl" | sha256sum --check install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl kubectl version --client
I ultimately removed this container, as I started reading the Getting Started Guide. But the above did generate the information that the lastest talosctl version is v1.9.1, which is useful for generating the iso image required.
.... more to come
Reference: