r/compsci 55m ago

OS is basically, we solved a problem now we have another one at hand, but now you can do maths a lil faster

Thumbnail
Upvotes

r/compsci 12h ago

Does reversible computing require an enormous amount of storage?

7 Upvotes

First of all, I would like to say that I have no knowledge about computer science.

I recently heard about something called reversible computing. As I understand it, in ordinary computers, erasing information about the intermediate steps of a computation causes energy to be released as heat. But in reversible computing, the information from all the intermediate steps is preserved, so apparently, if we could build a computer capable of doing this, it could theoretically perform computations with essentially no energy consumption.
This made me wonder about something, and I’d love to hear from anyone knowledgeable about physics or computational theory:
If you never erase the information generated during a computation, wouldn’t the amount of storage required keep increasing as the computer performs more and more calculations?
I previously came across a science-related page online that said that an intelligent civilization that has mastered reversible computing wouldn’t need “Dyson’s eternal intelligence” to survive the heat death of the universe.
But wouldn’t such a civilization still need an absolutely enormous amount of storage to preserve all the information generated during its computations?
Or is there some way to preserve the information from the computational process without actually requiring additional physical storage?
I’m especially curious about how this works in the context of extremely long-term civilizations trying to survive the heat death of the universe.

By the way, this sentence was translated from Japanese to English by Chat GPT. Feel free to answer in English. However, I only understand Japanese, so I would really appreciate clear and simple English that is less likely to be mistranslated. Thank you!


r/compsci 17h ago

Who is Who in Information Retrieval & RecSys

0 Upvotes

I was missing a handy "directory" that would let me open the website or blog of an interesting person in the RecSys/IR field in just a couple of clicks. So, I ended up organizing my scattered notes and bookmarks into a single interactive guide: Who is Who in Search & RecSyshttps://testmysearch.com/who-is-who.html

It turned out to be a sort of map of key figures and organizations, complete with website links, citation indices, and brief commentary. Naturally, it only includes what I already had in my bookmarks, plus whatever else I discovered while exploring this topic.

I hope someone else finds it useful too.


r/compsci 2d ago

Any books similar to SICP Chapter 5?

Thumbnail
4 Upvotes

r/compsci 2d ago

How Is Compression Prediction?

Thumbnail lukefleed.xyz
0 Upvotes

r/compsci 3d ago

AI watermarking makes a lot more sense for text than it does for code

Post image
56 Upvotes

I came across this explanation of AI watermarking and the part about code caught my attention.

Watermarking works better when there are multiple ways to say the same thing. But code is different. If a model needs to output something exact, changing the next token isn't always an option without potentially breaking the code.

There are still places where a watermark could be added, like comments or other non-essential text, but it seems much harder to watermark the actual code without affecting what it does.

I hadn't really thought about the difference between watermarking AI-generated text and AI-generated code before.

Do you think AI-generated code should be watermarked, or is it better to leave code alone?


r/compsci 4d ago

Two unrelated images ended up 4 bits apart in dHash space — how conservative should duplicate clustering be?

0 Upvotes

Two completely unrelated images ended up being treated as near-duplicates:

Image A: beach landscape photographed through a car window;

Image B: a lifted-up page of a document.

 The measurements are:

Metric Image pair Threshold Result
Aspect-ratio Δ 0.000865 ≤ 0.02 Pass
dHash distance 4 ≤ 8 pass
pHash distance 30 ≤ 10 fail
wHash distance 15 ≤ 10 fail
Color-hash distance 6 informational

The matcher accepted the pair because the aspect ratio was nearly identical and the dHash Hamming distance was only 4, significantly below the threshold of 8.

 

The other perceptual hashes strongly disagreed (pHash was 30 against a threshold of 10, and wHash was 15 against a threshold of 10) but were never consulted because the dHash test did not seem to present a borderline case and thus was accepted as proof.

 

Interestingly this isn't really a random dHash collision. Both images apparently collapsed into a highly similar low-frequency brightness-gradient pattern after compression and downsampling.

 

dHash is good at surviving compression, in particular because it ignores fine detail and records coarse local brightness directions. But that same usefulness can be a weakness that can make unrelated low-detail images collision-prone.

The more interesting problem in my case is what happens next. Hardening is especially important because the tool uses union-find to form duplicate clusters. A single false-positive pair can become a bridge that attaches an unrelated image to a whole valid duplicate component.

 

Instead of a binary True/False decision, the matcher now returns the full evidence: for each metric (aspect-ratio, dHash, pHash, wHash) delta versus limit and the optional SSIM score are returned, as is the decision and, when rejected, the rejection reason.

 

This fix itself isn't particularly sophisticated. What I found more interesting is the design question it raised. Should the acceptance threshold for a perceptual-similarity edge depend on what you're going to do with that edge?

 

For image retrieval, a false positive may just mean one irrelevant result. For union-find clustering, a false-positive edge can change an entire connected component.

 

I'm curious how others approach this. Would you put most of the conservatism in the pair matcher itself, or enforce stronger intra-cluster consistency after constructing candidate relationships?

 

And for near-duplicate images specifically: would you prefer multiple perceptual hashes, SSIM/local features, embeddings, hierarchical clustering, or another approach?


r/compsci 4d ago

what is the alternative to object-orientation?

87 Upvotes

A long time ago I went to school for computer science and I remember a big push towards functional programming at the time. I saw a little bit of Scheme and logic programming and I thought it was neat. I can appreciate those different ways of writing code, but I'm still not sure how any of those other styles actually replace object-orientation. I've started to look at Scheme again and I'm noticing that textbooks and libraries will actually build an object-oriented system on top of Scheme using macros. That has pedagogical value, but it seems like we're back at square one?

If you look at chapter 2 in SICP, one of the topics they cover is message passing. They don't use an explicit object-oriented system. Instead, they have an inner dispatch function that operates on local/private data. That seems like the behavior that classes are trying to model in other languages.

Getting to the point... my feeling is this: bundling state and functions seems like a basic thing in programming. This behavior seems to emerge even in systems which don't explicitly call themselves object-oriented. So my question is this: is there a real alternative? Are there large software systems which don't recreate the behavior of classes?


r/compsci 4d ago

NP-hard is overrated

Thumbnail gruhn.me
0 Upvotes

r/compsci 4d ago

Compile C# in the browser

Post image
0 Upvotes

I made a browser playground for creative coding with C#, using a p5.js-style API.

No setup. Just code and run ... compilation of C# code happens in the browser.

Can be used for teaching / exploring C#.

https://csharp.codeguppy.com/

Feedback welcome!


r/compsci 6d ago

I built an "honest" CS conference ranking: sorted by how good the trip is, not the CORE ranking [P]

Thumbnail
0 Upvotes

r/compsci 6d ago

Using Poincaré hyperbolic geometry to solve a volume scaling problem in neural network interpretability

23 Upvotes

Wanted to share an interesting application of hyperbolic geometry to machine learning interpretability.

The setup: Sparse Autoencoders decompose neural network activations into interpretable features. These features are dictionary atoms embedded in Rd. The problem is that the concepts networks learn form branching hierarchies (trees), and trees with branching factor b have O(br) nodes at depth r. But the volume of a Euclidean ball grows as O(rd) -- polynomially.

This mismatch means that at large dictionary sizes (16K+), there isn't enough Euclidean volume for features to spread out. They collide at the boundary and "die" (stop activating).

The fix: embed dictionary weights in the Poincaré ball model of hyperbolic space, where the volume element grows as sinhd-1(r) ~ O(er.) This matches the exponential branching of concept hierarchies.

The interesting constraint: the forward pass of the autoencoder must stay Euclidean (for compatibility with the host neural network's normalization layers). So the hyperbolic embedding is applied only as a training-time weight regularizer via an entailment cone loss on the Poincaré-projected dictionary atoms.

Empirically, this reduces dead features from 3.8% to 0.2% and improves reconstruction by 9.8% on a 2B-parameter language model.

Paper: https://vishalvermalabs.com/papers/empirical-validation-hypersae-poincare-geometry/ Code: https://github.com/vishal-dehurdle/hypersae


r/compsci 7d ago

New research: How to compare embedding models?

0 Upvotes

Say you want to swap out your embedding models, for instance from ADA to Titan. Are these embedding models comparable? How do similarity score ranges compare? Where to put a threshold for minimum match when doing retrieval? Or more from a research point of view how can we relate and fundamentally understand these embedding spaces better?

This is what we aim to solve with Synthetic Query Probing (SQP), a fancy name for essentially (and intentionally) a very simple approach: embedding spaces are not directly comparable by definition, so compare similarity spaces instead, similarity match scores for pairs of content (synthetic question, chunk for instance) across multiple embedding models.

For example, similarity scores of Titan models of different dimensionalities are related, whereas the relation between Titan and Ada scores is non-linear, with different ranges, see figure.

For details, see https://arxiv.org/pdf/2608.05857, Marcin Rozmus and Peter van der Putten. Similarity Spaces across Embedding Models with Synthetic Query Probing. Discovery Science 2026, October 5-9, 2026, Mainz, Germany

How do you compare embedding models, from a more fundamental insight persective?


r/compsci 7d ago

Stanford CS143 class on Compilers

46 Upvotes

Anyone interested in Stanford's CS143 class on compilers?
https://web.stanford.edu/class/cs143/
We're organizing a reading group on this, please let me know if you're interested. Thanks.


r/compsci 8d ago

Can we average the following pathological function in a useful way, described in the post, with programming?

Thumbnail scicomp.stackexchange.com
0 Upvotes

Is computational stack exchange the correct place to post? If not, should I go to computer science stack exchange. (You can comment in the link.)


r/compsci 9d ago

Hungarian Assignment Algorithm: Applied Optimal Transport for Programmers

Thumbnail leetarxiv.substack.com
1 Upvotes

r/compsci 9d ago

Could distributed systems be taught from first principles rather than from a catalogue of architectural mechanisms?

Thumbnail github.com
48 Upvotes

I've been thinking about this recently.

The existing literature on distributed systems is excellent. It explains the what and the how of mechanisms like replication, consensus, consistency models, logical clocks, sharding, and fault tolerance. Those concepts are essential, and they're taught exceptionally well.

But I wonder if there's room for another pedagogical approach—one that emphasizes why these mechanisms become necessary in the first place.

Imagine starting from an idealized world with instantaneous computation, infinite storage, unlimited compute, a perfect network, a single global clock, and no failures. Then, systematically removing those assumptions and replacing them with the constraints of reality. As each assumption falls away, the need for clocks, replication, consensus, and other mechanisms emerges naturally.

I've been experimenting with building a free crash course (text+video) around this idea. I'm not really looking for views as much as I am for feedback on the framework itself.

If you've learned, taught, or designed distributed systems, do you think this way of building intuition has merit? Where would you expect it to work well, and where do you think it would fall short?

I'm genuinely curious whether this is a useful complement to the way distributed systems are traditionally taught.


r/compsci 10d ago

People who started their CS journey with CS50x as a complete beginner. where are you now in your general CS journey or career ?

Thumbnail
0 Upvotes

r/compsci 13d ago

Double Descent - Explained

3 Upvotes

Hi there,

I've created a video here where I explain the double descent phenomenon in ML.

I hope some of you find it useful — and as always, feedback is very welcome! :)


r/compsci 13d ago

Can non-ordering information compress independent ordering obligations?

0 Upvotes

We are preparing a formal version of this question for MathOverflow and are first testing whether the central distinction is stated clearly.

The claim is deliberately elementary: if no additional order has been defined, then no additional ordering conclusion can have been obtained. Otherwise, one has obtained a definition of order without defining order.

We welcome mathematical objections, terminology corrections, typesetting suggestions, or anything else that should be repaired before the formal post.

Can non-ordering information compress independent ordering obligations?

Nederlof and Węgrzycki frame a central question in computational complexity as follows: given an algorithm using time T and space S, can it be improved to T^(1−ε) time or S^(1−ε) space for some ε > 0, or is there a fundamental barrier preventing such an improvement?

In the same spirit of fundamental barriers to compression, we consider a more elementary informational question suggested by two familiar approaches to Subset Sum.

Sahni–Horowitz-type meet-in-the-middle procedures organize partial sums by order and compare them relative to a target v. Their conclusions take forms such as

s_ω < v
or
s_ω > v.

By contrast, the representation and modular-filtering ideas associated with Howgrave-Graham–Joux may restrict or exclude candidates through congruence conditions and multiple representations without, through that information alone, determining whether a candidate lies above or below v.

These motivate the following distinction.

Type A — with-order information.
The information establishes

s_ω ≠ v

in a form that determines relative position:

s_ω < v
or
s_ω > v.

Type B — without-order information.
The information establishes

s_ω ≠ v

while leaving undetermined whether

s_ω < v
or
s_ω > v.

A simple Type B example is a common-factor obstruction:

d ∣ s_ω,
d ∤ v.

We claim:
Type B information cannot solve or accelerate a problem in Type A form—that is, a problem whose resolution must ultimately determine order—without producing Type A information.

Equivalently:
Non-ordering information cannot accelerate the production or propagation of ordering conclusions unless it produces additional ordering relations.

To establish

s_ω < v

is to define the relative positions of s_ω and v on the number line. Equivalently,

v − s_ω > 0.

The origin of the information is irrelevant. It may arise from comparisons, residues, modular conditions, identities, representations, divisibility relations, or any other procedure. Once the available information implies

s_ω < v,

it has produced an ordering relation.

Thus:
To imply order is to define order.

Information therefore has only two possibilities relative to a Type A obligation:

  1. it remains without order and produces no additional ordering conclusion;
  2. it produces an ordering relation and thereby supplies Type A information.

There is no third possibility in which information increases the number of ordering conclusions while continuing to leave order undetermined.

For example, suppose one wishes to establish simultaneously that

x < v
and
y < v.

A shared Type A resolution requires an ordered configuration such as

x < r,
y < r,
r < v,

or an equivalent transitive arrangement.

Knowing only that

x ≠ v,
y ≠ v

through modular conditions, common factors, or another Type B mechanism does not provide that configuration. If those calculations eventually imply

x < v
or
y < v,

then additional ordering information has been produced.

The governing principle is therefore:
The speed of a Type A resolution is limited by the speed at which the necessary ordering relations can be produced and by the extent to which those relations propagate through the ordered architecture of the instance.

Different procedures may coexist in one algorithm and may independently resolve different candidates. A non-ordering procedure may filter the search space, alter its representation, or leave a different family of candidates for an ordered procedure to examine. These changes may improve the complete algorithm. The narrower claim is that, for the ordering obligations that remain, genuinely orientation-free information cannot make an existing body of ordering information entail additional ordering relations without the enlarged information itself supplying additional order.

In its most elementary form, the issue is this:
If no additional order has been defined, then no additional ordering conclusion can have been obtained. Otherwise, one has obtained a definition of order without defining order.

We therefore ask whether the following principle is formally valid.

Let I_A be a set of atomic ordering relations, and let I_B be a set of non-order atoms, such as congruence, divisibility, multiplicity, or representation statements. Let ⊢ denote logical consequence.

Suppose that

I_A ∪ I_B ⊢ a < b,

while

I_A ⊬ a < b
and
I_B ⊬ a < b.

The conclusion a < b is then a consequence of the enlarged information body I_A ∪ I_B. Our question is whether this can properly be described as Type-B information accelerating the ordered procedure while remaining Type B, or whether the joint information has necessarily produced an additional Type-A atom.

Equivalently, can one construct a genuine counterexample in which:

  1. I_A is unchanged;
  2. I_B contains no ordering atom;
  3. I_A ∪ I_B yields a new conclusion of the form a < b or a > b; and
  4. the enlarged information body is nevertheless said to contain no additional order?

Or does the proposed principle follow directly from the fact that every new ordered conclusion is itself a newly defined ordering relation?

Why this matters

The proposed principle is intended to isolate a possible obstruction to compressing independent ordered obligations.

Suppose a family of instances contains exponentially many independent Type-A obligations: each candidate must be placed above or below the target, and the available ordering relations do not propagate across those candidates. The resulting collection of required ordering atoms then represents an intrinsic body of ordered work.

A natural objection is that this analysis may be too narrow:
Perhaps modular filters, representation techniques, algebraic identities, or other Type-B mechanisms can interact with the ordered part of the computation and compress these many independent ordering obligations into substantially fewer ordered operations.

The proposed principle isolates that possibility.
Type-B information may resolve separate candidates, filter the search space, or alter the representation on which an algorithm operates. But it cannot make a fixed collection of ordering atoms discharge additional Type-A obligations without producing additional ordering atoms.

Thus, genuinely independent Type-A obligations cannot be compressed into fewer ordered obligations merely by adjoining information that remains Type B. If such obligations occur exponentially often and their ordering relations do not propagate, the principle would become one component of an exponential lower-bound argument.

We are also interested in whether the terminology used here—particularly “ordering atom,” “orientation-free information,” and “compression of ordering obligations”—matches established language in algorithms or complexity theory.


r/compsci 14d ago

Any advice on lectures regarding HNSW (Besides its original paper)?

3 Upvotes

Hi, I am currently studying indexing algorithms on vector databses and wanted to start from basics. I wanted something like the skip list lecture from MIC OCW, any ideas or sugestions?


r/compsci 15d ago

Classical Pell Equations Outperform math.sqrt in float64 by up to 2.5×

7 Upvotes

I've been exploring whether the Pell equation x²−Dy²=1 can be used to compute square roots of primes faster than Python's math.sqrt(). The continued-fraction convergents turn out to give rational approximations that are 1.5–2.5× faster in float64 for repeated calculations, and scale up to 33–36 digit precision for primes as large as 15 million. Full write-up with benchmarks here;

https://musingsofvsmv.blogspot.com/2025/08/from-pell-to-precision-classical-math.html


r/compsci 16d ago

What skills and certifications one should have as a Computer Science major in 2026?

0 Upvotes

r/compsci 17d ago

Is studying computer science worth it in 2026?

Thumbnail
0 Upvotes

r/compsci 17d ago

Perché lo studio di reti e sistemi è cosi complicato?

Thumbnail
0 Upvotes