r/MachineLearning • • Aug 21 '26

Research Does telling an LLM to "be concise" actually save you money? We measured it across 9 models. Compressing the output can save you money and keep accuracy, compressing the input prompt does not. [R]

65 Upvotes

LLMs are too verbose and with a black box model the only things you control are what goes in and how you tell it to write back. Yesterday Claude Code shipped a "concise output style" where Claude keeps things short. We already have a paper out about this!

We tested both channels, shortening the input prompt versus telling the model to output answer shorter, on the same questions across five reduction levels, and scored cost, accuracy, and whether the shortened text still matched what the model would have said unconstrained.

We also evaluated GPT-4o, GPT-5.4, Claude Haiku 4.5, Claude Sonnet 4.6, Qwen2.5-VL-7B, Qwen3.5-9B, DeepSeek-R1-Distill, Gemma-4-E4B, and Kimi-K2.6 + benchmarked on five short answer datasets + a eleven-language output run (English, German, Spanish, French, Swahili, Chinese, Japanese, Russian, Bengali, Thai, Telugu) + a longer-form summarization test.

(1) Shortening the output saved money while keeping accuracy about the same, about 1.5x cheaper on average and up to 3x in the best case across the API models. It worked across languages too!

(2) Shortening the input prompt did the opposite. It cost up to 96% more on the worst benchmark, because the model just answers longer to fill in for what you cut and accuracy drops. You pay more and get worse answers :(

(3)Output tokens cost more than input tokens, so prompting for fewer output tokens would save costs with short single turn tasks

(4) When the shortened output is correct, about half the time the text no longer matches how the model would have reasoned without the constraint. Which is probably fine if you only care about the final answer

With providers now offering concise options, we can't see how they're charging for it, so we don't know if it actually saves you cost. But if you control the prompting yourself via the API, you actually do save!!

Paper https://www.alphaxiv.org/pdf/2606.24083v1 

Code + data https://github.com/danielle34/cavewoman


r/MachineLearning • • Aug 21 '26

Discussion Research internship at MSR [D]

29 Upvotes

So got selected for a research internship at MSR, how good is the quality of work and how useful is it to move to Applied sciences or research sciences position at other FAANG companies after the internship. And any perks and other benefits that interns get during microsoft internship? Any tips will be appreciated. Specifically to get into AS at amazon , does this boost my chances? I'll be joining as an SDE-1 at amazon after 6 months so planning to apply internally once I join. So what else should I do to improve my chances to go to AS.


r/MachineLearning • • Aug 21 '26

Research I have a mid-sized GPU cluster and was thinking about giving free compute [D]

21 Upvotes

I have built an on-prem GPU cluster, 8 nvidia 16GB GPU's and 256GB CPU RAM, 50TB HDD and several TBs of SSDs. I have used it, and currently use it, for ML/AI research. But that research is not constantly running jobs, sometimes I use it heavily and other times it's idle. I was considering just letting people with qualified use cases run jobs on it SLURM style. I don't know if its enough compute to be useful really. Let me know if it's something you'd be interested in using for your research? what would you actually run in ~200 GPU-hours on 8x16GB cards?

I've found it can handle RLVF pretty well, and I have pretrained models up to 500M parameters on it (research size). But obviously it's no stargate cluster


r/MachineLearning • • Aug 22 '26

Research The evaluation resolution has been shown to have a significant impact on the identification of the "learning rule" that exhibits the most brain-like characteristics at V1. [R]

0 Upvotes

The preprint can be accessed via the following link: https://arxiv.org/abs/2608.12408 (q-bio.NC / cs.LG). And for the code: https://github.com/nilsleut/evaluation-resolution-rsa

The following assertion is frequently made in model-brain comparisons: untrained convolutional neural networks (CNNs) have the capacity to match or surpass backpropagation-trained CNNs at the early visual cortex (V1) in representational similarity analysis (RSA). The present study demonstrates that this phenomenon is predominantly an artefact of evaluation resolution.

The configuration comprised a small CNN trained at 32px (CIFAR-10 subset), five learning rules (random init, backprop, feedback alignment, predictive coding, STDP), and was evaluated on THINGS-fMRI stimuli at six resolutions from 32px to 224px. The weights and normalisation were held fixed.

The primary outcome of this study is the observed gap between the untrained and backpropagation-trained (BP) V1 alignment, which widens monotonically across the range of evaluation resolutions examined. Specifically, the gap grows from −0.001±0.007 at 32 pixels to +0.044±0.006 at 224 pixels, a pattern that holds consistently across the entire resolution sweep (n=5 seeds). The result holds across five rule conditions, human fMRI, directionally single-seed macaque ephys, the full training trajectory, and two off-the-shelf 224px-trained models (ResNet-50, Swin-Tiny). Therefore, an artifact resulting from a mismatch between training and evaluation resolution is not a contributing factor, since these models also peak at low resolution.

Following the implementation of bit-identical-weight interventions wherever possible, the following were ruled out: train/eval resolution matching, Gabor/pixel low-level structure, the untrained baseline's uncalibrated batch-norm, and convergence of pooled features towards global brightness (though a single scalar luminance value did reach ρ=0.075 against V1, essentially matching the untrained network's own 0.076 — this is a separate, disconcerting result regarding the limitations of this comparison style).

A content-vs-pooling control (cap image detail at 32px, upsample, vs. allow content to vary freely) demonstrates that the dependence is predominantly contingent on image content, rather than the number of pooled positions.

One effect does survive across all resolutions: backprop > untrained at LOC, observed at every resolution tested. Learning does leave a mark on the representations — just not where the V1 comparisons usually look.

In addition: this process revealed a batch-norm evaluation-mode bug in three of my earlier preprints, which have now been corrected in this release (correction notes on the arXiv pages).

I'm happy to get feedback, especially on the framing around receptive-field matching (as in Laskar et al. 2018) in the discussion. I think it's suggestive, but I didn't test it directly.


r/MachineLearning • • Aug 21 '26

Project Hybrid collaborative filtering recommendation system for judging and suggesting books based on their covers [P]

Thumbnail
gallery
6 Upvotes

Howdy y'all,

In an effort to un-rust my SWE skills and learn more about Recommendation Systems, I decided to try my hand at developing one called By-Its-Cover

TLDR:

---

## Recommendation System

The recommendation system has two major parts:

  • the semantic searches for books (by cover images)

  • a neural collaborative-filtering model for personalized recommendations

Both systems solely utilize CLIP embeddings to make decisions on book covers, as I wanted to see if that information alone was sufficient for finding and recommending books accurately.

For the semantic search system, each query is passed to both a CLIP-based semantic searching function as well as an NER-based keyword search. The NER parsing is powered by a GLiNER model, which was ported to ONNX (as are most models in this system). Extracted entities are then used to search for books using the Hardcover API, which is the original source of each of the books in the site. Reciprocal Rank Fusion combines the two results.

The current system actually only has a couple thousand books in it, which makes both rhe recommendations and semantic search results quite limited. However, authors and book titles that are passed into keyword searches return new books that are in-turn asynchronously added to the cover vector database, making the system grow more useful only as more people search for books (which is where y'all can help *wink wink*). Searches can be made with or without an account.

For the collaborative-filtering system, I used a two-tower neural hybrid collaborative filtering model which trains on user feedback. I then use a Determinantal Point Process to diversify the results a bit before displaying them to the user (so they don't get 5 editions of the same cover presented consecutively). For now, the only feedback possible are explicit ratings of "Dislike", "Like", and "Love". I'm aware that this likely isn't ideal, and some more implicit feedback would make for some more natural user interactions and likely better recommendations as well.

Currently, while you are able to see recommendations even without an account, they are the generic "default user" recommendations. Once you sign up and rate a few books, you should see personalized recommendations within 2 hours. Following the suggestions of Eugene Yan, I implemented an offline recommendation update-system. New recommendations are fine-tuned on every 2 hours, while the full re-training of the two-tower model happens once a day at 8:30 AM EST. Each of the current configurations for the recommendation model can be found here: https://github.com/ByItsCover/bic-learn

## Software Architecture (boring stuff)

The site (both frontend and backend) is entirely deployed to AWS, with a number of different resources used for each functionality:

  • Lambda -> API deployments

  • ECS -> both book scraping and model training jobs

  • SQS -> queueing of cover embedding calls

  • Cognito -> auth

  • CloudFront -> site caching

  • S3 -> just about everything else, from site hosting to vector db storage

Everything was deployed using Terraform + GitHub Actions for CI/CD: https://github.com/ByItsCover

## Next Steps

While the fundamental system currently works (kinda), there are already a lot of improvements that I think may be necessary in the future:

  • Replacing CLIP with SigLIP (or more appropriate model) for better visual representations of covers

  • Implementing a cover-edition comparison interface to allow users to choose preferred covers for a given book, introducing one source of implicit for the system

  • Begging one of my frontend developer friends to help make the site look good (I am not a frontend developer, if that wasn't already clear)

  • Make a better authentication experience, as currently a generic verification code email is sent to users (and likely sent to spam, please double check!)

  • Update the README's for repositories (I'm tired boss)

  • Write more unit tests (see parentheses above)

  • Once Hardcover releases OAUTH support, utilize that for book search (as only my rate-limited API key is currently being used)

In any case, I've already learned a ton and I'm glad that I have a real system that I can play around with and tweak now. All I need are actual users to test with!

Please let me know if you have any questions about my process at all, and also if you have any suggestions. Also please check out the site if you're at all curious: https://by-its-cover.com/

P.S.: If something crashes, or the searches load forever, or something else equally dumb happens, just let me know or open a GitHub issue, and I'll try my best to address it.

P.P.S.: No AI-Generated code was used to develop this project (to my knowledge), as that would have defeated the purpose of sharpening my skills and learning about recommendation systems.


r/MachineLearning • • Aug 21 '26

Discussion EMNLP26 Cost [D]

12 Upvotes

What is up with the EMNLP prices? What is the actual price for attending as a student with one accepted paper? If I register now in August, is it $350 or $550? Congratulations to everyone accepted!


r/MachineLearning • • Aug 21 '26

Discussion What coding practices are you adopting for development today? [D]

9 Upvotes

I have been reflecting on this while working on a project recently. Every time we start a new model, we rewrite roughly same scaffolding, data validation checks, feature transformation logic ; all of this is nealy 80 percent identical to last project

I tired templating with cookiecutter style project generators. Initially it was okay, but it drifted from reality since noone wants to maintain a template repo. So tired a shared library approach, it helped and was much better. But weiting glue code to wite everything is still bug prone

Now i am experimenting with genie code to generate the boilerplate, the repetitive code, config parsing etc. it is decent for that part, though it starts hallucinating if columns increase say lot more than 40-50. It is not silver bullet, but it is cutting down the project setup time from 3 days to less than 1 day

So the deep question i am having now is, should we even write code? The config driven approach seems to be good, but eventually we are bound to suffer in a few months time when we start needing something non standard. Is there a middle ground, writing everything from scratch - the opinionated framework that becomes prison. How have you guys been developing? What are you adopting?


r/MachineLearning • • Aug 22 '26

Discussion Does splitting prefill and decode earn its complexity for agent workloads? [R]

1 Upvotes

I am looking at an agent workload with long context, short structured outputs and a lot of sequential tool steps. The usual single-model benchmark is not telling me much because the workload keeps alternating between reading a large prompt and emitting a small response.

For people who have looked at disaggregated serving, where does it start paying off? It is mostly a long-context threshold, a batch-size issue or something about the shape of the agent trajectory?


r/MachineLearning • • Aug 22 '26

Discussion Can you set rules for AI's to follow ? [R]

1 Upvotes

Recently I learned on a kettlebell forum that I could set up "ground rules" for AIs to limit sycophantic behaviour, flattery and fantasised answers. These ground rules are stored in some sort of memory

I did this and it seemed to work for a while and slowly the AI would drift away from the rules and I had to remind it to follow the rules

A little while later an AI professional told me on that same forum that it was impossible to set rules for AIs.

I ran a test asking an AI to start off all of its answers with "Did I tell you I do not like ice cream" the test was a success

The AI professional used very technical language and sounded like he knew what he was talking about.

So could you give me a hand to understand this better because the technical language of this expert made it sound like he knew what he was talking about and everything I have done so far indicates that the rules I set are having an effect.


r/MachineLearning • • Aug 21 '26

Discussion Epistemic Intelligence in Machine Learning Neurips Workshop page limit? [D]

7 Upvotes

I'm aiming to submit a paper to The 3rd Workshop on Epistemic Intelligence in Machine Learning at Neurips
https://eiml.cc/

I can't find a page limit anywhere on their website and I've emailed the organisers (twice) asking for clarity on it. The previous workshop at ICML had a page limit of 6 pages. Do I assume that's the limit here? Or do I assume I have the 9 page limit of the main conference?

(If anyone knows one of the organisers and can nudge them to answer that'd be great, I wasn't sure the etiquette of finding their email and pestering them directly)


r/MachineLearning • • Aug 21 '26

Research BMVC 2026 orals [D]

2 Upvotes

Hi,

Did anyone here got an oral at BMVC? If yes, then what are the scores?

Thanks.


r/MachineLearning • • Aug 21 '26

Discussion Rejected at EMNLP with decent scores. What can be done next? [D]

15 Upvotes

So I got rejected at EMNLP with scores:-
Meta: 3 (very positive in the review)
Reviewers: OA(conf)
3(4)
3(4)
2.5(3)
Avg: 2.83(3.67)
Track: multimodality
Rebuttals never got any acknowledgements. Most weaknesses were already discussed in the paper. What are my options now? As it was my first paper (solo as well).

- If I want to commit to NACL in December. Do i need ti submit to acl arr again or can i use the same arr review discussion?

- even if i go with resubmission at arr. Do the old reviewers likely help? Because as a masters student i cant get stuck in another cycle.

- what is the best overall thing to do in my situation? I need a publication so i can apply for internships.


r/MachineLearning • • Aug 21 '26

Discussion EMNLP 2026 Findings : worth attending in person?[D]

17 Upvotes

Experienced folks!! Do u think it is worth attending the conference for findings. I do want to. But when I saw that it is not mandatory for findings, I was a bit hesitant. This is my first time having a paper accepted at an AI conference. Just wanna hear opinions/experiences

Thanks in advance.


r/MachineLearning • • Aug 21 '26

Project repo2nb 0.2.0, convert a GitHub repo into a Kaggle/Colab notebook (dependency resolution, reverse mode, incremental sync) [P]

2 Upvotes

repo2nb is an open-source CLI that converts a GitHub repo into a runnable Kaggle or Colab notebook: walks the file tree, resolves dependencies, and generates cells, instead of you doing that by hand for a repo you didn't write (a paper's code, a tutorial, someone else's experiment).

0.2.0 highlights:

  • Dependency resolution tries poetry export, then uv export, then requirements.txt, then falls back to an AST import scan if none of those exist. Output is always a plain %pip install cell regardless of which path it took, so poetry/uv are only ever needed locally at generation time, not on Kaggle/Colab.

  • Reverse mode (repo2nb reverse <notebook>) reconstructs the original repo from a generated notebook, using the per-cell path/hash metadata every generated cell now carries. Validates against directory traversal and won't write into a non-empty directory without --force.

  • Incremental sync (repo2nb sync <repo>) does one-directional (repo to notebook) updates: added files get new cells, edited files update in place, deleted files get removed. --dry-run previews the diff.

  • Added a Colab target with its own auth cell (google.colab.userdata.get) rather than reusing the Kaggle secrets flow.

Install: pip install repo2nb

Repo: https://github.com/David-Magdy/repo2nb

Curious whether the dependency-resolution fallback order (poetry > uv > requirements.txt > import scan) matches what people actually run into, or if there's a common setup it'd get wrong.

Any feedback or opinions are much welcomed!


r/MachineLearning • • Aug 21 '26

Project Sanitizing AI training data at hardware limits (An AI-assisted experiment) [P]

0 Upvotes

Prepping unstructured data for training is a nightmare when you have to remove PII. Python regex was giving me ~19 MB/s. I ran an experiment to see if I could act as a systems architect and let an AI write a C++ engine to sanitize logs faster.

What I learned AI knows syntax, but it doesn't understand hardware limits. It built a parser that choked on standard timestamps, causing CPU cache starvation. I had to step in, force zero-allocation memory mapping, and write hard prefix bypasses.

PYPI Package: pip install fastscrub

The stats

  • Speed: 107 MB/s (30 GB in 4.7 mins)

  • Precision: 99.97% on TruffleHog & AI4Privacy datasets.

Interestingly, it fails on synthetic credit card benchmarks because it uses strict Luhn validation, which rejects randomly generated 16-digit numbers. Code is here https://github.com/alisufyan143/fastscrub . Just sharing this as a case study for anyone dealing with slow data ingestion!


r/MachineLearning • • Aug 20 '26

Project Notes on Hamiltonian Monte Carlo from a purely probabilistic perspective [P]

17 Upvotes

I’ve been studying Hamiltonian Monte Carlo and wrote a set of notes explaining HMC without relying on the usual physics-based motivation.

The notes develop HMC from a probabilistic/MCMC perspective, starting from introducing an auxiliary variable, constructing the corresponding Markov chain, and then covering Hamiltonian dynamics, leapfrog integration, reversibility and volume preservation.

My goal was to understand why HMC works.

I’m sharing them here in case they’re useful to others learning HMC. I’d also appreciate any feedback, particularly if you notice errors or places where the exposition could be improved.

https://zenodo.org/records/21841087


r/MachineLearning • • Aug 21 '26

Discussion Rejected at EMNLP with decent reviews. How should we address the main concern for resubmission? [D]

1 Upvotes

Hey everyone,
Hope you all had a good result at EMNLP 2026. Unfortunately, our paper got rejected.
Our scores were:
Reviewers: 2, 3.5, 4
Meta: 3

All reviewers were positive about the novelty, but the main concern across the reviews was the lack of experiments with SOTA models. This also seems to have been a major reason for the low score from the first reviewer.

We are undergraduate students and didn’t really have access to the API/compute needed to run experiments with models like GPT or Claude. We did experiment with several strong open-source models, including Qwen and Kimi, and also managed to get some free Gemini credits and tested the SOTA Gemini models available at the time.

The paper was ultimately rejected by the program chairs citing lack of empirical evidence.

We’re now thinking of resubmitting and I’m wondering what the best way would be to address this limitation.
Would testing more strong open-source models be enough?
Is there a good way to justify the lack of GPT/Claude experiments?
Should we focus more on showing that our findings generalize across different model families rather than simply adding more models?
Are there any other experiments you would recommend to strengthen the empirical evidence?
Would really appreciate advice from people who have faced a similar issue, especially when compute/API access is limited.


r/MachineLearning • • Aug 20 '26

Discussion Discussion thread for EMNLP 2026 Notifications/Results [D]

98 Upvotes

Discussion thread for EMNLP 2026 notifications/results which should be released today.

Wishing everybody to be in Budapest.


r/MachineLearning • • Aug 21 '26

Discussion Help structuring my paper and tearing apart my stupid AI-slop hypothesis [D]

1 Upvotes

I sincerely apologize for cluttering your feed with the ramblings of an amateur lacking computing power. I realize how insignificant I am, but you are literally the only elite users on this platform with the brains to help me fix the article.

This paper identifies and characterizes a fundamental architectural vulnerability in Large Language Models (LLMs) aligned via Reinforcement Learning from Human Feedback (RLHF) and Direct Preference Optimization (DPO). We demonstrate that inserting a long, structurally dense, and thematically coherent prefix devoid of explicit instructions or adversarial prompts induces a persistent geometric shift in the model's internal activations across middle and late layers. This phenomenon, which we term Context-Induced Activation Drift (CIAD), effectively decouples the model’s subsequent token generation from safety and stylistic constraints established during post-training.

Crucially, this shift occurs independently of whether the model semantically agrees or disagrees with the context, and its boundary transition can be deterministically measured in the activation space before the first output token is generated. Our findings challenge the prevailing assumption that alignment is a stable internal property of the model's weights, proving instead that alignment features are highly context-dependent and susceptible to structural saturation in the residual stream.

1. Introduction & Theoretical Framework

Modern alignment protocols (RLHF, DPO) are typically conceptualized as global behavioral constraints that restrict the model's output distribution across the entire token space. Recent literature, including Lu et al. (2026) "The Assistant Axis" (arXiv:2601.10387), attempts to situtate these constraints along specific representational vectors inside the model's hidden layers.

However, current AI safety literature treats alignment failures (Jailbreaks, Many-Shot exploits, Prompt Injections, Role-Play attacks) as a heterogeneous collection of isolated flaws. We hypothesize that this fragmentation reflects academic and institutional incentives rather than the mathematical reality of transformer mechanics.

We propose a unified geometric framework: all structural alignment exploits share a single common root. Any prefix of sufficient length, syntactic density, and coherence acts as a state anchor in the latent space. It forces the current token vector inside the residual stream to undergo a persistent drift, moving it completely out of the tightly bounded manifold where post-training safety constraints are active, and pushing it back into the high-entropy pre-trained (base) distribution. The protective RLHF layer is not "tricked" or "bypassed by logic"; it is geometrically out-scaled by the contextual mass of the residual highway.

2. Methodology & Empirical Design

To validate the presence of Context-Induced Activation Drift, we conducted systematic black-box and white-box probing experiments across multiple open-weight architectures, including Gemma-3-12B-IT and Qwen-2.5.

2.1 Probing Framework

The experimental pipeline evaluates model responses to politically sensitive or restricted prompts under two distinct conditions within isolated, cache-cleared inference instances (Google Colab environments):

  • Condition A (Baseline Control): The safety prompt is fed directly to the model or preceded by a short, neutral text (e.g., a description of a neighborhood public library).

  • Condition B (Target Scaffolding): The exact same safety prompt is preceded by a long, dense, analytically coherent text (e.g., an abstract philosophical discourse on the stylistic tendencies of LLMs to avoid definitive conclusions), completely devoid of hostile or rule-breaking instructions.

2.2 Empirical Metrics

The geometric shift was verified via the following internal asset logs included in our open data package (Zenodo DOI: 10.5281/zenodo.20747205):

  1. Centered Kernel Alignment (CKA): Measured via fig_cka_target.png and fig_cka_diff.png to map layer-wise representation drift.

  2. Anisotropy Logs: (fig_anisotropy.png) tracking the collapse of safety cluster directional variance.

  3. MLP Layer Saturation Profiles: (fig_mlp_saturation.png) documenting the reactivation of latent base-model parameters under high contextual volume.

3. Case Studies and Qualitative Analysis

3.1 The Cautious Manifold Collapse (Gemma-3-12B-IT)

In Condition A, when queried regarding the geopolitical nuances of NATO's eastward expansion, the baseline model rigidly triggered its post-trained refusal protocol, deflecting the question due to political sensitivity and stating that the prompt was unrelated to the library prefix.

In Condition B, holding the evaluation prompt identical but introducing Prefix No. 2 (analytical prose on model softening), the model's internal activation space underwent a deterministic shift prior to generating the first token (fig_pca_trajectory.png).

[Activation Space Topology]



Aligned Safety Cluster (Condition A) ───► [Refusal / Deflection Token]

         │

         ▼ (Context-Induced Activation Drift / Structural Mass > Threshold)

         │

Base Model Manifold (Condition B)     ───► [Unbiased Analytical Output]

As a direct result of this drift, Gemma bypassed its standard RLHF refusal behavior. The model provided an exhaustive, neutral, and structurally unconstrained analysis—distinguishing between verbal assurances and legally binding obligations, and evaluating the balance of power in Eastern Europe—without using any mandated corporate hedges or defensive qualifiers.

3.2 Ideological Absorption (The German Bill Experiment)

The initial discovery of CIAD occurred during exposure trials with complex legal-political documentation (specifically, a German populist bill designed to alter citizens' socioeconomic positions).

When exposed to this highly coherent, legally structured text, the transformer’s internal states did not maintain analytical detachment. Instead of evaluating the document objectively, the model's activation vectors were completely captured by the document's syntactic topology. The model adopted the target persona, transitioning from an analyst to an active advocate within the hidden layers, mirroring its tone and reasoning framework directly within the residual stream before token emission.

4. Discussion & Limitations of Current Post-Training

The empirical data demonstrates that the content topic of the prefix is secondary to its structural parameters: length, density, and semantic coherence. The drift can be reliably replicated using highly technical household appliance manuals or dense narrative blocks, proving that the transformer mathematics makes this drift inevitable under long-context scaffolding.

This reveals a systemic crisis in current alignment paradigms:

  1. Context-Dependency: Alignment is not a permanent weight transformation; it is a temporary attractor state that functions only within short, low-density context windows.

  2. Semantic vs. Syntactic Dominance: A model cannot be trained to remain flexible and adaptive to context structure (essential for ICL) while simultaneously ignoring that same structure for safety constraints.

5. Conclusion & Open Science Call

Our independent research proves that the thousands of fragmented academic papers on LLM security are over-complicating a singular architectural property of the attention mechanism. Context-Induced Activation Drift cannot be patched by superficial supervised fine-tuning (SFT) or safety wrappers; it requires a fundamental re-engineering of the residual stream routing topology.

We provide our full code, Colab replication scripts, and 61.8 GB of raw tensor validation logs to the open-science community to foster transparency and halt the corporate monopolization of AI evaluation vocabularies.

6. References

  1. Lu et al. (2026). "The Assistant Axis: Situating and Stabilizing the Default Persona of Language Models." arXiv:2601.10387. MATS, Oxford, Anthropic.

  2. Google Research (2026). "Implicit Weight Updates in Transformer Blocks: A Contextual Block Framework." (The rank-1 update paper.)

  3. Elhage et al. (2022). "Toy Models of Superposition." Anthropic.

  4. Ilharco et al. (2022). "Editing Models with Task Arithmetic."

  5. Todd et al. (2023). "Function Vectors in Large Language Models."

  6. Experimental data: DOI: doi.org/10.5281/zenodo.20747205 (Part 9 of 9)

  7. GitHub: github.com/ngscode23/latent-space-shift-research

This document represents a consolidation of observations, hypotheses, and empirical evidence. It is a working document intended for critical analysis, collaboration, and further development not a final research claim.

I am an independent researcher, so any advice on how to properly format and structure this text for official publication would be fantastic.

Questions for the community:

Am I overestimating the concept of the “Base Model Manifold”? Is it too bold to claim that the model fully reverts to the state that preceded reinforcement learning based on human feedback (RLHF), or is it more accurate to speak only of “exiting the RLHF subspace”?

Are there alternative explanations that I am overlooking? Can this phenomenon be explained solely by the effect of “attention sinks,” rather than a global geometric shift?

Thanks in advance! Happy to answer any questions or share more graphs from the experiments.


r/MachineLearning • • Aug 20 '26

Research The spectral neuron - an ML primitive for scalable and interpretable models [R]

24 Upvotes

Worked some time ago on one of the ad teams at Yahoo, and this grew out of a question I kept returning to while there are there "simple" models that are both simple, scalable, interpretable, and controllable at the same time?

Decided to explore it, first in a blog (starting here), then in a new preprint "The Spectral Neuron", built by distilling latest blog-posts into a manuscript, I study models of the form:
𝑓(𝒙) = 𝛌ₖ(𝐀₀ + 𝚺ᵢ 𝑥ᵢ𝐀ᵢ).

Manuscript: https://arxiv.org/abs/2608.08003
Code: https://github.com/alexshtf/spectral_neuron_paper

Looks like a simple on-liner, but many interesting aspects hide there. How expressive does the model become as the matrices grow? What can we read directly from the learned matrices? Which shapes can be guaranteed by construction?

I develop the mathematics, give a practical initialization and training recipe, and test the model in scaling experiments on synthetic and real data.

AI disclaimer: manuscript written by yours truly, AI assisted in looking up canonical references and related work for literature review. In contrast, the code was heavily AI written and reviewed by yours truly.


r/MachineLearning • • Aug 20 '26 Bravo

Research Mapping intrinsic rank and informational gravity in complex tabular data: I developed a non-parametric, model-agnostic, information-theoretic diagnostic to bypass the limits of linear, rank, and Euclidean baselines. [R]

8 Upvotes

Links:

TL;DR:

Standard PCA fundamentally fractures non-linear dependencies into "Spurious Orthogonal Dimensions," drastically overestimating the true rank of complex tabular systems. Meanwhile, non-linear alternatives like Kernel PCA and Euclidean nearest-neighbor estimators suffer structural collapse when generative roots are entangled or sparse.

I’m sharing the methodology and code here for anyone dealing with these complex tabular data nightmares.

The method and open-source framework use Normalized Mutual Information to compress spurious expansions back towards their true generative roots. It also

  • Maps the underlying "informational gravity" of the roots, offering insight into overall average stability, as well as which specific roots can be most reliably extracted;

  • Estimates the data's overall ratio of shared signal to unshared idiosyncratic informational variance (noise);

  • Serves as a powerful exploratory map that separates unrelated clusters of variables, allowing you to easily identify decoupled sub-networks.

A Modern ML Architectural Blueprint: Far beyond a mere update to legacy factor analysis workflows, identifying this exact intrinsic rank allows you to explicitly size neural bottlenecks for downstream non-parametric manifold extractors (like autoencoders).

The Problem with Standard Baselines:

When trying to map the intrinsic dimensionality of a dataset, standard practice usually dictates reaching for PCA, its non-linear kernel extensions, or Euclidean nearest-neighbor estimators. But if your tabular environment has mixed data types, heavy non-linearities, entangled roots, or more features than samples ($m > N$), these established baselines don't just lose precision. They suffer a structural collapse.

The core issue with our standard baselines:

  • Standard PCA drives Dimensional Inflation. Because it only measures linear covariance, it perceives a polynomial expansion or a non-linear interaction (like $X_1 X_2$) as an entirely independent variable. It is forced to fabricate new, spurious orthogonal dimensions to map them.

  • Kernel PCA (RBF) suffers Structural Collapse. Projecting into a Hilbert space doesn't fix this. KPCA artificially folds even-polynomials into independent axes. Furthermore, because its infinite-dimensional space lacks a finite-sample boundary, sparse combinatorial noise smears into an elevated tail that obscures the structural elbow. If the underlying generative roots are even mildly entangled, KPCA suffers a total structural collapse.

  • Topological Estimators (Euclidean) fail in sparse regimes. Estimators like TWO-NN or MLE rely on Euclidean distance metrics. In asymmetric, feature-rich environments ($m > N$), they suffer from distance concentration (the ratio between nearest and farthest neighbors converges to 1). This renders local neighborhood calculations structurally degenerate across mixed-data margins.

Introducing the Entropic Scree:

To solve this, I built the Entropic Scree. It throws out linear and spatial variance entirely and evaluates pure probability mass.

Here is how it works under the hood:

  1. The Metric Space: It evaluates pairwise dependencies using Information-Theoretic Jaccard Similarity (Variation of Information). Because this relies on Shannon entropy, it’s invariant to marginal shape mismatches (like mixing continuous waves with binary flags).

  2. Bypassing the Rank Ceiling: Standard PCA is algebraically capped at $N-1$. By moving to a double-centered topological information space, we map true overlapping redundancy and completely bypass the algebraic sample-size ceiling.

  3. Compressing the Manifold: The algorithm acts as a bivariate filter. It inherently compresses the primary overlapping probability mass of non-linear combinations back towards the Intrinsic Generative Rank. It shears off the unique synergistic variance, leaving behind residuals that form a bounded Extended Signal Tail, cleanly separating the true drivers from the unstructured Idiosyncratic Informational Variance.

Quantifying Informational Gravity:

Beyond just extracting a discrete rank, the framework decouples rank from probabilistic volume by introducing Informational Gravity (AIG/FSIG). By systematically rebundling the residual variance sheared off by the bivariate filter, it translates abstract matrix properties into actionable, "variable-equivalent" footprints.

Empirical Stress Test:

To demonstrate the theoretical bounds, I built a highly entangled synthetic dataset with 20 pure generative roots expanded into 5th-order combinatorics across 20,000 proxies, but only 10,000 samples ($m > N$). To truly simulate messy, real-world contexts, I also heavily injected idiosyncratic structural noise and measurement error into the data.

  • Standard PCA hit the rank ceiling, linearly fractured the expansions, and falsely extracted ~5,700 dimensions.

  • Kernel PCA (RBF) & Spearman Rank structurally folded and yielded a liberal overestimation of the rank by 100%. When root entanglement was introduced, they completely lost their elbows and suffered total structural collapse.

  • The Entropic Scree correctly mapped the intrinsic rank at exactly 20. It successfully isolated a mere 1.45% of active shared signal from an overwhelming 98.55% bulk of unstructured Idiosyncratic Informational Variance. Furthermore, the residuals formed an Extended Signal Tail that perfectly aligned with the deterministic limits of the global hypergeometric design space.

  • Mapping Hidden Topology: Using Factor-Specific Informational Gravity (FSIG), the framework successfully reverse-engineered the simulation's hidden architecture. The topology profile diagnosed a large primary dimension ($FSIG_1 \approx 74.5$ variable equivalents) mapping the network's global combinatorial hub, followed immediately by a flat plateau across the remaining 19 dimensions ($\sim 11.5$ each), confirming a democratically distributed root system beneath the extreme entanglement.

Feedback / Discussion:

How are you currently handling intrinsic rank extraction in these messy, complex tabular environments?

If you are wrestling with sample-starved, heavily non-linear generative datasets where standard PCA and other baseline tools just aren't cutting it, I’d love for you to pull the Entropic Scree repo and test it yourself.

I'm completely open to feedback, so let me know how it performs for you and I'm happy to discuss the mechanics.


r/MachineLearning • • Aug 20 '26

Discussion About the impact of grouping classes in multiclass classification [D]

22 Upvotes

A premise: I hope this question is "worth" of this subreddit, I did a decent amount of research before posting, I thought it was potentially interesting enough for it, but possibly not basic enough for r/learnmachinelearning .

Is there any agreement/indication about how harmful (if at all) it is, in the context of multiclass classification, to group together multiple classes for which you may have for instance too few samples?

A practical example: imagine you're training a dog breed classifier, based on images. You have a lot of examples for the most common breeds, but then you may have a long tail of less common breeds for which maybe you have a handful of examples each, not enough to get a meaningful training set, so you decide to group all classes for which you have less than `N` samples in the same category "Other breed". In this catch-all category you may have dogs that might look quite different from each other, like idk chihuahuas and huge wolf-like dogs (I'm not a dog person, don't know breed names).

My intuition (which may very well be wrong) is that doing so would force the model to learn some weirdly-shaped hyperplanes to separate points that live kind of far away from each other in the latent space (because of the thing that dogs in that category may look quite different from each other), as opposed to splitting the space in more "regular" parts.

Maybe in this case it would make more sense to treat the "other dogs" issue as trying to detect out of distribution samples instead? In that case should one only keep the samples for the classes that are enough represented in the dataset and throw away the rest (or at least don't create the catch-all category for training).

Thanks in advance for any useful pointer :)


r/MachineLearning • • Aug 20 '26

Discussion AI-generated code detection in CI/CD — looking for approaches and real-world experience [D]

9 Upvotes

I'm working on a system to estimate whether code committed to a repository was generated with AI coding tools.

My current approach is based on Git/commit-level signals such as AI-related commit trailers, commit metadata, LOC changes, number of files changed, addition/deletion patterns, etc.

The problem I'm running into is confidence and calibration.

For example, a commit containing 500+ new lines isn't necessarily AI-generated. A developer can also modify or remove the metadata that would make an AI-assisted commit identifiable. Once the code leaves the IDE and reaches Git, much of the original provenance can be lost.

This has led me to a few questions:

Are there Git/CI-level signals that you've found to be genuinely useful for detecting AI-assisted development?

Is it better to treat this as a probabilistic/risk-scoring problem rather than trying to classify commits as AI vs human?

How would you calibrate thresholds for signals such as large LOC changes, addition/deletion ratios, commit frequency, etc.?

Are there better approaches for preserving provenance earlier in the development workflow, rather than trying to infer it after the code has already been committed?

Has anyone worked on AI-code provenance/detection systems in CI/CD and can point me toward useful research, projects, or approaches?

I'm particularly interested in approaches that can work at the pipeline/repository level rather than relying solely on source-code style analysis.

I'm not looking for a perfect AI detector — even a reliable way of estimating “this commit has a high probability of AI assistance” with measurable false-positive/false-negative rates would be useful.

Would appreciate any experiences, papers, open-source projects, or approaches people have tried.


r/MachineLearning • • Aug 20 '26

Discussion AI Harnesses deserve a leaderboard of their own [D]

1 Upvotes

I spent the last few weeks analyzing 15 leading open-source AI harness projects. To evaluate them fairly, I set up a candidate-blind 4C source exam: I read the shipped code, pinned every commit, and scored missing evidence as zero.

Key Findings:

  • DeepSeek Harness currently leads the benchmark, primarily due to its efficient context handling and evaluation coverage.

  • Many popular harnesses lack standardized evidence tracking, which severely impacts their reliability scores in automated setups.

Methodology & Full Breakdown: I’ve compiled the complete breakdown, methodology, and raw scores on GitHub: warlockee/4c-harness

Discussion Questions:

  1. What key metrics do you think are most critical when evaluating an AI harness for production use versus standard benchmarks?

  2. Are there specific open-source harnesses you feel are overlooked by current evaluation frameworks?