3 ms·
How to inject knowledge efficiently? Knowledge infusion scaling law for LLMs
- gdiamos 1y agoI wonder if this depends on what is inside the domain specific data. I’m happy to see ML papers on hacker news.
- adsharma 1y agoI wish the authors calculated a plot of model size (number of params) vs number of triples it can hold before the memory collapse happens. It's hard to map the frequency of knowledge injection to a real world understanding of "how much knowledge" can a 4B param model hold?
- bconsta 1y agoThere is a study that gives a rule of thumb of ~2 bits per param for a model's memorization capacity: https://arxiv.org/abs/2404.05405 https://arxiv.org/abs/2404.05405
- dart_pink 1y agoSeems they have replicated Gardner's work, without mentioning it, "Maximum Storage Capacity in Neural Networks" (1987), which established that the storage capacity of a neural network is about 2N (2 bits per parameter)
- selimthegrim 1y agoElizabeth Gardner for those looking.
- bconsta 1y agoI had no idea about this. Thanks for sharing
- adsharma 1y ago2 bits out of FP8 would be 25% 2 bits out of FP16 would be 12.5% I've seen recent work that claimed 70% of the params are used for memorization.
- adsharma 1y agoRecent: 3.6 bits per param https://arxiv.org/abs/2505.24832 https://arxiv.org/abs/2505.24832
- dart_pink 1y agoYou're both right. The classical capacity measure (Gardner's capacity limit) is defined as the maximum number of patterns that can be remembered with zero errors. This remains 2 bits per parameter, proven mathematically. The capacity definition in this recent paper is completely different - it is defined based on the kolmogorov complexity of predicting a memorized sequence, or in layman's terms: how easy it is to compress known sequences. This allows for some bit "errors", ie some symbols with bad compression ratio, only the total compression ratio of the sequence is measured. This is somewhat parallel to the classical ECC limits (strict hamming distance constraints) vs modern probabilistic ECC limits. TLDR when you allow a small number of errors, the capacity increases from 2 bits to 3.6 bits
- daft_pink 1y agoI’m really curious how much it costs to inject information like this into an LLM as people say training an LLM is very expensive, so if you want a domain specific LLM, how much does the additional training cost to get this?
- simonw 1y agoIt sounds like you're talking about fine-tuning an existing model. That's not what this paper did - they studied the effect of training small models entirely from scratch with varying amounts of domain knowledge. I still haven't seen strong evidence that fine-tuning to add extra knowledge is effective, but I'd be delighted to learn otherwise.
- hollerith 1y agoAre there any effective ways to add extra knowledge to an LLM, ways that are more than just demos or proofs of concept? For example, could there be a site like HN with ten thousand contributors where the contributions are changes to an LLM rather than posts and comments? One issue is that if contribution A contradicts contribution B, then on HN the contradiction presents no problem (i.e., two HN comments can and often do contradict each other just fine) whereas AFAICT the LLM will need to resolve the contradiction somehow to give coherent answers on the subject matter of the contributions A and B. Then again I suppose the LLM's answer could take the form, "opinions on [subject] vary, with some maintaining that . . . whereas others claim that . . ."
- simonw 1y agoThis is a solved problem. The answer is to add extra relevant information to the context as part of answering the user's prompt. This is sometimes called RAG, for Retrieval Augmented Generation. These days the most convincing way to do this is via tool calls. Provide your LLM harness with a tool for running searches, and tell it to use that tool any time it needs additional information. A good "reasoning" LLM like GPT-5 or Claude 4 can even handle contradictory pieces of information - they can run additional searches if they get back confusing results and work towards a resolution, or present "both sides" to the user if they were unable to figure it out themselves.
- mtokarski 1y agoInteresting work, but I think the interpretation may be a bit overstated. The authors claim that injecting too much factual "knowledge" during pretraining causes models to collapse — performance drops below the baseline once knowledge frequency crosses a threshold. The problem is how they inject it. Their “knowledge” isn’t natural language; it’s templated Wikidata triples like "X is the capital of Y." That’s a super low-entropy, highly repetitive distribution. When you cram enough of that into a fixed token budget, you’re not really teaching the model more facts — you’re just destroying linguistic diversity and skewing the token statistics. In real pretraining or domain adaptation scenarios, “knowledge” tends to appear in richer, more varied contexts. The practical takeaway isn’t "don’t add too much domain data," but rather "don’t overrepresent any single format or narrow syntactic pattern" The issue seems more about representation homogeneity than about factual density itself.
- spankalee 1y agoDoesn't this then support the claim that LLMs aren't building world models - where even linguistically simple factual statements should help expand and refine that model - and reenforce the idea that they are still just next token predictors?
- simsla 1y agoThere's no inductive bias for a world model in multiheaded attention. LLMs are incentivized to learn the most straightforward interpretation/representation of the data you present. If the data you present is low entropy, it'll memorize. You need to make the task sufficiently complex so that memorisation stops being the easiest solution.
- andrewflnr 1y agoMy read is that token prediction requires a more general model to predict more varied tokens, which makes it something closer to a world model. After all, in principle, there's a point where the optimal "token predictor" really is backed by a world model. (Now is that model feasible to find? unclear!)
- dotancohen 1y ago
- itissid 1y agoWhat if we use the structured prompts from coding sessions, especially the ones which use arch design document, domain knowledge(UML, Statecharts what have you), what team member to ask about X, for a large projects and fine tuned models. And these could all be made into tool calls for instruction following. Right now it seems teams manage a reasonably sophisticated LLM layer, MCPs and instruction following is one shot context window management dependent.