r/learnmachinelearning • • 10h ago

Can we make an AI system that checks whether its own physical reasoning actually makes sense?

Thumbnail
gallery
0 Upvotes

Can we make an AI system that checks whether its own physical reasoning actually makes sense?

I've been working on a small project around an idea that's been interesting me for a while:

Instead of having an AI system simply produce an answer to a physics problem, what if it could examine the physical assumptions behind that answer, identify inconsistencies, and attempt to correct its reasoning?

I'm currently developing an experimental physics reasoning system around this idea.

The project isn't intended to be another physics chatbot or a conventional simulation tool. The broader objective is to build a system that can translate a physical scenario into a structured representation, derive its consequences, validate those consequences, and identify when something doesn't add up.

What I've been working on

I've recently moved into the second milestone of development, focusing on physical grounding and consistency.

The current direction involves:

  • Physical representation: Representing objects, properties, forces, conditions and assumptions in a structured form.
  • Consequence analysis: Deriving what should physically follow from the given conditions.
  • Consistency checking: Identifying contradictions, underdetermined situations and conditions the current model cannot adequately represent.
  • Assumption awareness: Distinguishing between what was explicitly provided, what was inferred, and what would require an additional hypothesis.
  • Self-correction: Exploring a bounded correction loop where the system diagnoses a problem, proposes a correction or requests missing information, and validates the result again.

I'm using symbolic mathematics and numerical simulation as validation mechanisms rather than treating the generated reasoning as automatically correct.

An important distinction I'm trying to establish

For example, suppose a physical scenario provides a force and mass combination that cannot produce a valid finite acceleration under the stated assumptions.

I don't want the system to simply generate an equation, obtain a result, and move on.

I want it to recognise that the problem exists, explain why the current representation cannot support a valid conclusion, and distinguish between a genuine contradiction and insufficient information.

That's the kind of behaviour I'm trying to develop.

Where I am currently

This is still an early-stage prototype. The current experiments are primarily focused on classical mechanics, particularly projectile motion and physical consistency.

There are still limitations in how certain conditions are represented. For example, non-uniform gravity requires a spatially varying model, and air resistance requires an actual drag model and parameters. Simply accepting those conditions as inputs doesn't mean the system understands their consequences.

I'm deliberately trying to establish a reliable reasoning foundation before expanding into more complicated physics or introducing heavier AI/ML components.

I'd genuinely appreciate some technical perspectives.

There are a few things I'd particularly like to hear opinions on:

  1. Physical reasoning: What are some important edge cases or physical inconsistencies that you think such a system should be able to identify?
  2. Validation: Is combining symbolic verification with numerical simulation a reasonable foundation for testing physical reasoning? What am I potentially overlooking?
  3. Self-correction: How would you distinguish a system genuinely correcting its reasoning from one simply changing assumptions until it obtains a valid result?
  4. Architecture: Are there existing approaches, research papers or projects I should study that tackle similar problems?

I'm not claiming to have solved any of these problems. I'm trying to understand where my current approach is strong, where it's fundamentally limited, and what I might be overlooking.

If you work in physics, scientific computing, AI/ML or mathematical modelling, I'd particularly appreciate your perspective.

I'm also interested in criticism of the underlying idea itself, not just suggestions for implementation.

Thanks!


r/learnmachinelearning • • 10h ago

From Welding Data to AI Agents: How? 🤔

0 Upvotes

Hi Reddit 👋 I'm Ramesh. I started out applying neural networks to welding and machining data during my PhD and research days. Today I train IT teams to build with Generative AI and Agentic AI, using tools like Claude, ChatGPT, LangGraph, CrewAI and MCP.

One thing I keep seeing is that many teams say "we use ChatGPT sometimes" and call it an AI strategy. It isn't one.

Each week I'll share practical AI ideas here, and on weekends I'll post AI job tips covering GenAI, agentic AI, AI engineering and forward deployed engineering roles.

What's the biggest thing stopping your team from using AI beyond chat? Happy to answer questions in the comments.


r/learnmachinelearning • • 17h ago

what career field to choose data analyst or Ai engineering for 2027 and coming years?

3 Upvotes

hello everyone, i'm 24 now and got messed up about what to choose for my career. i have graduated with a bachelors degree in mathematics and it's been 2 years gap . what should i go for as a newbie in this field , should i choose data analytics or ai engineering as i don't have any knowledge about both. what courses , resources, projects should i go for , i know experienced guys like you would probably help


r/learnmachinelearning • • 11h ago

Advice on the right AI

1 Upvotes

My manager at my new job gave me the task to create a comparative analysis for all the AI's available - to see which one is good - the cost, the model, the chatbot based on out companies work - as they want to use that analysis to later buy an AI platform for the company. It is a big company.

How should I go about it ? I am reading about it, but just want to know how can I make it easier.


r/learnmachinelearning • • 12h ago

modern route full stack generativeai and agentic ai bootcamp Krish naik

Thumbnail reddit.com
1 Upvotes

r/learnmachinelearning • • 12h ago

modern route full stack generativeai and agentic ai bootcamp Krish naik

1 Upvotes

Does anyone have this course. I have complete maths, machine learning and Deep learning now I want to learn generative ai,llm,and supervised fine tuning


r/learnmachinelearning • • 12h ago

Tutorial A Unicode preprocessing bug in a Kokoro port: nasal vowels vanished before inference

1 Upvotes

I help maintain speech-swift, which runs speech models in Swift. We recently fixed an input-tokenization bug in its Core ML port of Kokoro, the text-to-speech model.

Swift iterates a string by Character, which is an extended grapheme cluster. Kokoro has separate vocabulary entries for a vowel such as ɔ and its combining nasal tilde, U+0303. In bɔ̃bɔ̃, Swift sees four characters. Looking up each character as a single vocabulary entry dropped both vowel-plus-tilde groups, leaving only the two b tokens.

This small example reproduces the issue and the lookup strategy we use now. It runs with the Swift standard library; no model download is needed:

let vocab: [String: Int] = ["b": 44, "ɔ": 76, "\u{0303}": 17, "ç": 78]
let phonemes = "bɔ\u{0303}bɔ\u{0303}"

func tokenIDs(_ text: String) -> [Int] {
    text.flatMap { character -> [Int] in
        let symbol = String(character)
        if let id = vocab[symbol] { return [id] }
        let scalars = symbol.unicodeScalars
        let ids = scalars.compactMap { vocab[String($0)] }
        return scalars.count > 1 && ids.count == scalars.count ? ids : []
    }
}

print(phonemes.compactMap { vocab[String($0)] })
// [44, 44]
print(tokenIDs(phonemes))
// [44, 76, 17, 44, 76, 17]

Trying the full symbol first matters too: Swift's string dictionary treats ç and c\u{0327} as canonically equivalent. If that lookup fails, we split the cluster only when every scalar has a vocabulary entry. That preserves the nasal vowel without keeping half of an unsupported symbol.

Our regression tests cover nasal vowels, canonical equivalence and unsupported combining marks. The change is on the library's main branch; the v0.0.30 release predates it. This example checks token IDs, rather than measuring generated speech quality.

Tokenizer source · Regression tests

When validating a model port, how do you check that its preprocessing emits the same token IDs as the reference?


r/learnmachinelearning • • 13h ago

Looking for Text-Based Stress Detection Datasets for an ML/DL Project

1 Upvotes

Hi everyone!
I’m working on an ML/DL project on Stress Detection Using Text and looking for publicly available datasets for training and evaluating models.
I’m particularly interested in datasets containing text (social media posts, tweets, messages, etc.) with stress-related labels (Stress/No Stress or stress levels).
If anyone knows of relevant datasets, GitHub repositories, or research papers that provide such datasets, please share them.


r/learnmachinelearning • • 14h ago

[P] Added Hugging Face Trainer + Lightning support to Efficio — resumable, time-budgeted training on free Colab/Kaggle GPUs

1 Upvotes

We maintain Efficio, an open-source PyTorch library for getting more out of free GPU hours (Colab/Kaggle) — auto-checkpointing, a time budget that saves and stops before your session gets killed, and resume across platforms.

Until now it only worked with plain PyTorch training loops. 0.3.0 adds callbacks for transformers.Trainer and PyTorch Lightning:

from efficio.adapters import HFTrainerCallback

efficio_cb = HFTrainerCallback(budget="2h", storage="hf://you/your-repo")
trainer = Trainer(model=model, args=args, train_dataset=ds, callbacks=[efficio_cb])
trainer.train (resume_from_checkpoint=efficio_cb.resume_from(trainer))
  • Budget-based stop + resume, going through the Trainer's/Lightning's own checkpoint mechanism (not a side file), so weights/optimizer/scheduler/RNG come back correctly.
  • Cross-platform resume (Kaggle 2x T4 → Colab 1x T4), checkpoint storage on HF Hub or Drive.
  • Tested on a real Colab T4 (mid-epoch budget stop + resume).
  • Current limit: single-process only — torchrun/ddp raises for now, multi-GPU is next on the roadmap.

pip install "efficio[hf]" or pip install "efficio[lightning]"

GitHub: github.com/HuNTer8272/Efficio — feedback/issues welcome, especially from anyone hitting Colab/Kaggle limits mid-Trainer-run.


r/learnmachinelearning • • 14h ago

Design AI Systems, with 232 real parts and offer real traffic load and see where it breaks NSFW

Thumbnail x.com
1 Upvotes

r/learnmachinelearning • • 1d ago

Let every Transformer layer reach states at all depths (Paper + Video explainer)

Post image
6 Upvotes

In a standard Transformer, each layer only reads the KV cache from its own depth. A shallow layer cannot use what deeper layers already computed for earlier tokens. When deep layers need to reach shallow ones, that information also has to pass through the residual stream, which has limited bandwidth.

Our recent work, WhiteMatter: All-to-All Cross-Layer Connections via KV Source Mixing, lets every layer read from every depth. Each layer's keys and values are a learned mix of hidden states from all layers. In addition, we can share KV among reader layers to reduce the KV cache size.

Main results:

- WhiteMatter matches a standard Transformer with 50% more layers (4%-8% perplexity reduction vs same depth).

- With half the KV cache, it still beats matched standard Transformers.

The catch: a token's shallow layers now depend on the deep layers of earlier tokens, so training and prefill cannot process all tokens at once.

To keep parallel training & prefill, we proposed cyclic iteration, which matches token-by-token quality in 4 parallel passes, compared to 53 for the Jacobi method (12.5x faster at matched quality). It's still slower than a standard Transformer, which is the main thing we are working on next. However, decoding has the same speed as standard transformer, or can even be faster because of the reduced GPU memory use.

Paper: https://arxiv.org/abs/2608.18486

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

Code: https://github.com/Cy-47/White-Matter

Strongly recommend watching the video. It should feel much easier to follow than text!


r/learnmachinelearning • • 14h ago

Request Looking for an arXiv endorsement (cs.CL or cs.LG) for my research on compositional reasoning

0 Upvotes

Hi everyone,

I'm a second-year undergraduate student from Vietnam, currently working on mechanistic interpretability and compositional reasoning in language models.

I recently finished a single-author paper titled Attention-Head Reuse and the Limits of Compositional Generalization.

The paper investigates whether language models reuse the same attention heads across reasoning steps and why they struggle with unfamiliar compositions. I ran experiments on Qwen2.5-1.5B and Phi-4-mini, using activation patching, targeted ablations, and interventions on intermediate answers.

One particularly interesting finding is that correcting an intermediate answer restores final accuracy from 3–17% to over 99%, even when the disrupted KV cache is retained.

I'm hoping to make my work more accessible through arXiv, but I'm currently struggling to find an endorser for either cs.CL or cs.LG, as I don't have many academic connections yet. I've already reached out to faculty members at my university, but unfortunately, none of those I contacted are eligible to endorse me in either category.

If anyone here is eligible and willing to take a look at my paper, I'd really appreciate your help. Feedback on the research or manuscript is also very welcome.

Preprint: Attention-Head Reuse and the Limits of Compositional Generalization | Zenodo

Thanks for your time!


r/learnmachinelearning • • 15h ago

AI Engineer Interview Series | Part 06/10

Thumbnail reddit.com
1 Upvotes

r/learnmachinelearning • • 19h ago

Tutorial I made a free 10-video path from tokenization to a tiny GPT-style model

2 Upvotes

I teach ML and wanted a more concrete answer to “how does a chatbot work?” than just calling an API. Here is the path I put together:

  1. Start with a working local chatbot preview so students see the destination. This preview uses pretrained open weights; it is NOT a model I trained from scratch.
  2. Turn raw text into tokens and IDs. See how tokenization choices affect what the model can represent.
  3. Build the transformer pieces: embeddings, causal masking, self-attention, and next-token logits.
  4. Train a tiny autoregressive language model from random initialization. It produces modest character-level output, but makes the loss, training loop, and sampling tangible.
  5. Connect that small exercise to the practical realities of training and improving larger models.

The free playlist is here: https://www.youtube.com/playlist?list=PLNDTRoZ-IiFs

I created the series. I would especially value feedback on which transition is hardest for beginners: tokenization to IDs, attention to logits, or loss to generation. I can expand the most confusing part in a follow-up explanation here.


r/learnmachinelearning • • 1d ago

Question Is machine learning THAT math heavy? Or am I just too naive? (Question related to recent ML test papers)

23 Upvotes

I wanted to learn machine learning cuz I found the idea of it interesting. My initial thoughts regarding machine learning was "why do the numbers make this output" and so I started learning through YT and Coursera.

I learnt how to use scikit learn, the various models, data cleaning, EDA etc... but there's been a few posts about Machine Learning papers from IIT or IIIT etc. and when I look at them, I feel like I'm very behind or just dumb straight up.

If I seriously wanted to pursue learning machine learning, what should be the ideal way? Or are the test papers displayed in those post "over exaggerated"?


r/learnmachinelearning • • 1d ago

ML paper in tier 3 college

Thumbnail
gallery
20 Upvotes

r/learnmachinelearning • • 8h ago

Discussion IIT Delhi Deep Learning course Major Question paper. Rate the difficulty and Guess the class average.

0 Upvotes

r/learnmachinelearning • • 1d ago

Resume feedback: 3rd-year diploma student, AI/ML projects and open source

Post image
6 Upvotes

Hi all, I'm a 3rd-year Computer Science diploma student in India. I'm looking for part-time, paid internships or small gigs in AI engineering (LLMs and agents) and ML/data science. My resume is attached with personal details redacted. I'd really appreciate honest feedback and don't want sugarcoating.

A bit of context so you can judge it fairly:

Internship: I got it through my college, where it was set up like a subject. It was purely learning-focused. We were assigned weekly tasks and had a meeting every weekend to go over updates on them. The resume bullets (YOLO fine-tuning, the used-car price model) come from those weekly tasks. I know that's different from a production internship, and I'm not sure how best to present it without overselling or underselling.

Projects: I've built three:

• Kwest: a LangGraph agent that automates the Kaggle competition loop.

• A deepfake audio detector: EfficientNet-B0 on Mel-spectrograms, deployed with FastAPI and Streamlit.

• A UFC fight predictor: built around leakage-free, chronological validation.

Open source: I have 6+ merged PRs in total. Some are small docs and test fixes in smaller repos, so I left those off the resume and listed only the more substantial ones (including scikit-learn), plus one PR still under review.

What I'd love feedback on:

  1. If I start applying to internships now (full-time or any type), will I be able to get one with this resume?
  2. Should I change any wording, or add or remove any section?
  3. Right now, could I realistically land a part-time role or paid gigs?
  4. Any other advice would be really helpful.

Thanks in advance


r/learnmachinelearning • • 1d ago

I probed every layer of Whisper-small and found emotion, age and sex in different layers, so I made one model that transcribes and reads the voice in one pass

5 Upvotes

I've mostly worked on speech-to-text. I wondered how much Whisper "knows" about a voice besides the words. The decoder only sees the last encoder layer, so I wanted to check whether the other layers hold anything useful.

They do. Different things live in different layers.

What I did

  1. Got the data. I used two acted emotion datasets, CREMA-D and RAVDESS, about 8,800 English clips. I split them by speaker, so the test speakers were never seen in training. This matters a lot. If you split randomly, the model learns the actors' voices and the scores look much better than they really are.
  2. Pulled out every layer. I ran each clip through the Whisper-small encoder once and saved all 13 hidden states. Each clip gives about 1500 frames per layer. I averaged them over time and also took the standard deviation, so each clip became one vector per layer. I only used frames with real audio, not Whisper's 30 second padding.
  3. Probed every layer. For each task (sex, age, emotion, and so on) I trained a simple linear classifier on each of the 13 layers and compared the scores. I also ran the same test on a Whisper with random weights as a baseline. That showed sex is so easy that even random weights get 99%, so I can't claim Whisper "learned" it.What I found:- Pitch, loudness and speaking rate were strongest in layers 1-2.- Sex was readable almost everywhere.- Emotion peaked in the middle, at layer 8.- Arousal (energy) was a bit higher, at layer 9.- The last layer, the one the decoder uses, was not the best for any voice cue.
  4. Added small heads. I put one logistic regression head on the best layer for each task. Whisper stays frozen and untouched. All 5 heads together are about 160 KB.
  5. Calibrated them. I used temperature scaling on a separate set of held-out speakers, so a confidence of 90% means about 90% in practice.
  6. Ran it in one pass. I run the encoder once, read the heads from the middle layers, and give the same encoder output to the decoder for the transcript. You get the words and the voice cues together.

Results on unseen speakers (1,704 clips)

- Sex (layer 5): 99.8% (chance 50%)

- Emotion, 6 classes (layer 8): 74.3% (chance 17%)

- Valence, negative/neutral/positive (layer 8): 84.4% (chance 33%)

- Arousal, high/low (layer 9): 83.1% (chance 50%)

- Age group, 3 bands (layer 10): 55.0% (chance 33%)

- Transcript WER: 4.7%

Example output

"Don't forget a jacket!"

Female voice (very likely); age group 20-34 (likely); sounds angry (very likely, 86%);

negative feeling, high energy; high pitch for a female voice, loud volume, normal pace.

Where it fails

- It's trained only on acted speech. Real conversations are much less dramatic, so expect worse results on normal speech. I haven't measured how much worse yet.

- Age is weak. 55% across three bands.

- It mixes up sad, fearful and disgust. In one test it called a disgust clip "sad" with 93% confidence. Calibrated doesn't mean always right.

- It's English only, and non-commercial, because of the RAVDESS license.

Things I tried that didn't work well

At first I fed all these outputs into a small LLM (Qwen 1.5B and 3B) to write a nice paragraph about the audio. It looked cool, but when I gave it wrong labels on purpose, it just repeated the wrong labels about 60% of the time. It was mostly rewording, not adding any understanding. So I dropped it and kept a simple rule-based summary instead.

What I think it could be used for

- Labelling speech datasets for expressive TTS. Datasets like SpeechCraft used many separate models for this; here it's one pass.

- Feedback for speaking practice: pace, loudness, how flat or energetic you sound.

- Tone tags on captions for deaf and hard-of-hearing viewers.

Model, code and full results: https://huggingface.co/Noobbbbb/whisper-small-voice-cues

Please verify the data on unbiased dataset as well before you use for your own use case. It was just like a case study to me.


r/learnmachinelearning • • 19h ago

Project I built a free AI curriculum with quizzes and spaced review

1 Upvotes

Open Academy is an open-source engine for creating and studying courses. You can give your AI your notes or a textbook chapter and ask it to build a course in your AI chat app of choice using the MCP. You can then study in your browser or in your AI chat.

I had been using AI to learn new topics for a while but it felt very unstructured. I wanted lessons I could work through, quizzes to check what I’d understood, and reviews that bring topics back over time.

A couple of weeks ago I shared an early version of Open Academy in r/MathAcademy. I’ve made some improvements since then and thought I’d share it here.

AI Academy is the first curriculum I built with it, it covers:

  • Maths for ML: linear algebra, calculus, probability, and statistics
  • Machine learning: regression, classification, gradient descent, and model evaluation
  • Deep learning: neural networks, backpropagation, CNNs, and generative models
  • Transformers and LLMs: attention, pretraining, fine-tuning, RLHF, and evaluation
  • LLM inference: KV caching, quantization, speculative decoding, and model serving
  • Reinforcement learning: value functions, Q-learning, policy gradients, and PPO

If you think some topics are missing you can just extend the course through the MCP.

It’s free and open source, and you can try it out without logging in.

Let me know if you find it useful!

Try the first lesson
Full syllabus
GitHub


r/learnmachinelearning • • 15h ago

AI labs keep warning models will outrun our ability to supervise them, now a startup's is trying to wire the model to our brains. Its demo already decodes what a person is perceiving from 10 seconds of scalp EEG

Post image
0 Upvotes

r/learnmachinelearning • • 19h ago

Hey everyone! Remember me? The one who was tired of building house price prediction models and yet another chatbot? 😂

1 Upvotes

A while ago, I asked for ideas on what to build next, and one piece of advice really stuck with me:

"Stop looking for random project ideas. Start solving problems you actually face."

So, I took that advice and found my problem right in my inbox!

Managing emails was taking too much time: figuring out what's important, tracking deadlines, extracting tasks, and keeping up with interviews and follow-ups.

That's why I built RADAR – AI Email Assistant 🚀

RADAR helps you:

Classify emails into 10 categories.

Detect and prioritize important emails.

Extract tasks, deadlines, and events.

Summarize emails and highlight what needs your attention.

I'd really love to hear your feedback!

🔗 GitHub: https://github.com/radwahamada1/RADAR-AI-email-assistant

And once again, thanks to everyone who shared advice on my previous post. This project is partly because of you! ❤️


r/learnmachinelearning • • 20h ago

transformers - Hugging Face's Python framework that defines and runs many pretrained ML models https://www.reddit.com/r/the_ImmerSecGuy/submit?url=https://github.com/huggingface/transformers

Thumbnail
github.com
1 Upvotes

What it is: Transformers is Hugging Face's Python library that defines state-of-the-art pretrained models for text, vision, audio and multimodal tasks, for both inference and training.

How it works:

  • Each model is defined once, in PyTorch, and that definition is reused for inference and training.
  • Pipelines wrap preprocessing, the model, and postprocessing for a task in one class.
  • transformers serve starts a local server compatible with the OpenAI SDK, meant for evaluation and moderate load.
  • Models are loaded from the Hugging Face Hub by name.

Background: Pretrained models are learned weights plus code that tells the computer how to run them. When you download one, you trust both. Treating a model like a dependency means checking its publisher, reading its model card, and pinning versions, the same discipline you'd apply to any package.

Getting started: In a lab or VM, run uv pip install "transformers[torch]", then follow the README quick start, which creates a text-generation pipeline with Qwen/Qwen3-0.6B.

Limitations / open questions: The README describes the project's own design and claims, and I haven't tested them. Models on the Hub vary in quality and license, so check each model card. The README positions serving for evaluation and moderate load, not large production.

Has anyone built a model-vetting step into their pipeline? What did you check first? https://github.com/huggingface/transformers


r/learnmachinelearning • • 1d ago

if you had to start again from scratch what would you do to learn ml

14 Upvotes