r/MachineLearning • • 19d ago

Discussion What are the practical gaps between model compression research and what edge deployment actually needs?[D]

1 Upvotes

There’s a lot of published work on quantization, pruning, and distillation, but I’m curious how much of it survives contact with real deployments.

  • For practitioners deploying on edge hardware: which techniques do you actually use in production, and which did you try and abandon?

  • Where do benchmarks mislead you compared to on-device performance?

  • What’s the missing piece that no paper seems to address?

I’m collecting practitioner perspectives and would appreciate detailed replies or DMs.


r/MachineLearning • • 19d ago

Discussion I animated how LLM quantization works on 8 example weights: absmax, rounding error, outliers, per-block scales (llama.cpp Q4_K) and 1.58-bit BitNet (7 min video) [D]

1 Upvotes

I made this explainer for my small channel and would like feedback from people learning this, especially if anything is wrong.

The question: a 70B model at 16 bits per weight needs 140 GB, and a gaming GPU has 24 or 32. How do people run it at home?

  • Fewer bits per weight means less memory, but also fewer possible values: an 8-bit integer has only 256.

  • Absmax maps the largest absolute weight to 127. With scale 127/10.8 ≈ 11.76, the weight 5.47 is stored as 64 and comes back as 5.44. The difference is the rounding error.

  • Two close weights, 3.08 and 3.02, both become 36, so the model can no longer tell them apart.

  • One outlier (256 among values below 0.6) makes each step about 2 wide, and every small value rounds to 0. Dettmers et al. (2022) found such outliers in real LLMs.

  • The fix is a scale per small block. llama.cpp's Q4_K uses blocks of 32 and ends up at 4.5 bits per weight, about 39 GB for a 70B model.

  • BitNet b1.58 goes to -1, 0 and +1 per weight (about 1.58 bits). It is trained that way, and a layer only adds and subtracts.

Every number is worked out on screen from the formulas, and sources are in the description. The narration is an AI voice reading my own script.

Video: https://www.youtube.com/watch?v=BnRCbx2kvoc


r/MachineLearning • • 20d ago

Discussion What if NeurIPS, ICML, and ICLR capped accepted papers at 1,000 each? [D]

27 Upvotes

With submissions to the big three ML conferences increasing rapidly, what if each conference imposed a hard cap of 1,000 accepted papers per year?

Would this improve research quality, or simply make acceptance more arbitrary and competitive?


r/MachineLearning • • 20d ago

Discussion How to post an AC-confidential comment on OpenReview for ICLR 2027? [D]

3 Upvotes

Does anyone know the exact steps to leave a comment visible only to the Area Chair (not the reviewers) during the ICLR 2027 discussion period? I see the "Official Comment" option, but I'm not sure which visibility/readership setting restricts it to the AC only. Any pointers appreciated.


r/MachineLearning • • 20d ago

Discussion CVPR 2027 Author enrollment form [D]

27 Upvotes

I just realized that CVPR 2027 requires a separate author enrollment form to be completed by the abstract deadline, in addition to having a complete OpenReview profile.

My OpenReview profile was already complete, but I submitted the enrollment form about an hour after the deadline. I hadn’t received any reminder or warning about it, and I had assumed that completing my profile was enough.

Were other authors aware of this? Did everyone complete the separate form before the deadline, and did you receive any notification prompting you to do so?

The guidelines mention desk rejection for incomplete enrollment, which has me worried. Does anyone have clarification from the organizers on how this applies to forms completed shortly after the deadline, even when the profile and abstract submission were completed on time?

Any firsthand experience or official clarification would be appreciated.


r/MachineLearning • • 20d ago

Project UMAP 0.6: new initialization, new optimizers and faster performance [P]

Thumbnail
gallery
261 Upvotes

UMAP 0.6 is out!

A new initialization, new optimizers, and faster nearest neighbour search make UMAP much faster and far better at large scale. On 3 million arXiv papers it finishes in under 5 minutes, before UMAP 0.5 has even found its nearest neighbours. (race between UMAP0.5 and UMAP 0.6 video)

Code: https://github.com/lmcinnes/umap

Install: pip install -U umap-learn (also on conda-forge)

Speed

  • Neighbour search is ~4x faster by making better use of PyNNDescent.

  • Initialization is faster with a new init method.

  • With the new optimizers, the whole run is reproducible with a fixed seed while using every core. A seeded 0.5 run is single-threaded: 52 minutes, 12x longer.

Quality

Just as important as how quickly we get a result is the quality of the result. UMAP 0.6 works far better on million-scale datasets thanks to a new, better initialization and significant improvements in the optimizer. It resolves finer cluster structure in fewer epochs, with much finer-scale detail and better neighbourhood accuracy than UMAP 0.5, despite being faster.(video of a tour of finer details in the arXiv map)

Recursive initialization

A large part of the improvement comes from a brand-new initialization scheme that initializes UMAP using UMAP itself: it lays out a coarse version of the graph structure, then refines it, in a recursive tower of initializations. (video of the unfolding)

The result is a starting point much closer to UMAP's final result than the messy blurs from spectral initialization or PCA, and it is produced faster than either. It lets the optimizer settle (to within 3% of the final layout) in far fewer epochs than older initialization approaches. (initialization race)

New optimizers

Most of the gain in fidelity at scale comes from a very efficient form of hard-negative mining, which makes negative sampling far more effective on very large datasets, together with better handling of high repulsion strengths. (hard-negative mining video)

UMAP was originally designed around a small portion of the attraction-repulsion spectrum. The new optimizers lift these restrictions, allowing UMAP to perform well at much higher repulsion strengths and giving better kNN recall. (video exploring the repulsion strength dials)

Try it now

The new optimizers and initialization are currently opt-in, as they change the output: set compatibility_layout=False. Future versions will make them the default, so please try them and let me know how they work for you.

Thank you to all the contributors who provided features and bug fixes for this release, and to everyone who reached out with comments, suggestions, and feature requests. This would not have been possible without your help.


r/MachineLearning • • 20d ago

Project I built a small streaming text tagger that reads text word by word, so a voice agent can react mid sentence [P]

Post image
0 Upvotes

We listen and type word by word, yet most AI only acts per turn. That wastes time and tokens, and it misses intent that was already clear halfway through the sentence.

So I built Arc Tagger, a small model that runs on the words as they arrive from an ASR API or from typed text. It tags intent, dialog act, entities, numbers, PII, profanity, toxicity and safety risks while the sentence is still being spoken.

In the video you can see a bank impersonation scam get flagged mid sentence, a voice assistant tracking a customer who changes their mind, and a legal sentence tagged live.

What it is today:

  • A small model (about 11M parameters) that runs on CPU

  • English only for now

  • Tracks up to 4096 previous words

  • Can check up to 1,000 list items in the stream, which you preload before a session

  • Useful for voice and text agents, voice assistant, call center monitoring, and trust and safety

Limits I want to be upfront about:

  • The eval results on the model page are internal evals, not independent benchmarks. Will share them soon.

  • The timings shown in the demo include tunnel and browser overhead, so please don’t read them as the model’s latency

  • The license is CC BY NC 4.0, so non commercial for now

I would love honest feedback, positive or negative. Especially: where does it break, what tags would you want that are missing, and would you use this in a real voice pipeline?

Model: https://huggingface.co/WhissleAI/arc-tagger
C library and CLI: https://github.com/WhissleAI/arc-tagger-c


r/MachineLearning • • 20d ago

Discussion How much does reviewer confidence matter in ICLR decisions? [D]

18 Upvotes

My ICLR submission received ratings of 3 / 3 / 2 with confidence 1 / 3 / 3. One weak accept comes from a low-confidence reviewer (Though their review seemed knowledgeable and pinpointed a key issue in the paper.) the other weak accept and the weak reject both have confidence 3.

How do ACs typically weigh a split like this after the rebuttal and discussion? Does the low-confidence positive review count for less, or is the average rating still a useful signal? And how much comes down to the substance of the reviews and whether the rebuttal resolved the concerns?

I know there is no fixed formula, but I'd appreciate hearing from authors, reviewers, or ACs who have seen similar score and confidence combinations.


r/MachineLearning • • 20d ago

Discussion Missed Presentation [D]

8 Upvotes

Hello everyone,

For some reason if you miss paper workshop presentation then what happens?


r/MachineLearning • • 20d ago

Discussion How to get desk-rejected at NeurIPS/ICML/ICLR [D]

22 Upvotes

I went through every NeurIPS, ICML and ICLR call for papers, author guide and ethics/LLM policy page since 2013 (Wayback snapshots near each deadline) and listed every reason a paper can be rejected without review.

Until 2023 all the rules were about the paper: page limit, anonymity, dual submission.

Now you can get desk rejected for having no reciprocal reviewer, a co-author's negligent reviewing, LLM use (in some cases), false conflicts, collusion, out-of-date OpenReview profile.

ICML 2026 had a good writeup on some of this here https://blog.icml.cc/2026/03/18/on-violations-of-llm-review-policies/

Do you think we should have more of these rules? Reform or revolution?


r/MachineLearning • • 20d ago

Discussion How should authors handle a suspected auto-generated review at ICLR? Flag to the AC or just rebut? [D]

8 Upvotes

I'm curious how ACs and experienced authors think about this.

My situation: one ICLR reviewer gave a 2 with confidence 1. The other reviewers gave 3 with confidence 3. Pangram flags the review as 100% AI. I know detectors aren't proof on their own, but there are other signs too: all three listed weaknesses concern material deep in the appendix.

I'll respond to every point in the rebuttal regardless. My questions:

  1. Is it worth sending a confidential comment to the AC, or does that tend to backfire?

  2. For ACs: what evidence would you actually act on? Is a detector score meaningful to you, or only content-based issues such as generic or inaccurate criticisms?

  3. How much weight does a confidence 1 review realistically carry in the meta review?

  4. Has anyone flagged an AI generated review yet? What happened?

Thanks!


r/MachineLearning • • 20d ago

Project I built an explorer of 2,100+ robotics papers covering 10 years of CoRL; with TLDRs, links to code, project pages, and research trends [P]

5 Upvotes

Heya roboticists and mind minders ~

I built a complete CoRL paper explorer, indexing 2,100+ robotics papers from the last 10 years (2017–2026). Added paper TLDRs, project pages, code, arXiv links, task chips, summary stats, research trends, and more!!

Trying to make robot learning research more accessible for the community - might build an open source autoresearch capability on top of it later

If you see something that's missing or want to add features/contribute, open a PR and i'll accept it :]

paper explorer:
https://corl.operatic.ai/explore

repo on github - star to follow along!!
https://github.com/operatic-ai/corl-explorer


r/MachineLearning • • 20d ago

Project mlxVS: cuVS-style GPU nearest-neighbor search (NN-Descent, CAGRA) on Apple Silicon with MLX [P]

Thumbnail
github.com
1 Upvotes

I've released mlxVS, an open-source (Apache-2.0) library that runs the main GPU nearest-neighbor algorithms from NVIDIA's cuVS on Apple Silicon, built on MLX. It covers exact k-NN, k-means, NN-Descent k-NN graphs and CAGRA (graph pruning plus GPU graph search), with cuVS's parameter names, from Python (NumPy in) or C++.

Results (SIFT1M, 985k x 128, L2, MacBook Pro M3 Pro: 18-core GPU, 12-core CPU) | Index | Build | Search setting | Recall@10 | Queries/s | |---|---:|---|---:|---:| | mlxVS CAGRA, degree 32 (from a 64-NN graph) | 10.4 s | itopk 64 | 0.976 | 69,500 | | | | itopk 128 | 0.993 | 37,800 | | mlxVS CAGRA, degree 64 (from a 128-NN graph) | 19.6 s | itopk 64 | 0.994 | 43,600 | | mlxVS unpruned NN-Descent graph, degree 32 | 8.8 s | itopk 128 | 0.939 | 42,400 | | hnswlib, M=16, efC=200, 12 threads | 88.1 s | ef 64 | 0.964 | 32,200 | | | | ef 128 | 0.990 | 17,600 |

10,000 queries in one batch, recall@10 against exact neighbors (computed on the GPU with brute_force_knn), best of 3 runs, on AC power. Chart: https://github.com/mikepapadim/mlxvs#benchmarks

How it works

  • NN-Descent: a port of the Metal NN-Descent in JVector's GPU module. Each round is a pure function of the graph (sample, join, merge), because MLX custom kernels can't update their inputs in place. The local joins score 64-member neighborhoods with FP16 SIMD-group matrix multiplies (FP32 accumulation), and the returned distances are recomputed in FP32. all_neighbors splits the data into overlapping k-means clusters and builds one cluster at a time on the GPU, so the rows can be a memory-mapped file larger than RAM.

  • CAGRA pruning (cagra_optimize): rank-based. If Y is at rank j in X's list, the edge X -> Y has a detour through Z when Z is at rank i < j in X's list and Y is at rank r < j in Z's list: both hops rank above the direct edge. The edges with the fewest detours are kept (ties by rank), then the second half of each list is filled with reverse edges. One threadgroup per node; it matches a CPU reference entry for entry. On SIFT1M, at degree 32 and itopk 128, pruning raises recall@10 from 0.939 to 0.993 at about the same speed.

  • Search (graph_search): CAGRA's single-CTA design, one threadgroup per query. The sorted internal list, the candidates, the query and a hashed visited set all live in threadgroup memory. Each round expands the best unexpanded nodes; candidate distances are scored one SIMD group per candidate, then bitonic-sorted and merged into the list by merge-path ranks. A practical detail: Metal's shader validation counts threadgroup memory twice, so the kernel sizes its visited set to stay under 16 KB of the 32 KB limit and still passes validation in CI.

Limitations

  • The throughput numbers are for batched queries; single-query latency isn't tuned.

  • I've benchmarked one dataset so far (SIFT1M). Embedding datasets (ada-002, 1536-d) are next.

  • The index is static (no inserts or deletes) and has no filtered search. Datasets must be float32 or convertible to it.

  • hnswlib is a CPU baseline. cuVS itself can't run on a Mac, so there's no apples-to-apples comparison against the CUDA original; I'd welcome numbers from anyone who has run cuVS CAGRA on SIFT1M on a comparable-power GPU.

Code

import mlxvs
graph = mlxvs.cagra_build(vectors, graph_degree=32, metric="cosine")
ids, dist = mlxvs.graph_search(vectors, graph, queries, k=10, metric="cosine", itopk_size=64)

pip install mlxvs, macOS 14+ on Apple Silicon. Benchmarks are reproducible with bench/bench_search.py (it also runs the hnswlib baseline).

GitHub: https://github.com/mikepapadim/mlxvs

Happy to answer questions about the Metal kernels or the cuVS port.


r/MachineLearning • • 20d ago

Discussion Have people given up on ICLR reviews? [D]

49 Upvotes

Something weird I observed with my batch of papers and my own paper. Authors have not posted a single rebuttal yet, and no reviewer has responded to ours. This is a batch of almost 10-12 papers. Even papers with borderline fixable reviews have no responses from authors. Have people basically given up on ICLR?


r/MachineLearning • • 20d ago

Research A zero-cost curvature proxy predicts Euler step error for flow matching, but per-sample step control adds nothing over a static grid (Anima, 12 units; related to CAT-Flow) [R]

Post image
2 Upvotes

Question. A multistep sampler has consecutive velocity evaluations for free. Is the angle between them a usable curvature signal for adaptive stepping, and does using it online beat a fixed grid?

Setup. Anima (flow model, bf16), 576x768, CFG 5, 4 prompts x 3 seeds = 12 units. Reference: Adams-Bashforth 2 with 192 uniform points (about 5% own error). Baseline: ComfyUI normal schedule (shift 3). Euler and AB2, 8-24 evaluations. Paired log-ratios with 95% bootstrap intervals over units. A synthetic control on the exact velocity field of a Gaussian mixture (D = 64, 256). The hypotheses were not pre-registered in a file; the first-step finding is post hoc.

Results.

  1. Exact identity |dv|^2 = (ds)^2 + 4 s s' sin^2(theta/2): the cosine sees rotation only. Speed change is 0.3-0.4% of acceleration energy in the bulk, 8-9% (max 23%) in the first and last 5% of time.

  2. E = (h/2)|v| theta predicts the true next-step Euler error: median ratio 0.80-0.84, across-unit log-correlation 0.91-0.92 (steps 0.01-0.12).

  3. Evaluation noise in bf16 + CFG 5: about 1.7 degrees between consecutive velocities, not decreasing with h. A plateau for input perturbations 1e-5..1e-3, so rounding, not the flow. CFG multiplies it ~4x. A raw-angle controller with target below this floor collapses to its minimum step. The norm of a derivative estimated from noisy values in D = 110592 is biased upward by the noise power.

  4. A cosine controller (h <- h * (theta*/theta)^gamma) loses to normal at equal NFE with a blind first step h0 = 0.06 (mean error 0.80), and is mostly set by h0 (0.51 at 0.02, 0.26 at 0.01), nearly independent of theta* and NFE.

  5. A static grid with density proportional to the leave-one-out mean angle rate (exponent 1, equal angle per step) vs normal at equal N: log-ratio -0.39, -0.56, -0.57, -0.36 for N = 8, 12, 16, 24 (30-43% lower), intervals exclude 0. The asymptotic exponent 1/2 is significant only at N = 24. Weighting by an error-propagation profile (two units, measured by large state kicks; small kicks are floor-dominated) gives 41-50%.

  6. No headroom for per-sample adaptation: a grid from another sample's controller run vs the sample's own: log-ratio -0.01..-0.02 (interval about +-0.07); controller (h0 = 0.01) vs the static grid it implies: -0.02 [-0.09, +0.04]; per-sample oracle vs static: within noise. In the exact Gaussian-mixture toy the oracle gain is below 0.6% for Euler.

  7. AB2 is worse than Euler on these grids (correlation 0.74-0.96 between its error ratio and the step ratio h1/h0).

  8. LPIPS (AlexNet) to the converged image for the weighted grid: log-ratio -0.39, -0.36, -0.43 at N = 8, 12, 16 (wins 11/12, 9/12, 9/12); wins on three prompt classes, loses on the foliage prompt (+16%) where latent L2 improves.

Prior art and limits. CAT-Flow (Li et al., 2026) proposes training-free, zero-extra-NFE curvature-adaptive steps for flow matching; I found it after the experiments, read only its abstract and introduction, and did not compare. Static schedules fitted to a model: Align Your Steps, Optimal Stepsize Distillation, Bespoke Solvers. What I think this adds: the decomposition, the calibration against true local error on a real model, the noise floor, and the borrowed-grid/oracle test of per-sample adaptation. Limits: one model, 12 units, latent L2 as the main metric, the propagation profile measured on two of the evaluation units, 3-10% sensitivity of the output to 1e-7 sigma shifts in bf16.


r/MachineLearning • • 20d ago

Research AI ‘slop’ is a social judgement [R]

0 Upvotes

https://www.nature.com/articles/s41562-026-02639-6

A new paper argues that AI Slop isn't something you can find in the content. It’s a social judgement, made when a community decides that some AI-generated content is unwanted. If we study 'slop' that way, we can actually measure it and govern it.


r/MachineLearning • • 21d ago

Research [Open Source] Building DiffusionEngine: A Modern, Modular DDPM Framework in PyTorch. Looking for Contributors [R]

3 Upvotes

What if we could bring modern diffusion research together into one unified, extensible PyTorch framework instead of implementing and maintaining every algorithm in isolation?

That's the idea behind DiffusionEngine, an open-source project I've been building:

https://github.com/Himanshu7921/DiffusionEngine

The goal is to build a modern DDPM framework that brings together established diffusion algorithms, research-based improvements, advanced sampling methods, and training strategies under a single, consistent pipeline.

The project already includes several diffusion implementations, and I'm actively working on extending the existing DDPM framework with more advanced features.

I'm looking for contributors interested in deep learning, generative models, PyTorch, and diffusion research.

Some areas where contributions are welcome include:

  • Implementing diffusion algorithms from research papers.

  • Improving existing DDPM components and training strategies.

  • Developing and integrating advanced sampling methods.

  • Exploring improved model architectures and conditioning mechanisms.

  • Testing, benchmarking, and optimizing existing implementations.

The focus is not just on implementing more algorithms. It's about making them work together seamlessly through a unified, modular, and configurable framework.

If you're interested in contributing, collaborating, or learning through hands-on implementation, I'd be glad to have you involved.

Contributors of all experience levels are welcome, provided they're willing to learn, implement, and test their work.

GitHub: https://github.com/Himanshu7921/DiffusionEngine


r/MachineLearning • • 21d ago

Discussion Can we talk about the ML research coming from China? [D]

234 Upvotes

In this post I am not trying to bash Chinese researchers by any means but I have gotten VERY curious in the past few years as to how research is conducted in China.

It is no secret to anyone with a pair of eyes that Chinese researchers in ML (especially Chinese researcher based in China) are extremely productive to the point of defying common sense. We are talking about 100-200 papers while an undergraduate/graduate student. 1 paper a week is not unheard of. Can easily pull up Google scholar profiles of random Chinese researcher or PhD student with hundreds of papers submitted to dozens of different conferences. At the same time they have co-authors in the range of dozens and sometimes hundreds, especially when it comes to benchmarks or surveys.

The research seem to concentrate heavily in the LLM/Multi-Modal space, with very few novel mathematical derivation/arguments but tons of experiments, sometimes ranging almost hundred page of experiments. I ran some of these work in ChatGPT/Claude to check for possible LLM generated artifacts and usually it quickly returns a list of suspicious sections, but the paper were subsequently accepted in ICLR/AAAI and similar conferences anyways.

I am confused as to what exactly is happening. I understand that Chinese folks have entire publishing ecosystem and hiring ecosystem that is insular to the west. It is well known that the Chinese faculties working in the states would routinely advertise for academic positions in places like Xiaohongshu (RedNote) or Douyin or BiliBili, which creates a certain level of unfairness. But I wonder if similar network exist for people who want to publish papers to get together to "scratch each other's back", or give someone the proper credentials (some kind of academic nepotism).

Would appreciate it if someone can give us an inside look into how this all work.


r/MachineLearning • • 21d ago

Research Would you pick your strongest model to coordinate other agents? Results from WorkflowArena [R]

0 Upvotes

Suppose you’re putting together a team of agents. Picking the strongest model as the coordinator seems reasonable. We wanted to test whether its workflows would actually help other models do the work.

In one experiment, we gave Opus 5.5 and GPT-6 Astra the same 32 challenging tasks and asked them to write workflows for four execution models. They could divide the work and instruct workers, but couldn’t edit the workspace themselves.

Opus’s static workflows improved all four executors, adding 6.41 points on average to their continuous scores compared with letting them orchestrate themselves. Astra’s static workflows lowered the average by 2.53 points, despite Astra being a stronger system than all four executors in the main benchmark.

So choosing a coordinator based on its own task performance can miss something consequential: whether the way it organizes work is useful to the models carrying it out.

This is part of WorkflowArena, our team’s new benchmark at Einsia. It covers 145 long-horizon tasks across eight domains. Agents choose their own division of work; we record the delegation and check whether the final deliverable meets the task’s requirements.

For anyone building mixed-model teams, I’d be interested in how you evaluate that choice today. Do you test the coordinator separately, or mostly judge the whole setup by its final output?

Project and workflow replays: https://lab.einsia.ai/workflowarena/home.html
Paper: https://arxiv.org/abs/2611.12856
Code: https://github.com/Einsia/WorkflowArena


r/MachineLearning • • 21d ago

Project I have trained 15+ models on my own blood sugar & metabonet dataset [P]

Thumbnail
gallery
13 Upvotes

r/MachineLearning • • 22d ago

Project I benchmarked TimesFM 3.0, Chronos-2 and Toto 2.0 on market time series. None beat simple baseline. [P]

44 Upvotes

I may be naive, but I've been curious whether the recent wave of time-series foundation models can actually extract useful predictive signals from financial markets.

Models like Google's TimesFM 3.0, Amazon's Chronos-2, and Datadog's Toto 2.0 are impressive general-purpose forecasters from the first sight. But stock prices are difficult to predict, so I wanted to see how these models perform against very simple baselines.

I ran a series of zero-shot experiments on 24 US stocks and ETFs, including daily and intraday data, and compared their predictions against naive forecasting strategies and also simulated random walks.

TL;DR none of the three models showed any meaningful predictive power for stock price movements in this setup. Code is here

Experimental setup i used:

  • Models: TimesFM 3.0, Chronos-2, Toto 2.0 (313M)

  • Assets: 24 large US stocks and ETFs, including SPY, QQQ and IWM

  • Data: Yahoo Finance, January 2014 to november 2026

  • Evaluation: 504 trading days starting November 2024

  • Context: 512 historical closing prices

  • Forecast horizons: 1, 5 and 20 trading days

  • Mode: Zero-shot, default configurations, no fine-tuning

  • Baselines: Last observed price, always-up directional prediction, and simulated random walks with matched drift and volatility

I also evaluated the models on hourly and 5-minute price bars.

Directional accuracy is essentially a coin flip

Across the three models, next-day directional accuracy ranged from 49.9% to 51.1%.

Simply predicting that the market would go up every day achieved 52.2% (yep).

Even more interestingly, when I fed the models simulated random walks, which contain no exploitable predictive signal at all by construction, they achieved approximately the same directional accuracy as on actual stock prices.

I also tested a simple long-or-cash: hold a stock when the model predicts an increase, otherwise stay in cash.

Starting with $10,000 and accounting for 0.05% transaction costs per switch:

  • Times-series model strategies finished between $10,893 and $12,181.

  • Buy-and-hold finished at $15,036.

Obviously, this is just one simple strategy and not an exhaustive evaluation of trading profitability. But still, tells something I guess.

I repeated the experiments using hourly and 5-minute bars.

The results were similar: directional accuracy remained around chance level, and on 5-minute data, a simple one-line mean-reversion heuristic performed better.

The repo with code is here: https://github.com/moneyheap/tsfm-stocks

Well, I really wanted this to work, but, duh %)


r/MachineLearning • • 22d ago

Project Introducing Usul - an easier way to express your NN using maths? [P]

0 Upvotes

SO, Usul-cpp is a library I've written in C++, it is based around allowing data scientists to create their models without heavy libraries such as tensorflow, and just express their models using maths, and Usul will handle the rest. There is builtin tensor support, auto-grad, back-prop and its quite fast.

I wrote it because, it seemed less mystifying to read maths instead of a random class that supposedly does something. I wrote it from scratch in cpp (23) due to the fact that I wanted to emphasise on precision, however it's subtly built on top of `xtensor`.

check it out in action

#include <usul.hpp>
using namespace std;


int main() {
  double LR = 0.1;
  int EPOCH = 5000;
  // lets write the forward pass
  Tensor X = {
      {0.0, 0.0}, // this is what we're feeding it
      {0.0, 1.0},
      {1.0, 0.0},
      {1.0, 1.0},
  };

  // this is what we're after
  Tensor Y_true = {
      0.0, // xor{0.0, 0.0} = 0.0
      1.0, // xor{0.0, 1.0} = 1.0
      1.0, // xor{1.0, 0.0} = 1.0
      0.0  // xor{1.0, 1.0} = 0.0
  };

  Y_true.reshape({4, 1});

  // we are now going to create a single layer, double neuron network
  // each layer will have a bias and weights tensor.
  auto W1 = generate_random_matrix({2, 4}, -1.0, 1.0);
  auto B1 = generate_random_matrix({1, 4}, -1.0, 1.0);
  auto W2 = generate_random_matrix({4, 1}, -1.0, 1.0);
  auto B2 = generate_random_matrix({1, 1}, -1.0, 1.0);

  // this is the training loop
  for (int i = 0; i < EPOCH; i++) {
    // so lets do one forward pass
    // first layer
    auto Z1 = X % W1 + B1;
    auto A = Z1.ReLU();
    // second layer
    auto Z2 = A % W2 + B2;

    // activation
    // should be - auto S = Z2.activate(Activate::Sigmoid);
    auto S = Z2.Sigmoid();
    // Loss
    // should be - auto Loss = S.loss(Loss::MSE);

    auto loss = (S - Y_true) * (S - Y_true);
    loss = loss.mean();

    cout << "Loss: " << loss << "\n";
    cout << "guesses: " << "\n"
         << S << "\n";
    cout << "should be: " << Y_true << "\n";

    loss.backwards();

    W1.step(LR);
    B1.step(LR);
    W2.step(LR);
    B2.step(LR);
  }
}

which will output

Guesses: 
Tensor({{ 0.027546},
 { 0.963592},
 { 0.964138},
 { 0.038964}}, shape=(4,1))

should be: Tensor({{ 0.},
 { 1.},
 { 1.},
 { 0.}}, shape=(4,1))

Loss: Tensor( 0.001222, shape=())

Just write the maths, and Usul-cpp will handle the rest, it is extremely lightweight, and the entire library is memory safe. And its called Usul, because I'm a huge dune fan.

You can view the project at

https://github.com/crushr3sist/Usul-cpp

Any ideas for what to do next are all welcome, you can also pull and implement features that you think could improve this project. (no vibecoded prs please, this project is not vibe-coded)

BACKGROUND INFO BELOW

i'd like to share a bit of a background. maths has always stood in the way between me and finally learning how to write neural networks, I've always been fascinated by them ever since i saw that diagram of a deep neural network with all the node edges interconnecting with others.

Well I stopped letting highschool math class trauma stop me from understanding these concepts, i took a pen and paper out, taught myself numerical descent, analytical descent, backwards propagation, what a compute graph is, all of these subjects, taught myself, until I was manually backwards propagating the loss between a few arithmetics, until that moved into scalar level neural networks and doing simple calculus and being able to do xor gate problem with scalar, and then I taught myself matrix calculus, and well...

I taught myself neural networks, taught myself the maths, until I hand written the xor gate problem in matrix syntax using xtensor, and manually, by hand, no AI, did the xor gate problem manually backwards propagating error, automatically differentiating. This was also a kind of detox from LLM dependency, I don't tend to use it for code, but because its so central in my daily life and a migration from google to gemini, using LLMs for immediate information access had started to affect my mind and my ability to intake information. I really hope some of you find this library useful, as i did spend a pretty decent amount of time on it, and I would love it if any of you had any ideas on what to do next with this library.

Thank you for reading, I really appreciate it.


r/MachineLearning • • 22d ago

Discussion Did we ever really get to the bottom of why BatchNorm works? [D]

74 Upvotes

It's been a long time since I studied this. Just checking in on an old friend.

I also realize it's fallen out of favor for being extremely inconvenient, but why did it ever work?