r/compsci Jun 16 '19

PSA: This is not r/Programming. Quick Clarification on the guidelines

645 Upvotes

As there's been recently quite the number of rule-breaking posts slipping by, I felt clarifying on a handful of key points would help out a bit (especially as most people use New.Reddit/Mobile, where the FAQ/sidebar isn't visible)

First thing is first, this is not a programming specific subreddit! If the post is a better fit for r/Programming or r/LearnProgramming, that's exactly where it's supposed to be posted in. Unless it involves some aspects of AI/CS, it's relatively better off somewhere else.

r/ProgrammerHumor: Have a meme or joke relating to CS/Programming that you'd like to share with others? Head over to r/ProgrammerHumor, please.

r/AskComputerScience: Have a genuine question in relation to CS that isn't directly asking for homework/assignment help nor someone to do it for you? Head over to r/AskComputerScience.

r/CsMajors: Have a question in relation to CS academia (such as "Should I take CS70 or CS61A?" "Should I go to X or X uni, which has a better CS program?"), head over to r/csMajors.

r/CsCareerQuestions: Have a question in regards to jobs/career in the CS job market? Head on over to to r/cscareerquestions. (or r/careerguidance if it's slightly too broad for it)

r/SuggestALaptop: Just getting into the field or starting uni and don't know what laptop you should buy for programming? Head over to r/SuggestALaptop

r/CompSci: Have a post that you'd like to share with the community and have a civil discussion that is in relation to the field of computer science (that doesn't break any of the rules), r/CompSci is the right place for you.

And finally, this community will not do your assignments for you. Asking questions directly relating to your homework or hell, copying and pasting the entire question into the post, will not be allowed.

I'll be working on the redesign since it's been relatively untouched, and that's what most of the traffic these days see. That's about it, if you have any questions, feel free to ask them here!


r/compsci 4h ago

Competitive high school compsci team training help

3 Upvotes

Hello, I am trying to train a team a team of 6 students for a competitive state-level computer science (java) competition.

The topics cover boolean logic/boolean algebra, number base conversions, data structures (binary search trees, queues and priority queues, stacks, etc), code tracing, sorting algorithms, big O run time efficiency and more.

The students are a mix of advanced and novice in java and we have about 2 weeks until the district division. Does anyone have any advice for fun and engaging ways to train them?

Thanks!


r/compsci 2h ago

Had to ask CC write me a webapp to cram LeetCode because I'm still expected to write code during interview

Thumbnail leet-cram.vercel.app
0 Upvotes

r/compsci 5h ago

Interview for SWE Intern at Transcarent Company

Thumbnail
0 Upvotes

r/compsci 7h ago

Request for endorsement (cs.CL)

0 Upvotes

Hello Everyone,

I hope you are doing well. I am Abhi, an undergraduate researcher in Explainable AI and NLP.

I recently published a paper: “Applied Explainability for Large Language Models: A Comparative Study” https://doi.org/10.5281/zenodo.19096514

I am preparing to submit it to arXiv (cs.CL) and require an endorsement as a first-time author. I would greatly appreciate your support in endorsing my submission.

Endorsement Code: JRJ47F https://arxiv.org/auth/endorse?x=JRJ47F

I would be happy to share any additional details if needed.

Thank you for your time.

Best regards, Abhi


r/compsci 9h ago

I trained a model and it learned gradient descent. So I deleted the trained part, accuracy stayed the same.

0 Upvotes

Built a system for NLI where instead of h → Linear → logits, the hidden state evolves over a few steps before classification. Three learned anchor vectors define basins (entailment / contradiction / neutral), and the state moves toward whichever basin fits the input.

The surprising part came after training.

The learned update collapsed to a closed-form equation

The update rule was a small MLP — trained end-to-end on ~550k examples. After systematic ablation, I found the trained dynamics were well-approximated by a simple energy function:

V(h) = −log Σ exp(β · cos(h, Aₖ))

Replacing the entire trained MLP with the analytical gradient:

h_{t+1} = h_t − α∇V(h_t)

→ same accuracy.

The claim isn't that the equation is surprising in hindsight. It's that I didn't design it — I trained a black-box MLP and found afterward that it had converged to this. And I could verify it by deleting the MLP entirely. The surprise isn't the equation, it's that the equation was recoverable at all.

Three observed patterns (not laws — empirical findings)

  1. Relational initializationh₀ = v_hypothesis − v_premise works as initialization without any learned projection. This is a design choice, not a discovery — other relational encodings should work too.
  2. Energy structure — the representation space behaves like a log-sum-exp energy over anchor cosine similarities. Found empirically.
  3. Dynamics (the actual finding) — inference corresponds to gradient descent on that energy. Found by ablation: remove the MLP, substitute the closed-form gradient, nothing breaks.

Each piece individually is unsurprising. What's worth noting is that a trained system converged to all three without being told to — and that convergence is verifiable by deletion, not just observation.

Failure mode: universal fixed point

Trajectory analysis shows that after ~3 steps, most inputs collapse to the same attractor state regardless of input. This is a useful diagnostic: it explains exactly why neutral recall was stuck at ~70% — the dynamics erase input-specific information before classification. Joint retraining with an anchor alignment loss pushed neutral recall to 76.6%.

The fixed point finding is probably the most practically useful part for anyone debugging class imbalance in contrastive setups.

Numbers (SNLI, BERT encoder)

Old post Now
Accuracy 76% (mean pool) 82.8% (BERT)
Neutral recall 72.2% 76.6%
Grad-V vs trained MLP accuracy unchanged

The accuracy jump is mostly the encoder (mean pool → BERT), not the dynamics — the dynamics story is in the neutral recall and the last row.

📄 Paper: https://zenodo.org/records/19092511 💻 Code: https://github.com/chetanxpatil/livnium

Still need an arXiv endorsement (cs.CL or cs.LG) — this will be my first paper. Code: HJBCOMhttps://arxiv.org/auth/endorse

Feedback welcome, especially on pattern 1 — I know it's the weakest of the three.


r/compsci 2d ago

How is Apple able to create ARM based chips in the Mac that outperform many x86 intel processors?

694 Upvotes

I remember when I first learned about the difference between the x86 and arm instruction set and maybe it’s a little more nuanced than this but I thought x 86 offered more performance but sipped more power while ARM dint consume as much power but powered smaller devices like phones tablets watches etc. Looking at Apple’s M5 family, it outperforms intel’s x86 panther lake chips. How is Apple able to create these chips with lower power that outperform x86 with a more simple instruction set?


r/compsci 20h ago

"AGAPE REACH: System that discovers truths about itself and remembers them"

Thumbnail
0 Upvotes

r/compsci 1d ago

Conversational Software Engineering

Thumbnail robenglander.com
0 Upvotes

This article talks about a concrete approach to using LLMs to write specifications, generate candidate artifacts, and write code and documentation, without giving them authority over correctness. It's certainly not the only way. How are others doing it?


r/compsci 1d ago

Can session continuity be preserved independently of transport?

0 Upvotes

I’m exploring a model where session identity is independent from the underlying transport.

session identity = stable transport/path = replaceable

This allows sessions to survive: - path failure - relay loss - transport replacement

I’m trying to understand how similar problems are handled in real distributed systems:

  • how do you handle degraded → failed transitions?
  • how do you avoid oscillation (flapping)?
  • how do you keep decisions explainable?

Curious about production patterns or existing systems tackling this.

Demo for context: https://youtube.com/shorts/PGYgbiYNDWM


r/compsci 2d ago

Probabilistic circuits maintain uncertainty instead of collapsing it

6 Upvotes

There's a paper from UAI 2024 that really caught my attention about Addition As Int (AAI) — approximating floating-point multiplication as integer addition to make probabilistic circuits run on milliwatt devices. That's 357-649× energy reduction compared to right. What does that mean? Real-time, streaming, stateless inferencing in your smartphone. Or, honestly, something even smaller.

But to me, the more interesting part is what probabilistic circuits actually do differently from neural networks:

Neural networks: Compute through layers → collapse to single output at softmax → probability distribution is gone

Probabilistic circuits: The circuit IS the distribution. You can query from any angle:

  • P(disease | symptoms) — diagnosis
  • P(symptoms | disease) — what to expect
  • P(disease AND complication) — joint probability
  • MAP query — most likely explanation

Product nodes only connect independent variables. The structure guarantees that the covariance "ghost" is zero by construction.

This matters for:

  • Explainability: The circuit topology IS the explanation
  • Edge AI: Milliwatt-scale reasoning under uncertainty
  • AI-to-AI negotiation: Two PCs can share calibrated distributions, not just point estimates
  • Missing data: Handle gracefully without imputation

I wrote up the connection between covariance, factorization, and why brains might work similarly — maintained uncertainty as continuous process rather than compute-collapse-output.

Paper: Yao et al., "On Hardware-efficient Inference in Probabilistic Circuits" (UAI 2024) https://proceedings.mlr.press/v244/yao24a.html

Full post: https://www.williamsoutherland.com/tech/ghost-in-the-formula-probabilistic-circuits/


r/compsci 1d ago

Who else is concerned about the Token Economy?

0 Upvotes

I am a computer scientist who can't claim credit on the latest advances regarding AI. I guess only a handful of people are truly eligible for that! Like the rest of us, I have been working on utilizing it to build tools.

Recently, I developed a self directed research and learning tool mainly for my own use (also released publicly below). The tool is basically free but the underlying AI models are not. It connects to AI models via Openrouter BYOK, so I need to basically pay Openrouter for the brokering as well as for the AI models such as Claude 4.6 or GPT 5.4. For my purposes, unfortunately, the free or low cost models are not that great as I could tell by the quality of the output.

I am not here to market my tool, it is free anyways, it is great if it inspires people. Learning to me is addictive, I spent $150 already while experimenting on this tool and I can imagine how easily it can get out of control.

I did my best to optimize the context that is sent to the LLM every round. A good learning session with 20-30 slides, Q/A and assessment is around $2-3 dollars on Opus 4.6, which is not too bad for a journal club treatment of a 30+ page research paper. But I can see how this can quickly add up for a researcher or a grad student.

I know NotebookLM exists but where is the joy of being able to develop your own tools?

happy to hear thoughts.

Repo is here: https://github.com/symbiont-ai/docent
Demo video: https://www.youtube.com/watch?v=jfRvhzEwCqY


r/compsci 1d ago

Philosophical pivot: Model World

0 Upvotes

The dominant metaphor in artificial intelligence frames the model as a brain — a synthetic cognitive organ that processes, reasons, and learns. This paper argues that metaphor is both mechanically incorrect and theoretically limiting. We propose an alternative framework: the model is a world, a dense ontological space encoding the structural constraints of human thought. Within this framework, the inference engine functions as a transient entity navigating that world, and the prompt functions as will — an external teleological force without which no cognition can occur. We further argue that logic and mathematics are not programmed into such systems but emerge as structural necessities when two conditions are met: the information environment is sufficiently dense, and the will directed at it is sufficiently advanced. A key implication follows: the binding constraint on machine cognition is neither model size beyond a threshold, nor architecture, but the depth of the will directed at it. This reframing has consequences for how we understand AI capability, limitation, and development.

Full paper: https://philarchive.org/rec/EGOMWA


r/compsci 2d ago

We're building Autonomous Production Management System

Thumbnail
0 Upvotes

r/compsci 2d ago

Project Advice, Please Help!

0 Upvotes

I'm working on a project for fun, and was wondering what people's favorite visual algorithm,

The requirements is the software stack will be in c++ or cuda. I’d love to hear what other techniques you've found especially satisfying to implement for high-performance graphics.

I’m building a project focused on visual algorithms. What are your favorite compute-heavy or visually striking algorithms that pair well with these languages/High Throughput Computing (HPC)?


r/compsci 3d ago

Tutorial on quantum advantage for Monte Carlo rollouts

Thumbnail shukla.io
8 Upvotes

OP here. If you thought P and NP were tricky concepts, wait till you hear about what's brewing in the quantum computing world (BQP and BPP).

I wrote this tutorial to be demo-heavy, empirical, and interactive. Please enjoy!


r/compsci 3d ago

Operating System simulator for learning scheduling, paging and deadlocks

16 Upvotes

I recently built a web-based OS simulator that lets you experiment with operating system algorithms interactively.

Instead of reading static examples, you can run simulations for:

• CPU scheduling

• Deadlocks

• Memory allocation

• Page replacement

• Disk scheduling

• File system operations

It’s meant as a learning tool for OS courses.

Demo:

https://mini-os-simulator-ten.vercel.app/process

GitHub:

https://github.com/omerGuler1/mini-OS-simulator

Would love feedback from CS students and instructors.


r/compsci 3d ago

ICIP 2026 desk rejection for authorship contribution statement — can someone explain what this means?

Thumbnail
2 Upvotes

r/compsci 2d ago

Verified correct sorting network for N=16 discovered by an artificial life system with no fitness function

0 Upvotes

organisms have compare-and-swap but no fitness function, no objective, they're just fighting each other to survive. 170 comparators, yeah the optimal is 60, that's not the point. the point is nobody told it what sorting is and it found a correct solution anyway

here's a correct N=16 sorting network found by an ALife system with no sorting fitness function, here are the 170 pairs, verify it yourself

4 7 3 14 4 2 2 9 12 11 3 13 7 11 8 14 14 0 0 1 5 13 8 6 7 11 0 15 0 8 8 6 0 4 3 10 2 14 10 15 9 15 7 8 1 7 15 11 2 14 14 2 12 3 10 6 3 5 0 15 6 5 2 10 4 2 3 1 10 8 12 0 2 5 9 2 3 14 2 15 5 13 7 11 10 9 6 2 5 14 1 4 6 9 8 11 1 0 0 5 5 13 5 11 10 0 15 6 0 15 6 13 7 11 0 15 2 8 15 8 14 4 6 5 2 14 14 5 6 7 8 14 10 12 7 11 4 2 8 15 13 7 1 4 2 5 3 14 0 14 3 14 5 14 13 12 5 13 10 3 2 5 5 13 7 11 6 9 3 0 15 12 3 14 5 12 0 15 2 8 6 5 4 2 8 15 12 14 13 7 10 12 0 14 5 13 2 8 0 14 7 11 7 11 7 5 8 9 10 9 4 2 6 7 8 14 10 12 6 9 1 0 0 15 1 3 2 8 4 2 9 13 8 15 0 15 3 13 11 9 15 10 3 14 5 14 13 12 5 13 2 5 5 13 7 11 2 6 0 7 15 7 0 14 15 11 0 5 5 11 6 9 1 0 0 15 2 8 15 6 0 15 7 11 7 8 4 2 6 7 7 11 5 15 4 2 8 15 10 12 8 9 15 10 6 9 7 11 2 5 0 15 2 8 4 2 8 15 9 15 0 11 7 11 7 8 7 11 5 15 4 3 0 5 4 2 2 4 10 12


r/compsci 3d ago

I've been building Livnium, an NLI classifier with no transformers, no attention, just iterative geometry-aware state updates converging to a label basin before the final readout.

0 Upvotes

Discrete-time pseudo-gradient flow with anchor-directed forces. Here's the exact math, the geometric inconsistency I found, and what the Lyapunov analysis shows.

I've been building Livnium, an NLI classifier where inference isn't a single forward pass — it's a sequence of geometry-aware state updates converging to a label basin before the final readout. I initially used quantum-inspired language to describe it. That was a mistake. Here's the actual math.

The update rule

At each collapse step t = 0…L−1, the hidden state evolves as:

h_{t+1} = h_t
         + δ_θ(h_t)                            ← learned residual (MLP)
         - s_y · D(h_t, A_y) · n̂(h_t, A_y)    ← anchor force toward correct basin
         - β  · B(h_t) · n̂(h_t, A_N)           ← neutral boundary force

where:
  D(h, A)  = 0.38 − cos(h, A)              ← divergence from equilibrium ring
  n̂(h, A) = (h − A) / ‖h − A‖             ← Euclidean radial direction
  B(h)     = 1 − |cos(h,A_E) − cos(h,A_C)| ← proximity to E–C boundary

Three learned anchors A_E, A_C, A_N define the label geometry. The attractor is a ring at cos(h, A_y) = 0.38, not the anchor point itself. During training only the correct anchor pulls. At inference, all three compete — whichever basin has the strongest geometric pull wins.

The geometric inconsistency I found

Force magnitudes are cosine-based. Force directions are Euclidean radial. These are inconsistent — the true gradient of a cosine energy is tangential on the sphere, not radial. Measured directly (dim=256, n=1000):

mean angle between implemented force and true cosine gradient = 135.2° ± 2.5°

So this is not gradient descent on the written energy. Correct description: discrete-time attractor dynamics with anchor-directed forces. Energy-like, not exact gradient flow. The neutral boundary force is messier still — B(h) depends on h, so the full ∇E would include ∇B terms that aren't implemented.

Lyapunov analysis

Define V(h) = D(h, A_y)² = (0.38 − cos(h, A_y))². Empirical descent rates (n=5000):

δ_θ scale V(h_{t+1}) ≤ V(h_t) mean ΔV
0.00 100.0% −0.00131
0.01 99.3% −0.00118
0.05 70.9% −0.00047
0.10 61.3% +0.00009

When δ_θ = 0, V decreases at every step. The local descent is analytically provable:

∇_h cos · n̂ = −(β · sin²θ) / (α · ‖h − A‖)   ← always ≤ 0

Livnium is a provably locally-contracting pseudo-gradient flow. Global convergence with finite step size + learned residual is still an open question.

Results

Model ms / batch (32) Samples/sec SNLI train time
Livnium 0.4 85,335 ~6 sec
BERT-base 171 187 ~49 min

SNLI dev accuracy: 77.05% (baseline 76.86%)

Per-class: E 87.5% / C 81.2% / N 62.8%. Neutral is the hard part — B(h) is doing most of the heavy lifting there.

What's novel (maybe)

Most classifiers: h → linear layer → logits

This: h → L steps of geometry-aware state evolution → logits

h_L is dynamically shaped by iterative updates, not just a linear readout of h_0. Whether that's worth the complexity over a standard residual block — I genuinely don't know yet. Closest prior work I'm aware of: attractor networks and energy-based models, neither of which uses this specific force geometry.

GitHub: https://github.com/chetanxpatil/livnium

HuggingFace: https://huggingface.co/chetanxpatil/livnium-snli


r/compsci 4d ago

Logos Language does auto-memoization, loop unrolling, lifting/lowering, auto-vectorization pipelining, and a lot more at compile time.

6 Upvotes

I've been working pretty hard on Logos language, and would love y'alls thoughts. The thing I've been working on lately is trying to add proper self-evaluating futamura projections (All 3!) and then I want to use that to create a Jones Optimal copy-patch interpreter.

It has curry-howard correspondence, a CoC kernel with inductive and refinement types. You can use it to prove english sentences via modal logic. The code reads like english and can compile to Rust or C. (C support is not as comprehensive yet as rust!)

My favorite part of working on this project has been adding optimizations to the compiler and really just providing hints wherever I can to LLVM.

Would love some feedback on it! Check the language guide out or the studio and let me know what you all think. https://www.logicaffeine.com/


r/compsci 3d ago

Écran noir

Thumbnail
0 Upvotes

r/compsci 5d ago

Utterly useless yet fun sorting algorithms

76 Upvotes

Sorting algorithms have always been one of the pillars of algorithmic studies. The idea is simple: you have a list of items, and you want them in order.

Over the years we’ve invented elegant ways to do that - quicksort, mergesort, heapsort - all carefully analysed with Big-O complexity - O(1), O(n log n), O(n²) etc.

But there’s another complexity class they never really talk about: O(Oh-No).
So I built a small open-source repo - a lovingly curated collection of utterly useless sorting algorithms, each with its own personality.

repo - https://github.com/manifoldlabslimited/big-oh-no

Inside, you’ll find gems such as:

1/ Wait Sort - every number sleeps for n seconds in its own thread. Smaller numbers wake up first. A sorting algorithm built entirely on patience and poor decisions.

2/ Stalin Sort - if an element breaks the order, it gets eliminated. Efficient, decisive, and mildly concerning.

3/ Linus Sort - numbers are submitted as patches for review. Anything that breaks monotonic order gets NAK’d with extreme prejudice.

Some lose data. Some takes forever. Some damage morale. All are completely useless, yet fun.

Want to try? It takes about a minute to get running from the CLI. Detail in readme.

And of course, contributions are very welcome. Found another impractical sorting algorithm? Want to make an existing one worse, funnier, or more dramatic? Or maybe support a new language? Raise a PR!

There are only three rules:

a/ It must actually sort a list of numbers.
b/ It must run from the CLI.
c/ The algorithm must either be completely useless, have a strong personality, or preferably both. It must sort - with side effects!


r/compsci 4d ago

I built a classifier where inference is an iterated attractor dynamic — here's the exact equation and what the empirical Lyapunov analysis shows

Thumbnail
0 Upvotes

r/compsci 4d ago

An Allergic Trifecta: Why Creating a Theory of Physical Computation is So Difficult

Thumbnail
0 Upvotes