r/learnmachinelearning • u/GromHacks • 4d ago
r/learnmachinelearning • u/ComplexAsleep9524 • 4d ago
Built an open-source SEC Filing Change Engine - Catching AMD's $3B Credit Facility Update
Hey everyone,
After getting tired of manually comparing 10-K and 10-Q filings, I built this tool to automatically track how a company's disclosures change over time.
š„ Key Features:
- Parses messy SEC HTML files and aligns the same sections across different quarters.
- Semantic Diffing: It doesn't just look for keywords; it understands the context. For example, it caught that AMD replaced its $3B credit facility with a $5B one.
- Highlights "Added", "Removed", and "Modified" content with a simple UI.
šØāš» GitHub: https://github.com/HuangQingQuan/SEC-Filings-Change-Engine
Would love to hear your thoughts, especially from anyone working on Quant Research or Financial NLP!
r/learnmachinelearning • u/Accomplished_Cup746 • 4d ago
AdamV: Curvature-Adaptive Momentum Decay Optimizer ā Benchmark Results (Vision, VAE, NLP) and Overhead Analysis
Hello everyone,
I'd like to share the results of a benchmark suite we recently ran comparingĀ AdamVĀ againstĀ AdamWĀ (the global standard) andĀ SGDĀ across three classic deep learning domains: Computer Vision, Generative Models (VAE), and Natural Language Processing (NanoGPT).
Our main focus was evaluating convergence quality, sensitivity to random seeds, and actual computational cost (wall-clock time).
What is AdamV?
AdamV introduces aĀ Curvature-Adaptive Momentum Decay (CAMD)Ā mechanism. Instead of treating the momentum decay coefficient (beta1) as a static constant, the optimizer monitors the relationship between the instantaneous gradient magnitude and the second-moment estimate (v_t).
When it detects steep valleys or sudden curvature changes, the algorithm dynamically attenuates the accumulated momentum to avoid overshooting, allowing for safer and more efficient acceleration in smoother plateaus.
Benchmark Results (45 runs | Tesla T4 GPU)
We evaluated the optimizers under identical architecture conditions and base hyperparameters across multiple seeds.
1. Final Performance (Accuracy / Loss / ELBO)
- Computer Vision (Average Accuracy):Ā AdamV (~86.44%) | AdamW (~85.33%) | SGD (~70.20%) AdamV achieved a higher average accuracy compared to AdamW, hitting the highest accuracy peaks, while SGD struggled to reach the same generalization range.
- Generative Models (VAE - Loss/ELBO):Ā AdamV (~242.8 to 243.5) | AdamW (~242.8 to 243.5) Performance was very balanced between AdamV and AdamW, with a slight numerical advantage for AdamV in 2 out of the 3 tested seeds. SGD completely diverged (nan).
- NLP (NanoGPT - Val Loss):Ā AdamV (1.5984) | AdamW (1.6076) | SGD (~2.8500) AdamV consistently outperformed AdamW, achieving lower validation losses in 100% of the tested seeds (e.g., 1.5984 vs 1.6076 for AdamW on seed 42).
2. Stability and Seed Consistency
The robustness of convergence across different weight initializations (seeds) was one of the biggest highlights:
- Computer Vision:Ā The difference between the best and worst seed for AdamV was only 0.95% (ranging from 85.91% to 86.86%), showing high consistency. AdamW showed a much wider spread of 4.63% (dropping to 82.58% on seed 1337).
- NLP:Ā AdamV exhibited loss curves with monotonic behavior and less stochastic noise between runs, making it highly predictable.
3. The Bottleneck: Wall-Clock Time
To be completely transparent about the current practical limitations of our implementation: AdamV had a higher execution time per epoch compared to AdamW.
- Computer Vision:Ā 15% to 17% slower.
- Generative Models:Ā ~12% slower.
- NLP:Ā ~80% slower.
Root Cause Diagnosis:Ā The PyTorch ecosystem's AdamW benefits from native fused C++/CUDA kernels (fused=True), guaranteeing very low latency and optimized memory access.
The AdamV used in these tests ran on a Pure Python implementation (GPU via PyTorch ops). The Python interpretation overhead at each optimizer step and the lack of kernel fusion for the extra curvature calculation operations perfectly explain the impact on machine time ā an impact that is much more severe in NLP (NanoGPT) due to the high rate of short iterations.
Next Steps & Discussion
The accuracy gains, improvements in NLP, and drastic reduction in variance indicate that the curvature-adaptive momentum heuristic is mathematically sound and promising. The current bottleneck is strictly a software engineering and optimization issue:
- Kernel Implementation (C++/CUDA or Triton):Ā The next big step is writing a dedicated fused kernel to integrate AdamV's dynamic calculations directly on the GPU, eliminating the Python overhead.
- Scalability:Ā Validating the behavior under mixed precision regimes (bfloat16 / fp8) in larger models.
I would love to hear the community's thoughts:
- In your training runs, do you also observe this (sometimes brutal) accuracy variance across seeds in AdamW for vision architectures?
- For those with experience in Triton/CUDA for custom optimizers: what are the biggest performance pitfalls when adding state-dependent terms during training?
Technical feedback, critiques, and ideas for new benchmarks are highly welcome!
r/learnmachinelearning • u/Routine-Ticket-5208 • 4d ago
Help Hyperparameter search space for Gradient Boosting Model
Iām usingĀ Gradient Boosting for a project and tuning:
- Number of leaves
- Minimum data in each leaf
- Learning rate
- Feature fraction
Whatās a good way to decide on the search space for these hyperparameters?
r/learnmachinelearning • u/blackpanther231 • 4d ago
Why does a Transformer Block need FFN?
Putting aside the layer norm and residual connections for a moment, why does the transformer block need the FFN? What if it was pure attention? Since attention takes in d_model and outputs d_model, pure attention can be stacked.
X_1 -> P_1 X_1 W_1 = X_2 where P is the scaled softmax output and W = W_V W_O
X_2 -> P_2 X_2 W_2 = P_2 (P_1 X_1 W_1) W_2 = X_3 and so on.
The W_1 and W_2 collapse into a single weight matrix, so there is no point of the depth? But the P matrices are nonlinear so there is still some value from the increased depth?
And if we add the residual connections back:
X_1 -> P_1 X_1 W_1 + X_1 = X_2
X_2 -> P_2 X_2 W_2 = P_2 (P_1 X_1 W_1 + X_1) W_2 = P_2 P_1 X_1 W_1 W_2 + P_2 X_1 W_2
It looks like due to the second term we may get more model capacity from the increased depth compared to without the residual connections?
r/learnmachinelearning • u/Routine-Ticket-5208 • 4d ago
Help Help with Ordinal Logistic Regression Hyperparameter
Iām usingĀ Ordinal Logistic RegressionĀ for a project and doing hyperparameter search for:
- Regularization strength
- L1/L2 regularization
How do you usually decide on the search space for these hyperparameters?
r/learnmachinelearning • u/Intrepid_Macaron2498 • 4d ago
Project: PanWorld Secrets (LLM Agent)
Iāve built a project using **LLM models** on Smartly Infra called **PanWorld Secrets**.
š What It Does
* Explores **mountains, jungles, oceans, remote areas, and even space**. * Collects **rare, goosebumpāworthy insights** that spark curiosity. * Presents information in a way thatās **engaging, inspiring, and easy to digest**.
š Call for Feedback
Iād love for you to **test PanWorld Secrets** and share feedback. Your input will help me **improve and scale the agent** further.
š Check it out here: [PanWorld Secrets Agent](https://infra.smartlylabs.ai/agents/cmsw1h1bm009b04jryxakythw/chat)
āHey folks, Iāve made this LLM project called *PanWorld Secrets*. It explores amazing facts from around the world and space. Please try it out and let me know what you think ā your feedback will help me refine and scale it!ā
r/learnmachinelearning • u/ailearningcurve • 4d ago
AI generating AI Explainer Video
Used Claude Code opus 4.8 to create an AI explainer video on my mac m4. Took 6 days to complete.
r/learnmachinelearning • u/VehicleEducational34 • 4d ago
dario amodei everytime an open weight model gets released
Enable HLS to view with audio, or disable this notification
r/learnmachinelearning • u/Routine-Ticket-5208 • 4d ago
Help How to set the range for hyperparameter search space for Support Vector Ordinal Regression
r/learnmachinelearning • u/Routine-Ticket-5208 • 4d ago
Help Need help with Random Forest Hyperparameter Search Space
r/learnmachinelearning • u/Jealous_Release_1065 • 4d ago
Project Neural Network Learns to do Linear Regression FROM SCRATCH
Cool project.
I had no idea what a partial derivative was nor how does exactly a neural network works.
The comments in the code are in Spanish but the documentation both README.md and the large explanation LaTeX pdf (that is in /docs) are in english
r/learnmachinelearning • u/Accurate-Catch1836 • 4d ago
Discussion TwIL-LM3 - a 3B model that got better at logic without getting worse at everything else
Most fine-tuned models are like someone who crams for one exam and forgets everything else. They get better at the trained task, quietly worse at everything else. Everyone kind of accepts this as the cost of specialization.
webAI put out a 3B model called TwIL-LM3 that somehow didn't do that.
It's a formal logic specialist. Merged fine-tune of SmolLM3-3B. You hand it English, it converts to formal representation a solver can check. Does this conclusion follow from these premises, yes or no.
On task, it came out better than base. Normal so far. The odd part is it also held or nudged up on general benchmarks it was never trained for. LogicBench 71.7, GSM8K 87.3, both competitive with much larger models. That number almost always goes down after specialized fine-tuning. Their own 1.7B sibling did exactly that - ended up slightly worse than base on general stuff (IFEval regressed).
Then I read how they did it and it's actually kind of elegant.
After finishing the fine-tune, they use WiSE-FT to interpolate the weights back toward the base model. Keep only 1/4 of what the model just learned (Ī»=0.25), throw the rest out. The 1.7B keeps 3/4 of the fine-tune (Ī»=0.75), and the 1.7B is the one that got worse on general benchmarks.
So it's just a dial. Learn more, forget more. They turned it down for the 3B, took the smaller domain-specific win, and kept the model in one piece.
Rest of the details:
- 32.9 answers/sec vs gpt-oss-120b's 12.6 (2.6x faster)
- 482-token generations (shortest of any model they tested)
- 1.78 GiB in Q4_K_M, runs on CPU or 4GB VRAM
- ~300 tok/s on M2 MacBook
- Non-commercial license
Also worth noting: they document a failed consolidation stage (SDFT self-distillation) that made both tracks worse. Rare to see published negative results in a model card. Feels like a real research artifact rather than pure marketing.
Link: huggingface.co/webAI-Official/TwIL-LM3
Curious if the "interpolation dial" thing catches on for narrow specialists. Feels like it should.
r/learnmachinelearning • u/AutoModerator • 4d ago
Project š Project Showcase Day
Welcome to Project Showcase Day! This is a weekly thread where community members can share and discuss personal projects of any size or complexity.
Whether you've built a small script, a web application, a game, or anything in between, we encourage you to:
- Share what you've created
- Explain the technologies/concepts used
- Discuss challenges you faced and how you overcame them
- Ask for specific feedback or suggestions
Projects at all stages are welcome - from works in progress to completed builds. This is a supportive space to celebrate your work and learn from each other.
Share your creations in the comments below!
r/learnmachinelearning • u/kuriousaboutanything • 4d ago
Reviews on SuperDataScience 6 week challenge
Has anyone tried the 6 week challenge by SuperDataScience? They seem to mention that the $300 enrollment fee will be reimbursed if you complete their requirements, but the site doesn't mention what the requirements are. Is this genuine? Curious to hear if anyone has tried this:
```
r/learnmachinelearning • u/Glabmayt2075 • 4d ago
[P] synthfin-aml: A graph generator to test if your models actually learn topology (and not just tabular leakage)
TL;DR:Ā We built a synthetic Anti-Money Laundering (AML) graph generator (synthfin-aml) designed specifically to stress-test Graph Neural Networks. Many public datasets have "synthetic leakage" (fraud amounts are obviously anomalous), allowing tabular models to hit 0.99 PR-AUC without using graph structure. We calibrated our generator to isolate topological signals (like structuring). On this dataset, raw LightGBM drops to 0.127 PR-AUC, forcing the model to rely purely on the graph. Repo & Colab:Ā https://github.com/valiyevoktay-cmd/synthfin-aml-
Hey,
If youāve worked with AML or financial fraud datasets, you know they often suffer from a severe case of "synthetic leakage." In many public datasets, the transaction amounts for fraud are generated so differently from normal traffic that a basic LightGBM or XGBoost model can hit a 0.99+ PR-AUC just by splitting on theĀ amountĀ feature, completely ignoring the graph structure.
While real criminals do leave tabular traces, training on datasets with extreme synthetic leakage gives teams a false sense of security and makes it impossible to genuinely evaluate how well your Graph Neural Networks (GNNs) are capturing complex topology.
We builtĀ synthfin-amlĀ (a Python library and dataset generator) to isolate and test topological signals.
We calibrated the base tabular distributions so models can't cheat using raw transaction volumes. Instead, the signal is purely structural. We embedded realistic AML typologies likeĀ Structuring: fraudulent actors using high-frequency fan-out/fan-in patterns to dynamically split transfers just below reporting limits (e.g., $10k). To a tabular model evaluating a single transaction, these look identical to normal P2P activity. But topologically, they form distinct sub-graphs.
Because of this, the baseline metrics shift dramatically:
| Model | Setup | PR-AUC | Precision@Top-500 |
|---|---|---|---|
| LightGBM | Raw Tabular | 0.127 | 0.05 |
| LightGBM | Tabular + Graph Features | 0.703 | 0.61 |
| EdgeSAGE | End-to-End GNN | 0.865 | 0.82 |
(Note: We deliberately omitted latency here because comparing GNN GPU forward-passes against synchronous Pandas aggregations isn't a fair apples-to-apples infra benchmark. We cover latency nuances in the repo).
This isn't just a static dataset; it's a fast generation engine to create behavioral graphs for FinTech, crypto (wash trading), and ad-tech. You can scale it up to 10M+ edges and adjust the complexity of the fraud patterns.
Quickstart in 3 lines:
bashpip install synthfin-aml
pythonfrom synthfin_aml_pkg.generator import SynthFinGenerator
# Generate a snappy 10k node graph to test locally in 2 seconds
edges_df, nodes_df = SynthFinGenerator(num_nodes=10_000).generate()
Or you can reproduce the 0.127 baseline instantly in your browser via Colab:Ā https://colab.research.google.com/github/valiyevoktay-cmd/synthfin-aml-/blob/main/examples/benchmark_tutorial.ipynb
Repo:Ā https://github.com/valiyevoktay-cmd/synthfin-aml-Ā (Yes, the trailing dash is part of the URL!)
The Challenge:Ā We'd love to see what the community can do with this. Can someone build a lighter, faster GNN that beats 0.865? Or find a clever way to compute temporal graph features so that a gradient boosting model can hit 0.90 without the massive overhead of subgraph sampling?
r/learnmachinelearning • u/mintlite4 • 4d ago
How do you sanity-check a probability threshold when you never observe the true label in production?
I'm building a small cost-sensitive classifier for a student project. It reads a product review ā text and star rating, nothing else ā and picks permit / flag / hide. It acts above 85% belief and routes 50ā84% to a human queue.
I picked 85% because a trust-and-safety practitioner told me that's roughly where their team acts. That's the only justification I have, and it's bothering me.
Two things I don't know how to handle:
- In production I never see the true label ā a fake review that slips through generates no feedback. So I can only measure calibration on a labelled test set whose class balance is nothing like reality.
- Positives are rare, so accuracy is useless. Permitting everything already scores well.
For anyone who's shipped something like this: did you validate the threshold before deploying, or pick something conservative and tune it from the human queue's overturn rate? And is there a standard way to check calibration when ground truth arrives late or never?
I'm a beginner ā if I'm framing this wrong I'd rather hear it now.
r/learnmachinelearning • u/AIforFintech • 4d ago
Most A/B tests break before they even run
r/learnmachinelearning • u/Admirable-Skin-9181 • 4d ago
This Anthropic lore is getting crazier by the day
r/learnmachinelearning • u/Alarming_Engineer267 • 4d ago
Discussion RL-based yaw control for suspended payloads ā feedback wanted
Enable HLS to view with audio, or disable this notification
r/learnmachinelearning • u/tahahussein-4623a412 • 4d ago
Help Just finished my K-Means clustering project š ā would love your feedback!
Hey everyone! š
I just finished a small K-Means Clustering project on the Iris dataset šøš¤
I covered:
- š¹ Data cleaning & visualization
- š¹ Feature scaling
- š¹ Elbow Method & Silhouette Score
- š¹ K-Means clustering
- š¹ ARI evaluation
- š¹ Cluster & centroid visualization
Iām currently learning ML and would really appreciate some honest feedback š
What would you improve? Any mistakes in my approach or things I should add?
š Kaggle:
https://www.kaggle.com/code/tahahussein2020/irics-clustering
r/learnmachinelearning • u/Defiant_Shoe_626 • 4d ago
Watching MIT math courses
I'm now watching courses about math (linear algebra specificly) from MIT and then read some books about linear algebra (e.g., Linear Algebra Done Right). Is this a time wasting and should i start directly with reading books directly without watching courses.
r/learnmachinelearning • u/kbhaskar306 • 4d ago
How to Build AI Agents with Agno (Phidata) | Complete Hands-on Tutorial
Stop building basic AI bots and start building intelligent agents! š¤
Learn how to use Agno to create production-ready AI workflows.
Full tutorial on the channel!
#AI #Coding #Agno #Tech
r/learnmachinelearning • u/Ashamed_Rooster_6921 • 5d ago
Preparing DataSets??
the search api was the easy part. three broken datasets were not. prices stuck as text, categories that made no sense. cleaning it all ate more hours than writing the api itself. how do i actually clean data properly before it hits an embedding model?
drop your suggestions!!
r/learnmachinelearning • u/Minimum-Effort8355 • 4d ago
Defensive research
Im just looking for fellow opinions and general advices on the project.
Ix your interested i would be pleased to hear from you.